与Zebra RFID打印机通信| C#.NET [英] Communication with Zebra RFID Printer | C# .NET

查看:105
本文介绍了与Zebra RFID打印机通信| C#.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在开发使用Zebra RZ400 RFID打印机打印RFID标签的应用程序。到目前为止,我们是通过 RawPrinterHelper 类,它调用winspool.drv。

We are developing an application which prints RFID labels using Zebra RZ400 RFID printer. Until now, we were sending ZPL commands by RawPrinterHelper class which makes call to winspool.drv.

但是,我们很快意识到所有标签均已成功打印,因此我们寻求一种方式来获取有关上一次打印操作成功的反馈。有一个命令 ^ RV,据说该命令会在打印操作中返回一个反映操作成功结果的字符串。

However, we soon realized that not all tags are printed successfully so we looked for a way to get feedback about the success of the last print operation. There is a command "^RV" that is said to return a string upon a print operation that reflects operation success result.

现在,问题是我们不知道一种从打印机获取此反馈数据的方法! RawPrinterHelper类没有任何获取数据的方法。

Now, the problem is we don't know a way to get this feedback data from printer! RawPrinterHelper class does not have any method to get data.

我将打印机连接到USB,并使用LibUsbDotNet库与打印机进行通信。我可以成功地向打印机发送命令,包括 ^ RV命令,然后再次从USB读取以获取打印机的反馈。我可以得到反馈值,但不是每次都能获得,只是在随机打印很多标签后才获得一次。

I connected the printer to USB and used LibUsbDotNet library to communicate with the printer. I can send commands to printer successfully including "^RV" command and read from USB again to get the feedback from printer. I can get the feedback value but not every time, only once after randomly printing lots of tags.

Zebra是否有一个官方的SDK与打印机进行通信? USB通信有什么问题?请分享您有关Zebra .NET开发的经验。

Is there an offical SDK from Zebra to communicate with printers? What can be wrong about USB communication? Please share your experiences regarding Zebra .NET development.

推荐答案

有官方的 Java SDK ,它使用Windows与打印机进行双向通讯驱动程序(用于USB。直接用于Tcp)。还有一个 Windows来自Zebra的Mobile SDK 可能 可以为您服务。

There is an official Java SDK which does bi-di communications to the printer using the Windows driver (for USB. It does direct for Tcp). There is also a Windows Mobile SDK from Zebra which might work for you.

您可以尝试放入dll,然后查看 UsbPrinterConnection 类。 Lemme知道它是否对您有用

You can try dropping in the dlls, and then take a look at the UsbPrinterConnection class. Lemme know if it works for you

这篇关于与Zebra RFID打印机通信| C#.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