Read Discrete
[cmdchars] = !J
Description
The Read Discrete command reads data from all discrete input and output channels of the addressed FieldPoint module.
Syntax
!J (!o!J for modules with up to 32 channels)
Success Response
A[data]
[data] | Four ASCII-hex characters specify the channel levels. A "1" in any bit means that the corresponding channel is ON. A zero in any bit means either that the corresponding channel is OFF, that the corresponding channel is analog, or that there is no channel corresponding to that bit. If you send !o!J, [data] contains eight ASCII-hex characters in the response. |
Error Responses
E_INVALID_CMD | Undefined command. |
E_INV_LIMS_GOT | Specified limits invalid for the command. |
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.
Example
The following command reads all channels of the FieldPoint module at address 51 (0x33):
>33!J[checksum][cr]
The response is as follows:
A0030[checksum][cr]
The response indicates that channels 4 and 5 are ON and all other channels are OFF.
The following command reads all 32 channels of the FieldPoint module at address 34 (0x22):
>22!o!J[checksum][cr]
This command reads all channels of the FieldPoint module at address 51 (0x33). The response is as follows:
A00200030[checksum][cr]
The response indicates that channels 4, 5, and 21 are ON and all other channels are OFF.