8 APPLICATION INSTRUCTION
8.22 Data Operation Instruction
683
8
Precautions
• In these instructions, "X
16
+X
15
+X
2
+1" is used in a polynomial for generating the CRC value (CRC-16). There are many
other standard polynomials for generating the CRC value. Note that the CRC value completely differs if an adopted
polynomial is different. Major polynomials for generating the CRC value are shown below.
Operation error
There is no operation error.
Example) (s) = D100, (d) = D0, (n) = 6
Device
Contents of target data
8 bits
16 bits
Device storing data
for which the CRC
value is generated
(s)
Low-order byte
Low-order bits of D100
01H
0301H
High-order byte
High-order bits of D100
03H
(s)+1
Low-order byte
Low-order bits of D101
03H
0203H
High-order byte
High-order bits of D101
02H
(s)+2
Low-order byte
Low-order bits of D102
00H
1400H
High-order byte
High-order bits of D102
14H
(s)+(n)/2-1
Low-order byte
High-order byte
Device storing the
generated CRC value
(d)
Low-order byte
Low-order bits of D0
E4H
41E4H
High-order byte
High-order bits of D0
41H
• 8-bit conversion mode (while SM8161 is ON)
In this mode, the operation is executed only for low-order 8 bits (low-order 1 byte) of a device specified by (s). With regard to the operation result, low-
order 8 bits (1 byte) are stored to a device specified by (d), and high-order 8 bits (1 byte) are stored to a device specified by (d)+1.
In the following program, conversion is executed as follows:
Example) (s) = D100, (d) = D0, (n) = 6
Device
Contents of target data
Device storing data for
which the CRC value
is generated
(s)
Low-order byte
Low-order bits of D100
01H
(s)+1
Low-order byte
Low-order bits of D101
03H
(s)+2
Low-order byte
Low-order bits of D102
03H
(s)+3
Low-order byte
Low-order bits of D103
02H
(s)+4
Low-order byte
Low-order bits of D104
00H
(s)+5
Low-order byte
Low-order bits of D105
14H
(s)+(n)-1
Low-order byte
Device storing the
generated CRC value
(d)
Low-order byte
Low-order bits of D0
E4H
(d)+1
High-order byte
High-order bits of D0
41H
Name
Polynomial
CRC-12
X
12
+ X
11
+ X
3
+ X
2
+ X + 1
CRC-16
X
16
+ X
15
+ X
2
+ 1
CRC-32
X
32
+ X
26
+ X
23
+ X
22
+ X
16
+ X
12
+ X
11
+ X
10
+ X
8
+ X
7
+ X
5
+ X
4
+ X
2
+ X + 1
CRC-CCITT
X
16
+ X
12
+ X
5
+ 1
CRC
(s)
(d)
(n)
SM400
SM8161
Command
input
8-bit conversion mode
Summary of Contents for MELSEC iQ-F FX5
Page 1: ...MELSEC iQ F FX5 Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 17: ...15 CONTENTS ...
Page 24: ...22 MEMO ...
Page 1050: ...1048 26 TIME DATA FUNCTIONS 26 4 Division MEMO ...
Page 1068: ...1066 29 COUNTER FUNCTION BLOCKS 29 4 Counter Function Block Operation error There is no error ...
Page 1107: ...I 1105 MEMO ...
Page 1111: ......