imgSessionTriggerConfigure2
Usage
rval imgSessionTriggerConfigure2(SESSION_ID sid, IMG_SIGNAL_TYPE triggerType, uInt32 triggerNumber, uInt32 polarity, uInt32 timeout, uInt32 action);
Purpose
Configures an acquisition to start based on an external trigger.
Parameters
Name | Type | Direction |
sid | SESSION_ID | input |
triggerType | IMG_SIGNAL_TYPE | input |
triggerNumber | uInt32 | input |
polarity | uInt32 | input |
timeout | uInt32 | input |
action | uInt32 | input |
rval | Int32 | output |
Parameter Discussion
sid: valid SESSION_ID.
triggerType: type of trigger line to use. triggerType can be one of the following constants:
Note To use the ISO_IN or RS422_IN signals on the NI PCI-1426, select External as the Trigger Type for your function and choose ISO In or RS-422 In as the Signal Level for the trigger line in Measurement & Automation Explorer (MAX). |
IMG_SIGNAL_EXTERNAL |
IMG_SIGNAL_RTSI |
IMG_SIGNAL_ISO_IN |
triggerNumber: number of the trigger line to use.
polarity: polarity of the trigger line. polarity can be one of the following constants:
IMG_TRIG_POLAR_ACTIVEL | Triggers on a falling edge. |
IMG_TRIG_POLAR_ACTIVEH | Triggers on a rising edge. |
timeout: time, in milliseconds, to wait for the trigger to occur.
action: action to take when the trigger edge occurs. The following are valid values for action:
IMG_TRIG_ACTION_NONE | Clears the trigger. |
IMG_TRIG_ACTION_CAPTURE | Starts acquiring. |
IMG_TRIG_ACTION_BUFLIST | Acquires the buffer list once. |
IMG_TRIG_ACTION_BUFFER | Acquires a single image. |
IMG_TRIG_ACTION_STOP | Stops the acquisition. |
Note When using IMG_TRIG_ACTION_STOP, the device will continue acquiring a variable number of post-trigger buffers before stopping the acquisition. Use the IMG_ATTR_NUM_POST_TRIGGER_BUFFERS attribute to set the number of post-trigger buffers. |
Return Value
This function returns 0 on success. On failure, this function returns an error code. For information about the error code, call imgShowError.