Appendix B Communication Protocol
Shenzhen Hpmont Technology Co., Ltd.
- 78
-
HD3N-L Series User Manual V1.0
Protocol Format
Modbus protocol supports both RTU and ASCII mode, the corresponding frame format is as follows:
Modbus adopts “Big Endian” encoding mode, higher byte prior to lower byte at sending.
RTU model:
•
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, referred to the page 84.
For example
: To read the slave internal register F00.04 = 50.00Hz of No.1 address:
Command
Frame
Address
Parameter
Register Address
Read Char No.
Checksum
0x01
0x03
0x00
0x04
0x00
0x01
0xC5
0xCB
Response
Frame
Address
Parameter
Response Byte
Content of Register
Checksum
0x01
0x03
0x02
0x5
0xDC
0xB8
0x5A
ASCII model:
•
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 40 (0x0FA0) to the internal register F00.04 of slave 1.
LRC checking = the complement code of (0x01 + 0x41 + 0x00 + 0x04 + 0x00 + 0x28) = 0x92
Frame
Head
Address
Code
Register Address
Written Content
LRC
Checking
Frame Tail
Character
:
0
1
4
1
0
0
0
4
0
0
2
8
00
92
CR
LF
ASCII
3A
30
31
34
31 30 30 30 34 30 30 32 38
39
32
0D
0A
2.
Scaling of Drive Transmitting Values
Except the parameters of the remarks, all other function parameters can define the scaling relationship
of the function parameters via referring the manual’s Min. unit.
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)