
A 2.25x1.25 traceability label with LOT and EXP lines and the lot number as Code 128. Keep the date format your receiving systems expect.
| Size | 2.25×1.25″ · 8 dpmm |
| Product | urun,lot,skt,expiry,izlenebilirlik |
| License | labelixa |
^XA ^CF0,28 ^FO20,15^FDSAMPLE PRODUCT 500ML^FS ^CF0,26 ^FO20,55^FDLOT: L2608123^FS ^FO20,90^FDEXP: 2027-05-31^FS ^FO20,130^BY2^BCN,80,Y,N,N^FDL2608123^FS ^XZ
Each command links to its reference page. The value column shows its first use in this template; the range column lists the valid values from the command reference.
| Command | Name | Value here | Valid range |
|---|---|---|---|
^XA | Start Format | | |
^CF | Change Default Font | 0,28 | h: 0–32000; w: 0–32000 |
^FO | Field Origin | 20,15 | x: 0–32000; y: 0–32000; z: 0/1/2 |
^FD | Field Data | SAMPLE PRODUCT 500ML | |
^FS | Field Separator | | |
^BY | Barcode Field Defaults | 2 | w: 1–10; h: 1–32000 |
^BC | Code 128 | N,80,Y,N,N | o: N/R/I/B; h: 1–32000; f: Y/N; g: Y/N; e: Y/N; m: N/U/A/D |
^XZ | End Format | |
The template carries three variable fields: product name, the LOT line and the EXP (expiry) line; the barcode repeats the lot number as Code 128 so that receiving reads the lot instead of typing it. The lines pick the font with ^CF and take the data with ^FD; change only the data, not the coordinates. The receiving system decides the date format: many ERP imports expect DD.MM.YYYY or MM/DD/YYYY, while the ISO form (YYYY-MM-DD) is misread least on export labels. The date in the template is typed in, which is why every label shows the same one — see same date on every label.
To carry lot and expiry in one barcode a scanner can parse, use GS1-128: mode D of the ^BC command makes the printer insert FNC1, and the data is written with application identifiers in parentheses — (10) lot, (17) expiry as YYMMDD. The variant below fits the 2.25×1.25 in label in our renderer without a warning:
^XA ^CF0,26 ^FO20,15^FDSAMPLE PRODUCT 500ML^FS ^FO20,55^FDLOT: L2608123 EXP: 2027-05-31^FS ^FO20,95^BY2^BCN,70,Y,N,N,D^FD(10)L2608123(17)270531^FS ^XZ
Do not duplicate the template by hand for hundreds of lots: produce the same ZPL in bulk from the rows of a batch list — ZPL labels from Excel/CSV. For production-line labels (serial numbers, pallets, module width) see manufacturing labels solution; for other symbologies see barcode types.