Siemens SIMATIC RF310M Parts list manual

SIMATIC Sensors
Function Manual · 02/2009
Mobile Reader
RFID SYSTEMS
Valid for the following products:
SIMATIC RF310M
SIMATIC RF610M


Legal information
Warning notice system
This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent
damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert
symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are
graded according to the degree of danger.
DANGER
indicates that death or severe personal injury will result if proper precautions are not taken.
WARNING
indicates that death or severe personal injury may result if proper precautions are not taken.
CAUTION
with a safety alert symbol, indicates that minor personal injury can result if proper precautions are not taken.
CAUTION
without a safety alert symbol, indicates that property damage can result if proper precautions are not taken.
NOTICE
indicates that an unintended result or situation can occur if the corresponding information is not taken into
account.
If more than one degree of danger is present, the warning notice representing the highest degree of danger will
be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to
property damage.
Qualified Personnel
The device/system may only be set up and used in conjunction with this documentation. Commissioning and
operation of a device/system may only be performed by qualified personnel. Within the context of the safety notes
in this documentation qualified persons are defined as persons who are authorized to commission, ground and
label devices, systems and circuits in accordance with established safety practices and standards.
Proper use of Siemens products
Note the following:
WARNING
Siemens products may only be used for the applications described in the catalog and in the relevant technical
documentation. If products and components from other manufacturers are used, these must be recommended
or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and
maintenance are required to ensure that the products operate safely and without any problems. The permissible
ambient conditions must be adhered to. The information in the relevant documentation must be observed.
Trademarks
All names identified by ® are registered trademarks of the Siemens AG. The remaining trademarks in this
publication may be trademarks whose use by third parties for their own purposes could violate the rights of the
owner.
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software
described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the
information in this publication is reviewed regularly and any necessary corrections are included in subsequent
editions.
Siemens AG
Industry Sector
Postfach 48 48
90026 NÜRNBERG
GERMANY
J31069-D0198-U001-A1-0076
Ⓟ 02/2009
Copyright © Siemens AG 2007, 2009.
Technical data subject to change

Mobile Reader
Function Manual, 02/2009, J31069-D0198-U001-A1-0076 5
Table of contents
1 Introduction................................................................................................................................................ 7
2 RFID Reader Interface User's Guide ......................................................................................................... 9
2.1 RFID Reader Interface...................................................................................................................9
2.2 How Do I Use the Reader Interface?...........................................................................................10
2.2.1 Tools Needed...............................................................................................................................10
2.2.2 Creating the Application...............................................................................................................11
2.2.3 Starting the RFID reader..............................................................................................................12
2.2.4 Compile and Run .........................................................................................................................15
2.2.5 I Want To See Tags… .................................................................................................................18
2.2.6 Know More about the Tags … .....................................................................................................19
2.2.7 Change the Tags' Data ................................................................................................................20
2.2.8 Summary......................................................................................................................................21
2.3 Extending the Reach....................................................................................................................22
2.3.1 Being Part of a Larger Family ......................................................................................................22
2.3.2 Entering the system .....................................................................................................................24
2.3.3 Wake me up before you go… ......................................................................................................25
2.3.4 We are started: What to make out of it? ......................................................................................29
2.3.5 Jerry’s tag monitoring scenario revisited .....................................................................................30
2.3.6 I’m all ears....................................................................................................................................31
2.3.7 Not without my approval ..............................................................................................................34
2.3.8 Make it fun: Working keys............................................................................................................36
2.3.9 Summary......................................................................................................................................39
3 RFID Reader Interface Reference ........................................................................................................... 41
3.1 The Interface................................................................................................................................41
3.2 RfReaderApi.Current ...................................................................................................................42
3.3 RfReaderApiException.................................................................................................................42
3.4 IRfReaderApi................................................................................................................................43
3.4.1 Version.........................................................................................................................................43
3.4.2 StartReader..................................................................................................................................44
3.4.3 StopReader..................................................................................................................................45
3.4.4 ReaderStatus ...............................................................................................................................46
3.4.5 AirProtocol....................................................................................................................................47
3.4.6 SetAirProtocol ..............................................................................................................................47
3.4.7 SetTagID......................................................................................................................................49
3.4.8 GetTagIDs....................................................................................................................................50
3.4.9 GetTagMemory ............................................................................................................................51
3.4.10 SetTagMemory.............................................................................................................................53
3.4.11 .....................................................................................................................................................55
3.4.14 LockEPCGen2Tag .......................................................................................................................59
3.4.15 LockIsoTag...................................................................................................................................62
3.4.16 SetTrigger ....................................................................................................................................63
3.4.17 SubscribeForNotifications ............................................................................................................64
3.4.18 UnsubscribeForNotifications........................................................................................................65

