Matrix 2 of 5 explained

Matrix 2 of 5 (also known as Code 2 of 5 Matrix.[1]) is a variable length, discrete, two width symbology. Matrix 2 of 5 is a subset of two-out-of-five codes. Unlike Industrial 2 of 5 code, Matrix 2 of 5 can encode data not only with black bars but with white spaces.

Matrix 2 of 5[2] [3] was developed in 1970-х by Nieaf Co.[4] in The Netherlands and commonly was uses for warehouse sorting, photo finishing, and airline ticket marking.[5]

Matrix 2 of 5 can encode only digits 0-9. Matrix 2 of 5 can include optional check digit. Most of barcode readers support this symbology.[6] [7]

Encoding

Matrix 2 of 5[8] is a subset of two-out-of-five codes family and uses wide and narrow elements for encoding. Unlike previously developed Industrial 2 of 5 it uses both black bars and white spaces for data encoding.[9] However, it has lower density then Interleaved 2 of 5 code, because it is discrete symbology and requires additional space between data patterns. Main advantage over Interleaved 2 of 5 codes is ability to encode odd number of characters in message.

Matrix 2 of 5 encodes only digits from 0 to 9 in three black bars and two white spaces, with every data pattern split by additional white space. Matrix 2 of 5 could include optional checksum character which is added to the end of the barcode.

Matrix 2 of 5 features:[10]

Four starting bars and spaces in pattern have own weights which encode value of the symbol (except zero). Also, last black bar is used as parity bit to avoid single error. Value of the symbol is a sum of nonzero weights of four first pattern elements.

Matrix 2 of 5 digits encoding
DigitBar weightBarsEncodingMnemonic (using weights)
1247Parity Bit
0 0 0 1 1 0 |▮ | NNWWN 4+7=11, replaced by 0
1 1 0 0 0 1 ▮|▮ WNNNW 1+0=1
2 0 1 0 0 1 | |▮ NWNNW 0+2=2
3 1 1 0 0 0 ▮ || WWNNN 1+2=3
4 0 0 1 0 1 |▮▮ NNWNW 4+0=4
5 1 0 1 0 0 ▮▮| WNWNN 1+4=5
6 0 1 1 0 0 | ▮| NWWNN 2+4=6
7 0 0 0 1 1 || ▮ NNNWW 7+0=7
8 1 0 0 1 0 ▮| | WNNWN 1+7=8
9 0 1 0 1 0 | | | NWNWN 2+7=9
N - narrow black bar or white space.
W - wide black bar or white space.
Narrow to wide components difference could be from 1/3 to 2/5.
Matrix 2 of 5 Start/Stop values! Value! Bars! Encoding
Start ▮|| WNNNN
Stop ▮|| WNNNN

The barcode has the following physical structure:[11]
1. Quiet zone 10X wide
2. Start character
3. Variable length digit characters, properly encoded
4. Optional check digit
5. Stop character
6. Quiet zone 10X wide

Checksum

Matrix 2 of 5 may include an optional check digit which is calculated as mod 10/3 checksum. Because specification of Matrix 2 of 5 does not require checksum any other checksum types could be used with the symbology. However mod 10/3 checksum is most common.

xcheck=10-((3x1+x2+3x3+x4+ … +x2n+3x2n+1)\pmod{10})

,
where

x1

is the most right data digit.

Example for the first 6 digits 423456:

Calculating the Industrial 2 of 5 checksum
Digit423456
Position

x6

x5

x4

x3

x2

x1

Weight131313
Weighted sum46312518
Check digit10 - (48 mod 10) = 2
Result: 4234562 barcode

Datalogic 2 of 5

Data Logic 2 of 5[12] (also known as Code 2 of 5 Datalogic,[13] China Post Code[14]) is proprietary Chinese version of Matrix 2 of 5 symbology developed by Datalogic.[15] It has difference from Matrix 2 of 5 code only in start/stop patterns usage and, in this way, it has all advantages and issues of Matrix 2 of 5.

Datalogic 2 of 5 was used mostly in Chinese Postal Services. Some readers currently still support this symbology[16]

Datalogic 2 of 5 Start/Stop values! Value! Bars! Encoding
Start || NNN
Stop ▮| WNN
N - narrow black bar or white space.
W - wide black bar or white space.

See also

External links

Notes and References

  1. Web site: Code 2 of 5 Matrix . www.smp-soft.com. https://web.archive.org/web/20210802181523/http://www.smp-soft.com/barcodes/code2of5-matrix-barcode.html . 2021-08-02 .
  2. Book: Roger C. Palmer . The Bar Code Book: Reading, Printing, and Specification of Bar Code Symbols . Helmers Pub . 50 . 1991. 9780911261059 .
  3. Book: Craig K. Harmon, Russ Adams . Reading Between the Lines: An Introduction to Bar Code Technology . Helmers Pub. . 243 . 1984 . 0911261001 .
  4. Book: Benjamin Nelson . Punched Cards to Bar Codes: A 200 Year Journey . Helmers Publishing Company . 302 . 1997 . 0911261125 .
  5. Book: Windows Developer's Journal V8 N1 . Miller Freeman, Incorporated . 29 . 1997.
  6. Web site: TS-200 Image Barcode Scanner User Manual . www.manualslib.com.
  7. Web site: EM2037-V4 OEM scan engine user guide . www.newland-id.com.
  8. Web site: Barcode Types Support . ABBYY Technology Portal. https://web.archive.org/web/20200921182331/https://abbyy.technology/en:features:ocr:barcodetypes . 2020-09-21 .
  9. Web site: Matrix 2 of 5 . www.n-barcode.com.
  10. Web site: 2 of 5 Matrix . www.suchymips.de. https://web.archive.org/web/20180504052421/http://www.suchymips.de/en/barcode-glossary-code-matrix.htm . 2018-05-04 .
  11. Web site: Barcode Guide: Matrix 2 of 5 . barcodeguide.seagullscientific.com.
  12. Book: Building IBM Enterprise Content Management Solutions From End to End . IBM Redbooks . 192 . 2014 . 978-0738439969 .
  13. Web site: 2 of 5 Datalogic . www.suchymips.de. https://web.archive.org/web/20160529210437/https://www.suchymips.de/en/barcode-glossary-datalogic.htm . 2016-05-29 .
  14. Web site: Datalogic 2 of 5 (China Post) . Barcode Guide.
  15. Book: David Bouda . RFID - und Barcodesysteme: Ein kritischer Vergleich unter besonderer Berücksichtigung logistischer Aspekte . diplom.de . 6 . 2012 . 978-3842823983 . German.
  16. Web site: DYscan 2D Barcode ScannerSetting Manual . sparkfun.com.