ZFT File Format : Différence entre versions

[version en cours de rédaction][version en cours de rédaction]
(Page créée avec « {{Tuto Details |Description=<translate>The file format (ZFT file) is completely open and flexible and allows any Zebra label command to be used</translate> |Categories=Sof... »)
 
Ligne 3 : Ligne 3 :
 
|Categories=Software
 
|Categories=Software
 
}}
 
}}
<translate>
+
<translate>= Label Format File =
 +
The label format file is a text file and ends in .zft.
  
 +
The software uses 4 zft files
 +
<br />
 +
{| class="wikitable"
 +
|+
 +
!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)
 +
|
 +
|}
 +
{{Info|...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"}}<br />
  
 +
= 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 “$$”.
 
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 “$$”.
 
{| class="wikitable" border="1" cellspacing="0" cellpadding="0" width="501"
 
{| class="wikitable" border="1" cellspacing="0" cellpadding="0" width="501"
Ligne 52 : Ligne 85 :
 
| width="75" valign="top" |$$PROFILE$$
 
| width="75" valign="top" |$$PROFILE$$
 
| width="347" valign="top" |profile code
 
| width="347" valign="top" |profile code
 +
|-
 +
|$$BINNO$$
 +
|Slot Number
 
|-
 
|-
 
| width="75" valign="top" |$$TROLNO$$
 
| width="75" valign="top" |$$TROLNO$$
Ligne 61 : Ligne 97 :
 
| width="75" valign="top" |$$WELDER$$
 
| width="75" valign="top" |$$WELDER$$
 
| width="347" valign="top" |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.
 
| width="347" valign="top" |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.
 
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.
Ligne 67 : Ligne 113 :
 
<br />
 
<br />
  
== Example ==
+
==Example==
 
Here is the PRNFMT.ZFT file:
 
Here is the PRNFMT.ZFT file:
 
<br /><syntaxhighlight>
 
<br /><syntaxhighlight>
Ligne 85 : Ligne 131 :
 
</syntaxhighlight>
 
</syntaxhighlight>
  
* ^XA and ^XZ start and end the format
+
*^XA and ^XZ start and end the format
* ^LH positions the start of the label
+
*^LH positions the start of the label
* ^FWN,0 Sets the rotation and left justifies all text fields
+
*^FWN,0 Sets the rotation and left justifies all text fields
* ^FOn,n positions a text field
+
*^FOn,n positions a text field
* ^Ax Selects a font
+
*^Ax Selects a font
* ^FD defines the data string for the field – can be straight text or a $$ field substitution
+
*^FD defines the data string for the field – can be straight text or a $$ field substitution
* ^FS denotes the end of the field definition</translate>
+
*^FS denotes the end of the field definition
 +
 
 +
= 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 [http://labelary.com/viewer.html online ZPL translator / viewer] that is ideal for checking your format changes before committing to the machine.{{#annotatedImageLight:Fichier:Labelary Screenshot.png|0=600px|hash=|jsondata=|mediaClass=Image|type=frameless|align=center|src=https://stuga.dokit.app/images/6/67/Labelary_Screenshot.png|href=./Fichier:Labelary Screenshot.png|resource=./Fichier:Labelary Screenshot.png|caption=|size=600px}}
 +
 
 +
 
 +
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
 +
</translate>
 
{{PageLang
 
{{PageLang
 +
|Language=en
 
|SourceLanguage=none
 
|SourceLanguage=none
 
|IsTranslation=0
 
|IsTranslation=0
|Language=en
 
 
}}
 
}}
 
{{AddComments}}
 
{{AddComments}}

Version du 17 février 2021 à 13:25

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

Pas encore d'image

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

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