Siemens SIMATIC RF310M Function Manual page 14

Rfid systems mobile reader
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?
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)
{
}
14
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
...
}
}
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