From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Toggle between Multiple USB Camera

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.

    Hardware

  • Machine Vision

    Software

  • LabVIEW

    Driver

  • NI Vision Acquistion Software

Code and Documents

Attachment

Overview

This example acquires images from a gige or usb camera using the IMAQdx driver which is part of the Vision Acquisition Software. It's possible to toggle between multiple cameras by selecting the camera name input.

Description

Some USB camera drivers are not capable of acquiring from two cameras simultaneously.  Since the IMAQdx driver goes through the camera driver, if the camera driver is unable to acquire from multiple cameras simultaneously, then IMAQdx will not be able to acquire from these cameras simultaneously.

But if you would simple like to be able to toggle between multiple USB camera, you can use the following example for it.

Untitled.png

Requirements

Vision Acquisition Software 2009 "or compatible"

LabVIEW 2009 "or compatible"

GIGe or USB 2.0 Camera

Steps to Implement or Execute Code

1.) Make sure the required software is installed and activated

2.) Test the camera using Measurement & Automation Explorer (MAX)

3.) Close MAX and open "Multiple USB Camera Acquisition 2009.vi"

4.) Select your camera under Camera Name

5.) Run the LabVIEW program

Additional Information or References

Note: To toggel between multiple cameras please select different cameras using the "Camera Name" input.

NI-IMAQdx Compatibility with Different LabVIEW Versions

Is My Camera Supported by National Instruments?

**This document has been updated to meet the current required format for the NI Code Exchange. For more details visit thisdiscussion 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.

Contributors