Table of contents
Mobile Reader
6 Function Manual, 02/2009, J31069-D0198-U001-A1-0076
3.4.19 SetTagEvents.............................................................................................................................. 66
3.4.20 SubscribeForAlarms.................................................................................................................... 67
3.4.21 UnsubscribeForAlarms................................................................................................................ 68
3.4.22 GetConfigParameter ................................................................................................................... 69
3.4.23 TagEventNotification ................................................................................................................... 71
3.4.24 Alarms ......................................................................................................................................... 73
3.4.25 Information .................................................................................................................................. 74
3.5 References.................................................................................................................................. 75

Mobile Reader
Function Manual, 02/2009, J31069-D0198-U001-A1-0076 7
Introduction 1
This document describes the RFID Reader Interface for the SIMATIC handheld systems
RF610M and RF310M and how this interface can be utilized.
The document consists of two parts. The first part gives you an overview of how the RFID
Reader Interface can be used and the second part contains a detailed reference description
of the RFID Reader Interface.
While this document describes the usage of the RFID module within the handheld device it
neither includes nor describes how other features of the device such as barcode detection,
WLAN or updates of the operating system itself are used. You have to directly contact the
device vendor PSION in order to get software and support for these features.
With the version V1.1 of the RF610M device and the RFID Reader Interface some of the
topics above will be covered. You get an overview regarding topics such as WLAN and
barcode by consulting the RF610M device manual. Detailed developer information, however,
is still to be retrieved from the device vendor PSION directly.
This new version of RF610M will also be integrated in the SIMATIC RF-MANAGER 2008
product which allows you to configure RF610M devices to work in integrated scenarios. As
far as these scenarios deal with issues such as barcode handling, these issues will be
covered in this document either at least from a functional perspective.
This document will use the short form RF-MANAGER as an abbreviation for convenience
when speaking of SIMATIC RF-MANAGER 2008.

Introduction
Mobile Reader
8 Function Manual, 02/2009, J31069-D0198-U001-A1-0076

Mobile Reader
Function Manual, 02/2009, J31069-D0198-U001-A1-0076 9
RFID Reader Interface User's Guide 2
2.1 RFID Reader Interface
Simatic Handheld devices enable end users to acquire tag data from any place without the
limitations of a cable-bound system. It provides the hardware as well as a software
application to use the features of the mobile reader.
Figure 2-1 Software system structure on a SIMATIC Handheld device.
The Figure above shows the main components of a SIMATIC Handheld device. Obviously, a
piece of hardware is necessary – the RFID Reader Module – to acquire RFID information.
The capabilities of this hardware are accessed by a driver that is also used by the reader
service which is the software component that controls all RFID features.
The Simatic Handheld application utilizes the reader service's features and provides
customers with a user interface that can trigger all RFID features made available by the
reader service (IRfReaderApi). However, the application has no information on the special
requirements or the business processes of end customers.
Since a single application can almost never meet every need of every customer, another
approach is used. Instead of inflating the application with a large number of possible options
while still missing others, only the basic features are supported.
To facilitate the end user's needs, these basic functions are provided by an interface that
allows custom applications to fully exploit all RFID features with programming and to add the
customer's own workflows and relationships to suit his needs.
It would have been possible to directly access the reader service component via an interface
that extends the EPC standards. However, these standards are complicated and use many
internal concepts and entities. You do neither need nor probably want to know these details
if your only objective is to simply access and write data to RFID tags. That is why all this
complexity is hidden behind a simple interface - the RFID Reader Interface.
The following sections will explain how to use this interface in your work. Detailed
information about all the functions provided by this interface is given in the next chapter.

