Appendix B Modbus Communication Protocol Shenzhen Hpmont Technology Co., Ltd.
118 HD5L-PLUS Series User Manual V1.0
Protocol Format
The Modbus protocol simultaneously supports RTU mode and ASCII mode, with corresponding frame
format as shown below:
Modbus adopts “Big Endian” encoding mode, higher byte prior to lower byte at sending.
In the RTU Mode
• The idle time of frame head and frame tail passing bus should be not less than 3.5 bytes.
• Slave address = 0, it means broadcast address.
• Data checking relies on CRC-16. The whole information need be checked. The concrete CRC
checking is referred to the page 123.
For example
: To read the slave internal register F00.08 = 1.500m/s of No.1 address:
Command
Frame
Address Parameter Register Address Read Char No. Checksum
0x01 0x03 0x00 0x08 0x00 0x01 0x35 0xCB
Response
Frame
Address Parameter Response Byte Content of Register Checksum
0x01 0x03 0x02 0x5 0xDC 0xBA 0x8D
In ASCII Mode
• The frame head is “0x3A”, while the frame tail default is “0x0D” “0x0A” and the frame tail can be set
by the users.
• All the data bytes will be sent via ASCII code except frame head and frame tail, higher 4-byte prior
to lower 4-byte at sending.
• Data is 7-byte and for the “A” - “F” will adopt their uppercase of the ASCII code.
• The data adopts LRC checking, covering the slave address and data. Checksum is the character of
data that is involved in checking and the complement code of carry bit.
For example
: Write 4000 (0x0FA0) to the internal register F00.07 of Slave 1.
LRC checking = the complement code of (0x01 + 0x41 + 0x00 + 0x07 + 0x0F + 0xA0) = 0x07
Frame
Head
Address Code Register Address Written Content
LRC
Checking
Frame Tail
Character : 0 1 4 1 0 0 0 7 0 F A 0 0 8 CR LF
ASCII 3A 30 31 34 31 30 30 30 37 30 46 41 30 30 38 0D 0A
Modbus data frame
RTU model
Slave
address
Frame head (at least
3.5 character spacing)
Frame head (at least
3.5 character spacing)
Function
code
Data Checking
Modbus data frame
ASCII model
Slave
address
Function
code
Data
Checking
Frame head
(0x3A)
Frame tail
(0x0D, 0x0A)