Appendix B Communication Protocol
Shenzhen Hpmont Technology Co., Ltd.
- 146 -
HD3N Series User Manual V1.1
To rewrite numbers of function parameters or control parameters
Function code 0x10 (set by F17.09), 0x43 (Saved at power off); command Frame and response Frame
are in below table (Take RTU as an example).
Command
Frame
Address
Code
Starting
register
address
No. of
register
Byte no. of
register
content
Register
content
CRC /LRC
checking
Data Frame
bytes
1
1
2
2
1
2* no. of
registers
2/1
Value or range
0 - 247
0x10, 0x43
0x0000 -
0xFFFF
0x0000 -
0x0004
2* no. of
registers
Response
Frame
Address
Code
Starting register
address
No. of operation
registers
CRC checking
Data Frame
bytes
1
1
2
2
2/1
Value or range
1 - 247
0x10, 0x43
0x0000 - 0xFFFF
0x0000 - 0x0004
This command rewrites the contents of continuous data unit from starting register address where is
mapped as function parameter and control parameter of controller, etc. The controller will start to save
from low address to high address of the register when it continuously saves many register parameters.
The saving will return from the firstly failed address if the saving process isn’t completely successful.
Fault and exception code
If the operation command fails, the response is fault code. The fault code is
+
0x80.
Exception code
Instructions
0x01
Illegal function parameters.
0x02
Illegal register address.
0x03
Data fault. Data is exceeded the upper/lower limit.
0x04
Slave operation fails (including fault caused by data invalid).
0x16
Unsupported operation (unsupported to read the attributes, factory default and upper/lower
limit for the control parameter and status parameter).
0x17
The register number of command Frame is fault.
0x18
Incorrect information Frame , including incorrect information length and incorrect checking.
0x20
Parameters cannot be modified.
0x21
Parameters are unchangeable when the controller is in running status.
0x22
Parameters are protected by password.
E.g.: Write STOP function selection of address 2 (range: 0x00 - 0x01, 0x02 exceeds limit of register
content, and fault code is 0x86 (0x06 + 0x80), abnormal code 0x03.
Command
Frame
Address
Code
Register address
Register content
Checksum
0x02
0x06
0x00
0x1C
0x00
0x02
0xc9
0xfe
Response
Frame
Address
Error code
Exception code
Checksum
0x02
0x86
0x03
0xF2
0x61