Print Bar Code
This command selects the bar code type and prints a bar code for the ASCII characters entered. If the width of the bar code exceeds one line, the bar code is not printed.
|
First Variation |
Second Variation |
||
---|---|---|---|---|
ASCII |
GS k m d1...dk NUL |
GS k m n d1...dn |
||
Hexadecimal |
1D 6B m d1...dk 00 |
1D 6B m n d1...dn |
||
Decimal |
29 107 m d1...dk 0 |
29 107 m n d1...dn |
||
|
0—End of command |
|
||
Values
|
String terminated with NUL Character •m— 0–6, 10 •d— 32–26 (see the table) •n— 1–55 (see the table) |
Length of byte specified at beginning of string •m— 65–3, 75–82 (see the table) •d— 0–27 (see the table) •n— 1–255 (see the table) |
There are two variations to this command. The first variation uses a NUL character to terminate the string; the second uses a length byte at the beginning of the string to compensate for the Code 128 bar code, which can accept a NUL character as part of the data. The second variation the length of byte is specified at the beginning of the string.
Fixed-length codes can be aligned left, center, or right using the Align Positions command (1B 61). Variable-length codes are always center aligned in 7156 Emulation.
First Variation
The check digit is calculated for UPC and JAN (EAN) codes if it is not sent from the host computer. Six-character zero-suppressed UPC-E tags are generated from full 11 or 12 characters sent from the host computer according to standard UPC-E rules. Start/Stop characters are added for Code 39 if they are not included.
m |
Bar Code |
d |
n, Length |
---|---|---|---|
0 |
UPC-A |
48- 57 (ASCII numerals) |
Fixed Length: 11, 12 |
1 |
UPC-E |
48- 57 |
Fixed Length: 11, 12 |
2 |
JAN13 (EAN13) |
48- 57 |
Fixed Length: 12, 13 |
3 |
JAN8 (EAN8) |
48- 57 |
Fixed Length: 7, 8 |
4 |
Code 39 |
48- 57,
|
Variable Length |
5 |
Interleaved 2 of 5 (ITF) |
48- 57 |
Variable Length (Even Number) |
6 |
CODABAR (NW-7) |
65- 68, start code 48- 57, 36, 43, 45, 46, 47, 58 |
Variable Length |
10 |
PDF 417 (7158 Native Mode and 7167 Native Mode) |
1-255 |
Variable Length 7158 Native Mode and 7167 Native Mode |
Second Variation
The value of m selects the bar code system as described in the table. When data is present in the print buffer, the printer processes the data following m as normal data.
The variable d indicates the character code to be encoded into the specified bar code system. Refer to the table. If character code d cannot be encoded, the printer prints the bar code data processed so far, and the following data is treated as normal data.
m |
Bar Code |
d |
n, Length |
---|---|---|---|
65 |
UPC-A |
48–57 (ASCII numerals) |
Fixed Length: 11, 12 |
66 |
UPC-E |
48–57 |
Fixed Length: 11, 12 |
67 |
JAN13 (EAN13) |
48–57 |
Fixed Length: 12, 13 |
68 |
JAN8 (EAN8) |
48–57 |
Fixed Length: 7, 8 |
69 |
CODE 39 |
48–57, 65–90 (ASCII
alphabet),
|
Variable |
70 |
Interleaved 2 of 5 (ITF) |
48–57 |
Variable (Even Number) |
71 |
CODABAR (NW-7) |
65–68, start code 48–57, 36, 43, 45, 46, 47, 58 |
Variable |
72 |
Code 93 |
0–127 |
Variable (A748 Native Mode only) |
73 |
Code 128 |
0–105
|
Variable |
75 |
PDF417 |
0–255 |
Variable Length (7158 Native Mode only and 7167 Native Mode) |
76 |
GS1 DataBar Omnidirectional |
48–57 |
Fixed Length: 13 |
77 |
GS1 DataBar Truncated |
48–57 |
Fixed Length: 13 |
78 |
GS1 DataBar Stacked |
48–57 |
Fixed Length: 13 |
79 |
GS1 DataBar Stacked Omnidirectional |
48–57 |
Fixed Length: 13 |
80 |
GS1 DataBar Limited |
48–57 |
Fixed Length: 13 |
81 |
GS1 DataBar Expanded |
32–34, 37–47, 48–57, 58–63, 65–90, 95, 97–122, 123 |
Variable length (2–70) |
82 |
GS1 DataBar Expanded Stacked |
32–34, 37–47, 48–57, 58–63, 65–90, 95, 97–122, 123 [However d1 = 40, 48 <= d2 <= 57, 48 <= d3 <= 57 when 48 <= d1 <= 57, 48 <= d2 <= 57] |
Variable length (2–70 ) |
Example:
MSComm1.Output = Chr$(&H1D) & Chr$(&H6B) & Chr$(m) & "123456789012" & Chr$(0)
The above command prints the number above or below the bar code, depending on which parameter for m is specified.
Exceptions
•Illegal data cancels this command.
•The command is valid only at the beginning of a line.
•PDF417 and Code 93 are only available in 7158 Mode. PDF 417 and GS1 DataBar format cannot be printed on the slip. Barcodes on the Slip are always right-justified.
•When the bar code printing area exceed 72mm
•If bar width "1" => ignore this command (Barcode is not printed.)
•If bar width "2-6" => print barcode using selected bar width -1