LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Hello,

 

Im triying to print on a Zebra GX 430t,  and Im trying to do it with the Printing to Zebra.VI, but when I execute the VI, the printer´s green LED flashes, but it doen´t print anything.... does someone know why this happens?


dg_lbe escribió:

I've setup a simple VI to print on a Zebra TLP 2824 Plus printer using ZPL commands and cannot print.   Using USB connection.  Prints fine with Zebra Simple Setup Utility and same commands.  Tried using two methods without success.  I've attached both vi's.

PLEASE HELP......

 

Thanks,

 

DG 


 

0 Kudos
Message 101 of 165
(3,772 Views)

@JGP83 wrote:

Hello,

 

Im triying to print on a Zebra GX 430t,  and Im trying to do it with the Printing to Zebra.VI, but when I execute the VI, the printer´s green LED flashes, but it doen´t print anything.... does someone know why this happens?


dg_lbe escribió:

I've setup a simple VI to print on a Zebra TLP 2824 Plus printer using ZPL commands and cannot print.   Using USB connection.  Prints fine with Zebra Simple Setup Utility and same commands.  Tried using two methods without success.  I've attached both vi's.

PLEASE HELP......

 

Thanks,

 

DG 


 


What exactly are you sending to the printer? When using a raw USB connection you need to send ZPL to the printer instructing it what to print.



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 102 of 165
(3,813 Views)

Dear PaigeT,

 

Your comment was great and helped me quite a lot but the problem I am having now is that as i used the code to insert on the VI write from the prn file when I print out the label the Serial number or de barcode doesnt increase each time i print it keeps fixed as I have designed in the Zebra editor. Could you please check my vi file? And what it causes a lot of curiosity is that when I open the SN that appear in the prn but when i print it out it actually comes out correctly.

0 Kudos
Message 103 of 165
(3,768 Views)

Dear PaigeT,

 

Your suggestion really helped me but I have a problem with it. I need to increase the Serial number and barcode every time I print and I have followed every step but it seems that every time I print I get the same number and barcode even if I have correctly done it in Zebra designer. Could you please take a look at my VI? I have also introduced the prn file and lbl that I have used. What it also get me confused is that in the prn i find just one reference of my codes but when i print out i get the right now, pretty curious. I have also tried in one of the model to substitute the string number +1 to check if it worked but it didnt.

 

Please give me a hand.

 

Thank you very much in advance.

0 Kudos
Message 104 of 165
(3,753 Views)

I didn't test this because I don't have that printer installed on this PC, but try the attached and let me know if it works any better. 

 

