简体   繁体   English

^HV 只返回一些值

[英]^HV Only returning some values

I'm trying to print some RFID tags and retrieve their TIDs to store them in my system and know which tags have been printed.我正在尝试打印一些 RFID 标签并检索它们的 TID 以将它们存储在我的系统中并知道哪些标签已被打印。 Right now I'm reading the TID and sending it back to my computer (connected via USB with the my ZT421 printer) with the following code:现在我正在读取 TID 并将其发送回我的计算机(通过 USB 与我的 ZT421 打印机连接),代码如下:

^RFR,H,0,12,2^FN0^FS^FH_^HV0,24,,_0D_0A,L^FS
^RFW,H,2,12,1^FD17171999ABABABAAAAAAAAAB^FS

This is repeated for each tag that I'm printing.对于我正在打印的每个标签重复此操作。 However, when printing 10 tags, I only get 9 TIDs.但是,当打印 10 个标签时,我只得到 9 个 TID。 If after that I try to print 7 tags, I still get 9 TIDs.如果在那之后我尝试打印 7 个标签,我仍然会得到 9 个 TID。 To be honest I'm a bit lost now, because even trying to use the code examples from the ZPL manual (I've tried the ^RI instruction also) it doesn't seem to work.老实说,我现在有点迷茫了,因为即使尝试使用 ZPL 手册中的代码示例(我也尝试过 ^RI 指令)它似乎也不起作用。

The communication with the printer is beeing done through Zebra Setup Utilities' direct communication tool.与打印机的通信正在通过 Zebra Setup Utilities 的直接通信工具完成。

I tried to retrieve each printed tag TID with:我试图通过以下方式检索每个打印的标签 TID:

^RFR,H,0,12,2^FN0^FS^FH_^HV0,24,,_0D_0A,L^FS
^RFW,H,2,12,1^FD17171999ABABABAAAAAAAAAB^FS

but I always get 9 TIDs.但我总是得到 9 个 TID。

I also tried getting the TID with the ZPL manual example for the ^RI command:我还尝试使用 ^RI 命令的 ZPL 手册示例获取 TID:

^XA
^FO20,120^A0N,60^FN0^FS
^RI0,,5^FS
^HV0,,Tag ID:^FS
^XZ

And I got absolutely nothing returned to the computer, just a mssage saying "Tag ID:" and no value shown.而且我绝对没有返回到计算机,只有一条消息说“标签 ID:”并且没有显示任何值。

I would really appreciate some help with this...我真的很感激这方面的帮助......

Thanks in advance!提前致谢!

I've fixed the issue, but I'm going to leave the solution here just in case someone else is facing the same problem.我已经解决了这个问题,但我会把解决方案留在这里,以防其他人遇到同样的问题。

I thought that maybe it wasn't a code issue, but something related to the computer-printer communication.我认为这可能不是代码问题,而是与计算机打印机通信有关的问题。 It turned out to be the case.原来是这样。 The Zebra Setup Utilities program has a button that says "options". Zebra Setup Utilities 程序有一个显示“选项”的按钮。 If you click it, a new screen will open and there you can configure the seconds that the program will wait for the printer response (in this case through USB).如果单击它,将打开一个新屏幕,您可以在其中配置程序等待打印机响应(在本例中为通过 USB)的秒数。 By default it's set to 5, i changed this value to 100, which is the maximum.默认情况下它设置为 5,我将此值更改为 100,这是最大值。 This meant that instead of just printing and retrieving the TIDs of 6-9 tags, now I can do it for about 100.这意味着我现在可以打印和检索 6-9 个标签的 TID,而不是仅仅打印和检索大约 100 个标签。

This is not amazing because in my case it implied creating 25 files for the 2500 tags I had to print and store the TIDs, however it's far better than before.这并不奇怪,因为在我的例子中,它意味着为我必须打印和存储 TID 的 2500 个标签创建 25 个文件,但它比以前好得多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2025 STACKOOM.COM