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 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.
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.
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 Identifier | Number of characters (Application Identifier and data field) |
---|---|
00 | 20 |
01 | 16 |
02 | 16 |
(03)* | 16 |
(04)* | 16 |
11 | 8 |
12 | 8 |
13 | 8 |
(14)* | 8 |
15 | 8 |
16 | 8 |
17 | 8 |
(18)* | 8 |
(19)* | 8 |
20 | 4 |
31 | 10 |
32 | 10 |
33 | 10 |
34 | 10 |
35 | 10 |
36 | 10 |
41 | 16 |
* - Those Application Identifiers are reserved for future assignment
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
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).
GS1 organization: GS1 DataMatrix Guideline