Zebra CPCL Programming Manual - Step 2:
P5-4
Mobile Printer CPCLProgramming Manual
The checksum is the last number in the bar code and
can be used to make certain that the bar code is decoded
properly. This digit is
automatically
calculated by the
printer. The UPC bar code specification has the full
instructions for calculating this checksum. The methodol-
ogy is as follows:
For this example, the bar code will be 01234567890.
Step 1: Starting at the left, including the number system
character, add up all the numbers in the ODD posi-
tions. (0 + 2+ 4 + 6 + 8 + 0 = 20)
Step 2:
Multiply this sum by 3. (20 x 3 = 60)
Step 3: Starting at the left again, add up all the numbers
in the EVEN positions. (1 + 3 + 5 + 7 + 9 = 25).
Step 4: Add the results from step 2 and step 3. (60 + 25
= 85)
Step 5: The checksum is the smallest number when
added to step 4 will equal a multiple of ten. In our
example: 85 + 5 = 90, which is a multiple of 10.
Therefore, the check digit should be 5. It is called a
modulo checksum because you take the modulo, or
remainder, of the sum. For the programmers, it is:
10 - (85 mod 10) = the checksum.
UPC-A and EAN13 bar codes can be created with and
without a checksum supplied. If the programmer supplies
a checksum digit, the printer will create the bar code with
that check digit,
even if it is incorrect
. Most laser scan-
ning devices will not be able to decode the bar code if the
check digit is incorrect,
UPC-E bar codes, useful for small items like candy and
gum, are created through the method of “zero suppres-
sion.” For example, if you were to encode 01000000567,
the resulting bar code would be a compressed bar code