Genicom Printer GEK 00031B User Manual

GEnicom  
5000 Series  
Programmer’s Manual  
GEK – 00031B  
 
Table of Contents  
Page  
Chapter 2. ANSI Emulation (Continued)  
ANSI 4800/4410 Strap 1 OUT........................................................ 46  
ANSI 4800/4410 Strap 1 IN ........................................................... 46  
Setting Bar Code Parameters.......................................................... 47  
Bar Code Dimensions .................................................................. 48  
Default Bar Code Characteristics................................................. 50  
Human-Readable Line (HRL) .......................................................... 50  
Font Styles and Enhancements ...................................................... 50  
Spacing and Bar Code Editing Aids ................................................ 50  
Bar Code Readability Statement ..................................................... 51  
Bar Code Program Examples .......................................................... 52  
Test Program.................................................................................. 52  
Error Symbol.................................................................................. 52  
Changing Parameters ..................................................................... 53  
Commas and Spaces as Delimiters................................................. 53  
Horizontal Spacing ......................................................................... 54  
Printer Option Strap 11, Group 2 IN............................................... 55  
EXAMPLE 1: Strap 11 OUT.......................................................... 55  
EXAMPLE 2: Strap 11 IN ............................................................. 55  
EXAMPLE 3: Strap 11 OUT with no suppression of LF/CR on line 30  
.................................................................................................... 56  
Vertical Bar Codes.......................................................................... 57  
COMMAS: With HRL.................................................................... 57  
COMMAS: Without HRL............................................................... 58  
SPACES: With HRL...................................................................... 58  
SPACES: Without HRL................................................................. 58  
Horizontal Tabs ........................................................................... 59  
OVERSIZE CHARACTER FONT ......................................................... 60  
Entering and Exiting Oversize ........................................................ 60  
Selecting Size ................................................................................. 61  
Size Parameters for Rotation........................................................ 61  
Spacing Between Characters........................................................ 61  
Sample Programs ........................................................................... 62  
Example 1 ................................................................................... 62  
Example 2 ................................................................................... 62  
Example 3: Showing the Importance of Resetting Scaling Factors. 63  
Printer Control Strap GenPrtOpts/Group 2/Strap 13................... 64  
Example 4: GenPtrOpts | Group 2 Strap 13 IN ............................ 65  
Example 5: GenPtrOpts | Group 2 Strap 13 OUT ........................... 65  
3
GEK-00029B  
Table of Contents  
 
Table of Contents  
Page  
Chapter 3.Printronix P300/P600 Emulation..................................66  
Introduction ......................................................................................66  
Control Codes....................................................................................66  
Printronix Graphics ...........................................................................69  
Dot Patterns and Densities..............................................................69  
Dot Patterns.................................................................................70  
Normal-Density Graphics .............................................................71  
High-Density Graphics .................................................................71  
P300/600 8-Bit Horizontal Graphics...............................................71  
P300/600 Electronic Vertical Format Unit .........................................72  
Using the EVFU ..............................................................................72  
Points to Remember .....................................................................72  
PI Lead Codes – Use with Serial Interface......................................73  
Codes Not Using the PI Lead.........................................................73  
Example EVFU Loading Program ..................................................74  
Example Form Printout ................................................................75  
Sample Program to Print Form......................................................75  
Chapter 4.Printronix P-Series Emulation.......................................76  
Special Function Control Character (SFCC)........................................76  
Command Line................................................................................76  
Set and Reset Codes........................................................................77  
Command Index ................................................................................78  
Control Codes....................................................................................80  
character sets, FONT handling and enhancements.............................82  
Housekeeping Commands..................................................................92  
Plot Mode Graphics Operational Description......................................98  
Plot Density ....................................................................................98  
Normal Density Plot Mode...............................................................98  
Double Density Plot Mode ...............................................................98  
Plot Mode Format............................................................................98  
Plot Data Line Format.....................................................................99  
Normal Density Plot Mode Format...................................................99  
Double Density Plot Mode Format .................................................100  
Plot Mode Graphic Character Chart...............................................101  
Exiting Plot Mode Graphics...........................................................101  
Plot Mode Graphics density commands............................................102  
Differences From Target Printer Emulation ......................................104  
Discarded Commands...................................................................104  
Select Extended Character Set (SFCC OSET;n) ...........................104  
Download a Language (SFCC V)..................................................104  
Download a Character Shape (SFCC c) .......................................104  
4
5000 Programmer’s Manual  
GEK-00029B  
 
Table of Contents  
Page  
Chapter 4.Printronix P-Series Emulation (Continued)  
Postnet Bar codes (SFCC |p*xxxxx-yyyy-zz*).............................. 104  
Ribbon Minder Enable/Disable (SFCC r E/SFCC r D) ................ 104  
Ribbon Minder Set Job Rate (SFCC r J nnnn E) ......................... 104  
Ribbon Minder Worn Message (SFCC r A n)................................ 104  
Command Line Debug..................................................................... 105  
Font Styles, Pitches, and Character Sets......................................... 106  
Font Styles................................................................................... 106  
Font Pitches................................................................................. 106  
Character Sets ............................................................................. 106  
Extended Character Sets.............................................................. 106  
Form Length................................................................................. 106  
Plot Mode Graphic Densities......................................................... 107  
Enhancements ............................................................................. 107  
High Vertical Density Plot Mode Graphics .................................. 107  
Chapter 5.Proprinter Emulation.................................................. 108  
Introduction.................................................................................... 108  
Differences from proprinter............................................................. 108  
Proprinter Control Codes................................................................. 108  
Command Directory........................................................................ 111  
Escape Sequences........................................................................... 112  
Proprinter Dot Graphics.................................................................. 119  
Chapter 6.Epson FX286-e Emulation .......................................... 122  
Introduction.................................................................................... 122  
Conventions Used in this Chapter ................................................ 122  
Print Mode Combinations............................................................. 123  
Functional Differences .................................................................... 124  
Additional Escape Sequences.......................................................... 125  
Unsupported Escape Sequences...................................................... 125  
FX-286e Control Codes ................................................................... 126  
FX-286e Escape Sequence DIRECTORY .......................................... 129  
FX-286e Escape Sequence GROUPINGS.......................................... 131  
Margins .......................................................................................... 132  
Line Spacing................................................................................... 134  
Character Spacing .......................................................................... 135  
Tabs ............................................................................................... 136  
Paper Movement ............................................................................. 138  
Print Position.................................................................................. 139  
Print Modes .................................................................................... 141  
Special Character Printing .............................................................. 145  
5
GEK-00029B  
Table of Contents  
 
Table of Contents  
Page  
Chapter 6.Epson FX286-e Emulation (Continued)  
Miscellaneous Commands ...............................................................149  
FX-286e Dot Graphics .....................................................................150  
Specifying Graphics Line Length ...................................................150  
Image Data Bytes..........................................................................151  
Graphics Programming Example ...................................................151  
Printed Results of Sample Program ...............................................151  
FX-286e Dot Graphics Control Sequences........................................152  
Chapter 7.DEC LG / Compaq LG Plus Emulation..........................155  
Control Code Definitions..................................................................155  
Commands......................................................................................158  
Chapter 8.PPL3 Plus Emulation...................................................195  
INTRODUCTION ..............................................................................195  
General Considerations.................................................................195  
Coded Characters .........................................................................195  
7-Bit Versus 8-Bit Environments ..................................................196  
Printable Characters .....................................................................198  
CONTROL CODES ...........................................................................199  
Introduction..................................................................................199  
C0 Control Characters ..................................................................199  
C1 Control Characters ..................................................................201  
SPECIAL CHARACTER PROCESSING ..............................................203  
Hex 20..........................................................................................203  
Hex 7F..........................................................................................203  
Hex A0..........................................................................................203  
Hex FF..........................................................................................203  
Special Character Parsing .............................................................204  
ESCAPE SEQUENCE / control function syntax................................205  
Escape Sequence Syntax...............................................................205  
Control Sequence Syntax ..............................................................205  
Parameter Values Within Control Sequences.................................206  
COMMAND DIRECTORY..................................................................207  
COMMAND DICTIONARY.................................................................209  
PAGE COORDINATE SYSTEM..........................................................251  
Coordinate System Models ............................................................251  
Character Cell Model..................................................................252  
Point Model ................................................................................252  
Point Model Has Precedence .......................................................252  
Origin and Extent .........................................................................252  
Origin.........................................................................................252  
6
5000 Programmer’s Manual  
GEK-00029B  
 
