
77
13. MODBUS communication■
Function 06H: write single register
Write a data as 1000(03E8H) to the register which is at address 1FH in an inverter at slave
address= 0280H, the RTU MODE data frame are listed as below:
RTU
Mode:
Query
Response
Field name
Example
Field name
Example
Slave address
1FH
Slave address
1FH
Function
06H
Function
06H
Data address
(high byte)
02H
Data address
(high byte)
02H
Data address
(low byte)
80H
Data address
(low byte)
80H
Data content
(high byte)
03H
Data content
(high byte)
03H
Data content
(low byte)
E8H
Data content
(low byte)
E8H
CRC error check
(low byte)
8AH
CRC error check
(low byte)
8AH
CRC error check
(high byte)
9AH
CRC error check
(high byte)
9AH
CRC Generation :
1. Load 16 bit register with FFFF hex(all 1’s). Call this the CRC register.
2. Exclusive OR thr first eight-bit byte of the message with the low order byte of the 16-bit
CRC register, putting the result in the CRC register。
3. Shift the CRC register one bit to the right (toward the LSB), zero filling the MSB. Extract
and examine the LSB.
4. If the LSB is 0, repeat Step 3 (another shift). If the LSB is 1. Exclusive OR the CRC register
with the polynomial value A001 hex (1010 0000 0000 0001).
5. Repeat Step 3 and Step 4 until eight shifts have been performed. When this is done, a
complete eight-bit byte will have been processed.
6. Repeat 2 5 for next eight-bit byte of the message. Continue doing this untill all bytes hace
been processed.
7. The final contents of the CRC register is the CRC value.