TBarcode2D_DataMatrix

The component is used to create the Data Matrix (ECC 000 - 140) 2D barcode symbols. It's defined in the pDataMatrix 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 was acquired by Siemens AG in October, 2005 and Microscan Systems in September 2008.

Data Matrix ECC 000 - 140There 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 conventional coding for error correction that was used in the initial installations of Data Matrix systems. It offers five levels of error correction using convolutional code error correction. ECC 000 - 140 symbols have an odd number of rows and an odd number of columns. Symbols are square with sizes from 9 * 9 to 49 * 49 (modules) not including quiet zones. These symbols can be recognized by the upper right corner module being dark.

ECC 000 - 140 should only be used in closed applications where a single party controls both the production and reading of the symbols and is responsible for overall system performance.

If you want to generate the Data Matrix ECC 200 symbols, please use another component TBarcode2D_DataMatrixECC200 in this components package.


Error correction code (ECC)

Data Matrix (ECC 000 - 140) symbols offer five levels of error correction, referred to as ECC 000, ECC 050, ECC 080, ECC 100 and ECC 140 respectively in increasing order of recovery capacity. They are listed in following table:

Error correction code levelMaximum % correctable damage% increase in used bits from ECC 000
ECC 000nonenone
ECC 0502.833
ECC 0805.550
ECC 10012.6100
ECC 14025300

In an application, it is important to understand that these error correction levels result in the generation of a proportional increase in the number of bits in the message (and hence increase in the size of the symbol), and offer different levels of error recovery.

You can use the ECCLevel property to specify the error correction code level for a Data Matrix (ECC 000 - 140) symbol. It can be one of these values: dmECC000, dmECC050, dmECC080, dmECC100, and dmECC140 (they are defined in the pDataMatrix unit), corresponding to the ECC levels ECC 000, ECC 050, ECC 080, ECC 100, and ECC 140.

If the ECCLevelUpgrade property is set to true, the highest error correction code level that can be accommodated by current symbol size will be used for creating more robust symbols. Note, the new level is always no lower than the level specified by the ECCLevel property, and the symbol size will not be increased, it may be determined depending on the length of barcode text, and the error correction code level specified by the ECCLevel property (see also the "Symbol sizes" section below). In other words, only the remaining capacity in current symbol size will be used to upgrade the error correction code level. The property CurrentECCLevel can be used to get the factual error correction code level.


Character set

All 8-bit values can be encoded. The default interpretation shall be:

Note, the character set isn't different based on the encoding mode. See also the "Encoding modes" section below.


Encoding modes

There are six encoding modes of Data Matrix (ECC 000 - 140) symbols, they are shown in following list, in decreasing order of encoding density:

You can use the EncodeMode property to specify the encoding mode for a Data Matrix (ECC 000 - 140) symbol. It can be one of these value: emNumeric, emAlpha, emPunctuation, emAlphanumeric, emASCII, and emBinary, corresponding to the encoding modes Numberic (Base 11), Alpha (Base 27), Alphanumeric (Base 37), Punctuation (Base 41), ASCII, and Binary. Also, it can be set to emAuto, in this case, the encoding mode will be selected automatically from the list shown above, depending on the barcode text, in other words, the barcode text to be encoded will be analysed, and an appropriates lowest level (highest encoding density) encoding mode will be selected, in order to minimize the symbol size. The property CurrentEncodeMode can be used to get the factual encoding mode. These property values are defined in the pDataMatrix unit.


Symbol sizes

ECC 000 - 140 symbols have an odd number of rows and an odd number of columns. Symbols are square with sizes from 9 * 9 to 49 * 49 (modules) square not including quiet zones. These symbol sizes (excluding quiet zones) and their maximum data capacities are listed in following table:

Symbol size valuesSymbol sizes
(modules)
Maximum data capacities (bits)
ECC 000ECC 050ECC 080ECC 100ECC 140
dmSize_09_099 * 912----
dmSize_11_1111 * 11446---
dmSize_13_1313 * 138436187-
dmSize_15_1515 * 15132725031-
dmSize_17_1717 * 1718811486599
dmSize_19_1919 * 192521621309125
dmSize_21_2121 * 2132421617812743
dmSize_23_2323 * 2340427623016763
dmSize_25_2525 * 2549234229021185
dmSize_27_2727 * 27588414354259109
dmSize_29_2929 * 29692492422311135
dmSize_31_3131 * 31804576498367163
dmSize_33_3333 * 33924666578427193
dmSize_35_3535 * 351052762662491225
dmSize_37_3737 * 371188864754559259
dmSize_39_3939 * 391332972850631295
dmSize_41_4141 * 4114841086950707333
dmSize_43_4343 * 43164412061058787373
dmSize_45_4545 * 45181213321170871415
dmSize_47_4747 * 47198814641286959459
dmSize_49_4949 * 492172160214101051505

The maximum number of characters in each encoding mode can be calculated by using the Maximum data capacities (bits). For example, the maximum data capacities are 114 bits if the symbol size is 17 * 17 and the error correction code level is ECC 050. The encoding density is 4.8 bits per data character in Alpha (Base 27) encoding mode, so the maximum number of characters is 23 (114 / 4.8 = 23.75) in the Alpha (Base 27) encoding mode. You can find the encoding density in "Encoding modes" section above.

You can use the MinSize and the MaxSize properties to specify the minimum and maximum sizes for a Data Matrix (ECC 000 - 140) symbol. They can be one of values from dmSize_09_09 to dmSize_49_49 (defined in the pDataMatrix 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 000 - 140) symbol, remaining data capacity of the symbol will be filled by using pad bits (the ECCLevelUpgrade property is set to false), or will be used to upgrade the error correction code level (the ECCLevelUpgrade property is set to true). 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 (only for Delphi/C++ Builder 2009 or later) 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.


Properties:
Methods:
Events:

(*): The Data property, OnInvalidDataLength and OnInvalidDataChar events are available only for the Delphi/C++ Builder 2009 or later.

Contents