I replaced the serial number string in the .prn file to %06d (decimal integer, 6 spaces, right justified and padded with 0's) and then used format into string to insert the serial number. 

 

It might also help to edit the .prn file so the serial number barcode just has a fixed string instead of a counter, it's possible that's what's actually causing the hiccup. I think that would be useful for batch printing a bunch of labels at once but since you're doing one at a time and putting the SN in yourself I don't think you need it. I did not edit the .prn file in the string in the attached VI, I just replaced the SN string with %06d, so if you edit the .lbl file make sure you update it corectly. 

 

 

EDIT: I back saved it in 2010 just in case, I don't know what version of LV you're using.

Download All
0 Kudos
Message 105 of 165
(3,714 Views)

Dear PeageT.

 

This is what the label should look like:

 

Label.png

 

The problem is that this will be used after the functional test and the label should be automatically printed with the S/N.

 

 

The serial number cannot be fixed, it must be a counter:

 

Counter.png

 

Another thing that I could do is to make the operator to type the SN but I think that would be too risky. 

 

When I check your VI the only thing i see different is that you use %06d but where do you write the SN? 

 

The printing is working fine but what it doesnt do the next time I run the program is to give me the next serial number, the first time i run the program should appear: 009208 and next print 009209 and so on.

 

I am not actually an expert on labview maybe I should use a loop depending on the times i ned to run the program or i am not sure, also tried to use the string to number add one and replace it and so on but none did what I am looking for.

 

I would really appreciate if you could help me out or give me some other hint.

 

Thank you very much in advance.

 

 

Download All
0 Kudos
Message 106 of 165
(3,676 Views)

Forgot to tell you that I am using Labview 2014. Thanks.

0 Kudos
Message 107 of 165
(3,671 Views)

@dfrongia wrote:

Forgot to tell you that I am using Labview 2014. Thanks.


Here is a slightly modified version of the code you poseted plus an example of how you can print different serial numbers. The key is to use a loop to print the labels and have a counter in your application that will increment the serial number.

 

I generally recommend using ZPL to define th eentire label. It makes updating fields much easier. I am not sure if your lable as defined will update the bar code itself. That is currenlty sent to th eprinter as a graphic and there is no easy way to update the graphic on the fly. That is why I suggest using ZPL itself to define the label content. You can find complete ZPL Information here.



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
Download All
0 Kudos
Message 108 of 165
(3,643 Views)

Dear Mark,

 

I have tested your program but it still doesnt work, when i used it prints out the 10 times the same serial number and it doesnt increase it. 

Actually I need that this program runs only if it pass the test....everytime it pass the test the label will be printed. 

I am checking the zpl commands examples to see how i can make it work...

 

Just using Zebra designer if I just check on the zdl code that has been generated with the SN would be:

 

CT~~CD,~CC^~CT~
^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR4,4~SD15^JUS^LRN^CI0^XZ
^XA
^MMT
^PW1181
^LL0319
^LS0
^FO384,224^GFA,04224,04224,00044,:Z64:
eJztlD2O7DYQhIugsUxsMnVASFdwqEAYneXdQI48wcKisYGz5ytxI1+Diw1eKsMJg8G0q/Vn3cCAocbMENKUPhS7SwSuuuqqq676n1Wb8GpEcgtT4TJCwYgIjB4DGjgUyK6dihVqE9cnhhlTxR0emD2keNjE/8umldnKb8LP7ARDhTw2bmOktHCmBJlXqZEa5F3kTdckDytCbgNUb0ttE7mt1E1bXh1dOlvG1qXx1c7tygV42WbHHZnHqrX5RgC8zd3N5nKzJaTFr2q7kG1Cj19XrUuxMQWRf0TznhuXbN65iAv3vl6q1jdsSx9S15mP4kOiTfULwvu2kLtd6sMvkQZHPt+R6xzMzn1BjHp/XC2p1veYwU6iw2cOXMvm16Pxldz7SUuuyb6lltzvqN2435N7X/zi8NuBT/uhkJsCFu7mt2n6pQ+HNkZ1+zIR96HbxrhxPbmRN4Zdy/52mhMv9U6uaueT34bcYRsxzPz6I8aIH3Ild9GOkzx2btC5HTmTSr8dQqpV/SZyRZ5bf5vwlhAkH5mM6jCgH/Eln7mcW2S/Ga/dhO5/LAo5/E4r16HzllxN6p5fcvk6II7aX9Wu+WWL7tH+qXvaMznXHlW5cZlb2vtbwWA09pM3OKVVm/uIn7MO/yflGiZ64/K9iOabirac2dTfUIr9Cvb5kzmjdn3fsLxvfydSt8kZndtf2f6O2DNn4ZQzDiziF1D5L7fBRwl/pK6378Vr1o/AchXNQ3/4DSbPbtl0nvl1B1eNDvqzaW25h7dSB246cHY3Ow/pCCzXIfG02Xsm1UmenhxOEEwPHis4c1vgOB+YBytpoJZnRtKz5In7yW9IJ+1UjKCtmLJ7oF3OqDOXg7RHdvjgUw+8QV9Yrvyc/TrO7cjkVVddddVV/0H9A3GGQO4=:0C48
^PQ1,0,1,Y^XZ

 

I am checking the example:

 

^XA
^FO100,100^ADN,36,20^SN001,1,Y^FS
^PQ3
^XZ

 

but this would print 001 up 003 straight away....

0 Kudos
Message 109 of 165
(3,621 Views)

Dear PaigeT,

 

I have tried with the fixed string and try to substitute the string where the number is by the number is specified in the window but still doesnt work, I have tried it in different ways but none with good result and even if i get this solved I will have the problem of the barcode and i am getting crazy with this.Smiley SadRobot Sad

Take a look at my other versions

Download All
0 Kudos
Message 110 of 165
(3,605 Views)