imaqIOGetAttribute

NI-IMAQ I/O C Function

imaqIOGetAttribute

Format

rval = imaqIOGetAttribute(IMAQIO_SESSION id, IMAQIOAttribute attribute, unsigned long *value);

Purpose

Reads one of the NI-IMAQ I/O device attributes.

Parameters

Name Type Direction
id IMAQIO_SESSION input
attribute IMAQIOAttribute input
value unsigned long* output

Parameter Discussion

id is the ID of the session to get an attribute for.

attribute is the attribute to retrieve. The following values are valid:

IMAQIO_ATTRIBUTE_PRODUCT_SELECT_CURRENT Gets the value of the current product selection line. ISO Inputs 4 thru 0 are the product selection lines.
IMAQIO_ATTRIBUTE_PRODUCT_SELECT_LATCHED Gets the value of the currently latched product selection line. ISO Inputs 4 thru 0 are the product selection lines. ISO Input 5 latches in the data on ISO Inputs 4 thru 0.
IMAQIO_ATTRIBUTE_QUADRATURE_ENCODER Gets the value of the quadrature encoder. The quadrature encoder uses ISO Input 6 for its Phase A input and ISO Input 7 for its Phase B input.
IMAQIO_ATTRIBUTE_WATCHDOG_STATUS Gets the value of the watchdog status. 0 indicates that no errors have occurred, and 1 indicates that a timeout occurred.
IMAQIO_ATTRIBUTE_ISOPOWER_PRESENT Gets the ISO power status. A value of 1 indicates that ISO power is present. A value of 0 indicates that ISO power is not present.

value is a pointer to the value of the attribute retrieved.

Return Value

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