0

I am looking for some direction here, as I seem to be missing something. I have the following ZPL that is loaded into a ZD620:

    ^XA
    ^LH0,0^LRN^FT100,50,0^A0N,30,30^FN1^FDCORELIMS.BARCODE^FS
    ^FO471,27^BQN,1,3^FDQA,^FN1^FS
    ^FT381,188^A0N,50,68^FD^FN1^FS
    ^XZ

I use an off-the-shelf software that turns CORELIMS.BARCODE into the entity's barcode value to be encoded. That works fine. What is not happening, when the Generated QR Code is scanned, the output is always missing the first 3 characters. What should show up is something like: 5BX10, what I get is: 10.

During my troubleshooting I used the following code and I receive the full string:

    ^XA
    ^LH0,0^LRN^FT100,50,0^A0N,30,30^FN1^FDCORELIMS.BARCODE^FS
    ^FO471,27^BQN,1,3^FDQA,5BX10^FS
    ^FT381,188^A0N,50,68^FD^FN1^FS
    ^XZ

All other fields using the ^FN1 command (including this one: ^FT381,188^A0N,50,68^FD^FN1^FS) output the correct value, just not the generated QR code.

I found similar questions, however, none of which are using a ^FN command, and their suggestions do not work for my situation. Those links are listed here:

Print ZPLII QR to open url ZPL QR code not printing what is in the string

Thanks for help and I would really like to learn what I am doing wrong.

1 Answers1

1

The ^FNx commands are used with stored formats; they cannot be used in a "one-off" label format like you are showing. I am traveling and don't have a zebra printer to test this but basically you need to define the label format "template" using ^DF like:

^XA
^DFR:MYFORMAT.ZPL^FS
^LH0,0^LRN^FT100,50,0^A0N,30,30
^FO471,27^BQN,1,3^FN1^FS
^FT381,188^A0N,50,68^FN1^FS
^XZ

That stores the format as R:MYFORMAT.ZPL. Then you use ^XF to recall the format and provide the values for the ^FNx:

^XA
^XFR:MYFORMAT.ZPL^FS
^FN1^FDQA,CORELIMS.BARCODE^FS
^XZ

Note that you include the extra data params required by ^BQ in the ^FD string. Hope that helps.

Mark Warren
  • 1,321
  • 1
  • 7
  • 4
  • Just to make sure I have this straight in my head: I would load the first zpl with the ^DF command into the printer's storage with the name specified, then send the zpl with the ^XF command to the printer to get it to print? Thanks again for the clarification! – JimmyNeutron Dec 17 '19 at 18:09
  • 1
    Just realized that will not work for your example, as you are using `^FN1` twice, once for the barcode and once for text. Is there a reason you cannot have the `CORELIMS.BARCODE` twice in the ZPL? – Mark Warren Dec 18 '19 at 19:18