Appendix B – Modbus Protocol
B-10 NMBA-01 Installation and Start-up Guide
mal response. The ‘Byte Count’ field specifies how many
8-Bit data
items
are being returned. It shows the count of 8-bit bytes to follow in
the data for RTU.
For example, the value 63 hex is sent as one 8-bit byte in RTU mode
(01100011). The 'Byte Count' field counts this data as one 8-bit item,
regardless of the character framing method (ASCII or RTU).
How to Use the Byte Count Field: When you construct responses in
buffers, use a Byte Count value that equals the count of 8-bit bytes in
your message data. The value is exclusive of all other field contents,
including the Byte Count field.
Figure B-4 ‘Slave Response with RTU
Framing’
shows how the byte count field is implemented in a typical
response.
Figure B-3 Master Query with RTU Framing
QUERY
Field Name Example
(Hex)
RTU
8-Bit Field
Header None
Slave Address 06 0000 0110
Function 03 0000 0011
Starting Address Hi 00 0000 0000
Starting Address Lo 6B 0110 1011
No. of Registers Hi 00 0000 0000
No. of Registers Lo 03 0000 0011
Error Check CRC (16 bits)
Trailer None
Total Bytes: 8