Table of Contents  
Page  
Chapter 8.PPL3 Plus Emulation (Continued)  
Printable Area............................................................................ 253  
Positioning and Movement............................................................ 253  
Horizontal Advance Increments .................................................... 254  
Fixed HAI................................................................................... 254  
SIXEL GRAPHICS ........................................................................... 256  
Terminology and Concepts............................................................ 256  
General Sixel Graphics Operation................................................. 257  
Sixel Graphics Commands............................................................ 258  
Appendix A. Using the Hex Dump................................................ 261  
Appendix B. Font Print Samples.................................................. 262  
Appendix C. Postnet Bar codes.................................................... 265  
Entering and Exiting POSTNET Bar Codes ...................................... 265  
Selecting POSTNET Style Bar Codes ............................................. 265  
Appendix D. Description of Strapping Options ............................ 268  
General Printer Options Definitions................................................. 269  
Legacy Parallel Software Strap Definitions....................................... 270  
Emulation Option descriptions........................................................ 271  
Appendix E. DSC Code Charts ........................................................ 275  
Index .......................................................................................... 310  
7
GEK-00029B  
Table of Contents  
 
CHAPTER 1. INTRODUCTION  
OVERVIEW OF PRINTER EMULATION  
Commands are sent to the printer in the form of control codes and  
escape sequences. These differ from normal data to be printed in that  
they give instructions to the printer on paper movement, style of  
print, size, density, and many other selectable features.  
Certain protocols are needed so that the printer can recognize and  
act on these commands sent from the host.  
The shuttle matrix printer contains emulations to make it behave in a  
manner that is functionally similar to other printers. The emulations  
that it contains are:  
ANSI Standard X3.64-1979 (Default)  
Printronix P300/P600  
Printronix P Series  
IBM Proprinter  
Epson FX286-e (9-wire dot matrix)  
DEC LG / Compaq LGPlus  
DEC PPL III  
Each emulation has a set of control codes and/or escape sequences  
that are explained in this manual. There is a separate chapter for  
each emulation.  
CONTROL CODES  
Control codes are used to transmit information other than printable  
characters to the printer. They may occupy the first 32 locations on  
the ASCII code chart and are represented by two- or three-letter  
abbreviations. Locations 0X80 through 0X9F may also be interpreted  
as control codes, depending on the emulation and settings.  
The control code <LF> (10 decimal, 0A hex), for instance, is almost  
universally interpreted as a line feed. However, the response of the  
printer to other control codes will depend on the emulation.  
ESCAPE SEQUENCES  
Remote selection of the printer's functions and features is achieved  
by using command strings (a combination of characters and  
parameters) preceded by an <ESC> (27 decimal, IB hex) or CSI  
character (155 decimal, 9B hex). Escape sequences associated with  
similar functions will vary from one emulation to the next.  
8
Chapter 1. Introduction  
GEK-00029B  
 
