576
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
24.4
FNC188 – CRC / Cyclic Redundancy Check
Outline
This CRC instruction calculates the CRC (cyclic redundancy check) value which is an error check method
used in communication.
In addition to CRC value, there are other error check methods such as parity check and sum check. For
obtaining the horizontal parity value and sum check value, CCD (FNC 84) instruction is available.
CRC instruction uses “X
16
+ X
15
+ X
2
+ 1” as a polynomial for generating the CRC value (CRC-16).
→
For CCD instruction (check code), refer to Section 16.5.
1. Instruction format
2. Set data
3. Applicable devices
S
: Make sure to specify four digits (K4
{{{
) when specifying the digits of a bit device.
Explanation of function and operation
1. 16-bit operation
CRC value is generated for “n” 8-bit data (unit: byte) starting from a device specified in
, and stored to
.
The 8-bit conversion mode and 16-bit conversion mode are available in this instruction, and the mode can be
switched by turning ON or OFF M8161. For the operation in each mode, refer to the following pages.
“X
16
+ X
15
+ X
2
+ 1” is used as a polynomial for generating the CRC value (CRC-16).
Operand Type
Description
Data Type
Head device number storing data for which the CRC value is generated
16-bit binary
Device number storing the generated CRC value
n
Number of 8-bit (1-byte) data for which the CRC value is generated or the device
number storing the number of data
Oper-
and
Type
Bit Devices
Word Devices
Others
System User
Digit Specification
System User
Special
Unit
Index
Con-
stant
Real
Number
Charac-
ter String
Pointer
X Y M T C S D
.b KnX KnY KnM KnS
T
C
D
R U
\G
V
Z Modify K
H
E
"
"
P
S
S
S
S
3 3 3 3
3
3
S
S
S
3 3 3 3
3
3
n
3 3
3 3
P
FNC 188
CRC
Mnemonic
Operation Condition
16-bit Instruction
7 steps
CRC
CRCP
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
32-bit Instruction
⎯
⎯
S
D
S
D
S
D
FNC188
CRC
n
Command
input
D
S