Field Data (^FD) and Field Numbers (^FN)

Hello,

How do I embed a field number into a field definition?  

Consider the following ZPL:

^FD51,0,6,111111,2,33,^FN11"Enter Barcode"^FS

The full ZPL is supposed to scan a barcode and use its value in the last parameter to fill out the EPC data structure:

^XA
^DFE:RFID^FS
^RB96,8,3,3,20,24,10,28
^RFW,E
^FD51,0,6,111111,2,33,^FN11"Enter Barcode"^FS
^XZ

How do I embed a field number into a field definition?  

Thank you,

Paul.

Dmitry Prokhorov
Hello Paul,As it stated on a

Hello Paul,

As it stated on a page 175 of ZPL manual:

https://www.zebra.com/content/dam/zebra/manuals/printers/common/programming/zpl-zbi2-pm-en.pdf#page=175

The ^FN command numbers the data fields. This command is used in both ^DF (Store Format) and

^XF (Recall Format) commands.

In a stored format, use the ^FN command where you would normally use the ^FD (Field Data)

command. In recalling the stored format, use ^FN in conjunction with the ^FD command.

So you can see that for ^DF store format you need to use ^FN command instead of ^FD one.

Dmitry Prokhorov

Software Engineer, Kutir Mobility

Posted on behalf of Zebra Technologies

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments