I Want To See Tags - 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.5

I Want To See Tags...

You are able to start and stop the RFID reader service and would now like to see tags.
Another look at the RfReaderApi interface reveals a member called GetTagIDs. Checking
the return value's type indicates that you will receive an array of strings containing the read
tag IDs.
You already know how to obtain an instance of an object providing the IRfReaderApi
interface. The code is shown below; The code for reading tag IDs:
private void menuItemReadIDs_Click(object sender, EventArgs e)
{
string[] tagIDs = null;
try
{
}
catch (RfReaderApiException rfidException)
{
}
// Display read tags ...
if (null != tagIDs && tagIDs.Length > 0)
{
for (int index = 0; index < tagIDs.Length; index++)
{
tagIDs[index]);
}
else
{
}
}
As you can see, it is easy to read tag IDs.
18
// Request all tags that are currently within reach
tagIDs = RfReaderApi.Current.GetTagIDs();
// Something went wrong while reading tags.
// More information is available by inspecting the
// RfReaderApiException's members ResultCode, Error,
// Cause and Description.
WriteInformationLine(string.Format("ERROR: {0} - {1}, cause:
{2}, desc: {3}\r\n",
rfidException.ResultCode, rfidException.Error,
rfidException.Cause, rfidException.Description));
WriteInformationLine(" > tagID " + index.ToString() + ": " +
}
// or a message telling us there were no tags
WriteInformationLine(" > No tags in field");
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