Programmatically Changing the Camera File for an IMAQ Interface

Updated Jul 9, 2018

Reported In

Hardware

  • PCIe-1433

Software

  • DevSuite Image and Vision Acquisition

Driver

  • NI-IMAQ

Operating System

  • Windows

Programming Language

  • LabVIEW G

Issue Details

I would like to programmatically change the camera file associated with my IMAQ interface. How can I do this?

Solution

The current camera file that shows up next to the Channel under Measurement & Automation Explorer (MAX) is actually set by lines in the interface file (.iid) for your specific interface. If your interface name is img0, then this file will be named img0.iid and will be located at <Documents and Settings>\All Users\Documents\National Instruments\NI-IMAQ\data.

In this file, there is a line for each channel followed by the name of the camera file (.icd) used by that channel. These camera files are contained in the same directory as the interface file (see path above).
You can parse the camera file as a text file and replace the portion of text in the quotation marks following the respective channel with the name and file extension of the new file to use. See the VI attached and the related link below for an example of how to programmatically change your camera file.

Additional Information

Changing the InterfaceName will not change the camera name in NI MAX. The camera alias in NI MAX is set by the name of the .iid file.

WAS THIS ARTICLE HELPFUL?

Not Helpful