Reading and Writing RFID with ifm efector Ethernet IP Gateway

inspectorwormsElectronics - Devices

Nov 27, 2013 (3 years and 8 months ago)

72 views

Reading and Writing RFID

with ifm efector Ethernet IP Gateway

AC1327 and AC1337


Quick Set
-
Up Guide

This do
cument provides an easy guide for reading and writing the
value of an RFID tag with the Ethernet IP Gateway AS
-
I Master.
The RFID tag is read like
any standard analog signal using the

AS
-
I Master.


For purposes of this example

we will just be setting up communication to
read
/write

31 RFID heads

on 1 master
.


Set Gateway

Configuration


1.

From the Controller
e

display, go to
Menu / Fieldbus Set up
.

You
will be at a screen
to view/change the
IP Address
. Press the
ESC

button once to enter the
Subnet
Mask

screen. Press the
ESC

again to enter the
Mac ID

screen. Press the
NEXT

button to begin entering the Module lengths.


2.

Enter the following byte values

Mo
dule 1
4

Analog Inputs Master 1

8


Module 19

Host Command Channel

1


*Note


The lengths of all unused modules has to be set to 0. Values in any module other


than these two will change the mapping in RSLogix.



Set Analog Channels


RFID values are transm
itted as analog values over AS
-
I. The gateway defaults at sending
4 channels per node. To optimize data exchange you need to change this value to 1
channel per node.


1.

Make a FTP connection into the IP address of the AC1327/37. A standard web
browser

will work by entering
ftp://ipaddress

(ie
ftp://172.21.107.144
)


2.

A list of files will appear. Copy the ifm.cfg file
to your computer and open it with an
application like Notepad.


3.

Cha
nge the Channels per analogue input M1
from 4 to 1.


4.

Save this file and copy it over the

existing file
on the browser by dragging into the window.
Cycle power on the Controller E to initialize.



Set Configuration in RS Logix5000


1. Open RS
Logix5000, e
nter either a new or existing

project and set the program to
offline mode
.


2.
Add a new module for the AS
-
i Ethernet IP controller
e

to the configuration in the

PLC. Do this by right clicking the Ethernet/IP device
1756
-
ENBT/A

in the I/O
configuration,
and select from the appearing context menu
“New Module...”
.


3.

In the new window select
“Generic

Ethernet module”

and press “
OK”.




4.

In the next window enter the following values. Custom val
ues for
Name

and
Description

will not disturb the configuration.



5.

The Assembly Instance values are static values. When we set the Analog Input
to 8,


that set 32 words of input data. This along with 5 words of data associated with the


Host Command Channel give us the 36 that is entered.

The 5 words a
re the output


length of the Host Command Channel.


















Reading Tag Values


Below is the Tag Data Map showing the RFID (analog) value. Since my RFI
D Reader is
addressed at node 1, the tag value will show in

word
0
.

(ie Node 23 will be a
t word 22)





Writing Tag Values


To write to a

RFID Tag a command must be entered into the Output Data Tag Field.

Enter the values from the example below. The red boxes indicate where your values will
change.


The 00 must first be entered. When this

value is changed (ie to a 1 or 9) the write

will be executed once.


The 01 is the node number of the Write Head (1
-
31).


The 100 is the tag value to be written, so you can enter any value from 0


32767.






For reference, below is the command structur
e