Chapter 7 Modbus Communication Protocol
ACH200 Series High Voltage Variable Frequency Speed Control System Operating Manual
67
Using the RTU frame format, the frame includes a frame error detection field calculated based
on the CRC method. the CRC field detects the content of the entire frame. the CRC field is two
bytes and contains a 16-bit binary value. It is calculated by the transmitting device and added to the
frame. The receiving device recalculates the CRC of the received frame and compares it with the
value in the received CRC field. If the two CRC values are not equal, then there is an error in the
transmission.
The CRC is first deposited into 0xFFFF and then a procedure is called to process more than 6
consecutive bytes in the frame with the value in the current register. Only the 8Bit data in each
character is valid for CRC, the start and stop bits and the parity bits are invalid.
During CRC generation, each 8-bit character is individually dissociated with the register
content (XOR), and the result is shifted in the direction of the least significant bit, with the highest
significant bit filled with 0. The LSB is extracted and detected, and the register is individually
dissociated with the preset value if the LSB is 1, or not performed if the LSB is 0. The whole process
is repeated 8 times. After the last bit (bit 8) is completed, the next 8-bit byte is again individually
dissociated with the current value of the register. The final value in the register is the CRC value
after all the bytes in the frame have been executed.
This calculation method of CRC adopts the international standard CRC check rule. When
editing the CRC algorithm, users can refer to the CRC algorithm of the relevant standard and write
a CRC calculation program that really meets the requirements.
7.3 Communication Frame Structure
The communication data format is as follows:
Composition of bytes: including start bit, 8 data bits, parity bits and stop bits.
Start Bit
Bit1
Bit2
Bit3
Bit4
Bit5
Bit6
Bit7
Bit8
Check
bits
Stop
bits
The information of a frame must be transmitted in one continuous stream. If the interval time
before the end of the entire frame transmission is more than 1.5 bytes, the receiving device will clear
this incomplete information and incorrectly assume that the subsequent byte is the address field
portion of the new frame. Similarly, if the interval between the beginning of a new frame and the
previous frame is less than 3.5 bytes time, the receiving device will consider it as a continuation of
the previous frame and, due to the misalignment of the frame, the final CRC check value will be
incorrect, which causes a communication error.