Compuprint 4247 Model X03/Z03 Printers: Programmer Manual
MAN10299.00.00
Before using this information and the product it supports, read the information in “Notices” on page 357.
First edition (October 2011)
This edition applies to the Compuprint 4247 X03-Z03 printers and to all subsequent releases and modifications
until otherwise indicated in new edition.
Internet
Visit our home page: http://www.compuprint.com
You can send comments by e-mail to : support@compuprint.com
Compuprint s.r.l.
Via Lombardore 282
10040 Leinì (Turin)
ITALY
iiProgrammer Manual
or by mail to:
Contents
Figures ....................................xiii
Tables ....................................xv
The 4247 Model X03/Z03 Serial Matrix Printers ....................xvii
The 4247 Model X03/Z03 printers are professional, industrial impact-matrix printers. The 4247 Model
X03/Z03 printers are rugged printers designed for harsh environments and demanding applications. Each
of the 4247 models offers user-installable interface cards.
The 4247 Model X03/Z03 printers can have either one or two straight continuous-forms paper paths. One
paper path is standard, and the second path is an optional feature. The printer operator panel is common
with these models and includes the same full-function, full-size, 2 line by 24 character display, making
messages and menus easy to understand.
Print-quality choices are Fast Draft mode (Model Z03 only), Data Processing mode (DP), DP Text mode
(DP Text), and Near Letter Quality mode (NLQ). Versatile paper-handling capability provides printing on up
to 8-part forms. Typical applications include transaction processing for invoices, office or internal business
documents, as well as barcodes, labels, and multipart forms.
Printer description
The 4247 Model X03/Z03 printers build on the strengths of previous models of the 4247 family while
providing a Fast Draft mode for the Model Z03 and a faster print speed for the Model X03.
Print speeds
The 4247 Model X03/Z03 printers print speeds (in characters per second):
Print Quality4247 X034247 Z03
Fast DraftN/A1100
Data Processing (DP)800800
DP Text400480
Near Letter Quality200240
Note: Print speed (CPS) at 10 CPI.
Paper paths
The 4247 Model X03/Z03 printers provide exceptional forms-handling flexibility. The base printer includes
one front continuous-forms tractor paper path, and an optional second continuous-forms tractor paper
path. Both continuous-form paper paths are front loading. Paper path linking is available when the optional
second tractor is installed.
Paper path nomenclature
Front continuous-forms tractor: The first tractor visible when opening the front tractor cover is called the
front continuous-forms tractor. In the standard (one tractor) configuration the installed tractor is called the
front continuous-forms tractor.
In the optional (two tractor) configuration the forward most installed tractor is called the front
continuous-forms tractor.
Rear continuous-forms tractor: In the optional (two tractor) configuration the tractor behind the front
continuous-form tractor is called the rear continuous-forms tractor.
xvii
Print qualities
Fast Draft is a print quality available only for the 4247 Model Z03 printer. The Data Processing (DP), Data
Processing Text (DP Text), Near Letter Quality (NLQ), OCR-A, and OCR-B print qualities on the 4247
Model X03 printer is equivalent in character size, shape, and resolution to the print qualities available on
the 4247 Models Z03 printer.
Print quality selection
Print quality can be selected using program control or through the printer operator panel. Program control
datastream commands take precedence over operator panel settings and can not be overridden.
Available printer operator panel settings are:
Print Quality = Fast Draft (Model Z03 printer)
Fast Draft is the default setting for the Model Z03 printer.
Print Quality = DP
DP is the default setting for the Model X03 printer.
Print Quality = DP TEXT
Print Quality = NLQ
Print Quality = OCR-A
Print Quality = OCR-B
An 4247 Model Z03 printer operator panel feature, Host Fast Draft, is a setting that allows application
programs written for earlier printers in DP mode to print in Fast Draft mode without changes to the
application program. If Host Fast Draft is enabled then DP mode applications print in Fast Draft mode. If
Host Fast Draft is disabled then DP mode applications print in DP mode.
The following table summarizes the print quality for Fast Draft (model Z03 only), DP, DP Text, and NLQ:
Horizontal character
Print qualityHorizontal DPIVertical DPI
Fast Draft457299
(Model Z03 only)
DP6072129
DP Text10072209
NLQ1001442018
cell size (dots)
Vertical character
cell size (dots)
Printer interfaces
There are three Controller Board options:
v Allows a host connection to Parallel, Serial, and USB 2.0 interfaces
v Allows a host connection to Parallel and ASCII Ethernet 10/100 BaseT LAN Network interfaces.
v Allows a host connection to Parallel and ASCII-IPDS Ethernet 10/100 BaseT LAN Network interfaces.
Printer datastream emulations
v ASCII emulations for the IBM®4202 Proprinter III XL, IBM 2381 Personal Printer, and Epson FX printers
™
v IPDS
v IBM 4247 mode (native mode) extensions to ASCII and IPDS datastream emulations
emulations for the IBM 4224 and IBM 4230 printers
xviiiProgrammer Manual
How to Use This Manual
The following lists describes the contents of each chapter and the appendixes:
Chapter 1, “Personal Printer Data Stream (PPDS),” on page 1 describes the Personal Printer Data Stream
(PPDS) programming commands for use when your printer is attached and emulation mode is set to 4247,
4202 III XL, or 2381 Personal Printer.
Chapter 2, “Epson FX-1050 Data Stream,” on page 39 describes Epson FX printers Data Stream
commands for use when your printer is attached and emulation mode is set to Epson FX.
Chapter 3, “Intelligent Printer Data Stream,” on page 75 explains the concepts and basic principles of the
Intelligent Printer Data Stream
™
(IPDS).
Chapter 4, “IPDS Programming Information,” on page 99 contains the technical details of IPDS commands
that the 4247 receives and sends.
Chapter 5, “IPDS Exception Reporting Codes,” on page 199 contains the exception reporting codes the
printer sends to the host in the NACK reply.
Chapter 6, “Print Samples and IPDS Coding Example,” on page 215 contains samples showing the
printing capabilities of the 4247 Printer.
Appendix A, “Code Pages,” on page 231 contains the code pages (both EBCDIC and ASCII) available on
this printer.
Appendix B, “Application Paper Source Selection,” on page 321 describes the differences between the
4247 Printer and other IBM compatible printers.
Appendix C, “4247 Bar Code and OCR Printing Options,” on page 323 describes the bar codes available
for the printer and describes the Optical Character Recognition (OCR) printing options.
Appendix D, “Configuration Menu Lockout,” on page 327 describes the Menu Lock function of the operator
panel.
The 4247 Model X03/Z03 Serial Matrix Printersxix
xxProgrammer Manual
Chapter 1. Personal Printer Data Stream (PPDS)
The 4247 Model X03/Z03 printers implement a subset of PPDS. The environment in which the printer data
stream processor operates is described below.
Print Job Processing
There are no PPDS controls that explicitly define print job boundaries. A print job for the 4247 is
established by the host system and consists of any set of related print objects. A print job could be as
short as one character or could be many pages long.
As an aid to the printer operator, the printer provides a PROCESSING indicator on the operator panel.
When the PROCESSING indicator is flashing, it indicates that data is currently being received, processed,
or printing, or that data is buffered in the printer but cannot be immediately printed. If the PROCESSING
indicator is not lit, then all print jobs have been completed.
Configuration parameter values can be changed at any time; however, to obtain predictable results,
changes to operator panel configuration parameter values should be made before the print job is sent to
the printer and after the previous print job has completed printing. Changing configuration parameter
values while a print job is in progress may cause unpredictable results.
We recommend the following to ensure that your print jobs run correctly:
v Establish a known print environment, and end any previous print job. Start each print job with a Set
Initial Conditions control. This control resets the printer environment to the default settings. You can then
set additional controls depending on your print job environment.
v End each print job with a FORM FEED control. This control causes all data to be printed, and the
current position is set to the top-of-form position.
v If a print job is abnormally terminated, the job should be canceled. See “Cancel Print” in “Chapter 2.
Understanding the Operator Panel” in the User's Guide for your printer.
Page Printing Concept
The 4247 processes print jobs in terms of pages, as well as in lines and columns. A page is a logical entity
whose boundaries are defined by the width and the page length. These boundaries are established during
printer initialization using the printer defaults, and can be changed using the Configuration Menu or by
issuing the appropriate data stream controls.
As a job prints, the printer controller maintains both the logical position and the physical position on the
page. If a print job does not end with a proper job terminator (for example, FORM FEED), then:
v All data for the current page may not print
v The next print job may be misaligned on the form
v Residual data from a previous job could print with the new job.
Page Presentation
Many PPDS commands (tabs, margins, line spacing, for example) are described in terms of the
presentation surface. A presentation surface is a two-dimensional surface upon which the printer positions
symbols according to controls embedded in the incoming data stream. The presentation surface is defined
in absolute terms by the width and depth parameters of the page size control commands (Set Page
Length, Set Horizontal Margins, for example). The physical print position does not move outside the range
of these two parameters. The left margin (LM) and right margin (RM) are variable parameters within the
presentation surface. The logical print position does not move outside the range of the vertical margins nor
outside the horizontal margins + 1. The following figure shows the presentation surface and the
1
relationships of some of these parameters.
CPPCurrent Print Position (LM ≤ CPP ≤ RM).
CPLCurrent Print Line
MPPMaximum Print Position (in characters at current CPI)
PMPP Physical Maximum Print Position. The largest number of characters that can be placed on one line
of the surface (the largest value that MPP can assume).
LMLeft Margin
RMRight Margin
MPLMaximum Page Length (in lines at current LPI)
Notes:
1. The host should set the limits of the presentation surface if the default or previous values are not
acceptable.
2. The operator should align the physical paper so that it matches the logical presentation surface.
Also created with this surface is a pair of numbers (CPL and CPP) which specify the line number and
column number where the next graphic will be printed. These internal values are the logical position on the
presentation surface.
The variable parameters have default values which are established when the printer is initialized. The
standard power-on defaults are:
RMEqual to MPP
HTHorizontal tabs are set at each 8th column, starting with column 9 (9, 17,
25, 33, and so on.)
VTVertical tabs are all cleared
Graphic and Control Character Sequences
PPDS uses an ASCII encoding scheme to define controls and printable graphics. Multiple code pages for
printable graphics are supported. Control characters are interpreted based on the environment established
by any preceding control characters and signals.
The 4247 supports several ASCII code pages. Within a code page, a code point can be treated as a
printable character (including space) or as a control code. The following data stream controls affect how a
code point is interpreted:
ESC 6 Select PC Character Set 2
ESC 7 Select PC Character Set 1
ESC \ Print All Characters
ESC ^ Print Single Character
ESC[K
Set Initial Conditions
The following code points are interpreted as control characters:
v PC Character Set 1
X'00' to X'1F'
X'7F' (treated as NULL)
X'80'' to X'9F'
v PC Character Set 2
X'00' to X'02'
X'07' to X'1F'
X'7F' (treated as NULL)
Note: No characters are treated as controls when they are part of a Print Single Character or Print All
Characters control.
The following code points are interpreted as printable graphic characters:
v PC Character Set 1
X'20' (space)
X'21' to X'7E'
X'A0'' to X'FE'
X'FF' (required space)
v PC Character Set 2
X'03' to X'06'
X'20' (space)
X'20' to X'7E'
X'80' to X'FE'
X'FF' (required space)
Note: All characters are treated as printable graphic characters when they are part of a Print Single
Character or Print All Characters control.
Chapter 1. Personal Printer Data Stream (PPDS)3
PPDS Compatibility
PPDS is supported in 4247, 2381 Personal Printer, and 4202 Proprinter III XL emulation modes. When
4247 is selected, PPDS control codes are supported in the same manner as if emulating the 2381
Personal Printer. The Emulation Mode can be selected from the Configuration Menu using the operator
panel. Emulation mode may also be selected using the Set Initial Conditions (ESC [ K) control sequence, if
the printer is set to 4247 or 2381 Personal Printer emulation mode.
One-Byte Controls
The printer uses the following one-byte controls:
ControlHexName
NUL00 (80)Null (no operation)
BEL07 (87)Bell
BS08 (88)Backspace
HT09 (89)Horizontal Tab
LF0A (8A)Line Feed
VT0B (8B)Vertical Tab
FF0C (8C)Form Feed
CR0D (8D)Carriage Return
SO0E (8E)Shift Out (Double-Wide Print)
SI0F (8F)Shift In (Condensed Print)
DC111 (91)Device Control 1 (Select)
DC212 (92)Device Control 2 (Select 10 CPI)
DC313 (93)Device Control 3 (Deselect)
DC414 (94)Device Control 4 (Cancel Double-Wide Print)
CAN18 (98)Cancel
ESC1B (99)Escape (Multiple-byte control prefix)
SP20Space
Note: Control hex values within parentheses (nn) are recognized only within PC Character Set 1.
Null (NUL)
00
This control terminates the Set Horizontal Tab and Set Vertical Tab control codes. The printer ignores NUL
by itself.
Bell (BEL)
07
This control causes the audible alarm to sound, if enabled. The alarm may be disabled or enabled from
the Configuration Menu.
4Programmer Manual
Backspace (BS)
08
This control moves the print position horizontally one character width to the left. If the current print position
is at the left margin, the printer ignores this command.
Horizontal Tab (HT)
09
This control moves the print position to the next horizontal tab stop. If there are no tab stops to the right,
or if the next tab stop is beyond the current right margin, the control is ignored.
Line Feed (LF)
0A
This control advances the paper one line. The horizontal position does not change unless automatic
carriage return mode is activated from the operator panel Configuration Menu. If the paper advance
crosses the bottom margin, the printer completes all deferred printing on the current page and then does
an automatic form feed.
If skip perforation mode is active and the bottom margin is crossed, the vertical position on the new page
following the automatic form feed will be the top-of-form position. If skip perforation is not active, the
vertical position on the new page is the point immediately following the previous print line.
Vertical Tab (VT)
0B
This control causes the vertical print position to be advanced to the next vertical tab stop. The horizontal
position is not affected unless automatic carriage return mode is activated from the operator panel
Configuration Menu. If there are no tab stops past the current vertical print position, Vertical Tab is treated
as a Line Feed.
Form Feed (FF)
0C
This control causes a new page to be started. Form Feed is a line end and page end control; it causes all
deferred printing that may have been buffered for the current page to be completed and the form
physically advanced to eject the current page. The vertical print position advances to the top margin and
the horizontal print position is set to the left margin for subsequent printing.
Carriage Return (CR)
0D
Chapter 1. Personal Printer Data Stream (PPDS)5
This control moves the current horizontal print position to the left margin. The vertical print position does
not change unless automatic line feed mode is active (see “Set Auto Line Feed (ESC 5)” on page 13).
Shift Out (SO) / Double-Wide Print
0E
This control causes the printer to start double-width printing. Double-width printing prints the characters
twice as wide as the current character spacing. This results in half as many characters per inch. Each
character takes up the space of two single-width characters. A Carriage Return, Line Feed, Form Feed,
Vertical Tab, Double-Wide Continuous Mode, or Cancel Double-Wide Print with vertical movement
specified cancels the Shift Out control code.
Shift In (SI) / Condensed Print
0F
This control prints graphic characters in condensed pitch (15 CPI, 16.7 CPI, 17.1 CPI or 20 CPI).
Shift In is a buffer terminating control; if printable data at a different character-per-inch setting is buffered,
that data is printed before the setting is changed. The current print position becomes the next printable
column at the new character-per-inch setting. CPI can be changed within a print line, and this control
changes the maximum number of characters that can be printed on one line.
When Printer Compatibility 7 – Condensed Print option in the ASCII Configuration menu is set to 15 CPI,
then 15 CPI is selected, otherwise, 16.7 CPI or 17.1 CPI is selected.
A combination of 12 CPI and Condensed Print sets the printer to 20 CPI when Printer Compatibility 9 (20
CPI) option is set to Enabled in the ASCII Configuration menu. A combination of 12 CPI and Condensed
Print sets the printer to 12 CPI when Printer Compatibility 9 (20 CPI) option is set to Disabled in the ASCII
Configuration menu.
Device Control 1 (DC1) / Select
11
This control selects the printer.
Device Control 2 (DC2) / Select
12
This control sets 10 characters per inch. DC2 is a buffer terminating control; if printable data at a different
characters-per-inch setting is buffered, that data is printed before the setting is changed. The current print
position becomes the next printable column at the new character-per-inch setting. CPI can be changed
within a print line.
Device Control 3 (DC3) / Select
13
6Programmer Manual
This control is treated as a NUL.
Device Control 4 (DC4) / Select
14
This control cancels double-wide printing if double wide was selected with the Shift Out control. The
characters-per-inch setting returns to the previous value.
Cancel (CAN)
18
This control purges all buffered data. All data received after the most recent buffer terminating control is
discarded. For a list of buffer terminating controls, see “Buffer Terminating Conditions” on page 38. Any
data received after Cancel is processed normally. Cancel does not change the current print position.
Escape (ESC)
1B
This control is a prefix used in combination with supplementary control bytes to provide an extended set of
control functions.
Space
20
This control moves the print position one character space to the right.
Escape Sequence Controls
Escape sequence controls have an ESC followed by one or more control parameters. Supported escape
sequence controls are:
ESC DC31B 13Device Control 3 (Deselect)
ESC DC41B 14Device Control 4 (Cancel Double-Wide Print)
ESC CAN1B 18Cancel
ESC EM1B 19Turn Auto Sheet Feeder On or Off
ESC -1B 2DAuto Underscore
ESC 01B 30Set 1/8 Inch Line Spacing
ESC 11B 31Set 7/72 Inch Vertical Spacing
ESC 21B 32Invoke Text Line Spacing
ESC 31B 33Set Graphics Line Spacing
ESC 41B 34Set Top of Form
ESC 51B 35Set Auto Line Feed
ESC 61B 36Select PC Character Set 2
ESC 71B 37Select PC Character Set 1
ESC :1B 3ASet 12 CPI
ESC <1B 3CUnidirectional Printing
ESC =1B 3DCharacter Font Image Download
ESC A1B 41Select n/72 Inch Spacing
ESC B1B 42Set Vertical Tabs
ESC C1B 43Set Page Length (Lines or Inches)
ESC D1B 44Set Horizontal Tabs
ESC E1B 45Begin Emphasized Print
ESC F1B 46End Emphasized Print
ESC G1B 47Begin Double-Strike Print
ESC H1B 48End Double-Strike Print
ESC I1B 49Change Font
ESC J1B 4ARelative Move Baseline
ESC K1B 4BNormal Density Bit Image Graphics
ESC L1B 4CDual Density Bit Image Graphics, Type 1
ESC N1B 4EBegin Skip Perforation
ESC O1B 4FEnd Skip Perforation
ESC P1B 50Proportional Space Mode
ESC Q1B 51Deselect on Positive Query Reply
ESC R1B 52Set Default Tabs
ESC S1B 53Begin Subscript/Superscript
ESC T1B 54End Subscript/Superscript
ESC U1B 55Set Print Direction
ESC W1B 57Double-Wide Continuous Mode
ESC X1B 58Set Horizontal Margins
ESC Y1B 59Dual Density Bit Image Graphics Type 2
ESC Z1B 5ADual Density Bit Image Graphics
ESC \1B 5CPrint All Characters
8Programmer Manual
ControlHexName
ESC ]1B 5DReverse Line Feed
ESC ^1B 5EPrint Single Characters
ESC _1B 5FContinuous Overscore
ESC d1B 64Relative Move Right
ESC e1B 65Relative Move Left
ESC [ - (See Note)1B 5B 2DSelect Line Scoring
ESC [ @1B 5B 40Set Presentation Highlights (SPH)
ESC [ I (See Note)1B 5B 49Set Font Global (SFG)
ESC [ K1B 5B 4BSet Initial Conditions (SIC)
ESC [ T (See Note)1B 5B 54Select Code Page (SCP)
ESC [ d (See Note)1B 5B 64Set Print Quality (SPQ)
Note: Commands are only available in 4247 or 2381 emulation mode.
Null (ESC NUL)
1B00
The printer ignores the NUL control by itself.
Bell (ESC BEL)
1B07
This control causes the audible alarm to sound, if enabled. The alarm may be disabled or enabled from
the Configuration Menu.
Backspace (ESC BS)
1B08
This control moves the print position horizontally one character width to the left. If the current print position
is at the left margin, the printer ignores this command.
Horizontal Tab (ESC HT)
1B09
This control moves the print position to the next horizontal tab stop. If there are no tab stops to the right,
or if the next tab stop is beyond the current right margin, the control is ignored.
Line Feed (ESC LF)
1B0A
Chapter 1. Personal Printer Data Stream (PPDS)9
This control advances the paper one line. The horizontal position does not change unless automatic
carriage return mode is activated from the operator panel Configuration Menu. If the paper advance
crosses the bottom margin, the printer completes all deferred printing on the current page and then does
an automatic form feed.
If skip perforation mode is active and the bottom margin is crossed, the vertical position on the new page
following the automatic form feed will be the top-of-form position. If skip perforation is not active, the
vertical position on the new page is the point immediately following the previous print line.
Vertical Tab (ESC VT)
1B0B
This control causes the vertical print position to be advanced to the next vertical tab stop. The horizontal
position is not affected unless automatic carriage return mode is activated from the operator panel
Configuration Menu. If there are no tab stops past the current vertical print position, Vertical Tab is treated
as a Line Feed.
Form Feed (ESC FF)
1B0C
This control causes a new page to be started. Form Feed is a line end and page end control; it causes all
deferred printing that may have been buffered for the current page to be completed and the form
physically advanced to eject the current page. The vertical print position advances to the top margin and
the horizontal print position is set to the left margin for subsequent printing.
Carriage Return (ESC CR)
1B0D
This control moves the current horizontal print position to the left margin. The vertical print position does
not change unless automatic line feed mode is active (see “Set Auto Line Feed (ESC 5)” on page 13).
Shift Out (ESC SO) / Doube-Wide Print
1B0E
This control causes the printer to start double-width printing. Double-width printing prints the characters
twice as wide as the current character spacing. This results in half as many characters per inch. Each
character takes up the space of two single-width characters. A Carriage Return, Line Feed, Form Feed,
Vertical Tab, Double-Wide Continuous Mode, or Cancel Double-Wide Print with vertical movement
specified cancels the Shift Out control code.
Shift In (ESC SI) / Condensed Print
1B0F
This control prints graphic characters in condensed pitch (15 CPI, 16.7 CPI, 17.1 CPI or 20 CPI).
10Programmer Manual
Shift In is a buffer terminating control; if printable data at a different character-per-inch setting is buffered,
that data is printed before the setting is changed. The current print position becomes the next printable
column at the new character-per-inch setting. CPI can be changed within a print line, and this control
changes the maximum number of characters that can be printed on one line.
When Printer Compatibility 7 – Condensed Print option in the ASCII Configuration Menu is set to 15 CPI,
then 15 CPI is selected, otherwise, 16.7 CPI or 17.1 CPI is selected.
A combination of 12 CPI and Condensed Print sets the printer to 20 CPI when Printer Compatibility 9 (20
CPI) option is set to Enabled in the ASCII Configuration menu. A combination of 12 CPI and Condensed
Print sets the printer to 12 CPI when Printer Compatibility 9 (20 CPI) option is set to Disabled in the ASCII
Configuration menu.
Device Control 1 (ESC DC1 / Select)
1B11
This control selects the printer.
Device Control 2 (ESC DC2) / Select 10 CPI
1B12
This control sets 10 characters per inch. DC2 is a buffer terminating control; if printable data at a different
characters-per-inch setting is buffered, that data is printed before the setting is changed. The current print
position becomes the next printable column at the new character-per-inch setting. CPI can be changed
within a print line.
Device Control 3 (ESC DC3) / Deselect
1B13
This control is treated as a NUL.
Device Control 4 (ESC DC4) / Cancel Double-Wide Print
1B14
This control cancels double-wide printing if double wide was selected with the Shift Out control. The
characters-per-inch setting returns to the previous value.
Cancel (ESC CAN)
1B18
This control purges all data in the preceding print buffer. Any data received after Cancel is processed
normally. Cancel does not change the current print position.
Chapter 1. Personal Printer Data Stream (PPDS)11
Auto Underscore (ESC -)
1B2DNN
This control turns on and off the continuous underscore function.
If NN is 1, the printer underscores all text characters and spaces following this sequence. The printer does
not underscore white space caused by horizontal tabs.
If NN is 0, the printers stops the underscore of all data following this sequence.
Set 1/8 Inch Line Spacing (ESC 0)
1B30
This control sets the line spacing to eight lines per inch.
The application program is responsible for keeping track of the vertical position on the current page
relative to the current line spacing. Changing the line spacing within a print job without changing the page
length can cause printing on the page perforation. For additional information, see “Set Page Length (ESC
C)” on page 15.
Set 7/72 Inch Line Spacing (ESC 1)
1B31
This control sets the line spacing to 7/72 inch. The application program is responsible for keeping track of
the vertical position on the current page relative to the current line spacing. Changing the line spacing
within a print job without changing the page length can cause printing on the page perforation. For
additional information, see “Set Page Length (ESC C)” on page 15.
Invoke Text Line Spacing (ESC 2)
1B32
This control sets the line spacing at the value set by the last Set Text Line Spacing (ESC A) control
received. The printer sets the line spacing to six lines per inch if no ESC A has been issued.
Set Graphics Line Spacing (ESC 3)
1B33NN
This control changes the line spacing to the value specified by NN.
NN is a value that specifies the line spacing in units of 1/216 inch. Valid values are 0 to 255. If N equals 0,
the printer ignores this control.
The application program is responsible for keeping track of the vertical position on the current page
relative to the current line spacing. Changing the line spacing within a print job without changing the page
length can cause printing on the page perforation. For additional information, see “Set Page Length (ESC
C)” on page 15.
12Programmer Manual
Set Top of Form (ESC 4)
1B34
This control establishes the current vertical position as the top of form.
Set Auto Line Feed (ESC 5)
1B35NN
This control sets the automatic line feed mode of the printer. When automatic line feed is on, the printer
does a line feed each time it receives a carriage return. When automatic line feed if off, a carriage return
is processed normally. This control overrides the automatic line feed mode set in the operator panel
Configuration Menu.
If NN is 1, the printer turns automatic line feed mode on.
If NN is 0, the printer turns automatic line feed mode off.
Select PC Character Set 2 (ESC 6)
1B36
This control selects PC Character Set 2 as the active character set. In PC Character Set 2, code points
X'03' to X'06', X'15', and X'80' to X'9F' are treated as graphic characters (not controls). See “Graphic and
Control Character Sequences” on page 3.
Select PC Character Set 1 (ESC 7)
1B37
This control selects PC Character Set 1. In PC Character Set 1, code pointsX'03' to X'06', X'15', and X'80'
to X'9F' are treated as controls (not printable graphics). See “Graphic and Control Character Sequences”
on page 3.
Set 12 CPI (ESC :)
1B3A
This control sets the pitch to 12 characters per inch. If the current font is proportionally spaced, this control
selects a horizontal resolution of 240 dots per inch. If the active font is OCR, the printer does not prohibit
the change in pitch; however, the printed OCR characters may be unreadable by automatic identification
equipment.
Unidirectional Printing (ESC <)
1B3C
Chapter 1. Personal Printer Data Stream (PPDS)13
This command selects unidirectional printing for one line only. The print head moves to the home position
at the left side of the printer and prints one line, left to right. The command is then cancelled by the
carriage return that sends the print head back to the home position.
Character Font Image Download (ESC =)
1B3DLLHHFFLFWHCPNXX...XX
This control downloads special character images.
A two-byte count (LL HH) indicates the number of bytes that follow in this control.
LL is the least significant byte of the count; HH is the most significant byte of the count. The number of
bytes that follow should equal HH × 256 + LL. If the count equals X'0000', the control is ignored.
FF is the format byte and must equal X'13'. LF is a one-byte font identifier that specifies the previously
initialized or selected font to be modified. See “Change Font (ESC I)” on page 16.
W is a one-byte value that specifies the width of the character cells in options. For DP fonts, the value is
X'0A'. For fixed pitch DP Text and NLQ fonts, the value is X'14'. For DP Text and NLQ, proportional fonts
values may vary. However, for all code points downloaded with this control, all character cells defined will
be Width options wide.
H is a one-byte value that specifies the height of the character cells in dots. Valid values are X'09' for DP
and DP Text and X'12' for NLQ.
CP is a one-byte value. This parameter specifies the first code point to download. A single code point or
multiple code points can be downloaded. If the font being downloaded was previously initialized, the
downloaded characters overlay the resident characters in the font.
N is a one-byte value that specifies the number of code points defined by this control. If the starting code
point plus the number of code points is greater than 256, the control is ignored.
XX .. XX is the font image download data. These data bytes define the character cells. Multiple bytes
define each vertical slice of the character cell. The slice data for each code point is in a contiguous format
(run-together) as follows:
v If the slice data is nine-bits high, byte 1 is put into the high-order bits in slice 1 and the high-order bit of
byte 2 is the low order bit of slice 1. The remaining seven bits of byte 2 are put into the high-order
seven bits of slice 2, and so on.
v If the slice data is 18-bits high, bytes 1 and 2 are put into the high-order bits of the first slice and the
two high-order bits of byte 3 complete the first slice. Slice 2 is composed similarly, starting with the
remaining six bits in byte 3.
Note: The contiguous format (run-together) does not occur from one code point to the next. The top dot of
the leftmost slice of each code point is always in the high-order bit of the first byte of image data for
that code point.
The number of data bytes required to define the image for each code point can be calculated as follows:
Image Length = (Width × Height) ÷ 8
Note: If there is a remainder from the division by 8, add 1 to the quotient.
Example: To define an image for a standard DP font where Width = 10 and Height = 9:
Image Length = (10 × 9) ÷ 8
14Programmer Manual
Image Length = 11 with a remainder of 2
Image Length = 12 bytes per character
If both printer provided images and downloaded images are to be printed from the same local font ID, we
recommend that the downloaded images be sent, using this control, at the start of a print job when the
print environment for the job is established. This ensures that the actual printed output appears as
intended.
It is also recommended that image data bits for the last vertical column of NLQ character patterns be all
zeros. The last vertical column will be clipped if NLQ character patterns are expanded for graphics
printing. Resident NLQ text character patterns do not contain image data (dots) in the last column of the
character box.
Select n/72 Inch Line Spacing (ESC A)
1B41NN
This control stores the line spacing value, in units of 1/72 inch, which is later selected by Invoke Text Line
Spacing (ESC 2). The valid values for NN are X'01' to X'FF' (1 to 255). The default line spacing is X'0C'
(six lines per inch).
A value of 0 is not valid and causes the printer to ignore this command. Following are example values for
NN:
X'00'No Change
X'18'3 LPI
X'12'4 LPI
X'0C'6 LPI
X'09'8 LPI
X'08'9 LPI
X'06'12 LPI
Set Vertical Tabs (ESC B)
1B42TT...TT00
This control sets the vertical tab stops. The maximum number of tab stops supported is 64. The Null
control code terminates this sequence. If the Null terminator is missing, the printer treats the next 64 bytes
as tab stops and ignores all the data bytes following these 64 bytes until a Null is received. If the printer
receives this sequence without any tabs specified, all tab stops are cleared.
TT...TT are the tab values that specify the tab stops as line numbers, relative to the top of the physical
page. Tab stops must be specified in ascending order; entries not in ascending order are ignored.
Set Page Length (ESC C)
1B43LLIN
This control sets the physical page length in lines or inches and resets skip perforation mode.
LL is a one-byte hexadecimal number that specifies the page length in lines. The value is converted to
inches based upon the current line spacing. Valid values for LL are X'01' to X'FF', but the resulting page
length in inches must be less than 113.8 inches (2890 mm). If LL equals 0, then parameter II (length is
inches) is used.
Chapter 1. Personal Printer Data Stream (PPDS)15
IN is a one-byte hexadecimal number that specifies the page length in inches. IN is present only if
parameter LL equals 0. Valid values for IN are X'01' to X'71'. If IN is greater than the maximum value, the
maximum value is used. If both LL and IN are zero, the control is ignored.
Set Horizontal Tabs (ESC D)
1B44TT...TT00
This control sets the horizontal tab stops. The maximum number of tab stops supported is 28. The
sequence terminates with the NUL control code. If the null terminator is missing, the printer treats the next
28 bytes as tab stops and ignores all the data bytes following the 28 bytes until a Null is received. If the
printer receives this control code with no tabs, all horizontal tab stops are cleared.
TT is the list of tab stops as character positions relative to the left edge of the physical page. Valid values
are X'01' to X'FF'. Tab stops must be specified in ascending order. Entries not in ascending order are
ignored.
Begin Emphasized Print (ESC E)
1B45
This control starts emphasized print mode (bold style). Emphasized printing continues until the printer
receives an End Emphasized Print (ESC F) control or the printer is initialized.
End Emphasized Print (ESC F)
1B46
This control ends emphasized print mode (bold style).
Begin Double-Strike Print (ESC G)
1B47
This control starts double-strike printing (all text characters are double struck). Double-strike printing
continues until the printer receives an End Double-Strike Print control (ESC H) or the printer is initialized.
End Double-Strike Print (ESC H)
1B48
This control ends double-strike printing.
Change Font (ESC I)
1B49NN
This control selects the font to be used for printing.
16Programmer Manual
NN is the one-byte local font identifier number that specifies the font. The mapping of the local font
identifier is dependent upon the printer's emulation mode setting. In the Configuration Menu, if the
emulation mode is set to 4202 III XL, the Change Font control code selects fonts compatible with the 4202
Proprinter III XL Printer. If the emulation mode is set to 4247 or 2381, Change Font selects the fonts
compatible with the 2381 Personal Printer.
Supported local font identifiers are shown in the following table.
Local Font
Identifier
(Hex)4247 and 2381 Emulation Mode4202 III XL Emulation Mode
00Default (op. panel selection)DP
01DPFast Draft (for model Z03); DP (for model X03)
(See Note 1)
02DP TextDP Text
03NLQ (Courier/Gothic)NLQ (Courier/Gothic)
04DP Text ProportionalDP (Download)
05NLQ Proportional (Courier/Gothic)DP (Download)
06Fast Draft (for model Z03); DP (for model X03)DP text (Download)
07ReservedNLQ (Download)
08-0FReservedReserved
10OCR-AReserved
11OCR-BReserved
12-5FReservedReserved
60ReservedDefault (op. panel selection)
61ReservedFast Draft (for model Z03); DP-Gothic (for model
X03) (See Note 1)
62ReservedNLQ Proportional (Courier/Gothic)
63ReservedOCR-A
64ReservedOCR-B
65ReservedFast Draft (for model Z03); DP (for model X03)
(See Note 1)
66-FFReservedReserved
Notes:
1. If printer configuration Host Fast Draft setting is Enabled, then Fast Draft quality is selected. If Host
Fast Draft is disabled then DP quality is selected (only for model Z03).
2. If a downloaded font has not been previously downloaded with a Character Font Image Download
control (CFID), a Change Font control to select a downloaded font is ignored.
3. The NLQ font style is selected as defined in the Configuration Menu as either Courier or Gothic.
Relative Move Baseline (ESC J)
1B4ANN
This control performs a vertical move relative to the current print position.
Chapter 1. Personal Printer Data Stream (PPDS)17
NN is a one-byte hexadecimal value that specifies the move amount in units of 1/216 inch. The printer will
adjust the value to the nearest 1/144 inch. If Automatic Carriage Return on Line Feed is set in the operator
panel Configuration Menu, a carriage return is also performed when a Relative Move Baseline code is
received (see “Carriage Return (CR)” on page 5).
Normal Density Bit Image Graphics (ESC K)
1B4BLLHHNN...NN
This control prints the supplied bit image data at 60 horizontal pel by 72 vertical pel. Bit image data can be
mixed with text data on the same line.
A two-byte count (LL HH) indicates the number of bytes that follow in this control. LL is the least significant
byte of the count; HH is the most significant byte. (The number of bytes that follow should equal HH × 256
+ LL.) If the count equals X'0000', the control is ignored.
NN...NN are the bytes containing the bit image data. The data format is in 8-bit vertical slices, with the
least significant bit the bottom dot and the most significant bit the top dot. B'1' indicates a pel to be printed;
B'0' indicates an un-printed pel. Data that exceeds the right margin is discarded.
Dual Density Bit Image Graphics Type 1 (ESC L)
1B4CLLHHNN...NN
This control prints the supplied bit image data at 120 horizontal by 72 vertical pel. Bit image data can be
mixed with text data on the same line.
A two-byte count (LL HH) indicates the number of bytes that follow in this control. LL is the least significant
byte of the count; HH is the most significant byte. (The number of bytes that follow should equal HH × 256
+ LL.) If the count equals X'0000', the control is ignored.
NN .. NN are the bytes containing the bit image data. The data format is in 8-bit vertical slices, with the
least significant bit the bottom dot and the most significant bit the top dot. B'1' indicates a pel to be printed;
B'0' indicates an un-printed pel. Data that exceeds the right margin is discarded.
Begin Skip Perforation (ESC N)
1B4ENN
This control sets the number of lines to be skipped at the bottom of each page. Once this function is
activated, it stays active until the End Skip Perforation (ESC O) or Set Page Length (ESC C) control is
received or the printer is initialized.
NN is a one-byte hexadecimal value that specifies the number of lines to skip at the bottom of each page.
This value must be zero or greater and less than the length of the page in lines (from 0 to 255). Once
Begin Skip Perforation is activated, the number of lines that may be printed on a page is the page length
minus NN.
End Skip Perforation (ESC O)
1B4F
18Programmer Manual
This control ends skip perforation.
Proportional Space Mode (ESC P)
1B50NN
This control starts or stops proportional space mode.
NN is a one-byte hexadecimal value that sets proportional space mode on or off.
v If NN is 1, proportional space mode is on.
v If NN is 0, proportional space mode is off.
(code page 855), Thai (code page 874), Extended Arabic (code page 1046), and Farsi Bilingual
(code page 1098) are not supported in proportional space mode.
Deselect on Positive Query Reply (ESC Q)
1B51NN
This control deselects the printer if the response to the query is positive.
NN is the query printer identifier. If the value matches the printer's ID, the query response is positive and
the printer deactivates the Select line. If the query is not positive, the control is ignored.
The printer must be reselected using a DC1 control after a positive response to ESC Q if the printer is to
be used.
Query Identifiers: If the emulation mode is set to 4202 III XL, the printer ID is X'16'. If the emulation
mode is set to 4247 or 2381, the printer ID is X'B8'.
Set Default Tabs (ESC R)
1B52
This control resets both the horizontal and vertical tab stops. The horizontal tab stops are set to every
eighth position starting with the ninth column (9, 17, 25,...). The vertical tab stops are cleared.
Begin Subscript/Superscript (ESC S)
1B53NN
This control activates subscript and superscript printing. Once this printing is active, it stays active until
another Begin Subscript/Superscript control changes the mode, an End Subscript/Superscript control is
received, or the printer is initialized.
NN is a one-byte hexadecimal value that activates subscript or superscript printing.
v If NN is 1, subscript mode is active.
v If NN is 0, superscript mode is active.
Chapter 1. Personal Printer Data Stream (PPDS)19
End Subscript/Superscript (ESC T)
1B54
This controls stops subscript and superscript printing.
Set Print Direction (ESC U)
1B55NN
This control specifies bidirectional or unidirectional printing.
v If NN is 1, unidirectional printing is selected.
v If NN is 0, bidirectional printing (default) is selected.
Double-Wide Continuous Mode (ESC W)
1B57NN
This control turns double-wide printing on or off. When double-wide printing is on, the width of subsequent
graphic characters is doubled (the characters per inch value is half of the single character value). For tabs,
the font width is not doubled (tab distance is based upon single character width).
NN is a one-byte hexadecimal value that turns double-wide printing on or off.
v If NN is 1, double-wide printing is turned on.
v If NN is 0, double-wide printing is turned off.
Note: Double-Wide Continuous Mode does the same function as Shift Out, except double wide printing is
not canceled when a new line begins.
Set Horizontal Margins (ESC X)
1B58LLRR
This control sets the left and right margins. The margins are specified in character positions relative to the
left edge of the physical page.
LL is a one-byte hexadecimal value from X'00' to X'FF', which specifies the starting print position relative to
the left edge of the physical page. If LL equals 0, the left margin is unchanged.
RR is a one-byte hexadecimal number from X'00' to X'FF' that specifies the rightmost print position relative
to the first print position. If RR equals 0, the right margin is unchanged.
Notes:
1. Set Horizontal Margins should be followed by a carriage return (CR) control to set the print position to
the new left margin.
2. LL should be at least one character width less than the page width.
3. If RR is greater than the page width or is less than LL, RR is set to the page width (MPP).
20Programmer Manual
Dual Density Bit Image Graphics Type 2 (ESC Y)
1B59LLHHNN...NN
This control prints the supplied bit image data at 120 horizontal pel by 72 vertical pel. Bit image data can
be mixed with text data on the same line. Horizontally adjacent dots are not allowed and will be removed if
specified.
A two-byte count (LL HH) indicates the number of bytes that follow in this control. LL is the least significant
byte of the count; HH is the most significant byte. (The number of bytes that follow should equal HH × 256
+ LL.) If the count equals X'0000', the control is ignored.
NN...NN are the bytes containing the bit image data. The data format is in 8-bit vertical slices, with the
least significant bit the bottom dot and the most significant bit the top dot. B'1' indicates a pel to be printed;
B'0' indicates an un-printed pel. Data that exceeds the right margin is discarded.
High Density Bit Image Graphics (ESC Z)
1B5ALLHHNN...NN
This control prints the supplied bit image data at 240 horizontal per by 72 vertical pel. Bit image data can
be mixed with text data on the same line.
A two-byte count (LL HH) indicates the number of bytes that follow in this control. LL is the least significant
byte of the count; HH is the most significant byte. (The number of bytes that follow should equal HH × 256
+ LL.) If the count equals X'0000', the control is ignored.
NN...NN are the bytes containing the bit image data. The data format is in 8-bit vertical slices, with the
least significant bit the bottom dot and the most significant bit the top dot. B'1' indicates a pel to be printed;
B'0' indicates an un-printed pel. Data that exceeds the right margin is discarded.
Print All Characters (ESC \)
1B5CLLHH
This control forces a specified number of characters to be interpreted as graphic characters, including
those that occur in the space normally reserved for controls.
A two-byte count (LL HH) indicates the number of bytes to be interpreted as printable graphics. LL is the
least significant byte of the count; HH is the most significant byte. (The number of bytes that follow should
equal HH × 256 + LL.) If the count equals X'0000', the control is ignored.
Reverse Line Feed (ESC ])
1B5D
This command causes the contents of the buffer to be printed and advances the paper one line in the
reverse direction from the paper path.
Chapter 1. Personal Printer Data Stream (PPDS)21
Note: If Printer Compatibility 4 - Automatic Carriage Return on Line Feed is set to Enabled in the
Configuration Menu, the next print position is print position 1 at the left margin. If Printer
Compatibility 4 - Automatic Carriage Return on Line Feed is set to Disabled, the next print position
is the current print position.
Print Single Character (ESC ^)
1B5E
This control specifies that the next character to follow is to be interpreted as a graphic character, including
those characters that occur in the space normally reserved for controls.
Continuous Overscore (ESC _)
1B5FNN
This control turns on and off the continuous overscore function. All graphic characters and spaces that are
bounded by start and stop versions of this control are overscored. White space caused by horizontal tabs
is not overscored.
NN is a one-byte hexadecimal value that turns overscore on or off.
v If NN is 1, continuous overscore is on.
v If NN is 0, continuous overscore is off.
Relative Move Right (ESC d)
1B64N1N2
This command moves the print position to the right (from the current position) in increments of 1/120 of an
inch.
Bytes N1 and N2 indicate the move distance based on the following:
(N1 + [N2 x 256])/120
Relative Move Left (ESC e)
1B65N1N2
This command moves the print position to the left (from the current position) in increments of 1/120 of an
inch.
Bytes N1 and N2 indicate the move distance based on the following:
(N1 + [N2 x 256])/120
Select Line Scoring (ESC [ -)
1B5B2D0200N1N2
This command selects underscore, strikethrough, and overscore. This command is supported in 4247 or
2381 emulation mode only.
22Programmer Manual
The values for N1 are:
X'01'Underscore
X'02'Strikethrough
X'03'Overscore
X'00'Cancel
X'01'Single Line
X'02'Double Line
Set Presentation Highlight (SPH) (ESC [ @)
1B5B40LLHHM1M2M3M4
SPH activates or deactivates double wide, double high, and italic printing. This command is supported in
4247, 4202 III XL, and 2381 emulation with some exceptions as noted.
Once these highlights are active, they remain active until terminated, either by another SPH command or
an initialization. If double wide printing is activated by an SPH, a DC4 control can also cancel it.
A two-byte count (LL HH) indicates the number of bytes that follow in this control. LL is X'00' to X'04'. HH
is always X'00'. If the count equals X'0000', the control is ignored.
M1 .. M4 turn double wide, double high, or italics on or off.
M1 is a one-byte hexadecimal value that turns italics on or off as follows:
X'00'No change
X'01'Italics on (2381 and 4247 only)
X'02'Italics off (2381 and 4247 only)
M2 is always X'00'.
M3 is a one-byte hexadecimal that controls line feeds and character height (vertical spacing) as follows:
X'00'No change to line feed, no change to character height
X'01'Line feeds unchanged, standard character height
X'02'Line feeds unchanged, double character height
X'10'Single line feeds, character height unchanged (4202 only)
X'11'Single line feeds, standard character height
X'12'Single line feeds, double character height
X'20'Double line feeds, character height unchanged (4202 only)
X'21'Double line feeds, standard character height
X'22'Double line feeds, double character height
M4 is a one-byte hexadecimal value that turns double wide on or off as follows:
X'00'No Change
X'01'Turn double wide off
X'02'Turn double wide on
X'10'Single line feeds (2381 and 4247 only)
X'20'Double line feeds (2381 and 4247 only)
Set Font Global (SFG) (ESC [ I)
1B5B490200HFLF
This control selects font and pitch based on the values of HF and LF. (Supported in 4247 or 2381
emulation mode only.)
A two-byte count (LL HH) indicates the number of bytes that follow in this control. LL is the least significant
byte of the count; HH is the most significant byte. (HH is always X'00' for this command.) The number of
bytes is counted from the INIT byte.
The INIT byte is processed the same way in 4247, 4202 III XL, or 2381 emulation mode, but causes
different results in the P1 and P2 parameters, depending on the ID byte. The values for the INIT byte are:
INITMode Byte
X'00'Initializes printer to user-defined settings; downloaded fonts are not
initialized.
X'01'Initializes printer to user-defined settings; downloaded fonts are
initialized.
X'04'Initializes printer to factory settings; downloaded fonts are not
initialized. See Note.
X'05'Initializes printer to factory settings; downloaded fonts are initialized.
See Note.
X'FE'Initializes printer to user-defined settings; downloaded fonts are
initialized. Settings are saved in non-volatile memory (NVM).
X'FF'Initializes printer to factory settings; downloaded fonts are initialized.
See Note. Settings are saved in non-volatile memory (NVM).
IDPrinter ID Byte:
X'B6'For 4247 or 2381 emulation
X'03' or X'16'For 4202 III XL emulation
P1Parameter Byte for 4247 or 2381 Emulation
X'00'No Emulation Change
X'01'Switch to 2381 emulation
X'02'Switch to Epson FX printer emulation
X'03' to X'FF'No Emulation Change
24Programmer Manual
P1Parameter Byte for 4201 III XL Emulation
BitOnOff
7 Discard ByteIgnoreProcess
6 Reserved
5 AlarmDisableEnable
4 Auto CRCR on Vertical MovementNo CR on Vertical Movement
3 Auto LFAuto LF after CRNo Auto LF after CR
2 Form Length12 inch forms11 inch forms
1 ZeroSlashed ZeroNormal Zero
0 Character SetPC Char Set 2PC Char Set 1
P2 Parameter Byte for 4202 III XL Emulation
BitOnOff
7 Discard ByteIgnoreProcess
6 Print LanguageCP 850 MultilingualCP 437 ASCII
5 DirectionUnidirectionalBidirectional
4 20 Condense12+Condense = 12 CPI12+Condense = 20 CPI
3 Select NLQNLQ GothicNLQ Courier
2 Form FeedIgnore FF if at TOFHonor all FF
1 Line Length8 inch line13.6 inch line
0 Sheet FeederEnableDisable
Notes: The following parameters are changed to the manufacturing default by the INIT control byte in the
ASCII Configuration Menu only:
v Characters Per Inch (CPI)
v Lines Per Inch (LPI)
v Maximum Print Position (MPP)
v Maximum Page Length (MPL)
v Print Language
v Print Quality
v NLQ Typeface
v Character Set
v Printer Compatibility 3 - Automatic Line Feed on Carriage Return
v Printer Compatibility 4 - Automatic Carriage Return on Line Feed
v Printer Compatibility 5 - Form Feed Suppression
v Printer Compatibility 8 - Slashed Zero
v Printer Compatibility9-20CPI
v Alarm Control
The following parameters are NOT modified by the INIT control byte:
v Values in Any Custom Set
v Active Custom Set
v Default Attachment Selection
v Rear Tractor Use
v ASCII Configuration:
– Emulation Mode
– Printer Compatibility 6 – Init
Chapter 1. Personal Printer Data Stream (PPDS)25
– Printer Compatibility 7 – Condensed Print
– Interface Type
– Input Buffer Size
– Select-In Signal
– AutoFeed XT
v All Printer Adjustments Values
v All Printer Setup Values
v Display Language
v All Vital Product Data
v Active Form Path
Select Code Page (SCP) (ESC [ T)
1B5B5404000000HCLC
This control selects a code page for printing where HC and LC specify the code page in hexadecimal.
(Supported in 4247 or 2381 emulation mode only.)
The following table shows the values for HC and LC:
HCLCCharacter Set
01B5CP437 USA (Personal Computer) A-54
02E1CP737 Greek (MS DOS)
032DCP813 Greek/Latin (ISO 8859-7)
0333CP819 Latin 1 (ISO 8859-1)
0352CP850 PC Multilingual
0353CP851 Old Greek
0354CP852 Latin 2/ROECE
0355CP853 Latin 3 (PC)
0357CP855 Cyrillic (PC)
0359CP857 Latin 5-Turkey + euro
035ACP858 PC Multilingual + euro
035CCP860 Portuguese
035DCP861 Icelandic
035ECP862 Hebrew
035FCP863 Canadian French
0360CP864 Arabic
0361CP865 Danish/Norwegian
0362CP866 PC Data, Cyrillic, Russian
0365CP869 Greek New + euro
036ACP874 Thai
036CCP876 OCR-A
036DCP877 OCR-B
0390CP912 Latin 2 (ISO 8859-2)
0391CP913 Latin 3 (ISO 8859-3)
0392CP914 Latin 4 (ISO 8859-4)
26Programmer Manual
HCLCCharacter Set
0393CP915 Cyrillic (ISO 8859-5)
0394CP916 Latin 8 (ISO 8859-8)
0398CP920 Latin 5 (ISO 8859-9)
0399CP921 Baltic Multilingual
039ACP922 Estonian
039BCP923 Latin 9 (ISO 8859-15)
03EECP1006 Urdu
0416CP1046 Arabic Extended
0441CP1089 Latin 6 (ISO 8859-6)
044ACP1098 Farsi (Personal Computer)
045CCP1116 Estonian (Personal Computer)
045DCP1117 Latvian (Personal Computer)
045ECP1118 Lithuanian (Personal Computer)
04E2CP1250 Central Europe Latin 2
®
04E3CP1251 Cyrillic Windows
+ euro
Note: The following languages are all supported within code page 850 (PC Multilingual):
This control allows the host application to specify the desired print quality when the printer is in 4247 or
2381 emulation mode. The setting remains in effect until changed by another Set Print Quality control or
until the printer is initialized. Bit image graphics (ESC K, L, Y, and Z) are not affected. Highlighting modes,
such as italics, emphasized, and double wide remain active if they were active when the SPQ control was
activated.
QQ specifies the quality of subsequent printing. Valid values are X'00' to X'FE' as follows:
The DATA field must contain only ASCII numeric (0 to 9) data, and must be eight bytes long, check digit
included.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
Select EAN-13 Bar Code (DC4 DC4 ESC ! NN 2 PP EM)
14141B21NN02PP19
The control selects the EAN-13 bar code.
The DATA field must contain only ASCII numeric (0 to 9) data, and must be thirteen bytes long, check digit
included.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
Select UPC-A Bar Code (DC4 DC4 ESC ! NN 3 PP EM)
14141B21NN03PP19
The control selects the UPC-A bar code.
The DATA field must contain only ASCII numeric (0 to 9) data, and must be twelve bytes long, including a
system digit at the leftmost position and a check digit at the rightmost position of the data field.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
Chapter 1. Personal Printer Data Stream (PPDS)29
00Do not print human readable characters
01Print human readable characters
Select MSI Bar Code (DC4 DC4 ESC ! NN 4 PP EM)
14141B21NN04PP19
The control selects the MSI bar code.
The DATA field for this bar code does not have a defined length, but the DATA field must contain only
ASCII numeric (0 to 9) data.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
Select UPC-E Bar Code (DC4 DC4 ESC ! NN 5 PP EM)
14141B21NN05PP19
The control selects the UPC-E bar code.
The DATA field must contain only ASCII numeric (0 to 9) data, and must be eight bytes long, including a
system digit at the leftmost position and a check digit at the rightmost position of the data field. The
system digit must bea0or1.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
Select UPC 2-Digit Bar Code (Magazine) (DC4 DC4 ESC ! NN 6 PP EM)
14141B21NN06PP19
This control selects the UPC 2-Digit bar code.
The DATA field must contain only ASCII numeric (0 to 9) data, and must be three bytes long, check digit
included.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
30Programmer Manual
01Print human readable characters
Select UPC 5-Digit Bar Code (Magazine) (DC4 DC4 ESC ! NN 7 PP EM)
14141B21NN07PP19
This control selects the UPC 5-Digit bar code.
The DATA field must contain only ASCII numeric (0 to 9) data, and must be six bytes long, check digit
included.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
Select 2 of 5 INTERLEAVED Bar Code (DC4 DC4 ESC ! NN 17 PP EM)
14141B21NN11PP19
The control selects the 2 of 5 Interleaved bar code.
The DATA field for this bar code does not have a defined length, but the number of data bytes must be
even. The DATA field must contain only ASCII numeric (0 to 9) data.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
Select 2 of 5 INDUSTRIAL Bar Code (DC4 DC4 ESC ! NN 18 PP EM)
14141B21NN12PP19
The control selects the 2 of 5 Industrial bar code.
The DATA field for this bar code does not have a defined length, but the DATA field must contain only
ASCII numeric (0 to 9) data.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
Chapter 1. Personal Printer Data Stream (PPDS)31
Select 2 of 5 MATRIX Bar Code (DC4 DC4 ESC ! NN 19 PP EM)
14141B21NN13PP19
The control selects the 2 of 5 Matrix bar code.
The DATA field for this bar code does not have a defined length, but the DATA field must contain only
ASCII numeric (0 to 9) data.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
Select CODE 3 of 9 Bar Code (DC4 DC4 ESC ! NN 20 PP EM)
14141B21NN14PP19
This control selects the Code 3 of 9 bar code.
The DATA field for this bar code does not have a defined length, but must start and end with an *.
The DATA field may contain alphanumeric data as follows:
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
Select CODABAR Bar Code (DC4 DC4 ESC ! NN 22 PP EM)
14141B21NN16PP19
This control selects the Codabar bar code.
The DATA field for this bar code does not have a defined length, and must contain only the data
characters listed below. Any combination of start/stop characters is allowed.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
Select CODE 128 Bar Code (DC4 DC4 ESC ! NN 23 PP EM)
14141B21NN17PP19
This control selects the Code 128 bar code.
The DATA field for this bar code does not have a defined length, and must contain only the data
characters belonging to the selected ASCII character set, including control characters.
Since GS and EM are control codes, the host application must set the high-order bit of the control code to
allow the printer to distinguish between encodable data and terminator strings.
Human Readable Characters will be centered below the bar code and can be wider than the encoded
area. The user is responsible for allowing space for Human Readable Characters to print without
overlapping adjacent data.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
Select POSTNET Bar Code (DC4 DC4 ESC ! NN 24 PP EM)
14141B21NN18PP19
This control selects the POSTNET [ZIP, ZIP+4, or Delivery Point Bar Code (DPBC)] bar code.
The DATA field for this bar code must contain only ASCII numeric (0 to 9) data. A data string of all zeroes
will be encoded if other than numeric data is detected in the job stream.
POSTNET bar code does not print Human Readable Characters, regardless of the PP byte. POSTNET
uses the tall and short bars required by the United States Postal Service standard, and encodes numeric
data streams regardless of length.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
This sequence causes the bar code symbol to be printed according to the Bar Code Selection command.
Sequential bar codes of the same type and height may be printed. GS N# defines the distance from the
beginning of the line or between two bar code symbols in multiples of 1/72 of an inch. This command must
be closed with an EM character.
Note: Bar code symbols will print over any descenders in the previous character box if any text is present.
Example 1:
Print an EAN-8 bar code symbol, one inch from the right margin with the data set of 12345678.
Print two Code 3 of 9 bar code symbols. The first symbol on the right margin; the second symbol one inch
to the right of the first symbol. Data sets are ABC+0123 and 12345678
This command reinitializes the printer. It resets the printer mode and clears the buffer of printable data.
Set Vertical Spacing n/144 Inch (DC4 DC4 ESC 1 NN)
14141B31NN
This control sets a line spacing value for subsequent line feeds.
NN is a one-byte hexadecimal number that specifies the line spacing value of NN/144 inches. The value of
NN is 1 to 255.
Set Vertical Spacing 12 Lines/30mm (DC4 DC4 ESC 3 1)
14141B3331
This command sets line spacing to 12 lines per 30 mm.
Set Vertical Spacing 3 Lines/30mm (DC4 DC4 ESC 3 3)
14141B3333
34Programmer Manual
This command sets line spacing to 3 lines per 30 mm.
Set Vertical Spacing 4 Lines/30mm (DC4 DC4 ESC 3 4)
14141B3334
This command sets line spacing to 4 lines per 30 mm.
Set Vertical Spacing 6 Lines/30mm (DC4 DC4 ESC 3 6)
14141B3336
This command sets line spacing to 6 lines per 30 mm.
Set Vertical Spacing 8 Lines/30mm (DC4 DC4 ESC 3 8)
14141B3338
This command sets line spacing to 8 lines per 30 mm.
Eject Single Sheet or Form Feed (DC4 DC4 ESC 5)
14141B35
This command causes a form feed on fanfold forms.
Set 15, 17.1, 20 CPI (DC4 DC4 ESC A)
14141B41NN
This command sets horizontal spacing (characters per inch) to 15, 17.1 or 20.
The values for NN are:
415 CPI
517.1 CPI
620 CPI
Load or Park Fanfold from a Rear Path (DC4 DC4 ESC N)
14141B4ENN
This command loads or performs the Park function for fanfold paper fed from the rear path.
The values for NN are:
0The printer selects the rear path. If fanfold paper is already loaded in a paper path that is not
requested, the printer automatically performs the Park function before loading the rear path. The
printer will then load the fanfold paper once data is received. For more information on the Park
function, see “PARK/PATH” in “Chapter 2. Understanding the Operator Panel” in the User's Guide
for your printer.
1The printer performs the Park function for forms in the rear path.
Chapter 1. Personal Printer Data Stream (PPDS)35
Load or Park Fanfold from a Front Path (DC4 DC4 ESC T)
14141B54NN
This command loads or performs the Park function for fanfold paper fed from the front path.
The values for NN are:
0The printer selects the front path. If fanfold paper is already loaded in a paper path that is not
requested, the printer automatically performs the Park function before loading the front path. The
printer will then load the fanfold paper once data is received. For more information on the Park
function, see “PARK/PATH” in “Chapter 2. Understanding the Operator Panel” in the User's Guide
for your printer.
1The printer performs the Park function for forms in the front path.
Select Emulation (DC4 DC4 ESC Y)
14141B59NN
This command selects the printer emulation mode.
The values for NN are:
1Epson FX 1050
24202 Proprinter III XL
54247 or 2381 Personal Printer
Select AFTA in Column (DC4 DC4 ESC Z)
14141B5ANN
This command selects the column at 10 CPI where the Automatic Forms Thickness Adjustment (AFTA) will
be made.
The value for NN is the column number.
Select Resident Font (DC4 DC4 ESC g)
14141B67NN
This command selects the resident font based on the following values of NN:
0Courier
1Gothic
128OCR-B
129OCR-A
Request to Read Configuration (DC4 DC4 ESC h)
14141B68
This command requests the printer to send its configuration saved in non-volatile memory (NVM).
The printer must be configured for 1284 Parallel mode.
36Programmer Manual
Printer Configuration Response (DC4 DC4 ESC h)
14141B68LLHHTTSSD1...DNCS
This is the response Request to Read Configuration command.
The printer must be configured for 1284 Parallel mode. LL and HH indicate the number of bytes that follow
this control. LL is the least significant byte of the count and HH is the most significant byte. (The number
of bytes that follow equal HH x 256 + LL.)
The other values are:
TTModel Type
SSModel Sub-type
D1...DN
Configuration Data
CSChecksum of the data bytes
Write Configuration Response (DC4 DC4 ESC i)
14141B69LLHHTTSSD1...DNCS
This command writes configuration data to non-volatile memory (NVM).
The printer must be configured for 1284 Parallel mode. LL and HH indicate the number of bytes that follow
this control. LL is the least significant byte of the count and HH is the most significant byte. (The number
of bytes that follow equal HH x 256 + LL.)
The other values are:
TTModel Type
SSModel Sub-type
D1...DN
This command acknowledges that the configuration was written to the printer. This is the response to the
Write Configuration command.
The printer must be configured for 1284 Parallel mode.
NN is a single byte defined as follows:
X'00'Configuration Saved (Successful)
X'01'Configuration Not Saved (Error)
Select Print Quality (DC4 DC4 ESC p)
14141B70NN
The values of NN are:
Chapter 1. Personal Printer Data Stream (PPDS)37
0Fast Draft (Model Z03 only)
1DP
2DP Text
3NLQ
Buffer Terminating Conditions
The following controls cause buffered data to be released for printing:
v Carriage Return
v Line Feed
v Reverse Line Feed
v Form Feed
v Horizontal Tab (if there is print head movement)
v Vertical Tab
v Backspace
v Set 1/8 Inch Line Spacing
v Set 7/72 Inch Line Spacing
v Set Graphics Line Spacing
v Select n/72 Inch Line Spacing
v Invoke Text Line Spacing (if the line spacing is changed)
v Relative Move Right
v Relative Move Left
v Relative Move Baseline
v Shift In/Condensed Print
v Shift Out/Double-Wide Print
v Device Control 4/Cancel Double-Wide Print
v Begin Subscript/Superscript
v End Subscript/Superscript
v Begin Double-Strike Print
v End Double-Strike Print
v Begin Emphasized Print
v End Emphasized Print
v Set Presentation Highlight
v Continuous Overscore
v Auto Underscore
v Device Control 2/Select 10 CPI
v Set 12 CPI
v Proportional Space Mode
v Change Font
v Normal Density Bit Image Graphics
v Dual Density Bit Image Graphics Type 1
v Dual Density Bit Image Graphics Type 2
v High Density Bit Image Graphics
v Set Initial Conditions
v Select Score Line (2381 and 4247 only)
v Unidirectional Printing
v Set Horizontal Margins
The following conditions also cause buffered data to be released for printing:
v Parallel -INIT
v Automatic Line Wrap
An automatic line wrap consists of a carriage return and line feed inserted after the maximum number of
characters has been printed on a line. The next character is then printed at the left margin on the
following line. Automatic line wrap occurs for text data but not for bit image graphics.
38Programmer Manual
Chapter 2. Epson FX-1050 Data Stream
When the 4247 is in Epson emulation mode, the printer can print files coded for the Epson FX-1050 printer
using the Epson ESC/P printer control language. Use the Configuration menu to select Epson FX
emulation mode as the active printer configuration.
The following chapter describes the Epson FX-1050 emulation host control codes that are supported for
the printer.
Print Job Processing
There are no Epson FX-1050 controls that explicitly define print job boundaries. A print job for the 4247 is
established by the host system and consists of any set of related print objects. A print job could be as
short as one character or could be many pages long.
As an aid to the printer operator, the printer provides a Processing indicator on the operator panel. When
the Processing indicator is flashing, it indicates that data is currently being received, processed, or printing,
or that data is buffered in the printer but cannot be immediately printed. If the Processing indicator is not
lit, then all print jobs have been completed.
Configuration parameter values can be changed at any time; however, to obtain predictable results,
changes to operator panel configuration parameter values should be made before the print job is sent to
the printer and after the previous print job has completed printing. Changing configuration parameter
values while a print job is in progress may cause unpredictable results.
We recommend the following to ensure that your print jobs run correctly:
v Establish a known print environment, and end any previous print job. Start each print job with an
Initialize Printer/control. This control resets the printer environment to the default settings. You can then
set additional controls depending on your print job environment.
v End each print job with a Form Feed control. This control causes all data to be printed, and the current
position is set to the top-of-form position.
v If a print job is abnormally terminated, the job should be canceled. See “Cancel Print” in “Chapter 2.
Understanding the Operator Panel” in the User's Guide for your printer.
Page Printing Concept
The 4247 processes print jobs in terms of pages, as well as in lines and columns. A page is a logical entity
whose boundaries are defined by the width and the page length. These boundaries are established during
printer initialization using the printer defaults, and can be changed using the Configuration menu or by
issuing the appropriate data stream controls.
As a job prints, the printer controller maintains both the logical position and the physical position on the
page. If a print job does not end with a proper job terminator (for example, Form Feed), then:
v All data for the current page may not print
v The next print job may be misaligned on the form
v Residual data from a previous job could print with the new job.
Page Presentation
Many Epson ESC/P commands (tabs, margins, line spacing, for example) are described in terms of the
presentation surface. A presentation surface is a two-dimensional surface upon which the printer positions
symbols according to controls embedded in the incoming data stream. The presentation surface is defined
in absolute terms by the width and depth parameters of the page size control commands (Set Page
39
Length, Set Horizontal Margins, for example). The physical print position does not move outside the range
of these two parameters. The left margin (LM) and right margin (RM) are variable parameters within the
presentation surface. The logical print position does not move outside the range of the vertical margins nor
outside the horizontal margins + 1. The following figure shows the presentation surface and the
relationships of some of these parameters.
CPPCurrent Print Position (LM ≤ CPP ≤ RM).
CPLCurrent Print Line
MPPMaximum Print Position (in characters at current CPI)
PMPP Physical Maximum Print Position. The largest number of characters that can be placed on one line
of the surface (the largest value that MPP can assume).
LMLeft Margin
RMRight Margin
MPLMaximum Page Length (in lines at current LPI)
Notes:
1. The host should set the limits of the presentation surface if the default or previous values are not
acceptable.
2. The operator should align the physical paper so that it matches the logical presentation surface.
Also created with this surface is a pair of numbers (CPL and CPP) which specify the line number and
column number where the next graphic will be printed. These internal values are the logical position on the
presentation surface.
The variable parameters have default values which are established when the printer is initialized. The
standard power-on defaults are:
MPP (width)Operator panel setting
40Programmer Manual
MPP (depth)Operator panel setting
CPIOperator panel setting
LPIOperator panel setting
LM0 inches (Column 1)
RMEqual to MPP
HTHorizontal tabs are set at each 8th column, starting with column 9 (9, 17,
25, 33, and so on.)
VTVertical tabs are all cleared
One-Byte Controls
Note: Control hex values within parentheses are recognized only within PC Character Set 1.
The printer uses the following one-byte controls:
ControlHexName
NUL00 (80)Null (no operation)
BEL07 (87)Bell
BS08 (88)Backspace
HT09 (89)Horizontal Tab
LF0A (8A)Line Feed
VT0B (8B)Vertical Tab
FF0C (8C)Form Feed
CR0D (8D)Carriage Return
SO0E (8E)Shift Out (Double-Wide Print)
SI0F (8F)Shift In (Condensed Print)
DC111 (91)Device Control 1 (Parallel Select)
DC212 (92)Device Control 2 (Cancel Condensed Print)
DC313 (93)Device Control 3 (Parallel Deselect)
DC414 (94)Device Control 4 (Cancel Double-Wide Print)
CAN18 (98)Cancel
SP20Space
DEL7FDelete Character
Null (NUL)
00
This control terminates the Set Horizontal Tab and Set Vertical Tab control codes. The printer ignores NUL
by itself.
Bell (BEL)
07
This control causes the audible alarm to sound.
Chapter 2. Epson FX-1050 Data Stream41
Backspace (BS)
08
This control moves the print position horizontally one character width to the left. If the current print position
is at the left margin, the printer ignores this command.
Horizontal Tab (HT)
09
This control moves the print position to the next horizontal tab stop. If there are no tab stops to the right,
or if the next tab stop is beyond the current right margin, the control is ignored.
Line Feed (LF)
0A
This control advances the paper one line. The horizontal position does not change unless automatic
carriage return mode is activated from the operator panel Configuration menu. If the paper advance
crosses the bottom margin, the printer completes all deferred printing on the current page and then does
an automatic form feed.
If skip perforation mode is active and the bottom margin is crossed, the vertical position on the new page
following the automatic form feed will be the top-of-form position. If skip perforation is not active, the
vertical position on the new page is the point immediately following the previous print line.
Vertical Tab (VT)
0B
This control causes the vertical presentation position to be advanced to the next vertical tab stop. The
horizontal position is not affected unless automatic carriage return mode is activated from the operator
panel Configuration menu. If there are no tab stops past the current vertical presentation position, Vertical
Tab is treated as a Line Feed.
Form Feed (FF)
0C
This control causes a new page to be started. Form Feed is a line end and page end control; it causes all
deferred printing that may have been buffered for the current page to be completed and the form
physically advanced to eject the current page. The vertical presentation position advances to the top
margin and the horizontal presentation position is set to the left margin for subsequent printing.
Carriage Return (CR)
0D
42Programmer Manual
This control moves the current horizontal print position to the left margin. If Carriage Return equals
Carriage Return + Line Feed, a Line Feed is executed when Carriage Return is received. Otherwise, the
vertical position does not change. Carriage Return is a line ending control code that causes buffered data
to print.
Shift Out (SO) / Double-Wide Print
0E
This control causes the printer to start double-width printing. Double-width printing prints the characters
twice as wide as the current character spacing. This results in half as many characters per inch. Each
character takes up the space of two single-width characters. A Carriage Return, Line Feed, Form Feed,
Vertical Tab, Double-Wide Continuous Mode, Cancel Double-Wide Print, or Set Presentation Position with
vertical movement specified cancels the Shift Out control code.
Shift In (SI) / Condensed Print
0F
This control prints graphic characters in condensed pitch (15, 17.1, or 20 CPI). If the current print option is
10 CPI this control will condense printing to 17.1 CPI. If the current print option is 12 CPI this control will
condense printing to 20 CPI. If the current print option is 15 CPI there is no change in density. This control
changes the maximum number of characters that can be printed on one line. Shift In is a buffer
terminating control; if printable data at a different character-per-inch setting is buffered, that data is printed
before the setting is changed. The current presentation position becomes the next printable column at the
new character-per-inch setting. CPI can be changed within a print line.
Device Control 1 (DC1) / Select
11
This control selects the printer.
Device Control 2 (DC2) / Cancel Condensed Print
12
This control cancels or ends condensed (17.1 or 20 CPI) printing. DC2 is a buffer terminating control; if
printable data at a different characters-per-inch setting is buffered, that data is printed before the setting is
changed. The current presentation position becomes the next printable column at the new
character-per-inch setting. CPI can be changed within a print line.
Device Control 3 (DC3) / Deselect
13
This control is treated as a NUL.
Chapter 2. Epson FX-1050 Data Stream43
Device Control 4 (DC4) / Cancel Double-Wide Print
14
This control cancels double-wide printing if double wide was selected with the Shift Out control. The
characters-per-inch setting returns to the previous value.
Cancel (CAN)
18
This control purges all buffered data. All data received after the most recent buffer terminating control is
discarded. For a list of buffer terminating controls, see “Buffer Terminating Conditions” on page 72. Any
data received after Cancel is processed normally. Cancel does not change the current presentation
position.
Space (SP)
20
This control moves the print position one character space to the right.
Delete Character (DEL)
7F
This control removes the last text character on the print line and does not affect control codes.
Escape Sequence Controls
Escape sequence controls have an ESC followed by one or more control parameters. Supported escape
sequence controls are:
ESC DC31B 13Device Control 3 (Deselect)
ESC DC41B 14Device Control 4 (Cancel Double-Wide Print)
ESC CAN1B 18Cancel
ESC EM1B 19Turn Auto Sheet Feed On or Off
ESC SP1B 20Set Intercharacter Spacing
ESC !1B 21Master Select
ESC #1B 23Cancel MSB Control
ESC $1B 24Set Absolute Print Position
ESC %1B 25Select User-defined Set
ESC &1B 26Define User-defined Characters
ESC *1B 2ASelect Graphics Mode
ESC -1B 2DAuto Underscore
ESC /1B 2FSelect Vertical Tab Channel
ESC 01B 30Set 1/8 Inch Line Spacing (8 LPI)
ESC 11B 31Set 7/72 Inch Vertical Spacing
ESC 21B 32Set 1/6 Inch Line Spacing (6 LPI)
ESC 31B 33Set n/216 Inch Line Spacing
ESC 41B 34Select Italic Mode
ESC 51B 35Cancel Italic Mode
ESC 61B 36Printable Code Area Expansion
ESC 71B 37Cancel Printable Code Area Expansion
ESC : NUL1B 3A 00Copy ROM into RAM
ESC <1B 3CSet Unidirectional Mode (1 line only)
ESC =1B 3DSet MSB to 0
ESC >1B 3ESet MST to 1
ESC ?1B 3FReassign Graphics Mode
ESC @1B 40Initialize Printer
ESC A1B 41Select n/72 Inch Line Spacing
ESC B1B 42Set Vertical Tabs
ESC C1B 43Set Page Length (Lines or Inches)
ESC D1B 44Set Horizontal Tabs
ESC E1B 45Begin Emphasized Print
ESC F1B 46End Emphasized Print
ESC G1B 47Begin Double-Strike Print
ESC H1B 48End Double-Strike Print
ESC I1B 49Printable Code Area Expansion
ESC J1B 4APerform n/216 Inch Line Feed
ESC K1B 4BSelect Single Density Graphics Mode
ESC L1B 4CSelect Double Density Graphics Mode
ESC M1B 4DSelect 12 CPI
ESC N1B 4EBegin Skip Perforation
Chapter 2. Epson FX-1050 Data Stream45
ControlHexName
ESC O1B 4FEnd Skip Perforation
ESC P1B 50Select 10 CPI
ESC Q1B 51Set Right Margin
ESC R1B 52Select Character Set
ESC S1B 53Begin Subscript/Superscript
ESC T1B 54End Subscript/Superscript
ESC U1B 55Set Print Direction
ESC W1B 57Double-Wide Continuous Mode
ESC Y1B 59Dual Density Bit Image Graphics Type 2
ESC Z1B 5AHigh Density Bit Image Graphics
ESC \1B 5CSet Relative Position
ESC a1B 61Set Letter Quality Justification
ESC b1B 62Set Vertical Tabs in Channel
ESC d1B 64Relative Move Right n/120
ESC e1B 65Relative Move Left n/120
ESC g1B 67Set 15 CPI
ESC j1B 6AFeed Paper n/216 Reverse
ESC k1B 6BSelect NLQ Font
ESC l1B 6CSet Left Margin
ESC p1B 70Turn Proportional Mode On/Off
ESC s1B 73Quiet Printing
ESC t1B 74Select Character Table
ESC w1B 77Double High Printing
ESC x1B 78Select NLQ or DP Print Quality
Escape (ESC)
1B
This control is a prefix used in combination with supplementary control bytes to provide an extended set of
control functions.
Null (ESC NUL)
1B00
The printer ignores the NUL control by itself.
Bell (ESC BEL)
1B07
46Programmer Manual
This control causes the audible alarm to sound, if enabled. The alarm may be disabled or enabled from
the Configuration menu.
Backspace (ESC BS)
1B08
This control moves the print position horizontally one character width to the left. If the current print position
is at the left margin, the printer ignores this command.
Horizontal Tab (ESC HT)
1B09
This control moves the print position to the next horizontal tab stop. If there are no tab stops to the right,
or if the next tab stop is beyond the current right margin, the control is ignored.
Line Feed (ESC LF)
1B0A
This control advances the paper one line. The horizontal position does not change unless automatic
carriage return mode is activated from the operator panel Configuration menu. If the paper advance
crosses the bottom margin, the printer completes all deferred printing on the current page and then does
an automatic form feed.
If skip perforation mode is active and the bottom margin is crossed, the vertical position on the new page
following the automatic form feed will be the top-of-form position. If skip perforation is not active, the
vertical position on the new page is the point immediately following the previous print line.
Vertical Tab (ESC VT)
1B0B
This control causes the vertical presentation position to be advanced to the next vertical tab stop. The
horizontal position is not affected unless automatic carriage return mode is activated from the operator
panel Configuration menu. If there are no tab stops past the current vertical presentation position, Vertical
Tab is treated as a Line Feed.
Form Feed (ESC FF)
1B0C
This control causes a new page to be started. Form Feed is a line end and page end control; it causes all
deferred printing that may have been buffered for the current page to be completed and the form
physically advanced to eject the current page. The vertical presentation position advances to the top
margin and the horizontal presentation position is set to the left margin for subsequent printing.
Chapter 2. Epson FX-1050 Data Stream47
Carriage Return (ESC CR)
1B0D
This control moves the current horizontal print position to the left margin. The vertical print position does
not change unless automatic line feed mode is active.
Shift Out (ESC SO) / Double-Wide Print
1B0E
This control causes the printer to start double-width printing. Double-width printing prints the characters
twice as wide as the current character spacing. This results in half as many characters per inch. Each
character takes up the space of two single-width characters. A Carriage Return, Line Feed, Form Feed,
Vertical Tab, Double-Wide Continuous Mode, Cancel Double-Wide Print, or Set Presentation Position with
vertical movement specified cancels the Shift Out control code.
Shift In (ESC SI) / Condensed Print
1B0F
This control prints graphic characters in condensed pitch (15, 17.1, or 20 CPI). If the current print option is
10 CPI this control will condense printing to 17.1 CPI. If the current print option is 12 CPI this control will
condense printing to 20 CPI. If the current print option is 15 CPI there is no change in density. This control
changes the maximum number of characters that can be printed on one line. Shift In is a buffer
terminating control; if printable data at a different character-per-inch setting is buffered, that data is printed
before the setting is changed. The current presentation position becomes the next printable column at the
new character-per-inch setting. CPI can be changed within a print line.
Device Control 1 (ESC DC1) / Select
1B11
This control selects the printer.
Device Control 2 (ESC DC2) / Cancel Condensed Print
1B12
This control cancels or ends condensed (17.1 or 20 CPI) printing. DC2 is a buffer terminating control; if
printable data at a different characters-per-inch setting is buffered, that data is printed before the setting is
changed. The current presentation position becomes the next printable column at the new
character-per-inch setting. CPI can be changed within a print line.
Device Control 3 (ESC DC3) / Deselect
1B13
This control is treated as a NUL.
48Programmer Manual
Device Control 4 (ESC DC4) / Cancel Double-Wide Print
1B14
This control cancels double-wide printing if double wide was selected with the Shift Out control. The
characters-per-inch setting returns to the previous value.
Cancel (ESC CAN)
1B18
This control purges all buffered data. All data received after the most recent buffer terminating control is
discarded. For a list of buffer terminating controls, see “Buffer Terminating Conditions” on page 72. Any
data received after Cancel is processed normally. Cancel does not change the current presentation
position.
Set Intercharacter Spacing (ESC SP)
1B20NN
This control sets the amount of space to be added to the right of each character. The number of units of
space is equal to NN, from 0 to 127. Each unit of space is 1/120th of an inch.
Master Select (ESC !)
1B21NN
This control selects any valid combination of the modes in the table below. To determine the value of the
NN, add together the values of the modes you select from the table.
This control applies to DP and NLQ. Proportional cannot be condensed and 10 CPI cannot be combined
with 12 CPI. Proportional overrides condensed if both proportional and condensed are selected.
Double-strike is ignored in NLQ.
Cancel MSB Control (ESC #)
1B23
Chapter 2. Epson FX-1050 Data Stream49
Cancels the most significant bit (MSB) control.
Set Absolute Print Position (ESC $)
1B24N1N2
This control specifies the distance that subsequent characters are to be printed from the set left margin in
1/60 inch units. Where the total number of dots equals N1 + (N2 × 256). If the position is beyond the right
margin, the control is ignored and the previous setting remains active. If the position is within the right
margin, subsequent characters will be printed at (N1 + [N2 × 256])/60 inches.
Select User-Defined Set (ESC %)
1B25NN00
This control specifies the character set as default or user-defined. The following are the values of NN:
0Selects the default character set.
1Selects the user-defined character set.
Define User-Defined Characters (ESC &)
1B26NNMMW0W1W2D0...DN
This control allows the definition of special characters that are not present in the character sets.
NN and MM are two decimal numbers that define the first and last characters to be replaced in the
character set in use. If you want to replace only one character, MM must be equal to NN. Any value in the
range of 0 to 127 is accepted, even code 32, which is the space character.
W0, W1, and W2 are numbers that specify the width of the character and the space around it. The space
on the left of the character (in columns of dots) is specified by W0; the space on the right of the character
is specified by W2. W1 specifies the number of columns of dots that must be printed to design the
character.
The following table lists the maximum value for W0, W1, and W2:
PrintingW0 + W1W0 + W1 + W2
DP912
NLQ at 10 CPI3536
NLQ at 12 CPI2930
Proportional4142
D0...DN is the data of the character that is printed. Three bytes are needed for each column because it is
composed of 24 dot positions. In this way, the number of data bytes is W1 x 3. You can define a character
in superscript or subscript. Two bytes are needed for each column because it is composed of 16 dot
positions. The number of data bytes is W1 x 2.
50Programmer Manual
Select Graphics Mode (ESC *)
1B2AMMN1N2
This control selects the graphics mode MM from the table below. The total number of columns equals N1
+ (N2 ×256).
Note: (*) Adjacent dots cannot be printed in this mode
Density
(dots/in.)
Auto Underscore (ESC –)
1B2DNN
This control turns on and off the continuous underscore function.
If NN is an odd value (1, 3, 5 ...), the printer underscores all text characters and spaces following this
sequence. The printer does not underscore white space caused by horizontal tabs.
If NN is an even value (0,2,4,...), the printers stops the underscore of all data following this sequence.
Select Vertical Tab Channel (ESC /)
1B2FCH
This control selects the vertical tab channel. The values for CH are 0 to 7. The channel selected by this
control is used for all subsequent vertical tab commands. Channel 0 is used if no channel has been
selected.
Set 1/8 Inch Line Spacing (ESC 0)
1B30
This control sets the line spacing to eight lines per inch.
Chapter 2. Epson FX-1050 Data Stream51
The application program is responsible for keeping track of the vertical position on the current page
relative to the current line spacing. Changing the line spacing within a print job without changing the page
length can cause printing on the page perforation. For additional information, see “Set Page Length (ESC
C)” on page 55.
Set 7/72 Inch Line Spacing (ESC 1)
1B31
This control sets the line spacing to 7/72 inch.
The application program is responsible for keeping track of the vertical position on the current page
relative to the current line spacing. Changing the line spacing within a print job without changing the page
length can cause printing on the page perforation. For additional information, see “Set Page Length (ESC
C)” on page 55.
Set 1/6 Inch Line Spacing (ESC 2)
1B32
This control sets the line spacing at the value set by the last Set Text Line Spacing (ESC A) control
received. The printer sets the line spacing to six lines per inch if no ESC A has been issued.
Set n/216 Inch Line Spacing (ESC 3)
1B33NN
This control changes the line spacing to the value specified by NN.
NN is a value that specifies the line spacing in units of 1/216 inch. Valid values are 0 to 255. If NN equals
0, the printer ignores this control.
The application program is responsible for keeping track of the vertical position on the current page
relative to the current line spacing. Changing the line spacing within a print job without changing the page
length can cause printing on the page perforation. For additional information, see “Set Page Length (ESC
C)” on page 55.
Select Italic Mode (ESC 4)
1B34
This control turns on italic character printing. This control is valid even if the Epson Extended Graphics
character set has been selected by the Character Table (ESC t) or the operator panel, but character
graphics cannot be italicized. This control is used in both DP and NLQ.
Cancel Italic Mode (ESC 5)
1B35NN
This control cancels italic character printing.
52Programmer Manual
Printable Code Area Expansion (ESC 6)
1B36
This control enables codes X'80' through X'9F' from the active character set to become printable
characters instead of control characters.
Cancel Printable Code Area Expansion (ESC 7)
1B37
This control cancels Printable Code Area Expansion (ESC 6).
Copy ROM into Ram (ESC : NUL)
1B3A00
This control copies the characters in ROM into RAM. Specific characters may be redefined.
Select Unidirectional Mode (one line only) (ESC <)
1B3C
This control selects unidirectional printing from left to right for one line only. ESC < is cancelled by a
Carriage Return. The print head begins the line at the Home position, prints to the end of the line, then is
cancelled by the CR that returns the head to Home.
Set MSB to 0 (ESC =)
1B3D
This control sets the most significant bit (MSB) of all incoming data to 0. The MSB is bit 7. This control
only affects text and control code data. This control can prevent the problem of some system applications
that always send data with the MSB set to 1, which results in italic or graphics printing in Epson printers.
Set MSB to 1 (ESC >)
1B3E
This control sets the most significant bit (MSB) of all incoming data to 1. The MSB is 7. This control only
affects text and control code data.
Reassign Graphics Mode (ESC ?)
1B3FSNN
This control reassigns a graphics command (ESC K, ESC L, ESC Y, or ESC Z) to a different mode (K, L,
Y, or Z).
Note: (*) Adjacent dots cannot be printed in this mode.
Initialize Printer (ESC @)
1B40
This control resets all print related parameters to values previously saved and clears the buffer of printable
data.
Select n/72 Inch Line Spacing (ESC A)
1B41NN
This control sets a line spacing value for subsequent line feeds.
NN is a one-byte hexadecimal number that specifies the line spacing value of NN/72 inches.
The value of NN is 0 to 85. Following are example values for NN:
X'18'3 LPI
X'12'4 LPI
X'0C'6 LPI
X'09'8 LPI
X'08'9 LPI
X'06'12 LPI
Set Vertical Tabs (ESC B)
1B42N1N2...00
This control sets the vertical stops. The maximum number of tab stops supported is 16. The settings are
not affected by subsequent changes in line spacing. The tab settings must be in ascending order (N1, N2,
etc.) with the 0 character indicating the end of the command. Values of N are 1 to 255. All settings are
stored in Channel 0. See “Select Vertical Tabs in Channels (ESC b)” on page 60. To clear the tab settings,
use ESC B 0.
54Programmer Manual
Set Page Length (ESC C)
1B43LLIN
This control sets the physical page length in lines or inches and resets skip perforation mode.
LL is a one-byte hexadecimal number that specifies the page length in lines. The value is converted to
inches based upon the current line spacing. Valid values for LL are X'01' to X'FF', but the resulting page
length in inches must be less than 113.8 inches (2890 mm). If LL equals 0, then parameter II (length is
inches) is used.
IN is a one-byte hexadecimal number that specifies the page length in inches. IN is present only if
parameter LL equals 0. Valid values for IN are X'01' to X'71'. If IN is greater than the maximum value, the
maximum value is used. If both LL and IN are zero, the control is ignored.
Set Horizontal Tabs (ESC D)
1B44TT...TT00
This control sets the horizontal tab stops. The maximum number of tab stops supported is 32. The
sequence terminates with the NUL control code. If the null terminator is missing, the printer treats the next
32 bytes as tab stops and ignores all the data bytes following the 32 bytes until a Null is received. If the
printer receives this control code with no tabs, all horizontal tab stops are cleared.
TT is the list of tab stops as character positions relative to the left edge of the physical page. Valid values
are X'01' to X'FF'. Tab stops must be specified in ascending order. Entries not in ascending order are
ignored.
Begin Emphasized Print (ESC E)
1B45
This control starts emphasized print mode (bold style). Emphasized printing continues until the printer
receives an End Emphasized Print (ESC F) control or the printer is initialized.
End Emphasized Print (ESC F)
1B46
This control ends emphasized print mode (bold style).
Begin Double-Strike Print (ESC G)
1B47
This control starts double-strike printing (all text characters are double struck). Double-strike printing
continues until the printer receives an End Double-Strike Print control (ESC H) or the printer is initialized.
Chapter 2. Epson FX-1050 Data Stream55
End Double-Strike Print (ESC H)
1B48
This control ends double-strike printing.
Printable Code Area Expansion (ESC I)
1B49
This control defines whether codes X'00' through X'1F' and codes X'80' through X'9F' are printable
characters or control characters of the active character set.
When NN equals X'01', the codes become printable characters, which allows them to be used as
user-defined characters.
When NN equals X'00', the codes are returned to nonprintable characters.
Perform n/216 Inch Line Feed (ESC J)
1B4ANN
This control performs a vertical move relative to the current presentation position.
NN is a one-byte hexadecimal value that specifies the move amount in units of 1/216 inch. The printer will
adjust the value to the nearest 1/144 inch. This control performs an immediate line feed, but does not
affect subsequent line spacing and does not produce a CR.
Select Single Density Graphics Mode (ESC K)
1B4BLLHHNN...NN
This control prints the supplied bit image data at 60 horizontal pel by 72 vertical pel. Bit image data can be
mixed with text data on the same line.
A two-byte count (LL HH) indicates the number of bytes that follow in this control. LL is the least significant
byte of the count; HH is the most significant byte. (The number of bytes that follow should equal HH × 256
+ LL.) If the count equals X'0000', the control is ignored.
NN...NN are the bytes containing the bit image data. The data format is in 8-bit vertical slices, with the
least significant bit the bottom dot and the most significant bit the top dot. B'1' indicates a pel to be printed;
B'0' indicates an unprinted pel. Data that exceeds the right margin is discarded.
Select Double Density Graphics Mode (ESC L)
1B4CLLHHNN...NN
This control prints the supplied bit image data at 120 horizontal by 72 vertical pel. Bit image data can be
mixed with text data on the same line.
56Programmer Manual
A two-byte count (LL HH) indicates the number of bytes that follow in this control. LL is the least significant
byte of the count; HH is the most significant byte. (The number of bytes that follow should equal HH × 256
+ LL.) If the count equals X'0000', the control is ignored.
NN .. NN are the bytes containing the bit image data. The data format is in 8-bit vertical slices, with the
least significant bit the bottom dot and the most significant bit the top dot. B'1' indicates a pel to be printed;
B'0' indicates an unprinted pel. Data that exceeds the right margin is discarded.
Select 12 CPI (ESC M)
1B4D
This control selects 12 characters per inch printing.
Begin Skip Perforation (ESC N)
1B4ENN
This control sets the number of lines to be skipped at the bottom of each page. Once this function is
activated, it stays active until the End Skip Perforation (ESC O) or Set Page Length (ESC C) control is
received or the printer is initialized.
NN is a one-byte hexadecimal value that specifies the number of lines to skip at the bottom of each page.
This value must be greater than zero and less than the length of the page in lines (from 0 to 127). If the
value is not valid, the control is ignored. Once Begin Skip Perforation is activated, the number of lines that
may be printed on a page is the page length minus NN.
End Skip Perforation (ESC O)
1B4F
This control ends skip perforation.
Select 10 CPI (ESC P)
1B50
This control selects 10 CPI printing and is normally used to cancel 12 CPI.
Select Right Margin (ESC Q)
1B51NN
This control sets the right margin to N columns at the current character width. Where NN is the number of
columns from the first print position to the end of the print line.
Select Character Set (ESC R)
1B52NN
Chapter 2. Epson FX-1050 Data Stream57
This control specifies an international character set as shown in the table below and is available in both
DP and NLQ. The following values for NN are:
This control activates subscript and superscript printing. Once this printing is active, it stays active until
another Begin Subscript/Superscript control changes the mode, an End Subscript/Superscript control is
received, or the printer is initialized.
NN is a one-byte hexadecimal value that activates subscript or superscript printing.
v If NN is an odd value (1, 3, 5, ...), subscript mode is active.
v If NN is an even value (0, 2, 4, ...), superscript mode is active.
End Subscript/Superscript (ESC T)
1B54
This controls stops subscript and superscript printing.
Set Print Direction (ESC U)
1B55NN
58Programmer Manual
This control specifies bidirectional or unidirectional printing.
v If NN is an odd value (1, 3, 5, ...) unidirectional printing is selected.
v If NN is an even value (0, 2, 4, ...), bidirectional printing (default) is selected.
Double-Wide Continuous Mode (ESC W)
1B57NN
This control turns double-wide printing on or off. When double-wide printing is on, the width of subsequent
graphic characters is doubled (the characters per inch value is half of the single character value). For tabs,
the font width is not doubled (tab distance is based upon single character width).
NN is a one-byte hexadecimal value that turns double-wide printing on or off.
v If NN is an odd value (1, 3, 5, ...), double-wide printing is turned on.
v If NN is an even value (0, 2, 4, ...), double-wide printing is turned off.
Note: Double-Wide Continuous Mode does the same function as Shift Out, except double wide printing is
not canceled when a new line begins.
Dual Density Bit Image Graphics Type 2 (ESC Y)
1B59LLHHNN...NN
This control prints the supplied bit image data at 120 horizontal pel by 72 vertical pel. Bit image data can
be mixed with text data on the same line. Horizontally adjacent dots are not allowed and will be removed if
specified.
A two-byte count (LL HH) indicates the number of bytes that follow in this control. LL is the least significant
byte of the count; HH is the most significant byte. (The number of bytes that follow should equal HH × 256
+ LL.) If the count equals X'0000', the control is ignored.
NN...NN are the bytes containing the bit image data. The data format is in 8-bit vertical slices, with the
least significant bit the bottom dot and the most significant bit the top dot. B'1' indicates a pel to be printed;
B'0' indicates an unprinted pel. Data that exceeds the right margin is discarded.
High Density Bit Image Graphics (ESC Z)
1B5ALLHHNN...NN
This control prints the supplied bit image data at 240 horizontal per by 72 vertical pel. Bit image data can
be mixed with text data on the same line.
A two-byte count (LL HH) indicates the number of bytes that follow in this control. LL is the least significant
byte of the count; HH is the most significant byte. (The number of bytes that follow should equal HH × 256
+ LL.) If the count equals X'0000', the control is ignored.
NN...NN are the bytes containing the bit image data. The data format is in 8-bit vertical slices, with the
least significant bit the bottom dot and the most significant bit the top dot. B'1' indicates a pel to be printed;
B'0' indicates an unprinted pel. Data that exceeds the right margin is discarded.
Chapter 2. Epson FX-1050 Data Stream59
Set Relative Position (ESC \)
1B5CN1N2
This control moves the print head to a horizontal print position relative to the current print position using
1/120 inch increments. To calculate the correct values for N1 and N2, determine the displacement required
in 1/120 of an inch. Send the resulting number using the formula total number of dots equals N1 + (N2 ×
256). If the desired formula is to the left, subtract the number from 65536 before using the formula. The
print head will move (N1 + [N2 × 256])/120 inches relative to the current print position. The control is
ignored if it would move the print head beyond the page margins.
Set Letter Quality Justification (ESC a)
1B61NN
This control selects print justification according to the following values of NN:
0Selects left justification
1Selects center justification
2Selects right justification
3Selects full justification
Notes:
1. Left justification is the default setting (NN = 0).
2. The commands HT and BS are valid only when left justification is active.
3. For full justification, there must be no carriage returns within a paragraph.
Select Vertical Tabs in Channels (ESC b)
1B62CHN1N2...00
This control sets vertical tabs to channels selected by the Set Vertical Tab Channel (ESC /) control. The
value of CH is 0 through 7 and the value of N1 is 0 through 255.
The distance of each tab stop from top of form is the current line spacing times the number of lines given
in N1.
If paper movement is commanded to a value of N1 greater than the page length, the paper movement
command is ignored. The values of N1 must be in ascending order. If they are not, the sequence up to
and including the out of sequence number is ignored. Skip over perforation is ignored. You can clear any
channel by sending ESC b CH 0, where CH is the channel number.
Relative Move Right n/120 (ESC d)
1B64N1N2
This control spaces forward in 1/120s of an inch. To find the values for N1 and N2, determine the required
displacement in 1/120s of an inch. Send the resulting number in the formula: N1 + (N2 X 256).
Relative Move Left n/120 (ESC e)
1B65N1N2
60Programmer Manual
This control spaces backward in 1/120s of an inch. To find the values for N1 and N2, determine the
required displacement in 1/120s of an inch. Send the resulting number in the formula: N1 + (N2 X 256).
Set 15 CPI (ESC g)
1B67
This control prints any data stored in the print buffer, and initializes following text to print at 15 CPI.
Feed Paper n/216 Reverse (ESC j)
1B6A
This command causes fanfold paper to feed backwards n/216 of an inch.
Select NLQ Font (ESC k)
1B6BNN
This control selects an NLQ font based on the following values of NN:
0Courier
1Gothic
This control affects only NLQ.
Set Left Margin (ESC l)
1B6CNN
This control sets the left margin to NN columns from the left edge of the physical page to the beginning of
the print line. Where NN is a hex value. The number of inches in the margin does not vary if the font,
character width, or horizontal dot density changes. This command automatically clears and resets
horizontal tabs to every eight characters, then performs a cancel operation. The smallest possible space
between the left margins is the width of one double-wide, 10 CPI character. If a margin control code
violates this minimum distance, it is ignored. Settings in proportional mode are treated as 10 CPI.
Turn Proportional Mode On/Off (ESC p)
1B70NN
This control sets proportional mode on or off to the following values of NN:
0Mode is Off
1Mode is On
This control overrides condensed and is available for DP, NLQ, and user-defined characters.
Quiet Printing (ESC s)
1B73NN
Chapter 2. Epson FX-1050 Data Stream61
This control activates and deactivates Quiet Mode (half-speed printing). The following are the values for
NN:
0Set Quiet Mode Off
1Set Quiet Mode On
Select Character Table (ESC t)
1B74NN
This control selects italic characters from the Epson Italic character set. The characters selected are ASCII
codes 128 to 255 (X'80' through X'FF').
The following values of NN are:
X'0'Select Epson Italic character set
X'1'Selects Epson Extended Graphics Italic character set (actually Code Page 437)
X'2'Remap DLL character set from positions 0 - 127 to 128 - 255.
Selecting Epson Extended Graphics does not disable italic printing. The value of NN must equal X'00' or
X'01'.
Double High Printing (ESC w)
1B77NN
This control activates and deactivates double-high printing. The following are the values for NN:
0Set Double-High Mode Off
1Set Double-High Mode On
Superscript, subscript, and condensed modes are not valid in double-high mode. This command is
available for both DP and NLQ printing.
Select NLQ or DP Print Quality (ESC x)
1B78NN
This control selects NLQ or DP from the following values of NN:
0Selects Fast Draft or DP mode. (See Note).
1Selects NLQ mode
Notes: If the printer configuration 'Host Fast Draft' setting is enabled then Fast Draft quality is selected. If
'Host Fast Draft' is disabled then DP quality is selected (model Z03 only).
4247 Commands
ControlHexName
DC4 DC4 ESC ! NN 1 PP EM14 14 1B 21 01Select EAN-8 Bar Code
DC4 DC4 ESC ! NN 2 PP EM14 14 1B 21 02Select EAN-13 Bar Code
DC4 DC4 ESC ! NN 3 PP EM14 14 1B 21 03Select UPC-A Bar Code
DC4 DC4 ESC ! NN 4 PP EM14 14 1B 21 04Select MSI Bar Code
DC4 DC4 ESC ! NN 5 PP EM14 14 1B 21 05Select UPC-E Bar Code
62Programmer Manual
ControlHexName
DC4 DC4 ESC ! NN 6 PP EM14 14 1B 21 06Select UPC 2-Digit Bar Code
(Magazine)
DC4 DC4 ESC ! NN 7 PP EM14 14 1B 21 07Select UPC 5-Digit Bar Code
(Magazine)
DC4 DC4 ESC ! NN 17 PP EM14 14 1B 21 11Select 2 of 5 INTERLEAVED Bar Code
DC4 DC4 ESC ! NN 18 PP EM14 14 1B 21 12Select 2 of 5 INDUSTRIAL Bar Code
DC4 DC4 ESC ! NN 19 PP EM14 14 1B 21 13Select 2 of 5 MATRIX Bar Code
DC4 DC4 ESC ! NN 20 PP EM14 14 1B 21 14Select CODE 3 of 9 Bar Code
DC4 DC4 ESC ! NN 22 PP EM14 14 1B 21 16Select CODABAR Bar Code
DC4 DC4 ESC ! NN 23 PP EM14 14 1B 21 17Select CODE 128 Bar Code
DC4 DC4 ESC ! NN 24 PP EM14 14 1B 21 18Select POSTNET Bar Code
DC4 DC4 ESC ( GS {N1} {DATA1} {N2} {DATA2}EM14 14 1B 28 1D
DD..DD 1D DD..DD 19
DC4 DC4 ESC @14 14 1B 40Reinitialize Printer
DC4 DC4 ESC 1 NN14 14 1B 31Set Vertical Spacing n/144 Inch
DC4 DC4 ESC 3 114 14 1B 33 31Set Vertical Spacing to 12 Lines/30mm
DC4 DC4 ESC 3 314 14 1B 33 33Set Vertical Spacing to 3 Lines/30mm
DC4 DC4 ESC 3 414 14 1B 33 34Set Vertical Spacing to 4 Lines/30mm
DC4 DC4 ESC 3 614 14 1B 33 36Set Vertical Spacing to 6 Lines/30mm
DC4 DC4 ESC 3 814 14 1B 33 38Set Vertical Spacing to 8 Lines/30mm
DC4 DC4 ESC 514 14 1B 35Eject Single Sheet or Form Feed
DC4 DC4 ESC A14 14 1B 41Set 15, 17.1, or 20 CPI
DC4 DC4 ESC N14 14 1B 4ELoad or Park Fanfold from a Rear Path
DC4 DC4 ESC T14 14 1B 54Load or Park Fanfold from a Front Path
DC4 DC4 ESC Y14 14 1B 59Select Emulation
DC4 DC4 ESC Z14 14 1B 5ASelect AFTA in Column
DC4 DC4 ESC g14 14 1B 67Select Resident Font
DC4 DC4 ESC h14 14 1B 68Request to Read Configuration
The DATA field must contain only ASCII numeric (0 to 9) data, and must be eight bytes long, check digit
included.
Chapter 2. Epson FX-1050 Data Stream63
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
Select EAN-13 Bar Code (DC4 DC4 ESC ! NN 2 PP EM)
14141B21NN02PP19
The control selects the EAN-13 bar code.
The DATA field must contain only ASCII numeric (0 to 9) data, and must be thirteen bytes long, check digit
included.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
Select UPC-A Bar Code (DC4 DC4 ESC ! NN 3 PP EM)
14141B21NN03PP19
The control selects the UPC-A bar code.
The DATA field must contain only ASCII numeric (0 to 9) data, and must be twelve bytes long, including a
system digit at the leftmost position and a check digit at the rightmost position of the data field.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
Select MSI Bar Code (DC4 DC4 ESC ! NN 4 PP EM)
14141B21NN04PP19
The control selects the MSI bar code.
The DATA field for this bar code does not have a defined length, but the DATA field must contain only
ASCII numeric (0 to 9) data.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
64Programmer Manual
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
Select UPC-E Bar Code (DC4 DC4 ESC ! NN 5 PP EM)
14141B21NN05PP19
The control selects the UPC-E bar code.
The DATA field must contain only ASCII numeric (0 to 9) data, and must be eight bytes long, including a
system digit at the leftmost position and a check digit at the rightmost position of the data field. The
system digit must bea0or1.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
Select UPC 2-Digit Bar Code (Magazine) (DC4 DC4 ESC ! NN 6 PP EM)
14141B21NN06PP19
This control selects the UPC 2-Digit bar code.
The DATA field must contain only ASCII numeric (0 to 9) data, and must be three bytes long, check digit
included.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
Select UPC 5-Digit Bar Code (Magazine) (DC4 DC4 ESC ! NN 7 PP EM)
14141B21NN07PP19
This control selects the UPC 5-Digit bar code.
The DATA field must contain only ASCII numeric (0 to 9) data, and must be six bytes long, check digit
included.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
Chapter 2. Epson FX-1050 Data Stream65
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
Select 2 of 5 INTERLEAVED Bar Code (DC4 DC4 ESC ! NN 17 PP EM)
14141B21NN11PP19
The control selects the 2 of 5 Interleaved bar code.
The DATA field for this bar code does not have a defined length, but the number of data bytes must be
even. The DATA field must contain only ASCII numeric (0 to 9) data.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
Select 2 of 5 INDUSTRIAL Bar Code (DC4 DC4 ESC ! NN 18 PP EM)
14141B21NN12PP19
The control selects the 2 of 5 Industrial bar code.
The DATA field for this bar code does not have a defined length, but the DATA field must contain only
ASCII numeric (0 to 9) data.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
Select 2 of 5 MATRIX Bar Code (DC4 DC4 ESC ! NN 19 PP EM)
14141B21NN13PP19
The control selects the 2 of 5 Matrix bar code.
The DATA field for this bar code does not have a defined length, but the DATA field must contain only
ASCII numeric (0 to 9) data.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
66Programmer Manual
00Do not print human readable characters
01Print human readable characters
Select CODE 3 of 9 Bar Code (DC4 DC4 ESC ! NN 20 PP EM)
14141B21NN14PP19
This control selects the Code 3 of 9 bar code.
The DATA field for this bar code does not have a defined length, but must start and end with an *.
The DATA field may contain alphanumeric data as follows:
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
Select CODABAR Bar Code (DC4 DC4 ESC ! NN 22 PP EM)
14141B21NN16PP19
This control selects the Codabar bar code.
The DATA field for this bar code does not have a defined length, and must contain only the data
characters listed below. Any combination of start/stop characters is allowed.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
Select CODE 128 Bar Code (DC4 DC4 ESC ! NN 23 PP EM)
14141B21NN17PP19
This control selects the Code 128 bar code.
Chapter 2. Epson FX-1050 Data Stream67
The DATA field for this bar code does not have a defined length, and must contain only the data
characters belonging to the selected ASCII character set, including control characters.
Since GS and EM are control codes, the host application must set the high-order bit of the control code to
allow the printer to distinguish between encodable data and terminator strings.
Human Readable Characters will be centered below the bar code and can be wider than the encoded
area. The user is responsible for allowing space for Human Readable Characters to print without
overlapping adjacent data.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
Select POSTNET Bar Code (DC4 DC4 ESC ! NN 24 PP EM)
14141B21NN18PP19
This control selects the POSTNET [ZIP, ZIP+4, or Delivery Point Bar Code (DPBC)] bar code.
The DATA field for this bar code must contain only ASCII numeric (0 to 9) data. A data string of all zeroes
will be encoded if other than numeric data is detected in the job stream.
POSTNET bar code does not print Human Readable Characters, regardless of the PP byte. POSTNET
uses the tall and short bars required by the United States Postal Service standard, and encodes numeric
data streams regardless of length.
NN is a one-byte hexadecimal number that specifies the height of the bar code symbol as 1 to 12 (1/6 to
12/6 inch, or 2 inches).
PP is a one-byte hexadecimal number that specifies whether or not to print the bar code in Human
Readable Characters as follows:
00Do not print human readable characters
01Print human readable characters
This sequence causes the bar code symbol to be printed according to the Bar Code Selection command.
Sequential bar codes of the same type and height may be printed. GS N# defines the distance from the
beginning of the line or between two bar code symbols in multiples of 1/72 of an inch. This command must
be closed with an EM character.
Note: Bar code symbols will print over any descenders in the previous character box if any text is present.
Example 1:
Print an EAN-8 bar code symbol, one inch from the right margin with the data set of 12345678.
Print two Code 3 of 9 bar code symbols. The first symbol on the right margin; the second symbol one inch
to the right of the first symbol. Data sets are ABC+0123 and 12345678
This command reinitializes the printer. It resets the printer mode and clears the buffer of printable data.
Set Vertical Spacing n/144 Inch (DC4 DC4 ESC 1 NN)
14141B31NN
This control sets a line spacing value for subsequent line feeds.
NN is a one-byte hexadecimal number that specifies the line spacing value of NN/144 inches. The value of
NN is 1 to 255.
Set Vertical Spacing 12 Lines/30mm (DC4 DC4 ESC 3 1)
14141B3331
This command sets line spacing to 12 lines per 30 mm.
Set Vertical Spacing 3 Lines/30mm (DC4 DC4 ESC 3 3)
14141B3333
This command sets line spacing to 3 lines per 30 mm.
Set Vertical Spacing 4 Lines/30mm (DC4 DC4 ESC 3 4)
14141B3334
This command sets line spacing to 4 lines per 30 mm.
Set Vertical Spacing 6 Lines/30mm (DC4 DC4 ESC 3 6)
14141B3336
This command sets line spacing to 6 lines per 30 mm.
Chapter 2. Epson FX-1050 Data Stream69
Set Vertical Spacing 8 Lines/30mm (DC4 DC4 ESC 3 8)
14141B3338
This command sets line spacing to 8 lines per 30 mm.
Eject Single Sheet or Form Feed (DC4 DC4 ESC 5)
14141B35
This command causes a form feed on fanfold forms.
Set 15, 17.1, 20 CPI (DC4 DC4 ESC A)
14141B41NN
This command sets horizontal spacing (characters per inch) to 15, 17.1 or 20.
The values for NN are:
415 CPI
517.1 CPI
620 CPI
Load or Park Fanfold from a Rear Path (DC4 DC4 ESC N)
14141B4ENN
This command loads or performs the Park function for fanfold paper fed from the rear path.
The values for NN are:
0The printer selects the rear path. If paper fanfold is already loaded in a paper path that is not
requested, the printer automatically performs the Park function before loading the rear path. The
printer will then load the fanfold paper once data is received. For more information on the Park
function, see “PARK/PATH” in “Chapter 2. Understanding the Operator Panel” in the User's Guide
for your printer.
1The printer performs the Park function for forms in the rear path.
Load or Park Fanfold from a Front Path (DC4 DC4 ESC T)
14141B54NN
This command loads or performs the Park function for fanfold paper fed from the front path.
The values for NN are:
0The printer selects the front path. If paper fanfold is already loaded in a paper path that is not
requested, the printer automatically performs the Park function before loading the front path. The
printer will then load the fanfold paper once data is received. For more information on the Park
function, see “PARK/PATH” in “Chapter 2. Understanding the Operator Panel” in the User's Guide
for your printer.
1The printer performs the Park function for forms in the front path.
70Programmer Manual
Select Emulation (DC4 DC4 ESC Y)
14141B59NN
This command selects the printer emulation mode.
The values for NN are:
1Epson FX 1050
24202 Proprinter III XL
54247 or 2381 Personal Printer
Select AFTA in Column (DC4 DC4 ESC Z)
14141B5ANN
This command selects the column at 10 CPI where the Automatic Forms Thickness Adjustment (AFTA) will
be made.
The value for NN is the column number.
Select Resident Font (DC4 DC4 ESC g)
14141B67NN
This command selects the resident font based on the following values of NN:
0Courier
1Gothic
128OCR-B
129OCR-A
Request to Read Configuration (DC4 DC4 ESC h)
14141B68
This command requests the printer to send its configuration saved in non-volatile memory (NVM).
The printer must be configured for 1284 Parallel mode.
Printer Configuration Response (DC4 DC4 ESC h)
14141B68LLHHTTSSD1...DNCS
This is the response Request to Read Configuration command.
The printer must be configured for 1284 Parallel mode. LL and HH indicate the number of bytes that follow
this control. LL is the least significant byte of the count and HH is the most significant byte. (The number
of bytes that follow equal HH x 256 + LL.)
The other values are:
TTModel Type
SSModel Sub-type
Chapter 2. Epson FX-1050 Data Stream71
D1...DN
Configuration Data
CSChecksum of the data bytes
Write Configuration Response (DC4 DC4 ESC i)
14141B69LLHHTTSSD1...DNCS
This command writes configuration data to non-volatile memory (NVM).
The printer must be configured for 1284 Parallel mode. LL and HH indicate the number of bytes that follow
this control. LL is the least significant byte of the count and HH is the most significant byte. (The number
of bytes that follow equal HH x 256 + LL.)
The other values are:
TTModel Type
SSModel Sub-type
D1...DN
This command acknowledges that the configuration was written to the printer. This is the response to the
Write Configuration command.
The printer must be configured for 1284 Parallel mode.
NN is a single byte defined as follows:
X'00'Configuration Saved (Successful)
X'01'Configuration Not Saved (Error)
Select Print Quality
14141B70NN
The values of NN are:
0Fast Draft (model Z03 only)
1DP
2DP Text
3NLQ
Buffer Terminating Conditions
The following controls cause buffered data to be released for printing:
v Carriage Return
v Line Feed
v Form Feed
v Reverse Line Feed
v Horizontal Tab
v Vertical Tab
72Programmer Manual
v Backspace
v Set 1/8 Inch Line Spacing
v Set 7/72 Inch Line Spacing
v Set 1/6 Inch Line Spacing
v Set n/216 Inch Line Spacing
v Set n/72 Inch Line Spacing
v Invoke Text Line Spacing (if the line spacing is changed)
v Move Right n/120
v Move Left n/120
v Feed Paper n/216 Reverse
v Relative Move Baseline
v Shift Out/Double-Wide Print
v Device Control 4/Cancel Double-Wide Print
v Begin Subscript/Superscript
v End Subscript/Superscript
v Begin Double-Strike Print
v End Double-Strike Print
v Begin Emphasized Print
v End Emphasized Print
v Set Presentation Highlight
v Continuous Overscore
v Auto Underscore
v Device Control 2/Select 10 CPI
v Set 12 CPI
v Shift In/Condensed Prin
vProportional Space Mode
v Change Font
v Normal Density Bit Image Graphics
v Dual Density Bit Image Graphics Type 1
v Dual Density Bit Image Graphics Type 2
v High Density Bit Image Graphics
v Unidirectional Printing
v Set Horizontal Margins
v Set Initial Conditions
The following conditions also cause buffered data to be released for printing:
v Parallel -INIT
v Automatic Line Wrap
An automatic line wrap consists of a carriage return and line feed inserted after the maximum number of
characters has been printed on a line. The next character is then printed at the left margin on the
following line. Automatic line wrap occurs for text data but not for bit image graphics or advanced
function graphics.
Unsupported Command Processing
The following Epson controls are not supported by the 4247. If any of these commands are received, they
are ignored.
v Select 9 Pin Graphic Mode (ESC ^)
v Disable Paper-Out Sensor (ESC 8)
v Enable Paper-Out Sensor (ESC 9)
v Select Color (ESC r)
v Assign Character Table (ESC t)
Chapter 2. Epson FX-1050 Data Stream73
74Programmer Manual
Chapter 3. Intelligent Printer Data Stream
This chapter explains the concepts of the Intelligent Printer Data Stream (IPDS). IPDS is an orderable
feature for your printer. The intent of this chapter is to provide a basic overview of how IPDS works. The
Intelligent Printer Data Stream Reference provides detailed information about IPDS programming in
general while Chapter 4, “IPDS Programming Information,” on page 99 provides a detailed description of
the IPDS commands that the 4247 Model X03/Z03 printer uses. If the programming information in the
Intelligent Printer Data Stream Reference is different from the programming information in this manual, use
this manual to program the 4247 Model X03/Z03 printer.
Overview
The Intelligent Printer Data Stream (IPDS) is a structured-field data stream for managing and controlling
printer processes. IPDS uses all points addressability that allows users to position text, images, graphic
pictures, bar codes, and overlays at any defined point on a printed page. Later pages in this chapter
explain each of these data types and their uses.
IPDS offers the flexibility of creating data and commands independent of the type of attachment protocol
used by the printer or its system. Using the same data stream, printers can attach to control units or any
type of network link that does not restrict the transmission of data to the printer.
IPDS commands within the data stream enable the host processor to control and manage the downloading
of symbol sets and stored objects, such as overlays and page segments. The printer can later use these
stored objects to construct a printed page.
The IPDS command structure also provides the means for returning error information to the host, for
returning query information, and for performing error recovery actions.
Physical Medium
The 4247 Printer defines the physical medium as an area with boundaries of width and depth that define
the limits of this page. The maximum print position (MPP) defines the width of the current page in
characters.
MPP x 1/CPI = width in inches (CPI is the number of characters per inch).
The maximum page length (MPL) defines the depth of the current page in lines.
MPL x 1/LPI = depth in inches (LPI is the number of lines per inch).
The top margin on this page is the top-of-form position, as selected by pressing SET TOP OF FORM on
the operator panel. Figure 5-1 shows the physical medium layout.
75
Figure 1. The Physical Medium
The physical medium defined above is assumed to coincide with the actual physical medium (form) as that
terminology is used in the following discussion.
IPDS Coordinate Systems
IPDS uses coordinate systems to define any point on a page. All IPDS commands containing location
parameters use these coordinate systems to define distance measurements. The coordinate systems
specify these distances in logical units called units.
Many IPDS commands contain parameters that specify values for position or size in units. For example,
one unit may equal approximately 0.018 mm (0.0007 in. [1/144 in.]). Before using these values, the 4247
Printer truncates the specified values to multiples of 0.18 mm (0.007 in. [1/1440 in.]) for all unit parameters
except those associated with DP, and DP Text baseline positioning. The 4247 Printer truncates DP, and
DP Text baseline positioning parameters to multiples of 0.36 mm (0.014 in. [1/72 in.]). The unit parameters
are identified in Chapter 4, “IPDS Programming Information,” on page 99.
X and Y Medium Coordinate System
The Xmand Ymcoordinates, known as the medium coordinate system, relate directly to the physical
medium. The X
change the origin and the orientation of these coordinates. The origin (X
left hand corner of the physical medium. Positive Xmvalues begin at the origin and increase along the top
of the sheet, from left to right. Positive Y
sheet moving downward toward the bottom of the sheet. Figure 2 on page 77 shows the Xm,Ymcoordinate
system:
coordinate system is fixed for each medium or form size. IPDS commands cannot
m,Ym
values begin at the origin and increase along the left side of the
m
=0, Ym=0) is always at the top
m
76Programmer Manual
Figure 2. The Xm,YmMedium Coordinate System
Logical Page Layout
IPDS describes the printed output in terms of logical pages. The logical page does not have to be
contained completely on the physical medium. However, printing can only occur where the two areas
overlap. Figure 3 shows the physical-logical page relationship.
Figure 3. The Physical-Logical Page Relationship
The logical page reference corner is the corner of the logical page that is at the smallest Xp, Yp position.
This corner does not necessarily have to coincide with the physical medium origin (X
=0, Ym=0). The
m
logical page size in the X dimension is the 'X-Extent', and the logical page size in the Y dimension is the
'Y-Extent'. IPDS commands specify the logical page size and location. Figure 5-4 shows the relationship
Chapter 3. Intelligent Printer Data Stream77
between the X and Y coordinates and the logical and physical medium.
Figure 4. The X and Y Coordinate System and the Logical Page
I and B Coordinate System
In addition to the X,Y coordinate system, IPDS uses another coordinate system, the I-B coordinate system.
These coordinates describe the placement and orientation of text or images on the logical page. The
printer places characters along the I-axis for a line of text. The B-axis is the direction in which the printer
places lines of text on the logical page. IPDS commands can change both the origin and the orientation of
the I and B axes (see Figure 5 on page 79).
Direction: As the printer places text characters on the page, the inline coordinate increases. The direction
of this increase is the positive inline direction or +I. The baseline coordinate also increases as the printer
places text lines on the page. The direction of this increase is the positive baseline direction or +B.
Location parameters within the IPDS commands specify the I and B directions. Chapter 4, “IPDS
Programming Information,” on page 99 contains specific information about these commands.
Distance: The inline coordinate increases a predetermined distance as the printer places the text
characters on the page. This distance is the character increment. The baseline coordinate also increases a
predetermined distance as the printer places lines of text on the page. This distance is the baseline
increment. Location parameters within the IPDS commands specify the I and B distances. Chapter 4,
“IPDS Programming Information,” on page 99 contains specific information about these commands.
Initial coordinates: The coordinates of the first print position on the logical page are the initial
coordinates. The initial inline print coordinate is I
. The initial baseline print coordinate is Bi.
i
Current coordinates: The coordinates of the current print position on the logical page are the current
coordinates. The current inline print coordinate is I
. The current baseline print coordinate is Bc. Figure 5
c
on page 79 shows the various I and B coordinates on the logical page:
78Programmer Manual
Figure 5. The I and B Coordinate System on the Logical Page
Notes:
1. The 4247 Printer text character box is 180 units high by 144 units wide at 10 CPI when the X
pYp
units
equal 1,440 per inch. The left edge of the character box is at the specified inline position and the
bottom edge of the character box is 20 units below the specified baseline position.
2. If the bottom edge of the character box falls below the printable area on the physical medium, the
character will not print. In this situation, a baseline move (Relative Move Baseline or Absolute Move
Baseline) text command can place the character box totally within the printable area.
Processing IPDS Commands
The structured field format of IPDS allows one or more commands to be sent to the printer in a continuous
stream. Each command is self-describing; the command length, type, optional parameters, and data are all
part of each specific command. The printer processes each command in the order it is received. Every
IPDS command contains a flag byte. Setting the Acknowledgment Required bit on in this flag byte
indicates to the printer the end of a command stream sequence. The printer then sends an Acknowledge
Reply to the host. Figure 6 shows an example of an IPDS data stream:
Figure 6. An Example of the IPDS Data Stream
Chapter 3. Intelligent Printer Data Stream79
IPDS Command Format
All of the printer commands use the following format:
LengthCommandFlagCorrelation IDData
Note: Bit numbering follows the EBCDIC convention with bit zero being the most significant bit. A
description of each field follows.
Length
Length is a two-byte field that specifies the length of this command. This count includes the two-byte
length field, the command field, the flag byte, and the optional fields (Correlation ID and Data Fields). The
Length field can be any value from 5 to 32,767 (X'7FFF').
Command
Command is a two-byte field that specifies the IPDS command code. See Table 1 on page 81 for a list of
valid command codes.
Flag
Flag is a one-byte field that contains the IPDS command stream flags.
Bit 0 of this byte is the Acknowledgment Required (ARQ) flag. If this bit is on, the host requests the printer
to send an Acknowledge Reply.
Bit 1 of this byte is the Correlation ID flag. If this bit is B'1', a two-byte correlation number follows this flag
byte. If this bit is B'0', the optional correlation number is not present and the following byte or bytes contain
the data field.
Bit 2 of this byte is the acknowledgement continuation flag. If this bit is B'1', the host is requesting
continuation of the current Acknowledge Reply. If this bit is B'0', the host is not requesting continuation.
Bits 3-7 of the flag byte are reserved and must be zero.
Correlation ID
Correlation ID is a two-byte value that specifies an identifier for this command. The Correlation ID is an
optional field and is only present if bit 1 of the flag byte is B'1'. The printer can use any value between
0000 and FFFF for this ID. If an error occurs on a command prior to acceptance for processing, the printer
sends a negative acknowledgement (NACK) to the host. If the printer recognizes the command that
caused the error, the Correlation ID field in the NACK will contain the ID of the command responsible for
the NACK. Correlation ID is also returned in response to commands that request information and
commands that request an acknowledgement.
80Programmer Manual
Data
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.