imgSessionWaitSignal

NI IMAQ Function

imgSessionWaitSignal

Usage

rval imgSessionWaitSignal(SESSION_ID sid, uInt32 signal, uInt32 state, uInt32 timeout);

Purpose

Waits for a signal to be in a given state. This function returns when either the specified signal is in a given state or the wait times out.

Note  This function is obsolete. The replacement function is imgSessionWaitSignal2, which incorporates the functionality of imgSessionWaitSignal but also returns additional information.

Parameters

Name Type Direction
sid SESSION_ID input
signal uInt32 input
state uInt32 input
timeout uInt32 input
rval Int32 output

Parameter Discussion

sid: valid SESSION_ID.

signal: signal to wait for. The signal can one of the following constants:

IMG_AQ_IN_PROGRESSAsserted when the device initiates an acquisition either through a software- or hardware-triggered start.
IMG_AQ_DONEAsserted at the end of an acquisition when the last piece of data has been transferred to memory.
IMG_FRAME_STARTAsserted at the start of acquisition into each image buffer.
IMG_FRAME_DONEAsserted at the end of acquisition into each image buffer.
IMG_BUF_COMPLETEAsserted when an image buffer has been transferred to memory and is available for image processing.
IMG_EXT_TRIG0Specifies the external trigger 0.
IMG_EXT_TRIG1Specifies the external trigger 1.
IMG_EXT_TRIG2Specifies the external trigger 2.
IMG_EXT_TRIG3Specifies the external trigger 3.
IMG_EXT_RTSI0Specifies RTSI line 0.
IMG_EXT_RTSI1Specifies RTSI line 1.
IMG_EXT_RTSI2Specifies RTSI line 2.
IMG_EXT_RTSI3Specifies RTSI line 3.
IMG_EXT_RTSI4Specifies RTSI line 4.
IMG_EXT_RTSI5Specifies RTSI line 5.
IMG_EXT_RTSI6Specifies RTSI line 6.
Note  IMG_EXT_TRIG ‹0..3› refers to the external trigger lines of the image acquisition device. IMG_EXT_RTSI ‹0..6› refers to the internal pins on the RTSI controller of the image acquisition device.

state: state of the signal to wait for. state can be one of the following constants:

IMG_SIGNAL_STATE_RISINGWaits for a rising edge.
IMG_SIGNAL_STATE_FALLINGWaits for a falling edge.

timeout: time, in milliseconds, to wait for the appropriate state. If the appropriate state does not occur within the timeout period, the function returns IMG_ERR_TIMEOUT.

Return Value

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

For more information, refer to the Obsolete functions topic.