User Manual

Table Of Contents
A-20 EK-5209-5 Evaluation Kit User’s Guide
This queries whether the specified DIO channel is configured for input or output.
Parameters:
api_hdl: (input) API handle returned from ibApi_Open().
device_id: (input) ID of the device to be accessed.
channel_index: (input) Channel index to access.
Return Value:
An ibApi_IOMODE value if successful, or an error code (<0) if not.
7. ibApi_IO_WriteDIO()
ibApi_FUNC ibApi_IO_WriteDIO (
ibApi_APIHANDLE api_hdl,
ibApi_DEVICEID device_id,
ibApi_UINT8 channel_index,
ibApi_UINT8 dio_value
);
This sets the value of the specified DIO channel. Note that an error will result if the channel is
not configured for output.
Note: In some product models, the DIO pins are shared with the serial data interface and
will be disabled when it is active.
Parameters:
api_hdl: (input) API handle returned from ibApi_Open().
device_id: (input) ID of the device to be accessed.
channel_index: (input) Channel index to access.
dio_value: (input) New output level (0 or 1).
Return Value:
An ibApi_RESULT_SUCCESS if successful, or an error code (<0) if not.
8. ibApi_IO_ReadDIO()
ibApi_FUNC ibApi_IO_ReadDIO (
ibApi_APIHANDLE api_hdl,
ibApi_DEVICEID device_id,
ibApi_UINT8 channel_index
);