We are using MC9090-G RFID to port out an application from an ATID mobile reader. The attached screenshot have the option to enable the trigger for either RFID or Barcode function on just one VB.net page. Anybody have done this with our MC9090-G RFID? Anyone could share the source code on how to do it? We cannot use the MC3190-Z yet. Any help is well appreciated.
RFID and Barcode on one VB.net page// Expert user has replied. |
2 Replies
Thanks a lot Rui, this is very helpful. We cannot use MC3190-Z since it is not yet Type Approved in our country. MC9090-Z is only for US and EU countries and not for APAC.
Hi Amold Is there any special reason that you need to migrate your app from ATID mobile reader to Motorola MC9090-G handheld device, instead of migrating to MC3190-Z? Please note that Motorola already discontinued MC9090-G by replacing it with the new handheld devices (MC3190-Z, MC9090-Z), which are LLRP enabled, RFID3 API based, and provide better read/write performance.
Now back to your original question, you can use Symbol.ResourceCoordination assembly provided from EMDK for .NET SDK in your app to capture the HW trigger press/release events on MC9090-G device and take actions accordingly based on the current activated device type (Bardcode or RFID).
And the code snippet below shows how to capture trigger events by using Symbol.ResourceCoordination.dll
using Symbol.ResourceCoordination; ........................................... // create the trigger device and register the event generated when the trigger is pulled / released Symbol.ResourceCoordination.TriggerDevice triggerDevice = new Symbol.ResourceCoordination.TriggerDevice ( Symbol.ResourceCoordination.TriggerID.ALL_TRIGGERS, // applied on all avaiable triggers new ArrayList());
Symbol.ResourceCoordination.Trigger trigger = new Symbol.ResourceCoordination.Trigger (triggerDevice);
trigger.Stage1Notify += new Symbol.ResourceCoordination.Trigger.TriggerEventHandler (onTriggerEvent);
trigger.Stage2Notify += new Symbol.ResourceCoordination.Trigger.TriggerEventHandler (onTriggerEvent);
..............................
private void onTriggerEvent(object sender, Symbol.ResourceCoordination.TriggerEventArgs arg) { switch (arg.NewState) { case TriggerState.STAGE1: case TriggerState.STAGE2: // trigger is pressed if (RFID device is activated) call RFID2 API to read tags else // Barcode device is activated call Symbol.Barcode API to scan barcode break; case TriggerState.RELEASED: // trigger is released if (RFID device is activated) call RFID2 API to stop reading tags else // Barcode device is activated call Symbol.Barcode API to stop scanning barcode break; } }
.............
// shut down trigger
if (trigger != null)
{ trigger.Dispose (); trigger = null; } Thanks! Rui