I'm All Ears - Siemens SIMATIC RF310M Function Manual

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

Advertisement

2.3.6

I'm all ears

Scanning the RFID reader interface members, the most promising one for our purpose is the
TagEventNotifications event. We add a handler to this event when starting the reader
private void menuReaderStartRfm_Click(object sender, EventArgs e)
{
RfNotificationHandler(rfmIntegration.NotificationHandler);
}
And we implement the handler after a quick look at the reference section on how to
interprete the delivered data. For a starter we look at the tag ID, the event type and the time
of occurrence.
public void NotificationHandler(object sender, RfNotificationArgs notificationArgs)
{
if (null != notificationArgs.TagEvents)
{
}
else
{
}
}
Let's give it a try and run the code, start the reader service and the trigger.
Did you see any tags within your test application?
No?
You might ask yourself 'Why not? I used the very same code as with alarms and there it
worked'. What is so different here?
The difference is that contrary to alarms, notifications about tag events are only delivered if a
client subscribes at the reader service. Since such a subscription might cause heavy data
traffic, this subscription is not done automatically- Only if a client requests the data it will be
delivered.
Mobile Readers
Function Manual, 12/2010, J31069-D0198-U001-A2-7618
...
RfReaderApi.Current.TagEventNotifications +=
new
...
foreach (RfTagEvent tagEvent in notificationArgs.TagEvents)
{
this.mainFormRef.WriteInformationLine("Tag Event: " +
tagEvent.EventTimeUTC);
this.mainFormRef.WriteInformationLine(" > ID : " +
tagEvent.TagID);
this.mainFormRef.WriteInformationLine(" > Type: " +
tagEvent.EventType);
}
this.mainFormRef.WriteInformationLine("Tag Event: No tags");
RFID Reader Interface User's Guide
2.3 Extending the Reach
31

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic rf610mSimatic rf680m

Table of Contents