Using ZPL Stored Formats

Article ID: 13966029

Details


 

Topic or Information

Using ZPL Stored Formats 

Applies To

ZPL Compatible printers

Excludes: 2824 Series, 2844 Series, S4M (E53 Firmware Version), 888 DD/TT Series, MZ Series, ZQ110, EM220, EM220II

Details

The Zebra Printer can use variable formats with variable data in conjunction with any device that can send the ASCII data (with command characters) in the correct format.

I have enclosed some examples below which may assist your future applications.

You can use a format held within the printer that can be stored in Volatile RAM and will be lost when powered off OR stored in permanent Flash or Memory Card (This would depend on the model of the printer and options fitted.)

This document lists 5 application suggestions on using Variable Formats.

1. Print label file stored in RAM
2. Print label file stored in RAM but include Variable.
3. Print label file stored in RAM but include Variable Serial Number.
4. Print label file stored in RAM using Scanner Header & Footer commands.
5. Print label file stored in RAM using a Weigh Scale.
6. Difference Between Permanent and Temporary storage areas.

1. Printing A Stored Format.
^XA                                                          (^XA - This is the Start Command)
^DFR:Format1.ZPL^FS                           
^FO50,50^A0,60,60^FDTest^FS       (FO is font location, A is Font, FD is Data used)
^XZ                                                           (^XZ - This is the End Command)

This will send the file directly to the printers RAM. If you perform a directory list this file will be shown on the list. To recall the label send the following file to the printer.

Recalling A Stored Format 
^XA^XFR:Format1.ZPL^FS^XZ

2. Printing A Stored Format with Variable.
^XA
^DFR:Filename.ZPL^FS 
^FO25,25^A0N,50,50^FDZebra Printer^FS           This shows the locations of the Variable field
^FO25,75^A0N,50,50^FDSerial Number^FS         numbers (^FN) to be used.
^FO25,150^A0N,50,50^FN1^FS
^XZ

Recalling A Stored Format 
^XA
^XFR:Filename.ZPL^FS                                      This is the variable information file.
^FN1^FD123^FS
^PQ100
^XZ

In order to print your labels you will have to send the first file to the printer and this will download the file into the printers RAM. If you then send the second file this will recall the saved file and then print the label using the variable field data as supplied with the second file.

3. Printing A Stored Format with variable Serial Number
If you are constantly printing the same label but a serial number is changing you can recall a saved format which includes the serial number as a variable field, an example is shown below.

^XA
^DFR:Filename.ZPL^FS 
^FO25,25^A0N,50,50^FDZebra Printer^FS        This shows the locations of the variable field
^FO25,75^A0N,50,50^FDSerial Number^FS      numbers (^FN) to be used.
^FO25,150^A0N,50,50^FN1^FS
^XZ

Recalling A Stored Format 
^XA
^XFR:Filename.ZPL^FS                                      This is the variable information file.
^FN1^SN123001,1^FS                                      This sets FN1 to use SN (Serial Number feature)
^PQ100                                                                   This will print 100 copies
^XZ

In order to print your labels you will have to send the first file and this will save the file into the printers RAM. If you then send the second file this will recall the saved file and then print the label using the variable field data as supplied with the second file.

4. Print label file stored in RAM using Scanner Header & Footer commands.
This can make a label much more complex with data input or actually scanning barcodes to create the printing label. In this example we will use the Header and the Footer capabilities of the scanner and will scan 1 code to use as a variable.

Step 1: This file is held in the Header section of the scanner being used.
^XA^FO50,50^A0,60,60^FD

Step 2: The scanner then scans the code required.

Step 3: This file is held in the Footer section of the scanner being used.
^FS^XZ     

The scanner will put the Header , Scanned Data and Footer parts together to print the label.

If the scanner memory is very limited you may need to save the data as a format and then it can be used in this method.

Step 1: This file is sent to the printer to store the format:
^XA^DFR:AB.ZPL^FS ^FO25,150^A0N,50,50^FN1^FS^XZ

Step 2: This file is held in the Header section of the scanner being used.
^XA^XFR:AB.ZPL^A0,60,60^FD

Step 3: The scanner then scans the code required.

Step 4: This file is held in the Footer section of the scanner being used.
^FS^XZ     

The label is recalled by the format and then the scanner will put the Header , Scanned Data and Footer parts together to print the label.

