RFID Reader Interface User's Guide
2.2 How Do I Use the Reader Interface?
Mobile Readers
18
Function Manual, 12/2010, J31069-D0198-U001-A2-7618
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
{
// Request all tags that are currently within reach
tagIDs = RfReaderApi.Current.GetTagIDs();
}
catch (RfReaderApiException rfidException)
{
// 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));
}
// Display read tags ...
if (null != tagIDs && tagIDs.Length > 0)
{
for (int index = 0; index < tagIDs.Length; index++)
{
WriteInformationLine(" > tagID " + index.ToString() + ": " +
tagIDs[index]);
}
}
else
{
// or a message telling us there were no tags
WriteInformationLine(" > No tags in field");
}
}
As you can see, it is easy to read tag IDs.
Summary of Contents for SIMATIC RF610M
Page 2: ......
Page 8: ...Introduction Mobile Readers 8 Function Manual 12 2010 J31069 D0198 U001 A2 7618 ...
Page 79: ......