ability to suspend and activate Scan Engine on the fly

I have an existing program for the Skorpio X4 written in VB.NET 2008. WEC7. I need to suspend the scan engine while collecting data in a form, and then re-activate the scan engine when the form is closed.

Alternatively, if I could use an keyboard event and test for the SCAN button, I could handle the erroneous scan using that approach.

Thanks for any suggestions.
Marty

Hello @Marty_Roberson,

On Datalogic WEC7 devices, Datalogic Windows CE SDK (look under SDK -> Windows CESDK).
The The latest version of the SDK can be downloaded here. The APIs are documented in a Windows help file distributed with the .exe installer as well as online here.

The most convenient way for enabling/disabling the scan engine is by changing the device’s triggers behavior form “Barcode” to “None” in this way:

Example (C#)

  using Datalogic.API;

  //Disable Triggers    
  Device.SetTriggerType(Device.TriggerId.LeftSide, Device.TriggerInputType.None);
  Device.SetTriggerType(Device.TriggerId.RightSide, Device.TriggerInputType.None);
  Device.SetTriggerType(Device.TriggerId.Pistol, Device.TriggerInputType.None);
  Device.SetTriggerType(Device.TriggerId.Scan, Device.TriggerInputType.None);

   //Enable Triggers
   Device.SetTriggerType(Device.TriggerId.LeftSide, Device.TriggerInputType.Barcode);
   Device.SetTriggerType(Device.TriggerId.RightSide, Device.TriggerInputType.Barcode);
   Device.SetTriggerType(Device.TriggerId.Pistol, Device.TriggerInputType.Barcode);
   Device.SetTriggerType(Device.TriggerId.Scan, Device.TriggerInputType.Barcode); 

With the same Device.SetTriggerType() is also possible to change the Triggers behavior making them generate a keyboard event:

   //Triggers -> generate Keyboard Events
   Device.SetTriggerType(Device.TriggerId.LeftSide, Device.TriggerInputType.Keyboard);
   Device.SetTriggerType(Device.TriggerId.RightSide, Device.TriggerInputType.Keyboard);
   Device.SetTriggerType(Device.TriggerId.Pistol, Device.TriggerInputType.Keyboard);
   Device.SetTriggerType(Device.TriggerId.Scan, Device.TriggerInputType.Keyboard); 

In this way the scanner will not be automatically activate, but a keyboard event will be sent to the system and to the apps on each trigger pressure.

In case you need further detail, feel free to contact our local technical support team, by filling the module available here.

Simone Callegari
L3 - Mobile Products Specialist SW Engineer