579
FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
24 Others – FNC181 to FNC189
24.4 FNC188 – CRC / Cyclic Redundancy Check
21
FN
C
160-FN
C
169
R
eal
Ti
m
e
C
loc
k
C
ont
ro
l
22
FN
C
170
-F
N
C
17
9
E
xt
e
rnal
D
evi
ce
23
FN
C
180
Su
b
st.
I
n
str
. I
n
fo
24
FN
C
181-FN
C
189
O
ther
s
25
FN
C
190-FN
C
19
9
B
loc
k D
a
ta
O
per
at
io
n
26
FN
C
200-FN
C
209
C
har
act
e
r St
ring
C
ont
ro
l
27
F
N
C2
10
-F
NC
21
9
Da
ta
O
per
at
ion 3
28
FN
C
220-FN
C
24
9
Da
ta
Co
m
p
a
ris
o
n
29
FN
C
250-FN
C
269
Da
ta
T
a
b
le
O
per
at
io
n
30
FN
C
27
0-F
N
C
274
Ex
-D
ev
ic
e
In
ve
rte
r C
o
mm
s
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is
stored in D8067.
• When any digits other than 4 digits are specified as
or
in digit specification of bit device (error
code: K6706)
• When n is outside the allowable range (1 to 256) (error code: K6706)
• When a device specified by
+n-1 or
+1 is outside the allowable range (error code: K6706)
Program example
In the program example shown below, the CRC value of the ASCII code “0123456” stored in D100 to D106 is
generated and stored to D0 when M0 turns ON.
1. In the case of 16-bit mode
2. In the case of 8-bit mode
Contents of data
Target data
Device storing data for which
CRC value is generated
D100
3130H
Low-order byte
30H
High-order byte
31H
D101
3332H
Low-order byte
32H
High-order byte
33H
D102
3534H
Low-order byte
34H
High-order byte
35H
D103
3736H
Low-order byte
36H
–
–
Device storing generated CRC
value
D0
2ACFH
Low-order byte
CFH
High-order byte
2AH
Contents of target data
Device storing data for which the
CRC value is generated
D100
Low-order byte
30H
D101
Low-order byte
31H
D102
Low-order byte
32H
D103
Low-order byte
33H
D104
Low-order byte
34H
D105
Low-order byte
35H
D106
Low-order byte
36H
Device storing the generated CRC
value
D0
Low-order byte
CFH
D1
Low-order byte
2AH
S
D
S
D
M0
FNC188
CRC
D100
D0
K7
M8161
M8000
16-bit conversion mode
FNC188
CRC
M8161
M8000
D100
D0
K7
M0
8-bit conversion mode