TBarcode2D_GridMatrix

The component is used to create the Grid Matrix 2D barcode symbols. It's defined in the pGridMatrix unit.

Grid MatrixGrid Matrix is a square, variable-sized, two-dimensional matrix symbology with unique dark- and light-framed "macromodules" that create a grid design that provides a robust finder pattern. The unique finder pattern ensures that readers can locate and orient the symbol even with significant symbol damage.

Grid Matrix can encode 7-bit ASCII, numeric, and binary data, in addition to any combination of data types in the same symbol, particularly effective with Chinese characters.

Grid Matrix was invented by Syscan Technology Co., Ltd.


Symbol sizes

There are thirteen sizes of Grid Matrix symbol, referred to as version 1 to 13, in increasing order of size and data capacity. You can use the MinVersion and the MaxVersion properties to specifiy the minimum and maximum sizes for a Grid Matrix symbol. They can be one of values from 1 to 13 (defined in the pGridMatrix unit), corresponding to the versions 1 to 13. The smallest symbol size that accommodates the barcode text will be automatically selected between minimum and maximum symbol sizes. The CurrentVersion property can be used to get the factual symbol size.

The symbol sizes and the maximum data capacity of each version are listed in following table:

VersionSymbol sizes
(modules)
Maximum data capacities (bits)
ECC Level 1ECC Level 2ECC Level 3ECC Level 4ECC Level 5
118 * 18-105917763
230 * 30315280245210175
342 * 42623553483413343
454 * 541022910798686567
566 * 661526135811901022847
678 * 7821351897165914211183
790 * 9028352520220518901575
8102 * 10236473241283524292023
9114 * 11445504046354230382527
10126 * 12655584942432637103087
11138 * 13866715929518744453703
12150 * 15078757000612552504375
13162 * 16291918169714761255103

If the barcode text does not fill the maximum data capacity of the Grid Matrix 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 MaxVersion property, an OnInvalidLength or OnInvalidDataLength (only for Delphi/C++ Builder 2009 or later) event will occur.


Error correction code (ECC)

There are five user-selectable levels of error correction, from 1 to 5 respectively in increasing order of recovery capacity.

You can use the ECCLevel property to specify the error correction code level for a Grid Matrix symbol. It can be one of these values: elLevel_1, elLevel_2, elLevel_3, elLevel_4, and elLevel_5 (they are defined in the pGridMatrix unit), corresponding to the ECC levels from 1 to 5.

These ECC levels are listed in following table:

Value of ECCLevel propertyError correction code levelPercentage of total capacity for ECC data
elLevel_1110%
elLevel_2220%
elLevel_3330%
elLevel_4440%
elLevel_5550%

Note, the ECC level 1 is inapplicable to the version 1.

Also, you can set the ECCLevel property to elLevel_Recommend or elLevel_LowestRecommend. For each symbol version, the denotative ECC levels are listed in following table:

VersionDenotative ECC level
ECCLevel = elLevel_RecommendECCLevel = elLevel_LowestRecommend
154
242
341
4-1331

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 above). 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.


Quiet zones

The minimum quiet zone is equal to 6 modules on all four sides. So the minimum values of LeadingQuietZone, TrailingQuietZone, TopQuietZone, and BottomQuietZone properties are equal to 6.


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:


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.

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 Grid Matrix symbol by the ECI indicator block. The escape sequence "\e[<ECI_Number>]" is used to place the ECI indicator block to the barcode text:

In a single symbol or structured append set of Grid Matrix symbols, if the AIM FNC1 ("\0"), GS1 FNC1 ("\1"), FNC2 (structured append block, "\2"), and FNC3 ("\3") are used, ECI indicator blocks may be placed anywhere behind of them, otherwise, they may be placed anywhere in the barcode text. For example:

ABC\e[123]DEFabc\e[000003]def

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 Grid Matrix symbols. Up to 16 Grid Matrix 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 "\2[<File_Id>, <Amount>, <Index>]" 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. If the structured append block is used together with AIM FNC1 ("\0"), GS1 FNC1 ("\1") or FNC3 ("\3"), the AIM FNC1 ("\0"), GS1 FNC1 ("\1") or FNC3 ("\3") shall be placed at beginning of the barcode text, then the structured append block. Otherwise, the structured append block shall be placed at beginning of the barcode text. The OnInvalidChar or OnInvalidDataChar (only for Delphi/C++ Builder 2009 or later) event will occur if the structured append block be placed more than once, or it isn't placed at beginning of the barcode text or behind of the AIM FNC1 ("\0"), GS1 FNC1 ("\1") or FNC3 ("\3"). The following is examples of structured append:

\2[79, 5, 2]ABCDEFGabcdefg1234567890...

\0\2[99, 6, 1]ASDFGHJKL098765...


Properties:
Methods:
Events:

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

Contents