User manual
V002450_25_CR1200-CR2-CR3-CR2500-CR3500_Interface_Configuration_Document_CLIENT.docx
2011-04-27 Page 56 of 65
© 2011 The Code Corporation
•
14870 S. Pony Express Rd., Suite 200, Bluffdale, UT 84065
•
(801) 495-2200
•
FAX (801) 495-0280
code 133), while the block checksum is a mod 36 with a 137 weight (control code 255). The following
template will read this text:
1,2,6,6,6,6,13,133,2,6,6,6,13,133,13,255,0
The top line checksum is the 6 at the end of the line. While this example shows the checksum at the end
of the line, it may appear anywhere on the line and then protects all the characters to its left. The
following sum is generated to verify a proper checksum on line 1:
‘6’ ‘D’ ‘C’ ‘B’ ‘A’
(1x6)+(3x13)+(1x12)+(3x11)+(1x10) = 100
Note the 13 weight scheme starting with a 1 on the checksum digit, and then alternating between a 1 and
3 for all digits to the left of the checksum up to the first character on the line. The numerical values of
the alphabetic characters range from 10 for an ‘A’ up to a 36 for a ‘Z’. The sum of 100 is a multiple of
10, so the mod 10 checksum here has passed.
On line 2, the row checksum is the 5 following the G. Verifying its line by generating its sum:
’5’ ‘G’ ‘F’ ‘E’
(1x5)+(3x16)+(1x15)+(3x14) = 110
Again, we have obtained a value that is a multiple of 10, validating this row checksum.
The X at the end of the line is a mod 36 block checksum with 137 weighting. It protects all the
characters in the template, including the first line. Calculating its sum working backwards from the
block checksum and using the 137 weighting scheme:
‘X’ ‘5’ ‘G’ ‘F’ ‘E’ ‘6’ ‘D’ ‘C’ ‘B’ ‘A’
(1x34)+(3x5)+(7x16)+(1x15)+(3x14)+(7x6)+(1x13)+(3x12)+(7x11)+(1x
10) = 396
The resulting sum is a multiple of 36, so the block checksum has been validated.
12.4.14.3 Multiple Individual Templates
A single template may contain multiple individual templates. For example consider the following two
distinct OCR text strings that are to be read with the same template:
A1234 B5678
The first string is in OCR-A font while the second is OCR-B. Assume that the ‘A’ and ’B’ are always
present as the first character of the two strings and that the 4 numeric characters may be any digits. A
user may code these up as two distinct templates with the following:
1,1,65,5,5,5,5,1,2,66,5,5,5,5,0