ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read the camera string type attributes?

I tried to read the string type attributes of my line scan camera.  The serial command is CORR:OFFSET?, I tested this command in NI Camera File Generator, it worked, the returned string was "ON". Then I tried to use imgGetCameraAttributeString in my C++ program to read this attribute, first I added an attribute "Offset Status", I chose it as numeric type, then I added serial action CORR:OFFSET?\r, but it returned some wrong characters. Has anyone have the experience to read the string type attribute from camera? Thank you.

0 Kudos
Message 1 of 2
(3,166 Views)
If the returned string in the Camera File Generator was "ON" is there a particular reason why you set the attribute to be a numeric type? What is the returned characters you are receiving currently? You might try setting the attribute to return a string, and see if this fixes the problem.
0 Kudos
Message 2 of 2
(3,156 Views)