The component is used to create the Data Matrix (ECC 200) 2D barcode symbols. It's defined in the pfmxDataMatrixEcc200 unit.

Data Matrix code is a two-dimensional matrix barcode symbology consisting of black and white "cells" or modules arranged in either a square or rectangular pattern. The information to be encoded can be text or raw data. Usual data size is from a few bytes up to 2 kilobytes. The length of the encoded data depends on the symbol dimension used. Error correction codes are added to increase symbol strength: even if they are partially damaged, they can still be read.

Data Matrix was invented by International Data Matrix, Inc. (ID Matrix) which was merged into RVSI/Acuity CiMatrix, who were acquired by Siemens AG in October, 2005 and Microscan Systems in September 2008.

Data Matrix ECC 200There are 2 types of Data Matrix symbology, namely ECC 000 - 140 and ECC 200. The component can be used to generate the ECC 000 - 140 symbols. It is the newest version of Data Matrix and supports advanced encoding error checking and correction algorithms. It allows the routine reconstruction of the entire encoded data string when the symbol has sustained 30% damage, assuming the matrix can still be accurately located. So it's recommended for new application or open systems.

ECC 200 symbols have an even number of rows and an even number of columns. Some symbols are square with sizes from 10 * 10 to 144 * 144 not including quiet zones. Some symbols are rectangular with sizes from 8 * 18 to 16 * 48 not including quiet zones. All ECC 200 symbols can be recognised by the upper right corner module being light.

If you want to generate the Data Matrix ECC (000 - 140) symbols, please use another component TBarcodeFmx2D_DataMatrix in this components package.


There are two shapes of Data Matrix (ECC 200) symbols, square and rectangle, as described in following list:

You can use the Shape property to specify which shape of symbol will be selected to generate the barcode symbol. It can be one of values dsSquare and dsRectangle, corresponding to the shapes square and rectangle. These values are defined in the pfmxDataMatrixEcc200 unit.

Symbol sizes

Data Matrix (ECC 200) symbols have an even number of rows and an even number of columns. The sizes of the square symbols are from 10 * 10 to 144 * 144 (modules) not including quiet zones. The sizes of the rectangle symbols are from 8 * 18 to 16 * 48 (modules) not including quiet zone.

You can use the MinSize and the MaxSize properties to specifiy the minimum and maximum sizes for a Data Matrix (ECC 200) symbol. They can be one of values from dmSize_10_10 to dmSize_16_48 (they are defined in the pfmxDataMatrixEcc200 unit), corresponding to every symbol size shown above. The smallest symbol size that accommodates the barcode text will be automatically selected between minimum and maximum symbol sizes.

If the barcode text does not fill the maximum data capacity of the Data Matrix (ECC 200) symbol, remaining data capacity of the symbol will be filled by using PAD characters. If the barcode text is so long that it cannot be encoded using the maximum symbol size specified by the MaxSize property, an OnInvalidLength or OnInvalidDataLength event will occur. The CurrentSize property can be used to get the factual symbol size.

Quiet zones

The minimum quiet zone is equal to 1 module on all four sides. So the minimum values of LeadingQuietZone, TrailingQuietZone, TopQuietZone, and BottomQuietZone properties are equal to 1. For applications with moderate to excessive reflected noise in close proximity to the symbol, a quiet zone of 2 modules to 4 modules is recommended.

Error checking and correcting (ECC)

Data Matrix (ECC 200) symbols are fixed at a repair level of about 25% damage and overhead ranges from 60% for a small number of characters downward to 26% for a large number of characters encoded.

Character set

Escape sequences

If the AllowEscape property is set to true, following escape sequences are supported by the component, you can insert them to the barcode text:

Note, the "{RS}" is ASCII character RS (ASCII value 30), the "{GS}" is ASCII character GS (ASCII value 29), and the "{EOT}" is ASCII character EOT (ASCII value 4).

Extended Channel Interpretation (ECI)

The Extended Channel Interpretation (ECI) protocol allows the output data stream to have interpretations different from that of the default character set. Four broad types of interpretations are supported in Data Matrix (ECC 200):

The ECI protocol provides a consistent method to specify particular interpretations on byte values before printing and after decoding. The ECI is identified by an integer (up to 6 digits) which is encoded in the Data Matrix (ECC 200) symbol by the ECI indicator block. The escape sequence "\e[<ECI_Number>]" is used to place the ECI indicator block to the barcode text:

ECI indicator blocks may be placed anywhere in the barcode text in a single or structured append set of Data Matrix (ECC 200) symbols. For example:


The AllowEscape property should be set to true in order to place the ECI indicator blocks. Any ECI invoked shall apply until the end of the barcode text, or until another ECI indicator block is encountered. Thus the interpretation of the ECI may straddle two or more symbols.

Structured append

In order to handle larger messages than are practical in a single symbol, a data message can be distributed across several Data Matrix (ECC 200) symbols. Up to 16 Data Matrix (ECC 200) symbols may be appended in a structured format to convey more data. If a symbol is part of a structured append this shall be indicated by a structured append block in barcode text. The escape sequence "\s[<Index>, <Amount>, <File_Id>]" is used to place the structured append block to the barcode text:

The AllowEscape property should be set to true in order to place the structured append block. The structured append block may only be placed once in the barcode text. Also, it shall be placed at beginning of the barcode text. The OnInvalidChar or OnInvalidDataChar event will occur if the structured append block be placed more than once, or it isn't placed at beginning of the barcode text. The following is the examples of structured append:

\s[2, 5, 25431]ABCDEFGabcdefg1234567890

\s[2, 5, 101, 31]ABCDEFGabcdefg1234567890