J. Lewis Muir
2010-05-21
Revision 2

External Software Trigger Control API

The External Software Trigger Control API provides an EPICS PV interface for controlling an areaDetector acquisition of images in the same way regardless of the areaDetector driver being used.

Supported areaDetector Drivers

PV Interface

$(P)$(R)ExSwTrAcq
Set to Acquire to begin an acquisition of images; set to Done when the acquisition is finished.
$(P)$(R)ExSwTrOkToExp
Indicates whether it is OK to start an image exposure.
$(P)$(R)ExSwTrCtl
Set to 1 to start an exposure, and set to 0 to stop it.
$(P)$(R)ExSwTrCtlRsp
Will be Start, Stop, OK, or Again. Start indicates a request to start the exposure has been received (i.e. via $(P)$(R)ExSwTrCtl). Stop indicates a request to stop the exposure has been received (i.e. via $(P)$(R)ExSwTrCtl). OK indicates the exposure was successful. Again indicates the exposure was not successful and should be tried again.

Protocol for Acquiring Images

  1. Set $(P)$(R)ExSwTrAcq to Acquire
  2. Wait for $(P)$(R)ExSwTrOkToExp to be Yes
  3. Set $(P)$(R)ExSwTrCtl to Start to start the exposure
  4. Set $(P)$(R)ExSwTrCtl to Stop to stop the exposure (unless the exposure automatically stops)
  5. Wait for $(P)$(R)ExSwTrCtlRsp to be OK or Again
  6. If $(P)$(R)ExSwTrCtlRsp is Again, the exposure did not work and should be tried again
  7. Repeat from step 2 to acquire additional images
  8. Set $(P)$(R)ExSwTrAcq to Done

Note that care must be taken when waiting for $(P)$(R)ExSwTrCtlRsp to be OK or Again to ensure the PV value is not stale (i.e. from the previous exposure). There are at least two methods to ensure this:

API Implementation and Behavior Differences