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
- Set $(P)$(R)ExSwTrAcq to Acquire
- Wait for $(P)$(R)ExSwTrOkToExp to be Yes
- Set $(P)$(R)ExSwTrCtl to Start to start the
exposure
- Set $(P)$(R)ExSwTrCtl to Stop to stop the exposure
(unless the exposure automatically stops)
- Wait for $(P)$(R)ExSwTrCtlRsp to be OK or
Again
- If $(P)$(R)ExSwTrCtlRsp is Again, the exposure did not
work and should be tried again
- Repeat from step 2 to acquire additional images
- 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:
- After starting the exposure, wait for $(P)$(R)ExSwTrCtlRsp to be
Start, OR
- Use a CA monitor on $(P)$(R)ExSwTrCtlRsp; before waiting for the
OK or Again values, wait for the Stop value; (a
CA monitor is used to receive the value changes since the PV will have the
Stop value for just a short time); (note that this method will not
work for an API implementation where the exposure stops automatically since
$(P)$(R)ExSwTrCtl will not have been set to Stop)
API Implementation and Behavior Differences