FC100 Series User Manaul
Chapter 6 Description of parameter setting
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 of2(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
6
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 unsigned int crc_chk (unsigned char*data,
unsigned char length)
96
Need help?
Do you have a question about the FC100 Series and is the answer not in the manual?