Read Channel Status
[cmdchars] = !O
Description
The Read Channel Status command reads the status of targeted channels of the addressed module.
Syntax
!O[positions]
Note The command character is an uppercase O, not a zero. |
[positions] | Four ASCII-hex characters specify the targeted channels. A "1" in any bit means that the command reads the status of the corresponding channel. A zero in any bit means that the corresponding channel is not targeted. |
Success Response
A[chnl_status]
[chnl_status] | One ASCII-hex character specifies the status of each targeted channel. The first character corresponds to the most significant "1" in the [positions] field, and so on. The following table shows the meaning of each [chnl_status] value:
The following table lists channel-specific error messages for FieldPoint I/O modules:
|
Error Responses
E_INVALID_CMD | Undefined command. |
E_INSUFF_CHARS | Data field error. An insufficient or incorrect number of characters were received for the command. |
E_INV_LIMS_GOT | Specified limits invalid for the command. |
E_ILLEGAL_DIGIT | One or more characters in the command could not be properly converted to a digit (hex or decimal). |
E_NO_MODULE | There is no module at the specified address. |
Refer to FieldPoint Responses for other possible error responses, error numbers, and error descriptions.
Examples
The following command reads the status of channels 12, 13, 14, and 15 of the FieldPoint module at address 51 (0x33).
>33!OF000[checksum][cr]
The response is as follows:
A??10[checksum][cr]
The response indicates that channel 12 has good status, channel 13 has channel has a channel-specific error condition, and channels 14 and 15 do not exist.
The following command reads the status of channels 0, 14, 24, 25, 28, 29, 30, and 31 of the FieldPoint module at address 34 (0x22):
>22!o!OF3004001[checksum][cr]
The response is as follows:
A00000000[checksum][cr]
The response indicates that all the targeted channels have good status.