Chapter 6: Programming Information

A794 Owner’s Guide

Print Bar Code

 

First Variation

ASCII

GS k m d1…dk NUL

Hexadecimal

1D 6B m d1…dk 00

Decimal

29 107 m d1 dk 0

 

(0 = End of command)

Second Variation

GS k m n d1…dn 1D 6B m n d1…dn 29 107 m n d1…dn

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.

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. With the second variation the length of byte is specified at the beginning of the string.

Bar codes can be aligned left, center, or right using the Align Positions command (1B 61).

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.

Rotated barcodes set with small modules (select bar code width command 1D 77 n , with n=1 or 2) and PDF 417 barcodes in any orientation are printed at low speed, for better readability.

Exceptions

The command is only valid at the beginning of a line.

Illegal data cancels the command.

Values:

First Variation: String terminated with NUL Character

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 (EAN)

48- 57

Fixed Length: 12, 13

 

 

 

 

3

JAN8 (EAN)

48- 57

Fixed Length: 7, 8

 

 

 

 

4

Code 39

48- 57,

Variable Length

 

 

65- 90 (ASCII alphabet),

 

 

 

32, 36, 37, 43, 45, 46, 47 (ASCII special

 

 

 

characters)

 

 

 

d1 = dk = 42 (start/stop code is

 

 

 

supplied by printer if necessary)

 

5

Interleaved 2 of 5

48- 57

Variable Length

 

 

 

(Even Number)

6

Codabar

65- 68, start code

Variable Length

 

 

48- 57,

 

 

 

36, 43, 45, 46, 47, 58

 

10

PDF 417

32-255

Variable Length

122

December 1999

Page 127
Image 127
M-S Cash Drawer A794 manual Print Bar Code, GS k m n d1…dn 1D 6B m n d1…dn 29 107 m n d1…dn