4-68
4-2 Function Mode
4
Functions
Function code
<Error Check>
•CRC (Cyclic Redundancy Check) is used for the ModBus-RTU error check.
•The CRC code is 16-bit data generated for the block of random length data in the 8-bit unit.
•To generate the CRC code, the generation polynomial CRC-16 (X
16
+X
15
+X
2
+1) is used.
CRC-16 Calculation Example
<Header, Trailer (Silent interval)>
•Wait time between receiving the query from the master and the response by the Inverter.
•Be sure to provide the 3.5-character length for wait time. If the length does not reach 3.5
characters, the Inverter does not respond.
•The actual communication wait time is the total of the silent interval (3.5-character length) and
C078 (communication wait time) setting.
Function code Function
Maximum number of data
bytes in 1 message
Maximum data number in 1
message
01h Coil status reading 4 32 coils (in bits)
03h Holding register content reading 8 4 registers (in bytes)
05h Writing into the coil 2 1 coil (in bits)
06h Writing into holding register 2 1 registers (in bytes)
08h Loopback test ⎯⎯
0Fh Writing into multiple coils 4 32 coils (in bits)
10h Writing into multiple registers 8 4 registers (in bytes)
CRC-16
calculation
CRC =FFFFh
*1
CRC
*1
Hi Lo
CRC register (2 bytes)
Target data
Exists
All target data
completed
Interchange Hi and Lo
bytes of CRC
*1
Completed
CRC
*1
= CRC
*1
XOR target data
8-bit shift
Completed
Bits left
CRC
*1
= Shift CRC
*1
by 1 bit
to the right
0
1
Overflow bit
after shift
CRC =CRC XOR A001h
*1 *1
Shift by 1 byte against target data