Appendix B Communication Protocol
Shenzhen Hpmont Technology Co., Ltd.
- 80
-
HD3N-L Series User Manual V1.0
To Rewrite Numbers of Function or Control Parameters
Function code 0x43 (save 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
operation
registers
2/1
Value or range
0 - 247
0x43
0x0000 -
0xFFFF
0x0000 -
0x0004
2 * no. of
operation
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
0x43
0x0000 - 0xFFFF
0x0000 - 0x0004
This command rewrites the contents of continuous data unit from starting register address.
The register address is mapped to the function and control parameters 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, and is the function code + 0x80.
Below is the instruction for the exception codes.
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.