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 will not affect the printing mode in
progress, but
resumes.
A
–ACTIVEThis sequence will take effect immediately.
If printer option 1 is active, either in ANSI (4800) or
ANSI (4410) emulation, SO and SI will activate or
deactivate this printing mode. SO and ST are VALID in
bar codes and oversize-ACTIVE in expanded. Please
see Appendix G, Description of Strapping options,
tables 5 and 6 on page
Error! Bookmark not defined.
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.
Will cause an error symbol to print (XOX).
Control Code Activity Levels
Dot
Graphics
Bar CodesOversizePOSTNET
GEK-?????5000 Series Programmer’s Manual
1
Escape Sequence Activity Levels
Escape
Sequence
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
REP
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
Line
Terminator
NoA
Normal
Dot
Graphics
AIAI
Bar
Codes
Oversize POSTNET
ANSI EmulationGEK-99???
2
CONTROL CODE DEFINITIONS
w
BELBell (07H):
Receipt of a BEL code causes the beeper to sound for
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
at the current CPI. If the print position is at the left margin no action
is taken.
CRCarriage Return (0DH):
Line terminator. The paper position remains
Line terminator. The print position is reset to the
left margin and the paper position is left unchanged.
CSIControl Sequence Introducer (9BH):
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
Parallel and Serial Interface: Receipt of a
(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.
Signals the beginning of an ANSI
DC3(Device Control 3 – 13H):
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.
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.
ESCEscape (1BH):
CSI, above.
Parallel and Serial Interface: Receipt of a DC3 code
selected that
NOTE
Signals the beginning of an escape sequence. See also
GEK-?????5000 Series Programmer’s Manual
3
FFForm Feed (0CH):
top of form position. If 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 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.
NOTE:
SETUP/FORMAT/MODIFY FORMAT/GENPRTOPTS selection can
disable This feature.
SIShift In (0FH):
an option strap from the CCU control panel menu using the
Used to exit a Special Print Mode (GENSPM) when
printer control strap A9 (Appendix G) is set.
SOShift Out (0EH):
Used to enable a special, print mode (GENSPM)
when ANSI emulation strap 1 is reset.
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.
NOTE:
SETUP/FORMAT/MODIFY FORMAT/GENPRTOPTS selection can
disable This feature.
an option strap from the CCU control panel menu using the
ESC [ p1 ; p12 vGENVTS: Sets vertical tabs (p1, etc.) in decipoints or
20
lines
ESC [ p1 xGENSNC: Selects international character sets11
ESC [ p1; ...;p10 }Selects barcode parameters
ESC [ p1 SP }GENDFC: Download Font Control: checks printer for
25
downloaded font
OSC or ESC ]Operating System Command: introduces sequence8
ESC ] 5Not implemented. Sequence ignored.
ESC ] 9Not implemented. Sequence ignored.
ESC ] !Begins 12-channel EVFU table loading32
ESC \ST: String Terminator. Exits special modes8
ESC [ p1 `HPA: Horizontal Position Absolute17
ESC [ p1 |
OSC 9 ; p1 ; ... ; p8-pn
Character Map Load12
ST
ANSI EmulationGEK-99???
6
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
GEK-?????5000 Series Programmer’s Manual
7
Housekeeping Sequences
ESC [CSI (Control Sequence Introducer):
sequences, which 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):
Used to terminate 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 G, tables 5 and 6, option 3).
RIS – Reset to Initial State
ParameterState
Font StyleGothic Draft
Character Size1X Vertical. 1X Horizontal
Character Pitch10 CPI
Country SelectionUSA
Code Page457
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";
ANSI EmulationGEK-99???
8
ESC QGENTST (Self-Test):
Decimal:27 102 or 120
Hex:1B 5C or 9C
BASIC:CHR$(27);"\";
This sequence is ignored.
GEK-?????5000 Series Programmer’s Manual
9
CSI p1 p2 SP ~GENEMU (Emulation Control):
for the printer to another emulation. The parameters in the sequence
are defined as follows:
p1Emulation identifier. This parameter will select the particular
emulation by a reference number as supplied by GENICOM
engineering. The assigned numbers may be found in the table
below.
p2Reset control. The parameters of the printer to be reset or
defaulted are controlled by this parameter. It will not always
be possible to meet the strict definition of this parameter, so
each printer will have a definition of how the reset control is
implemented. The values as currently defined are:
This sequence will switch the control
0
Hold values (default). All possible values for printer
control (tabs, margins, page length, etc.) are to be
retained.
If no emulation parameter is supplied, the emulation will remain 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)
8592ISO 8859-2 Latin Alphabet #2
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 will print 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 11), 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 ... ; p8–pn ST
This sequence signals the beginning of a
p1Control Command
0
1
Store new character map
Erase 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 will be ignored.
p3Reserved. This parameter is marked by inserting a semi-colon
(;) in the command sequence.
ANSI EmulationGEK-99???
12
p4Reserved. This parameter is marked by inserting a semi-colon
(;) in the command sequence.
p5Reserved. This parameter is marked by inserting a semi-colon
(;) in the command sequence.
p6A literal string indicating the GENSNC select parameter of an
existing character map (such as 437, 850, etc.) 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 is to use an existing map as a base. The string is
terminated by a semi-colon (;). The base character map will
always default 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 will
be used.
p7A literal string which will be 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 will be used for display purposes.
p8-pn A trio of parameters used to specify the actual character map
substitution. A semi-colon must separate each parameter
within the trio, and a semi-colon must terminate each trio.
The semi-colon 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
will define whether the map will be for GL (7-bit) or GR
(8-bit) substitution. If the first element is between 32 and
126 (inclusive), the map will be 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 will
be 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
GEK-?????5000 Series Programmer’s Manual
13
available character for the currently selected font are valid
for this element.
3 Reserved. A semi-colon (;) is required to mark this element
position. A zero is permitted.
ANSI EmulationGEK-99???
14
Paper and Print Position Moves
ESC KPLD (Partial Line Down):
down 3/72 inch for subscript printing. Also used to return 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. The print line is moved 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 native mode, these sequences can be used in succession
to advance or reverse the paper to another line. In the 4000
compatibility mode, 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
Line terminator. The print line is moved
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.