sinee — 10.3.6 CRC check

User Manual of EM760 High-Performance Inverter 10.3.5 Definition of frame data length The PDU part of the RTU frame of the MODBUS message is able to read/write 1-16 registers. For different function codes, the actual length ofthe RTU frame varies, as detailed in the table below. Table 10-3 Correspondence between RTU Frame Length and Function Code [4]: N r ≤16, indicating the number ofrequests to read registers; [5]: N w ≤16, indicating the number ofrequests to write registers. [6]: N w +N r ≤16; 10.3.6 CRC check The low byte of CRC check is in front of the high byte. The transmitter first calculates the CRC value, which is included in the sent message.

Upon receiving the message, the receiver will recalculate the CRC value and compare the calculated value with the received CRC value. If the two values are not equal, it means that there is an error in the sending process. Calculation process of CRC check: (1) Define a CRC register and assign an initial value, FFFFH. (2) Perform the XOR calculation with the first byte of the transmitted message and the value of the CRC register, and store the result in the CRC register. Starting from the address code, the start bit and stop bit are not involved in calculation. (3) Extract and check the LSB (the least significant bit of the CRC register).

(4) If the LSB is 1, each bit of the CRC register is shifted to the right by one bit, and the most significant bit is supplemented by 0. Perform the XOR calculation of the value of the CRC register and A001H, and store the result in the CRC register. (5) If the LSB is 0, each bit of the CRC register is shifted to the right by one bit, and the most significant bit is supplemented by 0. (6) Repeat the steps 3, 4, and 5 until 8 shifts are completed. (7) Repeat the steps 2, 3, 4, 5 and 6 to process next byte of the transmitted message, until all bytes of the transmitted message are processed. 267 7508H Serial No.

3 Corresponding to the function code F12.30 7509H~75FFH Reserved Others Reserved Function code (0x) RTU frame length (bytes) Maximum length (Byte) Request Normal response Exception response 03 8 5+2N[4] r 5 37 41(06) 8 8 5 8 08 8 8 5 8 42(10) 9+2N [5] w 8 5 41