Date post: | 02-Jun-2018 |
Category: |
Documents |
Upload: | adrian-simonis |
View: | 237 times |
Download: | 0 times |
of 136
8/10/2019 BRI Programming
1/136
COMPANY CONFIDENTIAL
Jim PeternelBRI Programming
8/10/2019 BRI Programming
2/136
Slide 2 COMPANY CONFIDENTIAL
Introduction
Provide general overview of the Basic ReaderInterface (BRI).Will not cover every command.
Will cover most commonly used features.Will not cover commands that are not part of the IV7serial reader interface.
8/10/2019 BRI Programming
3/136
Slide 3 COMPANY CONFIDENTIAL
Overview
Overview of available interfaces to Intermec readersSupported Tag TypesTag memory mapTag SingulationBRI ProtocolBRI Features and Commands
8/10/2019 BRI Programming
4/136
Slide 4 COMPANY CONFIDENTIAL
Supplementary Documents
For a full referencedocument on the BRIdownload:
BRI Basic ReaderInterface, ProgrammersReference Manual
8/10/2019 BRI Programming
5/136
Slide 5 COMPANY CONFIDENTIAL
Please Ask Questions At Any Time
8/10/2019 BRI Programming
6/136
Slide 6 COMPANY CONFIDENTIAL
Application Development Overview
Currently four approachesBasic Reader Interface (BRI)Intermec Developer Library (IDL)Low Level Reader Protocol (LLRP)
Currently IF61 reader ONLY Application Layer Events (ALE)
Currently IF61 reader ONLY
8/10/2019 BRI Programming
7/136
Slide 7 COMPANY CONFIDENTIAL
Basic Reader Interface (BRI)
Intermec reader interfaceSimple ASCII only interface, human readable.Provides a simple command/reply operations andasynchronous event messages.No drivers. Available on all Intermec readersCan be run from any platform, OS.
8/10/2019 BRI Programming
8/136
Slide 8 COMPANY CONFIDENTIAL
Intermec Developer Library (IDL)
RFID ClassEasy to use and freeRequires drivers from Intermec Available on Intermec readersJava, .Net (e.g. C#, VB)Runs on Win32, Windows Mobile, PPC 2003 Also runs on Linux using Windows Mono drivers (IF
8/10/2019 BRI Programming
9/136
Slide 9 COMPANY CONFIDENTIAL
Low Level Reader Protocol (LLRP)
EPC Global Standard Interface.Currently IF61 only.Future release planned for the IV7/CV30XML based HOWEVER Binary interface to reader.Complex to use.Provides access to many low level features in thereader.
8/10/2019 BRI Programming
10/136
Slide 10 COMPANY CONFIDENTIAL
Application Layer Events (ALE)
EPC Global Standard Interface.Currently IF61 only.Report based interface. Available on the IF61 only. ALE Store and Forward application comes standardwith the IF61.
8/10/2019 BRI Programming
11/136
Slide 11 COMPANY CONFIDENTIAL
TAG TYPES
Identifier Air-protocol(s) Description
MIXED ISO180006B, UCODE119types only
G1, G2 and v1.19 tags only It is recommendedthat G1 mode be used in place of MIXED (MIXED mode is kept for backward compatibilityonly )
G1/ISO6BG1 ISO180006B ISO6B G1 tag
G2/ISO6BG2 ISO180006B ISO6B G2 tag
ICODE119 UCODE119 Phillips v1.19 (ISO6B emulating EPC tag IDs)
V119UCODE119
UCODE119 Phillips v1.19 (ISO6B emulating EPC tag IDs)
EPCC1G1 EPCC1G1 EPCglobal UHF Class 1 Gen 1
EPCC1G2 EPCC1G2 EPCglobal UHF Gen2
8/10/2019 BRI Programming
12/136
Slide 12 COMPANY CONFIDENTIAL
EPCC1G2 Memory Map
Bank 0 Kill Password 4 Bytes Access Password 4 Bytes
Bank 1 Header info Bytes 0-3 EPC Code Bytes 4-15
Bank 2 TID 4+ Bytes (not necessarily unique)
Bank 3 UID Optional ? Bytes
8/10/2019 BRI Programming
13/136
Slide 13 COMPANY CONFIDENTIAL
Tag Singulation
The following is a simplification of the processReader sends RESET to all tagsReader tells all tags to roll a random number in the
range of zero to Q. That number is the tags slot orposition in line.
8/10/2019 BRI Programming
14/136
Slide 14 COMPANY CONFIDENTIAL
Tag Singulation
Reader sends RESET to all tagsReader tells all tags to roll a random number in the range ofzero to Q. That number is the tags slot or position in line. Assume Q=4 which means 16 slots
21
5
5
7
1510
8/10/2019 BRI Programming
15/136
Slide 15 COMPANY CONFIDENTIAL
Tag Singulation
Looking at the 16 slotsEmpty slots are wasted time
1
5
7
10
5
2
15
0
1
2
15
Empty Slot
Tag in Slot
3
4
5
67
8
9
10
1112
13
14
Slots
8/10/2019 BRI Programming
16/136
Slide 16 COMPANY CONFIDENTIAL
Tag Singulation
Once tag is read by the reader it remains quiet for therest of the singulation processIf tag momentarily looses power it will reset and talk
again.This is very bad when trying to read a large number otags.
Tags regularly loose power as they pass an antenna.Tag Persistence helps resolve this issue (Sessions)
8/10/2019 BRI Programming
17/136
Slide 17 COMPANY CONFIDENTIAL
Comments or Questions
8/10/2019 BRI Programming
18/136
Slide 18 COMPANY CONFIDENTIAL
Basic Reader Interface
8/10/2019 BRI Programming
19/136
Slide 19 COMPANY CONFIDENTIAL
BRI Protocol
Consists of the followingCommand and Response Asynchronous events
BRI is not case sensitive unless you are calculatingchecksums.Terminology
Carriage Return, CRLine Feed, LF
8/10/2019 BRI Programming
20/136
Slide 20 COMPANY CONFIDENTIAL
BRI Protocol
Sending command:BRI_COMMAND + ATTRIB IDTRIES
Response:ETX is: OK>ResponseLineResponseLineOK>
ATTIRB IDTRIES=1OK>
8/10/2019 BRI Programming
21/136
Slide 21 COMPANY CONFIDENTIAL
BRI Protocol
Some other examplesSend: ATTRIB IDTRIES=B1Response: ERROK>
Send: ATTRIB IDTRIES=1Response: OK>
8/10/2019 BRI Programming
22/136
Slide 22 COMPANY CONFIDENTIAL
BRI Protocol
Asynchronous Event MessagesEVT: For example
EVT:TAG H010203040506070809101112Event messages are NOT followed by an OK>
8/10/2019 BRI Programming
23/136
Slide 23 COMPANY CONFIDENTIAL
BRI Error Responses
If a command is invalid reader returns ERRTypo, invalid parameters, missing keyword, etcERROK>
Checksum error returns CKERRCKERROK>
8/10/2019 BRI Programming
24/136
Slide 24 COMPANY CONFIDENTIAL
RF Module Events
All Platforms (depends on FW version)EVT:TRIGGER ExampleTrigger GPIO 15EVT:RADIO DUTY_CYCLE TIMELEFT xxxEVT:TAG H112210101122334411221122EVT:THERMAL OVERTEMP EVT:THERMAL NORMAL
IF61
EVT:RESETHandheld (IM4 based platforms)
EVT:BATTERY LOW
8/10/2019 BRI Programming
25/136
Slide 25 COMPANY CONFIDENTIAL
BRI
ReaderModule
InformationCommands
WRITE
Commands
GPIO
Commands
ACCESS
Commands
READ
Commands
ATTRIBUTE
Commands
8/10/2019 BRI Programming
26/136
Slide 26 COMPANY CONFIDENTIAL
Reader Module Information Commands
VERReturns all version information
VERIM5 RFID Reader Ver 9.39Basic Reader Interface Version 3.12
FCC 915MHz CC014Copyright (C) 2009 Intermec Technologies Corp.OK>
8/10/2019 BRI Programming
27/136
Slide 27 COMPANY CONFIDENTIAL
Reader Module Information Commands
BRIVERReturns BRI versionBasic Reader Interface Version S
HWIDReturns serial and configuration numberCN-000000
SN-000000 HWREGION
Region setting (RF regulatory region)ETSI 302-208 865Mhz
8/10/2019 BRI Programming
28/136
Slide 28 COMPANY CONFIDENTIAL
Reader Module Information Commands
HWPRODHardware platformIM5, IM4
HWVERHardware version2B0
SWVERVersion of firmware running in the RF module6.33
8/10/2019 BRI Programming
29/136
Slide 29 COMPANY CONFIDENTIAL
Testing communication link
PING commandReturns OK>
8/10/2019 BRI Programming
30/136
Slide 30 COMPANY CONFIDENTIAL
BRI ATTRIBUTES
Allow you to configure the reader.Select antennas, set tag type, etc.
Not all attributes are available on all reader platforms
IF61 you cannot set baud rate, TTY, echo, or checksumsWe do add new attributes as we add more features tothe readers.
When issuing attribute commands you must alwaysinclude the keyword ATTRIB.
8/10/2019 BRI Programming
31/136
Slide 31 COMPANY CONFIDENTIAL
ATTRIB Command Structure
To GET an attribute value: ATTRIB For example: ATTRIB IDTRIES
Will return: IDTRIES=1OK>To SET an attribute value:
ATTRIB =
For example: ATTRIB IDTRIES=2 Will return: OK>
8/10/2019 BRI Programming
32/136
Slide 32 COMPANY CONFIDENTIAL
ATTRIB Command
The ATTRIB command will list all attributes availabon that reader platform.Not all attributes are available on all reader platforms
8/10/2019 BRI Programming
33/136
Slide 33 COMPANY CONFIDENTIAL
List of ATTRIBUTES
Frequently Used Attributes ANTS=1TAGTYPE=EPCC1G2FIELDSTRENGTH=30DB,30DB,30DB,30DBINITIALQ=4
IDTRIES=1 ANTTRIES=3TIMEOUTMODE=OFFIDTIMEOUT=100 ANTTIMEOUT=50
SESSION=1SCHEDULEOPT=0RDTRIES=3WRTRIES=3
Lesser Used AttributesINITTRIES=1NOTAGRPT=ONIDREPORT=ONCHKSUM=OFFTTY=OFFECHO=OFFXONXOFF=OFFBAUD=115200FIELDSEP=" "DENSEREADERMODE=OFF
LOCKTRIES=3SELTRIES=1UNSELTRIES=1RPTTIMEOUT=0
8/10/2019 BRI Programming
34/136
Slide 34 COMPANY CONFIDENTIAL
Communication Attributes
Serial readers only.Cannot be set when using the IDL drivers. ATTRIB BAUD
Default value is 115200. ATTRIB TTY=ON/OFF ATTRIB ECHO=ON/OFF
For applications, its best to leave this OFF.
8/10/2019 BRI Programming
35/136
Slide 35 COMPANY CONFIDENTIAL
Communication Attributes
ATTRIB XONXOFF=ON/OFFDefault is OFF
ATTRIB CHKSUM=ON/OFF
To disable checksums use the following command: ATTRIB CHKSUM=OFFC9Where C9 is the checksum for that command.
Checksums ARE case sensitive so this command mustbe entered in upper case as shown above!
8/10/2019 BRI Programming
36/136
Slide 36 COMPANY CONFIDENTIAL
Report Attribute Settings
ATTRIB IDREPORT=ONReader will return the ECP ID for each tag read or written to.Default is ON.
attrib idreport=offOK>r ant1OK>attrib idreport=onOK>r antH000000000000000000000000 1OK>
8/10/2019 BRI Programming
37/136
Slide 37 COMPANY CONFIDENTIAL
Report Attribute Settings
ATTRIB NOTAGRPT=ONReturns NOTAG message when no tag is found.Default is ON.
rNOTAGOK>attrib notagrpt=off
OK>rOK>
8/10/2019 BRI Programming
38/136
Slide 38 COMPANY CONFIDENTIAL
Attribute Settings: TAGTYPE
Can have multiple tag types separated by a comma ATTRIB TAGTYPE=EPCC1G2,ISO6BG2Multiple tag types slows down the reader.
ATTRIB TAGTYPE=MIXED does NOT enableepcc1g2 tag type. It is only enables ISO tag types.
8/10/2019 BRI Programming
39/136
Slide 39 COMPANY CONFIDENTIAL
Attribute Settings: FIELDSTRENGTH
Sets the RF power level per port.Reader controls max and min values so you cannotviolate your local regulations
Min value = 15 dbiMax value = country specificCan be set in DB
ATTRIB FIELDSTRENGTH=30db,30db,30db,30dbCan be set as a % of max strength or in DB
ATTRIB FIELDSTRENGTH=100,100,100,100
8/10/2019 BRI Programming
40/136
Slide 40 COMPANY CONFIDENTIAL
Attribute Settings
ATTRIB ANTSGets/Sets active antennas
ATTRIB ANTS=1,2,3,4
Sets all four antennas as active ATTRIB ANTS=4
Sets antenna 4 as active
ATTRIB ANTS=2,4Sets antennas 2 and 4 as active
8/10/2019 BRI Programming
41/136
Slide 41 COMPANY CONFIDENTIAL
Attribute Settings: INITIALQ
Gets/Sets the initial number of tag slots used in theanti-collision algorithm.# of slots = 2^Q
Once a collision is detected the reader willautomatically adjust the Q value upward.For best performance you want to minimize the
number of empty slots.
8/10/2019 BRI Programming
42/136
8/10/2019 BRI Programming
43/136
Slide 43 COMPANY CONFIDENTIAL
Attribute Settings: RDTRIES
Is used when reading fieldsREAD HEX(1:4,2)READ HEX(3:0,16)
Not used when reading just the EPCID ATTRIB RDTRIES=3
8/10/2019 BRI Programming
44/136
Slide 44 COMPANY CONFIDENTIAL
Attribute Settings: WRTRIES
Is used when writing fieldsWRITE HEX(1:4,2)=H0102WRITE HEX(3:0,12)=0102030405060708090A0B
ATTRIB WRTRIES=3
8/10/2019 BRI Programming
45/136
Slide 45 COMPANY CONFIDENTIAL
Attribute Settings: SESSION
ATTRIB SESSION=Sets tag persistence
What is persistence?
When a tag momentarily loses power during the tagreading process, will it remember if its already been readPersistence sets the length of time a tag will remember ibeen read.
Critical when reading a large number of tags
8/10/2019 BRI Programming
46/136
Slide 46 COMPANY CONFIDENTIAL
Attribute Settings: SESSION
Session = 0No persistenceBest for reading single tagsBest for making tags/second measurements
Session = 1Max 5 seconds persistence.With Intermec readers we have found session one provides themost consistent read rates when reading large numbers of tags.
Session = 2 and Session = 3Share the same persistence features.Min persistence time of 2 seconds.
8/10/2019 BRI Programming
47/136
Slide 47 COMPANY CONFIDENTIAL
Attribute Settings: TIMEOUTMODE
ATTRIB TIMEOUTMODE=ON/OFFEnables the use of timeouts instead of tries. Attrib SCHEDOPT=1 overrides this attribute.
Timeouts are the preferred mode.
8/10/2019 BRI Programming
48/136
Slide 48 COMPANY CONFIDENTIAL
Attribute Settings: IDTIMEOUT
ATTRIB IDTIMEOUT=Time defined in millisecondsTotal time the reader will try to read tags.
This time is an approximate value. ATTRIB IDTIMEOUT=2000
Reader will read tags for 2 seconds.
8/10/2019 BRI Programming
49/136
Slide 49 COMPANY CONFIDENTIAL
Attribute Settings: ANTTIMEOUT
ATTRIB ANTTIMEOUT=Time defined in millisecondsTime the reader will try to read tags on an antennabefore switching to the next antenna. After time expires the reader will switch to the nextantenna. ANTTIMEOUT cannot exceed IDTIMEOUT
Idtimeout=1000 and anttimeout=2000: means reader wiread for a total of 1 second on the first antenna.
8/10/2019 BRI Programming
50/136
Slide 50 COMPANY CONFIDENTIAL
Attribute Settings: IDTRIES
ATTRIB IDTRIES=Sets the number of times to cycle through theantennas.
No time associated with tries, the more tags in the fiethe longer the read will take.I recommend IDTRIES=1
8/10/2019 BRI Programming
51/136
Slide 51 COMPANY CONFIDENTIAL
Attribute Settings: ANTTRIES
ATTRIB ANTTRIES=Sets the number of inventory rounds to run beforeswitching antennas.
I recommend ANTTRIES=1
8/10/2019 BRI Programming
52/136
Slide 52 COMPANY CONFIDENTIAL
Attribute Settings: INITTRIES
ATTRIB INITTRIES=Sets the number of times to cycle through IDTRIES oIDTIMEOUT.
Functions as a multiplierINITITRIES x IDTRIESINITTRIES x IDTIMEOUT
I recommend INITTRIES=1NO advantage to setting it higher than one.
8/10/2019 BRI Programming
53/136
Slide 53 COMPANY CONFIDENTIAL
Tries vs. Timeouts ?????
Depends on what you are trying to do.Timeouts are better when you are reading a largenumber of tags.Will talk about this more later.For EPCC1G2 Ive found that TRIES dont mattermuch, just set them to ONE.
IDTRIES=1 ANTTRIES=1INITTRIES=1
8/10/2019 BRI Programming
54/136
Slide 54 COMPANY CONFIDENTIAL
Attribute Settings: SCHEDOPT
ATTRIB SCHEDOPT=0/1Controls how the reader cycles through the antennas.Originally added to make readers more responsive to
commands while reading very large groups of tagswhen in continuous read mode.More important for all readers EXCEPT the IF61.
8/10/2019 BRI Programming
55/136
Slide 55 COMPANY CONFIDENTIAL
Attribute Settings: SCHEDOPT
SCHEDOPT = 0DisabledReader will use attributes as defined.
8/10/2019 BRI Programming
56/136
Slide 56 COMPANY CONFIDENTIAL
Attribute Settings: SCHEDOPT
SCHEDOPT = 1EnabledDuring continuous reads, reader will check for incoming
commands and execute them.Makes reader more responsive when reading a largenumber of tags.
8/10/2019 BRI Programming
57/136
Slide 57 COMPANY CONFIDENTIAL
Attribute Settings: SCHEDOPT
SCHEDOPT = 1Overrides ATTRIB TIMEOUTMODE=OFFWill use IDTIMEOUT, ANTTIMEOUT if they are non-
Disable timeouts by setting one or both to zeroIf IDTIMEOUT=0 will uses IDTRIESIf ANTTIMEOUT=0 will use ANTTRIES
I recommend setting ANTTIMEOUT=0 and ANTTRIE
8/10/2019 BRI Programming
58/136
Slide 58 COMPANY CONFIDENTIAL
CASE 1: ATTRIB SCHEDOPT=0
SettingsTIMEOUTMODE=ONIDTIMEOUT=0 ANTTIMEOUT=0
READ. Do nothing
8/10/2019 BRI Programming
59/136
Slide 59 COMPANY CONFIDENTIAL
CASE 2: ATTRIB SCHEDOPT=0
SettingsTIMEOUTMODE=ONIDTIMEOUT != 0 ANTTIMEOUT=0
READ. while (IDTIMEOUT not elapsed) {
foreach antenna {
//execute one inventory round}
}
8/10/2019 BRI Programming
60/136
8/10/2019 BRI Programming
61/136
Slide 61 COMPANY CONFIDENTIAL
CASE 4: ATTRIB SCHEDOPT=0
SettingsTIMEOUTMODE=ONIDTIMEOUT < ANTTIMEOUT ANTTIMEOUT != 0
READ foreach antenna {
while (IDTIMEOUT not elapsed) {
//execute one inventory round}}
8/10/2019 BRI Programming
62/136
Slide 62 COMPANY CONFIDENTIAL
CASE 5: ATTRIB SCHEDOPT=0
SettingsTIMEOUTMODE=ONIDTIMEOUT>=ANTTIMEOUT ANTTIMEOUT != 0
READ while (IDTIMEOUT not elapsed) {
foreach antenna {while (ANTTIMEOUT not elapsed) {
//execute one inventory roundif (tag found) restart ANTTIMEOUT timer
if (IDTIMEOUT timer elapsed) break;}if (IDTIMEOUT timer elapsed) break;
}}
8/10/2019 BRI Programming
63/136
Slide 63 COMPANY CONFIDENTIAL
CASE 6: ATTRIB SCHEDOPT=1If (IDTIMEOUT != 0) {
while (IDTIMEOUT not elapsed) {foreach antenna {
If (ANTTIMEOUT != 0) {While (!ANTTIMEOUT) {
//Execute one inventory round
}} else {Foreach ANTTRY {
//Execute one inventory round}
}}
}
8/10/2019 BRI Programming
64/136
Slide 64 COMPANY CONFIDENTIAL
CASE 7: ATTRIB SCHEDOPT=1If (IDTIMEOUT == 0 && IDTRIES>0) {
foreach IDTRY {foreach antenna {
If (ANTTIMEOUT != 0) {While (!ANTTIMEOUT) {
//Execute one inventory round
}} else {Foreach ANTTRY {
//Execute one inventory round}
}}
}
8/10/2019 BRI Programming
65/136
Slide 65 COMPANY CONFIDENTIAL
Data Field Definitions
Optional fields of tag specific data that can be added to READ andWRITE commands.Will be returned with the EPCID.The following fields are READ ONLY: ANT
Antenna that tag was read on.Values: 1,2,3,4
COUNTNumber of times tag was read.
TIMETime stamp of when tag was first read in milliseconds.Not a real time but an internal timer that is reset when reader is powered up.
8/10/2019 BRI Programming
66/136
Slide 66 COMPANY CONFIDENTIAL
Data Field Definitions
TAGIDMemory bank 2
EPCIDMemory Bank 1
TAGTYPEReturns the tag type, EPCID, ISO6BG1, ISO6BG2etc.
RSSIReturn Signal Strength IntensityRange: -128 dbm to 0 dbm.
ExampleREAD ANT COUNT RSSI
8/10/2019 BRI Programming
67/136
Slide 67 COMPANY CONFIDENTIAL
Comments or Questions
8/10/2019 BRI Programming
68/136
Slide 68 COMPANY CONFIDENTIAL
Reading Tags
8/10/2019 BRI Programming
69/136
Slide 69 COMPANY CONFIDENTIAL
Reading Tags
READ, RD, R4 read modes to choose from
REPORT=DIRECT
REPORT=NOREPORT=EVENTREPORT=EVENTALL
8/10/2019 BRI Programming
70/136
Slide 70 COMPANY CONFIDENTIAL
Read Mode: REPORT=DIRECT
Good for reading small number of tagsGood for mapping RF FieldReturns tag list after command completes
Length of read depends on attrib settings:IDTRIES, ANTTRIES, IDTIMEOUT, ANTTIMEOUT
d d l
8/10/2019 BRI Programming
71/136
Slide 71 COMPANY CONFIDENTIAL
Read Mode: REPORT=DIRECT Examples
Standard ReadREAD ANT COUNT READ ANT COUNT REPORT=DIRECT
Read with filterRead where HEX(1:4,2)=H1111
Read with filter and fields
Read COUNT where HEX(1:4,2)=H1111 TIME ANT
i k O C
8/10/2019 BRI Programming
72/136
Slide 72 COMPANY CONFIDENTIAL
How Tries Work: READ REPORT=DIRECT
InitTries=1 IDTries=2 AntTries=1
AntTries=2
AntTries=3
AntTries=1
AntTries=2
AntTries=3
IDTries=1 AntTries=1
AntTries=2
AntTries=3
AntTries=1
AntTries=2
AntTries=3
Antenna 1
Antenna 2
Antenna 1
Antenna 2
Antenna 1
Antenna 2
ATTRIB ANTS=1,2
ATTRIB INITRIES=1
ATTRIB IDTRIES=2
ATTRIB ANTTRIES=3
Send TAG RESET
STOP
How Timeouts & Tries Work: READ
8/10/2019 BRI Programming
73/136
Slide 73 COMPANY CONFIDENTIAL
How Timeouts & Tries Work: READREPORT=DIRECT
InitTries=1 IDTIMEOUT=1000
Antenna 1
Antenna 2
ATTRIB ANTS=1,2,3
ATTRIB INITRIES=1
ATTRIB IDTIMEOUT=1000
ATTRIB ANTTRIES=1
READ ON ANT 2
READ ON ANT 3
READ ON ANT 1
Antenna 3
Send TAG RESET
R d M d REPORT NO
8/10/2019 BRI Programming
74/136
Slide 74 COMPANY CONFIDENTIAL
Read Mode: REPORT=NO
Good for reading large number of tags.Good for seeing how many times a tag can be read.Must POLL for tag list.
READ POLLProvides best reading performance.You must STOP the read when you are finished.
READ STOPR STOPRD STOP
R d M d REPORT NO E l
8/10/2019 BRI Programming
75/136
Slide 75 COMPANY CONFIDENTIAL
Read Mode: REPORT=NO Examples
Standard ReadREAD ANT COUNT REPORT=NO Read with filter
Read where HEX(1:4,2)=H1111 REPORT=NORead with filter and fields
Read COUNT where HEX(1:4,2)=H1111 REPORT=NO
R d M d REPORT NO
8/10/2019 BRI Programming
76/136
Slide 76 COMPANY CONFIDENTIAL
Read Mode: REPORT=NO
READ POLLReturns tag list from reader.Clears tag list in reader
Must be sent BEFORE sending READ STOP.Can be sent as often as you want while the reader isreading.
H T i W k READ REPORT NO EVENT
8/10/2019 BRI Programming
77/136
Slide 77 COMPANY CONFIDENTIAL
How Tries Work: READ REPORT=NO,EVENT
InitTries=1 IDTries=2 AntTries=1
AntTries=2
AntTries=3
AntTries=1
AntTries=2
AntTries=3
IDTries=1 AntTries=1
AntTries=2
AntTries=3
AntTries=1
AntTries=2
AntTries=3
Antenna 1
Antenna 2
Antenna 1
Antenna 2
Antenna 1
Antenna 2
ATTRIB ANTS=1,2 ATTRIB INITRIES=1
ATTRIB IDTRIES=2
ATTRIB ANTTRIES=3
Send TAG RESET
8/10/2019 BRI Programming
78/136
R d M d REPORT EVENT
8/10/2019 BRI Programming
79/136
Slide 79 COMPANY CONFIDENTIAL
Read Mode: REPORT=EVENT
Good for reading large number of tags.Tags will be returned asynchronously as events:EVT:TAG H0102030405060708090A0B
Tags will be returned one time only when first seen.You must STOP the read when you are finished.Only on IF61 Release 2 will the performance equal
REPORT=NO
R d M d REPORT EVENT E l
8/10/2019 BRI Programming
80/136
Slide 80 COMPANY CONFIDENTIAL
Read Mode: REPORT=EVENT Examples
Standard ReadREAD ANT COUNT REPORT=EVENT Read with filter
Read where HEX(1:4,2)=H1111 REPORT=EVENTRead with filter and fields
R COUNT where HEX(1:4,2)=H1111 REPORT=EVEN
R d M d REPORT EVENTALL
8/10/2019 BRI Programming
81/136
Slide 81 COMPANY CONFIDENTIAL
Read Mode: REPORT=EVENTALL
Tags will be returned each time they are seen.Tags will be returned as asynchronous eventsEVT:TAG H0102030405060708090A0B
Good for testing purposes.Warning, you can get over whelmed by tags.
NOT good for reading large number of tags.
Read Mode: REPORT EVENTALL E amples
8/10/2019 BRI Programming
82/136
Slide 82 COMPANY CONFIDENTIAL
Read Mode: REPORT=EVENTALL Examples
Standard ReadREAD ANT COUNT REPORT=EVENTALL Read with filter
Read where HEX(1:4,2)=H1111 REPORT=EVENTALLRead with filter and fields
R COUNT where HEX(1:4,2)=H1111 REPORT=EVENTALL
Accessing Tag Memory
8/10/2019 BRI Programming
83/136
Slide 83 COMPANY CONFIDENTIAL
Accessing Tag Memory
What if you want to read/write memory other than thEPC code?Field Types
TAGIDHEXString (STR)
BitInteger (INT)
Accessing Tag Memory
8/10/2019 BRI Programming
84/136
Slide 84 COMPANY CONFIDENTIAL
Accessing Tag Memory
TAGID refers to memory bank 2Typically read only (locked by manufacturer).Can be 4 bytes or 8 bytes long
READ TAGIDH0102030405060708090A0B H01020304H0102030405060708090A0B H0102030405060708
Accessing Tag Memory
8/10/2019 BRI Programming
85/136
Slide 85 COMPANY CONFIDENTIAL
Accessing Tag Memory
HEX(Memory Bank:Start Address,Length)
READ HEX(3:0,7)
H0102030405060708090A0B H01020304050607READ HEX(3:0,7) HEX(2:0,2)
H0102030405060708090A0B H01020304050607 H010
READ HEX(3:0,7) HEX(2:0,2) ANTH0102030405060708090A0B H01020304050607 H0102
Accessing Tag Memory
8/10/2019 BRI Programming
86/136
Slide 86 COMPANY CONFIDENTIAL
Accessing Tag Memory
String(Memory Bank,Start Address,Length)
READ STR(3:0,10)
H0102030405060708090A0B HELLOWORLDREAD STR (3:0,5) STR(3:5,5)
H0102030405060708090A0B HELLO WORLD
READ STR (3:0,10) HEX(2:0,2) ANTH0102030405060708090A0B HELLOWORLD H0102
Accessing Tag Memory
8/10/2019 BRI Programming
87/136
Slide 87 COMPANY CONFIDENTIAL
Accessing Tag Memory
Bit(Memory Bank,Start Bit,Length in Bits)Can only be used in a WHERE clause.Cannot be used for reading or writing data.
r where bit(1:127,1)=B0
Accessing Tag Memory
8/10/2019 BRI Programming
88/136
Slide 88 COMPANY CONFIDENTIAL
Accessing Tag Memory
Read all tagsr
H11223344486B1F95F8D40002H11223344486B1F95F8D40003H11223344486B1F95F8D40001H11223344486B1F95F8D40004
Read only odd EPC IDs
r where bit(1:127,1)=B1H11223344486B1F95F8D40003H11223344486B1F95F8D40001
Accessing Tag Memory
8/10/2019 BRI Programming
89/136
Slide 89 COMPANY CONFIDENTIAL
Accessing Tag Memory
Read only even EPC IDs r where bit(1:127,1)=B0
H11223344486B1F95F8D40002H11223344486B1F95F8D40004
Read only even EPC IDs r where bit(1:127,1)=B0
H11223344486B1F95F8D40002H11223344486B1F95F8D40004
Accessing Tag Memory
8/10/2019 BRI Programming
90/136
Slide 90 COMPANY CONFIDENTIAL
Accessing Tag Memory
Read only EPC IDs that end with the last two bitsset r where bit(1:126,2)=b11
H11223344486B1F95F8D40003
Read only EPC IDs that end in 4
r where bit(1:124,4)=b0100H11223344486B1F95F8D40004
Accessing Tag Memory
8/10/2019 BRI Programming
91/136
Slide 91 COMPANY CONFIDENTIAL
Accessing Tag Memory
Integer(Memory Bank,Start Address,Length)1 byte: 0 to 2552 byte: 0 to 65,535
3 byte: 0 to 16,777,2154 byte: 0 to 4,294,967,295
READ INT(1:6,1)H0102030405060708090A0B 5
8/10/2019 BRI Programming
92/136
Slide 92 COMPANY CONFIDENTIAL
Comments or Questions
8/10/2019 BRI Programming
93/136
Slide 93 COMPANY CONFIDENTIAL
Writing to Tags
8/10/2019 BRI Programming
94/136
Writing to Tags
8/10/2019 BRI Programming
95/136
Slide 95 COMPANY CONFIDENTIAL
Writing to Tags
Write command can return 6 possible messages. WROK
Write succeeded WRERR
Write failedERR
Invalid command format (typo?)NOTTAG
No tags were found
Writing to Tags
8/10/2019 BRI Programming
96/136
Slide 96 COMPANY CONFIDENTIAL
Writing to Tags
MEMOVRNThis error indicates the address used in the writecommand was not valid.
PVERRThis error indicates a missing or invalid password wasused.Memory is protected and a password must be used withthe write.
PWERRTag does not enough power to complete the write.
Writing to Tags
8/10/2019 BRI Programming
97/136
Slide 97 COMPANY CONFIDENTIAL
Writing to Tags
READH0102030405060708090A0B
WRITE EPCID=H112233445566778899AABBH0102030405060708090A0B WROKOK>
W HEX(1:12,2)=H0101 STR(3:0,4)=GOODINT(3:6,1)=7 H1234567890ABCDEF WROK WROKH1234567890ABAAAA WROK WRERRH1234567890ABBBBB PVERR PVERR
Writing to Tags
8/10/2019 BRI Programming
98/136
Slide 98 COMPANY CONFIDENTIAL
Writing to Tags
When programming EPCIDs make sure there is onlyone tag present or they will all be programmed withthe SAME EPCID.If necessary use a WHERE clause to singulate a tagfor reading or writing
W HEX(1:4,2)=H0102 WHERE HEX(1:10,2)=H0102
Reading and Writing Large Amounts of Data
8/10/2019 BRI Programming
99/136
Slide 99 COMPANY CONFIDENTIAL
Reading and Writing Large Amounts of Data
The larger the amount of data you want to read/writethe more likely it will fail (air protocol issues)Best to break the large field up into small fields
If one small field fails you only have to READ/WRITthat field, not ALL of the data.Much more efficient overall.
Reading and Writing Large Amounts of Data
8/10/2019 BRI Programming
100/136
Slide 100 COMPANY CONFIDENTIAL
Reading and Writing Large Amounts of Data
READ HEX(3:0,64)H0102030405060708090A0B RDERRIf this fails, you must reread all 64 bytes.
READ HEX(3:0,16) HEX(3:16,16) HEX(3:32,16) HEX(3:4H0102030405060708090A0B H RDERR H HOnly need to reread 16 bytes of data
8/10/2019 BRI Programming
101/136
Slide 101 COMPANY CONFIDENTIAL
Comments or Questions
8/10/2019 BRI Programming
102/136
Slide 102 COMPANY CONFIDENTIAL
GPIO and TRIGGERS(General Purpose Input Output)
General Purpose Input Output
8/10/2019 BRI Programming
103/136
Slide 103 COMPANY CONFIDENTIAL
General Purpose Input Output
GPI (General Purpose Inputs)There are 4 inputs Attach motion sensors
Use to start and stop reading/writingGPO (General Purpose Outputs)There are 4 outputs
Attach light bars, buzzersSend signal to start/stop conveyors
General Purpose Input Output
8/10/2019 BRI Programming
104/136
Slide 104 COMPANY CONFIDENTIAL
General Purpose Input Output
READGPIOReturns the current GPI states as a decimal valuerepresenting the GPI mask
READGPIO15OK>If you need to monitor the GPI states its better to use
trigger.
General Purpose Input Output
8/10/2019 BRI Programming
105/136
Slide 105 COMPANY CONFIDENTIAL
Ge e a u pose put Output
WRITEGPIO=Sets the GPO stateDefined as a decimal value representing the binary
maskWRITEGPIO=15WRITEGPIO=8
Used to turn on light bars, buzzers, etc.
Triggers
8/10/2019 BRI Programming
106/136
Slide 106 COMPANY CONFIDENTIAL
gg
Creates, displays, and deletes trigger events that arebased on the GPI states.You can create up to 10 triggers.
Used by the BRI to create asynchronous eventmessages.Can be used in conjunction with motion sensors to
START and STOP reading/writing processes.
Triggers
8/10/2019 BRI Programming
107/136
Slide 107 COMPANY CONFIDENTIAL
gg
SyntaxTRIGGER [RESET|DELETEALL| FILTER [ACTION MACRO_NAME]]
TRIGGER RESETDeletes/clears all triggers, trigger events.
TRIGGER DELETEALL
Deletes all triggers.Does not remove trigger events.
Triggers
8/10/2019 BRI Programming
108/136
Slide 108 COMPANY CONFIDENTIAL
gg
Is the name the user wants to identify the trigger by.Must be in quotes.
mytrig_On motion_OFF A B
8/10/2019 BRI Programming
109/136
Triggers
8/10/2019 BRI Programming
110/136
Slide 110 COMPANY CONFIDENTIAL
gg
GPIOEDGEIndicates edge type triggerTrigger mytriggergpioedge 1 1 filter 0Fires only once, when state is met.Use this type of trigger!Do not need to use TRIGGERREADY or TRIGGERWA
Triggers
8/10/2019 BRI Programming
111/136
Slide 111 COMPANY CONFIDENTIAL
gg
is ANDed with actual GPI state mask If that result equals the then the trigger fires.Integer value representing Binary masking of GPIs. GPI 1 = 1110 = decimal mask 14GPI 2 = 1101 = decimal mask 13GPI 3 = 1011 = decimal mask 11GPI 4 = 0111 = decimal mask 7
Triggers
8/10/2019 BRI Programming
112/136
Slide 112 COMPANY CONFIDENTIAL
gg
Warning based on wiring of GPIs and GPOs the binarymasks may be reversed. Also valid for IF61, IF5 and IF30GPI 1 = 0001 = decimal mask 1GPI 2 = 0010 = decimal mask 2GPI 3 = 0100 = decimal mask 4GPI 4 = 1000 = decimal mask 8
8/10/2019 BRI Programming
113/136
Macros
8/10/2019 BRI Programming
114/136
Slide 114 COMPANY CONFIDENTIAL
SET MyMacroName = R ANT COUNT Creates macro
SET
With no parameters will display all macros in memorySET MyMacroName=Deletes that macro
PRINT $Displays macro
Macros
8/10/2019 BRI Programming
115/136
Slide 115 COMPANY CONFIDENTIAL
SET MyMacroFilter=WHERE HEX(1:4,2)=H0102 $MyMacroName
Will execute that macro.
READ $MyMacroFilterWill execute a READ using the filter defined in the macREAD WHERE HEX(1:4,2)=H0102
Macros
8/10/2019 BRI Programming
116/136
Slide 116 COMPANY CONFIDENTIAL
WRITE hex(1:6,4)=h01020304 $MyMacroFilterWill execute a WRITE using the filter defined in the maWRITE hex(1:6,4)=h01020304 WHERE HEX(1:4,2)=H0102
Multi command macrosUse semi-colon to separate commandsSet mymacro=attrib ants=1;read;attrib ants=2,read
Triggers with ACTION Macros
8/10/2019 BRI Programming
117/136
Slide 117 COMPANY CONFIDENTIAL
Macros can be called from triggers using the ACTIOkeyword
Set mymacro=read ant count time Trigger mytriggergpioedge 1 1 filter 0ACTION mymacro
Whenever this trigger fires the macro mymacro will be executed.
8/10/2019 BRI Programming
118/136
EPCC1G2 Memory Map
8/10/2019 BRI Programming
119/136
Slide 119 COMPANY CONFIDENTIAL
Bank 0 Kill Password 4 Bytes Access Password 4 Bytes
Bank 1 Header info Bytes 0-3 EPC Code Bytes 4-15Bank 2
TID 4+ Bytes (not necessarily unique)
Bank 3 UID Optional ? Bytes
Command: KILLTAG
8/10/2019 BRI Programming
120/136
Slide 120 COMPANY CONFIDENTIAL
Permanently disables tagTag will not respond to any reader!
KILLTAG [TAGTYPE=] [WHERE ] [PASSWORD=]You must program KILL password and protect itbefore you can use the KILLTAG command
Kill password cannot be nulls (0x00)
Command: KILLTAG
8/10/2019 BRI Programming
121/136
Slide 121 COMPANY CONFIDENTIAL
W HEX(0;0,4)=H01020304PROTECT ON HEX(0:0,4) PASSWORD=H010203KILLTAG WHERE PASSWORD=H01020304
KILLTAG WHEREEPCID=H3003000000FF8600000D0569PASSWORD=H01020304
8/10/2019 BRI Programming
122/136
Command: ERASE
8/10/2019 BRI Programming
123/136
Slide 123 COMPANY CONFIDENTIAL
ERASE HEX(1:4,6)ERASEOKOK>ERASEERROK>PVERROK>PWERROK>
ACCESS Password
8/10/2019 BRI Programming
124/136
Slide 124 COMPANY CONFIDENTIAL
Access passwords control WRITE access to memorybanks.You must program a valid, non null access passwordbefore you can PROTECT or LOCK a tag. Access password is located at membank 0, bytes 4-8You must PROTECT the password before it becomesactive.
ACCESS Password
8/10/2019 BRI Programming
125/136
Slide 125 COMPANY CONFIDENTIAL
Reading Access passwordR HEX(0,4,4)
reads the access password if its not protectedReturns PVERR if protected
R HEX(0,4,4) password=h11111111reads the access password if it is protected
Set Access PasswordW HEX(0:4,4)=H11111111
Command: PROTECT ON
8/10/2019 BRI Programming
126/136
Slide 126 COMPANY CONFIDENTIAL
Locks entire memory bank so that it cannot bewritten to with out the proper password.When passwords are protected you cannot read orwrite them with out the password.
Cannot use keywords such asEPCID, TAGID
For example the following will NOT work
PROTECT ONEPCID PASSWORD=H11111111Returns ERR
Command: PROTECT ON
8/10/2019 BRI Programming
127/136
Slide 127 COMPANY CONFIDENTIAL
Two types of protectionReversiblePermanent
Protect Access PasswordYou must protect Access password before it becomesactive.PROTECT ON HEX(0:4,4) PASSWORD=H11111111
Command: PROTECT ON
8/10/2019 BRI Programming
128/136
Slide 128 COMPANY CONFIDENTIAL
Protect Memory Bank 1, EPCIDPROTECT ON HEX(1:4,2) PASSWORD=H11111111Now you can read EPC ID but not write to it.Entire memory bank is protected
Command: PROTECT OFF
8/10/2019 BRI Programming
129/136
Slide 129 COMPANY CONFIDENTIAL
Setting PROTECT OFFPROTECT OFF HEX(1:4,2) PASSWORD=H11111111Now you can write EPC ID.
Command: PROTECT Permanent
8/10/2019 BRI Programming
130/136
Slide 130 COMPANY CONFIDENTIAL
Is irreversible!Protecting ACCESS password
PROTECT ON PERMANENT HEX(0:4,4)PASSWORD=H11111111Password cannot be unprotected.
Command: PROTECT Permanent
8/10/2019 BRI Programming
131/136
Slide 131 COMPANY CONFIDENTIAL
You can also unlock a memory bank permanently sothat it can never be protectedPROTECT OFF PERMANENT HEX(0:4,4)PASSWORD=H11111111
Password cannot be protected.PROTECT OFF PERMANENT HEX(1:4,2)PASSWORD=H11111111
EPC bank cannot be protected.
Locking Tags
8/10/2019 BRI Programming
132/136
Slide 132 COMPANY CONFIDENTIAL
LOCK CommandValid for ISO 18000-6B tags.To lock or protect EPCglobal Gen 2 tags use PROTECTIrreversible LOCK STRING(18,5)=HELLO
Successful lockLCKOKLocking error
LCKERRData already locked
PVERR Always write data first, verify its correct, then LOCK. ATTRIB LOCKTRIES
8/10/2019 BRI Programming
133/136
Slide 133 COMPANY CONFIDENTIAL
Other Useful Commands
8/10/2019 BRI Programming
134/136
Other Useful Commands
8/10/2019 BRI Programming
135/136
Slide 135 COMPANY CONFIDENTIAL
RESETPerforms a warm boot of the reader module.
FACDFLTRestores factory default settings.
8/10/2019 BRI Programming
136/136
Comments or Questions