MSI Barcode
Encyclopedia
MSI is a barcode
symbology
developed by the MSI Data Corporation, based on the original Plessey Code
symbology. It is a continuous symbology that is not self-checking. MSI is used primarily for inventory control, marking storage containers and shelves in warehouse environments.
To produce a barcode image from this map, one simply must consider the digit 1 to be a black bar and the digit 0 to be a white bar and produce an image accordingly.
:
12345674
The Mod 10 check digit algorithm
uses the Luhn algorithm
.
Let S be the reverse of the string to be encoded
S = 7654321
2. The string is then "weighted" using a repeating weighting factor pattern. There are two modulo 11 algorithms which use different repeated weighting factor patterns: the IBM
algorithm which uses (2,3,4,5,6,7), and the NCR
algorithm which uses (2,3,4,5,6,7,8,9). Get the sum of the string by looping through each character and multiply it by a weight from 2 to 7 (IBM) or 2 to 9 (NCR) depending on its position. If the weight's value exceeds the highest number (7 or 9), reset the weight back to 2.
This example is using the IBM modulo 11 algorithm with a weighting pattern of (2,3,4,5,6,7)
Let X = the final product of the string to encode.
X = 7 * 2
X = 6 * 3
X = 5 * 4
X = 4 * 5
X = 3 * 6
X = 2 * 7
X = 1 * 2
X = 14 + 18 + 20 + 20 + 18 + 14 + 2
X = 106
3. Mod the sum by 11, subtract the result from 11, and then apply the mod 11 function again.
Let C equal the check digit.
C = (11 - (X mod 11)) mod 11
C = (11 - (106 mod 11)) mod 11
C = (11 - 7) mod 11
C = 4 mod 11
C = 4
The check digit is 4.
The check digit (as calcuated above) for this sequence is 4.
Once you have calculated your check digit, simply map each character in the string to be encoded using the table above as a reference to get the binary map of the bar code; remember to precede the code with "start" and to end it with "stop" For example, to map the string 1234567 with a Mod 10 check digit it would produce the following binary map:
This results in the following barcode:
Barcode
A barcode is an optical machine-readable representation of data, which shows data about the object to which it attaches. Originally barcodes represented data by varying the widths and spacings of parallel lines, and may be referred to as linear or 1 dimensional . Later they evolved into rectangles,...
symbology
Symbology
Symbology concerns the study of symbols.Symbology may also refer to:-Academics:* Semiotics, study of signs and symbols* Iconography, branch of art history which studies images...
developed by the MSI Data Corporation, based on the original Plessey Code
Plessey Code
Plessey Code is a 1D linear barcode symbology based on pulse width modulation, developed in 1971 by The Plessey Company plc, a British-based company. It is one of the first barcode symbology, and is still used in some rare libraries and for shelf tags in retail stores, in part as a solution to...
symbology. It is a continuous symbology that is not self-checking. MSI is used primarily for inventory control, marking storage containers and shelves in warehouse environments.
Character set and binary lookup
The MSI character set consist of the numbers 0..9 as well as two "guard" characters (representing the beginning and end of the barcode). The symbology does not support alphabetic characters.Binary mapping
Each digit and guard character is represented by a binary number, as shown in the table below.Character | Map |
---|---|
Start | 110 |
0 | 100100100100 |
1 | 100100100110 |
2 | 100100110100 |
3 | 100100110110 |
4 | 100110100100 |
5 | 100110100110 |
6 | 100110110100 |
7 | 100110110110 |
8 | 110100100100 |
9 | 110100100110 |
Stop | 1001 |
To produce a barcode image from this map, one simply must consider the digit 1 to be a black bar and the digit 0 to be a white bar and produce an image accordingly.
Check digit calculation
The MSI barcode uses one of five possible schemes for calculating a check digitCheck digit
A check digit is a form of redundancy check used for error detection, the decimal equivalent of a binary checksum. It consists of a single digit computed from the other digits in the message....
:
- No check digit (least common)
- ModModulo operationIn computing, the modulo operation finds the remainder of division of one number by another.Given two positive numbers, and , a modulo n can be thought of as the remainder, on division of a by n...
10 (most common) - Mod 11
- Mod 1010
- Mod 1110
Mod 10 Check Digit
When using the Mod 10 check digit algorithm, a string to be encoded 1234567 will be printed with a check digit of 4:12345674
The Mod 10 check digit algorithm
uses the Luhn algorithm
Luhn algorithm
The Luhn algorithm or Luhn formula, also known as the "modulus 10" or "mod 10" algorithm,is a simple checksum formula used to validate a variety of identification numbers, such as credit card numbers, IMEI numbers, National Provider Identifier numbers in US and Canadian Social Insurance Numbers...
.
Mod 11 Check Digit
1. Reverse the string to be encoded (in this case 1234567).Let S be the reverse of the string to be encoded
S = 7654321
2. The string is then "weighted" using a repeating weighting factor pattern. There are two modulo 11 algorithms which use different repeated weighting factor patterns: the IBM
IBM
International Business Machines Corporation or IBM is an American multinational technology and consulting corporation headquartered in Armonk, New York, United States. IBM manufactures and sells computer hardware and software, and it offers infrastructure, hosting and consulting services in areas...
algorithm which uses (2,3,4,5,6,7), and the NCR
NCR Corporation
NCR Corporation is an American technology company specializing in kiosk products for the retail, financial, travel, healthcare, food service, entertainment, gaming and public sector industries. Its main products are self-service kiosks, point-of-sale terminals, automated teller machines, check...
algorithm which uses (2,3,4,5,6,7,8,9). Get the sum of the string by looping through each character and multiply it by a weight from 2 to 7 (IBM) or 2 to 9 (NCR) depending on its position. If the weight's value exceeds the highest number (7 or 9), reset the weight back to 2.
This example is using the IBM modulo 11 algorithm with a weighting pattern of (2,3,4,5,6,7)
Let X = the final product of the string to encode.
X = 7 * 2
X = 6 * 3
X = 5 * 4
X = 4 * 5
X = 3 * 6
X = 2 * 7
X = 1 * 2
X = 14 + 18 + 20 + 20 + 18 + 14 + 2
X = 106
3. Mod the sum by 11, subtract the result from 11, and then apply the mod 11 function again.
Let C equal the check digit.
C = (11 - (X mod 11)) mod 11
C = (11 - (106 mod 11)) mod 11
C = (11 - 7) mod 11
C = 4 mod 11
C = 4
The check digit is 4.
Mod 1010 check digit
Simply calculate the Mod 10 check digit the first time and then calculate it again with the previous result and append the result of the second Mod 10 Calculation to the string to be encoded.Mod 1110 check digit
Same as Mod 1010 but the first calculation should be a Mod 11 Check digit.Example
As an example, we will generate an MSI barcode for the number sequence 1234567 using the most common Mod 10 check digit methodology.The check digit (as calcuated above) for this sequence is 4.
Once you have calculated your check digit, simply map each character in the string to be encoded using the table above as a reference to get the binary map of the bar code; remember to precede the code with "start" and to end it with "stop" For example, to map the string 1234567 with a Mod 10 check digit it would produce the following binary map:
Character | Map | Comment |
---|---|---|
Start | 110 | The start character |
1 | 100100100110 | The number 1 |
2 | 100100110100 | The number 2 |
3 | 100100110110 | The number 3 |
4 | 100110100100 | The number 4 |
5 | 100110100110 | The number 5 |
6 | 100110110100 | The number 6 |
7 | 100110110110 | The number 7 |
4 | 100110100100 | The check digit 4 |
Stop | 1001 |
This results in the following barcode:
External links
- MSI Bar code
- Barcode Island: MSI
- Free Online MSI Plessey Barcode Generator
- .NET MSI Plessey Barcode Generator
- MSI Barcode Generator for Java