在仅软件触发模式下使用Zebra DS457条形码扫描仪进行扫描

问题描述 投票:0回答:1

扫描条形码时,我需要扫描仪调用事件,以便我可以编程方式使用条形码。

扫描仪在演示模式下扫描正常,它调用我创建的条形码扫描事件。我是通过

做到的

1)注册事件

string inXML = "<inArgs>" +
                  "<cmdArgs>" +
                     "<arg-int>6</arg-int>" + //Number of events you want to subscribe to
                     "<arg-int>1,2,4,8,16,32</arg-int>" + //Comma separated event IDs        
                  "</cmdArgs>" +
               "</inArgs>";

cCoreScannerClass.ExecCommand(REGISTER_FOR_EVENTS, ref inXML, out outXML, out status);

2)然后,我订阅了活动

cCoreScannerClass.BarcodeEvent += new _ICoreScannerEvents_BarcodeEventEventHandler(bcEvent);

在演示模式以外的任何模式下,我都需要触发扫描仪:

string inXML = "<inArgs>" +
                 "<scannerID>" + scanner.ScannerID.ToString() + "</scannerID>" +
                "</inArgs>";
cCoreScannerClass.ExecCommand(trigger, ref inXML, out outXML, out status);

触发器按预期方式打开和关闭(我可以从视觉上看到)。扫描仪扫描条形码时会发出哔声,但不会调用任何事件。由于我将连续模式设置为false,因此当我扫描条形码时会释放触发器(这进一步证明了它正在扫描条形码但未调用事件)。

其他有用信息:

c# .net sdk barcode-scanner scanning
1个回答
0
投票

[在获得Zebra支持后,我后来发现,在新型号的DS-457(自DS457-XX20004ZZWW起)中不再支持“仅软件触发”触发模式,因为它“引起软件配置和安全性问题。 。“

[如果要通过API触发扫描仪,建议程序员使用“主机触发模式”。 API还可以将设备设置为“级别”触发模式,这将允许与主机触发模式相同的功能,但也将允许对扫描仪进行手动物理触发。

© www.soinside.com 2019 - 2024. All rights reserved.