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

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

Samantha Corn
Hi Ulrich,The reason that the

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.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Ulrich Reuber
hi Samantha,took a while. I

hi Samantha,

took a while. I was out of office.

.....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.....

The Problem is: i have to print the "#" excactly at this position. Is there a chance to get it work?

The second part of my question:

I changed the code. The serial counter now is simply the time of the real time clock,
Code:

^FH\^FC%,{,#^FD077#9A110601196___AS00#%y%d%m%H%M#^FS

Al works fine. Only the # in #%y is my problem.

regards

Ulrich

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Here is the correct ZPL:^XA

Here is the correct ZPL:

^XA

^BY48,48^FT137,177^BXN,4,200,0,0,1025,^FH\^FC%,{,@

^FD077#9A110601196___AS00#%y%d%m%H%M#^FS

^XZ

The scanned QR code is: 077#9A110601196___AS00#1807021209#

Hope this helps.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments