ZFT File Format

Auteur avatarGareth Green | Dernière modification 17/02/2021 par Gareth Green en cours de rédaction

The file format (ZFT file) is completely open and flexible and allows any Zebra label command to be used

Label Format File

The label format file is a text file and ends in .zft.

The software uses 4 zft files

Name Function Notes
PRNFMT.zft Main label format The reference to this file can be changed with the parameter

pieceFormat= in the file params.saw

The default name is PRNFMT.zft

offcut.zft Offcut label format The reference to this file can be changed with the parameter

offcutFormat= in the file params.saw

The default name is offcut.zft

remake.zft Remake label format - a second label that is produced alongside each remake label
waste.zft Waste label format (for a piece that is too short to be a stored offcut)
...The file formats are loaded when the control software (winMulti or winSaw) are started. The label is formatted and stored when the batch is loaded, so you cannot modify the label format "on the fly"


Format Fields

To get the correct label information on the label, a method of field substitution is used. The software searches for field codes in the label format that begin and end with “$$”.

Field Description
$$XLAB1$$ Line 1 from PRN File
$$XLAB2$$ Line 2 from PRN File
$$XLAB3$$ Line 3 from PRN File
$$XLAB4$$ Line 4 from PRN File
$$XLAB5$$ Line 5 from PRN File
$$XLAB6$$ Line 6 from PRN File
$$XLAB7$$ Line 7 from PRN File
$$XLAB8$$ Line 8 from PRN File
$$COLOUR$$ Profile colour
$$ID1$$ first 20 characters of the 40 character id field in the piece record
$$ID2$$ second 20 characters of id filed (done like this so the id field can go on 2 lines)
$$LENGTH$$ string representation of piece length – one decimal point
$$MITRE$$ string representation of mitre characters (eg \ /, [ ], < ], etc)
$$PROFILE$$ profile code
$$BINNO$$ Slot Number
$$TROLNO$$ Trolley Number
$$BARCODE$$ Batch / Piece identification number ( 8 characters of batch name, 4 characters of piece number) – exactly as the number in SAMOUT
$$WELDER$$ Uses the id field for a welder barcode. This uses the barcodeLength parameter to take the number of digits to use from the left to right, then barcodeTrim trims leading characters from the left.
$$BATCHNO$$ Batch number
$$PIECENO$$ Piece number
$$OFFLENGTH$$

$$OFFCUTLENGTH$$

Offcut Length

The label format is a standard ZPL format with the above fields in. All details of the zpl follow in the ZPL programming language manual.

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

Example

Here is the PRNFMT.ZFT file:

^XA
^LH10,10
^FWN,0
^FO165,10^AS^FDBatch: $$BATCHNO$$ Piece:$$PIECENO$$^FS
^FO20,  0^AV^FD$$BINNO$$^FS
^FO20, 75^AF^FD$$XLAB1$$^FS
^FO20,105^AF^FD$$XLAB2$$^FS
^FO20,135^AF^FD$$XLAB3$$^FS
^FO20,165^AF^FD$$XLAB4$$^FS
^FO20,195^AF^FD$$XLAB5$$^FS
^FO20,225^AF^FD$$XLAB6$$^FS
^FO20,255^AF^FD$$XLAB7$$^FS
^XZ
  • ^XA and ^XZ start and end the format
  • ^LH positions the start of the label
  • ^FWN,0 Sets the rotation and left justifies all text fields
  • ^FOn,n positions a text field
  • ^Ax Selects a font
  • ^FD defines the data string for the field – can be straight text or a $$ field substitution
  • ^FS denotes the end of the field definition

Barcodes

Use the ^BCN ZPL code for barcodes:

^FO220,  0^BCN,60,Y,N,N^FD$$WELDER$$^FS

This above example prints a 6mm tall barcode at 22,0 containing the welder barcode

Testing Tip

Testing the format can be a very time consuming task, as the software needs to be fully restarted and then the batch reloaded each time a change is made.

Changes are normally tiny positional changes of field position and size and take several iterations

Luckily, there is an online ZPL translator / viewer that is ideal for checking your format changes before committing to the machine.

Labelary Screenshot.png


Copy and paste the ZPL contents in to the box and click Redraw. In the above screenshot, I have replaced $$BINNO$$ with "99" so that the output makes sense - this can be done with any of the fields

Commentaires

Draft