Not Without My Approval - Siemens SIMATIC RF310M Function Manual

Rfid systems mobile reader
Hide thumbs Also See for SIMATIC RF310M:
Table of Contents

Advertisement

RFID Reader Interface User's Guide
2.3 Extending the Reach
2.3.7

Not without my approval

Now back to the office where Molly still wants to add the missing parcel to the original
delivery. Using the device with an application such as that we created above doesn't really
help. While it would be possible to scan new IDs and to forward them to a connected RF-
MANAGER runtime there is no way of intercepting the data before it is delivered to the RF-
MANAGER.
Here is where the second parameter of the SubscribeForTagNotifications function of the
RFID reader interface comes to play. Whenever this parameter is set to true, scanned
information is delivered to the subscribed client (i.e. our application) but not yet to a
connected RF-MANAGER.
Forwarding of the data to the RF-MANAGER runtime will not occur until the RFID reader
interface member SetTagEvents is called with a list of tag events to be passed on.
Having the said facts about filtering in mind, subscribing and unsubscribing for our Molly
scenario is just a duplicate of what we already have whereas only the filtering parameter is
changed.
private void menuItemSubscribeFilter_Click(
{
...
...
}
In order to make it easier for us to test our code we introduce another new function that
allows us to simulate the pressing of a key where acquiring data only happens as long as the
key is pressed.
This is achieved by setting a corresponding trigger to ON, waiting for a second and setting
the trigger to OFF again. Here is the code for our new 'simulate key' function
private void menuItemSimulateKey_Click(
{
...
// Pretend we pressed the top key
RfReaderApi.Current.SetTrigger(RfTriggerType.ScanTop,
// Hold the key for a second
Thread.Sleep(1000);
// 'Release' the key again
RfReaderApi.Current.SetTrigger(RfTriggerType.ScanTop,
...
}
Starting our application, starting the reader, subscribing as mentioned above and using our
new trigger method will result in the scanned tag data to appear within our notification
handler.
34
object sender, EventArgs e)
// Subscribe for all data sources with filtering (!)
bool fResult = RfReaderApi.Current.SubscribeForNotifications(
RfReaderApi.NC_ALL, true);
object sender, EventArgs e)
RfTriggerState.On);
RfTriggerState.Off);
Function Manual, 02/2009, J31069-D0198-U001-A1-0076
Mobile Reader

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic rf610m

Table of Contents