V740 RFID READER/WRITER, ANTENNA
2005-09, REV0.1
OPERATION MANUAL
36 of 56
©OMRON CORPORATION 2005
2.2.4.2 ID Write – Writing data to tag
The UPDATE command is used to write new data
to a tag. The structure of an UPDATE command is
as follows:
UPDATE
table_expression
set_specification
where_specification
;
table_expression and entries specified in
set_specification are provided in Table 3.
A table_expression is specified by only one table
name:
UPDATE tag_id
A set_specification is entered as:
SET
entry
=
value
A where_specification is entered as:
WHERE
boolean_expr
In a where_specification, both protocol_id and
antenna_id must be specified.
The tag_id (tag data) is returned with a check code
as follows:
EPC1:[check_code][tag_id]<LF><LF>
The 'where_specification' is specified in the same
manner as the SELECT in the previous section.:
•
Example : To write tag data(tag_id) to a 64-bit
EPC tag:
UPDATE tag_id SET id=0x1234567890ABCDEF
WHERE protocol=’EPC1’ AND antenna_id=1;
The reader returns the tag_id if the write
operation was successful.For example the
response is as follows:
0xCE851234567890ABCDEF<LF><LF>
In this case, “CE85” is the check code.
“1234567890ABCDEF” is tag data(tag id).
If the operation failed, "Error 0102: Error
performing query<LF><LF>" returned.
Note:
The format of the tag data in the command
must much the selected protocol or an error will
result.
For example :
- A 64 bit EPC1 tag requires 16 hexadecimal digits
- A 96 bit EPC1 tag requires 24 hexadecimal digits
(See section 1.6)
If wrong data is written to the tag, the tag may be
unreadable. In this case, write correct tag ID again,
after that, the tag would turn to be readable.
Table3 : Reader Internal Tag Data
Table Schema -Tag Write
Keyword
Entry
Table
Arguments
Range
Example
Value
Comments
UPDATE
tag_id - -
- -
The name of the
internal tag data
table(fixed)
SET id
tag_id Hex
String
-
0xFEDCB
A0987654
321
Specifies the tag
id(tag data) to be
written
antenna_id tag_id
Int
[1...4] 1
Specifies the
antenna used to
read a tag
WHERE
protocol_id tag_id
String
'EPC1'
'EPC1'
Specifies the
protocol used to
read a tag.
Must be uppercase.