6 - 9
6 - 9
6. HOW TO COMMUNICATE WITH ID TAGS
6.2.8 Check data
The Check Data command checks if an error occurred in the data of the ID tag.
The command performs the calculation or verification process indicated below according
to the setting contents of the processing specification area (Un
\
G2, Un
\
G4002).
For data check function details, refer to Section 5.5, “ID Tag Data Check Function”.
(1) Calculation
Performs a CRC calculation of the “No. of data sets – 2” specified in the number of
processed points specification area (Un
\
G4, Un
\
G4004) from the address specified
in the head address specification area (Un
\
G3, Un
\
G4003), and writes the
calculation result in the last two bytes of the specified area.
(2) Verification
Performs a CRC calculation of the “No. of data sets – 2” specified in the number of
processed points specification area (Un
\
G4, Un
\
G4004) from the address specified
in the head address specification area (Un
\
G3, Un
\
G4003), compares the result with
the data of the last two bytes in the specified area, and outputs the comparison
result.
(3) Example of use
(a) When executing calculation for the eight bytes from address 0010
H
Before
execution
After
execution
10
H
11
H
12
H
13
H
0010
H
0013
H
0012
H
14
H
15
H
0015
H
0014
H
16
H
17
H
10
H
11
H
12
H
13
H
14
H
15
H
4F
H
D8
H
CRC(upper)
CRC(lower)
0017
H
0016
H
0011
H
A
B
C
ID tag
ID tag
A :
Command specification length (0008
H
bytes)
B :
Check code calculation range (command specification length – 2: 0006
H
bytes)
C :
Check code (2 bytes)