LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Camera Attributes for NI-IMAQdx Camera in LabVIEW

I am trying to create a LabVIEW program in which the user can change the gain and exposure of a continually acquiring camera. I have searched the web for similar issues but none of the solutions match my exact specifications. Thank you in advance for your help.

 

Specifications

1. I am using a Point Grey monochrome Flea3 USB camera (model number FL3-U3-13S2M-CS).

2. I am using Flea3 USB3 2.7.3.0 Firmware.

3. I downloaded the NI Vision Acquisition Software (February 2014).

4. I changed the driver on my Point Grey Camera to NI: niu3vk.inf 1.1.0.49152 so that my camera is listed as a "NI-IMAQdx USB3 Vision Device".

5. I can successfully run my camera through LabVIEW and MAX. 

6. In MAX, I can Grab my camera image and manually adjust the gain, exposure, etc., as expected.

 

However, I cannot seem to change these settings in my LabVIEW program. I get the error "NI-IMAQdx: (Hex 0xBFF6900F) Attribute not supported by the camera" when using the property node.

 

I am attaching a screen shot of the problem area. Again, without the property node, my code works perfecly (the camera runs), but I want to be able to set the gain and exposure. 

0 Kudos
Message 1 of 8
(9,937 Views)

your code looks correct, make sure that your attribute string is correct, the type of the specific attribute is settable in the state of the camera when you call it (there is a property for this) and make sure the type you are setting is correct (ie U64 vs soem other type).  I dont keep point grey on the shelfs here but you are not coding incorrectly.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 8
(9,905 Views)

falkpl,

 

Thank you for your reply. I don't know if my attribute string is correct. This seems to be the problem. I've been trying to use the IMAQdx Enumerate Attributes.vi to no success. 

 

Do you have any experience using the IMAQdx Enumerate Attributes.vi to determine the corect syntax and to see what specific attributes are settable in the camera?

 

 

0 Kudos
Message 3 of 8
(9,813 Views)

This basically describes my problem: http://digital.ni.com/public.nsf/allkb/E50864BB41B54D1E8625730100535E88

 

I am using IMAQdx and am getting the error, attribute not supported by the camera

 

I have therefore tried to use the IMAQdx Enumerate Attributes.vi but am unsure of how to use this function. I cannot find any good sources on the web that explain how to use this VI except for "just use it." I am attaching my full VI. 

 

Message 4 of 8
(9,811 Views)

I use the enumerate attributes all the time, best way to get the strings from the camera.

 

Open Imaqdx session, wire session into enumatete attributes create an array on the output of the attribute information array, then close the session.  The array you get will have the names of the supported attributes.  Use these strings.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 5 of 8
(9,774 Views)

I use the enumerate attributes all the time, best way to get the strings from the camera.

 

Open Imaqdx session, wire session into enumatete attributes create an array on the output of the attribute information array, then close the session.  The array you get will have the names of the supported attributes.  Use these strings.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 6 of 8
(9,774 Views)

thank very  much!

0 Kudos
Message 7 of 8
(5,782 Views)

I'm working with a FLIR Grasshopper 3 camera -- not as easy to use as cameras from Axis or Basler, but possible once you change the Driver to one that MAX supports (as you've discovered).  Here's a routine I wrote to dump out an Array of Strings showing all of the Attributes reported by IMAQdx Enumerate Attributes, using the format

<Attribute Name> (<Attribute Type>)[<R/W State>]: <Value>, where <Attribute Type> is an Enum (including U32, Sgl, String, Boolean, and Enum), <R/W State> is "R", "W", or "R/W", and <Value> is the current Value of the Attribute.

Show Camera AttributesShow Camera Attributes

The Action Engine "Camera Session" opens and closes a Camera Session and includes Get and Save Session, maintaining the Camera I/O Session across VIs.  The VIG "Camera Attributes" when first called gets (and saves) the Array of all Camera Attributes, sorted by Attribute Name, and provides all of them whenever called.  The FOR Loop builds the String Array using the format described above, with the sub-VI "Access" changing the two Readable and Writable Attributes to the strings "R", "W", and "R/W".  Finally, the routine "Get Camera Attrib" returns the appropriate String Value for the Attribute (based on its Attribute Type).

 

If you want to use an Attribute, you can search the Array of Attributes for the Attribute you want, and can then query it to get its value (knowing, of course, its Type).  If it is writable, you can use other IMAQdx functions to set it.  Doing all of these low-level procedures is something of a pain, so I recommend doing as little as possible (change the Attributes in MAX, if possible, and save them to the Camera).

 

Bob Schor

 

0 Kudos
Message 8 of 8
(5,774 Views)