82
Rockwell Automation Publication 56RF-UM001A-EN-P - October 2011
Chapter 9
RSLogix 5000 Code Examples
Lock Block
The Lock Block command locks one block of user data, preventing future
writing.
Once the block is locked, the block cannot be unlocked
. The
transceiver automatically determines the block size of the RFID tag.
Set the following values in the output image table:
a. xx:O.Channel[0].Command = 40
b. xx:O.Channel[0].Address = the number of the block to lock
c. xx:O.Channel[0].BlockSize = 0
d. xx:O.Channel[0].Data[0] = 0
e. xx:O.Channel[0].Length = 0
f. xx:O.Channel[0].Reset = 0
g. xx:O.Channel[0].Timeout = 0
h. xx:O.Channel[0].UIDLow = UIDLow
i. xx:O.Channel[0].UIDHi = UIDHi
The UIDLow and UIDHi bytes must be specified to lock the block values. The
UUID can be found by performing the Inventory command.
Example Routine
In the example routine below, the initialization in Rung 1 sets the address, length,
the Data[0], UIDLow and UIDHi values used to lock the block and sets the
command value to 0. The BlockSize, Reset, and Timeout are set to 0 in the
output image table.
In the example routine, rung 1 initializes the output image table. The UUID is
stored in a controllers tags UIDLow and UIDHi. The block that is being locked
is block 26. This tag has a total of 27 blocks.