User Manual
EM303A General Purpose Inverter
137
12.4.4 CRC Parity
Sending equipment calculates CRC parity value first, and then attaches it to the
sending message. Upon receipt of the message, receiving equipment will calculate
CRC parity value again, and compare the operating result with received CRC parity
value. If the two values are different, it indicates that there is error during
transmission.
Calculation process of CRC parity:
1.
Define a CRC parity register, and initialize it as FFFFH.
2.
Conduct XOR calculation between the 1
st
byte of sending message and the value
of CRC parity register, and then upload the result to CRC parity register. Start
from address code, the start bit and stop bit will not be calculated.
3.
Collect and check LSB (the least significant bit of CRC parity register).
4.
If LSB is 1, shift each bit of CRC parity register rightwards by 1 bit, the highest
bit filled with 0. Conduct XOR calculation between the value of CRC register
and A001H, and then upload the result to CRC parity register.
5.
If LSB is 0, shift each bit of CRC parity register rightwards by 1 bit, the highest
bit filled with 0.
6.
Repeat steps 3, 4 and 5 until completing 8 rounds of shifting.
7.
Repeat steps 2, 3, 4, 5 and 6, and process the next byte of sending message.
Repeat above process continuously until each byte of sending message is
processed.
8.
CRC parity date will be saved in CRC parity register after calculation.
9.
LUT (Look-up table) method is to obtain CRC parity in the system with limited
time resources.
12.4.5 Details of 0x08 Circuit Diagnoses and Setting
Sub-function
Code
Data
Requested
Response Data
Indication of Sub-function
0000H #data16
The same as the data
requested
Circuit Diagnosis
12.5 Example
12.5.1 Read the setting value of primary numeric frequency F0-07 of inverter
No.1, return 50Hz.
Transmit
Sequence
0
1 2 3 4 5 6 7 8
9
Data
01H
03H
20H
07H
00H
01H
3EH
0BH
Receive
Sequence
0
1 2 3 4 5 6 7
8
Data
01H
03H 02H 13H 88H B5H 12H