Barcode

Message Forum

Symbology
Specifications

News

Links

Barcode Printers

Services

Contact Us

Legal Info

Privacy Policy

MSI SYMBOLOGY

See Also:    Symbology Index



Quick Links:    Background    Check Digit    Encoding    Structure    Encoding Table    Example


BACKGROUND INFORMATION

MSI was developed by the MSI Data Corporation, based on the original Plessey Code. MSI, also known as Modified Plessey, is used primarily to mark retail shelves for inventory control. MSI is a continuous, non-self-checking symbology. While the length of an MSI bar code can be of any length, a given application usually implements a fixed-length code.

A typical MSI bar code is:

MSI, and other symbologies based on Pulse-Width Modulation, offer no significant benefit over more modern symbologies. While it is not a bad idea to support MSI for legacy bar codes, most new applications do not choose MSI as their symbology of choice.

COMPUTING THE CHECKSUM DIGIT

MSI uses one or two check digits, which may be calculated in a number of different ways. As such, it is really up to the software application to implement and check the check digit(s).

The most common methods of calculating MSI check digits are:

    Modulo 10

    Some sources indicate that all MSI bar codes contain a modulo 10 check digit. However, other sources indicate that the bar code may use either Modulo 10, Modulo 11, or both.

    In any case, this is not a normal Modulo 10 as you are probably used to-it's a rather strange process. To calculate the modulo 10 checksum digit, use the following steps:

    1. Create a new number using every other digit from the original code such that the right-most digit of the new number is the right-most digit of the old number. For example, in the bar code above the data we encoded was "8052". In this case, the "new number" is 02.
    2. Take the new number calculated in step 1 and multiply it by 2. In this case, 02 * 2 is 4.
    3. Add the digits of the value calculated in the previous step (4), and add it to the digits that were not used in step 1 to form the new number. In our example, this would be 4 + 8 + 5 = 17. The "4" comes from step 2, the 8 and 5 come from the "8052" and are the digits that weren't used to form the new number in step 1. If the result from step 2 were, for example, 123, then we'd add 1 + 2 + 3 = 6 (plus the digits that weren't used from step 1).
    4. Do a modulo 10 calculation on the result of step 3. In this case, 17 modulo 10 = 7.
    5. The check digit is the value which, added to the result in step 4, equals 10. In this case, we must add 3 to 7 to get 10-so the check digit is 3. This explains why the example bar code above has a trailing "3" on it.

    2 Modulo 10

    The "2 Modulo 10" method essentially means the MSI bar code has two Modulo 10 checksum digits. The first Modulo 10 checksum digit is calculcated as described above and appended to the bar code.

    The second Modulo 10 checksum digit is calculcated by taking the new bar code (including the first modulo 10 checksum digit) and repeating the modulo 10 checksum digit process. You are essentially performing a modulo 10 checksum on the bar code that already has a single modulo 10 checksum appended to it. This checksum digit is appended after the first checksum digit.

    Modulo 11

    Another method used to calculate a check digit is a Modulo 11 approach. This approach is significantly different than the method used to calculate the Modulo 10 check digit above. To calculate the Modulo 11 check digit, use the following process:

    1. Assign a weight to each character in the code, starting with a weight of 2 in the right-most position and incrementing by one as you move to the left. After you reach a weight of 7, the next digit will have a weight of 2 (i.e., weighting goes from 2 to 7 and then wraps around back to 2).
    2. Multiply the value of each character by its weight, and sum the result of all the characters.
    3. Perform a modulo 11 on the result of step 2.
    4. The modulo 11 checksum is that value which must be added to the result of step 3 in order to arrive at a total of 11.

    For example, if the original message was 80523, the modulo 11 checksum digit would be calculated as follows:

      MESSAGE 8 0 5 2 3
      Weight 6 5 4 3 2
      Weighted Value 48 0 20 6 6

    Above, we've multiplied each character in the message by its weight depending on its position. We then sum the weighted values 48 + 0 + 20 + 6 + 6 = 80. 80 modulo 11 is 3. The number which must be added to 3 to arrive at 11 is 8, so the checksum digit is 8.

    Modulo 11/Modulo 10

    Another method that implements a double checksum involves taking the original bar code and running it through the Modulo 11 checksum digit process. The calculcated checksum is then apended to the bar code.

    The new bar code, with the modulo 11 checksum appended, is then run through the modulo 10 checksum process. The calculcated checksum is then appended to the new bar code such that the bar code consists of the original data followed by a modulo 11 checksum digit followed by a modulo 10 checksum digit.

ENCODING THE SYMBOL

In the following text, we will discuss the encoding of the bar code by considering that the number "1" represents a "dark" or "bar" section of the bar code whereas a "0" represents a "light" or "space" section of the bar code. Thus the numbers 1101 represents a double-wide bar (11), followed by a single-wide space (0), followed by a single-wide bar (1). This would be printed in the bar code as:


STRUCTURE OF AN MSI BARCODE

An MSI bar code has the following structure:

  1. A start character which is a wide bar followed by a narrow space.
  2. Any number of characters encoded from the table below.
  3. Checksum digit(s), calculated as described above and encoded from the table below.
  4. A stop character, which is a narrow bar, a wide space, then a narrow bar.

CODE 11 ENCODING TABLE

This table indicates how to encode each digit of an MSI bar code. Note that the "Width Encoding" column is expressed as "0" (narrow bar followed by wide space) or "1" (wide bar followed by narrow space) while the "Barcode Encoding" column represents how the bar code will actually be encoded as described above in "Encoding the Symbol."

For example, the character 1 is defined as "0001" by Code MSI. This means a "Narrow bar, wide space, narrow bar, wide space, narrow bar, wide space, wide bar, narrow space." We convert this to "100100100110" in the "Barcode Encoding" column which is consistent with the method we've used to express bar code formats in other documents on this site.

    ASCII
    CHARACTER
    WIDTH
    ENCODING
    BARCODE
    ENCODING
    00000100100100100
    10001100100100110
    20010100100110100
    30011100100110110
    40100100110100100
    50101100110100110
    60110100110110100
    70111100110110110
    81000110100100100
    91001110100100110
    Start-110
    Stop-1001

    NOTE 1: A quick study of the "Width Encoding" will reveal that the bar widths are simply encoded as their binary representation. That is, the number 5 in binary is 0101 which is exactly the widths encoded in the bar code for the character "5". In this sense, MSI is one of the simplest and most intuitively obvious symbology that there is. This makes up for the convoluted method it uses for calculating its modulo 10 check digit.

MSI ENCODING EXAMPLE

We will now code the example we used above, 80523. Remember that the original message was just 8052, but that we appended the checksum digit in the example above.

  1. The START character: 110.
  2. The digit "8": enocded as 110100100100.
  3. The digit "0": enocded as 100100100100.
  4. The digit "5": enocded as 100110100110.
  5. The digit "2": enocded as 100100110100.
  6. The checksum digit "3": enocded as 100100110110.
  7. The STOP character: 1001.

This is shown in the following graphical representation where the bar code has been sectioned-off into areas that reflect each of the 7 components just mentioned.


© Copyright 2006 BarCodeIsland.com, Inc. All Rights Reserved.
Information provided "as-is" without warranty. Please
see details.
Contact us for usage and copy permission.