Siemens SIMATIC RF310M Function Manual page 32

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

Advertisement

RFID Reader Interface User's Guide
2.3 Extending the Reach
OK, we know for sure, we need the data, so we add a subscribe menu item and as we are
add it an unsubscribe item as well.
private void menuItemSubscribeMonitor_Click(
{
// Subscribe is only valid if we run in RF-MANAGER mode
if (this.fRfmIntegrated)
{
}
}
private void menuItemUnsubscribeMonitor_Click(
object sender, EventArgs e)
{
...
if(this.SubscriptionActive)
{
// Subscribe for all possible data sources
RfReaderApi.Current.UnsubscribeForNotifications(
this.fSubscriptionActive = false;
}
...
}
As you can see by looking at the code snippets above, there is an SubscribeForNotifications
member within the RFID reader interface.
It needs two parameter, the first one specifying the data source and the second whether we
only want to monitor or to filter the tag event data. As we are still on the way to let Jerry
monitor the tags, the second paramter is set to false.
For the first parameter we would have to know which data sources are configured within a
project. Luckily, configurations for a RFxxxM do not allow too much variation on the data
sources. They normally include an RFID and/or a barcode source only. Moreover, these data
sources have fixed names which are provided via constants within the RFID reader interface.
The following table lists possible values.
RfReaderApi.NC_RFID
RfReaderApi.NC_BARCODE
RfReaderApi.NC_ALL
32
object sender, EventArgs e)
// It does not make sense to subscribe twice
if (!this.fSubscriptionActive)
{
try
{
// Subscribe for all possible data sources
bool fResult = RfReaderApi.Current.SubscribeForNotifications
if (fResult)
this.fSubscriptionActive = true;
}
catch(RfReaderApiException rfidException)
...
}
RfReaderApi.NC_ALL);
(RfReaderApi.NC_ALL, false);
This is the data source name if you want to target the RFID
component
This is the data source name if you want to target the barcode
component
This is a generic name that subscribes for all configured data
sources within a project.
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