Starting The Rfid Reader - Siemens SIMATIC RF310M Function Manual

Mobile readers
Hide thumbs Also See for SIMATIC RF310M:
Table of Contents

Advertisement

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 'intelli-
sense' on the types provided by the RFID Reader Interface.
Figure 2-4
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
● The StartReader function also offers other options that allow you to specify other instance
12
Adding a reference to the reader interface: Go to where you filed the interface assembly
which you retrieved from the handheld device.
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.
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.
Function Manual, 12/2010, J31069-D0198-U001-A2-7618
Mobile Readers

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic rf610mSimatic rf680m

Table of Contents