I'm currently using the EMDK with an FX9500 and FX7500 to consume RFID events and publish the data to MQTT.
I'm capturing the event using the readnotifyhandler like so:
newZebraReader.Events.ReadNotify += new Events.ReadNotifyHandler(Events_ReadNotify);
Then in the method I have:
Symbol.RFID3.TagData tData = e.ReadEventData.TagData;
And I determine whether the event was visible or not visible:
if (tData.TagEvent == TAG_EVENT.TAG_NOT_VISIBLE)
//code if the tag was lost
else
//code if the tag was observed
This seems to work about 60-70% of the time. But I run into a lot of cases where tags are observed or lost and the event doesn't fire. Any help would be appreciated.
Also note that this is my trigger info:
TriggerInfo tI = new TriggerInfo();
if (newZebraReader.ReaderCapabilities.IsTagEventReportingSupported)
{
tI.EnableTagEventReport = true;
tI.TagReportTrigger = 1;
tI.StartTrigger.Type = START_TRIGGER_TYPE.START_TRIGGER_TYPE_IMMEDIATE;
tI.TagEventReportInfo.ReportNewTagEvent = TAG_EVENT_REPORT_TRIGGER.IMMEDIATE;
tI.TagEventReportInfo.ReportTagBackToVisibilityEvent = TAG_EVENT_REPORT_TRIGGER.IMMEDIATE;
tI.TagEventReportInfo.ReportTagInvisibleEvent = TAG_EVENT_REPORT_TRIGGER.IMMEDIATE;
}
return tI;
Thanks,
Lou
FX9500 EMDK Capturing TAG_NOT_VISIBLE status |
2 Replies
Upon further testing it seems that the issue is random. Regardless of the mixture of serial numbers not all events were picked up.
I haven't found a resolution to this issue, but I have a workaround:
Originally I was polling tags using PerformInventory and attaching events per the code above.
In the new code I use PerformSequence instead:
TagAccess.Sequence.Operation op1 = new TagAccess.Sequence.Operation();
op1.AccessOperationCode = ACCESS_OPERATION_CODE.ACCESS_OPERATION_READ;
op1.ReadAccessParams.MemoryBank = MEMORY_BANK.MEMORY_BANK_USER;
op1.ReadAccessParams.ByteCount = 0;
op1.ReadAccessParams.ByteOffset = 0;
op1.ReadAccessParams.AccessPassword = 0;
newZebraReader.Actions.TagAccess.OperationSequence.Add(op1);
newZebraReader.Actions.TagAccess.OperationSequence.PerformSequence(null, null, null);
This will generate continuous read events for all tags. Note that TriggerInfo is null - if that's set up then I run into the same issue I had before. Unfortunately the event generated has no info attached, so I don't have simple visible or not visible events like I'd like to have. I have to check for a tag not being visible by attaching a lost timer to it that will fire if it's not stopped by an event. Not ideal but it works for now.
Update... did some more debugging. The reader is generated events ok. The issue seems to be something else.
I have 3 tags, each with the following serial #s in memory:
TEST12
TEST34
T_CFCPX
If I put TEST12 & T_CFCPX on the reader together both events are generated. Then when I place TEST34 on the reader the event isn’t generated. Likewise when I place TEST34 & T_CFCPX both events are generated. When TEST12 goes on there it’s not.
If I place TEST12, then TEST34 on the reader only TEST12 is generated. If I take TEST12 off nothing happens. When I take TEST34 off, then the event for TEST12 lost is generated even though I just removed TEST34.
Now if I read the tag ID, the full ID is there. But it seems clear that the EMDK seems to think TEST12 and TEST34 are the same tag. I’m really hoping this is a reader configuration issue and not a bug in the EMDK. Any thoughts?
Here is the tag DB with all 3 tags on there. Only tag events for T_CFCPX and TEST34 were generated by the EMDK, even though the reader sees all 3
Tag ID
Protocol
Antenna
Repeat Counts
First Read Time
Last Read Time
0x1C00544553543334EC30
ISOC
1
24684
2016-10-25 09:17:43.234
2016-10-25 09:26:29.060
TEST34
0x30003065CFF13F10000000000001B46D
ISOC
1
15269
2016-10-25 09:17:43.248
2016-10-25 09:26:29.059
0x1C00544553543132EA94
ISOC
1
9120
2016-10-25 09:17:43.237
2016-10-25 09:26:29.060
TEST12
0x3000300833B2DDD901400000000039BB
ISOC
1
318
2016-10-25 09:17:46.284
2016-10-25 09:24:39.724
0x3000545F434643505800000000001FD2
ISOC
1
22730
2016-10-25 09:18:54.880
2016-10-25 09:26:29.060
T_CFCPX