How do I program my camera in National Instruments (NI) LabVIEW?

Last Revision Date: 4/18/2016

We continue to work with National Instruments (NI) to provide tools for developers to better integrate our cameras in LabVIEW. The list of examples below demonstrate the fundamentals of connecting, configuring, and streaming our cameras in LabVIEW. This article does not apply to Blackfly S cameras, which do not require additional examples.

Pre-requisite: The following examples require National Instrument’s LabVIEW software to be installed. Users are encouraged to run National Instrument’s Measurement and Automation Explorer to ensure the camera is able to stream before running these examples. ActiveX examples require installing FlyCapture2 (recommend version 2.6 or higher).

All the examples below work with FireWire, GigEVision, USB2, and USB3Vision interfaces.

Download the V10 examples for LabVIEW version 2011, 2012, or 2013. Download the V12 examples for LabVIEW version 2013.

For a list of compatible LabVIEW versions, see here.

ActiveX_Single_Camera_Free_Running_Or_Software_Trigger

This example streams a single camera in free running or software trigger mode. It displays the current frame rate. Also, users can use the camera control dialog to change camera settings. A live view window is also included.

LabVIEW_ActiveX_Single_Camera_Free_Running_Or_Software_TriggerV10.zip

LabVIEW_ActiveX_Single_Camera_Free_Running_Or_Software_TriggerV12.zip

ActiveX_Two_Cameras_Free_Running

This example sets up two cameras in the designated grab mode and video mode. It grabs images simultaneously from two cameras and displays them on the screen. The image data is also displayed on screen.

LabVIEW_ActiveX_Single_Camera_Free_Running_Or_Software_TriggerV10.zip

LabVIEW_ActiveX_Single_Camera_Free_Running_Or_Software_TriggerV12.zip

IMAQdxEx - Four Cameras SW and HW Trigger

This IMAQdx example enables capturing of images from four identical cameras simultaneously. The user has the option to choose software trigger or hardware trigger. A single button initiates software trigger on four cameras. A live image is displayed upon software or hardware trigger.

IMAQdxEx_Four_Cameras_SW_HW_TriggerV10.zip

IMAQdxEx_Four_Cameras_SW_HW_TriggerV12.zip

IMAQdxEx - Grab and Save to AVI

This IMAQdx example captures live images and saves them to AVI.

IMAQdxEx_Grab_Save_AVIV10.zip

IMAQdxEx_Grab_Save_AVIV12.zip

IMAQdxEx - HardwareTriggerLine0

This IMAQdx example starts the camera in trigger mode using trigger source “Line 0”. The grabbed images are displayed on to the screen.

IMAQdxEx_HardwareTriggerLine0V10.zip

IMAQdxEx_HardwareTriggerLine0V12.zip

Convert FireWire embedded timestamp (FW)

This example converts Firewire 1394 embedded timestamp value to absolute cycle time information.

Convert_FireWire_Embedded_TimestampV10.zip

Convert_FireWire_Embedded_TimestampV12.zip

Related Articles