6 - 7
6 - 7
6. HOW TO COMMUNICATE WITH ID TAGS
6.2.6 Write calculation
The Write Calculation command performs an addition (subtraction) operation on the
data of the number of bytes 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 then writes the result to the same address of the ID tag.
The data subject to the addition (subtraction) operation are stored in the command
option specification area (Un
\
G5, Un
\
G4005).
The calculation result data are also stored in the data storage area (Un
\
G100 to
Un
\
G101, Un
\
G4100 to Un
\
G4101).
When an addition calculation result indicates overflow, the calculation result is not
written to the ID tag, the status flag (bit 4) of the error details storage area (Un
\
G41,
Un
\
G4041) turns ON, error detection (X5, XD) turns ON, and the operation ends in
error.
Similarly, when a subtraction calculation result indicates underflow, the calculation
result is not written to the ID tag, the status flag (bit 4) of the error details storage area
(Un
\
G41, Un
\
G4041) turns ON, error detection (X5, XD) turns ON, and the operation
ends in error.
(1) Example of use
(a) When F012
H
is added to the four bytes from address 0010
H
Option
Before
execution
After
execution
b15
b0
b7
b0
EF
H
FF
H
56
H
78
H
F0 12
H
0010
H
0013
H
0012
H
0011
H
b7
b0
F0
H
00
H
46
H
8A
H
0010
H
0013
H
0012
H
0011
H
Un\G5
Buffer memory
Address
ID tag
ID tag
01010110
11110000
01000110
11111111
00000000
00000000
11101111
00000000
11110000
EFFF
H
5678
H
0000
H
F012
H
F000
H
468A
H
Data before execution
Addition data
Data after execution
b7 b0 b7 b0 b7 b0 b7 b0
01111000
00010010
10001010
(b) When F012
H
is subtracted to the four bytes from address 0010
H
Option
Before
execution
After
execution
b15
b0
b7
b0
F0
H
00
H
46
H
8A
H
F0 12
H
0010
H
0013
H
0012
H
0011
H
b7
b0
EF
H
FF
H
56
H
78
H
0010
H
0013
H
0012
H
0011
H
Un\G5
Buffer memory
Address
ID tag
ID tag
01010110
11110000
01010110
00000000
00000000
11111111
11110000
00000000
11101111
F000
H
468A
H
0000
H
F012
H
EFFF
H
5678
H
Data before execution
Subtraction data
Data after execution
b7 b0 b7 b0 b7 b0 b7 b0
10001010
00010010
01111000