GS1 Data Matrix 2D Barcode FAQ

Barcode Information | Tutorials | Examples

GS1-DataMatrix barcode symbols may be easily created with IDAutomation Data Matrix products, all of which support GS1 AIs (Application Identifiers) and the FNC1 (Function 1) symbol character according to the ISO/IEC 16022 standard.

GS1-DataMatrix Barcodes

GS1 DataMatrix BarcodeThe following must all be true to properly create GS1 symbols:

  1. The encoding mode must be set to ASCII, which is Mode 3 in IDAutomation products.
  2. The ApplyTilde or ProcessTilde function must be enabled.
  3. The data within the symbol must start with the non-printable FNC1 character, which is encoded with the ~1 character combination.
  4. The number directly after the ~1 is the Application Identifier (AI). The AI combined with its associated data makes up an element string.
  5. Multiple element strings may be encoded in a single symbol according to the GS1 AI Specification Reference.
  6. After the first FNC1, additional FNC1s should only be inserted after variable length element strings. It is preferred that all variable-length element strings are encoded after all fixed-length element strings.

Examples Generating GS1-DataMatrix

Fig. 1 below is a symbol encoding of the GTIN string (01)34567890123457 with the date field of (15)171231. According to the GS1 Application Identifier specification, an additional FNC1 is not necessary in this symbol because the preceding element string of (01) is a fixed length.

Fig. 1: GS1-DataMatrix symbol encoding multiple element strings with a single FNC1 function.

GS1 HRI Data Encoded: (01)34567890123457(15)171231

DataToEncode using ~1:
~1013456789012345715171231

Data Returned from scanner:
]d2013456789012345715171231

Test generation link from bcgen.com:
https://www.bcgen.com/demo/IDAutomationStreamingDataMatrix.aspx?D=(01)345678901234515171231&PT=T&MODE=3&X=.2&LM=0.2

Fig. 2 below is a symbol encoding of the GTIN string (01)10614141543219 with a variable batch element string of (10)3456789 and a variable serial number element string of (21)3456789012. Because the AIs (10) and (21) are both variable, an additional FNC is required between these according to the GS1 Application Identifier specification.

Fig. 2: GS1-DataMatrix symbol encoding multiple variable element strings.

GS1 Data Matrix symbol encoding multiple variable element strings.

GS1 HRI Data Encoded: (01)10614141543219(10)3456789(21)3456789012

DataToEncode using ~1:
~10110614141543219103456789~1213456789012

Data Returned from scanner:
]d20110614141543219103456789<GS>213456789012

Test generation link from bcgen.com:
https://www.bcgen.com/demo/IDAutomationStreamingDataMatrix.aspx?D=(01)10614141543219103456789(21)3456789012&PT=T&MODE=3&X=.2&LM=0.2

Decoding GS1-DataMatrix

According to GS1 specifications, when GS1 emulation is enabled, the first FNC1 character should be decoded as “]d2” and any additional FNC1 characters will be decoded as <GS> (ASCII 29). The <GS> function is usually only visible when scanned with the Barcode Scanner ASCII String Decoder. Not all scanners properly decode the first FNC1 character as “]d2”. The screenshot below is the decoded symbol of Fig. 2 above scanned with the IDAutomation 2D USB Scanner.

Decoding GS1 DataMatrix with the ASCII String Decoder

IDAutomation also offers the Barcode Data Decoder Verifier App, which may be used to verify encoded data. This app is particularly useful in verifying GS1 data and parsing out element strings. The following is the decoded result of Fig 2 above:

GS1 Data Matrix Decoded Element Strings

 

Refer to GS1’s GS1-Data Matrix Guideline for complete specifications.