IBM and Proprinter are registered trademarks of International Business Machines Corporation, DEC is
a registered trademark of Digital Equipment Corporation, Epson is a registered trademark of Seiko
Epson, Code V is a trademark of QMS, Inc., QMS is a registered trademark of QMS, Inc.Printek is a
registered trademark of Printek, Inc.
Specifications subject to change without notice.
ii
TABLE OF CONTENTS
Acknowledgmentsii
INTRODUCTION1
How to Use This Manual1
Printer Model Descriptions and Key Features2
Selecting Emulations2
Changing Forms/Tractor Paths3
ANSI X3.64 EMULATION5
Introduction5
Control Codes and Escape Sequences7
Communications7
Character Size and Line Spacing8
Character Attributes8
Horizontal Position9
Vertical Position10
Horizontal and Vertical Position12
Form Length and Form Feed12
Horizontal Tabs13
Vertical Tabs14
Printer Controls14
Emulations16
Control Codes and Escape Sequences (Alphabetical)17
EPSON FX EMULATION19
Introduction19
Control Codes and Escape Sequences20
Communications20
Character Size21
Character Attributes24
Character Sets26
Line Pitch29
Horizontal Position30
Vertical Position31
Form Length and Form Feed31
Horizontal Tabs33
Vertical Tabs34
Horizontal Margins35
Vertical Margins36
Graphics37
Printer Controls39
Forms and Tractors40
Emulations41
Control Codes and Escape Sequences (Alphabetical)42
Table of Contents
IBM PROPRINTER EMULATION45
Introduction45
Control Codes and Escape Sequences46
Communications46
Character Size47
Character Attributes49
Character Sets50
Line Pitch51
Horizontal Position52
Vertical Position53
Form Length and Form Feed53
Horizontal Tabs54
Vertical Tabs56
Horizontal and Vertical Tabs56
Horizontal Margins56
Vertical Margins57
Graphics58
Printer Controls60
Emulations61
Control Codes and Escape Sequences (Alphabetical)62
DEC LA120 EMULATION65
Introduction65
Control Codes and Escape Sequences67
Communications67
Character Size68
Character Attributes69
Character Sets69
Line Pitch70
Horizontal Position71
Vertical Position72
Horizontal and Vertical Position73
Form Length and Form Feed73
Horizontal Tabs74
Vertical Tabs76
Horizontal Margins78
Vertical Margins79
Printer Controls80
Emulations80
Control Codes and Escape Sequences (Alphabetical)82
SIMPLE TTY EMULATION85
Introduction85
Control Codes and Escape Sequences86
Communications86
Horizontal Position86
Vertical Position87
Form Length and Form Feed87
Horizontal Tabs88
Vertical Tabs88
Printer Controls88
Emulations89
Control Codes and Escape Sequences (Alphabetical)90
PRINTEK EMULATION91
Introduction91
Control Codes and Escape Sequences93
iv
Table of Contents
Communications93
Character Size94
Character Attributes95
Character Sets96
Line Pitch97
Horizontal Position97
Vertical Position97
Form Length and Form Feed98
Horizontal Tabs98
Vertical Tabs100
Horizontal and Vertical Tabs100
Horizontal Margins101
Vertical Margins102
Graphics102
Printer Controls104
Forms and Tractors106
Emulations107
Control Codes and Escape Sequences (Alphabetical)108
Measurements in Bar Code Mode123
Entering/Exiting Bar Code Mode123
The Bar Code Control Character124
Other Control Characters124
Bar Code Definition125
Variable Width Bar Code Definition126
Bar Code Height127
Relative Vertical Tab129
Absolute Horizontal Tab129
Bar Code Pass Terminator130
Mixing Bar Codes and Text131
Supported Bar Code Types132
ASCII CHARACTER TABLES133
ASCII Control Code Definitions133
Epson FX Font Samples134
PC Font Samples135
EBCDIC Font Samples136
PC Latin 2 (Slavic) Font Samples137
OCR A Font Sample138
OCR B Font Sample138
Decimal to Octal to Hexadecimal Conversion Table139
PRINTER RESET CONDITIONS141
GLOSSARY143
v
INTRODUCTION
This manual describes the software interfaces supported by the FormsMaster 8000 series printer. It is
written for a programmer who will be developing software for the printer, and contains information not
normally needed by a printer operator/user.
Basic information on printer operation (setting the printer up, loading paper, replacing ribbons, etc.)
can be found in the FormsMaster 8000 Series Operator's Manual that accompanied your printer.
How to Use This Manual
Below is a brief description of the information contained in this manual.
Introduction describes the contents of this manual. This chapter also provides you with an
introduction to the capabilities and operation of the FormsMaster 8000 and FormsMaster 8003 printers.
ANSI X3.64 Emulation, Epson FX Emulation, IBM Proprinter Emulation, DEC LA120 Emulation,
Simple TTY Emulation, and Printek Emulation are each designed as a stand-alone chapter. Each
chapter provides all the information necessary to write software for a particular emulation. You may
wish to refer only to the chapter for the emulation you are using, and skip the others.
Port Switching – Programming Considerations describes special considerations required when
connecting multiple host computers directly to the interface ports available on the printer.
Configuration Download describes how a simple text file may be used to set default values in the
printer’s non-volatile memory. This feature may be used as an alternative to using the printer’s front
panel setup and can be useful when configuring multiple printers or when configuring printers at a
remote location.
Hex Dump Mode describes the output of Hex Dump mode, and how it may be used to debug software
problems.
Coax/Twinax Command Interpreter describes how this mode may be used to send ASCII control
codes and escape sequences to the printer.
Printing Basic Bar Codes describes how to use the built in bar coding capabilities.
ASCII Character Tables provides a definition of ASCII control codes, character tables, and an ASCII
to Decimal to Octal to Hexadecimal conversion table.
Printer Reset Conditions describes the state of the printer after a power up reset or receipt of a reset
command.
Glossary provides a reference for printer related terms.
1
Introduction
Printer Model Descriptions and Key Features
The Printek FormsMaster 8000 series printers are high speed, heavy duty serial dot matrix printers
designed especially for printing upon hard to print forms. Such forms are often not printed adequately
by other printers. The printer is also designed to be factory floor rugged while still quiet enough for
the office. Both models provide straight paper paths for jam free paper motion and a zero waste tear
bar for demand document applications.
The operator may permanently record up to ten complete sets of form parameters which may be later
selected either at the printer's control panel or from the host computer. The FormsMaster 8003
provides three sets of tractors, any of which can be included in the form parameters for a particular
form. This allows the printer to automatically unload one form and load another when selected,
without requiring the operator to touch the paper. The FormsMaster 8003 is also able to use the same
form or paper in multiple paths and automatically continue printing from a different path after one or
two paths are out of paper. For more information, refer to the FormsMaster 8000 Series Operator’sManual.
The printers come equipped with an industry standard parallel interface and an RS-232 serial interface.
The printer will automatically accept data from either of these ports and even a third optional port after
a 15 second delay. The optional ports which are available include Coax/Twinax, IPDS Coax, IPDS
Twinax, or Ethernet 10BaseT. For more information refer to the chapter on “Port Switching –
Programming Considerations”.
Standard bar coding capabilities include Code 39, Code 39 LOGMAR, 2-of-5, and Interleaved 2-of-5
bar codes, and OCR-A and OCR-B fonts. Bar code options include the Imager Graphics Co-Processor
which expands the bar code capabilities beyond the standard Basic Bar Codes with QMS Code V v1
barcoding compatibility, and the ImagerPlus Graphics Co-Processor which adds bar code and graphic
capabilities with QMS Code V v1 and v2 compatibility and Printronix IGP compatibility.
Other options include an internal FormsCutter which can be used to automatically cut off each form or
to separate reports. A specially designed print stand which can handle three boxes of paper, and a
Setup Module to make set up of multiple printers quick and easy are also available.
Selecting Emulations
The software interface of the printer varies, depending upon which emulation is selected.
The default emulation, selected at power up, is specified by the “Emulation” value in the interface
setup menu for the interface being used. Frequently, the desired emulation is specified here, and never
changed again. Note that the emulation may only be specified for the serial, parallel, and EtherLink
ports. The Coax/Twinax, IPDS Coax, and IPDS Twinax ports automatically default to Printek
emulation.
It is also possible to switch back and forth between various emulations in order to use the unique
features of each. A different emulation may be selected via software with the ESC ESC n sequence.
Although switching emulations is essentially a seamless process, the fundamental differences between
emulations may cause unanticipated results. For example, character size may vary, or tabs may work
differently.
2
Introduction
Changing Forms/Tractor Paths
As mentioned above, the FormsMaster 8000 series printers have ten complete sets of forms
parameters. These different parameters, or forms, may be selected either from the front panel or with
escape sequences. In the FormsMaster 8003, selecting a different form may also select a different
tractor path. The tractor path is one of the parameters which may be set for each of the ten forms in the
forms menu using Setup as described in the FormsMaster 8000 Series Operator's Manual.
Escape sequences for loading forms are only available in the Epson and Printek emulations. In either
chapter refer to the “Load Form” escape sequence in the “Forms and Tractors” section.
If you are using an emulation other than Epson or Printek, you may temporarily change emulations,
load the new form, and then return to the previous emulation. An example of this may be found in the
“Emulations” section at the end of each of the emulation chapters.
3
ANSI X3.64 EMULATION
Introduction
This section describes the control codes and escape sequences comprising ANSI X3.64 emulation.
This emulation may be selected by setting “Emulation” to “ANSI X3.64” in the appropriate interface
setup menu, or via software with the ESC ESC 1 sequence. While this emulation is selected, control
codes and escape sequences from other emulations are not available.
Control codes and escape sequences are used to control printer operation. An ASCII control code is a
single character in the range 00 hex through 1F hex, and 7F hex. The ESC (Escape) control code (1B
hex) is used to introduce character strings called escape sequences, which provide an extension of the
commands available with ASCII control codes.
Many ANSI escape sequences begin with a two character Control Sequence Introducer (CSI), Escape
Left Square Bracket (ESC [, 1B 5B hex). If 8-bit data is selected via control panel setup, these two
characters may be replaced by a single character CSI, 9B hex. The sequences are always documented
in this section with the two character CSI (ESC [), because this format seems to be much more
common, and works equally well with 7-bit or 8-bit data.
Some escape sequences accept one or more numeric parameters. A numeric parameter is a decimal
number represented by a string of ASCII decimal digits (“0” through “9”). Leading zeros may be
supplied, but are not necessary. Due to implementation constraints, the largest value that can be
accepted is decimal 255. Larger values will be treated as zero. Omitting a numeric parameter is
equivalent to supplying a value of zero.
If a sequence accepts one numeric parameter, it will be represented as “n”. If a sequence accepts more
than one numeric parameter, they will be represented as “n1; n2; ... nx”. Note that multiple numeric
parameters are separated by a semicolon.
Most ANSI escape sequences will assume one of the following formats:
ESC f(no numeric parameters)
ESC n f(one numeric parameter)
ESC n1; n2; ... nx f(two or more numeric parameters)
The “f” at the end of the escape sequence represents the final character. It terminates the sequence, and
specifies the function to be performed.
Spaces are used when documenting escape sequences to increase readability. The spaces within the
sequences are for readability only; they are not part of the sequences themselves. Characters that
appear in italics (such as “n” and “f” above) are not sent to the printer as is; they are used as a place
holder indicating that some value must be supplied.
Multiple character strings without intervening spaces typically represent control codes. For example,
BS is the Backspace control code (08 hex), not the two characters “B” and “S” (42 and 53 hex). An
ASCII Control Code Table is prvided on page 139 for your convenience. If you have any doubt about
how to interpret a documented control code or escape sequence, refer to the hex representation in the
example. This should clarify any ambiguity. The examples may also be helpful when analyzing a hex
dump (see Hex Dump chapter) printed by the printer.
5
ANSI X3.64 Emulation
Some escape sequences refer to the active column or active line. The active column is the column
where the next character will be printed. Printing a character or a space will increment the active
column. The active line is the line where the next character will be printed. A line feed will increment
the active line. Column and line numbers begin at one, not at zero.
6
ANSI X3.64 Emulation
Control Codes and Escape Sequences
Grouped by Function
Communications
End of TextETX
If “ETX/ACK” is set to “On” in the serial interface setup menu, then receipt of an ETX causes the
printer to transmit an ACK to the host computer.
Since the ETX may be a legal value within an escape sequence, it is the user's responsibility to ensure
that an ETX used for data handshake is not sent within an escape sequence. The user must also ensure
that the maximum block size or the number of blocks sent at one time does not exceed the input buffer
size of the printer.
ETX/ACK handshake is available only with serial I/O.
Control code:ETX
Hexadecimal:03
7
ANSI X3.64 Emulation
Character Size and Line Spacing
Set Character and Line SpacingESC [ n1 ; n2 SP G
Sets the character and line spacing in decipoints (1/720 of an inch). The first parameter, n1, sets the
line spacing. The second parameter, n2, sets the character spacing. Typical values for n1 and
supported values for n2 are shown below. Other values for n2 will be ignored. To change only the
horizontal or only the vertical spacing, omit the other value from the sequence or set it to zero.
Overrides the “Characters/Inch” value and the “Lines/Inch” value in the forms setup menu.
n1
1206 lpi
Example: The following escape sequence will select 6 lpi and 10 cpi.
Escape Sequence:ESC[120;72SPG
Hexadecimal:1B5B3132303B37322047
Example: The following escape sequence will select 6 lpi without affecting character spacing.
Escape Sequence:ESC[120SPG
Hexadecimal:1B5B3132302047
Example: The following escape sequence will select 10 cpi without affecting line spacing.
Selects the graphic rendition n from the following table.
n
0Normal
8
1Emphasized
3Italic
4Underline
Rendition
ANSI X3.64 Emulation
For italic mode to work correctly, an Epson FX font must be selected (check the “Font” value in the
forms setup menu). The other available fonts do not include italic characters.
Example: The following escape sequence will select emphasized mode.
Escape Sequence:ESC[1m
Hexadecimal:1B5B316D
Horizontal Position
Carriage ReturnCR
Causes the current line to be printed, and then sets the current print position to the left margin. If
“Auto LF” is set to “On” in the interface setup menu, a line feed will also be performed.
Control code:CR
Hexadecimal:0D
BackspaceBS
Causes the current line to be printed, and then moves the current print position one space to the left.
The actual distance moved depends on the current character spacing. Backspacing can be done up to,
but not beyond, the left margin.
Control code:BS
Hexadecimal:08
9
ANSI X3.64 Emulation
Absolute Horizontal TabESC [ n `
Sets the current print position to column n. The actual position will depend on the current character
spacing. If n is less than the left margin, the active column will be set to the left margin. If n is greater
than the right margin, then a line feed will be performed and the active column will be set to the left
margin.
Example: The following escape sequence will set the active column to column 65.
Escape Sequence:ESC[65`
Hexadecimal:1B5B363560
Relative Horizontal TabESC [ n a
Advances the current print position by n columns. The actual distance moved will depend on the
current character spacing. Equivalent to sending n spaces (SP).
Example: The following escape sequence will advance the active column by 10 columns. If current
character spacing is 10 cpi, this will cause the print position to move one inch to the right.
Escape Sequence:ESC[10a
Hexadecimal:1B5B313061
Vertical Position
Line FeedLF
(or)IND
(or)ESC D
Causes the current line to be printed, and then advances the paper one line at the current line spacing.
If “Auto CR” is set to “On” in the interface setup menu, a carriage return will also be performed.
Control code:LF
Hexadecimal:0A
Control code:IND
Hexadecimal:84
Escape Sequence:ESCD
Hexadecimal:1B44
10
ANSI X3.64 Emulation
Partial Line DownPLD
(or)ESC K
Performs a half line feed. Causes the current line to be printed, and then advances the paper one half
line at the current line spacing. If “Auto CR” is set to “On” in the interface setup menu, a carriage
return will also be performed.
Control code:PLD
Hexadecimal:8B
Escape Sequence:ESCK
Hexadecimal:1B4B
Partial Line UpPLU
(or)ESC L
Performs a reverse half line feed. Causes the current line to be printed, and then retracts the paper one
half line at the current line spacing. If “Auto CR” is set to “On” in the interface setup menu, a carriage
return will also be performed.
Control code:PLU
Hexadecimal:8C
Escape Sequence:ESCL
Hexadecimal:1B4C
Absolute Vertical TabESC [ n d
Sets the current line to line n of the current form. The actual position will depend on the current line
spacing.
Example: The following escape sequence will set the active line to line 12.
Escape Sequence:ESC[12d
Hexadecimal:1B5B313264
Relative Vertical TabESC [ n e
Advances the active line by n lines. The actual distance moved will depend on the current line
spacing. Equivalent to sending n line feeds (LF).
Example: The following escape sequence will advance the active line by 12 lines. If current line
spacing is 6 lpi, this will cause the paper to advance one inch.
Escape Sequence:ESC[12e
Hexadecimal:1B5B313265
11
ANSI X3.64 Emulation
Horizontal and Vertical Position
New LineNEL
(or)ESC E
Causes the current line to be printed, and then sets the current print position to the left margin and
performs a line feed. Equivalent to a carriage return (CR) line feed (LF) combination.
Control code:NEL
Hexadecimal:85
Escape Sequence:ESCE
Hexadecimal:1B45
Form Length and Form Feed
Form length is the distance from the top of the form to the bottom of the form. A form feed will
advance the paper to the top of the next form. Some programs do not send form feeds. Instead, they
count line feeds, and send the appropriate number of line feeds to fill out the page. The usual rational
is that the program is then in complete control of form length, and will work on any printer without
requiring the correct form length to be set. However, the correct form length should always be set with
the control panel setup. Even if the program does not use form feeds, the printer will automatically
scroll a completed form up to the tear bar to be torn off. This automatic scroll is based upon form
length. The easiest way to set form length is via the “Form Length” value in the forms menu, so it will
be correctly set for everyone using the form.
Form FeedFF
Causes the current line to be printed, and then advances the paper to the top of the next form. If a top
margin is set, printing will continue at the top margin. Setting “Host FF at TOF” to “No” in the
interface setup menu (not available for all interfaces) allows a form feed to be ignored if the paper is
already at top of form. If “Auto CR” is set to “On” in the interface setup menu, a carriage return will
also be performed.
Control code:FF
Hexadecimal:0C
12
ANSI X3.64 Emulation
Horizontal Tabs
Horizontal tab stops are associated with columns, not absolute physical positions. Changing character
spacing will change the physical position of the tab stops. Default tab stops are set at every eighth
column, i.e. column 9, 17, 25, 33, 41, etc. If different tab stops are to be set, the default tab stops
should first be cleared.
Horizontal TabHT
Advances to the next horizontal tab stop. If no tab stop exists between the active column and the right
margin, the HT will be ignored. Default tab stops are set at every eighth column, i.e. column 9, 17, 25,
33, 41, etc. Different tab stops may be set with ESC H, ESC 1, or ESC [ n1 ; n2 ; ... nx u.
Control code:HT
Hexadecimal:09
Set Horizontal Tab StopHTS
(or)ESC H
Sets a horizontal tab stop at the current print position. The tab stop is associated with the active
column, not an absolute physical position. Changing character spacing will change the physical
position of the tab stop.
Default tab stops are set at every eighth column, i.e. column 9, 17, 25, 33, 41, etc. The tab stop set by
this escape sequence will be added to previously set tab stops, including the default tab stops. If this is
not desired, the old tab stops should first be cleared.
Control code:HTS
Hexadecimal:88
Escape Sequence:ESCH
Hexadecimal:1B48
Clear Horizontal Tab StopESC [ g
(or)ESC [ 0 g
Clears the horizontal tab stop at the current print position. The tab stop to be cleared is associated with
the active column (based upon the current character spacing), not an absolute physical position.
Escape Sequence:ESC[g
Hexadecimal:1B5B67
Clear all horizontal tab stopsESC [ 2 g
(or)ESC [ 3 g
Clears all currently set horizontal tab stops.
Escape Sequence:ESC[2g
Hexadecimal:1B5B3267
Escape Sequence:ESC[3g
Hexadecimal:1B5B3367
13
ANSI X3.64 Emulation
Vertical Tabs
Vertical tab stops are associated with lines, not absolute physical positions. Changing line spacing will
change the physical position of the tab stops.
Vertical TabVT
Causes the current line to be printed, and then advances the paper to the next vertical tab stop. If no
vertical tab stops are set, then a line feed is done instead. If “Auto CR” is set to “On” in the interface
setup menu, a carriage return will also be performed.
Control code:VT
Hexadecimal:0B
Set Vertical Tab StopVTS
(or)ESC J
Sets a vertical tab stop at the current line. The tab stop is associated with the active line, not an
absolute physical position. Changing line spacing will change the physical position of the tab stop.
The tab stop set by this escape sequence will be added to previously set tab stops. If this is not desired,
the old tab stops should first be cleared.
Control code:VTS
Hexadecimal:8A
Escape Sequence:ESCJ
Hexadecimal:1B4A
Clear Vertical Tab StopESC [ 1 g
Clears the vertical tab stop at the current line. The tab stop to be cleared is associated with the active
line (based upon the current line spacing), not an absolute physical position.
Escape Sequence:ESC[1g
Hexadecimal:1B5B3167
Clear All Vertical Tab StopsESC [ 4 g
Clears all currently set vertical tab stops.
Escape Sequence:ESC[4g
Hexadecimal:1B5B3467
Printer Controls
BellBEL
Causes the printer's bell to sound.
14
ANSI X3.64 Emulation
Control code:BEL
Hexadecimal:07
Select Automatic Carriage ReturnESC [ 20 h
Selects automatic carriage return mode. This causes the printer to automatically perform a carriage
return (CR) for each line feed (LF), vertical tab (VT), or form feed (FF) that it receives. Overrides the
“Auto CR” value in the interface setup menu.
Escape Sequence:ESC[20h
Hexadecimal:1B5B323068
Cancel Automatic Carriage ReturnESC [ 20 l
Cancels automatic carriage return mode. Overrides the “Auto CR” value in the interface setup menu.
Escape Sequence:ESC[20l
Hexadecimal:1B5B32306C
ResetESC c
Deletes all data on the current line and initializes the printer to the default settings for the current form.
Restores the default horizontal tab stops. Default tab stops are set at every eighth column, i.e. column
9, 17, 25, 33, 41, etc.
Resets top of form to the current position, so it is wise to be at top of form before performing this reset.
Issuing a form feed will guarantee this.
See the chapter on Printer Reset Conditions for more information.
Escape Sequence:ESCc
Hexadecimal:1B63
15
ANSI X3.64 Emulation
Emulations
Select Software Interface nESC ESC n
Selects the software interface n according to the table below.
n
0Test (reserved for factory use)
Overrides the “Emulation” value in the interface setup menu.
A numeric value for n may be specified in two different ways, with equivalent results: a single byte
with a value of 00 to 07 hex, or a single printable ASCII character “0” to “7” (30 to 37 hex).
If more than one emulation has been selected, ESC ESC ? will return to the previously selected
emulation. This is particularly useful when the previous emulation is unknown. Please beware that the
memory (stack) is only one level deep.
ESC ESC @ will return to the default emulation, as specified by the “Emulation” value in the interface
setup menu.
This chapter describes ANSI X3.64 emulation. If a different interface is selected, the control codes
and escape sequences described in this chapter will no longer be applicable.
Example: The following escape sequences will select Printek emulation, load form one, and then
return to the previous emulation.
BELBell
BSBackspace
CRCarriage Return
CSIControl Sequence Introducer
ESC DLine Feed
ESC ENew Line
ESC ESC nSelect Software Interface n
ESC HSet Horizontal Tab Stop
ESC JSet Vertical Tab Stop
ESC KPartial Line Down
ESC LPartial Line Up
ESC [ n1 ; n2 SP GSet Character and Line Spacing
ESC [ n `Absolute Horizontal Tab
ESC [ n aRelative Horizontal Tab
ESC [ n dAbsolute Vertical Tab
ESC [ n eRelative Vertical Tab
ESC [ gClear Horizontal Tab Stop
ESC [ 0 gClear Horizontal Tab Stop
ESC [ 1 gClear Vertical Tab Stop
ESC [ 2 gClear All Horizontal Tab Stops
ESC [ 3 gClear All Horizontal Tab Stops
ESC [ 4 gClear All Vertical Tab Stops
ESC [ 20 hSelect Automatic Carriage Return
ESC [ 20 lCancel Automatic Carriage Return
ESC [ n mSelect Graphic Rendition
ESC cReset
ETXEnd of Text
FFForm Feed
HTHorizontal Tab
HTSSet Horizontal Tab Stop
INDLine Feed
LFLine Feed
NELNew Line
PLDPartial Line Down
PLUPartial Line Up
VTVertical Tab
VTSSet Vertical Tab Stop
17
EPSON FX EMULATION
Introduction
This section describes the control codes and escape sequences comprising Epson FX emulation. This
emulation may be selected by setting “Emulation” to “Epson” in the interface setup menu, or via
software with the ESC ESC 2 sequence. While this emulation is selected, control codes and escape
sequences from other emulations are not available.
Control codes and escape sequences are used to control printer operation. An ASCII control code is a
single character in the range 00 hex through 1F hex, and 7F hex. The ESC (Escape) control code (1B
hex) is used to introduce character strings called escape sequences, which provide an extension of the
commands available with ASCII control codes.
Some escape sequences accept one or more numeric parameters. If a sequence accepts one numeric
parameter, it will be represented as “ n”. If a sequence accepts more than one numeric parameter, they
will be represented as “n1 n2 ... nx”.
Since numeric parameters are always encoded in one byte, their values may range from 0 to 255
decimal. Please note that the value will never be represented by a string of ASCII decimal digits (“0”
through “9”). For example, a value of 66 decimal would be sent as a single byte with a hex value of
42. This is equivalent to sending the ASCII character “B”. It is entirely different than sending the two
printable ASCII characters “66”.
If a numeric parameter is limited to a value of zero or one, it may be sent as a single byte with a value
of 00 or 01 hex (NUL or SOH), or it may be sent as a single printable ASCII character “0” or “1” (30
or 31 hex).
Spaces are used when documenting escape sequences to increase readability. The spaces within the
sequences are for readability only; they are not part of the sequences themselves. Characters that
appear in italics (such as “n” and “n1 n2” above) are not sent to the printer as is; they are used as a
place holder indicating that some value must be supplied.
Multiple character strings without intervening spaces typically represent control codes. For example,
BS is the Backspace control code (08 hex), not the two characters “B” and “S” (42 and 53 hex). An
ASCII Control Code Table is contained in the appendices for your convenience. If you have any doubt
about how to interpret a documented control code or escape sequence, refer to the hex representation in
the provided example. This should clarify any ambiguity. The examples may also be helpful when
analyzing a hex dump (see Hex Dump chapter) printed by the printer.
Column and line numbers begin at zero, not at one. Keep this in mind when setting tabs, margins, etc.
19
Epson FX Emulation
Control Codes and Escape Sequences
Grouped by Function
Communications
Cancel LineCAN
Cancels all printable text in the current print line. Does not affect any control codes or escape
sequences.
Control code:CAN
Hexadecimal:18
Delete CharacterDEL
Deletes the last printable character from the current line. Does not affect any control codes or escape
sequences.
Control code:DEL
Hexadecimal:7F
End of TextETX
If “ETX/ACK” is set to “On” in the serial interface setup menu, then receipt of an ETX causes the
printer to transmit an ACK to the host computer.
Since the ETX may be a legal value within an escape sequence, it is the user's responsibility to ensure
that an ETX used for data handshake is not sent within an escape sequence. The user must also ensure
that the maximum block size or the number of blocks sent at one time does not exceed the input buffer
size of the printer.
ETX/ACK handshake is available only with serial I/O.
If the printing of low symbols is enabled, ETX will be treated as a printable character instead of an I/O
handshake control code.
Control code:ETX
Hexadecimal:03
20
Epson FX Emulation
Set MSB to 0ESC =
Sets the MSB (most significant bit) of all following data to zero. Some computers always set the MSB
to one, causing all characters to print in italic mode. This escape sequence can overcome the problem.
The problem can also be avoided by setting “Data Bits” to “7” in the interface setup menu.
Escape Sequence:ESC=
Hexadecimal:1B3D
Set MSB to 1ESC >
Sets the MSB (most significant bit) of all following data to one. This escape sequence allows the
eighth bit to be turned on, even if the computer and printer are connected via a 7-bit I/O interface. The
eighth bit may be useful for 8-pin graphics data, or for accessing italic characters.
Escape Sequence:ESC>
Hexadecimal:1B3E
Cancel MSB ControlESC #
Cancels the MSB (most significant bit) control set by ESC = or ESC >. This causes the eighth data bit
sent from the host computer to be accepted as is.
Escape Sequence:ESC#
Hexadecimal:1B23
Deselect PrinterDC3
(or)XOFF
Deselects the printer. Use of this command is discouraged, because the printer will remain offline until
an operator presses the ONLINE button on the control panel.
Control code:DC3
Hexadecimal:13
Character Size
The FormsMaster 8000 series printers are capable of supporting 10, 12, 13.3, 15, 16.7, 17.14, and 20
cpi, but most emulations support only a subset of these. Epson emulation supports 10, 12, 15, 17.14,
and 20 cpi via software, but does not support 13.3 or 16.7 cpi. Every emulation supports 10 cpi, and
we consider this to be the default character pitch. When you use the control panel to change the
“Characters/Inch” value in the forms menu, you are actually changing the default character pitch.
When the printer is turned on (or reset), it will use this character pitch. You can even use a pitch that is
not supported by your emulation, such as 13.3 cpi with Epson emulation. You can override this pitch
selection via software, by sending an escape sequence. This selects a user specified non-default pitch.
For example, in Epson emulation, sending ESC M will select 12 cpi. Sending ESC P will re-select 10
cpi, and thus re-select the default character pitch that was selected in the form setup.
Via software escape sequences, you can select any character pitch supported by the emulation you are
using. All will print as expected, unless you select 10 cpi -- because 10 cpi really selects the default
character pitch from setup. If you really want 10 cpi, then you must set “Characters/Inch” to “10” in
the forms menu. Likewise, if you want to use the default pitch from setup, you must not override it.
Either send no character pitch sequences to the printer, or make sure you re-select 10 cpi via software.
21
Epson FX Emulation
When you select different forms, the default character pitch from setup is selected along with the form.
But you will not see this default pitch if it has already been overridden via software.
Select 10 CPIESC P
Selects 10 cpi by cancelling 12 cpi and 15 cpi. Condensed mode is unaffected. The resulting character
spacing will be 10 cpi, or if condensed mode is also selected, 17.14 cpi.
If “Characters/Inch” was not set to “10” in the forms menu, the specified default character pitch will be
selected instead of 10 cpi.
Escape Sequence:ESCP
Hexadecimal:1B50
Select 12 CPIESC M
Selects 12 cpi (elite mode). Cancels 15 cpi. Condensed mode is unaffected. The resulting character
spacing will be 12 cpi, or if condensed mode is also selected, 20 cpi.
Escape Sequence:ESCM
Hexadecimal:1B4D
Select 15 CPIESC g
Selects 15 cpi. Cancels 12 cpi. Condensed mode is unaffected. The resulting character spacing will
be 15 cpi, even if condensed mode is also selected.
Escape Sequence:ESCg
Hexadecimal:1B67
Select Condensed ModeSI
(or)ESC SI
Selects condensed mode. The resulting character spacing will be 17.14 cpi if 10 cpi was selected, or
20 cpi if 12 cpi was selected. If 15 cpi was selected, condensed mode will have no affect.
Control code:SI
Hexadecimal:0F
Escape Sequence:ESCSI
Hexadecimal:1B0F
22
Epson FX Emulation
Cancel Condensed ModeDC2
Cancels condensed mode set by SI or ESC SI.
Control code:DC2
Hexadecimal:12
Select double-wide mode (one line)SO
(or)ESC SO
Selects double-wide mode for one line. Double-wide mode doubles the width of all characters, but
does not affect character height. This mode is cancelled by a carriage return or DC4.
Control code:SO
Hexadecimal:0E
Escape Sequence:ESCSO
Hexadecimal:1B0E
Cancel Double-Wide Mode (one line)DC4
Cancels double-wide mode selected by SO or ESC SO. Does not cancel double-wide mode selected
by ESC W or ESC !.
Control code:DC4
Hexadecimal:14
Double-Wide ModeESC W n
Selects double-wide mode for n=1, or cancels for n=0. Double-wide mode doubles the width of all
characters, but does not affect character height.
Example: The following escape sequence will select double-wide mode.
Escape Sequence:ESCW1
Hexadecimal:1B5731
Double-High ModeESC w n
Selects double-high mode for n=1, or cancels for n=0. Double-high mode doubles the height of all
characters, but does not affect character width.
Example: The following escape sequence will select double-high mode.
Escape Sequence:ESCw1
Hexadecimal:1B7731
23
Epson FX Emulation
Select Subscript or Superscript ModeESC S n
Selects subscript mode for n=1, or superscript mode for n=0. This will print characters about half the
normal height, in the bottom or top half of the normal character cell.
Example: The following escape sequence will select superscript mode.
Escape Sequence:ESCS0
Hexadecimal:1B5330
Cancel Subscript and Superscript ModeESC T
Cancels subscript and superscript mode.
Escape Sequence:ESCT
Hexadecimal:1B54
Character Attributes
Select Emphasized ModeESC E
Selects emphasized mode. This makes characters bolder by printing an extra dot to the right of each
dot normally found in the character matrix. This will cut the print speed in half, but will not require an
additional pass of the print head.
Escape Sequence:ESCE
Hexadecimal:1B45
Cancel Emphasized ModeESC F
Cancels emphasized mode.
Escape Sequence:ESCF
Hexadecimal:1B46
Select Double-Strike ModeESC G
Selects double-strike mode. This makes text bolder by printing it twice. This will cut the print speed
in half, because an additional pass of the print head will be required.
Escape Sequence:ESCG
Hexadecimal:1B47
Cancel Double-Strike ModeESC H
Cancels double-strike mode.
Escape Sequence:ESCH
Hexadecimal:1B48
24
Epson FX Emulation
Underline ModeESC - n
Selects underline mode for n=1, or cancels for n=0. This mode provides continuous underlining for all
characters, including spaces.
Example: The following escape sequence will turn underlining on.
Escape Sequence:ESC-1
Hexadecimal:1B2D31
Select Italic ModeESC 4
Selects italic mode. This causes italic characters to be printed by setting the MSB (most significant
bit) of all following printable characters to one. The effect is to map characters from the bottom half
(non-italic) of the font to the top half (italic) of the font. For this to work correctly, an Epson FX font
must be selected (see ESC k). The other available fonts do not include italic characters.
Escape Sequence:ESC4
Hexadecimal:1B34
Cancel Italic ModeESC 5
Cancels italic mode. The MSB (most significant bit) of the following printable characters will be
accepted as is. Italic characters may still be printed by transmitting characters with the MSB turned
on.
Escape Sequence:ESC5
Hexadecimal:1B35
25
Epson FX Emulation
Master Print Mode SelectESC ! n
Selects any valid combination of modes from the following table. The value of n is determined by
adding together the values of the desired modes from the table.
n
010 cpi
Example: The following escape sequence will select 12 cpi condensed, resulting in 20 cpi character
spacing.
Escape Sequence:ESC!5
Hexadecimal:1B2105
Example: The following escape sequence will select emphasized, double-wide, and underline, for a
heading that really stands out.
Selects draft for n=0 or letter quality for n =1. Same as ESC k 0 or ESC k 1. Overrides the “Font”
value in the forms menu.
Example: The following escape sequence will select draft print.
Escape Sequence:ESCx0
Hexadecimal:1B7830
26
Epson FX Emulation
Select FontESC k n
Select font n according to the following table.
n
0Epson FX Draft
Overrides the “Font” value in the forms menu. If the specified font is not installed, the “Font” value in
the forms menu will be used to select the default font.
1Epson FX Letter Quality
2Proprinter PC Draft
3Proprinter PC Letter Quality
10EBCDIC Draft
11EBCDIC Letter Quality
12OCR-A Optical Quality
13OCR-B Optical Quality
32Epson FX Fast Draft
33Epson FX Draft
34Epson FX Letter Quality
36Proprinter PC Fast Draft
37Proprinter PC Draft
38Proprinter PC Letter Quality
44PC Latin II (Slavic) Fast Draft
45PC Latin II (Slavic) Draft
46PC Latin II (Slavic) Letter Quality
64EBCDIC Fast Draft
65EBCDIC Draft
66EBCDIC Letter Quality
71OCR-A Optical Quality
75OCR-B Optical Quality
Font
Example: The following escape sequence will select the Epson FX letter quality font.
Escape Sequence:ESCk1
Hexadecimal:1B6B01
27
Epson FX Emulation
Select International Character SetESC R n
Selects the international character set as specified by the value of n in the following table. Overrides
the “Language” value in the forms menu.
n
0United States of America
The actual character substitutions are shown in the “International Character Mapping” table below.
For this to work correctly, an Epson FX font must be selected (see ESC k).
Example: The following escape sequence will select the German character set.
Escape Sequence:ESCR2
Hexadecimal:1B5202
Character TableESC t n
Selects the Epson italic character set for n=0 or the Epson extended graphics character set for n=1. As
implemented, this selects either the Epson FX font or the PC USA font. The character attribute (fast
draft, draft, or letter quality) will not change.
Example: The following escape sequence will select the Epson FX font.
Escape Sequence:ESCt0
Hexadecimal:1B7430
Enable Printing of High SymbolsESC 6
Enables printing of character values 128 through 159 decimal. If printing is not enabled, these
characters will be treated as control codes. Overrides the “Characters” value in the interface setup
menu.
28
Epson FX Emulation
Escape Sequence:ESC6
Hexadecimal:1B36
Disable Printing of High SymbolsESC 7
Disables printing of character values 128 through 159 decimal. These characters will be treated as
control codes. Overrides the “Characters” value in the interface setup menu.
Escape Sequence:ESC7
Hexadecimal:1B37
Printing of Low SymbolsESC I n
Enables printing of character values 0 through 31 decimal if they are not used as control codes for n=1,
or disables printing for n=0. Overrides the “Characters” value in the interface setup menu.
Example: The following escape sequence will disable printing of character values 0 through 31
decimal.
Escape Sequence:ESCI0
Hexadecimal:1B4930
Line Pitch
Select 8 LPIESC 0
Sets the line spacing to 1/8 of an inch per line (8 lpi). Overrides the “Lines/Inch” value in the forms
menu.
Escape Sequence:ESC0
Hexadecimal:1B30
Set Line Spacing to 7/72”ESC 1
Sets the line spacing to 7/72 of an inch per line. Since the distance between print head wires is 1/72 of
an inch, this is equivalent to setting seven wire spacing. This is not particularly useful for text, but
may be useful for graphics if 7-bit graphics data is being sent. Overrides the “Lines/Inch” value in the
forms menu.
Escape Sequence:ESC1
Hexadecimal:1B31
Select 6 LPIESC 2
Sets the line spacing to 1/6 of an inch per line (6 lpi). This is the normal text line spacing. Overrides
the “Lines/Inch” value in the forms menu.
Escape Sequence:ESC2
Hexadecimal:1B32
29
Epson FX Emulation
Set Line Spacing to n/216”ESC 3 n
Sets the line spacing to n/216 of an inch per line. 0 ≥n≥255. Overrides the “Lines/Inch” value in the
forms menu.
NOTE: The actual resolution of the printer's paper stepper motor is 1/288 of an inch. When spacing is
specified in 1/216 of an inch, the printer will actually move paper to the nearest 1/288 of an inch.
Example: The following escape sequence will set line spacing to one half inch.
Escape Sequence:ESC3108
Hexadecimal:1B336C
Set Line Spacing to n/72”ESC A n
Sets the line spacing to n/72 of an inch per line. 0≥n≥255. Since the distance between print head wires
is 1/72 of an inch, this is equivalent to setting n wire spacing. Overrides the “Lines/Inch” value in the
forms menu.
Example: The following escape sequence will set line spacing to 8/72 of an inch, for use with eight
wire graphics.
Escape Sequence:ESCA8
Hexadecimal:1B4108
Horizontal Position
Carriage ReturnCR
Causes the current line to be printed, and then sets the current print position to the left margin. If
“Auto LF” is set to “On” in the interface setup menu, a line feed will also be performed.
Control code:CR
Hexadecimal:0D
30
Epson FX Emulation
BackspaceBS
Causes the current line to be printed, and then moves the current print position one space to the left.
The actual distance moved depends on the current character spacing. Backspacing can be done up to,
but not beyond, the left margin.
Control code:BS
Hexadecimal:08
Vertical Position
Line FeedLF
Causes the current line to be printed, and then advances the paper one line at the current line spacing.
If “Auto CR” is set to “On” in the interface setup menu, a carriage return will also be performed.
Control code:LF
Hexadecimal:0A
Variable Distance Line FeedESC J n
Causes the current line to be printed, and then performs a single line feed of n/216ths of an inch.
0≥n≥255. Does not change the current line spacing. If “Auto CR” is set to “On” in the interface setup
menu, a carriage return will also be performed.
Example: The following escape sequence will advance the paper one half inch.
Escape Sequence:ESCJ108
Hexadecimal:1B4A6C
Variable Distance Reverse Line FeedESC j n
Performs a single reverse line feed of n/216ths of an inch. 0≥n≥255. Does not change the current line
spacing. If “Auto CR” is set to “On” in the interface setup menu, a carriage return will also be
performed.
Example: The following escape sequence will move the paper down one half inch.
Escape Sequence:ESCj108
Hexadecimal:1B6A6C
Form Length and Form Feed
Form length is the distance from the top of the form to the bottom of the form. Form length may be
specified either in inches, or in lines. A form feed will advance the paper to the top of the next form.
Some programs do not send form feeds. Instead, they count line feeds, and send the appropriate
number of line feeds to fill out the page. The usual rational is that the program is then in complete
31
Epson FX Emulation
control of form length, and will work on any printer without requiring the correct form length to be set.
However, the correct form length should always be set with the control panel setup. Even if the
program does not use form feeds, the printer will automatically scroll a completed form up to the tear
bar to be torn off. This automatic scroll is based upon form length. The easiest way to set form length
is via the “Form Length” value in the forms menu, so it will be correctly set for everyone using the
form. If correct form length cannot be guaranteed from SETUP, then each program should set the
correct form length.
Set Form Length in LinesESC C n
Sets the form length to n lines at the current line spacing. 1≥n≥255. Maximum form length is 37.9
inches. Invalid form lengths will be ignored. Overrides the “Form Length” value in the forms menu.
For example, an 11 inch form contains 66 lines at 6 LPI, but 88 lines at 8 LPI. If line spacing is
changed after setting the form length, the physical form length (in inches) will not be changed.
Resets top of form to the current position, so it is wise to be at top of form before setting form length.
Issuing a form feed will guarantee this. Vertical margins are cleared.
Example: The following escape sequence will set form length to 66 lines. At 6 LPI, this will result in
a form length of 11 inches.
Escape sequence:ESCC66
Hexadecimal:1B4342
Set Form Length in InchesESC C NUL n
Sets the form length to n inches. 1≥n≥37. Maximum form length is 37.9 inches. Invalid form lengths
will be ignored. Overrides the “Form Length” value in the forms menu.
Resets top of form to the current position, so it is wise to be at top of form before setting form length.
Issuing a form feed will guarantee this. Vertical margins are cleared.
Example: The following escape sequence will set form length to 11 inches, regardless of what line
spacing is set.
Escape sequence:ESCCNUL11
Hexadecimal:1B43000B
32
Epson FX Emulation
Form FeedFF
Causes the current line to be printed, and then advances the paper to the top of the next form. If a top
margin is set, printing will continue at the top margin. Setting “Host FF at TOF” to “No” in the
interface setup menu allows a form feed to be ignored if the paper is already at top of form. If “Auto
CR” is set to “On” in the interface menu, a carriage return will also be performed.
Control code:FF
Hexadecimal:0C
Horizontal Tabs
Default horizontal tab stops are set at every eighth column, i.e. column 8, 16, 24, 32, 40, etc. The
default tab stops are associated with columns, not absolute physical positions. Changing character
spacing will change the physical position of the default tab stops.
User defined horizontal tab stops are associated with absolute physical positions, not with columns.
The tab stops are set relative to the current character spacing, but subsequent changes in character
spacing will not affect the physical position of the tab stops (except that the position will be rounded
up to the closest character boundary).
Horizontal TabHT
Advances to the next horizontal tab stop. If no tab stop exists between the active column and the right
margin, the HT will be ignored. Default tab stops are set at every eighth column, i.e. column 8, 16, 24,
32, 40, etc. Different tab stops may be set with ESC D.
Control code:HT
Hexadecimal:09
Absolute Horizontal TabESC $ n1 n2
Move to the specified carriage position. The position is specified in 60ths of an inch, and calculated as
()nn12 256
+↔
60
margin or it will be ignored.
Example: The following escape sequence will set the carriage position 5 inches (300/60 inches) from
the left margin.
Escape Sequence:ESC$441
Hexadecimal:1B242C01
inches. The position is relative to the left margin and must not exceed the right
33
Epson FX Emulation
Relative Horizontal TabESC \ n1 n2
Move the carriage position to the left or right of the current carriage position. The displacement is
()
nn12 256
specified in 120ths of an inch, and calculated as
to the current carriage position, and must fall within the left and right margins or it will be ignored. A
negative displacement (2’s complement) causes a move to the left.
Example: The following escape sequence will move the carriage one inch to the right.
Escape Sequence:ESC\1200
Hexadecimal:1B5C7800
Example: The following escape sequence will move the carriage one inch to the left.
Escape Sequence:ESC\136255
Hexadecimal:1B5C88FF
Set Horizontal Tab StopsESC D n1 n2 ... nx NUL
Clears all currently set horizontal tab stops, and sets new tab stops at column n1, n2, n3, etc. 1≥n≥255.
The tab stops must be presented in ascending order. The NUL character, or any tab stop value less
than the preceding one, terminates the sequence. The tab stops are set relative to the current character
spacing, but subsequent changes in character spacing will not affect the physical position of the tab
stops (except that the position will be rounded up to the closest character boundary). The leftmost
column is column zero.
+↔
120
inches. The new position is relative
Default tab stops are set at every eighth column, i.e. column 8, 16, 24, 32, 40, etc. The tab stops set by
ESC D will replace the default tab stops. ESC D NUL will clear all tab stops, leaving no tab stops set.
The default tab stops are restored by ESC @.
Example: The following escape sequence will set horizontal tab stops at half inch intervals, if
character spacing is currently 10 cpi.
Vertical tab stops are associated with absolute physical positions, not with lines. The tab stops are set
relative to the current line spacing, but subsequent changes in line spacing will not affect the physical
position of the tab stops.
34
Epson FX Emulation
Vertical TabVT
Causes the current line to be printed, and then advances the paper to the next vertical tab stop. If no
vertical tab stops are set, then a line feed is done instead. If “Auto CR” is set to “On” in the interface
setup menu, a carriage return will also be performed.
Control code:VT
Hexadecimal:0B
Set Vertical Tab StopsESC B n1 n2 ... nx NUL
Clears all currently set vertical tab stops, and sets new tab stops at line n1, n2, n3, etc. 1≥n≥255. The
tab stops must be presented in ascending order. The NUL character, or any tab stop value less than the
preceding one, terminates the sequence. The tab stop settings are based on the current line spacing.
Changing the line spacing after the tab stops are set will not affect the position of the tab stops. The
first line is line zero.
ESC B NUL will clear all currently set vertical tab stops, leaving no vertical tab stops set.
Example: The following escape sequence will set vertical tab stops at line 6, 12, and 24. If line
spacing is currently 6 lpi, this will result in tab stops one inch, two inches, and four inches from the top
of the form.
Printing is allowed only within the left and right margins. Exceeding the right margin will cause line
wrap, setting the current print position to the left margin and advancing the paper one line.
Set Left MarginESC l n
Sets the left margin to column n at the current character spacing. If character spacing is changed after
setting the left margin, the position of the left margin will not change.
The left margin is inclusive. For example, a left margin at column 10 still allows a character to be
printed in column 10.
The leftmost column is column zero. The left margin must be left of the right margin and ≥13.4
inches. Invalid left margins will be ignored. Overrides the “Left Margin” value in the forms menu.
Example: The following escape sequence will set a one inch left margin, if character spacing is
currently 10 cpi.
Escape Sequence:ESCl10
Hexadecimal:1B6C0A
Set Right MarginESC Q n
Sets the right margin to column n at the current character spacing. If character spacing is changed after
setting the right margin, the position of the right margin will not change.
35
Epson FX Emulation
The right margin is exclusive. For example, a right margin at column 75 allows a character to be
printed in column 74, but not in column 75.
The leftmost column is column zero. The right margin must be right of the left margin and ≥13.6
inches. Invalid right margins will be ignored. Overrides the “Right Margin” value in the forms menu.
Example: The following escape sequence will set a right margin 7.5 inches from the left edge of the
form, if character spacing is currently 10 cpi. For a standard 8.5 inch wide form, this would result in a
one inch right margin.
Escape Sequence:ESCQ75
Hexadecimal:1B514B
Vertical Margins
Printing is allowed only within the top and bottom margins. Exceeding the bottom margin will set the
current line to the top margin of the next form.
Set Perforation SkipESC N n
Sets the perforation skip distance to n lines at the current line spacing. 1 ≥n≥255. If line spacing is
changed after setting the skip distance, the skip distance will not be changed.
The skip distance is split between the top and bottom margins, so the perforation will be centered in
the resulting white space. The specified skip distance must be less than the form length, or the
command will be ignored. Perforation skip is canceled by ESC O, ESC C n or ESC C NUL n.
Overrides the “Top Margin” and “Bottom Margin” values in the forms menu.
Example: The following escape sequence will set a two inch perforation skip distance, if the current
line spacing is 6 lpi. This will result in a one inch top and bottom margin.
Escape Sequence:ESCN12
Hexadecimal:1B4E0C
36
Epson FX Emulation
Cancel Perforation SkipESC O
Cancels perforation skip. This is equivalent to having no top and bottom margin. Overrides the “Top
Margin” and “Bottom Margin” values in the forms menu.
Escape Sequence:ESCO
Hexadecimal:1B4F
Graphics
Graphics mode gives the user complete control over every dot position on the paper. Graphics may be
printed with various horizontal densities from 60 to 240 dpi, and a vertical density of 72 dpi.
Each byte of graphics data represents a vertical column of eight dots, with the MSB (most significant
bit) corresponding to the top wire of the print head. Turning a bit on causes a dot to be printed. The
bit values corresponding to each wire of the print head are shown below:
The appropriate bit values are added together to fire the desired wires. For example, a byte of graphics
data with the value 128 (80 hex) will fire the top wire, wire 1. A value of 192 (C0 hex) will fire the top
two wires, wires 1 and 2. A value of 11 (0B hex) will fire wires 5, 7 and 8.
Each graphics sequence contains two bytes (n1 and n2) that specify how many bytes of graphics data
follow. The first byte, n1, can specify values up to 255. If that is sufficient, then n2 is set to zero. For
values greater than 255, n2 comes into play. The n2 byte specifies multiples of 256. For example, to
specify 520 bytes of graphics data, n1 = 8 and n2 = 2. The bytes of graphics data are strung together to
create a graphics line that is eight dots high, and n1 + (n2 x 256) dots long. Be sure to provide the
amount of graphics data that you specify, because the printer will not leave graphics mode until it has
accepted the specified number of data bytes.
If “Data Bits” is set to “7” in the interface setup menu, beware of potential problems in graphics mode.
Since the MSB (most significant bit) will always be turned off, it will not be possible to fire the top
wire of the print head. Worse yet, the value of n1 or n2 may be changed. For example, if n1 specifies
200 bytes of data, and its MSB is turned off, the printer will only expect 72 bytes of data. It will exit
graphics mode, and then try to print the remaining 128 bytes of graphics data as normal text characters.
The result will surely not be pretty. To avoid such problems, the use of an 8-bit I/O interface for
printing graphics is highly recommended.
The normal graphics modes allow every dot to be printed. High speed graphics will print twice as fast,
but will not allow consecutive dots to be printed.
60 DPI GraphicsESC K n1 n2 data
Selects eight wire single density (60 dpi) graphics for n1 + (n2 x 256) columns of data.
37
Epson FX Emulation
Example: The following escape sequence will print six bytes of graphics data at 60 dpi. The resulting
figure will resemble a backslash character, “\”.
Selects eight wire double density (120 dpi) graphics for n1 + (n2 x 256) columns data.
Example: The following escape sequence will print six bytes of graphics data at 120 dpi. The
resulting figure will resemble a backslash character, “\”.
Escape Sequence:ESCL6012864321684
Hexadecimal:1B4C0600804020100804
High Speed 120 DPI GraphicsESC Y n1 n2 data
Selects eight wire high speed double density (120 dpi) graphics for n1 + (n2 x 256) columns of data.
Horizontally adjacent dots may not be printed.
Example: The following escape sequence will print six bytes of graphics data at 120 dpi. The
resulting figure will resemble a backslash character, “\”.
Selects eight wire quadruple density (240 dpi) graphics for n1 + (n2 x 256) columns of data.
Horizontally adjacent dots may not be printed.
Example: The following escape sequence will print six bytes of graphics data at 240 dpi. The
resulting figure will resemble a backslash character, “\”.
Selects eight wire graphics of density m as listed in the following table for n1 + (n2 x 256) columns of
data.
Density _______
060 dpi (same as ESC K)
1120 dpi (same as ESC L)
2120 dpi high speed (same as ESC Y)
3240 dpi high speed (same as ESC Z)
480 dpi
572 dpi
690 dpi
7144 dpi
Example: The following escape sequence will print four bytes of graphics data at 72 x 72 dpi. The
resulting figure will resemble a square, since the horizontal and vertical density are the same. If some
other density is chosen, the figure will resemble a rectangle.
Causes the printer's bell to sound.
Control code:BEL
Hexadecimal:07
Unidirectional Mode (one line)ESC <
Selects unidirectional mode for the current line (until a carriage return is received). This will force the
line to print from left to right.
Escape Sequence:ESC<
Hexadecimal:1B3C
Unidirectional ModeESC U n
Selects unidirectional mode for n=1, or bidirectional mode for n =0. Printing is normally bidirectional.
Unidirectional printing provides more accurate positioning, but causes lower throughput.
Example: The following escape sequence will force unidirectional printing.
Escape Sequence:ESCU1
Hexadecimal:1B5531
ResetESC @
Deletes all data on the current line and initializes the printer to the default settings for the current form.
39
Epson FX Emulation
Restores the default horizontal tab stops. Default tab stops are set at every eighth column, i.e. column
8, 16, 24, 32, 40, etc.
Resets top of form to the current position, so it is wise to be at top of form before performing this reset.
Issuing a form feed will guarantee this.
See the chapter on Printer Reset Conditions for more information.
Escape Sequence:ESC@
Hexadecimal:1B40
Forms and Tractors
The FormsMaster 8003 contains three sets of paper tractors (front, center, and rear). It is possible, via
software, to change to a different form that is set up to use any set of tractors. It is even possible to use
some combinations of tractor paths for longer print jobs.
The “Path” value in the forms menu specifies “Front”, “Center”, “Rear”, “Center+Rear”, or
“Front+Center+Rear” (abbreviated “Frnt+Cntr+Rear”) for each form that is defined. When a form is
selected, the associated set(s) of tractors is also automatically selected.
Load FormESC EM n
Causes the current line to be printed, and then loads paper and form parameters for form n. 0≥n≥2. If
form n is already loaded, this sequence is ignored. If not, the current form will be unloaded, the
parameters for form n will be selected, and the printer will go offline to wait for the operator to install
the new form and place the printer back online. In the FormsMaster 8003 the same happens unless
selecting form n also selects a different paper path. In that case, the current form is unloaded, the
tractors are moved to engage the new path, the new form is loaded, and printing may continue. If the
selected form had not been previously loaded in that path (see the FormsMaster 8000 SeriesOperator’s Manual), then the printer will go offline until an operator has loaded the form.
The printer will not unload the current form if a previously printed form has not been torn off. In this
case, the printer will go offline, sound the bell, and display the message ”Too Much Paper to Unload”.
When an operator tears off the paper and places the printer back online, the printer will unload the
current form and continue.
If the printer is unable to load the new form, it will sound the bell and display the message “No Paper
to Load” and go offline to wait for an operator to clear the error.
Example: The following escape sequence will load form 2.
Escape Sequence:ESCEM2
Hexadecimal:1B1932
40
Epson FX Emulation
Emulations
Select Software Interface nESC ESC n
Selects the software interface n according to the table below.
n
0Test (reserved for factory use)
Overrides the “Emulation” value in the interface setup menu.
A numeric value for n may be specified in two different ways, with equivalent results: a single byte
with a value of 00 to 07 hex, or a single printable ASCII character “0” to “7” (30 to 37 hex).
If more than one emulation has been selected, ESC ESC ? will return to the previously selected
emulation. This is particularly useful when the previous emulation is unknown. Please beware that the
memory (stack) is only one level deep.
ESC ESC @ will return to the default emulation, as specified by the “Emulation” value in the interface
setup menu.
This chapter describes Epson FX emulation. If a different interface is selected, the control codes and
escape sequences described in this chapter will no longer be applicable.
Example: The following escape sequences will select Printek emulation, load form one, and then
return to the previous emulation.
BELBell
BSBackspace
CANCancel Line
CRCarriage Return
DC2Cancel Condensed Mode
DC3Deselect Printer
DC4Cancel Double-Wide Mode (one line)
DELDelete Character
ESC ! nMaster Print Mode Select
ESC #Cancel MSB Control
ESC $ n1 n2Absolute Horizontal Tab
ESC * m n1 n2 datam DPI Graphics
ESC - nUnderline Mode
ESC 0Select 8 LPI
ESC 1Set Line Spacing to 7/72”
ESC 2Select 6 LPI
ESC 3 nSet Line Spacing to n/216”
ESC 4Select Italic Mode
ESC 5Cancel Italic Mode
ESC 6Enable Printing of High Symbols
ESC 7Disable Printing of High Symbols
ESC <Unidirectional Mode (one line)
ESC =Set MSB to 0
ESC >Set MSB to 1
ESC @Reset
ESC A nSet Line Spacing to n/72”
ESC B n1 n2 ... nx NULSet Vertical Tab Stops
ESC C NUL nSet Form Length in Inches
ESC C nSet Form Length in Lines
ESC D n1 n2 ... nx NULSet Horizontal Tab Stops
ESC ESelect Emphasized Mode
ESC EM nLoad Form
ESC ESC nSelect Software Interface n
ESC FCancel Emphasized Mode
ESC GSelect Double-Strike Mode
ESC HCancel Double-Strike Mode
ESC I nPrinting of Low Symbols
ESC J nVariable Distance Line Feed
ESC K n1 n2 data60 DPI Graphics
ESC L n1 n2 data120 DPI Graphics
ESC MSelect 12 CPI
ESC N nSet Perforation Skip
ESC OCancel Perforation Skip
ESC PSelect 10 CPI
ESC Q nSet Right Margin
ESC R nSelect International Character Set
ESC S nSelect Subscript or Superscript Mode
Sorted Alphabetically
42
Epson FX Emulation
ESC SISelect Condensed Mode
ESC SOSelect Double-Wide Mode (one line)
ESC TCancel Subscript and Superscript Mode
ESC U nUnidirectional Mode
ESC W nDouble-Wide Mode
ESC Y n1 n2 dataHigh Speed 120 DPI Graphics
ESC Z n1 n2 dataHigh Speed 240 DPI Graphics
ESC \ n1 n2Relative Horizontal Tab
ESC gSelect 15 CPI
ESC j nVariable Distance Reverse Line Feed
ESC k nSelect Font
ESC l nSet Left Margin
ESC t nCharacter Table (Italic vs. Extended)
ESC w nDouble-High Mode
ESC x nSelect Draft or Letter Quality
ETXEnd of Text
FFForm Feed
HTHorizontal Tab
LFLine Feed
SISelect Condensed Mode
SOSelect Double-Wide Mode (one line)
VTVertical Tab
XOFFDeselect Printer
43
IBM PROPRINTER EMULATION
Introduction
This section describes the control codes and escape sequences comprising IBM Proprinter emulation.
This emulation may be selected by setting “Emulation” to “Proprinter” in the interface setup menu, or
via software with the ESC ESC 4 sequence. While this emulation is selected, control codes and
escape sequences from other emulations are not available.
Control codes and escape sequences are used to control printer operation. An ASCII control code is a
single character in the range 00 hex through 1F hex, and 7F hex. The ESC (Escape) control code (1B
hex) is used to introduce character strings called escape sequences, which provide an extension of the
commands available with ASCII control codes.
Some escape sequences accept one or more numeric parameters. If a sequence accepts one numeric
parameter, it will be represented as “ n”. If a sequence accepts more than one numeric parameter, they
will be represented as “n1 n2 ... nx”.
Since numeric parameters are always encoded in one byte, their values may range from 0 to 255
decimal. Please note that the value will never be represented by a string of ASCII decimal digits (“0”
through “9”). For example, a value of 66 decimal would be sent as a single byte with a hex value of
42. This is equivalent to sending the ASCII character “B”. It is entirely different than sending the two
printable ASCII characters “66”.
If a numeric parameter is limited to a value of zero or one, it may be sent as a single byte with a value
of 00 or 01 hex (NUL or SOH), or it may be sent as a single printable ASCII character “0” or “1” (30
or 31 hex).
Spaces are used when documenting escape sequences to increase readability. The spaces within the
sequences are for readability only; they are not part of the sequences themselves. Characters that
appear in italics (such as “n” and “n1 n2” above) are not sent to the printer as is; they are used as a
place holder indicating that some value must be supplied.
Multiple character strings without intervening spaces typically represent control codes. For example,
BS is the Backspace control code (08 hex), not the two characters “B” and “S” (42 and 53 hex). An
ASCII Control Code Table is provided on page 139 for your convenience. If you have any doubt
about how to interpret a documented control code or escape sequence, refer to the hex representation in
the provided example. This should clarify any ambiguity. The examples may also be helpful when
analyzing a hex dump (see Hex Dump chapter) printed by the printer.
Column and line numbers begin at one, not at zero. Keep this in mind when setting tabs, margins, etc.
45
IBM Proprinter Emulation
Control Codes and Escape Sequences
Grouped by Function
Communications
Cancel LineCAN
Cancels all printable text in the current print line. Does not affect any control codes or escape
sequences.
Control code:CAN
Hexadecimal:18
End of TextETX
If “ETX/ACK” is set to “On” in the interface setup menu, then receipt of an ETX causes the printer to
transmit an ACK to the host computer.
Since the ETX may be a legal value within an escape sequence, it is the user's responsibility to ensure
that an ETX used for data handshake is not sent within an escape sequence. The user must also ensure
that the maximum block size or the number of blocks sent at one time does not exceed the input buffer
size of the printer.
ETX/ACK handshake is available only with serial I/O.
If character set 2 is selected, ETX will be treated as a printable character instead of an I/O handshake
control code.
Control code:ETX
Hexadecimal:03
Deselect PrinterESC Q n
Deselects the printer. Use of this command is discouraged, because the printer will remain offline until
an operator presses the ONLINE button on the control panel.
For a Proprinter II or Proprinter III, n should be 3. For a Proprinter XL or Proprinter III XL, n should
be 22. It does not really matter, because n will be ignored.
Example: The following escape sequence will force the printer offline.
Escape Sequence:ESCQ22
Hexadecimal:1B5116
46
IBM Proprinter Emulation
Character Size
The FormsMaster 8000 series printers are capable of supporting 10, 12, 13.3, 15, 16.7, 17.14, and 20
cpi, but most emulations support only a subset of these. IBM Proprinter emulation supports 10, 12,
17.14, and 20 cpi via software, but does not support 13.3, 15 or 16.7 cpi. Every emulation supports 10
cpi, and we consider this to be the default character pitch. When you use the control panel to change
the “Characters/Inch” value in the forms menu, you are actually changing the default character pitch.
When the printer is turned on (or reset), it will use this character pitch. You can even use a pitch that is
not supported by your emulation, such as 13.3 cpi with IBM Proprinter emulation. You can override
this pitch selection via software, by sending an escape sequence. This selects a user specified nondefault pitch. For example, in IBM Proprinter emulation, sending ESC : will select 12 cpi. Sending
DC2 will re-select 10 cpi, and thus re-select the default character pitch that was selected in the form
setup.
Via software escape sequences, you can select any character pitch supported by the emulation you are
using. All will print as expected, unless you select 10 cpi -- because 10 cpi really selects the default
character pitch from setup. If you really want 10 cpi, then you must set “Characters/Inch” to “10” in
the forms menu. Likewise, if you want to use the default pitch from setup, you must not override it.
Either send no character pitch sequences to the printer, or make sure you re-select 10 cpi via software.
When you select different forms, the default character pitch from setup is selected along with the form.
But you will not see this default pitch if it has already been overridden via software.
Select 10 CPIDC2
Selects 10 cpi by cancelling 12 cpi and condensed mode. If “Characters/Inch” was not set to “10” in
the forms menu, the specified default character pitch will be selected instead of 10 cpi.
Control code:DC2
Hexadecimal:12
Select 12 CPIESC :
Selects 12 cpi (elite mode). Condensed mode is unaffected. The resulting character spacing will be 12
cpi, or if condensed mode is also selected, 20 cpi.
Escape Sequence:ESC:
Hexadecimal:1B3A
Select Condensed ModeSI
(or)ESC SI
Selects condensed mode. The resulting character spacing will be 17.14 cpi if 10 cpi was selected, or
20 cpi if 12 cpi was selected.
Control code:SI
Hexadecimal:0F
Escape Sequence:ESCSI
Hexadecimal:1B0F
47
IBM Proprinter Emulation
Select Double-Wide Mode (one line)SO
(or)ESC SO
Selects double-wide mode for one line. Double-wide mode doubles the width of all characters, but
does not affect character height. This mode is cancelled by a carriage return or DC4.
Control code:SO
Hexadecimal:0E
Escape Sequence:ESCSO
Hexadecimal:1B0E
Cancel Double-Wide Mode (one line)DC4
Cancels double-wide mode selected by SO or ESC SO. Does not cancel double-wide mode selected
by ESC W or ESC !.
Control code:DC4
Hexadecimal:14
Double-Wide ModeESC W n
Selects double-wide mode for n=1, or cancels for n=0. Double-wide mode doubles the width of all
characters, but does not affect character height.
Example: The following escape sequence will select double-wide mode.
Escape Sequence:ESCW1
Hexadecimal:1B5731
Double-High ModeESC [ @ n1 n2 m1 m2 m3 m4
Selects single or double-high mode, single or double-wide mode, and single or double line feeds.
The two bytes n1 and n2 specify how many mode bytes (m1, m2, m3, m4) follow. Theoretically, there
may be n1 + (n2 x 256) mode bytes. Actually, n2 must be 0, and n1 may be 0 to 4, but is normally 4.
m1 and m2 must be 0 (NUL). m3 and m4 may be set to the values in the following tables.
m3
000no change
Example: The following escape sequence will select double-wide and double-high mode, with double
line feeds.
101line feeds unchanged, single-high characters
202line feeds unchanged, double-high characters
1610single line feeds, character height unchanged
1711single line feeds, single-high characters
1812single line feeds, double-high characters
3220double line feeds, character height unchanged
3321double line feeds, single-high characters
3422double line feeds, double-high characters
Selects subscript mode for n=1, or superscript mode for n=0. This will print characters about half the
normal height, in the bottom or top half of the normal character cell.
Example: The following escape sequence will select superscript mode.
Escape Sequence:ESCS0
Hexadecimal:1B5330
Cancel Subscript and Superscript ModeESC T
Cancels subscript and superscript mode.
Escape Sequence:ESCT
Hexadecimal:1B54
Character Attributes
Select Emphasized ModeESC E
Selects emphasized mode. This makes characters bolder by printing an extra dot to the right of each
dot normally found in the character matrix. This will cut the print speed in half, but will not require an
additional pass of the print head. Overrides the “Impact Force” value in the forms menu.
Escape Sequence:ESCE
Hexadecimal:1B45
Cancel Emphasized ModeESC F
Cancels emphasized mode. Overrides the “Impact Force” value in the forms menu.
Escape Sequence:ESCF
Hexadecimal:1B46
Select Double-Strike ModeESC G
Selects double-strike mode. This makes text bolder by printing it twice. This will cut the print speed
in half, because an additional pass of the print head will be required.
Escape Sequence:ESCG
Hexadecimal:1B47
Cancel Double-Strike ModeESC H
Cancels double-strike mode.
49
IBM Proprinter Emulation
Escape Sequence:ESCH
Hexadecimal:1B48
Underline ModeESC - n
Selects underline mode for n=1, or cancels for n=0. This mode provides continuous underlining for all
characters, including spaces.
Example: The following escape sequence will turn underlining on.
Escape Sequence:ESC-1
Hexadecimal:1B2D31
Character Sets
Select Character Set 1ESC 7
Selects character set 1. Disables printing of character values 0 through 31 decimal, and 128 through
159 decimal, so these characters will be treated as control codes. Overrides the “Characters” value in
the interface setup menu.
Escape Sequence:ESC7
Hexadecimal:1B37
Select Character Set 2ESC 6
Selects character set 2. Enables printing of character values 0 through 31 decimal if they are not used
as control codes. Enables printing of character values 128 through 159 decimal, so these characters
will not be treated as control codes. Overrides the “Characters” value in the interface setup menu.
Escape Sequence:ESC6
Hexadecimal:1B36
Print Single CharacterESC ^ n
Prints the character n from the all characters chart. This sequence may be used to print a character that
is normally treated as a control code.
Example: The following escape sequence will print a left arrow. This character is normally not
printable, since it is treated as the ESC control code.
Escape Sequence:ESC^ESC
Hexadecimal:1B5E1B
Print CharactersESC \ n1 n2
Prints the next n1 + (n2 x 256) characters from the all characters chart. This sequence may be used to
print characters that are normally treated as a control codes.
Example: The following escape sequence will print an up arrow, a down arrow, a right arrow, and a
left arrow.
Sets the line spacing to 1/8 of an inch per line (8 lpi). Overrides the “Lines/Inch” value in the forms
menu.
Escape Sequence:ESC0
Hexadecimal:1B30
Set Line Spacing to 7/72”ESC 1
Sets the line spacing to 7/72 of an inch per line. Since the distance between print head wires is 1/72 of
an inch, this is equivalent to setting seven wire spacing. This is not particularly useful for text, but
may be useful for graphics if 7-bit graphics data is being sent. Overrides the “Lines/Inch” value in the
forms menu.
Escape Sequence:ESC1
Hexadecimal:1B31
Start Line SpacingESC 2
Sets the line spacing to the value selected by ESC A n. Overrides the “Lines/Inch” value in the forms
menu.
Escape Sequence:ESC2
Hexadecimal:1B32
Set Line Spacing to n/216”ESC 3 n
Sets the line spacing to n/216 of an inch per line. 0 ≥n≥255. Overrides the “Lines/Inch” value in the
forms menu.
51
IBM Proprinter Emulation
NOTE: The actual resolution of the printer's paper stepper motor is 1/288 of an inch. When spacing is
specified in 1/216 of an inch, the printer will actually move paper to the nearest 1/288 of an inch.
Example: The following escape sequence will set line spacing to one half inch.
Escape Sequence:ESC3108
Hexadecimal:1B336C
Set Line Spacing to n/72”ESC A n
Sets the line spacing to n/72 of an inch per line. 0≥n≥255. Since the distance between print head wires
is 1/72 of an inch, this is equivalent to setting n wire spacing. This spacing is stored but does not take
effect until ESC 2 is received. Overrides the “Lines/Inch” value in the forms menu.
Example: The following escape sequence will set line spacing to 8/72 of an inch, for use with eight
wire graphics.
Escape Sequence:ESCA8
Hexadecimal:1B4108
Horizontal Position
Carriage ReturnCR
Causes the current line to be printed, and then sets the current print position to the left margin. If
“Auto LF” is set to “On” in the interface setup menu, a line feed will also be performed.
Control code:CR
Hexadecimal:0D
52
IBM Proprinter Emulation
BackspaceBS
Causes the current line to be printed, and then moves the current print position one space to the left.
The actual distance moved depends on the current character spacing. Backspacing can be done up to,
but not beyond, the left margin.
Control code:BS
Hexadecimal:08
Vertical Position
Line FeedLF
Causes the current line to be printed, and then advances the paper one line at the current line spacing.
If “Auto CR” is set to “On” in the interface setup menu, a carriage return will also be performed.
Control code:LF
Hexadecimal:0A
Variable Distance Line FeedESC J n
Causes the current line to be printed, and then performs a single line feed of n/216ths of an inch.
0≥n≥255. Does not change the current line spacing. If “Auto CR” is set to “On” in the interface setup
menu, a carriage return will also be performed.
Example: The following escape sequence will advance the paper one half inch.
Escape Sequence:ESCJ108
Hexadecimal:1B4A6C
Form Length and Form Feed
Form length is the distance from the top of the form to the bottom of the form. Form length may be
specified either in inches, or in lines. A form feed will advance the paper to the top of the next form.
Some programs do not send form feeds. Instead, they count line feeds, and send the appropriate
number of line feeds to fill out the page. The usual rational is that the program is then in complete
control of form length, and will work on any printer without requiring the correct form length to be set.
However, the correct form length should always be set with the control panel setup. Even if the
program does not use form feeds, the printer will automatically scroll a completed form up to the tear
bar to be torn off. This automatic scroll is based upon form length. The easiest way to set form length
is via the “Form Length” value in the forms menu, so it will be correctly set for everyone using the
form. If correct form length cannot be guaranteed from SETUP, then each program should set the
correct form length.
Set Form Length in LinesESC C n
Sets the form length to n lines at the current line spacing. 1≥n≥255. Maximum form length is 37.9
inches. Invalid form lengths will be ignored. Overrides the “Form Length” value in the forms menu.
53
IBM Proprinter Emulation
For example, an 11 inch form contains 66 lines at 6 LPI, but 88 lines at 8 LPI. If line spacing is
changed after setting the form length, the physical form length (in inches) will not be changed.
Resets top of form to the current position, so it is wise to be at top of form before setting form length.
Issuing a form feed will guarantee this. Vertical margins are cleared.
Example: The following escape sequence will set form length to 66 lines. At 6 LPI, this will result in
a form length of 11 inches.
Escape sequence:ESCC66
Hexadecimal:1B4342
Set Form Length in InchesESC C NUL n
Sets the form length to n inches. 1≥n≥37. Maximum form length is 37.9 inches. Invalid form lengths
will be ignored. Overrides the “Form Length” value in the forms menu.
Resets top of form to the current position, so it is wise to be at top of form before setting form length.
Issuing a form feed will guarantee this. Vertical margins are cleared.
Example: The following escape sequence will set form length to 11 inches, regardless of what line
spacing is set.
Escape sequence:ESCCNUL11
Hexadecimal:1B43000B
Form FeedFF
Causes the current line to be printed, and then advances the paper to the top of the next form. If a top
margin is set, printing will continue at the top margin. Setting “Host FF at TOF” to “No” in the
interface setup menu allows a form feed to be ignored if the paper is already at top of form. If “Auto
CR” is set to “On” in the interface setup menu, a carriage return will also be performed.
Control code:FF
Hexadecimal:0C
Set Top of FormESC 4
Sets top of form to the current position.
Escape Sequence:ESC4
Hexadecimal:1B34
Horizontal Tabs
Default horizontal tab stops are set at every eighth column, i.e. column 9, 17, 25, 33, 41, etc. The
default tab stops are associated with columns, not absolute physical positions. Changing character
spacing will change the physical position of the default tab stops.
User defined horizontal tab stops are associated with absolute physical positions, not with columns.
The tab stops are set relative to the current character spacing, but subsequent changes in character
spacing will not affect the physical position of the tab stops (except that the position will be rounded
up to the closest character boundary).
54
IBM Proprinter Emulation
Horizontal TabHT
Advances to the next horizontal tab stop. If no tab stop exists between the active column and the right
margin, the HT will be ignored. Default tab stops are set at every eighth column, i.e. column 9, 17, 25,
33, 41, etc. Different tab stops may be set with ESC D.
Control code:HT
Hexadecimal:09
Set Horizontal Tab StopsESC D n1 n2 ... nx NUL
Clears all currently set horizontal tab stops, and sets new tab stops at column n1, n2, n3, etc. 1≥n≥255.
The tab stops must be presented in ascending order. The NUL character, or any tab stop value less
than the preceding one, terminates the sequence. The tab stops are set relative to the current character
spacing, but subsequent changes in character spacing will not affect the physical position of the tab
stops (except that the position will be rounded up to the closest character boundary). The leftmost
column is column one.
Default tab stops are set at every eighth column, i.e. column 9, 17, 25, 33, 41, etc. The tab stops set by
ESC D will replace the default tab stops. ESC D NUL will clear all tab stops, leaving no tab stops set.
The default tab stops are restored by ESC R.
Example: The following escape sequence will set horizontal tab stops at half inch intervals, if
character spacing is currently 10 cpi.
Vertical tab stops are associated with absolute physical positions, not with lines. The tab stops are set
relative to the current line spacing, but subsequent changes in line spacing will not affect the physical
position of the tab stops.
Vertical TabVT
Causes the current line to be printed, and then advances the paper to the next vertical tab stop. If no
vertical tab stops are set, then a line feed is done instead. If “Auto CR” is set to “On” in the interface
setup menu, a carriage return will also be performed.
Control code:VT
Hexadecimal:0B
Set Vertical Tab StopsESC B n1 n2 ... nx NUL
Clears all currently set vertical tab stops, and sets new tab stops at line n1, n2, n3, etc. 1≥n≥255. The
tab stops must be presented in ascending order. The NUL character, or any tab stop value less than the
preceding one, terminates the sequence. The tab stop settings are based on the current line spacing.
Changing the line spacing after the tab stops are set will not affect the position of the tab stops. The
first line is line one.
ESC B NUL or ESC R will clear all currently set vertical tab stops, leaving no vertical tab stops set.
Example: The following escape sequence will set vertical tab stops at line 7, 13, and 25. If line
spacing is currently 6 lpi, this will result in tab stops one inch, two inches, and four inches from the top
of the form.
Clears all currently set horizontal tab stops, and returns to default horizontal tab stops. Default
horizontal tab stops are set at every eighth column, i.e. column 9, 17, 25, 33, 41, etc. Clears all
currently set vertical tab stops.
Escape Sequence:ESCR
Hexadecimal:1B52
Horizontal Margins
Printing is allowed only within the left and right margins. Exceeding the right margin will cause line
wrap, setting the current print position to the left margin and advancing the paper one line.
56
IBM Proprinter Emulation
Set Left and Right MarginESC X n1 n2
Sets the left margin to column n1 and the right margin to column n2 at the current character spacing.
0≥n1≥255, 0≥n2≥255. If character spacing is changed after setting the margins, the position of the
margins will not change.
The left margin is inclusive, but the right margin is exclusive. For example, a left margin at column 11
still allows a character to be printed in column 11. A right margin at column 76 allows a character to
be printed in column 75, but not in column 76.
The leftmost column is column one. If n1 or n2 is zero, the corresponding margin is not changed. The
left margin must be left of the right margin and ≥13.4 inches. The right margin must be right of the left
margin and ≥13.6 inches. Invalid margins will be ignored. Overrides the “Left Margin” and “Right
Margin” values in the forms menu.
Example: The following escape sequence will set a one inch left margin, and will set a right margin
7.5 inches from the left edge of the form, if character spacing is currently 10 cpi. For a standard 8.5
inch wide form, this would result in a one inch right margin.
Escape Sequence:ESCX1176
Hexadecimal:1B580B4C
Vertical Margins
Printing is allowed only within the top and bottom margins. Exceeding the bottom margin will set the
current line to the top margin of the next form.
Set Perforation SkipESC N n
Sets the perforation skip distance to n lines at the current line spacing. 1 ≥n≥255. If line spacing is
changed after setting the skip distance, the skip distance will not be changed.
The skip distance is split between the top and bottom margins, so the perforation will be centered in
the resulting white space. The specified skip distance must be less than the form length, or the
command will be ignored. Perforation skip is canceled by ESC O, ESC C n or ESC C NUL n.
Overrides the “Top Margin” and “Bottom Margin” values in the forms menu.
Example: The following escape sequence will set a two inch perforation skip distance, if the current
line spacing is 6 lpi. This will result in a one inch top and bottom margin.
Escape Sequence:ESCN12
Hexadecimal:1B4E0C
Cancel Perforation SkipESC O
Cancels perforation skip. This is equivalent to having no top and bottom margin. Overrides the “Top
Margin” and “Bottom Margin” values in the forms menu.
Escape Sequence:ESCO
Hexadecimal:1B4F
57
IBM Proprinter Emulation
Graphics
Graphics mode gives the user complete control over every dot position on the paper. Graphics may be
printed with various horizontal densities from 60 to 240 dpi, and a vertical density of 72 dpi.
Each byte of graphics data represents a vertical column of eight dots, with the MSB (most significant
bit) corresponding to the top wire of the print head. Turning a bit on causes a dot to be printed. The
bit values corresponding to each wire of the print head are shown below:
The appropriate bit values are added together to fire the desired wires. For example, a byte of graphics
data with the value 128 (80 hex) will fire the top wire, wire 1. A value of 192 (C0 hex) will fire the top
two wires, wires 1 and 2. A value of 11 (0B hex) will fire wires 5, 7 and 8.
Each graphics sequence contains two bytes (n1 and n2) that specify how many bytes of graphics data
follow. The first byte, n1, can specify values up to 255. If that is sufficient, then n2 is set to zero. For
values greater than 255, n2 comes into play. The n2 byte specifies multiples of 256. For example, to
specify 520 bytes of graphics data, n1 = 8 and n2 = 2. The bytes of graphics data are strung together to
create a graphics line that is eight dots high, and n1 + (n2 x 256) dots long. Be sure to provide the
amount of graphics data that you specify, because the printer will not leave graphics mode until it has
accepted the specified number of data bytes.
If “Data Bits” is set to “7” in the interface setup menu, beware of potential problems in graphics mode.
Since the MSB (most significant bit) will always be turned off, it will not be possible to fire the top
wire of the print head. Worse yet, the value of n1 or n2 may be changed. For example, if n1 specifies
200 bytes of data, and its MSB is turned off, the printer will only expect 72 bytes of data. It will exit
graphics mode, and then try to print the remaining 128 bytes of graphics data as normal text characters.
The result will surely not be pretty. To avoid such problems, the use of an 8-bit I/O interface for
printing graphics is highly recommended.
The normal graphics modes allow every dot to be printed. High speed graphics will print twice as fast,
but will not allow consecutive dots to be printed.
60 DPI GraphicsESC K n1 n2 data
Selects eight wire single density (60 dpi) graphics for n1 + (n2 x 256) columns of data.
Example: The following escape sequence will print six bytes of graphics data at 60 dpi. The resulting
figure will resemble a backslash character, “\”.
Escape Sequence:ESCK6012864321684
Hexadecimal:1B4B0600804020100804
120 DPI GraphicsESC L n1 n2 data
Selects eight wire double density (120 dpi) graphics for n1 + (n2 x 256) columns data.
Example: The following escape sequence will print six bytes of graphics data at 120 dpi. The
resulting figure will resemble a backslash character, “\”.
Selects eight wire high speed double density (120 dpi) graphics for n1 + (n2 x 256) columns of data.
Horizontally adjacent dots may not be printed.
Example: The following escape sequence will print six bytes of graphics data at 120 dpi. The
resulting figure will resemble a backslash character, “\”.
Selects eight wire quadruple density (240 dpi) graphics for n1 + (n2 x 256) columns of data.
Horizontally adjacent dots may not be printed.
Example: The following escape sequence will print six bytes of graphics data at 240 dpi. The
resulting figure will resemble a backslash character, “\”.
Causes the printer's bell to sound.
Control code:BEL
Hexadecimal:07
Unidirectional ModeESC U n
Selects unidirectional mode for n=1, or bidirectional mode for n =0. Printing is normally bidirectional.
Unidirectional printing provides more accurate positioning, but causes lower throughput.
Example: The following escape sequence will force unidirectional printing.
Escape Sequence:ESCU1
Hexadecimal:1B5531
Automatic Line FeedESC 5 n
Selects automatic line feed mode for n=1, or cancels for n=0. Automatic line feed mode causes the
printer to automatically perform a line feed (LF) for each carriage return (CR) it receives. Overrides
the “Auto LF” value in the interface setup menu.
Example: The following escape sequence will select automatic line feed mode.
Escape Sequence:ESC51
Hexadecimal:1B3531
60
IBM Proprinter Emulation
Emulations
Select Software Interface nESC ESC n
Selects the software interface n according to the table below.
n
0Test (reserved for factory use)
Overrides the “Emulation” value in the interface setup menu.
A numeric value for n may be specified in two different ways, with equivalent results: a single byte
with a value of 00 to 07 hex, or a single printable ASCII character “0” to “7” (30 to 37 hex).
If more than one emulation has been selected, ESC ESC ? will return to the previously selected
emulation. This is particularly useful when the previous emulation is unknown. Please beware that the
memory (stack) is only one level deep.
ESC ESC @ will return to the default emulation, as specified by the “Emulation” value in the interface
setup menu.
This chapter describes IBM Proprinter emulation. If a different interface is selected, the control codes
and escape sequences described in this chapter will no longer be applicable.
Example: The following escape sequences will select Printek emulation, load form one, and then
return to the previous emulation.
BELBell
BSBackspace
CANCancel Line
CRCarriage Return
DC2Select 10 CPI
DC4Cancel Double-Wide Mode (one line)
ESC - nUnderline Mode
ESC 0Select 8 LPI
ESC 1Set Line Spacing to 7/72”
ESC 2Start Line Spacing
ESC 3 nSet Line Spacing to n/216”
ESC 4Set Top of Form
ESC 5 nAutomatic Line Feed
ESC 6Select Character Set 2
ESC 7Select Character Set 1
ESC :Select 12 CPI
ESC A nSet Line Spacing to n/72”
ESC B n1 n2 ... nx NULSet Vertical Tab Stops
ESC C NUL nSet Form Length in Inches
ESC C nSet Form Length in Lines
ESC D n1 n2 ... nx NULSet Horizontal Tab Stops
ESC ESelect Emphasized Mode
ESC ESC nSelect Software Interface n
ESC FCancel Emphasized Mode
ESC GSelect Double-Strike Mode
ESC HCancel Double-Strike Mode
ESC I nSelect Print Mode
ESC J nVariable Distance Line Feed
ESC K n1 n2 data60 DPI Graphics
ESC L n1 n2 data120 DPI Graphics
ESC N nSet Perforation Skip
ESC OCancel Perforation Skip
ESC Q nDeselect Printer
ESC RReset Horizontal and Vertical Tab Stops
ESC S nSelect Subscript or Superscript Mode
ESC SISelect Condensed Mode
ESC SOSelect Double-Wide Mode (one line)
ESC TCancel Subscript and Superscript Mode
ESC U nUnidirectional Mode
ESC W nDouble-Wide Mode
ESC X n1 n2Set Left and Right Margin
ESC Y n1 n2 dataHigh Speed 120 DPI Graphics
ESC Z n1 n2 dataHigh Speed 240 DPI Graphics
ESC [ @ n1 n2 m1 m2 m3 m4Double-High Mode
ESC \ n1 n2Print Characters
Sorted Alphabetically
62
IBM Proprinter Emulation
ESC ^ nPrint Single Character
ETXEnd of Text
FFForm Feed
HTHorizontal Tab
LFLine Feed
SISelect Condensed Mode
SOSelect Double-Wide Mode (one line)
VTVertical Tab
63
DEC LA120 EMULATION
Introduction
This section describes the control codes and escape sequences comprising DEC LA120 emulation.
This emulation may be selected by setting “Emulation” to “LA120” in the interface setup menu, or via
software with the ESC ESC 5 sequence. While this emulation is selected, control codes and escape
sequences from other emulations are not available.
Control codes and escape sequences are used to control printer operation. An ASCII control code is a
single character in the range 00 hex through 1F hex, and 7F hex. The ESC (Escape) control code (1B
hex) is used to introduce character strings called escape sequences, which provide an extension of the
commands available with ASCII control codes.
The LA120 control codes and escape sequences follow the standards of the ANSI X3.64 specification.
Many ANSI escape sequences begin with a two character Control Sequence Introducer (CSI), Escape
Left Square Bracket (ESC [, 1B 5B hex). If 8-bit data is selected via control panel setup, these two
characters may be replaced by a single character CSI, 9B hex. The sequences are always documented
in this section with the two character CSI (ESC [), because this format seems to be much more
common, and works equally well with 7-bit or 8-bit data.
Some escape sequences accept one or more numeric parameters. A numeric parameter is a decimal
number represented by a string of ASCII decimal digits (“0” through “9”). Leading zeros may be
supplied, but are not necessary. Due to implementation constraints, the largest value that can be
accepted is decimal 255. Larger values will be treated as zero. Omitting a numeric parameter is
equivalent to supplying a value of zero.
If a sequence accepts one numeric parameter, it will be represented as “n”. If a sequence accepts more
than one numeric parameter, they will be represented as “n1; n2; ... nx”. Note that multiple numeric
parameters are separated by a semicolon.
Most LA120 escape sequences will assume one of the following formats:
ESC f(no numeric parameters)
ESC n f(one numeric parameter)
ESC n1; n2; ... nx f(two or more numeric parameters)
The “f” at the end of the escape sequence represents the final character. It terminates the sequence, and
specifies the function to be performed.
Spaces are used when documenting escape sequences to increase readability. The spaces within the
sequences are for readability only; they are not part of the sequences themselves. Characters that
appear in italics (such as “n” and “f” above) are not sent to the printer as is; they are used as a place
holder indicating that some value must be supplied.
Multiple character strings without intervening spaces typically represent control codes. For example,
BS is the Backspace control code (08 hex), not the two characters “B” and “S” (42 and 53 hex). An
ASCII Control Code Table is provided on page 139 for your convenience. If you have any doubt
about how to interpret a documented control code or escape sequence, refer to the hex representation in
the provided example. This should clarify any ambiguity. The examples may also be helpful when
analyzing a hex dump (see Hex Dump chapter) printed by the printer.
65
DEC LA120 Emulation
Some escape sequences refer to the active column or active line. The active column is the column
where the next character will be printed. Printing a character or a space will increment the active
column. The active line is the line where the next character will be printed. A line feed will increment
the active line. Column and line numbers begin at one, not at zero. Keep this in mind when setting
tabs, margins, etc.
66
DEC LA120 Emulation
Control Codes and Escape Sequences
Grouped by Function
Communications
NullNUL
This control code is ignored by the printer.
Control code:NUL
Hexadecimal:00
DeleteDEL
This control code is ignored by the printer.
Control code:DEL
Hexadecimal:7F
End of TextETX
If “ETX/ACK” is set to “On” in the interface setup menu, then receipt of an ETX causes the printer to
transmit an ACK to the host computer.
Since the ETX may be a legal value within an escape sequence, it is the user's responsibility to ensure
that an ETX used for data handshake is not sent within an escape sequence. The user must also ensure
that the maximum block size or the number of blocks sent at one time does not exceed the input buffer
size of the printer.
ETX/ACK handshake is available only with serial I/O.
Control code:ETX
Hexadecimal:03
67
DEC LA120 Emulation
Character Size
The FormsMaster 8000 series printers are capable of supporting 10, 12, 13.3, 15, 16.7, 17.14, and 20
cpi, but most emulations support only a subset of these. LA120 emulation supports 10, 12, 13.3, and
16.7 cpi via software, but does not support 15, 17.14, or 20 cpi. Every emulation supports 10 cpi, and
we consider this to be the default character pitch. When you use the control panel to change the
“Characters/Inch” value in the forms menu, you are actually changing the default character pitch.
When the printer is turned on (or reset), it will use this character pitch. You can even use a pitch that is
not supported by your emulation, such as 15 cpi with LA120 emulation. You can override this pitch
selection via software, by sending an escape sequence. This selects a user specified non-default pitch.
For example, in LA120 emulation, sending ESC [2w will select 12 cpi. Sending ESC [w will re-select
10 cpi, and thus re-select the default character pitch that was selected in the form setup.
Via software escape sequences, you can select any character pitch supported by the emulation you are
using. All will print as expected, unless you select 10 cpi -- because 10 cpi really selects the default
character pitch from setup. If you really want 10 cpi, then you must set “Characters/Inch” to “10” in
the forms menu. Likewise, if you want to use the default pitch from setup, you must not override it.
Either send no character pitch sequences to the printer, or make sure you re-select 10 cpi via software.
When you select different forms, the default character pitch from setup is selected along with the form.
But you will not see this default pitch if it has already been overridden via software.
Set Character SpacingESC [ n w
Sets the character spacing as specified in the following table. Omitting n is equivalent to specifying
zero.
n
010 cpi
Overrides the “Characters/Inch” value in the forms menu.
Example: The following escape sequence will select 10 cpi character spacing. If “Characters/Inch”
was not set to “10” in the forms menu, the specified default character pitch will be selected instead of
10 cpi.
Escape Sequence:ESC[w
Hexadecimal:1B5B77
Example: The following escape sequence will select 12 cpi character spacing.
Escape Sequence:ESC[2w
Selects the graphic rendition n from the following table.
n
0Normal
For italic mode to work correctly, an Epson FX font must be selected (check the “Font” value in the
forms menu). The other available fonts do not include italic characters.
Example: The following escape sequence will select emphasized mode.
Escape Sequence:ESC[1m
Hexadecimal:1B5B316D
1Emphasized
3Italic
4Underline
Rendition
Character Sets
Select International Character SetESC ( a
Selects the international character set as specified by the character a in the following table. Overrides
the “Language” value in the forms menu.
a
AUnited Kingdom
BUnited States of America
CSweden
EDenmark
HSweden
KGermany
RFrance
Character Set
The actual character substitutions are shown in the “International Character Mapping” table below.
For this to work correctly, an Epson FX font must be selected (check the “Font” value in the forms
menu).
Example: The following escape sequence will select the German character set.
Escape Sequence:ESC(K
Hexadecimal:1B284B
Line Pitch
Set Line SpacingESC [ n z
Sets the line spacing as specified in the following table. Omitting n is equivalent to specifying zero.
n
06 lpi
Overrides the “Lines/Inch” value in the forms menu.
Example: The following escape sequence will set line spacing to 1/6 of an inch per line (6 lpi).
Escape Sequence:ESC[z
Hexadecimal:1B5B7A
Example: The following escape sequence will set line spacing to 1/8 of an inch per line (8 lpi).
Escape Sequence:ESC[2z
Hexadecimal:1B5B327A
16 lpi
28 lpi
312 lpi
42 lpi
53 lpi
64 lpi
line pitch
70
DEC LA120 Emulation
Horizontal Position
Carriage ReturnCR
Causes the current line to be printed, and then sets the current print position to the left margin. If
“Auto LF” is set to “On” in the interface setup menu, a line feed will also be performed.
Control code:CR
Hexadecimal:0D
BackspaceBS
Causes the current line to be printed, and then moves the current print position one space to the left.
The actual distance moved depends on the current character spacing. Backspacing can be done up to,
but not beyond, the left margin.
Control code:BS
Hexadecimal:08
Absolute Horizontal TabESC [ n `
Sets the current print position to column n. The actual position will depend on the current character
spacing. If n is less than the left margin, the active column will be set to the left margin. If n is greater
than the right margin, then a line feed will be performed and the active column will be set to the left
margin.
Example: The following escape sequence will set the active column to column 65.
Escape Sequence:ESC[65`
Hexadecimal:1B5B363560
Relative Horizontal TabESC [ n a
Advances the current print position by n columns. The actual distance moved will depend on the
current character spacing. Equivalent to sending n spaces (SP).
Example: The following escape sequence will advance the active column by 10 columns. If current
character spacing is 10 cpi, this will cause the print position to move one inch to the right.
Escape Sequence:ESC[10a
Hexadecimal:1B5B313061
71
DEC LA120 Emulation
Vertical Position
Line FeedLF
(or)IND
(or)ESC D
Causes the current line to be printed, and then advances the paper one line at the current line spacing.
If “Auto CR” is set to “On” in the interface setup menu, a carriage return will also be performed.
Control code:LF
Hexadecimal:0A
Control code:IND
Hexadecimal:84
Escape Sequence:ESCD
Hexadecimal:1B44
Absolute Vertical TabESC [ n d
Sets the current line to line n of the current form. The actual position will depend on the current line
spacing.
Example: The following escape sequence will set the active line to line 12.
Escape Sequence:ESC[12d
Hexadecimal:1B5B313264
Relative Vertical TabESC [ n e
Advances the active line by n lines. The actual distance moved will depend on the current line
spacing. Equivalent to sending n line feeds (LF).
Example: The following escape sequence will advance the active line by 12 lines. If current line
spacing is 6 lpi, this will cause the paper to advance one inch.
Escape Sequence:ESC[12e
Hexadecimal:1B5B313265
72
DEC LA120 Emulation
Horizontal and Vertical Position
New LineNEL
(or)ESC E
Causes the current line to be printed, and then sets the current print position to the left margin and
performs a line feed. Equivalent to a carriage return (CR) line feed (LF) combination.
Control code:NEL
Hexadecimal:85
Escape Sequence:ESCE
Hexadecimal:1B45
Form Length and Form Feed
Form length is the distance from the top of the form to the bottom of the form. A form feed will
advance the paper to the top of the next form. Some programs do not send form feeds. Instead, they
count line feeds, and send the appropriate number of line feeds to fill out the page. The usual rational
is that the program is then in complete control of form length, and will work on any printer without
requiring the correct form length to be set. However, the correct form length should always be set with
the control panel setup. Even if the program does not use form feeds, the printer will automatically
scroll a completed form up to the tear bar to be torn off. This automatic scroll is based upon form
length. The easiest way to set form length is via the “Form Length” value in the forms menu, so it will
be correctly set for everyone using the form. If correct form length cannot be guaranteed from
SETUP, then each program should set the correct form length.
Set Form Length in LinesESC [ n t
Sets the form length to n lines at the current line spacing. 1≥n≥255. Maximum form length is 37.9
inches. Invalid form lengths will be ignored. Overrides the “Form Length” value in the forms menu.
For example, an 11 inch form contains 66 lines at 6 LPI, but 88 lines at 8 LPI. If line spacing is
changed after setting the form length, the physical form length (in inches) will not be changed.
Resets top of form to the current position, so it is wise to be at top of form before setting form length.
Issuing a form feed will guarantee this. Vertical margins are cleared.
Example: The following escape sequence will set form length to 66 lines. At 6 LPI, this will result in
a form length of 11 inches.
Escape sequence:ESC[66t
Hexadecimal:1B5B363674
73
DEC LA120 Emulation
Form FeedFF
Causes the current line to be printed, and then advances the paper to the top of the next form. If a top
margin is set, printing will continue at the top margin. Setting “Host FF at TOF” to “No” in the
interface setup menu allows a form feed to be ignored if the paper is already at top of form. If “Auto
CR” is set to “On” in the interface setup menu, a carriage return will also be performed.
Control code:FF
Hexadecimal:0C
Horizontal Tabs
Horizontal tab stops are associated with columns, not absolute physical positions. Changing character
spacing will change the physical position of the tab stops. Default tab stops are set at every eighth
column, i.e. column 9, 17, 25, 33, 41, etc. If different tab stops are to be set, the default tab stops
should first be cleared.
Horizontal TabHT
Advances to the next horizontal tab stop. If no tab stop exists between the active column and the right
margin, the HT will be ignored. Default tab stops are set at every eighth column, i.e. column 9, 17, 25,
33, 41, etc. Different tab stops may be set with ESC H, ESC 1, or ESC [ n1 ; n2 ; ... nx u.
Control code:HT
Hexadecimal:09
Set Horizontal Tab StopHTS
(or)ESC H
(or)ESC 1
Sets a horizontal tab stop at the current print position. The tab stop is associated with the active
column, not an absolute physical position. Changing character spacing will change the physical
position of the tab stop.
Default tab stops are set at every eighth column, i.e. column 9, 17, 25, 33, 41, etc. The tab stop set by
this escape sequence will be added to previously set tab stops, including the default tab stops. If this is
not desired, the old tab stops should first be cleared.
Control code:HTS
Hexadecimal:88
Escape Sequence:ESCH
Hexadecimal:1B48
Escape Sequence:ESC1
Hexadecimal:1B31
Set Horizontal Tab StopsESC [ n1 ; n2 ; ... nx u
Sets new horizontal tab stops at column n1, n2, n3, etc. 1≥n≥255. The tab stops are associated with
columns, not absolute physical positions. Changing character spacing will change the physical
position of the tab stops. The leftmost column is column one.
74
DEC LA120 Emulation
Default tab stops are set at every eighth column, i.e. column 9, 17, 25, 33, 41, etc. The tab stops set by
this escape sequence will be added to previously set tab stops, including the default tab stops. If this is
not desired, the old tab stops should first be cleared.
Example: The following escape sequence will set horizontal tab stops at five column intervals.
Escape Sequence:ESC[6;11;16u
Hexadecimal:1B5B363B31313B313675
Example: The following escape sequence will set a horizontal tab stop at column six.
Escape Sequence:ESC[6u
Hexadecimal:1B5B3675
Clear Horizontal Tab StopESC [ g
(or)ESC [ 0 g
Clears the horizontal tab stop at the current print position. The tab stop to be cleared is associated with
the active column (based upon the current character spacing), not an absolute physical position.
Escape Sequence:ESC[g
Hexadecimal:1B5B67
Clear All Horizontal Tab StopsESC 2
(or)ESC [ 2 g
(or)ESC [ 3 g
Clears all currently set horizontal tab stops.
Escape Sequence:ESC2
Hexadecimal:1B32
Escape Sequence:ESC[2g
Hexadecimal:1B5B3267
Escape Sequence:ESC[3g
Hexadecimal:1B5B3367
75
DEC LA120 Emulation
Vertical Tabs
Vertical tab stops are associated with lines, not absolute physical positions. Changing line spacing will
change the physical position of the tab stops.
Vertical TabVT
Causes the current line to be printed, and then advances the paper to the next vertical tab stop. If no
vertical tab stops are set, then a line feed is done instead. If “Auto CR” is set to “On” in the interface
setup menu, a carriage return will also be performed.
Control code:VT
Hexadecimal:0B
Set Vertical Tab StopVTS
(or)ESC J
(or)ESC 3
Sets a vertical tab stop at the current line. The tab stop is associated with the active line, not an
absolute physical position. Changing line spacing will change the physical position of the tab stop.
The tab stop set by this escape sequence will be added to previously set tab stops. If this is not desired,
the old tab stops should first be cleared.
Control code:VTS
Hexadecimal:8A
Escape Sequence:ESCJ
Hexadecimal:1B4A
Escape Sequence:ESC3
Hexadecimal:1B33
Set Vertical Tab StopsESC [ n1 ; n2 ; ... nx v
Sets new vertical tab stops at line n1, n2, n3, etc. 1≥n≥255. The tab stops are associated with lines,
not absolute physical positions. Changing line spacing will change the physical position of the tab
stops. The first line is line one.
The tab stops set by this escape sequence will be added to previously set tab stops. If this is not
desired, the old tab stops should first be cleared.
Example: The following escape sequence will set vertical tab stops at line 7, 13, and 25. If line
spacing is 6 lpi, this will result in tab stops one inch, two inches, and four inches from the top of the
form.
Example: The following escape sequence will set a vertical tab stop at line seven.
Escape Sequence:ESC[7v
Hexadecimal:1B5B3776
Clear Vertical Tab StopESC [ 1 g
Clears the vertical tab stop at the current line. The tab stop to be cleared is associated with the active
line (based upon the current line spacing), not an absolute physical position.
Escape Sequence:ESC[1g
Hexadecimal:1B5B3167
Clear All Vertical Tab StopsESC 4
(or)ESC [ 4 g
Clears all currently set vertical tab stops.
Escape Sequence:ESC4
Hexadecimal:1B34
Escape Sequence:ESC[4g
Hexadecimal:1B5B3467
77
DEC LA120 Emulation
Horizontal Margins
Printing is allowed only within the left and right margins. Exceeding the right margin will cause line
wrap, setting the current print position to the left margin and advancing the paper one line.
Set Left and Right MarginESC [ n1 ; n2 s
Sets the left margin to column n1 and the right margin to column n2 at the current character spacing.
0≥n1≥255, 0≥n2≥255. If character spacing is changed after setting the margins, the position of the
margins will not change.
The margin settings are inclusive. For example, a left margin at column 11 allows a character to be
printed in column 11, but not in column 10. A right margin at column 75 allows a character to be
printed in column 75, but not in column 76.
The leftmost column is column one. If n1 or n2 is zero (or is omitted), the corresponding margin is not
changed. The left margin must be left of the right margin and ≥13.4 inches. The right margin must be
right of the left margin and ≥13.6 inches. Invalid margins will be ignored. Overrides the “Left
Margin” and “Right Margin” values in the forms menu.
Example: The following escape sequence will set a one inch left margin, and will set a right margin
7.5 inches from the left edge of the form, if character spacing is currently 10 cpi. For a standard 8.5
inch wide form, this would result in a one inch right margin.
Example: The following escape sequence will set the left margin to column 10, without affecting the
right margin.
Escape Sequence:ESC[10s
Hexadecimal:1B5B313073
Example: The following escape sequence will set the right margin to column 75, without affecting the
left margin.
Escape Sequence:ESC[;75s
Hexadecimal:1B5B3B373573
78
DEC LA120 Emulation
Vertical Margins
Printing is allowed only within the top and bottom margins. Exceeding the bottom margin will set the
current line to the top margin of the next form.
Set Top and Bottom MarginsESC [ n1 ; n2 r
Sets the top margin to line n1 and the bottom margin to line n2 at the current line spacing. 0≥n1≥255,
0≥n2≥255. If line spacing is changed after setting the margins, the position of the margins will not
change. Vertical margins are cleared by ESC [ n t.
The top and bottom margins are both inclusive. For example, a top margin at line 7 still allows text to
be printed on line 7, but not on line 6. A bottom margin at line 60 still allows text to be printed on line
60, but not on line 61.
The first line is line one. If n1 or n2 is zero (or is omitted), the corresponding margin is not changed.
The top margin must be above the bottom margin. The bottom margin must be below the top margin.
The margins cannot exceed the form length. Invalid margins will be ignored. Overrides the “Top
Margin” and “Bottom Margin” values in the forms menu.
Example: The following escape sequence will set a top margin at line 7, and will set a bottom margin
at line 60. For a standard 11 inch form with 6 lpi line spacing, this would result in one inch top and
bottom margins.
Example: The following escape sequence will set a top margin at line 7, without affecting the bottom
margin.
Escape Sequence:ESC[7r
Hexadecimal:1B5B3772
Example: The following escape sequence will set a bottom margin at line 60, without affecting the top
margin.
Escape Sequence:ESC[;60r
Hexadecimal:1B5B3B363072
79
DEC LA120 Emulation
Printer Controls
BellBEL
Causes the printer's bell to sound.
Control code:BEL
Hexadecimal:07
Select Automatic Carriage ReturnESC [ 20 h
Selects automatic carriage return mode. This causes the printer to automatically perform a carriage
return (CR) for each line feed (LF), vertical tab (VT), or form feed (FF) that it receives. Overrides the
“Auto CR” value in the interface setup menu.
Escape Sequence:ESC[20h
Hexadecimal:1B5B323068
Cancel Automatic Carriage ReturnESC [ 20 l
Cancels automatic carriage return mode. Overrides the “Auto CR” value in the interface setup menu.
Escape Sequence:ESC[20l
Hexadecimal:1B5B32306C
Printer IdentificationESC [ c
(or)ESC [ 0 c
Causes the printer to respond with ESC [ ? 2 c to identify itself as an LA120-RA printer. (The
response can only be sent if serial I/O is selected.)
Emulations
Select Software Interface nESC ESC n
Selects the software interface n according to the table below.
Overrides the “Emulation” value in the interface setup menu.
A numeric value for n may be specified in two different ways, with equivalent results: a single byte
with a value of 00 to 07 hex, or a single printable ASCII character “0” to “7” (30 to 37 hex).
If more than one emulation has been selected, ESC ESC ? will return to the previously selected
emulation. This is particularly useful when the previous emulation is unknown. Please beware that the
memory (stack) is only one level deep.
ESC ESC @ will return to the default emulation, as specified by the “Emulation” value in the interface
setup menu.
This chapter describes DEC LA120 emulation. If a different interface is selected, the control codes
and escape sequences described in this chapter will no longer be applicable.
Example: The following escape sequences will select Printek emulation, load form one, and then
return to the previous emulation.
BELBell
BSBackspace
CRCarriage Return
CSIControl Sequence Introducer
DELDelete
ESC ( aSelect International Character Set
ESC 1Set Horizontal Tab Stop
ESC 2Clear All Horizontal Tab Stops
ESC 3Set Vertical Tab Stop
ESC 4Clear All Vertical Tab Stops
ESC DLine Feed
ESC ENew Line
ESC ESC nSelect Software Interface n
ESC HSet Horizontal Tab Stop
ESC JSet Vertical Tab Stop
ESC [Control Sequence Introducer
ESC [ n `Absolute Horizontal Tab
ESC [ n aRelative Horizontal Tab
ESC [ cPrinter Identification
ESC [ 0 cPrinter Identification
ESC [ n dAbsolute Vertical Tab
ESC [ n eRelative Vertical Tab
ESC [ gClear Horizontal Tab Stop
ESC [ 0 gClear Horizontal Tab Stop
ESC [ 1 gClear Vertical Tab Stop
ESC [ 2 gClear All Horizontal Tab Stops
ESC [ 3 gClear All Horizontal Tab Stops
ESC [ 4 gClear All Vertical Tab Stops
ESC [ 20 hSelect Automatic Carriage Return
ESC [ 20 lCancel Automatic Carriage Return
ESC [ n mSelect Graphic Rendition
ESC [ n1 ; n2 rSet Top and Bottom Margins
ESC [ n1 ; n2 sSet Left and Right Margin
ESC [ n tSet Form Length in Lines
ESC [ n1 ; n2 ; ... nx uSet Horizontal Tab Stops
ESC [ n1 ; n2 ; ... nx vSet Vertical Tab Stops
ESC [ n wSet Character Spacing
ESC [ n zSet Line Spacing
ETXEnd of Text
FFForm Feed
HTHorizontal Tab
HTSSet Horizontal Tab Stop
INDLine Feed
LFLine Feed
NELNew Line
NULNull
Sorted Alphabetically
82
DEC LA120 Emulation
VTVertical Tab
VTSSet Vertical Tab Stop
83
SIMPLE TTY EMULATION
Introduction
This section describes the control codes and escape sequences comprising simple TTY emulation.
This emulation may be selected by setting “Emulation” to “TTY” in the interface setup menu, or via
software with the ESC ESC 6 sequence. While this emulation is selected, control codes and escape
sequences from other emulations are not available.
Control codes and escape sequences are used to control printer operation. An ASCII control code is a
single character in the range 00 hex through 1F hex, and 7F hex. The ESC (Escape) control code (1B
hex) is used to introduce character strings called escape sequences, which provide an extension of the
commands available with ASCII control codes.
TTY emulation is unique in that it does not support any escape sequences (except for the ESC ESC n
sequence, which may be used to select a different emulation).
Spaces are used when documenting escape sequences to increase readability. The spaces within the
sequences are for readability only; they are not part of the sequences themselves. Characters that
appear in italics (such as “n”) are not sent to the printer as is; they are used as a place holder indicating
that some value must be supplied.
Multiple character strings without intervening spaces typically represent control codes. For example,
BS is the Backspace control code (08 hex), not the two characters “B” and “S” (42 and 53 hex). An
ASCII Control Code Table is provided on page 139 for your convenience. If you have any doubt
about how to interpret a documented control code or escape sequence, refer to the hex representation in
the provided example. This should clarify any ambiguity. The examples may also be helpful when
analyzing a hex dump (see Hex Dump chapter) printed by the printer.
85
Simple TTY Emulation
Control Codes and Escape Sequences
Grouped by Function
Communications
End of TextETX
If “ETX/ACK” is set to “On” in the interface setup menu, then receipt of an ETX causes the printer to
transmit an ACK to the host computer.
Since the ETX may be a legal value within an escape sequence, it is the user's responsibility to ensure
that an ETX used for data handshake is not sent within an escape sequence. The user must also ensure
that the maximum block size or the number of blocks sent at one time does not exceed the input buffer
size of the printer.
ETX/ACK handshake is available only with serial I/O.
Control code:ETX
Hexadecimal:03
Horizontal Position
Carriage ReturnCR
Causes the current line to be printed, and then sets the current print position to the left margin. If
“Auto LF” is set to “On” in the interface setup menu, a line feed will also be performed.
Control code:CR
Hexadecimal:0D
BackspaceBS
Causes the current line to be printed, and then moves the current print position one space to the left.
The actual distance moved depends on the current character spacing. Backspacing can be done up to,
but not beyond, the left margin.
Control code:BS
Hexadecimal:08
86
Simple TTY Emulation
Vertical Position
Line FeedLF
Causes the current line to be printed, and then advances the paper one line at the current line spacing.
If “Auto CR” is set to “On” in the interface setup menu, a carriage return will also be performed.
Control code:LF
Hexadecimal:0A
Form Length and Form Feed
Form length is the distance from the top of the form to the bottom of the form. A form feed will
advance the paper to the top of the next form. Some programs do not send form feeds. Instead, they
count line feeds, and send the appropriate number of line feeds to fill out the page. The usual rational
is that the program is then in complete control of form length, and will work on any printer without
requiring the correct form length to be set. However, the correct form length should always be set with
the control panel setup. Even if the program does not use form feeds, the printer will automatically
scroll a completed form up to the tear bar to be torn off. This automatic scroll is based upon form
length. The easiest way to set form length is via the “Form Length” value in the forms menu so it will
be correctly set for everyone using the form.
Form FeedFF
Causes the current line to be printed, and then advances the paper to the top of the next form. If a top
margin is set, printing will continue at the top margin. Setting “Host FF at TOF” to “No” in the
interface setup menu allows a form feed to be ignored if the paper is already at top of form. If “Auto
CR” is set to “On” in the interface setup menu, a carriage return will also be performed.
Control code:FF
Hexadecimal:0C
87
Simple TTY Emulation
Horizontal Tabs
Default horizontal tab stops are set at every eighth column, i.e. column 8, 16, 24, 32, 40, etc. (The first
column is column zero.) The default tab stops are associated with columns, not absolute physical
positions. Changing character spacing will change the physical position of the default tab stops.
Horizontal TabHT
Advances to the next horizontal tab stop. If no tab stop exists between the active column and the right
margin, the HT will be ignored. Default tab stops are set at every eighth column, i.e. column 8, 16, 24,
32, 40, etc.
Control code:HT
Hexadecimal:09
Vertical Tabs
Vertical TabVT
Causes the current line to be printed, and then advances the paper to the next vertical tab stop. If no
vertical tab stops are set, then a line feed is done instead. If “Auto CR” is set to “On” in the interface
setup menu, a carriage return will also be performed.
It is not possible to set vertical tab stops in TTY emulation. If tab stops were previously set in some
other emulation, they will be used.
Control code:VT
Hexadecimal:0B
Printer Controls
BellBEL
Causes the printer's bell to sound.
Control code:BEL
Hexadecimal:07
88
Simple TTY Emulation
Emulations
Select Software Interface nESC ESC n
Selects the software interface n according to the table below.
n
0Test (reserved for factory use)
Overrides the “Emulation” value in the interface setup menu.
A numeric value for n may be specified in two different ways, with equivalent results: a single byte
with a value of 00 to 07 hex, or a single printable ASCII character “0” to “7” (30 to 37 hex).
If more than one emulation has been selected, ESC ESC ? will return to the previously selected
emulation. This is particularly useful when the previous emulation is unknown. Please beware that the
memory (stack) is only one level deep.
ESC ESC @ will return to the default emulation, as specified by the “Emulation” value in the interface
setup menu.
This chapter describes TTY emulation. If a different interface is selected, the control codes and escape
sequences described in this chapter will no longer be applicable.
Example: The following escape sequences will select Printek emulation, load form one, and then
return to the previous emulation.
BELBell
BSBackspace
CRCarriage Return
ESC ESC nSelect Software Interface n
ETXEnd of Text
FFForm Feed
HTHorizontal Tab
LFLine Feed
VTVertical Tab
Sorted Alphabetically
90
PRINTEK EMULATION
Introduction
This section describes the control codes and escape sequences comprising Printek emulation. This
emulation may be selected by setting “Emulation” to “Printek” in the interface setup menu, or via
software with the ESC ESC 7 sequence. While this emulation is selected, control codes and escape
sequences from other emulations are not available.
Control codes and escape sequences are used to control printer operation. An ASCII control code is a
single character in the range 00 hex through 1F hex, and 7F hex. The ESC (Escape) control code (1B
hex) is used to introduce character strings called escape sequences, which provide an extension of the
commands available with ASCII control codes.
Some escape sequences accept one or more numeric parameters. If a sequence accepts one numeric
parameter, it will be represented as “ n”. If a sequence accepts more than one numeric parameter, they
will be represented as “n1 n2 ... nx”.
Since numeric parameters are always encoded in one byte, their values may range from 0 to 255
decimal. Please note that the value will never be represented by a string of ASCII decimal digits (“0”
through “9”). For example, a value of 66 decimal would be sent as a single byte with a hex value of
42. This is equivalent to sending the ASCII character “B”. It is entirely different than sending the two
printable ASCII characters “66”.
If a numeric parameter is limited to a value of zero or one, it may be sent as a single byte with a value
of 00 or 01 hex (NUL or SOH), or it may be sent as a single printable ASCII character “0” or “1” (30
or 31 hex).
Spaces are used when documenting escape sequences to increase readability. The spaces within the
sequences are for readability only; they are not part of the sequences themselves. Characters that
appear in italics (such as “n” and “n1 n2” above) are not sent to the printer as is; they are used as a
place holder indicating that some value must be supplied.
Multiple character strings without intervening spaces typically represent control codes. For example,
BS is the Backspace control code (08 hex), not the two characters “B” and “S” (42 and 53 hex). An
ASCII Control Code Table is provided on page 139 for your convenience. If you have any doubt
about how to interpret a documented control code or escape sequence, refer to the hex representation in
the provided example. This should clarify any ambiguity. The examples may also be helpful when
analyzing a hex dump (see Hex Dump chapter) printed by the printer.
Column and line numbers begin at zero, not at one. Keep this in mind when setting tabs, margins, etc.
Printek emulation was developed to allow access to the full range of hardware features available in the
Printek FormsMaster 8000 series printers. Other emulations typically support some character pitches,
but not all character pitches. They do not allow the 10 different form setups to be selected via
software, or allow graphics of every possible density to be printed. Printek emulation supports all of
these features, and more, in one place. This makes Printek emulation the most powerful emulation
available in the printer. We encourage you to take full advantage of all the unique features available in
Printek emulation. After all, these features are the reason you purchased the FormsMaster printer.
The most common reason for using Printek emulation is to select a different form setup (and thus
change tractors). Many users switch to Printek emulation (using the ESC ESC 7 sequence), load a
91
Printek Emulation
new form (using the ESC L n sequence), and then return to their standard emulation (using the ESC
ESC n sequence). If you normally use Epson emulation, please note that the Epson sequence ESC
EM n allows Form 0, 1, or 2 to be selected without switching to Printek emulation.
92
Printek Emulation
Control Codes and Escape Sequences
Grouped by Function
Communications
End of TextETX
If “ETX/ACK” is set to “On” in the interface setup menu, then receipt of an ETX causes the printer to
transmit an ACK to the host computer.
Since the ETX may be a legal value within an escape sequence, it is the user's responsibility to ensure
that an ETX used for data handshake is not sent within an escape sequence. The user must also ensure
that the maximum block size or the number of blocks sent at one time does not exceed the input buffer
size of the printer.
ETX/ACK handshake is available only with serial I/O.
Control code:ETX
Hexadecimal:03
Deselect PrinterDC3
(or)XOFF
Deselects the printer. Use of this command is discouraged, because the printer will remain offline until
an operator presses the ONLINE button on the control panel.
Control code:DC3
Hexadecimal:13
93
Printek Emulation
Character Size
Set Character SpacingESC SP n
Sets character spacing in decipoints (n/720 of an inch). Overrides the”Characters/Inch” value in the
forms menu. Supported values are shown in the following table.
n
7210 cpi
Example: The following escape sequence will select 10 cpi character spacing.
Escape Sequence:ESCSP72
Selects double-wide mode for n=1, or cancels for n=0. Double-wide mode doubles the width of all
characters, but does not affect character height. ESC S 3 may be used to select double-high mode.
Example: The following escape sequence will select double-wide mode.
Escape Sequence:ESCW1
Hexadecimal:1B5731
Select Script ModesESC S n
Selects normal character height for n=0, subscript mode for n=1, superscript mode for n=2, or double-
high mode for n=3. This is shown in the following table.
n
0Script modes off
Subscript mode will print characters about half the normal height in the bottom half of the normal
character cell. Superscript mode will print characters about half the normal height in the top half of the
normal character cell. Double-high mode doubles the height of all characters. These modes are
mutually exclusive, and none of them affect character width.
94
1Subscript
2Superscript
3Double high
Script Mode
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.