02-15-2023 10:58 AM
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.
02-16-2023 04:35 AM - edited 02-16-2023 04:40 AM
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:
02-16-2023 01:22 PM
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.
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.
Hope this helps someone out there.
07-02-2024 02:10 AM
Sergams's approach was helpful to me (thanks!)
I didn't love the fact that the notepad GUI briefly pops up even when the "run minimized" option was set to true in the sys exec call or that there was no way to get feedback from the call on whether the operation was successful so did some digging for alternatives. Found the "print" command works nicely, only slight hitch was that I needed to share out the printer and then use the full network share name with the /D: parameter.
So for example, if my computer name was "computer", the printer name was "ZD421-TEXT", and the file to print is c:\temp\label.zpl the command line call is
print /D:"\\computer\ZD421-TEXT" "c:\temp\label.zpl"
07-02-2024 02:23 AM
@Matt_E. wrote:
So for example, if my computer name was "computer", the printer name was "ZD421-TEXT", and the file to print is c:\temp\label.zpl the command line call is
print /D:"\\computer\ZD421-TEXT" "c:\temp\label.zpl"
If the domain rights are set right that print command works from other computers in the same domain too! That could be handy but also a security concern. Depends on your situation.