
Appendix A Programming Guide
A-29
A-5.2.1
Programming
Programming of the resident bar codes is achieved by means of six new control
sequences added to the PCL5 emulation.
The print position and print orientation of a bar code is controlled by standard
PCL5 commands.
S
Bar code print position
Printing of any bar code starts at the current actual cursor position. The
position can be set with any standard PCL5 cursor movement command.
Moving the cursor with printed characters, spaces and carriage return and
line feed is the simplest possibility.
Setting the cursor to an absolute or relative position in PCL units is the best
way to position a bar code:
ESC * p P1 X
absolute horizontal position to P1
ESC * p + P1 X
relative horizontal position P1 to the left
ESC * p - P1 X
relative horizontal position P1 to the right
ESC * p P1 Y
absolute vertical position to P1
ESC * p + P1 Y
relative vertical position P1 down
ESC * p - P1 Y
relative vertical position P1 up
Note:
S
The bar code
REFERENCE POSITION
is the left upper edge except
for Postnet where the reference position is the character baseline.
S
The
cursor position is not changed
after printing the bar code.The
cursor must be set to a new position for the next printable character.
S
One PCL unit is the unit of measure for cursor movements. The
default value is 300 units per inch.
S
Bar code print orientation
Bar codes are printable in all four print directions, selectable with the
following PCL5 command:
ESC & a P1 P
P1 = 0, 90, 180, 270 default = 0°
Appendix A Programming Guide
A-30
S
Bar code type
This command selects a bar code type:
ESC * z P1 V
default = 0
P1 = 0
Code 39
P1 = 1
2 of 5 industrial
P1 = 2
reserved
P1 = 3
reserved
P1 = 4
2 of 5 interleaved
P1 = 102
EAN 8 SC2
P1 = 106
EAN 8 SC6
P1 = 109
EAN 8 SC9
P1 = 122
EAN 13 SC2
P1 = 126
EAN 13 SC6
P1 = 129
EAN 13 SC9
P1 = 142
UPC-A SC2
P1 = 146
UPC-A SC6
P1 = 149
UPC-A SC9
P1 = 162
UPC-E SC2
P1 = 166
UPC-E SC6
P1 = 169
UPC-E SC9
P1 = 180
Codabar
P1 = 181
MSI
P1 = 188
Code 93
P1 = 200
Postnet
P1 = 210
Code 128
P1 = 220
RM4SCC/KIX
Note:
EAN and UPC code selection supports ADD2 and ADD5
extensions by sending those additional digits.