A Data Matrix is a two-dimensional code consisting of black and white "cells" or dots arranged in either a square or rectangular pattern, also known as a matrix. The information to be encoded can be text or numeric data. The usual data size is from a few bytes up to 1556 bytes. The length of the encoded data depends on the number of cells in the matrix. Error correction codes are often used to increase reliability: even if one or more cells are damaged so it is unreadable, the message can still be read. A Data Matrix symbol can store up to 2,335 alphanumeric characters.
Data Matrix symbols are rectangular, usually square in shape and composed of square "cells" which represent bits. Depending on the coding used, a "light" cell represents a 0 and a "dark" cell is a 1, or vice versa. Every Data Matrix is composed of two solid adjacent borders in an "L" shape (called the "finder pattern") and two other borders consisting of alternating dark and light "cells" or modules (called the "timing pattern"). Within these borders are rows and columns of cells encoding information. The finder pattern is used to locate and orient the symbol while the timing pattern provides a count of the number of rows and columns in the symbol. As more data is encoded in the symbol, the number of cells (rows and columns) increases. Each code is unique. Symbol sizes vary from 10×10 to 144×144 in the new version ECC 200, and from 9×9 to 49×49 in the old version ECC 000 – 140.0
Applications
The most popular application for Data Matrix is marking small items, due to the code's ability to encode fifty characters in a symbol that is readable at and the fact that the code can be read with only a 20% contrast ratio. A Data Matrix is scalable; commercial applications exist with images as small as (laser etched on a silicon device) and as large as a 1-metre (3 ft) square (painted on the roof of a boxcar). Fidelity of the marking and reading systems are the only limitation. The US Electronic Industries Alliance (EIA) recommends using Data Matrix for labeling small electronic components.
Data Matrix codes are becoming common on printed media such as labels and letters. The code can be read quickly by a barcode reader which allows the media to be tracked, for example when a parcel has been dispatched to the recipient.
For industrial engineering purposes, Data Matrix codes can be marked directly onto components, ensuring that only the intended component is identified with the data-matrix-encoded data. The codes can be marked onto components with various methods, but within the aerospace industry these are commonly industrial ink-jet, dot-peen marking, laser marking, and electrolytic chemical etching (ECE). These methods give a permanent mark which can last up to the lifetime of the component.
Once marked onto the component, reader cameras along the production line, as well as a camera used by technicians after production is complete, can decode the Data Matrix to read relevant information. This can include the date of manufacture, serial number, and any other relevant information the manufacturer chooses to include. These reader cameras can also be used to track the movement of the component through the production line, as well as performing inventory stock checks.
Data Matrix codes, along with other open-source codes such as 1D barcodes can also be read with mobile phones by downloading code specific mobile applications. Although many mobile devices are able to read 2D codes including Data Matrix Code,Stefan, V. (2012). The use of 2D codes in the development of mobile applications with database. Valahian Journal of Economic Studies, 3(2), 105-114. Retrieved from https://econpapers.repec.org/article/vlhjournl/v_3a3_3ay_3a2012_3ai_3a2_3ap_3a105-114.htm few extend the decoding to enable mobile access and interaction, whereupon the codes can be used securely and across media; for example, in track and trace, anti-counterfeit, e.govt, and banking solutions.
Food industry Data Matrix codes are used in the food industry in autocoding systems to prevent food products being packaged and dated incorrectly. Codes are maintained internally on a food manufacturers database and associated with each unique product, e.g. ingredient variations. For each product run the unique code is supplied to the printer. Label artwork is required to allow the 2D Data Matrix to be positioned for optimal scanning. For black on white codes testing isn't required unless print quality is an issue, but all color variations need to be tested before production to ensure they are readable.
Art In May 2006 a German computer programmer, Bernd Hopfengärtner, created a large Data Matrix in a wheat field (in a fashion similar to crop circles). The message read "Hello, World!".
Technical specifications
Data Matrix symbols are made up of modules arranged within a perimeter finder and timing pattern. It can encode up to 3,116 bytes, by default interpreted as characters from an ASCII character set. The symbol consists of data regions which contain modules set out in a regular array. Large symbols contain several regions. Each data region is delimited by a finder pattern, and this is surrounded on all four sides by a quiet zone border (margin). (Note: The modules may be round or square- no specific shape is defined in the standard. For example, dot-peened cells are generally round.)
Data Matrix has an error rate of less than 1 in 10 million characters scanned.
Data Matrix is designed to be readable in inverted color.ISO/IEC 16022:2006, section 4.2
Data Matrix ECC 000–140 Older versions of Data Matrix include ECC 000, ECC 050, ECC 080, ECC 100, ECC 140. Instead of using Reed–Solomon codes like ECC 200, ECC 000–140 use a convolution-based error correction. Each varies in the amount of error correction it offers, with ECC 000 offering none, and ECC 140 offering the greatest. For error detection at decode time, even in the case of ECC 000, each of these versions also encode a cyclic redundancy check (CRC) on the bit pattern. As an added measure, the placement of each bit in the code is determined by bit-placement tables included in the specification. These older versions always have an odd number of modules, and can be made in sizes ranging from 9 × 9 to 49 × 49. All symbols utilizing the ECC 000 through 140 error correction can be recognized by the upper-right corner module being the inverse of the background color. (binary 1).
According to ISO/IEC 16022, "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."
Data Matrix ECC 200 ECC 200, the newer version of Data Matrix, uses Reed–Solomon codes for error and erasure recovery. ECC 200 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.
Symbols have an even number of rows and an even number of columns. Most of the symbols are square with sizes from 10 × 10 to 144 × 144. Some symbols however are rectangular with sizes from 8×18 to 16×48 (even values only). All symbols using the ECC 200 error correction can be recognized by the upper-right corner module being the same as the background color. (binary 0).
Additional capabilities that differentiate ECC 200 symbols from the earlier standards include: Specification of the character set (via Extended Channel Interpretations) Rectangular symbols Structured append (linking of up to 16 symbols to encode larger amounts of data)
Error correction ECC 200 codes use Reed–Solomon error correction over the finite field (or ), the elements of which are encoded as bytes of 8 bits; the byte with a standard numerical value encodes the field element where is taken to be a primitive element satisfying . The primitive polynomial is , corresponding to the polynomial number 301, with initial root = 1 to obtain generator polynomials. The Reed–Solomon code uses different generator polynomials over , depending on how many error correction bytes the code adds. The number of bytes added is equal to the degree of the generator polynomial.
For example, in the 10 × 10 symbol, there are 3 data bytes and 5 error correction bytes. The generator polynomial is obtained as: ,
which gives: ,
or with decimal coefficients: .
Byte encoding
The encoding process is described in the ISO/IEC standard 16022:2006.ISO e-commerce page for this standard http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=44230 Open-source software for encoding and decoding the ECC-200 variant of Data Matrix has been published.
The diagrams below illustrate the placement of the message data within a Data Matrix symbol. The message is "Wikipedia", and it is arranged in a somewhat complicated diagonal pattern starting near the upper-left corner. Some characters are split in two pieces, such as the initial W, and the third 'i' is in "corner pattern 2" rather than the usual L-shaped arrangement. Also shown are the end-of-message code (marked End), the padding (P) and error correctionc (E) bytes, and four modules of unused space (X).
The symbol is of size 16×16 (14×14 data area), with 12 data bytes (including 'End' and padding) and 12 error correction bytes. A (255,243,6) Reed Solomon code shortened to (24,12,6) is used. It can correct up to 6 byte errors or erasures.
To obtain the error correction bytes, the following procedure may be carried out:
The generator polynomial specified for the (24,12,6) code, is: , which may also be written in the form of a matrix of decimal coefficients: [1 242 100 178 97 213 142 42 61 91 158 153 41]
The 12-byte long message "Wikipedia" including 'End', P1 and P2, in decimal coefficients (see the diagrams below for the computation method using ASCII values), is: [88 106 108 106 113 102 101 106 98 129 251 147]
Using the procedure for Reed-Solomon systematic encoding, the 12 error correction bytes obtained (E1 through E12 in decimal) in the form of the remainder after polynomial division are: [104 216 88 39 233 202 71 217 26 92 25 232] These error correction bytes are then appended to the original message. The resulting coded message has 24 bytes, and is in the form: [W i k i p e d i a 'End' P1 P2 E1 E2 E3 E4 E5 E6 E7 E8 E9 E10 E11 E12] or in decimal coefficients: [88 106 108 106 113 102 101 106 98 129 251 147 104 216 88 39 233 202 71 217 26 92 25 232] and in hexadecimal coefficients: [58 6A 6C 6A 71 66 65 6A 62 81 FB 93 68 D8 58 27 E9 CA 47 D9 1A 5C 19 E8]
(Note the 58 6A 6C 6A 71 66 65 6A 62 is exactly off by one from the ASCII encoding of "Wikipedia" 57 69 6B 69 70 65 64 69 61. This is due to the data encoding, described in the next section.)
Data encoding Data matrix operates in units of 8-bit codewords ("bytes"). The default mode stores one ASCII character per 8-bit codeword and allows for using control codes to switch to other modes. Other modes return to the default mode when they are done encoding the data.
Codeword Codeword hexadecimal Interpretation 0 0 Not used 1–128 1-80 ASCII data (ASCII value + 1) 129 81 Pad 130–229 82-e5 Digit pairs 00–99 230 e6 Begin C40 encoding 231 e7 Begin Base 256 encoding 232 e8 FNC1 233 e9 Structured append. Allows a message to be split across multiple symbols. 234 ea Reader programming 235 eb Set high bit of the following character 236 ec 05 Macro 237 ed 06 Macro 238 ee Begin ANSI X12 EDI data encoding 239 ef Begin Text encoding 240 f0 Begin EDIFACT encoding 241 f1 Extended Channel Interpretation code 242–253 f2-fd Not used in ASCII encoding 254 fe In C40, Text or ANSI X12 encoding, acts as an Unlatch returning to ASCII encoding 255 ff Not used in ASCII encoding