RFID Reader Interface User's Guide
2.2 How Do I Use the Reader Interface?
Mobile Reader
10 Function Manual, 02/2009, J31069-D0198-U001-A1-0076
2.2 How Do I Use the Reader Interface?
So far, so good. We have learned that there is an easy way to access the RFID features of a
handheld device. But how do we do this?
2.2.1 Tools Needed
First, we will create a small sample application that only reads tags.
What tools will you need?
The interface is a .Net CompactFramework 2.0 SP2 assembly. Logically this requires a
derivate of the Microsoft Visual Studio 2005 as its starting point. Remember that the Express
versions will not be sufficient because they do not allow the installation of additional device
packages. You will need at least the Standard or Professional version of Visual Studio 2005.
Next comes the installation of the software development kit (SDK) from PSION Teklogix.
This software kit is available from developer resources on the PSION TEKLOGIX website
(www.psionteklogix.com) after registration.
These are all the development tools you need to get started. Although you can now create
applications targeting a handheld device such as the RF610M, you will also need to transfer
the developed software to the handheld device. This means that Microsoft ActiveSync must
also be installed.
Moreover, in order to utilize the RFID features you will also need to reference the RFID
Reader Interface assembly within your applications. This assembly is available on your
handheld device. You can retrieve the file Siemens.Simatic.RfReaderApi.dll via
ActiveSync from the handheld device (\Flash Disk\SIMATIC
xxx\Support\RFID_AP\RFID_API.ZIP) and store it to reference the assembly.
You should now be able to create, deploy and run your custom applications.
The table below summarizes the required components.
Tool / Component Description Vendor
Microsoft Visual Studio 2005
(at least Standard edition)
(at least CompactFramework 2.0 SP2)
The basic development environment Microsoft
PSION TEKLOGIX Software Development
Kit (SDK)
Enables creation of applications for Windows CE
devices
PSION
Microsoft ActiveSync Enables communication between your
development PC and a handheld device
Microsoft
Siemens.Simatic.RfReaderApi.dll
rfid_power_commutation.dll
PsionTeklogixRFID.dll
PsionTeklogicNet.dll
PtxSdkCommon.dll
Siemens.Simatic.RfReaderApi.dll.config
The RFID Reader Interface assembly
Even if this assembly is enough to compile, don’t
forget to provide rfid_power_commutation.dll,
PsionTeklogixRFID.dll, PsionTeklogicNet.dll
PtxSdkCommon.dll and
Siemens.Simatic.RfReaderApi.dll.config for
executing your own application.
All of these components
are provided on the
device’s flash memory
within a compressed
archive.
Moreover, the sample code of the small demo application developed within the following
chapters is also available on the device’s flash disk.

RFID Reader Interface User's Guide
2.2 How Do I Use the Reader Interface?
Mobile Reader
Function Manual, 02/2009, J31069-D0198-U001-A1-0076 11
2.2.2 Creating the Application
To start a new application for a handheld device, create a new project of type 'Visual
C#\Smart Device\Windows CE 5.0\DeviceApplication' since handheld devices currently run
under Windows CE 5.0.
Figure 2-2 Type of application to create for a handheld device
You will need menu items to start and stop the reader and to trigger a read command.
Moreover, you will provide a textbox to display the results. This gives you a simple GUI as
shown in the following figure.
Figure 2-3 Our simple test application

