Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to update 1394 camera files programatically?

I would like to programatically update the camera file for a 1394 camera. The Attributes for the camera can be changed as demonstrated in the shipping example. I would like to save these to the camera file so that these become default. Are the current Attribute settings kept in memory so that a single "Save" call updates all the changed Attributes in the camera file or do I have to manually open the camera file and update the specific Attributes?
0 Kudos
Message 1 of 4
(4,601 Views)
Avasil

You are correct in your understanding. The attributes are updated in memory and will persist when you call the save function. The save function takes 2 parameters. The first is the current session and the second is an optional filename. Specify a filename if you want to save to a specific location. Leave the filename blank to save to the default location.

In LabVIEW, call
C:\Program Files\National Instruments\LabVIEW 8.2\vi.lib\vision\driver\IMAQdx.llb\IMAQdx Write Attributes.vi

In C/C++, declare the function
IMAQdxError NI_FUNC IMAQdxWriteAttributes(IMAQdxSession id, char* filename);
The import library will contain correct linkage.

Once the attributes are saved, they will loaded by default when you next open the session.

Hope this helps,

Johann





Message 2 of 4
(4,595 Views)
What driver package is the Imaqdx Write Attributes.vi part of?  I don't seem to have that particular VI in my Imaqdx drivers.  I need to programmatically save brightness gain etc.
 
Thanks,
 
nacree
0 Kudos
Message 3 of 4
(4,355 Views)
Nacree,

The "IMAQdx Write Attributes" VI comes with the NI-IMAQdx driver.  This is part of the "Vision Acquisition Software" package and comes with any hardware you purchase.
If you don't have the VI, then I would double check in Measurement & Automation Explorer (MAX), under Software, to see if you have NI-IMAQdx installed.

Regards,
Rishi L
National Instruments
Applications Engineer
0 Kudos
Message 4 of 4
(4,337 Views)