SP40
Programmer Manual
Rev. 001
Introduction
This manual provides information about the programming information for your
printer. Appendix A, B and C describe the commands supported by your printer for the
IBM/EPSON, Compuprint native and Olivetti protocols respectively.
The command descriptions are divided into function groups. Each command has both a
brief and a detailed description.
•
Name and function description. Information about protocol (IBM Proprinter
Proprinter XL24/XL24E, IBM Personal 2391+, IBM 4722, IBM 9068, EPSON
ESC/P2, Olivetti PR2, Olivetti PR40+, Olivetti 2845)
•
The hexadecimal and decimal codes for the command: letters written in italics
represent variable parameters of the command. The functions of these parameters
are explained in its corresponding command description.
Appendices D and E show the Code Pages and Characters Sets for the IBM/EPSON
and Olivetti protocols respectively.
ii
Appendix A – IBM/EPSON Mode Commands
Summary in Alphabetical Order ........................A-2
EPSON/IBM Mode Commands Description ......A-8
Print and Line Feed Execution......................... A-8
Format Control.....................................................A-12
Print Mode .............................................................A-40
Character Sets ......................................................A-64
Download Character ..........................................A-71
Bit-Image ................................................................A-82
Data Input Control..............................................A-92
Miscellaneous........................................................A-99
A-1
IBM/EPSON Mode Commands
This printer according to the IBM Proprinter Proprinter XL24/XL24E, IBM 2391+,
IBM 4722, IBM 9068 and EPSON ESC/P2 emulations supports the following printer
commands.
Summary in Alphabetical Order
BEL
Buzzer. (IBM Proprinter XL24/XL24E, 2391+, 9068, EPSON ESC/P2)
A-99
BS
A-99
CAN
Print and space back one position. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068,
EPSON ESC/P2)
Cancels line. (EPSON ESC/P2)
CAN
Cancels data. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
A-92
CR
DC1
Prints all received data and the column counter is set to the left margin. (IBM Proprinter
XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
Selects printer. (IBM Proprinter XL24/XL24E, 2391+)
A-93
DC1
Selects printer. (EPSON ESC/P2)
A-93
DC2
Sets 10 cpi printing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
A-40
DC2
Cancels compressed printing. (EPSON ESC/P2)
A-41
DC3
Deselects printer. (EPSON ESC/P2)
A-94
DC3
Deselects printer. (IBM Proprinter XL24/24E)
A-94
DC4
Cancels double width printing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON
ESC/P2)
Deletes the last character. (EPSON ESC/P2)
A-41
A-42
ESC !
Sets or cancels underlined printing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068,
EPSON ESC/P2)
Master Select. (EPSON ESC/P2)
ESC #
Cancels MSB control. (EPSON ESC/P2)
A-95
ESC $
Sets the absolute printing position. (EPSON ESC/P2)
A-12
ESC %
Selects user-defined character set. (EPSON ESC/P2)
A-71
DEL
ESC -
A-2
A-92
A-8
A-95
A-43
ESC &
Defines user-defined characters. (EPSON ESC/P2)
A-72
ESC ( -
Sets score line. (EPSON ESC/P2)
A-44
ESC ( ^
Prints data as characters. (EPSON ESC/P2)
A-64
ESC ( C
Sets page length in defined unit. (EPSON ESC/P2)
A-13
ESC ( c
Sets Page Format. (EPSON ESC/P2)
A-14
ESC ( G
Selects Graphics Mode. (EPSON ESC/P2)
A-82
ESC ( t
Assigns character table. (EPSON ESC/P2)
A-65
ESC ( U
Sets units. (EPSON ESC/P2)
A-16
ESC ( V
Sets absolute vertical print position. (EPSON ESC/P2)
A-17
ESC ( v
Sets relative vertical print position. (EPSON ESC/P2)
A-18
ESC *
Sets dot graphics printing. (EPSON ESC/P2)
A-82
ESC .
Print Raster Graphics. (EPSON ESC/P2)
A-84
ESC :
Sets 12 CPI. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
A-45
ESC :
Copies characters from ROM to RAM. (EPSON ESC/P2)
A-73
ESC ?
Reassigns dot graphics mode. (EPSON ESC/P2)
A-86
ESC @
Initializes the printer. (EPSON ESC/P2)
ESC [ @
ESC [ \
Sets double high printing and double line feed. (IBM Proprinter XL24/XL24E, 2391+,
9068)
Sets vertical units. (IBM Proprinter XL24/XL24E, 2391+, 9068)
A-20
ESC [ c
Send a device-dependent message to an ASCII printer. (IBM 4722, 9068)
A-97
ESC [ d
Set the print quality. (IBM 2391+)
A-46
ESC [ F
Page Presentation Media. (IBM 4722, 9068)
A-38
ESC [ g
High Resolution Graphics. (IBM Proprinter XL24/XL24E, 2391+, 9068)
A-86
ESC [ I
Sets font and pitch of a character. (IBM 2391+)
A-47
ESC [ I
Sets font and pitch of a character. (IBM 9068)
A-49
ESC [ J
Sets 5 lpi. (IBM 4722, 9068)
ESC [ K
Sets initial conditions. (IBM 2391+)
A-101
ESC [ K
Sets initial conditions. (IBM 9068)
A-104
ESC [ T
Selects a Code page. (IBM 2391+, 4722)
ESC \
Sets the relative horizontal print position. (EPSON ESC/P2)
A-20
ESC \
Prints characters from all characters table. (IBM Proprinter XL24/XL24E, 2391+, 9068)
A-67
A-100
A-45
A-34
A-3
A-66
ESC ]
Sets a reverse line feed. (IBM 2391+, 4722, 9068)
ESC ^
ESC _
Prints a single character from the all characters table. (IBM Proprinter XL24/XL24E,
2391+, 4722, 9068)
Sets or cancels overscore printing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
A-51
ESC +
Sets n/360-inch line spacing. (EPSON ESC/P2)
A-22
ESC =
Defines downloaded characters. (IBM Proprinter XL24/XL24E, 2391+)
A-74
ESC =
Defines downloaded characters. (IBM Proprinter 4722, 9068)
A-76
ESC =
Sets MSB to 0. (EPSON ESC/P2)
A-95
ESC >
Sets MSB to 1. (EPSON ESC/P2)
A-96
ESC 0
Selects 1/8-inch line spacing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON
ESC/P2)
Selects 7/72-inch line spacing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON
ESC/P2)
Selects 1/6-inch line spacing. (EPSON ESC/P2)
A-22
ESC 1
ESC 2
A-9
A-67
A-23
A-23
ESC 3
Enables the line spacing set by ESC A command. (IBM Proprinter XL24/XL24E, 2391+,
4722, 9068, EPSON ESC/P2)
Sets n/180-inch line spacing. (EPSON ESC/P2)
A-24
ESC 3
Sets graphics line spacing at n/216 inch. (IBM Proprinter XL24/XL24E, 2391+)
A-24
ESC 3
Sets graphics line spacing at n/216 inch. (IBM 4722, 9068)
A-25
ESC 4
Sets top of form (first printable line). (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068,
EPSON ESC/P2)
Sets italics printing mode. (EPSON ESC/P2)
A-25
ESC 2
ESC 4
A-23
A-51
ESC 5
Sets an automatic line feed after a carriage return. (IBM Proprinter XL24/XL24E, 2391+,
4722, 9068)
Cancels italics printing. (EPSON ESC/P2)
ESC 6
Enables Upper Control Codes. (EPSON ESC/P2)
A-68
ESC 6
Selects the Character Set 2. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
A-68
ESC 7
Selects the Character Set 1. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
A-68
ESC 7
Cancels Upper Control Codes. (EPSON ESC/P2)
A-69
ESC A
Sets text line spacing at n/60 inch. (EPSON ESC/P2)
A-26
ESC A
Sets text line spacing at n/72 inch. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068,
EPSON ESC/P2)
Sets vertical tabs. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
A-26
ESC 5
ESC B
A-4
A-9
A-51
A-26
ESC BEL
Buzzer. (IBM Proprinter XL24/XL24E, 2391+, EPSON ESC/P2)
ESC BS
Print and space back one position. (IBM Proprinter XL24/XL24E, 2391+, EPSON
ESC/P2)
Sets form length to n lines. (IBM Proprinter XL24/XL24E, 2391+, EPSON ESC/P2)
ESC C
A-99
A-100
A-28
ESC C 0
Sets horizontal motion index (HMI). (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068,
EPSON ESC/P2)
Sets form length to n inches. (IBM Proprinter XL24/XL24E, 2391+, EPSON ESC/P2)
A-27
ESC CAN
Cancels data. (IBM Proprinter XL24/XL24E, 2391+)
A-92
ESC CR
ESC D
Prints all received data and the column counter is set to the left margin. (IBM Proprinter
XL24/XL24E, 2391+, EPSON ESC/P2)
Sets horizontal tabs. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
A-28
ESC d
Spaces forwards relative dot position. (IBM Proprinter XL24/XL24E, 2391+, 9068)
A-29
ESC DC1
Selects printer. (IBM Proprinter XL24/XL24E, 2391+)
A-93
ESC DC2
Sets 10 cpi printing. (IBM Proprinter XL24/XL24E, 2391+)
A-40
ESC DC3
Deselects printer. (IBM Proprinter XL24/24E)
A-94
ESC DC4
Cancels double width printing. (IBM Proprinter XL24/XL24E, 2391+, EPSON ESC/P2)
A-42
ESC E
Sets emphasized printing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON
ESC/P2)
Loading/ejecting paper. (EPSON ESC/P2)
A-53
ESC c
ESC EM
ESC F
ESC FF
ESC G
ESC g
ESC H
ESC HT
A-52
A-8
A-29
Cancels emphasized printing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON
ESC/P2)
Ejects loaded document form printer. (IBM Proprinter XL24/XL24E, 2391+, EPSON
ESC/P2)
Sets double strike printing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON
ESC/P2)
Sets 15 CPI. (EPSON ESC/P2)
A-53
Cancels double strike printing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON
ESC/P2)
Horizontal Tab. (IBM Proprinter XL24/XL24E, 2391+, EPSON ESC/P2)
A-54
A-35
A-53
A-54
A-37
ESC J
Selects printing type for resident and DLL characters. (IBM Proprinter XL24/XL24E,
2391+, 4722, 9068)
Advances paper n/180 inch. (EPSON ESC/P2)
A-10
ESC J
Advances paper n/216 inch. (IBM Proprinter XL24/XL24E, 2391+)
A-10
ESC I
A-5
A-54
ESC J
Advances paper n/216 or n/v inch. (IBM 4722, 9068)
A-11
ESC j
Stops printing. (IBM Proprinter XL24/XL24E, 2391+, 9068)
A-96
ESC k
Selects LQ fonts. (EPSON ESC/P2)
A-69
ESC K
Normal density dot graphics printing (60 dpi). (IBM Proprinter XL24/XL24E, 2391+, 4722,
9068, EPSON ESC/P2)
Sets left margin (10 cpi). (EPSON ESC/P2)
A-88
A-89
ESC LF
Double density dot graphics printing (120 dpi). (IBM Proprinter XL24/XL24E, 2391+,
4722, 9068, EPSON ESC/P2)
Line Feed. (IBM Proprinter XL24/XL24E, 2391+, EPSON ESC/P2)
ESC M
Selects 10.5 point, 12 cpi. (EPSON ESC/P2)
A-55
ESC N
A-31
ESC O
Sets the skipover perforation to n lines. (IBM Proprinter XL24/XL24E, 2391+, EPSON
ESC/P2)
Disables the skipover perforation. (IBM Proprinter XL24/XL24E, 2391+, EPSON ESC/P2)
A-32
ESC P
Selects 10.5 point, 10 cpi. (EPSON ESC/P2)
A-56
ESC P
Sets or cancels proportional printing. (IBM Proprinter XL24/XL24E, 2391+)
A-56
ESC p
Sets or cancels proportional printing. (EPSON ESC/P2)
A-57
ESC Q
Sets the right margin (10 cpi). (EPSON ESC/P2)
A-32
ESC q
Selects character style. (EPSON ESC/P2)
A-57
ESC Q
Deselects Printer. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
A-96
ESC R
Sets all tabs to power-on settings. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
A-33
ESC R
Selects a national character set. (EPSON ESC/P2)
A-70
ESC S
Sets subscript or superscript printing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068,
EPSON ESC/P2)
Selects condensed mode. (IBM Proprinter XL24/XL24E, 2391+, EPSON ESC/P2)
A-58
ESC l
ESC L
ESC SI
ESC SO
ESC SP
ESC T
ESC t
ESC U
ESC VT
A-30
A-12
A-59
Sets double width printing (one line). (IBM Proprinter XL24/XL24E, 2391+, EPSON
ESC/P2)
Sets intercharacter space. (EPSON ESC/P2)
A-59
Cancels subscript or superscript printing. (IBM Proprinter XL24/XL24E, 2391+, 4722,
9068, EPSON ESC/P2)
Selects characters table. (EPSON ESC/P2)
A-60
Sets printing direction. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON
ESC/P2)
Vertical Tab. (IBM Proprinter XL24/XL24E, 2391+, EPSON ESC/P2)
A-6
A-34
A-70
A-105
A-38
ESC w
Sets or cancels double width printing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068,
EPSON ESC/P2)
Sets or cancels double height printing. (EPSON ESC/P2)
A-61
ESC X
Sets left and right margins. (IBM Proprinter XL24/XL24E, 2391+, 9068)
A-34
ESC X
Selects font by pitch and point. (EPSON ESC/P2)
A-61
ESC x
Selects Letter Quality or Draft printing. (EPSON ESC/P2)
A-62
ESC Y
A-90
HT
Double density dot graphics printing at double-speed graphics (120 virtual dpi). (IBM
Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
Quadruple density dot graphics printing (240 virtual dpi). (IBM Proprinter XL24/XL24E,
2391+, 4722, 9068, EPSON ESC/P2)
Ejects loaded document form printer. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068,
EPSON ESC/P2)
Horizontal Tab. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
A-36
LF
Line Feed. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068 and EPSON ESC/P2)
A-11
SI
Sets condensed printing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON
ESC/P2)
Sets double width printing (one line). (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068,
EPSON ESC/P2)
Vertical Tab. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
A-63
ESC W
ESC Z
FF
SO
VT
A-7
A-60
A-91
A-35
A-63
A-37
EPSON/IBM Mode Commands Description
Print and Line Feed Execution
CR
Prints all received data and the column counter is set to the left margin.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
CR
0D
13
This code is a terminator code; when received, it causes any data in the buffer to be
printed out. The print head then moves logically to the left margin position. The
column counter is set to the left margin value and a line feed is inserted automatically
after the carriage return (see the automatic carriage return function in the printer
setup). The code resets the double width printing set by SO code.
ESC CR
Prints all received data and the column counter is set to the left margin.
(IBM Proprinter XL24/XL24E, 2391+, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC CR
1B 0D
27 13
See description of CR command above.
A-8
ESC ]
Sets a reverse line feed. (IBM 2391+, 4722, 9068)
ASCII Code
Hexadecimal Value
Decimal Value
ESC ]
1B 5D
27 93
This code is a terminator code; when received, it causes the current contents of the
print buffer to be printed out, before reversing the paper by one line at the current
vertical spacing. If no data precedes this command or if the preceding data consists of
spaces, the code causes only a reverse line feed to be performed. When the line counter
is equal to or less than the top of the form value, the ESC ] is ignored.
ESC 5
Sets an automatic line feed after a carriage return.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
ASCII Code
Hexadecimal Value
Decimal Value
ESC 5 n
1B 35 n
27 53 n
If n is equal to 1, this command sets an automatic line feed on receiving of a CR code.
If n is equal to 0, this command cancels the automatic line feed.
n
Automatic line feed
0
1
Disabled
Enabled
A-9
ESC J
Advances paper n/180 inch. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC J n
1B 4A n
27 74 n
0 < n < 255
This is a terminator code; it therefore causes the current contents of the print buffer to
be printed out before performing a single line LF of n/180 inch. This command is
cancelled after the LF has been performed. The printing will restart after a line feed
from the column at which the command was sent.
ESC J
Advances paper n/216 inch. (IBM Proprinter XL24/XL24E, 2391+)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC J n
1B 4A n
27 74 n
0 < n < 255
This is a terminator code; it therefore causes the current contents of the print buffer to
be printed out before performing a single line LF of n/216 inch. This command is
cancelled after the LF has been performed. The printing will restart after a line feed
from the column at which the command was sent.
A-10
ESC J
Advances paper n/216 or n/v inch. (IBM 4722, 9068)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC J n
1B 4A n
27 74 n
0 < n < 255
This is a terminator code; it therefore causes the current contents of the print buffer to
be printed out before performing a single line LF of n/216 inch or to n/v inch, when the
vertical base unit has been changed to v using ESC [ \.
LF
Line Feed.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068 and EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
LF
0A
10
This is a terminator code; it therefore causes the current contents of the print buffer to
be printed out before advancing the paper by one line at the current vertical spacing.
If no data precedes the LF code, or if the preceding data consists of spaces, the code
causes only a line feed.
When the line counter reaches the last line of the form (defined by software or function
menu), the LF code causes a skip to the first line of the next form or ejects a cut sheet,
if loaded. This code cancels the double width printing set by the SO code. In IBM
mode, the column counter is set to the first column if the automatic carriage return is
selected. In EPSON mode, the column is always set to the first column.
A-11
ESC LF
Line Feed.
(IBM Proprinter XL24/XL24E, 2391+, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC LF
1B 0A
27 10
See the description of the LF command.
Format Control
ESC $
Sets the absolute printing position. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC & n1 n2
1B 24 n1 n2
27 36 n1 n2
0 < n1 < 255
0 < n2 < 127
This command specifies the distance from the left margin where you want to print
subsequent characters. The default unit is 1/60 inch. The distance is in number of dots
and must be calculated using the following formula:
Margin distance = n1 + (n2 x 256) x 1/60” + (left margin)
A-12
Where n2 is equal to:
[(horizontal position) – (left margin position)] x
(
1
)
defined unit
INIT
256
Where n1 is equal to:
[(horizontal position) – (left margin position)] x
(
1
)
defined unit
MOD
256
If the selected position is outside the current right margin, the sequence will be
ignored.
ESC ( C
Sets page length in defined unit. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC ( C n1 n2 d1 d2
1B 28 43 n1 n2 d1 d2
27 40 67 n1 n2 d1 d2
n1 = 2
n2 = 0
0 < (d2 x 256) + d1) x (defined unit) < 22
This command sets the page length in the specified number of units (the default unit
is 1/360 inch), previously defined with the ESC ( U command according to the
following formula:
Page length = (d2 x 256) + d1) x (defined unit)
A-13
Where d2 is equal to:
(page length) x
(
1
)
defined unit
INIT
256
Where d1 is equal to:
(page length) x
(
1
)
defined unit
MOD
256
Set the page length before paper is loaded or when the print position is at the top-ofform position. Otherwise, the current print position becomes the top-of-form position.
Setting the page length cancels the top and bottom-margin settings. If the defined unit
is changed it does not affect the current page-length setting.
ESC ( c
Sets Page Format. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC ( c n1 n2 t1 t2 b1 b2
1B 28 63 n1 n2 t1 t2 b1 b2
27 40 99 n1 n2 t1 t2 b1 b2
n1 = 4
n2 = 0
((t2 x 256) + t1) < (b2 x 256) + b1)
(defined unit) x (b2 x 256) + b1) < 22
This command sets the top and bottom margins in the defined units, set with the ESC
( U command, according to the following formulas:
A-14
Top margin = (t2 x 256) + t1) x (defined unit)
Where t2 is equal to:
(top margin) x
1
(
)
defined unit
INIT
256
Where t1 is equal to:
(top margin) x
1
(
)
defined unit
MOD
256
Bottom margin = ((b2 x 256) + b1) x (defined unit)
Where b2 is equal to:
(bottom margin) x
(
1
)
defined unit
INIT
256
Where b1 is equal to:
MOD
(bottom margin) x
(
1
)
defined unit
256
A-15
Send this command before paper is loaded or when paper is at the top-of-form position.
Otherwise the current print position becomes the top-margin position. Measure both
top and bottom margins from the top edge of the page. The baseline for printing
characters on the first line is 20/180 inch below the top-margin position.
This command cancels any previous top and bottom-margin settings.
ESC ( U
Sets units. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC ( U n1 n2 d
1B 28 55 n1 n2 d
27 40 85 n1 n2 d
n1 = 1
n2 = 0
d = 10, 20, 30, 40, 50,60
This command sets the unit to m/3600 inch. The printer uses this unit when moving
the print position, setting the page length and setting the top and bottom margins
with the following commands (the default units varies depending on the command and
print quality):
Commands
ESC ( V
ESC ( v
ESC ( C
ESC ( c
ESC \ (LQ mode)
ESC \ (Draft mode)
ESC $
Default Unit
1/360 inch
1/360 inch
1/360 inch
1/360 inch
1/180 inch
1/120 inch
1/60 inch
A-16
ESC ( V
Sets absolute vertical print position. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC ( V n1 n2 d1 d2
1B 28 56 n1 n2 d1 d2
27 40 86 n1 n2 d1 d2
n1 = 2
n2 = 0
0 < d1 < 255
0 < d2 < 127
This command moves the vertical print position to the position specified by the
following formula:
Vertical position = (d2 x 256)+d1) x (defined unit) + (top-margin position)
Where d2 is equal to:
INIT
[(vertical position) – (top margin position)] x
(
1
)
defined unit
256
Where d1 is equal to:
MOD
[(vertical position) – (top margin position)] x
(
1
defined unit
256
A-17
)
The default unit is 1/360 inch. The new position is measured in defined units from the
current top-margin position. Moving the print position below the bottom-margin
position moves the vertical print position to the top-margin position on the next page
ejects a cut sheet, if loaded.
The printer ignores this command if the command would move the print position more
than 179/360 inch in the negative direction or if the command would move the print
position in the negative direction after a graphics command is sent on the current line
or above the point where graphics have previously been printed.
ESC ( v
Sets relative vertical print position. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC ( v n1 n2 d1 d2
1B 28 76 n1 n2 d1 d2
27 40 118 n1 n2 d1 d2
n1 = 2
n2 = 0
0 < d1 < 255
0 < d2 < 127
This command moves the vertical print position up or down from the current position,
as specified by the following formula
Vertical position = (d2 x 256)+d1) x (defined unit) + (current position)
For positive (down) movement:
A-18
Where d2 is equal to:
INIT
[(vertical position) – (current position)] x
(
1
)
defined unit
256
Where d1 is equal to:
MOD
[(vertical position) – (current position)] x
(
1
)
defined unit
256
For negative (left) movement:
Where d2 is equal to:
32768-INIT
[(current position) – (vertical position)] x
(
1
)
defined unit
256
Where d1 is equal to:
32768-MOD
[(current position) – (vertical position)] x
(
1
)
defined unit
256
The default unit is 1/360 inch. The new position is measured in defined units from the
current position. Moving the print position below the bottom-margin position, it moves
the vertical print position to the top-margin position on the next page ejects a cut
sheet, if loaded.
A-19
The printer ignores this command if this one would move the print position more than
179/360 inch in the negative direction or if the command would move the print
position in the negative direction after a graphics command is sent on the current line
or above the point where graphics have previously been printed. The command would
move the print position above the top-margin position.
ESC [ \
Sets vertical units. (IBM Proprinter XL24/XL24E, 2391+, 9068)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC [ \ m1 m2 t1 … t4
1B 5B 5C m1 m2 t1 … t4
27 91 92 m1 m2 t1 … t4
m1 = 4
m2 = 0
0 < t1 < 255
0 < t2 < 255
t3 = 0
t4 = 180 or 216
This command changes the base units for the graphics line spacing commands (ESC J,
ESC 3). The default value is 1/216 or 1/180 inch.
ESC \
Sets the relative horizontal print position. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC \ n1 n2
1B 5C n1 n2
27 92 n1 n2
0 < n1 < 255
0 < n2 < 127
A-20
This command moves the horizontal print position left or right from the current
position as specified by the following formula:
Horizontal position = (n2 x 256) + n1) x (defined unit) + (current position)
For positive (right) movement:
Where n2 is equal to:
INIT
[(horizontal position) – (current position)] x
(
1
)
defined unit
256
Where n1 is equal to:
MOD
[(horizontal position) – (current position)] x
(
1
)
defined unit
256
For negative (left) movement:
Where n2 is equal to:
32768-INIT
[(current position) – (horizontal position)] x
(
1
defined unit
256
A-21
)
Where n1 is equal to:
32768-MOD
[(current position) – (horizontal position)] x
(
1
)
defined unit
256
The default unit is 1/120 inch in Draft mode and 1/180 inch in LQ mode. If it would
move the print position outside the printing area, the printer ignores this command.
ESC +
Sets n/360-inch line spacing. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC + n
1B 2B n
27 43 n
0 < n < 255
This command sets the line spacing to n/360 inch. If the line spacing is changed, it
does not affect previous settings for vertical tabs or page length.
ESC 0
Selects 1/8-inch line spacing.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC 0
1B 30
27 48
This command causes line spacing to be set to 1/8 inch. If the line spacing is changed,
it does not affect previous settings for vertical tabs or page length.
In IBM 4722/9068 emulation, when the page-presentation-media (ESC [ F) command
sets the printer to process passbooks, the printer ignores the ESC 0 command.
A-22
ESC 1
Selects 7/72-inch line spacing.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC 1
1B 31
27 49
This command causes line spacing to be set to 7/72 inch.
In IBM 4722/9068 emulation, when the page-presentation-media (ESC [ F) command
sets the printer to process passbooks, the printer ignores the ESC 1 command.
ESC 2
Selects 1/6-inch line spacing. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC 2
1B 32
27 50
This command causes the line spacing to be set to 1/6 inch. If the line spacing is
changed, it does not affect previous settings for vertical tabs or page length.
ESC 2
Enables the line spacing set by ESC A command.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC 2
1B 32
27 50
This command starts line spacing at a value that was set by ESC A.
A-23
The line spacing is set to 1/6 inch, if the command does not encounter an ESC A
command, or if the PPM (ESC [ F) command (4722 or 9068 emulations) sets the
printer to process passbooks.
ESC 3
Sets n/180-inch line spacing. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC 3 n
1B 33 n
27 51 n
0 < n < 255
This command sets the line spacing to n/180 inch. If the line spacing is changed, it
does not affect previous settings for vertical tabs or page length.
ESC 3
Sets graphics line spacing at n/216 inch. (IBM Proprinter XL24/XL24E, 2391+)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC 3 n
1B 33 n
27 51 n
0 < n < 255
This command sets graphics line spacing at n default unit defined by the ESC [ \
command. To move exactly n/216 inch, n must be an integer multiple of 3.
A-24
ESC 3
Sets graphics line spacing at n/216 inch. (IBM 4722, 9068)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC 3 n
1B 33 n
27 51 n
0 < n < 255
This command sets graphics line spacing to the hexadecimal value specified by n ,
measured in n/216 inches, or n/v of an inch if the vertical base unit has been changed
to v using ESC [ \. If n is 0, the current line spacing interval remains in effect.
When the page-presentation-media (ESC [ F) command sets the printer to process
passbooks, the printer ignores the ESC 3 command.
ESC 4
Sets top of form (first printable line).
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC 4
1B 34
27 52
This sequence sets the top of form, i.e. it ejects the loaded paper. The command is
ignored if paper is positioned on the first printable line.
A-25
ESC A
Sets text line spacing at n/60 inch. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC A n
1B 41 n
27 65 n
0 < n < 85
This command changes the default line spacing to n/60 inch. The new line spacing
value is immediately activated.
ESC A
Sets text line spacing at n/72 inch.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC A n
1B 41 n
27 65 n
This command changes the line spacing to n/72 inch. The line spacing value is stored
and activated only after the ESC 2 code is received.
ESC B
Sets vertical tabs.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC B n1 … nx 0
1B 42 n1 ... nx 00
27 66 n1 ... nx 0
1 < n < 255
A-26
In EPSON mode, sets vertical tab stops in the 0 Vertical Format Unit (VFU) channel.
This code sets up to 16 vertical tab stops at the line specified by n1, n2 and so on in the
0 VFU channel. The tab stops are memorized as physical positions.
In IBM modes, this code sets up to 64 vertical tab stops at the line number specified by
n1, n2 and so on in the 0 VFU channel. The line at top of form is line 1. The tab stops
are memorized as logical positions.
ESC C 0
Sets form length to n inches.
(IBM Proprinter XL24/XL24E, 2391+, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC C 0 n
1B 43 00 n
27 67 0 n
1 < n < 22
This command sets the form length to the number of inches specified by n. The current
position of the paper is assumed as top of form. Setting the paper length cancels the
top and bottom-margin settings.
In IBM 4722 and 9068 emulations this command is recognized and discarded.
A-27
ESC C
Sets form length to n lines.
(IBM Proprinter XL24/XL24E, 2391+, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC C n
1B 43 n
27 67 n
1 < n < 127
This command sets the form length to the number of lines specified by n at the current
vertical spacing. The current position of the paper is assumed as top of form.
In IBM 4722 and 9068 emulations, this command is recognized and discarded.
ESC D
Sets horizontal tabs.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC D n1 n2 … nx 0
1B 44 n1 n2… nx 00
27 68 n1 n2… nx 0
1 < n < 255
This sequence sets up to 28 (IBM mode) or 32 (EPSON mode) horizontal tab stops
after canceling the current setting. The n1 to nx parameters specify the number of
columns at which horizontal tab stops are required and must be entered in the
sequence in ascending numerical order. Any value outside this range will be ignored.
In IBM mode, the tab stop position is memorized as logical position in the page so that it
is affected by changing the horizontal spacing. The columns are numbered 1 through 93.
A-28
In EPSON mode, the tab stop position set by ESC D is memorized as physical position
in the page and therefore it is not affected by changing the horizontal spacing. The
physical position of the tab stop depends on the horizontal spacing in operation when
ESC D is used. The ESC D 0 cancels all active tab stops.
ESC d
Spaces forwards relative dot position.
(IBM Proprinter XL24/XL24E, 2391+, 9068)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC d n1 n2
1B 64 n1 n2
27 100 n1 n2
0 < n1, n2 < 255
This command moves the print carriage of a (n1 + (n2*256))/120 inch displacement on
the right of its current dot position. If the selected position is outside the current right
margin, it is forced to the last column.
ESC EM
Loading/ejecting paper. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC EM n
1B 19 n
27 25 n
This command controls the paper feeding according to the parameters below:
n
0, R
8
9
Description
Paper Ejection
Paper Ejection
Current Paper Loading
A-29
The parameter “R” ejects the currently loaded cut sheet without printing data from
the line buffer.
ESC l
Sets left margin (10 cpi). (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC l n
1B 6C n
27 108 n
0 < n < 255
This code sets the left margin at the current horizontal spacing. It must be sent at the
beginning of the line. The n parameter specifies the number of columns. For each type
of horizontal spacing there is a different range of possible values, as shown in the
following table.
Character Width
Double Width
Normal
Horizontal Spacing
5 cpi
6 cpi
7.5 cpi
8.5 cpi
10 cpi
10 cpi
12 cpi
15 cpi
17 cpi
20 cpi
Range of columns
0 < n < 67
0 < n < 80
0 < n < 100
0 < n < 114
0 < n < 134
0 < n < 134
0 < n < 160
0 < n < 201
0 < n < 229
0 < n < 255
A-30
ESC N
Sets the skip-over perforation to n lines.
(IBM Proprinter XL24/XL24E, 2391+, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC N n
1B 4E n
27 78 n
1 < n < 127 (EPSON mode)
1 < n < 225 (IBM mode)
The skip-over perforation is the sum of top and bottom margins values at the selected
vertical spacing. The n parameter must be less than the current form length. The
skip-over is memorized as physical position on the page. It is cancelled by ESC O or
changing the form length. The skip-over value, when accepted, will set the top and
bottom margins according to the operator panel setting (see the User Manual):
If the top margin set via operator panel is greater than the skip-over value, then the
following value of the margins will be set:
Top margin = skip-over value
Bottom margin = 0
If the top margin set via operator panel is less or equal to the skip-over value, then
the following value of the margins will be set:
Top margin = operator panel value
Bottom margin = the difference between skip-over value and top margin value
If the sum of the top and bottom margins values set via operator panel is less than
the skip-over value, the following values for the margins will be set:
Top margin = operator panel value
Bottom margin = the difference between skip-over value and top margin value
A-31
Changing the vertical spacing does not affect the skip-over distance. This can be
changed by a further ESC N command or can be reset by the ESC O command, which
resets the skip-over value to 0. The skip-over perforation will be executed when the
end of the page is reached with a LF, VT or FF code and not with the ESC J or ESC C
commands, the skip-over perforation is cancelled and must therefore be set again.
In IBM 4722 and 9068 emulations, this command is recognized and discarded.
ESC O
Disables the skip-over perforation.
(IBM Proprinter XL24/XL24E, 2391+, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC 0
1B 4F
27 79
This sequence sets the number of lines of the skip-over perforation to the value 0 and
so any skip perforation set by ESC N is cancelled.
In IBM 4722 and 9068 emulations, this command is recognized and discarded.
ESC Q
Sets the right margin (10 cpi). (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC Q n
1B 51 n
27 81 n
1 < n < 255
This code sets the line length at the current horizontal spacing. It must be sent at the
beginning of the line. The n parameter specifies the number of columns and for each
type of horizontal spacing there is a range of values, as shown in the following table:
A-32
Character Width
Horizontal Spacing
Double Width
Normal
Range of columns
5 cpi
1 < n < 68
6 cpi
2 < n < 81
7.5 cpi
2 < n < 102
8.5 cpi
2 < n < 116
10 cpi
2 < n < 136
10 cpi
2 < n < 136
12 cpi
4 < n < 163
15 cpi
4 < n < 204
17 cpi
4 < n < 233
20 cpi
4 < n < 255
Any value outside the accepted range is ignored and the previous setting remains in
effect. The right margin must be greater than the left margin. The physical position
set for the right margin does not change if the horizontal spacing is modified.
ESC R
Sets all tabs to power-on settings.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
ASCII Code
Hexadecimal Value
Decimal Value
ESC R
1B 52
27 82
This command sets horizontal tab stops every eight columns starting from column 9
and cancels all vertical tab stops.
A-33
ESC SP
Sets inter-character space. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC SP n
1B 20 n
27 32 n
0 < n < 127
This command sets the inter-character space to n/120 inch in Draft printing and n/180
inch in Quality printing.
ESC [ J
Sets 5 lpi. (IBM 4722, 9068)
ASCII Code
Hexadecimal Value
Decimal Value
ESC [ J n
1B 5B 4A n
27 91 74 n
This command sets the line-spacing distance in increments of 1/1440 inch. The only
value that is accepted is 288/1440 (1/5 inch).
ESC X
Sets left and right margins. (IBM Proprinter XL24/XL24E, 2391+, 9068)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC X n1 n2
1B 58 n1 n2
27 88 n1 n2
0 < n1, n2 < 255
This command specifies left and right margin positions. The n1 and n2 parameters
indicate respectively the number of columns for the left and right margins at the
A-34
current spacing. These margins are memorized in terms of absolute displacement from
the physical left edge of the page.
If n1 is equal to 0, the current left margin of the page is used. If n2 is equal to 0, the
current right margin of the page is used. The left margin value must be less than the
right margin value. The right margin value must not exceed the physical right edge of
the paper; otherwise the maximum acceptable value for the right margin will be set.
FF
Ejects loaded document form printer.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
FF
0C
12
This code is a terminator code, when received, causes all data in the print buffer to be
printed out, then it ejects the paper.
ESC FF
Ejects loaded document form printer.
(IBM Proprinter XL24/XL24E, 2391+, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
FF
1B 0C
27 12
See description of FF command above.
A-35
HT
Horizontal Tab.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
HT
09
9
This code moves logically the print carriage to the next horizontal tab stop as defined
by ESC D.
In IBM mode, up to 28 horizontal tab stops can be set. The HT code is ignored if no tab
stop has been set or if the current print carriage position has moved past the last tab
position or if the tab stop is on or beyond the right margin. At power on, the tab stops
are set every eight columns (default). The horizontal tab stops can be changed by the
ESC D command.
In EPSON mode, up to 32 horizontal tab stops can be set. The default tab stops are
memorized as logical position in the page, so that are affected by changing the
horizontal spacing. The tab stop positions set by ESC D are memorized as physical
position in the page and therefore they are not affected by changing the horizontal
spacing. When the double width printing is selected, the tab stop setting must take
account that each character occupies two columns. Character scoring (underline, overscore and strikethrough) is not printed between the current print position and the
next tab when this command is sent.
A-36
ESC HT
Horizontal Tab.
(IBM Proprinter XL24/XL24E, 2391+, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC HT
1B 09
27 9
See description of HT command.
VT
Vertical Tab. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
VT
0B
11
This code is a terminator code and when received causes the contents of the print
buffer to be printed before advancing paper to the next vertical tab stop set by the
ESC B command.
This code will be executed normally, if vertical tab stops follow the current print
position. It will be executed like a FF code (EPSON mode) or like a LF code (IBM
mode), if the vertical tab stops follow the bottom of form position (which corresponds to
the form length if the bottom of form has not been set) or if the current position is
beyond the last vertical tab stop. It will be executed like an LF code if no vertical tab
stops have been set by the ESC B command. In EPSON mode, the vertical tabulations
are referred to the VHF channel selected by the ESC / m. If no VFU channels have
been selected, the printer assumes as default channel 0.
This command resets the double width printing set by SO or ESC SO command.
A-37
ESC VT
Vertical Tab. (IBM Proprinter XL24/XL24E, 2391+, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC VT
1B 0B
27 11
See description of VT command above.
ESC [ F
Page Presentation Media. (IBM 4722, 9068)
ASCII Code
Hexadecimal Value
Decimal Value
ESC [ F n pft fc bw io
1B 5B 46 n pft fc bw io
27 91 70 n pft fc bw io
The page-presentation-media command selects the following:
• Forms type and feed technique
• Initial position
• Initial offset distance
• Amount of acceptable skew
• If skew override is allowed
• Book width
The page-presentation-media consists of 1 to 6 parameter bytes, where:
n
pft
Defines the number of parameter bytes
Defines the paper feed technique and is used to select cut form and passbook
form printing:
A-38
pft Value
01
03
11
12
fc
Defines the initial vertical offset.
fc Value
0
1
bw
Setting
Cut form
Cut form
Passbook with vertical fold
Passbook with horizontal fold
Setting
6,1 mm (0.24 in.)
3,9 mm (0.15 in)
Used only if the REMS feature is installed
io
If the fc parameter indicates that the position is to an offset print line, the io
byte indicates, if included, the number of lines to offset in hexadecimal.
According to the parameters set, the maximum accepted skew is determined.
A-39
Print Mode
DC2
Sets 10 cpi printing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
ASCII Code
DC2
Hexadecimal Value 12
Decimal Value
18
This is a terminator code. It causes all data present in the print buffer to be printed.
This command is accepted at any position within the line. The character that follows
this command will be printed at 10 cpi. This command does not cancel doublewide
printing.
ESC DC2
Sets 10 cpi printing. (IBM Proprinter XL24/XL24E, 2391+)
ASCII Code
ESC DC2
Hexadecimal Value 1B 12
Decimal Value
27 18
See description of the DC2 command.
A-40
DC2
Cancels compressed printing. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
DC2
12
18
This is a terminator code. It causes all data present in the print buffer to be printed. It
is accepted at any position within the line. The character that follows this command
will be printed as follows:
17 CPI
20 CPI
→
→
10 CPI
12 CPI
DC4
Cancels double width printing.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
DC 4
14
20
This code cancels the double width printing set by SO or ESC SO code. It has no effect
if the ESC W or ESC has set double width commands.
A-41
ESC DC4
Cancels double width printing.
(IBM Proprinter XL24/XL24E, 2391+, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC DC4
1B 14
27 20
See description of DC4 command above.
ESC Sets or cancels underlined printing.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC - n
1B 2D n
27 45 n
Enables or disables the underlined printing. See the following table:
n
Underlined Printing
1
0
enabled
disabled
A-42
ESC !
Master Select. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC ! n
1B 21 n
27 33 n
0 < n < 255
This command selects any combination of several attributes. The parameter n is the
sum up of the printing style values to be used. See the following table:
n
0
1
4
8
16
32
64
128
Style
10 cpi
12 cpi
Compressed
Emphasized
Double Strike
Double Width
Italic
Underlined
To print the desired combination of printing attributes, calculate the n parameter by
adding up the values of each attribute.
A-43
ESC ( Sets score line. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC ( - n1 n2 m d1 d2
1B 28 2D n1 n2 m d1 d2
27 40 45 n1 n2 m d1 d2
n1 = 3
n2 = 0
m=1
1 < d1 < 3
d2 = 1
This command enables/disables scoring of all characters and spaces following this
command according to the following parameters:
d1
Line
1
2
3
Underline
Strikethrough
Overscore
d2
Line
0
1
2
5
6
Cancel score line
Single continuous line
Double continuous line
Single broken line
Double broken line
Any combination of scoring may be set simultaneously. Each type is independent of
other types. Graphics characters are not scored.
A-44
ESC :
Sets 12 CPI. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
ASCII Code
Hexadecimal Value
Decimal Value
ESC :
1B 3A
27 58
This is a terminator code. It causes all data present in the print buffer to be printed.
Subsequent data will be printed at 12 cpi. This command is accepted at any position
within the line. The setting of another horizontal spacing resets this command.
ESC [ @
Sets double high printing and double line feed.
(IBM Proprinter XL24/XL24E, 2391+, 9068)
ASCII Code
Hexadecimal Value
Decimal Value
ESC [ @ l h m1 m2 m3 m4
1B 5B 40 l h m1 m2 m3 m4
27 91 64 l h m1 m2 m3 m4
l =normally 4
h = normally 0
m1 = 0
m2 = 0
This command sets height, width and vertical spacing. The l and h parameters specify
the number of mode bytes mx contained in the sequence. The m3 and m4 parameters
specify the printing characteristics.
m3 controls both the line spacing and the character height. It has two parts: a highorder half-byte of m3 controls the line spacing and the low-order half-byte controls the
character height.
A-45
m3
Character Height
Line Spacing
0
1
2
16
17
18
32
33
34
No change
Standard character height
Double character height
Character height unchanged
Standard character height
Double character height
Character height unchanged
Standard character height
Double character height
No change
Line feeds unchanged
Line feeds unchanged
Normal line feeds
Normal line feeds
Normal line feeds
Double line feeds
Double line feeds
Double line feeds
m4 specifies the character width. Only the low-order half-byte is significant in this
mode byte. The high-order half-byte is ignored.
m4
0
1
2
Character Width
No change
Standard width character
Double width character
Line Spacing
No change
No change
No change
ESC [ d
Set the print quality. (IBM 2391+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC [ d 1 0 n
1B 5B 64 01 00 n
27 91 100 1 0 n
This command sets the print quality to draft or LQ print. See the following table:
A-46
n
Types
0
From 1 to 127
From 128 to 254
255
No change
Draft
Letter Quality
Default Quality
ESC [ I
Sets font and pitch of a character. (IBM 2391+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC [ I 2 0 m n
1B 5B 49 02 00 m n
27 91 73 2 0 m n
This command allows modifying the font and pitch type style of a character.
The values 2 and 0 are constants. If font lock and pitch lock are active, this command
is ignored. To select the values for the variables m and n, which identify the pitch and
the font type style to use, refer to the table below.
1. Identify the type style (pitch and font) to use in the left column (pitch).
2. For the hexadecimal values for m n, look across the row to the second column (Hex
m n).
3. For the decimal values for m n, look across the row to the third column (Decimal m n).
Substitute these values for m n in the printer command syntax.
A-47
Pitch
Hexadecimal
m
n
Decimal
m
n
Decimal Value
(m x 256 + n)
Courier
10
12
15
17
20
24
PS
00
01
01
01
01
01
00
0B
EB
EC
ED
EE
1E
AB
0
1
1
1
1
1
0
11
235
236
237
238
30
171
11
491
492
493
494
286
171
00
01
01
01
01
01
00
0C
FE
OF
C9
CA
1F
A4
0
1
1
1
1
1
0
12
239
240
201
202
31
164
12
495
496
457
458
287
164
00
01
01
01
01
01
01
24
8F
8E
8D
8C
20
AE
0
1
1
1
1
1
1
36
143
142
141
140
32
174
36
399
398
397
396
288
174
00
01
01
01
01
01
00
19
D0
D1
D2
D3
23
C7
0
1
1
1
1
1
0
25
208
209
210
211
35
199
25
464
465
466
467
291
199
Prestige
10
12
15
17
20
24
PS
Gothic
10
12
15
17
20
24
PS
Presentor
10
12
15
17
20
24
PS
A-48
Pitch
Hexadecimal
m
n
Decimal
m
n
Decimal Value
(m x 256 + n)
Script
10
12
15
17
20
24
PS
01
01
01
01
01
01
00
D4
D5
D6
D7
D8
24
C8
1
1
1
1
1
1
0
212
213
214
215
216
36
200
468
469
470
471
472
292
200
ESC [ I
Sets font and pitch of a character. (IBM 9068)
ASCII Code
Hexadecimal Value
Decimal Value
ESC [ I c m n o p
1B 5B 49 c m n o p
27 91 73 c m n o p
This command sets the pitch and the code page. The c, m, n, o and p parameters are
all two-byte parameters, where:
c
Determines the number of parameter bytes. It is normally set to six or eight.
m
This parameter is reserved and ignored.
n
This parameter is effective only if the third parameter is specified and may
have the following hexadecimal values:
00, 90
00, 78
00, 60
00, 54
Sets 10 pitch characters
Sets 12 pitch characters
Sets 15 pitch characters
Sets 17,1 pitch characters
A-49
o
This parameter can be set as follows:
00, 00
01, 00
p
No change to character pitch
Set character pitch
Sets the code pages as follows:
1, 181
33, 122
3, 82
3, 83
3, 84
3, 85
3, 87
3, 89
3, 90
3, 92
3, 94
3, 95
3, 96
3, 97
3, 98
3, 99
3, 108
3, 109
3, 155
4, 74
4, 226
4, 227
4, 228
Default character set (cp437)
Greek (cp437g)
Multilingual (cp850)
Greek (cp851)
Latin 2 (cp852)
Turkish (cp853)
Cyrillic 1 (cp855)
Turkish (Latin 5) (cp857)
Euro PC Multilingual (cp858)
Portuguese (cp860)
Hebrew (cp862)
Canadian French (c863)
Arabic (cp864)
Nordic (cp865)
Russian (Cyrillic 2) (cp866)
Turkish (cp867)
OCR A (cp 876)
OCR B(cp 877)
8859/15 – cp923
(cp1098)
Central Europe (cp1250)
Cyrillic (cp1251)
Windows Ansi Latin (cp1252)
A-50
33, 123
33, 124
33, 125
33, 126
33, 127
33, 128
33, 129
33, 140
33, 131
33, 132
33, 133
33, 134
33, 135
33, 143
33, 144
33, 145
33, 146
33, 147
33, 148
33, 149
33, 150
33, 151
96Greek
Gost
Tass
Mazowia
Roman-8
Ukrainian
Cp437 Slavic
ID-14
ID-12
ID-17
Sanyo
Ku
Philip
8859/1 (Latin 1)
8859/2 (Latin 2)
8859/3 (Latin 3)
8859/4 (Latin 4)
8859/5 (Latin/Cyrillic)
8859/6 (Latin/Arabic)
8859/7 (Latin/Greek)
8859/8 (Latin/Hebrew)
8859/9 (Latin 5)
ESC _
Sets or cancels over-score printing.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
ASCII Code
Hexadecimal Value
Decimal Value
ESC _ n
1B 5F n
27 95 n
Enables or disables the over-score printing. See the following table:
n
Over-score Printing
1
0
Enabled (all spaces and characters that follow are over-scored)
Disabled
ESC 4
Sets italics printing mode. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC 4
1B 34
27 52
Sets the style attribute of the font to italic. This command selects italic printing even
if the italic character table is not selected.
ESC 5
Cancels italics printing. (EPSON ESC/P2)
ASCII Code
ESC 5
Hexadecimal Value 1B 35
Decimal Value
27 53
Sets the style attribute of the font to normal (cancels the italic style attribute
previously selected with the ESC 4 command).
A-51
ESC c
Sets horizontal motion index (HMI).
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC c n1 n2
1B 63 n1 n2
27 99 n1 n2
0 < n2 < 4
0 < n1 < 255
0 < ((n2 x 256) + n1)) < 1080
HMI < 3.00 inches
This command fixes the character width (HMI) according to the following formula:
Where HMI is equal to:
[(n2
x 256 ) + n ]
1
inch
360
Where n2 is equal to:
INT
HMI x 360
256
Where n1 is equal to:
MOD
HMI x 360
256
A-52
ESC E
Sets emphasized printing.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC E
1B 45
27 69
This command starts emphasized printing. The print head strikes each dot twice to
produce a darker, bolder character. The second strike is offset horizontally.
ESC F
Cancels emphasized printing.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC F
1B 46
27 70
This command ends emphasized printing. This escape sequence cancels emphasized
printing that was set by ESC E.
ESC G
Sets double strike printing.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC G
1B 47
27 71
This command starts double-strike (NLQ) printing. ESC G must be canceled by ESC H.
A-53
ESC g
Sets 15 CPI. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC g
1B 67
27 103
Subsequent data will be printed at 15 cpi. This command is accepted at any position
within the line. This command resets the horizontal motion index (HMI) set with the
ESC c command. If you change the pitch during proportional mode (selected with the
ESC p command) the change takes effect when the printer exits proportional mode.
ESC H
Cancels double strike printing.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC H
1B 48
27 72
This command cancels double-strike printing with the ESC G command.
ESC I
Selects printing type for resident and DLL characters.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
ASCII Code
Hexadecimal Value
Decimal Value
ESC I n
1B 49 n
27 73 n
This command selects the resident or the download font in Draft o LQ printing mode.
It is ignored if you select a font that has not been downloaded or has been overwritten.
A-54
IBM Proprinter XL24/XL24E, 2391+, 9068 emulations:
n
Resident font
n
Download font
0
Draft 10 cpi
4
Draft 10 cpi
2
LQ 10 cpi
6
LQ 10 cpi
3
Proportional
7
Proportional (*)
8
Draft 12 cpi
12
Draft 12 cpi
10
LQ 12 cpi
14
LQ 12 cpi
16
Draft 17 cpi
20
Draft 17 cpi
18
LQ 17 cpi
22
LQ 17 cpi
(*) When using the 9068 emulation, this value is ignored.
IBM 4722 emulation:
n
0
2
8
10
16
Resident font
Draft
LQ
Draft Gothic
LQ Gothic
Draft Courier
n
4
6
12
14
18
Download font
Draft
LQ
Draft Prestige
LQ Prestige
Draft Courier
ESC M
Selects 10.5 point, 12 cpi. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC M
1B 4D
27 77
This command selects 10.5-point, 12-cpi character printing. It resets the horizontal
motion index (HMI) set with the ESC c command. If you change the pitch during
proportional mode (selected with the ESC p command) the change takes effect when
the printer exits proportional mode.
A-55
ESC P
Selects 10.5 point, 10 cpi. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC P n
1B 50 n
27 80 n
This command selects 10.5-point, 10-cpi character printing. It resets the horizontal
motion index (HMI) set with the ESC c command. If you change the pitch during
proportional mode (selected with the ESC p command) the change takes effect when
the printer exits proportional mode.
ESC P
Sets or cancels proportional printing. (IBM Proprinter XL24/XL24E, 2391+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC P n
1B 50 n
27 80 n
This code is a terminator code; when received it causes all data in the print buffer to
be printed out. Then if n parameter is equal to 1, the subsequent data is printed in
proportional mode. If n parameter is equal to 0, proportional mode is reset.
If the any horizontal spacing command is sent to the printer when the proportional
printing is set, the command will be stored and will be activated as soon as the
proportional printing will be reset.
A-56
ESC p
Sets or cancels proportional printing. (EPSON ESC/P2)
ESC p n
1B 70 n
27 112 n
ASCII Code
Hexadecimal Value
Decimal Value
This command selects the proportional or fixed spacing according to the following
values:
n
Proportional Printing
0
1
Returns to current fixed character pitch
Selects proportional character spacing
It resets the horizontal motion index (HMI) set with the ESC c command. The changes
made to the fixed-pitch setting with ESC P, ESC M or ESC g commands during
proportional mode take effect when the printer exits proportional mode. The printer
automatically switches to LQ mode when the printer exits proportional mode.
ESC q
Selects character style. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC q n
1B 71 n
27 113 n
0<n<3
This command enables/disables outline and shadow printing according to the parameters
below:
A-57
n
Style
0
1
2
3
Normal
Outline
Shadow
Outline with Shadow
ESC S
Sets subscript or superscript printing.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC S n
1B 53 n
27 83 n
Selects the subscript or the superscript printing. See the following table:
n
Selection
1
0
Subscript Print enabled
Superscript Print enabled
The proportional printing of the subscript or superscript characters is performed at 2/3 of
the proportional character width. Use the ESC T command to cancel super/subscript
printing.
A-58
ESC SI
Selects condensed mode.
(IBM Proprinter XL24/XL24E, 2391+, EPSON ESC/P2)
ASCII Code
ESC SI
Hexadecimal Value 1B 0F
Decimal Value
27 15
This command selects the condensed mode in which character width is reduced as follows:
10 CPI
→
17.14 CPI
12 CPI
→
20 CPI
Proportional
→
½ width
DC2 code cancels the condensed printing. This command resets the horizontal motion
index (HMI) set with the ESC c command.
ESC SO
Sets double width printing (one line).
(IBM Proprinter XL24/XL24E, 2391+, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC S0
1B 0E
27 14
This code causes subsequent data in the same line to be printed as double width
characters. It is canceled by the LF, VT, FF, DC4 and ESC W 0 commands or when
the buffer is full. This command resets the horizontal motion index (HMI) set with the
ESC c command.
A-59
ESC T
Cancels subscript or superscript printing.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC T
1B 54
27 84
This command cancels subscript or superscript printing selected by ESC S command.
ESC W
Sets or cancels double width printing.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC W n
1B 57 n
27 87 n
0<n<1
Enables or disables the double width printing. See the following table:
n
1
0
Selection
Double Width Printing enabled
Double Width Printing disabled
A-60
ESC w
Sets or cancels double height printing. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC w n
1B 77 n
27 119 n
0 < n < 255
Enables or disables the double-height printing of all characters. The first line of a page is not
doubled if the ESC w command is sent on the first line; all following lines are printed at
double-height. See the following table:
n
Selection
1
0
Double Height Printing enabled
Double Height Printing disabled
ESC X
Selects font by pitch and point. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC x m n1 n2
1B 58 m n1 n2
27 88 m n1 n2
5 < m < 127
0 < n1 < 255
0 < n2 < 127
This command puts the printer in scalable font mode and selects the pitch (default
value 10 cpi) of the font according to the following formula:
Where m defines the pitch:
A-61
m = 0 maintains current density
m = 1 sets proportional spacing
m > 5 selects fixed pitch equal to 360/m cpi
This command overrides the current pitch setting.
This command selects the point (default value 10.5) attributes of the font according to
the following formula:
Point size =
(n2 x 256) + n1
2
n1 and n2 define size by point (1 point equals 1/72 inch).
(point size) x 2
n2 = INT
256
(point size) x 2
n1= MOD
256
The point sizes available are the following: 8, 10, (10.5), 12, 14, 16, 18, 20, (21), 22, 24,
26, 28, 30, 32.
ESC x
Selects Letter Quality or Draft printing. (EPSON ESC/P2)
ASCII Code
ESC x n
Hexadecimal Value 1B 78 n
Decimal Value
27 120 n
This command selects either LQ or Draft printing according to the following values:
n
Selection
0
1
Draft printing
Letter Quality printing
A-62
If you select proportional spacing with the ESC p command during Draft printing, the
printer prints an LQ font instead. When you cancel proportional spacing with the ESC
p command, the printer returns to Draft printing.
SI
Sets condensed printing. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068,
EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
SI
OF
15
This command selects the condensed mode in which character width is reduced as
follows:
10 CPI
→
→
Proportional →
12 CPI
17.14 CPI
20 CPI
½ width
DC2 code cancels the condensed printing. This command resets the horizontal motion
index (HMI) set with the ESC c command.
SO
Sets double width printing (one line).
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
SO
0E
14
A-63
This code causes subsequent data in the same line to be printed as double width
characters. It is canceled by the LF, FF, VT, DC4, ESC W codes o when the buffer is
full. This command is not canceled by the VT command when it functions the same as
a CR command.
Character Sets
ESC ( ^
Prints data as characters. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC ( ^ n1 n2 d1 …. dk
1B 28 5E n1 n2 d1…. dk
27 40 94 n1 n2 d1…. dk
0 < n1 < 255
0 < n2 < 127
This command prints data bytes d1 through dk as characters not control codes. The
amount of data to be sent is calculated as follows:
k = ((n2 x 256) + n1)
Where n2 is equal to:
INIT
k
256
Where n1 is equal to:
MOD
k
256
The printer ignores data if no character is assigned to that character code in the
currently selected character table.
A-64
ESC ( t
Assigns character table. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC ( t n1 n2 d1 d2 d3
1B 28 74 n1 n2 d1 d2 d3
27 40 116 n1 n2 d1 d2 d3
n1 = 3
n2 = 0
This command assigns the d2 registered character table to the d1 character table
according to the following values:
d1:
0
1
2
3
character set 0
character set 0
character set 0
character set 0
d2
d3
1
1
3
4
5
6
7
8
9
10
11
44
13
14
12
0
16
0
0
0
0
0
0
0
0
0
0
0
0
0
PC 437
PC 437G
PC850
PC851
PC853
PC855
PC860
PC863
PC865
PC852
PC857
PC858
PC864
PC866
PC862
Italic default
Graphic default
DLL default
Graphic default
d2
d3
15
25
16
29
29
29
29
29
29
29
29
29
29
0
0
0
1
2
3
4
5
6
7
8
9
15
PC867
PC877
GOST
8859/1
8859/2
8859/3
8859/4
8859/5
8859/6
8859/7
8859/8
8859/9
8859/15
A-65
ESC [ T
Selects a Code page. (IBM 2391+, 4722)
ASCII Code
Hexadecimal Value
Decimal Value
ESC [ T 4 0 0 0 HC L.c
1B 5B 54 04 00 00 00 Hc Lc
27 91 84 4 0 0 0 Hc Lc
This sequence allows changing the current code page. If an unavailable code page is
specified, this command is ignored.
The digits 04 00 00 00 (hexadecimal) and 4 0 0 0 (decimal) are constant. To calculate
Hc Lc for a code page that is not shown, divide the code page number, such as 437, by
256.
• The whole number result is the Hc value
• The remainder is the Lc value.
If your code page has an alphabetic character, such as 437G, add 10,000 to the code
page number, then divide by 256.
Hc
Lc
1
33
3
3
3
3
3
3
3
3
3
3
3
3
3
3
181
122
82
83
84
85
87
89
90
92
94
95
96
97
98
99
CP437
CP437G
CP850
CP851
CP852
CP853
CP855
CP857
CP858
CP860
CP862
CP863
CP864
CP865
CP866
CP867
Hc
Lc
3
3
3
4
4
2
4
33
33
33
33
33
33
33
33
33
108
109
155
74
226
227
228
123
124
125
126
127
128
129
130
131
CP876
CP877
8859/15
CP1098
CP1250
CP1251
CP1252
96GREEK
GOST
TASS
MAZOWIA
ROMAN-8
UKRAINIAN
CP437 SLAVIC
ID-14
ID-12
A-66
Hc
Lc
33
33
33
33
33
33
33
33
33
33
33
33
33
132
133
134
135
143
144
145
146
147
148
149
150
151
ID-17
SANYO
KU
PHILIP
8859/1
8859/2
8859/3
8859/4
8859/5
8859/6
8859/7
8859/8
8859/9
ESC \
Prints characters from all characters table.
(IBM Proprinter XL24/XL24E, 2391+, 9068)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC \ n1 n2
1B 5C n1 n2
27 92 n1 n2
0 < n1 < 255
0 < n2 < 255
This command prints the next n1 + n2 x 256 characters from the table of all printable
characters.
The total number of characters that will be printed from the table of all printable
characters is equal to n1 + (n2 x 256). For example, to print 300 characters from the
table of all printable characters: n1 = 44, n2 = 1. The control codes are not recognized as
long as this sequence is active. The space character is printed as an unassigned
character.
ESC ^
Prints a single character from the all characters table.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC ^ n
1B 5E n
27 94 n
0 < n < 255
This command prints the next character from the all characters table. This sequence
prints only one character from the all character table.
A-67
ESC 6
Enables Upper Control Codes. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC 6
1B 36
27 54
This command enables the printing of upper control codes (from 128 to 159). These
codes are treated as printable characters instead of control codes. This command has
no effect when the italic character table is selected and remains in effect even if you
change the character table.
ESC 6
Selects the Character Set 2. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
ASCII Code
Hexadecimal Value
Decimal Value
ESC 6
1B 36
27 54
This command selects the character set 2.
ESC 7
Selects the Character Set 1. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
ASCII Code
Hexadecimal Value
Decimal Value
ESC 7
1B 37
27 55
This command selects the character set 1.
A-68
ESC 7
Cancels Upper Control Codes. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC 7
1B 37
27 55
This command cancels the printing of upper control codes (from 128 to 159).
ESC k
Selects LQ fonts. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC k n
1B 6B n
27 107 n
Selects one of the available fonts in Letter Quality mode. See the following table:
n
0
1
2
3
4
5
6
7
11
Types
Courier
Gothic
Courier
Prestige
Script
OCR-B
OCR-A
Presentor
Boldface
If the Draft mode is selected when this command is sent, the new LQ font will be
selected when the printer returns to LQ printing.
A-69
ESC R
Selects a national character set. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC R n
1B 52 n
27 82 n
0 < n < 12
This code causes the national character set to be selected according to the parameter
n. See the following table:
n
0
1
2
3
4
5
6
n
USA
France
Germany
United Kingdom
Denmark-I
Sweden
Italy
7
8
9
10
11
12
Spain-I
Japan
Norway
Denmark-II
Spain-II
Latin America
ESC t
Selects characters table. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC t n
1B 74 n
27 116 n
0<n<3
Selects the character table to be used for printing from among the four character
tables described below:
A-70
n
Character Tables
0
1
2
3
Standard Italic Character Set
PC437
User-defined characters
PC437
Download Character
ESC %
Selects user-defined character set. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC % n
1B 25 n
27 37 n
This command switches between the normal (resident) and user-defined (downloaded)
characters:
n
Selection
1
0
Selects the use of down-loaded character set in RAM
Selects the use of resident character set in ROM
A-71
ESC &
Defines user-defined characters. (EPSON ESC/P2)
The format for this command depends on whether you are defining draft characters or
LQ characters.
Draft mode
ASCII Code
Hexadecimal Value
Decimal Value
Range
LQ mode
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC & NUL n m [ a0 a1 a2 d 1 d 2 … d k ]
1B 26 00 n m [ a0 a1 a2 d 1 d 2 … d k ]
27 38 0 n m [ a0 a1 a2 d 1 d 2 … d k ]
0 < n < 127
0 < m < 127
n<m
0 < a1 < 15
0 < a0+a1+a2 < 18
ESC & NUL n m [a0 a1 a2 d 1 d 2 … d k ]
1B 26 00 n m [a0 a1 a2 d 1 d 2 … d k ]
27 38 0 n m [a0 a1 a2 d 1 d 2 … d k ]
0 < n < 127
0 < m < 127
n<m
0 < a1 < 37
0 < a0+a1+a2 < 42
The data within brackets above is repeated for each character you define.
A-72
The parameters in the command have the following meaning:
n and m The n and m parameters are two decimal numbers that define the first and the
last characters to be replaced in the character set in use.
a0
It sets space to the left of each proportional user-defined character.
a1
Actual width of user-defined characters.
a2
It sets space to the right of each proportional user-defined.
d1 ...dn
They are the character data that is printed.
Maximum character width (height x width):
Print quality
10 cpi
12 cpi
15 cpi
Proportional
Draft
24 x 12
24 x 10
24 x 8
Not available
24 x 36
24 x 30
24 x 24
24 x 42
Super/subscript 16 x 36
16 x 30
16 x 24
16 x 42
LQ
Normal size
ESC :
Copies characters from ROM to RAM. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC : NUL n m
1B 3A 00 n m
27 58 n m
0 < n < 127
m=0
This code copies the character generator in ROM into RAM area dedicated to the userdefined characters. The n parameter represents the LQ typestyle.
The following attributes are reflected in the copied font: Typeface, international
character set, size (super/subscript or normal), quality (draft/quality). Before copying
ROM characters to RAM, cancel italics with the ESC 5 command. After copying you
can italicize characters by sending the ESC 4 command.
A-73
ESC =
Defines downloaded characters.
(IBM Proprinter XL24/XL24E, 2391+)
ASCII Code
ESC = n m id p t
Hexadecimal Value 1B 3D n m id p t
Decimal Value
27 61 n m id p t
This sequence allows you to design and then down-line load special characters not
present in the character set in use. Whenever you would like to start the DLL setting
procedure, proceed as follows:
• Copy the character generator in ROM into RAM
• Select the DLL generator
There are 256 entries of 9 bytes that compose the look up table of a character
generator. One entry describes one character as follows:
Byte 1, 2
Byte 3 :
- Bit 7
The absolute address of the character definition.
1: indicates that the character is a graphic character (connects at 6 lpi)
0: indicates that the character is an alphanumerical character
- Bit 6
0: indicates a DLL character
1: indicates a resident character
- Bit 5 to 0 These 6 bits indicate the effective number of dot columns of the character
shape stored in memory.
A-74
Byte 4:
- Bit 7, 6
Graphic character description:
- 0: shading character
- 1: line drawing character
- 10: underscored character
- 11: not supported
All graphics characters are 30 dot high. An underscored character is defined
as a blank graphic (all zeros) and it is automatically generated by the printer.
A shading character repeats dots 1-6 of each column as dots 25 through 30
respectively. A line drawing character repeats dots 23 and 24 as the pairs 25
and 26, 27 and 28, 29 and 30.
- Bit 5 to 0 The number of dot columns of the character shape minus one. For example: the
character width of Draft generator is 10 dots and bit 5 to 0 must be set to 9.
- Bit 5 to 9 Compression mask description. It is used to optimize the memory occupation
and it is based on the concept that a dot column on its left is not stored. You
can calculate the compression mask of a character only after designing the
entire character. Every bit is associated with a dot column with the bit 7 of
byte 5 associated with the leftmost column. The bit is set to {1}, if the column
is equal to the preceding one; otherwise, it is set to {0}. If the character is
longer than 39 dot columns the remaining dot columns must be stored
without compression. The bit 40 (bit 0 of byte 9) must be 0. If no compression
is present in the character, byte 5 to 9 is composed by all zeros.
If you wish to copy an entry over another entry so that two characters with the same
characteristics and different code are present in the same look up table, the DLL
sequence ESC = n m id p t has the following meaning:
A-75
n and m
id:
p and t
Data
Indicate the byte number of the sequence n is the low part and m is the high
part.
Indicate the printer model. The id related to your printer is 23H.
Indicate the memory address of the character that you wish to replace. p is
the low part and t is the high part.
Is the entry 9 bytes of the character that you want to position at address
specified by p and t.
ESC =
Defines downloaded characters.
(IBM Proprinter 4722, 9068)
ASCII Code
ESC = c1 c2 n
Hexadecimal Value 1B 3D c1 c2 n
Decimal Value
27 61 c1 c2 n
The character font image download (ESC = c1 c2 n) command downloads up to 256 userdefined characters.
9 pin font image
c1 c2
Define the least-significant and most-significant byte (respectively) of a
hexadecimal count of the bytes n that follow the count. You calculate the
count as follows:
Count
(c2 * 256) + c1
or
Count
((number of downloaded characters) * 13) + 2
A-76
The maximum number of customer defined characters is 256, therefore, the maximum
count will be 3330 or D02H. A count value of 0 will reload the customer defined
character area from the resident character area.
n
Contains the following hexadecimal data:
14H Start_code_point Slice_image_information
Start_code_point
Slice_image_info
Is the code point of the first character representation to be
downloaded and it must be a value in the range 00H to FFH.
Is a list of 13-byte entries (one entry for each character
representation) having the following format:
Attribute 00H Slice1 … Slice11
Attribute
Indicates the physical attributes of the character representation with
the following bit information:
Bit 7
Indicates whether the character is a descender or
an ascender.
The bit is ignored is either bit 0 or bit 1 is set.
Bit 0 = Ascender
Bit 1 = Descender
Bits 6 to 2
Reserved and ignored
Bit 1 and 0
Define 12-high expansion for box drawing:
B 00 = No 12-high expansion
B 01 = Expand the bottom row (row 8) for
information down to rows 9, 10, 11 and 12
B 10 = Expand the top four (4) rows (rows 1, 2, 3
and 4) down to rows 9, 10, 11 and 12.
A-77
Slice 1 to Slice 11
Each byte defines the image information for the vertical columns
(slices) of the graphic. Slice 1 defines the leftmost vertical column,
and Slice 11 defines the rightmost. Within each byte the most
significant bit (bit 7) defines the topmost dot and the least significant
bit (bit 0) defines the bottommost dot of the slice. A bit being on
indicates that its associated dot is to be printed. The eight bits of
data are mapped onto 20 wires in the printer to give the same aspect
ratio. Bit image is mapped as follows:
1. Ascender
Dot
Position
Top
Bit
Number
Print
Wires
o
o
o
o
o
o
o
o
7
6
5
4
3
2
1
0
1, 2
4, 5
6, 7
9, 10
11, 12
14, 15
16, 17
19, 20
Dot
Position
Top
Bit
Number
Print
Wires
o
o
o
o
o
o
o
o
Bottom
7
6
5
4
3
2
1
0
4, 5
7, 8
9, 10
12, 13
14, 15
17, 18
19, 20
22, 23
If dots 7 and 6 are printed, wire 3 is used
If dots 5 and 4 are printed, wire 8 is used
If dots 3 and 2 are printed, wire 13 is used
If dots 1 and 0 are printed, wire 18 is used
Bottom
1. Ascender
A-78
If dots 7 and 6 are printed, wire 6 is used
If dots 5 and 4 are printed, wire 11 is used
If dots 3 and 2 are printed, wire 16 is used
If dots 1 and 0 are printed, wire 21 is used
There are actually 12 vertical columns in a graphic, however the last column must
always be blank, so it is not specifiable in the image information.
Horizontally consecutive dots are eliminated in standard text print mode (but are
printed in near-letter-quality print mode). The dot elimination process starts from
the left.
Code points 00H, 20h, 7FH and FFH are handled specially by the printer and care
should be taken when you are downloading characters for these points.
24 pin font image
c1 c2
Define the least-significant and most-significant byte (respectively) of a
hexadecimal count of the bytes n that follow the count. You calculate the
count as follows:
Count
(c2 * 256) + c1
or
Count
((number of downloaded characters) * 38) + 2
The maximum number of customer defined characters is 256, therefore, the maximum
count will be 9730 or X2602. A count value of 0 will reload the customer defined
character area from the resident character area.
A count value of 0 loads the customer defined character area from the resident
character area.
n
Contains the following hexadecimal data:
X D0 Start_code_point Slice_image_information
A-79
Start_code_point
Slice_image_info
Is the code point of the first character representation to be
downloaded and it must be a value in the range 00H to FFH.
Is a list of 38-byte entries (one entry for each character
representation) having the following format:
Attribute X 00H Slice1 Byte1, Slice2 Byte2… Slice12, Byte12
Attribute
Indicates the physical attributes of the character representation with
the following bit information:
Bit 7-3
Are reserved
Bits 2
Defines horizontal box, character expansion.
B 0 = indicates no horizontal expansion.
B 1 = indicates that the first and last slices are
expanded horizontally to fill the character
box on each side of the character
Bit 1 - 0
Defines vertical box character expansion.
B 00 = indicates no vertical expansion
B 01 = indicates that bottom two rows of slice
information are expanded three times
downward at the bottom of the character.
B 10 = indicates that top six rows of slice
information are expanded downward at
the bottom of the character.
B 11 = indicates no vertical expansion.
Using the attribute' expansion information box, characters in
adjacent positions can be made to touch each other vertically at 6
lines per inch and horizontally at any character pitch.
A-80
Box drawing characters whose attributes indicate expansion are not expanded when
printing double high print mode.
Slice1 … Slice 12
Each byte defines the image information for the vertical columns
(slices) of the graphic. Slice 1 defines the leftmost vertical column,
and Slice 12 defines the rightmost vertical column. Within each slice,
as defined by three consecutive bytes, the bytes represent the top,
middle and bottom-eight dots of the slice, respectively. Within each
byte the most significant bit (bit 7) defines the topmost dot and the
least significant bit (bit 0) defines the bottommost dot of the slice.
When a bit is on, the corresponding dot is to be printed.
Horizontally consecutive dots are eliminated in standard text print mode (but are
printed in letter-quality print mode). The dot elimination process starts from the left.
The printer interprets code points 00H, 20H, 7FH and FFH as cases. Care should be
taken when you downloaded characters for these code points.
A-81
Bit-Image
ESC ( G
Selects Graphics Mode. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC ( G m n1 n2
1B 28 47 m n1 n2
27 40 71 m n1 n2
m = 1, 49
n1 = 1
n2 = 0
This command selects graphics mode and allows you to print raster graphics. This
command clears all user-defined characters and tab settings. Only the following
commands are available in graphics mode, the printer ignores all other commands:
LF, FF, CR, ESC EM, ESC . , ESC @, ESC ( c, ESC ( C, ESC ( V, ESC ( v, ESC \, ESC
$, ESC U, ESC +, ESC ( U.
ESC *
Sets dot graphics printing. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC * m n1 n2 d1.. dx
1B 2A m n1 n2 d1.. dx
27 42 m n1 n2 d1.. dx
m = 0,1,2,3,4,5,6,32,33,38,39,40,64,65,70,71,72,73
0 < n1 < 255
0 < n2 < 31
This command prints dot-graphics in 8-dot columns, depending on the following
parameters:
A-82
m
n1, n2
Specifies the dot density
Specify the total number of columns of graphics data according to the formula:
number of dot columns = (n1 + (n2 x 256))
n2 = INT
n1 = MOD
d1
…
(number of dot columns)
256
(number of dot columns)
256
dx Bytes of graphics data; x is determined by multiplying the total number of
columns times the number of bytes required for each column. See the table
below:
Parameter m
in ESC *
command
Horizontal
density (dpi)
0
1
2
3
4
6
32
33
38
39
40
60
120
120
240
80
90
60
120
90
180
360
Vertical density
(dpi)
60
60
60
60
60
60
180
180
180
180
180
60
60
60
60
60
60
180
180
180
180
180
Adjacent dot
printing
Dots per
column
Bytes per column
Yes
Yes
No
No
Yes
Yes
Yes
Yes
Yes
Yes
No
8
8
8
8
8
8
24
24
24
24
24
1
1
1
1
1
1
3
3
3
3
3
A-83
ESC .
Print Raster Graphics. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC . c v h m n1 n2 d1 d2 … dk
1B 2E c v h m n1 n2 d1 d2 … dk
27 46 c v h m n1 n2 d1 d2 … dk
c = 0,1
v = 10, 20
h = 10, 20
0 < m < 24
0 < n1 < 255
0 < n2 < 127
0 < d < 255
This command prints dot graphics in raster format (row by row, left to right) and can
be used only during graphics mode entered by sending the ESC ( G command. It
allows compression of graphics data during raster graphics printing.
The parameters are used as described below:
c
v
h
m
n1, n2
equal to 0 specifies full graphics mode (no compressed)
equal to 1 specifies compressed mode
vertical dot density (v/3600 dpi)
horizontal density (h/3600 dpi)
vertical dot count (rows of dot graphics)
horizontal dot count (columns of dot graphics), according to the following formula:
(horizontal dot count)
n2 = INT
256
A-84
n1 = MOD
(horizontal dot count)
256
k
d1 … dk
total number of data bytes, according to the following formula:
(n2 x 256) + n1 + 7
k = m x INT
8
During full graphics mode: graphics data.
During compressed mode: the first data byte is treated as a counter. Graphics
data bytes then alternate with a data counter byte as follows:
0 < (counter byte) < 127
Counter specifies the number of data bytes following according to this formula:
(counter byte) + 1 = (number of data bytes to follow)
or
(counter byte) = (number of data bytes to follow) -1
128 < (counter byte) < 255
Counter specifies the number of times to repeat the next byte of data according to
this formula:
256 - (counter byte) + 1 = (number of times to repeat next byte)
or
(counter byte) = 257 - (number of times to repeat next byte)
A-85
ESC ?
Reassigns dot graphics mode. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC ? n m
1B 3F n m
27 63 n m
Reassigns one of the dots graphics mode (described in the command ESC *) to one of
the following commands: ESC K, ESC L, ESC Y and ESC Z. The parameter n specifies
a character (K, L, Y or Z) which is reassigned to specific mode.
m = 0,1,2,3,4,6,32,33,38,39,40,64,65,70,71,72,73
m
n
0
1
2
3
(K): ESC K graphic command
(L): ESC L graphic command
(Y): ESC Y graphic command
(Z): ESC Z graphic command
ESC [ g
High Resolution Graphics. (IBM Proprinter XL24/XL24E, 2391+, 9068)
ASCII Code
Hexadecimal Value
Decimal Value
ESC [ g n m data
1B 5B 67 n m data
27 91 103 n m data
This command sends data for dot matrix graphics to the printer and allows the
selection of eight modes for both 8-wire graphics and 24-wire graphics.
n (count)
Count is a two-byte value in the format of low byte, high byte that
gives the number of bytes of graphic data plus one.
A-86
m (mode)
Mode is a one-byte value to select the graphics mode. Modes have a
vertical wire count (8 or 24) and a horizontal density in dots per inch.
See the following table:
Mode
Horizontal
Density
Wires
Description
0
1
2
3
8
9
11
12
60
120
120
240
60
120
180
360
8
8
8
8
24
24
24
24
Same as ESC K graphic command
Same as ESC L graphic command
Same as ESC Y graphic command
Same as ESC Z graphic command
High resolution for ESC K
High resolution for ESC L
data
The graphic data is organized by byte.
For 8-wire modes, it is arranged and mapped to the wires identically to ESC K.
For 24-wire modes, the data has 3 bytes per slice, the most significant bit of the 1st
byte mapping to the top wire and the least significant bit of the 3rd byte mapping to
the bottom wire. The slices are in sequence from left to right.
A-87
ESC K
Normal density dot graphics printing (60 dpi).
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC K n1 n2 p1 p2... px
1B 4B n1 n2 p1 p2... px
27 75 n1 n2 p 1 p2 ... px
0 < n1 < 255
0 < n2 < 31
0 < p < 255
Terminator code. This command prints dot graphics at 60 horizontal dot per inch by
60 vertical dpi. The parameter values should be calculated as follows:
n1
n2
p1
p2
px
Remainder of the number of column divided by 256.
Integer result of the previous division.
Sum of the values corresponding to the dots that should be printed in the first
column of the graphics pattern.
Sum of the values corresponding to the dots that should be printed in the
second column of the graphics pattern.
Sum of the values corresponding to the dots that should be printed in the last
column of the graphics pattern.
A-88
ESC L
Double density dot graphics printing (120 dpi).
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC L n1 n2 p1 p2... px
1B 4C n1 n2 p1 p2... px
27 76 n1 n2 p 1 p2 ... px
0 < n1 < 255
0 < n2 < 31
0 < p < 255
Terminator code. This command prints dot graphics at 120 horizontal dot per inch by
60 vertical dpi. The parameter values should be calculated as follows:
n1
n2
p1
p2
px
Remainder of the number of column divided by 256.
Integer result of the previous division.
Sum of the values corresponding to the dots that should be printed in the first
column of the graphics pattern.
Sum of the values corresponding to the dots that should be printed in the
second column of the graphics pattern.
Sum of the values corresponding to the dots that should be printed in the last
column of the graphics pattern.
A-89
ESC Y
Double density dot graphics printing at double-speed graphics (120 virtual dpi).
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC Y n1 n2 p1 p2... px
1B 59 n1 n2 p1 p2... px
27 89 n1 n2 p 1 p2 ... px
0 < n1 < 255
0 < n2 < 31
0 < p < 255
Terminator code. This command prints dot graphics at 120 horizontal dot per inch by
60 vertical dpi. The parameter values should be calculated as follows:
n1
n2
p1
p2
px
Remainder of the number of column divided by 256.
Integer result of the previous division.
Sum of the values corresponding to the dots that should be printed in the first
column of the graphics pattern.
Sum of the values corresponding to the dots that should be printed in the
second column of the graphics pattern.
Sum of the values corresponding to the dots that should be printed in the last
column of the graphics pattern.
A-90
ESC Z
Quadruple density dot graphics printing (240 virtual dpi).
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
Range
ESC Z n1 n2 p1 p2... px
1B 5A n1 n2 p1 p2... px
27 90 n1 n2 p 1 p2 ... px
0 < n1 < 255
0 < n2 < 31
0 < p < 255
Terminator code. This command prints dot graphics at 240 horizontal dot per inch by
60 vertical dpi. The parameter values should be calculated as follows:
n1
n2
p1
p2
Remainder of the number of column divided by 256.
Integer result of the previous division.
Sum of the values corresponding to the dots that should be printed in the first
column of the graphics pattern.
Sum of the values corresponding to the dots that should be printed in the second
column of the graphics pattern.
A-91
Data Input Control
CAN
Cancels line. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
CAN
18
24
This code clears all printable characters and bit-image graphics on the current line. This
code moves the print position to the left-margin position.
CAN
Cancels data. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
ASCII Code
CAN
Hexadecimal Value 18
Decimal Value
24
This code clears all data stored in the preceding print buffer but does not change the
current print position.
ESC CAN
Cancels data. (IBM Proprinter XL24/XL24E, 2391+)
ASCII Code
ESC CAN
Hexadecimal Value 1B 18
Decimal Value
27 24
See description of CAN command above.
A-92
DC1
Selects printer. (IBM Proprinter XL24/XL24E, 2391+)
ASCII Code
DC1
Hexadecimal Value 11
Decimal Value
17
This command causes the printer to be enabled after it has been disabled by the ESC
Q command.
In IBM 4722 and 9068 emulations the command is treated as NULL.
DC1
Selects printer. (EPSON ESC/P2)
ASCII Code
DC1
Hexadecimal Value 11
Decimal Value
17
This command causes the printer to be enabled after it has been disabled by the DC3
command.
ESC DC1
Selects printer. (IBM Proprinter XL24/XL24E, 2391+)
ASCII Code
ESC DC1
Hexadecimal Value 1B 11
Decimal Value
27 17
This command causes the printer to be enabled after it has been disabled by the ESC
Q command.
In IBM 4722 and 9068 emulations the command is treated as NULL.
A-93
DC3
Deselects printer. (EPSON ESC/P2)
ASCII Code
DC3
Hexadecimal Value 13
Decimal Value
19
This code deselects the printer. The printer remains deselected until it receives a DC1
command or power is turned off then on again. The printer ignores the ESC @
command (initialize printer) when it is deselected.
DC3
Deselects printer. (IBM Proprinter XL24/24E)
ASCII Code
DC3
Hexadecimal Value 13
Decimal Value
19
This code is ignored on the parallel interface. On the serial interface the printer sends
this control code to indicate that its buffers are full.
In 4722 and 9068 emulations the command is treated as NULL.
ESC DC3
Deselects printer. (IBM Proprinter XL24/24E)
ASCII Code
ESC DC3
Hexadecimal Value 1B 13
Decimal Value
27 19
See the description of the DC3 command above.
A-94
DEL
Deletes the last character. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
DEL
7F
127
This command causes the printer to delete the last printable character sent to the
printer. Printer control codes are not affected. The printer ignores this command if it
follows a command that moves the horizontal print position (ESC $, ESC \ or HT).
ESC #
Cancels MSB control. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC #
1B 23
27 35
This command cancels any controls on the MSB (bit number 7) set by ESC = or ESC >
commands; printer then accepts all MSB data as is.
ESC =
Sets MSB to 0. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC =
1B 3D
27 61
This command sets the Most Significant bit (bit number 7) of all incoming data to 0.
All data is affected including graphics data.
A-95
ESC >
Sets MSB to 1. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC >
1B 3E
27 62
This command sets the Most Significant bit (bit number 7) of all incoming data to 1.
All data is affected including graphics data.
ESC Q
Deselects Printer. (IBM Proprinter XL24/XL24E, 2391+, 4722, 9068)
ASCII Code
ESC Q n
Hexadecimal Value 1B 51 n
Decimal Value
27 81 n
This sequence tells the printer not to accept data from the host. The host must reset
the printer or select the printer by using DC1 (Select Printer) to accept data. To
deselect the printer, use ESC Q 35.
ESC j
Stops printing. (IBM Proprinter XL24/XL24E, 2391+, 9068)
ASCII Code
Hexadecimal Value
Decimal Value
ESC j n
1B 6A n
27 106 n
This command stops the printer. The printer goes offline and BUSY signal is sent to
the computer. To place the printer online, press the ON LINE key.
A-96
ESC [ c
Send a device-dependent message to an ASCII printer. (IBM 4722, 9068)
ASCII Code
Hexadecimal Value
Decimal Value
ESC [ c n c m
1B 5B 63 n c m
27 91 99 n c m
The message command sends a device-dependent message to an ASCII printer, where:
n
defines the number of message bytes.
c
First byte of the message in a device-dependent format. It defines the printer
component type:
2 = PRINT
3 = REMS
Second byte of the message in a device-dependent format. It defines the type
of message that is contained in the rest of message bytes:
23 = Write to indicators
52 = Media positioning
79 = Set print speed
m
If the header information is not in the form described, or the message length is less
than two, the printer discards the message command.
Write to Indicators:
Message
Behavior
Write indicators
Lights/unlights the STATION 1 and STATION 2 leds.
A-97
Media positioning:
Message
Behavior
Media positioning
Positions the registered document to a specified position
referring to a physical position on the media.
Set print speed:
Message
Behavior
Set print speed
1.
2.
3.
4.
Fast draft mode
Super fast draft mode
Draft print mode
Fast draft print mode
A-98
Miscellaneous
BEL
Buzzer. (IBM Proprinter XL24/XL24E, 2391+, 9068, EPSON ESC/P2)
ASCII Code
BEL
Hexadecimal Value 07
Decimal Value
7
This code sounds the printer’s buzzer for 0,25 seconds.
ESC BEL
Buzzer. (IBM Proprinter XL24/XL24E, 2391+, EPSON ESC/P2)
ASCII Code
ESC BEL
Hexadecimal Value 1B 07
Decimal Value
27 7
This code sounds the printer’s buzzer.
BS
Print and space back one position.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
BS
08
8
This code causes the printing to be continued from one column to the left of the
current carriage position. The printer ignores this command if it would move the print
position to the left of the left margin.
A-99
ESC BS
Print and space back one position.
(IBM Proprinter XL24/XL24E, 2391+, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC BS
1B 08
27 8
This code causes the printing to be continued from one column to the left of the
current carriage position. The printer ignores this command if it would move the print
position to the left of the left margin.
ESC @
Initializes the printer. (EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC @
1B 40
27 64
This sequence causes the printer to be initialized. This command, inserted in the input
buffer, will be executed during data processing, so that data preceding this command
will be printed according to the previous setting. It causes the printer:
•
•
•
•
•
•
to go back to the current printer setup settings
to cancel any print attributes selected
to initialize the printer carriage
to reset the column counter
to set the horizontal tabulations every 8 columns
to clear all vertical tabulations
A-100
Only the selection of Draft/Quality printing, DDL and the selected character generator
are maintained.
ESC [ K
Sets initial conditions. (IBM 2391+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC [ K n1 n2 init id
1B 5B 4B n1n2 init id
27 91 75 n1n2 init id
This command causes the printer to reset to its initial status:
n1 and n2
init
The n1 and n2 parameters specify the number of bytes in the escape sequence
normally, n1 = 2 and n2 = always 0.
The init parameter specifies to which condition the printer should initialize,
normally init = 0,1,4,5,254,255:
0
Initializes printer to user-default settings. The download font remains
unchanged. If parameters are specified, they will overwrite the default
settings. If the emulation mode is changed, the download font will be
initialized. This command will only copy data from the selected macro, add
parameter changes, if any, and store in working RAM; the data stored in
the macro’s non-volatile RAM will not be affected.
1
Initializes printer to user-default settings. The download font is initialized. If
parameters are specified, they will overwrite the default settings. This
command will only copy data from the selected macro, add parameter changes,
if any, and store in working RAM; the data stored in the macro’s non-volatile
RAM will not be affected.
A-101
4
id
Initializes printer to factory settings. The download font remains unchanged. If
parameters are specified, they will overwrite the default settings. If the
emulation mode is changed, the download font will be initialized. This
command will only copy the default settings from ROM, add parameter
changes, if any, and store in working RAM; the data stored in the macro’s nonvolatile RAM will not be affected.
5
Initializes printer to factory settings. The download font is initialized. If
parameters are specified, they will overwrite the default settings. This
command will only copy the default settings from ROM, add parameter
changes, if any, and store in working RAM; the data stored in the macro’s nonvolatile RAM will not be affected.
254 Initializes printer to user-default settings. The download font is initialized. If
parameters are specified, they will overwrite the default settings. This
command will change data stored in the selected macro. It will copy data from
the selected macro, add parameter changes, if any, and store in working RAM
and in the selected macro. It will also change the default macro to the value of
parm 3.
255 Initializes printer to default settings. The download font is initialized. If
parameters are specified, they overwrite the default settings. This command
will change data stored in the macro’s non-volatile RAM. It will copy default
settings from ROM, add parameter changes, if any, and store in working RAM
and all macros. It will also set the default macro to disable.
The id parameter specifies the printer for which the following parameter bytes
are intended. If the ID does not address your printer, the mode bytes that follow
are ignored. The ID values are Hex = B6, Dec = 182.
A-102
parm1
Specifies the following functions:
Bit
Not set
7 Discard byte
Process this byte
6 Reserved
5 Alarm
Alarm enabled
4 Automatic CR
No CR on vertical movement
3 Automatic LF
No LF after CR
2 Page length
11 inches
1 Slashed zero
0 Character set
parm2
Zero without slash
CS1
Specifies the following functions:
Bit
Not set
7 Discard byte
Process this byte
6 Pass over from
CP437
CP437-CP850
5 Reserved
4 Reserved
3 Reserved
2 Reserved
1 Line length
0 Reserved
13.6 inch
Set
Ignore this byte
Alarm disabled
CR on vertical movement
LF after CR
12 inches
Zero with slash
CS2
Set
Ignore this byte
CP850
8 inch
A-103
ESC [ K
Sets initial conditions. (IBM 9068)
ASCII Code
Hexadecimal Value
Decimal Value
ESC [ K n1 n2
1B 5B 4B n1n2
27 91 75 n1n2
This command causes the printer to reset to its initial status, where:
n1
normally set to 1
n2
normally set to 4.
This command resets all setting to the power-on default state, except download
characters, patches, code page, font and page presentation media are set by this
command. In addition a document ejection occurs if the document has been printed on
(not at top of form).
The resulting settings are:
Character pitch
Line pitch
PPM
Print style
Buffer
Vertical tabs
Horizontal tabs
Print mode
Print speed
Margins
Passbook defaults
10 or 12 cpi
6 lpi
cut form, 6.1 initial offset, 1.61 mm skew
standard text
empty
all cleared
every eight starting at 9
bi-directional
normal (draft)
pos 1 and 82
200 mm wide, vertical fold
A-104
ESC U
Sets printing direction.
(IBM Proprinter XL24/XL24E, 2391+, 4722, 9068, EPSON ESC/P2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC U n
1B 55 n
27 85 n
Selects bi-directional or unidirectional printing, according to the parameters below:
n
Direction
0
1
bi-directional printing
unidirectional (left to right) printing
Unidirectional printing provides better alignment of vertical lines while bi-directional
printing is faster.
A-105
Appendix B - Compuprint Native Commands
Summary in Alphabetical Order ............................ B-2
COMPUPRINT Mode Commands Description...... B-3
Format Control.....................................................................B-3
Native Character Sets ........................................................B-5
Bar Codes ...............................................................................B-7
Bar Code Description .......................................................B-10
Miscellaneous......................................................................B-28
B-1
COMPUPRINT Mode Commands
This printer according to the Native COMPUPRINT Mode supports the following
printer commands.
Summary in Alphabetical Order
DC4 DC4 ESC !
Bar Code Selection
B-7
DC4 DC4 ESC (GS
Prints bar code symbols (Compuprint)
B-22
DC4 DC4 ESC @
Re-initializes the printer. (Compuprint)
B-28
DC4 DC4 ESC 3
Reads bar code symbols (Compuprint)
B-22
DC4 DC4 ESC 3 1
Sets vertical spacing 12 lines/30 mm. (Compuprint)
B-3
DC4 DC4 ESC 3 3
Sets vertical spacing to 3 lines/30 mm. (Compuprint)
B-3
DC4 DC4 ESC 3 4
Sets vertical spacing 4 lines/30 mm. (Compuprint)
B-3
DC4 DC4 ESC 3 6
Sets vertical spacing 6 lines/30 mm. (Compuprint)
B-4
DC4 DC4 ESC 3 8
Sets vertical spacing 8 lines/30 mm. (Compuprint)
B-4
DC4 DC4 ESC A
Sets the horizontal spacing to 15, 17, 20, 24 CPI. (Compuprint)
DC4 DC4 ESC DC4
Printer functions.
DC4 DC4 ESC g
Selects LQ fonts (Compuprint).
DC4 DC4 ESC J
Sets amplification factor. (Compuprint)
B-28
DC4 DC4 ESC R
String rotation. (Compuprint)
B-29
DC4 DC4 ESC r
Digit rotation. (Compuprint)
B-29
DC4 DC4 ESC S
Selects character set ISO Character Sets or Code Pages. (Compuprint)
DC4 DC4 ESC u
Selects the program setups. (Compuprint)
B-31
DC4 DC4 ESC VT
Search for a blank line (without any marker) - (Compuprint)
B-32
DC4 DC4 ESC X
Reads the id of the cut sheets. (Compuprint)
B-31
DC4 DC4 ESC Y
Selects emulation. (Compuprint)
B-30
DC4 DC4 ESC Z
Makes AGA in column. (Compuprint)
B-30
B-4
B-32
B-2
B-5
B-6
COMPUPRINT Mode Commands Description
Format Control
DC4 DC4 ESC 3 1
Sets vertical spacing 12 lines/30 mm. (Compuprint)
ASCII Code
Hexadecimal Value
Decimal Value
DC4 DC4 ESC 3 1
14 14 1B 33 31
20 20 27 51 49
This command sets vertical spacing to 12 lines per 30 mm.
DC4 DC4 ESC 3 3
Sets vertical spacing to 3 lines/30 mm. (Compuprint)
ASCII Code
Hexadecimal Value
Decimal Value
DC4 DC4 ESC 3 3
14 14 1B 33 33
20 20 27 51 51
This command sets vertical spacing to 3 lines per 30 mm.
DC4 DC4 ESC 3 4
Sets vertical spacing 4 lines/30 mm. (Compuprint)
ASCII Code
Hexadecimal Value
Decimal Value
DC4 DC4 ESC 3 4
14 14 1B 33 34
20 20 27 51 52
This command sets vertical spacing to 4 lines per 30 mm.
B-3
DC4 DC4 ESC 3 6
Sets vertical spacing 6 lines/30 mm. (Compuprint)
ASCII Code
DC4 DC4 ESC 3 6
Hexadecimal Value 14 14 1B 33 36
Decimal Value
20 20 27 51 54
This command sets vertical spacing to 6 lines per 30 mm.
DC4 DC4 ESC 3 8
Sets vertical spacing 8 lines/30 mm. (Compuprint)
ASCII Code
DC4 DC4 ESC 3 8
Hexadecimal Value 14 14 1B 33 38
Decimal Value
20 20 27 51 56
This command sets vertical spacing to 8 lines per 30 mm.
DC4 DC4 ESC A
Sets the horizontal spacing to 15, 17, 20, 24 CPI. (Compuprint)
ASCII Code
Hexadecimal Value
Decimal Value
DC4 DC4 ESC A n
14 14 1B 41 n
20 20 27 65 n
This is terminator code and therefore causes the current contents of the print buffer to
be printed out. Then, the subsequent characters will be printed at the horizontal
spacing specified by the n parameter.
B-4
n
Spacing
4
5
6
7
15 cpi
17 cpi
20 cpi
24 cpi
Native Character Sets
DC4 DC4 ESC g
Selects LQ fonts (Compuprint).
ASCII Code
Hexadecimal Value
Decimal Value
n
1
2
3
4
5
6
7
711
182
DC4 DC4 ESC g n
14 14 1B 67 n
20 20 27 103 n
Setting
Gothic
Courier
Prestige
Script
OCR-B
OCR-A
Presentor
Boldface
DLL
If the down-line loading is selected, the command is stored and will be activated as
soon as the down-line loading will be canceled.
B-5
DC4 DC4 ESC S
Selects character set ISO Character Sets or Code Pages. (Compuprint)
ASCII Code
Hexadecimal Value
Decimal Value
DC4 DC4 ESC S n
14 14 1B 53 n
20 20 27 83 n
n
Character Set
n
1
ISO 8859/1 Latin 1
135 CP864 Arabic
Character Set
2
ISO 8859/2 Latin 2
136 TASS Cyrillic
3
ISO 8859/3 Latin 3
137 CP852 Eastern Europe
4
ISO 8859/4 Latin 4
138 CP876 OCR-A
5
ISO 8859/5 Latin/Cyrillic
139 CP877 OCR-B
6
ISO 8859/6 Latin/Arabic
140 CP855 Cyrillic
7
ISO 8859/7 Latin/Greek
141 CP866 Russian
8
ISO 8859/8 Latin/Hebrew
142 GOST Cyrillic
9
ISO 8859/9 Latin 5
145 CP437G Greek
15
ISO 8859/15 Latin 9
146 CP853 Turkish
128 CP437 USA
147 CP857 Turkish
129 CP850 Multilingual
148 CP867 Turkish
130 CP860 Portugal
149 CP858 Euro PC Multil.
131 CP863 Canada/France
199 96 Greek
132 CP865 Denmark/Norway
133 CP851 Greek
134 CP862 Hebrew
B-6
Bar Codes
DC4 DC4 ESC !
Bar Code Selection
ASCII Code
Hexadecimal Value
Decimal Value
DC4 DC4 ESC ! h t f F r o q b s B S i EM
14 14 1B 21 h t f F r o q b s B S i EM
20 20 27 33 h t f F r o q b s B S i EM
h = Bar Code Height at n/6”, 1 < h < 30
t = Standard Bar Code to use
t
Name
1
2
3
4
5
6
7, 8, 9
10
11
12
13
14
15
16
8-digits European Article Numbering
13-digits European Article Numbering
Universal Product Code Type A
Universal Product Code Type E
UPC/EAN 2 Digit Supplement
UPC/EAN 5 Digit Supplement
8-digits European Article Numbering
General Purpose Bar Code
Code 2 of 5 3-BAR (Data Logic)
Binary Coded Decimal
MSI-Plessey
AIM-USD-8 / Code-11
AIM-USD-7 / Code-93
Code 2 of 5 Bidirectional
B-7
EAN-8
EAN-13
UPC-A
UPC-E
UPC-EAN 2
UPC-EAN 5
EAN-8
Code GP
C25-3BAR
CODE BCD
MSI
Code 11
Code 93
C25-BID
t
Name
17
Code 2 of 5 Interleaved
C25-INT
18
Code 2 of 5 Industrial
C25-IND
19
20
21
22
23
24
Code 2 of 5 Matrix
Code 3 of 9
8-digits European Article Numbering
Codabar (all types)
Code 128
USPS-PostNet
C25-MTX
Code-39
EAN-8
CODABAR
CODE-128
POSTNET
f = Readable character printing
f = 1 printing enabled
f = 0 printing disabled
F = Font selection for the printable characters
F
Selection
0
1
2
3
4
Selected font by r value
Default font for text
Special font for OCR-A o OCR-B bar codes according to the t value
Special font for OCR-A bar codes
Special font for OCR-B bar codes
B-8
r = Bar code rotation
r
Selection
0
1
2
3
4
No rotation
Rotation at 0°
Rotation at 90°
Rotation at 180°
Rotation at 270°
o = Check digit inserted as last character of the received string according to the bar
code
q = Horizontal graphic density of the bar code
q
Selection
0
1
1/60”
1/180”
b = Narrow bar width in n/180”, 3 < b < 18
s = Narrow space width in n/180”, 3 < s < 18
B = Wide bar width in n/180”, 6 < B < 72
S = Wide space width in n/180”, 6 < S < 72
i = Spacing between characters in n/180”, 3 < i < 72
EM = Check sequence terminator
B-9
Bar Code Description
EAN-8
DC4 DC4 ESC! n 1 p EM
The EAN-8 bar code data field must only contain numeric data, and must be eight
bytes long, check digit included. The EAN-8 character repertoire provides 0 to 9
ASCII numeric figures. n indicates the bar code height in units of 1/6 inch and
must be in the range 1 to 12. p must be NUL (hex. 00) if no Human Readable
Characters are to be printed, and 1 (hex. 01) if they are to be printed. The range of
values for n and p parameters can be increased of 32 dec.
EAN-13
DC4 DC4 ESC! n 2 p EM
The EAN-13 bar code data field must only contain numeric data, and must be 13
bytes long, check digit included. The EAN-13 character repertoire provides 0 to 9
ASCII numeric figures. n indicates the bar code height in units of 1/6 inch and
must be in the range 1 to 12. If you want to print the Human Readable
Characters, p must have the value 1 (hex. 01); otherwise this value must be NUL
(hex. 00). The range of values for n and p parameters can be increased of 32 dec.
UPC-A
DC4 DC4 ESC! n 3 p EM
The UPC-A bar code data field allows 10 numeric characters plus one system
number digit and one check digit, at the leftmost and rightmost positions
respectively. The UPC-A character repertoire provides 0 to 9 ASCII numeric
figures. n indicates the bar code height in units of 1/6 inch and must be in the
range 1 to 12. p must be NUL (hex. 00) if no Human Readable Characters are to
be printed, and 1 (hex. 01) if they are to be printed. The range of values for n and p
parameters can be increased of 32 dec.
B-10
UPC-E
DC4 DC4 ESC! n 4 p EM
UPC-E bar code data fields contain numeric data only: question marks will be
printed in place of HRC string otherwise, if possible.
If 12-digit strings will be received within a DC4 DC4 ESC (... EM control
sequence and o check-digit option field is missing or takes values 0 or 2, the
symbol is compressed as received to an 8-digit string and encoded, even
though this may affect its readability; if o check digit option field takes values
th
1 or 3, the 12 digit is matched against the internally generated check digit.
The question marks will be printed in place of HRC string when mismatch is
found, if possible.
If 11-digit strings will be received and o check digit field is missing or takes
values 0 or 2, question marks will be printed in place of HRC string, when
th
possible; if o field takes value 1, the 12 digit is inserted by the printer as
result of the internally available algorithm applied to the received string.
If 10-digit strings will be received and o check-digit is missing or takes NULL
value, question marks will be printed in place of HRC string, if possible; if o
field takes value 1, a default 0 System-Digit will be automatically inserted by
th
the printer and the 12 digit will also be inserted as result of he internally
available algorithm applied to the final string.
If the final UPC-A string cannot be compressed to an 8-digits string or the
received System-Digit is different than 0 or 1, question marks will be printed
in place of HRC string, if possible.
B-11
LEFT and RIGHT delimiters, the System-Digit and the Check-Digit will be
printed as descending bars to make a field to host a 6-digits HRC string and the
System-Digit HRC to the left of LEFT delimiter (at about the middle of the
symbol) when f field is missing or set to 1; in this case, the Check-Digit will show
in HRC to the right of the RIGHT delimiter (at about the middle of the symbol),
when o field takes values 2 or 3: it will never show on HRC string otherwise.
UPC-EAN 2
DC4 DC4 ESC! n 5 p EM
ADD ON-2 bar code data fields contain numeric data only: question marks will
be printed in place of HRC string otherwise, if possible.
If 3-digit strings will be received within a DC4 DC4 ESC (... EM control sequence
and o check-digit option field is missing or takes NULL value, the symbol will
rd
encode the first 2 digits and the 3 received digit will be used as check digit, even
rd
though this may affect its readability; if o field takes 1 value, the 3 digit is
matched versus the internally generated check-digit an question marks will
printed in place of HRC string when mismatching, if possible.
If 2-digit strings will be received and o check digit field is missing or takes NULL
value, question marks will be printed in place of HRC string, when possible; if o
field takes value 1, the check digit will be computed applying the internally
available algorithm to the received string in order to properly encode the symbol.
If f field is missing or takes value 1, the 2-digits HRC string will be printed above
the Bar/Spaces symbol and its height will be part of the overall symbol’s height;
the check-digit will never show on HRC string. If f field takes value 0, the
symbol’s encoding will print at full height.
B-12
UPC-EAN 5
DC4 DC4 ESC ! n 6 p EM
ADD ON-5 bar code data fields contain numeric data only: question marks
will be printed in place of HRC string otherwise, if possible.
If 6-digit strings will be received within a DC4 DC4 ESC (... EM control
sequence and o check-digit option field is missing or takes NULL value, the
th
symbol will encode the first 5 digits and the 6 received digit will be used as
check digit, even though this may affect its readability; if o check digit option
th
takes 1 value, the 6 digit is matched versus the internally generated checkdigit an question marks will printed in place of HRC string when
mismatching, if possible.
If 5-digit strings will be received and o check digit field is missing or takes
NULL value, question marks will be printed in place of HRC string, if
possible; if o field takes value 1, the check digit will be computed applying
the internally available algorithm to the received string in order to properly
encode the symbol.
If f field is missing or takes value 1, the 5-digits HRC string will be printed
above the Bar/Spaces symbol and its height will be part of the overall
symbol’s height; the check-digit will never show on HRC string. If f field
takes value 0, the symbol’s encoding will print at full height.
B-13
CODE GP
DC4 DC4 ESC ! n 10 p EM
CODE-GP bar code allows bar codes to be constructed from the two basic
elements (BAR and SPACE) by sending 0,1 digits: digit 0 produces a BAR
and digit 1 produces a SPACE.
These two elements may be combined in any sequence, thus giving the
possibility of producing bars and spaces of any width that is a multiple of the
basic element width. Default bar/spaces width is 1/60” (q = 0,1) but these
values may be set by the user according to its specific needs. Data fields do
not have a defined format length and contain 0,1 data only; question marks
will be printed in place of HRC string otherwise, if possible.
No Human Readable Interpretation is possible, hence is the user task to
provide a TEXT STRING below or above the bar/space symbol: f field is
meaningless. No internal check digit algorithm is available: o field is
meaningless.
C25-3BAR
DC4 DC4 ESC ! n 11 p EM
C25-3BAR bar code data fields do not have a defined format length and
contain numeric data only: question marks will be printed in place of HRC
string otherwise, if possible. If o check digit option field takes 1 value, an
internally generated check digit complying with general 2/5 family algorithm
will be added to the encoded string: however it will not show on the required
HRC string.
B-14
Code BCD
DC4 DC4 ESC ! n 12 p EM
CODE-BCD bar code data fields do not have a defined format length and
contain numeric data only: question marks will be printed in place of HRC
string otherwise, if possible. No internal check digit algorithm is available for
this standard: o field is meaningless.
MSI Plessey
DC4 DC4 ESC ! n 13 p EM
MSI bar code data fields do not have a defined format length and must
contain numeric data only: question marks will be printed in place of HRC
string otherwise, if possible. To releaf the host from calculating MSI check
digits, internal algorithms are provided that are accessible by the host
application program giving the proper supported value to o check-digit option
field, according to the following options:
0 Print the bar code symbol with no
printer-generated check digits
1 Print the bar code symbol with IBM 5 Print the bar code symbol with
both check digits generated by the
Modulus-10 check digit -generated
printer and put at the end of the
by the printer and put at the end of
nd
data. The 2 check digit is IBM
the numeric string: this will be the
nd
st
st
Modulus-10, the 1 check digit is
2 check digit, the 1 check digit is
IBM Modulus-10 also.
the complement to 11 of NCR
Modulus-11 algorithm applied to
the received string: if the modulus
is 0 or 1 check digit is 0.
B-15
2 Print the bar code symbol with both 6 Print the bar code symbol with both
check digits generated by the printer
check digits generated by the printer
and put at the end of the data. The
and put at the end of the data. The
nd
nd
2 check digit is IBM Modulus-10,
2 check digit is IBM Modulus-10;
st
st
the 1 check digit is IBM Modulusthe 1 check digit is the complement
10 also.
to 11 of IBM Modulus-11 algorithm
applied to the received string: if the
modulus is 0 or 1 check digit is 0.
3 Print the bar code symbol with both 7 Print the bar code symbol with both
check digits generated by the printer
check digits generated by the printer
and put at the end of the data. The
and put at the end of the data. The
nd
nd
2 check digit is IBM Modulus-10,
2 check digit is IBM Modulus-10,
st
st
the 1 check digit is NCR Modulusthe 1 check digit is the complement
11: if modulus is 10, it is an error
to 11 of NCR Modulus-11 algorithm
and question marks will be printed
applied to the received string: if the
in place of HRC string, if possible.
modulus is 0 or 1. It is an error and
question marks will be printed in
place of HRC string, if possible.
4 Print the bar code symbol with both 8 Print the bar code symbol with both
check digits generated by the printer
check digits generated by the printer
and put at the end of the data. The
and put at the end of the data. The
nd
nd
2 check digit is IBM Modulus-10,
2 check digit is IBM Modulus-10,
st
st
the 1 check digit is IBM Modulusthe 1 check digit is the complement
11: if modulus is 10, it is an error
to 11 of IBM Modulus-11 algorithm
and question marks will be printed
applied to the received string: if the
in place of HRC string, if possible.
modulus is 0 or 1. it is an error and
question marks will be printed in
place of HRC string, if possible.
The printer-generated second check digit does not show on required HRC string.
B-16
Code 11
DC4 DC4 ESC ! n 14 p EM
CODE-11 bar code fields do not have a defined format length and contain data
belonging to the following character set: 0 1 2 3 4 5 6 7 8 9 Question marks will be printed in place of HRC string otherwise, if possible.
This bar-code type defines a variable WIDE/NARROW ratio. This bar code is
printed at 1/180” horizontal and vertical graphical printing resolution, to ensure
high readability rate. Each digit encodation is separated from the next by a
1/90”-1/60 “, wide default InterCharacter Gap.
CODE-11 has unique START/STOP character; the printer generates the couple
related to each symbol. It is visually interpreted by an OPEN TRIANGLE and
will always appear on the HRC string, because its size is usually varied to
signify the number of check digits being used in the particular symbol:
- SMALL open triangle means ONE check-digit
- LARGE open triangle means TWO check-digit
Due to this, f field is meaningless and always defaults to HRC string print.
B-17
Code 93
DC4 DC4 ESC ! n 15 p EM
CODE-93 bar code fields do not have a defined format length and contain
data belonging to the standard ASCII character set including control codes.
Since GS and EM control codes used within COMPUPRINT DC4 DC4 ESC
(... EM “Print bar-code” control sequence are part of the supported character
set, the host application must SET THE HIGHER-ORDER BIT of the above
control codes, to allow the printer distinguish between encodable data and
string terminators.
The complete ASCII standard character set is encoded by means of 47
combinations of 9 bar/space narrow elements arranged into 3 variable width
bars with their adjacent variable width spaces: each of the bars in the
supported combinations can be 1, 2 or 3 modules wide. The START/STOP
character has a 4-module wide bar. CODE-93 directly implements the basic
subset shown below:
0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z.SPACES $ / + %
($) (%) (/) (+) (as special control characters)
# (as unique START/STOP character)
The other STANDARD-ASCII codes not presented above will be represented
by means of a combination of one control character in the above set followed
by a symbol in the alphabetical set. The HRC string is printed BELOW the
symbol when f field is set to 1, without check digits: ASCII non-printable
characters are represented in the “control code” format (e.g. CR is ^M, where
"control” is represented as DARK-SQUARE symbol).
B-18
2 of 5
Bidirectional
2 of 5
Interleaved
2 of 5
Industrial
DC4 DC4 ESC! n 16 p EM
BID-25 bar code data fields do not have a defined format length and contain
numeric data only: question marks will be printed in place of HRC string
otherwise, if possible. If o check digit option field takes 1 value an internally
generated check digit will be added to the encoded string, that however will
not show on the required HRC string.
DC4 DC4 ESC! n 17 p EM
The 2/5-INTERLEAVED bar code does not have a defined format length.
However, the total sum of the characters must be even. n indicates the bar
code height and must be in the range 1 to 12. p must be NUL (hex. 00) if no
Human Readable Characters are to be printed, and 1 (hex. 01) if they are to
be printed.
DC4 DC4 ESC ! n 18 p EM
The 2/5 INDUSTRIAL bar code. Data format length is variable and the
supported character set only provides ASCII numeric figures 0 to 9. N
indicates the bar code height in units of 1/6 inch and must be in the range 1
to 12. The parameter p must be NUL (hex. 00) if no Human Readable
Characters are to be printed, and 1 (hex. 01) if they are to be printed.
B-19
2 of 5 Matrix
DC4 DC4 ESC ! n 19 p EM
The 2/5 MATRIX bar code. Data format length is variable and the supported
character set only provides ASCII numeric figures 0 to 9. N indicates the bar
code height in units of 1/6 inch and must be in the range 1 to 12. The
parameter p must be NUL (hex. 00) if no Human Readable Characters are to
be printed, and 1 (hex. 01) if they are to be printed.
Code 39
DC4 DC4 ESC ! n 20 p EM
The CODE 39 bar code. Data format length is variable and must always
start and end with an asterisk. It can contain the alphanumeric character
listed below:
0 1 2 3 4 5 6 7 8 9
ABCDEFGHIJKLMNOPQRSTUVWXYZ
+ % * ( as start / stop character)
-. SPACE $ /
The parameter indicates the bar code height in units of 1/6 inch and must be
in the range 1 to 12. The p parameter must be NUL (hex. 00) if no Human
Readable Characters are to be printed, and 1 (hex. 01) if they are to be
printed.
B-20
CODABAR
DC4 DC4 ESC! n 22 p EM
The Codabar bar code data fields do not have a defined format length and
contain data belonging to the character set listed hereafter:
0 1 2 3 4 5 6 7 8 9 - $: /. +
A B C D E N T * a b c d e n t (only as START/STOP characters)
The printer allows any combination of START/STOP characters. If the first
and last characters of the received string do not belong to the START/STOP
characters subset, question marks will be printed in place of HRC string, if
possible.
CODE 128
DC4 DC4 ESC ! n 23 p EM
The CODE-128 bar code data fields do not have a defined format length and
contain data belonging to the standard ASCII character set, including control
codes.
Since GS and EM control codes used within the Compuprint DC4 DC4 ESC
(...EM ”Print Bar Code” control sequence are part of the supported character
set, the host application must SET THE HIGHER-ORDER BIT of the above
control codes to allow the printer distinguish between encodable data and
string terminators.
POSTNET
DC4 DC4 ESC! n 24 p EM
The POSTNET bar code data fields contain only numeric data and do not
have a defined format length. POSTNET bar codes have no HRC string
printed and the LOW/TALL bars that encode the symbol comply with the
U.S.P.S standard; whatever will be p field value.
B-21
DC4 DC4 ESC (GS
Prints bar code symbols (Compuprint)
ASCII Code
Hexadecimal Value
Decimal Value
Range
DC4 DC4 ESC (GS n1 data GS n2 data ... EM
14 14 1B 28 1D n1 data ... 19
20 20 27 40 29 n1 data... 25
1 < n < 12
0<p<1
This sequence causes the bar code symbol to be printed according to the previous
selection. If you want to print more than one bar code symbol of the same type and
height, GS n defines the distance from the beginning of the line or between two bar
code symbols in multiples of 1/72 inch. At the end of the line, EM must close this
command.
DC4 DC4 ESC 3
Reads bar code symbols (Compuprint)
ASCII Code
Hexadecimal Value
Decimal Value
Range
options
DC4 DC4 ESC ? n1 n2 options x y w t1 … tn NUL o1 … on NUL
14 14 1B 3F n1 n2 options x y w t1 … tn 00 o1 … on 00
20 20 27 63 n1 n2 options x y w t1 … tn 0 o1 … on 0
0 < n1 < 23
n2 = 0
bit 0x01 = 1 the barcode reading is performed vertically
0 the barcode reading is performed horizontally
bit 0x04 = 1 reading is performed in inverse direction, i.e. the horizontal
reading is performed from the right to the left and the vertical
reading is performed from the lower to the upper position
0 reading is performed in normal direction
B-22
bit 0x40 = 1 debug: the result of the decoding of the barcode will be sent
together with the vector of the values read by the reading
sensor
bit 0x80 = 1 must always be 1
x
y
w
t1 … tn
o1 … on
Distance from the first print position in mm of the highest leftmost point to
be scanned (in case of cut sheets it is at 3 mm from paper margin)
Distance of the upper paper/page margin of the highest leftmost point to be
scanned
Dimension of the scanning area including the clear area in mm
List of the recognized bar code types
0x11
128
0x01
3 of 9
0x0c
2 of 5 interleaved
0x19
2 of 5 IATA
If no bar code type is specified, they are all recognized.
Listing of the options. Each option is followed by the corresponding
parameters. The options are:
0x01 Check digit
0
No check, the barcode string is returned as it is decoded
1
Check digit is checked: when the barcode is decoded, the printer
checks that the check digit, if present, is correct. If it is not, the
barcode scanning is not valid.
B-23
0x02
Ratio of the dimensions between the defined large and the small bar,
one parameter:
B
Ratio multiplied by 10 (dimension of the large bar =
((b/10) * (B/10)) mm), where 20 < B < 40
0x03 Dimension of the small bar, one parameter:
b
Dimension of the small bar in 1/100 mm, where 20 < b < 255
0x04 Dimension of the white space between a symbol and the following,
one parameter
i
Dimension of the white space in 1/100 mm, where 20 < i < 255
0x05 Dimension of the maximum retries in case the bar code was not read
correctly, one parameter: 0 < rn < 10
0x06 Offset from initial position, to be used in case of retry. One parameter:
rof 0, 2 < rof < 20. The offset is set in 1/10 mm. When using the
horizontal scanning, the offset will be used starting from the y
position, when using the vertical scanning, the offset will be
used starting from the x position. For example, for the
horizontal scanning:
• The first retry is performed in position (y+1*(0,1*rof)) mm
• The second in position(y-1*(0,1*rof)) mm
• The third in position(y+2*(0,1*rof)) mm
• The fourth in position(y-2*(0,1*rof)) mm, etc.
All parameters, except the options parameter, are optional. If they are not specified,
they are set to their default values, which are the following:
x
Y
W
t1…tn
B
10 mm
10 mm
100 mm
Empty list, all types are accepted
25
B-24
B
I
Rn
rof
0, not defined
0, not defined
0
2 / 10 mm
Due to the physical position of the sensor, the scanning of the bars can be performed
with the following horizontal position limitations:
CUT SHEET x
The scanning area must be inside 19 cm from the left paper margin;
the area may extend to 205 cm, but in this case the reading of the
bars depends on the position in which the sheet is inserted.
x
The scanning area must be at least at 2 cm from the first printing
position.
FANFOLD
The background of the scanning area must have a clear color, whereas the bars must
have a dark color (black, dark blue, etc.).
x+w
In case the horizontal scanning is performed normally:
between
x , y and
y
(x + w) , y
x
In case the horizontal scanning is performed in inverse
direction:
between
(x + w) , y
and
x,y
B-25
w
x
In case the vertical scanning is performed normally:
between
x , y and
x , (y + w)
y
y+w
w
In case the vertical scanning is performed in inverse
direction:
between
x , (y + w)
and
x,y
When the command is performed, the serial line sends the following message:
DC4 DC4 ESC ? n
Where n is a string of n bytes containing the decoded barcode.
If invalid parameters are encountered, or the scanning area goes outside the logical
page margins, n will have the value 0. If the reading was not successful, n = and the
string will be composed of 10 "?" characters.
B-26
If the debug flag (0x40) has been set, the described string is sent together with the
vector of the values read by the reading sensor with the following format:
CR LF
n…n CR LF
CR LF
where n…n is the number of readings performed by the sensor, in ASCII
format
st
1…1 CR LF
2…2 CR LF
…
N…N CR LF
CR LF
1 scanning
where 1…1 is the first read value, in ASCII format
where 2…2 is the second read value, in ASCII format
where N…N is the Nth read value, in ASCII format
2 scanning (if rn ≥ 1 )
where 1…1 is the first read value, in ASCII format
where 2…2 is the second read value, in ASCII format
nd
1…1 CR LF
2…2 CR LF
………………………….
N…N CR LF
CR LF
where N…N is the Nth read value, in ASCII format
Other scanning procedures (if necessary; rn > 1 )
………………………….
FF
B-27
Miscellaneous
DC4 DC4 ESC @
Re-initializes the printer. (Compuprint)
ASCII Code
Hexadecimal Value
Decimal Value
DC4 DC4 ESC @
14 14 1B 40
20 20 27 64
This command resets the printer mode and clears the buffer of printable data.
DC4 DC4 ESC J
Sets amplification factor. (Compuprint)
ASCII Code
Hexadecimal Value
Decimal Value
DC4 DC4 ESC J h v
14 14 1B 4A h v
20 20 27 74 h v
This command sets the required amplification factor to be applied to the current font.
h
v
It is the horizontal amplification factor, the value range is 1 to 4. It is applied
to the basic symbols.
It is the vertical amplification factor, the value range is 1 to 255.
0 values for either h and v parameters keep the related current amplification factor
unchanged.
The internally available symbol’s amplification algorithms support the following
character attributes, that may be selected by means of the available control sequences
within the currently active emulation: double width, double-height, emphasized,
double strike, subscript, superscript, italics, proportional, compressed.
Doublewide and double-high attributes must be lower than 2.
B-28
DC4 DC4 ESC R
String rotation. (Compuprint)
ASCII Code
Hexadecimal Value
Decimal Value
DC4 DC4 ESC R n string EM
14 14 1B 52 n string EM
20 20 27 82 n string EM
This command is used to set the string rotation.
n
Selection
0
1
2
3
4
No rotation
Rotation at 0°
Rotation at 90°
Rotation at 180°
Rotation at 270°
DC4 DC4 ESC r
Digit rotation. (Compuprint)
ASCII Code
Hexadecimal Value
Decimal Value
DC4 DC4 ESC r
14 14 1B 72
20 20 27 144
This command is used to set the required character rotation to be applied to the
selected font.
n
0
1
2
3
4
Selection
No rotation
Rotation at 0°
Rotation at 90°
Rotation at 180°
Rotation at 270°
B-29
DC4 DC4 ESC Y
Selects emulation. (Compuprint)
ASCII Code
Hexadecimal Value
Decimal Value
Range
DC4 DC4 ESC Y n
14 14 1B 59 n
20 20 27 89 n
Selects the printer emulation type according to the n parameter value:
n
Emulation
1
2
4
5
EPSON LQ 2550/1050
IBM Proprinter XL 24
IBM Proprinter XL 24AGM
IBM 2391
DC4 DC4 ESC Z
Makes AGA in column. (Compuprint)
ASCII Code
Hexadecimal Value
Decimal Value
DC4 DC4 ESC Z n
14 14 1B 5A n
20 20 27 90 n
The parameter n is the column number at 10 cpi where the AGA (Automatic Gap
Adjustment) is made.
B-30
DC4 DC4 ESC u
Selects the program setups. (Compuprint)
ASCII Code
Hexadecimal Value
Decimal Value
Range
DC4 DC4 ESC u n
14 14 1B 75 n
20 20 27 117 n
0 <n<4
n
Selection
1
2
3
4
Selects program setup 1
Selects program setup 2
Selects program setup 3
Selects program setup 4
DC4 DC4 ESC X
Reads the id of the cut sheets. (Compuprint)
ASCII Code
Hexadecimal Value
Decimal Value
DC4 DC4 ESC X n x y l
14 14 1B 58 n x y l
20 20 27 88 n x y l
This command reads the markers of the cut sheets.
n
x
y
l
Number of markers. (1 < n < 32)
Horizontal position from the center of the first marker in mm from the first prints
position.
Vertical position from the center of the markers in mm from the upper page margin.
Distance between the markers in mm.
B-31
DC4 DC4 ESC VT
Search for a blank line (without any marker) - (Compuprint)
ASCII Code
Hexadecimal Value
Decimal Value
DC4 DC4 ESC VT o w
14 14 1B 0B o w
20 20 27 11 o w
This command searches for a blank line.
o
w
Send a reply on the serial interface
o = 1, send a reply
o = 0, do not send a reply
Marker width in 1/120”
DC4 DC4 ESC DC4
Printer functions.
ASCII Code
Hexadecimal Value
Decimal Value
n = (n1) +256* (n2)
DC4 DC4 ESC DC4 n1 n2 function arguments
14 14 1B 14 n1 n2 function arguments
20 20 27 20 n1 n2 function arguments
the character number that composes the command (function
character included).
function = the function that performs the command.
function
0x05
0x06
0x07
0x08
0x09
Description
Sends Message to Printer Display
Sets Buzzer
Selects Cut Sheet Eject Side
Sets/Resets Security Mode
Sets Passbook Parameters
arguments = the different values of the function.
B-32
Function Description
0x05
DC4 DC4 ESC DC4 n1 n2 0x05 arguments
Sends the message to the printer display.
This function is only available with the printer models with the LCD display.
n1, n2:
the n1 and n2 parameters specify the number of characters that
composes the command. n= 17
function:
0x05
arguments: the message shown in the display is composed by 16 characters.
0x06
DC4 DC4 ESC DC4 n1 n2 0x06 arguments
Sets the buzzer.
The n1 and n2 parameters specify the number of characters that
n1, n2 :
composes the command. 1<n<6.
function:
0x06
arguments: mode:
0 : buzzer on
1 : buzzer off
2 : one shot
3 : blink
4 : multi shots
time on:
Time on in decimal fraction of second < 100 (default = 3)
time off:
Time off in decimal fraction of second < 100 (default = 2)
rep:
In case of multi shots, the number of repetitive shots < 100
(default =3)
B-33
0x07
DC4 DC4 ESC DC4 n1 n2 0x07 arguments
Selects the Cut Sheet Ejection Side.
The n1 and n2 parameters specify the number of characters that
n1, n2 :
composes the command. n = 2
function:
0x07
arguments: side:
0 : cut sheet ejection towards the front
1 : cut sheet ejection towards the rear
0x08
DC4 DC4 ESC DC4 n1 n2 0x08 arguments
Sets/Resets the Security Mode.
The n1 and n2 parameters specify the number of characters that
n1, n2 :
composes the command. n = 2
function:
0x08
arguments: en:
0 : security mode disabled
1 : security mode enabled
0x09
DC4 DC4 ESC DC4 n1 n2 0x09 arguments
Set Passbook Parameters.
The n1 and n2 parameters specify the number of characters that
n1, n2 :
composes the command. n = 2,4
function:
0x09
arguments: type:
0 x 00 : fixed thickness
0 x 01 : passbook with vertical fold
0 x 02 : passbook with horizontal fold
0 x 81 : special type
width: passbook width in mm (0 → auto) - range: 127 to 213
length: passbook length in mm (0 → auto) - range: 99 to 210
B-34
B-35
Appendix C – OLIVETTI Protocol Commands
OLIVETTI Mode Commands ............................. C-2
Summary in Alphabetical Order...........................C-2
OLIVETTI Mode Commands Description ..... C-6
Page Layout .............................................................C-6
Print Pitches ............................................................C-9
Print Attributes .....................................................C-12
Printer Operations ................................................C-20
Graphics .................................................................C-28
Customized Characters ........................................C-38
Printer Control ......................................................C-44
Magnetic Device Control ......................................C-60
Bar Code Print.......................................................C-70
C-1
OLIVETTI Mode Commands
The Olivetti PR2 emulation is designed as a container of SW commands for managing
all new performance, characteristic of the models.
The Olivetti PR 2 command interpreter is based on the PR40+ emulation of which it
maintains, for the common part, all the characteristics. Moreover, in order to maintain
the best possible level of compatibility with PR40+ emulation, the default is
constituted by 9 pin management. Native emulation can be recognized by its own
specific identifier.
Summary in Alphabetical Order
BEL
Bell. (Olivetti PR2, PR40+)
C-27
BS
Back space. (Olivetti PR2)
C-22
CR
Carriage return. (Olivetti PR2, PR40+, 2845)
C-21
DEL
Clear print memory. (Olivetti PR2, PR40+, 2845)
C-27
ESC '
Set document type. (Olivetti PR2, PR40+, 2845)
C-66
C-68
ESC -
Measure document length. (Olivetti PR2, PR40+)
ESC ! G n
9 or 24 pin graphics and DLL selection. (Olivetti PR2)
C-69
ESC ! sp
Add columns to right of character. (Olivetti PR2)
C-17
ESC ! W 0
Cancel double height. (Olivetti PR2)
C-16
ESC ! W 1
Double height. (Olivetti PR2)
C-15
ESC #
Assign reference for ESC L. (Olivetti PR2, PR40+)
C-64
ESC &
Elementary vertical spacing. (Olivetti PR2, PR40+)
C-9
ESC (
Bold face. (Olivetti PR2, PR40+)
C-17
ESC )
Cancel bold face. (Olivetti PR2, PR40+)
C-18
ESC *
Underline. (Olivetti PR2, PR40+)
C-18
ESC .
Select automatic operator booking mode. (Olivetti PR2, PR40+, 2845)
C-59
ESC /
Set absolute vertical position in elementary steps. (Olivetti PR2, PR40+)
C-67
ESC / 7
Printer ID. (Olivetti PR2, PR40+, 2845)
C-44
C-2
ESC : 000
Copy character generator into user memory. (Olivetti PR2, PR40+)
C-43
ESC ?
Proportional spacing. (Olivetti PR2, PR40+)
C-12
ESC [
Select character set. (Olivetti PR2, PR40+)
C-26
ESC \
Record and check magnetic stripe. (Olivetti PR2, PR40+, 2845)
C-62
C-60
ESC ]
Magnetic read of the passbook stripe. (Olivetti PR2, PR40+, 2845)
ESC ^ 0
Change emulation. (Olivetti PR2, PR40+, 2845)
C-25
ESC _
Select manual operator booking mode. (Olivetti PR2, PR40+, 2845)
C-59
ESC `
Superscript - Subscript. (Olivetti PR2, PR40+)
C-19
ESC {
Cancel superscript subscript. (Olivetti PR2, PR40+)
C-20
ESC | A
Define offset in elementary steps. (Olivetti PR2, PR40+)
C-65
ESC | B
Define document width in elementary steps. (Olivetti PR2, PR40+)
C-65
ESC } -
Measure document width. (Olivetti PR2)
C-68
ESC +
Cancel underline. (Olivetti PR2, PR40+)
C-19
ESC <
Print pitch 10 cpi. (Olivetti PR2, PR40+, 2845)
C-9
ESC =
Print pitch 12 cpi. (Olivetti PR2, PR40+, 2845)
C-10
ESC >
Print pitch 16.6 cpi. (Olivetti PR2, PR40+)
C-10
ESC 0
General reset. (Olivetti PR2, PR40+)
C-55
ESC 1
9 pin Bit Image Mode. (Olivetti PR2, PR40+)
C-28
ESC 1
24 pin Bit Image Mode. (Olivetti PR2, PR40+)
C-31
ESC 2
Reset Bit Image Mode. (Olivetti PR2, PR40+)
C-37
ESC 3
Double width. (Olivetti PR2, PR40+, 2845)
C-14
ESC 4
Cancel double width. (Olivetti PR2, PR40+, 2845)
C-14
ESC 7
Line feed back. (Olivetti PR2, PR40+, 2845)
C-22
ESC a
Print Pitch. (Olivetti PR2)
C-11
ESC B id m ESC Z
Synchronous document status. (Olivetti PR2)
C-51
ESC b idrel1;idver1; ...........
idrel.n;idver.n ESC Z
FW Release ID. (Olivetti PR2)
C-53
ESC d
Double height and double width. (Olivetti PR2, PR40+)
C-14
ESC e
Cancel double height and double width. (Olivetti PR2, PR40+)
C-15
ESC H
Set absolute horizontal position. (Olivetti PR2, PR40+, 2845)
C-23
ESC h 0
9 pin Downline Loading Characters into the User Memory (DLL).
(Olivetti PR2, PR40+)
C-38
C-3
ESC I
24 pin Downline Loading Characters into the User Memory (DLL).
(Olivetti PR2, PR40+)
Set relative vertical position. (Olivetti PR2, PR40+, 2845)
C-23
ESC i
Request for printer configuration. (Olivetti PR2, PR40+, 2845)
C-44
ESC J
Set left margin. (Olivetti PR2, PR40+, 2845)
ESC h 0
C-40
C-7
ESC j
Status request. (Olivetti PR2, PR40+, 2845)
C-47
ESC L
Set absolute vertical position. (Olivetti PR2, PR40+, 2845)
C-24
ESC l
Resets the printer error status. (Olivetti PR2, PR40+, 2845)
C-54
ESC M
Define bottom of form "BOF". (Olivetti PR2, PR40+)
C-8
ESC m n 0
Select character generator. (Olivetti PR2, PR40+)
C-43
ESC n
Olivetti controlled procedure selection. (Olivetti PR2, PR40+, 2845)
C-54
ESC O
Eject document. (Olivetti PR2, PR40+, 2845)
C-25
ESC o
Select free running mode. (Olivetti 2845)
C-54
C-45
ESC p
Printer configuration. (Olivetti PR2, PR40+, 2845)
ESC Q n ESC Z
Define document length. (Olivetti PR2, PR40+, 2845)
ESC R
Select graphic font. (Olivetti PR2, PR40+, 2845)
C-12
ESC r
Synchronous basic machine status. (Olivetti PR2, PR40+, 2845)
C-47
ESC r
Answer to book operator command. (Olivetti PR2, PR40+, 2845)
C-58
ESC S
Document length or width document: answer. (Olivetti PR2)
C-69
ESC S 5
Select printer device. (Olivetti PR2, PR40+, 2845)
C-20
C-6
ESC sp
Add columns to right of character. (Olivetti PR2)
C-17
ESC sp a
Request for set-up configuration. (Olivetti PR2)
C-53
ESC sp B
Request for document status. (Olivetti PR2)
C-51
ESC sp b
Request for FW Release ID. (Olivetti PR2)
C-52
ESC T
Define top of form "TOF". (Olivetti PR2, PR40+)
C-8
ESC t data GS
Data to be recorded on the magnetic stripe. (Olivetti PR2, PR40+, 2845)
C-61
ESC U
Book operator. (Olivetti PR2, PR40+, 2845)
C-56
ESC V
Switch operator panel LED on or off. (Olivetti 2845)
C-55
ESC W
Partially eject document. (Olivetti 2845)
C-25
ESC W 0
Cancel double height. (Olivetti PR2)
C-16
ESC W 1
Double height. (Olivetti PR2)
C-16
ESC X
Set Relative Horizontal Position. (Olivetti PR2, PR40+)
C-37
C-4
ESC x mm; hh; zz; n ESC Z
Set Bar Code Print. (Olivetti PR2)
C-70
ESC y ... data ... ESC Z
Enable bar code printing. (Olivetti PR2)
C-72
ESC Y E
Set horizontal magnetic device. (Olivetti PR2, PR40+)
C-62
ESC Z
Request for primary ID. (Olivetti PR2, PR40+, 2845)
C-44
FF
Form Feed (rear ejection). (Olivetti PR2, PR40+)
C-21
LF
Line feed forward. (Olivetti PR2, PR40+, 2845)
C-20
C-5
OLIVETTI Mode Commands Description
Page Layout
ESC Q n ESC Z
Define document length. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC Q n ESC Z
1B 51 n 1B 5A
27 81 n 1B 90
Defines the length of the document to be used in place of the one defined previously.
The decimal value of n defines the total length of the document as the number of line
feeds in the currently selected value.
The parameter n may vary in length from 1 to 3 numeric characters.
The command is not accepted (command specification error) if:
• The document length is less than 70 mm or greater than 500 mm.
• Parameter n is greater than 255.
• It is sent with a document present on the paper stand.
• It is sent inside a printing field.
C-6
ESC J
Set left margin. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC J n
1B 4A n
27 74 n
Sets the current position of the left margin of the print line with respect to the edge of
the paper or the margin set using ESC | A n. This position depends on the type of
print pitch selected (double width is considered as normal spacing).
The decimal value of n defines, as an absolute value, the position of the left margin,
which will coincide with the first printing position of each line. This position is
assigned the value 001 and becomes the reference point for all horizontal positioning
commands.
If n is equal to 000, the left margin will be set at the edge of the paper or at the
margin set using ESC | A n.
If the value of n exceeds the length of line-1, the edge of the paper or the margin set
using ESC | A n will be set.
The command is not accepted (command specification error) if:
• It is sent inside a printing field.
• Parameter n is greater than 255.
C-7
ESC T
Define top of form "TOF". (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC T n
1B 54 n
27 84 n
Defines, in n/216", the top of form starting from the top edge of the document.
The command is not accepted (command specification error) if:
• The value of n is less than the mechanical top margin (defined during setting)
• It is sent with a document present on the paper stand.
• It is sent inside a printing field.
ESC M
Define bottom of form "BOF". (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC M n
1B 4D n
27 77 n
Defines the length of the bottom of form, that is, the area at the bottom of the form in
which you do not want to print, replacing the value defined previously.
The decimal value of n defines the length of the bottom of the form, as a number of
line feeds of the currently selected value. No check is made to ensure that the form
length and bottom of form values are compatible with one another.
If parameter n is set to any value between 000 and 999, the default value (4.23 mm) is
set. The command is not accepted (command specification error) if:
• It is sent with a document present on the paper stand.
• It is sent inside a printing field.
C-8
ESC &
Elementary vertical spacing. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC M n
1B 26 n
27 38 n
Defines the new line feed value, expressed in n elementary steps, without
recalculating the form length and the BOF. The value of the elementary step is
expressed in n/216".
When n is equal to 00, the default value (1/6") is set.
The command is not accepted (command specification error) if it is sent inside a
printing field.
Print Pitches
ESC <
Print pitch 10 cpi. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC <
1B 3C
27 60
Sets the print pitch to 10 cpi (characters per inch) starting from the current position.
It is not a printing command and can be inserted in a printing field.
C-9
ESC =
Print pitch 12 cpi. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC =
1B 3D
27 61
Sets the print pitch to 12 cpi starting from the current position. It is not a printing
command and can be included in a printing field. The command is not accepted if it is
sent with the OCR-A or B Font selected, as these fonts do not accept any attribute or
print pitch changes.
ESC >
Print pitch 16.6 cpi. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC >
1B 3E
27 62
Sets the print pitch to 16.6 cpi starting from the current position. It is not a printing
command and can be included in a printing field. The command is not accepted if it is
sent with the OCR-A or B Font selected, as these fonts do not accept any attribute or
print pitch changes.
C-10
ESC a
Print Pitch. (Olivetti PR2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC a n
1B 61 n
27 97 n
Sets the print pitch defined by parameter n starting from the current position.
n
Print Pitch
0
Default
1
10 cpi
2
12 cpi
3
15 cpi
4
16.6 cpi
8
17.1 cpi
It is not a printing command and can be included in a printing field. The command is
not accepted if:
• it is sent with parameter n not set to 1
• with the OCR-A or B Fonts selected as these fonts do not accept any attribute or
print pitch changes.
C-11
ESC ?
Proportional spacing. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC ?
1B 3F
27 63
Sets proportional spacing starting from the current position at a print pitch of 10 cpi.
It is not a printing command and can be included in a printing field.
The command is not accepted if it is sent with the OCR-A or B Font selected, as these
these fonts do not accept any attribute or print pitch changes.
Print Attributes
ESC R
Select graphic font. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC R n
1B 52 n
27 82 n
Sets the graphic font that will be used starting from the current position.
C-12
n
Font
n
Font
000
001
002
003
014
006
007
Default
HSD
Draft
NLQ1
NLQ2
NLQ2 Italics
Draft Italics
009
010
015
017
018
020
OCR-B
OCR-A
VHSD
LQ2
Italics NLQ1
Italics LQ2
The OCR-A font can only be selected with the following character sets:
010
020
030
040
050
060
International
Germany
Portugal
Spain
Denmark/Norway
France
070
080
090
100
110
Italy
Sweden/Finland
Switzerland
United Kingdom
U.S.A.
The OCR-B font can only be selected with the following character sets:
010
020
030
040
050
060
International
Germany
Portugal
Spain
Denmark/Norway
France
070
080
090
100
110
200
Italy
Sweden/Finland
Switzerland
United Kingdom
U.S.A.
Yugoslavia
The command is not accepted if it is sent inside a printing field.
C-13
ESC 3
Double width. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC 3
1B 33
27 51
Sets the printing of double-width characters starting from the current position. Each
character is printed twice its normal width and occupies two printing positions.
This setting remains active until the relevant cancellation command is received. The
command is not accepted if it is sent with the OCR-A or B font selected.
ESC 4
Cancel double width. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC 4
1B 34
27 52
Cancels the double width setting starting from the current position.
ESC d
Double height and double width. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC d
1B 64
27 100
Sets double height and double width printing in NLQ starting from the current
position. It has no effect on vertical positioning commands, which continue to work on
the basis of the current line feed value.
C-14
The command is not accepted (command specification error) if it is sent with
superscript or subscript enabled.
• It is sent with the OCR-A or B Font selected.
• It is sent with a document positioned at the first printing line.
• It is sent inside a printing field.
ESC e
Cancel double height and double width. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC e
1B 65
27 101
Cancels the double height setting starting from the current position. As the double
height setting also activates double width, canceling the former feature also cancels
the latter, unless the latter was set previously using ESC 3.
The command is not accepted if it is sent inside a printing field.
ESC ! W 1
Double height. (Olivetti PR2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC ! W 1
1B 21 57 31
27 33 87 49
Sets the printing of double height characters starting from the current position. The
print pitch is not changed. This setting remains active until the relevant cancellation
command is received.
The command is not accepted if it is sent with the OCR-A or B Font selected.
C-15
ESC W 1
Double height. (Olivetti PR2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC W 1
1B 57 31
27 87 49
See description of the ESC ! W 1 command above.
ESC ! W 0
Cancel double height. (Olivetti PR2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC ! W
1B 21 57 30
27 33 87 48
Cancels the double height setting starting from the current position. The print pitch is not
changed.
ESC W 0
Cancel double height. (Olivetti PR2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC ! W
1B 21 57 30
27 33 87 48
See description of the ESC ! W 0 command above.
C-16
ESC ! sp
Add columns to right of character. (Olivetti PR2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC ! sp m
1B 21 20 m
27 33 32 m
This command may be used to add to the current print pitch a number m of columns
expressed in n/120" (with n = 001-255D). If, after defining the interspace, the print of
the nth character is outside the right logic margin (90 characters at 10 cpi), the print
will generate “command specification error”.
The command is not accepted (command specification error) if it is sent when current
print pitch is proportional.
ESC sp
Add columns to right of character. (Olivetti PR2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC sp m
1B 20 m
27 32 m
See description of the ESC ! sp command above..
ESC (
Bold face. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC (
1B 28
27 40
Sets bold face printing starting from the current position. The command is not
accepted if it is sent with the OCR-A or B Font selected.
C-17
ESC )
Cancel bold face. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC )
1B 29
27 41
Cancels the bold face setting starting from the current position.
ESC *
Underline. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC * n
1B 2A n
27 42 n
Sets underlined printing starting from the current position and remains active until a
cancellation command is received. Parameter n defines the type of underline, which
can be set to the following values:
n
Setting
0
Normal underline
3
Overline
4
Over and underline
The command is not accepted if it is sent with the OCR-A or B Font selected, or the
parameter n is set to any value other than those values mentioned above.
C-18
ESC +
Cancel underline. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC +
1B 2B
27 43
Cancels the underline setting starting from the current position.
ESC `
Superscript - Subscript. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC `n
1B 60 n
27 96 n
Sets superscript or subscript printing, defined by parameter n, starting from the
current position, and remains active until a cancellation command is received.
If double height printing has been set, the command is interpreted but has no effect on
printing until double height printing is cancelled.
n
Type
0
1
Superscript
Subscript
The command is not accepted if:
• It is sent with the OCR-A or B Font selected, in that these fonts do not accept any
attribute or print pitch changes.
• It is sent with parameter n equal to any value other than those indicated above.
C-19
ESC {
Cancel superscript subscript. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC {
1B 7B
27 123
Cancels the superscript/subscript setting starting from the current position.
Printer Operations
ESC S 5
Select printer device. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC S 5
1B 53 35
27 83 53
Selects the front paper stand feeder, the only device present. Documents managed by
the Horizontal Magnetic and MICR reader devices (where present) are also handled by
the front paper stand.
LF
Line feed forward. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
LF
0A
10
Prints the current line and executes a line feed of a value determined by the vertical
spacing selected.
C-20
If the LF+CR feature has been selected in the printer Set-Up, the printing position is
set at the left margin.
The command is not accepted if:
• the new position lies in the bottom of form area or off the form (the line is printed).
• It is sent without a document inserted.
FF
Form Feed (rear ejection). (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
FF
0C
12
Prints the current line and ejects the document from the rear of the printer.
If the LF+CR feature has been selected in the printer Set-Up, the printing position is
set at the left margin. If there is no document present, it is ignored.
CR
Carriage return. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
CR
0D
13
Prints the current line and sets the printing position at the left margin.
C-21
BS
Back space. (Olivetti PR2)
ASCII Code
Hexadecimal Value
Decimal Value
BS
08
8
This command repositions a character backward with current print pitch. If the
command is sent in zero column, it is ignored.
The command generates command specification errors if the command is sent with no
characters to print.
ESC 7
Line feed back. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC 7
1B 37
27 55
Prints the current line and executes a back line feed according to the selected vertical
spacing.
If the LF+CR feature has been selected in the printer Set-Up, the printing position is
set at the left margin.
The command is not accepted if:
• The print line is the first on the form (the line is printed).
• Sent without a document inserted.
C-22
ESC H
Set absolute horizontal position. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC H n
1B 48 n
27 72 n
Moves the current position, from wherever it is, to character position n of the current
line.
This position depends on the selected print pitch; the decimal value of n defines, as an
absolute value, the new current position with respect to the start of the line to which
the decimal value 1 is to be assigned.
If the value n moves the current position beyond the end of the line, it prints the
current line, executes a line feed and moves the current position to the start of the
new line.
If the value n moves the current position back with respect to the current value, it
prints without executing line feeds and moves the current position to the value
indicated.
The command opens a printing field. If parameter n is set to 0, it moves the current
position to 1.
ESC I
Set relative vertical position. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC I n
1B 49 n
27 73 n
Prints the current line and feeds the form n line feeds; the actual value of this
movement depends on the selected vertical spacing. If the LF+CR feature has been
selected in the printer Set-Up, the printing position is set at the left margin.
C-23
The decimal value n defines the vertical increment, as a number of line feeds, to be
carried out in order to reach the new current position. If parameter n is set to 0, the
document is printed but no paper movement is performed.
The command is not accepted (command specification error) if:
• The new position lies in the bottom of form or off the form (the line is printed).
• Sent without a document inserted.
ESC L
Set absolute vertical position. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC L n
1B 4C n
27 76 n
Prints the current line and feeds the form to the line specified by n; the actual value of
this movement depends on the selected vertical spacing.
If the LF+CR feature has been selected in the printer Set-Up, the printing position is
set at the left margin. The decimal value n defines, as a number of line feeds, the
value of the new current line with respect to the start of the printing area.
If the document is not inserted, the printer feeds it in and positions it at the line
indicated by n. If parameter n is equal to 0, the document is positioned on the first
printing line (TOF or Mechanical top margin).
The command is not accepted (command specification error) if:
• The new position lies in the bottom of form, in the top of form or off the form
(the line is printed)
• The length of the document has not yet been defined (ESC Q...ESC Z).
C-24
ESC O
Eject document. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC O
1B 4F
27 79
Prints the current print line and ejects the document on the front slot. If the LF+CR
feature has been selected in the printer Set-Up, the printing position is set at the left
margin.
If there is no document inserted, the document ejection movement is carried out in any
case, without causing any error to be indicated.
ESC W
Partially eject document. (Olivetti 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC W
1B 57
27 84
This command is present for compatibility with the past, but has no function on your
printer (ignored).
ESC ^ 0
Change emulation. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC ^ 0
1B 5E 30
27 94 48
Selects "IBM Emulation".
If sent with the machine in local, it is executed when the printer leaves local mode.
C-25
ESC [
Select character set. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC [ n
1B 5B n
27 91 n
Identifies the symbol set from which the characters to be printed are taken.
Parameter n may be set to any of the following values:
n
000
010
020
030
040
050
060
070
080
090
100
110
140
150
170
200
410
510
520
540
Symbol set - Olivetti
International
International
Germany
Portugal
Spain 1
Denmark/Norway
France
Italy
Sweden/Finland
Switzerland
Great Britain
USA ASCII
Greece **
Israel **
Spain 2 **
Yugoslavia *
Olivetti TCV 370 **
SDC **
Turkey **
CIBC
n
600
602
605
620
623
625
680
700
701
710
711
712
720
730
740
750
770
771
780
781
782
783
Symbol set - IBM/PC
ISO 8856/1 Latin 1
ISO 8856/9 Latin 5
ISO 8856/2 Latin 2
ISO 8856/6 Latin Arabic
ISO 8856/7 Greek
ISO 8856/8 Hebrew
OLI-UNIX
PC-437 International
PC-220 Spain 2
PC-865 Nordic
PC-Denmark/Norway
PC-Denmark OPE
PC-860 Portugal
PC-863 Canadian/French
PC-850 Latin1
PC-852 Latin 2
PC-851 Greek
PC-210 Greek
PC-855 Cyrillic
PC-862 Hebrew
PC-864 Arabic
PC-866 Cyrillic
C-26
The command is not accepted (command specification error) if:
• A PC set is chosen with the OCR-A or B Font selected.
• One of the Olivetti sets followed in the table by at least one " * " is selected, when
the OCR-A font is selected.
• One of the Olivetti sets followed in the table by two " * " characters is selected,
when the OCR-B font is selected.
BEL
Bell. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
BEL
07
7
Rings a bell to attract the operator’s attention.
DEL
Clear print memory. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
DEL
7F
127
Clears the print buffer and the commands it contains.
Cancels the ESC sequence containing it.
C-27
Graphics
ESC 1
9 pin Bit Image Mode. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC 1 p m n
1B 31 p m n
27 49 p m n
Sets the machine to print in 9 pin Bit Image Mode. The type of graphic print, 9 pin or
24 pin, is selected with the ESC ! G n command. The bits of parameter p identify the
print modes selected:
b8: = 0
fixed
b7: = 1
fixed
b6: = 0
fixed
b5: = 0
fixed
b4: = 0
fixed
b3: = 0
Print in positive
=1
Print in negative
b2: = 0
parameter m does not follow
=1
parameter m follows
b1: = 0
parameter n does not follow
=1
parameter n follows
Printing in positive prints a dot when the bit received is equal to 1 and does not print
when it is equal to 0, while printing in negative does the exact opposite. The decimal
value of parameter m defines the length of the print line, expressed as a number of
dots.
C-28
If the parameter is set to 0 or is not present, the default value is set, that is, the
maximum number of dots that can be printed per line at the density selected, minus
any left margin value.
The decimal value of parameter n defines, in elementary steps, the horizontal distance
at which two consecutive dots can be printed. If the parameter is set to 0 or is not
present, the default value (180 dpi) is set. The accepted values of parameter n are:
n
Dot density
0
1
2
3
4
180 dpi
240 dpi
120 dpi
80 dpi
60 dpi
When the command is received, the printer sets the 24/180" line feed value, which
corresponds to the movement of the paper by an amount such that the consecutive
vertical dots are printed equidistantly.
The parameter consistency checks and the default values must be calculated on the
basis of the following equation:
b-c
a = 
d*e
where:
a = Maximum length of print line (number of dots).
b = Maximum length of printing area (in n/360").
c = Left margin (in n/240").
d = Value of parameter n.
e = Value of elementary step(1/240").
C-29
The command is not accepted (command specification error) if:
• It is sent inside a printing field.
• Parameter m is greater than the length of the print line.
• Parameter n has any value other than those specified.
• Unrecognized functions are sent inside the data field.
When a quantity of data which, in terms of dots, exceeds the length of the printing
line defined by parameter m, the data is printed automatically and a line feed is
executed. The printer waits for a CR or LF command, if the amount of data left is less
than the length of the line.
Codes handled as data
All codes with a hexadecimal value of between 00 and FF are treated as data, with the
exception of code 1B (ESC), which must be repeated (ESC ESC) to be recognized as
data.
Codes handled as control functions
All codes that follow the (ESC) code are treated as control functions with the
exception of the code (ESC).
The functions recognized are: ESC 0, ESC CR, ESC LF, ESC 7, ESC X nnn, ESC 2.
Printing field
The printing field is closed when one of the following commands is received: ESC CR,
ESC LF, ESC 7, ESC 2.
Length and bottom of form
With BIM printing, the preset length and bottom of form values are not handled in the
normal way: a paper jam error occurs when the length is exceeded (ESC r 1).
C-30
Left Margin
BIM printing uses the preset left margin.
Printing Direction
BIM printing is unidirectional.
Printing
The diagram below shows the arrangement assigned to the bits according to the
printing element:
pin 1
b1
pin 2
b2
pin 3
b3
pin 4
pin 5
b5
pin 6
b6
pin 7
b7
pin 8
b8
ESC 1
24 pin Bit Image Mode. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC 1 p m n
1B 31 p m n
27 49 p m n
Sets the printer to print in 24 pin Bit Image Mode. The type of graphic print, 9 pin or
24 pin, is selected with the command ESC ! G n.
C-31
The bits of parameter "p" identify the print modes selected:
b8: = 0
fixed
b7: = 1
fixed
b6: = 0
fixed
b5: = 0
fixed
b4: = 0
fixed
b3: = 0
Positive print
=1
Negative print
b2: = 0
Does not follow m parameter
=1
Follows m parameter
b1: = 0
Does not follow n parameter
=1
Follows n parameter
Positive print associates to level 1 of the bit received the print of a dot and to the level
0 the non print; negative print does the opposite.
The decimal value of the m parameter defines the length of the print line, expressed in
number of points.
If the parameter has value 0 or is absent, the default condition is forced; its value
corresponds to the maximum number of points printable per line at the selected
density, minus any value of the left margin.
The decimal number of the n parameter defines, in elementary steps, the horizontal
position at which two consecutive dots can be printed.
If the parameter has value 0 or is absent, the default condition is forced (180 dpi).
C-32
The allowed values of the n parameter are:
n
Dot density
0
1
2
3
4
180 dpi
360 dpi
240 dpi
120 dpi
60 dpi
Upon receiving the command, the printer forces the line spacing value to 24/180",
which corresponds to the displacement of the paper by such a quantity that
consecutive vertical dots are printed equidistant.
The consistency checks for the parameters, as well as the default values, shall be
computed according to the following expression:
a =
where:
(b - c) * d
---------------e
a = Maximum print line length (number of dots).
b = Maximum print field length (in n/360").
c = Left margin (in n/240").
d = Value of the n parameter.
e = Value of the elementary step (1/240").
C-33
The command is not accepted (command specification error) if:
•
It is sent inside a printing field.
•
The m parameter exceeds line print lengths.
•
The n parameter has a different value from those allowed.
•
Inside the data field are sent not recognized functions.
The reception from the line of a number of data such as to exceed, in terms of dots, the
length of the print line defined by the m parameter, causes the automatic print and
the execution of one line feed. It then waits for a CR or LF, if the number of data left
pending is less than the line length.
Codes handled as data
All codes with a hexadecimal value of between 00 and FF are treated as data, with the
exception of code 1B (ESC), which must be repeated (ESC ESC) to be recognized as
data.
Codes handled as control functions
All codes that follow the (ESC) code are treated as control functions with the
exception of the code (ESC).
The functions recognized are: ESC 0, ESC CR, ESC LF, ESC 7, ESC X nnn, ESC 2.
Printing field
The printing field is closed when one of the following commands is received: ESC CR,
ESC LF, ESC 7, ESC 2.
Length and bottom of form
With BIM printing, the preset length and bottom of form values are not handled in the
normal way: a paper jam error occurs when the length is exceeded (ESC r 1).
C-34
Left Margin
BIM printing uses the preset left margin.
Printing Direction
BIM printing is unidirectional.
Printing
The diagram below shows the arrangement assigned to the bits according to the
printing element
pin 1
b1
pin 2
b2
pin 3
b3
pin 4
b4
first byte
pin 5
b5
pin 6
b6
pin 7
b7
pin 8
b8
---------------------------------------------------------------------pin 9
b1
pin 10
b2
b3
pin 11
pin 12
b4
second byte
pin 13
b5
pin 14
b6
pin 15
b7
pin 16
b8
---------------------------------------------------------------------C-35
---------------------------------------------------------------------pin 17
b1
pin 18
b2
pin 19
b3
pin 20
b4
third byte
pin 21
b5
pin 22
b6
pin 23
b7
pin 24
b8
---------------------------------------------------------------------pin 9
b1
pin 10
b2
pin 11
b3
pin 12
b4
second byte
pin 13
b5
pin 14
b6
pin 15
b7
b8
pin 16
---------------------------------------------------------------------pin 17
b1
pin 18
b2
pin 19
b3
b4
first byte
pin 20
pin 21
b5
pin 22
b6
pin 23
b7
b8
pin 24
C-36
ESC 2
Reset Bit Image Mode. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC 2
1B 32
27 50
Prints the contents of the buffer in BIM, executes a CR and cancels BIM.
ESC X
Set Relative Horizontal Position. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC X
1B 58
27 88
The command sets a relative horizontal position in elementary steps.
The command is only accepted with BIM set.
Parameter n defines a movement equal to n times the horizontal distance between two
points defined by parameter n of the ESC 1 command.
C-37
Customized Characters
ESC h 0
9 pin Downline Loading Characters into the User Memory (DLL).
(Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC h 0 n m d0 d1 d2 D1a D1b D1c......Dnc
1B 68 30 n m d0 d1 d2 D1a D1b D1c......Dnc
27 104 48 n m d0 d1 d2 D1a D1b D1c......Dnc
The command enables the characters received to be transferred from the line into the
user memory (9 pin). The type of DLL, 9 or 24 pin, is selected with the command ESC !
G n.
Parameters n and m are, respectively, the binary start and end codes and mark the
range in which the characters will be loaded (as a number "m" - n + 1). In the
particular case where n is equal to m a single character will be loaded.
Values n and m must be between Hex. 20 - 7E and 80 - FE
The format of each individual character is as follows:
d0 d1 d2 D1a D1b D1c......Dnc
where:
- d0,d1,d2 represent, respectively, as binary values:
- d0: number of leading columns.
- d1: number of main columns.
- d2: number of trailing columns.
- The sum (d0 + d1 + d2 ) defines the number of columns in the character’s gross
matrix.
- D1a, D1b, D1c.......... Dnc constitute the pattern of the character currently being loaded.
Each data column has three bytes.
C-38
1 2 3 4 5 6 7 8 9 10 11 12
Columns:
------------------------------------------------------------------------------------------------------------------b7 pin 1
b6 pin 2
b5 pin 3
first byte
b4 pin 4
b3 pin 5
b2 pin 6
b1 pin 7
b0 pin 8
------------------------------------------------------------------------------------------------------------------255 128 128 128 128 255
The parameters in the example are:
d0=128; d1=6; d2=6; D1=255; D2=129; D3=129; D4=129; D5=129; D6=255
MSB function of the d0 byte
MSB = 1
MSB = 0
C-39
The command is not accepted (command specification error) if:
•
It is sent inside a printing field.
•
The n and m parameters are different from those allowed
•
The d0 - d1 - d2 parameters are incompatible with one another
ESC h 0
24 pin Downline Loading Characters into the User Memory (DLL).
(Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC h 0 n m d0 d1 d2 D1a D1b D1c......Dnc
1B 68 30 n m d0 d1 d2 D1a D1b D1c......Dnc
27 104 48 n m d0 d1 d2 D1a D1b D1c......Dnc
The command enables the characters received to be transferred from the line into the user
memory (9 pin). The type of DLL, 9 or 24 pin, is selected with the command ESC ! G n.
Parameters n and m are, respectively, the binary start and end codes and mark the
range in which the characters will be loaded (as a number m - n + 1). In the particular
case where n is equal to m, a single character will be loaded.
Values n and m must be between Hex. 20 - 7E and 80 - FE
The format of each individual character is as follows:
d0 d1 d2 D1a D1b D1c......Dnc
where:
- d0, d1, d2 represent, respectively, as binary values:
- d0: number of leading columns.
- d1: number of main columns.
- d2: number of trailing columns.
- The sum (d0 + d1 + d2) defines the number of columns in the character’s gross matrix.
- D1a, D1b, D1c..........Dnc constitute the pattern of the character currently being loaded.
Each data column has three bytes.
C-40
1
2 3
4 5
6 7
8 9
10 11 12
Columns:
------------------------------------------------------------------------------------------------------------------b7 pin 1
first byte
b6
pin 2
b5
pin 3
b4
pin 4
b3
pin 5
b2
pin 6
b1
pin 7
b0
pin 8
-------------------------------------------------------------------------------------------------------------------
second byte
b7
pin 9
b6
pin 10
b5
pin 11
b4
pin 12
b3
pin 13
b2
pin 14
b1
pin 15
b0
pin 16
-------------------------------------------------------------------------------------------------------------------
third byte
b7
pin 17
b6
pin 18
b5
pin 19
b4
pin 20
b3
pin 21
b2
pin 22
b1
pin 23
b0
pin 24
------------------------------------------------------------------------------------------------------------------255
128
128
C-41
128
128
255
The parameters of the example are:
d0=0; d1=11; d2=1;
D1a=255, D1b=255, D1c=255;
D2a=0, D2b=0, D2c=0;
D3a=128, D3b=0, D3c=1;
D4a=0, D4b=0, D4c=0;
D5a=128, D5b=0, D5c=1;
D6a=0, D6b=0, D2c=0;
D7a=128, D7b=0, D7c=1;
D8a=0, D8b=0, D8c=0;
D9a=128, D9b=0, D9c=1;
D10a=0, D10b=0, D10c=0;
D11a=255, D11b=255, D11c=255
The command is not accepted (command specification error) if:
• It is sent inside a printing field.
•
•
•
The n and m parameters are different from those allowed
The d0 - d1 - d2 parameters are incompatible with each other
If the printer is in High Speed Draft or Very High Speed Draft mode the
command is accepted all the same; however, the subsequent activation
command ESC m n 0 generates an error.
C-42
ESC : 000
Copy character generator into user memory. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC : 0 0 0
1B 3A 30 30 30
27 58 48 48 48
The command transfers the current character generator set into the user memory.
The command is not accepted (command specification error) if:
• It is sent inside a printing field.
• It is sent with the OCR-A or B Font selected, in that these fonts cannot be loaded
into the user memory.
ESC m n 0
Select character generator. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC m n 0
1B 6D n 30
27 109 n 48
The command selects the current character generator or the one in the user memory
depending on the decimal value of parameter n.
n
Generator selected
0
1
Current character generator
Character generator in user memory
The command is not accepted if it is sent with the OCR-A or B Font selected.
C-43
Printer Control
ESC Z
Request for primary ID. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC Z
1B 5A
27 90
This command requests the printer to indicate its ID. The printer answers with
different IDs according to the current emulation.
The command gives a command specification error (The request is fulfilled in any
case) if, it is sent inside a printing field.
ESC / 7
Printer ID. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC / 7
1B 2F 37
27 47 55
Answer sent by printer on receiving command ESC Z.
ESC i
Request for printer configuration. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC i
1B 69
27 105
This command requests the printer to indicate its basic machine configuration. The
command gives a command specification error (The request is fulfilled in any case) if it
is sent inside a printing field.
C-44
ESC p
Printer configuration. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC p x y z k
1B 70 x y z k
27 106 x y z k
Answer to the request for the printer configuration ESC i.
Parameters "x y z k" may have the following configurations:
Byte x:
bit 8: = 0 fixed
bit 7: = 1 fixed
bit 6: = 0 fixed
bit 5: = 0 fixed
bit 4: = 0 fixed
bit 3: = 0 fixed
bit 2: = 1 fixed.
bit 1: = 1 fixed
Byte y:
bit 8: = 0 fixed
bit 7: = 1 fixed
bit 6: = 0 fixed
bit 5: = 0 reserved
bit 4: = 0 fixed
bit 3: = 1 Magnetic stripe management option present
0 Magnetic stripe management option not present
bit 2: = 0 fixed
bit 1: = 1 fixed
C-45
Byte z:
bit 8: = 0 fixed
bit 7: = 0 fixed
bit 6: = 1 fixed
bit 5: = 1 fixed
bit 4: = 0 fixed
bit 3: = 0 fixed
bit 2: = reserved
bit 1: = 0 fixed
Byte k:
bit 8: = 0 fixed
bit 7: = 0 fixed
bit 6: = 1 fixed
bit 5: = 0 Horizontal magnetic stripe handling
bit 4: = 0 fixed
bit 3: = 0 Magnetic stripe management option not present
1 Magnetic stripe management option present
bit 2: = 0 reserved
bit 1: = 0 fixed
C-46
ESC j
Status request. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC j
1B 6A
27 106
This command requests the printer to indicate its synchronous status. Timing of the
status reply is depends on the STATUS REQUEST setup parameter. If NO WAIT is
selected, the reply will be provided as soon as possible and simultaneously with the
print or with paper movements. If WAIT is selected, the status reply will be provided
at the end of the print.
The command gives a command specification error (The request is fulfilled in any
case) if it is sent inside a printing field.
ESC r
Synchronous basic machine status. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC r x
1B 72 x
27 114 x
Answer sent by the printer on receiving command ESC j.
The bits of parameter "x" indicate the printer status which may be WARNING or
ERROR.
The WARNING status indicates that the operation was performed correctly.
The ERROR status indicates that the operation has not been performed or was
performed incorrectly.
The bits of parameter "x" may have the following meanings:
C-47
WARNING
Byte x:
FRONT PAPER STAND
bit 8: = 0 fixed
bit 7: = 1 fixed
bit 6: = 0 fixed
bit 5: = 1 fixed
bit 4: = 1 Document completely inserted (1)
bit 3: = 1 Local or Cover open (2)
bit 2: = 0 fixed
bit 1: = 1 Almost end of document (3)
(1) Generated when the last line of the document is reached.
(2) Generated when the machine is set in local or when the cover is opened without
any executive commands suspended.
(3) Generated when the first line of the declared bottom of form is reached: if you try
to print in any case, an error is indicated.
GENERIC ERROR
Byte x:
bit 8: = 0 fixed
bit 7: = 1 fixed
bit 6: = 1 fixed
bit 5: = 0 fixed
bit 4: = 1 Command specification error (1)
bit 3: = 1 Cover open (2)
bit 2: = 1 Local (3)
bit 1: = 1 Line error (4)
C-48
(1)
(2)
(3)
(4)
Generated when the command received does not respect the specifications.
Generated when the cover is opened with executive commands suspended.
Generated when the machine is set in local with executive commands suspended.
Generated when an error is detected in reception (framing error, parity error,
overflow).
PAPER STAND ERROR
Byte x:
bit 8: = 0 fixed
bit 7: = 0 fixed
bit 6: = 1 fixed
bit 5: = 1 fixed
bit 4: = 1 Command specification error (1)
bit 3: = 1 Cover open (2)
bit 2: = 1 No document present (3)
bit 1: = 1 Jam(4)
(1) Generated when the command received does not respect the specifications
(2) Generated when the cover is opened with executive commands suspended.
(3) Generated when a paper load command is sent and the document is not present in
the slot.
(4) Generated when an incorrect paper movement is detected.
C-49
ERROR DURING MAGNETIC/OPTICAL OPERATION
Byte x:
bit 8: = 0 fixed
bit 7: = 1 fixed
bit 6: = 1 fixed
bit 5: = 1 fixed
bit 4: = 0 fixed
bit 3: = 0 fixed
bit 2: = 1 Virgin stripe (1)
bit 1: = 1 Read or check error (2)
(1) Generated when no character is read during a read operation.
(2) Generated when read errors are detected.
When the machine enters error status, it stays there until the reset error command (ESC
l) is received.
While in the error status, the machine discards all the data and/or commands sent to
it except for status or ID requests (ESC j, ESC i, ESC Z).
In the event of a jam, the reset error command must be followed by an eject document
command (ESC l, ESC O).
The general reset command resets all kinds of errors.
MECHANICAL FAULT
Byte x:
"o" (6F)
When a mechanical movement is not performed, a mechanical fault is signaled.
The printer stays in this condition until a general reset command (ESC 0) is received,
C-50
ESC sp B
Request for document status. (Olivetti PR2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC sp B
1B 20 42
27 32 65
This command requests the printer to indicate its status as regards the current
position of the document.
The command generates a command specification error (The request is fulfilled in any
case) if it is sent inside a printing field.
ESC B id m ESC Z
Synchronous document status. (Olivetti PR2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC B id m ESC Z
1B 42 id m 1B 5A
27 66 id m 27 102
The synchronous status of documents, which answers the ESC sp B command has the
following structure:
id = 5 (PAPER FRONT STAND)
m consists of a single byte and identifies the position of the document in the device
identified by id.
C-51
Byte m:
bit 8: = 0 fixed
bit 7: = 1 fixed
bit 6: = 0 reserved
bit 5: = 0 reserved
bit 4: = 0 reserved
bit 3: = 0 reserved
bit 2,1:= 0 0 Document not present.
0 1 Document parked.
1 0 Document aligned.
1 1 Document inserted.
Key:
Document parked
Document aligned
Document inserted
Position assumed by the document downstream of a SW
ejection (ESC O)
Position assumed by the document downstream of a manual
introduction into the paper stand.
Position assumed by the document downstream of a paper
insertion from SW command (ESC L nnn)
ESC sp b
Request for FW Release ID. (Olivetti PR2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC sp b
1B 20 62
27 32 98
This command requests the printer to indicate its FW Release ID.
The command generates a command specification error (The request is fulfilled in any
case) if it is sent inside a printing field.
C-52
ESC b idrel1;idver1; ........... idrel.n;idver.n ESC Z
FW Release ID. (Olivetti PR2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC b idrel1;idver1; ........... idrel.n;idver.n ESC Z
1B 62 idrel1;idver1; ........... idrel.n;idver.n 1B 5A
27 98 idrel1;idver1; ........... idrel.n;idver.n 27 102
Answer to a request for the FW Release ID.
Parameters idrel.n and idver.n have the following meaning:
idrel.n / idver.n
FW release/ FW version
Number
idrel.1
MAIN FW release + Magnetic option
x.xxxy
idver.1
MAIN FW version + Magnetic option
xxx
idrel.2
OCR FW release
x.xx
x = a number
y = a letter
Example of an answer to a request for the FW ID: ESC b1.00E;011;1.00;005;ESC Z
ESC sp a
Request for set-up configuration. (Olivetti PR2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC sp a
1B 20 61
27 32 97
This command requests the printer to indicate its Set-Up configuration.
The command generates a command specification error (The request is fulfilled in any
case) if it is sent inside a printing field.
C-53
ESC l
Resets the printer error status. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC I
1B 6C
27 108
ESC n
Olivetti controlled procedure selection. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC n
1B 6E
27 110
Selects the Olivetti controlled data exchange procedure (the only procedure accepted
in OLIVETTI emulation). The command is not accepted (command specification error)
if it is sent inside a printing field.
ESC o
Select free running mode. (Olivetti 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC o
1B 6F
27 111
This command is accepted (for compatibility with the past) only before the selection of
the "Olivetti controlled" selection. After an ESC n it generates a command error.
C-54
ESC V
Switch operator panel LED on or off. (Olivetti 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC V n
1B 55 n
27 85 n
This command is present only for compatibility with the past. It is ignored by the
printer.
ESC 0
General reset. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC 0
1B 30
27 48
Resets all the printer’s FW. The HW (mechanical) reset is not performed and all
default parameters are restored. The command is recognized in lines (as soon as it is
received, it discards the data and the pending commands and is executed).
If the command is received with the machine in the LOCAL or COVER open status, it
still resets the FW. The general reset:
• Cancels all the settings made from the line (spacing, fonts, etc.).
• Switches off the console indications activated by commands from the line.
• Cancels any pending book operator commands.
• Restores the default values, that is, the parameters set from the Set-Up.
• Keeps the machine status (Local or Ready) and the contents of the user memory
(DLL) unchanged.
C-55
ESC U
Book operator. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC U n
1B 55 n
27 85 n
Books an operator and switches on/off the station LEDs specified by the configuration
of parameter "n", which has the following structure:
Byte n:
bit 8: = 0 fixed
bit 7: = 1 fixed
bit 6: = 1 Book Operator
bit 5: = 0 Led OFF
1 Led ON
bit 4: = 0 fixed
bit 3: = 0 fixed
bit 2: = 1 Station 2
bit 1: = 1 Station 1
The STATION 1 and STATION 2 LEDs inform the single operator whether the printer
has been dedicated to him or not. Bits 5 and 6 may have one of the four combinations
indicated in the table below:
C-56
Bit 6
Bit 5
Printer behaviour
0
0
Switches the Station1 or Station2 LED off as specified in bits 1 and 2. If both
are off, after this sequence has been executed, any pending book operator
commands will be cancelled
1
0
Switches the Station1 or Station2 LED off as specified in bits 1 and 2. After
this sequence has been executed, the book operator command becomes
pending and is stored.
0
1
Switches the Station1 or Station2 LED on as specified in bits 1 and 2.
Pending book operator commands are not cancelled
1
1
Switches the Station1 or Station2 LED on as specified in bits 1 and 2. This
sequence always enables the book operator command.
If both operators are booked (Station1 and Station2 LEDs on), the printer will be
assigned to the first operator to press the key, canceling the other pending book
operator command.
If the key corresponding to the unbooked operator is pressed, the printer ignores the
action and does not answer.
This behavior gives priority to the manual book operator command (ESC _).
If automatic operation booking is selected (ESC .), the LEDs do not light up even if
parameter n indicates power-on: to make the LEDs light up, the LED on command
must be sent separately from the book operator command.
A pending book operator command does not block any printer function.
The command is not accepted (command specification error) if it is sent inside a
printing field.
C-57
ESC r
Answer to book operator command. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC r x
1B 72 n
27 114 n
The answer to the book operator command may be determined by the pressing of a key
(if manual O.B.) or the presence of the document in the slot (if automatic O.B.).
If automatic O.B. is enabled, the answer will always be Station 1.
The bits of parameter x may have the following meanings:
Byte x:
bit 8: = 0 fixed
bit 7: = 0 fixed
bit 6: = 1 fixed
bit 5: = 0 fixed
bit 4: = 0 fixed
bit 3: = 1 Document present
bit 2: = 1 Station 2 pressed
bit 1: = 1 Station 1 pressed
C-58
ESC .
Select automatic operator booking mode. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC .
1B 2E
27 46
Sets the printer to automatically answer the pending book operator command (without
any key being pressed on the console) as soon as the document is inserted in the
feeder.
The command is not accepted (command specification error) if, iIt is sent inside a
printing field.
ESC _
Select manual operator booking mode. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC _
1B 5F
27 95
Sets the printer to answer the pending book operator command only when the key on
the console that corresponds to the operator selected is pressed.
The command is not accepted (command specification error) if it is sent inside a
printing field.
C-59
Magnetic Device Control
ESC ]
Magnetic read of the passbook stripe. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC ]
1B 5D
27 93
Reads the magnetic stripe, if present.
If the document is not inserted, the printer feeds in the document.
The data read is converted into ASCII characters and sent to the central unit in the
following format:
ESC s ........data field............. FS
(1B 73 ........data field............. 1C)
In the case of a magnetic stripe with field duplication:
ESC s ......first data field ...... A ........second data field ...... FS
(1B 73 ......first data field ...... 41 ........second data field ...... 1C)
where A represents the separator between the two fields.
Unrecognized data is replaced with DEL (7F).
Should no data be found during the read operation, the answer will be:
ESC s DEL FS
(1B 73 7F 1C)
C-60
If any errors occur during the read operation, the answer to the status request (ESC j)
will be:
ESC r r
no character found
ESC r q
read/check error
In a magnetic read operation, it may happen that all the data in the read answer is
correct (no DEL in the data field), but a read error is indicated when the status request
is made. This is caused by the detection of an error in the LRC calculation, so we
recommend that a read command should always be followed by a status request.
Since after the execution of the command the position of the document is unknown, its
subsequent positioning must be given as an absolute position.
The command is not accepted (command specification error) if it is sent inside a
printing field or the option is not present.
ESC t data GS
Data to be recorded on the magnetic stripe. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC t data GS
1B 74 data 1D
27 116 data 29
Sets the data to be recorded according to the previously selected standard (from the
line or the Set-Up). The command is not accepted (command specification error) if:
• It is sent inside a printing field.
• There are more than 105 data items to be recorded in a single field or 45 in field
duplication.
• The data is not in column 3 of the ASCII codes.
• It is not followed by ESC \.
• A device other than the front paper stand is selected.
• The option is not present.
C-61
ESC \
Record and check magnetic stripe. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC \
1B 74 data 1D
27 116 data 29
Records the data sent by ESC t data GS and is considered the end of data.
If the document is not inserted, the printer feeds it in.
The command is not accepted (command specification error) if it is not preceded by the
ESC t data GS command
If, at the end of the recording, errors are found during the check, the answer to the
status request will indicate a record or check error ESC r q.
Since after the execution of the command the position of the document is unknown, its
subsequent positioning must be given as an absolute position.
ESC Y E
Set horizontal magnetic device. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC Y E k1 k2
1B 59 45 k1 k2
27 89 69 k1 k2
When the command is received, the device takes on the configuration indicated by
parameters k1 and k2.
C-62
Byte k1:
bit 8: =
bit 7: =
bit 6: =
0 fixed
1 fixed
0 values of k1 k2
1 default values
bit 5: = 0 one retry
1 three retries
bit 4: = 0 End of Sentinel = 0F
1 End of Sentinel = 0C
bit 3: = 0 fixed
bit 2-1: = 00: IBM 3604
01: DIN/ISO
10: ANSI
11: Reserved
Byte k2:
bit 8: =
bit 7: =
bit 6: =
bit 5: =
bit 4: =
bit 3: =
bit 2-1: =
0 fixed
1 fixed
0 duplication OFF
1 duplication ON
0 fixed
0 fixed
0 fixed
00: standard position
01: position + 10 mm
10: position + 20 mm
11: Reserved
The command is not accepted (command specification error) if:
• It is sent inside a printing field.
• The device is not present.
• A device other than the front paper stand is selected.
C-63
ESC #
Assign reference for ESC L. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC # n
1B 23 n
27 35 n
This command defines the criteria for counting the number of lines selected by ESC L n.
With parameter n = 0, the ESC L command always feeds in the paper to the line
defined by the ESC T n command or, if it is not defined, to the minimum top margin
and, with parameter n > 0, the ESC L command is changed according to the following
values of parameter n of ESC # n.
n
Behavior
0
1
Positions the document at line n defined by ESC L with a document edge reference
Positions the document at line n defined by ESC L with a reference at the top margin
defined by ESC T or, if no top margin is defined, at the minimum top margin
The command is not accepted if it is sent inside a printing field or a device other than
the front paper stand is selected.
C-64
ESC | A
Define offset in elementary steps. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC | A n
1B 7C 41 n
27 124 65 n
Defines, in n/120", the distance between the left margin and the edge of the printer
and constitutes the reference for all the horizontal setting or positioning functions.
As a result, the length of the line is reduced by n. Parameter n may be set to any value
from 0 to 999.
The command is not accepted (command specification error) if it is sent inside a
printing field or a device other than the front paper stand is selected.
ESC | B
Define document width in elementary steps. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC | A n
1B 7C 42 n
27 124 66 n
Defines, in n/120", the actual width of the passbook on which magnetic operations are
to be carried out.
This command is used exclusively for horizontal magnetic recording/reading on
machines configured with left alignment, to determine the start position for magnetic
operations.
Parameter n may be set to any value from 0 to 1156 (width of slot)
The command is not accepted (command specification error) if it is sent inside a
printing field or a device other than the front paper stand is selected.
C-65
ESC '
Set document type. (Olivetti PR2, PR40+, 2845)
ASCII Code
Hexadecimal Value
Decimal Value
ESC ' n
1B 27 n
27 39 n
Sets the printer to handle the type of document defined by parameter n, which has the
following structure:
Byte n:
bit 8: = 0 fixed
bit 7: = 1 fixed
bit 6: = 0 fixed
bit 5: = x not significant
bit 4: = 0 multicopy document
1 single-copy document
bit 3: = 0 document
1 passbook
bit 2: = 0 vertical seam
1 horizontal seam
bit 1: = x not significant
The values of bits 4, 3 and 2 determine the situations as shown in the table below:
bit 4
bit 3
bit 2
Document Type
1
0
0
0
0
0
1
1
x
x
1
0
Single-copy document
Multicopy document
Horizontal seam book
Vertical seam book
The command is not accepted if it is sent inside a printing field or a device other than
the front paper stand is selected.
C-66
ESC /
Set absolute vertical position in elementary steps. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC / m n
1B 2F m n
27 47 m n
If the document is not inserted, the printer feeds it in and positions it at n elementary
steps from the margin indicated by parameter m.
The elementary step value is expressed as n/240" or as n/216" depending on the value
selected from set-up. Parameter m may be set to the following values:
m
Reference margin
0
1
bottom margin
top margin
The command is not accepted (command specification error) if:
• It is sent inside a printing field.
• If the value of parameter n is greater than the declared document length or lies
in the declared TOF or BOF.
• A device other than the front paper stand is selected.
C-67
ESC Measure document length. (Olivetti PR2, PR40+)
ASCII Code
Hexadecimal Value
Decimal Value
ESC 1B 2D
27 45
If the document is not inserted, the printer feeds it in, measures its length in
elementary steps and sends the value to the CU by means of the ESC S n command.
The elementary step value is expressed in n/240" or n/216", depending on the value
selected in setup.
When the command has been executed, the position of the document is unknown, so
its next position must be given by an absolute position setting.
The command is not accepted (command specification error) if:
• It is sent inside a printing field.
• A device other than the front paper stand is selected.
ESC } Measure document width. (Olivetti PR2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC } 1B 7D 2D
27 45 125
If the document is not inserted, the printer feeds it in, measures the width in
elementary steps and sends the value to CU by means of ESC S n. The elementary
step value is 1/240"
The command is not accepted (command specification error) if:
• It is sent inside a printing field.
• A device other than the front paper stand is selected.
C-68
ESC S
Document length or width document: answer. (Olivetti PR2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC S n
1B 53 n
27 45 125
Answer to the ESC - command.
ESC ! G n
9 or 24 pin graphics and DLL selection. (Olivetti PR2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC ! G n
1B 21 47 n
27 33 71 n
Sets graphic printing (BIM) and DLL printing at 9 or 24 pins. When this command is
sent, it erases from the printer memory any DLL characters loaded previously.
n
30 (H)
31 (H)
BIM and DLL
9 pin
24 pin
The default setting is 9 pin.
The command is not accepted (command specification error) if it is sent inside a
printing field or a device other than the front paper stand is selected.
C-69
Bar Code Print
ESC x mm; hh; zz; n ESC Z
Set Bar Code Print. (Olivetti PR2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC x m ; h ; z ; n ESC Z
1B 21 m ; h ; z ; n 1B 5A
27 33 m ; h ; z ; n 27 90
Sets bar code printing according to the characteristics defined by the following
parameters. The ";" character serves as a spacer and the ESC Z command serves to
close the sequence.
The m parameter defines the following Bar Code types:
m
00
01
02
03
04
05
06
07
08
Bar Code Type
DEFAULT
UPC-A
UPC-E
EAN-8
EAN-13
CODE39
CODABAR
2/5 INTERLEAVED
2/5 INDUSTRIAL
The h parameter defines Bar Code Height:
h
00
01-99
Bar Code Height
DEFAULT
Height as number h of passes (*)
C-70
(*) One pass = 8/72” at 9/18 pin
8/60” at 24 pin
The z parameter defines the horizontal zoom coefficient in decimals.
The following values are allowed for it:
z
Values
00-09
10-34
Ignored values
Acceptable values
The n parameter, comprising one byte, enables or disables plain language printing of
the Bar Code ("Human Readable Line" - H.R.L.) in the lower part:
n
Human Readable Line
0
1
Disabled
Enabled
“Human readable” characters are printed with the fonts listed below, where no zoom
factor is applied. The fonts used for the Human Readable Line depend on the type of
Bar Code selected:
H.R.L. Font
Bar Code Type
OCR-A
OCR-B
Code39, Codabar, 2/5 Interleaved and 2/5 Industrial
UPC-A, UPC-E, EAN-8 and EAN-13
If the numeric parameters are omitted, the current value is retained.
The command is not accepted (command specification error) if it is sent with the
following parameter values:
m between 09 and 99
z
between 35 and 99
n
between 2 and 9
C-71
ESC y ... data ... ESC Z
Enable bar code printing. (Olivetti PR2)
ASCII Code
Hexadecimal Value
Decimal Value
ESC y data ESC Z
1B 79 data 1B 5A
27 121 data 27 90
It performs Bar Code printing of the alphanumeric data, and brings the print head
back to the left margin.
The command is not accepted (command specification error) if the number and type of
characters is not compatible with the standard of the selected Bar Code.
C-72
Appendix D – IBM/EPSON Character Sets
GOST (Russian) ..............................................................27
Mazowia...........................................................................28
TASS (Cyrillic).................................................................29
96Greek............................................................................30
Ku .....................................................................................31
Farsi Arabic (CP1098)....................................................32
ID-12.................................................................................33
ID-14.................................................................................34
ID-17.................................................................................35
Philip ................................................................................36
Roman-8...........................................................................37
Sanyo................................................................................38
Ukrainian ........................................................................39
ISO 8859/1 (Latin 1) .......................................................40
ISO 8859/2 (Latin 2) .......................................................41
ISO 8859/3 (Latin 3) .......................................................42
ISO 8859/4 (Latin 4) .......................................................43
ISO 8859/5 (Latin/Cyrillic).............................................44
ISO 8859/6 (Latin/Arabic)..............................................45
ISO 8859/7 (Latin/Greek)...............................................46
ISO 8859/8 (Latin/Hebrew)............................................47
ISO 8859/9 (Latin 5) .......................................................48
ISO 8859/15 (Latin 9) .....................................................49
PC Standard Character Sets .............................................. 2
CS1 ..................................................................................... 2
CS2 ..................................................................................... 3
EPSON National Variations................................................ 4
IBM National Variations ...................................................... 5
USA (CP 437) .................................................................... 5
Greek (CP437-G)............................................................... 6
CP437 Slavic ..................................................................... 7
Multilanguage (CP850).................................................... 8
Greek (CP851)................................................................... 9
Latin2 (CP852)................................................................ 10
Turkish (CP853) ............................................................. 11
Russian (CP855) ............................................................. 12
Turkish (CP857) ............................................................. 13
Euro PC Multilingual (CP858)...................................... 14
Portuguese (CP860)........................................................ 15
Hebrew (CP862).............................................................. 16
French/Canadian (CP863) ............................................. 17
Arabic (CP864)................................................................ 18
Norwegian (CP865) ........................................................ 19
Cyrillic (CP866)............................................................... 20
Turkish (CP867) ............................................................. 21
OCR-A (CP876)............................................................... 22
OCR-B (CP877)............................................................... 23
Central Europe (CP1250) .............................................. 24
Cyrillic (CP1251)............................................................. 25
Windows Latin1 Ansi (CP1252).................................... 26
D-1
PC Standard Character Sets
CS1
D-2
CS2
D-3
EPSON National Variations
D-4
IBM National Variations
USA (CP 437)
D-5
Greek (CP437-G)
D-6
CP437 Slavic
D-7
Multilanguage (CP850)
D-8
Greek (CP851)
D-9
Latin2 (CP852)
D-10
Turkish (CP853)
D-11
Russian (CP855)
D-12
Turkish (CP857)
D-13
Euro PC Multilingual (CP858)
D-14
Portuguese (CP860)
D-15
Hebrew (CP862)
D-16
French/Canadian (CP863)
D-17
Arabic (CP864)
D-18
Norwegian (CP865)
D-19
Cyrillic (CP866)
D-20
Turkish (CP867)
D-21
OCR-A (CP876)
D-22
OCR-B (CP877)
D-23
Central Europe (CP1250)
D-24
Cyrillic (CP1251)
D-25
Windows Latin1 Ansi (CP1252)
D-26
GOST (Russian)
D-27
Mazowia
D-28
TASS (Cyrillic)
D-29
96Greek
D-30
Ku
D-31
Farsi Arabic (CP1098)
D-32
ID-12
D-33
ID-14
D-34
ID-17
D-35
Philip
D-36
Roman-8
D-37
Sanyo
D-38
Ukrainian
D-39
ISO 8859/1 (Latin 1)
D-40
ISO 8859/2 (Latin 2)
D-41
ISO 8859/3 (Latin 3)
D-42
ISO 8859/4 (Latin 4)
D-43
ISO 8859/5 (Latin/Cyrillic)
D-44
ISO 8859/6 (Latin/Arabic)
D-45
ISO 8859/7 (Latin/Greek)
D-46
ISO 8859/8 (Latin/Hebrew)
D-47
ISO 8859/9 (Latin 5)
D-48
ISO 8859/15 (Latin 9)
D-49
Appendix E – OLIVETTI Character Sets
CS000 – C010 International ...................................... E-2
CS020 Germany.......................................................... E-3
CS030 Portugal........................................................... E-4
CS040 Spain1 ............................................................. E-5
CS050 Denmark/Norway........................................... E-6
CS060 France ............................................................. E-7
CS070 Italy................................................................... E-8
CS080 Sweden/Portugal ........................................... E-9
CS090 Switzerland...................................................E-10
CS100 Great Britain .................................................E-11
CS110 USA Ascii......................................................E-12
CS140 Greece...........................................................E-13
CS150 Israel ..............................................................E-14
CS170 Spain 2 ..........................................................E-15
CS200 Yugoslavia....................................................E-16
CS410 Olivetti TCV 370 ...........................................E-17
CS510 SDC................................................................E-18
CS520 Turkey............................................................E-19
CS540 CIBC...............................................................E-20
CS680 OLI-UNIX .......................................................E-21
CS701 PC-220...........................................................E-22
CS711 PC-Denmark/Norway...................................E-23
CS712 PC-Denmark OPE ........................................E-24
CS771 PC-210 Greek ...............................................E-25
E-1
CS000 – C010 International
E-2
CS020 Germany
E-3
CS030 Portugal
E-4
CS040 Spain1
E-5
CS050 Denmark/Norway
E-6
CS060 France
E-7
CS070 Italy
E-8
CS080 Sweden/Portugal
E-9
CS090 Switzerland
E-10
CS100 Great Britain
E-11
CS110 USA ASCII
E-12
CS140 Greece
E-13
CS150 Israel
E-14
CS170 Spain 2
E-15
CS200 Yugoslavia
E-16
CS410 Olivetti TCV 370
E-17
CS510 SDC
E-18
CS520 Turkey
E-19
CS540 CIBC
E-20
CS680 OLI-UNIX
E-21
CS701 PC-220
E-22
CS711 PC-Denmark/Norway
E-23
CS712 PC-Denmark OPE
E-24
CS771 PC-210 Greek
E-25