LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Ouch. 

 

So there is no way to use Zebra printers via USB without swapping the NI VISA and Windows drivers every time we want to use the Windows Zebra Designer tool.  I understand from thread that once you use the NI VISA drivers the Windows drivers will no longer work. 

 

There was an older post about using .NET SharedZebra? but there are no examples or details. 

 

Does anyone else have a way to do this?  The serial modules (hardware) that you can plug into a printer for serial access are not available for a few months. 

 

Thanks in advance for any help.  

 

 

 

 

 

0 Kudos
Message 161 of 163
(948 Views)

I have used the .net dll with success in LabVIEW. 

The benefit here is that you use the normal Zebra driver, no need for special drivers. 

It will write text directly to the printer. 

 

Link for a LabVIEW talk on using the dll: 
https://github.com/rkone/sharpzebra/issues/3

 

There is a released package her: 
https://www.nuget.org/packages/SharpZebra.rkone/

You can open it as a zip file. 

My basic setup: 

dkfire_0-1676544008213.png

 

Message 162 of 163
(920 Views)

Hello, 

 

I found another very simple way that works for me, no need for any special dll, VISA, .NET, etc. 

This sends the full zpl or txt file that contains your commands to the printer by printing from notepad.

Use System_Exec.vi and a command line argument to open notepad, your file, and print it to the generic text printer you created for your printer. Best of all it doesn't interfere with the windows driver so you are free to use ZebraDesigner or any other tool in parallel.  


STEPS: 

1. Create a new generic text printer following these directions. 

https://supportcommunity.zebra.com/s/article/Print-a-zpl-file-using-the-Generic-Text-Printer?languag...


2. Use the System_Exec.vi to send the following command: 

notepad /pt "c:\myfile.txt" "ZD421_text" 

 

Where pt means print to, myfile is the full path to your file that contains the zpl command and ZD421_txt is the name you gave to the generic text printer created in step 1. You must add the quotes. 

ZD421_print.JPG

Hope this helps someone out there. 

 

 

Message 163 of 163
(900 Views)