Users Manual

Rockwell Automation Publication 56RF-UM001D-EN-P - November 2021 99
Chapter 9 RSLogix 5000 Code Examples
Write Single Block The Write Single Block command writes one block of user data to an RFIDtag.
Set the following values in the output image table:
a. xx:O.Channel[0].Command = 10
b. xx:O.Channel[0].Address = starting address to write
c. xx:O.Channel[0].BlockSize = 0, 4, or 8
d. xx:O.Channel[0].Data[0…112] = data to write
e. xx:O.Channel[0].Length = 0, 4, or 8
f. xx:O.Channel[0].BlockSize = 0, 4, or 8
g. xx:O.Channel[0].Reset = 0
h. xx:O.Channel[0].Timeout = 0
i. xx:O.Channel[0].UIDLow = 0 (or UIDLow)
j. xx:O.Channel[0].UIDHi = 0 (or UIDHi)
If UIDLow and UIDHi are set to 0, this command operates on the first tag in
the field. Specify a UUID in xx:O.Channel[0].UIDLow and
xx:O.Channel[0].UIDHi to perform the command on a specific tag.
The Length and Block Size fields are used to specify the number of bytes/block
of the tag. Valid values are:
0 = 4 bytes/block
4 = 4 bytes/block
8 = 8 bytes/block
Typically, ISO15693 tags have a block size of 4 bytes/block, and FRAM tags have
a block size of 8 bytes/block.
Example Routine
In the following example, 4 bytes of data is written to Block 3. The data is
loaded into the output channel image table. Block three is populated with
Data[0…3] = 41, 42, 43, and 44.

Summary of content (52 pages)