Genicom GEK 00031B User Manual

GEnicom
5000 Series
Programmer’s Manual
GEK – 00031B

Table of Contents Page

Chapter 1.Introduction....................................................................8
Control Codes......................................................................................8
Escape Sequences ...............................................................................8
CSI and OSC .......................................................................................9
Line Terminators ...............................................................................10
Decipoints .........................................................................................10
SCS Smart Graphics Capabilities.......................................................10
Chapter 2. ANSI Emulation............................................................ 11
Control Code and Escape Sequence Activity Levels.............................11
Notes............................................................................................11
Control Code Activity Levels ............................................................12
Escape Sequence Activity Levels......................................................13
Control Code Definitions....................................................................14
Escape Sequence Directory................................................................16
ANSI ESCAPE SEQUENCE CATEGORIES ..........................................18
Housekeeping Sequences ................................................................19
Character Set Selection...................................................................22
Character Map Load........................................................................23
Paper and Print Position Movements ...............................................25
Margins and Tabs ...........................................................................28
Font Handling and Enhancements ..................................................31
Graphics............................................................................................36
Six-Bit Graphics .............................................................................36
Dot Patterns and Densities..............................................................36
Horizontal Format ........................................................................38
Vertical Format ............................................................................38
Eight-Bit Graphics ..........................................................................39
Horizontal Format ........................................................................39
Vertical Format ............................................................................39
Other Graphics Considerations.....................................................40
Graphics Sequences........................................................................40
Electronic Vertical Format Unit - EVFU..............................................42
Downloading the EVFU ...................................................................42
Loading the Table............................................................................42
BASIC Programming Example for EVFU Table Loading .................43
EVFU Default..................................................................................44
Skip to Channel Command .............................................................44
BASIC Programming Example for Skip to Channel........................45
Bar codes ..........................................................................................46
Entering and Exiting Bar Codes ......................................................46
5000 Programmer’s Manual GEK-00029B
2
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
GEK-00029B Table of Contents
3
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
5000 Programmer’s Manual GEK-00029B
4
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
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
GEK-00029B Table of Contents
5
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
5000 Programmer’s Manual GEK-00029B
6
Table of Contents Page
Chapter 8.PPL3 Plus Emulation (Continued)
Printable Area............................................................................ 253
Positioning and Movement............................................................ 253
Horizontal Advance Increments .................................................... 254
Fixed HAI................................................................................... 254
SIXEL GRAPHICS ........................................................................... 256
Terminology and Concepts............................................................ 256
General Sixel Graphics Operation................................................. 257
Sixel Graphics Commands............................................................ 258
Appendix A. Using the Hex Dump................................................ 261
Appendix B. Font Print Samples.................................................. 262
Appendix C. Postnet Bar codes.................................................... 265
Entering and Exiting POSTNET Bar Codes ...................................... 265
Selecting POSTNET Style Bar Codes ............................................. 265
Appendix D. Description of Strapping Options ............................ 268
General Printer Options Definitions................................................. 269
Legacy Parallel Software Strap Definitions....................................... 270
Emulation Option descriptions........................................................ 271
Appendix E. DSC Code Charts ........................................................ 275
Index .......................................................................................... 310
GEK-00029B Table of Contents
7

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.
Chapter 1. Introduction GEK-00029B
8
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: <ESC> [ <p1> g (assume p1=16) Decimal: 27 91 16 103 Hex: 1B 5B 10 67 BASIC: CHR$(27);"[16g"
Horizontal Tabs Set
Mnemonic: <ESC> [ <p1> ; <p2>... u (assume p1=648,
p2=1386, p3=2808) Decimal: 27 91 648 59 1386 59 2808 117 Hex: 1B 5B 288 3B 56A 3B 0AF8 75 BASIC: CHR$(27);"[648;1386;2808u"

CSI AND OSC

Expand Characters
Mnemonic: <ESC> [ <p1> ; <p2> SP B (assume p1=200
and p2=200) Decimal: 27 91 200 59 200 32 66 Hex: 1B 5B C8 3B C8 20 42 BASIC: CHR$(27);"[200;200 B"
A control sequence introducer <CSI> signals the beginning of an ANSI sequence using the <ESC> code and the left bracket ([). <CSI> (9B hex) can be used instead of <ESC> [ (1B 5B hex) when the printer is receiving and processing 8-bit data. <ESC> [ will be used predominately in this manual for the examples.
An operating system command (OSC) signals the start of a download sequence using the <ESC> code and the right bracket (]). <OSC> (9D hex) can be use instead of <ESC> ] (1B 5D hex) when the printer is receiving and processing 8 bit data. <ESC> ] will be used predominately in this manual for the examples.
GEK-00029B 5000 Series Programmer’s Manual
9

LINE TERMINATORS

Some control codes and escape sequences act as line terminators. Line terminators cause all data received since the last terminator to be printed. Without a terminator, data will remain buffered.

DECIPOINTS

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

SCS SMART GRAPHICS CAPABILITIES

The 5000 series printers have SCS smart graphics processing as a standard feature that can be enabled via the CCU control panel menus. The graphics emulations include both IGP and QMS Code V version 2. There are separate programming manuals for each of these graphics language emulations.
The graphics printing emulations provide capabilities for such things as:
▪ Barcoding (including POSTNET codes)
▪ Rotated text
▪ Downloading of and host-controlled selection of predefined forms
▪ Loading of data into predefined forms
▪ Dynamic alphanumeric data
Chapter 1. Introduction GEK-00029B
10

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.
D
–DATA These control codes are used as data.
Notes
Note 1
Note 2
Note 3
Note 4
When printer option 1 is active, either in ANSI (4800) or ANSI (4410) emulation, <SO> and <SI> activate or deactivate this printing mode. <SO> and <SI> are VALID in bar codes and oversize print mode. They are ACTIVE in expanded print mode. Please see Appendix D, Description of Strapping options, ANSI (4800) or ANSI (4410) tables on page 271 for details on options which affect printer operation in ANSI emulation.
VALID during enhanced oversize, ACTIVE during normal oversize.
Discarded while in the native mode. Causes an error symbol to print (XOX).
GEK-00029B 5000 Series Programmer’s Manual
11

Control Code Activity Levels

Control
Code
BEL No A A D A Note 4
BS Yes A I I I Note 4
CR Yes A A I A Note 4 DC1 No A A D A Note 4 DC3 No A A D A Note 4 DEL No Note 3 Note 3 D Note 3 Note 4
FF Yes A A I A Note 4
HTNo AAAA A
LF Yes A A I A Note 4
SI No A I Note 1 Note 1 Note 4 SO No A I Note 1 Note 1 Note 4 VT Yes A A I A Note 4
Line
Terminator
Control Code Activity Levels
Normal
Dot
Graphics
Bar
Codes
Oversize POSTNET
Chapter 2. ANSI Emulation GEK-00029B
12

Escape Sequence Activity Levels

Escape Sequence
DCS (Graphics) No A I I A I Font Load No A I I A I GENBCS No A A A A I GENFD No A AAA I GENGRM No A V A A I GENHTS No A A A A I GENOSM No A V V A I GENSLR No A A A A I GENSNC No A V V Note 2 I GENSPM No A V A A A GENTST Yes A A I A I GENVFU Yes A AAA I DENVTS No A A A A I GSM No A V V A I HPA Yes A AAA I HPB Yes A AAA I HPR No A AAA I HTS No A AAA I HVP Yes A AAA I PLD Yes A I I A I PLU Yes A I I A I REP No A A I A I RIS No A AAA I RM No A AAA I SGR No A V V Note 2 I SM No A AAA I SPI No A V V Note 2 I ST No I A I I I TBC No A AAA I VFU Load No A I I A I VPA Yes A AAA I VPB Yes A AAA I VPR Yes A AAA I VTS No A AAA I
Line
Terminator
Normal
Dot
Graphics
Bar
Codes
Oversize POSTNET
GEK-00029B 5000 Series Programmer’s Manual
13

CONTROL CODE DEFINITIONS

BEL Bell (07H):
approximately 1/2 second after any preceding printable data has
been processed.
BS Back Space (08H):
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):
to the left margin, and the paper position is left unchanged.
CSI Control Sequence Introducer (9BH):
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):
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.
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.
Receipt of a BEL code causes the beeper to sound for
Line terminator. The paper position remains
Line terminator. The print position is reset
Parallel and Serial Interface: Receipt of a
NOTE
Signals the beginning of an
DC3 Device Control 3 (13H):
DC3 code when online places the printer in local mode (deselects
printer) and causes it to ignore all data except a <DC1>.
Through menu options, a serial interface protocol may be
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):
CSI above.
Signals the beginning of an escape sequence. See also
Parallel and Serial Interface: Receipt of a
selected that
Chapter 2. ANSI Emulation GEK-00029B
14
FF Form Feed (0CH):
top-of-form position. When the EVFU is enabled and programmed, paper will advance to the next stop in channel 1.
An option strap from the CCU Control Panel Menu using the SETUP/FORMAT/MODIFY FORMAT/GENPRTOPTS selection can disable this feature.
Line terminator. The paper is advanced to the
NOTE
next
HT Horizontal Tab (09H):
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.
LF Line Feed (0AH):
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 Shift Out (0EH):
Used to enable a special print mode (GENSPM)
ANSI emulation strap (Appendix G, tables 5 and 6) 1 is inactive.
VT Vertical Tab (0BH):
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.)
Advances the print position to the next
next
when
the
GEK-00029B 5000 Series Programmer’s Manual
15