RFID Reader Interface User's Guide
2.2 How Do I Use the Reader Interface?
Mobile Reader
12 Function Manual, 02/2009, J31069-D0198-U001-A1-0076
2.2.3 Starting the RFID reader
So far this application has nothing unusual about it. It is not yet connected to RFID. This is
done by coding the event handler for the menu items. The code is provided below. It will be
discussed in detail.
To simplify development, first add a reference to the RFID Reader Interface assembly and a
directive for the namespace Siemens.Simatic.RfReader which enables you to use 'intelli-
sense' on the types provided by the RFID Reader Interface.
Figure 2-4 Adding a reference to the reader interface: Go to where you filed the interface assembly
which you retrieved from the handheld device.
Your first job is to start the reader service (see the RFID management component reader
service in RFID Reader Interface (Page 9) )
The interface IRfReaderApi provides a method StartReader to accomplish that. Using the
function, however, poses two new questions:
● First, you will need a parameter to provide initialization data. This is done by creating an
object of type RfReaderInitData. The only parameters necessary is the reader type and
the reader mode, which we set to standalone for now. For all other members of
RfReaderInitData we accept the defaults.
● The StartReader function also offers other options that allow you to specify other instance
names or IP Addresses, but, for the time being, you can use the defaults.Now that you
know which function to call, the second task is – where do you obtain an object that
implements the IRfReaderApi interface.
A public static property called RfReaderApi.Current exists that always returns the current
instance of the object which implements the RFID Reader Interface.
What if you start again and no current instance is available? The Current property is
designed to return the current instance of the RFID Reader Interface if one exists or to
create a new one if none exists. If processing is correct, RfReaderApi.Current will always
return a valid instance be it a new one or an existing one. Null is only returned when
internal errors occur. Since this may cause exceptions, you must put a try catch frame
around your calls.

RFID Reader Interface User's Guide
2.2 How Do I Use the Reader Interface?
Mobile Reader
Function Manual, 02/2009, J31069-D0198-U001-A1-0076 13
Another look at our code shows that only four lines of code are needed to start up the reader
service. The code for starting the RFID Reader Interface:
private void menuReaderStart_Click(object sender, EventArgs e)
{
try
{
// We want to create and start an instance of the RFID
// reader interface for a handheld device with a default name.
RfReaderInitData initData = new RfReaderInitData();
// Initialize the appropriate reader type (RF610M, RF310M)
// and reader mode
initData.Type = „RF610M“;
initData.Mode = RfReaderInitData.ReaderMode.Standalone;
// With RfReaderApi.Current we address the current
// RFID reader interface instance
// or initiate the creation of a new instance.
// StartReader connects to an existing reader service
// or creates a new reader service.
RfReaderApi.Current.StartReader(initData);
}
catch (RfReaderApiException rfidException)
{
// Something went wrong while starting the reader.
// More information is available by inspecting the
// RfReaderApiException's members ResultCode, Error,
// Cause and Description.
...
}
}
Stopping a running reader only requires a single call that terminates the connection to the
underlying reader service and shuts it down; The code for stopping the RFID Reader
Interface:
private void menuReaderStop_Click(object sender, EventArgs e)
{
try
{
// Use the current reader interface instance and tell
// it to shut down.
RfReaderApi.Current.StopReader();
}
catch (RfReaderApiException rfidException)
{
// Something went wrong while stopping the reader.
// More information is available by inspecting the
// RfReaderApiException's members ResultCode, Error,
// Cause and Description.
...
}
}

RFID Reader Interface User's Guide
2.2 How Do I Use the Reader Interface?
Mobile Reader
14 Function Manual, 02/2009, J31069-D0198-U001-A1-0076
A last issue we have to consider is that the RFID reader service needs time to initialize his
internal states. The good news is that after initialization the reader service will use its Alarm
event mechanism to notify clients when it is ready to start work. In order to catch this
information, we have to implement an alarm handler.
The alarm handler function has to comply with the following prototype that defines the
special RfAlarmArgs parameters.
public void AlarmHandler(object sender, RfAlarmArgs alarmArgs)
Before starting the reader we add the alarm handler:
RfReaderApi.Current.Alarms += new RfAlarmHandler(this.AlarmHandler);
Once installed, our AlarmHandler function gives us a chance to notice a successful startup
or restart by catching the ‘Reconfiguration’ and ‘Initial’ alarms:
public void AlarmHandler(object sender, RfAlarmArgs alarmArgs)
{
if (alarmArgs.InfoItems != null)
{
// Configuration has finished
if (alarmArgs.InfoItems[0].Name == "Reconfiguration" &&
alarmArgs.InfoItems[0].Value == "Initial")
{
// This is the very first startup of the application
// Now we can access RFID reader
…
}
}
}

