From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

What "real" data type is the "command" type returned by IMAQdx "Enumerate Attributes" function

Solved!
Go to solution

The IMAQdx "Enumerate Attributes" function can return an "Attribute Type" which include U32, I64, DBL, String, Enum, Bool, and Command.  What does Command translate into in terms of "real" LabVIEW data types?  Possibly "string"?  The help for the function was less than helpful in this respect.

0 Kudos
Message 1 of 2
(1,017 Views)
Solution
Accepted by topic author WNM

A command data type for a camera attribute is part of the GenICam standard. You can read about it here. Basically, certain attributes have a command datatype, so that when the attribute is written to, it sends a specific command to the camera. One example of this is the Camera Attributes::AcquisitionControl::TriggerSoftware command. When you write to that attribute, it sends a trigger software command to the camera.

 

According to GenICam, each command attribute has a separate CommandValue node, which is an integer constant which. Writing the command value to that attribute will trigger the command to be sent. For example, looking at the XML file for my USB3 camera, I can see that the TriggerSoftware attribute has a CommandValue of 1, and I can look at the pValue attribute to find the datatype (in this case, an unsigned 4 byte integer (U32). 

elcalverado_0-1644435665093.png

 

So in my code, I would write a U32 value of 1 to the TriggerSoftware attribute to send the command. In reality, since TriggerSoftware is write only, it actually doesn't matter what value I write. Any write to the attribute would send the command. I could also write a boolean or some other numeric datatype to the attribute from LabVIEW, since IMAQdx will coerce it to the datatype the camera expects.

 

Jordan

Message 2 of 2
(982 Views)