98 • Appendix A - MODBUS RTU Protocol
Example 9:
To read all discrete inputs of ASTAT-XT # 12, the host computer sends the following Query frame:
byte 1: Serial Link No. ($0C) (12)
byte 2: Function ($02)
byte 3: Starting Address High ($00)
byte 4: Starting Address Low ($00)
byte 5: No. of Points High ($00)
byte 6: No. of points Low $08)
byte 7: CRC_Low ($XX)
byte 8: CRC_High ($XX)
The ASTAT-XT response when only Stop and Soft Stop terminals (Inputs 1&2) are connected:
byte 1: Serial Link No. ($0C) (12)
byte 2: Function ($02)
byte 3: Byte Count ($01)
byte 4: Data (Inputs 7..0) ($03)
byte 5: CRC_Low ($XX)
byte 6: CRC_High ($XX)
A.12. Diagnostics
Modbus Function 08 as implemented in the ASTAT-XT supports only Subfunction $0000. It provides for the
"loopback" (Return Query Data) feature, and for checking the Communication Serial Link between the master and
the ASTAT-XT.
To request ASTAT-XT # 1 to return Query data, the master should send following Query frame:
byte 1: Serial Link No. ($01)
byte 2: Function ($08)
byte 3: Subfunction High ($00)
byte 4: Subfunction Low ($00)
byte 5: Data High ($37)
byte 6: Data Low ($A5)
byte 7: CRC_Low ($XX)
byte 8: CRC_High ($XX)
The Normal (if no exception) response is the echo of the Query:
byte 1: Serial Link No. ($01)
byte 2: Function ($08)
byte 3: Subfunction High ($00)
byte 4: Subfunction Low ($00)
byte 5: Force Data High ($37)
byte 6: Force Data Low ($A5)
byte 7: CRC_Low ($XX)
byte 8: CRC_High ($XX)