ESCAPE SEQUENCE DIRECTORY

Sequence Meaning Page
CSI or ESC [ Control Sequence Introducer 19
CSI p1 p2 SP ~ GENEMU: Selects emulation 21
ESC [p1 ; p2 SP B GSM: Modifies vertical (p1) and horizontal (p2)
character size
ESC [p1 ; p2 SP G SPI: Sets lpi (p1) and/or cpi (p2) in decipoints 32
ESC H HTS: Sets a tab at current print position 30
ESC J VTS: Sets a tab at current paper position 28
ESC K PLD: Moves print line down 3/72 inch (subscript) 25
ESC L PLU: Moves print line up 3/72 inch (superscript) 42
ESC P DCS: Introduces dot graphics 40
ESC Q Self-Test: Inactive. Sequence ignored.
ESC [ p1 a HPR: Moves print position right p1 distance (relative) 25
ESC [ p1 b REP: Dot graphics: repeat preceding character p1
times
ESC c RIS: Resets printer to a known initial state 35
ESC [ p1 d VPA: Sets vertical position to p1 decipoints or lines 26
ESC [ pl e VPR: Moves paper forward p1 decipoints 26
ESC [ p1; p2 f HVP: Moves paper and print position (absolute) 26
ESC [ p1 g TBC: Clears tabs: p1=3 for horizontal 28
31
40
ESC [ p1 ; ...; pn h SM: Set mode (PUM, LNM, proportional, character
mapping)
ESC [ p1 j HPB: Moves print position left by decipoints or
columns
ESC [ p1 k VPB: Moves paper backward by decipoints or lines 27
ESC [ p1 l RM: Reset mode (PUM, LNM, proportional, character
mapping)
ESC [ p1; ... pn m SGR: Selects font styles and enhancements 32
ESC [ p1 p2 ! p GENVF2: EVFU vertical paper movement command 44
ESC [ p1 ; p2 ; p3 q GENGRM: Selects graphics horizontal and vertical dot
densities
ESC [ p1; p2 ; p3 r GENFD: Sets form length (pl), margins: top (p2),
bottom (p3)
ESC [ p1; p2 s GENSLR: Sets margins: left (p1), right (p2) in
decipoints
ESC [ p1 t Selects bar codes p1=3, quit bar code p1=0 46
Chapter 2. ANSI Emulation GEK-00029B
16
34
26
32
41
28
29
Sequence Meaning Page
ESC [ p1;… pn u GENHTS: Sets horizontal tabs (p1, etc.) in decipoints
30
or columns
ESC [ p1 ;… p12;v GENVTS: Sets vertical tabs (p1, etc.) in decipoints or
30
lines
ESC [ p1 x GENSNC: Selects international character sets 22
ESC [ p1 ; ...;p10 } Selects bar code parameters
ESC [ p1 SP } GENDFC: Download Font Control: Checks printer for
35
downloaded font
OSC or ESC ] Operating System Command: introduces sequence 19
ESC ] 5 BFL (Begin Font Load): Valid only if download option
35
is installed.
ESC ] ! Begins 12-channel EVFU table loading 42
ESC \ ST: String Terminator. Exits special modes 19
ESC [ p1 ` HPA: Horizontal Position Absolute 27
OSC 9 ; p1 ; ... ; p8-pn
Character Map Load 23
ST
GEK-00029B 5000 Series Programmer’s Manual
17

ANSI ESCAPE SEQUENCE CATEGORIES

The ANSI escape sequences have been separated according to
functionality. Special areas of interest, such as graphics and the
electronic vertical format unit (EVFU), have been described in
separate sections. The functional groups are:
▪ Housekeeping
▪ Paper and Print Positioning
▪ Margins and Tabs
▪ Font Handling and Enhancements
▪ Graphics
▪ EVFU
Chapter 2. ANSI Emulation GEK-00029B
18

Housekeeping Sequences

ESC [ CSI (Control Sequence Introducer):
sequences, that generally have multiple parameters.
ESC ] OSC (Operating System Command):
sequence introducer. Sequences which begin with OSC require the ST string terminator sequence (ESC \) to end them.
ESC \ ST (String Terminator):
Terminates the loading of EVFU tables,
download fonts, and dot graphics strings.
ESC c 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 10 cpi Country Selection USA Code Page 437 Line Spacing 6 lpi Partial Line Up Reset Partial Line Down Reset Bold Print Inactive Underline Mode Inactive Expanded Mode Inactive Proportional Mode Reset Horizontal Tab Table Empty Left Margin None - Column 0 Right Margin None - Maximum Form Number 7 Page Size 7920 decipoints/ 66 lines/11 inches Top Margin None Bottom Margin None Forms Position Top of form - current position Vertical Tab Table Empty Vertical Format Unit Default Graphics Density 60 H dpi, 72 V dpi, horizontal format VFU Load In Progress Exit (nothing saved) Bar Code Mode Inactive Dot Graphics Inactive
This sequence is used to begin
This is another special
Decimal 27 99: Hex: 1B 63 BASIC: CHR$(27);"c";
GEK-00029B 5000 Series Programmer’s Manual
19
ESC Q GENTST (Self-Test):
Decimal: 27 102 or 120 Hex: 1B 5C or 9C BASIC: CHR$(27);"Q";
This sequence is ignored.
Chapter 2. ANSI Emulation GEK-00029B
20
CSI p1 p2 SP ~ GENEMU (Emulation Control):
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 Manufacturer Emulation
0GENICOM ANSI
10 GENICOM 4410 ANSI
1-19 GENICOM Reserved
20 IBM Graphics Printer 21 IBM Proprinter XL 9-wire 22 Epson FX286-e 23 IBM Proprinter XL 24-wire 24 Epson LQ2500 30 Data Products ANSI 40 Printronix P300 41 Printronix P5008
Switches the control of the printer to
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: <CSI> <p1> <p2> <SP> ~ Decimal: 27 91 <p1> <p2> 32 126 Hex: 1B 5B <p1> <p2> 20 7E BASIC: CHR$(27);"<p1><p2><SP>~";
GEK-00029B 5000 Series Programmer’s Manual
21

Character Set Selection

ESC [ p1 x GENSNC (Select National Characters):
national character substitution if the currently selected character style supports it. The following values may be used for p1.
p1 Country Map or Character Set
0 USA (ISO) 1 German (ISO) 2 French A (ISO) 3 French B 4 French Canadian 5 Dutch (Netherlands) 6 Italian 7 United Kingdom (ISO) 8Spanish
9 Danish/Norwegian A 10 Danish/Norwegian B 11 Danish/Norwegian C 12 Danish/Norwegian D 13 Swedish/Finnish A 14 Swedish/Finnish B 15 Swedish/Finnish C 16 Swedish/Finnish D 17 Swiss 18 (Ignored) 19 Yugoslavian 20 United Kingdom A 21 Turkish 22 Greek 23 Italian (ISO) 24 Spanish (ISO)
437 IBM PC USA (MS Code Page 437) 850 IBM PC Multilingual (MS Code Page 850) 852 Microsoft Code Page 852 (East Europe) 853 Microsoft Code Page 853 (Turkey) 855 Microsoft Code Page 855 (Cyrillic) 860 Microsoft Code Page 860 863 Microsoft Code Page 863 (French Canadian) 864 Microsoft Code Page 864 865 Microsoft Code Page 865 866 Microsoft Code Page 866 (Russian)
867 Microsoft Code Page 867 8572 USSR GOST (Russian) 8573 Greek Code Page 437 8574 DEC Multinational (LA-210) 8575 Roman 8 8576 Polish Mazowia 8577 Turkish 8-bit Code Page 8578 Greek Code Page 851 8591 ISO 8859-1 Latin Alphabet #1 8592 ISO 8859-2 Latin Alphabet #2
This sequence selects the
Chapter 2. ANSI Emulation GEK-00029B
22

Character Map Load

p1 Country Map or Character Set
8593 ISO 8859-3 Latin Alphabet #3 8594 ISO 8859-4 Latin Alphabet #4 8595 ISO 8859-5 Latin/Cyrillic 8596 ISO 8859-6 Latin/Arabic 8597 ISO 8859-7 Latin/Greek 8598 ISO 8859-8 Latin/Hebrew 8599 ISO 8859-9 Latin Alphabet #5
OSC 9 ; p1 ; ... ; Character Map Load: p8-pn ST
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>
This sequence signals the beginning of a
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 Reserved. This parameter is marked by inserting a semicolon
(;) in the command sequence.
p4 Reserved. This parameter is marked by inserting a semicolon
(;) in the command sequence.
GEK-00029B 5000 Series Programmer’s Manual
23
p5 Reserved. This parameter is marked by inserting a semicolon
(;) in the command sequence.
p6 A literal string indicating the GENSNC select parameter of an
existing character map (such as 437 or 850) to be used as a base in which substitutions from this command sequence may be made. This string may be up to 10 characters in length and must be specified only if the downloaded character map uses an existing map as a base. The string is terminated by a semi-colon (;). The base character map always defaults to Code Page 437 if an ACT character map is specified and the downloaded character map is a GR table. If the downloaded map is a GL table, p6 must specify an existing GL table as the base or a one-to-one default base is used.
p7 A literal string used to identify the character map in the
Progam Mode Font – Country menu. This string may be up to 20 characters in length and is terminated by a semi-colon (;). Note that only the first 11 characters of this string are used for display purposes.
p8-pn A trio of parameters used to specify the actual character map
substitution. A semicolon must separate each parameter within the trio, and a semicolon must terminate each trio. The semicolon is not required for the last trio that immediately precedes the String Terminator (ESC \).
The elements of each trio are defined as follows: 1 A decimal number that identifies the destination
character. This is the character value received from the host. For example, an upper case "A" has a decimal value of 65. Values of 32 through 126 and 128 through 255 are valid for this element.
The first element processed in the first substitution trio defines whether the map is for GL (7-bit) or GR (8-bit) substitution. If the first element is between 32 and 126 (inclusive), the map is GL, and the first element of each trio must also be between 32 and 126. Likewise, if the first element of the first trio is between 128 and 255, the map is a GR map and all first elements must fall between 128 and 255. The character substitution map is discarded if this rule is violated.
2 A decimal number that identifies the source character.
This is the location value of the desired character pattern in the printer font set. For example, an upper case "A" has a decimal value of 65. Values of 0 through the last available character for the currently selected font are valid for this element.
3 Reserved. A semicolon (;) is required to mark this element
position. A zero is permitted.
Chapter 2. ANSI Emulation GEK-00029B
24

Paper and Print Position Movements

ESC K PLD (Partial 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: 27 75 Hex: 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: 27 76 Hex: 1B 4C BASIC: CHR$(27);"L";
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.
Line terminator. Moves the print line down
NOTE
ESC [ p1 a HPR (Horizontal Position Relative):
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: 27 91 <p1> 97 Hex: 1B 5B <p1> 61 BASIC: CHR$(27);"[<p1>a";
Line terminator. Moves the
GEK-00029B 5000 Series Programmer’s Manual
25
ESC [ p1 d VPA (Vertical Position Absolute):
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: 27 91 <p1> 100 Hex: 1B 5B <p1> 64 BASIC: CHR$(27);"[";CHR$(<p1>);"d";
Line terminator. Sets the vertical
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 Movement In Inches
Missing or 0 – 4 No Movement 5-9 1/144 inch 10-14 2/144 inch 15-19 3/144 inch
17,280 or greater 24 inches
Decimal: 27 91 <p1> 95 Hex: 1B 5B <pl> 65 BASIC: CHR$(27);"[<p1>e";
ESC [ p1 ; p2 f HVP (Horizontal and Vertical Position):
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: 27 91 <p1> 52 96 Hex: 1B 5B <p1> 3B <p2> 66 BASIC: CHR$(27);"[<p1>;<p2>;f";
Line terminator. Sets the
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: 27 91 <p1> 106 Hex: 1B 5B <p1> 6A BASIC: CHR$(27);"[<p1>j";
Chapter 2. ANSI Emulation GEK-00029B
26
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: 27 91 <p1> 107 Hex: 1B 5B <p1> 6B BASIC: CHR$(27);"[<p1>k";
ESC [ p1 ' HPA (Horizontal Position Absolute):
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: 27 91 <p1> 96 Hex: 1B 5B <p1> 60 BASIC: CHR$(27);"[<p1>'";
Line terminator. Moves the
GEK-00029B 5000 Series Programmer’s Manual
27

Margins and Tabs

ESC H HTS (Horizontal Tab Set):
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: 27 72 Hex: 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: 27 74 Hex: 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 Clears horizontal tab at current print position.
p1 = 1 Clears vertical tab at current print position. p1 = 3 Clears all horizontal tabs. p1 = 4 Clears all vertical tabs.
More than one parameter can be used. Example: To clear all horizontal and vertical tabs, send:
Sets a tab at the current print position
<ESC> [ 3 ; 4 g Decimal: 27 91 <p1> 103
Hex: 1B 5B <p1> 67 BASIC: CHR$(27);"[<p1>;"g";
ESC [ p1; p2 ; p3 r GENFD (Forms Definition):
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: 27 91 <p1> <p2> <p3> r Hex: 1B 5B <p1> <p2> <p3> BASIC: CHR$(27);”[<p1>;<p2>;<p3>r";
Establishes the form length <p1>, the
Chapter 2. ANSI Emulation GEK-00029B
28
Sequence Explanation
ESC [ r Default values of 11-inch form length,
zero top and bottom margins.
ESC [ 8280 r 11.5-inch form length, default top and
bottom margins of zero
ESC [ ; 720 r Default length of 11 inches, top margin
of 1-inch.
Default bottom margin of zero.
ESC [ ; ; 720 r Default length of 11 inches, default top
margin of zero, and a 1-inch bottom margin.
ESC [ 7920 ; 360 ; 360 r 11-inch form length, ½-inch top and
bottom margins
Decimal: 27 91 <p1> <p2> <p3> 114 Hex: 1B 5B <p1> <p2> <p3> 72 BASIC: CHR$(27);"[<p1><p2><p3>r";
ESC [ p1; p2 s GENSLR (Set Left/Right Margins):
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: 27 91 <p1> <p2> 115 Hex: 1B 5B <p1> <p2> 73 BASIC: 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.
The p parameters are distances
GEK-00029B 5000 Series Programmer’s Manual
29
ESC [ p1 ; ... p22; u GENHTS (Multiple Horizontal Tab Set):
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: 27 91 <p1> 59 <p2> 59 … <p22> 59 117 Hex: 1B 5B <p1> 3B <p2> 3B ... 3B <p22> 3B 75 BASIC: CHR$(27);"[<p1>;<p2>; ... ;<p22>;u"
Sets up to 22 horizontal
ESC [ p1 ; …; p12 ; v GENVTS (Multiple Vertical Tab Set):
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: 27 91 <p1> 59 <p2> 59 … <p12> 59 118 Hex: 1B 5B <p1> 3B <p2> 3B … <p12> 3B 76 BASIC: CHR$(27);"[<p1>;<p2>;...;<p12>;v";
Sets up to 12 vertical tabs.
Chapter 2. ANSI Emulation GEK-00029B
30
Loading...
+ 284 hidden pages