Example Code

Triggered GigE Acquisition

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.


  • Data Acquisition (DAQ)
  • Machine Vision


  • NI Vision Acquistion Software

Code and Documents



This example uses a DAQ device to create a pulse train in order to trigger an image acquisition.


GigE Cameras are generally triggered via an external trigger line; the trigger method itself is described by the camera's manufacturer in the GeniCam XML File.

In this particular example, a DAQmx task is created to generate a pulse train; this pulse train ought then be wired into the camera's trigger line to control the Grab. The example thus requires a DAQ Device that possesses a counter output and is compatible with DAQmx. A property node is used to allow the user to chose the desired trigger mode.

Steps to Implement or Execute Code

  1. Select the camera to be used
  2. Enable triggered mode as well as the desired trigger activation and Timeout.
  3. Select the counter to be used
  4. Select a frequency for the counter
  5. Run the VI



This example requires a GigE Camera with an external trigger line. In order to trigger the camera, a DAQ device with a counter output is used; as such, an external connection must be made between the DAQ device and the camera. The DAQ device must be compatible with the DAQmx driver.


LabVIEW 8.6 "or compatible"

Vision Acquisition Software 8.6 "or compatible"

NI DAQmx 8.6.1 "or compatible"

VI Snippet

Triggered IMAQdx Acquisition_Snippet.png

Additional Information or References

**This document has been updated to meet the current required format for the NI Code Exchange. For more details visit this discussion thread**

Andy Chang
National Instruments
LabVIEW Control Design and Simulation

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.


Thank you AndyC! I am also trying to trig my GigE camera with a DAQ device. Your tutorial gives me useful ideas! (but unfortunately I can't run it since I only have Labview 8.2.1...)


Thnx Andi... very helpful for my work