Camera Attributes
Camera attributes allow you to control camera-specific functions, such as integration time and pixel binning, directly from NI-IMAQ. You can set camera attributes in MAX. Information about specific attributes for some cameras is contained in a camera attribute file <my camera>.txt, which is in the <NI-IMAQ>/Camera Info directory, where <NI-IMAQ> is the location to which NI-IMAQ is installed.
All parameters configured for a camera type are stored in a camera (.icd) file. The camera file is then associated with a specific channel or port on an image acquisition device. The camera file includes information about the video signal timing and the input signal range of the video signal.
The camera attribute file lists all attributes for the camera. Each attribute description contains the following fields:
- Attribute Name contains the name of the attribute in quotes.
- Description contains a brief description of the camera.
- Data Type contains the data type of the attribute—String, Integer, or Float.
- String indicates that there are several valid values for this attribute that are expressed as strings.
- Integer indicates that the attribute value is a numeric value of type integer.
- Float indicates that the attribute value is a numeric value of type floating point.
- Possible Values contains a list of valid String, Integer, or Float values.
Use the imgSetCameraAttributeString and imgGetCameraAttributeString functions to set and get the value of String attributes. Use the imgSetCameraAttributeNumeric and imgGetCameraAttributeNumeric functions to set and get the value of Float and Integer attributes.
Note The spelling and syntax of the Attribute Name and string values must match the camera attribute file exactly. |
Many cameras are configured with serial commands. Many camera files provided by National Instruments are already programmed with the camera serial command set. When you use the imgSetCameraAttributeString or imgSetCameraAttributeNumeric function, any serial commands programmed into the camera file are automatically sent to the camera when imgSessionOpen is called. If you need more low-level control over the serial communication between the camera and your image acquisition device, use the imgSessionSerial functions.