Please note not all scanners are capable of being used in this way, please contact your scanner supplier to ensure the scanner you have is capable of this type of application.

5. Print label file stored in RAM using a Weigh Scale.
Using a scanner of a weigh scale is very similar and requires the use of the data formatted in the same method as example 4 above, not all scales are able to send only the required data and therefore this would be recommended for suitability for your application.

If using a software program or ZBI you may be able to extract the string and then perform the ZPL label to be created using only a part of the data.

6. Differences Between Storage Locations
The Download Format (DF) command can be selected to download to the Printers volatile RAM, Permanent Flash, Permanent Memory Card.

Example 1
^DFB:Format1.ZPL^FS                        

Where
^DFB: Is the memory card             - This must be installed and not write protected.
^DFE: Is the Flash Memory           - This must be installed and available.
^DFR: is printers RAM                  - This will be lost when printer is turned off.

This is dependent on the printer being used and the options fitted to it.

Additional Information

ZPL Manual Read More>>

+ Product Codes

  • 105SLPlus Industrial Printers
  • 105SLPlus Industrial Printers
  • 110PAX Print Engines (disc.)
  • 110Xi4 Industrial Printer
  • 140Xi4 Industrial Printer
  • 170Xi4 Industrial Printer
  • 220Xi4 Industrial Printer
  • 2824 Plus Series
  • 2824-Z Series
  • All Surface RFID Label Solution
  • Desktop Printers
  • EZ320 Mobile Printers
  • G-Series GC Desktop Printers
  • G-Series GK Desktop Printers
  • G-Series GX Desktop Printers
  • GC420d Desktop Printer
  • GC420t Desktop Printer
  • GK420 Healthcare Desktop Printers
  • GK420d Desktop Printer
  • GK420d Healthcare Desktop Printer
  • GK420t Desktop Printer
  • GK420t Healthcare Desktop Printer
  • GT800 Desktop Printer
  • GX420Rx Desktop Printer
  • GX420d Desktop Printer
  • GX420t Desktop Printer
  • GX430d Desktop Printer
  • GX430t Desktop Printer
  • HC100 Wristband Printer
  • HC100 Wristband Printer
  • LP 2824 Plus Desktop Printer
  • Mobile Printers
  • P4T Mobile Printers
  • P4T Mobile Printers
  • Print Engines
  • QL Series Mobile Printers
  • QL320 Mobile Printer
  • QL420 Mobile Printer
  • QLn Series Healthcare Mobile Printers
  • QLn Series Mobile Printers
  • QLn220 Healthcare
  • QLn220 Mobile Printer
  • QLn320 Healthcare
  • QLn320 Mobile Printer
  • QLn420 Mobile Printer
  • R110Xi4 RFID Printer
  • RFID Printers
  • RP4T RFID Printers
  • RP4T RFID Printers
  • RW 220 Mobile Printer
  • RW 420 Mobile Printer
  • RW 420 Print Station
  • RW Series Mobile Printers
  • TLP 2824Plus Desktop Printer
  • Xi Series Industrial Printers
  • ZD410 Series
  • ZD410D
  • ZD420 Series
  • ZD420-HC
  • ZD420C
  • ZD500 Desktop Printer
  • ZD500 Desktop Printer
  • ZD500R RFID Printers
  • ZD500R RFID Printers
  • ZE500 Print Engines
  • ZE500 Print Engines
  • ZE500R RFID Print Engine
  • ZE500R RFID Print Engine
  • ZM400
  • ZM600
  • ZQ500 Series Mobile Printers
  • ZQ510 Mobile Printer
  • ZQ520 Mobile Printer
  • ZR300 Series Mobile Printers
  • ZR338 Mobile Printers
  • ZR600 Series Healthcare Mobile Printers
  • ZR600 Series Mobile Printers
  • ZT200 Series Industrial Printers
  • ZT210 Industrial Printer
  • ZT220 Industrial Printer
  • ZT230 Industrial Printer
  • ZT400 Series Industrial Printers
  • ZT400 Series RFID Printers
  • ZT410 Industrial Printer
  • ZT410 RFID Industrial Printer
  • ZT420 Industrial Printer
  • ZT420 RFID Industrial Printer
  • iMZ Series Mobile Printers
  • iMZ220 Mobile Printer
  • iMZ320 Mobile Printer