NOTE  
The physical spaces in the escape sequences shown in this  
publication are only for clarification purposes and are not used in  
the actual string. If a space is actually needed in the sequence, it  
will be shown as an <SP> in the mnemonic form of the sequence.  
In the decimal form, it will appear as a 32, and in the  
hexadecimal form, as 20.  
Examples are shown below of escape sequences as written in the  
text: with parameters filled in and written in the BASIC programming  
language assuming the use of the LPRINT instruction. The parameter  
values are actualized in these examples, but will be shown as  
parameters thereafter. Note that parameters are surrounded by angle  
brackets (<>).  
Tab Clear  
Mnemonic:  
Decimal:  
Hex:  
<ESC> [ <p1> g  
27 91 16 103  
1B 5B 10 67  
(assume p1=16)  
BASIC:  
CHR$(27);"[16g"  
Horizontal Tabs Set  
Mnemonic:  
<ESC> [ <p1> ; <p2>... u  
(assume p1=648,  
p2=1386, p3=2808)  
Decimal:  
Hex:  
BASIC:  
27 91 648 59 1386 59 2808 117  
1B 5B 288 3B 56A 3B 0AF8 75  
CHR$(27);"[648;1386;2808u"  
Expand Characters  
Mnemonic:  
<ESC> [ <p1> ; <p2> SP B  
(assume p1=200  
and p2=200)  
Decimal:  
Hex:  
BASIC:  
27 91 200 59 200 32 66  
1B 5B C8 3B C8 20 42  
CHR$(27);"[200;200 B"  
CSI AND OSC  
A control sequence introducer <CSI> signals the beginning of an ANSI  
sequence using the <ESC> code and the left bracket ([). <CSI> (9B  
hex) can be used instead of <ESC> [ (1B 5B hex) when the printer is  
receiving and processing 8-bit data. <ESC> [ will be used  
predominately in this manual for the examples.  
An operating system command (OSC) signals the start of a download  
sequence using the <ESC> code and the right bracket (]). <OSC> (9D  
hex) can be use instead of <ESC> ] (1B 5D hex) when the printer is  
receiving and processing 8 bit data. <ESC> ] will be used  
predominately in this manual for the examples.  
9
GEK-00029B  
5000 Series Programmer’s Manual  
 
LINE TERMINATORS  
Some control codes and escape sequences act as line terminators.  
Line terminators cause all data received since the last terminator to  
be printed. Without a terminator, data will remain buffered.  
DECIPOINTS  
Throughout this manual decipoints are used as a unit of measure. A  
decipoint equals 1/720th of an inch and is used as a standard of  
measurement for parameters associated with set distances. A few  
examples are margins, tabs, and vertical paper movements. See  
Appendix D for the decipoint conversion tables.  
SCS SMART GRAPHICS CAPABILITIES  
The 5000 series printers have SCS smart graphics processing as a  
standard feature that can be enabled via the CCU control panel  
menus. The graphics emulations include both IGP and QMS Code V  
version 2. There are separate programming manuals for each of these  
graphics language emulations.  
The graphics printing emulations provide capabilities for such things  
as:  
Barcoding (including POSTNET codes)  
Rotated text  
Downloading of and host-controlled selection of predefined forms  
Loading of data into predefined forms  
Dynamic alphanumeric data  
10  
Chapter 1. Introduction  
GEK-00029B  
 
CHAPTER 2. ANSI EMULATION  
CONTROL CODE AND ESCAPE SEQUENCE ACTIVITY LEVELS  
ANSI control codes and escape sequences are assigned activity levels  
depending on which print mode is currently active. The following  
charts provide information on what to expect from the control codes  
and escape sequences in each printing mode.  
I
-IGNORED  
No noticeable effect on printing will occur.  
V
-VALID  
These sequences do not affect the printing mode in  
progress, but take effect when normal printing  
resumes.  
A
–ACTIVE  
This sequence takes effect immediately.  
These control codes are used as data.  
D
–DATA  
Notes  
Note 1  
When printer option 1 is active, either in ANSI (4800)  
or ANSI (4410) emulation, <SO> and <SI> activate or  
deactivate this printing mode. <SO> and <SI> are  
VALID in bar codes and oversize print mode. They are  
ACTIVE in expanded print mode. Please see Appendix  
D, Description of Strapping options, ANSI (4800) or  
ANSI (4410) tables on page 271 for details on options  
which affect printer operation in ANSI emulation.  
Note 2  
VALID during enhanced oversize, ACTIVE during  
normal oversize.  
Note 3  
Note 4  
Discarded while in the native mode.  
Causes an error symbol to print (XOX).  
11  
GEK-00029B  
5000 Series Programmer’s Manual  
 
Control Code Activity Levels  
Control Code Activity Levels  
Control  
Code  
BEL  
BS  
Line  
Terminator  
Dot  
Graphics  
Bar  
Codes  
D
Normal  
Oversize  
POSTNET  
Note 4  
No  
Yes  
Yes  
No  
A
A
A
A
A
A
I
I
I
Note 4  
CR  
DC1  
DC3  
DEL  
FF  
A
I
A
A
Note 4  
A
D
Note 4  
No  
A
A
D
A
Note 3  
A
Note 4  
Note 4  
Note 4  
A
No  
Note 3  
Note 3  
D
Yes  
No  
A
A
A
A
A
A
A
A
A
I
I
HT  
A
A
LF  
Yes  
No  
I
A
Note 4  
Note 4  
Note 4  
Note 4  
SI  
Note 1  
Note 1  
I
Note 1  
Note 1  
A
SO  
VT  
No  
I
Yes  
A
12  
Chapter 2. ANSI Emulation  
GEK-00029B  
 
Escape Sequence Activity Levels  
Escape  
Sequence  
Line  
Terminator  
Dot  
Graphics  
Bar  
Codes  
Normal  
Oversize POSTNET  
DCS (Graphics)  
Font Load  
GENBCS  
GENFD  
GENGRM  
GENHTS  
GENOSM  
GENSLR  
GENSNC  
GENSPM  
GENTST  
GENVFU  
DENVTS  
GSM  
No  
No  
No  
No  
No  
No  
No  
No  
No  
No  
Yes  
Yes  
No  
No  
Yes  
Yes  
No  
No  
Yes  
Yes  
Yes  
No  
No  
No  
No  
No  
No  
No  
No  
No  
Yes  
Yes  
Yes  
No  
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
I
I
I
A
I
I
I
I
I
I
I
I
I
A
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
A
A
A
V
A
V
A
V
V
A
A
A
V
A
A
A
A
A
I
A
A
A
A
V
A
V
A
I
A
A
A
A
A
A
Note 2  
A
A
A
A
V
A
A
A
A
A
I
A
A
A
HPA  
A
HPB  
A
HPR  
A
HTS  
A
HVP  
A
PLD  
A
PLU  
I
I
A
REP  
A
A
A
V
A
V
A
A
I
I
A
RIS  
A
A
V
A
V
I
A
RM  
A
SGR  
Note 2  
SM  
A
SPI  
Note 2  
ST  
I
TBC  
A
A
A
A
A
A
A
I
A
A
A
A
A
A
VFU Load  
VPA  
A
A
A
A
A
A
A
A
VPB  
VPR  
VTS  
13  
GEK-00029B  
5000 Series Programmer’s Manual  
 
CONTROL CODE DEFINITIONS  
BEL  
Bell (07H):  
Receipt of a BEL code causes the beeper to sound for  
approximately 1/2 second after any preceding printable data has  
been processed.  
BS  
Back Space (08H):  
Line terminator. The paper position remains  
unchanged and the print position is moved left one character space  
from the current. If the print position is at the left margin, no action  
is taken.  
CR  
Carriage Return (0DH):  
Line terminator. The print position is reset  
to the left margin, and the paper position is left unchanged.  
CSI  
Control Sequence Introducer (9BH):  
Signals the beginning of an  
ANSI control sequence. When 8-bit data is used, CSI (9BH) can be  
substituted for ESC [ (1BH 5BH). Also see ESC.  
DC1  
Device Control 1 (11H):  
Parallel and Serial Interface: Receipt of a  
DC1 code with the printer in local mode puts the printer online  
(selects printer) and enables receipt of data.  
Through CCU menu options, a serial interface protocol may be  
selected that transmits a DC1 code to the host to signal that the  
printer is ready to receive data.  
NOTE  
The print position can also be set to the left margin via the  
CCU Control Panel Menu using the SETUP/FORMAT/MODIFY  
FORMAT/PRINT CONTROL menu selection.  
DC3  
Device Control 3 (13H):  
Parallel and Serial Interface: Receipt of a  
DC3 code when online places the printer in local mode (deselects  
printer) and causes it to ignore all data except a <DC1>.  
selected that  
Through menu options, a serial interface protocol may be  
transmits a <DC3> code to the host to signal that the printer is not ready to  
receive data.  
(See note for <DC1), above.)  
ESC  
Escape (1BH):  
Signals the beginning of an escape sequence. See also  
CSI above.  
14  
Chapter 2. ANSI Emulation  
GEK-00029B  
 
FF  
Form Feed (0CH):  
next  
Line terminator. The paper is advanced to the  
top-of-form position. When the EVFU is enabled and programmed, paper  
will advance to the next stop in channel 1.  
NOTE  
An option strap from the CCU Control Panel Menu using the  
SETUP/FORMAT/MODIFY FORMAT/GENPRTOPTS selection  
can disable this feature.  
HT  
LF  
Horizontal Tab (09H):  
Advances the print position to the next  
horizontal tab location. If no tabs are set, an HT code is either converted to a  
space or ignored, depending on the menu option settings.  
Line Feed (0AH):  
next  
Line terminator. The paper is advanced to the  
line. When printing horizontal dot graphics, the paper is advanced to the next  
dot row.  
(See note for <FF>, above.)  
SI  
Shift In (0FH):  
Used to exit a Special Print Mode (GENSPM) when  
ANSI emulation strap 1 (Appendix G, tables 5 and 6) is active.  
SO  
VT  
Shift Out (0EH):  
ANSI emulation strap (Appendix G, tables 5 and 6) 1 is inactive.  
when  
Used to enable a special print mode (GENSPM)  
Vertical Tab (0BH):  
the  
Line terminator. The paper is advanced to  
next vertical tab stop. If no tabs are set, a VT code causes a line feed. When  
using the EVFU, paper advances to the next stop in channel 12.  
(See note for <FF>, above.)  
15  
GEK-00029B  
5000 Series Programmer’s Manual  
 
ESCAPE SEQUENCE DIRECTORY  
Sequence  
Meaning  
Page  
19  
CSI or ESC [  
Control Sequence Introducer  
GENEMU: Selects emulation  
CSI p1 p2 SP ~  
ESC [p1 ; p2 SP B  
21  
GSM: Modifies vertical (p1) and horizontal (p2)  
character size  
31  
ESC [p1 ; p2 SP G  
ESC H  
SPI: Sets lpi (p1) and/or cpi (p2) in decipoints  
HTS: Sets a tab at current print position  
VTS: Sets a tab at current paper position  
PLD: Moves print line down 3/72 inch (subscript)  
PLU: Moves print line up 3/72 inch (superscript)  
DCS: Introduces dot graphics  
32  
30  
28  
25  
42  
40  
ESC J  
ESC K  
ESC L  
ESC P  
ESC Q  
Self-Test: Inactive. Sequence ignored.  
ESC [ p1 a  
ESC [ p1 b  
HPR: Moves print position right p1 distance (relative)  
25  
40  
REP: Dot graphics: repeat preceding character p1  
times  
ESC c  
RIS: Resets printer to a known initial state  
VPA: Sets vertical position to p1 decipoints or lines  
VPR: Moves paper forward p1 decipoints  
HVP: Moves paper and print position (absolute)  
TBC: Clears tabs: p1=3 for horizontal  
35  
26  
26  
26  
28  
34  
ESC [ p1 d  
ESC [ pl e  
ESC [ p1; p2 f  
ESC [ p1 g  
ESC [ p1 ; ...; pn h  
SM: Set mode (PUM, LNM, proportional, character  
mapping)  
ESC [ p1 j  
HPB: Moves print position left by decipoints or  
columns  
26  
ESC [ p1 k  
ESC [ p1 l  
VPB: Moves paper backward by decipoints or lines  
27  
32  
RM: Reset mode (PUM, LNM, proportional, character  
mapping)  
ESC [ p1; ... pn m  
ESC [ p1 p2 ! p  
SGR: Selects font styles and enhancements  
32  
44  
41  
GENVF2: EVFU vertical paper movement command  
ESC [ p1 ; p2 ; p3 q  
GENGRM: Selects graphics horizontal and vertical dot  
densities  
ESC [ p1; p2 ; p3 r  
ESC [ p1; p2 s  
ESC [ p1 t  
GENFD: Sets form length (pl), margins: top (p2),  
bottom (p3)  
28  
29  
46  
GENSLR: Sets margins: left (p1), right (p2) in  
decipoints  
Selects bar codes p1=3, quit bar code p1=0  
16  
Chapter 2. ANSI Emulation  
GEK-00029B  
 
Sequence  
Meaning  
Page  
ESC [ p1;… pn u  
GENHTS: Sets horizontal tabs (p1, etc.) in decipoints  
or columns  
30  
ESC [ p1 ;… p12;v  
GENVTS: Sets vertical tabs (p1, etc.) in decipoints or  
lines  
30  
22  
ESC [ p1 x  
GENSNC: Selects international character sets  
Selects bar code parameters  
ESC [ p1 ; ...;p10 }  
ESC [ p1 SP }  
GENDFC: Download Font Control: Checks printer for  
downloaded font  
35  
OSC or ESC ]  
ESC ] 5  
Operating System Command: introduces sequence  
19  
35  
BFL (Begin Font Load): Valid only if download option  
is installed.  
ESC ] !  
Begins 12-channel EVFU table loading  
ST: String Terminator. Exits special modes  
HPA: Horizontal Position Absolute  
Character Map Load  
42  
19  
27  
23  
ESC \  
ESC [ p1 `  
OSC 9 ; p1 ; ... ; p8-pn  
ST  
17  
GEK-00029B  
5000 Series Programmer’s Manual  
 
ANSI ESCAPE SEQUENCE CATEGORIES  
The ANSI escape sequences have been separated according to  
functionality. Special areas of interest, such as graphics and the  
electronic vertical format unit (EVFU), have been described in  
separate sections. The functional groups are:  
Housekeeping  
Paper and Print Positioning  
Margins and Tabs  
Font Handling and Enhancements  
Graphics  
EVFU  
18  
Chapter 2. ANSI Emulation  
GEK-00029B  
 
Housekeeping Sequences  
ESC [  
CSI (Control Sequence Introducer):  
This sequence is used to begin  
sequences, that generally have multiple parameters.  
ESC ]  
OSC (Operating System Command):  
This is another special  
sequence introducer. Sequences which begin with OSC require the  
ST string terminator sequence (ESC \) to end them.  
ESC \  
ESC c  
ST (String Terminator):  
Terminates the loading of EVFU tables,  
download fonts, and dot graphics strings.  
RIS (Reset to Initial State):  
Resets the printer to either the standard  
state shown below or to the state stored in the customer save area of  
memory. The RIS sequence can be disabled by ANSI option strap 3  
(see Appendix D, ANSI (4800) or ANSI (4410), option 3).  
RIS – Reset to Initial State  
Parameter  
State  
Font Style  
Gothic Draft  
Character Size  
1X Vertical, 1X Horizontal  
Character Pitch  
Country Selection  
Code Page  
10 cpi  
USA  
437  
Line Spacing  
6 lpi  
Partial Line Up  
Partial Line Down  
Bold Print  
Reset  
Reset  
Inactive  
Underline Mode  
Expanded Mode  
Proportional Mode  
Horizontal Tab Table  
Left Margin  
Inactive  
Inactive  
Reset  
Empty  
None - Column 0  
Right Margin  
None - Maximum  
Form Number  
Page Size  
7
7920 decipoints/ 66 lines/11 inches  
Top Margin  
None  
Bottom Margin  
Forms Position  
Vertical Tab Table  
Vertical Format Unit  
Graphics Density  
VFU Load In Progress  
Bar Code Mode  
Dot Graphics  
None  
Top of form - current position  
Empty  
Default  
60 H dpi, 72 V dpi, horizontal format  
Exit (nothing saved)  
Inactive  
Inactive  
Decimal  
Hex:  
BASIC:  
27 99:  
1B 63  
CHR$(27);"c";  
19  
GEK-00029B  
5000 Series Programmer’s Manual  
 
ESC Q  
GENTST (Self-Test):  
This sequence is ignored.  
Decimal:  
Hex:  
27 102 or 120  
1B 5C or 9C  
BASIC:  
CHR$(27);"Q";  
20  
Chapter 2. ANSI Emulation  
GEK-00029B  
 
CSI p1 p2 SP ~  
GENEMU (Emulation Control):  
Switches the control of the printer to  
another emulation. The parameters in the sequence are defined as  
follows:  
p1  
Emulation identifier. This parameter selects the particular  
emulation by a reference number supplied by GENICOM  
engineering. The assigned numbers may be found in the table  
below.  
p2  
Reset control. Permits the parameters of the printer to be  
reset or defaulted. It is not always possible to meet the strict  
definition of this parameter, so each printer has a definition of  
how the reset control is implemented. The values as currently  
defined are:  
0
Hold values (default). All possible values for printer  
control, e.g., tabs, margins, page length, are to be  
retained.  
1
Full reset. Resets parameters to initial state.  
p1  
0
Manufacturer  
GENICOM  
GENICOM  
GENICOM  
IBM  
IBM  
Epson  
IBM  
Epson  
Emulation  
ANSI  
4410 ANSI  
Reserved  
Graphics Printer  
Proprinter XL 9-wire  
FX286-e  
Proprinter XL 24-wire  
LQ2500  
10  
1-19  
20  
21  
22  
23  
24  
30  
40  
41  
Data Products  
Printronix  
Printronix  
ANSI  
P300  
P5008  
Indeterminate Conditions  
If no emulation parameter is supplied, the emulation remains in the  
current state and the rest of the sequence is ignored. Other  
parameter values and other parameters are reserved.  
Mnemonic:  
Decimal:  
Hex:  
<CSI> <p1> <p2> <SP> ~  
27 91 <p1> <p2> 32 126  
1B 5B <p1> <p2> 20 7E  
CHR$(27);"<p1><p2><SP>~";  
BASIC:  
21  
GEK-00029B  
5000 Series Programmer’s Manual  
 
Character Set Selection  
ESC [ p1 x  
GENSNC (Select National Characters):  
This sequence selects the  
national character substitution if the currently selected character  
style supports it. The following values may be used for p1.  
p1  
0
Country Map or Character Set  
USA (ISO)  
1
2
German (ISO)  
French A (ISO)  
3
French B  
4
French Canadian  
5
6
Dutch (Netherlands)  
Italian  
7
8
United Kingdom (ISO)  
Spanish  
9
10  
11  
12  
13  
14  
15  
16  
Danish/Norwegian A  
Danish/Norwegian B  
Danish/Norwegian C  
Danish/Norwegian D  
Swedish/Finnish A  
Swedish/Finnish B  
Swedish/Finnish C  
Swedish/Finnish D  
Swiss  
17  
18  
(Ignored)  
19  
Yugoslavian  
20  
United Kingdom A  
21  
Turkish  
22  
Greek  
23  
Italian (ISO)  
24  
Spanish (ISO)  
437  
850  
852  
853  
855  
860  
863  
864  
865  
866  
867  
8572  
8573  
8574  
8575  
8576  
8577  
8578  
8591  
8592  
IBM PC USA (MS Code Page 437)  
IBM PC Multilingual (MS Code Page 850)  
Microsoft Code Page 852 (East Europe)  
Microsoft Code Page 853 (Turkey)  
Microsoft Code Page 855 (Cyrillic)  
Microsoft Code Page 860  
Microsoft Code Page 863 (French Canadian)  
Microsoft Code Page 864  
Microsoft Code Page 865  
Microsoft Code Page 866 (Russian)  
Microsoft Code Page 867  
USSR GOST (Russian)  
Greek Code Page 437  
DEC Multinational (LA-210)  
Roman 8  
Polish Mazowia  
Turkish 8-bit Code Page  
Greek Code Page 851  
ISO 8859-1 Latin Alphabet #1  
ISO 8859-2 Latin Alphabet #2  
22  
Chapter 2. ANSI Emulation  
GEK-00029B  
 
p1  
8593  
8594  
8595  
8596  
8597  
8598  
8599  
Country Map or Character Set  
ISO 8859-3 Latin Alphabet #3  
ISO 8859-4 Latin Alphabet #4  
ISO 8859-5 Latin/Cyrillic  
ISO 8859-6 Latin/Arabic  
ISO 8859-7 Latin/Greek  
ISO 8859-8 Latin/Hebrew  
ISO 8859-9 Latin Alphabet #5  
Character Map Load  
OSC 9 ; p1 ; ... ;  
p8-pn ST  
Character Map Load:  
This sequence signals the beginning of a  
Character Map Load data transfer. Character map definitions, which  
follow this sequence, are stored in non-volatile memory. The  
character map is selected with the GENICOM Select National  
Characters (GENSNC) command using the p2 parameter that is  
specified in the load sequence for this command. The load is  
terminated by a String Terminator (ST) sequence. The downloaded  
character map replaces the USA ISO character set in character map  
memory.  
A single character map containing 128 substitutions may be  
specified. A character map may be designated for either the GL table  
(codes 20H-7EH) or the GR table (codes 80H-FFH). Any substitutions  
not specified within a character map load will be mapped one-to-one.  
For example, code 41H prints the character normally found at  
location 41H (upper case A). When a character map designated as a  
GR map is selected by the GENSNC command (see Character Set  
Selection on page 22), the GL map will automatically be mapped  
one-to-one. A standard GL (7-bit) character map, such as French A,  
may be specified as the base for a downloaded GR (8-bit) character  
map, but an 8-bit GR map, Code Page 866, for example, may NOT be  
used as the base for a GL character map.  
The complete syntax for the Character Set Load is shown below:  
<OSC>9;<p1>;<p2>;...;<pn><ST>  
p1  
Control Command  
0
1
Stores new character map  
Erases existing character. In this case, parameters p2-  
pn are ignored and need not be supplied. An existing  
downloaded character map need not be erased before a  
new character map is loaded.  
All other values of p1 are reserved.  
p2  
GENSNC (CSI p1 x) select parameter. Values must be between  
90 and 99 in order not to interfere with GENICOM standard  
character maps. If a downloaded character map select  
parameter is a value other than 90 through 99, the download  
character map command is ignored.  
p3  
p4  
Reserved. This parameter is marked by inserting a semicolon  
(;) in the command sequence.  
Reserved. This parameter is marked by inserting a semicolon  
(;) in the command sequence.  
23  
GEK-00029B  
5000 Series Programmer’s Manual  
 
p5  
p6  
Reserved. This parameter is marked by inserting a semicolon  
(;) in the command sequence.  
A literal string indicating the GENSNC select parameter of an  
existing character map (such as 437 or 850) to be used as a  
base in which substitutions from this command sequence  
may be made. This string may be up to 10 characters in  
length and must be specified only if the downloaded character  
map uses an existing map as a base. The string is terminated  
by a semi-colon (;). The base character map always defaults to  
Code Page 437 if an ACT character map is specified and the  
downloaded character map is a GR table. If the downloaded  
map is a GL table, p6 must specify an existing GL table as the  
base or a one-to-one default base is used.  
p7  
A literal string used to identify the character map in the  
Progam Mode Font – Country menu. This string may be up to  
20 characters in length and is terminated by a semi-colon (;).  
Note that only the first 11 characters of this string are used  
for display purposes.  
p8-pn A trio of parameters used to specify the actual character map  
substitution. A semicolon must separate each parameter  
within the trio, and a semicolon must terminate each trio. The  
semicolon is not required for the last trio that immediately  
precedes the String Terminator (ESC \).  
The elements of each trio are defined as follows:  
1
A decimal number that identifies the destination  
character. This is the character value received from the  
host. For example, an upper case "A" has a decimal value  
of 65. Values of 32 through 126 and 128 through 255 are  
valid for this element.  
The first element processed in the first substitution trio  
defines whether the map is for GL (7-bit) or GR (8-bit)  
substitution. If the first element is between 32 and 126  
(inclusive), the map is GL, and the first element of each  
trio must also be between 32 and 126. Likewise, if the first  
element of the first trio is between 128 and 255, the map  
is a GR map and all first elements must fall between 128  
and 255. The character substitution map is discarded if  
this rule is violated.  
2
3
A decimal number that identifies the source character.  
This is the location value of the desired character pattern  
in the printer font set. For example, an upper case "A" has  
a decimal value of 65. Values of 0 through the last  
available character for the currently selected font are valid  
for this element.  
Reserved. A semicolon (;) is required to mark this element  
position. A zero is permitted.  
24  
Chapter 2. ANSI Emulation  
GEK-00029B  
 
Paper and Print Position Movements  
ESC K  
PLD (Partial Line Down):  
Line terminator. Moves the print line down  
3/72 inch for subscript printing. Also returns to the original line  
following a partial line up (<ESC> L - superscript) sequence. See note  
below.  
Decimal:  
Hex:  
27 75  
1B 4B  
BASIC:  
CHR(27)$;"K";  
ESC L  
PLU (Partial Line Up):  
Line terminator. Moves the print line up 3/72  
inch for superscript printing. Also used to return to the original line  
following a partial line down (ESC K - subscript) sequence. See note.  
Decimal:  
Hex:  
27 76  
1B 4C  
BASIC:  
CHR$(27);"L";  
NOTE  
In the 4800 emulation, these sequences can be used in  
succession to advance or reverse the paper to another line. In  
the 4410 emulation, they can be used in pairs to change from  
superscript directly to subscript or subscript directly to  
superscript, but can not be used to position the paper.  
Also see the SScript: ON/OFF menu selection in the User's  
Manual.  
ESC [ p1 a  
HPR (Horizontal Position Relative):  
Line terminator. Moves the  
print position to the right of the current position. The distance  
specified by the p1 parameter is in decipoints. An HPR move  
exceeding the right margin sets the print position at the margin. If  
the p1 parameter is zero or missing, the command is ignored.  
Decimal:  
Hex:  
BASIC:  
27 91 <p1> 97  
1B 5B <p1> 61  
CHR$(27);"[<p1>a";  
25  
GEK-00029B  
5000 Series Programmer’s Manual  
 
ESC [ p1 d  
VPA (Vertical Position Absolute):  
Line terminator. Sets the vertical  
position to the value specified by <p1>, moving paper forward or  
backward to the new position. The distance specified by the <p1>  
parameter is in decipoints. This command can be used to print inside  
top and bottom margins. If the specified position is not within the  
current page, the command is ignored. If the parameter value is  
omitted or less than 5 decipoints, it will result in the vertical position  
being set to the top of form position.  
Decimal:  
Hex:  
27 91 <p1> 100  
1B 5B <p1> 64  
BASIC:  
CHR$(27);"[";CHR$(<p1>);"d";  
ESC [ p1 e  
VPR (Vertical Position Relative):  
Line terminator. Increases the  
current vertical position by the value specified by p1. Decipoints are  
converted to provide the 1/144-inch moves shown in the table.  
Decipoint Value  
Missing or 0 – 4  
5-9  
Movement In Inches  
No Movement  
1/144 inch  
10-14  
2/144 inch  
15-19  
3/144 inch  
17,280 or greater  
24 inches  
Decimal:  
Hex:  
27 91 <p1> 95  
1B 5B <pl> 65  
BASIC:  
CHR$(27);"[<p1>e";  
ESC [ p1 ; p2 f  
HVP (Horizontal and Vertical Position):  
Line terminator. Sets the  
vertical paper position to the value of <p1> and the print position to  
the <p2> value. Values are sent as decipoints. HVP can position  
printing inside margins. The vertical position can not exceed the form  
length and the horizontal position cannot exceed the maximum width  
for the printer.  
Decimal:  
Hex:  
BASIC:  
27 91 <p1> 52 96  
1B 5B <p1> 3B <p2> 66  
CHR$(27);"[<p1>;<p2>;f";  
ESC [ p1 j  
HPB (Horizontal Position Backward):  
Line terminator. Moves the  
print position left of the current position by the distance specified in  
<p1>. Values are sent as decipoints. The print position is set to the  
left margin if the <p1> value would exceed the margin. An HPB with a  
<p1> value of zero is ignored.  
Decimal:  
Hex:  
BASIC:  
27 91 <p1> 106  
1B 5B <p1> 6A  
CHR$(27);"[<p1>j";  
26  
Chapter 2. ANSI Emulation  
GEK-00029B  
 
ESC [ p1 k  
VPB (Vertical Position Backwards):  
Line terminator. Moves the  
paper in reverse by the distance specified by p1. Values can be sent  
as decipoints. The paper position is set to the top margin if the p1  
value exceeds the margin. A VPB with a p1 value of 5 decipoints or  
less is ignored.  
Decimal:  
Hex:  
27 91 <p1> 107  
1B 5B <p1> 6B  
BASIC:  
CHR$(27);"[<p1>k";  
ESC [ p1 '  
HPA (Horizontal Position Absolute):  
Line terminator. Moves the  
print position to the value specified in <p1>. Values are sent as  
decipoints. Position zero is column one. The print position is set to  
the right margin if the <p1> value would exceed the margin. An HPB  
with a <p1> value greater than 9792 is ignored.  
Decimal:  
Hex:  
BASIC:  
27 91 <p1> 96  
1B 5B <p1> 60  
CHR$(27);"[<p1>'";  
27  
GEK-00029B  
5000 Series Programmer’s Manual  
 
Margins and Tabs  
ESC H  
HTS (Horizontal Tab Set):  
Sets a tab at the current print position  
and updates any existing horizontal tab table. A total of 22 tabs can  
be set. If this number is exceeded, the leftmost 22 tabs will be  
retained.  
Decimal:  
Hex:  
27 72  
1B 48  
BASIC:  
CHR$(27);"H";  
ESC J  
VTS (Vertical Tab Set):  
Sets a tab at the current print position and  
updates any existing vertical tab table. A total of 12 tabs can be set.  
If this number is exceeded, the 12 tabs closest to the top of the page  
will be retained.  
Decimal:  
Hex:  
27 74  
1B 4A  
BASIC:  
CHR$(27);"J";  
ESC [ p1 g  
TBC (Tab Clear):  
Clears horizontal or vertical tab stops based on the  
p1 value as follows:  
p1 = 0  
p1 = 1  
p1 = 3  
p1 = 4  
Clears horizontal tab at current print position.  
Clears vertical tab at current print position.  
Clears all horizontal tabs.  
Clears all vertical tabs.  
More than one parameter can be used.  
Example: To clear all horizontal and vertical tabs, send:  
<ESC> [ 3 ; 4 g  
Decimal:  
Hex:  
27 91 <p1> 103  
1B 5B <p1> 67  
BASIC:  
CHR$(27);"[<p1>;"g";  
ESC [ p1; p2 ; p3 r GENFD (Forms Definition):  
Establishes the form length <p1>, the  
top margin <p2>, and the bottom margin <p3> in decipoints. Default  
parameters are for an 11-inch (7,920 decipoints) long form with a top  
and bottom margin of zero.  
p1 - maximum allowable length is 24 inches (17,280 decipoints).  
p2 - top of page to first print line  
p3 – non-printable area at bottom of form  
Decimal:  
Hex:  
27 91 <p1> <p2> <p3> r  
1B 5B <p1> <p2> <p3>  
BASIC:  
CHR$(27);”[<p1>;<p2>;<p3>r";  
28  
Chapter 2. ANSI Emulation  
GEK-00029B  
 
Sequence  
Explanation  
ESC [ r  
Default values of 11-inch form length,  
zero top and bottom margins.  
11.5-inch form length, default top and  
bottom margins of zero  
Default length of 11 inches, top margin  
of 1-inch. Default bottom margin of zero.  
Default length of 11 inches, default top  
margin of zero, and a 1-inch bottom  
margin.  
ESC [ 8280 r  
ESC [ ; 720 r  
ESC [ ; ; 720 r  
ESC [ 7920 ; 360 ; 360 r 11-inch form length, ½-inch top and  
bottom margins  
Decimal:  
Hex:  
BASIC:  
27 91 <p1> <p2> <p3> 114  
1B 5B <p1> <p2> <p3> 72  
CHR$(27);"[<p1><p2><p3>r";  
ESC [ p1; p2 s  
GENSLR (Set Left/Right Margins):  
The p parameters are distances  
from the left edge of the printable area of the paper. Parameter <p1>  
sets the left margin and <p2> sets the right margin. An omitted  
parameter clears that margin. Invalid parameters set the left margin  
to zero (column 1) and the right margin to 9,504 decipoints (column  
136 at 10 cpi for the 13.6-inch machines).  
A new left margin takes effect following any line terminator that  
normally calls for a print position set to the left. A new right margin  
takes effect when the print position reaches the new margin.  
Margin settings stored as decipoint values are enforced to the nearest  
1/120 of an inch. Character printing operates at 1/120 of an inch.  
Decimal:  
Hex:  
BASIC:  
27 91 <p1> <p2> 115  
1B 5B <p1> <p2> 73  
CHR$(27);"[<p1><p2>s";  
NOTE  
There is a physical left margin of .6 to 1.6 inches from the  
edge of the paper to the first printable column. This distance  
is adjustable by sliding all four tractors sideways. The margins  
set with this sequence begin at the first physical print  
position, not at the edge of the paper.  
29  
GEK-00029B  
5000 Series Programmer’s Manual  
 
ESC [ p1 ; ... p22; u GENHTS (Multiple Horizontal Tab Set):  
Sets up to 22 horizontal  
tabs. The p parameters are set in decipoints.  
If more than 22 tabs are set, the highest numbered tabs (farthest  
right) will be pushed out of the tab table. Tabs set in front of the left  
margin, or beyond the right margin. are not usable. Moving the  
margins will make them active.  
Example: To place tabs at columns 10, 20, and 40 at 10 cpi, send  
ESC [ 10 ; 40 ; 20 u (tabs can be specified in any order).  
Decimal:  
Hex:  
BASIC:  
27 91 <p1> 59 <p2> 59 … <p22> 59 117  
1B 5B <p1> 3B <p2> 3B ... 3B <p22> 3B 75  
CHR$(27);"[<p1>;<p2>; ... ;<p22>;u"  
ESC [ p1 ; …; p12 ; vGENVTS (Multiple Vertical Tab Set):  
Sets up to 12 vertical tabs.  
The p parameters are set in decipoints. If more than 12 tabs are set,  
the 12 tabs nearest the top of form will be retained. If a tab is set in  
the top margin area, it will be stored but will not be active until the  
margin is moved. If a tab is set beyond the bottom margin,  
attempting to move to that tab will advance the paper to the next top  
of form.  
Decimal:  
Hex:  
BASIC:  
27 91 <p1> 59 <p2> 59 … <p12> 59 118  
1B 5B <p1> 3B <p2> 3B … <p12> 3B 76  
CHR$(27);"[<p1>;<p2>;...;<p12>;v";  
30  
Chapter 2. ANSI Emulation  
GEK-00029B  
 
Font Handling and Enhancements  
ESC [ p1; p2 SP B  
GSM (Graphic Size Modification):  
This sequence modifies the  
vertical <p1> and horizontal <p2> size of expanded and oversize  
characters. When using expanded characters, the currently selected  
font style is used. Oversize uses its own distinct font style.  
Parameter values are percentages of the normal size character, so  
values over 100 are needed for expansion. Expansion factors are  
obtained by dividing values by 100.  
Example: A parameter value of 526 would be divided by 100 to  
produce an expansion factor of 5 (5X expansion). Values less than  
100 are treated as 1X expansion.  
X1:  
X2:  
X3:  
X4:  
X5:  
X6:  
X7:  
X8:  
0-199 (Default)  
200-299  
300-399  
400-499  
500-599  
600-699  
700-799  
800-UP  
Mixed sizes within a line can be top or bottom justified depending on  
the Program Mode menu option (see VExOpt:Default and  
VExOpt: Baseline).  
The top of an expanded character is used as the starting point for  
vertical paper movement (line feed). The top or bottom of oversize  
characters can be used depending on the state of menu option  
SETUP | FORMAT | MODIFY FORMAT |GENPRTOPTS |  
GROUP 2 |Strap 13.  
When this sequence is received with a value of 200 or more,  
expanded printing starts if the printer is in the text mode (not bar  
codes, oversize, etc.  
Examples:  
ESC [ ; 200 B  
ESC [ 200 ; 200 B  
ESC [ 800 ; 400 B  
X1 Vertical  
X2 Vertical  
X8 Vertical  
X2 Horizontal  
X2 Horizontal  
X4 Horizontal  
During vertically expanded printing, blank lines (lines with no printed  
characters) are not expanded from the current lpi setting.  
Decimal:  
Hex:  
BASIC:  
27 91 p1 59 p2 32 66  
1B 5B p1 3B p2 20 42  
CHR$(27);"[<p1>;<p2>B";  
31  
GEK-00029B  
5000 Series Programmer’s Manual  
 
ESC [ p1 ; p2 SP G SPI (Spacing Increment):  
This sequence is used to set line spacing  
(p1) and character spacing or pitch (p2). If the parameter is missing  
or zero, the spacing remains unchanged. In the native mode, p1 can  
range from 1 to 17,820 decipoints (24 inches). The printable area  
(between the top and bottom margin) can not be exceeded. The range  
of p2 is dependent on the font and will be ignored if exceeded.  
Examples of Spacing Values  
LPI Spacing  
p1  
CPI Spacing  
p2  
LPI  
3
4
6
8
(decipoints)  
CPI  
10  
12  
13.3  
15  
16.7  
(decipoints)  
240  
180  
120  
90  
72  
60  
54  
42  
36  
Decimal:  
Hex:  
BASIC:  
27 91 p1 59 p2 32 71  
1B 5B p1 3B p2 20 47  
CHR$(27);"[<p1>;<p2>G";  
ESC [ p1 ; pn... m  
SGR (Select Graphic Rendition):  
Selects font style and  
enhancements (bold and underline). One font designator plus any  
number of enhancements can be entered in the escape sequence  
using the parameter values in the following table. If the requested  
font is not installed, the default font is selected.  
Parameter  
Enhancement  
0
1
4
Cancel all print enhancements  
Bold (enhancement)  
Underline (enhancement)  
Double Wide  
5
21  
22  
24  
25  
26  
Underline  
Cancel Bold  
Cancel Underline  
Cancel Expanded  
Cancel Proportional  
Parameter  
Font  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
Default Font - Data Processing  
Gothic Draft Font  
Character Graphics  
Gothic NLQ Font  
Courier NLQ Font  
High Speed Draft Font  
OCR-A  
OCR-B  
Italic NLQ Font or Download A*  
Correspondence or Download B*  
32  
Chapter 2. ANSI Emulation  
GEK-00029B  
 
ESC [ p1 ; p ... m  
(continued)  
*A download font (if loaded) overrides any other font. See Character  
Map Load on page 23.  
Examples:  
For Gothic NLQ font underlined send:  
ESC [ 4 ; 13 m  
To cancel underlining and retain Gothic NLQ - send one of the  
following:  
ESC [ ; 13 m  
ESC [ 0 ; 13 m  
ESC [ 0 m  
ESC [ 24m  
Decimal:  
Hex:  
BASIC:  
27 91 <p1> ; <pn> m  
1B 5B <p1> 3B ... <pn> 6D  
CHR$(27);"[<p1>;...<pn> m";  
33  
GEK-00029B  
5000 Series Programmer’s Manual  
 
ESC [ p1; ... pn h  
SM (Set Mode):  
Sets the mode or modes specified by the parameters  
listed below. Parameters preceded by the 'greater than' sign are  
privately defined modes and should be sent separately.  
Parameter  
Number  
20  
Mode  
Mnemonic  
LNM  
Mode Function  
Line Feed New Line Mode  
LNM - Line Feed New Line Mode  
. When using this mode, a received  
line feed command causes a carriage return (new line). When LNM is  
reset, a line feed command only causes a vertical position movement.  
The following parameters are privately defined modes.  
Parameter  
Number  
Mode  
Mnemonic  
GENPRM  
GENC1C  
GENCS2  
Mode Function  
>1  
>2  
>5  
Proportional Print Mode  
C1 Control Code Mode  
Character Set 2 Mode  
GENPRM (Proportional Print Mode):  
Enables proportional printing.  
This mode does not apply to the oversize character feature. When  
reset (default), characters are spaced at the current cpi.  
GENC1C (C1 Control Code Mode - PC Set 1):  
When set, it allows  
the use of C1 control codes. When reset, 80H - 9FH are ignored. See  
Appendix E for an explanation of how character sets are mapped. The  
default state is set using ANSI emulation option 6 (see Appendix D,  
ANSI (4800) or ANSI (4410) Tables).  
GENSC2 (Character Set 2 Mode - PC Set 2):  
Selects character set 2  
of any of the 8-bit international character sets. See PC Set 2 in  
Appendix H for an explanation of how character sets are mapped. The  
default state is set using option strap 7 in the ANSI emulation  
options (see Appendix D, ANSI (4800) or ANSI (4410) Tables).  
EXAMPLE: To print proportional, send ESC [ > 1 h.  
Decimal:  
Hex:  
BASIC:  
27 91 62 49 104  
1B 5B 3E 31 68  
CHR$(27);"[>1h";  
ESC [ p1 ... pn l  
RM (Reset Mode):  
Resets any modes turned on by the Set Mode  
command above. Parameters and syntax are the same.  
34  
Chapter 2. ANSI Emulation  
GEK-00029B  
 
ESC ] 5  
BFL (Begin Font Load):  
This sequence is not honored when self-test  
determines that the download font option is not installed. Permits  
downloading of customer-defined font characters into printer  
nonvolatile memory from the host. Loading is terminated when an  
ESC \ sequence is received.  
Decimal:  
Hex:  
27 93 53  
1B 5D 35  
BASIC:  
CHR$(27);"]5";  
ESC [ p1 SP }  
GENDFC (Download Font Control):  
Using the serial interface, this  
command allows the host to see if at least one valid font is loaded  
(p1=2). The printer sends DCS 30H 30H ST if a font is loaded,  
DCS 44H 45H ST if no font is loaded. It also provides the capability to  
erase the download font area (p1=1).  
Decimal:  
Hex:  
BASIC:  
27 91 <p1> 32 125  
1B 5B <p1> 20 7D  
CHR$(27);"[<p1>}";  
35  
GEK-00029B  
5000 Series Programmer’s Manual  
 
GRAPHICS  
The ANSI emulation graphics mode provides both horizontal and  
vertical dot plotting methods. These methods enable the printing of  
ASCII characters in their binary code form. Since each character has  
a unique pattern of 1s and 0s (dots and voids) that make up its  
binary code, the correct placement of these binary forms enables you  
to form larger images on the paper.  
For clarity in the text, a binary 1 (a printed dot) is shown as an X and  
a binary 0 (empty dot position) will be shown as a 0.  
Six-Bit Graphics  
In the graphics mode, only the low order six bits of a character are  
used (bits 1-6). Looking at an ASCII code chart, the question mark  
(?)  
character  
is represented by the binary number 1111110 (bit 1 -  
bit 7). Since only the first 6 bits are used. a "?" prints six dots on the  
paper. An asterisk "*" is represented by 010101 which prints the  
following:  
Horizontal Graphics  
Vertical Graphics  
0
X
0
X
0
X
0X0X0X  
Notice that in horizontal graphics the character is printed on a single  
horizontal dot row. In vertical graphics, the character is printed six  
dots high, one character per dot column.  
Using the question mark that prints all dots, a series of these  
characters in horizontal graphics produces a one-dot-high solid line  
across the paper. The same character in vertical graphics produces a  
six-dot high band across the paper.  
By repeating, omitting and mixing characters across a page, images  
such as graphs, charts, and pictures can be produced.  
Dot Patterns and Densities  
The chart on the next page shows the dot patterns for each of the  
ASCII characters. Each character represents six dots or dot positions,  
and their spacing is dependent on the density selected. At 60 dpi  
density, the dots are spaced 1/60 inch apart. At 120 dpi, each  
character represents six dots spaced 1/120 inch apart.  
36  
Chapter 2. ANSI Emulation  
GEK-00029B  
 
This chart shows the dot patterns for the ASCII characters needed to  
cover all dot/void combinations. Other valid characters (although  
they are repeat patterns of the characters in the chart) are 20H-3FH.  
Character  
Value  
Dots  
Character  
Value  
Dots  
000000  
X00000  
0X0000  
XX0000  
00X000  
X0X000  
0XX000  
XXX000  
000X00  
X00X00  
0X0X00  
XX0X00  
00XX00  
X0XX00  
0XXX00  
XXXX00  
0000X0  
X000X0  
0X00X0  
XX00X0  
00X0X0  
X0X0X0  
0XX0X0  
XXX0X0  
000XX0  
X00XX0  
0X0XX0  
XX0XX0  
00XXX0  
X0XXX0  
0XXXX0  
XXXXX0  
00000X  
X0000X  
0X000X  
XX000X  
00X00X  
X0X00X  
0XX00X  
XXX00X  
000X0X  
X00X0X  
0X0X0X  
XX0X0X  
00XX0X  
X0XX0X  
0XXX0X  
XXXX0X  
0000XX  
X000XX  
0X00XX  
XX00XX  
00X0XX  
X0X0XX  
0XX0XX  
XXX0XX  
000XXX  
X00XXX  
0X0XXX  
XX0XXX  
00XXXX  
X0XXXX  
0XXXXX  
XXXXXX  
@
A
B
C
D
E
F
G
H
I
40H  
41H  
42H  
43H  
44H  
45H  
46H  
47H  
48H  
49H  
4AH  
4BH  
4CH  
4DH  
4EH  
4FH  
50H  
51H  
52H  
53H  
54H  
55H  
56H  
57H  
58H  
59H  
5AH  
5BH  
5CH  
5DH  
5EH  
5FH  
a
b
c
d
e
f
60H  
61H  
62H  
63H  
64H  
65H  
66H  
67H  
68H  
69H  
6AH  
6BH  
6CH  
6DH  
6EH  
6FH  
70H  
71H  
72H  
73H  
74H  
75H  
76H  
77H  
78H  
79H  
7AH  
7BH  
7CH  
7DH  
7EH  
7FH  
g
h
i
J
j
K
L
k
l
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
[
m
n
o
p
q
r
s
t
u
v
w
x
y
z
{
\
|
}
]
^
~
?
_
Legend:  
X=dot 0=no dot (void)  
37  
GEK-00029B  
5000 Series Programmer’s Manual  
 
Horizontal Format  
Graphics data printed in horizontal format is comprised of a stream  
of bytes from left to right across each dot row.  
This chart shows that byte 1 (or character 1) in row 1 prints its six  
bits from left to right in a single dot row. The next byte (byte 2) prints  
its six bits, representing a character, in the same dot row across the  
page.  
Byte!  
Byte 1  
Byte 2  
Byte n  
Row "  
1
2
3
.
.
6
1 2 3 4 5 6 1 2 3 4 5 6 …1 2 3 4 5 6  
1 2 3 4 5 6 1 2 3 4 5 6 …1 2 3 4 5 6  
1 2 3 4 5 6 1 2 3 4 5 6 …1 2 3 4 5 6  
. . . . . . . . . . . . …. . . . . .  
. . . . . . . . . . . . …. . . . . .  
1 2 3 4 5 6 1 2 3 4 5 6 …1 2 3 4 5 6  
Vertical Format  
In vertical format, each byte (or character) occupies six dot rows of  
one column. Each character is one dot wide and six dots high. The  
next character (byte 2) is printed beside the first, moving from left to  
right across the page.  
Byte!  
Row  
1
bit  
1
2
3
4
5
6
2
bit  
1
2
3
4
5
6
3
bit  
1
2
3
4
5
6
…n  
…bit  
…1  
…2  
…3  
…4  
…5  
…6  
1
2
3
4
5
6
38  
Chapter 2. ANSI Emulation  
GEK-00029B  
 
Eight-Bit Graphics  
Horizontal Format  
Graphics data printed in horizontal format is comprised of a stream  
of bytes from left to right across each dot row.  
This chart shows that byte 1 (or character 1) in row 1 prints its eight  
bits from left to right in a single dot row. The next byte (byte 2) prints  
its eight bits, representing a character, in the same dot row across  
the page.  
Byte!  
Byte 1  
Byte 2  
Byte n  
Row "  
1
2
3
.
.
8
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 …1 2 3 4 5 6 7 8  
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 …1 2 3 4 5 6 7 8  
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 …1 2 3 4 5 6 7 8  
. . . . . .  
. . . . . .  
. . . . . .  
. . . . . .  
…. . . . . .  
…. . . . . .  
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 …1 2 3 4 5 6 7 8  
Vertical Format  
In vertical format, each byte (or character) occupies six dot rows of  
one column. Each character is one dot wide and six dots high. The  
next character (byte 2) is printed beside the first, moving from left to  
right across the page.  
Byte!  
Row  
1
bit  
1
2
3
4
5
6
7
2
bit  
1
2
3
4
5
6
7
3
bit  
1
2
3
4
5
6
7
…n  
…bit  
…1  
…2  
…3  
…4  
…5  
…6  
...7  
...8  
1
2
3
4
5
6
7
8
8
8
8
39  
GEK-00029B  
5000 Series Programmer’s Manual  
 
Other Graphics Considerations  
In horizontal format, an LF causes the paper to advance one or two  
dot rows based on the vertical dot density, regardless of whether 6-bit  
or 8-bit graphics has been selected.  
In vertical format, the paper is advanced as the dot rows (6 or 8,  
depending on graphics mode) are printed.  
Graphics Sequences  
ESC P  
DCS (Device Control String):  
Enters dot graphics mode at the  
density and format previously selected by the  
ESC [ <p1> ;<p2> ; <p3> q sequence. Following this sequence, the  
printer prints discrete dots and leaves spaces based on the 1s and 0s  
in the low order six bits of each byte received. forming graphic dot  
rows from left to right. To exit from dot graphics mode, use ESC \.  
While in graphics mode (after ESC P and before the ESC \ sequence),  
8-bit graphics can be printed instead of 6-bit by using one of the  
following sequences:  
ESC " 1 n1 <data bytes>  
ESC " 2 n1 <data bytes>  
ESC " 3 n1 <data bytes>  
60 dpi horizontal  
120 dpi horizontal  
Uses current horizontal and vertical  
density.  
n1  
number of data bytes to follow  
<data bytes> n1 bytes of graphics data  
When the number of bytes of 8-bit data specified by n1 have been  
processed, and prior to receiving an ESC \ sequence, the data will  
print as 6-bit graphics.  
Decimal:  
Hex:  
27 91 80  
1B 5B 50  
BASIC:  
CHR$(27);"P";  
ESC [ p1 b  
REP (Repeat Text or Dot Graphics Character):  
Repeats the single  
preceding character p1 times. If p1 is 0 or unspecified, it is set to 1.  
The maximum value for p1 is 32,767.  
Decimal:  
Hex:  
BASIC:  
27 91 <p1> 98  
1B 5B <p1> 62  
CHR$(27);"[<p1>b";  
40  
Chapter 2. ANSI Emulation  
GEK-00029B  
 
ESC [ p1 ; p2 ; p3 q GENGRM – Select Graphics Mode:  
Selects the graphics mode,  
format, and horizontal or vertical density for dot graphics.  
IMPORTANT  
This sequence must be sent before entering the graphics mode  
with ESC P.  
The first parameter selects the graphics mode: the second parameter  
selects the vertical spacing, and the third selects the horizontal dot  
spacing.  
p1  
value Selects Graphics Format  
null  
0
1
2
3
Reserved: Vertical format 60h x 72v if no <p2> or <p3>  
Reserved: Vertical format 60h x 72v if no <p2> or <p3>  
Reserved: Vertical format 120h x 72v if no <p2> or <p3>  
Reserved: Vertical format 120h x 144v if no <p2> or <p3>  
Reserved: Sequence ignored  
4
5
6+  
Horizontal format 60h x 72v if no <p2> or <p3>  
Similar to 4, above, if <p3> = 5, 6, or 7, else ignore  
Reserved: Sequence ignored  
Note: <p2> and <p3> are ignored in this mode.  
p2  
null  
0-6  
7+  
Selects Vertical Density  
72dpiv (p1=4 only)  
144dpiv  
72dpiv  
p3  
null  
0-3  
4
Selects Horizontal Density  
60dpih (p1=4 only)  
Reserved: Leave current value unchanged  
Reserved: Leave current value unchanged  
Reserved: 120dpih  
5
6-7  
8-10  
11+  
120dpih  
Reserved: 60dpih  
60dpih  
Decimal:  
Hex:  
BASIC:  
27 91 <p1> <p2> <p3> 112  
1B 5B <p1> <p2> <p3> 70  
CHR$(27);"[<pl><p2><p3>q";  
41  
GEK-00029B  
5000 Series Programmer’s Manual  
 
ELECTRONIC VERTICAL FORMAT UNIT - EVFU  
Downline vertical tab loading is accomplished through the EVFU. The  
EVFU allows loading a form table with a minimum form length of  
.33 inches (240 decipoints) and a maximum length of 24 inches  
(17,280 decipoints).  
Since the maximum length is 24 inches, the number of lines is  
dependent on the lpi setting. 3 lpi = 72 lines. 4 lpi = 96 lines.  
6 lpi = 144 lines, and 8 lpi = 192 lines. Exceeding the maximum  
causes a fault.  
Downloading the EVFU  
The vertical format type must be set to VtType:Emul VFU through  
the control panel using the Program Mode.  
No paper instruction lead (PI) is required.  
When the printer has an EVFU table loaded, VFU is displayed on  
the control panel.  
ESC ] !  
Start EVFU table loading sequence  
. Each line of the form requires  
an entry. Dummy values (filler codes - See Table of Channel Codes on  
page 5-30) are required in lines with no channel. Two bytes are  
required for each line of the form. Loading Is terminated by the ESC \  
sequence.  
Decimal:  
Hex:  
27 93 33  
1B 5D 21  
BASIC:  
CHR$(27);"]!";  
Loading the Table  
The first table location is normally loaded with the channel 1 code.  
This is defined as the top-of-form (TOF) channel. The table may be  
left without channel 1, and a command to skip to channel 1 will  
cause a normal form feed as though there were no VFU. Two bytes  
are loaded for each line of the form to be controlled. One or more  
channel numbers may be indicated in the two-byte code.  
The format of two-byte channel control code is:  
Bit Number  
Channel Number  
First Byte  
8
x
x
7
one  
one  
6
6
y
5
5
y
4
4
y
3
3
y
2
2
y
1
1
y
Bit Number  
Channel Number  
Second Byte  
8
x
x
7
one  
one  
6
12  
y
5
11  
y
4
10  
y
3
9
y
2
8
y
1
7
y
y:  
x:  
0 = no stop in channel  
1 = stop in channel  
bit has no meaning  
42  
Chapter 2. ANSI Emulation  
GEK-00029B  
 
NOTE  
To make characters acceptable, bit 7 must be set.  
Each "channel control code" pair of bytes has the capability to  
indicate multiple channels since each channel indication has a  
unique bit position, which is either ON=1 or OFF=0.  
TABLE OF CHANNEL CODES  
Decimal  
Value  
Binary  
Value  
ASCII  
Character  
1
2
1
2
1
@
A
B
D
H
P
`
@
@
@
@
@
@
2
@
@
@
@
@
@
@
A
B
D
H
P
`
Remarks  
Fillers: see Note  
Channel 1  
64  
65  
66  
68  
72  
80  
96  
64  
64  
64  
64  
64  
64  
64  
64  
64  
64  
64  
64  
64  
65  
66  
68  
72  
80  
96  
1000000  
1000001  
1000010  
1000100  
1001000  
1010000  
1100000