Format For Control Code Descriptions
29
Escape Control Codes Overview
Printer capability is greatly increased by the use of escape control code
sequences. Escape sequences always begin with the ASCII escape
sequence introducer, ESC (hex 1B). Many of the ASCII control codes
described in this chapter are escape sequences.
IMPORTANT
An Escape code can occur anywhere in the data stream and is acted
upon immediately if it precedes a valid command.
An ESC sequence introducer in the data stream signals the printer to wait for
special instructions, even if it is ready and printing. The character codes
following the ESC character tell the printer what to do.
NOTE: For readability, code sequences appear in this manual with spaces
inserted between command elements. Do not insert spaces between
code characters when you are programming unless the ASCII space
character (SP) is part of a code sequence. For example, a code
sequence printed in this manual as ESC [ 1 is programmed as ESC[1.
An escape sequence uses two or more bytes to define a specific printer
control function. The format for an escape sequence is
After the ESC character are one or more characters which indicate the action
of the control code. One or more numerical parameters may in turn follow
these characters. For example, the sequence ESC [ p g tells the printer to
clear all horizontal tabs if p is a 3, or to clear all vertical tabs if p is a 4.
If the characters following the ESC code are not within the defined ranges, or
if they are within the defined ranges but are not recognized as a function of
this printer, the entire sequence is ignored.
ESC X
00 - 5F
p
0 - FF
Escape
Sequence
Introduce
r
Character(s)
Numerical
parameter(s)
1B
ASCII
Hex