Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing axIMAQ.BitsPerPixel

Hi,
 
I have a camera (Dalsa P2_2X8K40) which is connected to a Frame Grabber (NI-1426).
One of my functions changes camera's attribute "Data Mode" from 10bit to 8bit but axIMAQ object's attribute "BitsPerPixel" remains 10bit.
How can I change this attribute (or something that will cause the change) without using MAX?
 
I'm using VS2005 , NI Vision 8.2.1 and NI-IMAQ 3.7.1.
0 Kudos
Message 1 of 6
(5,031 Views)

Hello 20,

 

Check out the NI-IMAQ Reference Help for the IMG_ATTR_BITSPERPIXEL. This states that IMG_ATTR_BITSPERPIXEL is not writable, but merely an indicator. So the only way to change the attribute would be to effectively change the data mode (as you said you are doing). When you change the data mode, check the return value to ensure that the function was successfully executed.

 

Could you attach the code that demonstrates the data mode change?

 

I hope this helps 🙂

David G
Sales Engineer - SE Michigan & N Ohio
National Instruments
0 Kudos
Message 2 of 6
(5,005 Views)
Thank you very much. I'll check it and post the answer.
 
Eddie.
0 Kudos
Message 3 of 6
(4,991 Views)
Hi,
 
I have changed the "Data Mode" attribute by using Set_CameraAttribute method and have checked that it has been changed, but II still have some problems.
 
1. If I start an image acquisition after  Set_CameraAttribute method had been used I recieve an error : "The requested image acquisition device is already in use".
2.The same error is recieved if I use Set_CameraAttribute method during an image acquisition.
 
Could you explain me how to do it correctly or send me an example ?
 
Eddie
0 Kudos
Message 4 of 6
(4,968 Views)

Hey Eddie,

 

Check out this article on Using the IMAQ Camera Attribute Function in VB. Some examples can be found on your PC (they install with our software). The location of these examples is detailed here, under “Where to find examples”. Finally, this article further details how to configure your acquisition.

 

I hope this helps! 🙂

David G
Sales Engineer - SE Michigan & N Ohio
National Instruments
0 Kudos
Message 5 of 6
(4,960 Views)
Thank you for the answer.
 
Currently I do not have any problem with image acquisition or with an attribute setting.
My problem is to set an attribute during image acquisition or befor it was started for the first time.
 
How can I deal with it?
 
Eddie.
0 Kudos
Message 6 of 6
(4,956 Views)