Zebra printer and PLC

BTW How can i save a barcode 39 with 9 digits to be loaded later but changing those digits?
With ^IS and ^IR i cand save and load a barcode but i cant change the digits. Maybe with ^XF?? I didnt understand very well how does it works and how to save formats before to be able to use ^XF
 
The ^BY Command will help you out.

EDIT: Dang! Uploaded a pic of the page, but the resizing won't do the page justice. Anyway, the command works like this:

^BYw,r,h

w = width in dots of the narrow bar. Values may be from 1 to 10
r = ratio of the wide bar values may be from 2.0 to 3.0-- really, it's a multiplier.
h = default height of the barcode. You can of course set the height when you call the ^B3 command, as you've already pointed out.

Full example: ^BY2,3,50

The width if the narrow bar is 2 dots. The width of the wide bar is 6 (w*r = 2*3 = 6). The default height of the barcode is 50 dots.

Hope this helps!

Hate it when the edit is longer than the original post...:rolleyes:
 
Last edited:
BTW How can i save a barcode 39 with 9 digits to be loaded later but changing those digits?
With ^IS and ^IR i cand save and load a barcode but i cant change the digits. Maybe with ^XF?? I didnt understand very well how does it works and how to save formats before to be able to use ^XF

Is this still with getting the size of your barcode to fit? Formats are okay to use, but I generally don't. The PLC is capable enough to manipulate your ASCII Data, and if you need to modify your label, it can be done directly from the PLC without having to download a new format.
 
Last edited:
BTW How can i save a barcode 39 with 9 digits to be loaded later but changing those digits?
With ^IS and ^IR i cand save and load a barcode but i cant change the digits. Maybe with ^XF?? I didnt understand very well how does it works and how to save formats before to be able to use ^XF

Finally i arrived to do it with ^DF, ^XF and ^FN. Even that ^DF is not well explained in the guide.

Edit: JordanCClark that was another problem, not the same as the width of the barcode ;)
 
Last edited:
You save the format once in the printers flash memory and you can recall it as many times as you want. Start a new label with Zebra Designer and add a barcode. In the wizard you will have to choose Code39 and if you want fixed barcode data or variable data. In case you choose variable in the next screen choose "Prompted before print". After you place the barcode in the label right click -> barcode properties and there you can set "X expansion factor". When your label is ready save it with a simple name (1.lbl for instance) and from the file menu choose export to printer. Since you know how to recall a format, it should be easy after that to plug the printer to a pc and use a terminal program to figure out the exact string you will need to send from the plc.

EDIT: I had the window left open and didn't see the previous posts. Sorry if it looks irrelevant now.
 
Last edited:
I know how to call a format with ^XF, but it works only with .ZPL. Is there any command to call a .lbl??

BTW i arrived to save a barcode39 format (^DF) and then recall (^XF) changing the numbers....... but it works only from computer. When i use the same from the PLC it doesnt work. It seems that it doesnt save any data. But i think it's not going to be a problem in waht i have to do.
 
I know how to call a format with ^XF, but it works only with .ZPL. Is there any command to call a .lbl??

BTW i arrived to save a barcode39 format (^DF) and then recall (^XF) changing the numbers....... but it works only from computer. When i use the same from the PLC it doesnt work. It seems that it doesnt save any data. But i think it's not going to be a problem in waht i have to do.

The .lbl is a binary file used by Zebra Designer. When you export a label to the printer an ascii file is sent it is saved with .zpl extension. So, if your Zebra Designer file is 1.lbl the file saved in the printer is going to be 1.zpl.

You will need to download the format to printer once. If you do this from the computer there is no need to save a format with the plc.
 
Succed, printing on a zebra printer over Ethernet

If someone need the PLC example i can send it to you, [email protected]. I made it work on a Micrologix 1400 over ethernet, now working on the Compactlogix. RS-232 also developed, very easy that one.

A lot of memory is consumed by the way.
 
He intentando comunicarme con una impresora zebra modelo GK420t por medio de puerto serie enviando codigos ASCII en formato HEXADECIMAL pero solo he logrado que me parpadee el LED sin imprimir nada. ¿Alguien de ustedes sabe que formato exacto debe ser para que la impresora pueda imprimir?
 
He intentando comunicarme con una impresora zebra modelo GK420t por medio de puerto serie enviando codigos ASCII en formato HEXADECIMAL pero solo he logrado que me parpadee el LED sin imprimir nada. ¿Alguien de ustedes sabe que formato exacto debe ser para que la impresora pueda imprimir?
Pablo Atsira

Follow this steps:

1.- Confirm Baud Rate, Stop bits, etc. are equal on the printer and PLC. (ASCII Config for Port 0 or 2)

