FAQ TBarCode DLL / TBarCode Library
How to Use Macro 06 in a Data Matrix
How to Use Macro 06 in a Data Matrix
Example: You want to encode the following data into a Data Matrix symbol with 26x26 modules (the data below contains already the escape sequences for the GS, RS and EOT):
[)>\x1e06\x1dY2004010400000XY\x1dP13590636\x1d12V688438456\x1dLSYYDDD000000000\x1e\x04
Problem
That doesn't fit into the 26x26 matrix. The capacity of the 26x26 symbol is 88 numeric or 64 alphanumeric characters. But here we have a mixture of alphanumeric, some special and non-printable characters (GS, RS, EOT) in the data string. By default, we don't use macro mode, which would also save space.
Solution
You can use the Macro 06 mode to save space in the symbol:
BCSet_DM_Format (pBarCode, eDMPr_Macro06)
After enabling the Macro 06, set the barcode data as follows (without header and trailer):
[)>\x1e06\x1d
Y2004010400000XY\x1dP13590636\x1d12V688438456\x1dLSYYDDD000000000
\x1e\x04
Result: In the data stream, a header of [)> + RS + 06 + GS and a trailer of RS + EOT will be inserted automatically by the bar code reader (no need to set this in the encoded data). This will fit into the 26x26 matrix because with Macro 06 the encoder does not need as much space / internal code words as without.