Example Code

IMAQdx Grab with Software Trigger

Code and Documents



 This VI performs a grab acquisition from an IMAQdx-compatible camera and allows the user to generate a software trigger to trigger the acquisition. 



 This VI uses the IMAQdx functions to open a session to a camera, set trigger settings, and start a grab. A parallel trigger loop monitors a UI button that allows the user to send a software trigger to the camera by setting the TriggerSoftware attribute of the camera. When the camera receives a trigger, it will acquire and return a single frame to the IMAQdx Grab 2 VI. The user can trigger as many frames as they want before stopping the acquisition.


Hardware and Software Requirements

  •  A USB3 or GigE camera that supports software triggering.
  • LabVIEW 2014 or later
  • Vision Acquisition Software

Steps to Implement or Execute Code

  1.  Open the VI.
  2. Select your camera and configure the timeout. The timeout value should be long enough to give you time to click the Trigger button after running the VI.
  3. Run the VI.
  4. Click the Trigger button to acquire frames. Each trigger will return a single frame.

Front Panel


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


Thanks! It was very helpful