5 - 21
5 - 21
5. THINGS YOU NEED TO KNOW BEFORE PROGRAMMING
5.5 ID Tag Data Check Function
The ID tag data can be checked using the Check Data command.
This function calculates, writes, and verifies CRC (Cyclic Redundancy Check) code in
the check block units specified by the user.
CRC code is calculated by the generating polynomial X
16
+ X
12
+ X
5
+ 1.
The data check function is used by separating the processing into a process that
calculates and writes check code and a process that verifies check code using the
processing specification (Un
\
G2, Un
\
G4002) of the Check Data command.
In the check block specified by a head address and number of bytes, the area
excluding the last two bytes of the block serves as the calculation target area, and the
last two bytes of the block serve as the check code area.
When the Check Data command is executed using the specification for writing the
check code, the CRC code of the data of the calculation target area is calculated, and
the result is written in the check code area.
Check code calculation
target area
(Number of check block
bytes - 2)
Check code
area (2 bytes)
Area head
address
Address
00
01
Number of check
block bytes
CRC (upper digit)
CRC (lower digit)
When data check is executed using the specification for data verification, the CRC
code of the data of the calculation target area is calculated and compared with the data
stored in the check code area.
When the two match, ID command complete (X4, XC) turns ON.
When the two do not match, the status flag (bit 4) of the error details storage area
(Un
\
G41, Un
\
G4041) turns ON and error detection (X5, XD) turns ON.