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 parameF 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 introF ducers. For example, bold print can be enabled in the P-Series protocol using any of the folF lowing control code introducers:

ASCII: SOH G

Hex: 01 47

BASIC: CHR$(1);G;

ETX G

03 47

CHR$(3);G;

ESC G

27 47

CHR$(27);G;

^ G

5E 47

CHR$(94);G;

~ G

7E 47

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 conF trol code character G as follows:

ASCII: ESC G

Hex: 1B 47

BASIC: CHR$(27);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 exF 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.

6-2

Programming

Page 100
Image 100
Printronix P9000 Series manual Control Code Functions, Special Function Control Code Control Code Header