LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error while setting camera attributes (Gain, exposure, etc) in Labview

Solved!
Go to solution
Hi,
 
I'm able to connect the cameras successfully and the program runs without errors. Next, I want to add controls in the front panel using which I can directly control camera gain, exposure time, frame rate, etc in labview. 
 
But I'm getting error after I added these controls. I think I am not clear on how to add these attributes correctly!! 
 
I looked at some posts online and understand that first I need to find the exact name of the attribute and its data type correctly. To do that, I used the "enumerate attributes" and found the correct attribute name for Gain, exposure and frame rate and their types as shown in the snapshots below:
 

Picture3.pngPicture2.png

 

Then I inserted property node (snapshot below) and added indicators with the names and values as found above. I have attached my code. But still I'm getting the error "Attribute Not Supported by the Camera". 

 

I looked at https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P9U1SAK&l=en-US, and https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P9U1SAK&l=en-US, and some other posts, and still unable to figure out the problem. 

 

If you have any quick tips on this problem, please let me know, and I will try it out. Thank you for all your help!!!

 

attributes camera.PNG

 

 

 
0 Kudos
Message 1 of 5
(2,037 Views)
Solution
Accepted by topic author Swati.Bh
You need to set the property nodes to "write" mode. Then you need the value of the string to be the property name you have found (right now it's the label). You will have to change your DBL indicators (Gain, Exposure, and Acquisition Frame Rate) to controls.
Message 2 of 5
(2,011 Views)

Hello Gregory,

 

This was a perfect solution!! I did all three things as you said and it worked!! Super thanks for your quick response and helpful insight!!

 

For anyone facing this issue and who lands on this post, here is a snapshot showing the changes I made as suggested by Gregory, which made it work:

 

working cam attributes.PNG

 

1) To set the property nodes to "write" mode, you have to right click the property and select "change to write". And you will see small direction arrow to the LEFT of the property now!!!

 

I found the following from the help file: " A small direction arrow to the right of the property indicates a property you read. A small direction arrow to the left of the property indicates a property you write. Right-click the property and select Change to Read or Change to Write from the shortcut menu to change the operation of the property."

 

2) Right click on the property --> Create a constant and then use the property name found from enumerate attributes, as the value of this constant: for example: CameraAttributes::AnalogControl::Gain

 

3) Lastly, change the DBL indicators (Gain, Exposure, and Acquisition Frame Rate) to controls by right clicking on the indicator icon and selecting 'Change to Control'.

 

Best,

Swati

0 Kudos
Message 3 of 5
(1,987 Views)

Hi Swati,

 

As an Imaging solutions engineer, I am curious to know the camera and interface you used for this project. I recently encountered a similar issue with a USB 3.0 camera. May I know the camera part number that you used?

 

 Regards,

Yogaesh

0 Kudos
Message 4 of 5
(1,686 Views)

Hi Yogaesh, 

 

I'm using BFLY-U3-23S6C-C USB 3.0 Blackfly®, Color Camera for this application, and interface is just designed in Labview which talks to NIMax.

 

Best,

Swati

0 Kudos
Message 5 of 5
(1,680 Views)