Matrix 2 of 5

From HandWiki
Matrix 2 of 5 barcode

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]

  • character set is a number (0-9);
  • encoding density moderate: barcode length on 11% longer than Interleaved 2 of 5 symbology and on 82% than Code 128;
  • variable length of symbol;
  • can include optional checking character.

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
Digit Bar weight Bars Encoding Mnemonic (using weights)
1 2 4 7 Parity 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:
1. Start character
2. Variable length digit characters, properly encoded
3. Stop character

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.
[math]\displaystyle{ x_{n+1} = 10 - ((3x_1 + x_2 + 3x_3 + x_4 +\cdots+ 3x_{2n-1} + x_{2n})\pmod{10}) }[/math]

Example for the first 6 digits 123456:
10 - ((3*1 + 2 + 3*3 + 4 + 3*5 + 6) mod 10) = 1. Check digit is 1.
Result: 1234561 barcode

Datalogic 2 of 5

Datalogic 2 of 5 barcode

Data Logic 2 of 5[11] (also known as Code 2 of 5 Datalogic,[12] China Post Code[13]) is proprietary Chinese version of Matrix 2 of 5 symbology developed by Datalogic.[14] 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[15]

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

References

  1. "Code 2 of 5 Matrix". http://www.smp-soft.com/barcodes/code2of5-matrix-barcode.html. 
  2. Roger C. Palmer (1991). The Bar Code Book: Reading, Printing, and Specification of Bar Code Symbols. Helmers Pub. p. 50. ISBN 9780911261059. https://books.google.com/books?id=jxAZAQAAIAAJ. 
  3. Craig K. Harmon, Russ Adams (1984). Reading Between the Lines: An Introduction to Bar Code Technology. Helmers Pub.. p. 243. ISBN 0911261001. https://books.google.com/books?id=aC4V42Ro5DMC. 
  4. Benjamin Nelson (1997). Punched Cards to Bar Codes: A 200 Year Journey. Helmers Publishing Company. p. 302. ISBN 0911261125. https://books.google.com/books?id=kyoeAQAAMAAJ. 
  5. Windows Developer's Journal V8 N1. Miller Freeman, Incorporated. 1997. p. 29. https://books.google.com/books?id=OyJMAAAAYAAJ. 
  6. "TS-200 Image Barcode Scanner User Manual". ftp://ftp.partner-tech.eu/Scanner/Themis/TS-2X0/TS-200/Manual/TS-200_UserManual_EN_V1.1.2.pdf#page=50. 
  7. "EM2037 Series OEM Scan Engine User Guide". https://www.newland-id.com/wp-content/uploads/2019/08/EM2037_User_Guide.pdf#page=81. 
  8. "Barcode Types Support". https://abbyy.technology/en:features:ocr:barcodetypes. 
  9. "Matrix 2 of 5". http://www.n-barcode.com/en/shurui/m-25.html. 
  10. "2 of 5 Matrix". https://www.suchymips.de/en/barcode-glossary-code-matrix.htm. 
  11. Building IBM Enterprise Content Management Solutions From End to End. IBM Redbooks. 2014. p. 192. ISBN 978-0738439969. https://books.google.com/books?id=jYwBBQAAQBAJ&pg=PA192. 
  12. "2 of 5 Datalogic". https://www.suchymips.de/en/barcode-glossary-datalogic.htm. 
  13. "Datalogic 2 of 5 (China Post)". https://barcodeguide.seagullscientific.com/Content/Symbologies/Datalogic_2_of_5.htm. 
  14. David Bouda (2012) (in German). RFID - und Barcodesysteme: Ein kritischer Vergleich unter besonderer Berücksichtigung logistischer Aspekte. diplom.de. p. 6. ISBN 978-3842823983. https://books.google.com/books?id=FV5kAQAAQBAJ&pg=PA6. 
  15. "DYscan 2D Barcode ScannerSetting Manual". https://cdn.sparkfun.com/assets/b/5/0/e/e/DY_Scan_Setting_Manual-DE2120___19.4.6___.pdf#page=65. 

External links