RFID Reader Interface User's Guide
2.2 How Do I Use the Reader Interface?
Mobile Reader
Function Manual, 02/2009, J31069-D0198-U001-A1-0076 15
2.2.4 Compile and Run
Even if tags cannot be read yet, you can create an application to prove that it can at least
start up and shut down. You can improve the visual appearance by indicating the status of
the functions which you called in the results window of your application; The code for starting
the RFID Reader Interface:
private void menuReaderStart_Click(object sender, EventArgs e)
{
try
{
// First, we add an event handler to catch alarm notifications
RfReaderApi.Current.Alarms +=
new RfAlarmHandler(rfmIntegration.AlarmHandler);
// We want to create and start an instance of the RFID
// reader interface for a handheld device with a default name.
RfReaderInitData initData = new RfReaderInitData();
// Initialize the appropriate reader type (RF610M, RF310M)
// and reader mode
initData.Type = „RF610M“;
initData.Mode = RfReaderInitData.ReaderMode.Standalone;
// With RfReaderApi.Current we address the current
// RFID reader interface instance
// or initiate the creation of a new instance.
// StartReader connects to an existing reader service
// or creates a new reader service.
RfReaderApi.Current.StartReader(initData);
WriteInformationLine("Reader started successfully");
}
catch (RfReaderApiException rfidException)
{
// Something went wrong while starting the reader.
// More information is available by inspecting the
// RfReaderApiException's members ResultCode, Error,
// Cause and Description.
WriteInformationLine(string.Format("ERROR: {0} - {1}, cause:
{2}, desc: {3}\r\n",
rfidException.ResultCode, rfidException.Error,
rfidException.Cause, rfidException.Description));
}
}
...

