LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Quality Print

Solved!
Go to solution

I am looking for a print directly from LV to a Zebra label printer. Requirements:

  • good qualitiy (will include QR code too)
  • directly to a printer

What would you suggest?

 

I've been trying this:

 

2020-09-21 18_16_12-labview print image directly – Google Suche.png

 

left side: how to get rid of the vi title at the bottom?

 

right side: poor quality and the size of the font (configured with 24) does not affect.... any ideas especially about the quality? anti aliasing would be good.

 

or are there ways recommended? any help appreciated.

 

thanks in advance

0 Kudos
Message 1 of 15
(3,091 Views)
Solution
Accepted by mischl

Don't try to print directly to the label printer from the report toolkit.  Use the Zebra software to design a label.  From there you can output EPL or ZPL code to a text file.  This is the code that you can send to the printer that will print your label.  Take this code file and add tokens for the variable information.  Save this code in your project.  When you need to print a label, replace the tokens and save the label code as a temporary file. 

You will need to have your Zebra printer shared and give it a name.

Using the System EXEC VI, you can copy the temporary file to the printer using the printer share name.

 

cmd /c copy %filename% \\%computername%\%printershare%

aputman
Message 2 of 15
(3,054 Views)

Wow, that's awesome!

 

Thank you @aputman for all these insights. You hit me to the right direction, saving me a lot of time and effort.

 

Now I know also what to look for here in the forum: ZPL is the key

0 Kudos
Message 3 of 15
(2,999 Views)

Hello,

 

I'm currently looking to do something similar to what you are saying, but am having trouble interfacing the printer and LabVIEW. Would you be able to share the code you used to have LabVIEW trigger the print on the Zebra? 

 

Thanks very much. 

0 Kudos
Message 4 of 15
(2,731 Views)

What model printer are you using? What is your interface to the printer? I generally send the ZPL directly to the printer bypassing all drivers. If you have a network interface (wired or wireless) simply use TCP to connect to port 9100 and send the ZPL. If you are using USB I can see if I can release our LabVIEW library which uses the Zebra SDK to communicate with the printer. Serial and parallel ports can also be accessed directly from within LabVIEW using VISA.



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
Message 5 of 15
(2,713 Views)

If you are using USB, you only need to use the command I wrote above.  After giving the printer a share name, you can copy a label ZPL or EPL code file directly to the printer and it will print.  

 

cmd /c copy %filename% \\%computername%\%printershare%


aputman
Message 6 of 15
(2,698 Views)

I am using a GC420t printer interfacing with USB. I have so far been unsuccessful in interfacing the printer with NI MAX or VISA.

0 Kudos
Message 7 of 15
(2,678 Views)

I do intend to use USB. I understand the method of copying a ZPL code file, but I am not sure how to give the printer a share name. Are you able to expand on how to do that? Thank you. 

0 Kudos
Message 8 of 15
(2,672 Views)

That is the same printer I use.  You do not need VISA or Max.  You only need a command prompt using the command I have posted twice now.  

 

Edit:  Go to Printer Properties -> Sharing and enter a name.  Do not use a name with spaces.  This may look different on Win10 computers.  This screen is from Win7.

aputman_0-1621367616081.png

 

aputman
0 Kudos
Message 9 of 15
(2,669 Views)

@kjr53105 wrote:

I am using a GC420t printer interfacing with USB. I have so far been unsuccessful in interfacing the printer with NI MAX or VISA.


You can't connect to the printer via USB using VISA or NI Max, at least not easily. It was possible prior to Windows 7 but Windows 10 requires driver files to be signed which makes it very difficult. You could use the approach that Putnam suggested or I can see if I can package up our code which uses the Zebra SDK.



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 10 of 15
(2,666 Views)