V740 RFID READER/WRITER, ANTENNA
2005-09, REV0.1
OPERATION MANUAL
32 of 56
©OMRON CORPORATION 2005
2.2.4 Detailed Command Structure
2.2.4.1 ID Read
The client software would use the SELECT command
to read IDs of tags. The SELECT command is for
querying the tag population of the reader as well as
static variables such as firmware version. The
structure of a SELECT command is as follows:
SELECT
entry_list
FROM
table_expression
where_specification
[set_specification];
Ref. Table 2 for entry_list details.
A SELECT clause is entered as:
SELECT
entry1
,
entry2
,
entry3
, ...
one or more entries can be specified, for multiple
entries, a comma delimiter is required.
A table_expression is specified by only one table
name.
FROM
table
In the function ID Read, you always use 'tag_id' as a
table name. And so the table_expression is as
follows:
FROM
tag_id
A where_specification is entered as:
WHERE
boolean_expression
boolean_expression can consist of any expression
which evaluates to a boolean value. In many cases,
this expression will be:
entry binary_operator value
where
binary_operator
can be one of =, <, <=, >, >= ,
<>, AND, or OR. Parentheses may also be used to
create associations of subexpressions. In the
presence of a 'where_specification', SELECT will not
return any rows for which the WHERE condition does
not evaluate to TRUE.
Note:
You must specify one protocol in
'where_specification'.
A set_specification is entered as:
SET
expression
expression consists of entry and the value.
In response, all IDs delimitted by LF code are sent.
The format is as follows:
[id1] <LF> [id2] <LF>.....[idn] <LF><LF>
The response includes the check code and ID. The
first 4 digits are the check code, and the ID follows for
the EPC1/1B protocols.
Below are some examples for reading tag ID:
•
To query a tag on a specific antenna and protocol,
you can specify a specific antenna and protocol in
the 'where_specification':
SELECT id FROM tag_id WHERE
antenna_id=1 AND protocol_id='EPC1';
SELECT id FROM tag_id WHERE
antenna_id=2 AND protocol_id='EPC1';
The first specifies 1 as an antenna id, and EPC1 as a
protocol id. The second specifies 2 as an antenna id,
and EPC1 as a protocol id. The reader searches tags
that corresponds to the condition, and returns the tag
ID if the tag is present followed by LF code, an empty
event (only LF code) results if tags matching the
'where_specification' are not present.
•
To query a tag on multiple antennas, you can
specify multiple antennas by 'OR' operator in the
'where_specification':
SELECT id FROM tag_id WHERE
(antenna_id=1 OR antenna_id=2) AND
protocol_id='EPC1';
SELECT id FROM tag_id WHERE
(antenna_id=1 OR antenna_id=2 OR
antenna_id=3 OR antenna_id=4) AND
protocol_id='EPC1';
The first specifies 2 antennas, and the second
specifies 4 antennas.
•
To query a specific tag, given its EPC code, one
can specify a specific tag with an ID as a
hexadecimal number
:
SELECT id FROM tag_id WHERE
id=0x1234567890ABCDEF AND
antenna_id=1 AND protocol_id='EPC1';
When Indicating id in the 'where_specification',
the reader searches the ID from the higher order.
If the value is shorter than 16 digit for EPC1(24
digit when using EPC1B), it examines only upper
bits.
SELECT id FROM tag_id WHERE
antenna_id=1 AND protocol_id='EPC1' AND
id=0x1234;
•
To query a specific sub class of tags, given a
range of tag ID values: