Control Codes

Introduction

The printer requires a special “attention getter” character in order to receive a command sequence, informing the printer that it is about to receive a command and the type of command it will be. Control Commands, System-Level Commands, and Font-Loading Commands have their own unique attention getter, followed by a command character that directs printer action.

Attention Getters

The attention getters (e.g., SOH”) are standard ASCII control labels that represent a one character control code (i.e., ^A or Ctrl A). Appendix A contains the entire ASCII Control Code Chart.

Attention Getter For:

ASCII Character

Decimal Value

HEX Value

Immediate Commands

SOH

1

01

System-Level Commands

STX

2

02

Font-Loading Commands

ESC

27

1B

Table 2-1: Control Code Listings

Alternate Control Code Modes

For systems unable to transmit certain control codes, Alternate Control Code Modes are available. Configuring the printer to operate in an Alternate Control Code Mode (selected via the Setup Menu or the <STX>KD / <STX>Kc commands) requires the substitution of Standard Control Characters with Alternate Control Characters in what otherwise is a normal datastream.

Control Character

Standard

Alternate

Alternate-2

SOH

0x01

0x5E

0x5E

STX

0x02

0x7E

0x7E

CR

0x0D

0x0D

0x7C

ESC

0x1B

0x1B

0x1B

“Count By” [1]

0x5E

0x40

0x40

1See Label-Formatting Commands, ^, set count by amount.

Table 2-2: Alternate Control Codes

Note: Throughout this manual <SOH>, <STX>, <CR>, <ESC>, and ^ will be used to indicate the control codes. The actual values will depend on whether standard or alternate control codes are enabled for the particular application.

Alternate Line Terminator

Alternate-2 Control Codes provide for substitution of the line terminator as well as the control characters listed above. The line terminator <CR> (0x0D) is replaced by (0x7C). The following is a sample label format datastream for a printer configured for Alternate-2 Control Codes:

~L1911A10001000101234560X~UT01ABCDE~G

E-Class DPL Programmer’s Manual

5

Page 15
Image 15
Datamax E4203 manual Control Codes, Introduction