We have 2 set of zpl streams being passed to a printer. We have a data matrix barcode with hexadeciaml value and we have not used any encoding to print same but we are sending another set of ZPL streams to printer with ^CI28 encoding but not setting back to ^CI0
Few/One of the labels got printed successfully and barcodes are scannable but post few iterations, the barcodes are not scanabledue to ^CI0 encoding missing for the data matrix barcode.
We did make the change as per approach #2 and it worked but we would like to understand that
#a. is the 2nd ZPL stream (2nd ^XA -.. ^XZ) not expected to set ^CI0 at the end so that subsequent ZPL streams sent to printers are not impacted?
#b. is it required to have ^CI0 before the data matrix barcode call and if it has hexa decimal value? I could not find this approach in ZPL guide
#1 Approach
^XA
^FO775,275
^BXN,5,200,,,,*
^FH^FD_44_45^FS
^XZ
^XA
^LH0,1850
^CI28
^FO0,0^A0N,50,50^FH^FD ^FS
^FO120,60^A0N,50,50^FH^FDABC ^FS
^XZ
#2 Approach
^XA
^FO775,275
^CI0
^BXN,5,200,,,,*
^FH^FD_44_45^FS
^XZ
^XA
^LH0,1850
^CI28
^FO0,0^A0N,50,50^FH^FD ^FS
^FO120,60^A0N,50,50^FH^FDABC ^FS
^XZ
#3 Approach
^XA
^FO775,275
^BXN,5,200,,,,*
^FH^FD_44_45^FS
^XZ
^XA
^LH0,1850
^CI28
^FO0,0^A0N,50,50^FH^FD ^FS
^FO120,60^A0N,50,50^FH^FDABC ^FS
^CI0
^XZ
Thank you.
1 Replies
Hi Satyabrat, It is important to keep in mind that the ^CI command persists label to label. It remembers what it was last set to at any given time. That being said, it should not effect hex encoded barcodes. In fact I tried and could not reproduce the issue. All the barcodes printed the exact same for me. I ran it through a dozen times using #1 approach and #2. Are you sure there is nothing else modifying it? Can you send some example printouts of the good and bad barcodes?
Robin