ZPL Printing 2D Barcode with "#" Character in a ^FD Tag followed by %y

// Expert user has replied.
U Ulrich Reuber 3 years 7 months ago
239 1 0

Hello all,
 
I try to print the following Barcode with my new GX420t. (The internal Clock is set)
Code:
077#9A110601196___AS00#1707059999#
 
where 170705 is the internal Printer Time and 9999 is a serial counter getting from FN06
This is what i have tried:
 
^BY48,48^FT137,177^BXN,4,200,0,0,1025,^FH\^FC%,{,#
^FD077#9A110601196___AS00#%y%d%m^FN06#^FS
 
My first Problem: I cannot print the year correct. I have to put spaces between the "#" and %y. This is the scan result:
077#9A110601196___AS00#%y0705
 
The year is not correct and all characters after the day are missing.
 
any idea?
 
thx a lot
regards Ulrich

Please Register or Login to post a reply

1 Replies

S Samantha Corn

Hi Ulrich,

The reason that the year isn't printing is because you've used the # character in the ^FC command and are also printing it. If you replace the # in ^FC%,{,# with any other unused hexadecimal character, such as ^FC%,{,@, the year should print correctly.

As for the second part of your question, the reason nothing is being printed after the day is because the printer reads another ZPL command, ^FN, and ends the ^FD. ^FN is meant to be used in storing and recalling stored formats. Is this ZPL a part of a stored format?

Information on all ZPL commands can be found in the ZPL Programming Guide.

CONTACT
Can’t find what you’re looking for?