select the ^FN you want to print

// Expert user has replied.
F Felix HADJADJ 3 years 7 months ago
13 1 0

Hi,
I am currently developing a machine using a zebra printer and a PLC.
A format file is stored in the printer's memory and the PLC creates a variable fields file pushed to the printer via FTP
The stored format is the following :
^XA
^DFE:FORMAT.ZPL
^FX data 1^FS
^FO5,5
^FN1^FS
^FX data 2^FS
^FO5,20
^FN2^FS
^XZ
The file sent by PLC is the following :
^XA
^XFE:format.zpl^FS
^FN1^FDthis is data 1^FS
^FN2^FDthis is data 2^FS
^FN3^FDThis is data 3^FS
^XZ
What i would like to do is have the PLC generating and sending always the same file containing data 1, data 2 and data 3 and be able to print only data 1 and 2, or data 1 and 3 by only changing the stored file in the printer.
in the example above, i would like to have only data 1 and data 2 printed but with the code above, I have the data 3 being printed on top left corner.
At the moment the only way i have found to do so is to print the data 3 outside the label zone (ie. adding the code below in the stored file )
^FX data 3^FS
^FO1000,8
^FN3^FS
Would there be any cleaner way to ignore a ^FN ? I couldn't find anything in the zpl guide.
Best regards,
Félix

Please Register or Login to post a reply

1 Replies

S Steven Si

Thank you for sharing the solution.
Probably as you have already noticed, there is no way to ignore the ^FNn in the recall format. The ^FNn in the stored format will be ignored when the recall format doesn't have the ^FNn. But not the other way around.

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