66
Parameter Description
Parameter Description
Algorithm of CRC checksum:
1. Installation of a 16-bit register and all bits are 1.
2. The 16-bit operation result, an exclusive OR between the 16-bit register high byte, and the
beginning of 8-bit byte, was put into the register.
3. The 16-bit register shifts 1-bit towards the right.
4. If the first digit on the right-hand side (mark bit) is 1, the exclusive OR is between the generator
polynomial 1010000000000001 and the register operated. If the first digit on the right-hand side is
0, then go back to Step 3.
5. Repeat Step 3 and 4, until there is no more 8-bit.
6. Let exclusive OR between another 8-bit and this 16-bit register.
7. Repeat Step 3 to 6 until all bytes of the packet have exclusive OR, the 16-bit register, and have
been shifted eight times.
8. The 2-byte CRC error checking of the 16-bit registers is added to the most significant bit of the
message.
To add CRC to the message, start from the low byte to the high byte.
Ɣ
Communication format
(1). Read data
H03
Mode
Start
Address
1
Function
2
Initial Address
*3)
Register Number
4
Check
(QG
ASCII H3A 2char 2char
4char
4char
2char 0D
0A
RTU >=10ms 1byte
1byte
2byte
2byte
2byte >=10ms
Normal response
Mode
Start
Address
1
Function
2
Read Data Number
5)
Read Data
6
Check
(QG
ASCII H3A 2char 2char
2char
…2N×1char
2char
0D
0A
RTU >=10ms 1byte 1byte
1byte
…2N×1byte
2byte
>=10ms
Message Content
1) Address
Set the address for the information to be sent to. 0 is none.
2) Function code
H03
3) Initial address
Set to the address of the register to be read.
) Register
number
Set to the number of the register to be read (less than 12 registers).
5) Read data number
Repeat
4).
6) Read data
Set information specified in
4). Read the data byte by the order.
(2). Write data
H06
Mode
Start
Address
1)
Function
2
Initial Address
3
Write Data
4
Check
(QG
ASCII H3A 2char 2char
4char
4char 2char 0D
0A
RTU >=10ms 1byte
1byte
2byte
2byte 2byte >=10ms