imaq1394SetAttribute
Format
rval = imaq1394SetAttribute (SESSION_ID sessionId, unsigned long attribute, unsigned long value);
Purpose
Sets an attribute for a camera.
Parameters
Parameter | Type | Description |
sessionId | SESSION_ID | A valid Session ID, which you can obtain using imaq1394CameraOpen2. |
attribute | unsigned long | The attribute whose value you want to set. Refer to Attributes for a list of attributes. |
value | unsigned long (passed by value) or double (passed by reference) | The value of the specified attribute. Use imaq1394AttributeInquiry2 to enumerate the special modes that the camera supports. |
Parameter Discussion
attribute specifies the attribute whose value you want to set. In LabWindows/CVI, when you click the control or press <Enter>, <spacebar>, or <Ctrl-down arrow>, a dialog box opens containing a hierarchical list of the available attributes. Attributes whose values cannot be obtained are dimmed. Help text is shown for each attribute. Select an attribute by double-clicking it or by selecting it and then pressing <Enter>.
If the attribute shown in this ring control has named constants as valid values, you can bring up a list of them by moving to the Attribute Value control and pressing <ENTER>. If there is a value shown in the bottom half of the Attribute Value control, the corresponding constant is marked in the displayed list.
If the specified attribute is a camera attribute, the user may set one of the following values:
- IMG1394_AUTOMODE: Allows the camera to always control the selected camera attribute.
- IMG1394_ONEPUSHMODE: Allows the camera to control the selected camera attribute once, and then return to the manual control state with adjusted values.
- IMG1394_OFFMODE: Disables the selected camera attribute.
- IMG1394_ABSOLUTEMODE: Sets the selected camera attribute to use 32-bit floating-point numbers that map to real-world units. In this mode, the driver refers to the absolute camera attribute for the control value.
- IMG1394_IGNOREMODE: Prevents the driver from writing the selected camera attribute to the camera.
Return Value
On success, this function returns IMG1394_ERR_GOOD. On failure, this function returns an error code. You can obtain a more detailed error message with imaq1394ShowError or, if you are using Microsoft Visual Basic, imaq1394ShowErrorCW.