LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Buy a label printer

Solved!
Go to solution

. Have you programmed using the serial or ethernet port using labview. Thank you. 

0 Kudos
Message 31 of 37
(597 Views)
Solution
Accepted by topic author govindsankar

@govindsankar wrote:

. Have you programmed using the serial or ethernet port using labview. Thank you. 


Yes, we just send the ZPL to the IP-address. It should work the same over serial (which i did some 13 years ago if memory serves).

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 32 of 37
(594 Views)

From your latest posts to the forum, it seems someone is asking you to design/update a test system.  Don't hesitate to ask us for help!

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 33 of 37
(578 Views)

@billiko. Definitely thanks.

0 Kudos
Message 34 of 37
(528 Views)

@aputman wrote:

@govindsankar wrote:

label.txt is the text file with ZPL commands?


Yes.


No, the label text is EPL commands. ZPL is a completely different language. ZPL label formats will begin with a ^XA and end with a ^XZ. All ZPL commands start with either a ^ or a ~.

 

Communicating with printer via TCP or serial is trivial. You can use VISA for both. However, I prefer the native TCP VIs for network communications. I would recommend using TCP since it allows you to print without being directly connected to the printer.

 

That hardest part you will have is designing the label in ZPL. though you can use ZebraDesigner to do that. Once you get the hang of ZPL it is fairly straightforward. I rarely use ZebraDesigner so I don't recall how to save the format as a text file containing the ZPL.

 

When I create labels I do something very similar to aputman and create a basic template with tags that I use string functions to replace to fill in the specific data. Using ZPL you can also create a label template that is stored on the printer and then you simply send a label format that recalls that template and supplies the data for specified fields. This is a bit more effort since you need to make sure the template format is stored on the printer. I think it is easier to keep the template on the PC and complete it in the application and then send the complete format to the printer.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 35 of 37
(519 Views)

@Mark_Yedinak wrote:


No, the label text is EPL commands. ZPL is a completely different language.


The example I provided uses EPL but ZPL commands would also reside in the label.txt file (or whatever you chose to name the file).

 


@Mark_Yedinak wrote:

That hardest part you will have is designing the label in ZPL. though you can use ZebraDesigner to do that. Once you get the hang of ZPL it is fairly straightforward. I rarely use ZebraDesigner so I don't recall how to save the format as a text file containing the ZPL.


Once you have a label format designed in the software, you can go to Print and tell it to "Print to file".  This will output all of the necessary EPL/ZPL commands.  I don't remember if the default is to use EPL or ZPL and I don't remember how to tell it which language to output.  This is a good way to get started with the language but as Mark said, it's just as easy to write your own code once you get a feel for it. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 36 of 37
(513 Views)

Everyone has already given you great advice.  I just wanted to chime in with my process that I've been using.  I too wanted to use Marks drivers in 64 bit but couldn't, but the last post on that thread is the method I used.  I downloaded and installed Zebra Designer 3, then added my USB printer and made the label the way I wanted with dummy data for barcodes and serial numbers.  Then I went to File Print, and checked Print to File.  This generated the PRN file (I think the ZPL API).  Then I added the printer as a text mode using the instructions here.  And then I can print to it using notepad.  The difference now is that I can edit that PRN file at runtime to have the values I want before sending it to the printer.  This works over USB, in 32 and 64 bit, and allows me to make a template in their software first.  This works with our relatively ancient ZM400.

0 Kudos
Message 37 of 37
(489 Views)