Creating GS1 Barcodes with Zebra Printers for Data Matrix and Code 128 using ZPL

Article ID: 83997005

Details


 

Topic or Information

Creating GS1 Barcodes with Zebra Printers using DataMatrix or Code 128 

Applies To

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

Details

A special start character is used to identify barcodes as a GS1.  The start character is called FNC1.  The FNC1 character instructs a decoder that the next characters are a GS1 AI.  The FNC1 character is also used in the middle of a barcode to denote the end of a variable length GS1 field and the beginning of a new AI.

Zebra ZPL printers support the FNC1 character by using an escape sequence as part of the barcode data string.  An escape sequence is defined as an escape sequence control character and an escape sequence code.  The escape sequence control character denotes the start of the escape sequence.  In ZPL, different barcode types use different escape sequences to create the FNC1 character.

 

Code 128

 The escape sequence control character for Code 128 barcodes is the greater-than symbol (“>”).  The escape sequences for a Code 128 barcode are as follows:

User-added image

The escape sequence is inserted in the barcode data string; it is not part of the label format.

Example GS1 data string containing a GTIN and Serial Number:

>;>8011234567890123421123456

User-added image

 

Example GS1 data string containing a GTIN, Serial Number, and Batch Number:

>;>8011234567890123421123456>810>6ABC123

User-added image

 

Data Matrix

The escape sequence control character for Data Matrix barcodes varies based on the printer firmware version.  For this reason, the safest course of action is to define the escape sequence control character directly in the ZPL file instead of relying on the firmware default.

The ZPL command to print a Data Matrix barcode is:

 ^BXo,h,s,c,r,f,g

User-added image

 The “g” field is the one that defines the escape sequence control character.  This field should be set to the underscore symbol (“_”).

Example Data Matrix command:

^BXN,9,200,20,20,,_

User-added image

 Once the ZPL has been modified to define the escape sequence control character, then the barcode data string can be created with the proper escape sequence.  The Data Matrix escape sequence code for the FNC1 character is the one symbol (“1”), making the FNC1 escape sequence “_1”.

Example GS1 data string containing a GTIN and Serial Number:

_1011234567890123421123456

 User-added image

 Example GS1 data string containing a GTIN, Serial Number, and Batch Number:

_1011234567890123421123456_110ABC123

User-added image

 

Source

Chris S

 

+ 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
  • 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
  • Industrial Printers
  • LP 2824 Plus Desktop Printer
  • 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
  • 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