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)

^BY208,208^FT448,1123^BXN,8,200,0,0,1,~
^FH\^FN18^FDQRCode^FS

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

^BY208,208^FT448,1123^BXN,8,200,0,0,1,~
^FH\^FD\7E188text234567890\1Dmoretext^FS

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

^BY208,208^FT448,1123^BXN,8,200,0,0,1,~
^FH\^FD\7E^FN18^FDQRData1^FN22^FD\1D^FDQRData2^FD\1D^FN23^FDQRData3^FS

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

1 Answers

0
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

Example:
[)><RS>06<GS>13V12GG7<GS>1P029-102489-157<GS>NC-411-661478-1<RS><EOT>

Enter the data as:
[)>~03006~d02913V12GG7~0291P029-102489-157~029NC-411-661478-1~030~004

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

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

Example:
[)><RS>06<GS>13V12GG7<GS>1P029-102489-157<GS>NC-411-661478-1<RS><EOT>

Enter the data as:
[)>~d03006~d02913V12GG7~d0291P029-102489-157~d029NC-411-661478-1~d030~d004