LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Using alphabets and numeric in 128 barcode value will always change the length for different combinations

0 Kudos
Message 121 of 165
(6,307 Views)

Hi, Mark, 

I want to ask you about a weird situation. Here was what happened. We were printing from Zebra GX420t. The command set we use is as shown below.

GX420t.png

We tried to print, say, 20 copies of a label. The printing stopped for unknown reason. So we powered off the printer, turned it back on, and tried to print again. But the printing position was shifted to the left, as shown below

Zebra Printing Shift.jpg

I did not pay much attention before, but this issue has happened a few times lately. Do you know what caused the position shift? Thanks. 

Download All
0 Kudos
Message 122 of 165
(6,274 Views)

I can make a pretty good educated guess.  Turning the printer off and on reset the margins (along with a bunch of who-knows-what-else parameters), so printing continued with those defaults instead of preferred setup.  When you have to cycle the power on your printer, you should also restart your printing software (after the printer has come online).

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 123 of 165
(6,266 Views)

Thanks for your reply. 

 

What you said makes sense. Turning off and back on the printer reset the margin. But what I still don't understand is, the printing software is sending an absolution position of each character to the printer. So why the need to restart the program?

0 Kudos
Message 124 of 165
(6,263 Views)

clear print commands missing at the start may be. Try this

 

 

CT~~CD,~CC^~CT~
^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR6,6~SD15^JUS^LRN^CI0^XZ
^XA
^MMT
^PW831
^LL0406
^LS0
^FT590,365^A0N,28,28^FH\^FDSCREEN^FS
^FT65,377^A0N,28,28^FH\^FD5/18/2017^FS
^FT270,77^A0N,28,28^FH\^FDSTS^FS
^FT58,295^A0N,28,28^FH\^FD5693037-11^FS
^FT572,200^A0N,28,28^FH\^FDRED^FS
^FT325,376^A0N,28,28^FH\^FD252.90^FS
^FT580,279^A0N,28,28^FH\^FD101583062^FS
^FT324,291^A0N,28,28^FH\^FDVERB^FS
^FT53,208^A0N,28,28^FH\^FDOBSESSION^FS
^FT55,77^A0N,28,28^FH\^FD10317590^FS
^FT567,79^A0N,28,28^FH\^FDVERBENA^FS
^PQ1,0,1,Y^XZ

0 Kudos
Message 125 of 165
(6,246 Views)

Thank you. I will put the clear command in ahead of the printing.

0 Kudos
Message 126 of 165
(6,234 Views)

There are many parameters that control the position of the label printing. If your print software modified these values and did not save them then when the printer is reset the changed values will be lost. To save the settings permanently after setting the desired values you would send a ^XA^JUS^XZ to the printer.

 

The likely parameters that are getting changed are the print width (^PW), label home (^LH) and label shift (^LS). The mostly likely parameter is the print width. This value should be set to be the width of the labels you are using. If the printer is a 200 dpi printer and your label is 2 inches the print width should be set to 600. Experiment with this value and once you are printing correctly make sure you save the value using the ^JUS command.

 

Be careful using ZPL that K C posted. It changes quite a few settings of the printer which may not apply to your environment.



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 127 of 165
(6,198 Views)

I use zpl command to print bar codes and alphanumeric values in industrial environment. It is not complicated that much.

 

Try the following method.

1. Compose a model/sample using zebra barcode software that comes with the printer. Set all parameters size,darkness

everything .

2. Save. and Print as Print to file option. This directly gives the zpl code in notepad or wordpad.

3. Using labview concatenate function compose all lines step by step.

4. Leave the updating values or strings or alphanumeric values as labview controls.

5. Send the compiled string(of ZPL Codes) as raw string to Zebra Printer by Ni Visa.

 It will print

6. Use some code for changing / updating the values alone

7. Observe the code.The printer settings will be at the beginning of.ZPL command . You can change the values other than default if you wish.

 

0 Kudos
Message 128 of 165
(6,187 Views)
Spoiler
 

I just compiled a sample to get the code. There is no need to write a ZPL command manually. So the margin and all the settings are approximate only. If you want perfect print following steps will help.

 

0 Kudos
Message 129 of 165
(6,184 Views)

Hello, 

Could anybody tell me where is reason for this error. I am registered as admin to PC, but there is still the same problem. 

Anybody knows how to unzip previously installed drivers? 

 

Thank you for your help. 

Zebra printer driver error.png

0 Kudos
Message 130 of 165
(6,141 Views)