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
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
3.4.25 Information .................................................................................................................................. 74
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.
1
Mobile Reader
Function Manual, 02/2009, J31069-D0198-U001-A1-0076
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.
2
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.
Mobile Reader
Function Manual, 02/2009, J31069-D0198-U001-A1-0076
9
RFID Reader Interface User's Guide
2.2 How Do I Use the Reader Interface?
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)
PSION TEKLOGIX Software Development
Kit (SDK)
Microsoft ActiveSync Enables communication between your
Enables creation of applications for Windows CE
devices
development PC and a handheld device
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.
PSION
Microsoft
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.
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
Mobile Reader
Function Manual, 02/2009, J31069-D0198-U001-A1-0076
11
RFID Reader Interface User's Guide
2.2 How Do I Use the Reader Interface?
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 'intellisense' 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.
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.
...
}
}
Mobile Reader
Function Manual, 02/2009, J31069-D0198-U001-A1-0076
13
RFID Reader Interface User's Guide
2.2 How Do I Use the Reader Interface?
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
…
}
}
}
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:
// 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));
}
}
...
Mobile Reader
Function Manual, 02/2009, J31069-D0198-U001-A1-0076
15
RFID Reader Interface User's Guide
2.2 How Do I Use the Reader Interface?
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
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();
}
WriteInformationLine("INFO: Initial
Compilation should be successful unless you forgot to add the reference to the interface
assembly and the corresponding directive using Siemens.Simatic.RfReader.
All of these are provided on the device’s flash memory within a compressed archive.
Mobile Reader
Function Manual, 02/2009, J31069-D0198-U001-A1-0076
17
RFID Reader Interface User's Guide
2.2 How Do I Use the Reader Interface?
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");
}
}
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));
}
Mobile Reader
Function Manual, 02/2009, J31069-D0198-U001-A1-0076
19
RFID Reader Interface User's Guide
2.2 How Do I Use the Reader Interface?
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));
}
Using the RFID Reader Interface is easy if you keep the few important points below in mind.
● Be sure to reference the Siemens.Simatic.RfReaderApi.dll assembly, use its namespace
and place the assembly beneath your application on the target device.
● Access the member RfReaderApi.Current whenever you want to use the RFID Reader
Interface.
● Remember that member functions which return data may also return null if no data are
found.
● Don't forget to check RfReaderApiExceptions that indicate malfunctions and errors.
● And please make sure you always place the following files beneath your application so
that it is able to run.
Siemens.Simatic.RfReaderApi.dll
Siemens.Simatic.RfReaderApi.dll.config
rfid_power_commutation.dll
PsionTeklogixRFID.dll
PsionTeklogicNet.dll
PtxSdkCommon.dll
With these simple guidelines and the description of the RFID Reader Interface's member
functions you should be able to implement your own business logic for a standalone RFID
client application without having to bother too much with the details of RFID processing.
See the sample code provided that shows the RFID Reader Interface functions in use.
If you are intending to use the barcode feature of the RF610M device within your standalone
applications, remember to consult the device vendor’s documentation about it. When
working integrated in a SIMATIC RF-MANAGER configured environment, barcode scanning
is a by-product gained automatically as you will see below.
Mobile Reader
Function Manual, 02/2009, J31069-D0198-U001-A1-0076
21
RFID Reader Interface User's Guide
2.3 Extending the Reach
2.3 Extending the Reach
2.3.1 Being Part of a Larger Family
The last chapter discussed using the handheld RFID reader interface in a standalone
scenario. However, even RFID reader are not always alone in this world but have to interact
– or want to interact – with other components in larger systems.
Being aware of this fact, the RFID reader interface now supports ( RF610M only) integrating
into SIMATIC RF-MANAGER configured environments. Please bear in mind that both the
communication and synchronization among devices and usage of configuration data relies
on a working RF-MANAGER infrastructure. More precisely we are talking of integrating into a
SIMATIC RF-MANAGER system only.
Consider an integration scenario as given in the figure below.
5)5
*DWH
Figure 2-7 Larger Infrastructures
5)0$1$*(55XQWLPH
5)5
*DWH
2IILFH
5)0
:/$1
:/$1(WKHUQHW
5)0
:DUHKRXVH
)ORRU
There are some stationary RF660R readers which are controlled by an RF-MANAGER
runtime. Let’s say, they check incoming and outgoing goods at warehouse gates. The whole
system is set up using a configuration created with RF-MANAGER.
Now, Jerry – the guy working at the warehouse – wants to check if all the goods having been
unloaded at the gate are still within the package now stored in aisle three of the warehouse.
So he takes his RF610M device with him, walks up to the package in aisle three and scans
the package again just for monitoring purposes.
Since Jerry realized there were some parts missing in the package, the supplier sent the
missing parts right away in a second delivery by a parcel service. This second parcel,
however, did not pass the gates but arrived directly at the office counter. There, Molly – the
soul of the office – used another RF610M device to scan the ID of the delivered goods.
Contrary to Jerry’s scanning, the data she acquired was not only used for monitoring but as
additional input to the system just as it would be a third gate.
However, Molly’s desk is crowded as always and thus her scanning detects not only the tags
of the new parcel but some others from nearby as well. She wants to forward only the new
product IDs and skip the remaining known IDs that where scanned accidentally.
The story above shows two new use cases for the RF610M. We will go through both of them
and discuss the implications to the usage of the RFID reader interface.
Mobile Reader
Function Manual, 02/2009, J31069-D0198-U001-A1-0076
23
Loading...
+ 53 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.