Write afi, Example routine – Rockwell Automation 56RF RFID System User Manual User Manual

Page 96

Advertising
background image

96

Rockwell Automation Publication 56RF-UM001A-EN-P - October 2011

Chapter 9

RSLogix 5000 Code Examples

Write AFI

The Write AFI command writes one byte of information into the Application
Family Identifier (AFI).The AFI is used to group RFID tags by application. This
allows the transceiver to read and write only to those tags with the specified AFI
value.

Set the following values in the output image table:

1.

xx:O.Channel[0].Command = 41

2.

xx:O.Channel[0].Address = 0

3.

xx:O.Channel[0].BlockSize = 0

4.

xx:O.Channel[0].Data[0] = AFI value

5.

xx:O.Channel[0].Length = 1

6.

xx:O.Channel[0].Reset = 0

7.

xx:O.Channel[0].Timeout = 0

8.

xx:O.Channel[0].UIDLow = 0 (or UIDLow)

9.

xx:O.Channel[0].UIDHi = 0 (or UIDHi)

Unless a UUID is specified, this command will operate 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.

Example Routine

In the following example routine, the initialization sets the address, length data
and command. The BlockSize, Reset, Timeout, UIDLow, and UIDHi are set to
0 in the output image table.

Advertising