imaq1394TriggerConfigure

NI-IMAQ for IEEE 1394 Cameras Function

imaq1394TriggerConfigure

Format

rval = imaq1394TriggerConfigure (SESSION_ID sessionID, unsigned long polarity, unsigned long timeOut, unsigned long mode, unsigned long parameter);

Purpose

Configures the trigger conditions for an acquisition. Use this function before any acquisition function to set up a triggered image acquisition.

Parameters

Parameter Type Description
sessionId SESSION_ID A valid Session ID, which you can obtain using imaq1394CameraOpen2.
polarity unsigned long The polarity of the trigger line. The following polarities are valid:
  • IMG1394_TRIG_POLAR_ACTIVEL—Triggers on a falling edge.
  • IMG1394_TRIG_POLAR_ACTIVEH—Triggers on a rising edge.
  • IMG1394_TRIG_POLAR_DEFAULT—Trigger on a rising edge.
timeOut unsigned long The time, in milliseconds, allowed for the image acquisition to complete. If the acquisition cannot complete in time, an error returns.
mode unsigned long The trigger mode.
parameter unsigned long An optional parameter that defines N in trigger modes 2 and 3. Refer to the parameter discussion for more information.

Parameter Discussion

mode specifies the trigger mode. The following descriptions are valid for low-active polarity. All states are inverted for high-active polarity.

  • IMG1394_TRIG_DISABLED—No trigger. The camera starts integration immediately.
  • IMG1394_TRIG_MODE0—The camera starts integration on every falling edge of the external trigger input. Integration time is defined in the shutter attribute.
  • IMG1394_TRIG_MODE1—The camera starts integration on every falling edge of the external trigger input. Integration time is equal to the low state of the external trigger.
  • IMG1394_TRIG_MODE2—The camera starts integration on the first falling edge of the external trigger input. At the Nth external trigger input falling edge, integration stops. N is defined in parameter.
  • IMG1394_TRIG_MODE3—This is the internal trigger mode. The camera issues a trigger internally. The cycle time is N times the cycle time of the fastest frame rate. N is defined in parameter. The integration time is specified with the shutter attribute.
  • IMG1394_TRIG_MODE4—The camera starts frame integration when the external trigger input changes to an active value. Each frame is exposed for a duration specified in the shutter attribute. The number of frames is specified in parameter, which must have a value of 1 or more.
  • IMG1394_TRIG_MODE5—The camera starts frame integration when the external trigger input changes to an active value. Each frame is exposed while the external trigger is active. The number of frames is specified in parameter, which must have a value of 1 or more.
Note  Some cameras may not support every trigger mode.

Return Value

On success, this function returns IMG1394_ERR_GOOD. On failure, this function returns an error code. You can obtain a more detailed error message with imaq1394ShowError or, if you are using Microsoft Visual Basic, imaq1394ShowErrorCW.