RFID Reader Interface User's Guide
2.2 How Do I Use the Reader Interface?
Mobile Reader
16 Function Manual, 02/2009, J31069-D0198-U001-A1-0076
public void AlarmHandler(object sender, RfAlarmArgs alarmArgs)
{
if (alarmArgs.InfoItems != null)
{
// Configuration has finished
if (alarmArgs.InfoItems[0].Name == "Reconfiguration" &&
alarmArgs.InfoItems[0].Value == "Initial")
{
// This is the very first startup of the application
// Now we can access RFID reader
WriteInformationLine("INFO: Initial
reconfiguration");
}
}
}
...
private void WriteInformationLine(string message)
{
WriteInformation(message + "\r\n");
}
private void WriteInformation(string message)
{
// Add the information to the existing text
this.textBoxInfo.Text = this. textBoxInfo.Text + message;
this. textBoxInfo.SelectionStart = this. textBoxInfo.Text.Length;
this. textBoxInfo.ScrollToCaret();
}
Compilation should be successful unless you forgot to add the reference to the interface
assembly and the corresponding directive using Siemens.Simatic.RfReader.

RFID Reader Interface User's Guide
2.2 How Do I Use the Reader Interface?
Mobile Reader
Function Manual, 02/2009, J31069-D0198-U001-A1-0076 17
When you deploy your application, there are two things to consider.
● When using Visual Studio to deploy your application, make sure you selected
"PtxPxa27x: ARMV4I_Release as a target device.
● Regardless of how you deploy your application, ensure that all needed system
components are located beneath your application.
This means you must provide the RFID Reader Interface assembly
Siemens.Simatic.RfReaderApi.dll and its configuration file
Siemens.Simatic.RfReaderApi.dll.config.
You also must provide the following Psion-specific files
rfid_power_commutation.dll
PsionTeklogixRFID.dll
PsionTeklogicNet.dll
PtxSdkCommon.dll
All of these are provided on the device’s flash memory within a compressed archive.

RFID Reader Interface User's Guide
2.2 How Do I Use the Reader Interface?
Mobile Reader
18 Function Manual, 02/2009, J31069-D0198-U001-A1-0076
2.2.5 I Want To See Tags…
You are able to start and stop the RFID reader service and would now like to see tags.
Another look at the RfReaderApi interface reveals a member called GetTagIDs. Checking
the return value’s type indicates that you will receive an array of strings containing the read
tag IDs.
You already know how to obtain an instance of an object providing the IRfReaderApi
interface. The code is shown below; The code for reading tag IDs:
private void menuItemReadIDs_Click(object sender, EventArgs e)
{
string[] tagIDs = null;
try
{
// Request all tags that are currently within reach
tagIDs = RfReaderApi.Current.GetTagIDs();
}
catch (RfReaderApiException rfidException)
{
// Something went wrong while reading tags.
// More information is available by inspecting the
// RfReaderApiException's members ResultCode, Error,
// Cause and Description.
WriteInformationLine(string.Format("ERROR: {0} - {1}, cause:
{2}, desc: {3}\r\n",
rfidException.ResultCode, rfidException.Error,
rfidException.Cause, rfidException.Description));
}
// Display read tags ...
if (null != tagIDs && tagIDs.Length > 0)
{
for (int index = 0; index < tagIDs.Length; index++)
{
WriteInformationLine(" > tagID " + index.ToString() + ": " +
tagIDs[index]);
}
}
else
{
// or a message telling us there were no tags
WriteInformationLine(" > No tags in field");
}
}
As you can see, it is easy to read tag IDs.

RFID Reader Interface User's Guide
2.2 How Do I Use the Reader Interface?
Mobile Reader
Function Manual, 02/2009, J31069-D0198-U001-A1-0076 19
2.2.6 Know More about the Tags …
You can learn more about tags in the same way that you can access additional data on tags
or write data to tags.
Some additional data must be specified. For our test scenario the most flexible way to
provide these data is to enter them with the user interface as shown below:
Figure 2-5 A dialog for entering the address of the additional tag data to be read
Once you have acquired the address of the data, accessing the data is easy. The code for
acquiring data is given in the Figure below.
Note how the specified data is returned as an array of bytes with the requested length. Be
sure to check for a null reference which is returned if no data could be read.
When you request additional data from EPC Gen2 tags, the tag to be addressed must
always be specified by giving its tag ID. Only if a EPC Gen2 tag with a matching ID is
detected will the operation succeed.
Reading additional tag data:
byte[] buffer = null;
try
{
// Code for invoking a dialog and retrieving the data entered
left out for brevity -> check sample code for details
...
// Request all tags that are currently within reach
buffer = RfReaderApi.Current.GetTagMemory(
currentTagID, memoryBank,
startAddress, dataLength,
accessPassword);
...
// Code to show the resulting buffer left out for brevity ->
check sample code for details
}
catch (RfReaderApiException rfidException)
{
// Something went wrong while reading additional data
WriteInformationLine(string.Format("ERROR: {0} - {1}, cause:
{2}, desc: {3}\r\n",
rfidException.ResultCode, rfidException.Error,
rfidException.Cause, rfidException.Description));
}

RFID Reader Interface User's Guide
2.2 How Do I Use the Reader Interface?
Mobile Reader
20 Function Manual, 02/2009, J31069-D0198-U001-A1-0076
2.2.7 Change the Tags' Data
When the data on a tag must be changed, the same restriction applies on EPC Gen2 tags as
with obtaining additional data. The EPC Gen2 tag that you want to change must be specified
by supplying its ID. Only if a matching tag is detected will the operation succeed.
How to write a new ID to an existing tag for a data-change function (for EPC GEN2 only):
The tag's current ID must be supplied together with the new ID and a password (if needed)
and an instance of an object must be used that implements the IRfReaderApi which is
always available via RfReaderApi.Current.
Figure 2-6 Write TagID
Below is the code for accomplishing this; writing a new tag ID to a tag:
try
{
// Code for invoking a dialog and retrieving the data entered
left out for brevity -> check sample code for details
...
// Request all tags that are currently within reach
RfReaderApi.Current.SetTagID(
currentTagID, newTagID,
accessPassword);
}
catch (RfReaderApiException rfidException)
{
// Something went wrong while writing data
AddInformation(string.Format("ERROR: {0} - {1}, cause: {2},
desc: {3}\r\n",
rfidException.ResultCode, rfidException.Error,
rfidException.Cause, rfidException.Description));
}
Other manuals for SIMATIC RF310M
3
This manual suits for next models
1
Table of contents
Other Siemens Scanner manuals