Crc Operation - Mitsubishi Electric MELSEC-Q/L Programming Manual

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

CRC operation

CRC(P)
High
Basic
Process
Redundant
performance
• QnUDVCPU, LCPU: The serial number (first five digits) is "16112" or later.
CRC
CRCP
(S): Start number of the devices where the target data of CRC value generation is stored (BIN 16 bits)
(D): Number of the device where the CRC value generated is stored (BIN 16 bits)
n:
Number of 8-bit data blocks for which the CRC value is to be determined or the number for the device where the number of 8-bit data blocks is stored
(setting range: 1 to 256) (BIN 16 bits)
Setting
Internal device
data
Bit
Word
(S)
(D)
n
Processing details
• Generates the CRC value of n points of 8-bit data (byte units) starting from the device specified by (S) and stores it in the
device specified by (D). "X
instructions support two modes, 16-bit conversion mode and 8-bit conversion mode, used for calculation of the CRC value.
The two conversion modes can be selected by SM772 ON/OFF. The operation in each conversion mode is described
below.
■16-bit conversion mode (when SM772 is OFF)
CRC operation is performed for the upper 8 bits (byte units) and lower 8 bits (byte units) in the device specified by (S). The
operation result is stored in the 16 bits of one point of the device specified by (D). The CRC value when n = 6 is shown below.
In 16-bit conversion mode, the 6 bytes at the shaded positions in the following figure are the operation target. Here, the CRC
value is "A57BH" and accordingly "A57BH" is stored in the device specified by (D).
Hexadecimal
Device
Decimal
Upper bits Lower bits
D0
24932
61
H
D1
4219
10
H
D2
-1333
FA
H
D3
-1
FF
H
D4
32761
7F
H
D5
10000
27
H
Ver.
Ver.
LCPU
Universal
Command
Command
R, ZR
J\
Bit
16
15
2
+X
+X
+1" is used as the generator polynomial to generate the CRC value. These
64
H
7B
H
CB
H
FF
H
F9
H
10
H
CRC
S
D
CRCP
S
D
U\G
Zn
Word
7 APPLICATION INSTRUCTIONS
7.5 Data Processing Instructions
n
n
Constant
Others
K, H
455
7

Advertisement

Table of Contents
loading

Table of Contents