09-25-2009 05:41 AM
While this isn't strictly a LabVIEW question I'll post it in the hopes that some of you have experience. I am trying to talk to a Zebra TLP3842 via a usb-serial adapter. I have successfully communicated with the printer through its own usb port, using the simple report vi's, but it seems very limited in what I can do that way, for instance sending a Zebra command string ends up just being printed as the string I sent, rather than sending it "raw". So, seeing some recommendations on here I got as usb-serial adapter. Unfortunately I seem to be missing something. When a send an example, copied from the programming manual, to the printer, all I get is a feed to the next label, ejecting the label without any printing. I know that the printer will print, both from the previous test with the USB connection and also from the self dump mode, but all I get through the USB-Serial path is a blank label.
The string, copied right from the ELP2 manual:
A50,150,0,4,1,1,N,"Example 4" <newline> (the character for <newline> doesn't copy)
P1 <newline>
I've used both the simple serial example from the LabVIEW examples and have sent the string directly, via the VISA test panel in MAX. I did a loop back of my serial adapter to make sure it was sending. Both ends, computer and printer, are set to the same serial settings.
LabVIEW 2009
Thanks in advance
09-25-2009 06:09 AM - edited 09-25-2009 06:10 AM
Each com mandline must be terminated with a Line Feed (LF) character (Dec. 10). Most PC based systems send CR/LF when the Enter key is pressed. The Carriage Return (CR) character is ignored by the printer and can not be used in place of LF. The LF in \ codes display is equal to \n in Labview
Try this, set your send string to show`\`Codes display. Then paste in this string
A50,150,0,4,1,1,N,"Example\s4"\nP1\n
It should do the trick
09-25-2009 06:17 AM
09-25-2009 06:36 AM
Do you use the correct port, and serial settings? You can find the serial port in MAX. Then using USB to serial converters the port may get "any" number. It also change then you change USB port. Are you 100% sure the cable is correct? And also chEck once more that your control is in \ codes mode. I have wasted some time by assuming the setting(s) was correct.
The default setting for your printer is this (9600 baud, 8 bit word length, no parity, 1 stop bit, and
XON/XOFF).
09-25-2009 07:06 AM
Thanks, I am sure that the comm port I'm using is the correct one. I also did a "dump" from the printer to confirm its port settings matched mine. Yes, Windows is annoying in assigning whatever port number it feels like, but I could ID the port in MAX, did a loopback by shorting pins 2 - 3, just don't know what I'm missing to actually get the printer to print rather than just feed a label out.
09-25-2009 07:17 AM
09-25-2009 10:00 AM
Hi Putnam,
Try using portMon to see what is sent to the printer to help narrow this down. THe only thing I reameber about the Zebra printer was the right "font" was required to get the bar code code to print but I don't think that will help you at the moment.
Ben
09-25-2009 10:11 AM
First this may seem like a silly question but have you verified that the printer you have uses EPL. That model printer comes in two flavors. One uses EPL for label formatting and the other uses ZPL. If it is an EPL printer as mentioned earlier all commands MUST be terminated with a carriage return ('\r') follwed by a line feed ('\n').
Try sending "UQ\r\n" to the printer. If it is an EPL printer it should return configuration data about the printer inclduing the model number and firmware version. If this fails then try sending "~hi" to the printer. If you get a reply to this it is a ZPL based printer.
You can download both the EPL and ZPL manuals at www.zebra.com.