I have built a project for work that reads speaker lines and tests continuity. Once the test is complete I print the time, date, and part number on a thermal label that gets put on a wiring harness. I have tried using the common thermal printer for labels from Sparkfun. While it kind of works, the print starts dark on the left and the right side is completely light and unreadable. If I just print on thermal receipt paper it works fine. I'd like to be able to connect to our company's Zebra label printer. I have an RS232 shield and would like any help connect a MEGA to the Zebra via the RS232 shield.
Here is the Zebra info I have:
Requirements
9 pin Null Modem serial cable or standard 9 pin cable with a Null Modem Adaptor
Printer configurations matched to the host. ZM Serial Communication Information Read More>>
Note: The printer has a 9 pin female connector.
Overview
The Z -Series printer comes standard with a 9 pin DTE serial connector. To properly use a serial connection the following parameters must be matched between the host and printer.
Baud Rate
Data Bits
Parity
Host Handshake
A NULL Modem cable is required so signals are properly routed between the host and the printer.
Once properly configured the printer should function without problems as the ZPL (or EPL) data should be received without corruption and the handshaking will prevent buffer overrun.
Honestly not a real issue as of yet. I'm waiting on the null cable. My plan is to send the string for baud/data/parity, and then send the ZPL codes as per the examples to the printer and see what the result is. We'll see what happens. Just not sure exactly HOW.
dbirky:
I have built a project for work that reads speaker lines and tests continuity. Once the test is complete I print the time, date, and part number on a thermal label that gets put on a wiring harness. I have tried using the common thermal printer for labels from Sparkfun. While it kind of works, the print starts dark on the left and the right side is completely light and unreadable. If I just print on thermal receipt paper it works fine. I'd like to be able to connect to our company's Zebra label printer. I have an RS232 shield and would like any help connect a MEGA to the Zebra via the RS232 shield.
The Arduino HardwareSerial does not handle Hardware Handshaking. You will have to implement it yourself. I have added an interrupt driven CTS/RTS handshaking feature to the HardwareSerial core. If you want it send me a private message.
dbirky:
Honestly not a real issue as of yet. I'm waiting on the null cable. My plan is to send the string for baud/data/parity, and then send the ZPL codes as per the examples to the printer and see what the result is. We'll see what happens. Just not sure exactly HOW.
Does it worked??
I'm trying similar thing here.
I'm using ZT230 printer which have serial port. When i send the zpl commands using "Direct Communication - ZDesigner" software from zebra, it prints the text properly. But same line of code when I send to printer, it does nothing.
I tried setting the printer in diagnostic mode and it printed exactly matching code for zdesigner's software and the ascii lines which i send thro' Arduino mega's serial1. But when diagnostic is OFF, printer does nothing.
Here's the line of code I'm sending thro' zdesigner and arduino.
^XA
^FO50,50^ADN,36,20^FDtest
^FS
^XZ
Btw, I have used max232 for communicating on serial port and it works fine as when i connect barcode scanner, i'm getting proper content.
rpatil5541:
Does it worked??
I'm trying similar thing here.
I'm using ZT230 printer which have serial port. When i send the zpl commands using "Direct Communication - ZDesigner" software from zebra, it prints the text properly. But same line of code when I send to printer, it does nothing.
I tried setting the printer in diagnostic mode and it printed exactly matching code for zdesigner's software and the ascii lines which i send thro' Arduino mega's serial1. But when diagnostic is OFF, printer does nothing.
Here's the line of code I'm sending thro' zdesigner and arduino.
^XA
^FO50,50^ADN,36,20^FDtest
^FS
^XZ
Btw, I have used max232 for communicating on serial port and it works fine as when i connect barcode scanner, i'm getting proper content.
davchino:
hello, I'm new to the arduino world, they could print on zebra printers
through the serial port using RS232 shield?
Yes, you can print to a Zebra printer assuming that you interface it correctly as the Arduino uses TTL voltage levels and the printer uses RS232.
I assume that you realise that you will need to use the standard Arduino Serial print functions to output the control codes and data to the Zebra printer as it will not support the Zebra directly.
Please, has anyone managed to communicate the arduino with the zebra printer? I'm trying to send data to the printer but I can not seem to print, on the serial monitor or the puty the string is received but the printer does not receive the command.
I already work with the zebra but with the use of CLP and I have no problems when I use a PLC, but I can not do anything using the Arduino, I believe it should be something with the serial and for this reason I ask you for help if you had any experience with communication arduino x zebra.
I already work with the zebra but with the use of CLP and I have no problems when I use a PLC, but I can not do anything using the Arduino, I believe it should be something with the serial and for this reason I ask you for help if you had any experience with communication arduino x zebra.
It looks like are using pins 0 and 1 to communicate with the printer via the MAX232. As you are also using the Serial monitor to enter commands. This combination may cause problems because pins 0 and 1 on most Arduinos are used by the hardware Serial interface, ie the Serial monitor.
As an experiment try using SoftwareSerial on 2 other pins to communicate with the MAX232. There are examples of using SoftwareSerial included with the IDE