OKI ML320TURBO, ML321TURBO User Manual

®
MICROLINE
Models
ML320 Epson/IBM
ML320 MICROLINE Standard
ML321 Epson/IBM
ML321 MICROLINE Standard
ML320 Turbo & ML321 Turbo ML390 Turbo & ML391 Turbo
ML520 & ML521 ML590 & ML591
®
Reference Manual
Every effort has been made to ensure that the information in thi s document i s compl et e, accurate and up-to-date. Okidata assumes no responsibility for the results of errors beyond its control. Okidata also cannot guarantee that changes in software and equipment made by other manufacturers, and referred to in this handbook, will not affect the applicability of the information in this manual. Mention of soft w are product s manuf act ured by other companies does not necessarily constitute endorsement by Okidata.
© 1994, 1995, 1996, 1997 by OKID A TA. Revised edition June 1997. Written and produced by the OKIDATA Publications Department. Please address any
comments on this publication
by mail to:
Publications Services Department OKIDATA 532 Fellowship Road Mount Laurel, NJ 08054-3405
or by eMail to:
pubs@okidata.com
We welcome you to visit our web site:
http://www.okidata.com
OKIDATA and MICROLINE are registered trademarks of Oki Electric Industry Company, Ltd.; marques déposées de Oki Electric Industry Company, Ltd. OKIDATAMarca Registrada, Oki Electric Industry Company, Ltd.
Epson is a registered trademark of Epson America, Inc. IBM and PC are registered trademarks of International Business Machines Corporation.
Microsoft, MS-DOS and Windows are registered trademarks or trademarks of Microsoft Corporation in the United States and other countries.
Contents
How To Use This Manual .........................................................................................................vii
How the Manual is Or ganized.....................................................................................vii
Conventions Used in this Manual...............................................................................viii
Abbreviations & Acronyms ...........................................................................................ix
Command Summary .................................................................................................................xi
IBM Proprinter Commands........................................................................................... xi
Epson FX Commands .................................................................................................xix
Epson LQ Commands................................................................................................ xxv
Okidata MICROLINE Standard Commands..............................................................xxxii
Chapter 1: Printer Drivers .........................................................................................................1
Usable Drivers..............................................................................................................1
Okidata Software Drivers ..............................................................................................2
Software Driver S e lection..............................................................................................4
Embedded Commands ..................................................................................................4
Chapter 2: Character Set Commands ........................................................................................5
IBM Character Set Commands.......................................................................................5
Select IBM Set I Command (IBM) ...............................................................................5
Select IBM Set II Command (IBM) ..............................................................................5
Select All Character Set [IBM Set III] Command (Epson LQ)........................................6
Print Data from IBM All Characters Set [IBM Set III] Co mmand (IBM)..........................6
Print One Character from IBM All Characters Set [IBM Set III] Command (IBM)...........7
Epson Character Set Commands....................................................................................7
Select Epson Set 1 [Slanted Characters] Command (Epson) .........................................7
Select Epson Set 2 [Graphics Characters] Command (Epson).......................................7
MICROLINE Character Set Commands..........................................................................8
Select MICROLINE Standard Character Set Command (ML)........................................8
Select MICROLINE Block Graphics Symbol Set Command (ML)..................................8
Select MICROLINE Line Character Set Command (ML)...............................................8
International Character Set Commands..........................................................................9
Select International Character Set Command (IBM/ML)...............................................9
Select International Character Set Command (Epson)................................................10
Print from Code Page Command (IBM/ML) ..................................................................11
Assign Code Page Command (Epson)...........................................................................12
Upper Range Control Code Commands (Epson)...........................................................13
Select Code Page Set Command (Epson)......................................................................13
Chapter 3: Character Size & Spacing Commands.................................................................... 15
Pitch Setting Commands..............................................................................................15
Pitch Setting Commands for Non-compressed Printing (IBM/E/ML)............................15
Pitch Setting Commands for Compressed Printing (IBM)............................................16
Pitch Setting Commands for Compressed Printing (Epson).........................................16
Pitch Setting Commands for Compressed Printing (ML).............................................17
Select Character Pitch/Point Size Command (Epson) ....................................................17
Select Character Pitch/Point Size Command (IBM-Oki unique).....................................19
Superscript/Subscript Commands (IBM/E/ML)...............................................................20
Double Width Commands (IBM/E/ML)......................................................................... 21
Double Height Commands (E/ML)...............................................................................21
Double Width & Height Printing Commands...............................................................22
Double Width & Height Printing Command, 9-Pin Printers (IBM).............................. 22
Double Width & Height Printing Command, 24-Pin Printers (IBM)............................23
Combined Print Features Command (ML) ....................................................................24
Character Spacing Commands.....................................................................................25
Contents i
Proportional Spacing Commands (IBM/E/ML) ...........................................................25
Intercharacter Spacing Commands (IBM/E/ML) .........................................................26
Set Horizontal Motion Index [HMI] Command (Epson LQ)...........................................27
Chapter 4: Character Style Commands ................................................................................... 29
Print Mode & Fonts Commands...................................................................................29
Individual Print Mode & Font Commands for 9-Pin Printers (IBM/E/ML) ....................29
Individual Print Mode & Font Commands for 24-Pin Printers (IBM/E) ........................30
Combined Select Font Command (IBM)....................................................................31
Select Font Command (IBM) ....................................................................................32
Combined Print Mode Command (Epson).................................................................34
Italics Print Commands (IBM/E/ML)..............................................................................35
Emphasized & Enhanced Print Commands (IBM/E/ML).................................................36
Underline/Overscore/Strike-Through Commands.........................................................36
Underline Commands (IBM/E/ML)............................................................................36
Overscore Commands (IBM).................................................................................... 37
Score Style Command (Epson)..................................................................................37
Outline/Shadow Commands (IBM/E)........................................................................38
Chapter 5: Custom Character Commands.............................................................................. 39
Custom Character Commands: 9-Pin Printers...............................................................39
Designing a Custom Character for 9-Pin Printers.......................................................39
IBM Custom Character Commands for 9-Pin Printers................................................40
Copy ROM to RAM Command for 9-Pin Printers (IBM)..........................................40
Down Line Load Characters Command for 9-Pin Printers (IBM).............................41
Epson Custom Character Commands for 9-Pin Printers.............................................43
Copy ROM to RAM Command for 9-Pin Printers (Epson).......................................43
Down Line Load Characters Command for 9-Pin Printers (Epson) ..........................43
Custom Character Set On/Off Commands for 9-Pin Printers (Epson).......................44
Okidata MICROLINE Standard Custom Character Commands for 9-Pin Printers........45
Copy ROM to RAM Command for 9-Pin Printers (ML) ...........................................45
Down Line Load Characters Commands for 9-Pin Printers (ML).............................45
Select DLL Font Commands for 9-Pin Printers (ML) ...............................................45
Custom Character Commands: 24-Pin Printers.............................................................46
Designing a Custom Character for 24-Pin Printers.....................................................46
IBM Custom Character Commands for 24-Pin Printers..............................................47
Down Line Load Characters Command for 24-Pin Printers (IBM)...........................47
Epson Custom Character Commands for 24-Pin Printers...........................................49
Copy ROM to RAM Command for 24-Pin Printers (Epson).....................................49
Down Line Load Characters Command for 24-Pin Printers (Epson) ........................50
Custom Character Set On/Off Commands for 24-Pin Printers (Epson).....................51
Load Custom Character Set into Upper ASCII Command for 24-Pin Printers (Epson)..51
Chapter 6: Graphics Commands for 9-Pin Printers ................................................................. 53
Overview....................................................................................................................53
Programming Grap hics in BASIC.................................................................................54
Graphics Density Selection Commands (IBM/E)...........................................................54
Graphics Density Selection Commands (ML) ...............................................................55
Graphics Select/Print Command (Epson)......................................................................55
Reassign Graphics Codes Command (Epson)................................................................57
Select Graphics Command (Epson)..............................................................................57
Select Graphics Mo de Co mmand (ML) ........................................................................57
Graphics Print Mode Commands (ML).........................................................................59
Special Purpose Line Feed Commands (ML).................................................................60
Chapter 7: Graphics Commands for 24-Pin Printers ...............................................................61
Overview....................................................................................................................61
Programming Grap hics in BASIC.................................................................................62
Contentsii
Graphics Density Selection Commands (IBM/E)...........................................................62
Graphics Select/Print Command (IBM AGM/E).............................................................63
Reassign Graphics Codes Command (IBM AGM/E) ......................................................64
Graphics Resolution Command (IBM)..........................................................................64
Select Graphics Aspect Ratio Command (IBM).............................................................65
Select Graphics Mo de Co mmand (Epson)....................................................................65
Set/Reset Graphics Mode Command (Epson)................................................................66
Print Raster Graphics Command (Epson)......................................................................66
Chapter 8: Horizontal Control Commands ............................................................................. 69
Backspace & Carriage Return Commands (IBM/E/ML) ..................................................69
Margin Setting Commands ..........................................................................................69
Set Left & Right Margins Command (IBM).................................................................69
Left and Right Margin Commands (Epson) ................................................................70
Left and Right Margin Commands (ML) ....................................................................72
Horizontal Tab Commands .........................................................................................73
Execute Horizontal Tab Command (IBM/E/ML) .........................................................73
Set Horizontal Tab Command (IBM/E)......................................................................73
Set Tabs by Character Space Command (ML) ............................................................74
Set Tabs by Dot Columns Command (ML)................................................................74
Clear Horizontal Tab Settings Commands (IBM/E).....................................................76
Clear Horizontal Tab Settings Commands (ML)......................................................... 76
Horizontal Print Position Commands...........................................................................76
Indent from Left Margin Command (IBM/ML) ...........................................................76
Set Multiple Print Positions Command (IBM/E/ML)....................................................77
Set Relative Dot Position Command (IBM)................................................................79
Set Relative Dot Position Command (IBM)................................................................80
Set Relative Dot Position Command (Epson).............................................................80
Set Absolute Dot Position Command (Epson)............................................................80
Move to the Right & Left Commands (ML)................................................................81
Uni-Directional Printing Commands (IBM/E/ML)..........................................................82
Incremental Printing Commands (IBM/E/ML)................................................................82
Justification Commands (Epson)...................................................................................83
Contents iii
Chapter 9: Vertical Control Commands..................................................................................85
Set Page Length Commands ........................................................................................85
Set Page Length in Inches Command (IBM /E/ML)......................................................85
Set Page Length in Lines Command (IBM/E/ML)........................................................85
Set Page Length in Defined Unit Comand (Epson).....................................................86
Form Feed Command (IBM/E/ML)................................................................................87
Line Feed Commands..................................................................................................87
Line Feed with Carriage Return Command (IBM/E/ML)..............................................87
Line Feed without Carriage Return Command (ML)...................................................87
Line Feed & Carriage Return Selection Command (ML).............................................87
Fine Line Feed Commands (IBM/E/ML).....................................................................88
Perform Line Feed Command (IBM)..........................................................................89
Auto Line Feed On/Off Commands (IBM).................................................................89
Reverse Line Feed Commands (IBM/E/ML)................................................................89
Line Spacing Commands (IBM/E/ML)...........................................................................90
General Line Spacing Commands (IBM/E/ML)...........................................................90
Fine-Increment Line Spacing Commands for 9-Pin Printers (IBM/E/ML) .....................90
ESC A N Line Spacing Command for 24-Pin Printers (IBM/E).....................................91
ESC 3 n Line Spacing Command for 24-Pin Printers (IBM/E)...................................... 92
n/360-Inch Line Spacing Commands for 24-Pin Printers (IBM/E)................................92
Set Vertical Units (IBM)............................................................................................93
Vertical Tab Commands..............................................................................................93
Execute Vertical Tab Command (IBM/E/ML) .............................................................94
Set Vertical Tabs Command (IBM/E).........................................................................94
Clear Vertical Tabs Command (IBM/E)......................................................................94
Vertical Format Unit [VFU] Commands (Epson)........................................................95
Vertical Format Unit [VFU] Commands (ML)............................................................96
Vertical Position Commands .......................................................................................96
Skip Down Comman d (ML)......................................................................................96
Set Relative Vertical Position Command (Epson)....................................................... 97
Set Absolute Vertical Position Command (Epson)......................................................97
Top of Form Commands (IBM/ML) ...........................................................................98
Set Page Format Command (Epson)..........................................................................98
Skip Over Perforation Commands................................................................................99
Skip Over Perforation On/Off Commands (IBM/E).....................................................99
Skip Over Perforation ON/Off Commands (ML)......................................................100
Chapter 10: Bar Code Commands for 9-Pin Printers............................................................. 101
Bar Code Commands ................................................................................................101
Code 39 Bar Code Commands..................................................................................101
Select Code 39 Bar Code Command......................................................................102
Print Code 39 Bar Code Command........................................................................104
Code 128 Bar Code Commands ................................................................................104
Select Code 128 Bar Code Command ....................................................................104
Print Code 128 Bar Codes Command.....................................................................105
Interleaved 2 of 5 Bar Code Commands.....................................................................106
Select Interleaved 2 of 5 Bar Code Command.........................................................106
Print Interleaved 2 of 5 Bar Code Command...........................................................107
Contentsiv
UPC A Bar Code Commands.....................................................................................107
Select UPC A Bar Code Command .........................................................................107
Print UPC A Bar Code Command...........................................................................108
UPC E Bar Code Commands .....................................................................................109
Select UPC E Bar Code Command .........................................................................109
Print UPC E Bar Code Command...........................................................................110
EAN 8 Bar Code Commands .....................................................................................110
Select EAN 8 Bar Code Command .........................................................................110
Print EAN 8 Bar Code Command ...........................................................................111
EAN 13 Bar Code Commands....................................................................................111
Select EAN 13 Bar Code Command........................................................................111
Print EAN 13 Bar Code Command .........................................................................112
Bar Code Command..................................................................................................112
Select/Print Postnet Bar Code Data Command ...........................................................112
Chapter 11: Bar Code Commands for 24-Pin Printers........................................................... 113
Bar Code Commands ................................................................................................113
Code 39 Bar Code Commands..................................................................................113
Select Code 39 Bar Code Command......................................................................113
Print Code 39 Bar Code Command........................................................................115
Code 128 Bar Code Commands ................................................................................116
Select Code 128 Bar Code Command ....................................................................116
Print Code 128 Bar Code Command ......................................................................117
Interleaved 2 of 5 Bar Code Commands.....................................................................117
Select Interleaved 2 of 5 Bar Code Command.........................................................118
Print Interleaved 2 of 5 Bar Code Command...........................................................119
UPC A Bar Code Commands.....................................................................................119
Select UPC A Bar Code Command .........................................................................119
Print UPC A Bar Code Command...........................................................................120
UPC E Bar Code Commands .....................................................................................120
Select UPC E Bar Code Command .........................................................................120
Print UPC E Bar Code Command...........................................................................121
EAN 8 Bar Code Commands .....................................................................................121
Select EAN 8 Bar Code Command .........................................................................121
Print EAN 8 Bar Code Command ...........................................................................122
EAN 13 Bar Code Commands....................................................................................122
Select EAN 13 Bar Code Command........................................................................123
Print EAN 13 Bar Code Command .........................................................................123
Postnet Bar Code Command......................................................................................124
Select/Print Postnet Bar Code Data Command ...........................................................124
Chapter 12: Miscellaneous Commands ................................................................................. 125
Cancel Command (IBM/E/ML)...................................................................................125
Change Emulation Command (IBM/E/ML)..................................................................125
Cut Sheet Feeder (CSF) Co mmands............................................................................126
CSF Commands (IBM/E).........................................................................................126
Bin Select Command for Dual Bin CSF (IBM/E).......................................................126
CSF Commands (ML) .............................................................................................126
Delete Command (Epson) ..........................................................................................127
Contents v
Half-Speed Printing Commands (E/ML) ......................................................................127
Initialize Printer Commands (E/ML)............................................................................127
Most Significant Bit Commands (Epson).....................................................................128
Paper-Out Sensor Commands (IBM/E/ML)..................................................................128
Print Suppress Mode Commands...............................................................................129
Print Suppress Mo d e On/Off Commands (IBM).......................................................129
Print Suppress Mo d e On/Off Commands (E/ML) .....................................................129
Select Color Command (IBM/E).................................................................................130
Set Unit Command (Epson)........................................................................................130
Software I-Prime Command (IBM/E/ML).....................................................................131
Stop Printing Command (IBM)...................................................................................131
Appendix A: Interfacing......................................................................................................... 133
Parallel Interface.......................................................................................................133
Serial Interface..........................................................................................................134
Commonly Used Serial Cable Configurations............................................................. 135
Appendix B: Listing of Tables ................................................................................................ 137
Index...................................................................................................................................... 141
Contentsvi
How To Use this Manual
This Programmer’s Guide/Reference Manual is a supplement to the manuals for the various model printers. It contains additional information on selecting printer drivers and on the printer commands, as well as interfacing specifications.
How the Manual is Organized
Command Summary
Tabular listings of the commands for each emulat i on, w i t h ref erences t o t he page in t he manual on which the description for the command appears.
Chapter 1: Printer Drivers
Selecting printer drivers.
Chapters 2 through 12 — Commands
Chapter 2: Character Set Commands
Chapter 3: Character Size & Spacing Commands
Chapter 4: Character Style Commands
Chapter 5: Custom Char act er Commands
Chapter 6: Graphics Commands for 9-Pin Printers
Chapter 7: Graphics Commands for 24-Pin Printers
Chapter 8: Horizontal Control Comm ands
Chapter 9: Vertical Control Commands
Chapter 10: Bar Code Commands for 9-Pin Printers
Chapter 11: Bar Code Commands for 24-Pin Printers
Chapter 12: Miscellaneous Commands
Appendix A: Interfacing Pin-out diagrams for the parallel and serial interfaces. It also incl udes wi ri ng di agrams f or
commonly used serial cable configurations.
Appendix B: Listing of Tables Includes a complete listing of the tables in this manual.
How to Use this Manual vii
Conventions Used in this Manual The following conventions are used in the command chapters of this manual:
The emulation(s) to which each command appli es i s gi ven i n parent heses at t he end of the
heading for the command. The emulations (IBM = IBM Propri nter, E = Epson FX, and ML = OKIDATA MICROLINE Standard) are descri bed i n C hapt er 1.
For example:
Proportional Spacing Commands (IBM/E/ML)
The printer models to which each command appli es are gi ven i mmedi at el y bel ow t he
command heading, preceded by a check mark (
ML320 E/I, ML321 E/I = Models ML320 & ML321, Epson/IBM-Compatible ML320 Std., ML321 Std. = Models ML320 & ML 321, MI C ROLI N E Standard Emulation ML320T, ML321T = Models ML320 Turbo & ML321 Turbo ML390T, ML391T = Models ML320 Turbo & ML321 Turbo ML520, ML521 = Models ML520 & ML521 ML590, ML591 = Models ML590 and ML591
For example:
Proportional Spacing Commands (IBM/E/ML) ML320 E/I, ML321 E/I ML320T, ML321T ML520, ML521 ML320 Std., ML321 Std. ML390T, ML391T ML590, ML591
⻬).
Text denoting lines of BASIC programming is set in the Courier font.
For example:
LPRINT CHR$(27);"[@";CHR$(4);CHR$(0);CHR$(0);CHR$(0);
CHR$(34);CHR$(0)
Notes, which contain important informati on t hat you shoul d read, are set in italics.
For example:
Note: If you send a location value outside the set left or right margin, this command
will be ignored.
How to Use this Manualviii
Abbreviations & Acronyms
The following abbreviations and acronyms are used in this manual:
ASCII American Standard Codes for Information Interchange
Cpi Characters per inch Cpl Characters per line
CSF Cut Sheet Feeder Dec Decimal DLL Down Line Loading
Dpi Dots per inch
E Epson FX Emulation
E/I Epson/IBM Compatible Model
Hex Hexadecimal
HSD High Speed Draft
IBM IBM Proprinter Emulation
ML OKIDATA MICROLINE Standard Emulation
NLQ Near Letter Quality
ROM Read Only Memory
RAM Random Access Memory
Std. OKIDATA MICROLINE Standard Model
TOF Top of Form UTL Utility
How to Use this Manual ix
Command Summary
This summary is in four sections:
IBM Commands
Epson FX Commands
Epson LQ Commands
Okidata MICROLINE Standard Commands
Each is section arranged numerically by the deci mal val ue f or t he AS CI I command. The page
number given in the last column refers you to the explanation of the command in this manual.
The printer models which include that particular command are listed in the third column:
Models ML320 and ML321 incorporate either the Epson FX and IBM Proprinter
emulations (designated as “E/I” in the table) or the OKIDATA MICROLINE Standard emulation (designated as “Std.” in the table).
Note: If you’re not sure which version of the ML320 or ML321 printer you have, run the
Self Test (hold LF button while turning on the printer), then look at the first line that prints: if you see EI, you have the Epson/IBM version; i f you see OKI , you have the OKIDATA MICROLI N E St andard version.
Models ML 320 Turbo, ML321 Turbo, ML520 and ML521 i ncorporate the IBM Proprinter,
Epson FX and OKIDATA MICROLIN E St andard emulations.
Models ML 390 Turbo, ML391 Turbo, ML590 and ML 591 incorporate the IBM Proprinter, IBM Proprinter AGM, and Epson LQ emulations.
IBM Proprinter Commands
IBM Command: ASCII
Decimal Function Applies to Model(s) Page
BS8Backspace ML320/321 E/I,
ML320T/321T, ML390T/391T, ML520/521, ML590/591
Execute horizontal tab
HT
9
ML320/321 E/I, ML320T/321T, ML390T/391T, ML520/521, ML590/591
LF10Line feed (with carriage
return)
ML320/321 E/I, ML320T/321T, ML390T/391T, ML520/521, ML590/591
VT11Vertical tab ML320/321 E/I,
ML320T/321T, ML390T/391T, ML520/521, ML590/591
FF12Form feed ML320/321 E/I,
ML320T/321T, ML390T/391T, ML520/521, ML590/591
Carriage return
CR
13
ML320/321 E/I, ML320T/321T, ML390T/391T, ML520/521, ML590/591
SO14Begin double width
printing line by line
ML320/321 E/I, ML320T/321T, ML390T/391T, ML520/521, ML590/591
69
73
87
94
87
69
21
IBM Command Summary xi
IBM Command: ASCII
p
Decimal Function Applies to Model(s) Page
DC117Print suppress mode off ML320/321 E/I,
DC218Select 10 cpi ML320/321 E/I,
DC420End double width printing
CAN24Cancel ML320/321 E/I,
ESC SI
27 15
ESC DLE @ Pn A1 A2 P1 P2 P3 P
27 16 64 Pn A1 A2 P1 P2 P3 P
ESC DLE A m n1 ... n
27 16 65 m n1 ... n
ESC DLE A m n1 ... n
27 16 65 m n1 ... n
ESC DLE B m n [data]
27 16 66 m n [data]
ESC DLE B m n [data]
27 16 66 m n [data] ESC DLE C P1 [data]
27 16 67 P
[data]
1
ESC DLE C P1 [data]
27 16 67 P
[data]
1
ESC DLE F Pno Pn Lp H
27 16 70 Pno Pn Lp H
ESC EM 1
27 25 49
ESC EM 2
27 25 50 ESC EM I
27 25 73
ESC EM R
27 25 82
ESC SP n
27 32 n
SI15Select compressed pitch ML320/321 E/I,
ML320T/321T, ML390T/391T, ML520/521, ML590/591
ML320T/321T, ML390T/391T, ML520/521, ML590/591
ML320T/321T, ML390T/391T, ML520/521, ML590/591
ML320/321 E/I,
line by line
ML320T/321T, ML390T/391T, ML520/521, ML590/591
ML320T/321T, ML390T/391T, ML520/521, ML590/591
Select 20 cpi ML320/321 E/I,
ML320T/321T, ML390T/391T, ML520/521, ML590/591
Set multiple print positions ML320T/321T, ML390T/391T,
4 4
Select bar code type and
8
size
8
Select bar code type and
8
size
8
ML520/521, ML590/591 ML320T/321T,
ML520/521 ML390T/391T,
ML590/591
Print bar code data ML320T/321T,
ML520/521
Print bar code data ML390T/391T,
ML590/591
Print Postnet bar code data
Print Postnet bar code data
Select character
pitch/point size
p
Select Bin 1 of Dual-Bin
ML320T/321T, ML520/521
ML390T/391T, ML590/591
ML320T/321T, ML390T/391T, ML590/591
ML390T/391T, ML590/591 126
CSF Select Bin 2 of Dual-Bin
ML390T/391T, ML590/591 126
CSF Insert Sheet
(Cut Sheet Feeder)
ML320/321 E/I, ML320T/321T, ML390T/391T, ML520/521, ML590/591
Eject sheet (Cut Sheet Feeder)
ML320/321, ML390T/391T, ML520/521, ML590/591
Set intercharacter spacing ML390T/391T,
ML590/591
16
129
15
21
125
16
77
101­112
113­122
101­112
113­122
101, 112
113, 124
19
126
126
26
IBM Command Summaryxii
IBM Command: ASCII
Decimal Function Applies to Model(s) Page
ESC ! n
27 33 n
ESC # 0
27 35 48
ESC $ 27 36
ESC % 4 n
27 37 52 n
ESC % 5 n
27 37 53 n
ESC % 8 n
27 37 56 n
ESC % 9 n
27 37 57 n
ESC % B n1 n2 n3 n
27 37 66 n1 n2 n3 n
ESC % G 27 37 71
ESC % H 27 37 72
ESC * m n1 n2 [data]
27 42 n
1 n2
[data]
ESC - 0
27 45 48
ESC - 1
27 45 49
ESC 0 27 48
ESC 1 27 49
ESC 2 27 50
Select international character set
ML320/321 E/I, ML320T/321T, ML390T/391T, ML520/521, ML590/591
Select HSD print mode ML320/321 E/I,
ML320T/321T, ML520/521
Copy ROM character set to RAM character set
ML320/321 E/I, ML320T/321T, ML520/521
Perform n/360" line feed
ML390T/391T, ML590/591
Perform n/144" line feed ML320/321 E/I,
ML320T/321T, ML520/521, ML590/591
Set line spacing to n/360"
ML390T/391T, ML590/591
Set line spacing to n/144" ML320/321 E/I,
ML320T/321T, ML520/521
Indent from left margin ML320/321 E/I,
4 4
ML320T/321T, ML520/521
Italic printing on
ML320/321 E/I, ML320T/321T, ML390T/391T, ML520/521, ML590/591
Italic printing off ML320/321 E/I,
ML320T/321T, ML390T/391T, ML520/521, ML590/591
Graphics select/print:
AGM only
ML390T/391T, ML590/591
Underline printing off ML320/321 E/I,
ML320T/321T, ML520/521, ML590/591
Underline printing on ML320/321 E/I,
ML320T/321T, ML520/521, ML590/591
Set line spacing to 1/8" ML320/321 E/I,
ML320T/321T, ML390T/ML391T, ML520/521, ML590/591
Set line spacing to 7/72" ML320/321 E/I,
ML320T/321T, ML390T/ML391T, ML520/521, ML590/591
Set line feed stored by ESC A n
ML320/321 E/I, ML320T/321T, ML390T/ML391T, ML520/521, ML590/591
9
29
40
88
88
92
90
76
35
35
63
36
36
90
90
89
IBM Command Summary xiii
IBM Command: ASCII
Decimal Function Applies to Model(s) Page
ESC 3 n 27 51 n
ESC 3 n 27 51 n
ESC 4 27 52
ESC 5 0
27 53 48
ESC 5 1
27 53 49
ESC 6 27 54
ESC 7 27 55
ESC 8 27 56
ESC 9 27 57
ESC :
27 58
ESC = n1 n2 # a1 a2 a3 m ad1 ad2 id
id2 d1 d2 d3 d4 d5 [data]
26 61 n
35 a1 a2 a3 m ad1 ad2 id
1 n2
id2 d1 d2 d3 d4 d5 [data]
ESC = c1 c2 m n a1 a2 [data] 27 61 c
m n a1 a2 [data]
1 c2
ESC ? m n
27 63 m n
ESC A n
27 65 n
ESC A n
27 65 n
ESC B NUL
27 66 0
Set line spacing to n/216” ML320/321 E/I,
ML320T/321T, ML520/521, ML590/591
Set line spacing to n/216”
ML390T/ML391T 92 in PPR, or to n/180" in AGM
Set top of form ML320/ 321 E/ I ,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Auto line feed off
ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Auto line feed on ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Select IBM Set II ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Select IBM Set I ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Paper-out sensor off
ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Paper-out sensor on ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Select 12 cpi ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Down line load custome
1
ML590/591 47 characters
1
Down line load characters ML320/321 E/I,
ML320T/321T,
ML520/521, ML590/591 Reassign graphics codes:
Applies to IBM AGM only
ML390/391T,
ML590/591 Set line spacing of n/72" ML320/321 E/I,
ML320T/321T,
ML520/521, ML590/591 Set line spacing of n/72" in
ML390T/ML391T 91 PPR, or to n/60" in AGM
Clear vertical tabs
ML320/321 E/I,
ML320T/321T,
ML520/521, ML590/591
90
98
89
89
5
5
128
128
15
41
64
90
94
IBM Command Summaryxiv
IBM Command: ASCII
Decimal Function Applies to Model(s) Page
ESC B n1 n2 ... nk NUL
27 66 n
1 n2
... nk 0
ESC C n
27 67 n
ESC C NUL n
27 67 0 n
ESC D NUL NUL
27 68 0 0
ESC D n1 n2 ... nk NUL
27 68 n
1 n2
... nk 0
ESC E 27 69
ESC F 27 70
ESC G
27 71
ESC H
27 72
ESC I n
27 73 n
ESC J n
27 74 n
ESC J n
27 74 n
ESC K Ln Hn [data]
27 75 L
n Hn
[data]
ESC L Ln Hn [data] 27 76 L
n Hn
[data]
ESC N n
27 78 n
ESC O
27 79
Set vertical tabs ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Set page length in lines. ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Set page length in inches. ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Clear horizontal tab
settings
ML320/321 E/I,
ML320T/321T,
ML520/521, ML590/591 Set horizontal tab ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521 Emphasized printing on ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Emphasized printing off ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Enhanced printing on
ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Enhanced printing off ML320/321 E/I,
ML320T/321T, ML390T/391T.
ML520/521, ML590/591 Combined select font ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Perform n/216" line feed ML320/321 E/I,
ML320T/321T,
ML520/521, ML590/591 Perform n/216" (PPR) or
ML390T/391T 88 n/180" (AGM) line feed
Begin single density graphics
ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Double density graphics
ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Skip over perforation on ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Skip over perforation off ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591
94
85
85
76
73
36
36
36
36
31
88
54
54
99
99
IBM Command Summary xv
IBM Command: ASCII
Decimal Function Applies to Model(s) Page
ESC P 0
27 80 48
ESC P 1
27 80 49
ESC Q ETX
27 81 3
ESC Q SYN
27 81 16
ESC Q #
27 81 23
ESC Q $
27 81 24
ESC R
27 82
ESC S 0
27 83 48
ESC S 1
27 83 48
ESC T 27 84
ESC U 0
27 85 48
ESC U 1
27 85 49
ESC V n
27 86 n
ESC W 0
27 87 48
ESC W 1
27 87 49
ESC X n m 27 88 n m
ESC Y Ln Hn [data]
27 89 L
n Hn
[data]
Proportional spacing off ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Proportional spacing on ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Print suppress mode on ML320 E/I,
ML320T,
ML520 Print suppress mode on
ML321 E/I,
ML321T,
ML521 Print suppress mode on ML391T,
ML591 Print suppress mode on
ML390T,
ML590 Clear vertical tabs (resets
to default horizontal tabs)
ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Start superscript printing ML320/ 321 E/ I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Start subscript printing
ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Stop superscript/subscript
printing
ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Uni-directional printing
off
ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Uni-directional printing
on
ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Set intercharacter spacing
ML320/321 E/I,
ML320T/321T,
ML520/521 End double width printing ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Begin double width
printing
ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Set left & right margins
ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Double speed/ double
density graphics
ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591
25
25
129
129
129
129
94
20
20
20
82
82
26
21
21
69
54
IBM Command Summaryxvi
IBM Command: ASCII
p
p
fid Lfid Hfwd Lfwd
ESC Z Ln Hn [data]
27 90 L
ESC [ @ Ln Hn NUL NUL n1 n
27 91 64 Ln Hn 0 0 n1 n
ESC [ @ n1 n2 m1 m2 m3 m
27 91 64 n1 n2 m1 m2 m3 m
ESC [ T Ln Hn NUL NUL H
27 91 84 L
0 0 Hcp Lcp 0
n Hn
ESC [ \ 4 0 0 0 n1 n
27 91 92 52 48 48 48 n1 n
ESC [ g n1 n2 m [data]
27 91 103 n
1 n2
ESC [ I Ln Hn H
27 91 108 Ln Hn H
fid Lfid Hfwd Lfwd fa
27 100 n1 n
27 101 n1 n
27 108 Ln H
Decimal Function Applies to Model(s) Page
n Hn
[data]
Quadruple density graphics
ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591 Set character width, line
2
spacing and character
2
height . Begin/end double height
4
printing.
4
L
NUL
c
c
Print from code page ML320T/321T, ML390T/391T,
ML320/321 E/I,
ML320T/321T,
ML520/521, ML590/591
ML390T/391T 23
ML520/521, ML590/591 Set vertical units for the
2
line spacing command.
2
ML390T/391T 93
Set graphics resolution ML390T/391T,
m [data]
ESC \ Ln H 27 92 Ln H
f
Select font ML390T/391T 32
a
Print data from the All
n
Characters Set
n
ML590/591
ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591
ESC ]
27 93
Reverse line feed ML320/321 E/I,
ML320T/321T,
ML520/521,
ESC ^ n 27 94 n
Print one character from the All Characters Set
ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591
ESC _ 0
27 95 48
End overscore printing ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591
ESC _ 1
27 95 49
Begin overscore printing
ML320/321 E/I,
ML320T/321T, ML390T/391T,
ML520/521, ML590/591
ESC d n1 n
ESC e n1 n
ESC g
27 103 ESC i 0
Set right relative position ML390T/391T,
2 2
Set left relative position
2 2
ML590/591
ML390T/391T,
ML590/591 Select 15 cpi ML390T/391T,
ML520/521, ML590/591 Incremental printing off ML390T/391T, ML320T/321T 82
27 105 48
ESC i 1
Incremental printing on ML390T/391T, ML320T/321T 82
27 105 49
ESC j
Stop printing (deselect) ML390T/391T, ML590/591 131
27 106
ESC k n
Specify typeface ML390T/391T, ML590/ 591 30
27 107
ESC | Ln H
Set relative dot position ML320T/321T,
n n
ML520/521
54
22
11
64
6
89
7
37
37
80
80
15
79
IBM Command Summary xvii
IBM Command: ASCII
Decimal Function Applies to Model(s) Page
ESC n P
27 110 P
ESC q n
27 113 n
ESC r n
27 114 n
ESC x 0
27 120 48
ESC x 1
27 120 49
ESC { n
27 123 n
ESC } NUL
27 125 0
Select Graphics Aspect
n
Ratio: PPR only
n
ML390T/391T,
ML590/591 Specify outline/shadow ML390T/391T, ML590/591 38
Select color ML590/591 130
Select Utility print mode ML390/391T 30
Select LQ print mode ML390/391T 30
Change emulation ML320/321 E/I,
ML320T/321T,
ML520/521 Software I-Prime ML320/321T,ML390/391T,
ML520/521, ML590/591
65
125
131
IBM Command Summaryxviii
Epson FX Commands
Epson FX Command: ASCII
Decimal Function Applies to Model(s) Page
DC117Print suppress mode off ML320/321 E/I,
DC218Cancel 20 cpi ML320/321 E/I,
DC3
DC420End double width printing line
CAN24Cancel ML320/321 E/I,
ESC SO
27 14
ESC SI
27 15
ESC DLE @ Pn A1 A2 P1 P2 P3 P
27 16 64 Pn A1 A2 P1 P2 P3 P
ESC DLE A m n1 ... n
27 16 65 m n1 ... n
ESC DLE B m n [data]
27 16 66 m n [data] ESC DLE C P1 [data]
27 16 67 P
[data]
1
Backspace
BS
8
ML320/321 E/I, ML320T/321T, ML520/521
HT9Execute horizontal tab ML320/321 E/I,
ML320T/321T, ML520/521
Line feed (with carriage return)
LF
10
ML320/321 E/I, ML320T/321T, ML520/521
VT11Vertical tab ML320/321 E/I,
ML320T/321T, ML520/521
Form feed
FF
12
ML320/321 E/I, ML320T/321T, ML520/521
CR13Carriage return ML320/321 E/I,
ML320T/321T, ML520/521
SO14Begin double width printing
line by line
ML320/321 E/I, ML320T/321T, ML520/521
SI15Select compressed pitch ML320/321 E/I,
ML320T/321T, ML520/521
ML320T/321T, ML520/521
ML320T/321T, ML520/521
Print suppress mode on
19
ML320/321 E/I, ML320T/321T, ML520/521
ML320/321 E/I,
by line
ML320T/321T, ML520/521
ML320T/321T, ML520/521
Begin double width printing line by line
ML320/321 E/I, ML320T/321T, ML520/521
Select 20 cpi ML320/321 E/I,
ML320T/321T, ML520/521
Set multiple print positions ML320T/321T, ML520/521 77
4 4
Select bar code type and size ML320T/32 1T, ML520/521 101-
8 8
Print bar code data ML320T/321T, ML520/ 521 101-
Print Postnet bar code data ML320T/321T, ML520/521 113,
69
73
87
94
87
69
21
16
129
16
129
21
125
21
16
112
112
124
Epson FX Command Summaryxx
Epson FX Command: ASCII
Decimal Function Applies to Model(s) Page
ESC EM I 27 25 73
ESC EM R
27 25 82 ESC SP n
27 32 n
ESC ! n
27 33 n
ESC # 27 35
ESC $ Ln H
27 36
ESC % 0
27 37 48
ESC % 1
27 37 49
ESC % 5 n
27 37 53
ESC % 9 n
27 37 57 n
ESC & NUL n1 n2 a [data]
27 38 0 n
1 n2
a [data]
ESC ( 0
27 40 48
ESC ( t 3 0 Pn1 Pn2 P
27 40 116 51 48 Pn1 Pn2 P
ESC * m Ln Hn [data]
27 42 m L
n Hn
[data]
ESC - 0
27 45 48
ESC - 1
27 45 49
ESC / n
27 47 n
ESC 0 27 48
Insert sheet (Cut Sheet Feeder) ML320/321 E/I,
ML320T/321T, ML520/521
Eject sheet (Cut Sheet Feeder)
ML320/321 E/I, ML320T/321T, ML520/521
Set intercharacter spacing ML320/321 E/I,
ML320T/321T, ML520/521
Combined print mode ML320/321 E/I,
ML320T/321T, ML520/521
Cancel MSB control ML320/321 E/ I ,
ML320T/321T, ML520/521
Set absolute dot position ML320/321 E/I,
n
ML320T/321T, ML520/521
Select standard character set
ML320/321 E/I, ML320T/321T, ML520/521
Select custom character set ML320/321 E/I,
ML320T/321T, ML520/521
Perform n/144" line feed ML320/321 E/I,
ML320T/321T, ML520/521
Set line spacing to n/144" ML320/321 E/I,
ML320T/321T, ML520/521
Down line load characters
ML320/321 E/I, ML320T/321T, ML520/521
Select HSD print mode ML320/321 E/I,
ML320T/321T, ML520/521
Assign code page ML320/321T 12
n3 n3
Graphics select/print
ML320/321 E/I, ML320T/321T, ML520/521
Underline printing off ML320/321 E/I,
ML320T/321T, ML390T/391T, ML520/521
Underline printing on
ML320/321 E/I, ML320T/321T, ML390T/391T, ML520/521
Select vertical tab channel ML320/321 E/I,
ML320T/321T, ML520/521
Set line spacing to 1/8" ML320/321 E/I,
ML320T/321T, ML520/521
126
126
26
34
128
80
44
44
88
90
43
29
55
36
36
95
90
Epson FX Command Summary xxi
Epson FX Command: ASCII
Decimal Function Applies to Model(s) Page
ESC 1 27 49
ESC 2 27 50
ESC 3 n 27 51 n
ESC 4 27 52
ESC 5 27 53
ESC 6 27 54
ESC 7 27 55
ESC 8 27 56
ESC 9 27 57
ESC : NUL NUL NUL
27 58 0 0 0
ESC : NUL n NUL
27 58 0 n 0
ESC <
27 60
ESC =
27 61
ESC >
27 62
ESC ? m n
27 63 m n
ESC @
27 64
ESC A n
27 65 n
Set line spacing to 7/72" ML320/321 E/I,
ML320T/321T, ML520/521
Set line spacing to 1/6" ML320/321 E/I,
ML320T/321T, ML520/521
Set line spacing to n/216" ML320/321 E/I,
ML320T/321T, ML520/521
Italic printing on
ML320/321 E/I, ML320T/321T, ML520/521
Italic printing off ML320/321 E/I,
ML320T/321T, ML520/521
Permit printing upper range control codes
ML320/321 E/I, ML320T/321T, ML520/521
Cancel printing upper range control codes
ML320/321 E/I, ML320T/321T, ML520/521
Paper-out sensor off
ML320/321 E/I, ML320T/321T, ML520/521
Paper-out sensor on ML320/321 E/I,
ML320T/321T, ML520/521
Copy ROM character set to
ML320/321 E/I, ML320T/321T 43
RAM character set Copy ROM character set to
ML520/521 43
RAM character set Print uni-directional for one
line only
ML320/321 E/I, ML320T/321T, ML520/521
Set Most Significant Bit (MSB) to zero
ML320/321 E/I, ML320T/321T, ML520/521
Set MSB to 1 ML320/321 E/I,
ML320T/321T, ML520/521
Reassign graphics ML320/321 E/I,
ML320T/321T, ML520/521
Initialize printer
ML320/321 E/I, ML320T/321T, ML520/521
Set line spacing to n/72"
ML320/321 E/I, ML320T/321T, ML520/521
90
90
90
35
35
13
13
128
128
82
128
128
57
127
90
Epson FX Command Summaryxxii
Epson FX Command: ASCII
Decimal Function Applies to Model(s) Page
ESC B NUL
27 66 0
ESC B n1 n2 ... nk NUL
27 66 n
1 n2
... nk 0
ESC C n
27 67 n
ESC C NUL n
27 67 0 n
ESC D NUL NUL
27 68 0 0
ESC D n1 n2 ... nk NUL
27 68 n
1 n2
... nk 0
ESC E 27 69
ESC F 27 70
ESC G
27 71
ESC H
27 72
ESC I 0
27 73 48
ESC I 1
27 73 49
ESC K Ln Hn [data] 27 75 L
n Hn
[data]
ESC L Ln Hn [data]
27 76 L
n Hn
[data] ESC M
27 77
ESC N n
27 78 n
ESC O
27 79 ESC P
27 80
ESC Q n
27 81 n
ESC R n
27 82 n
ESC S 0
27 83 48
ESC S 1
27 83 49
ESC T 27 84
Clear vertical tabs ML320/321 E/I,
ML320T/321T, ML520/521
Set vertical tabs
ML320/321 E/I, ML320T/321T, ML520/521
Set page length in lines. ML320/321 E/I,
ML320T/321T, ML520/521
Set page length in inches. ML320/321 E/I,
ML320T/321T, ML520/521
Clear horizontal tab settings ML320/321 E/I,
ML320T/321T, ML520/521
Set horizontal tab ML320/321 E/I,
ML320T/321T, ML520/521
Emphasized printing on
ML320/321 E/I, ML320T/321T, ML520/521
Emphasized printing off ML320/321 E/I,
ML320T/321T, ML520/521
Enhanced printing on ML320/321 E/I,
ML320T/321T, ML520/521
Enhanced printing off
ML320/321 E/I, ML320T/321T, ML520/521
Cancel printing upper range control codes
Permit printing upper range control codes
Begin single density graphics
ML320/321 E/I, ML320T/321T, ML520/521
ML320/321 E/I, ML320T/321T, ML520/521
ML320/321 E/I, ML320T/321T, ML520/521
Double density graphics ML320/321 E/I ,
ML320T/321T, ML520/521
Select 12 cpi ML320/321 E/I,
ML320T/321T, ML520/521
Skip over perforation on
ML320/321 E/I, ML320T/321T, ML520/521
Skip over perforation off ML320/321 E/I,
ML320T/321T, ML520/521
Select 10 cpi ML320/321 E/I,
ML320T/321T, ML520/521
Set right margin ML320/321 E/I,
ML320T/321T, ML520/521
Select international character set
Start superscript printing
ML320/321 E/I, ML320T/321T, ML520/521
ML320/321 E/I, ML320T/321T, ML520/521
Start subscript printing ML320/321 E/I,
ML320T/321T, ML520/521
Stop superscript/ subscript printing
ML320/321 E/I, ML320T/321T, ML520/521
94
94
85
85
76
73
36
36
36
36
13
13
54
54
15
99
99
15
70
10
20
20
20
Epson FX Command Summary xxiii
Epson FX Command: ASCII
Decimal Function Applies to Model(s) Page
ESC U 0
27 85 48
ESC U 1
27 85 49
ESC W 0
27 88 48
ESC W 1
27 88 49
ESC Y Ln Hn [data] 27 89 L
n Hn
[data]
ESC Z Ln Hn [data] 27 90 L
n Hn
[data]
ESC \ Ln H
27 92 Ln H
ESC ^ m Ln Hn [data]
27 94 m L
n Hn
[data]
ESC a 0
27 97 48
ESC a 1
27 97 49
ESC a 2
27 97 50
ESC a 3
27 97 51
ESC b m n1 n2 ... nk NUL
27 98 m n
1 n2
... n 0
ESC g
27 103 ESC i 0
27 105 48
ESC i 1
27 105 49
ESC k n
27 107 n
ESC l n
27 108 n
ESC p 0
27 112 48
ESC p 1
27 112 49
ESC s 0
27 115 48
ESC s 1
27 115 49
Uni-directional printing off ML320/321 E/I,
ML320T/321T, ML520/521
Uni-directional printing on
ML320/321 E/I, ML320T/321T, ML520/521
End double width printing ML320/321 E/I,
ML320T/321T, ML520/521
Begin double width printing ML320/321 E/I,
ML320T/321T, ML520/521
Double speed/double density graphics
ML320/321 E/I, ML320T/321T, ML520/521
Quadruple density graphics ML320/321 E/I,
ML320T/321T, ML520/521
Set relative dot position
n n
ML320/321 E/I, ML320T/321T, ML520/521
Select 9-pin graphics printing ML320/321 E/I,
ML320T/321T, ML520/521
Left justification ML320/321 E/I,
ML320T/321T, ML520/521
Center justification
ML320/321 E/I, ML320T/321T, ML520/521
Right justification ML320/321 E/I,
ML320T/321T, ML520/521
Full (left and right) justification
ML320/321 E/I, ML320T/321T, ML520/521
Set vertical format unit (VFU) ML320/321 E/I,
ML320T/321T, ML520/521
Select 15 cpi ML520/521 15
Incremental printing off ML320T/321T 82
Incrementatl printing on ML320T/321T 82
Select NLQ print mode ML320/ 321 E/ I ,
ML320T/321T, ML520/521
Set left margin
ML320/321 E/I, ML320T/321T, ML520/521
Proportional spacing off ML320/321 E/I,
ML320T/321T, ML520/521
Proportional spacing on ML320/321 E/I,
ML320T/321T, ML520/521
Half-speed printing off
ML320/321 E/I, ML320T/321T, ML520/521
Half-speed printing on ML320/321 E/I,
ML320T/321T, ML520/521
82
82
21
21
54
54
80
57
83
83
83
83
95
29
70
25
25
127
127
Epson FX Command Summaryxxiv
Epson FX Command: ASCII
Decimal Function Applies to Model(s) Page
ESC t 0
27 116 48
ESC t 1
27 116 49
ESC w 0
27 119 48
ESC w 1
27 119 49
ESC x 0
27 120 48
ESC x 1
27 120 49
ESC { n
27 123 n
ESC } NUL
27 125 0
DEL
127
Select Epson Set 1 ML320/321 E/I,
7
ML320T/321T, ML520/521
Select Epson Set 2
ML320/321 E/I,
7
ML320T/321T, ML520/521
End double height printing ML320/321 E/I,
21 ML320T/321T, ML390T/391T, ML520/521
Begin double height printing ML320/ 321 E/ I ,
21 ML320T/321T, ML390T/391T, ML520/521
Select Utility print mode
ML320/321 E/I,
29 ML320T/321T, ML520/521
Select NLQ print mode ML320/ 321 E/ I ,
29 ML320T/321T, ML520/521
Change emulation ML320/321 E/I,
125 ML320T/321T, ML520/521
Software I-Prime ML520/521 131
Delete one character ML320/321 E/I,
127 ML320T/321T, ML520/521
Epson FX Command Summary xxv
Epson LQ Commands
Epson LQ Command: ASCII
Decimal Function Applies to Model(s) Page
Backspace
BS
8
ML390T/ML391T, ML590/591
HT9Execute horizontal tab ML390T/391T,
69
73
ML590/591
LF10Line feed (with carriage return) ML390T/391T,
87
ML590/591
VT
11
Vertical tab
ML390T/391T, ML590/591
94
FF12Form feed ML590/591 87
CR13Carriage return ML390T/391T,
SO14Begin double width printing li ne by line ML390T/391T,
DC1
17
DC218Cancel 20 cpi ML390T/391T,
DC319Print suppress mode on ML390T/391T,
DC4
20
CAN24Cancel ML390T/391T,
ESC SO
27 14
ESC SI
27 15
ESC DLE @ Pn A1 A2 P1 P2 P3 P
27 16 64 Pn A1 A2 P1 P2 P3 P
ESC DLE A m n1 ... n
27 16 65 m n1 ... n
ESC DLE B m n [data]
27 16 66 m n [data] ESC DLE C P1 [data]
27 16 67 P
[data]
1
ESC DLE G n 1
27 16 71 n 49
ESC EM 1
27 25 49
ESC EM 2
27 25 50
ML590/591
ML590/591
SI15Select compressed pitch ML390T/391T,
ML590/591
Print suppress mode off
ML390T/391T, ML590/591
ML590/591
ML590/591
End double width printing line by l i ne
ML390T/391T, ML590/591
ML590/591
Begin double width printing li ne by line ML390T/391T,
ML590/591
Select 20 cpi
ML390T/391T, ML590/591
Set multiple print positions ML390T/391T,
4 4
Select bar code type and size ML390T/391T,
8 8
Print bar code data
ML590/591
ML590/591 ML390T/391T,
ML590/591
Print Postnet bar code data ML390T/391T,
ML590/591
Set/reset raster graphics ML390/391T 66
Select Bin 1 of Dual-Bin CSF ML590/591 126
Select Bin 2 of Dual-Bin CSF ML590/591 126
69
21
16
129
16
129
21
125
21
16
77
113­122
113­122
113, 124
Epson LQ Command Summary xxvii
Epson LQ Command: ASCII
p
p
b
n
n3
p
Decimal Function Applies to Model(s) Page
ESC EM I 27 25 73
ESC EM R
27 25 82
ESC US 0
27 31 48
ESC US 1
27 31 49 ESC SP n
27 32 n
ESC ! n
27 33 n
ESC # 27 35
ESC $ Ln H 27 36 Ln H
ESC % 0
27 37 48
ESC % 1
27 37 49
ESC % 5 n
27 37 53 n
ESC & m n1 n2 d0 d1 d2 [data]
27 38 m n
1 n2 d0 d1 d2
[data]
ESC & NUL m n1 n2 d0 d1 d2 [data]
27 38 0 m n
1 n2 d0 d1 d2
[data]
ESC ( - Ln Hn Pn D1 D
27 40 45 Ln Hn Pn D1 D
ESC ( C 2 0 Lp H
27 40 67 40 48 Lp H
ESC ( G Ln Hn P
27 40 71 Ln Hn P
ESC ( U Ln Hn P
27 40 85 Ln Hn P
ESC ( V Ln Hn Lp H
27 40 86 Ln Hn Lp H
ESC ( ^ Ln Hn [data]
27 40 94 L
n Hn
[data]
ESC ( c 2 0 Lt Ht Lb H
27 40 99 50 48 Hn Lt Ht Lb H
ESC ( t Ln Hn Pn1 P
27 40 116 Ln Hn Pn1 Pn2 P
P
2
ESC ( v Ln Hn Lp H
27 40 118 Ln Hn Lp H
ESC * m n1 n2 [data]
27 42 n
1 n2
[data]
Insert sheet (Cut Sheet Feeder) ML390T/391T 126
Eject sheet (Cut Sheet Feeder) ML390T/391T 126
End double height printing ML390T/391T,
ML590/591
Begin double height printing ML390T/391T,
ML590/591
Set character spacing. ML390T/391T,
ML590/591
Combined print mode ML390T/391T,
ML590/591
Cancel MSB control
ML390T/391T, ML590/591
Set absolute dot position ML390T/391T,
n n
ML590/591
Select standard character set ML390T/391T ,
ML590/591
Select custom character set
ML390T/391T , ML590/591
Perform n/144" line feed ML590/591 88
Down line load characters ML390T/391T 50
Down line load characters ML590/591 50
Select score style: underline, overscore, or
2
strike through
2
ML390T/391T 37
Set Page Length ML390T/391T 86
p
Select graphics mode
n n
Set increment of movement ML390T/ 391T 130
n n
ML390T/391T, ML590/591
Absolute position line feed ML390T/391T 98
p
Select All Character Set ML390T/391T,
ML590/591
Set Page Format ML390T/391T 98
b
Select character table
n3
ML390T/391T, ML590/591
Relative position line feed ML390T/391T 97
p
Graphics select/print ML390T/391T,
ML590/591
21
21
26
34
128
80
51
51
65
6
13
63
Epson LQ Command Summaryxxviii
Epson LQ Command: ASCII
Decimal Function Applies to Model(s) Page
ESC + n
27 43 n
ESC - 0
27 45 48
ESC - 1
27 45 49
ESC . Pc Pv Ph Pm Ln Hn [data]
27 46 P
c Pv Ph Pm Ln Hn
[data]
ESC / n
27 47 n
ESC 0 27 48
ESC 2 27 50
ESC 3 n 27 51 n
ESC 3 n 27 51 n
ESC 4 27 52
ESC 5 27 53
ESC 6 27 54
ESC 7 27 55
ESC 8 27 56
ESC 9 27 57
ESC : NUL n NUL
27 58 0 n 0
ESC <
27 60
ESC =
27 61
ESC >
27 62
ESC ? m n
27 63 m n
ESC @
27 64
ESC A n
27 65 n
ESC B NUL
27 66 0
Set line spacing to n/360" ML390T/391T,
92
ML590/591
Underline printing off
ML390T/391T,
36
ML590/591
Underline printing on ML390T/391T,
36
ML590/591
Print Raster Graphics ML390T/391T,
66
ML590/591
Select vertical tab channel. ML390T/391T.
95
ml590/591
Set line spacing to 1/8" ML390T/ML391T 90
Set line spacing to 1/6"
ML390T/ML391T,
90
ML590/591
Set line spacing to n/180" ML390T/ML391T 92
Set line spacing to n/216" ML590/591 92
Italic printing on ML390T/391T 35
Italic printing off ML390T/391T 35
Permit printing upper range control codes ML390 T/ 391T,
13
ML590/591
Cancel printing upper range control codes
ML390T/391T ,
13
ML590/591
Paper-out sensor off ML390T/391T,
128
ML590/591
Paper-out sensor on ML390T/391T,
128
ML590/591
Copy ROM character set to RAM character set
ML390T, ML391T, ML590/591
Print uni-directional for one line only ML390T, ML391T,
49
82
ML590/591
Set Most Significant Bit (MSB) to zero ML390T/391T,
128
ML590/591
Set MSB to 1 ML390T/391T,
128
ML590/591
Reassign graphics ML390T, ML391T,
64
ML590/591
Initialize printer
ML390T/391T,
127
ML590/591
Set line spacing to n/60" ML390T/ML391T,
91
ML590/591
Clear vertical tabs ML590/591 94
Epson LQ Command Summary xxix
Epson LQ Command: ASCII
Decimal Function Applies to Model(s) Page
ESC B n1 n2 ... nk NUL
27 66 n
1 n2
... nk 0
ESC C n
26 67 n
ESC C NUL n
27 67 0 n
ESC D NUL NUL
27 68 0 0
ESC D n1 n2 ... nk NUL
27 68 n
1 n2
... nk 0
ESC E 27 69
ESC F 27 70
ESC G
27 71
ESC H
27 72
ESC J n
27 74 n
ESC K Ln Hn [data] 27 75 L
n Hn
[data]
ESC L Ln Hn [data]
27 76 L
n Hn
[data] ESC M
27 77
ESC N n
27 78 n
ESC O
27 79 ESC P
27 80
ESC Q n
27 81 n
ESC R n
27 82 n
ESC S 0
27 83 48
ESC S 1
27 83 49
ESC T 27 84
ESC U 0
27 85 48
ESC U 1
27 85 49
Set vertical tabs ML390T/391T,
94
ML590/591
Set page length in lines.
ML390T/391T,
85
ML590/591
Set page length in inches. ML390T/391T,
85
ML590/591
Clear horizontal tab settings. ML390T/391T,
76
ML590/591
Set horizontal tab ML590/591 73
Emphasized printing on ML390T/391T,
36
ML590/591
Emphasized printing off
ML390T/391T,
36
ML590/591
Enhanced printing on ML390T/391T,
36
ML590/591
Enhanced printing off ML390T/391T,
36
ML590/591
Execute n/180" line feed. ML390T/391T 88
Begin single density graphics ML390T/391T,
62
ML590/591
Double density graphics ML390T/391T,
62
ML590/591
Select 12 cpi
ML390T/391T,
15
ML590/591
Skip over perforation on ML390T/391T,
99
ML590/591
Skip over perforation off ML390T/391T,
99
ML590/591
Select 10 cpi
ML390T/391T,
15
ML590/591
Set right margin ML390T/391T,
70
ML590/591
Select international character/Code Page set
Start superscript printing ML390T/391T,
ML390T/391T, ML590/591
10
20
ML590/591
Start subscript printing ML390T/391T,
20
ML590/591
Stop superscript/ subscript printing
ML390T/391T,
20
ML590/591
Uni-directional printing off ML390T/391T,
82
ML590/591
Uni-directional printing on ML390T/391T,
82
ML590/591
Epson LQ Command Summaryxxx
Epson LQ Command: ASCII
p
p
Decimal Function Applies to Model(s) Page
ESC W 0
27 87 48
ESC W 1
27 87 49
ESC X p Pn Lp H
27 88 70 Pn Lp H
ESC Y Ln Hn [data] 27 89 L
n Hn
[data]
ESC Z Ln Hn [data] 27 90 L
n Hn
[data]
ESC [ n
27 91 n
ESC \ Ln H
27 92 Ln H
ESC ] n
27 93 n
ESC a 0
27 97 48
ESC a 1
27 97 49
ESC a 2
27 97 50
ESC a 3
27 97 51
ESC b m n1 n2 ... nk NUL
27 98 m n
1 n2
... nk 0
ESC c Lp H
27 99 Lp H
ESC g
27 103 ESC i 0
27 105 48
ESC i 1
27 105 49
ESC j n
27 106 n
ESC k n
27 107 n
ESC l n
27 108 n
ESC I 0
27 73 48
ESC I 1
27 73 49
ESC n P
27 110 P
End double width printing ML390T/391T,
ML590/591
Begin double width printing
ML390T/391T, ML590/591
Select character pitch/point size ML390T/391T,
p
ML590/591
Double speed/double density grap hi cs ML390T/391T 62
Quadruple density graphics ML390T/391T 62
Set line spacing to n/360" ML390T/391T,
ML590/591
Set relative dot position
n n
ML390T/391T, ML590/591
Perform n/360" line feed ML390T/391T,
ML590/591
Left justification ML390T/391T,
ML590/591
Center justification
ML390T/391T, ML590/591
Right justification ML390T/391T,
ML590/591
Full (left and right) justification ML390T/391T,
ML590/591
Set vertical format unit (VFU)
ML390T/391T, ML590/591
Set Horizontal Motion Index
p
ML390T/391T, ML590/591
Select 15 cpi ML390T/391T,
ML590/591
Incremental printing off ML390T/391T 82
Incremental printing on ML390T/391T 82
n/180" reverse line feed ML390T/391T,
ML590/591
Specify typeface ML390T/391T 30
Set left margin ML390T/391T,
ML590/591
Cancel printing upper range control codes
ML390/391T, ML590/591
Permit printing upper range control codes ML390/391T,
ML590/591
Select Graphics Aspect Ratio ML390/391T,
n n
ML590/591
21
21
17
92
80
88
83
83
83
83
95
27
15
89
70
13
13
65
Epson LQ Command Summary xxxi
Epson LQ Command: ASCII
Decimal Function Applies to Model(s) Page
ESC p 0
27 112 48
ESC p 1
27 112 49
ESC q n
27 113 n
ESC r n
27 114 n
ESC s 0
27 115 48
ESC s 1
27 115 49
ESC t 0
27 116 48
ESC t 1
27 116 49
ESC t 2
27 116 50
ESC x n
27 120 n
ESC } NUL
27 125 0
DEL
127
Proportional spacing off ML390T/391T,
25
ML590/591
Proportional spacing on
ML390T/391T,
25
ML590/591
Specify outline/shadow ML390T/391T,
38
ML590/591
Select color ML590/591 130
Half-speed printing off ML390T/ML391T,
127
ML590/591
Half-speed printing on ML390T/ML391T,
127
ML590/591
Select Epson Set 1
ML390T/391T ,
7
ML590/591
Select Epson Set 2 ML390 T/ 391T ,
7
ML590/591
Select Custom Character Set ML390T/391T ,
51
ML590/591
Specify print quality
ML390T/391T,
29
ML590/591
Software I-Prime ML390/391T,
131
ML590/591
Delete one character ML390T/ML391T,
127
ML590/591
Epson LQ Command Summaryxxxii
Okidata MICROLINE Standard Commands
ML Standard Command: ASCI I
Decimal Function Applies to Model(s) Page
Select graphics print mode
ETX
3
ETX STX
ETX ETX
ETX LF
3 10
ETX SO
3 14
ETX DC2
3 18
ETX DC4
3 20
VT n
11 n
DC117Print suppress mode off ML320/321 Std.,
DC319Print suppress mode on ML320/321 Std.,
DC4 SP1...SP1 n ... SP...SP ?
20 32...32 n ... 32...32 63
CAN
ESC ETX x1y1z1w1 ... x16y16z16w16 CR
27 3 x
1y1z1w1
... x16y16z16w16 13
ESC ETX 0 CR
27 3 48 13 ESC HT CR
27 9 13
End graphics print mode ML320/321 Std.,
3 2
Store graphics data in one dot
3 3
column buffer Graphics line feed with
carriage return, text setting Graphics line feed with
carriage return, graphics setting
Graphics line feed without carriage return, text setting
Graphics line feed without carriage return, graphics setting
BS8Backspace ML320/321 Std.,
HT9Execute horizontal tab ML320/321 Std.,
LF10Line feed (with carriage
return)
VT11Vertical tab ML320/321 Std.,
Execute VFU vertical tab ML320/321 Std.,
Form feed
FF
12
CR13Carriage return ML320/321 Std.,
Set vertical format unit (VFU) ML320/321 Std.,
Cancel
24
Set horizontal tab by dot columns
Clear horizontal tabs set by dot columns
Clear horizontal tab settings
ML320/321 Std., ML320T/321T, ML520/521
ML320T/321T, ML520/521 ML320/321 Std.,
ML320T/321T, ML520/521 ML320/321 Std.,
ML320T/321T, ML520/521 ML320/321 Std.,
ML320T/321T, ML520/521
ML320/321 Std., ML320T/321T, ML520/521
ML320/321 Std., ML320T/321T, ML520/521
ML320T/321T, ML520/521
ML320T/321T, ML520/521 ML320/321 Std.,
ML320T/321T, ML520/521
ML320T/321T, ML520/521
ML320T/321T, ML520/521 ML320/321 Std.,
ML320T/321T, ML520/521
ML320T/321T, ML520/521
ML320T/321T, ML520/521
ML320T/321T, ML520/521
ML320T/321T, ML520/521 ML320/321 Std.,
ML320T/321T, ML520/521 ML320/321 Std.,
ML320T/321T, ML520/521 ML320/321 Std.,
ML320T/321T, ML520/521 ML320/321 Std.,
ML320T/321T, ML520/521
59
59
60
60
60
60
60
69
73
87
94
96
87
69
129
129
96
125
74
76
76
xxxiv
Okidata MICROLINE Standard Command Summary
ML Standard Command: ASCI I
Decimal Function Applies to Model(s) Page
ESC HT x1y1z1 ... x16y16z16 CR
27 9 x
... x16y16z16 13
1y1z1
ESC LF
27 10
ESC VT Hn L
27 11 Hn L
ESC DLE @ Pn a1 a2 P1 P2 P3 P
27 16 64 Pn a1 a2 P1 P2 P3 P
ESC DLE A m n1 ... n
27 16 65 m n1 ... n
ESC DLE B m n [data]
27 16 66 m n [data]
ESC DLE C P1 [data]
27 16 67 P
[data]
1
ESC DC2
27 18
ESC CAN
27 24
ESC US 0
27 31 48
ESC US 1
27 31 49
ESC ! n
27 33 n
ESC ! *
27 33 42
ESC ! /
27 33 47
ESC ! 0
27 33 48
ESC ! 1
27 33 49
ESC ! 2
27 33 50
ESC # 0
27 35 48
ESC # 3
27 35 51
ESC # Q
27 35 81
ESC $ 27 36
ESC % 5 n
27 37 53 n
ESC % 9 n
27 37 57 n
Set horizontal tab by characters
Reverse feed
ML320/321 Std., ML320T/321T, ML520/521
ML320/321 Std., ML320T/321T, ML520/521
Skip down selected number
n
of lines
n
Set multiple print positions ML320T/321T, ML520/521 77
4 4
Select bar code type and size ML320T/321T, ML520/521 101-
8 8
ML320/321 Std., ML320T/321T, ML520/521
Print bar code data ML320T/321T, ML52 0/ 521 101-
Print Postnet bar code data ML320T/321T, ML520/ 521
Graphics line feed without carriage return)
ML320/321 Std., ML320T/321T, ML520/521
Initialize printer ML320/321 Std.,
ML320T/321T, ML520/521
End double height printing
ML320/321 Std., ML320T/321T, ML520/521
Begin double height printing ML320/321 Std.,
ML320T/321T, ML520/521
Select international character set
Italics printing off
ML320/321 Std., ML320T/321T, ML520/521
ML320/321 Std., ML320T/321T, ML520/521
Italics printing on ML320/321 Std.,
ML320T/321T, ML520/521
Select standard character set ML320/ 321 St d. ,
ML320T/321T, ML520/521
Select block graphics character set
ML320/321 Std., ML320T/321T
Select line character set ML320/321 Std.,
ML320T/321T, ML520/521
Select HSD print mode ML320/321 St d. ,
ML320T/321T, ML520/521
Select 20 cpi ML320/321 Std.,
ML320T/321T, ML520/521
Double speed/ quadruple density graphics
Copy ROM character set to RAM character set
ML320/321 Std., ML320T/321T, ML520/521
ML320/321 Std., ML320T/321T, ML520/521
Perform n/144" feed ML320/321 Std.,
ML320T/321T, ML520/521
Set spacing to n/144" ML320/321 Std.,
ML320T/321T, ML520/521
74
89
96
112
112 101,
112 87
127
21
21
9
35
35
8
8
8
29
17
55
45
88
90
Okidata MICROLINE Standard Command Summary
xxxv
ML Standard Command: ASCI I
Decimal Function Applies to Model(s) Page
ESC % A m n1 ... n
27 37 65 m n1 ... n
ESC % B n1 n2 n3 n
27 37 66 n1 n2 n3 n
ESC % C n1 n2 n
27 37 67 n1 n2 n
ESC % D m n1 ... n 27 37 68 m n1 ... n
ESC % E n1 n2 n3 n
27 37 69 n1 n2 n3 n
ESC % F n1 n2 n3 n
27 37 70 n1 n2 n3 n
ESC % R n1 n2 n3 n
27 37 82 n1 n2 n3 n
ESC % S 0
27 37 83 48
ESC % S 1
27 37 83 49
ESC & n1 n2 n3 n4 :
27 38 n
1 n2 n3 n4
58
ESC * n1 n2 :
27 42 n
1 n2
58
ESC -
27 45 ESC 0
27 48 ESC 1
27 49 ESC 2
27 50 ESC 3
27 51 ESC 5
27 53 ESC 6
27 54 ESC 7
27 55 ESC 8
27 56
ESC <
27 60
ESC =
27 61
ESC >
27 62
Down load ascender
11
characters
11
Indent from left margin
4 4
Set left margin ML320/321 Std.,
3 3
Down load descender
11
characters
11
Move to right ML320/321 Std.,
4 4
Move to left ML320/321 Std.,
4 4
Set right margin
4 4
ML320/321 Std., ML320T/321T, ML520/521
ML320/321 Std., ML320T/321T, ML520/521
ML320T/321T, ML520/521 ML320/321 Std.,
ML320T/321T, ML520/521
ML320T/321T, ML520/521
ML320T/321T, ML520/521 ML320/321 Std.,
ML320T/321T, ML520/521
Skip over perforation off ML320/321 Std.,
ML320T/321T, ML520/521
Skip over perforation on ML320/321 Std.,
ML320T/321T, ML520/521
Select print features
ML320/321 Std., ML320T/321T, ML520/521
Select graphics mode ML320/321 Std.,
ML320T/321T, ML520/521
Uni-directional printing on ML320/321 Std.,
ML320T/321T, ML520/521
Select Utility print mode
ML320/321 Std., ML320T/321T, ML520/521
Select NLQ print mode ML320/321 Std.,
ML320T/321T, ML520/521
Select DLL in Utility mode ML320/321 Std.,
ML320T/321T, ML520/521
Select NLQ Gothic font
ML320/321 Std., ML320T/321T, ML520/521
Set top of form ML320/321 Std.,
ML320T/321T, ML520/521
Set spacing to 1/6" ML320/321 Std.,
ML320T/321T, ML520/521
Select DLL NLQ mode ML320/321 Std.,
ML320T/321T, ML520/521
Set spacing to 1/8" ML320/321 Std.,
ML320T/321T, ML520/521
Half-speed printing on
ML320/321 Std., ML320T/321T, ML520/521
Uni-directional printing off ML320/321 Std. ,
ML320T/321T, ML520/521
Half-speed printing off ML320/321 Std.,
ML320T/321T, ML520/521
45
76
72
45
81
81
72
100
100
24
57
82
29
29
45
29
98
90
45
90
127
82
127
xxxvi
Okidata MICROLINE Standard Command Summary
ML Standard Command: ASCI I
p
p
ESC G Hn L
ESC [ T Ln Hn NUL NUL H
27 91 84 L
0 0 Hcp Lcp 0
n Hn
Decimal Function Applies to Model(s) Page
ESC ? n :
27 63 n 58
ESC C
27 67
ESC D
27 68
ESC E 0
27 69 48
ESC E 1
27 69 49
ESC F Hn L 27 70 Hn L
26 71 Hn L
ESC H
27 72
ESC J
27 74
ESC K
27 75
ESC L
27 76
ESC M
27 77
ESC N n
27 78 n
ESC P 27 80
ESC Q
27 81
ESC R
27 82
ESC S
27 83 ESC T
27 84
ESC V
27 86
ESC Y
27 89
ESC Z
27 90
L
NUL
c
c
ESC g
Carriage return/feed selection ML320/321 Std.,
ML320T/321T, ML520/521
Underline printing on
ML320/321 Std., ML320T/321T, ML520/521
Underline printing off ML320/321 Std.,
ML320T/321T, ML520/521
Paper-out sensor on ML320/321 Std.,
ML320T/321T, ML520/521
Paper-out sensor off ML320/321 Std.,
ML320T/321T, ML520/521
Page length set in lines ML320/321 Std.,
n n
Page length set in inches
n n
ML320T/321T, ML520/521 ML320/321 Std.,
ML320T/321T, ML520/521
Enhanced printing on ML320/321 Std.,
ML320T/321T, ML520/521
Start superscript printing ML320/321 Std.,
ML320T/321T, ML520/521
Stop superscript printing
ML320/321 Std., ML320T/321T, ML520/521
Start subscript printing ML320/321 Std.,
ML320T/321T, ML520/521
Stop subscript printing ML320/321 Std.,
ML320T/321T, ML520/521
Set intercharacter spacing
ML320/321 Std., ML320T/321T, ML520/521
Single density graphics ML320/321 Std.,
ML320T/321T, ML520/521
Single density graphics ML320/321 Std.,
ML320T/321T, ML520/521
Double density graphics
ML320/321 Std., ML320T/321T, ML520/521
Insert sheet (Cut Sheet Feeder) ML320/321 Std.,
ML320T/321T, ML520/521
Emphasized printing on ML320/321 Std.,
ML320T/321T, ML520/521
Eject sheet (Cut Sheet Feeder) ML320/321 Std.,
ML320T/321T, ML520/521
Proportional spacing on ML320/321 Std.,
ML320T/321T, ML520/521
Proportional spacing off
ML320/321 Std., ML320T/321T, ML520/521
Print from code page ML320T/321T, ML520/521 11
Select 15 cpi ML520/521 15
27 103
87
36
36
128
128
85
85
36
20
20
20
20
26
55
55
55
126
36
126
25
25
Okidata MICROLINE Standard Command Summary
xxxvii
ML Standard Command: ASCI I
Decimal Function Applies to Model(s) Page
ESC I 0
27 105 48
ESC I 1
27 105 49
ESC I
27 108
ESC { n
27 123 n
ESC } NUL
27 125 0
FS28Select 12 cpi ML320/321 Std.,
GS
29 RS30Select 10 cpi ML320/321 Std.,
US31Begin double width printing ML320/321 Std.,
Incremental printing on ML320/321T 82
Incremental printing off ML320/321T 82
Emphasized/enhanced printing off
Change emulation ML320/321 Std.,
ML320/321 Std., ML320T/321T, ML520/521
36
125
ML320T/321T, ML520/521
Software I-Prime ML320/321T,
131
ML520/521
15
ML320T/321T, ML520/521
Select 17.1 cpi
ML320/321 Std.,
15
ML320T/321T, ML520/521
15
ML320T/321T, ML520/521
21
ML320T/321T, ML520/521
xxxviii
Okidata MICROLINE Standard Command Summary
Chapter 1: Printer Drivers
kid
Usable Drivers
The tables below summarize usable drivers for each printer emulation. They are li s ted i n order by decreasing compatibility as you go down the list: select one from as high up on the list as possible, based on what is available from among the drivers supplied with your software. If you don’t see one from near the top of the list, give the software manufacturer a call to see if they have added any drivers to those supplied when you purchased your software.
Table 1: Printer Drivers for ML320 Epson/IBM & ML321 Epson/IBM
IBM Proprinter Emulation Epson FX Emulation
IBM Proprinter II IBM Proprinter IBM Graphics Printer
Table 2: Printer Drivers for ML320 MICROLINE Standard
& ML321 MICROLINE Standard
Okidata ML Emulation
Okidata Microline 320/321 Okidata Microline 292/293 Okidata Microline 192+/193+ Okidata Microline 192/193 Okidata Microline 182/183 Okidata Microline 92/93
Epson FX86/286 Epson FX Epson EX800/1000
Table 3: Printer Drivers for Models ML320 Turbo & ML321 Turbo
IBM Proprinter Emulation Epson FX Emulation Okidata ML Standard Emulation
Okidata ML 320/1T IBM IBM Proprinter III IBM Proprinter II IBM Proprinter IBM Graphics Printer
Okidata ML 320/1T Epson Epson FX286e Epson FX850/1050 Epson FX86/286 Epson FX Epson FX800/1000
Okidata Microline 320/321T Okidata Microline 520/521 Okidata Microline 320/321 Okidata Microline 292/293 Okidata Microline 192/193 Okidata Microline 182/183
Table 4: Printer Drivers for Models ML390 Turbo & ML391 Turbo
IBM Proprinter Emulation IBM X24e AGM/XLe AGM Emulation Epson LQ Emulation
Okidata ML390/1T IBM IBM Proprinter X24e/XL24e IBM Proprinter X24/XL24 IBM Proprinter XL
Chapter 1: Working with Commercial Software 1
Use this emulation only when you have selected an IBM Proprinter X24e/XL24e driver and you need to use Epson LQ high-density graphics.
O
ata ML390/1T Epson Epson LQ 870/1170 Epson LQ 80/1000 Epson LQ 2500 Epson LQ 1500 Epson LQ 1050
Table 5: Printer Drivers for Models ML520 & ML521
p
p
IBM Proprinter Emulation Epson FX Emulation Okidata ML Standard Emulation
Okidata ML 520/1 IBM IBM Proprinter III IBM Proprinter II IBM Proprinter IBM Graphics Printer
Okidata ML 520/1 Epson Epson FX850/1050 Epson FX86/286 Epson FX Epson EX800/1000
Okidata Microline 520/521 Okidata Microline 320/321 Okidata Microline 292/293 Okidata Microline 192/193 Okidata Microline 182/183 Okidata Microline 92/93
Table 6: Printer Drivers for Models ML590 & ML591
IBM Proprinter Emulation IBM X24e AGM/XLe AGM Emulation Epson LQ Emulation
Okidata ML590/1 IBM IBM Pro IBM Proprinter X24/XL24 IBM Proprinter XL
rinter X24e/XL24e
Use this emulation only when you have selected an IBM Proprinter X24e/XL24e driver and you need to use Epson LQ high-density graphics.
Because there are some differences in characteristics such as speed or access to various features, you may wish to experiment with different drivers.
If you must select a driver that is not lis t ed in t he t abl e, be sure t o check it t horoughl y f or pri nt features such as boldface, underline and changes in pitch. Don’ t be surpri sed i f bol df aced items are printed twice, underlines are misplaced, wi de spaces are l eft bet w een l i nes or the printer behaves chaotically (turn off the printer if t he lat t er occurs). These are al l charact eri st i cs of an incompatible driver selection.
Okidata ML590/1 Epson Epson LQ 850/1050 E
son LQ 860/2250 (use for color printing) Epson LQ 2500 Epson LQ 1500 Epson LQ
OKIDATA Software Drivers
Software Drivers Online
For fastest service, you can download the latest drivers for your printer directly through
the Okidata WorldWide Web site: http://www.okidata.com
the Okidata OKILINK
CompuServe
GO PCHW
1.
2.
In Library #2, select “Printer Utilities.”
®
:
®
BBS: (609) 234-5344
Chapter 1: Working with Commercial Software2
Table 7: Available Drivers
Printer Models Available Drivers If you can not download the driver:
ML320 Epson/IBM ML320 Std. ML321 Epson/IBM ML321 Std.
Microsoft Windows: 3.0, 3.1, 95 Microsoft Word (DOS): 5.0, 5.5, 6.0 WordPerfect (DOS): 5.1, 5.2, 6.0
To obtain a 3½" HD diskette containing these drivers, call 1-800-OKIDATA.
ML320 Turbo ML321 Turbo
ML390 Turbo ML391 Turbo
ML520 ML521
Microsoft Windows 3.1x, 95, NT 3.51
Microsoft Windows 3.1x, 95, NT 3.51, NT 4.0
Microsoft Windows: 3.0, 3.1, 95 Microsoft Word (DOS): 5.0, 5.5, 6.0 WordPerfect (DOS): 5.1, 5.2, 6.0
To obtain a3½" HD diskette containing the driver you need, send a written request to
OKIDATA PO Box 4603 Trenton, NJ 08650-9852
Select one:
#MS-9267 for Windows 3.1x #MS-9299 for Windows 95 #MS-9300 for Windows NT
To obtain a3½" HD diskette containing the driver you need, send a written request to
OKIDATA PO Box 4603 Trenton, NJ 08650-9852
Select one:
#MS-9351 for Windows 3.1x #MS-9352 for Windows 95 #MS-9353 for Windows NT 3.51 #MS-9354 for Windows NT 4.0
To obtain a diskette containing all these drivers, send a written request to
OKIDATA PO Box 4603 Trenton, NJ 08650-9852
ML590 ML591
Select one:
#MS-8838 for 3½" HD diskette #MS-8839 for 5¼" HD diskette
Microsoft Windows: 3.0, 3.1, 95 Microsoft Word (DOS): 5.0, 5.5, 6.0 WordPerfect (DOS): 5.1, 5.2, 6.0
Drivers are shipped with the printer
Chapter 1: Working with Commercial Software 3
Software Driver Selection
Selecting a software printer driver is usually a part of the software application installation process. Changing printers may require use of an external routine, or may be possible f rom within the application through menu selection.
Note: Refer to your software documentation for information on installing printer drivers.
Embedded Commands
In some cases, commercial software packages will permit you to create and/or modify the printer driver. Even if a driver specifically designed for the printer is available, this option can provide additional room for customization.
Typically, the driver modification routine will present a list of operations with some method for entering printer commands, permitting substitution, such as entering the italic command in place of the underline command. It also permits modification of an existing driver to better fit your printer. Driver modification does require a basic familiarity with your printer’s command set, so you should study the control codes in the chapters which fol l ow t horoughl y bef ore attempting it.
Some programs also permit you to control your printer directly through embedded commands. Usage of these commands in programs can provide access to a wide range of printer capabilities that are not ordinarily supported, or, in programs like older versions of Lotus 1-2-3, printer commands can be entered as an initialization string to set the basic format for a document.
Chapter 1: Working with Commercial Software4
Chapter 2: Character Set Commands
This chapter describes the character set commands for your printer, includi ng
IBM Character Sets I, II, and III
Epson Character Sets
Microline Character Sets
International Character Sets
Code Page Character Sets
Upper Range Control Codes
Character Table Selection
Special character sets can be substituted for the standard ASCII characters to provide foreign characters, line draw characters, non-printable characters suc h as back space (BS), form feed (FF), vertical tab (VT), etc. One of the Epson Character Sets provi des italics characters.
IBM Character Set Commands
Select IBM Set I Command (IBM)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521
ML390 Turbo, ML391 Turbo ML590, ML591
Function ASCII Dec Hex
Select IBM Set I
ESC 7 27 55 1B 37
This command selects IBM Character Set I in the IBM Proprinter emulation.
Select IBM Set II Command (IBM)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521
ML390 Turbo, ML391 Turbo ML590, ML591
Function ASCII Dec Hex
Select IBM Set II ESC 6 27 54 1B 36
This command selects IBM Character Set II in the IBM Proprinter emulation.
Chapter 2: Character Set Commands 5
Select All Character Set [IBM Set III] Command (Epson LQ)
ML390 Turbo, ML391 Turbo ML590, ML591
Function ASCII Dec Hex
Select All Character Set ESC ( ^ Ln Hn [data] 27 40 94 Ln Hn[data] 1B 28 5E Ln Hn[data]
Use this command to engage the All Character Set (IBM Set III) and apply it to the data which follows the command. This allows normally non-printabl e characters to print.
Parameters Ln and H
n
Parameters Ln and Hn are used to designate how many characters you wish to print using the All Character set:
Number of characters = L For fewer than 256 characters, substitute the number of characters for L
+ (Hn x 256)
n
and set Hn = 0. For
n
more than 256 characters, divide the number of characters by 256 and assign the whole number result to H
and Hn can have any value from 0 to 255 decimal .
L
n
, then assign the remainder to Ln.
n
Print Data from IBM All Characters Set [IBM Set III] Command (IBM)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521
ML390 Turbo, ML391 Turbo ML590, ML591
Function ASCII Dec Hex
Print Specified Data from IBM All Characters Set
This command will print the amount of data you specify within the command, using the IBM All Characters set (also known as Character Set III).
The IBM All Characters set contains only printable characters with the exception of decimal codes 0 and 255, and gives you a broad range of graphi cs characters and other special symbols. This set is also a handy debugging tool for programmers, si nce you can print out and examine files that contain control codes and escape sequences.
In the above command, you must use paramet ers Ln and Hn to specify the total count of characters to be printed. The total count is calculated as
ESC \ Ln Hn27 92 Ln Hn1B 5C Ln H
L
+ (Hn x 256)
n
n
If you are printing fewer than 256 characters, substitute the number of characters for the value of L
and replace Hn with 0.
n
If you are printing 256 or more characters, divide the total number of charact ers you w i sh t o print by 256. Replace H
with the whole number result and assign the remainder to Ln.
n
Chapter 2: Character Set Commands6
Print One Character from IBM All Character Set [IBM Set III] Command (IBM)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521
ML390 Turbo, ML391 Turbo ML590, ML591
Function ASCII Dec Hex
Print Specified Character from IBM Set III ESC ^ n 27 94 n 1B 5E n
This command will print only the one character you specify within the command, using IBM Character Set III (also known as the All Characters set).
When the printer receives this command, it will print the character “n” f rom I BM Ch aract er Set III. The value of n can be from 0 to 255 decimal (00 to FF hexadecimal).
Epson Character Set Commands
Select Epson Set 1 [Slanted Characters] Command (Epson)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521
ML390 Turbo, ML391 Turbo ML590, ML591
Function ASCII Dec Hex
Select Epson Set 1 ESC t 0 27 116 48 1B 74 30
In the Epson emulation, this command specifies Epson Character Set 1 for the upper ASCII range (decimal 128 to 256). Epson Character Set 1 contains slanted characters, equivalent to italics.
Select Epson Set 2 [Graphics Characters] Command (Epson)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521
ML390 Turbo, ML391 Turbo ML590, ML591
Function ASCII Dec Hex
Select Epson Set 2 ESC t 1 27 116 49 1B 74 31
In the Epson emulation, this command specifies Epson Character Set 2 for the upper ASCII range (decimal 128 to 256). Epson Character Set 2 contains graphics characters.
Chapter 2: Character Set Commands 7
MICROLINE Character Set Commands
Select MICROLINE Standard Character Set Command (ML)
ML320 Std., ML321 Std. ML320 Turbo, ML321 Turbo ML520, ML521
Function ASCII Dec Hex
Select Standard Character Set ESC ! 0 27 33 48 1B 21 30
In the Microline emulation, use this command to specify the standard Microline symbol set.
Select MICROLINE Block Graphics Symbol Set Command (ML)
ML320 Std., ML321 Std. ML320 Turbo, ML321 Turbo
Function ASCII Dec Hex
Select Block Graphics Symbol Set ESC ! 1 27 33
49
In the Microline emulation, use this command to specif y a set of bl ock graphics characters that can be used for drawing simple images and bar graphs. This set of charact ers has t he st andard ASCII characters decimal 32 through 12 7 and t he block graphics in the upper ASCII range, decimal 128 through 255.
1B 21 31
Select MICROLINE Line Character Set Command (ML)
ML320 Std., ML321 Std. ML320 Turbo, ML321 Turbo ML520, ML521
Function ASCII Dec Hex
Select Line Character Set ESC ! 2 27 33 50 1B 21 32
In the Microline emulation, use this command to specify the IBM (line graphics) symbol set which is comparable to IBM Set II. This set of characters has the standard ASCII characters decimal 32 through 127 and the line graphics in t he upper ASCII characters, decimal 128 through 255.
Chapter 2: Character Set Commands8
International Character Set Commands
These commands allow you to select special internat i onal charact er set s w hi ch repl ace less-frequently used characters with symbols used in a variety of European languages or in the publishing industry.
Select International Character Set Command (IBM/ML)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521 ML320 Std., ML321 Std. ML390 Turbo, ML391 Turbo ML590, ML591
Function ASCII Dec Hex
Select International Character Set ESC ! n 27 33 n 1B 21 n
To access these characters, replace the n in the command with t he appropriate value taken from column two in the table below.
Table 8: IBM/ML ESC ! Command —
International Character Substitutions
Character Corresponding to Decimal Value
Language n353638486479919293949596123124125126
American (slashed zero) 64 # $ & Ø @ O [ \ ] ^ - { | } ~
American (unslashed zero) 65 # $ & 0 @ O [ \ ] ^ - { | } ~
British 66 £ $ & 0 @ O [ \ ] ^ _ { | } ~ Danish 70# $& 0@OÆØÅÜ _ ` æ Ø å ü Dutch 72 £ $ & 0 @ O [ IJ ] ^ _ { IJ } ~ French 68 £ $ & 0 à O · ç § ^ _ é ù è û French Canadian 74 ü $ ë Ø à Ø â ç ê î ï ô é ù è û German 67#$&0§OÄÖÜ^_‘äöüß Italian 73 £ $ & Ø § O Latin American 76 # $ & 0 à O ¡ Ñ ¿ é _ ü ì ñ ó ú Norwegian 71# $& 0@OÆØÅ^ _ Publisher 90 # $ & 0 § O
Spanish 75 ! $ & 0 ¡ O Ñ ñ ¿ ü _ á é í ó ú Swedish 69 § ¤ & 0 É O Ä Ö Å ^ _ é ä ö å ü
çé^_ùà ò è ì
°
æØå ~
‘“¶
°
`©®
±*
* For Models ML520 and ML521, character position number 95 in the Publisher Character Set is _ (underscore).
Chapter 2: Character Set Commands 9
Select International Character Set Command (Epson)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521
ML390 Turbo, ML391 Turbo ML590, ML591
Function ASCII Dec Hex
Select International Character Set ESC R n 27 82 n 1B 52 n
This command is used to use characters from the specified international character set to replace the standard characters. To access these characters, replace m in the command with the appropriate value taken from column two in the t abl e bel ow . For t he ML39 0 Turbo and ML391 Turbo printers, substitute the value of n given in Table 3 to engage characters from the Code Page indicated.
Table 9: Epson ESC R Command —
International Character Substitutions
Decimal Value of Character
Language n 35 36 38 64 79 91 92 93 94 95 96 123 124 125 126
American 0#$&@O[\]^-‘{|}~ British 3 £ $ & @ O [ \ ] ^ _ ` { | } ~ Danish I 4 # $ & @ O Æ Ø Å ^ _ ` æ Ø å ~ Danish II 10 # $ & É O Æ Ø Å Ü _ é æ Ø å ü Dutch 14 £ $ & @ O [ IJ ] ^ _ ` { ij } ~ French 1 # $ & à O French Canadian 13 ü $ ë à Ø â ç ê î ï ô é ù è û German 2#$&§OÄÖÜ^_‘äöüß Italian 6 # $ & @ O Japanese 8 # $ & @ O [ ¥ ] ^ _ ` { | } ~ Latin American 12 # $ & à O ¡ Ñ ¿ é _ ü í ñ ó û Norwegian 9 # ¤ & É O Æ Ø Å Ü _ é æ Ø å ü Publisher 64 # $ & § O
Spanish I 7 Pt $ & @ O ¡ Ñ ¿ ^ _ ` ¨ ñ } ~ Spanish II 11 # $ & à O ¡ Ñ ¿ é _ ` í ñ ó ú Swedish 5 # ¤ & É O Ä Ö Å Ü _ é ä ö å ü
ç§^_` é ù è
\é^_ùà ò è ì
‘¨¶
°
`©®
±*
Ѡ
* For Models ML520 and ML521, character position number 95 in the Publisher Character Set is _ (underscore).
Table 10: Epson ESC R Command —
Code Page Selections for ML390/391 Turbo
Code Page Value of n
Abicomp 81 BRASCII 80 Canada French 43 Multilingual 850 26 Norway 865 27 Portugual 28
Print from Code Page Command (IBM/ML)
ML320 Turbo, ML321 Turbo ML520, ML521 ML390 Turbo, ML391 Turbo ML590, ML591
Chapter 2: Character Set Commands10
Function ASCII Dec Hex
Print from Code Page ESC [ T Ln Hn 0 0
cp Lcp
0
H
27 91 84 L
cp Lcp
0
H
n Hn
0 0
1B 5B 54 L 00
cp Lcp
00
H
n Hn
00
This command permits you to select a Code Page charact er set and t o pri nt t he amount of dat a you specify within the command from that Code Page set. It applies to both the IBM emulation (all models listed) and the Okidata Microline emulation (Models ML320/321 Turbo and ML520/521 only).
Parameters Ln and H
n
These parameters specify the total count of characters t o be pri nt ed. The t ot al count i s calculated as
+ (Hn x 256)
L
n
If you are printing less than 256 characters, substitute the number of characters for the value of
and replace Hn with 0.
L
n
If you are printing 256 or more characters, divide the total number of charact ers you w i sh t o print by 256. Replace L
with the whole number result and assign the remainder to Hn.
n
Parameters Hcp and L
cp
These parameters specify the Code Page set to be used when printing the characters as given in the table below.
Table 11: IBM/ML ESC [ T Command —
Code Page Parameters
Hcp value Lcp value Code Page Set
1 181 USA 3 82 Multilingual 3 92 Canadian Fr en ch 3 95 Portugal 397Norway 4 16 BRASCII* 417Abicomp*
*ML320/321 Turbo and ML390/391 Turbo only.
Chapter 2: Character Set Commands 11
Assign Code Page Command (Epson)
ML320 Turbo, ML321 Turbo
Function ASCII Dec Hex
Assign Code Page to Character Set
This command allows you to assign a Code Page charact er set ( s ee Apendix C) to Epson Character Set 1 or Set 2, which you can then select using ESC t 0 or ESC t 1, respectively.
ESC ( t 3 0 P
n1 Pn2 Pn3
27 40 116 51 48 P
n1 Pn2 Pn3
1B 28 74 33 30 P
n1 Pn2 Pn3
Parameter P
n1
This parameter specifies which character set you are replacing with a Code Page set:
= 0: replaces Epson Character Set 1
P
n1
P
= 1: replaces Epson Character Set 2
n1
Parameters Pn2 and P
n3
These parameters specify the Code Page set assigned to the designated Epson Character Set, as given in the table below.
Table 12: Epson 9-Pin ESC ( t Command —
Code Page Parameters for Pn2 and Pn3 Values
Pn2 Hex Value Pn3 Hex Vvalue Code Page Set
0 0 Italic 1 0 PC437 (USA) 3 0 PC850 (Multilingual) 8 0 PC863 (Canadian French) 7 0 PC860 (Portugal)
9 0 PC865 (Norway) 25 0 BRASCII 26 0 Abicomp
Chapter 2: Character Set Commands12
Upper Range Control Code Commands (Epson)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521
ML390 Turbo, ML391 Turbo ML590, ML591
Function ASCII Dec Hex
Permit Printing Upper Range Control Codes
Cancel Printing Upper Range Control Codes
* Not available for ML390 Turbo or ML391 Turbo.
In the Epson emulation, the ASCII characters f r om deci mal 128 through 159 are normally interpreted as control codes and cannot be printed. I n some cases, yo u may w i sh t o st ore custom characters in these locations.
The ESC 6 and ESC 7 commands allow you to print cust om charact ers st ored i n these areas and then return to ”normal” printing. These commands are not necessary in the ML590 and ML591 printers.
The ESC I n command allows you to print custom charters stored in the following ASCII areas: 00H to 06H, 10H, 11H, 15H to 17H , 19H to 1AH, 1CH to 1FH, 80H to 86H, 90H, 91H, 95H to 97H, 99H, 9AH, or 9CH to 9FH.
ESC 6
or
ESC I 1* ESC 7
or
ESC I 0*
27 54
or
27 73 49* 27 55
or
27 73 48*
1B 36
or
1B 49 31* 1B 37
or
1B 49 30*
Select Code Page Set Command (Epson)
ML390 Turbo, ML391 Turbo ML590, ML591
Function ASCII Dec Hex
Select Code Page Set ESC ( t Ln Hn Pn1 Pn2 P
Use this command to store any four code page sets from the t abl e bel ow , engaged using the ESC t n command.
Parameters Ln and H
n
Parameters Ln and Hn are used to designate the number of bytes to follow in the subsequent parameters, where
Number of bytes = L
L
and Hn can have any value from 0 to 255 decimal. G eneral l y, Ln is set to 3 and Hn is set to 0.
n
Parameter P
n1
Parameter Pn1 selects the table area in which the four code page sets will be stored. You can assign it to hexadecimal 00, 01, 02, 03, 30, 31, 32, or 33.
Parameters Pn2 and P
n3
Parameters Pn2 and Pn3 determine which code page set will be used, as follows:
27 40 116 Ln Hn Pn1 Pn2 P
n3
+ (Hn x 256)
n
1B 28 74 Ln Hn Pn1 Pn2 P
n3
n3
Table 13: Epson 24-Pin ESC ( t Command —
Chapter 2: Character Set Commands 13
Code Page Sets for Pn1, Pn2 Values
P
Pn3Code Page Se t
n2
0 0 Italic 1 0 PC-437 (USA) 3 0 PC-850 (Multilingual) 7 0 PC-860 (Portugal) 8 0 PC-863 (Canadian French)
9 0 PC-865 (Norway) 25* 0* BRASCII* 26* 0* Abicomp*
* Applies only to ML390 Turbo and ML39 1 Turbo
For example, use the command
ESC ( t 03H 00H 03H 09H 00H
to store the PC-865 Norwegian code page set in tabl e area 03.
Chapter 2: Character Set Commands14
Chapter 3: Character Size & Spacing Commands
This chapter describes the commands used to set the size and spaci ng of charact ers pri nted:
Pitch Setting Commands
Superscript & Subscript Commands
Double Width & Height Comma nds
Combined Print Features Command
Character Spacing Commands
Pitch Setting Commands
These commands are used to select the pitch in characters per inch (cpi ) used. For example, at 10 cpi, each character is 1/10" wide. The number of characters that will fit on a line depends on the pitch you have selected and on wheth er you have a narrow carriage or a wide carriage printer. You can also set pitch using the printer's front panel or the menu (see “Menu Mode” in your printer manual).
Table 14: Pitch Setting Commands —
Characters Per Line (CPL) for Pitches
Characters per Line
Pitch Narrow Carriage Models Wide Carriage Models
10 cpi 80 cpl 136 cpl 12 cpi 96 cpl 163 cpl 15 cpi* 120 cpl * 204 cpl *
17.1 cpi 137 cpl 233 cpl 20 cpi 160 cpl 272 cpl
* 15 cpi is not available on Models ML320/1 E/I, ML320/1 Std. or ML320/1 Turbo.
Pitch Setting Commands for Non-compressed Printing (IBM/E/ML)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521 ML320 Std., ML321 Std. ML390 Turbo, ML391 Turbo ML590, ML591
Function Command: IBM Command: Epson Command: ML
Select 10 cpi ASCII: DC2
Dec: 18 Hex: 12
Select 12 cpi ASCII: ESC :
Dec: 27 58 Hex: 1B 3A
Select 15 cpi* ASCII: ESC g
Dec: 27 103 Hex: 1B 67
* 15 cpi is not available on Models ML320/1 E/I, ML320/1 Std. or ML320/1 Turbo.
ASCII: ESC P Dec: 27 80 Hex: 1B 50
ASCII: ESC M Dec: 27 77 Hex: 1B 4D
ASCII: ESC g Dec: 27 103 Hex: 1B 67
ASCII: RS Dec: 30 Hex: 1E
ASCII: FS Dec: 28 Hex: 1C
ASCII: ESC g Dec: 27 103 Hex: 1B 67
Pitch Setting Commands for Compressed Printing (IBM)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521
ML590, ML591
Chapter 3: Character Size & Spacing Commands 15
Function Command
Select Compressed Pitch
ASCII: SI or ESC SI Dec: 15 or 27 15 Hex: 0F or 1B 0F
Cancel Compressed Pitch Not applicable
ML390 Turbo, ML391 Turbo
Function Command Notes
Select Compressed Pitch*
ASCII: SI or ESC SI Dec: 15 or 27 15 Hex: 0F or 1B 0F
SI Select item in the printer Menu must be set to 12 CPI in order to select compressed pitch.
If 10 cpi character pitch is engaged, printer wil l go to 17.1 cpi pitch.
If 12 cpi character pitch is engaged, printer wil l go to 20 cpi pitch.
* To cancel compressed pitch, enter one of the non-compressed printing pitch setting
commands.
Pitch Setting Commands for Compressed Printing (Epson)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521
ML390 Turbo, ML391 Turbo ML590, ML591
Function Command Notes
Select Compressed Pitch
ASCII: SI or ESC SI Dec: 15 or 27 15 Hex: 0F or 1B 0f
If 10 cpi is engaged, compressed pitch will be 17.1 cpi
If 12 cpi is engaged, compressed pitch will be 20 cpi.
Cancel Compressed Pitch ASCII: DC2
Dec: 18 Hex: 12
If 17.1 cpi is engaged, pitch wil l revert to 10 cpi.
If 20 cpi is engaged, pitch will revert to 12 cpi.
Chapter 3: Character Size & Spacing Commands16
Pitch Setting Commands for Compressed Printing (ML)
ML320 Std., ML321 Std. ML320 Turbo, ML321 Turbo ML520, ML521
Function ASCII Dec. Hex.
Select 17.1 cpi ASCII: GS Dec: 29 Hex: 1D Select 20 cpi ASCII: ESC # 3 Dec: 27 35 51 Hex: 1B 23 33
Select Character Pitch/Point Size Command (Epson)
ML320 Turbo, ML321 Turbo ML390 Turbo, ML391 Turbo ML590, ML591
Function ASCII Dec Hex
Select Character Pitch/Point Size ESC X p Pn Lp Hp27 88 70 Pn Lp Hp1B 58 46 Pn Lp H
Use this command to place the printer in the scalable font mode and to select the character pitch and the point size. Character pitch setting range is 5 to 20 characters per inch (cpi); point size setting range is 8 to 64 points.
For the ML590 and ML591 printers, you can select any character pitch from 5 to 20 cpi for the LQ Courier, LQ Roman and LQ Swiss typefaces. The G othi c, Orator, Prest i ge and Sw i ss Bold typefaces will only print in point sizes 10, 10.5 and 21. The table below shows which typeface will print in other sizes when these typefaces are selected.
p
Note: If you wish to use this command to print to an ML320/321 Turbo printer in a UN I X
environment, you must reboot the system after the command is ent ered.
Table 15: Epson ESC X Command —
Font Substitution for Models ML590 & ML591
Typeface that Prints
Typeface 8 Point 12 to 20 & 22 to 64 Point
Gothic Swiss Courier Orator Swiss Courier Prestige Roman Courier Swiss Bold Swiss Courier
Chapter 3: Character Size & Spacing Commands 17
Parameter P
n
Parameter Pn is used to set the character pitch. It can have any val ue f r om 0 t o 127 decimal for ML320/321 Turbo and for ML590/591 print ers, or f rom 0 t o 255 f or ML390/ 391 Turbo.
Table 16: Epson ESC X Command — Character Pitch Settings for Pn Values
P
n
Character Pitc h
0 Remains unchanged 1 Proportional 18 (2 to 19) 20 cpi 20 18 cpi 21 (21 to 23) 17.1 cpi 24 (24 to 29) 15 cpi 30 (30 to 35) 12 cpi 36 (36 to 41) 10 cpi 42 (42 to 47) 8.6 cpi 48 (48 to 59) 7.5 cpi 60 (60 to 71) 6 cpi 72 (72 to 127) 5 cpi
Parameters Lp and H
p
Parameters Lp and Hp are used to set the point size according to the foll ow i ng equat i on:
= [Lp + (Hp x 255] x 0.5
N
p
and Hp can have any value from 0 to 255 decimal .
L
p
Table 17: Epson ESC X Command —
Point Sizes (1 point = 1/72") for N
p
NpPoint Size N
Point Size N
p
Point Size N
p
p
Point Size
0 Unchanged 44 22 pt 74 37 pt 106 53 pt 16 8 pt 46 23 pt 76 38 pt 108 54 pt 20 10 pt 48 24 pt 78 39 pt 110 55 pt 21 10.5 pt 50 25 pt 80 50 pt 112 56 pt 22 11 pt 52 26 pt 82 41 pt 114 57 pt 24 12 pt 54 27 pt 84 42 pt 116 58 pt 26 13 pt 56 28 pt 86 43 pt 118 59 pt 28 14 pt 58 29 pt 90 45 pt 120 60 pt 30 15 pt 60 30 pt 92 46 pt 122 61 pt 32 16 pt 62 31 pt 94 47 pt 124 62 pt 34 17 pt 64 32 pt 96 48 pt 126 63 pt 36 18 pt 66 33 pt 98 49 pt 128 64 pt 38 19 pt 68 34 pt 100 50 pt 40 20 pt 70 35 pt 102 51 pt 42 21 pt 72 36 pt 104 52 pt
Chapter 3: Character Size & Spacing Commands18
Example
To set a point size (Np) of 216:
= [Lp + (Hp x 255] x 0.5
N
p
Assign a value of 1 to H
1.
Multiply 216 by 2: 216 x 2 = 432.
2.
3.
Subtract 255 from 432: 432 - 255 = 177., t hen round t hi s val ue down to the nearest even
number, 176. Assign this value to L
.
p
.
p
Here is a sample BASIC program to test your calculated values:
ESC$ = CHR$(27) LPRINT ESC$; "@"; LPRINT "This is a test of the Select Pitch and Point Size Command." LPRINT "This is the default text mode." LPRINT "The characters below should be the maximum character height of 216
points." LPRINT ESC$; "X"; CHR$(1); CHR$ (176); CHR$(1) LPRINT "Hy"
Select Character Pitch/Point Size Command (IBM–Oki unique)
ML320 Turbo, ML321 Turbo ML390 Turbo, ML391 Turbo ML590, ML591
Function ASCII Dec Hex
Select Character
Pitch/ Point Size
ESC DLE F Pno Pn Lp Hp27 16 70 Pno Pn Lp Hp1B 10 46 Pno Pn Lp H
p
Use this OKI unique command to select print abl e f onts by charact er pi t ch and point size.
Parameter P
no
This parameter is used to give the number of bytes to follow in the subsequent parameters. It can have any value from 0 to 255 decimal. General l y, a val ue of 3 i s assi gned t o P
Parameter P
n
.
no
Parameter Pn is used to set the character pitch. It can have the fol l owi ng val ues:
ML320 Turbo, ML321 Turbo: 0 1o 127 ML390 Turbo, ML391 Turbo: 0 to 255 ML590, ML591: 0 to 127
See "Table 16: Epson ESC X Command — Character Pitch Settings for P
Values," above.
n
Chapter 3: Character Size & Spacing Commands 19
Parameters Lp and H
p
Parameters Lp and Hp are used to set the point size according to the foll ow i ng equat i on:
N
= [Lp + (Hp x 255] x 0.5
p
and Hp can have any value from 0 to 255 decimal .
L
p
See "Table 17: Epson ESC X Command — Point Si zes f or N
Values," above.
p
Superscript/Subscript Commands (IBM/E/ML)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521 ML320 Std., ML321 Std. ML390 Turbo, ML391 Turbo ML590, ML591
Function IBM Epson ML
Start Superscript Printing
Stop Superscript Printing ASCII: ESC T
Start Subscript Printing ASCII: ESC S 1
Stop Subscript Printing ASCII: ESC T
ASCII: ESC S 0 Dec: 27 83 0 Hex: 1B 53 00
Dec: 27 84 Hex: 1B 54
Dec: 27 83 1 Hex: 1B 53 01
Dec: 27 84 Hex: 1B 54
ASCII: ESC S 0 Dec: 27 83 0 Hex: 1B 53 00
ASCII: ESC T Dec: 27 84 Hex: 1B 54
ASCII: ESC S 1 Dec: 27 83 1 Hex: 1B 53 01
ASCII: ESC T Dec: 27 84 Hex: 1B 54
ASCII: ESC J Dec: 27 74 Hex: 1B 4A
ASCII: ESC K Dec: 27 75 Hex: 1B 4B
ASCII: ESC L Dec: 27 76 Hex: 1B 4C
ASCII: ESC M Dec: 27 77 Hex: 1B 4D
Superscript characters are printed above the normal print li ne, and are used for exponents and special typographic effects (x
2
). Subscripts are handy for chemical formulas (H2O).
Superscripts and subscripts will print as full-width characters. They cannot be used with double-height printing.
Chapter 3: Character Size & Spacing Commands20
Double Width Commands (IBM/E/ML)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521 ML320 Std., ML321 Std. ML390 Turbo, ML391 Turbo ML590, ML591
Function IBM Epson ML
Begin Double Width Printing
End Double Width Printing
Begin Double Width Printing Line by Line
End Double Width Printing Line by Line
ASCII: ESC W 1 Dec: 27 87 49 Hex: 1B 57 31
ASCII: ESC W 0 Dec: 27 87 48 Hex: 1B 57 30
ASCII: SO Dec: 14 Hex: 0E
ASCII: DC4 Dec: 20 Hex: 14
ASCII: ESC W 1 Dec: 27 87 49 Hex: 1B 57 31
ASCII: ESC W 0 Dec: 27 87 48 Hex: 1B 57 30
ASCII: SO or ESC SO Dec: 14 or 27 14 Hex: 0E or 1B 0E
ASCII: DC4 Dec: 20 Hex: 14
ASCII: US Dec: 31 Hex: 1F
Use any of the pitch selection commands.
Not applicable
Not applicable
Double Height Commands (E/ML)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521 ML320 Std., ML321 Std. ML390 Turbo, ML391 Turbo ML590, ML591
Function Epson ML
Begin Double Height Printing ASCII: ESC w 1
Dec: 27 119 1 Hex: 1B 77 01
End Double Height Printing ASCII: ESC w 0
Dec: 27 119 0 Hex: 1B 77 00
ASCII: ESC US 1* Dec: 27 31 49 Hex: 1B 1F 31
ASCII: ESC US 0* Dec: 27 31 0 Hex: 1B 1F 00
* This command is also valid for the ML390 Turbo, ML391 Turbo, ML590 and ML591 in Epson
LQ emulation; it duplicates the ESC w command.
Double height printing produces characters that are t w i ce as t all as normal si ze charact ers. i t can be combined with double width and emphasized printing for an even more striking effect.
When you use double height printing, you will need to adjust the line spacing to accommodate the taller characters.
Chapter 3: Character Size & Spacing Commands 21
Double Width & Height Printing Commands
The double width & height comman ds al l ow you t o sel ect double width, double height, or double width and double height pri nt i ng i n t he I BM emulat i on.
Double Width & Height Printing Command, 9-Pin Printers (IBM)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521
Function ASCII Decimal Hexadecimal
Double Width and/or Height Printing
This command lets you specify character width and line spacing in addition to character height.
ESC [ @ Ln Hn NUL NUL n
1 n2
27 91 64 Ln Hn 0 0 n
1 n2
1B 5B 40 Ln Hn 00 00 n
1 n2
Parameters n1 and n
2
Parameters n1 and n2 are used to set the width, line spacing and height used. Variable n1 sets the character height and line spacing; variable n
Parameters Ln H
n
sets the character width.
2
These parameters specify the number of bytes of the modes, calculated as
+ (Hn x 256)
L
n
Generally, L
is 4 and Hn is 0.
n
Table 18: IBM ESC [ @ Command —
Character Height/Line Spacing for n1 Values
Decimal Value of n1Character Height Line Spaci n g
0 Unchanged Unchanged 1 Standard Unchanged
2 Double Unchanged 16 Unchanged Single 17 Standard Single 18 Double Single 32 Unchanged Double 33 Standard Double 34 Double Double
Table 19: IBM ESC [ @ Command — Character Width for n2 Values
Decimal Value of n
0 Unchanged 1Standard 2 Double
For example, to use double height characters wi t h doubl e t he normal l i ne spaci ng, w i t hout changing the width of the characters use this BASI C st at ement:
LPRINT CHR$(27);"[@ ";CHR$(4);CHR$(0);CHR$(0);CHR$(0);CHR$(34);CHR$(0)
Chapter 3: Character Size & Spacing Commands22
Character Widt h
2
Double Height & Width Printing Command, 24-Pin Printers (IBM)
ML390 Turbo, ML391 Turbo
Function ASCII Decimal Hexadecimal
Double Height Printing ESC [ @ n1 n2 m
m2 m3 m
4
27 91 64 n1 n2 m
1
m2 m3 m
1B 5B 40 n1 n2 m
1
4
m2 m3 m
1
4
Parameters n1 and n
2
These variables specify the number of mode bytes in the command. Normally, n1 is set to 4 and n
is set to 0.
2
Parameters m1, m2, m3, m
4
These variables control the mode. Parameters m1 and m2 are set to 0. Parameter m3 is used to set the line spacing and character height. Parameter m
is used to set the width of the character
4
as shown in the tables below.
Table 20: IBM ESC [ @ Command —
Character Height/Line Spacing for m3 Values
Decimal Value of m3Character Height Line Spac i n g
0 Unchanged Unchanged
1 Standard Unchanged
2 Double Unchanged
16 Unchanged Single 17 Standard Single 18 Double Single 32 Unchanged Double 33 Standard Double 34 Double Double
Table 20a: IBM ESC [ @ Command —
Character Width for m
Decimal Value of m4Character Widt h
0 Unchanged 1Standard 2 Double
Chapter 3: Character Size & Spacing Commands 23
Values
4
Combined Print Features Command (ML)
ML320 Std., ML321 Std. ML320 Turbo, ML321 Turbo ML520, ML521
Function ASCII Dec Hex
Select Print Features ESC & n1 n2 n3 n4 : 27 38 n1 n2 n3 n4 58 1B 26 n1 n2 n3 n4 3A
This command lets you select print quality, character pitch, and several other printing features with a single command. The values of the four variables (n
1 n2 n3 n4
are selected. To calculate the value for each variable, first find the features you want in the Variable Values
table below. Next, add the corresponding val ues f r om col umn one for each variable. Then add the appropriate factor for each variable taken from Tabl e 22.
Table 21: ML ESC & Command —
Print Features for n
, n2, n3 and n4 Values
1
) determine which features
Value n
1
n
2
n
3
n
4
1 10 cpi Cancel sup er/s ubs crip ts Utility HSD 2 12 cpi Sub scr i pts NLQ N/A 4 17.1 cp i Sup er s cr ipt s Custom character s Underlining 8 20 cpi Emp ha si ze d Italics Double height
16 Double width Enhanced N/A N/A
Table 22: ML ESC & Command —
Variable Factors for n1, n2, n3, n
Variable Factor
n
1
n
2
n
3
n
4
Here are some pointers on using this command:
You don't have to use all four variables; use only t he ones t hat cont rol t he f eat ures you want
to change.
You can enter the variables in any order.
32 64 96
112
4
Be sure to add in the variable factor when calculat i ng the vari abl e val ues—this number tells
the printer which variable is which.
You'll get unexpected results if you select incompatible features (e.g., if you pick both 10
and 12 cpi), or if you've added up the values incorrectly.
Chapter 3: Character Size & Spacing Commands24
For example, to set 10 cpi, emphasized, NLQ and un derl i ning usi ng t hi s command, you would
calculate the values for n
n
= 1 + 32 = 33
1
n
= 8 + 64 = 72
2
n
= 2 + 96 = 98
3
n
= 4 + 112 = 116
4
, n2, n3, and n4 as follows:
1
The resulting BASIC statement looks like this: LPRINT CHR$(27);”&”;CHR$(33);CHR$(72);CHR$(98);CHR$(116);”:”
Character Spacing Commands The character spacing commands include commands to turn proportional spacing on and off,
as well as commands for increasing the standard spacing betwee n characters at a fixed value.
Proportional Spacing Commands (IBM/E/ML) ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521
ML320 Std., ML321 Std. ML390 Turbo, ML391 Turbo ML590, ML591
Function IBM Epson ML Proportional Spacing On
Proportional Spacing Off
ASCII: ESC P 1
Dec: 27 80 1 Hex: 1B 50 01
ASCII: ESC P 0
Dec: 27 80 0 Hex: 1B 50 00
ASCII: ESC p 1
Dec: 27 112 1 Hex: 1B 70 01
ASCII: ESC p 0
Dec: 27 112 0 Hex: 1B 70 00
ASCII: ESC Y
Dec: 27 89 Hex: 1B 59
ASCII: ESC Z
Dec: 27 90 Hex: 1B 5A
In the ML320 E/I, ML321 E/I, ML320 Std., ML321 Std., ML320 Turbo, ML321 Turbo, ML520,
and ML521, proportional spacing is available only with Near Letter Quality (NLQ) and Utility (UTL) printing.
In the ML390 Turbo, ML391 Turbo, ML59 0 and ML591, proportional spacing is available only
with Letter Quality (LQ) printing.
This command adjusts the space between letters to compensate f or t he varying w i dt hs of
individual characters. Unlike fixed spacing, w here al l characters are f ormed w i t hin a mat r i x of uniform width at a specified pitch, proportional spacing gives more horizontal space to wide characters, like w or M, and less to narrow characters, like I or f. The resulting print is more attractive and easier to read than fixed-space printing.
Because the characters have different widths, proportionally spaced fonts have no fixed pitch;
therefore margin settings are only approximate unless your software specifically supports proportional spacing.
You can also select proportional spacing using t he pri nt er menu or the f r ont panel buttons. In
addition, proportional spacing is one of the f eat ures avai l abl e t hrough t he composite command in the Epson mode.
Chapter 3: Character Size & Spacing Commands 25
Intercharacter Spacing Commands (IBM/E/ML) Note: Intercharacter spacing can NOT be set in the HSD and bit image graphics mo des.
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521 ML320 Std., ML321 Std.
Function IBM Epson ML Set Intercharacter
Spacing
Values for n n = 0 to 11 n = 0 to 255 n = 0 to 11
ML390 Turbo, ML391 Turbo ML590, ML591
Function IBM Epson Set Intercharacter Spacing ML590/591 Only:
Values for n n = 0 to 255 n = 0 to 255*
* For the ML390 Turbo and ML391 Turbo, bit 7 is ignored.
ASCII: ESC V n
Dec: 27 86 n Hex: 1B 56 n
ASCII: ESC SP n
Dec: 27 32 n Hex: 1B 20 n
ASCII: ESC SP n
Dec: 27 32 n Hex: 1B 20 n
ASCII: ESC SP n
Dec: 27 32 n Hex: 1B 20 n
ASCII: ESC N n
Dec: 27 78 n Hex: 1B 4E n
The standard spacing between characters is 3 dot s col umns. These commands are used to add
additional spacing between characters, added to the right of each character. The value is expressed in dots; the number of dots per inch depends on t he current pri nt mode. The t able below shows the amount of space added for each cpi setting.
Table 23: IBM ESC V and ESC SP & Epson ESC SP Commands —
Character Spacing (in Inches)
Setting Amount of space added
10 cpi n/120" 12 cpi n/144" 15 cpi n/180"
17.1 cpi n/206" 20 cpi n/240"
For example, to add 8/120" spacing to your printi ng at 10 cpi , use t hi s BASI C command:
LPRINT CHR$(27);"N";CHR$(8)
Chapter 3: Character Size & Spacing Commands26
Table 24: ML ESC N Command —
Character Spacing (in Inches)
Decimal Value of n 10 cpi 12 cpi 17.1 cpi 20 cpi
0 3/120" 3/144" 3/206" 3/240" 1 4/120" 4/144" 4/206" 4/240" 2 5/120" 5/144" 5/206" 5/240" 3 6/120" 6/144" 6/206" 6/240" 4 7/120" 7/144" 7/206" 7/240" 5 8/120" 8/144" 8/206" 8/240" 6 9/120" 9/144" 9/206" 9/240" 7 10/120" 10/144" 10/206" 10/240" 8 11/120" 11/144" 11/206" 11/240"
9 12/120" 12/144" 12/206" 12/240" 10 13/120" 13/144" 13/206" 13/240" 11 14/120" 14/144" 14/206" 14/240"
For example, if you are printing at 10 cpi and want to set t he charact er spaci ng at 11/ 120", use
this BASIC command:
LPRINT CHR$(@7);"N";CHR$(8)
Set Horizontal Motion Index [HMI] Command (Epson LQ) ML390 Turbo, ML391 Turbo ML590, ML591
Function ASCII Dec Hex Set Horizontal Motion Index (HMI) ESC c L
p Hp
27 99 L
p Hp
1B 63 L
p Hp
Use this command to set the character spacing in LQ and Utility modes to any value from
1/360" up to 3".
Parameters L Parameters L
and H
p
p
p
and Hp can have any value from 0 to 255 decimal and are used t o designate the
Horizontal Motion Index (HMI) according t o t he f ol l ow i ng equat i on:
HMI (inches) = [L
+ (Hp x 256)] ÷ 360
p
If the HMI value is set to greater than 3":
ML390 Turbo and ML391 Turbo printers will ignore the command
ML590and ML591 printers will use 1/10" spacing.
Chapter 3: Character Size & Spacing Commands 27
Chapter 3: Character Size & Spacing Commands28
Chapter 4: Character Style Commands
This chapter describes the commands for selecting print style including the following:
Print Mode & Fonts Commands
Italics Print Commands
Emphasized & Enhanced Print Comman ds
Underline/Overscore/Strike-Through Commands
Outline/Shadow Commands
Print Mode & Fonts Commands
Individual Print Mode & Font Commands for 9-Pin Printers (IBM/E/ML)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521 ML320 Std., ML321 Std.
Function IBM Epson ML
Select HSD Print Mode ASCII: ESC # 0
Dec: 27 35 48 Hex: 1B 23 30
Select Utility Print Mode See Combined
Commands below
Select NLQ Print Mode See Combined
Commands below
Select NLQ Gothic Font See Combined
Commands below
ASCII: ESC ( 0 Dec: 27 40 48 Hex: 1B 28 30
ASCII: ESC x 0 Dec: 27 120 0 Hex: 1B 78 00
ASCII: ESC x 1 Dec: 27 120 49 Hex: 1B 77 31
and
ASCII: ESC k n Dec: 27 107 n Hex: 1B 6B n
Not applicable ASCII: ESC 3
ASCII: ESC # 0 Dec: 27 35 48 Hex: 1B 23 30
ASCII: ESC 0 Dec: 27 48 Hex: 1B 30
ASCII: ESC 1 Dec: 27 49 Hex: 1B 31
Dec: 27 51 Hex: 1B 33
Use High Speed Draft (HSD) or Utility (UTL) printing for drafts and other documents that you want to print quickly. HSD is faster and its characters somewhat rougher than utility.
Near Letter Quality (NLQ) printing is slower than HSD and UTL, but the characters are crisper and more like the characters produced by a typewriter. U se N LQ f or fi nal drafts and i mport ant documents where appearance matters.
You can also use your printer’s front panel or the menu to set the print quality, but settings made using the front panel are likely to be overridden by software applications.
To select the NLQ print mode in the Epson emulati on, you must send t w o commands: ESC x 1 and ESC k n. The ESC x 1 command must be sent to the printer first, followed by the ESC k n command. Parameter n designates which font will be used as follows:
n=0: Courier NLQ n=1: Sans Serif NLQ
Chapter 4: Character Style Commands 29
Individual Print Mode & Font Commands for 24-Pin Printers (IBM/E)
ML390 Turbo, ML391 Turbo
Function ASCII Dec. Hex.
Select Utility Print Mode ESC x 0 27 120 48 1B 78 30 Select LQ Print Mode ESC x 1 27 120 49 1B 78 31 Select LQ Print Mode & Font ESC k n 27 107 n 1B 6B n
Use Utility printing for drafts and other documents that you want to print quickly. Letter Quality (LQ) printing is slower than utility printing, but the characters are much crisper
and sharper. Use LQ for top-quality printing of final drafts and important documents, where appearance matters.
You can also use your printer’s front panel or the menu to set the print quality, but settings made using the front panel are likely to be overridden by software applications.
The ESC k n command allows you to select a specific font for the LQ mode. Substitute a value for n from the table below.
Table 25: IBM/Epson ESC k Command —
Fonts for n Values
Hex. Value of n Font
00 Roman 01 Swiss 02 Courier 03 Prestige 04 Script
07 Orator 7A Swiss Bold 7C Gothic
7E Menu Setting
Chapter 4: Character Style Commands30
Combined Select Font Command (IBM)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521
ML390 Turbo, ML391 Turbo ML590, ML591
Function ASCII Decimal Hexadecimal
Select Print Quality and Character Spacing ESC I n 27 73 n 1B 49 n
This command allows you to select print quality and character spacing for resident fonts for all models listed. It also allows you to select print quality and character spacing for downline loadable (DLL) fonts for all but Models ML390 Turbo and ML391 Turbo. Substitute a value for n from the table below.
Table 26: IBM ESC I Command —
Print Modes Coresponding to n Values for All 9-Pin Models
Value of n Print mode
0 10 cpi utility 1 12 cpi HSD 2 NLQ Sans Serif 3 NLQ Courier 4 10 cpi DLL utility 5 12 cpi DLL utility 6 NLQ Sans Serif DLL
7 NLQ Courier DLL 11 NLQ Courier Italic* 15 NLQ Courier DLL Italic*
* ML320T, ML321T, ML520, ML521 only
Table 27: IBM IBM ESC I Command—
Print Modes for n Values for 24-Pin Models ML390T & ML391T
Dec. Value of n Print Mode
0 10 cpi Utility 2 10 cpi LQ 3 Proporti on al LQ
8 12 cpi Utility 10 12 cpi LQ 16 17.1 cpi Utility 18 17.1 cpi LQ 24 15 cpi Utility 26 15 cpi LQ 32 20 cpi Utility 34 20 cpi LQ
Chapter 4: Character Style Commands 31
Table 28: IBM ESC I Command —
fid Lfid
fid Lfid
Print Modes Coresponding to n Values for 24-Pin Models ML590 & ML591
Dec. Value of n Print mode Dec. Value of n Print mode
0 10 cpi Utility Resident 14 12 cpi LQ DLL 2 10 cpi LQ Resident 16 17.1 cpi Utility Resident 3 Proportional LQ Resident 18 17.1 cpi LQ Resident 4 10 cpi Utility DLL 20 17.1 cpi Utility DLL 6 10 cpi LQ DLL 22 17.1 cpi LQ DLL 7 Proportional LQ DLL 24 15 cpi Utility Resident
8 12 cpi Utility Resident 26 15 cpi LQ Resid ent 10 12 cpi LQ Resident 32 20 cpi Utilit y 12 12 cpi Utility DLL 24 20 cpi Utility
Select Font Command (IBM)
ML390 Turbo, ML391 Turbo
Function ASCII Decimal Hexadecimal
Select Typeface, Character Pitch and Spacing
ESC [ l L H
fwd Lfwd fa
n Hn
H
27 91 108 Ln Hn H L
fid
H
fwd Lfwd fa
fid
1B 5B 6C Ln Hn H H
fwd Lfwd fa
This command can be used to select a typeface, plus a chara ct er pi t ch or proport i onal spacing.
Parameters Ln and H
n
Parameters Ln and Hn are used to set which of the following parameters will be activated. The value calculated by the equation
L
+ (Hn x 256)
n
is used to determine how the various parameters will be treated:
Table 29: IBM ESC [ l Command —
Parameters H
Parameters H equation
Parameter Activated for Calculated L
Value Parameters Activated
0 or 1 Command invalid 2 or 3 Fid valid; Fwd and fa unchanged
and L
fid
and L
fid
4F 5F
6 or more Fid, Fwd and fa valid; parameter
fid
are used to select the font to be used. The value determined from the
fid
and Fwd valid; fa unchanged
id
, Fwd and fa valid
id
data dumped after 6 bytes
(H
x 256) + L
fid
fid
, Hn Values
n
Chapter 4: Character Style Commands32
is used to select the font as follows:
Table 30: IBM ESC [ l Command —
Fonts Selected for Calcualted H
Font Selected Value
Invalid 0 Courier 10 011 Courier 10 Italic 018 Courier 10 Symbol 008 Courier 10/10 Shalom 049 Courier 12 085 Courier 12 Italic 092 Courier 12/12 Shalom 098 Courier 15 223 Courier 15/15 Shalom 226 Courier Proportional 171 Letter Gothic 12 087 Letter Gothic 15 222 Letter Gothic 17 255 OCR-A 10 019 OCR-B 10 003 Orator 10 005 Prestige Pica 10 012 Prestige Elite 12 086 Prestige Elite Symbol 12 080 Prestige Elite 12/12 Yasmin 100 Prestige 15 221 Prestige Proportional 164 Roman Bold Proportional 159 Roman Bold Italic Proportional 155 Roman Proportional/Proportional B arak 167 Roman Proportional/Proportional Yasmi n 166 Script 12 084
fid
, L
Values
fid
Parameters H
Parameters H
and L
fwd
fwd
and L
fwd
are used to select a character pitch. The value determi ned f rom t he
fwd
equation
[(H
x 256) + L
fwd
is used to select the character pitch as follows:
Table 31: IBM ESC [ l Command —
Chapter 4: Character Style Commands 33
] x 1/1440"
fwd
Character Pitch Settings for Calculated H
Hex Value Character Pitch
00 Comma nd i nval i d 90 10 cpi 78 12 cpi 60 15 cpi 54 17 cpi 48 20 cpi
fwd
, L
Values
fwd
The setting made using the H
and L
fwd
parameters will automatically be overridden if the fa
fwd
parameter is set to 02 hexadecimal.
Parameter f
a
Parameter fa is used to engage proportional spacing.
= 02 hexadecimal (2 decimal): engage proportional spacing
f
a
f
= 00 hexadecimal (0 decimal):use character pitch set by parameters H
a
and L
fwd
fwd
.
Combined Print Mode Command (Epson)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521
ML390 Turbo, ML391 Turbo ML590, ML591
Function ASCII Decimal Hexadecimal
Select Print Features ESC ! n 27 33 n 1B 21 n
This command lets you use any combination of the features listed in the table below. The value of n can range from 0 to 255. To determine the value of n, add up t he values for all the features you wish to use. To turn off all these features and return to 10 cpi printing, substitute 0 for n.
Chapter 4: Character Style Commands34
Table 32: Epson ESC ! Command —
Print Features for n Values
Feature Value
Compressed printing 4 Double width printing 32 12 cpi (Elite) printing 1 Emphasized printing 8 Enhanced printing 16 Italics printing 64 Proportional printing 2 Underline printing 128
For example, to print underlined italics at 12 cpi, assi gn n t he val ue of 193 ( 128 + 64 + 1) . Each time you send this command, it sets or cancels t he values f or al l ni ne of t he feat ures it
controls (the eight features listed in the table, plus 10 cpi). This means that if you've requested 12 cpi underline italics, and then want to add emphasized printing to these features, you must add 8 to 193 and resend the command as ESC ! 210. I f you send t he command ESC ! 8, it will turn off all the other features as it turns on emphasized print.
To see the range of print styles you can produce wit h the ESC ! n command, run the following BASIC program which prints a sample of each possi bl e combination. Please note that since the program prints all 256 combinations, it will take a few minutes and about 12 pages for the entire sample to print.
10FORI=0TO255 20 LPRINT:LPRINT 30 LPRINT CHR$(27);"!";CHR$(I);"ESC !";I;" selects this combination." 40 NEXT I
Italics Print Commands (IBM/E/ML)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521 ML320 Std., ML321 Std. ML390 Turbo, ML391 Turbo ML590, ML591
Function IBM Epson ML
Italics Printing On ASCII: ESC % G
Dec: 27 37 71 Hex: 1B 25 47
Italics Printing Off
ASCII: ESC % H Dec: 27 37 72 Hex: 1B 25 48
Italics printing is slanted, like this, and is used to lend emphasis to phrases, sentences, or entire paragraphs.
Chapter 4: Character Style Commands 35
ASCII: ESC 4 Dec: 27 52 Hex: 1B 34
ASCII: ESC 5 Dec: 27 53 Hex: 1B 35
ASCII: ESC ! / Dec: 27 33 47 Hex: 1B 21 2F
ASCII: ESC ! * Dec: 27 33 42 Hex: 1B 21 2A
If you intend to print an entire document in italics, you can use the printer menu to select italics. You will find italics in the menu under the group “Font” and the setting “Style.” See “Menu Mode” in your printer manual for more information on making changes in the menu settings.
Emphasized & Enhanced Print Commands (IBM/E/ML)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521 ML320 Std., ML321 Std. ML390 Turbo, ML391 Turbo ML590, ML591
Function IBM Epson ML
Emphasized Printing On
Emphasized Printing Off ASCII: ESC F
Enhanced Printing On ASCII: ESC G
Enhanced Printing Off
ASCII: ESC E Dec: 27 69 Hex: 1B 45
Dec: 27 70 Hex: 1B 46
Dec: 27 71 Hex: 1B 47
ASCII: ESC H Dec: 27 72 Hex: 1B 48
ASCII: ESC E Dec: 27 69 Hex: 1B 45
ASCII: ESC F Dec: 27 70 Hex: 1B 46
ASCII: ESC G Dec: 27 71 Hex: 1B 47
ASCII: ESC H Dec: 27 72 Hex: 1B 48
ASCII: ESC T Dec: 27 84 Hex: 1B 54
ASCII: ESC I Dec: 27 73 Hex: 1B 49
ASCII: ESC H Dec: 27 72 Hex: 1B 48
ASCII: ESC I Dec: 27 73 Hex: 1B 49
Your printer produces bold type by printing each dot of a character twice instead of once. In emphasized printing, the pairs of dots are offset horizontally. In enhances printing, the pairs of dots are offset vertically.
You can combine emphasized and enh anced printing for an especially bold effect. For headlines, try using them in combination wit h dou bl e w i dt h charact ers; you can also combine emphasized printing with double height ch aract ers.
Underline/Overscore/Strike-Through Commands
Underline Commands (IBM/E/ML)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521 ML320 Std., ML321 Std. ML390 Turbo, ML391 Turbo ML590, ML591
Function IBM Epson ML
Underline Printing On ASCII: ESC - 1
Dec: 27 45 49 Hex: 1B 2D 31
Underline Printing Off
The underline feature underscores all characters, i ncludi ng t he space character, but does not underscore graphics or the space produced by any horizontal positioning command such as horizontal tab.
In the Epson emulation, you can also use the Combined Print Mode (ESC ! n) command to engage underlining.
ASCII: ESC - 0 Dec: 27 45 48 Hex: 1B 2D 30
ASCII: ESC - 1 Dec: 27 45 49 Hex: 1B 2D 31
ASCII: ESC - 0 Dec: 27 45 48 Hex: 1B 2D 30
ASCII: ESC C Dec: 27 67 Hex: 1B 43
ASCII: ESC D Dec: 27 68 Hex: 1B 44
Chapter 4: Character Style Commands36
Overscore Commands (IBM)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521
ML390 Turbo, ML391 Turbo ML590, ML591
Function ASCII Dec Hex
Overscore Printing On ESC _ 1 27 95 1 1B 5F 01 Overscore Printing Off ESC _ 0 27 95 0 1B 5F 00
The overscore feature prints a continuous li ne over al l charact ers, i ncl udi ng t he space character, but does not overscore the space produce d by a horizontal tab command. This feature is available only in the IBM emulati on.
Score Style Command (Epson)
ML390 Turbo, ML391 Turbo
Function ASCII Decimal Hexadecimal
Select Score Style ESC ( - Ln H
Pn D1 D
2
This command lets you set underline, strike-through an d overscore styles: continuous, dashed, single or double lines.
27 40 45 Ln H
n
Pn D1 D
n
2
1B 28 2D Ln H Pn D1 D
2
n
Parameter Pn
Parameter Pn is set to 01 hex (1 dec, SOH ASCII).
Parameters Ln and H
n
Parameters Ln and Hn designate the quantity of data to be scored, according to the following equation:
L
+ (Hn x 256)
n
and Hn are less than 3, the designated data will be dumped.
If L
n
Chapter 4: Character Style Commands 37
Parameters D1 and D
2
Parameter D1 is used to set the type of score and parameter D2 is used to set the attributes, as indicated in the table.
Table 33: Epson ESC ( - Command —
Score Styles for D1 and D2 Values
D1D2Score Style
1 1 Continuous, single underline 2 1 Continuous, single strike-through 3 1 Continuous, single overscore 1 2 Continuous, double underline 2 2 Continuous, double strike-through 3 2 Continuous, double overscore 1 5 Dashed, single underline 2 5 Dashed, single strike-through 3 5 Dashed, single overscore 1 6 Dashed, double underline 2 6 Dashed, double strike-through 3 6 Dashed, double overscore
Using a value of 0 for D2 will cancel the score mode.
Note: Scores can only be used for printing characters: they can't be used to print line graphi cs
Outline/Shadow Commands (IBM/E)
ML390 Turbo, ML391 Turbo ML590, ML591
Function ASCII Dec Hex
Outline Printing On ESC q 1 27 113 49 1B 71 31 Shadow Printing On ESC q 2 27 113 50 1B 71 32 Outline and Shadow Printing On ESC q 3 27 113 51 1B 71 33 Outline and/or Shadow Printing Off ESC q 0 27 113 48 1B 71 30
The outline feature prints characters as outlines with hollow center. The shadow feature prints characters with a shadow behind them. Combining the features produces outline characters with a shadow behind them. These features can be used to produce more interesting and stylish headings. They can be combined wit h emphai szed and/or enhanced printing, double width, etc., for an even more striking effect.
Note: Outline and shadow can only be used for printing characters: they can't be used to
print line graphics.
Chapter 4: Character Style Commands38
Chapter 5: Custom Character Commands
Your printer's custom (down line loadable) character f eat ure enables you to design your own characters and symbols, even entire character sets i f you choose, and download them from your computer to the printer. You can design and store multiple characters. The actual designing of these characters requires some work on your part and c an become tedious. We strongly recommend using a commercial softw are package to help you create new characters and download them to your printer. There are also packa ges t hat provi de character sets that have already been designed for you.
This chapter describes the custom character commands for your printer, i ncludi ng
ROM to RAM Copy Commands
Down Line Loading Commands
Custom Character Set Commands
Select DLL Font Commands
The chapter is divided into two sections: one f or the 9-pi n pri nt ers and one f or the 24-pi n printers.
Custom Character Commands: 9-Pin Printers
Designing a Custom Character for 9-Pin Printers
The technique of designing your own cust om characters is much like that of designing a graphic image, but on a much smaller scale. You can desi gn characters in either Utility or Near Letter Quality mode: simply activate the desired mode before you download the characters.
Begin by designing your character on a grid. The height of t he grid f or a normal charact er i s 7 dots, each corresponding to a pin on the printer's pri nt head. The w i dt h of t he gri d usable f or a character is a maximum of 11 dots (the twelfth dot in the grid width is reserved as blank).
The 7-dot grid can be adjusted up or down several dot positions by using the attribute byte in the print command. This byte specifies whether the character is an ascender (top 7 rows) or a descender (bottom 7 rows). The attribut e byt e al so cont ains ot her i nf ormat i on about t he character, as explained later.
The character's baseline lies below the seventh dot f r om t he top i f it i s an ascender, or below the sixth dot from the top if it is a descender. The columns of the matrix to the left and right of your character affect where it will appear in relation to the characters on either side of it. There is one mandatory blank column at the end of t he charact er ( col umn 12). If you don't leave blank columns, adjacent characters may app ear t o run right i nt o your charact er.
Chapter 5: Custom Character Commands 39
Your arrangement of dots is translated into code that t ell s your pri nter t he exact l ocat ion of each dot within each column. The example which follows illustrates how this works.
This character is 9 dots wide and is flush to the left. We'll print it in 10 cpi utility mode. Just like 8-pin graphics, each byte specifies a dot column, and the value of each byte is determined by adding up the values of its bits.
Note: In all print modes, you cannot place two dots next to each other hori zont al l y—you
must skip one column.
Now we need to give the commands that download this data to the printer.
IBM Custom Character Commands for 9-Pin Printers
Copy ROM to RAM Command for 9-Pin Printers (IBM)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521
Function ASCII Dec Hex
Copy ROM Character Set to RAM Character Set ESC $ 27 36 1B 24
This command copies a complete set of the characters resident in the printer to the area of its memory reserved for custom characters. The new character will become part of this character set. This makes it possible to mix standard characters with your custom ch aract ers w hen y ou print.
Chapter 5: Custom Character Commands40
Down Line Load Characters Command for 9-Pin Printers (IBM)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521
Function ASCII Decimal Hexadecimal
Down Line Load Characters ESC = c1 c2 m n
[data]
a
1 a2
27 61 c
[data]
a
1 a2
1 c2
m n
Use this command with the ML520 or the ML521 printer to begi n downloading the characters.
1B 3D c
[data]
a
1 a2
1 c2
m n
Parameters c1 and c
2
These parameters specify the total count of characters t o be dow nl oaded. How these variables are calculated depends on which mode is engaged: Utility printing or Near Letter Quality (NLQ) printing.
For Utility printing:
value = (# of characters to be changed x 13) + 2
For NLQ printing:
value = (# of characters to be changed x 48) + 2
If the value obtained is less than 256, substitute the value for c If the value obtained is 256 or more, divide the val ue by 256. Replace c
number result and assign the remainder to c
.
1
and replace c2 with 0.
1
with the whole
2
Parameter m
This parameter selects the print quality:
m = 20: Utility printing m = 21: NLQ printing
Parameter n
This parameter specifies the ASCII value of the starting character in the set to be redefined (characters must be redefined in sequence) and can be assi gned any value in the range 0 to
255.
Parameters a1 and a
2
These parameters designate the attributes of t he character.
Parameter a
1
Parameter a1 denotes whether the character is an ascender or descender:
a1 = 0: ascender
= 128: descender
a
1
Chapter 5: Custom Character Commands 41
Here is a breakdown of the definitions for the various bit values for a
Bit b
:
7
= 0: ascender
b
7
b
= 1: descender
7
Note: If b
Bits b
6
Bits b
1
, b0 = 0, 0: No expansion to 12 dots high: b7 valid
b
1
b
, b0 = 0, 1: Selects line draw characters; data is expanded to a total height of 12
1
, b0 = 1, 0: Shaded character; data is expanded to a total height of 12 dots in two
b
1
, b0 = 1, 1: NUL is expanded to a total height of 12 dots in two passes: b7 ignored.
b
1
or b1 is 0, b7 is ignored.
0
, b5, b4, b3, b2: ignored and b0:
dots in two passes: b passes: b
ignored.
7
ignored.
7
:
1
Parameter a
2
Parameter a2 denotes the total width of the character in dots.
Table 34: IBM ESC = Command —
Character Widths for a2Values
a2 (Decimal) Character Width, in Dots
0 Ignored 1 1 column wide 2 2 columns wide 3 3 columns wide 4 4 columns wide 5 5 columns wide 6 6 columns wide 7 7 columns wide 8 8 columns wide
9 9 columns wide 10 10 columns wide 11 11 columns wide
End the command with the data for the character calculated from your grid. If you're downloading several characters, you only need one ESC & NUL command, and you only need to include m and n once, but you must include a value f or paramet er a i n each set of character data.
Chapter 5: Custom Character Commands42
Epson Custom Character Commands for 9-Pin Printers
Copy ROM to RAM Command for 9-Pin Printers (Epson)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo
Function ASCII Dec Hex
Copy ROM Character Set to RAM Character Set
This command is used with the ML320 E/I, ML321 E/I, ML320T, or ML321T printer to copy a complete set of the characters resident in the printer to the area of its memory reserved for custom characters. The new character will become part of this character set.
ML520, ML521
Function ASCII Dec Hex
Copy ROM Character Set to RAM Character Set
This command is used with the ML520 or ML521 printer to copy a complete set of the characters resident in the printer to the area of its memory reserved for custom characters. The new character will become part of this character set. This makes it possible to mix standard characters with your custom characters when you print.
Parameter n is used to specify the NLQ font to be used:
n = 0: NLQ Courier n = 1: NLQ Sans Serif
ESC : NUL NUL NUL 27 58 0 0 0 1B 3A 00 00 00
ESC : NUL n NUL 27 58 0 n 0 1B 3A 0 n 0
Down Line Load Characters Command for 9-Pin Printers (Epson)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521
Function ASCII Dec Hex
Down Line Load Characters
Use this command to begin downloadin g t he charact er( s ) .
Parameters n1 n
2
These parameters specify the range of characters to be replaced with new ones. Multiple characters must be assigned to adjacent locations. Param eter n will be replaced; parameter n
Custom characters can normally be assigned to deci mal l ocati ons 32 t o 126 and 160 to 255. If IBM Character Set II is selected (ESC 6 command), charact ers can al so be assi gned to locations 128 to 159.
Parameter a
This parameter indicates how the character will be positioned within its grid as follows:
Ascenders: a is calculated as
last dot column of character + (first dot column x 16) + 128
ESC & NUL n1 n2 a [data]
indicates the last character that will be replaced.
2
27 38 0 n1 n2 a [data]
indicates the first character that
1
1B 26 00 n1 n2 a [data]
Chapter 5: Custom Character Commands 43
Descenders: a is calculated as
last dot column of character + (first dot column x 16)
Parameter a can be assigned any value in the range 0 to 255. End the command with the data for the character calculat ed f r om yo ur gri d. If you're downloading several characters, you o nl y need one ESC & NUL command, and you
only need to include n
and n2 once, but you must include a value for param eter a i n each set
1
of character data.
Custom Character Set On/Off Commands for 9-Pin Printers (Epson)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521
Function ASCII Dec Hex
Select Standard Character Set ESC % 0 27 37 48 1B 25 30 Select Custom Character Set ESC % 1 27 37 49 1B 25 31
To switch from the standard character set to the custom character set , use t he ESC % 1 command.
To switch back to the standard character set, use the ESC % 0 com m and. Ot herw is e, t he custom character set will remain in the printer's memory until one of the following happens:
you turn off the printer you reset the printer with the ESC @ command you overwrite them with new custom characters you use the ESC : NUL NUL NUL command to overwrite them with the standard character set.
Chapter 5: Custom Character Commands44
Okidata MICROLINE Standard Custom Character Commands for 9-Pi n Printers
Copy ROM to RAM Command for 9-Pin Printers (ML)
ML320 Std., ML321 Std. ML320 Turbo, ML321 Turbo ML520, ML521
Function ASCII Dec Hex
Copy ROM Character Set to RAM Character Set ESC $ 27 36 1B 24
This command copies a complete set of the characters resident in the printer to the area of its memory reserved for custom characters. The new character will become part of this character set. This makes it possible to mix standard characters with your custom ch aract ers w hen you go to print.
Down Line Load Characters Commands for 9-Pin Printers (ML)
ML320 Std., ML321 Std. ML320 Turbo, ML321 Turbo ML520, ML521
Function ASCII Dec Hex
Down Line Load Ascender Characters
Down Line Load Descender Characters
ESC % A m n1 ... n1127 37 65 m n1 ... n111B 25 41 m n1 ... n
ESC % D m n
... n1127 37 68 m n1 ... n111B 25 44 m n1 ... n
1
11
11
To begin downloading an ascender ch aract er, use t he ESC % A m n1 ... n11 command. This command specifies that the new character will be an ascender.
To begin downloading a descender ch aract er, use t he ESC % D m n
... n11 command. This
1
command specifies that the new character will be a descender.
Parameter m
This parameter specifies the character that will be replaced by the custom character. Custom characters can be assigned to decimal locations 32 t o 127 and 160 to 223.
Data n1 through n
11
n1 through n11 specify the data for the character, calculated from your grid.
Select DLL Font Commands for 9-Pin Printers (ML)
ML320 Std., ML321 Std. ML320 Turbo, ML321 Turbo ML520, ML521
Function ASCII Dec Hex
Select DLL in Utility Mode ESC 2 27 50 1B 32 Select DLL in Near Letter Quality Mode ESC 7 27 55 1B 37
The ESC 2 command switches custom character printing on when the printer is set for the Utility mode.
The ESC 7 command switches custom character printing on when the printer is set for the Near Letter Quality (NLQ) print mode. NLQ custom characters are just like Utility custom characters, except that overprinting is used to make them match the NLQ character set .
Once you have selected the Custom Character Set, it will remain in memory until the printer is turned off. Any one of the following will also delete the Custom Character Set from the printer's
Chapter 5: Custom Character Commands 45
memory:
you reset the printer with the ESC CAN command
you overwrite them with new custom characters
you use the ESC $ command to overwrit e t hem w it h the Standard C haract er Set .
Custom Character Commands: 24-Pin Printers
Designing a Custom Character for 24-Pin Printers
The technique for designing your own custom charact ers i s much l i ke t hat of desi gni ng a graphic image, but on a much smaller scale. You can desi gn characters in either Utility or LQ mode: simply activate the desired mode before you downl oad the characters.
Begin by designing your character on a grid. The hei ght of t he gri d i s 24 dot s, each corresponding to a pin on the printhead. The wi dt h of t he gri d, as w el l as the wi dt h of t he character itself, depends on the print mode.
Table 35: Custom Character Commands —
Character/Grid Width for Print Modes (24-Pin Printers)
d0 = space to the left of the character
= width of the character itself
d
1
d
= space to the right of the character
2
Print Mode Max. Character Width (d1) Max. Total Grid Width (d0 + d1 + d2)
Utility 15 dots 18 dots LQ 37 dots 42 dost
Proportional 37 dots 42 dots
Note: If the printer is in superscript or subscript mode, only the first two or last two bytes are
needed for each column.
Characters are designed on a grid made up of columns of 24 dots. Each column, in turn, is divided into three 8-dot groups, and each 8-dot group is represented by a byte of data.
When designing a character, keep the intended use for t he character in mind. If the character is to be included with text, leave the top and bot t om t w o row s of t he gri d bl ank, i n keeping w i t h general font design standards. The character's basel ine occurs at the sixth dot from the bottom. The columns of the grid to the left and right of your character affect where it will appear in relation to the characters on either side. If you don't l eave bl ank col umns, adj acent characters may appear to run right into your custom character.
Chapter 5: Custom Character Commands46
Your arrangement of dots is translated into code that t ell s t he print er the exact locat i ons of each dot in each column. The example below show s how t hi s w orks.
128 64 32
Byte 1
Byte 2
Byte 3
The width of the grid in dots depends on the printi ng mode i n use. Thi s example character is 27 dots wide and has 4 blank columns on either side. We'll print it in 10 cpi Letter Quality. Since the character is being printed in 24-pin mode, three bytes of data are required to specify a single column. Just like high resolution 24-pin graphics, the first three bytes specify dot positions for the second column, and so on up to the last column in which dots will appear. The value of each byte is determined by adding up the values of its bits.
16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
••••••••
••
••
••
••
••
••••••••
••
••
••
••
••
••
••
••
••
••
••
••
Note: In all print modes, you can NOT place two dots next ot each other h orizont al l y—you
must skip one column.
The commands below are used to download this data to the printer.
IBM Custom Character Commands for 24-Pin Printers
Down Line Load Characters Command (IBM)
ML590, ML591
Function ASCII Dec Hex
Download Custom Character
Parameters n1 n
These parameters specify the number of bytes in the command string. The total number of bytes is calculated as follows:
Parameters a1 a2 a
Parameters a1 and a2 specify the starting address of the custom character data, cal cul at ed as
2
3
ESC = n1 n2 # a1 a2 a m ad1 ad2 id1 id2 d1 d d3 d4 d
[data]
5
No. of bytes = n
27 61 n
3
m ad1 ad2 id1 id2 d1 d
2
d3 d4 d
+ (n2 x 256)
1
1 n2
[data]
5
35 a1 a2 a
1B 3D n
3
a3 m ad1 ad2 id1 id2 d
2
d2 d3 d4 d
1 n2
5
[data]
23 a1 a
2
1
Chapter 5: Custom Character Commands 47
follows:
starting address = a
+ (a2 x 256)
1
Parameter a
indicates the number of characters to be down l oaded.
3
Note: If fewer than 256 characters are loaded, all character codes must be consecuti ve f r om
the starting point.
Parameter m
The bits of this parameter determine the character pitch and print mode as follows:
: always 0
b
0
b
: ignored
1
b
, b3 = 0, 0: Utility, all pitches
2
0, 1: LQ, 10 cpi 1, 0: LQ, 12 cpi 1, 1: LQ, proportional
b
= 0: Last data table
6
1: Another data table follows
Note: The command up to parameter m need only be included once for each down loading
sequence. The following parameters apply to the specific characters, and must be included for each individual character i n t he sequence.
Parameters ad
ad
1
2
These parameters specify the starting address of the character, as follows:
character address = ad
+ (ad2 x 256)
1
Parameter id
1
Here is a breakdown of the bit values for id1:
to b5 = Number of columns to be loaded (1 to 63)
b
0
b
= 0: Load to RAM
6
1: Copied from ROM character generator
= 0: Normal character
b
7
1: Elongated character
Parameter id
2
Here is a breakdown of the bit values for id2:
to b5 = Character width (1 to 63, proportional)
b
0
b
, b7 = 0, 0: Data for pins 19 to 24 copi ed t o pins 25 t o 30
6
0, 1: Data for pins 23, 24, duplicated f or pi ns 25, 26, 27, 28, 29, 30 1, 0: Underline 1, 1: No elongation
Parameters d1 d2 d3 d4 d
5
Each bit of the parameter bytes indicates whether the data in the specified column is identical to the previous column or is new.
bit = 0: data is new
Chapter 5: Custom Character Commands48
bit = 1: data is a repeat of previous column
The parameters specify data repetition as follows:
: columns 1 to 8
d
1
d
: columns 9 to 16
2
d
: columns 17 to 24
3
: columns 25 to 32
d
4
d
: columns 33 to 40
5
Epson Custom Character Commands for 24-Pin Printers
First use the Copy ROM to RAM command to copy a com pl ete set of t he charact ers resi dent in the printer ot the area of its memory reserved for custom characters. The new character you designed will become part of this character set.
To begin downloading the custom character, use t he D ownl oad Custom Characters Command to specify the range of characters that you will be replacing with new ones, to indicate how you have positioned the character withi n it s gri d, and to supply t he dat a for t he charact er( s) , calculated from your grid(s).
To switch between the standard character set and y our cust om character set, use the
Custom
Character Set On/Off Command.
Copy ROM to RAM Command for 24-Pin Printers (Epson)
ML390 Turbo, ML391 Turbo ML590, ML591
Function ASCII Dec Hex
Copy ROM Character Set
ESC : NUL n NUL 27 58 0 n 0 1B 3A 00 n 00
to RAM Character Set
This command is used to copy a complete set of the characters resident in the printer to the area of its memory reserved for custom characters. The new character will become part of this character set.
Chapter 5: Custom Character Commands 49
Parameter n
Parameter n is used to specify the font to be used.
Table 36: Epson ESC : Command — Fonts for n Values
Value of n Font Value of n Font
0Roman 6OCR-A 1Swiss 7Orator 2 Courier (default) 8 Orator-S 3 Prestige 122 Swiss Bold 4 Script 124 Letter Gothic 5 OCR-B 126 Font set on Menu
Down Line Load Characters Commands for 24-Pin Printers (Epson)
ML390 Turbo, ML391 Turbo
Function ASCII Dec Hex
Load Custom Characters ESC & m n1 n
d0 d1 d2 [data]
2
27 38 m n
1 n2
d0 d1 d2 [data]
1B 26 m n
1 n2
d0 d1 d2 [data]
ML590, ML591
Function ASCII Dec Hex
Load Custom Characters
ESC & NUL m n d0 d1 d2 [data]
1 n2
27 38 0 m n
1 n2
d0 d1 d2 [data]
1B 26 00 m n d0 d1 d2 [data]
1 n2
Use these commands to begin downloading the c haract er( s) t o t he print er.
Parameter m
This parameter selects the available area in RAM. The only avai l abl e val ues/ l ocati ons are m = 0 or m = 128.
Parameters n1 n
2
These parameters specify the range of characters to be replaced with new ones. Multiple characters must be assigned to adjacent locations.
Parameter n Parameter n
Parameters d0 d1 d
indicates the first character that wil l be replaced: range 0 to 127.
1
indicates the last character that wil l be replaced: range 1 t o 127.
2
2
These parameters define the width of the character grid in dots as follows:
= width of space before the character
d
0
= width of the character
d
1
d
= width of space after the character
2
Follow these parameters with the data calculated from your grid as shown above in the section “Designing a Custom Character for 24-Pin Printers.”
Chapter 5: Custom Character Commands50
Custom Character Set On/Off Command for 24-Pin Printers (Epson)
ML390 Turbo, ML391 Turbo ML590, ML591
Function ASCII Dec Hex
Select Standard Character Set ESC % 0 27 37 0 1B 25 00 Select Custom Character Set ESC % 1 27 37 1 1B 25 01
To switch from the standard character set to the custom character set , use t he ESC % 1 command.
To switch back to the standard character set, use the ESC % 0 com m and. Ot herw is e, t he custom character set will remain in the printer's memory until one of the following happens:
you turn off the printer
you reset the printer with the ESC @ command
you overwrite them with new custom characters
you use the ESC : NUL NUL NUL command to overwri t e t hem w i t h t he standard charact er
set.
Load Custom Character Set into Upper ASCII Command for 24-Pin Printers (Epson)
ML390 Turbo, ML391 Turbo ML590, ML591
Function ASCII Dec Hex
Select Custom Character Set ESC t 2 27 116 2 1B 74 02
This command loads the custom character set (decimal 0 t o 127) i nt o t he upper ASCII range (128 to 255).
Chapter 5: Custom Character Commands 51
Chapter 6: Graphics Commands for 9-Pin Printers
Overview
Your printhead has one column of pins. Images are created as the pins “fire,” striking the ribbon against the paper to produce dots. Whit e spaces appear where the pins don't fire. In 8­pin graphics, each column of dots is represented by a single byt e of dat a. Models ML320, ML321, ML320 Turbo, ML321 Turbo, ML520, and ML521 use the 9-pin mode in cases where a slightly higher resolution is required: it uses two byt es t o represent each dot col umn.
When you program a graphic image, your program has to descri be t he patt ern of dot s you w ant to print. Graphics data, like all other data sent t o the printer, consi st s of a series of byt es. Each of the eight bits in a byte of graphics data corresponds to one pin on the printhead. A bit's value can be either 1 or 0. When the printer receives the data, i t i nterpret s a bi t wit h a val ue of 1 as a command to fire the corresponding pin. Bits t hat are set t o 0 don' t cause pi ns t o f i re.
You can picture the byte as a column of 8 bit s. I n 8-pi n graphi cs, t he body of dat a i s a seri es of these columns lined up next to each other. Instead of sending the data to the printer bit by bit, you'll probably want to convert this binary information into decimal or hexadecimal format for use with your programming language. In the figure below we show how to determine the decimal value for a given pattern of pins.
For optimum registration when printing graphics using bi-directional printing, use the Print Registration item in the printer menu to fine-tune the alignment of the vertical bars which print as part of the menu. Keep changing the setting until the lines of the vertical bar characters have the straightest vertical column.
Chapter 6: Graphics Commands for 9-Pin Printers 53
Programming Graphics in BASIC
One important thing to remember when you're programming graphics is not to include extraneous line feeds in your programs. Using a semicolon after the data in an LPRINT statement will keep the print position on the same line.
However, there is an additional complication: by default, BASIC assigns to all printers a maximum line length of 80 characters. After the printer has recei ved 80 byt es of data, i t w ill automatically perform a carriage return and line feed. Since graphics data typically consists of many bytes, it's quite easy to exceed this limit. The resulting output will be garbled. You can work around this problem by setting the line length to the maximum allowable value, 255. Put one of these statements at the beginning of your program:
For parallel printers:
WIDTH “LPT1:”,255
For serial printers that have been opened as #1:
WIDTH #1,255
Graphics Density Selection Commands (IBM/E)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521
Function ASCII Dec Hex
Begin Single Density Graphics
Double Density Graphics Command
Double Speed/ Double Density Graphics Command
Quadruple Density Graphics Command
ESC K Ln Hn [data] 27 75 Ln Hn [data] 1B 4B Ln Hn [data]
ESC L Ln Hn [data] 27 76 Ln Hn [data] 1B 4C Ln Hn [data]
ESC Y L
ESC Z L
[data] 27 89 Ln Hn [data] 1B 59 Ln Hn [data]
n Hn
[data] 27 90 Ln Hn [data] 1B 5A Ln Hn [data]
n Hn
These graphics modes correspond to the 8-pin modes and are su pport ed by most current DOS-based graphics software.
Parameters Ln and H
n
These parameters tell the printer how many bytes of graphics data to expect. Eight-pin graphics have one byte of data per column. To calculate t he val ues f or L
and Hn, first determine how
n
many columns of dots there will be in your graphics image. Divide this number by 256 and assign the whole number result to H
; assign the remainder to Ln.
n
Chapter 6: Graphics Commands for 9-Pin Printers54
Graphics Density Selection Commands (ML)
ML320 Std., ML321 Std. ML320 Turbo, ML321 Turbo ML520, ML521
Function ASCII Dec Hex
Select Single Density Graphics
ESC P or ESC Q
27 80 or 27 81
1B 50
or 1B 51 Select Double Density Graphics ESC R 27 82 1B 52 Select Double Speed &
ESC # Q 27 35 81 1B 23 51
Quadruple Density Graphics
Use these commands to select the density of the printing that will be used: single density (60 dpi), double density (120 dpi), or quadruple density (240 dpi). The quadruple density selection command also engages double speed.
Graphics Select/Print Command (Epson)
ML320 Std., ML321 Std. ML320 Turbo, ML321 Turbo ML520, ML521
Function ASCII Dec Hex
Graphics Select/Print ESC * m Ln Hn [data] 27 42 m Ln H
n
[data]
This command is used to select the density, to designate the number of columns of data you'll be sending, and to specify the data to be sent.
1B 2A m L
n Hn
[data]
Parameter m
This parameter specifies which density to use when printing the graphic image. The table below indicates the type of density for each value of m.
Table 37: Epson ESC * m Command —
8-Pin Graphics Density Codes for m Values (9-Pin Printers)
Value of m Graphics Type Horizontal Density (dots per inch)
0 Single Density 60 dpi 1 Double Density 120 dpi 2 High Speed Double Density 120 dpi 3 Quadruple Density 240 dpi 4 CRT I 80 dpi 5 Plotter (Single Density) 72 dpi 6 CRT II 90 dpi 7 Double Density Plotter 144 dpi
Chapter 6: Graphics Commands for 9-Pin Printers 55
Once you've selected the density you want t o use, you have to design your graphic image. Begin by mapping out the pattern you want t o pri nt on a pi ece of graph paper. Here is a sample pattern for a triangle:
Parameters Ln and H
n
These parameters tell the printer how many columns of data you'll be sending: 8-pin modes have one byte of data per column. To calculate t he val ues, f i rst det ermi ne how many col umns of dots there will be in your graphics image. Divide t his number by 256 and assign the whole number to H
; assign the remainder to Ln.
n
In our triangle example, each triangle requires 16 columns. We'll be printing a row of 6 triangles, so the total number of columns in the image i s 6 x 16, or 96. D i vi di ng 96 by 256 gives a value of 0 for Hn with a remainder of 96, which we'll assign to Ln.
Next, we can write a BASIC statement t hat sends t he comman d begi n 8-pin graphics:
LPRINT CHR$(27);”*”;CHR$(3);CHR$(96);CHR$(0);
Note: Be sure to include the semicolon(;) at the end of this statement. That way, the printer
won't insert a carriage return and line feed before your graphics dat a.
The listing below is a BASIC program for the Epson emulation that will generate a row of six of our triangles in quadruple density. To print the pattern at another density, change the value of D in line 10 to one of the other density codes.
10 D=3 ‘Density code for quadruple density (Epson) 20 WIDTH “LPT1:”,255 ‘Set printer for maximum line width 30 LPRINT CHR$(27);”*”;CHR$(D);CHR$(96);CHR$(0); 40 REM CHR$(D) is the density; in this case D=3 for quadruple density 50 REM CHR$(96) and CHR$(0) indicate the number of columns 60 FOR I=1 TO 6 ‘Repeat triangle pattern six times 70 FOR J=1 TO 16 ‘Each triangle has 16 columns 80 READ A ‘Read the column
90 LPRINT CHR$(A); ‘Send the byte to the printer 100NEXTJ‘Nowprintthenextcolumn 110 RESTORE ‘Go back to the beginning of the DATA statements 120 NEXT I ‘Now print the next triangle 130 END 140 DATA 1,3,7,15,31,63,127,255,255,127,63,31,15,7,3,1
Your printout will look like this:
Chapter 6: Graphics Commands for 9-Pin Printers56
䊱䊱䊱䊱䊱䊱
Reassign Graphics Codes Command (Epson)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521
Function ASCII Dec Hex
Reassign Graphics ESC ? m n 27 63 m n 1B 3F m n
You can use this command to reassign any of the 8-pin gra phi cs modes t o o ne of t he graphi cs commands (ESC K, ESC L, ESC Y, or ESC Z) .
Parameter m
This parameter designates which of the four commands you're redefining. Substitute one of the four letters (K, L, Y, or Z) for m in the command.
Parameter n
This parameter designates the density of the mode you are reassi gni ng to t he redef i ned c ode. Substitute the appropriate value (0 through 7) for the density you wish to select, as taken from the 8-Pin Graphics Density Codes table earlier in this chapter.
When you are ready to print a graphics pattern, send the redefined command, followed by the graphics data.
For example, the following BASIC statement reassi gns quadruple density to the command ESC L:
LPRINT CHR$(27);”?”;”L”;CHR$(3)
Select Graphics Command (Epson)
ML320 E/I, ML321 E/I ML320 Turbo, ML321 Turbo ML520, ML521
Function ASCII Dec Hex
Select 9-pin Graphics Printing
ESC ^ m Ln Hn [data]
27 94 m Ln Hn [data]
1B 5E m Ln Hn [data]
This command permits use of all nine pins on the print head. I t operat es exact l y l i ke t he ESC * command, except that dot columns are given tw o byt es each i nstead of one. The first byte for each column represents the top eight pins, j ust like the ESC * command. The second byte is 128 if the bottom (9th) pin is to be fired, and zero if it's not to be fired.
Select Graphics Mode Command (ML)
ML320 Std., ML321 Std. ML320 Turbo, ML321 Turbo ML520, ML521
Function ASCII Dec Hex
Select Graphics Mode ESC * n1 n2 : 27 42 n1 n2 58
Use this command to select the density and to define the speed and “word size.”
Parameter n
1
This parameter specifies the density. To calculate the value of n1, first select the dpi and density you want, then determine the n
values for each from the table below. Ad d t hem t ogether, t hen
1
add 96 to the total.
1B 2A n 3A
1 n2
Chapter 6: Graphics Commands for 9-Pin Printers 57
Table 38: ML ESC * Command —
Densities for n1 Values (9-Pin Printers)
Dots per inch/Density Value of n
1
60 dpi 1 72 dpi 2 Single density 4 Double density 8 Quadruple density 16
For example, for 60 dpi printing at quadruple density, t he val ue of n1 would be calculated as follows:
n
= 1 + 16 + 96 = 113
1
Parameter n
2
This parameter specifies the speed of the printing and a word length of 8 bits. To calculate the value of n below. Next, select 7 or 8-bit graphics and determi ne the val ue of n
, first select the speed and determine the value of n2 for that speed from the table
2
for that word size from the
2
table. Add each of these two values together, then add 64 to the total.
Table 39: ML ESC * Command —
Speed & Word Sizes for n2 Values (9-Pin Printers)
Speed/Word Size Value n
Normal speed 0 Double speed 8 7-bit graphics 0 8-bit graphics 16
2
For example, for double speed, 8-bit graphics, the value of n2 would be calculated as follows:
= 8 + 16 + 64 = 80
n
2
Chapter 6: Graphics Commands for 9-Pin Printers58
Graphics Print Mode Commands (ML)
ML320 Std., ML321 Std. ML320 Turbo, ML321 Turbo ML520, ML521
Function ASCII Dec Hex
Select Graphics Print Mode ETX 3 03 End Graphics Print Mode ETX STX 3 2 03 02
To begin printing graphics, you must first send t he ETX command. This is followed by graphics data—bytes representing the individual dot columns you will be printing. The graphics data is followed by the ETX STX command which ends graphics printing. The listing below is a BASIC program that generates a row of six triangles in quadruple de nsi t y.
10 WIDTH “LPT1:,”255 ‘Set printer for maximum line width
20 LPRINT CHR$(27);”*”;CHR$(113);CHR$(80);”:”;CHR$(3);
30 REM CHR$(113) and CHR$(80) are the attribute codes for normal speed,
quadruple density graphics 40 REM CHR$(3) Begins graphics printing 50 FOR I=1 TO 6 ‘Repeat triangle pattern six times 60 FOR J=1 TO 16 ‘Each triangle has 16 columns 70 READ A ‘Read the column 80 LPRINT CHR$(A); ‘Send the byte to the printer 90 NEXT J ‘Now print the next column
100 RESTORE ‘Go back to the beginning of the DATA statements 110 NEXT I ‘Now print the next triangle 120 LPRINT CHR$(3);CHR$(2); ‘End graphics printing 130 END 140 DATA 128,192,224,240,248,252,254,255,255,254,252,248,240,224,192,128
Your printout will look like this:
Chapter 6: Graphics Commands for 9-Pin Printers 59
䊱䊱䊱䊱䊱䊱
Special Purpose Line Fe ed Commands (ML)
ML320 Std., ML321 Std. ML320 Turbo, ML321 Turbo ML520, ML521
If you are printing more than one line of graphics, you will need to use line feeds. In the Okidata MICROLINE Standard emulat i on, your pri nt er has a vari et y of special purpose line feed commands for use in graphics printing:
Function Setting ASCII Dec Hex
Graphics line feed
with carriage return
Graphics line feed
with carriage return
Graphics line feed
without carriage return
Graphics line feed
without carriage return
Stores graphics data
in one dot column buffer
The graphics setting is determined by whether you are using 7 or 8-bit graphics. In 7-bit graphics mode, the graphics setting is 14/144”; in 8-bit graphics mode, it is 16/144”.
The text setting is determined by the current text line spacing, as set by the ESC 6 and ESC 8 commands.
Text ETX LF 3 10 03 0A
Graphics ETX SO 3 14 03 0E
Text ETX DC2 3 18 03 12
Graphics ETX DC4 3 20 03 14
N/A ETX ETX 3 3 03 03
Chapter 6: Graphics Commands for 9-Pin Printers60
Chapter 7: Graphics Commands for 24-Pin Printers
Overview
Your printhead has one column of pins. Images are created as the pins “fire,” st ri ki ng t he ribbon against the paper to produce dots. White spaces appear where the pins don't f i re. I n 8­pin graphics, each column of dots is represented by a single byte of dat a. I n the Epson LQ mode, Models ML390 Turbo, ML391 Turbo, ML590 and ML591 support 24-pin graphics, in which each dot column is represented by three bytes of data.
When you program a graphic image, your program has to describe the pattern of dots you want to print. Graphics data, like all other dat a sent t o t he print er, consi st s of a seri es of byt es. Each of the eight bits in a byte of graphics data corresponds to one pin on the printhead. A bit's value can be either 1 or 0. When the printer receives the data, it i nt erprets a bi t w i t h a value of 1 as a command to fire the corresponding pin. Bits that are set t o 0 don' t cause pi ns t o fi r e.
You can picture the byte as a column of 8 bits. In 8-pin graphics, t he body of dat a i s a seri es of these columns lined up next to each other. Instead of sending the dat a to t he pri nt er bi t by bi t , you'll probably want to convert this binary information into decimal or hexadecimal format for use with your programming language. In the figure below we show how t o determi ne t he decimal value for a given pattern of pins. For 24-pin graphics, you must perf orm thi s process a total of three times.
Chapter 7: Graphics Commands for 24-Pin Printers 61
For optimum registration when printing graphics using bi-directional printing, use the Print Registration item in the printer menu to fine-tune the alignment of the vertical bars which print as part of the menu. Keep changing the setting until the lines of the vertical bar characters have the straightest vertical column.
Programming Graphics in BASIC
One important thing to remember when you're programming graphics is not to include extraneous line feeds in your programs. Using a semicolon after the data in an LPRINT statement will keep the print position on the same line.
However, there is an additional complication: by default, BASIC assigns to all printers a maximum line length of 80 characters. After the printer has received 80 bytes of dat a, i t w il l automatically perform a carriage return and line feed. Since graphics dat a t ypi cal l y consi st s of many bytes, it's quite easy to exceed this limit. The resulting output will be garbled. You can work around this problem by setting the line length to the maximum allowable value, 255. Put one of these statements at the beginning of your program:
For parallel printers:
WIDTH “LPT1:”,255
For serial printers that have been opened as #1:
WIDTH #1,255
Graphics Density Selection Commands (IBM/E)
ML390 Turbo, ML391 Turbo ML590, ML591
Function ASCII Dec Hex
Begin Single Density
Graphics
Double Density
Graphics Command
Double Speed/
Double Density
Graphics Command
Quadruple Density
Graphics Command
These graphics modes correspond to the 8-pin modes and are supported by most current DOS-based graphics software.
Parameters Ln and H
n
These parameters tell the printer how many bytes of graphics data to expect. Eight-pin graphics have one byte of data per column. To calculate the values for L many columns of dots there will be in your graphics image. Divide this number by 256 and assign the whole number result to H
ESC K Ln Hn [data] 27 75 Ln Hn [data] 1B 4B Ln Hn [data]
ESC L Ln Hn [data] 27 76 Ln Hn [data] 1B 4C Ln Hn [data]
ESC Y L
[data] 27 89 Ln Hn [data] 1B 59 Ln Hn [data]
n Hn
ESC Z Ln Hn [data] 27 90 Ln Hn [data] 1B 5A Ln Hn [data]
and Hn, first determine how
n
; assign the remainder to Ln.
n
Chapter 7: Graphics Commands for 24-Pin Printers62
Loading...