Log in

View Full Version : IMAQdx -- how do I set the camera mode?


cbf
12-03-2015, 00:29
In C++. I've dumped the modes and I want #95 (this is part of the list):

Video mode[94] is 320 x 240 JPEG 20.00 fps = 94
Video mode[95] is 320 x 240 JPEG 15.00 fps = 95
Video mode[96] is 320 x 240 JPEG 10.00 fps = 96

can one of the NI guys tell me how to form the proper IMAQdxSetAttribute call to get that mode? I'm thinking I pass in IMAQdxAttributeVideoMode (uisitionAttributes::VideoMode"), but what's the IMAQdxValueType? IMAQdxValueTypeU32? and I just pass a 95?

I'm still experimenting, but if one of you is online..

When I enumerate the attributes, I get:

attr[38] is AcquisitionAttributes::VideoMode, type 4, writeable 0, value=0

Should I be worried about the Writable being zero? Does that mean I can't change video modes by writing to this attribute (.h file says its "get/set").

But does type 4 mean I set it as a character string and not an integer?

Greg McKaskle
12-03-2015, 08:48
According to the reference manual, it is a U32. I'm not used to using in in C, but I'd expect videoMode to be writable. I'm not sure why the driver returns a 0 for writable. Type 4 seems to indicate that it is an enum. If you search NIIMAQdx.h for IMAQdxValueType and take the fourth element from the enum, it is IMAQdxValueTypeEnumItem, indicating that the value of that tag has a list of enum strings if you ask for them.

Greg McKaskle