180
11.5 Message Format
11.5.1 Message Content
In Modbus communications, the master gives commands to the slave, and the slave responds.
The following table shows the configured message for both sending and receiving, and the
length of data packets is determined by the command (function) content.
11.5.2 Message Configuration
RTU scheme:
Retain no signal input ≧10 ms
Station address: 8-bit binary
Function code: 8-bit binary
Data Characters:
n×8-bit data, n<=16
CRC checksum:
16-bit, consists of 2 sets of 8-bit binary
Retain no signal input ≧10 ms
11.5.3 Slave Station Address
Use code between 0 and FF (hex) to set the slave station address. If a message with slave
station address 0 is sent (broadcast), the command from the master will be sent to all slaves.
The slave do not responds to a broadcast message.
00H: To all drive (broadcast)
01H: To drive address 01
0FH: To drive address 15
10H: To drive address 16, so on and so forth up to 31( 1FH).
11.5.4 Function Code
There are four types of function codes:
03H : Read Modbus registers
06H : Write a word to registers(Write to registers)
08H : Loopback test
10H : Write to multiple registers
11.5.5 Data
By combining the Modbus register address (test code in case of a loopback test) and the