Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
24 Applied Instructions (Others)
24.4 CRC / Cyclic Redundancy Check
592
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
24.4 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 instruction is available. For the generation of
CRC value (CRC-16), the CRC instruction uses "X
16
+ X
15
+ X
2
+ 1" as a polynomial and uses "FFFFH" as a
default value.
1. Format and operation, execution form
2. Set data
3. Applicable devices
S: Refer to "Cautions"
FX3U(C) FX3G(C) FX3S FX2N(C) FX1N(C) FX1S FXU/FX2C FX0N FX0(S)
Instruction
name
Operation
Execution
form
Expression in each language
Structured ladder/FBD ST
CRC 16 bits Continuous CRC(EN,s,n,d);
CRCP 16 bits Pulse CRCP(EN,s,n,d);
Variable Description Data type
Input
variable
EN Execution condition Bit
Head device storing data for which the CRC value is generated ANY16
Number of 8-bit (byte) data for which the CRC value is generated or the
device storing the number of data
ANY16
Output
variable
ENO Execution state Bit
Device storing the generated CRC value ANY16
Operand
type
Bit Devices Word Devices Others
System user Digit specification
System
user
Special
unit
Index
Cons
tant
Real
Number
Character
String
Pointer
XYMTCS
D.b
KnX KnY KnM KnS T C D R
U\G
V Z Modifier K H E
"
"
P
S1 S1 S1 S1
zzz z z z
zz zz
S1 S1 S1
zzz z z z
CRC
EN ENO
d
s
n
CRCP
EN ENO
d
s
n