0

Device: MC 9090
OS: Windows Mobile 5
Printer: QL 320 connected via serial port to MC 9090
I am sending ZPL to the serial port, but the printer prints ANSI characters only on the 3x2 label. No barcode or no text

Any help will be appreciated.

NOTE: I do not want to install special printer drivers.

Here is my code:

StringBuilder sb = new StringBuilder();
sb.AppendLine("^XA");
sb.AppendLine("^FO100,100^BY3");
sb.AppendLine("^BCN,100,Y,N,N");
sb.AppendLine("^FD123456^FS");
sb.AppendLine("^XZ");
string DataToPrint = sb.ToString();
SerialPort S = new SerialPort("COM1", 9600, Parity.None, 8, StopBits.One);
try
{
    S.Open();
    S.Write(DataToPrint);
    S.Close();
}
catch (Exception Ex)
{
    MessageBox.Show(Ex.Message);
}
James Reed
  • 13,873
  • 51
  • 60
LPP
  • 77
  • 2
  • 12
  • 1
    Is the printer printing the ZPL commands? Also, what firmware version are you using? – banno Feb 28 '14 at 16:34
  • The printer is printing CCPL. In DUMP mode I saw that printer supported CCPL. Thanks. – LPP Mar 03 '14 at 15:48

1 Answers1

0

Not sure what you mean by ANSI characters, but a few things to check are: If by serial connection you mean a physical (not a virtual ) serial connection, check the baud rate on printer and make sure the baud rate you specify in your SerialPort("COM1", 9600, ...) matches the printer baud rate. A delay, of about 500 milliseconds after Open() and also before Close() would be a good idea; this will ensure printer is ready to receive after Open, and it has processed your label before Close(). Also, since you are sending ZPL to the printer, check and make sure printer is setup to accept ZPL.

user3025177
  • 451
  • 3
  • 3
  • BAUD rate was the culprit. I printed the printer config in DUMP mode, and saw the baud rate was 19,200. I used 19,200 in code and it printed smoothly. I also added the delay, and it helped too. Thanks! – LPP Mar 03 '14 at 15:51