I'm trying to show some data in a GS1 Datamatrix which has field separators (FNC1,GS) pass within the variable to a zpl template.

Originally, in ZebraDesigner I couldn't get zpl to allow me to pass the separators within the parameter/variable. The separators would only show as text within the data, not as control characters for the scanner. (I was able to pass the separators as Fix Data, however it needs to work with a parameter).

Alternatively, I was hoping to edit the zpl and concatenate the control characters and QR values into one printed data for the Datamatrix.

This is zpl using one variable QRCode: (This works but not with passed separators)


This is using fixed data where FNC1 is \7E and GS is \1D: (This works but doesn't use variables/parameters)


This is my attempt to concat the separators and variables QRData1...:


Unfortunately, the QR code only shows the value for the last var QRData3

1 Answers

Community On

Escape your field seperator hex codes with an _ (underscore), not with a backslash.
And use only one ^FD command like in your second example.

For reference see the pages of the commands ^FD, ^FH and ^BX in the Zebra ZPL II Programming Giude

As the OP found out, the field seperator _d029 worked for him! This is the hex value (0xD029) for the control character.

More information can be found here:

Encode GS,RS, and EOT for Code 128 and PDF417

GS is ~029
RS is ~030
EOT is ~004


Enter the data as:

Encode GS,RS, and EOT for Data Matrix, Aztec, and QR Code

GS is ~d029
RS is ~d030
EOT is ~d004


Enter the data as: