Read byte command, Example results – Rockwell Automation 56RF RFID System User Manual User Manual
Page 85

Rockwell Automation Publication 56RF-UM001A-EN-P - October 2011
85
RSLogix 5000 Code Examples
Chapter 9
Example Results
When successful, the results shown in the input image table show ChError = 0
and the Command number =44.
If you try to lock the DSFID on an RFID tag already locked, the ChError will be
equal to 8.
Read Byte Command
The Read Byte command reads a user-specified number of bytes from a tag,
starting at a user-specified address. An Option Flag can be set to return the
UUID of the tag. The maximum number of bytes that can be read at a time is
160 bytes using option flag 0, and 152 bytes using option flag 1.
• Option Flag 0
– Returns the specified user data. Set
xx:O.Channel[0].Data[0] = 0.
• Option Flag 1
– Returns the UUID of the RFID tag and the specified
user data. Set xx:O.Channel[0].Data[0] = 1.
Set the following values in the output image table:
a. xx:O.Channel[0].Command = 4
b. xx:O.Channel[0].Address = starting address to read
c. xx:O.Channel[0].BlockSize = 0
d. xx:O.Channel[0].Data[0] = Option Flag
e. xx:O.Channel[0].Length = the number of bytes to read
f. xx:O.Channel[0].Reset = 0
g. xx:O.Channel[0].Timeout = 0
h. xx:O.Channel[0].UIDLow = 0
i. xx:O.Channel[0].UIDHi = 0
This command operates only on the first tag in the field.
Note that Data[1] must also be set to 0.