LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Communicating LabVIEW with a Zebra Printer

Solved!
Go to solution

Hi

 

I need help to print something using Zebra T402 printer. Anyone knows how to do it or if you guys have any useful links that I could refer to? If there are any drivers available, that would also help. I tried to search everywhere but still couldn't do it. Previously i was using IDAutomation Barcode Label Software to do the printing but I'm thinking of automating it using LabVIEW.

 

Thanks in advance!

0 Kudos
Message 1 of 6
(226 Views)

Google lists posts, including ones to this LabVIEW Forum, that seem to have worked for others.  You can also try the search engine on the first page of this LabVIEW Forum.

 

Bob Schor

 

 

0 Kudos
Message 2 of 6
(219 Views)
Solution
Accepted by topic author HarithJasri

This printer supports ZPL, a text-based protocol for zebra printers. The documentation is quite good, so I'd start with that.

 

You can send commands to just start a new label, add texts, barcodes, lines and more, and then print that label. You can also create a template, where your program only has to provide data for some placeholder fields. (For sure, there are tools for that.)

 

However, I wanted the label to be printed to be shown on screen. So I generate a LV picture, and send this to print it:

 

^XA

^FOx,yEncodedGraphic

^XZ

 

XA starts a new label, XZ prints the label. FO is the offset (in pixels) for the following object, which in my case is an ASCII encoded picture, generated by the code below. Even that is easy: Encode the picture row by row. Eight pixels form a byte, with MSB first. Therefore, you need to add some bits if the image width is not a multiple of 8.

 

 

Encode graphics.png

 

 

 

0 Kudos
Message 3 of 6
(177 Views)

Hi, Sebastian

 

Thanks for the reply. I'll try to do per your suggestion. Also, where cold I get the documentation? Is it in the Zebra website?

 

Also, Bob

 

Thanks for the suggestion. 

0 Kudos
Message 4 of 6
(134 Views)

@HarithJasri wrote:

Hi, Sebastian

 

Thanks for the reply. I'll try to do per your suggestion. Also, where cold I get the documentation? Is it in the Zebra website?


Yes you can find some information there, but i find this site to be quite helpful.

Labelary Online ZPL Viewer

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 5 of 6
(111 Views)

Holy moly! this is nice!

 

Thanks, Yamaeda!

0 Kudos
Message 6 of 6
(109 Views)