04-11-2023 03:07 AM - edited 04-11-2023 03:08 AM
@Yamaeda. Have you programmed using the serial or ethernet port using labview. Thank you.
04-11-2023 03:10 AM
@govindsankar wrote:
@Yamaeda. 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).
04-11-2023 10:41 AM
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!
04-13-2023 08:39 AM
@billiko. Definitely thanks.
04-13-2023 12:06 PM - edited 04-13-2023 12:20 PM
@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.
04-13-2023 12:45 PM
@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.
04-14-2023 12:41 PM - edited 04-14-2023 12:42 PM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord