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
Open the VI.
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.
Run the VI.
Click the Trigger button to acquire frames. Each trigger will return a single frame.
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.