Input Format for Creating GS1 DataMatrix

Introduction

GS1 DataMatrix is data matrix barcode with GS1 data string encoded. This article explains the correct input format when creating GS1 datamatrix barcodes.

This article applies on all morovia products that are capable of producing ECC200 datamatrix barcodes, notably:

  • DataMatrix Fonts & Encoder 5, or above

  • Barcode ActiveX, the pro edition

  • Barcode DLL

GS1 Element Strings

GS1 data string consists of one or more element strings. Each element string begins with an Application Identifier (AI) which is then followed by the data that the AI denotes. GS1 Application Identifiers (AIs) are 2, 3 or 4 digit numbers which define the meaning and the format of the data that follows.

In the human readable text, the AI is enclosed in parentheses. Multiple element strings can be concatenated. For example,

(01)03453120000011(17)120508(10)ABCD1234(410)9501101020917

denotes:

  • GTIN number is 03453120000011.

  • Expiration date: 2012-05-08

  • Batch/Lot: ABCD1234

  • Ship to GLN: 9501101020917

Although parentheses appear in the human readable text, they are never encoded in GS1 datamatrix. Instead, a special character FNC1 is used as separator.

Input Format for GS1 Element Strings

The data encoded in GS1 data matrix is different from the human readable text. GS1 requires a special character FNC1 to appear at the beginning of the string. The same FNC1 serves the separator between elements.

Rules on FNC1 separator

A FNC1 separator is required to separate two adjacent elements. Furthermore, when the AI of the previous element falls into the table below, the separator is not required.

Table 1. Element strings with pre-defined length using AIs

First two-digits of the Application IdentifierNumber of characters (Application Identifier and data field)
0020
0116
0216
(03)*16
(04)*16
118
128
138
(14)*8
158
168
178
(18)*8
(19)*8
204
3110
3210
3310
3410
3510
3610
4116

* - Those Application Identifiers are reserved for future assignment

Example

To encode (01)03453120000011(17)120508(10)ABCD1234(410)9501101020917 into datamatrix, first add FNC1 at the beginning and between two elements:

FNC101034531200000111712050810ABCD1234FNC14109501101020917

Note that there is no FNC1 after elements 01, 17 and 10 because they are listed in the table above.

In Morovia products, the FNC1 character is entered using tilde code ~1. Therefore the whole input string is:

~101034531200000111712050810ABCD1234~14109501101020917

Decoding GS1 DataMatrix

GS1-compliant reader outputs ]d2 to indicates that it is a GS1 datamatrix, followed by element strings. The first FNC1 is omitted, while subsequent FNC1s are output as GS characters (ASCII 29).