The text of a manual · part 14 of 16
IDAutomation SC7 USB 2D Scanner Programming Manual: String Format, pages 112 to 120
Pages 112 to 120 of 137, from IDAutomation SC7 USB 2D Scanner Programming Manual
The original document is the PDF (2.8 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the ID Automation SC7
Page 112
OCR Templates You can create a custom “template,” or character string that defines the length and content of OCR strings that will be read with your scanner. There are several choices when creating a custom template for your application. You can create a template for a single format, you can string together several formats, and you can create a template for a user-defined variable. These choices are described in detail below.
Creating an OCR Template A single template allows you to program the scanner to read any combination of characters in the order you specify. Refer to examples that follow the Template Characters table below.
Template Characters
Note: OCR templates default to eight digits, no check character. To Add an OCR Template: 1. Turn on the OCR font you want to read. 2. Begin building the template. 108
Page 113
3. Scan the Enter OCR Template symbol. 4. Scan the characters for the string. Use the Template Characters chart above to determine what characters you need to create your format. Use the OCR Programming Chart to scan the characters for your template. Example: You need to read any combination of eight digits. The template would be: dddddddd To create this template, you would enable the OCR-A font. Scan the Enter OCR Template symbol , then scan the d from the OCR Programming Chart in the back of this manual eight times. Scan Save OCR Template This would let you read any string of eight digits, for example:
Character Match Sequences On the ASCII Chart, find the Hex value that represents the character(s) you want to match. Example: You need to read three digits, three specific characters (ABC), three digits. The template would be:
109
Page 114
To create this template, you would enable the OCR-A font. Scan the Enter OCR Template symbol. Scan the d from the OCR Programming Chart in the back of this manual three times. Then scan 414243 from the inside back cover (the hex characters for “A,” “B,” and “C”), and scan the d three more times. Scan Save OCR Template. This would let you read any string of three digits, “ABC,” then any string of three digits, for example:
Adding Spaces You may also need to put spaces in your template. Example: You need to read three digits, space, three specific characters (ABC), space, three digits. The template would be:
To create this template, you would enable the OCR-A font. Scan the Enter OCR Template symbol. Scan the d from the OCR Programming Chart in the back of this manual three times, then scan 2041424320 from the inside back cover (the hex characters for “space,” “A,” “B,” “C,” “space”). Scan the d three more times, then scan Save OCR Template . This would let you read any string of three digits space, “ABC,” space, then any string of three digits. For example:
Note: If using Quick*View to program, use the space bar to designate a space and not the hex value of 20.4. Exit OCR Template Editor Scan Save OCR Template to save your entries. Discard OCR Template exits without saving any OCR Template changes. 110
Page 115
Stringing Together Multiple Formats (Creating “Or” Statements) You may want to program the scanner to accept many OCR formats. To do this, you would string together each format with a “t.” This tells the scanner to read optical characters that match any one of the formats in the template. Example: You need to read any combination of eight digits, or a combination of four digits, two uppercase letters, and two digits. The template would be: ddddddddtddddlldd To create this template, you would enable the OCR-A font. Scan the Enter OCR Template symbol. Scan the d from the OCR Programming Chart in the back of this manual eight times, then scan the t to create the “or” statement. Then you would scan the characters for the second template. Scan d four times, scan l two times, then scan d two more times. Scan Save OCR Template. This would let you read either type of format, for example:
You can string together as many templates as you need.
111
Page 116
OCR User-Defined Variables You can create up to two of your own user variables for an OCR template. These variables will represent any OCR readable characters. The user-defined variables are stored under the letters “g” and “h.” Creating a user variable follows the same steps as creating a template, but instead of scanning the Enter OCR Template symbol, you scan the Enter User-Defined Variable symbol. The letters g and h can then be used in an OCR template to define the variable you specified. Example: You need a variable to represent the letters “A,” “B,” or “C.” The template for this variable would be: 414243 To create this template, you would enable the OCR-A font. Scan the Enter User-Defined Variable g symbol. Scan 414243 (the hex characters for “A,” “B,” and “C”). Scan Save OCR Template . This will let you read either A or B or C in any position where you place the g. For example, you could create the following template: ddddddggg This template would then let you read data that began with six digits, and had an A, B, or C trailing. So you would be able to read:
112
Page 117
Reading Multi-Row OCR The scanner is capable of decoding multi-row OCR text. Note: Reading rows longer than sixteen characters is not recommended. Example: You need to read multiple rows of OCRA data as shown below:
First, enable the OCR-A font. To read the first row of OCR data, you would program the following template: OCRTMP"dddddddd". This template is the default OCR template. If you wanted to read the second line of data, you would use the following template: OCRTMP"llllllll". To read both lines of OCR at one time, use the variable r to indicate the start of a new row. All the other templating variables for the individual rows work the same as previously described. For instance, in the above example, you would use the following template to read both rows: OCRTMP"ddddddddrllllllll". To read the three rows below, you would use the template command "OCRTMP"ddddddddrllllllllrlllldddd".
113
Page 118
OCR Check Character You may want to print and verify a check character in order to enhance the security of your OCR application. The scanner can be programmed for almost any type of check character. A number of presets are provided for common check character uses (e.g., modulo 10 and modulo 36). Scan the OCR Modulo 10 or OCR Modulo 36 Check Character barcode to specify the type of check character used in the OCR strings you’re scanning. The scanner will then only read OCR character strings with a valid check character. The scanner transmits the OCR data without the check character data. You must specify the location of the check character in the template with a c. Example: You need to read any combination of seven digits, with a modulo 10 check character in the eighth position. The template would be: dddddddc To create this template, you would enable the OCR-A font. Scan the Modulo 10 Check Character symbol. Then scan the Enter OCR Template symbol, and scan the d from the OCR Programming Chart seven times, and scan the c once. Scan Save OCR Template . This template will let you read any combination of six digits with a correct check character after. (If the check character is invalid, the scanner will issue an error beep.) For example, the following string could be scanned:
and the output would be: 0123456
114
Page 119
OCR Modulo 10 Check Character Scan this symbol to program the OCR template for a simple modulo 10 checksum of the digits 0 through 9.
OCR Modulo 36 Check Character Scan this symbol to program the OCR template for a simple modulo 36 checksum of the digits 0 through 9 and the letters A through Z.
115
Page 120
OCR User-Defined Check Character You can customize the check character calculation to suit your application. Each character of the check character alphabet can be programmed in its proper order. The number of characters you enter determines the modulo value for the calculation. By default, the check character computation is unweighted, but the scanner also supports two weighted modulo 10 checking schemes. Example: To program a modulo 11 check character, you would enter the following 11 characters in order: 0123456789X Also enter the OCR template: dddddddc Enable the OCR-A font, then scan the following string:
The scanner performs the following check character computation: (6 + 5 + 1 + 2 +3 + 5 + 1 + X) modulo 11 = 0 Since the result is zero, the message is considered to be valid, so the reader outputs the message: 6512351
Programming a User-Defined Check Character 1. Scan the Enter OCR Check Character barcode, below:
Enter OCR Check Character OCR Modulo 36 Check Character Enter OCR Check Character 2. Enter the characters in order. For each character, look up the corresponding hex value from the ASCII Chart. 116