01-29-2014 01:54 AM
Hello, I just wanted to share how I have managed to print ZPL codes to a Zebra label printer with out using a generic printer driver or setting up a Visa driver.
First of all I installed the driver and label designer software that came with the printer, then went on to printer preferences - advanced setup - other - then checked enable passthrough mode (using start sequence ${ and end sequence }$). I then designed the label template using the label design software that come with the printer, putting in place of the variables the name of that variables eg. serial number, I then printed it to file and changed the file extension to .txt. Than Opened the text file that I had created and added the ${ on the first line and }$ on the end line, Using the file I created the ZPL code was generated for me. Then in Labview I created sub vi's to open the file and Put the text into a string, the in another sub vi searched and replaced the variables that I wanted to change eg. serial number, then saved it back to a new .txt file. Finally I used a sub vi that I found on the sample codes on NI.com using shell32.dll.
For this to work you need the label printed set to default printer on the computer.
Hope this is some help to people.
01-29-2014 04:04 AM
Sorry Missed out the Shell file and ShellExec Master.vi re-attached.
01-29-2014 12:20 PM
I can't see your code to see how you are printing but you can also send the file to the printer using System Exec command. The printer you want to use has to be shared (not necessarily the default printer).
cmd /c copy %filename% \\%computername%\%printershare%
09-03-2014 11:04 PM
Hi chrisneale
Need your help to convert your demo to Labview ver8.2
I cannot open it because your file is a higher version than my Labview.
Thank You
09-04-2014 01:16 AM
09-04-2014 02:21 AM
Sorry, I didn't see it the link that you mentioned.
Please advice where is the link.
Thank You
09-04-2014 02:45 AM
10-30-2014 06:52 PM
I've tried this code and your instructions on a GK420t Zebra printer, printing a Datamatrix 2D barcode. It will not print and I get a notification from Notepad that says "Page too small to print one line. Try printing using a smaller font." The file I created in the ZebraDesigner2 software, the barcode prints correctly. Have you seen this issue? Do you have any suggestions?
Thanks.
10-31-2014 02:13 AM
Hi, i had the same problem when first trying to send the code from notepad. The solution i found was to change the page setup settings. In notepad, go to file - page setup - and then change all the margins to 0, then remove the header and footer (if there is one). Make sure that the page orientation if correct for your label setup. the paper size and source should be automatically set via your settings in the zebra printer preferences. The only other thing is to make sure that the start and end commands are on there own lines. for example;
${
(ZPL code)
}$
Hope this is what you where after.
10-31-2014 09:38 AM
Thanks. Your suggestions worked. It's printing now with no problems.