imgSetAttribute

NI IMAQ Function

imgSetAttribute

Usage

rval imgSetAttribute(uInt32 void_id, uInt32 attr, uInt32 value);

Purpose

Sets an attribute value.

Parameters

Name Type Direction
void_id uInt32 input
attr uInt32 input
value uInt32, uInt64*, or double* input
rval Int32 output

Parameter Discussion

void_id valid SESSION_ID or INTERFACE_ID.

attr: attribute to set. Refer to Attributes for valid types.

value: new attribute value. The type of this input is either uInt32, a pointer to a uInt64, or a pointer to a double.

If the attribute is of type uInt32, use this function as follows:

imgSetAttribute (sid, IMG_ATTR_ROI_HEIGHT, value)

If the attribute is of type uInt64, use this function as follows:

imgSetAttribute (sid, key,(uInt32) &value)

If the attribute is of type double, use this function as follows:

imgSetAttribute (sid, IMG_ATTR_BLACK_REF_VOLT,(uInt32) &value)

Refer to Attributes for the attribute type.

Return Value

This function returns 0 on success. On failure, this function returns an error code. For information about the error code, call imgShowError.