PCL
2-49
Commands
PCL emulation commands are multibyte strings (also known as “escape sequences”)
that begin with the Escape control code (
ESC
, ← , decimal 27, or hexadecimal 1B). The
ESC
control code notifies the printer that the characters that follow are to be interpreted
as part of a command and are not control codes or data to be printed.
Command Structure
Most PCL emulation commands have the following structure:
ESC
& a # C
Spaces have been added to this example for readability. The command parameter
variables are indicated by a number sign (#).
Command Parameters
A command parameter sets the value for a command. This value stays constant until
either a different value resets the command or a command resets the printer to the
default values. For example, after the printer receives a command that selects a right
CR 13 0D Carriage Return Moves the cursor to the left margin
SP 32 20 Space Moves the cursor to the right one column
SI 15 0F Primary Font Selects the primary font
SO 14 0E Secondary Font Selects the secondary font
Table 2-14: Description of Command Structure
Element Description
ESC
Decimal 27 or hex 1B
& Parameterized character from American National Standard Code for Information
Interchange (ASCII) table (ranging from 33 to 47 decimal)
a Group character from ASCII table (ranging from 96 to 126 decimal) that specifies a
group type of control
# Decimal character string value within specified numeric ranges; may be preceded by
a + or - sign and contain a decimal point
C Termination character from ASCII table (ranging from 64 to 94 decimal)
Table 2-13: Control Codes (Continued)
Code Dec Hex Function Result