Control code functions – Printronix P9000 Series User Manual
Page 100

Programming
6-2
Control Code Functions
The following information is listed for each code function (where applicable and possible).
ASCII Mnemonic - The standard ASCII name for the control code.
Hex Code - The code's numeric equivalent in hexadecimal.
Decimal Code - The code's numeric equivalent in decimal.
Purpose - The function(s) of the control code.
Comment - A description of exceptions or limitations to normal use.
A sample Expression written in BASIC programming language is provided for some control
codes when a specific syntax is required to complete the program statement (ie: Bit Image
modes, Download a Language, Download a Character, Horizontal Tab Set, Vertical Tab Set/
Clear). The programs in this chapter were run on an IBM Personal Computer using Microsoft
GW-BASIC version 3.22.
Special Function Control Code - Control Code Header
A Special Function Control Code (SFCC) is used to extend the control code protocol. The
SFCC is the control code introducer (or header); it is the first input in the sequence of parameĆ
ters. The general control code sequence is:
(SFCC)(parameter 1)(parameter 2)...(parameter n)
P-Series codes can use SOH, ETX, ESC, ^ (hat") or ~ (tilde") as control code introĆ
ducers. For example, bold print can be enabled in the P-Series protocol using any of the folĆ
lowing control code introducers:
ASCII:
Hex:
BASIC: CHR$(1);“G”;
01 47
SOH G
ETX G
ESC G
^ G
~ G
03 47
27 47
5E 47
7E 47
CHR$(3);“G”;
CHR$(27);“G”;
CHR$(94);“G”;
CHR$(126);“G”;
Serial Matrix codes use only ESC as the control code introducer. For example, to enable bold
print in the Serial Matrix printer protocol, use the Serial Matrix SFCC and the bold print conĆ
trol code character G as follows:
ASCII:
Hex:
BASIC: CHR$(27);“G”;
1B 47
ESC G
The SFCC is selected from the control panel. To select the SFCC for your application, refer to
the Application Compatibility diagrams in the Configuration chapter. (Most programming exĆ
amples in this chapter have been created using the ESC control code introducer.)
NOTE: SFCC commands must be terminated by a semicolon (;) in a BASIC program or
by text following the command string. A paper motion command directly following a speĆ
cial function code command may result in erroneous paper movement.