
·
110
·
Operation Instruction of S900 E Series Inverter
·
111
·
LRC Check is the value added from Address to Data Content. For
example, the LRC Check of the above 3.3.1 enquiry message is as:
01H + 03H + 21H + 02H + 00H + 02H = 29H, then the complement
of 2 (D7H) is taken.
CRC Check of RTU mode
CRC Check is from Address to Data content, and its running rule is
as follows:
Step 1: Make 16-bit temporary storage (CRC temporary storage) =
FFFFH.
Step 2: Exclusive OR first 8-bit byte message instruction and low
16-bit CRC temporary storage: Perform Exclusive OR, and store the
result into CRC temporary storage.
Step3: Move CRC temporary storage one more bit, and fill 0 into
high bit position.
Step 4: Check right shift value, if being 0, store the new value for
step 3 into CRC temporary storage, otherwise in case of Exclusive
OR A001H and CRC temporary storage, store the result into CRC
temporary.
Step 5: Repeat Step 3 ~ Step 4, and operate completely for 8-bit.
Step 6: Repeat Step 2 ~ Step 5, and take the message instruction
for next 8-bit, till all message instructions are operated completely.
Finally, the value gotten of CRC temporary storage is CRC Check. It
is noteworthy that, CRC Check must be placed into the check mode
of message instruction interchangeably.
The following is the example of CRC Check running written in C
language:
Unsigned char * data ←//Message instruction pointer
Unsigned char length ←//Length of message instruction