LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Zebra printer - Printing from LabVIEW using ZPL commands....

I am using LabVIEW 2013. I created the drivers for the Zebra LP 2824 Plus using the NI-VISA driver wizard. Everything worked fine. Then I created an executable and an installer, included the inf files, but the system won't recognize the barcode printer. I don't believe there are any posts on this link related to this issue with the printer, but I will keep looking. Thanks for any suggestions you can offer.

0 Kudos
Message 81 of 165
(6,034 Views)

Hi, Linda22,

 

If you go through the previous pages of this post, you will see the discussions of exactly what you asked here.

 

The labview driver will change the printer status from being a printer to a USB device, which means it disappears from the Windows printer list.

 

So you have to make a choice: print from labview or Windows system. Mark was saying that Zebra had a USB driver for all Zebra printers which does not use VISA, but it has not been released yet. And no timetable when to release.

0 Kudos
Message 82 of 165
(5,999 Views)

@MengHuiHanTang wrote:

Hi, Linda22,

 

If you go through the previous pages of this post, you will see the discussions of exactly what you asked here.

 

The labview driver will change the printer status from being a printer to a USB device, which means it disappears from the Windows printer list.

 

So you have to make a choice: print from labview or Windows system. Mark was saying that Zebra had a USB driver for all Zebra printers which does not use VISA, but it has not been released yet. And no timetable when to release.


This is true. I will need to contact our legal team again to see if I can get the EULA required so I can release the driver.



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 83 of 165
(5,962 Views)

Hello Mark,

 

Is the USB driver already released? The problem which I face now is, I cannot print label from Zebra Designer software after installing INF files.

 

Thanks

0 Kudos
Message 84 of 165
(5,904 Views)

Hi Dhibana,

 

I have done a little research and did not found any release of the driver yet, regarding your problem of not being able to print after installing the INF files please verify if you have followed the steps as in the link below.

 

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

 

Regards,

Regards,

Sil.VI
0 Kudos
Message 85 of 165
(5,881 Views)
Hello Jimenez,

Thanks for your efforts. I need to clarify a thing. I am able to print labels from LabVIEW after following those steps. But now, I can't use Zebra Designer software to print since the driver got updated. To make the Designer software to work, I need to manually update the driver in device manager. I don't want this manual intervention to happen.I should be able to print labels both from LabVIEW and Designer software. Could you suggest any ideas?

Thanks,
Dhibana
0 Kudos
Message 86 of 165
(5,873 Views)

Could you clarify what you mean when you say, "I need to manually update the driver in device manager?" Do you have to update the device driver every time you print using the Zebra software? 

 

Can you explain what this printing process now looks like? 

 

Thanks. 

 

Will M.
Applications Engineer
National Instruments
0 Kudos
Message 87 of 165
(5,847 Views)
Hello Bigmack,

After creating and installing inf files through NI Driver Wizard, the printer's driver gets updated. So if I have to use Zebra Designer software, I have to goto device manager, right click my printer which is under NI VISA USB devices and then choose update driver and finally select appropriate driver. Only then I can print using the Zebra Designer software.

Thanks
0 Kudos
Message 88 of 165
(5,836 Views)

I tried wading through all 9 pages of this thread and it was a nightmare, so for anyone who finds it in the future, I am reposting the step-by-step process that worked for me, including creating the label and the drivers. 

 

First, I created a .prn file by using Zebra Designer (free), setting up the correct label dimensions, and printing to file.

 

zebra designer.PNG

 

zebra print to file.PNG

 

This saves a text file with the commands you can send directly to the printer to generate the label. I used dummy text as a placeholder so I could figure out how to build the string later in LabVIEW. I don't know how this would work with barcodes, for my purpose I am only using text so I didn't bother experimenting with it. It might be fun, so maybe I'll try that next. I opened the .prn file in a text editor and copied the commands into a LabVIEW string constant (you can also read the text from the file, but I want to be able to dynamically change text values and number of lines, etc.)

 

To communicate with the printer, I went into the NI-VISA Driver Wizard, took note of the PID and VID

 

You'll get a warning about adding a device that isn't plugged in, click OK to continue. Add the Vendor ID and Product ID from the device, enter the manufacturer name and model name, and click Next. 

 

add device.PNG

 

You'll then choose a save location, and NI will generate the driver files. On the next screen, you will be given some options for installation. Since I was having no luck adding the drivers through Windows, I let NI install them for me.

 

let NI install drivers.PNG

 

Let it do its thing and when it finishes, open up MAX and you'll see your device listed under Devices and Interfaces. 

 

device in max.PNG

 

Then I ran a simple VISA Open-Write-Close with the string generated from my .prn file, and I got my label! The text you see in the snippet below will print a label that looks like the one from the first picture. Make sure you have a new line after the "P1" command at the end, otherwise it won't work. 

 

zebra print from lv.png

 

I didn't need to do anything with the printer spooling, and I didn't need to uninstall the official Zebra drivers. But be aware, once you install the NI drivers for the device, you won't be able to print from the Zebra utility anymore unless you reinstall the Windows drivers. Your mileage may vary. 

 

I hope this helps someone. The best part is I don't need to learn ZPL.

 

Link to thread where I originally posted this message

Message 89 of 165
(5,789 Views)

So, just to throw one solution into the mix for those who don't  want to change drivers etc, was to incorporate the .Net SharpZebra component available for free from https://sharpzebra.codeplex.com/

 

This library lets you use the Windows standard printer driver and either send raw ZPL commands and/or some higher level functions. This lets your LabVIEW application work alongside any other applications that may use the Zebra printer and allows you to use any type of port that the Zebra driver for your printer supports.

 

Unfortunately the wrapper VIs I once wrote were property of a previous company so I cant give you any examples right now, and you'll have to take my word when I say "it worked great!"

 

Shaun

 

PS. A quick look at the assembly suggests it was built using .Net 3.5, so the DLL may need to be recompiled for LabVIEW 2013+ (or whatever year LV switched over to .Net 4.0), the free version of VisualStudio Express or the built-in command line C# compiler CSC.

Message 90 of 165
(5,663 Views)