
96
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
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
)
6
Chapter 6 Description of parameter setting
FC100 Series User Manaul
Summary of Contents for FC100 Series
Page 9: ...9 Chapter 2 Storage and Installation ...
Page 12: ...12 ...
Page 13: ...13 Chapter 3 Wiring Diagram and Terminal Explanation ...
Page 20: ...20 ...
Page 21: ...21 Chapter 4 Keypad Operation ...
Page 24: ...24 4 ...
Page 25: ...25 Chapter 5 Function Parameters Table ...
Page 36: ...36 ...
Page 37: ...37 Chapter 6 DESCRIPTION OF PARAMETER SETTINGS ...