LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I control a ZPL label printer via USB

Hello,

 

I need to control a Zebra GX430t label printer via the USB interface, using ZPL II commands. While creating the ZPL II code is not a problem, I kind of get stuck on how to transfer the commands to the printer.

I can not use the Zebra GX430t as my standard printer, because it is used by another task.

I was searching for a way to connect trough NI-VISA, but cannot find the printer there as a resource.

Do I have to use the Windows SDK?

 

Can anyone please point me to the right direction?

 

Thanks,

Greg

 

 

Message 1 of 14
(10,737 Views)

Hi Greg,

 

Check out these two links.  They do a pretty good job describing how to use VISA drivers to control a USB device.

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019La2SAE&l=en-US

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x1qzCAA&l=en-US

 

-Jim B

-Jim B
Applications Engineer, National Instruments
CLD, CTD
0 Kudos
Message 2 of 14
(10,718 Views)

 

Hi Greg,

 

   I also encountered the same issue, could you show me the solution how you solved it.

 

  Thanks!

  Daniel

0 Kudos
Message 3 of 14
(10,216 Views)

Hello Daniel,

 

sorry for the late reply. The solution I found is quite easy:

 

1) Install the Windows driver for the ZPL printer

2) Make that printer to the Windows default printer

3) in CVI, use the "PrintTextBuffer(..)" command from User Interface Library

4) This way, you can send ZPL commands directly to the printer.

 

I hope this helps.

 

Best Regards,

Greg

 

0 Kudos
Message 4 of 14
(10,129 Views)

Hi Greg,

 

   Thanks for your replying.

 

   Have you ever try some commands in Labview?

 

BR

Daniel

0 Kudos
Message 5 of 14
(10,111 Views)

Hello Daniel,

 

I am not very familiar with LabView, but I assume there is a VI that does the equivalent to the PrintTextBuffer() function in CVI.

 

Best Regards.
Greg

 

 

0 Kudos
Message 6 of 14
(10,109 Views)

Hello Daniel,

 

Have you been able to connect your ZPL label printer to NI MAX using the instructions in this white paper? 

 

http://www.ni.com/white-paper/4478/en/

 

Once connected through NI MAX you can then programmatically interact with it through LabVIEW: If the ZPL label printer conforms to the USB Test and Measurement Class (USBTMC) then LabVIEW can communicate with it using the NI-VISA USB INSTR class. If the label printer does not conform to this standard, then it is considered a USB RAW device and likely operates using its own communication protocol. In this case you will have to contact the manufacturer to learn the details of the device's specific communication protocol. I hope this answers your question and helps you get started!

0 Kudos
Message 7 of 14
(10,088 Views)

Hi Earl C,

 

     Sorry for so lately reply.

     VISA usb driver for printer has been successfully installed based on this guide. NI MAX can detect this device. However, it's still very difficult to control printer because I haven't any experience for USB protocal.

     In fact, I have read carefully on the pinter programming guide, what I need to do is just send the file to printer, for example, following file "Printing.txt" send to printer, the label will automatically print out. But I don't know how to send it to printer by USB or Serial com.

 

<Printing.txt>

 

^XA

 

^PR1

 

^FO100,100

 

 

^GB70,70,70,,3^FS

 

^FO107,110^CF0,70,93

 

^FR^FDREVERSE^FS

 

^XZ

  attachment is programming guide,could you give me some more suggestion. Thanks!

0 Kudos
Message 8 of 14
(9,787 Views)

Hi Earl C,

 

     Sorry for so lately reply.

     VISA usb driver for printer has been successfully installed based on this guide. NI MAX can detect this device. However, it's still very difficult to control printer because I haven't any experience for USB protocal.

     In fact, I have read carefully on the pinter programming guide, what I need to do is just send the file to printer, for example, following file "Printing.txt" send to printer, the label will automatically print out. But I don't know how to send it to printer by USB or Serial com.

 

<Printing.txt>

 

^XA

 

^PR1

 

^FO100,100

 

 

^GB70,70,70,,3^FS

 

^FO107,110^CF0,70,93

 

^FR^FDREVERSE^FS

 

^XZ

  attachment is programming guide,could you give me some more suggestion. Thanks!

0 Kudos
Message 9 of 14
(9,784 Views)

 I have solved it by using serial 232 communcation. For USB control, I have successed install VISA driver , But I don't know how to send out the commands in the VISA interactive control, because there are many USB protocal related settings.

0 Kudos
Message 10 of 14
(9,596 Views)