The text of a manual · part 16 of 26
Videx BASIC for DuraTrax, LaserLite, LaserLite Pro, and LaserLite Mx Data Collectors, pages 151 to 160
Pages 151 to 160 of 252
The original document is the PDF (765 KB). 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 Videx DuraTrax, Videx LaserLite, Videx LaserLite Mx and Videx LaserLite Pro
Page 151
OPTION Statement • Action Sets the value of an environment option. • Syntax OPTION ( optionnumber% ) = integerexpression% • Parameters Argument optionnumber% integerexpression%
Description The option number. The value to which the option should be set. For options less than 128, this is any non-zero value to enable the option and zero to disable the option. Options greater than 128 can be set to a value within the specified range.
• Remarks Following is a list of available options: Option Read Code 3 of 9
Number
Range
8
True 1-False 0
Default 1 (True)
Enables reading Code 3 of 9 symbology bar codes. When Code 3 of 9 is disabled, the data collector cannot decode Code 3 of 9 symbology bar codes.
Read Interleaved 2 of 5
9
True 1-False 0
1 (True)
Enables reading Interleaved 2 of 5 (I 2of5) symbology bar codes. When Interleaved 2 of 5 is disabled, data collector cannot decode I 2of5 bar codes.
Read UPC/EAN
10
True 1-False 0
1 (True)
Enables reading UPC and EAN symbology bar codes. When UPC/EAN is disabled, the data collector cannot decode UPC or EAN symbology bar codes.
Read Codabar
11
True 1-False 0
1 (True)
Enables reading Codabar symbology bar codes. When Codabar is disabled, the data collector cannot decode Codabar symbology bar codes.
Chapter 4 Statement & Function Reference
143
Page 152
Option
Number
Range
Default
12
True 1-False 0
1 (True)
Read Code 128
Enables reading Code 128 symbology bar codes. When Code 128 is disabled, the data collector cannot decode Code 128 symbology bar codes (including UCC128).
Require valid checksum for Code 3 of 9 16 True 1-False 0
0 (False)
When this option is enabled, the data collector can only decode a Code 3 of 9 bar code if it has a valid modulo 43 symbol check character. The check character is determined as follows: 1. Assign a numerical value to each data character in the symbol as shown in the table below. 2. Sum the numerical values for all of the data characters and divide the sum by 43. 3. The remainder obtained in step 2 is the value of the check character shown in the table. Character Values for Code 3 of 9 Modulo 43 Check Character Calculation Character 0 1 2 3 4 5 6 7 8 9 A B C D E
Value 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Character F G H I J K L M N O P Q R S T
Value 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
Character U V W X Y Z . SPACE $ / + %
Example: For the data message: CODE 39 C=12, O=24, D=13, E=14, SPACE=38, 3=3, 9=9 12 + 24 + 13 + 14 + 38 + 3 + 9 = 113 113/43 = 2 with a remainder of 27 27 = R Resultant data with check character: CODE 39R
144
Chapter 4 Statement & Function Reference
Value 30 31 32 33 34 35 36 37 38 39 40 41 42
Page 153
Option Transmit Code 3 of 9 checksum
Number
Range
Default
17
True 1-False 0
0 (False)
If this option is enabled and option 16 is enabled, the data collector places both the bar code and the check character in the scan buffer. If this option is disabled but option 16 is enabled, the data collector strips the check character from the bar code data. For example: •= In the previous example, the bar code data with checksum is CODE 39R. •= The data collector returns CODE 39R with option 17 enabled. •= The data collector returns CODE 39 with option 17 disabled.
Require valid checksum for Code I 2 of 5 20
True 1-False 0
0 (False)
When this option is enabled, the data collector only decodes an Interleaved 2 of 5 bar code if it has a valid weighted modulo 10 symbol check character. The weighted check character is determined as follows: 1. Starting at either end of the string of data characters, multiply all of the odd position characters by 3. 2. Sum the products obtained in step 1, along with the remaining even position data characters, and divide the sum by 10. 3. If the remainder obtained in step 2 is 0, the value of the check digit is 0. Otherwise, subtract the remainder from 10. The result of this subtraction is the check digit. 4. Append the check digit to the end of the data.
Example: Data Digits: 43827 Weights: 31313 Weighted Sum = (3 x 4) + (1 x 3) + (3 x 8) + (1 x 2) + (3 x 7) = 62 62/10 = 6 with a remainder of 2 10 - 2 = 8 Therefore, the check digit is 8. Data with check digit is: 4 3 8 2 7 8
Chapter 4 Statement & Function Reference
145
Page 154
Option
Number
Transmit Code I 2 of 5 checksum
21
Range
Default
True 1-False 0
0 (False)
If this option is enabled and option 20 is enabled, the data collector places both the bar code and the check character in the scan buffer. If it is disabled, but option 20 is enabled, the data collector strips the check character from the bar code data. For example: •= In the previous example, the bar code data with checksum is 438278. •= The data collector returns 438278 with option 21 enabled. •= The data collector returns 43827 with option 21 disabled.
Expand UPC-E to UPC-A form
24
True 1-False 0
0 (False)
UPC-E is a shortened version of the UPC-A symbology where redundant zeros are removed according to a specific formula. If this option is enabled, the data collector expands the UPC-E bar code to its equivalent UPC-A form.
0 123643 2 UPC-E bar code
0 12300 00064
2
UPC-A bar code showing same data Transmit check character for UPC 25
True 1-False 0
1 (True)
The rightmost character in each of the bar code symbols above is the check character for the bar code. Option 25 toggles whether the check character is to be included with the bar code data when it is returned by INPUTEVT.
146
Chapter 4 Statement & Function Reference
Page 155
Option
Number
Range
Transmit country code character for UPC-A 26 True 1-False 0
Default 0 (False)
UPC symbols are a subset of the more comprehensive EAN system. EAN-13 symbols encode the first digit in the parity pattern of the characters on the left side of the symbol. For UPC codes all these characters have odd parity, which gives a zero in the EAN scheme. A UPC-A symbol is therefore equivalent to an EAN-13 symbol with a first digit of zero. This digit is called the country code, since its function (sometimes along with the second character) in the EAN system is to specify the country of origin. Country Code transmission disabled: UPC-A
012300000642 0 = number system code 1230000064 = data 2 = check character
In the bar code above, toggling the country code character would have the following results: Country Code transmission enabled: UPC-A
0012300000642 0 = country code 0 = number system code 1230000064 = data 2 = check character
The Uniform Code Council recommends disabling transmission of the country code character. To transmit the country code for a UPC-E bar code, it must first be expanded to the UPC-A form by enabling option 24.
Transmit number system character for UPC 27 True 1-False 0
1 (True)
The first digit of a 12-character UPC-A symbol represents the number system of the code; it is the digit usually printed to the left of the code. If this option is enabled, the data collector includes the number system character with the bar code data.
Chapter 4 Statement & Function Reference
147
Page 156
Option
Number
Range
Default
28
True 1-False 0
0 (False)
Report UPC-A source as EAN
A UPC-A symbol is actually an EAN-13 symbol with a country code of zero. If this option is enabled, the data collector reports the symbology code from a UPC bar code as 16. If this option is disabled, it reports the origin code as 2.
Transmit check character for EAN 30
True 1-False 0
1 (True)
The rightmost character in each of the EAN bar code symbols below is the check character for the bar code. Option 30 toggles whether the check character is to be included with the bar code data.
0034 0007 EAN- 8 bar code Option 30 disabled - 0034000 Option 30 enabled - 00340007
7 800454 861232 EAN-13 bar code Option 30 disabled - 780045486123 Option 30 enabled - 7800454861232
148
Chapter 4 Statement & Function Reference
Page 157
Option
Number
Allow supplement with UPC or EAN 31
Range
Default
True 1-False 0
1 (True)
The data collector decodes both 2-digit and 5-digit add-ons to UPC or EAN bar codes. Enabling this option, returns the supplement data with the scan data, if a supplement is detected. The supplement is separated from the main code by a space character. Options 32 and 33 must be disabled for this option to be effective.
52 0 12000 00494
0
UPC-A bar code with 2 character extension
50995 9 780123 456786 EAN-13 bar code with 5 character extension Require supplement for UPC or EAN 32
True 1-False 0
0 (False)
If this option is enabled and option 33 is disabled, the data collector cannot decode a UPC or EAN bar code without a supplement. Option 32, when enabled, takes precedence over option 31.
Ignore any UPC or EAN supplement 33
True 1-False 0
0 (False)
If this option is enabled, the data collector decodes the UPC or EAN symbol regardless of whether there is a supplement. Option 33, when enabled, takes precedence over options 31 and 32.
Chapter 4 Statement & Function Reference
149
Page 158
UPC/EAN Supplement Options The following table details the interaction of the options that control the handling of supplements appended to UPC or EAN bar codes. For each option, the table entries represent the following states: T - Option is enabled or true. F - Option is disabled or false. X - The state of the option does not affect the result. The entries for each supplement state describe the data returned when such a bar code is scanned and the options are in the configuration described in the same column. Allow supplement (Option 31) Require supplement (Option 32) Ignore supplement (Option 33) Bar code with good supplement Bar code with no supplement Bar code with bad supplement†
X
X
T
F
X
T
F
F
T
F
F
F
Returns Base only
Returns Base + Supplement
Returns Base + Supplement
Returns Error
Returns Base only
Returns Error
Returns Base only
Returns Base only
Returns Base only
Returns Error
Returns Error
Returns Error
†
The system can see that a supplement is present but it does not decode correctly. It is possible to scan a bar code symbol in such a way that the system cannot detect the presence of the supplement.
150
Chapter 4 Statement & Function Reference
Page 159
Option
Number
Range
Transmit Codabar start and stop characters 36 True 1-False 0
Default 1 (True)
The Codabar symbology uses A, B, C, or D as a start or stop character. Enabling this option includes the start and stop characters in the scan data.
Enable inkspread correction
37
True 1-False 0
1 (True)
When bar codes are printed using toner or ink based printers, the toner or ink may “spread” beyond its intended bounds. This may cause the nominal width of the bars to exceed the nominal width of the spaces in the bar code. The data collector’s decoding algorithm includes a correction for light to moderate instances of inkspread. This can help increase decode reliability and overall readability of certain bar codes. Enabling this option enables the inkspread correction routine.
Minimum quiet zone (ratio to smallest bar) 131
6–64
6
The quiet zone of a bar code is the clear space that precedes the start character of a bar code symbol and follows the stop character. The width of the quiet zone is expressed as a multiplier of the width of the narrow bars and narrow spaces (Xdimension). The minimum recommended quiet zone for a Code 3 of 9 symbology bar code is 10 X-dimension, that is 10 times the width of the narrow bars and narrow spaces of the bar code symbol. The space between the main symbol and the supplement of a UPC or EAN bar code must also be a quiet zone and its minimum width is 7 X-dimension. For the DuraTrax, LaserLite, LaserLite Pro, or LaserLite Mx, the minimum quiet zone for all instances is 6 X-dimension or 6 times the width of the narrow bars. This option allows setting the minimum quiet zone ratio in the range of 6 to 64. It can be set to 10 or 15, for example, to decode Code 3 of 9 bar codes that have large spaces between the characters, so that the spaces are not interpreted as the end of the bar code.
Chapter 4 Statement & Function Reference
151
Page 160
The following options set the minimum and maximum length of bar code for each symbology. The maximum size of a data element is limited to 64 characters by internal registers. It may also be further limited by the storage space allocated in the DESCRIBE.SRC template for any variables that must contain the data. (Note: See the DuraTrax, LaserLite, & LaserLite Pro Developer’s Reference Manual for information on the DESCRIBE.SRC template used by the Application Builder software.) Option
Number
Range
Default
Shortest Code 39 bar code accepted
136
1–64
1
Shortest I 2 of 5 bar code accepted
137
1–64
4
Shortest Codabar bar code accepted
139
1–64
1
Shortest Code 128 bar code accepted
140
1–64
1
Longest Code 39 bar code accepted
144
1–64
64
Longest I 2 of 5 bar code accepted
145
1–64
64
Longest Codabar bar code accepted
147
1–64
64
Longest Code 128 bar code accepted
148
1–64
64
Following are some additional options: Option 256 258 259 512...575
Description Screen on or off (write only). LED 2 (Valid Scan LED) on or off (write only). Key mode on or off (write only). Sets the programmable display character lines.
The programmable display characters options (512–575) allow you to design up to 8 characters (ASCII 0 through 7) for use on the data collector’s display. The character size is 5 x 8 pixels.
152
Chapter 4 Statement & Function Reference