Page 23 of 33
5.7 Bar Code Operation
The SP-5000 can print three types of bar codes with its standard programming. The bar code types are 3 of 9,
Interleaved 2 of 5 and UPC codes.
5.7.1 Programming Bar Code Operation in Basic
3 of 9 Code
10 WIDTH LPRINT 255
20 LPRINT “Default Text”
30 LPRINT CHR$(27) + “C” + CHR$(5) + CHR$(2); :REM 3 OF 9 Barcode
40 LPRINT “12345”
50 LPRINT “12345 3 OF 9”
60 FOR X = 1 TO 10
70 LPRINT
80 NEXT X
90 LPRINT “Default Text”
100 LPRINT CHR$(27) + “c”; :REM Cut
Interleaved 2 of 5
10 WIDTH LPRINT 255
20 LPRINT “Default Text”
30 LPRINT CHR$(27) + “i” + CHR$(0) + CHR$(2); :REM Interleaved 2 of 5 Barcode
40 LPRINT “012345”
50 LPRINT “012345 Interleaved 2 of 5”
60 FOR X = 1 TO 10
70 LPRINT
80 NEXT X
90 LPRINT “Default Text”
100 LPRINT CHR$(27) + “c”; :REM Cut
UPC Code
10 WIDTH LPRINT 255
20 LPRINT “Default Text”
30 LPRINT CHR$(27) + “u” + CHR$(1) + CHR$(2); :REM UPC Barcode
40 LPRINT “012345678905”
50 LPRINT “012345678905 UPC CODE”
60 FOR X = 1 TO 10
70 LPRINT
80 NEXT X
90 LPRINT “Default Text”
100 LPRINT CHR$(27) + “c”; :REM Cut
5.7.2 3 of 9 Bar Code Description
The bar code printing option allows code 39 character strips to be printed by the SP-5000. Code 39 is so named
because of the original 39 character set. It is also called 3 of 9 because in any given character 3 of the 9 elements
are always wide. Each character is made up of 5 bars and 4 spaces; two of the 5 bars are wide and one of the four
spaces is wide, making 40 possible characters. Four additional characters, $, /, +. and % are formatted with all the
bars narrow and three spaces wide. The complete character set includes a start/stop character (*) and 43 data
characters comprising 10 digits, 26 letters and the characters -, .,$, /, +,%, and space. Only upper case alpha
characters are supported; unpredictable or unreadable code may result otherwise. The characters $, /, +, and %
represent their corresponding ASCII characters only if they are followed by a digit, space, symbol, or stop code. If
one of these characters is followed by a letter, the pair is then decoded. For example, a string $C represents the
control code end of text or ^C in ASCII; the C represents a lower-case c.
5.7.3 UPC Bar Code Description