imgSessionLineTrigSource2

NI IMAQ Function

imgSessionLineTrigSource2

Usage

rval imgSessionLineTrigSource2(SESSION_ID sid, IMG_SIGNAL_TYPE triggerType, uInt32 triggerNumber, uInt32 polarity, uInt32 skipCount);

Purpose

Configures triggering per line for acquisition from a line scan camera. Use this function to require a trigger to start the acquisition of each line from a line scan camera.

Note  This function requires a camera that has the functionality to externally control the line rate. To implement this functionality, the external line rate signal must be cabled to one of the image acquisition control lines.

Parameters

Name Type Direction
sid SESSION_ID input
triggerType IMG_SIGNAL_TYPE input
triggerNumber uInt32 input
polarity uInt32 input
skipCount 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 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
IMG_SIGNAL_SCALED_ENCODER

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_ACTIVELTriggers on a falling edge.
IMG_TRIG_POLAR_ACTIVEHTriggers on a rising edge.

skipCount: number of triggers to skip before acquiring a new line. For example, if you are using an encoder to trigger lines and it outputs 1,000 ticks per revolution, but you want to acquire only 10 lines per revolution, set this parameter to 99. Set this parameter to 0 to acquire a line on every trigger.

Note  Typically, this parameter is unnecessary when the trigger type is IMG_SIGNAL_SCALED_ENCODER because the scaled encoder signal can implement a skip count by using the IMG_ATTR_ENCODER_DIVIDE_FACTOR attribute.

Return Value

This function returns 0 on success. On failure, this function returns an error code. For information about the error code, call imgShowError.