2.- You have to use AWT instruction to send "STRINGS" over Channel 0 or 2.

3.- If everything is ok, there's a trick for this PLC model on the ZPL Code, pls be advice that you have to add and \ before any ^. Here's an example for the printer I install yesterday.

4.- If you need the PLC program let me know i will send it to you.

zpl code for Zebra Printer (Strings on Micrologix PLC)

\^XA~TA000~JSN\^LT0\^MNW\^MTD\^PON\^PMN\^LH0,0\^JMA\^PR5,5~SD15\^JUS\^LRN\^CI0\^XZ
\^XA\^MMT\^PW609\^LL0203\^LS0\^BY80,80\^FT255,132\^BXN,5,200,0,0,1,~\^FH\^FDP
12345678S00001
\^FS\^FT198,176\^A0N,14,14\^FH\^FDDescripcion:
Quarter con Cap
\^FS\^FT304,154\^A0N,14,14\^FH\^FDHora:
12:12:12
\^FS\^FT198,154\^A0N,14,14\^FH\^FDFecha:
12/12/12
\^FS\^FT276,40\^A0N,28,28\^FH\^FDRH\^FS\^PQ1,0,1,Y\^XZ
 
Gracias Ijimenez pero aun no logro imprimir nada, he intentado con esta instruccion en lenguaje ZPL II:

~WC - Este comando imprime la configuracion interna de la impresora

Según lo que tu me comentas es enviar: \~WC ??

Lo que yo hago es enviarlo en formato hexadecimal osea seria lo siguiente:
En vez de enviar \~WC lo hago en formato hexadecimal enviando los siguientes caracteres:

5C7E5743

Esta bien lo que estoy haciendo???. En realidad me estoy tratando de comunicar con una tarjeta ARDUINO y de ahi a la impresora ZEBRA.
Te agradecería mucho el poderme ayudar.
 
Pablo,

What i know is that Zebra Printers only works with the ZPL Code on ASCII. Im not quite sure that if you send Hex Values the printer would be able to accept them, sincerely i don't thin so.

The data type you MUST use is "String" over the DB9 Port over ASCII protocol.

Pablo,

Entiendo que las impresoras Zebra solo entienden el Codigo ZPL en ASCII, no estoy muy seguro que si envías valores Hexadecimales los pueda leer la impresora, sinceramente no creo.

El deber ser es Tipo de Variable "String" por por el puerto DB9 protocolo ASCII.
 
He intentando comunicarme con una impresora zebra modelo GK420t por medio de puerto serie enviando codigos ASCII en formato HEXADECIMAL pero solo he logrado que me parpadee el LED sin imprimir nada. ¿Alguien de ustedes sabe que formato exacto debe ser para que la impresora pueda imprimir?

Gotta be ASCII Characters in ZPL Lenguage. I can send you an example if you want.
 
Required Help

Hi,
I saw your post, are you know some specialist for this purpose?
I need to send print via my plc to any label printer...

do you know any one can help me?

thanks

I have a few Zebra printers being controlled by AB Micrologix PLCs. The Zebra printers I was given by my IT department are specifically designed to read variables from an ASCII string.

I send it an ASCII string containing print variables and start command variables, and it prints a template filled with the variables.

So depending on what Zebra printer you have, I would say it is a special purpose printer. I will gather more info on our printer model number later today when I get out on the shop floor.

Edit:
Yes, these are label printers.

Edit:
These Zebra printers are model number ZM400.
From what I remember about their setup, a template is 'printed' to them from a computer. This template contains a file name and permanent/variable data. This is done once. Then it waits for an ASCII command across it's serial port. The command contains a File Name and any variable data. Prints a label using the named template filled with the variables in the ASCII string.

It's been about 5 or 6 years since they were initially setup, so my memory's a little flaky, but I could look up my old information if you need it. I know our IT guy worked with the Zebra Tech support and they were helpful.
 

Similar Topics

Hi All Trying to get the PLC to send a commant to the printer to prinnt a lable. evarything is setup except RS linnx cannot see the printers and...
Replies
0
Views
381
Hi All I'm trying to connect two zebra printers to th PLC through Ethernet. I can ping the Printer through my laptop connected to the private...
Replies
0
Views
353
Hi everyone, Does anyone have a guide on how to communicate a zebra printer with a s7-1200 plc via TCP using TIA portal?? or any advices on what...
Replies
2
Views
1,845
Hi I am trying to connect a zebra printer gc420t to a micro 850 a-b, through the serial port, when the plc sends the ascii code the green led on...
Replies
3
Views
1,849
Let me start by saying I love reading through these forums, you guys are amazing! I have been tasked with implementing PLC control for a printing...
Replies
5
Views
2,252
Back
Top Bottom