Mitsubishi Electronics FX3G Video Gaming Accessories User Manual


 
591
FX3G/FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
24 Others – FNC181 to FNC189
24.4 FNC188 – CRC / Cyclic Redundancy Check
21
FNC160-FNC169
Real Time Clock
Control
22
FNC170-FNC179
External Device
23
FNC180
Alternate
Instructions
24
FNC181-FNC189
Others
25
FNC190-FNC199
Block Data
Operation
26
FNC200-FNC209
Character String
Control
27
FNC210-FNC219
Data
Operation 3
28
FNC220-FNC249
Data
Comparison
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC274
Ex-Device
Inverter Comms
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
XYMTCSD
.b KnX KnY KnM KnS T C D R
U\G
V Z Modify K H E "
"P
SSSS3333 3 3
SSS3333 3 3
n 33 33
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