578
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
8-bit conversion mode (while M8161 is ON)
In this mode, the operation is executed only for low-order 8 bits (low-order 1 byte) of a device specified by
.
With regard to the operation result, low-order 8 bits (1 byte) are stored to a device specified by
, and
high-order 8 bits (1 byte) are stored to a device specified by
+1.
2. Related device
*1.
Cleared when the PLC mode is changed from RUN to STOP.
Caution
In this instruction, “X
16
+ X
15
+ X
2
+ 1” is used as a polynomial for generating the CRC value (CRC-16).
There are many other standard polynomials for generating the CRC value. Note that the CRC value
completely differs if an adopted polynomial is different.
Reference: Major polynomials for generating the CRC value
Example:
= D100
= D0
n =
6
Device
Contents of target data
Device storing data for
which the CRC value is
generated
Low-order byte
Low-order bits of D100
01H
+1
Low-order byte
Low-order bits of D101
03H
+2
Low-order byte
Low-order bits of D102
03H
+3
Low-order byte
Low-order bits of D103
02H
+4
Low-order byte
Low-order bits of D104
00H
+5
Low-order byte
Low-order bits of D105
14H
...
–
+n-1
Low-order byte
–
Device storing the
generated CRC value
Low-order byte
Low-order bits of D0
E4H
+1
Low-order byte
Low-order bits of D1
41H
Related device
Description
M8161
*1
ON
CRC instruction operates in the 8-bit mode.
OFF
CRC instruction operates in the 16-bit mode.
Name
Polynomial
CRC-12
X
12
+ x
11
+ X
3
+ X
2
+ X + 1
CRC-16
X
16
+ X
15
+ X
2
+ 1
CRC-32
X
32
+ X
26
+ X
23
+ X
22
+ X
16
+ X
12
+ X
11
+ X
10
+ X
8
+ X
7
+ X
5
+ X
4
+ X
2
+ X + 1
CRC-CCITT
X
16
+ X
12
+ X
5
+ 1
S
D
D
FNC188
CRC
n
M8161
M8000
8-bit conversion mode
Command
input
D
S
S
D
S
S
S
S
S
S
S
D
D
Содержание FX3U Series
Страница 1: ...PROGRAMMING MANUAL Basic Applied Instructions Edition FX3U FX3UC SERIES PROGRAMMABLE CONTROLLERS ...
Страница 2: ......
Страница 889: ......