Appendix E. DSC Code Charts ........................................................ 275
Index .......................................................................................... 310
GEK-00029BTable 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. IntroductionGEK-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 (<>).
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-00029B5000 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. IntroductionGEK-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
-IGNOREDNo noticeable effect on printing will occur.
V
-VALIDThese sequences do not affect the printing mode in
progress, but take effect when normal printing
resumes.
A
–ACTIVEThis sequence takes effect immediately.
D
–DATAThese 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).
DCS (Graphics)NoAIIAI
Font LoadNoAIIAI
GENBCSNoAAAAI
GENFDNo A AAA I
GENGRMNoAVAAI
GENHTSNoAAAAI
GENOSMNoAVVAI
GENSLRNoAAAAI
GENSNCNoAVVNote 2I
GENSPMNoAVAAA
GENTSTYesAAIAI
GENVFUYes A AAA I
DENVTSNoAAAAI
GSMNoAVVAI
HPAYes A AAA I
HPBYes A AAA I
HPRNo A AAA I
HTSNo A AAA I
HVPYes A AAA I
PLDYesAIIAI
PLUYesAIIAI
REPNoAAIAI
RISNo A AAA I
RMNo A AAA I
SGRNoAVVNote 2I
SMNo A AAA I
SPINoAVVNote 2I
STNoIAIII
TBCNo A AAA I
VFU LoadNoAIIAI
VPAYes A AAA I
VPBYes A AAA I
VPRYes A AAA I
VTSNo A AAA I
Line
Terminator
Normal
Dot
Graphics
Bar
Codes
Oversize POSTNET
GEK-00029B5000 Series Programmer’s Manual
13
CONTROL CODE DEFINITIONS
BELBell (07H):
approximately 1/2 second after any preceding printable data has
been processed.
BSBack 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.
CRCarriage Return (0DH):
to the left margin, and the paper position is left unchanged.
CSIControl Sequence Introducer (9BH):
ANSI control sequence. When 8-bit data is used, CSI (9BH) can be
substituted for ESC [ (1BH 5BH). Also see ESC.
DC1Device 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
DC3Device 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.)
ESCEscape (1BH):
CSI above.
Signals the beginning of an escape sequence. See also
Parallel and Serial Interface: Receipt of a
selected that
Chapter 2. ANSI EmulationGEK-00029B
14
FFForm 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
HTHorizontal 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.
LFLine 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.)
SIShift In (0FH):
Used to exit a Special Print Mode (GENSPM) when
ANSI emulation strap 1 (Appendix G, tables 5 and 6) is active.
SOShift Out (0EH):
Used to enable a special print mode (GENSPM)
ANSI emulation strap (Appendix G, tables 5 and 6) 1 is inactive.
VTVertical 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.
ESC [ p1 ;… p12;vGENVTS: Sets vertical tabs (p1, etc.) in decipoints or
30
lines
ESC [ p1 xGENSNC: Selects international character sets22
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 sequence19
ESC ] 5BFL (Begin Font Load): Valid only if download option
35
is installed.
ESC ] !Begins 12-channel EVFU table loading42
ESC \ST: String Terminator. Exits special modes19
ESC [ p1 `HPA: Horizontal Position Absolute27
OSC 9 ; p1 ; ... ; p8-pn
Character Map Load23
ST
GEK-00029B5000 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 EmulationGEK-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 cRIS (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
ParameterState
Font StyleGothic Draft
Character Size1X Vertical, 1X Horizontal
Character Pitch10 cpi
Country SelectionUSA
Code Page437
Line Spacing6 lpi
Partial Line UpReset
Partial Line DownReset
Bold PrintInactive
Underline ModeInactive
Expanded ModeInactive
Proportional ModeReset
Horizontal Tab TableEmpty
Left MarginNone - Column 0
Right MarginNone - Maximum
Form Number7
Page Size7920 decipoints/ 66 lines/11 inches
Top MarginNone
Bottom MarginNone
Forms PositionTop of form - current position
Vertical Tab TableEmpty
Vertical Format UnitDefault
Graphics Density60 H dpi, 72 V dpi, horizontal format
VFU Load In ProgressExit (nothing saved)
Bar Code ModeInactive
Dot GraphicsInactive
This sequence is used to begin
This is another special
Decimal27 99:
Hex:1B 63
BASIC:CHR$(27);"c";
GEK-00029B5000 Series Programmer’s Manual
19
ESC QGENTST (Self-Test):
Decimal:27 102 or 120
Hex:1B 5C or 9C
BASIC:CHR$(27);"Q";
This sequence is ignored.
Chapter 2. ANSI EmulationGEK-00029B
20
CSI p1 p2 SP ~GENEMU (Emulation Control):
another emulation. The parameters in the sequence are defined as
follows:
p1Emulation 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.
p2Reset 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.
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.
national character substitution if the currently selected character
style supports it. The following values may be used for p1.
p1Country Map or Character Set
0USA (ISO)
1German (ISO)
2French A (ISO)
3French B
4French Canadian
5Dutch (Netherlands)
6Italian
7United Kingdom (ISO)
8Spanish
9Danish/Norwegian A
10Danish/Norwegian B
11Danish/Norwegian C
12Danish/Norwegian D
13Swedish/Finnish A
14Swedish/Finnish B
15Swedish/Finnish C
16Swedish/Finnish D
17Swiss
18(Ignored)
19Yugoslavian
20United Kingdom A
21Turkish
22Greek
23Italian (ISO)
24Spanish (ISO)
8593ISO 8859-3 Latin Alphabet #3
8594ISO 8859-4 Latin Alphabet #4
8595ISO 8859-5 Latin/Cyrillic
8596ISO 8859-6 Latin/Arabic
8597ISO 8859-7 Latin/Greek
8598ISO 8859-8 Latin/Hebrew
8599ISO 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
p1Control Command
0
1
Stores new character map
Erases existing character. In this case, parameters p2pn are ignored and need not be supplied. An existing
downloaded character map need not be erased before a
new character map is loaded.
All other values of p1 are reserved.
p2GENSNC (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.
p3Reserved. This parameter is marked by inserting a semicolon
(;) in the command sequence.
p4Reserved. This parameter is marked by inserting a semicolon
(;) in the command sequence.
GEK-00029B5000 Series Programmer’s Manual
23
p5Reserved. This parameter is marked by inserting a semicolon
(;) in the command sequence.
p6A 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.
p7A 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 EmulationGEK-00029B
24
Paper and Print Position Movements
ESC KPLD (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 LPLU (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 aHPR (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.
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.
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 ValueMovement In Inches
Missing or 0 – 4No Movement
5-91/144 inch
10-142/144 inch
15-193/144 inch
ESC [ p1 ; p2 fHVP (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.
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.
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.
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.
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 JVTS (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 gTBC (Tab Clear):
Clears horizontal or vertical tab stops based on the
p1 value as follows:
p1 = 0Clears horizontal tab at current print position.
p1 = 1Clears vertical tab at current print position.
p1 = 3Clears all horizontal tabs.
p1 = 4Clears 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 rGENFD (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
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.
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.
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).
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.