Справочник Пользователя для Mitsubishi Electronics FXCPU

Скачать
Страница из 838
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"
FX
3U(C)
FX
3G(C)
FX
3S
FX
2N(C)
FX
1N(C)
FX
1S
FX
U
/FX
2C
FX
0N
FX
0(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
X Y M T C S D
.b KnX KnY KnM KnS T C D R U
\G
V Z Modifier K H
E
"
"
P
S1 S1 S1 S1
z z z z
z
z
z z
z z
S1 S1 S1
z z z z
z
z
CRC
EN
ENO
d
s
n
CRCP
EN
ENO
d
s
n