Genicom 5000 Series, GEK 00031B Programmer's Manual

Add to My manuals
314 Pages

advertisement

Genicom 5000 Series, GEK  00031B Programmer's Manual | Manualzz

GEnicom

5000 Series

Programmer’s Manual

GEK – 00031B

Table of Contents Page

Chapter 1.Introduction.................................................................... 8

overview of printer emulation...............................................................8

Control Codes......................................................................................8

Escape Sequences ...............................................................................8

CSI and OSC .......................................................................................9

Line Terminators ...............................................................................10

Decipoints .........................................................................................10

SCS Smart Graphics Capabilities.......................................................10

Chapter 2. ANSI Emulation............................................................ 11

Control Code and Escape Sequence Activity Levels.............................11

Notes............................................................................................11

Control Code Activity Levels ............................................................12

Escape Sequence Activity Levels......................................................13

Control Code Definitions....................................................................14

Escape Sequence Directory ................................................................16

ANSI ESCAPE SEQUENCE CATEGORIES ..........................................18

Housekeeping Sequences ................................................................19

Character Set Selection ...................................................................22

Character Map Load........................................................................23

Paper and Print Position Movements ...............................................25

Margins and Tabs ...........................................................................28

Font Handling and Enhancements ..................................................31

Graphics............................................................................................36

Six-Bit Graphics .............................................................................36

Dot Patterns and Densities..............................................................36

Horizontal Format ........................................................................38

Vertical Format ............................................................................38

Eight-Bit Graphics ..........................................................................39

Horizontal Format ........................................................................39

Vertical Format ............................................................................39

Other Graphics Considerations.....................................................40

Graphics Sequences........................................................................40

Electronic Vertical Format Unit - EVFU..............................................42

Downloading the EVFU ...................................................................42

Loading the Table............................................................................42

BASIC Programming Example for EVFU Table Loading .................43

EVFU Default..................................................................................44

Skip to Channel Command .............................................................44

BASIC Programming Example for Skip to Channel........................45

Bar codes ..........................................................................................46

Entering and Exiting Bar Codes ......................................................46

2

5000 Programmer’s Manual GEK-00029B

Table of Contents Page

Chapter 2. ANSI Emulation (Continued)

ANSI 4800/4410 Strap 1 OUT ........................................................ 46

ANSI 4800/4410 Strap 1 IN ........................................................... 46

Setting Bar Code Parameters .......................................................... 47

Bar Code Dimensions .................................................................. 48

Default Bar Code Characteristics ................................................. 50

Human-Readable Line (HRL) .......................................................... 50

Font Styles and Enhancements ...................................................... 50

Spacing and Bar Code Editing Aids ................................................ 50

Bar Code Readability Statement ..................................................... 51

Bar Code Program Examples .......................................................... 52

Test Program .................................................................................. 52

Error Symbol.................................................................................. 52

Changing Parameters ..................................................................... 53

Commas and Spaces as Delimiters ................................................. 53

Horizontal Spacing ......................................................................... 54

Printer Option Strap 11, Group 2 IN ............................................... 55

EXAMPLE 1: Strap 11 OUT .......................................................... 55

EXAMPLE 2: Strap 11 IN ............................................................. 55

EXAMPLE 3: Strap 11 OUT with no suppression of LF/CR on line 30

.................................................................................................... 56

Vertical Bar Codes.......................................................................... 57

COMMAS: With HRL .................................................................... 57

COMMAS: Without HRL ............................................................... 58

SPACES: With HRL ...................................................................... 58

SPACES: Without HRL ................................................................. 58

Horizontal Tabs ........................................................................... 59

OVERSIZE CHARACTER FONT ......................................................... 60

Entering and Exiting Oversize ........................................................ 60

Selecting Size ................................................................................. 61

Size Parameters for Rotation ........................................................ 61

Spacing Between Characters........................................................ 61

Sample Programs ........................................................................... 62

Example 1 ................................................................................... 62

Example 2 ................................................................................... 62

Example 3: Showing the Importance of Resetting Scaling Factors. 63

Printer Control Strap GenPrtOpts/Group 2/Strap 13................... 64

Example 4: GenPtrOpts | Group 2 Strap 13 IN ............................ 65

Example 5: GenPtrOpts | Group 2 Strap 13 OUT ........................... 65

3

GEK-00029B Table of Contents

Table of Contents Page

Chapter 3.Printronix P300/P600 Emulation .................................. 66

Introduction ......................................................................................66

Control Codes....................................................................................66

Printronix Graphics ...........................................................................69

Dot Patterns and Densities..............................................................69

Dot Patterns .................................................................................70

Normal-Density Graphics .............................................................71

High-Density Graphics .................................................................71

P300/600 8-Bit Horizontal Graphics ...............................................71

P300/600 Electronic Vertical Format Unit .........................................72

Using the EVFU ..............................................................................72

Points to Remember .....................................................................72

PI Lead Codes – Use with Serial Interface......................................73

Codes Not Using the PI Lead.........................................................73

Example EVFU Loading Program ..................................................74

Example Form Printout ................................................................75

Sample Program to Print Form......................................................75

Chapter 4.Printronix P-Series Emulation ....................................... 76

Special Function Control Character (SFCC)........................................76

Command Line................................................................................76

Set and Reset Codes........................................................................77

Command Index ................................................................................78

Control Codes....................................................................................80

character sets, FONT handling and enhancements.............................82

Housekeeping Commands..................................................................92

Plot Mode Graphics Operational Description ......................................98

Plot Density ....................................................................................98

Normal Density Plot Mode ...............................................................98

Double Density Plot Mode ...............................................................98

Plot Mode Format............................................................................98

Plot Data Line Format .....................................................................99

Normal Density Plot Mode Format ...................................................99

Double Density Plot Mode Format .................................................100

Plot Mode Graphic Character Chart...............................................101

Exiting Plot Mode Graphics ...........................................................101

Plot Mode Graphics density commands............................................102

Differences From Target Printer Emulation ......................................104

Discarded Commands ...................................................................104

Select Extended Character Set (SFCC OSET;n) ...........................104

Download a Language (SFCC V)..................................................104

Download a Character Shape (SFCC c) .......................................104

4

5000 Programmer’s Manual GEK-00029B

Table of Contents Page

Chapter 4.Printronix P-Series Emulation (Continued)

Postnet Bar codes (SFCC |p*xxxxx-yyyy-zz*) .............................. 104

Ribbon Minder Enable/Disable (SFCC r E/SFCC r D) ................ 104

Ribbon Minder Set Job Rate (SFCC r J nnnn E) ......................... 104

Ribbon Minder Worn Message (SFCC r A n)................................ 104

Command Line Debug..................................................................... 105

Font Styles, Pitches, and Character Sets ......................................... 106

Font Styles ................................................................................... 106

Font Pitches ................................................................................. 106

Character Sets ............................................................................. 106

Extended Character Sets .............................................................. 106

Form Length................................................................................. 106

Plot Mode Graphic Densities......................................................... 107

Enhancements ............................................................................. 107

High Vertical Density Plot Mode Graphics .................................. 107

Chapter 5.Proprinter Emulation.................................................. 108

Introduction.................................................................................... 108

Differences from proprinter ............................................................. 108

Proprinter Control Codes................................................................. 108

Command Directory ........................................................................ 111

Escape Sequences........................................................................... 112

Proprinter Dot Graphics.................................................................. 119

Chapter 6.Epson FX286-e Emulation .......................................... 122

Introduction.................................................................................... 122

Conventions Used in this Chapter ................................................ 122

Print Mode Combinations ............................................................. 123

Functional Differences .................................................................... 124

Additional Escape Sequences .......................................................... 125

Unsupported Escape Sequences...................................................... 125

FX-286e Control Codes ................................................................... 126

FX-286e Escape Sequence DIRECTORY .......................................... 129

FX-286e Escape Sequence GROUPINGS.......................................... 131

Margins .......................................................................................... 132

Line Spacing ................................................................................... 134

Character Spacing .......................................................................... 135

Tabs ............................................................................................... 136

Paper Movement ............................................................................. 138

Print Position .................................................................................. 139

Print Modes .................................................................................... 141

Special Character Printing .............................................................. 145

5

GEK-00029B Table of Contents

Table of Contents Page

Chapter 6.Epson FX286-e Emulation (Continued)

Miscellaneous Commands ...............................................................149

FX-286e Dot Graphics .....................................................................150

Specifying Graphics Line Length ...................................................150

Image Data Bytes ..........................................................................151

Graphics Programming Example ...................................................151

Printed Results of Sample Program ...............................................151

FX-286e Dot Graphics Control Sequences........................................152

Chapter 7.DEC LG / Compaq LG Plus Emulation.......................... 155

Control Code Definitions..................................................................155

Commands ......................................................................................158

Chapter 8.PPL3 Plus Emulation ................................................... 195

INTRODUCTION ..............................................................................195

General Considerations.................................................................195

Coded Characters .........................................................................195

7-Bit Versus 8-Bit Environments ..................................................196

Printable Characters .....................................................................198

CONTROL CODES ...........................................................................199

Introduction..................................................................................199

C0 Control Characters ..................................................................199

C1 Control Characters ..................................................................201

SPECIAL CHARACTER PROCESSING ..............................................203

Hex 20 ..........................................................................................203

Hex 7F ..........................................................................................203

Hex A0..........................................................................................203

Hex FF ..........................................................................................203

Special Character Parsing .............................................................204

ESCAPE SEQUENCE / control function syntax................................205

Escape Sequence Syntax...............................................................205

Control Sequence Syntax ..............................................................205

Parameter Values Within Control Sequences .................................206

COMMAND DIRECTORY..................................................................207

COMMAND DICTIONARY.................................................................209

PAGE COORDINATE SYSTEM..........................................................251

Coordinate System Models ............................................................251

Character Cell Model ..................................................................252

Point Model ................................................................................252

Point Model Has Precedence .......................................................252

Origin and Extent .........................................................................252

Origin.........................................................................................252

6

5000 Programmer’s Manual GEK-00029B

Table of Contents Page

Chapter 8.PPL3 Plus Emulation (Continued)

Printable Area............................................................................ 253

Positioning and Movement............................................................ 253

Horizontal Advance Increments .................................................... 254

Fixed HAI................................................................................... 254

SIXEL GRAPHICS ........................................................................... 256

Terminology and Concepts............................................................ 256

General Sixel Graphics Operation................................................. 257

Sixel Graphics Commands............................................................ 258

Appendix A. Using the Hex Dump................................................ 261

Appendix B. Font Print Samples.................................................. 262

Appendix C. Postnet Bar codes.................................................... 265

Entering and Exiting POSTNET Bar Codes ...................................... 265

Selecting POSTNET Style Bar Codes ............................................. 265

Appendix D. Description of Strapping Options ............................ 268

General Printer Options Definitions................................................. 269

Legacy Parallel Software Strap Definitions....................................... 270

Emulation Option descriptions........................................................ 271

Appendix E. DSC Code Charts ........................................................ 275

Index .......................................................................................... 310

GEK-00029B

7

Table of Contents

CHAPTER 1. INTRODUCTION

OVERVIEW OF PRINTER EMULATION

Commands are sent to the printer in the form of control codes and escape sequences. These differ from normal data to be printed in that they give instructions to the printer on paper movement, style of print, size, density, and many other selectable features.

Certain protocols are needed so that the printer can recognize and act on these commands sent from the host.

The shuttle matrix printer contains emulations to make it behave in a manner that is functionally similar to other printers. The emulations that it contains are:

▪ ANSI Standard X3.64-1979 (Default)

▪ Printronix P300/P600

▪ Printronix P Series

▪ IBM Proprinter

▪ Epson FX286-e (9-wire dot matrix)

▪ DEC LG / Compaq LGPlus

▪ DEC PPL III

Each emulation has a set of control codes and/or escape sequences that are explained in this manual. There is a separate chapter for each emulation.

CONTROL CODES

Control codes are used to transmit information other than printable characters to the printer. They may occupy the first 32 locations on the ASCII code chart and are represented by two- or three-letter abbreviations. Locations 0X80 through 0X9F may also be interpreted as control codes, depending on the emulation and settings.

The control code <LF> (10 decimal, 0A hex), for instance, is almost universally interpreted as a line feed. However, the response of the printer to other control codes will depend on the emulation.

ESCAPE SEQUENCES

Remote selection of the printer's functions and features is achieved by using command strings (a combination of characters and parameters) preceded by an <ESC> (27 decimal, IB hex) or CSI character (155 decimal, 9B hex). Escape sequences associated with similar functions will vary from one emulation to the next.

8

Chapter 1. Introduction GEK-00029B

NOTE

The physical spaces in the escape sequences shown in this publication are only for clarification purposes and are not used in the actual string. If a space is actually needed in the sequence, it will be shown as an <SP> in the mnemonic form of the sequence.

In the decimal form, it will appear as a 32, and in the hexadecimal form, as 20.

Examples are shown below of escape sequences as written in the text: with parameters filled in and written in the BASIC programming language assuming the use of the LPRINT instruction. The parameter values are actualized in these examples, but will be shown as parameters thereafter. Note that parameters are surrounded by angle brackets (<>).

Tab Clear

Mnemonic:

Decimal:

Hex:

BASIC:

<ESC> [ <p1> g

27 91 16 103

1B 5B 10 67

CHR$(27);"[16g"

(assume p1=16)

Horizontal Tabs Set

Mnemonic:

Decimal:

Hex:

BASIC:

<ESC> [ <p1> ; <p2>... u

27 91 648 59 1386 59 2808 117

1B 5B 288 3B 56A 3B 0AF8 75

CHR$(27);"[648;1386;2808u"

(assume p1=648, p2=1386, p3=2808)

Expand Characters

Mnemonic:

Decimal:

Hex:

BASIC:

<ESC> [ <p1> ; <p2> SP B

27 91 200 59 200 32 66

1B 5B C8 3B C8 20 42

CHR$(27);"[200;200 B"

(assume p1=200 and p2=200)

CSI AND OSC

A control sequence introducer <CSI> signals the beginning of an ANSI sequence using the <ESC> code and the left bracket ([). <CSI> (9B hex) can be used instead of <ESC> [ (1B 5B hex) when the printer is receiving and processing 8-bit data. <ESC> [ will be used predominately in this manual for the examples.

An operating system command (OSC) signals the start of a download sequence using the <ESC> code and the right bracket (]). <OSC> (9D hex) can be use instead of <ESC> ] (1B 5D hex) when the printer is receiving and processing 8 bit data. <ESC> ] will be used predominately in this manual for the examples.

GEK-00029B

9

5000 Series Programmer’s Manual

LINE TERMINATORS

Some control codes and escape sequences act as line terminators.

Line terminators cause all data received since the last terminator to be printed. Without a terminator, data will remain buffered.

DECIPOINTS

Throughout this manual decipoints are used as a unit of measure. A decipoint equals 1/720th of an inch and is used as a standard of measurement for parameters associated with set distances. A few examples are margins, tabs, and vertical paper movements. See

Appendix D for the decipoint conversion tables.

SCS SMART GRAPHICS CAPABILITIES

The 5000 series printers have SCS smart graphics processing as a standard feature that can be enabled via the CCU control panel menus. The graphics emulations include both IGP and QMS Code V version 2. There are separate programming manuals for each of these graphics language emulations.

The graphics printing emulations provide capabilities for such things as:

▪ Barcoding (including POSTNET codes)

▪ Rotated text

▪ Downloading of and host-controlled selection of predefined forms

▪ Loading of data into predefined forms

▪ Dynamic alphanumeric data

Chapter 1. Introduction

10

GEK-00029B

CHAPTER 2.

ANSI EMULATION

CONTROL CODE AND ESCAPE SEQUENCE ACTIVITY LEVELS

ANSI control codes and escape sequences are assigned activity levels depending on which print mode is currently active. The following charts provide information on what to expect from the control codes and escape sequences in each printing mode.

I -IGNORED No noticeable effect on printing will occur.

V -VALID These sequences do not affect the printing mode in progress, but take effect when normal printing resumes.

A –ACTIVE

D –DATA

This sequence takes effect immediately.

These control codes are used as data.

Notes

Note 1

Note 2

Note 3

Note 4

When printer option 1 is active, either in ANSI (4800) or ANSI (4410) emulation, <SO> and <SI> activate or deactivate this printing mode. <SO> and <SI> are

VALID in bar codes and oversize print mode. They are

ACTIVE in expanded print mode. Please see Appendix

D, Description of Strapping options, ANSI (4800) or

ANSI (4410) tables on page 271 for details on options which affect printer operation in ANSI emulation.

VALID during enhanced oversize, ACTIVE during normal oversize.

Discarded while in the native mode.

Causes an error symbol to print (XOX).

GEK-00029B

11

5000 Series Programmer’s Manual

Control Code Activity Levels

Control

Code

BEL

BS

CR

DC1

DC3

DEL

FF

HT

LF

SI

SO

VT

Line

Terminator

No

Yes

Yes

No

No

No

Yes

No

Yes

No

No

Yes

Control Code Activity Levels

Normal

Dot

Graphics

Bar

Codes

A A D

A I I

A

A

A

Note 3

A

A

A

Note 3

I

D

D

D

A

A

A

A

A

A

A

A

A

I

I

A

I

A

I

Note 1

Note 1

I

Oversize POSTNET

A Note 4

I Note 4

A

A

A

Note 3

Note 4

Note 4

Note 4

Note 4

A

A

A

Note 1

Note 1

A

Note 4

A

Note 4

Note 4

Note 4

Note 4

Chapter 2. ANSI Emulation

12

GEK-00029B

Escape Sequence Activity Levels

HPB

HPR

HTS

HVP

PLD

PLU

REP

RIS

RM

SGR

SM

SPI

ST

TBC

VFU Load

VPA

VPB

VPR

VTS

Escape

Sequence

DCS (Graphics)

Font Load

GENBCS

GENFD

GENGRM

GENHTS

GENOSM

GENSLR

GENSNC

GENSPM

GENTST

GENVFU

DENVTS

GSM

HPA

No

No

No

Yes

No

No

No

No

Yes

Yes

No

No

Yes

No

No

Yes

Yes

Yes

No

Line

Terminator

No

No

No

No

No

No

No

Yes

No

No

Yes

No

No

No

Yes

Normal

I

A

A

A

A

A

A

A

A

A

A

A

A

A

A

A

A

A

A

A

A

A

A

A

A

A

A

A

A

A

A

A

A

A

A

A

I

A

A

V

A

V

A

A

A

I

I

A

A

A

A

A

A

A

A

V

A

A

V

V

A

Dot

Graphics

I

I

A

A

V

A

V

I

A

I

A

A

V

A

V

A

A

A

I

I

I

A

A

A

A

A

A

A

V

A

A

V

A

I

Bar

Codes

I

I

A

A

A

A

V

Oversize POSTNET

A

Note 2

A

Note 2

I

A

A

A

A

A

A

A

A

A

A

A

A

A

A

A

Note 2

A

A

A

A

A

A

A

A

A

A

A

A

A

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

A

I

I

I

I

I

I

I

I

GEK-00029B

13

5000 Series Programmer’s Manual

CONTROL CODE DEFINITIONS

BEL

BS

CR

CSI

DC1

Bell (07H): Receipt of a BEL code causes the beeper to sound for approximately 1/2 second after any preceding printable data has been processed.

Back Space (08H): Line terminator. The paper position remains unchanged and the print position is moved left one character space from the current. If the print position is at the left margin, no action is taken.

Carriage Return (0DH): Line terminator. The print position is reset to the left margin, and the paper position is left unchanged.

Control Sequence Introducer (9BH): Signals the beginning of an

ANSI control sequence. When 8-bit data is used, CSI (9BH) can be substituted for ESC [ (1BH 5BH). Also see ESC.

Device Control 1 (11H): Parallel and Serial Interface: Receipt of a

DC1 code with the printer in local mode puts the printer online

(selects printer) and enables receipt of data.

Through CCU menu options, a serial interface protocol may be selected that transmits a DC1 code to the host to signal that the printer is ready to receive data.

NOTE

The print position can also be set to the left margin via the

CCU Control Panel Menu using the SETUP/FORMAT/MODIFY

FORMAT/PRINT CONTROL menu selection.

DC3

ESC

Device Control 3 (13H): Parallel and Serial Interface: Receipt of a

DC3 code when online places the printer in local mode (deselects printer) and causes it to ignore all data except a <DC1>.

Through menu options, a serial interface protocol may be

selected that transmits a <DC3> code to the host to signal that the printer is not ready to receive data.

(See note for <DC1), above.)

Escape (1BH): Signals the beginning of an escape sequence. See also

CSI above.

Chapter 2. ANSI Emulation

14

GEK-00029B

FF

HT

LF

SI

SO

VT

Form Feed (0CH): Line terminator. The paper is advanced to the

next top-of-form position. When the EVFU is enabled and programmed, paper will advance to the next stop in channel 1.

NOTE

An option strap from the CCU Control Panel Menu using the

SETUP/FORMAT/MODIFY FORMAT/GENPRTOPTS selection can disable this feature.

Horizontal Tab (09H): Advances the print position to the next

horizontal tab location. If no tabs are set, an HT code is either converted to a space or ignored, depending on the menu option settings.

Line Feed (0AH): Line terminator. The paper is advanced to the

next line. When printing horizontal dot graphics, the paper is advanced to the next dot row.

(See note for <FF>, above.)

Shift In (0FH): Used to exit a Special Print Mode (GENSPM) when

ANSI emulation strap 1 (Appendix G, tables 5 and 6) is active.

Shift Out (0EH): Used to enable a special print mode (GENSPM)

when

ANSI emulation strap (Appendix G, tables 5 and 6) 1 is inactive.

Vertical Tab (0BH): Line terminator. The paper is advanced to

the next vertical tab stop. If no tabs are set, a VT code causes a line feed. When using the EVFU, paper advances to the next stop in channel 12.

(See note for <FF>, above.)

GEK-00029B

15

5000 Series Programmer’s Manual

ESCAPE SEQUENCE DIRECTORY

Sequence

CSI or ESC [

CSI p1 p2 SP ~

ESC [p1 ; p2 SP B

ESC [p1 ; p2 SP G

ESC H

ESC J

ESC K

ESC L

ESC P

ESC Q

ESC [ p1 a

ESC [ p1 b

ESC c

ESC [ p1 d

ESC [ pl e

ESC [ p1; p2 f

ESC [ p1 g

ESC [ p1 ; ...; pn h

ESC [ p1 j

ESC [ p1 k

ESC [ p1 l

ESC [ p1; ... pn m

ESC [ p1 p2 ! p

ESC [ p1 ; p2 ; p3 q

ESC [ p1; p2 ; p3 r

ESC [ p1; p2 s

ESC [ p1 t

Meaning

Control Sequence Introducer

GENEMU: Selects emulation

GSM: Modifies vertical (p1) and horizontal (p2) character size

SPI: Sets lpi (p1) and/or cpi (p2) in decipoints

HTS: Sets a tab at current print position

VTS: Sets a tab at current paper position

PLD: Moves print line down 3/72 inch (subscript)

PLU: Moves print line up 3/72 inch (superscript)

DCS: Introduces dot graphics

Self-Test: Inactive. Sequence ignored.

HPR: Moves print position right p1 distance (relative)

REP: Dot graphics: repeat preceding character p1 times

RIS: Resets printer to a known initial state

VPA: Sets vertical position to p1 decipoints or lines

VPR: Moves paper forward p1 decipoints

HVP: Moves paper and print position (absolute)

TBC: Clears tabs: p1=3 for horizontal

SM: Set mode (PUM, LNM, proportional, character mapping)

HPB: Moves print position left by decipoints or columns

VPB: Moves paper backward by decipoints or lines

RM: Reset mode (PUM, LNM, proportional, character mapping)

SGR: Selects font styles and enhancements

GENVF2: EVFU vertical paper movement command

GENGRM: Selects graphics horizontal and vertical dot densities

GENFD: Sets form length (pl), margins: top (p2), bottom (p3)

GENSLR: Sets margins: left (p1), right (p2) in decipoints

Selects bar codes p1=3, quit bar code p1=0

Page

19

21

31

32

30

28

25

42

40

25

40

26

28

34

35

26

26

26

27

32

29

46

32

44

41

28

Chapter 2. ANSI Emulation

16

GEK-00029B

Sequence

ESC [ p1;… pn u

ESC [ p1 ;… p12;v

ESC [ p1 x

ESC [ p1 ; ...;p10 }

ESC [ p1 SP }

OSC or ESC ]

ESC ] 5

ESC ] !

ESC \

ESC [ p1 `

OSC 9 ; p1 ; ... ; p8-pn

ST

Meaning

GENHTS: Sets horizontal tabs (p1, etc.) in decipoints or columns

GENVTS: Sets vertical tabs (p1, etc.) in decipoints or lines

GENSNC: Selects international character sets

Selects bar code parameters

GENDFC: Download Font Control: Checks printer for downloaded font

Operating System Command: introduces sequence

BFL (Begin Font Load): Valid only if download option is installed.

Begins 12-channel EVFU table loading

ST: String Terminator. Exits special modes

HPA: Horizontal Position Absolute

Character Map Load

35

19

35

42

19

27

23

Page

30

30

22

GEK-00029B

17

5000 Series Programmer’s Manual

ANSI ESCAPE SEQUENCE CATEGORIES

The ANSI escape sequences have been separated according to functionality. Special areas of interest, such as graphics and the electronic vertical format unit (EVFU), have been described in separate sections. The functional groups are:

▪ Housekeeping

▪ Paper and Print Positioning

▪ Margins and Tabs

▪ Font Handling and Enhancements

▪ Graphics

▪ EVFU

Chapter 2. ANSI Emulation

18

GEK-00029B

Housekeeping Sequences

ESC [

ESC ]

ESC \

ESC c

CSI (Control Sequence Introducer): This sequence is used to begin sequences, that generally have multiple parameters.

OSC (Operating System Command): This is another special sequence introducer. Sequences which begin with OSC require the

ST string terminator sequence (ESC \) to end them.

ST (String Terminator): Terminates the loading of EVFU tables, download fonts, and dot graphics strings.

RIS (Reset to Initial State): Resets the printer to either the standard state shown below or to the state stored in the customer save area of memory. The RIS sequence can be disabled by ANSI option strap 3

(see Appendix D, ANSI (4800) or ANSI (4410), option 3).

Font Style

Character Size

RIS – Reset to Initial State

Parameter

Gothic Draft

State

1X Vertical, 1X Horizontal

Character Pitch

Country Selection

Code Page

Line Spacing

Partial Line Up

Partial Line Down

Bold Print

Underline Mode

Expanded Mode

Proportional Mode

Horizontal Tab Table

Left Margin

Right Margin

Form Number

Page Size

Top Margin

Bottom Margin

Forms Position

Vertical Tab Table

Vertical Format Unit

Graphics Density

VFU Load In Progress

Bar Code Mode

Dot Graphics

10 cpi

USA

437

6 lpi

Reset

Reset

Inactive

Inactive

Inactive

Reset

Empty

None - Column 0

None - Maximum

7

7920 decipoints/ 66 lines/11 inches

None

None

Top of form - current position

Empty

Default

60 H dpi, 72 V dpi, horizontal format

Exit (nothing saved)

Inactive

Inactive

Decimal

Hex:

BASIC:

27 99:

1B 63

CHR$(27);"c";

GEK-00029B

19

5000 Series Programmer’s Manual

ESC Q GENTST (Self-Test): This sequence is ignored.

Decimal:

Hex:

BASIC:

27 102 or 120

1B 5C or 9C

CHR$(27);"Q";

Chapter 2. ANSI Emulation

20

GEK-00029B

CSI p1 p2 SP ~ GENEMU (Emulation Control): Switches the control of the printer to another emulation. The parameters in the sequence are defined as follows: p1 p2

Emulation identifier. This parameter selects the particular emulation by a reference number supplied by GENICOM engineering. The assigned numbers may be found in the table below.

Reset control. Permits the parameters of the printer to be reset or defaulted. It is not always possible to meet the strict definition of this parameter, so each printer has a definition of how the reset control is implemented. The values as currently defined are:

0 Hold values (default). All possible values for printer control, e.g., tabs, margins, page length, are to be retained.

1 p1

22

23

24

30

40

41

Full reset. Resets parameters to initial state.

Manufacturer

0

10

GENICOM

GENICOM

1-19 GENICOM

20

21

IBM

IBM

Epson

IBM

Epson

Data Products

Printronix

Printronix

Emulation

ANSI

4410 ANSI

Reserved

Graphics Printer

Proprinter XL 9-wire

FX286-e

Proprinter XL 24-wire

LQ2500

ANSI

P300

P5008

Indeterminate Conditions

If no emulation parameter is supplied, the emulation remains in the current state and the rest of the sequence is ignored. Other parameter values and other parameters are reserved.

Mnemonic:

Decimal:

Hex:

BASIC:

<CSI> <p1> <p2> <SP> ~

27 91 <p1> <p2> 32 126

1B 5B <p1> <p2> 20 7E

CHR$(27);"<p1><p2><SP>~";

GEK-00029B

21

5000 Series Programmer’s Manual

Character Set Selection

ESC [ p1 x GENSNC (Select National Characters): This sequence selects the national character substitution if the currently selected character style supports it. The following values may be used for p1.

860

863

864

865

866

867

8572

8573

8574

8575

8576

24

437

850

852

853

855

19

20

21

22

23

8577

8578

8591

8592

13

14

15

16

17

18

10

11

12

7

8

9 p1

0

1

4

5

6

2

3

Country Map or Character Set

USA (ISO)

German (ISO)

French A (ISO)

French B

French Canadian

Dutch (Netherlands)

Italian

United Kingdom (ISO)

Spanish

Danish/Norwegian A

Danish/Norwegian B

Danish/Norwegian C

Danish/Norwegian D

Swedish/Finnish A

Swedish/Finnish B

Swedish/Finnish C

Swedish/Finnish D

Swiss

(Ignored)

Yugoslavian

United Kingdom A

Turkish

Greek

Italian (ISO)

Spanish (ISO)

IBM PC USA (MS Code Page 437)

IBM PC Multilingual (MS Code Page 850)

Microsoft Code Page 852 (East Europe)

Microsoft Code Page 853 (Turkey)

Microsoft Code Page 855 (Cyrillic)

Microsoft Code Page 860

Microsoft Code Page 863 (French Canadian)

Microsoft Code Page 864

Microsoft Code Page 865

Microsoft Code Page 866 (Russian)

Microsoft Code Page 867

USSR GOST (Russian)

Greek Code Page 437

DEC Multinational (LA-210)

Roman 8

Polish Mazowia

Turkish 8-bit Code Page

Greek Code Page 851

ISO 8859-1 Latin Alphabet #1

ISO 8859-2 Latin Alphabet #2

Chapter 2. ANSI Emulation

22

GEK-00029B

p1

8593

8594

8595

8596

8597

8598

8599

Country Map or Character Set

ISO 8859-3 Latin Alphabet #3

ISO 8859-4 Latin Alphabet #4

ISO 8859-5 Latin/Cyrillic

ISO 8859-6 Latin/Arabic

ISO 8859-7 Latin/Greek

ISO 8859-8 Latin/Hebrew

ISO 8859-9 Latin Alphabet #5

Character Map Load

OSC 9 ; p1 ; ... ;

p8-pn ST

Character Map Load: This sequence signals the beginning of a

Character Map Load data transfer. Character map definitions, which follow this sequence, are stored in non-volatile memory. The character map is selected with the GENICOM Select National

Characters (GENSNC) command using the p2 parameter that is specified in the load sequence for this command. The load is terminated by a String Terminator (ST) sequence. The downloaded character map replaces the USA ISO character set in character map memory.

A single character map containing 128 substitutions may be specified. A character map may be designated for either the GL table

(codes 20H-7EH) or the GR table (codes 80H-FFH). Any substitutions not specified within a character map load will be mapped one-to-one.

For example, code 41H prints the character normally found at location 41H (upper case A). When a character map designated as a

GR map is selected by the GENSNC command (see Character Set

Selection on page 22), the GL map will automatically be mapped one-to-one. A standard GL (7-bit) character map, such as French A, may be specified as the base for a downloaded GR (8-bit) character map, but an 8-bit GR map, Code Page 866, for example, may NOT be used as the base for a GL character map.

The complete syntax for the Character Set Load is shown below:

<OSC>9;<p1>;<p2>;...;<pn><ST> p1 Control Command

0

1

Stores new character map

Erases existing character. In this case, parameters p2pn are ignored and need not be supplied. An existing downloaded character map need not be erased before a new character map is loaded.

All other values of p1 are reserved.

p2 GENSNC (CSI p1 x) select parameter. Values must be between

90 and 99 in order not to interfere with GENICOM standard character maps. If a downloaded character map select parameter is a value other than 90 through 99, the download character map command is ignored.

p3 p4

Reserved. This parameter is marked by inserting a semicolon

(;) in the command sequence.

Reserved. This parameter is marked by inserting a semicolon

(;) in the command sequence.

GEK-00029B

23

5000 Series Programmer’s Manual

Chapter 2. ANSI Emulation p5 p6

Reserved. This parameter is marked by inserting a semicolon

(;) in the command sequence.

A literal string indicating the GENSNC select parameter of an existing character map (such as 437 or 850) to be used as a base in which substitutions from this command sequence may be made. This string may be up to 10 characters in length and must be specified only if the downloaded character map uses an existing map as a base. The string is terminated by a semi-colon (;). The base character map always defaults to

Code Page 437 if an ACT character map is specified and the downloaded character map is a GR table. If the downloaded map is a GL table, p6 must specify an existing GL table as the base or a one-to-one default base is used.

p7 A literal string used to identify the character map in the

Progam Mode Font – Country menu. This string may be up to

20 characters in length and is terminated by a semi-colon (;).

Note that only the first 11 characters of this string are used for display purposes.

p8-pn A trio of parameters used to specify the actual character map substitution. A semicolon must separate each parameter within the trio, and a semicolon must terminate each trio. The semicolon is not required for the last trio that immediately precedes the String Terminator (ESC \).

The elements of each trio are defined as follows:

1 A decimal number that identifies the destination character. This is the character value received from the host. For example, an upper case "A" has a decimal value of 65. Values of 32 through 126 and 128 through 255 are valid for this element.

The first element processed in the first substitution trio defines whether the map is for GL (7-bit) or GR (8-bit) substitution. If the first element is between 32 and 126

(inclusive), the map is GL, and the first element of each trio must also be between 32 and 126. Likewise, if the first element of the first trio is between 128 and 255, the map is a GR map and all first elements must fall between 128 and 255. The character substitution map is discarded if this rule is violated.

2 A decimal number that identifies the source character.

This is the location value of the desired character pattern in the printer font set. For example, an upper case "A" has a decimal value of 65. Values of 0 through the last available character for the currently selected font are valid for this element.

3 Reserved. A semicolon (;) is required to mark this element position. A zero is permitted.

24

GEK-00029B

Paper and Print Position Movements

ESC K

ESC L

PLD (Partial Line Down): Line terminator. Moves the print line down

3/72 inch for subscript printing. Also returns to the original line following a partial line up (<ESC> L - superscript) sequence. See note below.

Decimal:

Hex:

BASIC:

27 75

1B 4B

CHR(27)$;"K";

PLU (Partial Line Up): Line terminator. Moves the print line up 3/72 inch for superscript printing. Also used to return to the original line following a partial line down (ESC K - subscript) sequence. See note.

Decimal:

Hex:

BASIC:

27 76

1B 4C

CHR$(27);"L";

NOTE

In the 4800 emulation, these sequences can be used in succession to advance or reverse the paper to another line. In the 4410 emulation, they can be used in pairs to change from superscript directly to subscript or subscript directly to superscript, but can not be used to position the paper.

Also see the SScript: ON/OFF menu selection in the User's

Manual.

ESC [ p1 a HPR (Horizontal Position Relative): Line terminator. Moves the print position to the right of the current position. The distance specified by the p1 parameter is in decipoints. An HPR move exceeding the right margin sets the print position at the margin. If the p1 parameter is zero or missing, the command is ignored.

Decimal:

Hex:

BASIC:

27 91 <p1> 97

1B 5B <p1> 61

CHR$(27);"[<p1>a";

GEK-00029B

25

5000 Series Programmer’s Manual

ESC [ p1 d

ESC [ p1 e

ESC [ p1 ; p2 f

ESC [ p1 j

VPA (Vertical Position Absolute): Line terminator. Sets the vertical position to the value specified by <p1>, moving paper forward or backward to the new position. The distance specified by the <p1> parameter is in decipoints. This command can be used to print inside top and bottom margins. If the specified position is not within the current page, the command is ignored. If the parameter value is omitted or less than 5 decipoints, it will result in the vertical position being set to the top of form position.

Decimal:

Hex:

BASIC:

27 91 <p1> 100

1B 5B <p1> 64

CHR$(27);"[";CHR$(<p1>);"d";

VPR (Vertical Position Relative): Line terminator. Increases the current vertical position by the value specified by p1. Decipoints are converted to provide the 1/144-inch moves shown in the table.

Decipoint Value

Missing or 0 – 4

5-9

10-14

15-19

Movement In Inches

No Movement

1/144 inch

2/144 inch

3/144 inch

17,280 or greater 24 inches

Decimal:

Hex:

BASIC:

27 91 <p1> 95

1B 5B <pl> 65

CHR$(27);"[<p1>e";

HVP (Horizontal and Vertical Position): Line terminator. Sets the vertical paper position to the value of <p1> and the print position to the <p2> value. Values are sent as decipoints. HVP can position printing inside margins. The vertical position can not exceed the form length and the horizontal position cannot exceed the maximum width for the printer.

Decimal:

Hex:

BASIC:

27 91 <p1> 52 96

1B 5B <p1> 3B <p2> 66

CHR$(27);"[<p1>;<p2>;f";

HPB (Horizontal Position Backward): Line terminator. Moves the print position left of the current position by the distance specified in

<p1>. Values are sent as decipoints. The print position is set to the left margin if the <p1> value would exceed the margin. An HPB with a

<p1> value of zero is ignored.

Decimal:

Hex:

BASIC:

27 91 <p1> 106

1B 5B <p1> 6A

CHR$(27);"[<p1>j";

Chapter 2. ANSI Emulation

26

GEK-00029B

ESC [ p1 k

ESC [ p1 '

VPB (Vertical Position Backwards): Line terminator. Moves the paper in reverse by the distance specified by p1. Values can be sent as decipoints. The paper position is set to the top margin if the p1 value exceeds the margin. A VPB with a p1 value of 5 decipoints or less is ignored.

Decimal:

Hex:

BASIC:

27 91 <p1> 107

1B 5B <p1> 6B

CHR$(27);"[<p1>k";

HPA (Horizontal Position Absolute): Line terminator. Moves the print position to the value specified in <p1>. Values are sent as decipoints. Position zero is column one. The print position is set to the right margin if the <p1> value would exceed the margin. An HPB with a <p1> value greater than 9792 is ignored.

Decimal:

Hex:

BASIC:

27 91 <p1> 96

1B 5B <p1> 60

CHR$(27);"[<p1>'";

GEK-00029B

27

5000 Series Programmer’s Manual

Margins and Tabs

ESC H

ESC J

ESC [ p1 g

HTS (Horizontal Tab Set): Sets a tab at the current print position and updates any existing horizontal tab table. A total of 22 tabs can be set. If this number is exceeded, the leftmost 22 tabs will be retained.

Decimal:

Hex:

BASIC:

27 72

1B 48

CHR$(27);"H";

VTS (Vertical Tab Set): Sets a tab at the current print position and updates any existing vertical tab table. A total of 12 tabs can be set.

If this number is exceeded, the 12 tabs closest to the top of the page will be retained.

Decimal:

Hex:

BASIC:

27 74

1B 4A

CHR$(27);"J";

TBC (Tab Clear): Clears horizontal or vertical tab stops based on the p1 value as follows: p1 = 0 p1 = 1 p1 = 3 p1 = 4

Clears horizontal tab at current print position.

Clears vertical tab at current print position.

Clears all horizontal tabs.

Clears all vertical tabs.

More than one parameter can be used.

Example: To clear all horizontal and vertical tabs, send:

<ESC> [ 3 ; 4 g

Decimal:

Hex:

BASIC:

27 91 <p1> 103

1B 5B <p1> 67

CHR$(27);"[<p1>;"g";

ESC [ p1; p2 ; p3 r GENFD (Forms Definition): Establishes the form length <p1>, the top margin <p2>, and the bottom margin <p3> in decipoints. Default parameters are for an 11-inch (7,920 decipoints) long form with a top and bottom margin of zero.

p1 - maximum allowable length is 24 inches (17,280 decipoints).

p2 - top of page to first print line p3 – non-printable area at bottom of form

Decimal:

Hex:

BASIC:

27 91 <p1> <p2> <p3> r

1B 5B <p1> <p2> <p3>

CHR$(27);”[<p1>;<p2>;<p3>r";

Chapter 2. ANSI Emulation

28

GEK-00029B

ESC [ p1; p2 s

Sequence Explanation

ESC [ r

ESC [ 8280 r

Default values of 11-inch form length, zero top and bottom margins.

11.5-inch form length, default top and bottom margins of zero

ESC [ ; 720 r Default length of 11 inches, top margin of 1-inch.

Default bottom margin of zero.

ESC [ ; ; 720 r Default length of 11 inches, default top margin of zero, and a 1-inch bottom margin.

ESC [ 7920 ; 360 ; 360 r 11-inch form length, ½-inch top and bottom margins

Decimal:

Hex:

BASIC:

27 91 <p1> <p2> <p3> 114

1B 5B <p1> <p2> <p3> 72

CHR$(27);"[<p1><p2><p3>r";

GENSLR (Set Left/Right Margins): The p parameters are distances from the left edge of the printable area of the paper. Parameter <p1> sets the left margin and <p2> sets the right margin. An omitted parameter clears that margin. Invalid parameters set the left margin to zero (column 1) and the right margin to 9,504 decipoints (column

136 at 10 cpi for the 13.6-inch machines).

A new left margin takes effect following any line terminator that normally calls for a print position set to the left. A new right margin takes effect when the print position reaches the new margin.

Margin settings stored as decipoint values are enforced to the nearest

1/120 of an inch. Character printing operates at 1/120 of an inch.

Decimal:

Hex:

BASIC:

27 91 <p1> <p2> 115

1B 5B <p1> <p2> 73

CHR$(27);"[<p1><p2>s";

NOTE

There is a physical left margin of .6 to 1.6 inches from the edge of the paper to the first printable column. This distance is adjustable by sliding all four tractors sideways. The margins set with this sequence begin at the first physical print position, not at the edge of the paper.

GEK-00029B

29

5000 Series Programmer’s Manual

ESC [ p1 ; ... p22; u GENHTS (Multiple Horizontal Tab Set): Sets up to 22 horizontal tabs. The p parameters are set in decipoints.

If more than 22 tabs are set, the highest numbered tabs (farthest right) will be pushed out of the tab table. Tabs set in front of the left margin, or beyond the right margin. are not usable. Moving the margins will make them active.

Example: To place tabs at columns 10, 20, and 40 at 10 cpi, send

ESC [ 10 ; 40 ; 20 u (tabs can be specified in any order).

Decimal:

Hex:

BASIC:

27 91 <p1> 59 <p2> 59 … <p22> 59 117

1B 5B <p1> 3B <p2> 3B ... 3B <p22> 3B 75

CHR$(27);"[<p1>;<p2>; ... ;<p22>;u"

ESC [ p1 ; …; p12 ; v GENVTS (Multiple Vertical Tab Set): Sets up to 12 vertical tabs.

The p parameters are set in decipoints. If more than 12 tabs are set, the 12 tabs nearest the top of form will be retained. If a tab is set in the top margin area, it will be stored but will not be active until the margin is moved. If a tab is set beyond the bottom margin, attempting to move to that tab will advance the paper to the next top of form.

Decimal:

Hex:

BASIC:

27 91 <p1> 59 <p2> 59 … <p12> 59 118

1B 5B <p1> 3B <p2> 3B … <p12> 3B 76

CHR$(27);"[<p1>;<p2>;...;<p12>;v";

Chapter 2. ANSI Emulation

30

GEK-00029B

Font Handling and Enhancements

ESC [ p1; p2 SP B GSM (Graphic Size Modification): This sequence modifies the vertical <p1> and horizontal <p2> size of expanded and oversize characters. When using expanded characters, the currently selected font style is used. Oversize uses its own distinct font style.

Parameter values are percentages of the normal size character, so values over 100 are needed for expansion. Expansion factors are obtained by dividing values by 100.

Example: A parameter value of 526 would be divided by 100 to produce an expansion factor of 5 (5X expansion). Values less than

100 are treated as 1X expansion.

X1: 0-199 (Default) X4: 400-499 X7: 700-799

X2: 200-299

X3: 300-399

X5:

X6:

500-599

600-699

X8: 800-UP

Mixed sizes within a line can be top or bottom justified depending on the Program Mode menu option (see VExOpt:Default and

VExOpt: Baseline).

The top of an expanded character is used as the starting point for vertical paper movement (line feed). The top or bottom of oversize characters can be used depending on the state of menu option

SETUP | FORMAT | MODIFY FORMAT |GENPRTOPTS |

GROUP 2 |Strap 13.

When this sequence is received with a value of 200 or more, expanded printing starts if the printer is in the text mode (not bar codes, oversize, etc.

Examples:

ESC [ ; 200 B

ESC [ 200 ; 200 B

ESC [ 800 ; 400 B

X1 Vertical

X2 Vertical

X8 Vertical

X2 Horizontal

X2 Horizontal

X4 Horizontal

During vertically expanded printing, blank lines (lines with no printed characters) are not expanded from the current lpi setting.

Decimal:

Hex:

BASIC:

27 91 p1 59 p2 32 66

1B 5B p1 3B p2 20 42

CHR$(27);"[<p1>;<p2>B";

GEK-00029B

31

5000 Series Programmer’s Manual

ESC [ p1 ; p2 SP G SPI (Spacing Increment): This sequence is used to set line spacing

(p1) and character spacing or pitch (p2). If the parameter is missing or zero, the spacing remains unchanged. In the native mode, p1 can range from 1 to 17,820 decipoints (24 inches). The printable area

(between the top and bottom margin) can not be exceeded. The range of p2 is dependent on the font and will be ignored if exceeded.

Examples of Spacing Values

LPI

3

4

6

8

LPI Spacing p1

(decipoints)

240

180

120

90

CPI

10

12

13.3

15

16.7

CPI Spacing p2

(decipoints)

72

60

54

42

36

Decimal:

Hex:

BASIC:

27 91 p1 59 p2 32 71

1B 5B p1 3B p2 20 47

CHR$(27);"[<p1>;<p2>G";

ESC [ p1 ; pn... m SGR (Select Graphic Rendition): Selects font style and enhancements (bold and underline). One font designator plus any number of enhancements can be entered in the escape sequence using the parameter values in the following table. If the requested font is not installed, the default font is selected.

Parameter

0

1

4

5

21

22

24

25

26

Enhancement

Cancel all print enhancements

Bold (enhancement)

Underline (enhancement)

Double Wide

Underline

Cancel Bold

Cancel Underline

Cancel Expanded

Cancel Proportional

Parameter

10

11

12

13

14

15

16

17

18

19

Font

Default Font - Data Processing

Gothic Draft Font

Character Graphics

Gothic NLQ Font

Courier NLQ Font

High Speed Draft Font

OCR-A

OCR-B

Italic NLQ Font or Download A*

Correspondence or Download B*

Chapter 2. ANSI Emulation

32

GEK-00029B

ESC [ p1 ; p ... m (continued)

*A download font (if loaded) overrides any other font. See Character

Map Load on page 23.

Examples:

For Gothic NLQ font underlined send:

ESC [ 4 ; 13 m

To cancel underlining and retain Gothic NLQ - send one of the following:

Decimal:

Hex:

BASIC:

ESC [ ; 13 m

ESC [ 0 ; 13 m

ESC [ 0 m

ESC [ 24m

27 91 <p1> ; <pn> m

1B 5B <p1> 3B ... <pn> 6D

CHR$(27);"[<p1>;...<pn> m";

GEK-00029B

33

5000 Series Programmer’s Manual

ESC [ p1; ... pn h

ESC [ p1 ... pn l

SM (Set Mode): Sets the mode or modes specified by the parameters listed below. Parameters preceded by the 'greater than' sign are privately defined modes and should be sent separately.

Parameter

Number

20

Mode

Mnemonic

LNM

Mode Function

Line Feed New Line Mode

LNM - Line Feed New Line Mode . When using this mode, a received line feed command causes a carriage return (new line). When LNM is reset, a line feed command only causes a vertical position movement.

The following parameters are privately defined modes.

Parameter

Number

>1

>2

>5

Mode

Mnemonic

GENPRM

GENC1C

GENCS2

Mode Function

Proportional Print Mode

C1 Control Code Mode

Character Set 2 Mode

GENPRM (Proportional Print Mode): Enables proportional printing.

This mode does not apply to the oversize character feature. When reset (default), characters are spaced at the current cpi.

GENC1C (C1 Control Code Mode - PC Set 1): When set, it allows the use of C1 control codes. When reset, 80H - 9FH are ignored. See

Appendix E for an explanation of how character sets are mapped. The default state is set using ANSI emulation option 6 (see Appendix D,

ANSI (4800) or ANSI (4410) Tables).

GENSC2 (Character Set 2 Mode - PC Set 2): Selects character set 2 of any of the 8-bit international character sets. See PC Set 2 in

Appendix H for an explanation of how character sets are mapped. The default state is set using option strap 7 in the ANSI emulation options (see Appendix D, ANSI (4800) or ANSI (4410) Tables).

EXAMPLE: To print proportional, send ESC [ > 1 h.

Decimal:

Hex:

BASIC:

27 91 62 49 104

1B 5B 3E 31 68

CHR$(27);"[>1h";

RM (Reset Mode): Resets any modes turned on by the Set Mode command above. Parameters and syntax are the same.

Chapter 2. ANSI Emulation

34

GEK-00029B

ESC ] 5

ESC [ p1 SP }

BFL (Begin Font Load): This sequence is not honored when self-test determines that the download font option is not installed. Permits downloading of customer-defined font characters into printer nonvolatile memory from the host. Loading is terminated when an

ESC \ sequence is received.

Decimal:

Hex:

BASIC:

27 93 53

1B 5D 35

CHR$(27);"]5";

GENDFC (Download Font Control): Using the serial interface, this command allows the host to see if at least one valid font is loaded

(p1=2). The printer sends DCS 30H 30H ST if a font is loaded,

DCS 44H 45H ST if no font is loaded. It also provides the capability to erase the download font area (p1=1).

Decimal:

Hex:

BASIC:

27 91 <p1> 32 125

1B 5B <p1> 20 7D

CHR$(27);"[<p1>}";

GEK-00029B

35

5000 Series Programmer’s Manual

GRAPHICS

The ANSI emulation graphics mode provides both horizontal and vertical dot plotting methods. These methods enable the printing of

ASCII characters in their binary code form. Since each character has a unique pattern of 1s and 0s (dots and voids) that make up its binary code, the correct placement of these binary forms enables you to form larger images on the paper.

For clarity in the text, a binary 1 (a printed dot) is shown as an X and a binary 0 (empty dot position) will be shown as a 0.

Six-Bit Graphics

In the graphics mode, only the low order six bits of a character are used (bits 1-6). Looking at an ASCII code chart, the question mark character

(?) is represented by the binary number 1111110 (bit 1 bit 7). Since only the first 6 bits are used. a "?" prints six dots on the paper. An asterisk "*" is represented by 010101 which prints the following:

Horizontal Graphics

0X0X0X

Vertical Graphics

0

X

0

X

0

X

Notice that in horizontal graphics the character is printed on a single horizontal dot row. In vertical graphics, the character is printed six dots high, one character per dot column.

Using the question mark that prints all dots, a series of these characters in horizontal graphics produces a one-dot-high solid line across the paper. The same character in vertical graphics produces a six-dot high band across the paper.

By repeating, omitting and mixing characters across a page, images such as graphs, charts, and pictures can be produced.

Dot Patterns and Densities

The chart on the next page shows the dot patterns for each of the

ASCII characters. Each character represents six dots or dot positions, and their spacing is dependent on the density selected. At 60 dpi density, the dots are spaced 1/60 inch apart. At 120 dpi, each character represents six dots spaced 1/120 inch apart.

Chapter 2. ANSI Emulation

36

GEK-00029B

This chart shows the dot patterns for the ASCII characters needed to cover all dot/void combinations. Other valid characters (although they are repeat patterns of the characters in the chart) are 20H-3FH.

Character

^

_

\

]

Z

[

X

Y

T

U

V

W

P

Q

R

S

L

M

N

O

H

I

J

K

D

E

F

G

@

A

B

C

Legend:

Dots

0000X0

X000X0

0X00X0

XX00X0

00X0X0

X0X0X0

0XX0X0

XXX0X0

000XX0

X00XX0

0X0XX0

XX0XX0

00XXX0

X0XXX0

0XXXX0

XXXXX0

000000

X00000

0X0000

XX0000

00X000

X0X000

0XX000

XXX000

000X00

X00X00

0X0X00

XX0X00

00XX00

X0XX00

0XXX00

XXXX00

Value

58H

59H

5AH

5BH

5CH

5DH

5EH

5FH

50H

51H

52H

53H

54H

55H

56H

57H

48H

49H

4AH

4BH

4CH

4DH

4EH

4FH

40H

41H

42H

43H

44H

45H

46H

47H

Character

~

?

|

}

{ z x y v w t u r s p q l m n o j k h i f g d e b c

’ a

X=dot 0=no dot (void)

Dots

0000XX

X000XX

0X00XX

XX00XX

00X0XX

X0X0XX

0XX0XX

XXX0XX

000XXX

X00XXX

0X0XXX

XX0XXX

00XXXX

X0XXXX

0XXXXX

XXXXXX

00000X

X0000X

0X000X

XX000X

00X00X

X0X00X

0XX00X

XXX00X

000X0X

X00X0X

0X0X0X

XX0X0X

00XX0X

X0XX0X

0XXX0X

XXXX0X

Value

78H

79H

7AH

7BH

7CH

7DH

7EH

7FH

70H

71H

72H

73H

74H

75H

76H

77H

68H

69H

6AH

6BH

6CH

6DH

6EH

6FH

60H

61H

62H

63H

64H

65H

66H

67H

GEK-00029B

37

5000 Series Programmer’s Manual

Horizontal Format

Graphics data printed in horizontal format is comprised of a stream of bytes from left to right across each dot row.

This chart shows that byte 1 (or character 1) in row 1 prints its six bits from left to right in a single dot row. The next byte (byte 2) prints its six bits, representing a character, in the same dot row across the page.

Byte 1 Byte 2 Byte n Byte !

Row "

1

2

3

.

.

6

1 2 3 4 5 6 1 2 3 4 5 6 …1 2 3 4 5 6

1 2 3 4 5 6 1 2 3 4 5 6 …1 2 3 4 5 6

1 2 3 4 5 6 1 2 3 4 5 6 …1 2 3 4 5 6

. . . . . .

. . . . . .

…. . . . . .

. . . . . .

. . . . . .

…. . . . . .

1 2 3 4 5 6 1 2 3 4 5 6 …1 2 3 4 5 6

Vertical Format

In vertical format, each byte (or character) occupies six dot rows of one column. Each character is one dot wide and six dots high. The next character (byte 2) is printed beside the first, moving from left to right across the page.

Byte !

Row

1

2

3

4

5

6

1 bit

1

2

3

4

5

6

2 bit

1

2

3

4

5

6

3 bit

1

2

3

4

5

6

…n

…bit

…1

…2

…3

…4

…5

…6

Chapter 2. ANSI Emulation

38

GEK-00029B

Eight-Bit Graphics

Horizontal Format

Byte !

Row "

1

2

3

.

.

8

Graphics data printed in horizontal format is comprised of a stream of bytes from left to right across each dot row.

This chart shows that byte 1 (or character 1) in row 1 prints its eight bits from left to right in a single dot row. The next byte (byte 2) prints its eight bits, representing a character, in the same dot row across the page.

Byte 1

1 2 3 4 5 6 7 8

. . . . . .

1 2 3 4 5 6 7 8

Byte 2

1 2 3 4 5 6 7 8

. . . . . .

1 2 3 4 5 6 7 8

Byte n

…1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 …1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 …1 2 3 4 5 6 7 8

. . . . . .

. . . . . .

…. . . . . .

…. . . . . .

…1 2 3 4 5 6 7 8

Vertical Format

In vertical format, each byte (or character) occupies six dot rows of one column. Each character is one dot wide and six dots high. The next character (byte 2) is printed beside the first, moving from left to right across the page.

Byte !

Row

3

4

1

2

5

6

7

8

1 bit

1

2

3

4

5

6

7

8

2 bit

1

2

3

4

5

6

7

8

3 bit

1

2

3

4

5

6

7

8

…n

…bit

…1

…2

…3

…4

…5

…6

...7

...8

GEK-00029B

39

5000 Series Programmer’s Manual

Other Graphics Considerations

In horizontal format, an LF causes the paper to advance one or two dot rows based on the vertical dot density, regardless of whether 6-bit or 8-bit graphics has been selected.

In vertical format, the paper is advanced as the dot rows (6 or 8, depending on graphics mode) are printed.

Graphics Sequences

ESC P

ESC [ p1 b

DCS (Device Control String): Enters dot graphics mode at the density and format previously selected by the

ESC [ <p1> ;<p2> ; <p3> q sequence. Following this sequence, the printer prints discrete dots and leaves spaces based on the 1s and 0s in the low order six bits of each byte received. forming graphic dot rows from left to right. To exit from dot graphics mode, use ESC \.

While in graphics mode (after ESC P and before the ESC \ sequence),

8-bit graphics can be printed instead of 6-bit by using one of the following sequences:

ESC " 1 n1 <data bytes>

ESC " 2 n1 <data bytes>

ESC " 3 n1 <data bytes>

60 dpi horizontal

120 dpi horizontal

Uses current horizontal and vertical density.

n1 number of data bytes to follow

<data bytes> n1 bytes of graphics data

When the number of bytes of 8-bit data specified by n1 have been processed, and prior to receiving an ESC \ sequence, the data will print as 6-bit graphics.

Decimal:

Hex:

BASIC:

27 91 80

1B 5B 50

CHR$(27);"P";

REP (Repeat Text or Dot Graphics Character): Repeats the single preceding character p1 times. If p1 is 0 or unspecified, it is set to 1.

The maximum value for p1 is 32,767.

Decimal:

Hex:

BASIC:

27 91 <p1> 98

1B 5B <p1> 62

CHR$(27);"[<p1>b";

Chapter 2. ANSI Emulation

40

GEK-00029B

ESC [ p1 ; p2 ; p3 q GENGRM – Select Graphics Mode: Selects the graphics mode, format, and horizontal or vertical density for dot graphics.

IMPORTANT

This sequence must be sent before entering the graphics mode with ESC P.

The first parameter selects the graphics mode: the second parameter selects the vertical spacing, and the third selects the horizontal dot spacing.

p1 value Selects Graphics Format null

0

Reserved: Vertical format 60h x 72v if no <p2> or <p3>

Reserved: Vertical format 60h x 72v if no <p2> or <p3>

4

5

6+

1

2

3

Reserved: Vertical format 120h x 72v if no <p2> or <p3>

Reserved: Vertical format 120h x 144v if no <p2> or <p3>

Reserved: Sequence ignored

Horizontal format 60h x 72v if no <p2> or <p3>

Similar to 4, above, if <p3> = 5, 6, or 7, else ignore

Reserved: Sequence ignored

Note: <p2> and <p3> are ignored in this mode.

p2 null

0-6

7+

Selects Vertical Density

72dpiv (p1=4 only)

144dpiv

72dpiv p3 null

0-3

4

5

6-7

8-10

11+

Decimal:

Hex:

BASIC:

Selects Horizontal Density

60dpih (p1=4 only)

Reserved: Leave current value unchanged

Reserved: Leave current value unchanged

Reserved: 120dpih

120dpih

Reserved: 60dpih

60dpih

27 91 <p1> <p2> <p3> 112

1B 5B <p1> <p2> <p3> 70

CHR$(27);"[<pl><p2><p3>q";

GEK-00029B

41

5000 Series Programmer’s Manual

ELECTRONIC VERTICAL FORMAT UNIT - EVFU

Downline vertical tab loading is accomplished through the EVFU. The

EVFU allows loading a form table with a minimum form length of

.33 inches (240 decipoints) and a maximum length of 24 inches

(17,280 decipoints).

Since the maximum length is 24 inches, the number of lines is dependent on the lpi setting. 3 lpi = 72 lines. 4 lpi = 96 lines.

6 lpi = 144 lines, and 8 lpi = 192 lines. Exceeding the maximum causes a fault.

Downloading the EVFU

▪ The vertical format type must be set to VtType:Emul VFU through the control panel using the Program Mode.

▪ No paper instruction lead (PI) is required.

▪ When the printer has an EVFU table loaded, VFU is displayed on the control panel.

ESC ] !

Start EVFU table loading sequence . Each line of the form requires an entry. Dummy values (filler codes - See Table of Channel Codes on page 5-30) are required in lines with no channel. Two bytes are required for each line of the form. Loading Is terminated by the ESC \ sequence.

Decimal:

Hex:

BASIC:

27 93 33

1B 5D 21

CHR$(27);"]!";

Loading the Table

The first table location is normally loaded with the channel 1 code.

This is defined as the top-of-form (TOF) channel. The table may be left without channel 1, and a command to skip to channel 1 will cause a normal form feed as though there were no VFU. Two bytes are loaded for each line of the form to be controlled. One or more channel numbers may be indicated in the two-byte code.

The format of two-byte channel control code is:

Bit Number

Channel Number

First Byte

8 x x

7 one one

6

6 y

5

5 y

4

4 y

3

3 y

2

2 y

1

1 y

Bit Number

Channel Number

Second Byte y: x:

8 x x

7 6 one 12 one y

0 = no stop in channel

1 = stop in channel bit has no meaning

5

11 y

4

10 y

3

9 y

2

8 y

1

7 y

Chapter 2. ANSI Emulation

42

GEK-00029B

NOTE

To make characters acceptable, bit 7 must be set.

Each "channel control code" pair of bytes has the capability to indicate multiple channels since each channel indication has a unique bit position, which is either ON=1 or OFF=0.

80

96

64

64

64

64

64

64

65

66

68

72

Decimal

Value

1 2

64 64

64

64

64

64

64

64

65

66

68

72

80

96

TABLE OF CHANNEL CODES

Binary

Value

ASCII

Character

1

1000000

2

1000000

1

@

2

@

Remarks

Fillers: see Note

100000 1

10000 1 0

1000 1 00

100 1 000

10 1 0000

1 1 00000

1000000

1000000

1000000

1000000

1000000

1000000

1000000

1000000

1000000

1000000

1000000

1000000

100000 1

10000 1 0

1000 1 00

100 1 000

10 1 0000

1 1 00000

P

`

@

@

@

@

@

@

A

B

D

H

@

@

A

B

D

H

P

`

@

@

@

@

Channel 1

Channel 2

Channel 3

Channel 4

Channel 5

Channel 6

Channel 7

Channel 8

Channel 9

Channel 10

Channel 11

Channel 12

BASIC Programming Example for EVFU Table Loading

PROGRAM INSTRUCTION

1500 WIDTH "LPT1:" 255

1591 LPRINT CHR$(64);CHR$(64);

1592 NEXT I

1600 LPRINT CHR$(64);CHR$(66);

1610 LPRINT CHR$(27);"\";

1620 END

REMARKS

Required by some BASIC languages to avoid auto LF at

1510 LPRINT CHR$(27);"]I";

1520 LPRINT CHR$(65);CHR$(64);

1530 FOR I=1 to 4

1531 LPRINT CHR$(64);CHR$(64);

1532 NEXT I

1540 LPRINT CHR$(68);CHR$(64);

1550 FOR I=1 to 16

1551 LPRINT CHR$(64);CHR$(64);

1571 LPRINT CHR$(64);CHR$(64);

1572 NEXT I

1580 LPRINT CHR$(80);CHR$(64);

1590 FOR I=1 to 8 column 80

Enables EVFU loading.

Resets TOF, Channel 1 Sao Table of Channel Codes

4 filler lines

Selects Channel 3. See Table of Channel Codes

16 filler lines

1552 NEXT I

1560 LPRINT CHRS$72);CHR$(64); Selects channel 4. See Table of Channel Codes

1570 FOR I=1 to 31

31 filler lines

Selects channel 5. See Table of Channel Codes

8 filler lines

Selects channel 8. See Table of Channel Codes

Exit EVFU loading.

GEK-00029B

43

5000 Series Programmer’s Manual

EVFU Default

The default EVFU will be generated based on the current form length and lpi setting under the following conditions:

▪ When the printer is initialized

▪ When either the forms definition or lpi setting is changed

▪ When the start EVFU load escape sequence ESC ] is immediately followed by the end load sequence ESC \

▪ When the emulation is changed from P Series or Dataproducts, to

ANSI

The following chart shows how the default EVFU table is defined:

CHANNEL

1

2

3

4

5

6

7

8

9

10

11

12

DESCRIPTION

Top Margin (first line

Bottom Margin (last line)

Single Spacing

Double Spacing

Triple Spacing

Half Form

Quarter Form

Tenth Line

Bottom of Form (bottom margin)

Bottom of Form minus 1 line

Top of Form minus 1 line (last line this form)

Top of Form

Skip to Channel Command

ESC [ p1 ; p2 ! p GENVFU (VFU Channel Command): Commands vertical paper movement to the channel specified by the number formed by p1 and p2. Valid channel numbers are in the range 1- 12.

0;1 - selects channel 1

0;9 - selects channel 9

1;1 - selects channel 11

Channel 1 is always used for TOF; channel 12 is always used for vertical tab. When the channel number is greater than 12, the program defaults to channel 1. If the table has not been loaded and a channel command is received, it is ignored.

Decimal:

Hex:

BASIC:

27 91 <p1> ; <p2> ! 112

1B 5B <p1> 3B <p2> 21 70

CHR$(27);"[<p1>;<p2>!p";

Chapter 2. ANSI Emulation

44

GEK-00029B

BASIC Programming Example for Skip to Channel

This is a sample program showing the use of the skip-to-channel command. It makes use of the previously loaded EVFU program.

PROGRAM INSTRUCTION

10 WIDTH “LPT1:”,255

20 LPRINT CHR$(27);”[0;1!p”;

30 LPRINT “TOP OF FORM”;

40 LPRINT CHR$(27);”[0;3!p”;

50 LPRINT “LINE 6”;

60 LPRINT CHR$(27);”[0;4!p”;

70 LPRINT “LINE 25”;

80 LPRINT CHR$(27);”[0;5!p”;

90 LPRINT “LINE 57”;

100 LPRINT CHR$(27);”0;8!p”;

110 LPRINT “END OF FORM”;

120 END

REMARKS

Required by some BASIC languages to avoid auto LF at column 80

Go to top of form (channel 1)

Print the indicated words

Go to channel 3

Print the indicated words

Go to channel 4

Print the indicated words

Go to channel 5

Print the indicated words

Go to channel 8

Print the indicated words

NOTE

Establish Top of Form locally before printing forms. When executing the program, paper slews to the top of the next form before beginning to print.

GEK-00029B

45

5000 Series Programmer’s Manual

BAR CODES

Thirteen different styles of bar codes and POSTNET are available.

Each style (except POSTNET) can be rotated 90, 180, or 270 degrees and printed with or without a human-readable line (HRL). The bar code symbol size and density are also adjustable.

NOTE

Control sequences given in the following text show the proper syntax needed from the host. The second line has examples of code written in the BASIC program language.

Entering and Exiting Bar Codes

Before the printer can print input data as bar code symbols, the bar code mode must be both selected and activated. There are two ways for this to be accomplished depending on the setting of printer option

1 for both 4800 and 4410 ANSI emulation.

SETUP | FORMAT | MODIFY FORMAT | GENPRTOPTS | ANSI |

Printer Option 1 (See Appendix G, Tables 5 and 6) is used to enable the SI (shift in) and SO (shift out) ASCII codes to activate and deactivate special mode functions. In this case, the special mode function is bar codes. With Option 1 enabled, code SO will turn on or activate the bar code mode. SI will turn bar codes off.

ANSI 4800/4410 Strap 1 OUT

Enter the bar code mode of printing with the following control sequence sent by the host. (See Appendix D for strapping options.)

ESC [ 3 t

LPRINT CHR$(27)*."[3t";

Data sent after the above sequence is interpreted and printed as bar codes.

Exit the bar code mode using:

ESC [ 0 t

LPRINT CHR$(27);"[0t";

ANSI 4800/4410 Strap 1 IN

(See Appendix D for strapping options.)

ESC [ 3 t

LPRINT CHR$(27);"[3t";

Selects the bar code special mode.

SO

LPRINT CHR$(14);

Activates bar codes and prints all received data as bar codes. (Only after it has been selected by ESC [3 t above.)

Chapter 2. ANSI Emulation

46

GEK-00029B

SI

LPRINT CHR$(15);

Deactivates bar codes and allows printing of normal text.

ESC [ 0 t

LPRINT CHR$(27);"[0t";

Deselects bar codes.

When an ESC [ 0 t is received before the SI code, bar codes are both deactivated and deselected.

Setting Bar Code Parameters

Select the style, height, spacing, orientation, and print density for the bar code using the following escape sequence. The second line in the example (written in BASIC) shows the parameters that are the default values for the printer.

ESC [<p1>;<p2>;…;<p10>}

Example

LPRINT CHR$(27);"[4;9;1;2;6;2;6;2;0;0}";

0 Interleaved 2 of 5

1 (Reserved for future use)

2 (Reserved for future use)

3 (Reserved for future use)

4 Code 3 of 9 (default)

5 EAN-8

6 EAN-13

7 Code 11

8 (Reserved for future use)

9 Codabar a/t p1: Style

10 Codabar b/n

11 Codabar c/*

12 Codabar d/e

13 UPC-A

14 UPC-E

15 Code 93

16 Code 128 (A, B, C)

17 (Reserved for future use)

18 (Reserved for future use)

50 POSTNET (see note)

NOTE

When using POSTNET, parameters <p2> through <p10> are invalid. If these parameters are changed, they will be retained in memory and will affect other styles if selected.

See Appendix F for more information on POSTNET.

GEK-00029B

47

5000 Series Programmer’s Manual

Bar Code Dimensions

NOTE

The following dimensions are for barcodes printed at 0 and 180 degrees rotation. Barcodes printed at 90 or 270 degrees rotation will be compressed by a 6:5 ratio due to the difference in size of the horizontal and vertical grids.

p2 p3 p4 p5*

Bar code height in 1/12-inch increments

Minimum:

Maximum:

1=l/12 inch

120=10 inches

Default: 9=9/12 inch (3 / 4 inch)

Human-readable line is not included in height.

Human-readable line

0=Do not print human-readable line

1=Print human-readable line (default)

Narrow bar width, number x 1/120 inch

Default:

Range:

2 (2/120 inch, approximately .017 inch)

2, 4, 6, . . . 126

Wide bar width, number x 1/120 inch p6

Default:

Range:

6 (6/120 inch, approximately . 050 inch)

2, 4, 6, . . . 254

Narrow space width, number x 1/120 inch

Default:

Range:

2 (2/120 inch, approximately . 017 inch)

2. 4, 6, . . .126

Wide space width, number x 1/120 inch p7* p8*

Default:

Range:

6 (6/120 Inch. approximately .050 inch)

2, 4, 6, . . . 254

Intercharacter space width, number x: 1/120 inch

Default:

Range:

2 (2/120 inch, approximately . 017 inch)

2, 4, 6 . . . 126

* Parameters <p5>, <p7>, and <p8> are not programmable in some bar code styles since they are generated from other parameters.

Chapter 2. ANSI Emulation

48

GEK-00029B

p9

1

2

Bar code rotation and human-readable line (HRL) font style (if used).

0 No rotation - use currently selected font style, cpi, and lpi. This is the default setting.

No rotation - use special HRL font.

90-degree rotation use special HRL font

3

4

180-degree rotation use special FIRL font.

270-degree rotation use special HRL font.

p 10 Horizontal print density

0

1

60 dpi horizontal by 144 dpi vertical print density

120 dpi horizontal by 144 dpi vertical print density

Default for bar code styles 5, 6, 13, and 14 is 120 dpi.

Default for all other styles is 60 dpi.

Bar codes printed at 90 or 270 degrees rotation will print at the same speed (120 x 144) regardless of the selected horizontal density.

IMPORTANT

If no parameters have previously been entered, then the factory default values will be used. If previous values have been sent from the host, these values will prevail until changed by the host or the printer is initialized.

A missing parameter will leave the corresponding value unchanged.

A zero parameter value for p2–p8 will cause the default value to be selected.

Use semicolons as place holders when changing parameters.

LPRINT CHR$(27);"[;;;;;;;;;1}" Changes only parameter 10.

LPRINT CHR$(27);"15;;0}"

LPRINT CHR$(27);"[16}"

Changes only parameters 1 and 3.

Changes only the style of the bar code.

If no changes are made to the parameters of the bar code, the printer will use the following factory-set values.

GEK-00029B

49

5000 Series Programmer’s Manual

Default Bar Code Characteristics

p1=4 Code 39 p2=9 3/4 inch height p3=1 Human-readable line printed p4=2 Narrow bar width 1/60 inch p5=6 Wide bar width 1/20 inch p6=2 Narrow space width 1/60 inch p7=6 Wide space width 1/20 inch p8=2 Intercharacter space width 1/60 inch p9=0 No rotation, use currently selected font p10=0 Horizontal print density 60 dpi

Human-Readable Line (HRL)

The human-readable line is printed 0. 10 inch below the bar code symbol. The height of the HRL and the 0.10 inch space are not included in the bar code height parameter (p2).

A diamond symbol appearing in the human-readable line indicates one of the following conditions:

• Margin overrun. The data to be printed exceeds the available space remaining inside the programmed margins.

• The DEL character has been received while printing in a bar code style that permits the use of all 128 ASCII characters.

• An invalid character has been received. An example of this would be a letter "A" sent to the printer while printing a style 5 bar code.

Style 5 (EAN-8) only accepts the digits 0-9.

Font Styles and Enhancements

Non-rotated bar codes can be printed with an HRL in any of the fonts available to the printer.

If enhancements are desired (e.g., bold, underline, or expanded) the

HRL must be printed using the normal text mode. Print the bar code symbol(s) without the HRL first. Exit the bar code mode and print the

HRL using the normal text mode with enhancements.

Rotated bar codes use a special font for the human-readable line.

Spacing and Bar Code Editing Aids

There is a 0.25-inch space called a quiet zone at the beginning and end of every bar code. As a result, the minimum distance between two horizontal bar codes is 0.50 inch.

Most bar code styles accept commas. spaces, and horizontal tabs as delimiters to separate bar codes. A comma adds no additional space between bar codes, so the separation is the width of the quiet zone or

0.50 inch. A space character adds 0.10 inch to the quiet zone for a total of 0.60 inch separation. A horizontal tab adds the appropriate number of empty spaces to go to the next tab.

Chapter 2. ANSI Emulation

50

GEK-00029B

Bar Code Readability Statement

The following information is provided to ensure that the best results are obtained from your printed bar codes.

Use bar code readers designed to operate in the visible light frequency range. Optional infrared-readable ribbon cartridges are available.

Use bar code readers designed to read medium- or low-density bar code symbols. Avoid readers with apertures less than 7 mils

(.007 inch or .18 mm).

Using bar code size parameters smaller than the default settings may produce unacceptable results.

GEK-00029B

51

5000 Series Programmer’s Manual

Bar Code Program Examples

The following program examples are provided to help you become familiar with the bar code escape sequences. The programs are written in BASIC and printed using the LUST command. All bar codes are actual size.

Test Program

This is the minimum code needed to print a bar code. Use it to test the printer's ability to print bar codes when more complicated programs are not producing results.

Line 10 turns on the bar code mode. line 20 contains the data to be printed as a bar code symbol, and line 30 turns off the bar code mode.

10 LPRINT CHR$(27); "[3t";

20 LPRINT "1234567890";

30 LPRINT CHRS(27); "[0t";

Error Symbol

This example shows the error symbol in the HRL and the error pattern in the symbol. The error pattern causes the entire symbol to be rejected by the bar code reader.

The error was caused by the lowercase "a" being inserted into the data. The default style, Code 3 of 9. accepts only uppercase A-Z, the numbers 0-9, and the characters -, ., $, /, + and %.

10 LPRINT CHR$(27); "[3t";

20 LPRINT "1a34567890";

30 LPRINT CHR$(27); "[0t"

Chapter 2. ANSI Emulation

52

GEK-00029B

Changing Parameters

This example changes the style p1, height p2, and the HRL font p9 of the bar code. Notice that semicolons are used as place holders for the parameters not being changed.

Line 10 - changes style to Code 128, changes height to 1/4" (3/12").

and use the special HRL font.

10 LPRINT CHR$(27);"[16;3;;;;;;;1;}

20 LPRINT CHR$(27); "[3t";

30 LPRINT "1234567890";

40 LPRINT CHR$(27); "[0t"

Commas and Spaces as Delimiters

When a comma delimiter is used to separate bar codes, no additional space Is added to the quiet zones. Since the ending .25-inch quiet zone of one bar code symbol meets the beginning quiet zone of the next bar code, a total of .50-inch separates the two. Style 7 (line 5) is used for these examples since Code 11 uses both spaces and commas as delimiters.

10 LPRINT CHR$(27); "[7}";

20 LPRINT CHR$(27); "[3t";

30 LPRINT "1234,56,7890";

40 LPRINT CHR$(27); "[0t"

When spaces are used as delimiters, an additional 1-inch is added to the quiet zones. Note that multiple spaces can be used.

10 LPRINT CHR$27); "[3t"

20 LPRINT "1234 56 7890";

30 LPRINT CHR$27); "[0t"

GEK-00029B

53

5000 Series Programmer’s Manual

Horizontal Spacing

Use horizontal tabs for spacing bar code symbols across the page.

Line 10 sets horizontal tabs at 1440 and 2880 decipoints (2 and

4-inches). The HT codes in lines 40 and 60 cause a jump to the next tab.

10 LPRINT CHR$(27); "[1440;2880;u";

20 LPRINT CHR$(27); "[3t";

30 LPRINT "1234";

40 LPRINT CHR$(9);

50 LPRINT "5678";

60 LPRINT CHR$(9);

70 LPRINT "9012";

80 LPRINT CHR$(27); "[0t"

When no horizontal tabs are set, an HT code acts as a space, adding

0.1 inch to the separation. Total separation is 0.6 inch when the HT is added to the quiet zones.

Line 10 clears all previously set horizontal tabs for this example.

10 LPRINT CHR$(27); "[3g";

20 LPRINT CHR$(27); "[3t";

30 LPRINT "1234";

40 LPRINT CHR$(9);

50 LPRINT "5678";

60 LPRINT CHR$(9);

70 LPRINT "9012";

80 LPRINT CHR$(27); "[0t"

Chapter 2. ANSI Emulation

54

GEK-00029B

Printer Option Strap 11, Group 2 IN

Printer control strap 11 is used for positioning the paper after printing a bar code. Strap 11 IN sets the paper to the top of the bar code after printing; Strap 11 OUT leaves the paper position as is after printing a bar code. (See Appendix D for a complete listing of options available.

The state of strap 11 can be checked and changed using the setup menu.

In the following examples, lines 10 to 30 print the bar code symbol and line 40 adds a line of text to be printed.

Examples 1 and 2 show the effect strap 11 has on the position of the text.

In example 3, the semicolon at the end of line 30 has been deleted to show that Strap 11 only affects the same horizontal zone that the bar code occupies. The semicolon in BASIC is used to suppress a LF/CR after an LPRINT statement.

IMPORTANT

Strap 11 is only effective after exiting the bar code mode. As in the printout above, printing multiple bar codes without exiting

(line 80 above) causes all the bar codes to be printed in the same horizontal area of the paper regardless of the condition of strap 13. Also, some form of printable data must be on the line before a paper move command (see line 40 in the examples); if not, the paper will not backup to the top of the bar code.

EXAMPLE 1: Strap 11 OUT

10 LPRINT CHR$(27); "[3t";

20 LPRINT "1234567890";

30 LPRINT CHR$(27); "[0t";

40 LPRINT "STRAP 11 OUT"

EXAMPLE 2: Strap 11 IN

10 LPRINT CHR$(27); "[3t";

20 LPRINT "1234567890";

30 LPRINT CHR$(27); "[0t";

40 LPRINT "STRAP 11 IN"

GEK-00029B

55

5000 Series Programmer’s Manual

EXAMPLE 3: Strap 11 OUT with no suppression of LF/CR on line 30

10 LPRINT CHR$(27); "[3t";

20 LPRINT "1234567890";

30 LPRINT CHR$(27); "[0t"

40 LPRINT "STRAP 11 OUT"

Chapter 2. ANSI Emulation

56

GEK-00029B

Vertical Bar Codes

▪ Line 10 sets parameter p9 for 90-degree rotation using the special font for the HRL.

▪ Line 20 turns on the bar code mode.

▪ Line 30 is the data to be printed as a bar code symbol.

▪ Line 40 turns off the bar code mode.

10 LPRINT CHR$(27); "[;;;;;;;;2}";

20 LPRINT CHR$(27); "[3t";

30 LPRINT "12345";

40 LPRINT CHR$(27); "[0t"

Commas and spaces used as delimiters serve the same function as in horizontal bar codes. However, the quiet zones rotate with the symbol, leaving almost no horizontal separation between bar codes on the same line.

In the following examples, line 10 is used to print or inhibit the printing of the HRL (p3).

COMMAS: With HRL

10 LPRINT CHR$(27);"[;;1}";

20 LPRINT CHR$(27); "[3t";

30 LPRINT "1234,5678,9012";

40 LPRINT CHR$(27); "[0t"

GEK-00029B

57

5000 Series Programmer’s Manual

COMMAS: Without HRL

10 LPRINT CHR$(27); "[;;0}";

20 LPRINT CHR$(27); "[3t";

30 LPRINT "1234,5678,9012";

40 LPRINT CHR$(27); "[0t"

SPACES: With HRL

10 LPRINT CHR$(27);"[;;1}";

20 LPRINT CHR$(27); "[3t";

30 LPRINT "1234

40 LPRINT CHR$(27); "[0t"

5678 9012";

SPACES: Without HRL

10 LPRINT CHR$(27); "[;;0}";

20 LPRINT CHR$(27); "[3t";

30 LPRINT "1234

40 LPRINT CHR$(27); "[0t"

5678 9012";

Chapter 2. ANSI Emulation

58

GEK-00029B

Horizontal Tabs

▪ Line 10 sets horizontal tab stops at 1080 and 2160 decipoints (1.

5 and 3 inches).

▪ Lines 40 and 60 are ITT codes that cause a jump to the next tab stop.

Line 90 is a line of text to show positioning on the paper. The vertical separation between the bar code symbol and the text "TEXT STRAP

13 OUT" is the ending quiet zone.

10 LPRINT CHR$(27); "[1080;2160;u";

20 LPRINT CHR$(27); "[3t";

30 LPRINT "12345";

40 LPRINT CHR$(9);

50 LPRINT "12345";

60 LPRINT CHR$(9);

70 LPRINT "12345";

80 LPRINT CHR$(27); "[0t";

90 LPRINT "TEXT STRAP 13 OUT"

GEK-00029B

59

5000 Series Programmer’s Manual

OVERSIZE CHARACTER FONT

The oversize font is composed of special block-style characters that can be expanded 156 times the size of standard fonts. This will produce letters up to 15.25-inches (388mm) high by 13 inches

(330mm) wide. Oversize characters can be rotated 90, 180, or 270 degrees.

Do not confuse oversize characters with expanded characters. The expanded character feature, (standard in your printer), expands all existing fonts up to 8 times the normal size. These characters are not rotatable.

The oversize character feature works with the ANSI protocol.

Entering and Exiting Oversize

The following sequences are used to enter, rotate, and exit oversize printing:

ESC [ 0 |

ESC [ 1 |

ESC [ 2 |

ESC [ 3 |

ESC [ 4 |

Exit oversize printing.

Select oversize font with no rotation.

Select oversize font with 90-degree rotation.

Select oversize font with 180-degree rotation.

Select oversize font with 270-degree rotation.

LPRINT CHR$(27);"[0|

";

LPRINT CHR$(27);"[0|";CHR$(124); or

Once oversize has been turned on, it will remain on until an

ESC [ 0 | sequence is used to turned it off. It does not turn off due to line terminators (CR and LF).

Chapter 2. ANSI Emulation

60

GEK-00029B

Selecting Size

ESC [p1;p2 B is the sequence used to set the vertical (p1) and horizontal (p2) size of the oversize characters. A p1 value of 300 would increase the vertical size of the character 300% or 3 times.

The last two digits of each parameter are necessary to comply with the ANSI standard, but are ignored by the printer. Using the above example for p1, any three-digit number starting with 3 (300-399) will be interpreted as 3 times normal size. Likewise, 400-499 equals 4 times, 1200-1299 equals a 12-times increase in size, and so on. The maximum size is 15600;15600 (156 times) and the minimum or default is 200;200 (2 times).

Since this same sequence is used to change size in the expanded mode, the parameters must be cleared to normal size,

ESC [ 100 ; 100 B, to prevent entering expanded mode when oversize is turned off.

Mnemonic:

Decimal:

Hex:

BASIC:

ESC [ <p1>; <p2> B

27 91 <p1> 59 <p2> 66

1B 5B <p1> 3B <p2> 42

CHR$(27);"[";<p1>;<p2>;B";

Size Parameters for Rotation

The <p1> and <p2> size parameters are always relative to a rotation angle of zero degrees. That is, the characters are expanded first and then rotated.

Spacing Between Characters

For non-rotated characters and characters rotated 180 degrees, the horizontal spacing between characters is 1/60-inch times the <p2> parameter.

For characters rotated 90 or 270 degrees, the horizontal spacing between characters is 3/60-inch times the p1 parameter.

Vertical spacing is dependent on vertical paper move commands (LF,

CR, VPR, etc.), the state of menu option GenPrtOpts/Group 2/Strap

13, and the character size and line spacing currently in effect.

GEK-00029B

61

5000 Series Programmer’s Manual

Sample Programs

Example 1

The first example shows the code used to print oversize.

Line 10 sets the size to X3 vertical (V) and X3 horizontal (H). Line 20 enters oversize printing with no rotation. Line 30 is the data to be printed. Line 40 exits oversize printing. Line 50 returns the size parameters to X 1 V - X 1 H.

10 LPRINT CHR$(27); "[300;300B";

20 LPRINT CHR$(27); "[1|";

30 LPRINT "ABCabc";

40 LPRINT CHR$(27); "[0|";

50 LPRINT CHR$(27); "[100;100B"

Example 2

The next two examples demonstrate the importance of setting the size parameters back to X1 V - X1 H after printing oversize. This is the same program used in Example 1 with an additional line added.

Line 60 prints 1234 in the currently selected font.

10 LPRINT CHR$(27); "[300;300 B";

20 LPRINT CHR$(27); "El:";

30 LPRINT "ABCabc"

40 LPRINT CHR$(27); "CO:";

50 LPRINT CHR$(27); "[100;100 B"

60 LPRINT "1234"

Chapter 2. ANSI Emulation

62

GEK-00029B

Example 3: Showing the Importance of Resetting

Scaling Factors

If line 50, which sets the size to X1 V and X1 H. is removed, the data printed in line 60 is now subject to the expanded mode of printing.

NOTE

In BASIC, LPRINT statements automatically generate an LF/CR at the end of the line unless suppressed by a semicolon. Since line 30 does not end with a semicolon, an LF/CR occurred at the lpi in effect (still in oversize). This accounts for the vertical distance between the ABCabc line and the 1234 line.

Notice (below) that the 1234 printed line is expanded vertically by X3

10 LPRINT CHR$(27); "[300;300B";

20 LPRINT CHR$(27); "[1|";

30 LPRINT "ABCabc";

40 LPRINT CHR$(27); "[0|"

60 LPRINT "1234"

GEK-00029B

63

5000 Series Programmer’s Manual

Printer Control Strap GenPrtOpts/Group 2/Strap 13

This printer control strap is used for positioning the paper after printing oversize characters. When this strap is set to IN, the paper is positioned at the top of the oversize character after printing; when set to OUT, the paper position remains as is after printing oversize.

The state of the printer strap can be checked and changed using the configuration menu.

In the following examples:

▪ Lines 10-30 print oversize characters at X3.

▪ Line 50 changes the oversize to X4 V by X6 H.

▪ Lines 70-80 print oversize and exits.

▪ Line 90 returns the parameters to X1 to prevent expanded printing.

▪ Lines 100-110 print normal text to show the effect that strap 13 has on positioning.

IMPORTANT

Line spacing was set back to normal (6 lpi) when normal text was selected in line 90. When strap 13 is IN and the paper position returns to the top of oversize, vertical moves (CR, LF,

VPA, VPR) must be used to move the paper to prevent overprinting on the oversize characters.

Chapter 2. ANSI Emulation

64

GEK-00029B

Example 4: GenPtrOpts | Group 2 Strap 13 IN

The oversize characters and the first line of normal printing are aligned at the first print line. The second line of normal printing (Text

Text Text . . .) started printing one line below Strap 13 IN and overprints the oversized text.

100 LPRINT CHR$(27);"[300;300B";

110 LPRINT CHR$(27);"[1|";

120 LPRINT "ABC";

130 LPRINT CHR$(27);"[400;600B";

140 LPRINT "ABC";

150 LPRINT CHR$(27);"[0|";

160 LPRINT CHR$(27);"[100;100B";

170 LPRINT "Strap 13 IN";

180 LPRINT "Text Text Text Text Text Text Text"

Example 5: GenPtrOpts | Group 2 Strap 13 OUT

Paper motion is not returned after printing oversized characters.

100 LPRINT CHR$(27);"[300;300B";

110 LPRINT CHR$(27);"[1|";

120 LPRINT "ABC";

130 LPRINT CHR$(27);"[400;600B";

140 LPRINT "ABC";

150 LPRINT CHR$(27);"[0|";

160 LPRINT CHR$(27);"[100;100B";

170 LPRINT "Strap 13 OUT";

180 LPRINT "Text Text Text Text Text Text Text"

GEK-00029B

65

5000 Series Programmer’s Manual

CHAPTER 3. PRINTRONIX P300/P600 EMULATION

INTRODUCTION

This printer is plug-compatible with the Printronix 300/600 family of line printers. It accepts and acts upon all control codes utilized by this family of printers in a manner that is as functionally equivalent as possible.

The following is a list of the control codes (and their functions) utilized by the Printronix printer. Any control codes not listed will be discarded.

When changing from the ANSI emulation to the P Series emulation.

the ANSI vertical tab table does not transfer and the horizontal tab table set In the ANSI mode is not available. Ali menu parameters set before changing emulations will carry over except for these.

CONTROL CODES

ACK

BEL

BS

CR

DC1

Line at 8 LPI (06H): A received < ACK > anywhere on the line causes the entire line to be printed at 8 lpi. Since this code is momentary, it will not affect subsequent lines. Each line must receive an <ACK> code for the switch to 8 lpi.

Bell Code (07H): A <BEL> code received at the interface causes the beeper to. sound for approximately 1 second.

Elongated Character Line (08H): A <BS> code anywhere on the line causes that line to be printed at double height. Standard- and double-high characters cannot be mixed on the same line.

Carriage Return Slew Zero or Edit Mode (ODH): In the edit mode, i.e., with the P300/600 Emulation Strap 01 OUT, a <CR> will left-justify the line in the buffer, but no printing will occur. The next line of data received can then modify the line. With the strap IN, the 0 slew mode is invoked. In this mode, the line modification feature is deleted and a <CR> is treated in the same manner as in the ANSI protocol. The print control, DEFINE CR, with the definition set to

CR=CR+LF converts a carriage return to a linefeed. With the definition set to CR=CR, the printer ignores received carriage returns.

Ready/Select (11H): A received <DC1> can be used to remotely select the printer in both serial and parallel interfaces. A serial interface protocol can be selected to transmit a <DC1> code to inform the host of a ready condition. See Appendix G for strap information.

NOTE

If a <DC1> or <DC3> control character is received with strap 8 in GenPrtOpts set to OUT, the control is treated as a VFU

Channel Command. See Appendix G, General Printer Options,

Group 2.

Chapter 3. Printronix P300/P600 Emulation

66

GEK-00029B

ETX

FF

HT

LF

RS

DC3

DEL

DLE

ENQ

EOT

GEK-00029B

Busy/Select (13H): A received DC3 can be used to remotely deselect the printer in both serial and parallel interfaces. A serial interface protocol can be used to transmit a DC3 code to inform the host of a busy condition.

NOTE

If a <DC1> or <DC3> control character is received with strap 8 in GenPrtOpts Group 2 set to OUT, the control is treated as a

VFU Channel Command. See Appendix D, General Printer

Options, Group 2 on page 345.

Delete (7FH): In graphics mode, the delete character is treated as data. In the edit mode, a <DEL> following a <CR> erases (replace with a space) previously accepted (buffered, but not printed) characters.

High Vertical Density Graphics (10H): A <DLE> code preceded by an <ENQ> code anywhere on the same line causes paper motion for that line to be 1/144 inch instead of the normal 1/72 inch. If not preceded by an <ENQ> code, the <DLE> is discarded. If there are no graphics commands (EOT or ENQ) in the line, the DLE code is treated as an EVFU channel command.

Normal Density Plot Line (05H): An <ENQ> anywhere in the line causes the line to be treated as normal-density (60 dpi) plot mode graphics. An <LF> code causes the line to be printed as one dot row and the paper is advanced. If there is a <DLE> anywhere in the line, the paper is advanced by 1/144 inch. Otherwise, the paper is advanced by 1/72 inch.

High Density Plot Line (04H): An EOT is used to print at 120 dpi.

This code anywhere in the line causes the line to be treated as high-density plot mode graphics. The line must be terminated with a

CR (printer strap A29 must be OUT). The characters are treated as dot information and the CR at the end of the line will not cause the paper to advance. The code causes dots to be printed in the even-numbered dot column positions. A second line of the same data with the normal plot mode command (ENQ) is required to fill in the remainder of the dots and to advance the paper.

End of Transmission (03H): The ETX code is used in the serial interface with the ACK code as part of an interface protocol. The ETX is received from the host at the end of a data block. The host then stops sending data until an ACK is received.

Form Feed (0CH): A form feed causes the line to be printed and the paper advanced to the top of form.

Horizontal Tab (09H): An HT is replaced by a space character.

Line Feed (0AH): An LF causes the line to be printed and advances the paper to the next line. If the line is a plot mode line, the paper is advanced one dot row or not at all, depending on the density of the plot mode. See Printronix Mode Graphic Density Table.

Record Separator (1EH): The RS character is used to signal the beginning of an EVFU load. [Need replacement wording here for the margin notes in the tech review.]

67

5000 Series Programmer’s Manual

SI

SO

SP

UNDL

US

VT

Shift In (0FH): An SI code anywhere in the line causes the remainder of the line and all following lines to be printed in the standard font.

Shift Out (0EH).

An SO code anywhere in the line causes the remainder of the line of the line and all subsequent lines (until an SI code is received) to be printed in the alternate font. The alternate font is selected with printer P300/600 emulation straps S13-S16, set in the GenPtrOpts function of the CCU menu.

Space (20H): The space code causes a blank in the character position represented by the code. Following a carriage return in edit mode, space codes do not modify the contents of the print buffer. The

SP is used as a skip code to pass over characters in the buffer. When using the character graphics font the character in the 20H position is printed instead of a blank.

Underline (5FH): When using the legacy parallel interface, hardware strap H7 IN causes a CR to be substituted for an underline character.

(See Appendix G. Hardware Straps.) All software straps that apply to a CR will apply if the option is selected.

Unit Separator (1FH): The US character is used to signal the end of an EVFU load sequence.

Vertical Tab (0BH): A VT causes the line to be printed and paper advanced until the next tab position is reached. If the VFU is enabled, channel 12 is accessed instead.

Chapter 3. Printronix P300/P600 Emulation

68

GEK-00029B

PRINTRONIX GRAPHICS

The Printronix emulation graphics mode provides a horizontal dot placement plotting method. This method enables the printing of

ASCH characters in their binary code form. Since each character has a unique pattern of 1s and 0s (dots and voids) that make up its binary code, the correct placement of these binary forms enables you to form larger images on the paper.

For clarity in the text, a binary 1 (a printed dot) Will be shown as an

X and a binary 0 (empty dot position) will be shown as a 0.

In the graphics mode, only the low order six bits of a seven- or eightbit character are used (bits 1-6). Looking at an ASCH code chart, the question mark character (?) is represented by the binary number

1111110 (bit 1 - bit 7). Since only the first 6 bits are used, a ? would print six dots on the paper. An asterisk (*) is represented by 010101 which would print 0X0X0X0 across the page horizontally.

Using the question mark that prints all dots, a series of these characters produces a one dot high solid line across the paper. By repeating, omitting, and mixing characters across a page, images such as graphs, charts, and pictures can be produced.

Dot Patterns and Densities

The chart on the next page shows the dot patterns for each of the

ASCII characters. Each character represents six dots (or dot positions)* and their spacing is dependent on the density selected.

Graphics data printed in horizontal format is comprised of a stream of bytes from left to right across each dot row.

This chart shows that byte 1 (or character 1) in row 1 will print its six bits from left to right in a single dot row. The next byte (byte 2) prints its six bits, representing a character, in the same dot row across the page.

Byte 1 Byte 2 Byte n Byte !

Row "

1

2

3

.

.

6

1 2 3 4 5 6

1 2 3 4 5 6

1 2 3 4 5 6

1 2 3 4 5 6

…1 2 3 4 5 6

…1 2 3 4 5 6

1 2 3 4 5 6 1 2 3 4 5 6 …1 2 3 4 5 6

. . . . . .

. . . . . .

…. . . . . .

. . . . . .

. . . . . .

…. . . . . .

1 2 3 4 5 6 1 2 3 4 5 6 …1 2 3 4 5 6

GEK-00029B

69

5000 Series Programmer’s Manual

Dot Patterns

This chart shows the dot patterns for the ASCII characters needed to cover all dot/void combinations. Characters from 20H to 3FH provide the same patterns as characters 60H through 7FH. Characters from

00H through 1FH, which are not recognized as line terminators or plot mode codes, are ignored.

Character

^

_

\

]

Z

[

X

Y

T

U

V

W

P

Q

R

S

L

M

N

O

H

I

J

K

D

E

F

G

@

A

B

C

XXXX00

0000X0

X000X0

0X00X0

XX00X0

00X0X0

X0X0X0

0XX0X0

XXX0X0

000XX0

X00XX0

0X0XX0

XX0XX0

00XXX0

X0XXX0

0XXXX0

XXXXX0

Dots

000000

X00000

0X0000

XX0000

00X000

X0X000

0XX000

XXX000

000X00

X00X00

0X0X00

XX0X00

00XX00

X0XX00

0XXX00

Value

58H

59H

5AH

5BH

5CH

5DH

5EH

5FH

50H

51H

52H

53H

54H

55H

56H

57H

48H

49H

4AH

4BH

4CH

4DH

4EH

4FH

40H

41H

42H

43H

44H

45H

46H

47H

Value

78H

79H

7AH

7BH

7CH

7DH

7EH

3FH

70H

71H

72H

73H

74H

75H

76H

77H

68H

69H

6AH

6BH

6CH

6DH

6EH

6FH

60H

61H

62H

63H

64H

65H

66H

67H

Character

~

?

|

}

{ z x y v w t u r s p q l m n o j k h i f g d e b c

’ a

XXXX0X

0000XX

X000XX

0X00XX

XX00XX

00X0XX

X0X0XX

0XX0XX

XXX0XX

000XXX

X00XXX

0X0XXX

XX0XXX

00XXXX

X0XXXX

0XXXXX

XXXXXX

Dots

00000X

X0000X

0X000X

XX000X

00X00X

X0X00X

0XX00X

XXX00X

000X0X

X00X0X

0X0X0X

XX0X0X

00XX0X

X0XX0X

0XXX0X

Chapter 3. Printronix P300/P600 Emulation

70

GEK-00029B

Each line to be printed as graphics must have one of the three graphic control codes (ENQ, EOT, DLE) in the line of data. The ENQ and EOT codes can be placed anywhere in the line of data. When used, the DLE code must always be placed after the ENQ code.

The following densities are available using the formats shown:

Density

Horizontal Vertical

60

120

72

72

60

120

144

144

Line Format Required

ENQ, data, LF terminator

EOT, data, CR terminator

ENQ, data, LF terminator

ENQ, DLE, data, LF terminator

EOT, data, CR terminator

ENQ, DLE, data, LF terminator

The dot pattern for a particular character is the same regardless of density. The density difference is a shift to the right by 1/120 inch for high density.

Normal-Density Graphics

At 60 dpi horizontal density, one line of characters is used for each dot row. The normal density plot mode character (ENQ) can appear anywhere in the line. The line must be terminated with an LF. At the end of graphics printing, send an empty data line containing only an

LF.

High-Density Graphics

At 120 dpi horizontal density, each dot row requires two lines of characters. The first line contains the high density plot mode code

(EOT) and must be terminated with a CR.

IMPORTANT

The DEFINE CR setting in the printer control setup menu must be set to CR=CR.

The second line contains the normal density plot mode code (ENQ) and must be terminated with an LF.

At the end of graphics printing, send an empty data line containing only an LF for proper termination.

P300/600 8-Bit Horizontal Graphics

Horizontal

60

120

60

120

Vertical

72

72

144

144

Syntax

<ESC>"1<count><data><LF>

<ESC>"2<count><data><LF>

<ESC>"1<count><data><DLE><LF>

<ESC>"2<count><data><DLE><LF>

GEK-00029B

71

5000 Series Programmer’s Manual

P300/600 ELECTRONIC VERTICAL FORMAT UNIT

The electronic vertical format unit (EVFU) is used to download vertical tabs to the printer. It allows jumps to preselected lines on the form through vertical moves of the paper.

The maximum form length is 22 inches (176 lines at 8 lpi).

Using the EVFU

Using the EVFU is a two-step process. The first step is to load the channel control table with codes for the form being used. One byte must be loaded for each line of the form. A channel code can be inserted in the byte to indicate a stop (or vertical tab location).

The second step is to send a channel command to jump to a specified channel (location on the paper).

On the following pages are charts and sample programs showing the codes for loading the EVFU table and selecting channels for paper moves.

Points to Remember

▪ When a table is downloaded, VFU will be displayed.

▪ The vertical format type must be set to Emulation VFU through the control panel using the Setup | Vertical Format | Type

Select |Emulation VFU menu option.

▪ The GenPtrOpts | Group 2 strap to enable received select/deselect must be set to OUT.

▪ Printer option 3 (see Table 11 in Appendix D, Printronix 300/600

Emulation Options) must be enabled to enable EVFU loading. If option 3 is not enabled when a start load RS code is received, the table will not be loaded and all control characters received before the end load US code will be interpreted as data.

▪ When using serial interface with the PI lead enabled, the interface settings menu must have the serial options set to PI Lead Use 8bit.

Send the EVFU table at the start of a line to prevent a loss of data.

These charts contain the channel commands to load the EVFU table and for selecting a channel for vertical moves.

Chapter 3. Printronix P300/P600 Emulation

72

GEK-00029B

GEK-00029B

PI Lead Codes – Use with Serial Interface

The PI lead is not used in the parallel interface. To use the PI lead with the serial interface, 8-bit codes must be sent.

Data Lines

PI 7 6 5 4 3 2 1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

X

X

X

X

X

X

X

X

X

X

X

X

1

1

X

X

X

X

X

X

X

X

X

X X 0 1 0 0 1

X X 0 1 0 1 0

X

X

X

1

1

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

1

1

1

1

1

0

0

0

0

1

1

1

1

0

0

1

1

1

1

0

0

1

1

0

0

1

1

0

1

0

0

1

1

0

1

0

1

0

1

0

1

0

1

0

1

0

1

Channel number or Command

Channel

1 TOF

2

3

4

5

6

7

8

9

10

11

12 VT

13

14

Start Load

End Load

Decimal

Number

128

129

130

131

132

133

134

135

136

137

138

139

140

141

238

239

ASCII

NUL none none none none none none

BEL

BS

HT

LF

VT

FF

CR none none

Codes Not Using the PI Lead

Data Lines

PI 7 6 5 4 3 2 1

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0 0 0 0 1 0 1

0 0 0 0 1 1 0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

1

0

0

0

0

1

1

0

0

0

0

1

1

0

1

0

0

0

1

0

1

0

1

0

1

0 0 0 1 0 1 0

0 0 0 1 0 1 1

0 0 0 1 1 0 0

0 0 0 1 1 0 1

0 0 0 1 1 1 0

0 0 0 1 1 1 1

Channel number or Command

Channel

1 TOF

2

3

4

5

6

7

8

9

10

11

12 VT

13

14

Start Load

End Load

Decimal

Number

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

ASCII

DLE

DC1

DC2

DC3

DC4

NAK

SYN

ETB

CAN

EM

SUB

ESC

FS

GS

RS

US

73

5000 Series Programmer’s Manual

Example EVFU Loading Program

▪ Using standard CENTRONICS parallel interface with 36-pin connector and P Series protocol.

▪ Using the channel code chart without the PI lead.

▪ This program loads the EVFU table with channel stops at lines 6,

25, 57, and 66.

▪ Set the printer as follows:

▪ GenPtrOpts | Group 2 | Strap 8 OUT to deactivate coded

SELECT/DESELECT operation.

▪ Set up vertical format emulation (VFU)

PROGRAM INSTRUCTION REMARKS

1500 WIDTH "LPT1:". 255

Required by some BASIC languages to avoid auto LF at column 80

1510 LPRINT CHR$(30); Selects SL channel.

1520 LPRINT CHR$(16); Selects TOF. Channel 1 1530 FOR 1=1 to 4

1530 FOR I-1 to 4

1531 LPRINT CHR$(17); Selects Channel 2 for 4 filler lines

1532 NEXT 1

1540 LPRINT CHR$(18); Selects Channel 3 (for line 6 printing)

1550 FOR 1=1 to 18

1551 LPRINT CHR$(17);

1552 NEXT I

Selects Channel 2 for 18 filler lines

1560 LPRINT CHR$(19); Selects Channel 4 (for line 25 printing)

1570 FOR 1=1 to 31

1571 LPRINT CHR$(17);

1572 NEXT I

Selects Channel 2 for 31 filler lines

1580 LPRINT CHR$(20); Selects Channel 5 (for line 57 printing)

1590 FOR 1=1 to 8

1591 LPRINT CHR$(17);

1592 NEXT I

Selects Channel 2 for 8 filler lines

1600 LPRINT CHR$(21); Selects Channel 6 (for line 66 printing)

1610 LPRINT CHR$(31); Selects EL Channel

1620 END

A start load RS code immediately followed by a stop load US code will clear the EVFU table. The BASIC code to do this follows

10 LPRINT CHR$(30);

20 LPRINT CHR$(31);

Chapter 3. Printronix P300/P600 Emulation

74

GEK-00029B

Example Form Printout

This example uses the VFU table created in the previous example.

NOTE

Establish top of form locally before printing. When running the program, paper will slew to the top of the next form before printing begins.

Sample Program to Print Form

The following sample program uses the EVFU program from the prior example.

Program Instruction

10 WIDTH “LPT1:”;255

Remarks

Required by some BASIC languages to avoid auto LF

20

25 LPRINT “TOP OF FORM”;

30 LPRINT CHR$(18);

60

65

LPRINT CHR$(16);

LPRINT CHR$(21);

LPRINT “END OF FORM”;

70 END

Go to Top of Form (Channel

1)

Print the indicated words

Go to Channel 3

35 LPRINT “TOP MARGIN, LINE 6”;

40 LPRINT CHR$(19);

45 LPRINT “LINE 25”;

50 LPRINT CHR$(20);

Print the indicated words

Go to Channel 4

Print the indicated words

Go to Channel 5

55 LPRINT “BOTTOM MARGIN, LINE 57”; Print the indicated words

Go to Channel 6

Print the indicated words

GEK-00029B

75

5000 Series Programmer’s Manual

CHAPTER 4. PRINTRONIX P-SERIES EMULATION

SPECIAL FUNCTION CONTROL CHARACTER (SFCC)

When a printer control code consists of more than one character, it is called a command or escape sequence. This emulation uses a Special

Function Control Character (SFCC) as the first character of a command sequence. The SFCC alerts the printer that a command sequence—not printable characters follows.

▪ In this P-Series emulation mode, you may choose 0 to 127 to be the SFCC via the Emulation Settings of the Set Up Menu.

The general format for a command sequence in the P-Series emulation is:

SFCC (parameter 1 ..... parameter n) (terminator)

Command Line

In the P-Series emulation mode, print format, font, or international language selection can also be controlled by a longer sequence known as a Command Line. Command Lines are string type commands placed between complete lines of text and affecting the text that follows. The P-Series Emulation has six Command Lines: PMODE,

OSET, PSET, LPI, LINES, and INCHES. Each of these Command

Lines is discussed in this chapter under the appropriate Control Code function.

For example, you can set the form length in inches by using the following command line:

SFCC INCHES ; n f where n is the whole number of inches and f is the fractional increment in 0.5 inch increments.

When using the SFCC in a Command Line, it must be the first non-blank symbol in the line (space, hex 20, is a blank symbol).

In addition, characters following spaces (other than a valid line terminator) in a Command Line are ignored so that user comments can be included on the Command Line. The valid line terminators are

Form Feed (FF), Line Feed (LF), and Carriage Return (CR); however, when used in the Command Line, these line terminators do not cause any paper motion.

Chapter 4. Printronix P Series Emulation

76

GEK-00029B

Set and Reset Codes

Some print attributes are set and reset (turned ON and OFF) by using an SFCC command sequence and the numbers one(1) or zero(0).

These numbers may be in the form of hexadecimal code 01H and

00H, or the ASCII code for the printable symbols of decimal 1 and 0

(hexadecimal code 31 and 30).

GEK-00029B

77

5000 Series Programmer’s Manual

COMMAND INDEX

Vertical Motion

Command

Form Feed

Forms Length Set (Inches)

Forms Length Set (Lines)

Line Feed

Line Spacing 1/6 Inch (6 lpi)

Line Spacing 1/8 Inch (8 lpi)

Line Spacing 8 or 10.3 LPI (1 line only)

Line Spacing 7/72 Inch

Line Spacing n/72 Inch

(used with SFCC 2)

Vertical Tab

Horizontal Motion

Backspace

Carriage Return

Print Attributes

Bold Print

Bold Print Off

Emphasized Print

Emphasized Print Off

Overscoring

Underline

Printer Control

Bell

Emulation Reset

Font Control

Download New Character Shape

Double Wide (Elongated) Characters

(1 line only)

Expanded (Double Wide) Print

Expanded (Double Wide) Print Reset

<SFCC> G

<SFCC> H

<SFCC> E

<SFCC> F

<SFCC> _

<SFCC> -

<BEL>

<SFCC> @

(not supported)

<SFCC> h

<BS>

<SFCC> W 1

<SFCC> W 0

<DC4>

Format

<FF>

<SFCC> INCHES

<SFCC> LINES

<LF>

<SFCC> 2

<SFCC> LPI

<SFCC> 0

<SFCC> LPI

<ACK>

<SFCC> f

<SFCC> l

<SFCC> A

<VT>

<BS>

<CR>

Page

81

93

93

81

94

95

95

96

96

97

80

80

84

85

85

86

90

91

80

92

86

85

86 continued

Chapter 4. Printronix P Series Emulation

78

GEK-00029B

Font Control (continued)

Font Selection

Superscript/Subscript Printing

Superscript/Subscript Printing Reset

<SFCC> X

<SFCC PMODE

<SFCC> S

<SFCC> T

Plot Mode Graphics

Plot, Even Dot (High Horizontal Density) <EOT>

Plot, Odd Dot (Normal Density)

Plot, High Vertical Density (1/144)

<SFCC> d

<ENQ>

<DLE>

Plot, Single Line (High Horizontal Density) <NAK>

Character Set Control

Character Set Select

Character Set Select: ECMA Extended

Character Set Select: Int’l Languages

Character Set Select: Substitution Table

Execute Control Codes

Print Control Codes

Download a Language

Extended Character Set

Extended Character Set Cancel

<SFCC> 1

(Not supported)

<SFCC> PSET or <SFCC> R

(Not supported)

<SFCC> 7

<SFCC> 6

(Not supported)

<SO>

<SFCC> <SO>

<SFCC> n

<SFCC> 4

<SI>

<SFCC> <SI>

<SFCC> o

<SFCC> 5

103

103

102

103

89

90

90

92

92

87

82

84

88

GEK-00029B

79

5000 Series Programmer’s Manual

CONTROL CODES

Backspace Backspace <BS> : Moves the logical print position to the left one character space toward the first character column. When configured from the control panel for backspace, BS moves the character position one character space to the left at the current character pitch setting. This code is ignored if the logical print position is at the first character column.

Decimal:

Hex:

BASIC:

8

08H

CHR$(8);

Bell

Carriage Return

Indeterminate Conditions

This code can also be configured form the control panel to print double-high characters instead of a backspace.

Bell <Bel>: The printer's audible alarm will sound for 1/2 second when the bell code is received by the printer.

Format

<Bel>

Decimal:

Hex:

BASIC:

Indeterminate Conditions

Bell code cannot be disabled.

Carriage Return <CR>: Returns the logical print position to the first character column. The CR code may or may not cause printing or paper motion, depending on the CR CODE configuration parameter value.

Format

<CR>

7

07H

CHR$(7);

Decimal:

Hex :

BASIC:

13

0DH

CHR$(13);

If the CR CODE option menu is set for CR=CR, the characters following the CR are printed over the previous characters on the line.

If identical characters are placed in the same position on the line, those characters are printed in double strike print when the

Overstrike mode is enabled from the control panel.

The CR=CR configuration causes subsequent printable data to overprint previous data at half speed if Overstrike is enabled from the control panel (and prints somewhat faster if Overstrike is disabled), unless an intervening paper motion command is received.

If the CR CODE is configured for:

CR=CR+LF

Control code CR is converted to perform a carriage return and line feed function.

Chapter 4. Printronix P Series Emulation

80

GEK-00029B

Form Feed

Line Feed

Form Feed <FF>: Prints the data in the buffer, advances the paper position to the next top-of-form and moves the character position to the first character column. The FF code cancels all single-line only print attributes.

Format

<FF>

Decimal:

Hex:

BASIC:

12

0CH

CHR$(12);

Indeterminate Conditions

Forms length can be modified by using the control panel or forms length control codes.

The Form Feed command may reacts differently if a VFU is active

(refer to VFU section).

Line Feed <LF>: Prints the data in the buffer (if any) and advances the vertical character position one line at the current line space setting and moves the logical print position to the left margin.

The LF function cancels all single line print attributes such as double high (elongated) and double wide (expanded) characters.

In the Even Dot Graphics Plot mode (high density graphics), the LF code does not cause paper position motion; the data in the buffer is plotted and the logical print position is set at character column 1 in anticipation of the Odd Dot Plot control code to complete high density graphic plotting. In the Odd Dot Graphics Plot mode (normal density graphics), the LF code plots the data in the buffer, advances the paper position a single dot row at the current vertical dot density, and positions the logical print position at character column 1.

Format

<LF>

Decimal:

Hex:

BASIC:

12

0AH

CHR$(12);

GEK-00029B

81

5000 Series Programmer’s Manual

CHARACTER SETS, FONT HANDLING AND ENHANCEMENTS

Character Set

Select

Selects the character set, extended character set, and the international language for a specific character set.

Format

<SFCC> l xyz x: y: z: character set international language for the selected character set table extended character set for the selected character set

Decimal:

Hex:

BASIC:

<SFCC> 108 x y z

<SFCC> 6C xH yH zH

CHR$(<SFCC>);CHR$(108);”xyz”;

Character Set Select (x)

(x)

0(30)

1(31)

2(32)

3(33)

(2A)

Character Set

Code Page 437

Code Page 8859-1

Invalid (Defaults to Code Page 437)

Code Page 8574

Unchanged

International Language Select (y) y

0(30)

1(31)

2(32)

3(33)

4(34)

5(35)

6(36)

7(37)

8(38)

9(39)

10(3A)

11(3B)

12(3C)

13(3D)

14(3E) x 0(30)

CP 437

ASCII (USA)

French

German

English

Danish

Swedish

Italian

Spanish

Japanese

Fr. Canadian

Latin Amer

Norwegian

Danish II

Spanish II

Latin AM II

1(31)

CP 8859-1

ASCII (USA)

EBCDIC

2(32)

NA

NA

NA

NA

NA

NA

NA

NA

NA

NA

NA

NA

NA

NA

NA

3(33)

CP 8574

ASCII (USA)

French

German

English

Norw/Danish

Swedish

Italian

Spanish

Japanese

Fr. Canadian

Dutch

Finnish

Swiss

Chapter 4. Printronix P Series Emulation

82

GEK-00029B

Character Set

Select

(continued)

Extended Character Set Select (z) z

0(30)

1(31)

2(32)

3(33)

4(34)

5(35)

6(36)

7(37)

8(38)

9(39)

10(3A)

11(3B)

12(3C) x 0(30)

IBM PC

CP 850 1

1(31)

NA

2(32)

NA

3(33)

NA

1 Valid only if x = 0. All other values of z are ignored including ‘*’

Indeterminate conditions

If the (*) character is the value selected for x, the character set does not change. If (*) or (X) is selected for y, the previously selected international language is used.

Notes

This command implementation is different than the target printer due to limitations in Font character sets. Refer to the “Emulation

Differences” section of this document.

GEK-00029B

83

5000 Series Programmer’s Manual

Select International Selects the international character using the parameter (where the

Character Set parameter is one of the values in the table below).The ultimate character set selected is a function of the parameter and the currently-active code page.

Format

<SFCC> P S E T ; n or <SFCC> R n

Decimal:

Hex:

BASIC:

<SFCC> 80 83 69 84 59 n

<SFCC> 50 53 45 54 3B nH

CHR$(<SFCC>);”PSET;”;CHR$(n);

International Character Set

9

10

11

12

7

8

5

6 n

PSET

2

3

0

1

4

CP 437

ASCII (USA)

French

German

English

Danish

Swedish

Italian

Spanish

Japanese

F. Canadian

Latin Am.

Finnish

Swiss

Indeterminate Conditions

Character Set Select

CP 8859-1 CP 8574

ASCII (USA)

EBCDIC

ASCII (USA)

French

German

English

Nor./Danish

Swedish

Italian

Spanish

Japanese

F. Canadian

Dutch

Finnish

Swiss

Bold Print ON

Selecting SFCC RX accesses the substitution table for the current character set.

Notes

This command implementation is different than the target printer due to limitations in Font character sets. Refer to the “Emulation

Differences” section of this chapter.

Selects Bold Print mode. All characters are printed twice using direct overprint (striking each dot twice) until reset by the Bold Print off code or a printer reset. When SFCC j is used, Bold Print printing is selected for one line only; it is reset by the Bold Print off control code, emulation reset, or a paper motion command.

Format

<SFCC> G

Decimal:

Hex :

BASIC:

<SFCC> 71

<SFCC> 47

CHR$(<SFCC>);”G”

Chapter 4. Printronix P Series Emulation

84

GEK-00029B

Bold Print OFF

Single Line

Double High

Deselects Bold Print mode.

Format

<SFCC> H

Decimal:

Hex:

BASIC:

<SFCC> 72

<SFCC> 48

CHR$(<SFCC>);”H”;

Indeterminate Conditions

This sequence resets Bold Print printing only. Other attributes

( double wide, etc) remain active.

Selects elongated (double high) character printing for one line only.

Elongated characters are approximately double height but standard width. The elongated character control code is a line-by-line print attribute; when the control code is received, one entire line of elongated characters is printed and then automatically reset at the end of the line.

Format

<SFCC> h Primary command format

<BS> Selects Double High when the Double High print option is selected from the control panel.

Decimal:

Hex

BASIC:

:

<SFCC> 104 or

8

<SFCC> 68 or

08H

CHR$(<SFCC>);”h”; or

CHR$(8);

Indeterminate Conditions

When configured for double high print from the control panel menu, the control code BS (Hex 08) also selects elongated character printing for a single line.

Emphasized Print Selects Emphasized Print mode. Emphasized print, also called

ON "shadow" printing, consists of printing each letter twice, the second printing horizontally offset (1/240th inch) from the first. Emphasized print is turned off by the emphasized print reset control code or emulation reset.

Format

<SFCC> E

Decimal:

Hex:

BASIC:

<SFCC> 69

<SFCC> 45

CHR$(<SFCC>);”E”;

Indeterminate Conditions

Emphasized print is ignored during superscript or subscript printing, and when 15-20 cpi characters are selected.

GEK-00029B

85

5000 Series Programmer’s Manual

Emphasized Print Deselects Emphasized Character print mode.

OFF

Format

<SFCC> F

Decimal:

Hex:

BASIC:

<SFCC> 70

<SFCC> 46

CHR$(<SFCC>);”F”;

Indeterminate Conditions

This sequence resets Emphasized printing only. Other attributes

(bold, double wide, etc) remain active.

Double Wide Print Double Wide Print (continuous): Selects or resets expanded (double wide) print.

Format

<SFCC> W n)

Decimal:

Hex:

BASIC:

<SFCC> 87 n

<SFCC> 57 nH

CHR$(<SFCC>);n n = 1 selects expanded print (hex 01 or hex 31) n = 0 resets expanded print (hex 00 or hex 30)

When expanded print using SFCC W is received, all characters print double wide until reset by the expanded print reset control

code, printer reset.

Single Line Double Wide Print (single line): Selects expanded (double wide)

Double Wide Print print for one line only. This expanded print control code is a line-byline print attribute. When the SFCC k control code is received, the current line is printed double wide and then automatically reset at the end of the line.

Format

<SFCC> k

Decimal:

Hex:

BASIC:

<SFCC> 107

<SFCC> 6B

CHR$(<SFCC>);”k”;

This control code can be reset by a paper motion control code (LF,

VT, CR, etc.), SFCC @ (printer reset), CAN or SFCC W

(double wide print).

Chapter 4. Printronix P Series Emulation

86

GEK-00029B

Extended Character Extended Character Set Access: Accesses the extended character

Set Select set in the range ADH to FFH hex using codes 20H to 7FH.

Used in 7-bit systems as if data bit 8 was set to 1. For example, sending code 20 hex accesses the symbol at code point A0H. If a printable symbol is not available at the code point, a space is printed.

Format

<SO> or <SFCC> <parameter>

<SO>

<SFCC> <SO>

<SFCC> n

<SFCC> 4

Decimal: 14

<SFCC> 14

<SFCC> 110

<SFCC> 4

Hex:

BASIC:

0EH

<SFCC> 0E

<SFCC> 6E

<SFCC> 34

CHR$(14);

CHR$(<SFCC>);CHR$(14);

CHR$(<SFCC>);”n”;

CHR$(<SFCC>);”4”;

Indeterminate Conditions

<SFCC> 4 is not canceled by the next paper motion command; 0E,

<SFCC> 0E, <SFCC> 6E are canceled by paper motion.

GEK-00029B

87

5000 Series Programmer’s Manual

Extended Character Extended Character Set Cancel: Cancels the extended character set

Set Cancel as selected by SO, SFCC SO, SFCC n, SFCC 4, and selects the primary Character Set.

Used in 7-bit systems as if data bit 8 was set to 1. For example, sending code 20 hex accesses the symbol at code point 0A0H hex. If a printable symbol is not available at the code point, a space is printed.

Format

<SI> or <SFCC> <parameter>

<SI>

<SFCC> <SI>

<SFCC> o

<SFCC> 5

Decimal:

Hex:

15

<SFCC> 15

<SFCC> 111

<SFCC> 5

0FH

<SFCC> 0FH

<SFCC> 6FH

<SFCC> 35H

BASIC: CHR$(15);

CHR$(<SFCC>);CHR$(15);

CHR$(<SFCC>);CHR$(111);

CHR$(<SFCC>);CHR$(5);

Chapter 4. Printronix P Series Emulation

88

GEK-00029B

Font Select Font Selection: Selects a font (DP, NLQ, or OCR) and character pitch in characters per inch (cpi).

Format

<SFCC> X <m> <n> or

<SFCC> P M O D E ; n

Decimal:

Hex:

BASIC:

<SFCC> 88 <m> <n>

<SFCC> 80 77 79 68 69 3B <n>

<SFCC> 58 (parm 1, parm 2)

<SFCC> 50 4D 4F 44 45 3B <nH>

CHR$(<SFCC>);”X”;CHR$(<m>);CHR$(<n>);

CHR$(<SFCC>);”PMODE;<n>”;

<SFCC> X <m> <n> Format m = font code n = pitch code (cpi) m (hex)

FONT n (hex)

0(30)

1(31)

2(32)

3(33)

4(34)

0(30)

DP

10

12

13.3

15

17.1

1(31)

NLQ

10

12

13.3

15

17.1

<SFCC> PMODE;n Format

2(32)

DP

3(33)

DP

4(34)

DP

Characters Per Inch

10 10 10

12

13.3

12

13.3

12

13.3

15

17.1

15

17.1

15

17.1

5(35) 6(36)

OCR-A OCR-B

10

-

-

-

-

10

-

-

-

n ranges from 0 to 6 to select the font and pitch combination. All other values are invalid.

n = pitch code (cpi)

An asterisk (*) (hex 2A) may be substituted for m or n. Whenever the asterisk replaces m or n, its current value does not change. Values other than those shown in the table below are ignored.

PMODE switches to the Primary Character Set and selects font and pitch according to the following table.

‘n’

2

3

0

1

4

5

6

Font and Pitch

Data Processing 10 CPI

Data Processing 12 CPI

Data Processing 15 CPI

NLQ 10 CPI

Data Processing 10 CPI

OCR-A 10 CPI

OCR-B 10 CPI

Notes

This command implementation is different than the target printer due to limitations in Font character sets. Refer to the “Emulation

Differences” section of this chapter.

GEK-00029B

89

5000 Series Programmer’s Manual

Overscoring

Super/Subscript

Super/Subscript

Reset

Overscoring: Enables or disables automatic overscoring of all characters.

Format

<SFCC> _ <n>

Decimal:

Hex:

BASIC:

<SFCC> 95 <n>

<SFCC> 5F <nH>

CHR$(<SFCC>);”_<n>”; n = 0 disables automatic overscoring (hex 00 or hex 30) n = 1 enables automatic overscoring (hex 01 or hex 31)

When automatic overscore is enabled, all characters, including spaces, are overscored until the feature is disabled.

Superscript or Subscript: Selects superscript or subscript printing.

Format

<SFCC> S <n>

Decimal:

Hex:

BASIC:

<SFCC> 83 <n>

<SFCC> 53 <nH>

CHR$(<SFCC>);”S<n>”; n = 0 n = 1

Details enables superscript printing (hex 00 or hex 30) enables subscript printing (hex 01 or hex 31)

When the super/subscript control code is received, all characters print as superscript or subscript until reset by the super/subscript reset control code or printer reset. Emphasized print is ignored if super/subscript printing is active.

When the BS feature is enabled from the control panel menu, both superscript and subscript characters can be printed in the same character column using the Backspace (BS) control code.

Indeterminate Conditions

Overlapping lines may occur when combining Superscript or

Subscript printing with other print attributes such as Double High or with small line spacing.

Superscript or Subscript Reset: Deselects superscript or subscript printing.

Format

<SFCC> T

Decimal:

Hex:

BASIC:

<SFCC> 84

<SFCC> 54

CHR$(<SFCC>);”T”;

Chapter 4. Printronix P Series Emulation

90

GEK-00029B

Underline Character Underlining: Enables or disables automatic underlining of all characters.

Format

<SFCC> - <n>

Decimal:

Hex:

BASIC:

<SFCC> 45 <n>

<SFCC> 2D <nH>

<CHR$(<SFCC>);”-<n>”; n = 0 n = 1

Details disables automatic underlining (hex 00 or hex 30) enables automatic underlining (hex 01 or hex 31)

When automatic underline is enabled, all characters, including spaces, are underlined until the feature is disabled.

GEK-00029B

91

5000 Series Programmer’s Manual

HOUSEKEEPING COMMANDS

Print Control Codes Forces the hex codes 80H to 9FH to become printable symbols in the currently selected character set. Cancels the executable control code operation activated by the SFCC 7.

Format

Execute Control

Codes

Emulation Reset

<SFCC> 6

Decimal:

Hex :

BASIC:

<SFCC> 6

<SFCC> 36

CHR$(<SFCC>);”6”;

Indeterminate Conditions

This feature can also be selected from the control panel.

Forces the hex codes 80H to 9FH to execute as control codes.

Cancels the printable control code operation activated by the SFCC 6.

Format

<SFCC> 7

Decimal:

Hex:

BASIC:

<SFCC> 7

<SFCC> 37

CHR$(<SFCC>);”7”;

Indeterminate Conditions

This feature is also selectable by control panel operations.

Initializes all printing parameters to values previously saved. When reset to the previously saved values, the current line is set to the topof-form position. Font, line spacing, international language selection, margins, form length, skip-over perforation, and character pitch are reset to previously saved values. Character-by-character and line-byline attributes are canceled. The vertical format unit is cleared.

Format

<SFCC> @

Decimal:

Hex :

BASIC:

<SFCC> 64

<SFCC> 40

CHR$(<SFCC>);”@”;

Chapter 4. Printronix P Series Emulation

92

GEK-00029B

Set Forms Length Set Form Length (Inches )

In Inches

Format

<SFCC> I N C H E S ; <n> ; <f>

Decimal:

Hex :

BASIC:

<SFCC> 73 77 67 72 69 83 59 <n> 59 <f>

<SFCC> 49 4E 43 48 45 53 3B <nH> 3B <fH>

CHR$(<SFCC>):”INCHES<n>;<f>”; n = a whole number from 1 to 22 specifying the number of inches on a page.

f = a fractional number in 0.5 inch increments (minimum forms length is 0.5 inches).

Details

When this command is received, the current position becomes the first line of the form and the form length value becomes the new form length. Vertical tab positions set below the bottom of the form are cleared.

NOTE

Form length is defined in inches, therefore subsequent line spacing changes do not affect the results of this command.

Set Form Length

In Lines

Indeterminate Conditions

Form length can also be set from the control panel menu. If a VFU is enabled and loaded, this command is ignored .

The form length is set to the number of lines defined by the quotient of n and the current line spacing so that the units are in inches.

Form length can also be set from the control panel menu.

Format

<SFCC> L I N E S ; <n>

Decimal:

Hex :

BASIC:

<SFCC> 76 73 78 69 83 59 <n>

<SFCC> 4C 49 4E 45 53 3B <nH>

CHR$(<SFCC>);”LINES;<n>”; n = 1 to 192 to specify the number of lines per page at the current spacing.

Indeterminate Conditions

If a VFU is enabled and loaded, this command is ignored.

GEK-00029B

93

5000 Series Programmer’s Manual

Set Line Spacing

(1/6 Inch)

Sets line spacing to 6 lpi or as set by

SFCC A.

Formats

<SFCC> L P I ; n

<SFCC> A n

<SFCC> 2

Details or followed by

Using the SFCC LPI ; n command, the value of n can be 6 or 8 only.

If n = 6, this command sets line spacing to 1/6 inch. Values of n other than 6 or 8 are ignored.

The SFCC command stores a line spacing value in 1/72 inch to be activated by the SFCC 2 sequence. The default value for this stored value is 6 LPI (12/72).

SFCC 2 asserts n/72-inch line spacing as set by SFCC A. If no distance has been set by SFCC A, the distance is 1/6 inch.

Decimal: <SFCC> 76 80 73 59 <n>

<SFCC> 65 <n>

<SFCC> 2 or followed by

Hex:

BASIC:

<SFCC> 4C 50 49 59 <nH> or

<SFCC> 41 <nH>

<SFCC> 2 followed by

CHR$(<SFCC>);”LPI;<n>”; or

CHR$(<SFCC>);”A<n>”;

CHR$(<SFCC>);”2”; followed by

Chapter 4. Printronix P Series Emulation

94

GEK-00029B

Set Line Spacing

(1/8 Inch)

There are two formats for this command.

The SFCC 0 command specifies continuous line spacing at 1/8-inch increments (8 lpi).

In the SFCC LPI ; n command, the value of n can be 6 or 8 only. If n

= 8, this command sets line spacing to 1/8 inch. Values of n other than 6 or 8 are ignored.

Formats

<SFCC> 0

<SFCC> L P I ; <n>

Decimal:

Hex:

BASIC: or

<SFCC> 0 or

<SFCC> 76 80 73 59 <n>

<SFCC> 30 or

<SFCC> 4C 50 49 3B <nH>

CHR$(<SFCC>);”0”; or

CHR$(<SFCC>);”LPI;<n>”;

Details

When the 1/8-inch line spacing control code is received, all lines print at 8 lpi until a new line spacing is selected or power is reset.

The control code line spacing selection overrides the control panel line spacing setting.

Single Line Spacing Selects line spacing of 8 or 10.3 lpi for the current line only.

Formats

<ACK>

<SFCC> f

Decimal: or

Hex:

6

<SFCC> 102

06

<SFCC> 66 or or

BASIC: CHR$(6); or

CHR$(<SFCC>);CHR$(6);

Details

The default line spacing is reselected automatically after the current line terminates.

If the alternate line spacing selected from the control panel is 8 lpi, the ACK control code sets the line spacing to 8 lpi. If 10.3 lpi was selected from the control panel, the ACK control code sets the line spacing to 10.3 lpi (7/72 inch).

GEK-00029B

95

5000 Series Programmer’s Manual

Set Line Spacing

7/72 Inch

Set Line Spacing n/72 Inch

Specifies the line spacing at 7/72-inch

(10.3 lpi) increments.

Format

<SFCC> 1

Decimal:

Hex:

BASIC:

Details

<SFCC> 1

<SFCC> 31

CHR$(<SFCC>);”1”;

When the 7/72-inch line spacing control code is received, all lines print at the 7/72-inch line spacing until a new line spacing is selected or power is reset.

Indeterminate Conditions

Overlapping lines may occur when combining this control code with other print attributes such as Elongated (Double High), Superscript, or Subscript;

Stores a line spacing of n/72-inch increments.

Format

<SFCC> A <n>

<SFCC> 2

Decimal:

Hex:

BASIC: followed by

<SFCC> 65 <n>

<SFCC> 2

<SFCC> 41 <nH>

<SFCC> 2

CHR$(<SFCC>);”A<n>”;

CHR$(<SFCC>);”2”; n = 1 to 24 (all others are ignored)

Details followed by followed by followed by

When the SFCC A control sequence is received, all line feed commands following an SFCC 2 sequences are at n/72-inch line spacing until a new line spacing is selected or power is reset.

The SFCC 2 sequence asserts the line spacing that was stored by the preceding SFCC A sequence.

Indeterminate Conditions

Small values of n may result in overlapping lines. Overlapping lines may also occur if print attributes such as Elongated (Double High),

Superscript, or Subscript characters are used on the same line.

Printing at different horizontal and vertical densities will not overlap.

Chapter 4. Printronix P Series Emulation

96

GEK-00029B

Set Line Spacing n/216 Inch

Specifies the line spacing at n/216 inch increments.

Format

<SFCC> 3 <n>

Decimal:

Hex:

BASIC: n = 1 to 255

<SFCC> 3 <n>

<SFCC> 33 <nH>

CHR$(<SFCC>);”3<n>”

When the n/216 inch line spacing control code is received, all line feeds following are at n/216 inch line spacing until a new line spacing is selected or power is reset.

The vertical character position moves only in multiples of the current dot row spacing. If the distance to move is other than a multiple of the current dot row spacing, the remainder is added to the next paper motion command.

Indeterminate Conditions

Caution should be used when combining this control code with other print attributes such as Elongated (Double High), Superscript, or

Subscript; overlapping lines may occur.

Vertical Tab Vertical Tab <VT>: Prints the data in the buffer and advances the paper to the next vertical tab position.

Format

<VT>

Decimal:

Hex:

BASIC:

Details

11

0B

CHR$(11);

If a vertical tab format is defined in the EVFU (channel 12) and the

VFU is enabled, the paper is moved to the next vertical tab position.

If a vertical tab format is not defined, the paper is advanced to the next line at the current line spacing.

GEK-00029B

97

5000 Series Programmer’s Manual

PLOT MODE GRAPHICS OPERATIONAL DESCRIPTION

Plot Density

Plot density refers to the number of dots per inch (dpi) printed in a single dot row. Two types of plot density are available in this emulation:

▪ Normal density plot mode

▪ Double density plot mode

Normal Density Plot Mode

▪ Selected using the odd dot plot control code ENQ (05 hex) or the

“SFCC e” control sequence.

▪ The odd-numbered dot columns (120 DPI grid) are addressed to produce a horizontal density of 60 DPI.

Double Density Plot Mode

▪ Selected using the even dot plot control code EOT (04 hex), or the

“<SFCC> d” control sequence. The even dot mode must be used in conjunction with the odd dot plot control code ENQ (05 hex) or

“<SFCC> e” sequence.

▪ The even dots are sent first, followed by the odd dots, allowing a maximum of 1632 dots in a single dot row at 120 dpi (13.6 inch line).

▪ The vertical density remains the same as in normal density plotting.

Plot Mode Format

▪ Each data byte specifies six possible dot columns.

▪ Using odd dot plot, bits 1 to 6 of the data byte address the oddnumbered dot columns; using even dot plot, bits 1 to 6 of the data byte address the even-numbered dot columns.

▪ Bit 6 and/or bit 7 of the data byte must be a 1 (true) bit in the

Plot mode.

▪ Bit 8 of the data byte is ignored in Plot Mode; it can be either 1 or

0.

▪ The binary equivalent of the plot data bytes must be known in order to accurately address specific dot positions.

Chapter 4. Printronix P Series Emulation

98

GEK-00029B

Plot Data Line Format

1.

The plot mode control code: either 05 hex (or “SFCC e”) for normal density, or 04 hex (or “SFCC d”) combined with 05 hex for double density plotting.

2.

The data bytes to be plotted.

3.

The line terminator 0A hex or 0C hex.

With print width set to 13.6 inches, a plot data line may contain any number of bytes up to a maximum of 136 for horizontal dot density of

60 dpi or 272 bytes for a horizontal density of 120 dpi.

A plot data line may contain any number of data bytes up to the maximum. If automatic line feed is disabled from the control panel menu, any bytes over the maximum are lost (graphic character will not wrap at the right margin). If the maximum is exceeded and automatic line feed is enabled, a line feed (LF) is forced and the remaining plot data are printed as text on the next line (graphic characters will wrap in this case).

The plot mode command may occur anywhere in the line, but plot speed may decrease if it is not at the beginning of the line.

Normal Density Plot Mode Format

1.

Send the plot command code ENQ (05 hex) or the control sequence “SFCC e”.

2.

Send the plot data.

3.

End with a line terminator, either a LF (0A hex) or a FF (0C hex).

A CR (if CR = CR + LF has been configured from the control panel menu) may also be used instead of the LF code.

4.

A line feed (0A hex) used as the line terminator causes the contents of the buffer to be plotted and the paper advances a single dot row at the vertical density of the current mode.

5.

A form feed (0C) hex used as the line terminator causes the contents of the buffer to be plotted and the paper to advance to the top of the next form.

GEK-00029B

99

5000 Series Programmer’s Manual

Double Density Plot Mode Format

1.

Send the even dot plot control code EOT (04 hex) or control sequence “SFCC d”, followed by a line of data.

2.

Send a line terminator, which causes the printer to plot the contents of the buffer. The paper does not advance in double density plot; the printer now waits for the second line of data.

3.

Send the odd dot plot control code ENQ (05 hex) or control sequence “SFCC e” and a second line of data, followed by a line terminator.

▪ A line feed (0A hex) used as the line terminator causes the contents of the buffer to be plotted and the paper advances a single dot row, based on the vertical density of the current mode. A CR (if CR = CR + LF is configured) may also be used with the same result.

▪ A form feed (0C) hex used as the line terminator causes the contents of the buffer to be plotted and the paper to advance to the top of the next form.

Chapter 4. Printronix P Series Emulation

100

GEK-00029B

Char

3

4

5

0

1

2

+

,

-

.

/

)

(

*

%

&

` space

!

#

$

;

<

=

>

?

6

7

8

9

:

Plot Mode Graphic Character Chart

Hex

Value

30

31

32

33

34

35

2B

2C

2D

2E

2F

25

26

27

28

29

2A

20

21

22

23

24

3B

3C

3D

3E

3F

36

37

38

39

3A

Dots xxoxox ooxxox xoxxox oxxxox xxxxox ooooxx xoooxx oxooxx xxooxx ooxoxx xoxoxx ooooox xoooox oxooox xxooox ooxoox xoxoox oxxoox xxxoox oooxox xooxox oxoxox oxxoxx xxxoxx oooxxx xooxxx oxoxxx xxoxxx ooxxxx xoxxxx oxxxxx xxxxxx

T

U

V

Q

R

S

L

M

N

O

P

I

J

K

Char

@

A

B

F

G

H

C

D

E

W

X

Y

Z

[

\

]

^

_

51

52

53

54

55

56

49

4A

4B

4C

4D

4E

4F

50

Hex

Value

40

41

42

43

44

45

46

47

48

57

58

59

5A

5B

5C

5D

5E

5F x = dot o = no dot xooxoo oxoxoo xxoxoo ooxxoo xoxxoo oxxxoo xxxxoo ooooxo xoooxo oxooxo xxooxo ooxoxo xoxoxo oxxoxo

Dots oooooo xooooo oxoooo xxoooo ooxooo xoxooo oxxooo xxxooo oooxoo xxxoxo oooxxo xooxxo oxoxxo xxoxxo ooxxxo xoxxxo oxxxxo xxxxxo

71

72

73

74

75

76

69

6A

6B

6C

6D

6E

6F

70

Hex

Value

60

61

62

63

64

65

66

67

68

7C

7D

7E

7F

77

78

79

7A

7B t u v q r s l m n o p i j k

Char

` a b f g h c d e

|

}

~

Del w x y z

{ xooxox oxoxox xxoxox ooxxox xoxxox oxxxox xxxxox ooooxx xoooxx oxooxx xxooxx ooxoxx xoxoxx oxxoxx

Dots ooooox xoooox oxooox xxooox ooxoox xoxoox oxxoox xxxoox oooxox xxxoxx oooxxx xooxxx oxoxxx xxoxxx ooxxxx xoxxxx oxxxxx xxxxxx

Exiting Plot Mode Graphics

When returning to a text line from a plot mode line, put an extra line feed in the data stream to maintain proper line registration throughout the page. This will allow the text characters to be put back on grid.

GEK-00029B

101

5000 Series Programmer’s Manual

PLOT MODE GRAPHICS DENSITY COMMANDS

High Horizontal

Density Graphics

High Vertical

Density Graphics

Prints dots at the even numbered dot columns.

Formats or <EOT>

<SFCC> d

Decimal:

Hex

BASIC:

:

<EOT>

<SFCC> 100

04

<SFCC> 64 or or

CHR$(<SFCC>);”d”;

The even dot plot code is used for programming high density graphics and must be used in conjunction with the Odd Dot Plot code (05 hex). Refer to the Graphics section for detailed plot mode information.

Modifies the paper motion for a plot mode line to 1/144 inch rather than 1/72 inch. The ENQ (plot mode code) should precede the DLE. See the discussion in the section on dot graphics for more information. When not preceded by a plot mode code, DLE acts as a VFU channel command.

Format

<DLE>

Decimal:

Hex:

BASIC:

Notes

16

10

CHR$(10);

GENICOM private code (not part of the target printers control codes).

Chapter 4. Printronix P Series Emulation

102

GEK-00029B

Single Line, High (Genicom Private Command): Used in forming a line of plot mode

Horizontal Density graphics, this code specifies a single line of data to be plotted at a dot horizontal density of 120 DPI. The EOT (plot mode code) should precede the NAK. See the discussion in this chapter on dot graphics for more information.

When not preceded by a plot mode code, NAK acts as a VFU channel command.

Format

<NAK>

Decimal:

Hex :

BASIC:

Notes

21

15

CHR$(21);

Normal Density

Graphics

High Density

Graphics

GENICOM private code (not part of the target printer’s control codes).

Prints dots at the odd numbered dot columns.

Format

<ENQ>

Decimal:

Hex:

BASIC:

Details

5

05

CHR$(5);

This is the normal density graphics control code. The ENQ code should occur before any printable data in the data stream.

Notes

Refer to the Graphics section for more details on Plot Mode Graphics.

For high density graphics, the

Even Dot Plot code (04 hex) must be used in conjunction with (and precede) the Odd Dot Plot code in the line.

Format

<SFCC> e

Decimal:

Hex :

BASIC:

Notes

<SFCC> 101

<SFCC> 65

CHR$(<SFCC>);”e”

Refer to the Graphics section for more details on Plot Mode Graphics.

GEK-00029B

103

5000 Series Programmer’s Manual

DIFFERENCES FROM TARGET PRINTER EMULATION

Discarded Commands

The following commands from the target printer are parsed by the current P-Series emulation and then discarded:

Select Extended Character Set (SFCC OSET;n)

The fonts required for this command were not available on the P-

Series.

Sequence discarded.

Download a Language (SFCC V)

The complete sequence SFCC V {QQQ} E {AAA} E {SSSSS} E (data) is parsed and discarded and the number of characters specified by the parameters as download data are also discarded.

Download a Character Shape (SFCC c)

The complete sequence SFCC c{PP} {SSSSSE} {A} (data) is parsed and discarded and the number of characters specified by the parameters as download data are also discarded.

Postnet Bar codes (SFCC |p*xxxxx-yyyy-zz*)

Sequence discarded.

Ribbon Minder Enable/Disable (SFCC r E/SFCC r D)

Sequence discarded.

NOTE

“Ribbon Minder” is a trade mark of Printronix, Inc.

Ribbon Minder Set Job Rate (SFCC r J nnnn E)

Sequence discarded.

Ribbon Minder Worn Message (SFCC r A n)

Sequence discarded.

Chapter 4. Printronix P Series Emulation

104

GEK-00029B

COMMAND LINE DEBUG

The Genicom P-Series emulation does not contain the command line debugger function for detecting and displaying error in Command

Line Sequences.

GEK-00029B

105

5000 Series Programmer’s Manual

FONT STYLES, PITCHES, AND CHARACTER SETS

Font Styles

The emulation uses the DP font instead of the three (3) High Speed fonts.

Font Pitches

Quality

DP

High Speed

NLQ

OCR

Emulation

60 x 72

60 x 72

120 x 144

120 x 144

Target

120 x 72

120 x 48

180 x 96

120 x 144

Character Sets

Set No.

Emulation

0

1

CP 437

CP 8859-1

2

3

4

None (discarded)

CP 8574

None (discarded)

Target

IBM PC

Multinational

ECMA 94

DEC Multinational

N/A

Extended Character Sets

The emulation supports code page 850 only.

Form Length

Maximum form length of the 5000 series is 22 inches. All commands which set forms length in Inches, Lines, or lines by VFU use 22 inches instead of the target printers 24 inch limit.

Chapter 4. Printronix P Series Emulation

106

GEK-00029B

Plot Mode Graphic Densities

The target printer defaults the graphic density to certain values based on the font selection:

▪ DP: 60 dpi horizontally, 72 dpi vertically

▪ NLQ:

▪ HS:

90 dpi horizontally, 96 dpi vertically

60 dpi horizontally, 48 dpi vertically

The 5000 series printers support 60/120 dpi horizontally and

72/144 dpi vertically.

Enhancements

The following enhancements were made to the emulation. These features do not exist as part of the target printer.

High Vertical Density Plot Mode Graphics

A <DLE> code in a graphics line will cause the next graphic line feed to be 1/144 inch instead of 1/72 inch.

GEK-00029B

107

5000 Series Programmer’s Manual

CHAPTER 5. PROPRINTER EMULATION

INTRODUCTION

The IBM Proprinter III XL emulation Is selected through the control panel. Printer option straps Proprinter Table (Appendix D) replace the applicable switches used on a Proprinter.

Although every effort has been made to make this printer functionally similar to the Proprinter, some differences do exist.

DIFFERENCES FROM PROPRINTER

▪ Non-Proprinter fonts are available; however, proportional spacing line lengths may be different.

▪ Download fonts are not available.

▪ The Proprinter 20 cpi font is not available.

▪ Bidirectional and unidirectional printing do not apply on this printer.

▪ Double-width and double-height characters are slightly different.

▪ 240 dpi graphics are printed on a 120 dpi grid. Adjacent dots are

OR'ed together. The aspect ratio of this printer (height vs. width of a graphic image) is identical to the Proprinter.

PROPRINTER CONTROL CODES

BEL

BS

CAN

Bell: Sounds a momentary audible tone.

Decimal:

Hex:

BASIC:

7

07

CHR$(7);

Backspace: Moves the print position one character to the left. This code is normally used for overstriking a character. When the print position is at the left margin, a received BS has no effect.

Decimal:

Hex:

BASIC:

8

08

CHR$(8);

Cancel: Causes all printable data received since the last line terminator to be deleted. Print modes enabled since the last terminator (other than double-width printing initiated by the SO code) stay in effect. Example: If underlining was enabled during the line, it will still be active for the next line received. The cancel control code does not change the current print position.

Decimal:

Hex:

BASIC:

24

18

CHR$(24);

108

Chapter 5. Proprinter Emulation GEK-00029B

DC4

ESC

FF

CR

DC1

DC2

DC3

Carriage Return: CR moves the current print position to the left margin. If auto LF on CR is set, either by Emulation Settings menu option or by command (ESC 5), then a line feed will also be executed.

Decimal:

Hex:

BASIC:

13

0D

CHR$(13);

Device Code 1: Select printer (parallel interface only). DC1 sets the printer online after being deselected by an ESC Q.

Decimal:

Hex:

BASIC:

17

11

CHR$(17);

Device Code 2: Sets 10 cpi printing. DC2 sets the printer to 10 cpi (5 cpi if double-wide is enabled). It cancels condensed printing mode and 12 cpi printing.

Decimal:

Hex:

BASIC:

18

12

CHR$(18);

Device Code 3: Deselect printer. When using a serial interface, DC3

(XOFF) is sent to the host to indicate the printer is not ready to accept data. When using a parallel interface, a received DC3 is treated as a NUL.

Decimal:

Hex:

BASIC:

19

13

CHR$(19);

Device Code 4: Cancel double-wide printing by line. DC4 cancels one-line double-wide print set by an SO code. It does not cancel continuous double-wide printing set by ESC W 1.

Decimal:

Hex:

BASIC:

20

14

CHR$(20);

Escape: Introduces an escape sequence. ESC tells the printer that the following characters are to be interpreted as a printer command, not printable data. See the section on Proprinter escape sequences.

Decimal:

Hex:

BASIC:

27

1B

CHR$(27);

Form Feed: Advances the paper to the next top of form with the print position at the left. If a top margin is set, paper advances to the first print line below the margin.

Decimal:

Hex:

BASIC:

12

0C

CHR$(12);

GEK-00029B

109

5000 Series Programmer’s Manual

SI

SO

VT

HT

LF

NUL

Horizontal Tab: Advances the print position to the next horizontal tab stop. If there are no tab stops between the print position and the right margin, the HT is ignored. Tab stops are set by the command

ESC D. Default tabs are set every eight columns, beginning at column 9.

Decimal:

Hex:

BASIC:

9

09

CHR$(9);

Line Feed: Advances the paper one line by the current setting for line space. If the LF causes paper to exceed the form length, a form feed occurs. Acts as a line terminator.

Decimal:

Hex:

BASIC:

10

0A

CHR$(10);

Null: NUL is ignored by the printer when received by itself. If received as part of a graphics data sequence, it is interpreted as a graphics space. Null is used by some escape sequences to end a series of parameters. When used as a parameter of a sequence looking for an even or odd value, it is considered even. Example: ESC S NULL causes superscripting to occur.

Decimal:

Hex:

BASIC:

0

00

CHR$(O);

Shift In: SI causes condensed printing. It sets the printer to 17.1 cpi

(8.55 cpi if double-wide printing is enabled). Condensed printing remains in effect for subsequent lines until cancelled.

Decimal:

Hex:

BASIC:

15

0F

CHR$(15);

Shift Out: SO causes double-wide printing for the current line only.

Decimal:

Hex:

BASIC:

14

0E

CHR$(14);

Vertical Tab: VT advances the paper to the next vertical tab setting and returns the print position to the left margin. A maximum of 64 vertical tabs is allowed per form. The vertical tabs are set using ESC

B. The paper is advanced one line if no tab is set beyond the current line.

Decimal:

Hex:

BASIC:

11

0B

CHR$(11);

Chapter 5. Proprinter Emulation

110

GEK-00029B

COMMAND DIRECTORY

Sequence

ESC A n

ESC B n1…n64 0

ESC C n

ESC C 0 m

ESC D n1…n28 0

ESC E

ESC F

ESC G

ESC H

ESC I n

ESC J n

ESC K n1 n2 v1…vn

ESC L n1 n2 v1…vn

ESC N n

ESC O

ESC P n

ESC Q n

ESC R

ESC S n

ESC T

ESC U n

ESC W n

ESC X n m

ESC Y n1 n2 v1…vn

ESC Z n1 n2 v1…vn

ESC 0

ESC 1

ESC 2

ESC 3 n

ESC 4

ESC 5 n

ESC 6

ESC 7

ESC _ n

ESC - n

ESC :

ESC ^

ESC n1 n2

ESC [T n1 n2 m1.. m5

Meaning

Set text line spacing to n/72 inch

Set vertical tabs by line numbers

Set form length in lines

Set form length in inches

Set horizontal tab stops in columns

Start emphasized printing

Cancel emphasized printing

Select double-strike printing

Cancel double-strike printing

Select print mode. 0 - DP. 2 NLQ

Graphics variable line spacing n/216 inch

Normal density graphics (60 DPI)

Dual density graphics low speed (120 DPI)

Skip perforation ON

Skip perforation OFF

Proportional space mode

Deselect printer

Set all tabs to power on settings

Super/Sub script on

Super/Sub script off

Unidirectional print on/off

Double-wide print on/off

Set horizontal margins

Dual density graphics (full speed)

Quad density graphics (reduced speed)

Set 1/8 line spacing

Set 7/72 line spacing

Start text line spacing

Set graphics line spacing (n/216)

Set top of form

Automatic line feed on/off

Select character set 2

Select character set 1

Continuous overscore on/off

Continuous underline on/off

12 CPI printing

Print single character from chart

Print continuously from chart

Select Code Page

Page

117

117

117

117

117

118

118

120

121

113

113

113

114

114

114

114

114

112

112

112

112

112

113

115

116

116

114

120

120

116

116

117

114

115

115

115

115

115

115

GEK-00029B

111

5000 Series Programmer’s Manual

ESCAPE SEQUENCES

ESC - n

ESC _ n

ESC \ n1 n2

ESC ^

ESC :

Underscore: When underscoring is enabled, all printable characters and all space characters. including leading space characters. are underlined. Leading white space preceding a horizontal tab stop is not underlined. Not recommended for use with line draw characters.

n = 1, underscoring is enabled n = 0, underscoring is disabled

Decimal:

Hex:

BASIC:

27 45 <n>

1B 2D <n>

CHR$(27);CHR$(45);CHR$(<n>);

Overscore: When overscoring is enabled. all printable characters and all space characters, including leading space characters, are overscored. Leading white space preceding a horizontal tab stop is not overscored. Not recommended for use with line draw characters.

n – 1 enabled n – 0 disabled

Decimal:

Hex:

BASIC:

27 95 <n>

1B 5F <n>

CHR$(27);"_<n>";

Print Continuously from All Character Chart.

Allows printing all the 256 characters and symbols (even those normally used as control codes) in the all character chart. The total number of characters to be printed from the all character chart is specified by n1 and n2 according to the formula: n1 + (256 * n2).

Example: To print 400 characters from the chart send

CHR$(27);"\";CHR$(144);CHR$(1);

Decimal:

Hex:

BASIC:

27 92 <n1> <n2>

1B 5C <n1> <n2>

CHR$(27);"\<n1><n2>";

Print Single Character from All Character Chart: The next character received is printed from the all character chart.

Decimal:

Hex:

BASIC:

27 94

1B 5E

CHR$(27);"^";

Set 12 cpi Printing: Sets the printer to 12 cpi (6 cpi if double-wide is enabled). DC2 resets to 10 cpi.

Decimal:

Hex:

BASIC:

27 58

1B 3A

CHR$(27);":";

Chapter 5. Proprinter Emulation

112

GEK-00029B

ESC [T n1 n2 ml

m2 m3 m4 m5

ESC 0

ESC 1

ESC 2

Select Code Page: Selects international character sets. The default is IBM PC Multilingual Set 2.

n1: Always 5 (The number of m parameters used.) n2: Always 0 ml, m2, and m5 are always zero.

m3 - See chart below.

m4 - See chart below.

m3 m4 International Character Set

7E 21 DEC Multinational

7F 21 Roman 8

8F 21 ISO 8859-1 Latin Alphabet #1

93 21 ISO 8859-5 Latin/Cyrillic

B5 01 IBM PC Set 2 USA (Microsoft Code Page 437)

52 03 IBM PC Multilingual Set 2 (MS Code Page 850)

54 03 Microsoft Code Page 852 (Slavic)

57 03 Microsoft Code Page 855 (Cyrillic)

5F 03 Microsoft Code Page 863 (French Canadian)

(The examples below show the m3 and m4 values for selecting Roman

8.)

Decimal:

Hex:

BASIC:

27 91 84 5 0 0 0 127 33 0

1B 5B 54 05 00 00 00 7F 21 00

CHR$(27);"rr;CHR$(5);CHR$(O);CHRS(O);CHR$(O);

CHR$(127);CHR$(33);CHR$(0);

Set 8 Lines per Inch: Sets the line spacing to 1/8 of an inch (8 lpi).

Decimal:

Hex:

BASIC:

27 48

1B 30

CHR$(27);"0";

Set 7/72 Lines per Inch Spacing: Sets the line spacing to 7/72 of an inch (10. 3 lpi)

Decimal:

Hex:

BASIC:

27 49

1B 31

CHR$(27);"l";

Start Text Line Spacing: Activates the line spacing stored by the last ESC A, or sets 6 lpi if no ESC A command has been received.

Decimal:

Hex:

BASIC:

27 50

1B 32

CHR$(27):"2";

GEK-00029B

113

5000 Series Programmer’s Manual

ESC 3 n

ESC 4

ESC 5 n

ESC 6

ESC 7

ESC A n

Set Graphics Line Spacing: Sets the line spacing to n units of 1/216 inch. This allows for line spacing in .0046 inch increments to 1.18

inches (255/216). The value of n/216 is rounded up to the next

1/144 inch.

n = 1 through 255

Example: ESC 3 27 Sets the line spacing to 1/8 inch, or

27/216.

Decimal:

Hex:

BASIC:

27 51 <n>

1B 33 <n>

CHR$(27);"3<n>";

Set Top of Form: Sets current paper position as top of form.

Decimal:

Hex:

BASIC:

27 52

1B 34

CHR$(27);"4";

Automatic Line Feed: Printer automatically does a line feed after receiving a carriage return.

n = 0, disabled n = 1, enabled

Decimal:

Hex:

BASIC:

27 53 <n>

1B 35 <n>

CHR$(27);"5<n>";

Select Character Set 2: All characters (printable and control codes) received after this command are selected from character set 2. A reset, initialization, or ESC 7 resets to character set 1.

Decimal:

Hex:

BASIC:

27 54

1B 36

CHR$(27);"6";

Select Character Set 1: All characters (printable and control codes) received after this command are selected from character set 1. Also, see ESC 6 above.

Decimal:

Hex:

BASIC:

27 55

1B 37

CHR$(27):"7";

Stores n/72-inch Line Spacing: The text line spacing is stored, although not set for use, to the value n in units of 1/72 inch. An ESC

2 must be sent to start this line spacing. Valid parameter values are

1 through 85.

Decimal:

Hex:

BASIC:

27 65 <n>

1B 41 <n>

CHR$(27);"A<n>";

Chapter 5. Proprinter Emulation

114

GEK-00029B

ESC B n1 ... n64 0 Set Vertical Tab Stops: This sequence sets up to 64 vertical tabs by line number. The tabs must be in ascending order and the sequence must end with a NUL. ESC B NUL clears all tab stops. These tabs are stored as absolute values, so they are not affected by changes in lpi settings. This command resets any previously set tab stops.

Variable n represents values 1 through 254.

ESC C n

ESC C 0 n

Decimal:

Hex:

BASIC:

27 66 <nl>...<n64> 0

1B 42 <n1>...<n64> 00

CHR$(27);"B<nl>...<n64>";CHR$(0);

Set Form Length in Lines: The value of n sets the form length in lines using the current line spacing setting. The maximum length is

22 inches (176 lines for 8 lpi, etc.). Top of form is set to the current form position. Once set, changing the line spacing has no effect on form length.

Decimal:

Hex:

BASIC:

27 67 <n>

1B 43 <n>

CHR$(27);"C<n>";

Set Form Length in Inches: The value of n sets the form length from

1 to 22 inches. Top of form is set at the current vertical position.

Once set, changing the line spacing has no effect on form length.

ESC D n1...n28 0

ESC E

ESC F

Decimal:

Hex:

BASIC:

27 67 0 <n>

1B 43 00 <n>

CHR$(27);"C";CHR$(0);"<n>";

Set Horizontal Tab Stops: Sets horizontal tab stops at the positions specified "n" expressed in columns at the current cpi. Once set, changing the cpi has no effect on the tab positions. ESC D NUL clears all tab stops. Tab stops must be specified in ascending order. If more than 28 parameters are specified, the command is terminated.

Decimal:

Hex:

BASIC:

27 68 <n1>...<n28> 0

1B 44 <n1>...<n28> 0

CHR$(27);"D<n1>…<n28>";CHR$(0);

Start Emphasized Print

Decimal:

Hex:

BASIC:

27 69

1B 45

CHR$(27):"E";

Stop Emphasized Print

ESC G

Decimal:

Hex:

BASIC:

27 70

1B 46

CHR$(27);"F"';

Start Double-Strike Print

Decimal:

Hex:

BASIC:

27 71

1B 47

CHR$(27);"G";

GEK-00029B

115

5000 Series Programmer’s Manual

ESC H

ESC I n

ESC J n

ESC N n

ESC 0

Stop Double-Strike Print

Decimal:

Hex:

BASIC:

27 72

1B 48

CHR$(27);"H";

Select Print Mode n = 0 selects Draft Resident, USA n = 1 selects Draft 12 CPI (Fast) Resident, USA n = 2 selects NLQ Resident, USA n = 3 selects NLQ H (Courier) Resident, USA n = 4 selects Draft Download. Multi/USA n = 5 selects Draft 12 CPI (Fast) Download, Multi/USA n = 6 selects NLQ Download, Multi/USA n = 7 selects NLQ H (Courier) Download, USA n = 8 selects Draft Download. USA n = 9 selects Draft 12 CPI (Fast) Download, USA n = 10 selects NLQ Download, USA n = 11 selects Alternate NLQ II Resident (Italic). USA n = 12 selects Draft Download, Multi/USA n = 13 selects 12 CPI Fast) Download, Multi/USA n = 14 selects NLQ Download, Multi/USA n = 15 selects Alternate NLQ 11 (Italic), Download, USA

Decimal:

Hex:

BASIC:

27 73 <n>

1B 49 <n>

CHR$(27);"I<n>";

Variable Line Feed: This command advances the paper a distance specified by the value of n in units of 1/216 inch. The value "n" can be a value from 0 to 255. The variable line feed is not stored, so there is no effect on line spacing values.

Decimal:

Hex:

BASIC:

27 74 <n>

1B 4A <n>

CHR$(27);"J<n>";

Set Skip Perforation: Sets the perforation skip distance to n lines.

ESC N is reset when the form length is changed. Valid parameter values are 1 - 255. The printer converts the number of lines (n) to inches using the current line spacing and saves the skip distance in inches. The skip perforation distance does not change when the line spacing is changed. Also, in this chapter, see ESC 0.

Decimal:

Hex:

BASIC:

27 78 <n>

1B 4E <n>

CHR$(27);"N<n>";

Cancel Skip Perforation: Resets the skip perforation value to zero lines.

Decimal:

Hex:

BASIC:

27 79

1B 4F

CHR$(27);"O";

Chapter 5. Proprinter Emulation

116

GEK-00029B

ESC P n

ESC Q n

ESC R

ESC S n

ESC T

ESC U n

Select Proportional Spacing

If n = odd number, proportional print enabled.

If n = even number, proportional print disabled.

Decimal:

Hex:

BASIC:

27 80 <n>

1B 50

CHR$(27);"P<n>";

Deselects IBM Proprinter (parallel interface only): Stops printer from accepting data from the host. The host must reset the printer or select it using DC1. This sequence is intended for diagnostic purposes only. The variable (n) is 22.

Decimal:

Hex:

BASIC:

27 81 22

1B 51 16

CHR$(27);"Q";CHR$(22);

Set All Tabs to Power On Settings: Sets horizontal tabs every eight positions starting at column 9 and clears all vertical tabs.

Decimal:

Hex:

BASIC:

27 82

1B 52

CHR$(27);"R";

Set Superscript/Subscript On: If n is 1, then subscript (1/2 inch below the line) is selected; if it is 0, then superscript (1/2 inch above the line) is selected. Since these two attributes are mutually exclusive, an ESC S command overrides any previous ESC S setting.

Also, see ESC T below.

n = 1 subscript n = 0 superscript

Decimal:

Hex:

BASIC:

27 83 <n>

1B 53 <n>

CHR$(27);"S<n>";

Cancel Superscript/Subscript: Returns to previous baseline position. Also. in this chapter see ESC S.

Decimal:

Hex:

BASIC:

27 89

1B 54

CHR$(27);"T";

Set Unidirectional Printing n = 0 unidirectional printing is turned off n = 1 unidirectional printing is turned on

Decimal:

Hex:

BASIC:

27 85 <n>

1B 55 <n>

CHR$(27);"U<n>";

GEK-00029B

117

5000 Series Programmer’s Manual

ESC W n

ESC X n m

Set Double-Wide Print On/Off: When enabled, printable characters are printed twice their current width. This sequence has precedence over the SO control code.

n = 1: doublewide is enabled n = 0: doublewide is disabled

Decimal:

Hex:

BASIC:

27 87 <n>

1B 57 <n>

CHR$(27);"W<n>";

Set Horizontal Margins: This sequence sets the left (n) and right (m) margins. The interval is based on the current cpi setting. Variable (m) must be greater than W. and the sequence must include both variables.

Decimal:

Hex:

BASIC:

27 88 <n> <m>

1B 5B <n> <m>

CHR$(27);"X<n><m>";

Chapter 5. Proprinter Emulation

118

GEK-00029B

PROPRINTER DOT GRAPHICS

Dot graphics allows you to print individual dots at any position on the page. The Proprinter doesn't adjust the line feed increment automatically on entering graphics. If you want contiguous vertical graphics, then you must set the line feed increment to 8/72 inch before starting graphics and then reset it when you are finished.

An IBM graphics control sequence starts with an escape combination that sets the graphics density (ESC K, L, Y, or Z), followed by a 2-byte header that shows the number of subsequent bytes that are to be interpreted as graphics data. The format of the sequence is:

ESC (density) <n1> <n2> (data) .. (data)

Since this control sequence has no terminator, you need to specify exactly in the header the number of bytes that you want to be interpreted as graphics. If there are fewer graphics data bytes than specified in the header, then the printer treats subsequent text and control codes as graphics. In that case, carriage returns and line feeds are often ingested as graphics data.

On the other hand, if there are more graphics data bytes than specified in the header, then the printer interprets excess bytes as text or control codes. This can also produce indeterminate results.

The two bytes (n1, n2) specify the total number of image bytes that follow; n2 is the most significant byte.

The total number of image data bytes - n1 + (n2 * 256)

EXAMPLE: to print 5 inches of graphics at ESC K density, which is

60 dpi, then:

Total bytes = 5 inches x 60 dpi = 300 n1 = total bytes modulo 256, in other words, n1 = total bytes – (n2 * 256) n1 = 300 - (1 * 256) n1 = 44 n2 = integer (total bytes/256) n2 = integer (300/256) = 1

The sequence sent to the printer (shown in BASIC) would look like:

CHR$(27);CHR$"K';CHR$(44);CHR$(1);CHR$(v1);... CHR$(v3OO); where v1 through v3OO are image data bytes.

Each image data byte represents a vertical column of eight dots. The most significant bit of the byte controls the top dot of a column, and the least significant bit controls the bottom dot of that column. The first byte of data (v1) is the first column, (v2) is the second column, and so on. The illustration below shows byte values of various dot combinations.

GEK-00029B

119

5000 Series Programmer’s Manual

Weight Wire

128 1

64 2

32

16

8

4

3

4

5

6

2

1

7

8

!

!

!

Graphics Dot Pattern

! ! !

!

!

!

!

!

!

!

! ! !

! ! !

!

!

!

!

!

!

0 112 136 132 130 65 49 65 130 132 136 112 0 0 0 0

Programming Example

The following BASIC program will produce the graphic shown above.

100 WIDTH "LPT1:",255

110 FOR N = 1 TO 4

115 LPRINT CHR$(27);"K";CHR$(80);CHR$(0);

120 FOR K = 1 TO 5

140 LPRINT CHR$(0);CHR$(0);CHR$(0);CHR$(112);

150 LPRINT CHR$(136);CHR$(132);CHR$(130);

160 LPRINT CHR$(65);CHR$(49);CHR$(65);

170 LPRINT CHR$(130);CHR$(132);CHR$(136);

180 LPRINT CHR$(112);CHR$(0);CHR$(0);

190 NEXT K

200 LPRINT

210 NEXT N

220 LPRINT "DONE"

230 END

ESC K nl n2 v1…vn Normal Density Graphics: This sequence sets a density of 60 dpi horizontally and 72 dpi vertically.

Decimal:

Hex:

BASIC:

27 75 <nl> <n2> <v1>. . . <vn>

1B 4B <n1> <n2> <v1> . . . <vn>

CHR$(27);"K<nl><n2><v1>…<vn>";

ESC L n1 n2 v1…vn Low Speed Double-Density Graphics: This sequence sets a density of 120 dpi horizontally and 72 dpi vertically.

Decimal:

Hex:

BASIC:

27 76 <n1> <n2> <v1>...<vn>

1B 4C <n1> <n2> <v1> ... <vn>

CHR$(27);"L<nl><n2><vl>…<vn>";

ESC Y n1 n2 v1…vn High-Speed Double-Density Graphics: This sets a density of 120 dpi horizontally and 72 dpi vertically. If horizontally adjacent dots are specified, then the second dot is not printed.

Decimal:

Hex:

BASIC:

27 89 <n1> <n2> <v1>...<vn>

1B 59 <n1> <n2> <v1>…<vn>

CHR$(27);"Y<nl><n2><vl>…<vn>";

Chapter 5. Proprinter Emulation

120

GEK-00029B

ESC Z n1 n2 v1…vn Quadruple-Density Graphics (Reduced Speed): Sets a density of

240 dpi horizontally and 72 dpi vertically. If horizontally adjacent dots are specified, then the second dot is not printed.

Decimal:

Hex:

BASIC:

27 90 <n1> <n2> <v1>...<vn>

1B 5A <n1> <n2> <v1>…<vn>

CHR$(27);"Z<nl><n2><vl>…<vn>";

GEK-00029B

121

5000 Series Programmer’s Manual

CHAPTER 6. EPSON FX286-E EMULATION

INTRODUCTION

The FX288-e emulation causes the 5000 printers to emulate a 9-wire dot matrix printer.

Conventions Used in this Chapter

In contrast to ANSI, where an argument is expressed as an ASCII decimal integer, Escape control sequences take binary arguments.

For example, the control sequence to set form length in lines is:

ESC C n

The sequence to set a 66-line form, expressed in BASIC, would be:

LPRINT CHR$(27);"C";CHR$(66); which could alternately be expressed as:

LPRINT CHR$(27);"CB";

In contrast, when arguments 1 and 0 are used to turn something on and off, you can send the argument in either binary or ASCII. For example, you can turn underline on by sending:

CHR$(27);CHR$(45);CHR$(1); or you can send

CHR$(27);CHR$(45);"1";

The physical spaces in the escape sequences shown in this publication are only for clarification purposes and are not used in the actual string.

If a space is actually needed in the sequence, it will be shown as SP.

Chapter 6. Epson FX286-E Emulation

122

GEK-00029A

Print Mode Combinations

The chart below shows those print modes that can be used together and those that cannot. When an FX-286e command is received to turn on two print modes that are incompatible, one of them will take precedence over the other one. This Is indicated in the chart below by showing the letter of the higher precedence mode at the intersection of the two modes. For example, when combining the double-high and compressed modes (an impossible combination), the double-high mode, represented by the letter "D" at the intersection of the two modes, will take precedence and become the active print mode.

PRINT MODE

(N) Normal

(C) Compressed

(E) Emphasized

(Q) NLQ

(S) Super/Subscript

(W) Double Wide

(U) Underline

(O) Double-Strike

(D) Double-High

(P) Proportional

(I) Italics

C

C

Q

Q

C

S

I

D

P

Q

D

I

D P

I

D

GEK-00029A

123

5000 Series Programmer’s Manual

FUNCTIONAL DIFFERENCES

The following is a list of functional differences between this printer’s emulation and the FX-286e printer.

▪ The maximum line length is 13.6 inches (136 columns at 10cpi,

816 graphics columns per line at 60 dpi).

▪ Special enhanced print modes are not available when the “paper low” condition is reached.

▪ The number of characters that can be discarded by the CAN command is different due to a different buffer size.

▪ The delete code is discarded.

▪ The Auto Feed XT function (pin 14 on the parallel interface connector) is not implemented.

▪ Double-wide and double-high print characters appear to have wider dots due to offset printing.

▪ Adjacent dots can be printed when ESC Y or ESC Z graphics are selected. This provides a sharper image of higher density.

▪ All 12 dot rows will print when using 12-high characters in a superscript or subscript.

▪ Superscript characters are not underlined in a different dot row.

▪ Even though the escape sequence and data to print nine-bit graphics are accepted, the data byte containing the ninth bit is discarded and only the top eight bits of data are printed.

▪ The printer has more than 80 character sets that may be selected from the CCU menu.

▪ Horizontal densities available are 60, 120, and 240 dpi. When 72 dpi is received, it is converted to 60 dpi. When densities of 80, 90, or 144 are received, they are converted to 120 dpi.

▪ The widths of the proportional characters are slightly different.

▪ The Courier NLQ font is used for Roman.

▪ The Gothic font is used for Sans Serif.

▪ The italic font prints only in NLQ mode.

▪ The character graphics font prints only in draft mode.

Chapter 6. Epson FX286-E Emulation

124

GEK-00029A

ADDITIONAL ESCAPE SEQUENCES

The following escape sequences are supported by this emulation, but are not part of the FX-286e command set:

ESC ( t

ESC ( T

ESC j n

ESC 1

Assign a code page to one of four variables

(0, 1, 2, or 3)

Assign a code page to variable "1"

Reverse n/216 paper move

Select 7/72-inch line spacing.

UNSUPPORTED ESCAPE SEQUENCES

The following escape sequences from the FX-286e command set are not supported by this emulation and are therefore discarded:

ESC EM

ESC %

ESC &

ESC 8

ESC 9

ESC :

ESC a

Sheet feeder

User-defined character set

User-defined characters

Paper out sensor on

Paper out sensor off

Copy ROM to RAM

NLQ justification

GEK-00029A

125

5000 Series Programmer’s Manual

FX-286E CONTROL CODES

BEL

BS

CAN

CR

DC1

DC2

DC3

DC4

DEL

ESC

FF

Bell (07H): Sounds the beeper.

Backspace (08H): Flushes all print data and then moves the print position one character width to the left based on the current character spacing. If this code is received immediately after graphic printing, the print position of subsequent data is moved back to the point at which graphic printing started.

Cancel (18H): Causes all printable data received since the last line terminator or escape sequence, whichever occurred later, to be deleted. Data on previous lines that has been auto-wrapped will not be deleted. This code is a line terminator. The current print position will be retained. Also, cancels the double width print mode initiated by the SO control code.

Carriage Return (0DH): Flushes all print data and positions the print position at the left margin for subsequent printable data to be printed. This code Is a line terminator and will terminate the double width print mode initiated by a received SO code.

Device Control 1 (11H): Causes printing to resume after the printer has been deselected by a DC3 code. It will not resume printing if printer was halted by pressing the On Line key on the control panel.

Device Control 2 (12H): Cancel condensed mode. This ends the current print buffer and causes its contents to print. The condensed print mode is then canceled and printing resumes at 10 cpi (5 cpi double-wide) or 12 cpi (6 cpi double-wide) depending on which one was previously selected.

Device Control 3 (13H)

Serial Interface: Deselect printer. The printer can be selected again by a DC1 command or by the online key.

Parallel Interface: Treated the same as the NUL control code.

Device Control 4 (14H): Cancels double width printing initiated by a

SO control code or ESC SO escape sequence and returns to the previously selected print compression (pica, compressed, or elite). It does not cancel double width printing selected by ESC W or ESC 1.

Delete (7FH): The delete character is discarded unless it is made printable via the ESC 6 code expansion sequence.

Escape (1BH): Introduces an escape sequence. It implies that subsequent code(s) will be interpreted by the printer as a printer command. not printable data.

Form Feed (0CH): Moves the print position to the top of the next form at the left margin. This code is a line terminator and will terminate the double-width printing mode initiated by a received SO code. All print data is flushed before the form feed occurs.

Chapter 6. Epson FX286-E Emulation

126

GEK-00029A

HT

LF

NUL

SI

SO

Horizontal Tab (09H): If there are tabs set, this code ends the current print buffer and causes its contents to be printed. The horizontal print position moves right to the next horizontal tab stop position. Any tab that causes the current print position to exceed the right print limit, or right margin, will cause a line wrap to occur

(CR,LF). Tab positions are absolute. If the character spacing changes, tab positions remain in the same absolute horizontal positions. If there is no tab set between the current print position and the print limit, the tab is ignored and the current print buffer is not affected.

Line Feed (0AH): Flushes all print data and then advances the paper up one line as determined by the current line spacing. Me print position Is moved to the left margin. This code is a line terminator and will terminate the double-width printing mode initiated by a received SO code. If paper positioning causes the next line to exceed the form length, an automatic form feed will occur.

Null (00H): Causes no action when received alone. It is used by some sequences to terminate the parameter list.

Shift In (0FH): Select condensed print mode. Ends the current print buffer and causes its contents to be printed. This code then enables the condensed printing mode. Characters are condensed to 17.1 cpi for the pica pitch (10 cpi) and 20 cpi for the elite pitch (12 cpi).

Double-wide printing [invoked by SO, ESC I (n), or ESC W commands], together with 17.1 cpi, produces printing at approximately 8.6 cpi. With double-wide and 20 cpi, the resulting print will be approximately 10 cpi. The condensed print mode can be selected, but not activated, while the proportional print mode is active.

Shift Out (0EH): Select double-wide printing by line. Ends the current print buffer and causes its contents to be printed. This code then starts double-wide printing for subsequent characters until a line terminator, DC4, ESC I (n), or ESC W NUL command is received.

Characters are elongated to twice their current width, that is, expanded to take up two character positions each. The tab positions are not changed. If the double-wide print mode is already active by an

ESC W or ESC I (n) sequence. the SO code is ignored and the escape sequence takes control.

GEK-00029A

127

5000 Series Programmer’s Manual

VT Vertical Tab (0BH): Ends the current print buffer and causes its contents to be printed. A CR function is always performed upon receipt of a VT code. The VT code then advances the paper vertically to the next vertical tab position in the channel selected by the ESC / sequence. If no channel has been selected, channel zero is used.

Following power-up or initialization, the eight vertical tab channels are in an initialized state (no tabs have been inserted into a specific channel nor has the tab erase command been received). If a VT code

Is received at this time, a vertical move equal to the current line spacing is performed. If the command to erase tabs is received (ESC

B NUL or ESC bn NUL), received VT codes will produce no vertical motion but will cause a CR to occur.

A maximum of 16 vertical tab positions are allowed for each of the eight channels. If there are tabs in the currently selected table, but no tabs set beyond the current line. a vertical tab will cause paper to advance to the top margin of the next form.

When a vertical tab would cause the printer to exceed the current form length (minus any perforation skip distance) the vertical tab will act as a form feed. Vertical tabs are converted to absolute positions when set. Future changes in line spacing will not change the position of the vertical tabs.

Chapter 6. Epson FX286-E Emulation

128

GEK-00029A

FX-286E ESCAPE SEQUENCE DIRECTORY

Escape Sequence Definition

ESC SO

ESC SI

ESC SP n

ESC I n

ESC #

ESC $ nl n2

ESC - n

ESC / n

Esc | n

ESC 0

ESC 1

ESC 2

ESC 3 n

ESC 4

ESC 5

ESC 6

ESC 7

ESC <

ESC -

ESC >

ESC @

ESC A n

Select double-wide print mode

Select condensed print mode

Set intercharacter space

Master print mode select

Cancel MSB (most significant bit control)

Set absolute print position

Turn underlining ON/OFF

Set vertical tab stops

Set left margin

Select 1/8-inch line spacing

Select 7/72-inch line spacing

Select 1/6-inch line spacing

Select n/216-inch line spacing

Select italic print mode

Cancel italic print mode

Printable code area expansion

Cancel printable code area expansion

Select unidirectional mode (1 line)

Set most significant bit (MSB) to zero

Set most significant bit (MSB) to one

Initialize printer

Select n/72-inch line spacing

ESC B n1...n16 NUL

ESC C n

ESC C NUL n

ESC D nl n2 NUL

ESC E

ESC F

Set vertical tab stops

Set page length in lines

Set page length in inches

Set horizontal tab stops

Select emphasized mode

Cancel emphasized mode

ESC G

ESC H

ESC I n

ESC J n

ESC K n1 n2 v1...vn

ESC L n1 n2 v1...vn

ESC M

ESC N n

Select double-strike mode

Cancel double-strike mode

Printable code area expansion

Single variable line feed

Normal density graphics

Low speed double density graphics

ESC O

Select elite pitch

Set skip over perforation (Epson set bottom margin)

Cancel skip over perforation (Epson cancel bottom margin)

Select pica pitch ESC P

ESC Q n

ESC R n

ESC S n

ESC T

ESC U n

ESC Y n1 n2 v1...vn

Set right margin

Select the international character set

Select superscript/subscript printing

Cancel superscript/subscript printing

Turn unidirectional printing mode ON/OFF

High speed double density graphics

ESC Z n1 n2 v1...vn

ESC \ n1 n2

Quadruple density graphics

Set relative print position

ESC b c n1 n2 ... n8 NUL Set vertical tabs in channels 0-7

GEK-00029A

129

5000 Series Programmer’s Manual

132

135

133

146

142

142

139

152

152

140

137

Page

134

134

143

143

143

143

139

141

149

149

134

142

135

135

145

149

139

141

136

133

134

134

141

141

145

138

152

152

135

132

136

132

132

136

141

141

Escape Sequence

ESC k n

ESC p n

ESC s n

ESC t n

ESC w n

ESC x n

ESC ( t 3 0 m1 m2 m3

ESC ( T n1 n2 m1...m5

ESC * m nl n2 vl...vn

ESC ? s n

ESC – m nl n2

Definition

Select font style

Turn proportional mode ON/OFF

Turn half-speed print mode ON/OFF

Select a code page

Turn double-high printing ON/OFF

Select NLQ or Draft printing

Assign a code page to one of four variables (0, 1,

2, or 3)

Assign a code page to variable "l"

Select graphics mode (Epson set bit image)

Reassign graphics mode

Select 9-pin graphics

Page

144

135

140

147

143

144

147

148

153

153

141

Chapter 6. Epson FX286-E Emulation

130

GEK-00029A

FX-286E ESCAPE SEQUENCE GROUPINGS

The FX-286e escape sequences have been separated according to functionality. Special areas of interest such as character spacing, print modes. and graphics have separate sections.

The sequences are separated as follows:

▪ Margins

▪ Line Spacing

▪ Character Spacing

▪ Tabs (Horizontal and Vertical)

▪ Paper Movement

▪ Print Position

▪ Print Modes

▪ Special Character Printing

▪ Miscellaneous Commands

▪ Dot Graphics

GEK-00029A

131

5000 Series Programmer’s Manual

MARGINS

ESC C n

ESC C NUL n

ESC N n

ESC 0

Set Page Length in Lines: Sets the forms length to n lines. The value for form length is stored in inches and will not change when line spacing Is changed. This sequence resets the top of form value to the current line position and resets the perforation skip mode. Form lengths of zero or greater than 22 inches are ignored and leave the existing form unchanged. The parameter limits are 1-255.

Decimal:

Hex:

BASIC:

27 67 n

1B 43 nH

CHR$(27);"C";CHR$(n);

Set Page Length in Inches: Sets the forms length from 1 to 22 inches depending on the value for the parameter n. This sequence resets the top of form value to the current line position and resets the perforation skip mode. Form lengths of zero or greater than 22 inches will be ignored and leave the existing form unchanged. The parameter limits are 1-255.

Decimal:

Hex:

BASIC:

27 67 0 n

1B 43 00 nH

CHR$(27);"C";CHR$(0);CHR$(n);

Set Skip Over Perforation: Sets a bottom margin region to avoid printing on the perforation when using continuous forms. The parameter n determines the number of print lines to be included in the skip area. This is converted to an absolute distance in inches based on the current line spacing value. Subsequent changes to the line spacing will not automatically change this setting. When form length is changed (by ESC C NUL n or ESC C n), the skip perforation is cleared. If the skip value exceeds the form's length, it is ignored. A parameter value of zero leaves the previous setting unchanged.

Decimal:

Hex:

BASIC:

27 78 n

1B 4E nH

CHR$(27);"N";CHR$(n);

Cancel Skip Over Perforation: Resets the skip perforation value to zero.

Decimal:

Hex:

BASIC:

27 79

1B 4F

CHR$(27);"O";

Chapter 6. Epson FX286-E Emulation

132

GEK-00029A

ESC | n

ESC Q n

Set Left Margin: Sets the left margin to n columns in the current cpi. When proportional mode is in effect, the settings are treated as though they were set for pica (10 cpi horizontal). Before the new margin is set, all print data is flushed. The minimum space allowed between the left and right margin is the distance equal to the width of one double-wide pica character. This command clears any existing horizontal tabs and installs the defaults (every eight columns).

Decimal:

Hex:

BASIC:

27 108 n

1B 6C nH

CHR$(27);"I";CHR$(n);

Set Right Margin: Sets the right margin to n columns in the current pitch. When proportional mode is selected, the settings are the same as they would be for pica pitch (10cpi horizontal). The minimum space between the left and right margin is the width of two pica characters. Note that before the right margin is set, this command sequence causes all print data to be flushed. Column numbering begins at zero. If the right margin value is invalid (within the width of two pica characters of the left margin or exceeds the maximum columns), the current margin is unchanged. This command clears any existing horizontal tabs and installs the defaults (every 8 columns based on the left margin).

Decimal:

Hex:

BASIC:

27 81 n

1B 51 nH

CHR$(27);"Q";CHR$(n);

GEK-00029A

133

5000 Series Programmer’s Manual

LINE SPACING

ESC 0

ESC 1

ESC 2

ESC 3 n

ESC A n

Select 1/8-inch line spacing (8 lpi): Sets the line spacing to

1/8-inch or 8 lpi.

Decimal:

Hex:

BASIC:

27 48

1B 30

CHR$(27);"0";

Select 7/72-Inch Line Spacing: Sets the line spacing to 7/72 of an inch.

Decimal:

Hex:

BASIC:

27 49

1B 31

CHR$(27);"1";

Select 1/6-Inch Line Spacing (6 lpi): Sets the line spacing to

1/6-inch.

Decimal:

Hex:

BASIC:

27 50

1B 32

CHR$(27);"2";

Select n/216-Inch Line Spacing: Sets the line spacing to n/216 of an inch. This permits line spacing from 0 inches (0/216) to 1.18

inches (255/216). This command is recommended with n=24 to set the proper line spacing when printing graphics.

Decimal:

Hex:

BASIC:

27 51 n

1B 33 nH

CHR$(27);"3";CHR$(n);

Select n/72-Inch Line Spacing: Selects and activates n/72-inch line spacing.

Decimal:

Hex:

BASIC:

27 65 n

1B 41 nH

CHR$(27);"A";CHR$(n);

Chapter 6. Epson FX286-E Emulation

134

GEK-00029A

CHARACTER SPACING

ESC SI

ESC M

ESC P

ESC p n

ESC SP n

Select Condensed Print Mode: Performs the same function as the SI control code.

Decimal:

Hex:

BASIC:

27 15

1B 0F

CHR$(27);CHR$(15);

Select Elite Pitch: This sets the pitch to 12 cpi.

Decimal:

Hex:

BASIC:

27 77

1B 4D

CHR$(27);”M”;

Select Pica Pitch: This sets the pitch to 10 cpi.

Decimal:

Hex:

BASIC:

27 80

1B 50

CHR$(27);”P”;

Turn Proportional Mode On/Off: Turns the proportional print mode on or off according to the value of n.

n l

0

Effect

Unidirectional printing on

Unidirectional printing off

This command overrides the condensed print mode.

Decimal:

Hex:

BASIC:

27 74 n

1B 4A nH

CHR$(27);"J";CHR$(n);

Set Intercharacter Spacing: Sets the amount of space added to each character in increments of 1/120-inch. This space is added to the space already allocated in the character’s design. Parameter limits are 0-63 (decimal).

Decimal:

Hex:

BASIC:

27 32 n

1B 20 n

CHR$(27);CHR$(32);CHR$(n);

GEK-00029A

135

5000 Series Programmer’s Manual

TABS

ESC B n1…n16 NUL Set Vertical Tab Stops: Sets up to 16 vertical tabs in channel at the indicated line numbers in the current line spacing. The list of tab stops must be terminated by the NUL code. Any line that is not referenced in the list is cleared by this command. Therefor, the command sequence ESC B NUL will clear all vertical tab stops. The parameters n1, n2, . . . must be in ascending order and the limits of the parameters are 1-255 (decimal).

Vertical tabs are converted to absolute positions as they are set.

Future changes in line spacing will not change the position of the tabs.

ESC D n1…n32 NUL Set Horizontal Tab Stops: Sets up to 32 horizontal tab stops at the indicated column numbers. The list of tab stops must be terminated by a NUL code. Any column that is not referenced in the list is cleared by this command. Therefor, the command ESC D NUL will clear all horizontal tabs. The parameters must be in ascending order.

If a tab parameters occurs which is out of sequence, the command is assumed to be terminated; all subsequent data is ignored until a NUL code is encountered.

Decimal:

Hex:

BASIC:

27 68 n1 … n32 0

1B 44 n1H … n32H 00

CHR$(27);”D”;CHR$(n1);…;CHR$(n32);CHR$(0);

ESC / n

Decimal:

Hex:

BASIC:

27 66 (n1) … (n16) 0

1B 42 (n1H) . . . (n16H) 00

CHR$(27);CHR$(66);CHR$(n1);… CHR$(n16);CHR$(0);

Set Vertical Tab Stops: Selects the vertical tab channel. All subsequent vertical tab commands (VT) will use this selected channel.

Decimal:

Hex:

BASIC:

27 47 n

1B 2F nH

CHR$(27);”/”;CHR$(n);

Chapter 6. Epson FX286-E Emulation

136

GEK-00029A

ESC b c n1 n2…n8 Set Vertical Tabs in Channels 0 Through 7: Sets vertical tab stops

NUL in any one of 8 vertical tab channels numbered 0 through 7. This allows you to set up to 8 different groups of vertical tabs. The list of tab stops must be terminated by the NUL code. Any line that is not referenced in the list is cleared by this command. Therefor, the command sequence ESC b (c) NUL will clear all vertical tab stops within the channel (c). The parameters (n1), (n2), etc., must be in ascending order and the limits of the parameter values are 1-255

(decimal).

Vertical tabs are converted to absolute positions as they are set.

There is no automatic linkage between the value of line spacing and vertical tab positions: subsequent changes in the value for line spacing will not cause the tab positions to change.

Decimal:

Hex:

BASIC:

27 98 c n1 n2 … n8 0

1B 62 cH n1H n2H … n8H 00

CHR$(27);”b”;CHR$((c));CHR$(n1);CHR$(n2);…;

CHR$(0);

GEK-00029A

137

5000 Series Programmer’s Manual

PAPER MOVEMENT

ESC J n Single Variable Line Feed: This sequence causes the contents of the print buffer to print. The print position is then moved down the page by the distance specified by the parameter in 1/216-inch increments.

This sequence does not affect spacing of subsequent line actions. The parameter values allow a vertical movement from 0 to 1.18 inches

(255/216). If n is not an exact multiple of 3/216=1/72-inch, then the movement is approximate. The parameter n=24 can be used to get the exact line spacing for the eight-bit graphics mode.

Zero is a valid parameter value that produces no vertical motion.

n

21

24

27

36

Spacing

7 dots

8 dots

8 lpi

6 lpi (12 dots

Decimal:

Hex:

BASIC:

27 74 n

1B 4A nH

CHR$(27);”J”;CHR$(n);

Chapter 6. Epson FX286-E Emulation

138

GEK-00029A

PRINT POSITION

ESC <

ESC U n

Select Unidirectional Mode (1 Line): Forces unidirectional print, from right to left, in the line in which this command is embedded.

Unidirectional printing begins with the first character following receipt of this command and is canceled by a carriage return.

Decimal:

Hex:

BASIC:

27 60

1B 3C

CHR$(27);"<";

Turn Unidirectional Printing ON/OFF: Causes the printer to print in only one direction [prints with the shuttle moving from right to left) or in both directions according to the value of parameter n as follows:

ESC $ n1 n2 n l

0

Effect

Unidirectional printing on

Unidirectional printing off

When turning unidirectional printing off, the command should be the first character in the line to be printed bidirectionally.

Decimal:

Hex:

BASIC:

27 85 n

1B 55 nH

CHR$(27);"U";CHR$(n);

Set Absolute Print Position: Specifies the distance from the current left margin where subsequent characters are to be printed. If the position specified is beyond the right margin, this command sequence is ignored and the previous settings remain in effect.

Argument units are 1/60 Inch, expressed as n1 + (n2 x 256).

Example: To establish a position 6.3 inches from the left margin:

6.3 x 60 = 378 (total number of 1/60-tnch increments)

378/256 =1 with a remainder of 122 n1 = 122 n2 = 1

Expressed in BASIC this is:

CHR$(27);"$";CHR$(122);CHR$(1);

Decimal:

Hex:

BASIC

27 36 (n1) (n2)

1B 24 (n1H) (n2H)

CHR$(27);"$";CHR$(nl);CHR$(n2);

GEK-00029A

139

5000 Series Programmer’s Manual

ESC \ n1 n2

ESC s n

Set Relative Print Position: Sets the position where printing will occur next relative to the current print position. Parameters n1 and n2 are in 1/120-inch increments and are expressed as n1 + (n2 x

256). Parameter limits for n1 and n2 are 0-255.

Example 1: If you want to move 4 inches to the right, then:

4 x 120 = 480 (total number of 1/120-inch increments

480/256 = 1 with a remainder of 224 n1 = 224 n2= 1

Expressed In BASIC, this is:

CHR$(27);CHR$(92);CHR$(224);CHR$(1);

Example 2: If you want to move 4 inches to the left, then:

65,536 - 480 = 65,056

65,056/256 = 254 with a remainder of 32 n1 - 32 n2 – 254

Expressed in BASIC, this is:

CHR$(27);CHR$(92);CHR$(32);CHR$(254);

Decimal:

Hex:

BASIC:

27 92 (n1) (n2)

1B 5C (n1H) (n2H)

CHR$(27);CHR$(92);CHR$(n1);CHR$(n2);

Turn Half-Speed Print Mode ON/OFF: Turns the half-speed print mode on or off according to the value of the parameter n below. Half speed printing is accomplished by only printing when the shuttle is moving from right to left.

n=1 half-speed on n=0 half-speed off

Decimal:

Hex:

27 115 n

1B 73 nH

BASIC CHR$(27);"s";CHR$(n);

Chapter 6. Epson FX286-E Emulation

140

GEK-00029A

PRINT MODES

ESC - n

ESC E

ESC F

ESC G

ESC H

Turn Underlining ON/OFF: Enables or disables automatic underlining depending on the parameter n as follows: n=1 enable underline n=0 disable underline

The underline will be positioned on dot row 9 of draft characters and row 18 of NLQ characters. Block characters (ASCII 176-223, 244, and

245) will not be underlined.

Decimal:

Hex:

BASIC:

27 45 (n)

1B 2D (nH)

CHR$(27);CHR$(45);CHR$(n);

Select Emphasized Mode: This causes subsequent printing to be emphasized. The print speed is half of the normal speed because the characters are printed twice. The second pass is offset about

1/120-inch for draft fonts and 1/240-inch for NLQ fonts.

Decimal:

Hex:

BASIC:

27 69

1B 45

CHR$(27);"E";

Cancel Emphasized Print Mode: Cancels the emphasized printing mode turned on by ESC E.

Decimal:

Hex:

BASIC:

27 70

1B 46

CHR$(27);"F";

Select Double-Strike Mode: Causes the contents of the print buffer to be printed and starts double-stroke printing when not in the NLQ mode. Each line of text is printed twice (direct overprint of each dot).

Decimal:

Hex:

BASIC:

27 71

1B 47

CHR$(27);"G";

Cancel Double-Strike Mode: Cancels the double-strike printing mode turned on by ESC G.

Decimal:

Hex:

BASIC:

27 72

1B 48

CHR$(27);"H";

GEK-00029A

141

5000 Series Programmer’s Manual

ESC S n

ESC T

ESC SO

ESC W n

Select Superscript/Subscript Printing: This sequence ends the current print buffer and causes its contents to be printed. In each mode, the character is shortened to half height and then positioned in the upper (superscripts or lower (subscript) half of the print line.

These print modes are mutually exclusively. Selects superscript or subscript printing according to the value of n as follows: n=1 enable subscript n=0 enable superscript

NOTE

The superscript or subscript mode is not allowed when doublehigh print is selected. Either can be selected during doublehigh printing, but they will not take effect until the doublehigh mode is canceled.

Decimal:

Hex:

BASIC:

27 83 (n)

1B 53 (nH)

CHR$(27);"S";CHR$(n);

Cancel Superscript/Subscript Printing: Cancels the superscript or subscript printing mode. Characters are printed at their normal size and previous baseline positions.

Decimal:

Hex:

BASIC:

27 84

1B 54

CHR$(27);"T";

Select Double-Wide Printing (1 Line): Performs the same function as the SO control code.

Decimal 27 14

Hex 1B 0E

BASIC CHR$(27);CHR$(14);

Turn Double-Wide Printing Mode ON/OFF: Turns double-wide printing on or off according to the parameter n as follows: n=1 double-wide on n=0 double-wide off

NOTE

If double-wide had been turned on previously by the SO control code, this mode is canceled and the ESC W sequence has control.

Decimal:

Hex:

BASIC:

27 87 <n>

1B 57 <n>

CHR$(27);"W<n>";

Chapter 6. Epson FX286-E Emulation

142

GEK-00029A

ESC w n

ESC 4

ESC 5

ESC 6

ESC 7

GEK-00029A

Turn Double-High Printing ON/OFF: Turns double-high printing on or off according to the value of parameter n as follows: n=1 double-high on n=0 double-high off

NOTE

Superscript subscript. and condensed modes are not valid in the double-high mode.

Decimal:

Hex:

BASIC:

27 119 n

1B 77 nH

CHR$(27);"w";CHR$(n);

Select Italic Print Mode: Causes characters to be printed from the italic set. In the lower section of the character table (range 0-127 decimal), all printable characters will print in the italics mode. In the upper section of the character table (range 128-255). the characters to be printed win be determined by the table selected (either by the

ESC t (n) sequence or emulation strap 2. If italics has been selected for the upper section, they Will be duplicates of the 7-bit italic characters in the lower table (0-127). If, however, an 8-bit code page is selected, the characters will be 128-255 from the specified code page printed in italics.

Decimal:

Hex:

BASIC:

27 52

1B 34

CHR$(27);"4";

Cancel Italic Mode: This command cancels the italic print mode set by the ESC 4 code.

Decimal:

Hex:

BASIC:

27 53

1B 35

CHR$(27);"5";

Printable Code Area Expansion: This command enables the printing of codes 128-159 decimal as characters. If the upper section of the character table (range 128-255) has italics selected (ESC t or emulation option 2), the codes 128 through 159 win print from the international substitution characters. If, however, an 8-bit code page has been selected for the upper section of the table, characters will print from the selected code page.

Decimal:

Hex:

BASIC:

27 54

1B 36

CHR$(27);"6";

Cancel Printable Code Page Expansion: Causes codes 128-159 to be executed as control codes, thereby canceling any previous ESC 6 command.

Decimal:

Hex:

BASIC:

27 55

1B 37

CHR$(27);"7";

143

5000 Series Programmer’s Manual

ESC ! n

ESC k n

ESC x n

Master Print Mode Select: Selects any valid combination of the printing modes listed below. The parameter n is equal to the sum of the decimal values associated with each mode. Note that pica and elite are mutually exclusive and proportional overrides condensed.

Also, pica and elite proportional are the same. (See "Print Mode

Combinations," page 7-2.) n

16

32

64

128

0

1

2

4

8

Effect

Pica

Elite

Proportional

Condensed

Emphasized

Double-Strike

Double-Width

Italic

Underline

Decimal:

Hex:

BASIC:

27 33

1B 21

CHR$(27);"1";CHR$(n);

Select Font Style: Selects the Roman (Courier) typeface if n is 0 and

Sans Serif (Gothic) if n is 1. This command will not activate the selection. but sets the style to be activated by the ESC x (n) sequence.

Refer to the "Functional Differences" section on page 7-4 for a description of typefaces used.

Decimal:

Hex:

BASIC:

Select NLQ or Draft Printing: Selects NLQ or draft printing. When selecting NLQ, the style will be the one that was last selected by the

ESC k (n) sequence.

n=1 NLQ n=0 draft

27 107

1B 6B

CHR$(27);"k";CHR$(n);

Decimal:

Hex:

BASIC:

27 120

1B 78 -

CHR$(27);"x";CHR$(n);

Chapter 6. Epson FX286-E Emulation

144

GEK-00029A

SPECIAL CHARACTER PRINTING

ESC I n Printable Code Area Expansion: If n is binary or ASCII one, some

ASCII codes between 0-31, and some or all codes between 128-159 inclusive, become printable as characters. If ESC 6 has been sent prior to this command, then all of the characters between 128 and

159 inclusive are printable. These characters come from the international character substitution set.

Not all control codes between 0 and 31 inclusive can be made printable because if the ESC code became printable. For example, no more escape commands could be received. If the parameter n is binary or ASCII zero, these codes return to the non-printable state.

Range 1

Decimal Hex

HT

LF

VT

FF

5

6

BEL

BS

2

3

4

0

1

17

DC2

DC3

DC4

CR

SO

SI

16

Following is a chart showing an executed code between 0 and 31 and between 128 and 159 inclusive. If a control code can never be made into a printable character, the standard symbol for the code is printed instead of its ASCII number. To the right of these codes is the name of the character that is printed. Note that this chart assumes that an ESC 6 command has already been received and that the italics mode has been selected (via ESC t or emulation option 2) for the upper section of the table (range 128-255). Otherwise, control codes such as FF, CR etc. would be executed in the region

128-159 inclusive instead of printing an international character. This sequence causes some ASCII codes between 0-31, and some or all codes between 128-159 inclusive, to become printable as characters when n is 1. When n is 0, these ASCII codes are non-printing characters.

HT

LF

VT

FF

05

06

BEL

BS

00

01

02

03

04

11

DC2

DC3

DC4

CR

SO

SI

10

EXECUTED ASCII CODE

Range 2

Decimal Hex

128

129

130

80

81

82

Character Printed grave a (à) grave e (è) grave u (ù)

131

132

133

134

135

136

83

84

85

86

87

88 grave o (ò) grave i (ì) angstrom (°)

U.K. pound symbol (£)

Inverted ! (¡)

Inverted ? (¿)

137

138

139

140

141

142

143

144

145

146

147

148

89

8A

8B

8C

8D

8E

8F

90

91

92

93

94 tilde N (Ñ) tilde n (ñ) int'l monetary sym ( ) pesetas angstrom A (Å) angstrom a (å) cedilla c (ç) section mark (§) eszet

AE diphthong (Æ) ae diphthong (æ) slashed O ( Ø )

GEK-00029A

145

5000 Series Programmer’s Manual

ESC R n

Range 1

Decimal Hex

21

22

23

CAN

25

26

ESC

28

29

30

31

15

16

17

CAN

19

1A

ESC

1C

1D

1E

1F

EXECUTED ASCII CODE

Range 2

Decimal Hex

149

150

95

96

Character Printed slashed o (ø) umlaut accent (¨)

151

152

153

154

155

156

97

98

99

9A

9B

9C umlaut A ( Ä ) umlaut O (Ö) umlaut U (Ü) umlaut a (ä) umlaut o (ö) umlaut u (ü)

157

158

159

9D

9E

9F acute E (É) acute e (é) yen sign (¥)

Decimal:

Hex:

BASIC:

27 73 n

1B 49 nH

CHR$(27);"I";CHR$(n);

Selects the International Character Set: Selects the international character substitution set for the ASCH codes between 35 and 126 decimal inclusive. The following parameters define which substitution set is selected.

n Country

6

7

8

9

10

3

4

5

0

1

2

USA

France

Germany

UK

Denmark I

Sweden

Italy

Spain I

Japan

Norway

Denmark

17

18

19

20

21

11

12

13

Spain II

Latin America

Netherlands

14 Anglo-Universal

15

16

Spanish America

Portugal

Africa

Switzerland

Turkey

Greece

Yugoslavia

Decimal:

Hex:

27 82 n

1B 52 nH

BASIC CHR$(27);"R";CHR$(n);

Chapter 6. Epson FX286-E Emulation

146

GEK-00029A

ESC t n

ESC ( t, n1 n2 m1 m2 m3

GEK-00029A

Select a Code Page: Selects one of four variables that contains a specific code page selection. The four variables are loaded via the

ESC ( t and the ESC [T sequences. The four variables are identified as

0,1,2. and 3 (either binary or ASCII values). This command overrides the condition set by the CCU menu . Note that italics print can be selected by using the ESC 4 command even if the eight bit code page table has been selected.

The four selection variables have the following defaults: n

0

1

2

3

No code page (italics 0-128 in upper table

USA code page 437

No code page (italics 0-128 in upper table

USA code page 437

Effect

Decimal:

Hex:

BASIC:

27 116 <n>

1 B 74 <n>

CHR$(27);"t<n>";

Assign a Code Page to One of Four Variables (0, 1, 2, or 3):

Assigns a specific code page to one of the four selection variables used by the ESC t sequence (either the binary or ASCII value can be used for ml). Listed below are the values for m2 and m3 required to assign specific code pages to the select variable ml.

Note that this sequence is similar to the ESC ( T sequence except that fewer code page choices are available. Also when using this command, assignments can be made to any of the four different select variables used by the ESC t sequence.

x0D x0E x0F x10 x01 x2C x1D x06 x07 x08 x09 x0A x0B

Hex Values m2 m3 x00 x01 x03 x05 x00 x00 x00 x00 x00 x00 x00 x00 x10 x00 x0F x00 x00 x00 x00 x00 x00

Italic (0-127)

PC 437 (USA)

PC 850 (Multilingual)

PC 853 (Turkish)

PC 855 (Cyrillic)

PC 860 (Portuguese)

PC 863 (Canada-French)

PC 865 (Norway)

PC 852 (East Europe)

PC 867 (Turkish)

PC 864 (Arabic)

PC 866 (Russian)

PC 869 (Greek)

USSR GOST (Russian)

PC 437 (Greek

858

8859-15

Character Table

Some code pages might not be available in all font sets. If the sequence specifies a code page that is not currently installed, the sequence is ignored.

Decimal:

Hex:

BASIC:

27 40 116 3 0 m1 m2 m3

1B 28 74 3 0 m1H m2H m3H

CHR$(27);"[t";CHR$(3);CHR$(0);CHR$(m1)

CHR$(m2);CHR$(m3);

147

5000 Series Programmer’s Manual

ESC ( T nl n2 m1...m5

Assign a Code Page to Variable 1: Assigns a code page to (n2)(m1) the 1 variable used by the ESC t sequence. Note that this sequence is very similar to the ESC ( t sequence except that variable 1 is the only variable that can accept a code page assignment. Also, more code page choices are available by using this sequence rather than the

ESC ( t sequence.

If a code page is selected that is not supported by the current font set or an invalid parameter is received, the sequence will be discarded and the multilingual code page will remain unchanged. Some code pages might not be available in a specific set of firmware. If the sequence specifies a code page that is not currently installed, the sequence is ignored.

Parameters n1, n2, and ml through m3 are discarded by the emulation; however, they must appear in the sequence and represent some value (or zero).

The following table lists the parameters required to select the different code pages.

Decimal:

Hex:

BASIC: m4 m3

00 00

Code Page

No change from current setting

01 B5 Code page 437 (USA)

03 52 Code page 850 (multilingual)

03 54

03 55

03 59

Code page 852

Code page 853 (Cyrillic)

Code page 857

03 5C Code page 860

03 61

03 62

Code page 865 (Norway)

Code page 866 (Russian)

03 63

03 65

Code page 867

Code page 869

21 7C USSR GOST (Russian)

21 7D Code page 437 (Greek)

21 7E DEC multinational (LA-210)

21 7F Roman 8

21 80

21 81

21 82

Mazowia (Polish)

Turkey

Greece

21 8F

21 90

21 91

21 92

21 93

ISO 8859-1 Western Europe

ISO 8859-2 Eastern Europe

ISO 8859-3 Southern Europe

ISO 8859-4 Northern Europe

ISO 8859-5 Cyrillic

21 94

21 95

21 96

ISO 8859-6 Arabic

ISO 8859-7 Greek

ISO 8859-8 Hebrew

21 97 ISO 8859-9 Southern Europe 2

17 1B ISO 8859-15

03 5A Code Page 858

27 91 84 n1 n2 m1 ... m5

1B 5B 54 n1H n2H m1H ... m5H

CHR$(27);"[T";CHR$(n1);CHR$(n2);

CHR$(m1); . . .;CHR$(m5)

Chapter 6. Epson FX286-E Emulation

148

GEK-00029A

MISCELLANEOUS COMMANDS

ESC #

ESC =

ESC >

ESC @

Cancel MSB (Most Significant Bit) Control: Cancels the most significant bit control set by either ESC = or ESC >.

Decimal:

Hex:

BASIC:

27 35

1B 23

CHR$(27);"#";

Set Most Significant Bit (MSB) to Zero: Sets the most significant bit of all incoming data to zero. This command has no effect on graphics or user-defined characters.

Decimal:

Hex:

BASIC:

27 61

1B 3D

CHR$(27);"=";

Set Most Significant Bit (MSB) to One: Sets the most significant bit of all incoming data to one. This command has no effect on graphics or user-defined characters.

Decimal:

Hex:

BASIC:

27 62

1B 3E

CHR$(27);">";

Initialize Printer: Flushes all data in the print buffer preceding the command and then initializes the printer. Does not change straps, pitch, or print quality.

Decimal:

Hex:

BASIC:

27 64

1B 40

CHR$(27);"@";

GEK-00029A

149

5000 Series Programmer’s Manual

FX-286E DOT GRAPHICS

Dot graphics allows you to print individual dots at any position on the page, and thus to print pictures as well as text. While in graphics mode, emphasized, double-strike. expanded, underlined, subscript and superscript remain as set, but are inactive.

The FX-286e printer doesn't adjust the line feed increment automatically on entering graphics. If contiguous vertical graphics is desired, then set the line feed increment to 8/72 inch before starting graphics and then reset it when finished. See Line Spacing

Commands on page 134.

An FX-286e graphics control sequence starts with an escape combination that sets the graphics density (ESC K, L, Y, or Z).

followed by a 2-byte header that shows the number of subsequent bytes that are to be interpreted as graphics data. The format of the sequence is:

ESC (density) (n1) W) (data) ... (data)

Since this control sequence has no terminator, you need to specify exactly in the header the number of bytes that you want to be interpreted as graphics. If there are fewer graphics data bytes than specified in the header, then the printer treats subsequent text and control codes as graphics. In that case, carriage returns and line feeds are often ingested as graphics data.

On the other hand, if there are more graphics data bytes than specified in the header, then the printer interprets excess bytes as text or control codes. Mils can also produce very interesting results.

Specifying Graphics Line Length

The two bytes (n1, n2) specify the total number of image bytes that follow; n2 is the most significant byte.

total number of image data bytes = n1 + (n2 x 256)

Example: To print 5 inches of graphics at ESC K density, which is 60 dpi, then: total number of bytes = 5 inches x 60 dpi - 300

300/256 = 1 with a remainder of 44 n1 = 44 n2 = 1

The sequence sent to the printer (shown in BASIC) would look like:

CHR$(27);CHR$"K";CHR$(44);CHR$(1);CHR$(v1);. . . CHR$(v300); where v1 through v3OO are image data bytes.

Chapter 6. Epson FX286-E Emulation

150

GEK-00029A

Image Data Bytes

The FX-286e printer supports both 8-pin and 9-pin vertical formats.

Since this emulation supports only 8-pin graphics, 9-pin graphics will not be explained or illustrated here. When 9-pin graphics are sent to this printer. the byte containing the 9th bit is discarded.

Each image data byte represents a vertical column of eight dots. The most significant of the eight bits controls the top pin of a column and the least significant bit controls the bottom pin of that column The first byte of data (v1) Is the first column (v2) is the second column, and so on. The illustration below shows byte values of various dot combinations.

Weight Wire

128 1

64 2

32

16

8

4

2

1

5

6

3

4

7

8

0 0

!

!

!

Graphics Dot Pattern

! ! !

!

!

!

!

!

!

!

! ! !

0 112 136 132 130 65 49 65 130 132 136 112 0

Image Byte Values

! ! !

!

!

!

!

!

!

0

Graphics Programming Example

100 WIDTH "LPT1:",255

110 FOR N - 1 TO 4

115 LPRINT CHR$(27);"K";CHR$(80);CHR$(0);

120 FOR K - 1 TO 5

140 LPRINT CHR$(0);CHR$(0);CHR$(0);CHR$(112);

150 LPRINT CHR$(136);CHR$(132);CHR$(130);

160 LPRINT CHR$(65);CHR$(49);CHR$(65);

170 LPRINT CHR$(130).CHR$(132);CHR$(136);

180 LPRINT CHR$(112);CHR$(0):CHR$(0);

190 NEXT K

200 PRINT

210 NEXT N

220 LPRINT "DONE"

230 END

Printed Results of Sample Program

GEK-00029A

151

5000 Series Programmer’s Manual

FX-286E DOT GRAPHICS CONTROL SEQUENCES

ESC K n1 n2 v1...vn Normal Density Graphics: Sets a density of 60 dpi horizontally and

72 dpi vertically.

Decimal:

Hex:

BASIC:

27 75 n1 n2 v1...vn

1B 4B n1H n2H v1H...vnH

CHR$(27);"K";CHR$(n1);CHR$(n2);CHR$(v1);...;

CHR$(vn);

ESC L n1 n2 v1...vn Low-Speed Double-Density Graphics: Sets a density of 120 dpi horizontally and 72 dpi vertically. If horizontally-adjacent dots are sent, they will be printed.

Decimal:

Hex:

BASIC:

27 76 n1 n2 v1. vn

1B 4C v1H ... vnH

CHR$(27);"L";CHR$(n1);CHR$(n2);CHR$(v1);...;

CHR$(vn);

ESC Y n1 n2 v1...vn High-Speed Double-Density Graphics: Sets a density of 120 dpi horizontally and 72 dpi vertically. If horizontally adjacent dots are sent, they will be printed.

Decimal:

Hex:

BASIC:

27 89 n1 n2 v1 ... vn

1B 59 n1H n2H v1H ... vnH

CHR$(27);"Y";CHR$(n1);CHR$(n2);CHR$(v1);...;

CHR$(vn);

ESC Z n1 n2 v1...vn Quadruple-Density Graphics (Reduced Speed): Sets a density of

240 dpi horizontally and 72 dpi vertically. If horizontally adjacent dots are sent. they will be printed.

Decimal:

Hex:

BASIC:

27 90 n1 n2 v1 ... vn

1B 5A n1H n2H v1H v2H

CHR$(27);"Z";CHR$(n1);CHR$(n2);CHR$(v1) ... (v2)

Chapter 6. Epson FX286-E Emulation

152

GEK-00029A

ESC * m n1 n2 v1...vn

ESC ? s n

Select Graphics Mode: Selects graphics mode m (see table below) for n1 + (n2 x 256) columns. The variables n1 and n2 represent the number of data bytes to be sent that will be interpreted as graphics.

If the number of graphics columns to be printed causes printing to exceed the right margin, all data beyond that margin will be ignored.

4

5

6

2

3

7 m

0

1

CRT II

Graphics Mode

Single-density

Double-density

High-speed double-density

Quadruple-density

CRT I

Plotter (1:1)

Double-density plotter

DPI

60

120

120

240

120

60

120

120

Decimal:

Hex:

BASIC:

27 42 n1 n2 v1...vn

1B 2A n1H n2H v1H...vnH

CHR$(27);"*";CHR$(m);CHR$(n1);CHR$(n2);

CHR$(v1);...;CHR$(vn);

Reassign Graphics Mode: Reassigns the dot density to the graphics mode specified by ESC K, ESC L, ESC Y, or ESC Z.

s=K, L, Y, or Z n=dot density (see values below) n

0

1

2

3

4

5

6

7

Horizontal dpi

60

120

120

240

80 (120)

72 (60)

90 (120)

144 (120)

Vertical dpi

72

72

72

72

72

72

72

72

NOTE

The emulation converts the values corresponding to n4 through n7 to the ones shown in parenthesis.

Example:

Normally, when the printer receives the ESC L command, the dot density is 120 dpi x 72 dpi vertical. By using this command, you can reassign that density to 60 dpi horizontal x 72 dpi vertical by sending the following:

CHR$(27);"?";"I";CHR$(0);

GEK-00029A

153

5000 Series Programmer’s Manual

ESC ^ m n1 n2

After the command is sent, the ESC L command then causes the horizontal density to be 60 dpi instead of 120 dpi.

Decimal:

Hex:

BASIC:

27 63 n

1B 3F nH

CHR$(27);"?";CHR$(s);CHR$(n);

Select 9-Pin Graphics: Turns on the 9-bit graphics mode for n1+(n2 x 256) columns. The variable m determines the density as follows:

NOTE

This emulation does not support the 9-bit operation. The byte containing the 9th bit is discarded and only the top eight bits are used.

m=1 double density m=0 single density

Decimal:

Hex:

BASIC:

27 94 m n1 n2

1B 5E m n1 n2

CHR$(27);"^";CHR$(m);CHR$(nl);CHR$(n2);

Chapter 6. Epson FX286-E Emulation

154

GEK-00029A

CHAPTER 7. DEC LG / COMPAQ LG PLUS

EMULATION

CONTROL CODE DEFINITIONS

BEL

BS

HT

The control codes are single character action codes in the range

0 - 31 decimal in the ASCII code chart. The following are those codes, which are relevant to this emulation.

Bell: The printer's audible alarm will sound for 1/2 second when the bell code is received by the printer.

Decimal:

Hex:

BASIC:

7

07H

CHR$(7);

Backspace (08H): The backspace code will set the active print position one character position to the left at the current CPI, unless the new location precedes the left margin. In this case, the active position will be set to the left margin.

Indeterminate conditions: If the right margin has been exceeded the backspace is ignored.

Decimal:

Hex:

BASIC:

8

08H

CHR$(8);

Horizontal Tab: HT will set the active print position to the next horizontal tab position.

Indeterminate conditions: If there are tab(s) set but no tab(s) are set between the active print position and the right margin, the active print position will advance to the right margin.

If there are no tabs set, the active print position will advance to the right margin.

Decimal:

Hex:

BASIC:

9

09H

CHR$(9);

NOTE

The emulation initially sets a horizontal tab stop every eight characters.

LF Line Feed (0AH): Line terminator. LF will advance the active print position to the next line. If the enabled via the menu, the printer will execute a carriage return prior to executing the LF.

Decimal:

Hex:

BASIC:

10

0AH

CHR$(10);

155

GEK-00029A 5000 Series Programmer’s Manual

SO

SI

DC1

VT

FF

CR

Vertical Tab: Line terminator. The active print position will be set to the next vertical tab stop.

Indeterminate Conditions

If there are no vertical tabs set, the active position will be advanced to the bottom margin. If there are no more tabs set between the current position and the bottom margin the active position will be set to the top margin on the next form.

NOTE

The emulation initially sets a vertical tab stop for every line on the page.

Decimal:

Hex:

BASIC:

11

0BH

CHR$(11);

Form Feed: Line terminator. The active print position will be set to the top margin of the next form If the appropriate printer control switch is set, the printer will execute a carriage return immediately prior to executing the form feed.

Decimal:

Hex:

BASIC:

12

0CH

CHR$(12);

Carriage Return: Line terminator. CR will return the active print position to the left margin. If the enabled by menu selection, the printer will execute a line feed immediately after executing the CR.

Decimal:

Hex:

BASIC:

13

0DH

CHR$(13);

Shift Out: Shift Out locks character set G1 into GL.

Decimal:

Hex:

BASIC:

14

0EH

CHR$(14);

Shift In: Shift In locks character set G0 into GL.

Decimal:

Hex:

BASIC:

15

0FH

CHR$(15);

Device Control 1: Serial interface only: If READY/BUSY controlled by

DC1/DC3 has been enabled via the printer configuration menu, the printer will transmit DC1 when its receive buffer reaches the low trip point.

Indeterminate Conditions

DC1 applies to the serial interface only. It is ignored if DC1/DC3

READY/BUSY is not enabled.

Decimal:

Hex:

BASIC:

17

11H

CHR$(17)

Chapter 7. Dec LG/Compaq LG Plus Emulation

156

GEK-00029B

CAN

SUB

ESC

DC3 Device Control 3: DC3 applies to the serial interface only. If

READY/BUSY by DC1/DC3 has been enabled via the printer configuration menu, the printer will transmit a DC3 when its receive buffer reaches the high trip point.

Indeterminate Conditions

DC3 is ignored if DC1/DC3 READY/BUSY is not enabled.

Decimal:

Hex:

BASIC:

19

13H

CHR$(19);

Cancel: CAN immediately ends an escape or control sequence. The printer interprets the characters following CAN as normal text. CAN also cancels a Device Control String when received within the command string of that DCS.

Decimal:

Hex:

BASIC:

24

18H

CHR$(24);

Substitute: Sub immediately ends an escape or control sequence.

Indeterminate Conditions

Sub prints as a space character for sixel graphics data.

Decimal:

Hex:

BASIC:

26

1AH

CHR$(26);

Escape: ESC introduces an escape or control sequence.

Indeterminate Conditions

If ESC is received in the middle of a sequence, the sequence is immediately ended and a new sequence is started. ESC also immediately ends a Device Control String.

Decimal:

Hex:

BASIC:

27

1BH

CHR$(27);

GEK-00029A

157

5000 Series Programmer’s Manual

COMMANDS

IND

NEL

The control sequence introducer (CSI) signals the beginning of an

ANSI control sequence that may accept parameters. In the 7-bit environment, ESC [ is used. In the 8-bit environment, either ESC [or the single code 9B may be used. 8-bit control is menu selectable.

When the printer recognizes that the escape sequence is invalid or is not implemented, it will discard the characters received up to that point. Subsequent printable codes will be printed.

In the 7-bit environment, an escape sequence is defined as a group of two or more characters, beginning with the ASCII code 1B

(hexadecimal), which invokes a given printer function.

In the 8-bit environment, an escape sequence is defined as a single character code which has its most significant bit set, or a group of two or more characters beginning with the ASCII code 9B

(hexadecimal). When the parallel interface is used, the 8-bit environment is always available. For the serial interface, single character 8-bit controls are available if the interface has been set for eight data bits via the printer menu. For either interface, single character 8-bit controls must be enabled by menu selection.

Unless stated otherwise, any sequence received with illegal parameter(s) will be ignored, however, their use is discouraged as this may cause incompatibilities with future products.

Index: IND moves the active position down to the same position on the next line.

Indeterminate Conditions

If the new position is below the bottom margin, the active position moves to the top of the next page.

Decimal:

Hex:

BASIC:

27 68 or 132

1B 44 or 84

CHR$(27);CHR$(68) or CHR$(132);

Next Line: NEL moves the active position to the left margin on the next line.

Indeterminate Conditions

If the new position is below the bottom margin, the active position moves to the top of the next page.

Decimal:

Hex:

BASIC:

27 69 or 133

1B 45 or 85

CHR$(27);CHR$(69) or CHR$(133);

Chapter 7. Dec LG/Compaq LG Plus Emulation

158

GEK-00029B

HTS

VTS

PLD

PLU

Horizontal Tab Set: A horizontal tab will be set at the current print position.

Indeterminate Conditions

If the maximum number of stops (32) is already set when a new one is programmed, the new one will be inserted and the rightmost tab stop removed.

Decimal:

Hex:

BASIC:

27 72 or 136

1B 48 or 88

CHR$(27);CHR$(72); or CHR$(136);

Vertical Tab Set: A vertical tab will be set at the current vertical position.

Indeterminate Conditions

If there is an attempt to set more than the maximum number of tab stops allowed, only the stops nearest the top of sheet are retained.

Stops that have been set for forms longer in length than the currently programmed form are not usable. Resetting the forms length to include those stops will cause the stops to again become active.

Decimal:

Hex:

BASIC:

27 74 or 138

1B 4A or 8A

CHR$(27);CHR$(74);

Partial Line Down: The active vertical position will move downward by one half of the current line feed distance to create an appearance of subscripting. The ESC K sequence is also used to effect recovery to the original active vertical position following an ESC L (partial line up sequence) code sequence.

Indeterminate conditions

If the command exceeds the bottom of form position, the command will be ignored.

Decimal:

Hex:

BASIC:

27 76 or 139

1B 4B or 8B

CHR$(27);"K";

Partial Line Up (1B 4C or 8CH): The active vertical position will move upward by one half of the current line feed distance to create an appearance of superscripting. (See ESC K above). The ESC L sequence is also used to effect recovery to the original active vertical position following the ESC K (partial line down sequence) code sequence.

Indeterminate Conditions

If the command exceeds the top of form position, the command will be ignored.

Decimal:

Hex:

BASIC:

27 77 or 140

1B 4C or 8C

CHR$(27);CHR$(77); or CHR$(140);

GEK-00029A

159

5000 Series Programmer’s Manual

RI

SS2

SS3

DCS

CSI

ST

Reverse Index: Moves the active line position up to the same position on the preceding line. The Reverse Index command causes the active position to stop at the top of the margin.

Decimal:

Hex:

BASIC:

27 78 or 141

1B 4D or 8D

CHR$(27);CHR$(78); or CHR$(141);

Single Shift 2: Temporarily moves character set G2 into GL to print one character.

Decimal:

Hex:

BASIC:

27 69 or 142

1B 4E or 8E

CHR$(27);"N"

Single Shift 3 : Temporarily moves character set G3 into GL to print one character.

Decimal:

Hex:

BASIC:

27 70

1B 4F or 8F

CHR$(27);"O"; or CHR$(143);

Device Control String : Introduces a device control string.

Indeterminate Conditions

A DCS control character received in an escape sequence, control sequence, or control string aborts the sequence and begins a new device control string.

Decimal:

Hex:

BASIC:

27 80 or 144

1B 50 or 90

CHR$(27);"P"; or CHR$(144);

Control String Introducer : Introduces a sequence of one or more bytes that constitute a control function.

Decimal:

Hex:

BASIC:

27 91 or 155

1B 5B or 9B

CHR$(27);CHR$(91); or CHR$(155);

Indeterminate Conditions

A CSI control character received in an escape, control sequence, or control string aborts the sequence and begins a new device control string.

String Terminator : Indicates the end of a device control string (DCS).

Decimal:

Hex:

BASIC:

27 92 or 156

1B 5C or 9C

CHR$(27);CHR$(92); or CHR$(156);

Chapter 7. Dec LG/Compaq LG Plus Emulation

160

GEK-00029B

OSC

PM

APC

DECIPEM

Operating System Command : OSC introduces an Operating System

Command String. OSC control strings are ignored

Indeterminate Conditions

The start of this control string is recognized but all of the data that follows is ignored until this sequence is either aborted or terminated by an ST sequence.

Decimal:

Hex:

BASIC:

27 93 or 157

1B 5D or 9D

CHR$(27);CHR$(93); or CHR$(157);

Privacy Message : Introduces a Privacy Message control String. PM control strings are ignored.

Indeterminate Conditions

The start of this control string is recognized but all of the data that follows is ignored until this sequence is either aborted or terminated by an ST sequence.

Decimal:

Hex:

BASIC:

27 94 or 158

1B 5E or 9E

CHR$(27);CHR$(94); or CHR$158);

Application Program Command : APC introduces an Application

Program Command String. APC control strings are ignored

Indeterminate Conditions

The start of this control string is recognized but all of the data that follows is ignored until this sequence is either aborted or terminated by an ST sequence.

Decimal:

Hex:

BASIC:

27 95 or 159

1B 5F or 9F

CHR$(27);CHR$(9F); or CHR$(159);

IBM Proprinter Emulation Mode : Selects the Proprinter emulation.

Decimal:

Hex:

BASIC:

155 63 53 56 104

9B 3F 35 38 68

CHR$(155);"?";"5";"8";"h";

GEK-00029A

161

5000 Series Programmer’s Manual

SGR (n1)(n2)... m

DECRLGS

Select Graphics Rendition : This sequence will select the Font (mode and character style) by using one or more of the following parameters:

19

21

22

24

15

16

17

18

53

55

11

12

13

14

0

1

4

10

Normal Printing Mode (Default)

Bold Print Mode

Underline Mode

Default (Data Processing)

Correspondence

OCR-A

OCR-B

Data Processing

High speed draft

Data Processing

Correspondence

Data Processing

Near Letter Quality

Double Underline Mode (uses normal underline mode)

Cancel Bold Mode

Cancel Underline Mode

Overscore mode

Cancel overscore

Decimal:

Hex:

BASIC:

155 n1 n2 ... m

9B n1H h2H ... 6D

CHR$(155);CHR$(n1);CHR$(n2);...;"m";

Request Logo Status : This command applies to the serial interface only. It requests a status report of the logos available for printing.

The logo string contains a list of all the valid logos loaded in the printer and their comment strings. Each logo number and comment start on a new line, separated by commas.

Decimal:

Hex:

BASIC:

Reply:

155 23 112

9B 27 70

CHR$(155);CHR$(23);CHR$(112);

DCS &w (logo #) (string) ST

90 26 77 (logo #) (string) 9C

NOTE

This command works only when the printer is connected to the host through the serial interface.

Chapter 7. Dec LG/Compaq LG Plus Emulation

162

GEK-00029B

DECRFS Request Font Status : Requests a status report of the fonts available for printing, the memory available for loading forms and logos, or both.

The Ps parameters are defined as:

0

1

2

Send both reports (default)

Send status of ROM fonts

Send amount of RAM available for forms and logos.

Discussion: The reply to a DECRFS with a Ps parameter of 1 will not contain an ID string in this implementation. The nnn within the reply to a DECRFS with a Ps parameter of 2 represents decimal number indicating the number of bytes of RAM available for storing forms and logos.

Replies:

Reply with Ps = 1:

Reply with Ps = 2:

<DCS>1”{ <ST>

90 31 22 7B 9C

<DCS>2”(nnn) <ST>

90 32 22 (nnn) 9C

Reply with Ps = 0:

Decimal:

Hex:

BASIC:

<DCS>1”{ <ST><DCS>2”(nnn) <ST>

90 31 22 7B 9C 90 32 22 (nnn) 9C

155 Ps 59 Ps 34 123

9B PsH 3B PsH 22 7B

CHR$(155);CHR$(Ps);CHR$(59);CHR$(Ps);CHR$(34);

CHR$(123);

NOTE

This command works only when the printer is connected to the host through the serial interface.

GEK-00029A

163

5000 Series Programmer’s Manual

DECILG

DECDLG Delete Logo Sequence: Delete logo from printer memory. P1 defines the logos to be deleted.

Indeterminate Conditions

When P1 = 0, P2 through Pn make up the ID of the logos to be deleted.

When P1 = 3, All stored logos are deleted.

Deleting a logo within a form is not allowed.

Decimal:

Hex:

BASIC:

155 P1 59 P2 59 ... Pn 59 38 124

9B P1H 3B P2H 3B ... PnH 3B 26 7C

CHR$(155);CHR$(P1);CHR$(59);CHR$(P2);CHR$(59);

...;CHR$(Pn);CHR$(59);"&|";

Select Logo Sequence: Prints the selected logo contained in printer memory. Pn defines the ID of the selected logo.

Indeterminate Conditions

If no logo exists for the ID specified, the sequence is ignored.

At the end of a select logo sequence, the cursor remains in the starting position.

Decimal:

Hex:

BASIC:

155 Pn 38 125

9B PnH 26 7D

CHR$(155);CHR$(Pn);"&}";

Chapter 7. Dec LG/Compaq LG Plus Emulation

164

GEK-00029B

DECLFM Loading Forms Sequence: Allows forms to be loaded and stored into printer memory.

General Command Syntax

DCS P1;P2&p record ST

P1 specifies the form file format. (must be 0)

P1 = 0 LG-series printer logo file format.

P1 ≠ 0 Sequence is ignored.

P2 defines the replacement action.

P2 = 0 Replace the named form.

P2 = 3 Replace all forms.

Record

The record includes the form header that defines form parameters and size, and the form data string.

ID Length = Two digit number (01 through 99) that defines the length of the form ID.

Form ID =String of one to 99 printable characters that identify the form.

CNTL Encoding Character = Indicates the start of controlcharacter encoding. The character is always in the range of 20 through 7E hex, and is followed by a two-digit hexadecimal number equivalent to the ASCII value of the control character to be encoded. When a control character is required within the form data, the control character must be entered in its hexadecimal format and preceded by the CNTL encoding character.

Form Data Switch Character = Designates the insertion of the form’s fill-in data. The character is always in the range from 20 through 7E hex. The form-data switch character must be different from the control-character encoding character. The form data switch character is not printable within the form and should not be used in any control sequence in the form.

Form Length = A five-digit number, 00001 through 65,535, that defines the length of the string that follows. The string count includes all characters other than uncoded control characters 0 through 1F hex.

Form Data String = Form data is a string of text and command sequences with encoded control characters. Terminate the string with a ST (ESC \ or decimal 156) command.

GEK-00029A

165

5000 Series Programmer’s Manual

DECFLM

DECDFM

(continued)

Sample DECFLM Sequence

ESC P 0 ; 3 & p 04Memo%@00234 ESC \

Decimal:

Hex:

BASIC:

144 P1 59 P2 38 112 record 156

90 P1 3B P2 26 70 record 9C

CHR$(144);CHR$(P1);CHR$(59);CHR$(P2);"&p"; record;CHR$(156);

NOTE

The forms remain selectable until new forms are loaded using the replace all command, another form with the same number is loaded, or if the printer power is turned off.

Delete Forms Sequence: Deletes forms from printer memory.

General Command Syntax

DCS Ps & q forms id ST

Ps = 0 Delete form that matches the forms id string.

Ps = 3 Delete all stored forms.

Indeterminate Conditions

The FORM ID string identifies the forms to be deleted. If more than one Form ID is listed, separate them with semicolons. Form Ids with more than ten characters are ignored.

If you try to delete a form while it is printing, the printer will ignore the delete command.

Decimal:

Hex:

BASIC:

144 Ps 38 113 FORMS ID 156

90 PsH 26 71 FORMS ID 9C

CHR$(144);CHR$(ps);”Sq”;forms id;CHR$(156);

Chapter 7. Dec LG/Compaq LG Plus Emulation

166

GEK-00029B

DECIFM Start Forms Sequence: Selects any form loaded in the printer’s RAM.

When a form is selected, the printer enters Form Mode and variable ‘fillin’ data is merged and printed with the form data.

General Command Syntax

DCS P1 & r FORM NAME ST

Indeterminate Conditions

P1 is the select form switch character. The select form switch character always ranges from 20 hex through 7E hex and designates the printer to switch back to form data. When the printer encounters a FF character in the form data portion of a multiple page form, it advances to the next page and continues merging with the fill-in data that follows. If there is more than one set of fill-in data, the same form constant data is merged with the new fill-in data to create additional forms.

The FORM NAME is the first ten characters of the loaded form’s ID

(or the full form ID if it is ten characters or less in length). If no such form exists, the fill-in data is printed as text data.

Decimal:

Hex:

BASIC:

144 P1 38 114 FORM NAME 156

90 P1H 26 72 FORM NAME 9C

CHR$(144);P1;”&r”;”FORM NAME”;CHR$(156);

NOTE

The text and command strings corresponding to the last field of a multi-page form page must terminate with a switch character. The last field in the last page of a form must terminate with the Stop Form sequence and not with the switch character. To exit the FORM Mode, enter a Terminate sequence.

GEK-00029A

167

5000 Series Programmer’s Manual

5

6

3

4

Ps1

0

1

2

7

8

9

SIXEL Sixel Graphics: This sequence provides a group of 6 bit bytes to be used as vertical graphics data. A bit value of 1 means print a pixel, while a bit value of 0 means leave a blank. The Device Control String

(DCS) envelope contains the graphics introducer and all graphics data.

This envelope is initiated using the DCS control character and is terminated with the String Terminator (ST) control character. The Sixel protocol components are made up of the String Introducer, Protocol

Selector, Picture Data, and String Terminator. The Protocol Selector consists of a string of 0, 1 or more numeric parameters separated by the semicolon character (3BH).

The overall command format is the following:

DCS Ps1 ; Ps2 ; Ps3 … Psn q Sixel data ST

The Protocol Selector is that portion of the form:

Ps1 ; Ps2 ; Pn3 … Pn q.

Hex: 90 Ps1 3B Ps2 3B Pn3 … Pn q <sixel data> 9C

Ps1 selects the horizontal grid size and aspect ratio, this will implicitly define the vertical grid size. The following table defines the parameter selections.

Horizontal

DPI

100

100

200

200

100

100

67

67

50

50

Vertical

DPI

50

50

50

65

40

50

45

55

45

50

Aspect

Ratio

200:100

200:100

400:100

300:100

250:100

200:100

150:100

120:100

110:100

100:100

Ps2 is the background select parameter. It is not used by this printer.

Ps3 selects the horizontal grid size in decipoints. This parameter, used with the aspect ratio, defines grid size. The following table identifies the horizontal grid size used for each parameter value.

Ps3

0

1

2

3

4

5

8

9

6

7

10

11-19

Horizontal

DPI

No Change

240

240

240

180

140

120

120

90

90

70

60

Chapter 7. Dec LG/Compaq LG Plus Emulation

168

GEK-00029B

DECLLG Loading Logo Sequence: A graphic image is downloaded and stored in printer memory.

General Command Syntax

DCS P1 P2 & t record ST

P1 specifies the logo file format. (must be 0)

P1 = 0 LG-series printer logo file format.

P2 lists the logos to be deleted.

P2 = 0 Delete all logos.

P2 = n Delete any logo with the same Logo ID (n).

Record

The record includes the logo header and the graphic row records used to print the image.

ID Length = One digit number (1 through 4) that defines the length of the logo ID.

Logo ID = String of one to four numerals that identify the logo.

Comment Length = One digit number (0 through 7) that defines the length of the comment field.

Logo Length = A five digit number (00001 through 65535) that defines the length of the logo record.

Row Records = R;S;N1;N2;…\

R = Height of the segment in mils.

S = Row starting color. ( 0=white, 1=black)

N1: N2 = Length of segment in mils.

\ = Row terminator.

Indeterminate Conditions

Logos can be loaded at any time except during another download operation and during a form printing operation. When loaded, they are available until they are replaced, deleted, or the printer power is turned off.

The start row color, defined within the Row Record, will switch with each subsequent segment printed.

Decimal:

Hex:

BASIC:

144 P1 59 P2 38 116 record 156

90 P1H 3B P2H 26 74 record 9C

CHR$(144); P1 ;CHR$(59); P2 ;”&t”;” recor d”;CHR$(156);

NOTE

The logo length includes all characters other than C0 control characters (0 through 1F hex).

GEK-00029A

169

5000 Series Programmer’s Manual

DECAUPSS

DECBARC

Assign User Preference Supplemental Set: Assigns several of the

ISO and special character sets to the User Preference Supplemental

Set. The following table lists the UPS Character Sets.

General Command Syntax

DCS Ps ! u D … D ST

UPS Character Sets

Decimal:

Hex :

BASIC:

Character Set

DEC Supplemental

ISO Latin-1 Supplemental

ISO Latin-Hebrew Supplemental

DEC Technical

ISO Latin-Greek Supplemental

ISO Latin-9 Supplemental

Ps

0

1

1

0

1

1

D…D

%5

A

H

>

F b

144 Ps ! u D … D ST

90 Ps 21 75 D…D 9C

CHR$(144);Ps;”!u”;”D…D”;CHR$(156);

NOTE

If values for Ps and D…D are selected other than those in the table above, this command will be ignored.

Start Bar Coding: Generates bar codes using data that follows the sequence. Bar code parameters are defined by the last DECSBCA sequence. The printer continues to encode bar codes until it receives the Stop Bar Code sequence.

General Command Syntax

ESC % SP 0

Indeterminate Conditions

Bar codes that extend beyond the margins are truncated.

Decimal:

Hex:

BASIC:

27 37 32 48

1B 25 20 30

CHR$(27);”% 0“;

Chapter 7. Dec LG/Compaq LG Plus Emulation

170

GEK-00029B

DECTFM

GEK-00029A

Terminate Forms Sequence: Terminates the printing of a form.

General Command Syntax

ESC # SP 1”

Indeterminate Conditions

If no form is selected, this sequence is ignored. Many special conditions might affect the printer output see the note below for further information.

Decimal:

Hex:

BASIC:

27 19 32 49

1B 23 20 31

CHR$(27);”# 1”;

Notes

The following commands are not to be included in the form data or fill-in data:

▪ Load a form or logo

▪ Delete a form or logo

▪ Invoke a Digital sequence

▪ Invoke an ESC sequence. This will exit you from the Form Mode.

The following conditions will affect the output or performance:

▪ Encoded escape cannot start in the form and continue in the fillin data, nor can the reverse occur.

▪ Changes mode to the font, cursor position, density, or mode are not restored after you terminate a Form Sequence.

▪ Block characters used in a form must begin and end on the same page.

▪ Since mode settings, fonts, and spacing parameters can be changed between the time the form is loaded and the item is selected, the environment of the form (PUM or SSU) should be established in the form data.

▪ If ESC, CAN, or SUB is embedded in the form string, it will terminate form loading and the form will be discarded. Encoding

DCS, RIS, CAN, or SUB in a form string will also stop form loading.

▪ If the form length in the header does not agree with the length of the form string received, the form is discarded. If the form is not terminated by a Form Feed, and does not contain at least one form-switch character, a form-switch character and a Form Feed will be added at the end of the form.

▪ In general, the number of switch characters in the form data should be one more than the number of switch characters in the fill-in data.

When using bar codes, note the following:

▪ When using bar codes as part of the form data, make sure that the control character encoding character in the bar code differs from the control character encoding character in the Loading

Form sequence.

171

5000 Series Programmer’s Manual

▪ When using bar codes as part of the fill-in data, make sure that the control character encoding character of the bar code differs from the switch character in the Select Form sequence.

▪ Bar codes must start and end on the same page of a form.

Chapter 7. Dec LG/Compaq LG Plus Emulation

172

GEK-00029B

DECBLOCKC

SOCS (Epson)

S7C1R

Start Block Character Mode: Generates the block characters from the characters that follow the sequence.

General Command Syntax

ESC % SP 1

Indeterminate Conditions

The block characters inherit the last set of parameters defined. If no prior sequence exists, the block characters are printed with:

▪ 0 degree rotation

▪ The U.S. ASCII character set

▪ With a horizontal and vertical magnification factor of 2

▪ With a white background

Decimal:

Hex:

BASIC:

27 37 32 49

1B 25 20 31

CHR$(27);”% 1”;

Select Other Coding System: Selects the Epson FX emulation.

General Command Syntax

ESC % SP 2

Decimal:

Hex:

BASIC:

27 37 32 48

1B 25 20 32

CHR$(27);”% 2”;

Select 7-Bit Code: In a 7-bit environment, this sequence allows receipt of 7-bit control strings only.

General Command Syntax

ESC SP 6

Indeterminate Conditions

For all subsequent characters, the printer processes received 2character sequences as defined in the C0 control chart. If 8-bit C1 control characters are received, it drops the eighth bit and processes the character as a C0 character.

Decimal:

Hex:

BASIC:

27 32 54

1B 20 36

CHR$(27);” 6”;

GEK-00029A

173

5000 Series Programmer’s Manual

S8C1R

CUU

Select 8-Bit Code: In an 8-bit environment, this sequence allows receipt of 8-bit control strings.

General Command Syntax

ESC SP 7

Indeterminate Conditions

For all subsequent characters, the printer processes received 2character sequences as defined in the C0 control chart and 8-bit control characters as defined in the C1 control chart.

ROCS

Decimal:

Hex:

BASIC:

27 32 55

1B 20 37

CHR$(27);” 7”;

SOCS (Proprinter) Select Other Coding System: Selects the Proprinter emulation.

General Command Syntax

ESC % =

Decimal:

Hex:

BASIC:

27 37 61

1B 25 3D

CHR$(27);”%=”;

Stop Bar Coding (Return from Other Coding System): Stops bar code printing. Once bar coding is stopped, the font selection and associated attributes are restored to the conditions prevailing prior to bar code printing.

General Command Syntax

ESC % @

Decimal:

Hex:

BASIC:

27 37 64

1B 25 40

CHR$(27);”%@”;

Cursor Up: Causes the active print position to move to the corresponding column at the preceding vertical position set by the Pn value. Pn is the number of lines that the active line moves up at the current active column. Default value Pn = 1.

General Command Syntax

ESC [ Pn A

Indeterminate Conditions

If you try to move the active position above the top line, the active position stops at the top line.

Decimal:

Hex

BASIC:

:

27 91 Pn 65

1B 5B PnH 41

CHR$(27);”[“; Pn ;”A”;

Chapter 7. Dec LG/Compaq LG Plus Emulation

174

GEK-00029B

GSM

GSS

S7C1T

Graphic Size Modification: This sequence will change the height and/or width of graphic characters. The first and second parameters are the percentages by which the height and width respectively will be multiplied. The default value for both p1 and p2 is 100 percent.

General Command Syntax

ESC [ Pn1;Pn2 SP B

Decimal:

Hex

BASIC:

:

27 91 Pn1 59 Pn2 32 50

1B 5B Pn1 3B Pn2 20 42

CHR$(27);”[“; Pn1 ;”;”; Pn2 ;” B”;

NOTE

Pn1 is a decimal value that specifies the height of the font as a percentage of the height set by the GSS sequence. Pn2 is a decimal value that specifies the width as a percentage of the width set by the GSS sequence. Fonts can be modified by two or three times their default height and two times their default width.

Graphic Size Selection: Sets the height and width of all characters that start after the control sequence.

General Command Syntax

ESC [ Pn SP C

Decimal:

Hex:

BASIC:

27 91 Pn 32 77

1B 5B Pn 20 43

CHR$(27);”[“; Pn ;” C”;

NOTE

Pn is a decimal value that species the height of the font in units determined by the Select Size Unit (SUU) sequence. The width of the font is implicitly defined by the height. The default value for Pn is 100. The GSS sequence remains in effect until the printer receives another GSS sequence or a Graphic

Size Modification (GSM) sequence.

Select 7-Bit C1 Transmission: This sequence causes the printer to use 7-bit encoding for all C1 control characters transmitted. All C1 characters are then represented as two-character ESC sequences.

General Command Syntax

ESC SP F

Decimal:

Hex:

BASIC:

27 32 70

1B 20 46

CHR$(27);” F”;

GEK-00029A

175

5000 Series Programmer’s Manual

S8C1T

SPI

Select 8-Bit C1 Transmission: This sequence causes the printer to use 8-bit encoding for all C1 control characters transmitted. All C1 characters are then represented as one-character CSI sequences.

General Command Syntax

ESC SP G

Decimal:

Hex:

BASIC:

27 32 71

1B 20 47

CHR$(27);” G”;

Spacing Pitch Increment: This sequence will set the spacing between lines (p1) and the horizontal character pitch (p2). p1 and p2 are given in decipoints or pixels dependent on the units selected by the Select Size Unit (SSU) sequence.

General Command Syntax

ESC [ Pn1;Pn2 SP G

Indeterminate Conditions

A vertical spacing value, which exceeds the current form length, will be ignored. If the parameter value is omitted, the current setting will not be changed.

5000 Specific

The LPI parameter may range from 1 to 17280 decipoints (24 inches) but must be less than or equal to the printable area of the form. The printable area is defined as the area between the top and bottom margins. The range of values for CPI is dependent on the font selected. The actual achieved spacing, on the average, will match the requested spacing. Values outside of the permissible range for a font are ignored. An omitted or zero parameter leaves the current setting unchanged.

Decimal:

Hex:

BASIC:

27 91 Pn1 59 Pn2 32 71

1B 5B Pn1 3B Pn2 20 47

CHR$(27);”[“; Pn1 ;”;”; Pn2 ;” G”;

Chapter 7. Dec LG/Compaq LG Plus Emulation

176

GEK-00029B

SSU

SHS

SVS

GEK-00029A

Select Size Unit: When PUM is set, Select Size Unit selects either decipoints or pixels as the spacing unit, depending on the parameter settings defined below.

If the printer receives an SSU while PUM is reset, the selected unit will take effect when PUM is set and will then remain in effect until the printer receives another SSU or a reset sequence. Default value at power-up or reset is decipoints. The printer will ignore all Ps values other than 2 or 7.

General Command Syntax

ESC [ Ps SP I

Decimal:

Hex:

BASIC:

27 91 Ps 32 73

1B 5B Ps 20 49

CHR$(27);”[“; Ps ;” I”;

Ps Spacing Unit

2 Decipoint (1/720 inch)

7 Pixel (1/600 inch)

Select Horizontal Spacing: Ps selects the horizontal pitch.

General Command Syntax

ESC [ Ps SP K

Ps Horizontal Pitch

0

1

2

3

10 characters per inch

12 characters per inch

15 characters per inch

6 characters per inch

Decimal:

Hex:

BASIC:

27 91

1B 5B

Ps

Ps

32 75

20 4B

CHR$(27);”[“; Ps ;” K”;

Select Vertical Spacing: Ps selects the vertical spacing between lines that is used by all fonts.

General Command Syntax

ESC [ Ps SP L

Ps Vertical Pitch

0 6 lines per inch

1 4 lines per inch

2 3 lines per inch

3 12 lines per inch

4 8 lines per inch

5 5 lines per 30 inches

9 2 lines per inch

1 10 lines per inch

Decimal:

Hex:

BASIC:

27 91 Ps 32 76

1B 5B Ps 20 4C

CHR$(27);”[“; Ps ;” L”;

177

5000 Series Programmer’s Manual

HPA

HPR

Horizontal Position Absolute: The active print position will be moved to the location specified by p1.

General Command Syntax

ESC [ Pn `

Indeterminate Conditions

If the new horizontal position is greater than the carriage width, then the horizontal position of the control sequence will be ignored and the current horizontal position will not change. If the parameter is omitted or zero, left edge will be assumed.

Decimal:

Hex:

BASIC:

27 91 Pn 96

1B 5B Pn 60

CHR$(27);”[“; Pn ;”`”;

NOTE

If the new position exceeds the right margin but is less than the physical width, move to the right margin.

Horizontal Position Relative: This sequence will move the active print position to the right, relative to the current position. Parameter p1 specifies the number of units to move. HPR cannot be used to move beyond the right margin.

General Command Syntax

ESC [ Pn a

Indeterminate Conditions

Parameters greater than the physical print width will cause a default to the right margin, unless the "auto-wrap" printer control switch is set. If set, the active print position will move to the left margin. If the parameter is omitted or zero, one decipoints will be assumed.

Decimal:

Hex:

BASIC:

27 91 Pn 73

1B 5B Pn 61

CHR$(27);”[“;Pn;”a”;

Chapter 7. Dec LG/Compaq LG Plus Emulation

178

GEK-00029B

RIS Reset to Initial State: Resets the value or state of several operating features. This sequence resets the printer to a set of operating values and conditions similar to the factory default settings (see table below).

General Command Syntax

ESC c

Decimal:

Hex :

BASIC:

27 75

1B 63

CHR$(27);”c”;

NOTE

This sequence and the DECSTR reset sequence have the same function.

Selectable Parameter

Printing Status

Horizontal Pitch

Vertical Pitch

Font

Forms Length

Active position

Top Margin

Bottom Margin

Left Margin

Right Margin

Underlining

Bolding

Italics

Double Underline

Overline

Expansion

GL Character Set

GR Character Set

G0

G1

G2

G3

Autowrap

Line Feed/New Line

Mode

Horizontal Tabs

Unsolicited Reports

Super/Subscripts

Carriage Return/New line

Vertical Tabs

Reset Condition

On-line

10 characters per inch

6 lines per inch

Data Processing

66 lines (11 inches)

Column 1 on the current line

Line 1

Line 66

Column 1

Column 136

Disabled

Disabled

Disabled

Disabled

Disabled

No character expansion

US ASCII

Digital Supplemental

US ASCII

VT100 Graphic Character Set

Digital Supplemental

US ASCII

Disabled

Reset

Every 8 columns (9,17 …)

Disabled

Disabled

Reset

Every line (1-66)

GEK-00029A

179

5000 Series Programmer’s Manual

DA

VPA

VPR

Product Identification: Shows the product identification. When the host sends a device attributes sequence, the printer responds with a sequence that identifies the printer. The response is ESC[?45c.

General Command Syntax

ESC [ c or ESC [ 0 c

Decimal:

Hex:

BASIC:

27 59 75 or 27 59 48 75

1B 5B 63 or 1B 5B 30 63

CHR$(27);”[0c”;

Vertical Position Absolute: The current vertical position will be set to the value specified. The horizontal position will not change. VPA may be used to print within the top and bottom margins.

General Command Syntax

ESC [ Pn d

Indeterminate Conditions

If the new vertical position is greater than the forms length, then the sequence will be ignored. If p1 is omitted or zero, Pn is interpreted as the default value of 1.

Decimal:

Hex

BASIC:

:

27 59 Pn 76

1B 5B Pn 64

CHR$(27);”[“; Pn ;”d”;

Vertical Position Relative: The current vertical position will be advanced by the distance specified by the command parameter. If the move would be beyond the bottom line, the active position stops at the bottom line.

General Command Syntax

ESC [ Pn e

Indeterminate Conditions

If the parameter is omitted or zero, Pn is interpreted as the default value of 1.

Decimal:

Hex:

BASIC:

27 59 Pn 77

1B 5B Pn 65

CHR$(27);”[“;Pn;”e”;

Chapter 7. Dec LG/Compaq LG Plus Emulation

180

GEK-00029B

PUM

LNM

TBC

SM

GEK-00029A

Tab Clear: This sequence will clear horizontal or vertical tab (or tabs) based on the parameter. If no parameter is present, the default will be to clear the horizontal tab at the current position, if one exists.

The valid parameters are as follows:

General Command Syntax

ESC [ Ps g

Ps Tab Clear Action

0 Clear horizontal tab at current position (Default)

1 Clear vertical tab at current position

2 or 3 Clear all horizontal tabs

4 Clear all vertical tabs

Indeterminate conditions

Other Values are reserved.

Decimal:

Hex

BASIC:

:

27 91 Ps 79

1B 5B Ps 67

CHR$(27);"["; Ps ;"g";

Set Mode: This sequence will set the mode(s) indicated by one or more parameters. Parameter values are either ANSI or Digital private. Digital private parameters are preceded by the question mark character.

ANSI Defined Parameter Values

Ps

11

20

PUM

LNM

Mode Mnemonic Mode Function

Position Unit Mode

Linefeed New Line Mode

DEC Private Parameter Values

Ps

?7

Mode Mnemonic

DECAWM

?29

DECPSM

?40

DECCRNLM

Mode

Mode Function

Autowrap Mode

Pitch Select Mode

Carriage Return/New Line

The meanings for these follows:

Position Unit Mode: Selects a unit of measurement used with the escape sequences that control spacing parameters. When Position

Unit Mode is enabled, it selects either decipoints or pixels, depending on the setting of the Select Size Unit sequence. When Position Unit

Mode is disabled, it selects a spacing unit equal to one character position. The power-up default is PUM reset.

Linefeed New Line Mode: In the set state, LNM will cause a received linefeed character to imply a new line, or carriage return. In the reset state, a linefeed will provide vertical motion only, with no change in the print position. The Default State of LNM is established by menu selection.

181

5000 Series Programmer’s Manual

DECAWM

DECPSM

DECCRNLM

VFU

Bits

Values

Bits

Values

7

Not

Used

Autowrap Mode: Determines what happens when text exceeds the right margin. When autowrap is enabled and text exceeds the right margin, the active print position moves to the left margin on the next line. When autowrap is disabled and text exceeds the right margin, data will be lost.

Pitch Select Mode: Controls the Set Horizontal Pitch (DECSHORP) sequence. When Pitch Select Mode is enabled, the current font determines the pitch. When disabled, the printer uses the horizontal pitch selected by the DECSHORP sequence.

Carriage Return / New Line Mode: Defines the response to the

Carriage Return character. When Carriage Return New Line Mode is enabled, a received Carriage Return will return the active position to the left margin on the next line. When disabled, a Carriage Return will return the active position to the left margin on the current line.

Load Vertical Format Unit: This sequence will download the VFU from the host. All data following this load sequence is placed into the

VFU memory until terminated with the End Load sequence. Any command entered during the load is ignored except the End Load sequence. All data must be in the VFU load format. If an error is detected during the load, the load is aborted. If a load exceeds the form length, the load is aborted. Cancelled loads default to the current form length setting.

General Command Syntax

ESC [ < 1 h

The VFU load format consists of two bytes for each line on the page.

First Byte

6

Always

1

5

Channel

6

4

Channel

5

3

Channel

4

2

Channel

3

1

Channel

2

0

Channel

1

7

Not

Used

6

Always

1

5

Channel

12

Second byte

4

Channel

11

3

Channel

10

2

Channel

9

Channel 1: Identifies the Top Of Form.

Channel 12 Identifies the Bottom Of Form.

Decimal:

Hex:

BASIC:

27 91 60 49 80

1B 5B 3C 31 68

CHR$(27);"[<1h";

1

Channel

8

0

Channel

7

Chapter 7. Dec LG/Compaq LG Plus Emulation

182

GEK-00029B

VFU

VFU

End Load Vertical Format Unit (End Load): This sequence will end the Vertical Format Unit load.

General Command Syntax

ESC [ < 1 l <- Note lower case L as the last character.

Decimal:

Hex:

BASIC:

27 59 60 49 84

1B 5B 3C 31 6C

CHR$(27);"[<1l";

Channel Command: This sequence will control paper motion. P1 consists of three digits nnn. When the first n equals 9, reverse paper motion occurs. If the first n equals any value other than 0 or 9, the entire sequence is ignored.

General Command Syntax

ESC [ P1 & Y

The table of values of nnn follows:

P1 nnn

000

001

002

003

004

005

006

007

008

009

010

011

Move Forward to

Channel

1

4

5

6

2

3

7

8

9

10

11

12

P1 nnn

900

901

902

903

904

905

906

907

908

909

910

911

Move Backward to

Channel

1

5

6

7

2

3

4

8

9

10

11

12

Decimal:

Hex :

BASIC:

27 59 P1 38 121

1B 5B P1 26 79

CHR$(27);"["; P1 ;"&Y";

Notes

Selecting any other channel than those defined in the above table will result in default to channel 12 (BOF).

If a channel is not defined and channel 12 is undefined, the move will be to the next line.

If the VFU table is not loaded and channel commands are sent to it, a line feed occurs.

GEK-00029A

183

5000 Series Programmer’s Manual

HPB

VPB

RM

Horizontal Position Backward: The current horizontal position will be changed, moving the active position in the backward direction by the specified amount. The movement is not permitted to cross the left margin of the current form.

General Command Syntax

ESC [ Pn j

Indeterminate Conditions

If the parameter is omitted, or zero, Pn is interpreted as the default value of 1.

If a parameter should request a positioning change into the left margin region, the current position will be set to the left margin.

Decimal:

Hex:

BASIC:

27 71 Pn 82

1B 5B Pn 6A

CHR$(27);"[";Pn;"j";

Vertical Position Backward: The current vertical position will be changed, moving the active position in the reverse direction by the specified amount. The movement is not permitted to cross the top margin of the current form.

General Command Syntax

ESC [ Pn k

Indeterminate Conditions

If the parameter is omitted, Pn is interpreted as the default value of

1.

If a parameter should request a positioning change into the top margin region, the current position will be set to the top margin.

Decimal:

Hex

BASIC:

:

27 71 Pn 83

1B 5B Pn 6B

CHR$(27);"["; Pn ;"k";

Reset Mode: Resets the mode indicated by one or more parameters.

The parameters and meanings are the same as used by SM (Set

Mode).

General Command Syntax

ESC [ Ps l <- last character is a lower case L

Decimal:

Hex

BASIC:

:

27 71 Ps 85

1B 5B Ps 6C

CHR$(27);"["; Ps ;"l"

Chapter 7. Dec LG/Compaq LG Plus Emulation

184

GEK-00029B

DSR Device Status Requests: The host sends the Device Status Request listed below to request a printer status report.

General Command Syntax

ESC [ Ps n

Decimal:

Hex

BASIC:

:

27 71 Ps 86

1B 5B Ps 6E

CHR$(27);"[";Ps;"n";

DSR Sequences to Request Status

Request Sequence

<ESC>[0n or <ESC>[5n

<ESC>[6n

<ESC>[?2n

<ESC>[?3n

Printer Response

Sends an extended status report

Sends a cursor position report

The host sends the Device Status Request listed below to enable or disable unsolicited status reports.

DSR Sequences to Enable or Disable Unsolicited Reports

Request Sequence

<ESC>[?1n

Printer Response

Disables all unsolicited reports

Enable brief unsolicited status reports and sends an extended status report.

Enable extended, unsolicited status reports and sends an extended status report.

Responses: Cursor Position Report

<ESC>[Pn1;Pn2R

Pn1 is the active line

Pn2 is the active column

Brief Unsolicited Messages Enabled

<ESC>[Pn1n

Pn1 = 0 After an error condition has been corrected or no error exists.

Pn1 = 3 If an error is detected.

Extended Unsolicited Messages Enabled

<ESC>[?20n

<ESC>[?Pn1;Pn2n following table)

No error exists.

A error is detected. (See

GEK-00029A

185

5000 Series Programmer’s Manual

Printer Status Error Codes

Pn1 Fault

Code

27

25

26

38

36

26

Pn2 Fault

Code

206

0

0

229

220

212

Printer Fault

Paper Out

Paper Jam

Cover Open

Ribbon Jam

Striker Bar Open

All Others

Notes

This option will work only if the printer’s serial interface is active, and the RTS option on the host is set to true.

The units reported by the Cursor Position Report can be character positions, decipoints, or pixels dependent on the settings of PUM and

SSU.

Emulation strap S1 enable/disables unsolicited error reports.

Emulation strap S2 selects brief or extended status reports.

Chapter 7. Dec LG/Compaq LG Plus Emulation

186

GEK-00029B

DECSTR Soft Terminal Reset: Resets the value or state of several operating features. After receiving a DECSTR, the printer positions itself at the next Top Of Form then resets the value or state of several operating features.

General Command Syntax

ESC [ ! p

Decimal:

Hex:

BASIC:

27 71 17 84

1B 5B 21 70

CHR$(27);"[";"!p";

NOTE

This sequence and the RIS reset sequence have the same function.

Selectable Parameter

Printing Status

Horizontal Pitch

Vertical Pitch

Font

Forms Length

Active position

Top Margin

Bottom Margin

Left Margin

Right Margin

Underlining

Bolding

Italics

Double Underline

Overline

Expansion

GL Character Set

GR Character Set

G0

G1

G2

G3

Autowrap

Line Feed/New Line Mode

Horizontal Tabs

Unsolicited Reports

Super/Subscripts

Carriage Return/New line

Vertical Tabs

Reset Condition

On-line

10 characters per inch

6 lines per inch

Data Processing

66 lines (11 inches)

Column 1 on the current line

Line 1

Line 66

Column 1

Column 136

Disabled

Disabled

Disabled

Disabled

Disabled

No character expansion

US ASCII

Digital Supplemental

US ASCII

VT100 Graphic Character Set

Digital Supplemental

US ASCII

Disabled

Reset

Every 8 columns (9,17 …)

Disabled

Disabled

Reset

Every line (1-66)

GEK-00029A

187

5000 Series Programmer’s Manual

DECSBCA Select Bar Code Attributes: This sequence will select a bar code type and orientation.

General Command Syntax

ESC [ P1;P2;P2; ... ;P9 s

P1: Bar Code Style

The allowed values for P1 are shown in the following table.

P1

0/missing

1

2

3

4

8

9

10

5

6

7

11

12

13

14

15

Bar Code Style

Code 3 of 9 (default)

Interleave 2 of 5

Code 3 of 9

Extended Code 3 of 9 (not implemented)

EAN-8

EAN-13

Code 11

Codabar (a/t)

Codabar (b/n)

Codabar (c/*)

Codabar (d/e)

UPC-A

UPC-E

Postnet

Code 128

Code 128-UCC

P2: Width for Narrow Bars and Spaces

Sets width for the narrow bars and spaces in units specified by SSU.

Default = 10 pixels = 12 decipoints

P3: Width for Quiet Zone

Not implemented.

P4: Width for Wide Bars and Spaces

Sets width for the wide bars and spaces in units specified by SSU.

Default = 30 pixels = 36 decipoints

P5: Intercharacter Gap

Sets the intercharacter gap in units specified by SSU.

Default = 10 pixels = 12 decipoints

P6: Bar code Height

Bar code height in 1/12 th -inch increments

1 minimum bar code height = 1/12 inch)

120 maximum bar code height = 10 inches

9 default bar code height = 0.75 inch

P7: Encoding Character

Not implemented.

Chapter 7. Dec LG/Compaq LG Plus Emulation

188

GEK-00029B

DECSTBM

P8: Bar code Rotation

2

3

0

1

4 no rotation (default) no rotation

270 degrees rotation

90 degrees rotation

180 degrees rotation

P9: Human Readable Input (HRI) Font

0

1

2

No human readable characters printed;

No human readable characters printed;

Special bar code HRI font;

Decimal:

Hex:

BASIC:

27 71 P1 ; P2 ; ... ; P9 ' q

1B 5B P1 3B P2 3B … P9 27 71

CHR$(27);"[";P1;";";P2;";"; ... ;P9;"'q";

Set Top and Bottom Margins: Sets the top and bottom margins, and the page home line. Pn1 sets the top margin and the page home line.

Pn2 sets the bottom margin. The top margin defines the first printable line on a page. The bottom margin defines the last printable line. The page home line is the position of the first printable line on the page after a form feed.

General Command Syntax

ESC [ Pn1 ; Pn2 r

Decimal:

Hex :

BASIC:

27 71 Pn1 ; Pn2 86

1B 5B Pn1 3B Pn2 72

CHR$(27);"[";Pn1;";";Pn2;"r";

Indeterminate Conditions

If Pn1 is 0 or omitted, the top margin is unchanged.

If Pn2 is 0 or omitted, the bottom margin is unchanged.

If Pn2 is greater than the form length, the bottom margin is set at the bottom of form.

If the active position is less than the new top margin, the active position is set to the new top margin. If the active line is greater than the new bottom margin, the next printable character causes a form feed.

If the sequence sets the top margin below the bottom margin, the command is ignored.

If the form length is changed, the printer sets the top margin to line 1 and the bottom margin to the form length.

GEK-00029A

189

5000 Series Programmer’s Manual

DECSLRM

DECSLPP

Set Left and Right Margins: Sets the left and right margins. Pn1 sets the left margin and the line home position. Pn2 sets the right margin. If the first parameter is greater than the second parameter, the sequence will be ignored. The unit of measurement can be character cells, decipoints, or pixels. The maximum allowable value of the Pn1 parameter is always one less than the Pn2 parameter.

The left margin defines the first printable position on a line. The right margin defines the last printable position on a line.

General Command Syntax

ESC [ Pn1 ; Pn2 s

Indeterminate Conditions

If Pn1 is 0 or omitted, the left margin is unchanged.

If Pn2 is 0 or omitted, the right margin is unchanged.

If Pn2 is greater then the printable width, the right margin is set to the right limit.

If the sequence sets the left margin to the right of the right margin, the command is ignored.

If the active position is less than the new left margin, the active position is set to the left margin.

Decimal:

Hex

BASIC:

:

27 71 Pn1 59 Pn2 115

1B 5B Pn1 3B Pn2 73

CHR$(27);"["; Pn1 ;";"; Pn2 ;"s";

Set Lines per Physical Page: Defines form length. DECSLPP sets the top margin to 1 and the bottom margin to the form length. Pn sets the form length in the units defined by the PUM and SSU sequences.

General Command Syntax

ESC [ Pn t

Indeterminate Conditions

If Pn1 is 0 or omitted, the form length is set to 11 inches.

Decimal:

Hex

BASIC:

:

27 71 Pn 88

1B 5B Pn 74

CHR$(27);"["; Pn ;"t";

Chapter 7. Dec LG/Compaq LG Plus Emulation

190

GEK-00029B

DECSHTS

DECSVTS

Set Horizontal Tab Stops: This sequence will set multiple horizontal tab stops. DECSHTS allows up to 16 tab stops to be set at once. Up to 32 horizontal tabs can be stored. If more than 32 tabs are specified by the escape sequence, the leftmost 32 will be retained. The Pn values can be in any order in the escape sequence. The value units are in decipoints, pixels, or character cells depending on the selection of PUM and SSU.

General Command Syntax

ESC [ P1 ; P2 ; ... ; P32 u

Decimal:

Hex:

BASIC:

27 71 Pn1 ; Pn2 ; ... ; Pn16 u

1B 5B Pn1 3B … Pn16 75

CHR$(27);"["; Pn1 ;";"; Pn2 ;";"; ... ; Pn16 ;"u";

NOTE

The tabs are set and sorted into the current settings. If the current settings are 1", 2", and 3", a command to set a tab at

1.5" would now have four tab sets.

Set Vertical Tab Stops: This sequence will set multiple vertical tab stops. DECSVTS allows up to 16 tab stops to be set at once. Up to

67 vertical tabs can be stored. The default is set to stop at every line.

The Pn values can be in any order in the escape sequence. The value units are in decipoints, pixels, or lines depending on the selection of

PUM and SSU.

General Command Syntax

ESC [ Pn1 ; Pn2 ; ... ; Pn16 v

Decimal:

Hex

BASIC:

:

27 71 Pn1 ; Pn2 ; ... ; Pn16 v

1B 5B Pn1 3B … Pn16 76

CHR$(27);"["; Pn1 ;";"; Pn2 ;";"; ... ; Pn16 ;"v";

NOTE

The tabs are set and sorted into the current settings. If the current settings are 1", 2", and 3", a command to set a tab at

1.5" would now have four tab sets.

GEK-00029A

191

5000 Series Programmer’s Manual

DECSHORP

DECVERP

Set Horizontal Pitch: This sequence will set the number of characters printed per horizontal inch on a line. In addition to changing character size, this sequence will reset the left and right margins and will retain the current horizontal tab settings. Ps selects the horizontal pitch as defined in the following chart.

General Command Syntax

ESC [ Ps w

Select Horizontal Pitch

5

6

7

8

9

2

3

4

Ps Horizontal Pitch

0

1

10 characters per inch

10 characters per inch

12 characters per inch

13.3 characters per inch

16.7 characters per inch

5 characters per inch

6 characters per inch

6.6 characters per inch

8.25 characters per inch

15 characters per inch

Decimal:

Hex :

BASIC:

27 71 Ps 91

1B 5B Ps 77

CHR$(27);”[“; Ps ;”w”;

Set Vertical Pitch: This sequence will set the number of lines per inch on the page. Ps selects the vertical pitch as defined in the following chart.

General Command Syntax

ESC [ Ps z

Select Vertical Pitch

Ps

0

1

Vertical Pitch

6 lines per inch

6 lines per inch

4

5

6

2

3

8 lines per inch

12 lines per inch

2 lines per inch

3 lines per inch

4 lines per inch

10 6 lines per inch

11 6 lines per inch

Indeterminate Conditions

No parameter will result in a default of 6 LPI. Values not listed are ignored.

Decimal:

Hex:

BASIC:

27 71 Ps 94

1B 5B Ps 7A

CHR$(27);”[“; Ps ;”z”;

Chapter 7. Dec LG/Compaq LG Plus Emulation

192

GEK-00029B

DECSGD Set Graphics Density: DECSGD sets the density for graphics. Psh designates the horizontal dot density and Psv designates the vertical dot density.

General Command Syntax

ESC [ Psh ; Psv & {

Decimal:

Hex

Psh

5

6

3

4

0

1

2

7

8

9

10

11

12

BASIC:

:

Horizontal

Density

No change

50 Dots per Inch

60 Dots per Inch

70 Dots per Inch

80 Dots per Inch

90 Dots per Inch

100 Dots per

Inch

110 Dots per

Inch

120 Dots per

Inch

130 Dots per

Inch

140 Dots per

Inch

150 Dots per

Inch

200 Dots per

Inch

7

8

9

10

11

27 71 Psh 59 Psv 38 95

1B 5B Psh 3B Psv 26 7B

CHR$(27);”[“;Psh;”;”;Psv;”&{“;

Psv

5

6

3

4

0

1

2

Vertical Density

No change

30 Dots per Inch

40 Dots per Inch

50 Dots per Inch

60 Dots per Inch

66 Dots per Inch

75 Dots per Inch

86 Dots per Inch

100 Dots per

Inch

120 Dots per

Inch

150 Dots per

Inch

200 Dots per

Inch

GEK-00029A

193

5000 Series Programmer’s Manual

DECVEC Drawing Vectors: This sequence draws horizontal or vertical lines with length and width. Margins do not affect line drawing so you can draw lines to the physical limits of the page. Use the following Pn parameters to select the length, width, and direction of the line. An incorrect Pn value will cancel the entire sequence.

General Command Syntax

ESC [ Pn1 ; Pn2 ; … ; Pn5 ; ! |

P1: Define Line

0 = Draw a horizontal line to the right.

1 = Draw a vertical line down.

P2: Select the X Start Position

This parameter selects the horizontal start position on the page in decipoints.

P3: Select the Y Start Position

This parameter selects the vertical start position on the page in decipoints.

P4: Select the Line Length

Select the line length in the X direction for an X line. For a Y line, it specifies the Y direction length. A 0 value defaults to 1 decipoint.

P5: Select the Line Width

Select the line width for both X and Y lines. A 0 value defaults to 1 decipoint.

Decimal:

Hex

BASIC:

:

27 71 Pn1 59 Pn2 59 … 59 Pn5 59 33 96

1B 5B Pn1 3B Pn2 3B … 3B Pn5 3B 21 7C

CHR$(27);”[“; Pn1 ;”;”; Pn2 ;”;”; … ; Pn5 ;”;”;”!|”;

Chapter 7. Dec LG/Compaq LG Plus Emulation

194

GEK-00029B

CHAPTER 8. PPL3 PLUS EMULATION

INTRODUCTION

General Considerations

This chapter describes the GENICOM 5000 implementation of the

DEC PPL3 printer protocol. The focus is on the following:

▪ Control Codes

▪ Special Characters

▪ Commands

▪ Page Coordinate System

▪ Sixel Graphics

While PPL3 emulation is backward compatible with PPL1 and PPL2 commands, it is not recommended that the user mix commands from different levels of the PPL emulation.

Coded Characters

Character processing within the PPL3 emulation is broken down into several categories of characters.

▪ C0 Control Set: 00H-1FH (0-31 decimal).

▪ GL Graphics Characters: 94 graphic characters in the range of

21H-7EH (33-126 decimal) referred to as the left-hand graphics set.

▪ C1 Control Set: 80H-9FH (128-159 decimal).

▪ GR Graphics Characters: 94 graphic characters in the range of

10H-FEH referred to as the right-hand graphics set.

▪ Special Characters: This are outside of the other ranges described and consist of the characters represented by the hexadecimal values 20, 7F, A0, and FF.

GEK-00029B

195

5000 Series Programmer’s Manual

7-Bit Versus 8-Bit Environments

In some environments, only 7 bits are used to encode characters. In these environments, the standard 7-bit character set applies. This set includes only the C0 and GL character sets and the special characters represented by hexadecimal values 20 and 7F.

7-Bit Character Set (8-Bit Left Half)

Chapter 8. PPL3 Plus Emulation

196

GEK-00029B

In an 8-bit environment, the low order 7 bits determine whether a character is printable or is a control character. The standard 8-bit code table consists of the entries above as well as the 8-bit right-half table that follows.

Standard 8-Bit Code Table (Right Half)

GEK-00029B

197

5000 Series Programmer’s Manual

Printable Characters

The GL characters in a 7-bit environment and GL and GR in an 8-bit environment are interpreted as printable if they are not embedded in a control function. It takes selection of both a font and a graphic character set to specify a character to be printed. The font is made up of a type style, a size, and a design (regular, bold, italics).

Choosing a graphics character set involves the following steps:

▪ Designate the graphics character set as one of the logical sets G0,

G1, G2, or G3.

▪ Assign (map) one of the sets above into the graphic left (GL) or graphics right (GR) logical set.

Designating and Invoking Character Sets

Chapter 8. PPL3 Plus Emulation

198

GEK-00029B

CONTROL CODES

Introduction

Generally, control codes are not printed and cause the printer to perform a control function. Within PPL III, there is an exception when

Control Representation Mode (CRM) is set.

C0 Control Characters

BEL

BS

CAN

CR

ESC

FF

C0 control characters are in the range of 00H to 1FH. With the exception of Escape (ESC), Cancel (CAN), and Substitute (SUB), C0 control characters do not affect escape sequences, control sequences, or control strings.

Only the control characters listed below are implemented. All others are ignored.

Bell (07H): BEL causes the printer to sound a bell or buzzer.

Backspace (08H): BS moves the active horizontal position back one

Horizontal Advance Increment (HAI). See the section later in this chapter on the Page Coordinate System. BS is active within the page boundaries, i.e., there is no effect if the current Active Position is outside of the left or right margin settings.

Cancel (18H): CAN is ignored unless received in an escape sequence, control sequence, or control string. In these instances, CAN causes the sequence or string being processed to abort.

Carriage Return (0DH): CR sets the active horizontal position to the

Line Home Position, even when the active horizontal position is to the left of the Line Home Position. If Carriage Return/New Line Mode

(DECCRNLM) is set, the printer also moves down one Vertical

Advance Increment (VAI). If PLD or subscript counts are nonnegative, then a CR executed beyond the bottom margin causes a form feed.

See the section later in this chapter on the Page Coordinate System.

Escape (1BH): ESC introduces an escape sequence. An ESC control character received in an escape sequence, control sequence, or control string aborts that sequence and begins a new escape sequence.

Form Feed (0CH): FF indicates the end of the current page and the beginning of a new page. Subsequent output will appear on the new page. FF sets the active vertical position to the Page Home Line. FF does not modify the active horizontal position. See the section on the

Page Coordinate System for further information on the interaction with coordinate system bounds.

GEK-00029B

199

5000 Series Programmer’s Manual

HT

LF

SI

SO

SUB

VT

Horizontal Tab (09H): HT moves the active position to the next horizontal tab stop on the same line. If no tab stop exists to the right of the active horizontal and within the right margin, HT moves to the right margin and sets the Right Margin Flag.

If no tabs are set and bar code is not active, HT moves the active horizontal position to the right margin.

Line Feed (0AH): LF moves the active vertical position down one

Vertical Advance Increment (VAI). If Line Feed/New Line Mode (LNM) is set, the active horizontal position moves to the Line Home Position.

See the section on the Page Coordinate System later in this chapter.

Shift In (0FH): SI, also named Locking Shift Zero (LS0), maps character set G0 as the GL character set.

Shift Out (0EH): SO, also named Locking Shift One (LS1), maps character set G1 as the GL character set.

Substitute (1AH): This sequence aborts the sequence in progress.

SUB in a control string generally aborts the string in progress. (Need a reference to a local equivalent of table 2-2 in the spec.)

SUB in printable text causes the error character to be printed. The error character is taken from the GL font. The error character for most fonts is a distinctive reverse question mark. In some instances a normal ? character is printed.

Vertical Tab (0BH): VT moves the active position to the next vertical tab stop on the current page. If no tab exists between the active position and the bottom margin, VT moves the active position to the bottom margin. Be aware that this command interacts with coordinate system bounds. If no vertical tabs have been set, then VT moves the active position to the bottom margin.

Chapter 8. PPL3 Plus Emulation

200

GEK-00029B

C1 Control Characters

CSI

DCS

EPA

ESA

All C1 control characters abort any escape sequence, control sequence, or control string in progress. See the section on Special

Parsing Requirements earlier in the chapter.

C1 control characters can be represented by a 7-bit equivalent escape sequence. See the following table.

8-Bit

Column/Row

8/0

8/1

8/2

8/3

8/4

8/5

8/6

8/7

8/8

8/9

8/10

8/11

8/12

8/13

8/14

8/15

9/0

9/1

9/2

9/3

9/4

9/5

9/6

9/7

9/8

9/9

9/10

9/11

9/12

9/13

9/14

9/15

SS2

SS3

DCS

PU1

PU2

STS

CCH

MW

SPA

EPA

Reserved

Reserved

Reserved

CSI

ST

OSC

PM

APC

Mnemonic

Reserved

Reserved

Reserved

Reserved

IND

NEL

SSA

ESA

HTS

HTJ

VTS

PLD

PLU

RI

ESC N

ESC O

ESC P

ESC Q

ESC R

ESC S

ESC T

ESC U

ESC V

ESC W

ESC X

ESC Y

ESC Z

ESC [

ESC \

ESC ]

ESC ^

ESC _

7-Bit Equivalent Sequence

ESC @ 1B 40

ESC A

ESC B

ESC C

ESC D

1B 41

1B 42

1B 43

1B 44

ESC E

ESC F

ESC G

ESC H

ESC I

ESC J

ESC K

ESC L

ESC M

1B 45

1B 47

1B 47

1B 48

1B 49

1B 4A

1B 4B

1B 4C

1B 4D

1B 4E

1B 4F

1B 50

1B 51

1B 52

1B 53

1B 54

1B 55

1B 56

1B 57

1B 58

1B 59

1B 5A

1B 5B

1B 5C

1B 5D

1B 5E

1B 5F

Control Sequence Introducer (CSI): CSI introduces a control sequence. A CSI control character received in an escape sequence, control sequence, or control string aborts that sequence and begins a new control sequence. For those familiar with escape sequence programming, CSI is the ESC [ sequence.

Printer Control String (90H): DCS introduces a printer control string. A DCS control character received in an escape sequence, control sequence, or control string aborts that sequence and begins a new printer control string.

End of Protected Area (97H): EPA aborts any escape sequence, control sequence, or control string in progress. It is ignored otherwise.

End of Selected Area (87H): ESA aborts any escape sequence, control sequence, or control string in progress. It is ignored otherwise.

GEK-00029B

201

5000 Series Programmer’s Manual

IND

NEL

PLD

PLU

RI

SS2

SS3

ST

VTS

HTS

RESERVED

Horizontal Tab Set (88H): HTS sets a horizontal tab stop at the active horizontal position. No change occurs if the active horizontal position is in the tab table. If the table is full, the highest tab stop is lost. When the new tab would be the highest and the table is already full, the new tab is lost.

Index (84H): IND moves the active vertical position down one Vertical

Advance Increment. It behaves the same as Line Feed. See the section later in the chapter on the Page Coordinate System.

Next Line (85H): NEL sets the active horizontal position to the Line

Home Position and moves the active vertical position down one

Vertical Advance Increment. See Page Coordinate System later in the chapter.

Partial Line Down (8BH): PLD moved the active vertical position downward by the Subscript Vertical Distance. This is discussed further in the section on Page Coordinate System later in the chapter.

Partial Line Up (8CH): PLU moves the active vertical position upward by the Superscript Vertical Distance. This is discussed further in the section on Page Coordinate System later in the chapter.

Reverse Index (8DH): RI moves the active vertical position up one

Vertical Advance Increment (VAI). The maximum allowable movement is to the top margin. This is discussed further in the section on Page

Coordinate System later in the chapter.

Single Shift 2 (8EH): SS2 temporarily maps character set G2 into GL to print one character.

Single Shift 3 (8FH): SS3 temporarily maps character set G3 into GL to print one character.

String Terminator (9CH): ST indicates the end of a control string.

Vertical Tab Set (8AH): VTS sets a vertical tab stop. If the First

Character Flag is set, the tab stop is set at the active vertical position. If the First Character Flag is not set, VTS sets the active vertical position minus the Above Baseline Offset. No change occurs if that position is already a vertical tab stop.

If the vertical tab table is full and the new tab position is less than the highest entry in the table, the new tab stop is inserted and the highest entry is lost. If the new tab stop would be the highest, then the new tab stop is lost.

The hex values 80H to 83H and 98H through 9AH are reserved for future use. If encountered they abort any escape sequence, control sequence, or control string in progress. They are ignored otherwise.

Chapter 8. PPL3 Plus Emulation

202

GEK-00029B

SPECIAL CHARACTER PROCESSING

As mentioned in the introduction, four characters are considered special characters. The processing for these characters is described below.

Hex 20

If a 94-character graphic character set has been mapped into the GL region, 20H always prints as a space character (SP). The justification feature can modify how space characters are treated (See the JFY command).

If a 96-character graphic character set has been mapped into the GL region, then 20H causes the specified character from that set to be printed. If 20H is undefined in that character set, the error character is printed.

Hex 7F

If a 94-character graphic character set has been mapped into the GL region, 7FH is always ignored.

If a 96-character graphic character set has been mapped into the GL region, 7FH causes the specified character from that set to be printed. If 7FH is undefined in that character set, the error character is printed.

Hex A0

If a 94-character graphic character set is selected into GR, A0H causes the error character to print.

If a 96-character graphic character set resides in GR, A0H prints the specified character from that set. If A0H is undefined in that set, the error character is printed.

Hex FF

If a 94-character graphic character set has been mapped into the GR region, FFH is always ignored.

If a 96-character graphic character set has been mapped to GR, FFH prints the specified character from that set. If FFH is undefined in that set, the error character is printed.

GEK-00029B

203

5000 Series Programmer’s Manual

Special Character Parsing

Received

Character

ESC

CAN

SUB

BEL, SI, SO

Other C0

21H – 7EH

80H – 9FH

A1H – FEH

20H

A0H

7FH

FFH

ESC, CSI,

DCS Intro

See 1

See 2

See 3

See 4

See 4

See 5

See 6

See 7

See 8

See 8

Ignore

Ignore

Sixel

See 1

See 2

Treat as

3FH

See 4

Ignore

See 5

See 6

See 7

Ignore

Ignore

Ignore

Ignore

DECATFF DECDTFF DECAUPSS

See 1 See 1 See 1

See 2

See 3

See 2

See 3

See 2

See 3

Ignore

Ignore

See 5

See 6

See 7

Ignore

Ignore

Ignore

Ignore

Ignore

Ignore

See 5

See 6

See 7

Ignore

Ignore

Ignore

Ignore

Ignore

Ignore

See 5

See 6

See 7

See 8

See 8

Ignore

Ignore

DECLFF

See 1

See 2

Treat as

3FH

Ignore

Ignore

See 5

See 6

See 7

Ignore

Ignore

Ignore

Ignore

Undefined

Control

String

See 1

See 2

See 3

See 4

See 4

Ignore

See 6

See 7

Ignore

Ignore

Ignore

Ignore

Action taken:

1 Character aborts the command, then introduces a new command

2 Character aborts the command, then CAN is processed

3 Character aborts the command, then SUB is processed

4 Character is processed as if received before the command, then command processing resumes

5 Character is processed as a printable character

6 Character aborts the command, then the control character is processed

7 Eighth bit of character is ignored, then processed as a GL printable character

8 Character processed as 20H (space)

Chapter 8. PPL3 Plus Emulation

204

GEK-00029B

ESCAPE SEQUENCE / CONTROL FUNCTION SYNTAX

Within PPL III, the overall description given to control codes, escape sequences and control strings is "commands." For consistence with the rest of this manual, separateness will be maintained.

Escape Sequence Syntax

Escape sequences have the following general format:

<ESC><I><F>

Final Character

Intermediate Characters

Escape Sequence Introducer

Example: ESC ( B

CSI: The ESC control character (1BH) is the escape sequence introducer .

I: Intermediate characters received after and ESC and should be in the range of 20H to 2FH. No more than 3 intermediate characters are permitted within PPL III. If four or more intermediate characters are received before the final character, the event is noted and the entire sequence is ignored.

F: A final character is in the range of 30H to 7EH. It indicates the end of an escape sequence. The intermediate characters (if any) and the final character, taken together, define the function of the sequence.

Control Sequence Syntax

Control sequences differ from escape sequences in that they have parameters that modify the function of the control sequence. The general format for a control

<CSI><P><I><F>

Final Character

Intermediate Characters

Parameters

Control Sequence Introducer

CSI: The control sequence introducer has a hex value of 9B. This is equivalent to a 7-bit escape sequence of ESC [ or 1BH 5BH. Both encodings are recognized as a CSI.

Parameters: Parameter characters are in the range of 30H to 3FH. A parameter modifies the action of the control sequence. Generally, parameters are ASCII digits and act as a numerical index in the sequence. Within PPL III, the occurrence of the "?" character (3FH) or

GEK-00029B

205

5000 Series Programmer’s Manual

the ">" character (3E) at the beginning of a parameter string indicates the presence of Digital private parameters.

If the ":" (3AH), "<" (3C), or the "=" (3D) characters are received during the processing of a parameter string, or if the ">" or "?" characters are received after the first character of a parameter string, the string will be ignored.

I: Intermediate characters received after and ESC and should be in the range of 20H to 2FH. No more than 1 intermediate character is permitted. If more than one intermediate character is received before the final character, the event is noted and the entire sequence is ignored.

F: A final character is in the range of 40H to 7EH. It indicates the end of an escape sequence. The intermediate characters (if any) and the final character, taken together, define the function of the sequence.

Parameter Values Within Control Sequences

Parameter values are either numeric values or selection indices.

Numeric values typically specify a distance or a quantity pertaining to a control function. Selective parameters are interpreted as specifying a choice from an available list for a parameter. Parameter values must be unsigned digits. Leading zeroes are permitted, but ignored.

If no value is received for a parameter, a value of zero is assumed.

The maximum value for a parameter is the greatest value needed by any supported control sequence. In a PPL III compliant printer, the maximum value is the maximum paper size expressed in centipoints

(1/7200-inch). For example, if a printer supports 21-inch paper, the maximum parameter size would be 21x7200=151,200 centipoints.

If multiple parameters appear in a control sequence, they must be separated by semi-colons (";"). A maximum of 16 parameters is allowed. If more are received, only the first 16 are evaluated.

Additional parameters are ignored, but do not cause the sequence to be invalid.

Chapter 8. PPL3 Plus Emulation

206

GEK-00029B

COMMAND DIRECTORY

Command

ASCEF

CPR

CRM

CUU

DA

DA2

DAR

DAR

DECAUPSS

DECAWM

DECCAHT

DECCAVT

DECCRNLM

DECHTS

DECIPEM

DECNS

DECPSM

DECPSP

DECRFS

DECRVEC

DECSHORP

DECSHTS

DECSLPP

DECSLRM

DECSTBM

DECSTR

DECSVTS

DECVEC

DECVERP

DECVTS

DSR

DSR

GSM

GSS

HPA

HPB

HPR

LNM

Locking Single Shifts

Description

Announce Subset of Code Extension Facilities

Cursor Position Report

Control Representation Mode

Cursor Up

Printer Attributes (host request for report)

Secondary Printer Attributes (host request for report)

Printer Attributes Report (generic response)

Printer Attributes Report (alias response)

Assign User Preference Supplemental Set

Auto Wrap Mode

Clear All Horizontal Tabs

Clear All Vertical Tabs

Carriage Return / New Line Mode

Horizontal Tab Set

Invokes IBM Proprinter Emulation

New Sheet

Pitch Select Mode

Proportional Spacing Mode

Request Font Status (requests a font report)

Draw Relative Vector

Set Horizontal Pitch

Set Horizontal Tab Stops (max of 16)

Set Lines per Physical Page

Set Left and Right Margins

Set Top and Bottom Margins

Soft Terminal Reset

Set Vertical Tab Stops (max of 16)

Draw Vector

Set Vertical Pitch

Vertical Tab Set

Printer Status Report (Response to host or print manager)

Printer Status Request (Request from host or print manager)

Graphic Size Modification

Graphic Size Selection

Horizontal Position Absolute

Horizontal Position Backwards

Horizontal Position Relative

Line Feed / New Line Mode

A family of sequences that map graphics character sets G0-G3 into GL and GR. These include:

Page

212

213

214

214

215

215

215

216

216

209

209

210

210

210

212

211

216

217

217

218

219

220

221

222

223

225

226

227

228

229

230

229

231

232

233

234

235

236

236

GEK-00029B

207

5000 Series Programmer’s Manual

Command

PUM

RIS

SCS

SGR

SGR

SHS

SPI

SSU

SVS

TBC

VPA

VPB

VPR

Sixel Graphics

Commands

DECGCR

DECGNL

DECGRA

DECGRI

Description

SS2, SS3, SO, SI, LS0 to LS3 and LS1R to LS3R

Positioning Unit Mode

Reset to Initial State

Select Coding System (invoke another resident emulation)

Select Graphics Rendition (attribute selection)

Select Graphics Rendition (font selection)

Set Horizontal Spacing

Set Pitch Increment

Select Size Unit

Set Vertical Spacing

Tab Clear

Vertical Position Absolute

Vertical Position Backwards

Vertical Position Relative

Graphics Carriage Return

Graphics Next Line

Set Graphics Attributes

Graphics Repeat Introducer

Page

237

237

238

240

243

244

246

247

248

249

249

250

250

258

258

259

260

Chapter 8. PPL3 Plus Emulation

208

GEK-00029B

COMMAND DICTIONARY

ASCEF

CPR

Announce Subset of Code Extension Facilities: This indicates which subset of code extension facilities or what level of ISO 4873 is used for subsequent exchanges of information. These three control functions are macros that incorporate the effects of Select Character

Set (SCS) and Locking Shift (LS) commands.

Source: Printer Destination: Application

Description

Level 1 and level 2 result in the following settings:

▪ ASCII is assigned to G0 and mapped into GL.

▪ ISO Latin-1 Supplemental is assigned to G1 and mapped into GR.

Level 3 results in the following settings:

▪ ASCII is assigned to G0 and mapped into GL.

Format

Mnemonic:

Decimal:

Hex:

BASIC:

ESC SP L

27 32 76

1B 20 4C

CHR$(27);" L";

ISO 4873, level 1

Mnemonic:

Decimal:

Hex:

BASIC:

Mnemonic:

Decimal:

Hex:

BASIC:

ESC SP M

27 32 77

1B 20 4D

CHR$(27);" M";

ESC SP N

27 32 78

1B 20 4E

CHR$(27);" N";

ISO 4873, level 2

ISO 4873, level 3

Cursor Position Report: Response by a printer to an application for a Printer Status Request (DSR) cursor position request. It returns the current horizontal and vertical position via the serial connection.

Source: Printer Destination: Application

Format

Mnemonic:

Decimal:

Hex:

BASIC:

CSI Pn1 ; Pn2 R

155 Pn1 59 Pn2 82

9B Pn1 3B Pn2 52

CHR$(155);Pn1;";";Pn2;"R";

Description

The CPR parameters are defined as follows:

Pn1: Numeric parameters describing the active vertical position.

Pn2: Numeric parameter describing the active horizontal position.

GEK-00029B

209

5000 Series Programmer’s Manual

CUU

DA

CRM Control Representation Mode: This sequence enters or exits a mode in which the printer prints a graphic token for each byte. In this mode, the printer does not act upon control characters.

Source: Application

Format

ESC 3 h

ESC 3 l

Set CRM

Reset CRM

Destination: Exception (debug tool)

Description

When Control Representation Mode is set, the printer does not act on control or special characters, with the following exceptions:

▪ Line Feed (LF) is printed as <LF> , then a Carriage Return/Line

Feed is executed.

▪ Form Feed (FF) is printed as <FF>, then a Form Feed is executed.

▪ The Control Representation Mode reset command is printed as

<CSI> 3 1 , then is executed.

Cursor Up: Executes Vertical Position Backwards (VPB). CUU exists for backwards compatibility with older printers only. Use VPB instead of CUU. Future printers may not implement CUU.

Source: Application Destination: Level 3 (outmoded command)

Description

See VPB.

Printer Attributes: Requests the printer product identification. The printer responds to the DA command by sending a Printer Attributes

Report (DAR). See DAR.

Use DA (generic response) for normal Print manager inquiries and forward compatibility. Use DA (alias response) for backwards compatibility with older printers.

It is recommended that you send this command with no parameter.

Although the DEC PPL3 parsing rules allow a parameter in any control sequence, this command is traditionally sent without one.

Source: Print manager Destination: Levels 1, 2, 3

Format

CSI PS c Ps (if present) must equal 0.

Chapter 8. PPL3 Plus Emulation

210

GEK-00029B

DAR Printer Attributes Report (generic response): Response to a Print manager request for a Printer Attributes (DA) report.

Source:

Format

Printer Destination: Print manager

CSI ? Ps1 Ps2 … Psn c

Description

The printer sends this command when set to the generic response.

The printer may be set to use the alias response. See DAR (alias response) in this chapter.

Ps1 = 73

Ps2-Psn describe the implemented extensions to the protocol. See the introduction to this chapter for an explanation of extensions. The following table contains a list of possible extensions.

Parameter

Hex Decimal

34 4

35

36

38

39

31 30

31 31

31 32

5

6

8

9

10

11

12

Protocol Extension

Sixel graphics

Katakana character set

Reserved

Reserved

Variable page format select

Text ruling vector drawing

Reserved

Hebrew character sets

The reply to the DA request is sent to the host only after all preceding data (except DSR) has been processed and printed. This provides a way for host software to determine when all preceding data has been successfully printed.

When values are not returned, they are left out of the response entirely (that is, there are not any blanks indicated by semicolons).

However, software should always accept blank parameters.

The printer sends parameters in ascending order. However, software should accept the parameters in any order.

GEK-00029B

211

5000 Series Programmer’s Manual

DAR

DA2

Printer Attributes Report (alias response): Response to a Print manager request for a Printer Attributes (DA) Report.

Source:

Format

Printer Destination: Print manager

CSI ? Ps1 Ps2 Psn c

Description

The printer sends this sequence when set to the alias response. The printer may be set to use the generic response. See the Programming

Supplement for configuration information, and for the alias responses supported by the printer.

The reply to the DA request is sent to the host only after all preceding data (except DSR) has been processed and printed. This provides a way for host software to determine when all preceding data has been successfully printed.

Secondary Printer Attributes: Requests a Secondary Printer

Attributes Report.

Source: Print manager

Format

Destination: Levels 1, 2, 3

CSI PS > C

Description

Ps (if present) must equal 0.

The printer responds to the DA2 request by sending a Secondary

Printer Attributes Report (DAM).

Notes to Software

This command should be used only by diagnostic programs or specialized print managers.

Use DA (generic response) for normal Print manager inquiries and forward compatibility. No additional data is sent by the printer to the print manager.

Chapter 8. PPL3 Plus Emulation

212

GEK-00029B

DECAUPSS Assign User Preference Supplemental Set: Assigns a particular character set to the User Preference Supplemental set. This becomes the character set designated by the User Preference character set final when used in a Select Character Set (SCS) sequence.

Source: Print manager Destination: Levels 1, 2, 3

Format

DCS Ps U D ... D ST

Description

Ps indicates whether the User Preference set is a 94-character or a

96-character set:

Ps

0

1

Meaning

94-character set

96-character set

D ... D is a string containing the intermediate and final characters of the designating sequence used to explicitly select the supplemental character set. See SCS in this chapter for a list of intermediate and final characters.

To assign DEC Supplemental as the User Preference character set, use the following DECAUPSS command:

DCS 0 ! u %5 ST

To assign ISO Latin-1 Supplemental as the User Preference set, use the following DECAUPSS command:

DCS 1 ! u A ST

To use the User Preference set, see User Preference under SCS.

The supported character sets are as follows:

▪ DEC Supplemental (Ps must equal 0)

▪ ISO Latin-1 Supplemental (Ps must equal 1)

▪ DEC Hebrew Supplemental (Ps must equal 0)

▪ ISO Latin-Hebrew Supplemental (Ps must equal 1)

▪ DEC Technical (Ps must equal 0)

▪ Hebrew 7-bit (Ps must equal 0)

GEK-00029B

213

5000 Series Programmer’s Manual

DECAWM

DECCAHT

Error Handling

The printer accepts the User Preference Supplemental character set selection even if the selected character set is not currently available.

The character set may be downloaded before imaging text. If the character set is still not available when an imaging function is attempted, the printer follows the action taken on a character set fault.

If Ps does not have the appropriate value for the D ... D identifier, a character set fault results.

Autowrap Mode: Instructs the printer whether to execute an automatic Carriage Return/Line Feed when the active position exceeds the right margin.

Source: Application Destination: Level 2

Format

CSI ? 7 h

CSI ? 7 1

Description

Set Autowrap mode.

Reset Autowrap mode.

When DECAWM is set and the active position is beyond the right margin, printable characters that follow are printed on the next line beginning at the Line Home Position. When DECAWM is reset, all printable characters received beyond the right margin are ignored

(truncated).

The printer never autowraps text during justification. See JFY for more information.

The printer always autowraps during Control Representation Mode

(CRM).

Clear All Horizontal Tabs: Clears horizontal tab stops.

Source: Application Destination: Level 2

(outmoded command)

Format

ESC 2 1/11 3/2

Description

See Tabulation Clear (TBC) with Ps = 2.

Notes to Software

This command is included for backwards compatibility with older printers only. Conforming software should not use this command.

Chapter 8. PPL3 Plus Emulation

214

GEK-00029B

DECCAVT

DECCRNLM

DECHTS

Clear All Vertical Tabs: Clears vertical tab stops.

Source: Application Destination: Level 2

(outmoded command)

Format

ESC 4

Description

See Tabulation Clear (TBC) with Ps = 4.

Notes to Software

This command is included for backwards compatibility with older printers only. Conforming software should not use this command.

Carriage Return /New Line Mode: Instructs the printer whether to perform a Line Feed (LF) upon receipt of a Carriage Return (CR).

Source: Print manager

Format

Destination: Levels 2, 3

CSI ? 4 0 h

CSI ? 4 0 1

Description

CR acts as New Line.

CR acts as Carriage Return.

If DECCRNLM is set and a CR is received, the active position advances to the Line Home Position of the next line. If DECCRNLM is reset and a CR is received, the active position returns to the Line

Home Position of the current line.

Notes to Software

Print managers developed by Digital handle record terminators without using Carriage Return/New Line Mode. This command is available for third-party Print managers.

Horizontal Tab Set: Executes Horizontal Tab Set (HTS).

Source: Application Destination: command)

Level 2(outmoded

Format

ESC 1

Description

See HTS in the Control Characters section, p. 202.

Notes to Software

This command is included for backwards compatibility with older printers only. Conforming software should not use this command.

GEK-00029B

215

5000 Series Programmer’s Manual

DECIPEM

DECNS

DECPSM

Entering IBM Proprinter Emulation Mode: Executes Set Other

Coding System (SOCS), enabling IBM Proprinter Emulation mode.

Source:

Exception

Format

Print manager Destination: Levels 2, 3

CSI ? 5 8 h

Description

See SOCS with final character "=" (3DH).

Some printers do not support Emulation mode

Notes to Software

This command is provided for backwards compatibility with older printers only. Conforming software should use SOCS instead.

New Sheet: Executes a conditional Form Feed.

Source: Application

Format

Destination: Level 3 extension

CSI Pn SP s Pn must equal 0.

Pitch Select Mode: When set, postpones processing of Set Horizontal

Pitch (DECSHORP). The pitch is based on the font. When reset, uses the horizontal pitch selected by DECSHORP.

Source: Application Destination: Levels 2, 3

(outmoded command)

Format

CSI ? 2 9 h

CSI ? 2 9 1

Description

Sets Horizontal Pitch Select Mode.

Resets Horizontal Pitch Select Mode.

When the selected font cannot be modified algorithmically to match the pitch selected by DECSHORP, DECPSM defines whether to use the pitch from the font, or to print the characters at an unnatural pitch.

By extension, even if the font can be modified, DECPSM is used to force the use of the natural pitch of the selected font and postpone the processing of DECSHORP.

When DECPSM is set, received DECSHORP values are stored but not processed. When DECPSM becomes reset, the pending DECSHORP (if any) is processed.

If there is no concept of natural pitch implemented within the printer,

DECPSM is ignored.

Side Effects

DECPSM can cause a change in pitch such that a pending

DECSHORP may be executed. This results in the side effects described under the DECSHORP command.

Chapter 8. PPL3 Plus Emulation

216

GEK-00029B

DECPSP

DECRFS

GEK-00029B

If the DECPSP (Proportional Spacing) command is set, the DECPSM command sets the tabs and margins as usual, as listed in Side

Effects under DECSHORP in this chapter. However, the pitch is stored and is not used until DECPSP is reset.

Notes to Software

This command is provided for backwards compatibility with older printers only. Conforming software should not use DECPSP. Use

DECSHORP with Ps = 0 to select the natural pitch for the currently selected font. Use other DECSHORP parameters to select pitches other than the natural pitch.

Use DECPSM with monospaced fonts only.

Proportional Spacing Mode: When set, enables proportional spacing of characters. When reset, selects monospaced printing.

Source:

Format

Application Destination: Level 3

CSI ? 2 7 h

CSI ? 2 7 1

Description

Sets Proportional Spacing Mode.

Resets Proportional Spacing Mode.

When a proportional font is in use and DECPSP is reset, the printer prints characters on a monospaced grid.

DECPSP has no effect on tab settings.

Request Font Status: Requests a font report.

Source: Print manager Destination: Levels 2, 3

Format

CSI Ps " {

Description

The selective parameters for DECRFS are as follows:

0 = Requests both reports (same as 1 followed by 2).

1 = Requests font status (includes all built-in fonts, downloaded fonts).

2 = Requests status of memory bytes available for downloaded fonts.

The host sends this command to request a status report of the fonts available for printing, the memory available for font download, or both.

The parameter Ps selects the type of font status requested.

Notes

Data fields are empty as explained in DECFSR.

Error Handling

If Ps is any value other than 0, 1, or 2, the printer ignores this command.

217

5000 Series Programmer’s Manual

DECRVEC Draw Relative Vector: Draws a vector starting at the active position.

Source: Application Destination: Level 3 Extension

Format

CSI Ps1 Pn2 Pn3 SP

Description

The selective parameters for Ps1 are as follows:

Ps1

0

1

2

3

Action

Draws an X (horizontal) line to the right.

Draws a Y (vertical) line down.

Draws an X (horizontal) line to the left.

Draws a Y (vertical) line up.

Numeric parameters provide line length and width:

Pn

Pn2

Pn3

Meaning

Line length n

Line width n

Ps1

0

1

2

3

The printer interprets the line length and width as pixels, decipoints or centipoints. The unit is selected using the Select Size Unit (SSU) command. The Positioning Unit Mode (PUM) setting does not affect the unit selected.

The starting point of the line is the current position.

X lines are horizontal with respect to the intended reading page orientation, and Y lines are vertical with respect to the intended reading page orientation.

The DECRVEC command does not change the active position. It is not affected by the First Character Flag.

Since a vector has length and width, it is considered a filled rectangle. The rectangle is not centered on the endpoints. A vector drawn from position (X,Y), with a length of L = (Pn2 - 1) and a width of W = (Pn3 - 1), has the four corners listed in the following table.

Upper Left

X,Y

X,Y

X-L,Y

X,Y-L

Upper Right

X+L,Y

X+W,Y

X,Y

X+W,Y-L

Lower Left

X,Y+W

X,Y+L

X-L,Y+W

X,Y

Lower Right

X+L,Y+W

X+W,Y+L

X,Y+W

X+W,Y

Error Handling

Relative vectors may extend beyond the limit bounds (left right, top, and bottom margins). If the vector extends beyond the printable area, it is clipped at the edge of the printable area.

Chapter 8. PPL3 Plus Emulation

218

GEK-00029B

DECRVEC

DECSHORP

(continued)

If the requested length is less than 1 pixel long (after conversion to pixel units), the printer draws a line I pixel long. If the requested line is less than 1 pixel wide, the printer draws a line 1 pixel wide.

Set Horizontal Pitch: Selects character spacing for monospaced fonts.

Source: Application

Format

Destination: Levels 1, 2, 3

CSI Ps w

Description

The DECSHORP command determines the number of characters/inch (pitch) that the printer uses when Pitch Select Mode

(DECPSM) is reset. If DECPSM is set, the printer saves the

DECSHORP parameter.

The selective parameters for DECSHORP are as follows:

Ps Selection

2

3

0

1

4

5

Determined by current font.

720 centipoints (10 cpi)

600 centipoints (12 cpi)

550 centipoints (13.2 cpi)

440 centipoints (16.5 cpi)

1440 centipoints (5 cpi)

6

7

8

9

11

1200 centipoints (6 cpi)

1090 centipoints (6.6 cpi)

870 centipoints (8.25 cpi)

480 centipoints (15 cpi)

12

13

420 centipoints (approx. 17.1 cpi, or

14/240 in.

840 centipoints (approx. 8.5 cpi)

400 centipoints (18 cpi)

14

15

800 centipoints (9 cpi)

700 centipoints (approx. 10.3 cpi)

There may be printer limitations on pitch based on resolution restrictions. If fallbacks are used, however; the resulting characters are the same size or smaller than those requested. See the discussion of horizontal resolution in the Programming Supplement for the actual pitches supported.

Side Effects

Execution of DECSHORP produces the following side effects:

▪ Sets the Left Margin Position to the origin.

▪ Sets the Right Margin Position to the right printable limit.

▪ Clears the Right Margin Flag.

GEK-00029B

219

5000 Series Programmer’s Manual

DECSHORP

DECSHTS

(continued)

▪ Sets the Line Home Position equal to the Left Margin Position.

▪ Sets the Line End Position equal to the Right Margin Position.

▪ Adjusts horizontal tab stops (multiplies each tab location by the ratio of the new Horizontal Advance Increment over the old RAI).

For example, if a horizontal tab stop is set at column 12 with a horizontal pitch of 12 characters/inch, the tab stop stored is I inch from the origin. But if a DECSHORP command changes the pitch to 6 characters/inch, the tab stop moves to 2 inches from the origin in order to retain 12 characters between the origin and the tab stop.

▪ If the active horizontal position is not a multiple of the new HAI, it is adjusted rightward to the next multiple of HAI.

▪ DECSHORP affects justification. See Justify (JFY).

Error Handling

All other parameter values cause this command to be ignored except for the bounds and Right Margin Flag resets described under Side

Effects. A parameter that is valid but unsupported in a particular printer results in a fallback. See the discussion of horizontal resolution in the Programming Supplement for a list of pitches supported.

Set Horizontal Tab Stops : Adds one or more tab stops to the horizontal tab table (max of 16).

Source:

Format

Application Destination: Level 2

CSI Pn Pn u

Description

Pn is a number of units, depending on Positioning Unit Mode (PUM) and Select Size Unit (SSU).

Each Pn parameter is a selected horizontal tab stop. A maximum of

16 tab stops can be selected in one command–the printer can receive

Pn values in any order, it sorts them and places them into the tab table.

The printer sets tab stops relative to the page origin and not to the left margin. Changing the left margin does not change the position of tab stops. Changing the pitch with the Set Horizontal Pitch

(DECSHORP) command modifies tab positions to keep the number of columns between tab stops constant.

The printer allows at least one tab per eight columns along the widest paper supported at the smallest built-in monospaced pitch. See the

Programming Supplement for the exact number.

Tab stops can be set outside the current margins; however, the printer does not use tab stops beyond the right margin.

Chapter 8. PPL3 Plus Emulation

220

GEK-00029B

DECSHTS

DECSLPP

(continued)

Error Handling

If the printer receives more than 16 tab stops, it sets the first 16 and ignores the rest. If the same tab stop is sent more than once, the printer sets the tab stop once. The printer ignores a sequence sent without tab stop parameters.

When the number of new tab settings exceeds the maximum, the printer discards the tab stops with the highest values.

Set Lines per Physical Page: Defines the logical form length. The form length is the vertical size of the printed area on a page.

Source:

Format

Application Destination: Levels 1, 2

CSI Pn t

Description

This command sets the page length to the physical distance that corresponds to Pn units (lines at the current vertical pitch, decipoints, centipoints, or pixels). Once form length is set, changing the size of the units does not change the form length

If Pn equals 0, the printer sets the form length to the logical paper size. Pn is a number of units, depending on Positioning Unit Mode

(PUM) and Select Size Unit (SSU).

The following table lists the parameter values for a small selection of page lengths as a function of vertical pitch. These values are used only when PUM is reset.

Length in

Inches

11/3

8.5/2

8.5

11

14

21

2

N/A

N/A

17

22

28

42

3

11

N/A

N/A

33

42

63

Lines Per Page

4 6

N/A

17

22

N/A

34

44

56

84

51

66

84

126

8

N/A

34

68

88

112

168

12

44

51

102

132

168

252

Where N/A is indicated, the length is riot selectable while the indicated vertical pitch is in effect. If it is selected using another vertical pitch and a subsequent pitch change occurs, page lengths of a non-integral number of lines may result. Page wrap occurs after the last whole line.

The form length limits the range of possible settings for the Set Top and Bottom Margins (DECSTBM) command.

Side Effects

The printer resets the top margin to I and the bottom margin to the printable area when changing page length. DECSLPP also resets the vertical format bounds to the margins.

DECSLPP affects justification. See Justify (JFY).

GEK-00029B

221

5000 Series Programmer’s Manual

DECSLPP

DECSLRM

(continued)

Error Handling

If the Pn parameter is greater than the maximum size for the paper and origin, then the printer sets the form length to the maximum size for the paper and origin

Notes to Software

Use DECSLPP only at the top of a new page.

Set Left and Right Margins: Sets the horizontal margins.

Source:

Format

Application Destination: Levels 2, 3

CSI Pn1 Pn2 s

Description

Pn1 is a decimal value that specifies the left margin position.

Pn1

0 n

Meaning

Leave margin unchanged.

Set left margin to n units.

The unit for Pn1 and Pn2 is selected using the Positioning Unit Mode

(PUM) and Select Size Unit (SSU) commands.

The printer places data only within the left and right margins, with the following exceptions:

▪ Draw Vector (DECVEC) and Draw Relative Vector (DECRVEC) draw lines outside the margins.

▪ During justification, if the required spacing between words is less than the specified minimum width of the space character, text may exceed the right margin.

▪ If margins are less than one Horizontal Advance Increment (HAI) apart, text may exceed the right margin.

The printer sets the margins relative to the page origin, as set by

Origin Placement Mode (DECOPM). Changing the page origin causes the margins to move.

Changing right and left margins does not affect horizontal tab stops.

Active position is only affected if it is outside the new margins. See

Error Handling.

Select Horizontal Pitch (DECSHORP), Page Format Select (PFS),

Variable Page Format Select (DECVPFS), and the reset commands affect margin settings.

Side Effects

DECSLRM sets the Line Home Position equal to the Left Margin

Position and the Line End Position equal to the Right Margin

Position.

DECSLRM affects justification. See Justify (JFY).

Chapter 8. PPL3 Plus Emulation

222

GEK-00029B

DECSLRM

DECSTBM

(continued)

Error Handling

If the active position is less than the left margin, then the printer sets the active position to the new left margin.

If the active position is greater than the right margin, the printer sets the Right Margin Flag.

If Pn2 is to the right of the right printable limit, the printer sets the right margin to the right printable limit.

If Pn1 is greater than or equal to Pn2, the printer ignores the command, except for the side effects listed above.

If DECOPM is set, characters that precede the left printable limit are not printed.

DECSLRM Set Left and Right Margins

Notes to Software

Margins can be changed or reset as a side effect of other actions.

Also, changing the origin with DECOPM changes the locations of the left and right margins with respect to the paper.

Side Effects

DECSNC causes a conditional Sheet Feed. The selected parameter affects all subsequent sheets.

If Pn equals 0, the printer sets Pn to 1.

A maximum of 99 copies can be selected. If Pn is greater than 99, the printer sets Pn to 99.

Set Top and Bottom Margins: Sets the vertical margins.

Source: Application Destination: Levels 2, 3

Format

CSI Pn1 Pn2 r

Description

Pn1 is a decimal value that specifies the top margin position.

Pn1

0 n

Meaning

Leave margin unchanged.

Set top margin to n units.

Pn2 is a decimal value that specifies the bottom margin position.

Pn2

0 n

Meaning

Leave margin unchanged.

Set bottom margin to n units.

The unit for Pn1 and Pn2 is selected using the Positioning Unit Mode

(PUM) and Select Size Unit (SSU) commands.

GEK-00029B

223

5000 Series Programmer’s Manual

DECSTBM (continued)

The printer places data only within the top and bottom margins, with the following exceptions:

• Draw Vector (DECVEC) and Draw Relative Vector (DECRVEC) draw lines outside the margins.

• Partial Line Down (PLD) may print part of a character below the bottom margin.

• Partial Line Up (PLU) may print part of a character above the top margin

▪ The Superscript and Subscript attributes set by Select Graphic

Rendition (SGR) can print characters above the top margin.

▪ If the margins are less than one character height apart, text may exceed the bottom margin.

▪ If the active position is less than one character height from die top margin and the First Character Flag is not set, text may exceed the top margin.

The printer sets the margins relative to the page origin, as set by

Origin Placement Mode (DECOPM). Changing the page origin causes the margins to move.

Changing the top and bottom margins does not affect vertical tab stops. The active position is affected only if it is outside the new margins.

Set Lines per Physical Page (DECSLPP), Page Format Select (PFS),

Variable Page Format Select (DECVPFS), and the reset commands affect margin settings.

Side Effects

DECSTBM sets the Page Home Line equal to the top margin and Page

End Line equal to the bottom margin.

DECSTBM affects justification. See Justify (JFY).

Error Handling

If the active position is above the new top margin, then the printer sets the active position to the new top margin, and sets the First

Character Flag.

If the active position is below the new bottom margin, the printer sets the active position to the new bottom margin.

If Pn2 is greater than the form length, the printer sets the bottom margin to the form length.

If Pn1 is greater than or equal to Panama, the printer ignores the command, except for the side effects listed above.

If DECOPM is set, characters above the top printable limit are not printed.

Chapter 8. PPL3 Plus Emulation

224

GEK-00029B

DECSTBM

DECSTR

(continued)

Notes to Software

Margins can be changed or reset as a side effect of other actions.

Also, changing the origin with DECOPM changes the locations of the top and bottom margins with respect to the paper

DECSTBM should be used only on a new page.

Soft Terminal Reset: Resets the initial state values in the printer.

Also returns to DEC PPL3 regardless of the power-up protocol selected.

Source: Application, Print manager Destination: Levels 1, 2, 3

Format

CSI Pn p

Description

Pn (if present) must be 0.

DECSTR is processed synchronously with the rest of the data stream.

The printer sets all the Initial State Values listed in the Programming

Supplement to the "DECSTR" conditions.

The printer does not run self-test, change the current communication settings, or clear the input buffer.

Side Effects

DECSTR resets Printer Status Report (DSR) events, including communication failure and input buffer overflow.

The printer performs a conditional Form Feed.

DECSTR affects justification. See Justify (JFY).

See Select Other Coding System (SOCS) when an alternate protocol is in use.

Error Handling

Any parameters received with DECSTR are ignored.

DECSTR Soft Terminal Reset

Notes to Software

It is recommended that you send this command with no parameter.

Although the DEC PPL3 parsing rules allow a parameter in any sequence, this sequence is traditionally sent without one. Older

Digital printers may not accept the 0 parameter.

GEK-00029B

225

5000 Series Programmer’s Manual

DECSVTS Set Vertical Tab Stops: Adds one or more tab stops to the vertical tab table (max of 16).

Source:

Format

Application Destination: Level 2

CSI Pn ! p

Description

Pn is a number of units, depending on Positioning Unit Mode (PUM) and Select Size Unit (SSU).

Each Pn parameter is a selected vertical tab stop. A maximum of 16 tab stops can be selected in one command. The printer can receive Pn parameters in any order; it sorts them and places them into the tab table.

The printer sets tab stops relative to the page origin and not to the top margin. Changing the top margin does not charge the position of tab stops. Changing the pitch with Set Vertical Pitch (DECVERP) modifies tab positions to keep the number of lines between tab stops constant.

The printer allows at least one tab per line along the longest paper supported at the smallest built-in line spacing.

Tab stops can be set outside the current margins; however, the printer does not use tab stops beyond the bottom margin.

Error Handling

If the printer receives more than 16 tab stops, it sets the first 16 and ignores the rest. If the same tab stop is sent more than once, the printer sets the tab stop once. The printer ignores a command sent without tab stop parameters.

When the number of new tab settings exceeds the maximum, the printer discards the tab stops with the highest values.

Chapter 8. PPL3 Plus Emulation

226

GEK-00029B

DECVEC Draw Vector: Draw a vertical or horizontal line.

Source: Application Destination: Level 3 Extension

Format

CSI Ps1 ; Pn2 ; Pn3 ; Pn4 ; Pn5 ! |

Description

The selective parameter options are as follows:

Ps1

0

1

Action

Draw X (horizontal) line.

Draw Y (vertical) line.

Select the numeric parameters as follows:

Pn

Pn2

Pn3

Pn4

Pn5

Meaning

X start position

Y start position

Line length

Line width

DECVEC does not modify the active position.

The unit for numeric parameters is selected using the Select Size

Unit (SSU) command Positioning Unit Mode (PUM) has no effect on

DECVEC unit size.

For an X line, Pn4 specifies horizontal length and Pn5 specifies vertical width. For a Y line, Pn4 specifies vertical length and Pn5 specifies horizontal width. Since a vector has length and width, it is considered a filled rectangle. The rectangle is not centered on the endpoints. DECVEC rectangles are positioned identically relative to the endpoints as relative vectors. See DECRVEC.

Error Handling

If Ps1 is any value other than 0 or 1, the entire command is ignored.

Missing parameters are interpreted as 0. If the printer receives a

DECVEC command with too many parameters, the first five are used and others are ignored.

If the requested line is less than 1 pixel long, the printer draws a line

1 pixel long. If the requested line is less than 1 pixel wide, the printer draws a line 1 pixel wide.

Do not rely upon the defaults for Pn4 and Pn5. Define the vector to be at least 1 pixel long and 1 pixel wide. Poor quality may result when processing very short or very thin vectors.

Margin settings do not affect vectors. DECVEC may draw lines that extend beyond the margins, but not out of the printable area. Vectors that extend outside of the printable area are clipped.

GEK-00029B

227

5000 Series Programmer’s Manual

DECVERP Set Vertical Pitch: Selects line spacing

Source: Application Destination: Levels 1, 2

Format

CST Ps 2

Description

Selects the number of lines printed for each inch on a page. Changing the vertical pitch changes the white space between lines, not the size of the character. If the number of lines/inch is increased, the amount of white space is decreased between the lines.

The selective parameter values for DECVERP are as follows:

Ps

0

4

5

6

1

2

3

10

11

12

13

14

15

16

Decipoints

120

120

90

60

360

240

180

Same as Ps = 11

115

86

57

346

230

172

Lines/Inch

6

2

3

4

6

8

12

66 / A-size printable area

88 / A-size printable area

132 / A-size printable area

22 / A-size printable area

33 / A-size printable area

44 / A-size printable area

In some printers, the printable area is slightly smaller than the physical paper size in use. The reduction is never more than 1/4 inch on each edge, or a total of 1/2 inch. The DECVERP parameters 11-16 are the counterparts to 1-6. They are intended to support traditional lines/page requirements on a print area that is slightly less than 11 inches long.

The exact vertical pitch produced for parameters 11-16 is printer-dependent. The result is defined as lines/page on the printable area defined for portrait printing on A-sized paper for that printer.

Pitch Select Mode (DECPSTM) does not affect DECVERR

Side Effects

Vertical tab stops are adjusted in order to retain a constant number of lines between vertical tabs. For example, if a vertical tab stop is set at 12 lines with a vertical pitch of 6 lines/inch, the tab stop stored is

2 inches from the origin. But if a DECVERP command changes the pitch to 12 lines/inch, the tab stop moves to 1 inch from the origin in order to retain 12 lines between the origin and the tab stop.

DECVERP does not affect the active position, top and bottom margins, or the page length.

Chapter 8. PPL3 Plus Emulation

228

GEK-00029B

DECVERP

DECVTS

DSR

(continued)

Error Handling

If the vertical pitch is set greater than the page length, the printer images one line/page.

If Ps is invalid, the command is ignored.

Vertical Tab Set: Executes Vertical Tab Set (VTS).

Source: Application Destination: Level 2

(outmoded command)

Format

ESC 3

Notes to Software

This command is included for backwards compatibility with older printers only. Conforming software should not use this command.

Device Status Request: Requests error status or cursor position.

Source: Print manager Destination: Levels 1, 2, 3

Format

CSI Ps n

CSI ? Ps n Selects Digital private status reporting state.

Description

In response to a DSR command, the printer sends a single brief or extended status report. If you enable unsolicited reports, the printer sends additional reports whenever any reportable status condition changes state.

The printer processes the DSR request (except for cursor position reports) immediately upon receipt, asynchronously to the rest of the data stream. This allows the printer to respond to the request when an error has halted the printing process and the input buffer is full.

The selective parameters for the Printer Status Request command are as follows:

Ps

0 or 5

6

?1

?2

?3

Selection

Sends an extended status report.

Sends a Cursor Position Report (CPR).

Disables all unsolicited status reports.

Enables brief unsolicited status reports, sends extended status report.

Enables extended unsolicited status reports, sends extended status report.

The host sends the Printer Status Request command to request a status report of detected errors or to report the current cursor position. There are two types of reports - extended and brief The brief report sends generic error codes. The extended report sends both generic and specific error codes.

GEK-00029B

229

5000 Series Programmer’s Manual

DSR

The number of DSR requests the printer can process is limited only by the transmission time of each report.

Error Handling

If Ps has a value other than those shown, the printer ignores the entire command.

Device Status Report: Reports error status. The printer sends this report:

▪ In response to an error condition (if unsolicited reports are enabled)

▪ In response to a Printer Status Request (DSR) with Ps = 0, 5, ?2, or ?3.

Unsolicited status reports are sent upon completion of the current page.

Source: Printer

Brief Report Format

Destination: Print manager

CSI Ps n

CSI 3 n

CSI 30 n

Extended Report Format

Error

No errors

Brief report followed by:

CSI Pn1 ; Pn2 ; … ; Pnn

Brief Report Description

The brief report parameters are as follows:

Ps

3

30

Meaning

Error

Error.

Extended Report Description

Each Pn value is an error code of up to three digits. Error codes occur in pairs: a generic code, followed by a specific code.

CSI ? 36 ? 216 n

CSI ? 26 ? 212 n

Notes

Printer paper out error

Non paper error

If unsolicited reports are enabled, errors are reported as they occur.

If no errors occurred, the printer returns a generic "no error" code.

This code varies depending on the printer configuration.

If an event error occurs when unsolicited reports are disabled, the event is stored and reported on the next request. If a state error occurs when unsolicited reports are disabled, an error report is generated on the next request only if the error condition still exists for example, the cover is open or the printer is off line.

If enabled, the printer transmits a report before going offline in response to a serious engine error.

Chapter 8. PPL3 Plus Emulation

230

GEK-00029B

GSM Graphic Size Modification: Modifies the Current Font Definition height or width, established by the Graphic Size Selection (GSS) command.

Source:

Format

Application Destination: Level 3

CSI Pn1 Pn2 SP B

Description

Pn1 is a decimal value that specifies the height of the character as a percentage of die height selected by the GSS command.

Pn1

0 n

Meaning

Set height to 100% of GSS.

Set height to Ps% of GSS.

Pn2 is a decimal value that specifies the width as a percentage of the width set by the GSS command.

Pn2

0 n

Meaning

Sets width to 100% of width set by GSS.

Percentage of the width set by GSS.

The modification remains in effect until the next GSM or Graphic Size

Selection (GSS) command occurs in the data stream, or until reset or power down.

The GSM command can be used in the middle of a line without affecting the alignment of characters along the baseline.

Side Effects

The GSM command affects line spacing only when a font-dependent

Vertical Advance Increment (VAI) is in effect.

Notes to Software

If you are not using a font-dependent VAI, or if you switch to taller characters in the middle of a line, use Select Vertical Spacing (SVS) to accommodate the change in character size.

GEK-00029B

231

5000 Series Programmer’s Manual

GSS Graphic Size Selection: Establishes the height and width for the

Current Font Definition.

Source:

Format

Application Destination: Level 3

CSI Pn SP C

Description

Select Pn as follows:

Pn

0 n

Meaning

Sets height to 100 decipoints.

Sets height to Pn units.

The unit size depends on the Select Size Unit (SSU) command setting.

Positioning Unit Mode (PUM) has no affect on GSS.

The height of a font implicitly defines the width.

The GSS selection remains in effect until the next occurrence of GSS in the data stream, reset, or power down. The height and width selected may be further modified by Graphic Size Modification (GSM).

The GSS command can be used in die middle of a line without affecting the alignment of characters along the baseline.

Side Effects

GSS sets GSM to 100;100.

The GSS command affects line spacing only when font-dependent spacing is selected.

Notes to Software

If you are not using font-dependent spacing, or if you switch to taller characters in the middle of a line, use Select Vertical Spacing (SVS) to accommodate the change in character size.

Chapter 8. PPL3 Plus Emulation

232

GEK-00029B

HPA Horizontal Position Absolute: Moves to a new active horizontal position. Motion occurs either to the right or to the left.

Source:

Format

Application Destination: Levels 2, 3

CSI Pn 9/11 - 6/0

Description

Select Pn as follows:

Pn

0 n

Meaning

Interpreted as 1

Number of units, depending on Positioning

Unit Mode (PUM) and Select Size Unit (SSU).

When lining attributes are invoked by Select Graphic Rendition

(SGR), HPA underlines, double underlines, overlines, or strikes through from the current position to the target position.

The First Character Flag has no effect on HPA.

Error Handling

If Pn is to the left of the Left Margin Position, the printer sets the horizontal position to the Left Margin Position.

Sets the right margin flag if the Pn is greater than the right margin.

Clears the right margin flag if the Pn is less than or equal to the right margin.

GEK-00029B

233

5000 Series Programmer’s Manual

HPB Horizontal Position Backward: Moves the active position to the left a specified number of units.

Source:

Format

Application Destination: Level 3

CSI Pn

Description

Select Pn as follows:

Pn

0 n

Meaning

Interpreted as 1.

Number of units, depending on Positioning

Unit Mode (PUM) and Select Size Unit (SSU).

The HPB command can place the active horizontal position to the left of the Line Home Position or to the right of the Line End Position.

When lining attributes are invoked by Select Graphic Rendition

(SGR), HPB underlines, double underlines, overlines, or strikes through from the current position to the target position.

The First Character Flag has no effect on HPB.

Error Handling

If the resulting active position would be to the left of the Left Margin

Position, the printer sets the horizontal position to the Left Margin

Position.

When the Right Margin Flag is set, the command is ignored.

Chapter 8. PPL3 Plus Emulation

234

GEK-00029B

HPR Horizontal Position Relative: Moves the active position to the right a specified number of units.

Source:

Format

Application Destination: Levels 2, 3

CSI Pn a

Description

Select Pn as follows:

Pn

0 n

Meaning

Interpreted as 1

Number of units, depending on Positioning

Unit Mode (PUM) and Select Size Unit (SSU).

When lining attributes are invoked by Select Graphic Rendition

(SGR), HPR underlines, double underlines, overlines, or strikes through text from the current position to the target position.

The First Character Flag has no effect on HPB.

Error Handling

If the resulting position would be to the right of the Right Margin

Position, the printer sets the horizontal position equal to the Right

Margin Position and sets the Right Margin Flag.

When the Right Margin Flag is set, the command is ignored.

If Pn moves the current horizontal position to the left of the left margin, the active position is set to the left margin.

Double underline and strike through are not supported.

GEK-00029B

235

5000 Series Programmer’s Manual

LNM

LS*/LS*R/SS*

Line Feed/New Line Mode: Instructs the printer to move to the Line

Home Position on the next line upon receipt of a Line Feed (LF).

Source:

Format

Print manager Destination: Levels 2, 3

CSI 2 0 h

CSI 2 0 1

Description

LF acts as New Line

LF acts as Line Feed

If LNM is set and a Line Feed is received, the active position advances to the Line Home Position of the next line. If LNM is reset and a Line

Feed is received, the active position advances to the same horizontal position on the next line.

Locking and Single Shifts: These sequences invoke the GO-G3 character sets into GL or GR.

Source: Application Destination: Levels 1, 2, 3

Format

Name

Single Shift 2

Single Shift 3

Shift Out

Shift In

Locking Shift 0

Locking Shift 1

Locking Shift 2

Locking Shift 3

Locking Shift 1

Right

Locking Shift 2

Right

Locking Shift 3

Right

Mnemonic

SS2

SS3

SO

SI

LS0

LS1

LS2

LS3

LS1R

LS2R

LS3R

Sequence

ESC N (1B 4E)

ESC O (1B 4F)

SO (0E)

SI (0F)

SI (0F)

SO (0E)

ESC n (1B 6E)

ESC o (1B 6F)

ESC ~ (1B 7E)

ESC } (1B 7D)

ESC | (1B 7C)

Function

The character that follows the SS2 is selected from G2.

The character that follows

SS3 is selected from G3.

See Locking Shift 1.

See Locking Shift 0.

G0 becomes the active GL character set.

G1 becomes the active GL character set.

G2 becomes the active GL character set.

G3 becomes the active GL character set.

G1 becomes the active GR character set.

G2 becomes the active GR character set.

G3 becomes the active GR character set.

There is no LS0R.

Description

See page 198 for more information on designating and invoking character sets.

The effect of a single shift (SS2 or SS3) continues only for the first printable GL character that follows the single shift sequence.

The effect of a locking shift (LS2, LS3, LS1R, LS2R, or LS3R) continues indefinitely; that is, until another locking shift changes the effect, or until reset or power down.

Chapter 8. PPL3 Plus Emulation

236

GEK-00029B

PUM

RIS

Positioning Unit Mode: Establishes the unit for the numeric parameters of certain control functions.

Source:

Format

Application Destination: Level 3

CSI 1 1 h

CSI 1 1 1

Description

Sets PUM.

Resets PUM.

When PUM is set, the setting of Select Size Unit (SSU) determines unit size: decipoint, centipoint, or pixels. When PUM is reset, unit size is defined as columns in horizontal spacing commands and lines in vertical spacing commands. Actual column widths and line heights are set by control functions or are taken from the currently selected font.

The Positioning Unit Mode (PUM) establishes the unit for the numeric parameters of the following sequences:

▪ HPA, HPB, HPR

▪ VPA, VPB, CUU

▪ VPR, DECSHTS, DECSVTS

▪ DECSLPP, DECSTBM, DECSLRM

Reset to Initial State: Resets printer state variables to their initial values. RIS has the same effect as Soft Terminal Reset (DECSTR).

Source: Print manager

Format

Destination: Levels 1, 2, 3

ESC c 1/11 6/3

Description

See the DECSTR command for details.

Notes to Software

This command is included for backwards compatibility with older printers only. Conforming software should not use this command.

ESC c is reserved for other uses in some protocols.

GEK-00029B

237

5000 Series Programmer’s Manual

SCS Select Character Set: Designates a graphic character set into G0,

G1, G2, or G3.

Source:

Format

Application Destination: Levels 1, 2, 3

ESC I1 I2 ... In F

Description

I1 is an intermediate character selected from the following table.

Hex

Code Map into G-set I1 Character

94-Character Sets

( Left parenthesis

) Right parenthesis

* Asterisk

+ Plus sign

96-Character Sets

- Minus sign

. Period

/ Slash

28

29

2A

2B

2D

2E

2F

G0

G1

G2

G3

G1

G2

G3

Chapter 8. PPL3 Plus Emulation

238

GEK-00029B

GEK-00029B

The following table lists the character set designating characters.

These character sets are selected using the identifier as F or I2 F in the SCS sequence.

I

2

F Designator

Characters

Hex

Code Character Set

94-Character Sets

British

ASCII

DEC Dutch

DEC Finnish

French

DEC French-Canadian

German

DEC Hebrew Supplemental

DEC 7-bit Hebrew

ISO Italian

Legal

JIS Katakana

JIS Roman

DEC Norwegian/Danish

ISO Spanish

DEC Swedish

DEC Swiss

Norwegian/Danish

DEC Supplemental

DEC Technical

DEC Special Graphics

DEC Portuguese

User Preference Supplemental 1

96-Character Sets

ISO Latin-1 Supplemental

ISO Latin-Hebrew Supplemental

ISO Latin-9 Supplemental (Euro)

Y

%4

I

J

9

K

“4

%=

4

5

R

A

B

`

%5

>

0

6

Z

7

=

%6

<

A

H b

41

48

62

39

4B

22 34

25 3D

59

25 34

49

4A

41

42

34

35

52

36

5A

37

3D

60

25 35

3E

30

25 36

3C

1 For compatibility with older printers, set the User Preference

Supplemental character set to the DEC Supplemental character set.

The following SCS sequences select Digital character sets as fallbacks. Since Digital reserves the right to redefine these sequences in the future to conform to ISO standards, it is recommended that conforming software not use these sequences but instead use the

Digital escape sequences in the previous table to select these sets.

239

5000 Series Programmer’s Manual

SCS

SGR

(Continued)

G0 G1 G2

SCS Fallbacks

G3 Character Set

ESC ( C

ESC ( Q

ESC ) C

ESC ) Q

ESC * C

ESC * Q

ESC + C

ESC + Q

ESC ( E ESC ) E ESC * E ESC + E

Fallback to DEC Finnish

Fallback to DEC French

Canadian

Fallback to DEC

Norwegian/Danish

ESC ( H ESC ) H ESC * H ESC + H Fallback to DEC Swedish

Error Handling

Do not invoke a 96-character set into GL. This is considered an error condition.

Select Graphic Rendition (Selecting Attributes): Selects printing attributes, including lining functions, superscript and subscript functions, and emphasis functions.

Source:

Format

Application Destination: Levels 1, 2, 3

CSI Ps ; Ps ; Ps m

CSI ? Ps Ps Ps m

Description

Selects standard attributes.

Selects Digital private attributes.

Select an attribute using standard SGR parameters as follows:

24

53

55

4

21

22

23

Ps

0

1

3

Action

Turn off all attributes, standard and private.

Turn on bold.

Turn on slant.

Turn on underline, turn off double underline

Turn on double underline, turn off underline

Turn off bold.

Turn off slant.

Turn off underline and double underline.

Turn on overline.

Turn off overline.

Chapter 8. PPL3 Plus Emulation

240

GEK-00029B

SGR

GEK-00029B

(Continued)

Select an attribute using Digital private SGR parameters as follows:

Ps

0

4

5

6

24

26

Notes to Software

Action

Turn off all private attributes (outmoded parameter.

Turn on superscript, turn off subscript.

Turn on subscript, turn off superscript.

Turn on overline (outmoded parameter).

Turn off superscript and subscript.

Turn off overline (outmoded parameter).

Parameter ?0 is provided for backwards compatibility with older printers only (outmoded parameter). Conforming software should not use this parameter. Use parameter 0 instead.

Parameters ?6 and ?26 are provided for backwards compatibility with older printers only (outmoded). Conforming software should not use these parameters. Use parameters 53 and 55 instead.

Using SGR to Select Character Attributes

You can send more than one parameter at a time, separating them with semicolons. Do not mix standard and private parameters in one command.

The printer uses the selected attribute across line and page boundaries until the attribute is turned off or until a reset or power down.

Lining Attributes

Underline, double underline, overline, and strike-through attributes affect all printable characters in the data stream, including:

• Space (SP)

• Horizontal Position Relative (HPR)

• Horizontal Position Backward (HPB)

• Horizontal Position Absolute (HPA)

SGR Select Graphic Rendition - Selecting Attributes

Tabs are riot affected.

The thickness and positioning of the lining attributes depend on the selected font.

The strike-through attribute marks characters for deletion- Legal documents often use the strike-through attribute to indicate words deleted from a previous version of the document. The printer draws a line through the marked characters, in die same manner as underline.

241

5000 Series Programmer’s Manual

SGR (Continued)

All lining attributes are contiguous relative to the baseline of the entire line, even when used on superscript or subscript text. This applies to SGR superscript and subscript only, not to Partial Line Up

(PLU) or Partial Line Down (PLD). Do not use underline with PLU and

PLD. The result may differ depending on the printer.

Lining attributes extend to cover the full Horizontal Advance

Increment (HAI) except for the first and last characters on a justified line. See Justify (JFY).

Superscript and Subscript Attributes

If superscript or subscript is requested, the printer attempts to choose a font with smaller characters. The algorithm used is similar to that used for Graphic Size Modification (GSM) of 50%, applied to the font currently in use. This results in a size reduction only if a smaller compatible font is available. The printer uses the Superscript

Vertical Offset (CFFF 3.5.3.1) field to determine the superscript offset from the baseline, and the Subscript Vertical Offset (CFFF 3.5.3.3) field to determine the subscript offset from the baseline.

Line feed distance, Graphic Size Modification (GSM), and active position are not affected by superscript or subscript.

Superscripts and subscripts cannot be nested.

Emphasis Attributes

If bold printing is selected, the printer uses a bold (darker) font from the current type family, if available. Otherwise, it uses an algorithm to produce darker characters. See Chapter 4 for more information on font selection and algorithmic transformations.

When slant printing is selected, the printer uses an italic font file, if available. Otherwise, see the Programming Supplement for more information about built-in algorithmic transformations and the slant algorithm.

Wrapping algorithms apply to the unmodified character Characters that have only the modified part extending outside the margins do not wrap.

Chapter 8. PPL3 Plus Emulation

242

GEK-00029B

SGR Select Graphic Rendition (Selecting Fonts): Selects a font for printing.

Source:

Format

Application Destination: Level 3

CSI Ps ; Ps ; Ps ; m

Description

Selects standard font .

Use as predefined or as defined by DECATFF.

Once a font has been assigned to one of the SGR font selection parameters (10-19), SGR selects that font for subsequent printing.

You can assign a font to an SGR parameter using Assign Type Family or Font (DECATFF) or you can use the default assignments. See

DECATFF for specific information on assignment.

If you do not assign a font using DECATFF, the printer uses the default assignments. See the Programming Supplement for the initial state values of SGR parameters.

If you use SGR to select a proportional font, make sure that

Proportional Spacing Mode (DECPSP) is set.

The select font command can be used anywhere in the data stream.

The selected font remains in effect until any of die following occurs:

▪ The printer receives another select font command (SGR 10-19).

▪ The font assigned to the currently selected SGR parameter is changed (DECATFF).

▪ The printer is reset or powered down.

A character set change may result in a temporary font change.

Side Effects

If the font is assigned to the selected SGR parameter by font collection plus, the printer sets Proportional Spacing Mode (DECPSP) according to byte 8 of the font ID.

GEK-00029B

243

5000 Series Programmer’s Manual

SHS Set Horizontal Spacing: Selects character spacing for monospace printing.

Source: Application

Format

Destination: Level 3

CSI Ps SP K

Description

Determines the Horizontal Advance Increment (HAI). If Proportional

Spacing Mode (DECPSP) is set, SHS has no immediate effect.

Select the SHS parameter as follows:

Ps

0

1

2

3

Centipoints

720

600

480

1200

Characters/Inch

10

12

15

6

SHS does not affect character size or horizontal tab stops.

The printer saves the HAI value upon receipt of SHS even when

DECPSP is set; however, it does not use the value until DECPSP is reset.

The HAI value chosen remains in effect until one of the following occurs:

▪ Another SHS command

▪ A Set Horizontal Pitch (DECSHORP) command

▪ A Spacing Pitch Increment (SPI) command

▪ Reset or power down

Chapter 8. PPL3 Plus Emulation

244

GEK-00029B

SnC1R/DEC*C1 C1 Transmit/Receive: Defines the type of C1 processing or encoding.

Format

Command

DECTC1

DECAC1

S7C1T

S8C1T

Sequence

ESC SP 6

ESC SP 7

ESC SP F

ESC SP G

Meaning

Process 7-bit ESC Fe sequences. If 8-bit C1 control codes are received, drop the 8t h bit and process as C0.

Process 7-bit ESC Fe sequences and 8-bit C1 control codes.

Transmit C1 control codes as ESC Fe sequences. This is the power-on state.

Transmit C1 control codes as C1 codes.

Description

These sequences define how C1 codes are encoded from the host to the printer or from the printer to the host. The sequences select whether the interface uses 8-bit encoding or 7-bit equivalent (ESC Fe) encoding. These equivalents are given in the third column of the table on page 196 .

These sequences are processed in sequence with all other data.

Therefore, it is recommended that software send these sequences before all other commands to prevent confusion.

If the printer is set to 7 data bits via a setup feature or the front panel, this sequence is ignored.

The printer recognizes either 8 bit or 7-bit equivalent encoding from the host. However, it always transmits using the 7-bit equivalent encoding.

GEK-00029B

245

5000 Series Programmer’s Manual

SPI Spacing Pitch Increment: Determines the Vertical Advance

Increment (VAI) or the Horizontal Advance Increment (HAI).

Source:

Format

Application Destination: Level 3

CSI Pn1 Pn2 SP G

Description

SPI gives maximum flexibility in adjusting character and line spacing.

If Proportional Spacing Mode (DECPSP) is set, the vertical component of SPI has no immediate effect.

Select Pn1 as follows:

Pn1

0 n

Meaning

VAI size determined by current font.

VAI size in units, depending on Positioning

Unit Mode (PUM) and Select Size Unit (SSU).

Select Pn2 as follows:

Pn2

0 n

Meaning

HAI size determined by current font.

HAI size in units, depending on PUM and

SSU.

The printer saves the HAI value upon receipt of SHS even when

DECPSP is set; however, it does not use the value until DECPSP is reset.

The RAI and VAI values chosen remain in effect until one of the following occurs:

▪ Another SPI command

▪ A Set Horizontal Pitch (DECSHORP) command

▪ A Set Horizontal Spacing (SHS) command

▪ Reset or power down

The SPI setting for vertical spacing remains the same until one of the following commands is received:

▪ Another SPI command

▪ A Set Vertical Spacing (SVS) command

▪ A Set Vertical Pitch (DECVERP) command

▪ Reset or power down

If Pn1 = 0 or Pn2 = 0, the printer uses the default vertical and horizontal spacing for the selected font See Sect-ion 3.2.1.2 for more information on font-dependent spacing.

Chapter 8. PPL3 Plus Emulation

246

GEK-00029B

SSU Select Size Unit: Selects a unit of measurement for spacing parameters.

Source:

Format

Application Destination: Level 3

CSI Ps SP I

CSI ? Ps SP I

Description

Selects a Digital private parameter.

Select an SSU parameter as follows:

Ps

2

7

?1

Action

Selects decipoints, 1/720 inch.

Selects pixels (printer-specific

Selects centipoints, 1/7200 inch

SSU selects decipoints, centipoints, or pixels as the unit for certain control functions, as noted under the individual commands in this chapter.

In some cases SSU works with Positioning Unit Mode (PUM) to determine the unit used. If PUM is reset, characters are used, regardless of the SSU setting. If PUM is set, decipoints, centipoints, or pixels are used, based on the SSU setting.

In other cases SSU is used alone, and PUM has no effect.

SSU remains in effect until the printer receives another SSU command or until reset or power down. SSU only affects sequences that follow it in the data stream.

Error Handling

Selective parameters other those shown above are ignored.

GEK-00029B

247

5000 Series Programmer’s Manual

SVS Set Vertical Spacing: Selects line spacing for monospace printing.

Source: Application Destination: Level 3

Format

CSI Ps SP L

Description

Determines the Vertical Advance Increment (VAI). If Proportional

Spacing Mode (DECPSP) is set, SVS has no immediate effect.

Select the SVS parameter as follows:

Ps

8

9

6

7

2

3

0

1

4

5

Centipoints

1200

1800

2400

600

900

1416

2136

2856

720

3600

LPI

6

4

3

12

8

6/30mm, 5mm

4/30mm, 7.5mm

3/30mm, 10 mm

12/30mm, 2.5 mm

2, ½ in.

SVS does not affect character size or vertical tab stops.

The following table shows the resulting error accumulation over 25 centimeters.

Parameter

7

8

5

6

Lines

50

33

25

100

1/300 in.

2.50

13.86

22.00

50.00

Error

Inches

1/120

1/21

1/14

1/6

Millimeters

0.2

1.0

2.0

4.0

Chapter 8. PPL3 Plus Emulation

248

GEK-00029B

TBC

VPA

Tab Clear: Clears one or all horizontal or vertical tab stops.

Source: Application Destination: Levels 1, 2

Format

CSI Ps Ps 9

Description

Select Ps as follows:

Ps

2

3

0

1

4

Meaning

Clears one horizontal tab at active column.

Clears one vertical tab at active line.

Clears all horizontal tabs.

Clears all horizontal tabs.

Clears all vertical tabs.

If Ps = 0 or Ps = 1, the tab stop is cleared if it coincides exactly with the current active position, regardless of the setting of Positioning

Unit Mode (PUM) and regardless of whether the tab stop is on the grid.

See also Horizontal Tab (HT) and Vertical Tab (VT).

Error Handling

Unrecognized parameters are ignored.

Vertical Position Absolute: Moves to a new active vertical position.

The horizontal position is unchanged. Motion occurs either up or down.

Source:

Format

Application Destination: Levels 2, 3

CSI Pn d 9/11 *** 6/4

Description

Select the VPA parameter as follows:

Pn Meaning

0 Interpreted as 1 n Number of units, depending on PUM and SSU.

Set the active vertical position to Pn units from the origin.

The active position can be moved either up or down on the page with

VPA.

If PUM is reset, VPA sets the First Character Flag If PUM is set, VPA clears the First Character Flag.

GEK-00029B

249

5000 Series Programmer’s Manual

VPA

VPB

VPR

(Continued)

Error Handling

Be aware that VPA interacts with coordinate system bounds.

Vertical Position Backward: Moves the active vertical position up by the specified number of units. The horizontal position does not change.

Source:

Format

Application Destination: Level 3

CSI Pn k

Description

Select the VPB parameter as follows:

Pn

0 n

Meaning

Interpreted as 1.

Number of units, depending on PUM and

SSU.

Error Handling

Note that this command interacts with coordinate system bounds.

If the Pn is more than the current vertical position, then the current vertical position is set to top margin and the first character flag is set.

There is no change if Pn is less than 5 decipoints.

Vertical Position Relative: Moves the active vertical position down by the specified number of units. The horizontal position does not change.

Source:

Format

Application Destination: Levels 2, 3

CSI Pn e

Description

Select the VPR parameter as follows:

Pn

0 n

Meaning

Interpreted as 1.

Number of units, depending on PUM and

SSU.

VPR leaves the First Character Flag unchanged if PUM is reset. If

PUM is set, the First Character Flag is cleared.

Chapter 8. PPL3 Plus Emulation

250

GEK-00029B

PAGE COORDINATE SYSTEM

Before PPL III commands that involve print positioning can be understood, the PPL III page coordinate system must be understood.

This section of the PPL III chapter covers the following subjects:

▪ Coordinate system model

▪ Active position, positioning controls, and advance increments

▪ Coordinate system bounds

▪ Limits of the printable area

▪ Logical page to physical sheet mapping

▪ Variable paper size mapping

▪ Minimum print area size

▪ Character adjustment using the First Character flag

▪ Partial line motion

▪ Side effects of positioning controls

▪ Conditional Form Feed

▪ Conditional Sheet Feed

▪ Page break

The page coordinate system defines a logical page. The relationship between a logical page and physical printed pages is determined by the paper size.

Coordinate System Models

There are two coordinate system models – the character cell model and the point model.

▪ Character Cell Model: A position comprises an entire character extent. The addressable increment is the entire character.

▪ Point Model: A position is a dimensionless location and the addressable increment is not directly related to characters.

GEK-00029B

251

5000 Series Programmer’s Manual

Character Cell Model

The character cell model specifies the coordinates of a character cell position as the line and character number, starting with character 1 of line 1. This is a simple model used for monospaced presentation.

The character cell model is not used for proportionally spaced characters.

Character box: The size of the character as stored in the font. This size cannot be varied by the host software.

Character cell: This is the distance from one character to another in monospaced print mode. This distance can be varied by the host software by changing the height of the current line spacing and the width of the current character spacing. The host software can set the size of the character cell to be larger than, equal to, or smaller than the character box of the font being used. When the size of the character box does not match the size of the character cell, the character is left-justified within the cell.

Point Model

In the point model, the coordinates of a print position are specified in decipoint units (exactly 1/720-inch), centipoint units (exactly

1/7200-inch), or printer-dependent pixels.

The point model is more complex than the character cell model. It requires that a particular location in the character box be specified as the origin of the character box. Subsequent point mode addressing is relative to this origin. The origin, for placement purposes, is on the baseline of the character at the left edge of the character box.

Point mode addressing is enabled by setting the Positioning Unit

Mode (PUM). Once enabled, the size of the points, or units, depends on the current setting of the Select Size Unit (SSU). The size units are decipoints or centipoints as described above.

Point Model Has Precedence

In PPL III, both models are supported. Whenever the Character Cell model is used, coordinates are converted to point positions, where the point is the intersection of the left edge of the character box and the baseline.

Origin and Extent

Origin

The page coordinate system is an X-Y system in which the positive X direction is to the right, and the positive Y direction is down. The origin in this coordinate system is (1,1) and not (0,0).

Chapter 8. PPL3 Plus Emulation

252

GEK-00029B

Printable Area

The printable area is the area on the paper where the printer can physically print. The origin may be changed using the DECOPM command. If DECOPM is reset, then the origin is at the corner of the printable area. If DECOPM is set, then the origin is near the corner of the physical page.

Unit Conversions and the Origin

Because the origin is at (1,1) and not (0,0), calculations need to take this translation into account. The formula to convert from centipoints to decipoints (and vice versa) is as follows: target = ((source-1)*ratio)+1 where target is the coordinate in the new system, source is the coordinate in the old system, and ratio is the size ratio between the two measurement units.

For example, the coordinate system origin is at (1,1) in pixels, decipoints, or centipoints. For a 300 dpi printer, the next diagonal pixel is at (2,2) in pixel units, but at (25,25) in centipoints. Similarly, a decipoint coordinate of (2,2) is at (11,11) in centipoints.

Positioning and Movement

Active Horizontal Position: This is the horizontal position where printing will occur next. It is updated after each print operation.

Active Vertical Position: This is the vertical position where printing will occur next. It is updated after each print operation.

Horizontal Advance Increment (HAI): This is added to the previous

Active Horizontal Position to determine the next Active Horizontal position at the conclusion of a print operation. The classes of HAI are:

▪ Fixed

▪ Font-dependent

▪ Proportional

Vertical Advance Increment (VAI): This is added to the previous

Active Vertical Position to determine the next Active Vertical position at the conclusion of a print operation. The two classes of VAI are:

▪ Fixed

▪ Font-dependent

GEK-00029B

253

5000 Series Programmer’s Manual

Horizontal Advance Increments

Fixed HAI

Fixed horizontal motion does not vary from character to character or font to font. The HAI is explicitly defined by control functions.

A fixed HAI is selected by any of the following:

▪ Pitch Select Mode (DECPSM) reset, and Set Horizontal Pitch

(DECSHORP) with last valid Ps ≠ 0

▪ Spacing Increment (SPI) with last valid Pn2 ≠ 0

▪ Set Horizontal Spacing (SHS) using any valid Ps

Control

Function

Autowrap

Backspace

Carriage

Return

Cursor Up

Graphics

Carriage

Return

Graphics

Next line

Form Feed

Horizontal

Position

Absolute

Horizontal

Position

Backward

Horizontal

Position

Relative

Horizontal

Tab

Index

Line Feed

Next Line

Partial Line

Down

Type

Relative

Relative

Absolute

Relative

Absolute

Relative

Absolute

Absolute

Relative

Relative

Absolute

Relative

Relative

Relative

Special

Margin effect

-

Not possible beyond left margin

-

Not possible to move above top margin

Cursor moves back to

Graphics left margin (left margin where graphics starts).

Forces Graphics carriage return, New line beyond bottom margin leads to Form

Feed

-

All

All

Parameter Used

All

All

All

Parameter value more than 5 decipoints

All

Flags

Clears PLU/PLD count and

Superscript/Subscript count.

Active only if right margin flag is cleared

Clears RMF

FCF Sets if cursor forced above top margin

-

-

Movement is possible with in left and right margin.

Maximum backward movement possible is up to left margin.

New position beyond right margin leads to autowrap if autowrap is ON.

If there is no tabs in the tab table or no valid tab between the current position and RM then HT brings the cursor to right margin (RM).

IND in bottom margin leads to FF

LF in bottom margin leads to

FF

NEL in bottom margin leads to FF

Can go down to one PLD position below bottom margin

All

All

All

All

All

All

All

All

(Minimum

PLU/PLD count value is -255)

Sets FCF

Clears RMF

Clears PLU/PLD and

Superscript/Subscript

Pn less than right margin

Resets RMF

Other Pn values Sets the RMF

Command ignored if RMF is

Set

If autowrap OFF then new position beyond right margin

Sets RMF

HT beyond right margin Sets

RMF

Clears superscript/subscript and PLU/PLD count

Clears superscript/subscript and PLU/PLD

Clears RMF

Clears superscript/subscript and PLU/PLD

Decrements the PLU/PLD count

Chapter 8. PPL3 Plus Emulation

254

GEK-00029B

Control

Function

Partial Line

Up

Reverse

Index

Vertical

Position

Absolute

Vertical

Position

Backward

Vertical

Position

Relative

Vertical Tab

Type

Special

Margin effect

Can go up to one PLU position above top margin

Parameter Used

All

(Maximum

PLU/PLD count value is 255)

All

Flags

Increments the PLU/PLD count

Relative

Absolute

Can go up to top margin

Maximum vertical movement possible is up to bottom margin. Resulting vertical position more than bottom margin will set the active vertical position to bottom margin

Can go up to top margin.

All

Clears PLU/PLD count and

Superscript/Subscript count.

Resulting vertical position above top margin Sets FCF.

Clears PLU/PLD count and

Superscript/ Subscript count..

In RESET mode command sets the FCF flag.

Relative

Relative Performs the FF if resulting vertical position is below bottom margin.

All

All

Clears PLU/PLD count and

Superscript/Subscript count.

Sets the FCF if the resulting vertical position is above top margin.

Clears PLU/PLD count and

Superscript/Subscript count.

In RESET mode command sets the FCF flag.

Clears PLU/PLD count and

Superscript/Subscript count.

Sets the FCF

Absolute If there is no tabs in the tab table or no valid tab between the current position and BM then VT brings the cursor to bottom margin (BM).

Bounds

All

▪ Page Home Line is same as Top Margin Line

▪ Page End Line is same as Bottom Margin Line

▪ Line Home Position is same as Left Margin Position

▪ Line End Position is same as Right Margin Position

GEK-00029B

255

5000 Series Programmer’s Manual

SIXEL GRAPHICS

The Sixel Graphics protocol provides the ability for the printer to receive and print black and white bitmap data at various sizes to create graphics images.

Terminology and Concepts

The bitmap data for producing a graphics image is divided into horizontal scan lines, each of which is six bitmap el ements high. The term for the bitmap data is raster . Prior to sending the data, the user can define horizontal and vertical spacing between elements. The smaller the spacing, the finer the grain and the higher the quality of the image will be.

Pixels A pixel is the logical rectangular image area defined by each bit of graphics data that you send.

Sixel A group of six pixels arranged vertically and sent as a group.

Grid The positions on the page where the printer places pixels.

Pixel Aspect Ratio The relationship between the length of the pixel to its width. For example, a square pixel has a pixel aspect ratio of 1 to 1 (or 100 to

100). A pixel twice as high as it is wide has a pixel aspect ratio of 2 to

1 (or 200 to 100).

Pixel Spot

Dot

The actual area imaged for each pixel. The shape and size of a pixel spot is printer-dependent and is only approximately related to grid size.

The smallest unit that can be displayed on the printer. Several dots may be required to represent a single pixel as a pixel-spot.

Picture Definition The data describing the image, including grid size, pixel aspect ratio, and the encoded raster. The picture definition does not include formatting information, such as position or actual presentation size.

Sixel Control Codes Within the picture definition, sixel control codes provide additional information beyond the encoded raster, such as line breaks.

Chapter 8. PPL3 Plus Emulation

256

GEK-00029B

General Sixel Graphics Operation

Sixel Graphics printing consists of setting the context and attributes for the pixels and then printing the received pixels in adjacent grid positions. The following are essential elements of the Sixel Graphics print process.

▪ Selection of Sixel Graphics using the Sixel Printer Control String.

▪ Setting of the graphics active position and left margin.

▪ Advancing the graphics active position to the next horizontal grid position.

▪ The String Terminator (ST) control character causes the printer to exit Sixel Graphics mode and return to text mode.

A Graphics Carriage Return (DECGCR) command or a Graphics New

Line (DECGNL) command moves the graphics active position to the graphics left margin. The Graphics New Line command also moves the graphics active position down to the next graphics line (six vertical grid positions below the current active position.)

Horizontal and vertical directions follow the text orientation. The printer images sixels from left to right, top to bottom.

GEK-00029B

257

5000 Series Programmer’s Manual

Sixel Graphics Commands

DECGCR ($)

DECGNL (-)

Graphics Carriage Return: Moves the graphics active horizontal position to the graphics left margin.

Format

$

Graphics Next Line: Moves the graphics active position to the graphics left margin and down one line of sixels (six actual grid units).

Format

Description

This command is affected by page coordinate bounds.

Chapter 8. PPL3 Plus Emulation

258

GEK-00029B

DECGRA (") Set Raster Attributes: Defines the pixel aspect ratio, overriding Ps1 of the protocol selector. DECGRA also defines the extent (size) of the raster. Level 3 printers ignore the extent parameters.

Format

“ Pn1 ; Pn2 ; Pn3 ; Pn4

Description

This command must precede picture-definition information requiring an aspect ratio: sixel printable characters (sixel data, 3/15-7/14), the

Graphics New Line (DECGNL) command and, by extension, Graphics

Repeat Introducer (DECGRI) and Graphics Carriage Return

(DECGCR). Otherwise, this command is ignored. If multiple DECGRA sequences are received, only the last one is accepted.

Parameter Description

Pn1

Pn2

Pn3

Pn4

Pixel aspect ratio numerator

Pixel aspect ration denominator

Horizontal extent

Vertical extent

Pn1 describes the vertical size of a pixel in an arbitrary distance unit.

Pn2 describes the horizontal size of a pixel in the same distance unit.

For example, to define a pixel to be half as wide as it is tall, send 200;

100 for Pn1 and Pn2.

The pixel aspect ratio times the horizontal grid size (Ps3 of the protocol selector) yields the vertical grid size.

Pn3 and Pn4 define the horizontal and vertical extent, respectively, in pixels. Level 3 printers ignore these parameters. Page composition software can include these parameters for compatibility with video terminals.

Error Handling

If Pn1 or Pn2 is greater than 32K, the value 32K is used. If Pn1 or

Pn2 is 0 or omitted, the printer sets it to 1.

The maximum aspect ratio supported by the printer is 1: 10 or 10: 1

(after reducing the ratio to the lowest possible format).

The maximum parameter implemented for DECGRA is 999 (decimal).

If the Set Raster Attributes sequence is received after a sixel printable character or another sixel control code is received, the command is ignored.

Any additional parameters received are ignored.

GEK-00029B

259

5000 Series Programmer’s Manual

DECGRI (!) Graphics Repeat Introducer: Repeats the following sixel a specified number of times.

Format

! Pn

Description

The printer repeats the sixel following the DECGRI sequence Pn times.

The repeat function supports parameters large enough to cover the largest print line at the smallest grid size, up to 32K.

The following examples illustrate repeat sequences:

! 1 0 ?

! 6 @

Error Handling

Repeats 10 graphics spaces

Repeats 6 patterns of top dot

2

3

4

Ps1

0

1

7

8

5

6

9

>9

A repeat count of zero or omitted is treated as a repeat count of one.

Values that exceed the maximum value are treated as the maximum value. If no sixel printable character follows the repeat count, the repeat count is ignored.

If a graphics control code is received within a DECGRI sequence, the repeat sequence is ignored. This includes sequences in the range 21 to 2F, 3A, and 3C to 3E. If multiple parameters are received

(separated by semicolons), the printer uses the first parameter and ignores the rest.

Aspect

Ratio

200:100

200:100

450:100

300:100

250:100

183:100

150:100

130:100

112:100

100:100

200:100

50

5000 Series

Appr. Horz.

Grid Size

True Vert.

Grid Size

100

50 100

22

33

40

100

100

100

54

66

77

89

100

50

100

100

100

100

100

100

PPLIII

Appr. Horz.

Grid Size

144

True Vert.

Grid Size

72

144 72

324

216

180

72

72

72

132

108

94

81

72

144

72

72

72

72

72

72

Chapter 8. PPL3 Plus Emulation

260

GEK-00029B

APPENDIX A. USING THE HEX DUMP

A printout of hexadecimal data is useful primarily to application programmers or service representatives as a debugging or troubleshooting tool.

With the printer Offline , enable the hex dump mode of printing by pressing:

▪ ◄ or ► (left or right) menu browse pushbutton until Set Up is displayed in the lower right corner of the LCD

▪ ▼ (down) menu browse pushbutton

▪ ◄ or ► (left or right) menu browse pushbutton until Select Filter is displayed in the lower right corner of the LCD

▪ ▼ (down) menu browse pushbutton

▪ ◄ or ► (left or right) menu browse pushbutton until appropriate

( Serial , Parallel (1284) , or Expansion 1 or Expansion 2 ) port is displayed in the lower right corner of the LCD

▪ ▼ (down) menu browse pushbutton

▪ ◄ or ► (left or right) menu browse pushbutton until Hex Dump is displayed in the lower right corner of the LCD

▪ Select pushbutton

Hex dump causes data received from the host to be printed out in

ASCII form. A sample is shown below.

30 31 32 33 34 35 36 37 38 39 41 42 43 44 45 46

OD 0A 54 48 45 20 54 57 4F 20 44 4F 54 53 20 59

4F 55 20 4A 55 53 54 20 53 41 57 20 57 45 52 45

20 41 20 52 45 53 55 4C 54 20 4F 46 20 41 20 43

41 52 52 49 41 47 20 52 45 54 55 52 4E 20 41 4E

44 20 4C 49 4E 45 20 45 45 45 44 2E 0D 0A 41 4C

4C 20 43 4F 4E 54 52 4F 4C 20 43 48 41 52 41 43

54 45 52 53 20 41 52 45 20 52 45 50 52 45 53 45

4E 54 45 44 20 42 59 20 44 4F 54 53 20 54 48 49

53 20 44 4F 54 20 1B 20 49 53 20 41 4E 20 45 53

43 41 50 45 20 43 4F 44 45 2E 0D 0A 41 20 44 4F

54 20 54 4F 20 54 48 45 20 52 49 47 48 54 20 4F

46 20 41 20 48 45 58 20 43 4F 44 45 20 4D 45 41

4E 53 20 54 48 41 54 20 54 48 45 20 50 49 20 4C

45 41 44 20 57 41 53 20 53 45 54 20 41 54 20 54

48 41 54 20 54 49 4D 45 2E 0D 0A 53 45 45 20 54

48 45 20 44 4F 54 53 20.20.20.20.49 4E 20 54 48

0123456789ABCDEF

..THE TWO DOTS Y

OU JUST SAW WERE

A RESULT OF A C

ARRIAG RETURN AN

D LINE FEED...AL

L CONTROL CHARAC

TERS ARE REPRESE

NTED BY DOTS THI

S DOT . IS AN ES

CAPE CODE...A DO

T TO THE RIGHT O

F A HEX CODE MEA

NS THAT THE PI L

EAD WAS SET AT T

HAT TIME...SEE T

HE DOTS IN TH

The hexadecimal printout is shown on the left side and the equivalent plain text is shown on the same line at the right. Exceptions: ASCII control code characters below hexadecimal 20 are printed out as periods on the right side. An SP or hexadecimal 20 causes a blank apace in the equivalent print position.

By examining the printout, you can see what data was actually sent to the printer.

261

GEK-00029B 5000 Series Programmer’s Manual

APPENDIX B. FONT PRINT SAMPLES

The following samples were printed at 10 characters per inch (CPI) at

6 lines per inch (LPI).

HIGH SPEED FONT

GOTHIC DRAFT – DATA PROCESSING FONT

GOTHIC NEAR LETTER QUALITY

CHARACTER GRAPHICS FONT

Appendix B. Font Samples

262

GEK-00029B

CORRESPONDENCE FONT

( BETTER QUALITY THAN DRAFT-BETTER SPEED THAN NLQ )

OCR-A FONT

OCR-B FONT

COURIER NLQ FONT

ITALIC NLQ FONT

GEK-00029B

263

5000 Series Programmer’s Manual

HIGH SPEED 2

Appendix B. Font Samples

264

GEK-00029B

APPENDIX C. POSTNET BAR CODES

ENTERING AND EXITING POSTNET BAR CODES

Selecting POSTNET Style Bar Codes

The following sequence selects the style of bar code to be printed. In this case POSTNET is chosen:

Mnemonic:

BASIC: or simply:

ESC [50;p2;p3;p4;p5;p6;p7;p8;p9;p10}

LPRINT CHR$(27);''[50;9;1;2;6;2;6;2;0;0}"

ESC [50}

LPRINT CHR$(27);"[50}"

Parameters p2 - p10 do not affect POSTNET but if they are sent. they will be stored and used if another bar code style is selected.

POSTNET symbols can neither be rotated nor have their size or density modified.

Before the printer can print input data as POSTNET bar code symbols, the bar code mode must be both selected and activated.

There are two ways for this to be accomplished depending on the setting of ANSI emulation option 1.

ANSI emulation option 1 is used to enable the SI (shift In) and SO

(shift out) ASCII codes to activate and deactivate special mode functions. In this case, the special mode function is bar codes. With

ANSI emulation option 1 in (active), code SO will turn on or activate the bar code mode. SI will turn bar codes off.

Enter the POSTNET bar code mode of printing with the following control sequence sent by the host:

Mnemonic: ESC [ 3 t

BASIC: LPRINT CHR$(27);"[3t";";

Data sent after the above sequence is interpreted and printed as

POSTNET bar code symbols.

Exit POSTNET bar code mode using:

Mnemonic: ESC [ O t

BASIC:

Mnemonic:

BASIC:

LPRINT CHR$(27);"[0t;

ESC [3 t

LPRINT CHR$(27);"[3t";

Selects the bar code special mode.

Mnemonic: SO

BASIC: LPRINT CHR$(14);

Activates POSTNET bar codes and prints received data as POSTNET symbols (only after it has been selected by ESC[3t above).

265

GEK-00029B 5000 Series Programmer’s Manual

Mnemonic:

BASIC:

<SI>

LPRINT CHR$(15);

Deactivates bar codes and allows printing of normal text. (POSTNET is still selected but not active. )

Mnemonic: <ESC> [0t

BASIC: LPRINT CHR$(27);"[0t; Deselects bar codes.

When an ESC[0t is received before the Al code, bar codes are both deactivated and deselected.

Valid Characters

Only certain characters are valid as data within the POSTNET bar code escape sequence. Any other character causes the error symbol

(XOX) to be printed instead. Valid characters are the numerals 0-9.

The dash (-) will be ignored if it is found in character position six or greater to allow processing of ZIP+4 data (22980-1999).

Characters acting as delimiters (space, comma, and horizontal tab) are allowed to separate and add space between consecutive POSTNET symbols.

Delimiters (Spacing between codes)

Delimiters are used to separate and add space between POSTNET codes without exiting bar code printing.

A comma will add no additional space between symbols. The distance between two symbols will be the quiet zone (0. 4 inch).

A space character will add 0. 1 inch of space between symbols. One space character and the quiet zone will equal a total of 0. 5 inch.

A horizontal tab will add the appropriate number of empty spaces to go to the next tab before starting the symbol. Horizontal tabs in

POSTNET are based on 10 columns. or text characters, per inch (10

CPI).

Incorrect Number of Digits

If less than five digits for a ZIP Code or nine for a ZIP+4 are received, the symbol will be printed with the missing digits replaced by error symbols.

If more than six digits (ZIP and correction digit) are received, the data will be treated as a Z1P+4 or ZIP+6 code. If less digits than a ZIP+4 or

ZIP+6 are received, error symbols will be printed to fill the symbol.

Note: The U. S. Postal Service may implement ZIP+6 at a later date.

When more digits are received than are required for a valid symbol, the symbol will be terminated, printed, and a new symbol started.

Appendix C. Postnet Bar Codes

266

GEK-00029B

Restrictions

Printer option strap 13 in General Printer Options, paper position reset to top of bar code after printing, is ignored while using

POSTNET. (See Appendix D, General Printer Options, Group 2).

If the symbol exceeds the right margin, the symbol is cut off at the margin.

POSTNET codes cannot be used on the same line as the high speed font.

Exit the bar code mode before sending other control codes or escape sequences.

GEK-00029B

267

5000 Series Programmer’s Manual

APPENDIX D. DESCRIPTION OF STRAPPING OPTIONS

This appendix contains descriptions for firmware strap settings, which are changed using the Set Up menu.

Appendix D. Descriptions of Strapping Options

268

GEK-00029B

GENERAL PRINTER OPTIONS DEFINITIONS

I/F Hardware Straps

H Bits

01-32

01

Function

Prime

If Enabled

High = Buffer Clear.

If Disabled

02

03

04

05-06

07

08

09

Interrupt

DEL

DEL

Reserved.

Underline character

PI Lead

ACK lead

On all Control Codes.

Does not cause an Interrupt.

Does not cause Prime.

Treated as CR.

Causes Interrupt.

Does not reflect

ONLINE/LOCAL status. 05 must be enabled.

Low = Buffer Clear.

Disabled on all Control Codes, except

LF, VT, FF, CR, DC1 and DC3.

Causes an Interrupt.

Causes Prime.

Printed.

Does not cause Interrupt.

Reflects ONLINE/LOCAL status.

10

11

12

13

14

15

16

17

18

19

Character conversion to space.

CR

FF

LF

VT

DC3

DC1

Busy

Busy/Demand per character.

Software control of

Busy.

Enabled. (See 41-48.)

Not decoded.

Not decoded.

Not decoded.

Not decoded.

Not decoded.

Not decoded.

Does not reflect ACK.

Enabled.

Disabled

Disabled.

Generate an Interrupt.

Generate an Interrupt.

Generate an Interrupt.

Generate an Interrupt.

Generate an Interrupt.

Generate an Interrupt.

Reflects ACK.

Disabled.

Enabled.

20

21

22

27

28

29

30

31

23

24

25

26

32

H Bits

33-64

33

Busy

Busy

Busy

ACK

ACK

Data leads

Busy is active

PI is active

PI

STB is active

SELECT is active

PO is active

FAULT is active

Function

Does not reflect

(ONLINE/LOCAL) FAULT/PO status.

Does not reflect (FAULT)

ONLINE/LOCAL status.

Does not reflect (PO)

ONLINE/LOCAL/PO status.

Does not reflect PO.

Does not reflect FAULT.

0-7 are active high.

High.

High.

Enabled.

High.

High.

High.

High.

If Enabled.

Reflects (ONLINE/LOCAL) FAULT/PO status.

Reflects (FAULT) ONLINE/LOCAL status.

Reflects (PO) ONLINE/LOCAL/PO status.

Reflects PO.

Reflects FAULT.

0-7 are active low.

Low.

Low.

Disabled.

Low.

Low.

Low.

Low.

If Disabled

34-35

36-37

38-40

41-48

49-64

Demand delay.

Set ACK delay from

Strobe.

Disabled.

Enabled.

34

Disable

Disable

Enable

Enable

36

Disable

35

Disable

Enable

Disable

Enable

37

Disable

Delay

None

1 µsec

2 µsec

3 µsec

Width

None

Set ACK Pulse

Width.

Disable

Enable

Enable

Enable

Disable

Enable

1 µsec

2 µsec

3 µsec

Reserved.

Used with strap 10 to select space character substitution. 41 corresponds with Bit 1 of the character code.

Reserved.

GEK-00029B

269

5000 Series Programmer’s Manual

LEGACY PARALLEL SOFTWARE STRAP DEFINITIONS

I/F Software Straps

Bits

01-32

Function

01-03 Reserved for future use.

04 Prime on Select.

05 No Fault on PO or Deselect.

06-07 Reserved for future use.

08 8 bit Data.

09-32 Reserved for future use.

Bits

33-64

Function

33-39 Reserved for future use.

40 Parallel timeout.

41-64 Reserved for future use.

If Enabled

Disabled.

Disabled.

Enabled.

If Enabled

Disabled.

If Disabled

Enabled.

Enabled.

Bit 8 equals 0.

If Disabled

Enabled.

Appendix D. Descriptions of Strapping Options

270

GEK-00029B

EMULATION OPTION DESCRIPTIONS

04

05

06

Options

01

02

03

ANSI (4800)

Meaning if Active If Active

Oversize and Bar code Select via SI/SO.

RCC mode

ESC C control

Reserved.

Reserved.

GENCIC control

Reset RCC mode.

Disable ESC C sequence.

Set (80-8F as control).

07

08

09

10

11-32

GENCS2 control

Line grid control

Dbl strike/shadow control

Character

Graphics/Postnet

Reserved.

Set (80-9F, 15, print).

LF = next LPI grid

Double Strike

Char Graphics in SCR[2] esc[12m.

ANSI (4410)

If Active

Select..

If Inactive

Ignore SI/SO.

Options

01

02

03

04

05

06

07

08

09

10

11

12

13-16

Function

SI/SO selects Oversize and Bar code

Reserved.

ESC C control

Reserved.

Reserved.

GENCIC control

GENCS2 control

Line grid control

Dbl strike/shadow control

Character

Graphics/Postnet

Bit 8 control

Reserved.

Alternate Font

Selection Defaults

Disable ESC C sequence.

13

Disable

Enable

Disable

Enable

Disable

Enable

Disable

Enable

Disable

Enable

Set (80-8F as control).

Set (80-9F, 15, print).

LF = next LPI grid.

Double Strike

Char Graphics in SCR[2] esc[12m.

8th bit is alternative font..

14

Disable

Disable

Enable

Enable

Disable

Disable

Enable

Enable

Disable

Disable

15

Disable

Disable

Disable

Disable

Enable

Enable

Enable

Enable

Disable

Disable

If Inactive

No selection via

SI/SO

Set RCC mode.

Reset when ESC C is received.

Reset when ESC C is received.

16

Disable

Disable

Disable

Disable

Disable

Disable

Disable

Disable

Enable

Enable

Reset (80-9F per GENCS2).

Reset (80-9F ignore).

LF = LF.

Shadow.

Canadian. Postnet in SGR[2] esc[12m.

8th bit selects 256 character offset.

SGR

10

17

18

19

11

12

13

14

15

16

Reset (80-9F per

GENCS2).

Reset (80-9F ignore)

LF = LF

Shadow.

Canad. Postnet in

SGR[2] esc[12m.

Font Name

Gothic Draft

Gothic Draft

Char Graphics

Gothic NLQ

Courier NLQ

High Speed

OCR-A NLQ

OCR-B NLQ

Italics NLQ

Correspondence

17-32 Reserved

GEK-00029B

271

5000 Series Programmer’s Manual

08

09

10

11

12

13

14-32

Options

01

02

03

04

05

06

07

Proprinter III XL

Function

RESERVED (Slashed

Zero)

If Active If Inactive

Copy of ENG_OP_SLASH_ZERO from GenPtrOpts

Strap 3).

Line Length 8 inches.

13.6 inches.

Condensed Print

Initial Code page

Character Set Select default

Default Form Length

12 cpi.

Multinational.

Character set 2.

20 cpi.

USA.

Character set 1.

Reserved

Reserved

NLQ II

Reserved

Reserved

Ignore Esc I

Simulate 136

12” Form.

11” Form.

Copy of AUTOLF_ON_CR from Print Control

Menu..

Copy of AUTOCR_ON_VM from Print Control

Menu.

Can use mulitnational.

No multinational.

Copy of AUTOCR_ON_LF from Print Control

Menu..

Copy of AUTOCR_ON_FF from Print Control Menu.

Ignore Esc I command

Simulate 136 columns.

Process Esc I command

Standard 132 columns.

Reserved

Appendix D. Descriptions of Strapping Options

272

GEK-00029B

Options Function

01

02

03

04

Condensed

Print.

Italics font control

Default Print

Quality

Default Perf

Skip

05

06

07-32

Ignore Esc I

136 Col.

Reserved

EPSON FX286e

If Active If Inactive

Disabled.

Enabled

Codes 128-255 are Code

Page.

Default print quality is

NLQ.

1 inch perf skip default.

Codes 128-255 are Italics.

Default print quality is draft.

No perf skip default.

Ignore Esc I command

Simulate 136 Columns

Process Esc I command

Standard 132 Columns.

GEK-00029B

273

5000 Series Programmer’s Manual

Options

01

02

03

04

05

06-32

Printronix Pseries

Function

Overstrike

ACK selects LPI for 1 line

If Active

Enabled.

10.3 LPI.

VFU load PI required for VFU load.

Defines codes 80 to 9F

Backspace

Reserved.

80 to 9F hex are printable.

= Backspace.

If Inactive

Disabled.

8 LPI.

No PI required for VFU load.

80 to 9F hex are control codes.

= Double High.

Options

01

02

03-12

Printronix P300/600

Function If Active

Edit Line (Carriage Return) = Carriage Return.

Restrict LPI

Reserved.

To 8.

13 14 15

13-16

Alternate Font Selection

Defaults

Disable

Enable

Disable

Enable

Disable

Enable

Disable

Enable

Disable

Disable

Enable

Enable

Disable

Disable

Enable

Enable

Options Function

01

02-32

ISO Latin9

Reserved.

Disable Disable Disable

Enable Disable Disable

17-32 Reserved

Options Function

01 Unsolicited Reporting

02

Dec LG Plus

Unsolicited status report size

If Active

Enabled (See strap S-2).

Extended unsolicited reports.

03

04-32

User Preference

Reserved.

= Latin 9 (Euro Ready)

Dec PPL3

If Active

Enabled.

Disable

Disable

Disable

Disable

Enable

Enable

Enable

Enable

If Inactive

Edit mode.

Non-restricted LPI.

16

Disable

Disable

Disable

Disable

Disable

Disable

Disable

Disable

Enable

Enable

SGR

14

15

16

17

18

19

10

11

12

13

Font

Name

Gothic

Draft

Gothic

Draft

Char

Graphics

Gothic

NLQ

Courier

NLQ

High

Speed

OCR-A

NLQ

OCR-B

NLQ

Italics

NLQ

Correspon dence

If Inactive

Disabled (default).

Brief unsolicited reports. (default).

= DEC Supplemental

(default).

If Inactive

Disabled.

Appendix D. Descriptions of Strapping Options

274

GEK-00029B

APPENDIX E. DSC CODE CHARTS

GEK-00029B

275

5000 Series Programmer’s Manual

Appendix E. DSC Code Charts

276

GEK-00029B

GEK-00029B

277

5000 Series Programmer’s Manual

Appendix E. DSC Code Charts

278

GEK-00029B

GEK-00029B

279

5000 Series Programmer’s Manual

Appendix E. DSC Code Charts

280

GEK-00029B

GEK-00029B

281

5000 Series Programmer’s Manual

Appendix E. DSC Code Charts

282

GEK-00029B

GEK-00029B

283

5000 Series Programmer’s Manual

Appendix E. DSC Code Charts

284

GEK-00029B

GEK-00029B

285

5000 Series Programmer’s Manual

Appendix E. DSC Code Charts

286

GEK-00029B

GEK-00029B

287

5000 Series Programmer’s Manual

Appendix E. DSC Code Charts

288

GEK-00029B

GEK-00029B

289

5000 Series Programmer’s Manual

Appendix E. DSC Code Charts

290

GEK-00029B

GEK-00029B

291

5000 Series Programmer’s Manual

Appendix E. DSC Code Charts

292

GEK-00029B

GEK-00029B

293

5000 Series Programmer’s Manual

Appendix E. DSC Code Charts

294

GEK-00029B

GEK-00029B

295

5000 Series Programmer’s Manual

Appendix E. DSC Code Charts

296

GEK-00029B

GEK-00029B

297

5000 Series Programmer’s Manual

Appendix E. DSC Code Charts

298

GEK-00029B

GEK-00029B

299

5000 Series Programmer’s Manual

Appendix E. DSC Code Charts

300

GEK-00029B

GEK-00029B

301

5000 Series Programmer’s Manual

Appendix E. DSC Code Charts

302

GEK-00029B

GEK-00029B

303

5000 Series Programmer’s Manual

Appendix E. DSC Code Charts

304

GEK-00029B

GEK-00029B

305

5000 Series Programmer’s Manual

Appendix E. DSC Code Charts

306

GEK-00029B

GEK-00029B

307

5000 Series Programmer’s Manual

Appendix E. DSC Code Charts

308

GEK-00029B

GEK-00029B

309

5000 Series Programmer’s Manual

INDEX

A

ANSI

Back Space <BS> .................................................... 14

Bar Codes ................................................................ 46

Default Characteristics ........................................ 50

Entering and Exiting............................................ 46

Error Symbol ....................................................... 52

Horizontal Spacing .............................................. 54

Horizontal Tabs ................................................... 59

Human-Readable Line (HRL) ............................. 50

Vertical................................................................ 57

Bell <BEL>.............................................................. 14

Carriage Return <CR> ............................................. 14

Commands

Begin Font Load <BFL> ..................................... 35

C1 Control Code Mode - PC Set 1 <GENC1C>.. 34

Character Map Load ............................................ 23

Character Set 2 Mode - PC Set 2 <GENSC2>..... 34

Device Control String <DCS>............................. 40

Download Font Control <GENDFC>.................. 35

Emulation Control <GENEMU>......................... 21

Forms Definition <GENFD>............................... 28

Graphic Size Modifications <GSM> ................... 31

Horizontal and Vertical Position <HVP> ............ 26

Horizontal Position Absolute <HPA> ................. 27

Horizontal Position Backward <HPB>................ 26

Horizontal Position Relative................................ 25

Horizontal Tab Set <HTS>.................................. 28

Line Feed New Line Mode <LNM>.................... 34

Multiple Horizontal Tab Set <GENHTS> ........... 30

Multiple Vertical Tab Set <GENVTS> ............... 30

Partial Line Down <PLD>................................... 25

Partial Line Up <PLU> ....................................... 25

Proportional Print Mode <GENPRM> ................ 34

Repeat Text or Dot Graphics Character <REP> .. 40

Reset Mode <RM> .............................................. 34

Select Graphic Rendition <SGR>........................ 32

Select Graphics Mode <GENGRM> ................... 41

Select National Characters <GENSNC> ............. 22

Self-Test <GENTST>.......................................... 20

Set Left/Right Margins <GENSLR> ................... 29

Set Mode <SM> .................................................. 34

Spacing Increment <SPI>.................................... 32

Tab Clear <TBC>................................................ 28

Vertical Position Absolute <VPA> ..................... 26

Vertical Position Backwards <VPB> .................. 27

Vertical Position Relative.................................... 26

Vertical Tab Set <VTS>...................................... 28

VFU Channel Command <GENVFU>................ 44

Control Codes .......................................................... 14

Control Sequence Introducer (CSI).......................... 19

Control Sequence Introducer <CSI>........................ 14

Device Control 1 <DC1>......................................... 14

Device Control 3 <DC3>......................................... 14

Electronic Vertical Format Unit............................... 42

ESC [ .............

See CSI (Control Sequence Introducer)

Index

310

ESC ] ........................

See Operating System Command

Escape <ESC>..........................................................14

Escape Sequence Directory ......................................16

EVFU ..................

See Electronic Vertical Format Unit

Channel control code ...........................................43

EVFU, Downloading................................................42

Font Handling and Enhancements............................31

Form Feed <FF> ......................................................15

Graphics ...................................................................36

Eight-Bit Graphics ...............................................39

Six-Bit Graphics ..................................................36

Grapics

Dot Patterns and Densities ...................................36

Horizontal Tab <HT>...............................................15

Line Feed <LF>........................................................15

Margins and Tabs.....................................................28

Operating System Command <OSC> ......................19

Oversize Character Font...........................................60

Entering and Exiting ............................................60

Printer Control Strap............................................64

Size ......................................................................61

Paper and print position movements ........................25

Reset to Initial State <RIS>......................................19

Shift In <SI> ............................................................15

Shift Out <SO> ........................................................15

String Terminator <ST> ...........................................19

ANSI (4410) Emulation Options Table ......................271

ANSI (4800) Emulation Options Table ......................271

Appendix E. Font Print Samples.................................262

C

Control Codes.................................................................8

control sequence introducer ............................................9

D

DEC LG Plus Emulation Options Table .....................274

DEC PPL3 Emulation Options Table .........................274

decipoints......................................................................10

E

Emulation Option descriptions ...................................271

Epson FX-2863

Additional escape sequences ..................................125

Epson FX-286e

Commands

Absolute print position, set ................................139

Code page, assign to one of four variables.........147

Code page, assign to variable 1..........................148

Code page, select ...............................................147

Condensed print mode, select ............................135

Double-high printing, turn on/off.......................143

Double-strike mode, cancel ...............................141

GEK-00029B

Double-strike mode, select ................................ 141

Double-wide printing, cancel............................. 142

Double-wide printing, select.............................. 142

Elite pitch, select ............................................... 135

Emphasized print, cancel ................................... 141

Emphasized print, select .................................... 141

Font style, select ................................................ 144

Graphics, 9-pin, select ....................................... 154

Graphics, high-speed double-density, set .......... 152

Graphics, low-speed double-density, set ........... 152

Graphics, mode, reassign................................... 153

Graphics, mode, select....................................... 153

Graphics, normal density, set............................. 152

Graphics, quadruple-density, set........................ 152

Half-speed print, turn on/off .............................. 140

Horizontal tab stops, set .................................... 136

Initialize printer ................................................. 149

Intercharacter spacing, set ................................. 135

International character set, select....................... 146

Italic print, cancel .............................................. 143

Italic print, select ............................................... 143

Left margin, set.................................................. 133

Line spacing, 1/6 inch, set ................................. 134

Line spacing, 1/8 inch, set ................................. 134

Line spacing, 7/72 inch, set ............................... 134

Line spacing, n/216 inch, set ............................. 134

Line spacing, n/72 inch, set ............................... 134

Master print mode, select................................... 144

MSB (most significant bit) control, cancel ........ 149

MSB (most significant bit) control, set to 0....... 149

MSB (most significant bit) control, set to 1....... 149

MSB (most significant bt) control, set............... 149

NLQ or draft printing, select ............................. 144

Page length in inches, set................................... 132

Page length in lines, set ..................................... 132

Paper movement ................................................ 138

Pica pitch, select ................................................ 135

Printable code area expansion ........................... 145

Printable code area expansion, select ................ 143

Printable code page expansion, cancel .............. 143

Proportional print mode, on/off ......................... 135

Relative print position, set ................................. 140

Right margin, set ............................................... 133

Skip over perforation, cancel............................. 132

Skip over perforation, set................................... 132

Special character printing .................................. 145

Superscript/subscript printing, cancel................ 142

Superscript/subscript printing, select ................. 142

Underlining........................................................ 141

Unidirectional print mode, select....................... 139

Unidirectional printing, turn on/off ................... 139

Variable line feed, single ................................... 138

Vertical tab stops, set......................................... 136

Vertical tabs, multi-channel 0-7, set .................. 137

Control Codes ........................................................ 126

<BEL> Bell ....................................................... 126

<BS> Backspace................................................ 126

<CAN> Cancel .................................................. 126

<CR> Carriage Return....................................... 126

<DC1> Device Control 1................................... 126

<DC2> Device Control 2................................... 126

<DC3> Device Control 3................................... 126

GEK-00029B

311

<DC4> Device Control 4 ...................................126

<DEL> Delete....................................................126

<ESC> Escape ...................................................126

<FF> Form feed .................................................126

<HT> Horizontal tab..........................................127

<LF> Line feed ..................................................127

<NUL> Null.......................................................127

<SI> Shift In ......................................................127

<SO> Shift Out ..................................................127

<VT> Vertical Tab.............................................128

Dot graphics ...........................................................150

Specifying line length ........................................150

Escape Sequence Directory ....................................129

Functional differences ............................................124

Print mode combinations........................................123

Unsupported escape sequences...............................125

Epson FX286-e ...........................................................122

Epson FX286e Emulation Options Table ...................273

Escape Sequences definition ....................................................................8

G

General Printer Options Definitions ...........................269

I

I/F Hardware Strap Table ...........................................269

I/F Software Straps Table ...........................................270

L

Legacy Parallel Software Strap Definitions................270

LG/LG Plus ................................................................155

Commands

<HT> Horizontal tab..........................................155

<LF> Line feed ..................................................155

7-bit C1 transmission <S7C1T> ........................175

7-bit code, select ................................................173

8-bit code, select ................................................174

Application program command <APC> ............161

Assign user preference supplemental set

<DECAUPSS> ..............................................170

Autowrap mode <DECAWM> ..........................182

Bar code attributes, select <DECSBCA>...........188

Bar Coding, start <DECBARC> ........................170

Bar coding, stop <ROCS> .................................174

Block character mode, start <DECBLOCKC> ..173

Carriage return / new line <DECCRNLM> .......182

Channel command <VFU> ................................183

Control sequence introducer <CSI>...................160

Cursor up <CUU>..............................................174

Delete forms <DECDFM>.................................166

Delete logo sequence <DECDLG> ....................164

Device control string <DCS>.............................160

Device status requests <DSR> ...........................185

Drawing vectors <DECVEC>............................194

End VFU load <VFU>.......................................183

5000 Series Programmer’s Manual

Forms sequence, start <DECIFM>.................... 167

Forms sequence, terminate <DECTFM>........... 171

Graphic size modification <GSM>.................... 175

Graphic size selection <GSS> ........................... 175

Graphics density, set <DECSGD> .................... 193

Horizontal pitch, set <DECSHORP> ................ 192

Horizontal position, absolute <HPA>................ 178

Horizontal position, backward <HPB>.............. 184

Horizontal position, relative <HPR> ................. 178

Horizontal spacing, select <SHS> ..................... 177

Horizontal tab stops, set <DECSHTS> ............. 191

Horizontal tab, set ............................................. 159

Index <IND> ..................................................... 158

Line feed / new line <LNM>............................. 181

Lines per physical page, set <DECSLPP> ........ 190

Load vertical format unit <VFU>...................... 182

Loading forms <DECLFM>.............................. 165

Loading Logo <DECLG>.................................. 169

Logo sequence, select........................................ 164

Margins, left and right, set <DECSLRM>......... 190

Margins, top and bottom, set <DECSTBM> ..... 189

Next line <NEL> ............................................... 158

Operating system command <OSC> ................. 161

Partial line down <PLD>................................... 159

Partial line up <PLU>........................................ 159

Pitch select mode <PSM> ................................. 182

Position unit mode <PUM>............................... 181

Privacy message <PM> ..................................... 161

Product identification <DA> ............................. 180

Proprinter emulation mode <DECIPEM> ......... 161

Request font status <DECRFS> ........................ 163

Request logo status <DECRLGS>..................... 162

Reset mode <RM> ............................................ 184

Reset to initial state <RIS>................................ 179

Reverse index <RI>........................................... 160

Select graphics rendition <SGR> ...................... 162

Select other coding system (Epson) <SOCS> ... 173

Select other coding system (Proprinter) <SOCS>

...................................................................... 174

Set mode <SM>................................................. 181

Single shift 2 <SS2>.......................................... 160

Single shift 3 <SS3>.......................................... 160

Sixel graphics .................................................... 168

Soft terminal reset <DECSTR>......................... 187

String terminator <ST> ..................................... 160

Tab clear <TBC>............................................... 181

Vertical pitch, set <DECVERP> ....................... 192

Vertical position, absolute <VPA>.................... 180

Vertical position, backward <VPB>.................. 184

Vertical position, relative <VPR> ..................... 180

Vertical spacing, select <SVS> ......................... 177

Vertical tab stops, set <DECSVTS>.................. 191

Vertical tab, set.................................................. 159

Control codes ......................................................... 155

<BEL> Bell ....................................................... 155

<BS> Backspace ............................................... 155

<CAN> Cancel .................................................. 157

<CR> Carriage return........................................ 156

<DC1> Device Control 1 .................................. 156

<DC3> Device Control 3 .................................. 157

<ESC> Escape................................................... 157

<FF> Form feed ................................................ 156

Index

312

<SI> Shift in ......................................................156

<SO> Shift out...................................................156

<SUB> Substitute ..............................................157

<VT> Vertical tab..............................................156

line terminators.............................................................10

O operating system command (OSC) .................................9

P

PPL 3 ..........................................................................195

7-bit Versus 8-bit environments .............................196

C1 control characters..............................................201

Coded characters ....................................................195

Command Directory...............................................207

Commands

Announce subset of code extension facilities

<ASCEF> ......................................................209

Autowrap Mode <DECAWM>..........................214

C1 Transmit / Receive <SnC1R/DEC*C1> .......245

Carriage Return / New Line Mode <DECCRNLM>

.......................................................................215

Clear All Horizontal Tabs <DECCAHT>..........214

Clear All Vertical Tabs <DECCAVT> ..............215

Control representation mode <CRM>................210

Cursor position report <CPR> ...........................209

Cursor up <CUU>..............................................210

Device Status Report .........................................230

Device Status Request <DSR> ..........................229

Draw Relative Vector <DECRVEC> ................218

Draw Vector <DECVEC> .................................227

Entering IBM Proprinter Emulation Mode

<DECIPEM>.................................................216

Graphic Size Modification <GSM>...................231

Graphic Size Selection <GSS> ..........................232

Graphics, carriage return <DECGCR> ..............258

Graphics, next line <DECGNL>........................258

Graphics, raster attributes, set <DECGRA> ......259

Graphics, repeat introducer <DECGRI>............260

Horizontal Position Absolute <HPA>................233

Horizontal Position Backward <HPB> ..............234

Horizontal Position Relative <HPR>.................235

Horizontal Tab Set <DECHTS> ........................215

Line Feed / New Line Mode <LNM> ................236

Locking and Single Shifts..................................236

New Sheet <DECNS> .......................................216

Pitch Select Mode <DECPSM>.........................216

Positioning Unit Mode <PUM>.........................237

Printer attributes <DA> .....................................210

Printer attributes report <DAR> ........................211

Proportional Spacing Mode <DECPSP> ...........217

Request Font Status <DECRFS> .......................217

Reset to Initial State...........................................237

Secondary printer attributes <DA2> ..................212

Select Character Set <SCS>...............................238

Select Graphics Rendition <SGR> ....................240

Select Size Unit <SSU>.....................................247

GEK-00029B

Set Horizontal Pitch <DECSHORP>................. 219

Set Horizontal Spacing <SHS> ......................... 244

Set Horizontal Tab Stops <DECSHTS>............ 220

Set Left and Right Margins <DECSLRM> ....... 222

Set Lines per Physical Page <DECSLPP> ........ 221

Set Top and Bottom Margins <DECSTBM>..... 223

Set Vertical Pitch <DECVERP> ....................... 228

Set Vertical Spacing <SVS>.............................. 248

Set Vertical Tab Stops <DECSVTS> ................ 226

Soft Terminal Reset <DECSTR> ...................... 225

Spacing Pitch Increment <SPI>......................... 246

Tab Clear <TBC> .............................................. 249

Vertical Position Absolute <VPA> ................... 249

Vertical Position Backward <VPB>.................. 250

Vertical Position Relative <VPR>..................... 250

Vertical Tab Set <DECVTS> ............................ 229

Control characters

<CSI> Control sequence introducer .................. 201

<DCS> Printer control string............................. 201

<EPA> End of protected area............................ 201

<ESA> End of selected area .............................. 201

<HTS> Horizontal tab set.................................. 202

<IND> Index ..................................................... 202

<NEL> Next line ............................................... 202

<PLD> Partial line down................................... 202

<PLU> Partial line up........................................ 202

<RI> Reverse index........................................... 202

<SS2> Single shift 2.......................................... 202

<SS3> Single shift 3.......................................... 202

<ST> String terminator...................................... 202

<VTS> Vertical tab set...................................... 202

Control codes ......................................................... 199

<BEL> Bell ....................................................... 199

<BS> Backspace................................................ 199

<CAN> Cancel .................................................. 199

<CR> Carriage return ........................................ 199

<ESC> Escape................................................... 199

<FF> Form feed................................................. 199

<HT> Horizontal tab ......................................... 200

<LF> Line feed.................................................. 200

<SI> Shift in ...................................................... 200

<SO> Shift out .................................................. 200

<SUB> Substitute.............................................. 200

<VT> Vertical tab ............................................. 200

Horizontal advance increments .............................. 254

Page coordinate system.......................................... 251

Character cell model.......................................... 252

Origin and extent ............................................... 252

Point model ....................................................... 252

Positioning and movement ................................ 253

Printable characters................................................ 198

Sixes graphics ........................................................ 256 printer emulation ............................................................ 8

Printronix 300/600 ....................................................... 66

Printronix P300/600

Control Codes .......................................................... 66

<ACK> Line at 8lpi............................................. 66

<BS> Elongated Character Line.......................... 66

<CR> Carriage Return Slew Zero or Edit Mode . 66

<DC1> Ready/Select ........................................... 66

<DC3> Busy/Select ............................................. 67

<DLE> High vertical density graphics ................ 67

GEK-00029B

313

<ENQ> Normal density plot line .........................67

<EOT> High density plot line..............................67

<ETX> End of transmission ................................67

<FF> Form Feed ..................................................67

<HT> Horizontal Tab ..........................................67

<LF> Line Feed ...................................................67

<RS> Record Separator .......................................67

<SI> Shift In ........................................................68

<SO> Shift Out ....................................................68

<SP> Space..........................................................68

<UNDL> Underline.............................................68

<US> Unit Separator ...........................................68

<VT> Vertical Tab...............................................68

Bell code <BEL> .................................................66

Control Codes<DEL> Delete ...................................67

Electronic Vertical Format Unit ...............................72

Graphics ...................................................................69

Dot Patterns .........................................................70

Dot Patterns and Densities ...................................69

Printronix P300/600 Emulation Options Table...........274

Printronix Pseries Emulation Options Table...............274

Proprinter

Command Directory ...............................................111

Commands

<HT> Horizontal Tab ........................................110

Automatic line feed............................................114

Deselect printer ..................................................117

Double strike print, start ....................................115

Double wide print, on/off...................................118

Emphasized print, start.......................................115

Emphasized print, stop.......................................115

Form length in inches, set ..................................115

Graphics, high-speed double density, set ...........120

Graphics, low speed double density, set.............120

Graphics, quadruple density, set ........................121

Graphics, set normal density ..............................120

Horizontal margins, set ......................................118

Horizontal tab stops, set .....................................115

Overscore ...........................................................112

Print continuously from all character chart ........112

Print mode, select...............................................116

Print single character from all character chart....112

Proportional spacing, set ....................................117

Select character set 1..........................................114

Select character set 2..........................................114

Select code page.................................................113

Set 12 cpi ...........................................................112

Set 7/72 line spacing ..........................................113

Set 8 lpi ..............................................................113

Set form length in lines ......................................115

Set graphics line spacing....................................114

Set top of form ...................................................114

Skip perforation, cancel .....................................116

Skip perforation, set ...........................................116

Start text line spacing.........................................113

Store 7/72 line spacing.......................................114

Superscript / Subscript, reset..............................117

Superscript / Subscript, Set ................................117

Tabs, power on settings, set all ..........................117

Underscore.........................................................112

Unidirectional printing, set ................................117

Variable line feed...............................................116

5000 Series Programmer’s Manual

Control Codes

<BEL> Bell ....................................................... 108

<BS> Backspace ............................................... 108

<CAN>Cancel ................................................... 108

<CR> Carriage return........................................ 109

<DC1> Device Control 1 .................................. 109

<DC2> Device Control 2 .................................. 109

<DC3> Device Control 3 .................................. 109

<DC4> Device Control 4 .................................. 109

<ESC> Escape................................................... 109

<FF> Form Feed................................................ 109

<LF> Line Feed................................................. 110

<NUL> Null ...................................................... 110

<SI> Shift In...................................................... 110

<SO> Shift Out ................................................. 110

<VT> Vertical Tab ............................................ 110

Dot graphics........................................................... 119

Double strike print, stop......................................... 116

Proprinter III XL Emulation Options Table ............... 272

P-Series

Character Sets ........................................................ 106

Command Index....................................................... 78

Command Line ........................................................ 76

Commands

Bold Print OFF .................................................... 85

Bold Print ON...................................................... 84

Character Set Select............................................. 82

Double Wide Print............................................... 86

Emphasized Print OFF ........................................ 86

Emphasized Print ON.......................................... 85

Emulation Reset .................................................. 92

Execute Control Codes ........................................ 92

Extended Character Set Access ........................... 87

Extended Character Set Cancel ........................... 88

Font Selection...................................................... 89

High density graphics ........................................ 103

High horizontal density graphics ....................... 102

High vertical density graphics............................102

Normal density graphics ....................................103

Overscoring..........................................................90

Print Control Codes .............................................92

Select International Character Set........................84

Set Form Length in Lines ....................................93

Set Forms Length in Inches .................................93

Set line spacing 1/6 inch ......................................94

Set line spacing 1/8 inch ......................................95

Set line spacing 7/72 inch ....................................96

Set line spacing n/216 inch ..................................97

Set line spacing n/72 inch ....................................96

Set single line spacing..........................................95

Single Line Double High .....................................85

Single Line Double Wide Print............................86

Single line, high horizontal density....................103

Superscript / Subscript .........................................90

Superscript / Subscript Reset ...............................90

Underline .............................................................91

Control Codes

<BEL> Bell..........................................................80

<BS> Backspace..................................................80

<CR> Carriage Return .........................................80

<FF> Form Feed ..................................................81

<LF> Line Feed ...................................................81

Extended Character Sets.........................................106

Font Styles..............................................................106

Pitches ....................................................................106

Plot Mode Graphics.......................................... 98, 107

Special Function Control Character <SFCC> ..........76

S

SCS..............................................10. See Smart Graphics

Smart Graphics .............................................................10

Index

314

GEK-00029B

advertisement

Related manuals

Download PDF

advertisement

Table of contents