Matrix 2 of 5#Datalogic 2 of 5

File:Matrix2of5.svg

Matrix 2 of 5 (also known as Code 2 of 5 Matrix.{{cite web |url=http://www.smp-soft.com/barcodes/code2of5-matrix-barcode.html |title=Code 2 of 5 Matrix |website=www.smp-soft.com|archive-url=https://web.archive.org/web/20210802181523/http://www.smp-soft.com/barcodes/code2of5-matrix-barcode.html |archive-date=2021-08-02 }}) 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{{cite book |author=Roger C. Palmer |url=https://books.google.com/books?id=jxAZAQAAIAAJ |title=The Bar Code Book: Reading, Printing, and Specification of Bar Code Symbols |publisher=Helmers Pub |page=50 |date=1991| isbn=9780911261059 }}{{cite book |author=Craig K. Harmon, Russ Adams |url=https://books.google.com/books?id=aC4V42Ro5DMC |title=Reading Between the Lines: An Introduction to Bar Code Technology |publisher=Helmers Pub. |page=243 |date=1984 |isbn=0911261001 }} was developed in 1970-х by Nieaf Co.{{cite book |author=Benjamin Nelson |url=https://books.google.com/books?id=kyoeAQAAMAAJ |title=Punched Cards to Bar Codes: A 200 Year Journey |publisher=Helmers Publishing Company |page=302 |date=1997 |isbn=0911261125 }} in The Netherlands and commonly was uses for warehouse sorting, photo finishing, and airline ticket marking.{{cite book |url=https://books.google.com/books?id=OyJMAAAAYAAJ |title=Windows Developer's Journal V8 N1 |publisher=Miller Freeman, Incorporated |page=29 |date=1997}}

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.{{citation |title=TS-200 Image Barcode Scanner User Manual}}{{cite web |url=https://www.newland-id.com/sites/default/files/documents/2021-02/em2037_v4_user_guide_v1.0.4.pdf#page=116 |title=EM2037-V4 OEM scan engine user guide |website=www.newland-id.com}}

Encoding

Matrix 2 of 5{{cite web |url=https://abbyy.technology/en:features:ocr:barcodetypes |title=Barcode Types Support |website=ABBYY Technology Portal|archive-url=https://web.archive.org/web/20200921182331/https://abbyy.technology/en:features:ocr:barcodetypes |archive-date=2020-09-21 }} 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.{{cite web |url=http://www.n-barcode.com/en/shurui/m-25.html |title=Matrix 2 of 5 |website=www.n-barcode.com}} 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:{{cite web |url=http://www.suchymips.de/en/barcode-glossary-code-matrix.htm |title=2 of 5 Matrix |website=www.suchymips.de|archive-url=https://web.archive.org/web/20180504052421/http://www.suchymips.de/en/barcode-glossary-code-matrix.htm |archive-date=2018-05-04 }}

  • 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.

class="wikitable" border="1" style="text-align:center"

|+ Matrix 2 of 5 digits encoding

rowspan=2| Digit

!colspan=5 rowspan=1| Bar weight

!rowspan=2| Bars

!rowspan=2| Encoding

!rowspan=2| Mnemonic (using weights)

1

! 2

! 4

! 7

! Parity Bit

000110{{pipe}}▮ {{pipe}}NNWWN4+7=11, replaced by 0
110001▮{{pipe}}▮WNNNW1+0=1
201001{{pipe}} {{pipe}}▮NWNNW0+2=2
311000▮ {{pipe}}{{pipe}}WWNNN1+2=3
400101{{pipe}}▮▮NNWNW4+0=4
510100▮▮{{pipe}}WNWNN1+4=5
601100{{pipe}} ▮{{pipe}}NWWNN2+4=6
700011{{pipe}}{{pipe}} ▮NNNWW7+0=7
810010▮{{pipe}} {{pipe}}WNNWN1+7=8
901010{{pipe}} {{pipe}} {{pipe}}NWNWN2+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.

class="wikitable" border="1" style="text-align:center; width: 20em"

|+ Matrix 2 of 5 Start/Stop values

! Value

! Bars

! Encoding

Start▮{{pipe}}{{pipe}}WNNNN
Stop▮{{pipe}}{{pipe}}WNNNN

The barcode has the following physical structure:{{cite web |url=https://barcodeguide.seagullscientific.com/Content/Symbologies/Matrix_2_of_5.htm |title=Barcode Guide: Matrix 2 of 5 |website=barcodeguide.seagullscientific.com}}


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.


x_{check} = 10 - ((3x_1 + x_2 + 3x_3 + x_4 +\cdots+ x_{2n} + 3x_{2n+1})\pmod{10}),


where x_1 is the most right data digit.

Example for the first 6 digits 423456:

class="wikitable" border="1" style="text-align:center"

|+ Calculating the Industrial 2 of 5 checksum

scope="row"|Digit

|4||2||3||4||5||6

scope="row"|Position

|x_6||x_5||x_4||x_3||x_2||x_1

scope="row"|Weight

|1||3||1||3||1||3

scope="row"|Weighted sum

|4||6||3||12||5||18

scope="row"|Check digit

|colspan="6"| 10 - (48 mod 10) = 2

Result: 4234562 barcode

Datalogic 2 of 5

File:DataLogic2of5.svg

Data Logic 2 of 5{{cite book |url=https://books.google.com/books?id=jYwBBQAAQBAJ&pg=PA192 |title=Building IBM Enterprise Content Management Solutions From End to End |publisher=IBM Redbooks |page=192 |date=2014 |isbn=978-0738439969 }} (also known as Code 2 of 5 Datalogic,{{cite web |url=https://www.suchymips.de/en/barcode-glossary-datalogic.htm |title=2 of 5 Datalogic |website=www.suchymips.de|archive-url=https://web.archive.org/web/20160529210437/https://www.suchymips.de/en/barcode-glossary-datalogic.htm |archive-date=2016-05-29 }} China Post Code{{cite web |url=https://barcodeguide.seagullscientific.com/Content/Symbologies/Datalogic_2_of_5.htm |title=Datalogic 2 of 5 (China Post) |website=Barcode Guide}}) is proprietary Chinese version of Matrix 2 of 5 symbology developed by Datalogic.{{cite book |author=David Bouda |url=https://books.google.com/books?id=FV5kAQAAQBAJ&pg=PA6 |title=RFID - und Barcodesysteme: Ein kritischer Vergleich unter besonderer Berücksichtigung logistischer Aspekte |publisher=diplom.de |page=6 |date=2012 |isbn=978-3842823983 |language=German}} 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{{cite web |url=https://cdn.sparkfun.com/assets/b/5/0/e/e/DY_Scan_Setting_Manual-DE2120___19.4.6___.pdf#page=65 |title=DYscan 2D Barcode ScannerSetting Manual |website=sparkfun.com}}

class="wikitable" border="1" style="text-align:center; width: 20em"

|+ Datalogic 2 of 5 Start/Stop values

! Value

! Bars

! Encoding

Start{{pipe}}{{pipe}}NNN
Stop▮{{pipe}}WNN

N - narrow black bar or white space.


W - wide black bar or white space.

See also

References

{{reflist|32em}}