593
FX
3G
/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
FNC160
-F
NC1
69
R
eal
T
ime C
lock
C
ontrol
22
FNC17
0-F
NC
179
E
xternal D
evice
23
FNC
180
Alternate
Instructions
24
FN
C181-
FNC18
9
O
thers
25
FNC190
-F
NC1
99
Bl
oc
k D
ata
Op
er
atio
n
26
FNC20
0-F
NC209
C
har
ac
te
r S
trin
g
Con
tro
l
27
FNC2
10-
FNC21
9
Dat
a
Operati
on 3
28
FNC220
-F
NC2
49
Da
ta
C
omp
ari
son
29
FNC25
0-F
N
C
269
D
ata T
abl
e
Operation
30
FNC2
70-
FNC275
Ex
-Dev
ice
Inverter C
om
m
s
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
Содержание FX3G SERIES
Страница 1: ...FX3G FX3U FX3UC SERIES PROGRAMMABLE CONTROLLERS PROGRAMMING MANUAL Basic Applied Instructions Edition ...
Страница 2: ......
Страница 947: ......