imgPulseCreate
Usage
rval imgPulseCreate(uInt32 timebase, uInt32 delay, uInt32 width, uInt32 trigger, uInt32 triggerPolarity, uInt32 output, uInt32 outputPolarity, uInt32 pulseMode, PULSE_ID* plsID);
Purpose
Configures the attributes of a pulse. A single pulse consists of a delay phase (phase 1), followed by a pulse phase (phase 2), and then a return to the phase 1 level.
Note This function is obsolete. The replacement function is imgPulseCreate2, which incorporates the functionality of imgPulseCreate but also returns additional information. |
Note Only two pulses can occur at once. |
Parameters
Name | Type | Direction |
timebase | uInt32 | input |
delay | uInt32 | input |
width | uInt32 | input |
trigger | uInt32 | input |
triggerPolarity | uInt32 | input |
output | uInt32 | input |
outputPolarity | uInt32 | input |
pulseMode | uInt32 | input |
plsID | PULSE_ID* | output |
rval | Int32 | output |
Parameter Discussion
timebase: timebase of the counter. timebase has the following possible values:
PULSE_TIMEBASE_50MHZ | Specifies a 50 MHz timebase to use for pulse generation. |
PULSE_TIMEBASE_100KHZ | Specifies a 100 kHz timebase to use for pulse generation. |
PULSE_TIMEBASE_PIXELCLK | Specifies the incoming pixel clock from the camera to use as a timebase for pulse generation. |
delay: duration of the first phase of the pulse. Use the following formula to determine the actual time period that delay represents:
delay × (timebase resolution)
width: duration of the second phase of the pulse, phase 2. The unit is cycles of the timebase. Use the following formula to determine the actual time period that width represents:
width × (timebase resolution)
trigger: signal that will trigger the pulse. trigger can be one of the following constants:
IMG_AQ_DONE | Asserted at the end of an acquisition when the last piece of data has been transferred to memory. |
IMG_AQ_IN_PROGRESS | Asserted when the device initiates an acquisition either through a software- or hardware-triggered start. |
IMG_EXT_RTSI0 | Specifies RTSI line 0. |
IMG_EXT_RTSI1 | Specifies RTSI line 1. |
IMG_EXT_RTSI2 | Specifies RTSI line 2. |
IMG_EXT_RTSI3 | Specifies RTSI line 3. |
IMG_EXT_RTSI4 | Specifies RTSI line 4. |
IMG_EXT_RTSI5 | Specifies RTSI line 5. |
IMG_EXT_RTSI6 | Specifies RTSI line 6. |
IMG_EXT_TRIG0 | Specifies the external trigger 0. |
IMG_EXT_TRIG1 | Specifies the external trigger 1. |
IMG_EXT_TRIG2 | Specifies the external trigger 2. |
IMG_EXT_TRIG3 | Specifies the external trigger 3. |
IMG_FRAME_START | Asserted at the start of acquisition into each image buffer. |
IMG_FRAME_DONE | Asserted at the end of acquisition into each image buffer. |
IMG_IMMEDIATE | Causes the function to generate a pulse when the function is executed. |
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. |
triggerPolarity: polarity of the signal input as defined by the following constants:
IMG_TRIG_POLAR_ACTIVEL | Triggers on a falling edge. |
IMG_TRIG_POLAR_ACTIVEH | Triggers on a rising edge. |
output: trigger line on which the pulse is generated. output can be one of the following constants:
IMG_EXT_TRIG0 | Specifies the external trigger 0. |
IMG_EXT_TRIG1 | Specifies the external trigger 1. |
IMG_EXT_TRIG2 | Specifies the external trigger 2. |
IMG_EXT_RTSI0 | Specifies RTSI line 0. |
IMG_EXT_RTSI1 | Specifies RTSI line 1. |
IMG_EXT_RTSI2 | Specifies RTSI line 2. |
IMG_EXT_RTSI3 | Specifies RTSI line 3. |
IMG_EXT_RTSI4 | Specifies RTSI line 4. |
IMG_EXT_RTSI5 | Specifies RTSI line 5. |
IMG_EXT_RTSI6 | Specifies 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. |
outputPolarity: polarity of the pulse output as defined by the following constants:
IMG_PULSE_POLAR_ACTIVEL | Drives the line high during the delay phase, and drives the line low during the pulse phase. |
IMG_PULSE_POLAR_ACTIVEH | Drives the line low during the delay phase, and drives the line high during the pulse phase. |
pulseMode: value that indicates if the pulse is generated once or continuously. pulseMode can be one of the following constants:
PULSE_MODE_TRAIN | Pulse is generated continuously after the trigger is asserted. Choose this option to generate a continuous pulse train that is inactive for the number of cycles specified in the delay parameter, and active for the number of cycles specified in the width parameter. When the pulse train is started, it continues periodically until you call imgPulseStop, imgPulseDispose, or imgClose. |
PULSE_MODE_SINGLE | Pulse occurs one time when the first trigger occurs. Choose this option to generate a single pulse. On the first occurrence of signal_source, the output line stays inactive for the number of cycles specified in the delay parameter, and becomes active for the number of cycles specified in the width parameter. Future occurrences of signal_source do not affect the output line. |
PULSE_MODE_SINGLE_REARM | Pulse occurs one time on each trigger occurrence. Choose this option to generate a rearmed single shot pulse. On every occurrence of signal_source, the output line stays inactive for the number of cycles specified in the delay parameter, and becomes active for the number of cycles specified in the width parameter. When the pulse is started, output toggles for each occurrence of signal_source until you call imgPulseStop, imgPulseDispose, or imgClose. |
plsID: pointer to a variable to receive the pulse ID. If the function succeeds, the variable is populated with a valid PULSE_ID that can be used in subsequent functions.
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.