6 modbus protocol quick reference – Despatch Protocol Plus Modbus Communications User Manual
Page 43

Chromalox Instruments and Controls
A-51643 Rev. 6 10/06/03
37
6 Modbus Protocol Quick Reference
This section highlights portions of the Modbus Protocol that may provide useful quick reference
information to the programmer as it applies to the Protocol
TM
Plus slave implementation.
6.1 Protocol Format
The master‘s query contains the device address (or broadcast address), a function code defining the
requested action, any data to be sent, and an error-checking field. The slave‘s response message contains
fields confirming the action taken, any data to be returned, and an error-checking field. The Modbus
transmission stream is sent in bytes. When a numerical quantity of data is larger than a byte, the most
significant byte is sent first.
The function code in the query tells the addressed slave device what kind of action to perform. The data
bytes contain any additional information that the slave will need to perform the function. If the slave
makes a normal response, the function code in the response is an echo of the function code in the query.
The data bytes contain the data collected by the slaves, such as register values or status.
6.2 RTU Transmission Mode
In RTU mode, each 8-bit byte in a message contains two 4-bit hexadecimal characters. Each message
must be transmitted in a continuous stream.
6.2.1
Coding System
8-bit binary, hexadecimal: $0 . . . $9, $A . . . $F.
Two hexadecimal characters contained in each 8-bit field of the message.
6.2.2
Serial Byte Setup
1 start bit.
8 data bits, LSB sent first.
1 bit for even/odd parity; no bit for no parity.
1 stop bit if parity is used; 2 bits for no parity.
Note: mark parity, 1 stop bit is equivalent to no parity, 2 stop bits and can be a substitute setting in
the master device.
With Parity Checking
Start
D0
D1
D2
D3
D4
D5
D6
D7
Parity
Stop