0

I am trying to print to a GT800 Zebra printer thru serial port. I am using ZPL. I want to control the width which is fine in auto mode. To address that in the >^BC> command I am using Auto mode as no other size setting under ^BY works Following is the code

^XA
^MMT
^PW831
^LL400
^LS0
^BY2,,76^FT225,141^BCN,76,Y,Y,N,A
^FD:RNIP29200082034^FS
^FO225,157^A@N,18,10,E:CAL002.FNT^FD26030-0892R^FS
^FO383,157^A@N,18,10,E:CAL002.FNT^FD08.01.20 12:00PM^FS
^FO225,187^A@N,18,10,E:CAL002.FNT^FDLAMP-DR RH^FS
^FO453,187^A@N,18,10,E:CAL002.FNT^FDXBA3^FS
^PQ1,0,0,Y
^XZ

There is a funny problem. If the ^BC mode = A then if three zeros come together gives issues for eg ABCD29200082034 it prints ABCD29200 and does not complete the barcode. But the other lines are getting printed. But if the data is ABCD29200182034 , there are no issues. If BC mode = U then even if the code is ABCD29200182034 it prints 292001820347. Note 7 is added in the end. I am clueless as to what is this issue. I remember facing this same issue in Honeywell printer too once. Thanks NOTE : I replaced the 000 with 111 and the problem persists. ZPL Manual says the following

A= Automatic Mode :This analyzes the data sent and automatically determines the best packing method. The full ASCII character set can be used in the ^FD statement — the printer determines when to shift subsets. A string of four or more numeric digits causes an automatic shift to Subset C.

Note , it says a string of four or more numeric digits causes an automatic shift to subset C, but when the same string is 290010 it has no issues. I am really lost

Delphi Coder
  • 1,723
  • 1
  • 14
  • 25
suresh
  • 29
  • 9
  • Tested your zpl on a zm400, and it works correctly. Does the interpretation line also have the missing digits? And what scanner are you using to verify the bar code? – Mark Warren Jan 30 '20 at 15:02
  • Hi Mark, did you try it from the serial port ? If you are using Zebra Setup Utility / open communication to printer when the printer is connected to USB, then it works .But it will not work when printing from Serial Port. The ```^BY2,,76^FT225,141^BCN,76,Y,Y,N,A ^FD:RNIP29200082034^FS`` Prints the barcode upto "RNIP29200" even the interpretation line is upto this point. – suresh Jan 30 '20 at 17:09
  • That likely means you are overwriting the serial port buffer and not checking the return value. Can you show the code that writes to the port? – Mark Warren Jan 30 '20 at 21:07
  • Hi Mark : Thanks for your reply. I am using the simple old windows hyperterminal to pass the data to the printer. But going by what you say, if that is the case, why should it happen only if the there are 3 repeating digits. Why not with 3 different digits (in both cases, the length of the data is same)/ Why not with other pieces of information .And also please note, that this happens when the the mode option in ^BC is set to A. Not if it is U or any other N. The reason I am using this option is because I am not able to control the barcode width will BY or BN. Barcode is code 128 – suresh Jan 31 '20 at 01:16
  • One interesting post from this site https://stackoverflow.com/questions/27034626/zebra-zpl-commands-to-resize-barcode-to-sit-within-a-label. – suresh Jan 31 '20 at 01:54
  • Not sure, if this is a bug in your ZPL code: After the ``^FD`` of ``^BC`` there is a ``:`` directly followed by "RNIP29200082034". I assume, there is a ``>`` missing before ``:``. Please see my [answer](https://stackoverflow.com/a/58711192/11329562) for more reference. – Delphi Coder Jan 31 '20 at 06:17
  • Well thanks for pointing out. I had been trying out many ways. Somewhere this crept in. But the issue is the same even after removing the ":" – suresh Jan 31 '20 at 10:18
  • Don't remove the ``:``, add a ``>`` before it – Delphi Coder Feb 03 '20 at 06:44
  • No , it does notwork. Add the > followed by : prints both. For reference see below – suresh Feb 06 '20 at 06:09
  • ^BY2,,^FT225,141^BCN,76,Y,Y,N,A ^FD>:RNIP29200082034^FS – suresh Feb 06 '20 at 06:09
  • ^BY2,,^FT225,141^BCN,76,Y,Y,N,A ^FDRNIP29201082034^FS WORKS PERFECTLY – suresh Feb 06 '20 at 06:11
  • ^BY2,,^FT225,141^BCN,76,Y,Y,N,A ^FDRNIP29200082034^FS THIS prints upto RNIP29200 .Truncates from 3rd zero – suresh Feb 06 '20 at 06:12

0 Answers0