This printer according to the IBM Proprinter XL 24-XL24AGM and EPSON LQ Seri es
emulations supports the following printer commands. Each command has the
following structure:
•
Name and function description.
•
Information about protocol:
•
The hexadecimal and decimal codes for the command: n represents variable
parameters of the command. The functions of these parameters are explained in
its corresponding command description
Prints all received data and the column counter is set to the left margin.
(IBM, EPSON)
ASCII CodeCR
Hexadecimal Value 0D
Decimal Value13
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). When the
printer is in parallel connection and in EPSON mode, a line feed is inserted
automatically after a ca rriage return if AUTO LF HOST selection (see “Printer Setup”
in the User Manual and the AUTOFEEDXT signa l is low. T his code resets the double
width printing set by SO code.
A-1
n
ESC ]
Sets a reverse line feed. (IBM)
ASCII CodeESC ]
Hexadecimal Value 1B 5D
Decimal Value27 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 da ta 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)
This is a terminator code; it therefore causes the current contents of the print buffer to
n
n
n
255
be printed out before performing a single line feed of n/180 inch. This command is
cancelled after the line feed has been performed. The printing will restart after a line
feed from the column at which the command was sent.
This is a terminator code; it therefore causes the current contents of the print buffer to
n
n
n
255
be printed out before performing a single line feed of n/216 inch. The units used by
this command can be changed by the set vertical units command ESC [ \.
LF
Line Feed. (IBM, EPSON)
ASCII CodeLF
Hexadecimal Value0A
Decimal Value10
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 v ertical spacing. I f 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 1st line of the next form or ejects a cut sheet, if loaded.
This code cancels the double width printing set by the S O c o de . In I BM m od e , t h e c o lu m n
counter is set to the 1St column if the automatic CR is selected. In EPSON mode, the column is
always set to the 1st column.
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.
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.
A-7
ESC 2
Enables the line spacing set by ESC A command. (IBM XL24)
This command starts line spacing at a value that was set by ESC A..
ESC 3
Sets n/180-inch line spacing. (IBM XL24 AGM, EPSON)
ASCII CodeESC 3
Hexadecimal Value 1B 33
Decimal Value27 51
Range0 < n <
This command sets the line spacing to n/180 inch. If the line spacing is changed, it
n
n
n
255
does not affect previous settings for vertical ta bs or page length.
ESC 3
Sets graphics line spacing at n/216 inch. (IBM XL24)
ASCII CodeESC 3
Hexadecimal Value 1B 33
Decimal Value27 51
Range0 < n <
This command sets graphics line spacing at n default unit defined by the ESC [ \
n
n
n
255
command. To move exactly n/216 inch, n must be an integer multiple of 3.
A-8
ESC 4
Sets top of form (first printable line). (IBM)
ASCII CodeESC 4
Hexadecimal Value 1B 34
Decimal Value27 52
This sequence sets the first line of the fanfold paper as the current paper position of
the form.
ESC A
Sets text line spacing at n/60 inch. (IBM XL24 AGM,EPSON)
ASCII CodeESC A
Hexadecimal Value1B 41
Decimal Value27 65
Range0 < n <
This command changes the default line spacing to n/60 inch. The new line spacing
n
n
n
85
value is immediately activated.
ESC A
Sets text line spacing at n/72 inch. (IBM XL24, EPSON)
ASCII CodeESC A
Hexadecimal Value1B 41
Decimal Value27 65
This command changes the line spacing to n/72 inch. The line spacing value is stored
n
n
n
and activated only after the ESC 2 code is received.
A-9
ESC B
Sets vertical tabs. (IBM, EPSON)
ASCII CodeESC B
Hexadecimal Value1B 42
Decimal Value27 66
Range1 < n <
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, n
n1 … n
... nx 00
n
1
... n
n
1
255
0
x
0
x
and so on in the
2
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 b y
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 b
Sets vertical tabs in VFU channels. (EPSON)
ASCII CodeESC b
Hexadecimal Value1B 62
Decimal Value27 98
Range m = channel
This command sets vertical tabs in one of the 8 VFU channels available. n1-n8 tab
m n1 … n
m n1 … n
m n1 … n
8
8
8
stops. Up to 16 tab stops can be set in each channel at the line specified by n1, n2 and
so on in numerical ascending order.
ESC C 0
Sets form length to n inches. (IBM, EPSON)
ASCII CodeESC C 0
Hexadecimal Value1B 43 00
Decimal Value27 67 0
Range1 < n <
This command sets the form length to the number of inches specified by n. The current
n
n
n
22
position of the paper is assumed as top of form. Setting the paper length cancels the
top and bottom-margin settings.
A-10
ESC C
Sets form length to n lines. (IBM, EPSON)
ASCII CodeESC C
Hexadecimal Value1B 43
Decimal Value27 67
Range1 < n <
This command sets the form length to the number of lines specified by n at the current
n
n
n
127
vertical spacing. The current posi tion of the paper is assumed as top of form.
ESC D
Sets horizontal tabs. (IBM, EPSON)
ASCII CodeESC D
Hexadecimal Value1B 44
Decimal Value27 68
Range1 < n <
This sequence sets up to 28 (IBM mode) or 32 (EPSON mode) horizontal tab stops
n1 n2 … nx 0
… nx 00
n
1 n2
… nx 0
n
1 n2
255
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
136.
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.
This command moves the print carriage of a (n1 + (n2*256))/120 inch displacement on
n1 n
n
n1, n
1 n2
n1 n
< 255
2
2
2
the left of its current dot position.
A-12
ESC l
Sets left margin (10 cpi). (EPSON)
ASCII CodeESC l
Hexadecimal Value1B 6C
Decimal Value27 108
Range0 < n <
This code sets the left margin at the current horizontal spacing . It must b e sent at the
n
n
n
255
beginning of the line. The n parameter specifies the number of columns. For each ty pe
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
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
Any value outside the accepted range is ig nored and the previous setting remains i n
effect. The left margin must be smaller than the ri ght margin. The physical position
set for the left margin does not change if the horizontal spacing is modified. This
command overrides the menu setting.
17 cpi
20 cpi
A-13
0 < n < 229
0 < n < 255
ESC N
Sets the skipover perforation to n lines. (IBM, EPSON)
ASCII CodeESC N
Hexadecimal Value1B 4E
Decimal Value27 78
Range1 < n <
1 < n < 225 (IBM mode)
The skipover perforation is the sum of top and bottom margins values at the sel ected
n
n
n
127 (EPSON mode)
vertical spacing. The n parameter must be less than the current form length. The
skipover is memorized as physical position on the page. It is cancelled by ESC O or
changing the form length.
The skipover value, when accepted, will set the top and bottom margins according to
the operator panel setting (see User Manual):
If the top margin set via operator panel is greater than the skipover value, then the
following value of the margins will be set:
If the top margin set via operator panel is less or equal to the skipover value, then
Top margin = skipover value
Bottom margin = 0
the following value of the margins will be set:
Top margin = operator panel value
If the sum of the top and bottom margins values set via operator panel is less than
Bottom margin = the difference between skipover v alue and top margin value
the skipover value, the following values for the margins will be set:
Top margin = operator panel value
Bottom margin = the difference between skipover v alue and top margin value
A-14
Changing the vertical spacing does not affect the skipover distance. This can be
changed by a further ESC N command or can be reset b y the ESC O command, which
resets the skipover value to 0.
The skipover 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 command, the skipover
perforation is cancelled and must therefore be set again.
This code sets the line length at the current horizontal spacing. It must be sent at the
n
n
n
255
beginning of the line. The n parameter specifi es the number of columns and for each
type of horizontal spacing there is a range of values, as shown in the following table:
A-15
Character Width
Horizontal Spacing
Range of columns
Double Width
Normal
Any value outside the accepted range is ignored and the prev ious setting remains in
5 cpi
6 cpi
7.5 cpi
8.5 cpi
10 cpi
10 cpi
12 cpi
15 cpi
17 cpi
20 cpi
1< n < 68
2 < n < 81
2 < n < 102
2 < n < 116
2 < n < 136
2 < n < 136
4 < n < 163
4 < n < 204
4 < n < 233
4 < n < 255
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)
ASCII CodeESC R
Hexadecimal Value1B 52
Decimal Value27 82
This command sets horizontal tab stops every eight columns starting from column 9
and cancels all vertical tab stops.
A-16
ESC SP
Sets intercharacter space. (EPSON)
ASCII CodeESC SP
Hexadecimal Value 1B 20
Decimal Value27 32
Range0 < n <
This command sets the intercharacter space to n/120 inch in Draft printing and n/180
n
n
n
255
inch in Quality printing.
ESC X
Sets left and right margins. (IBM)
ASCII CodeESC X
Hexadecimal Value 1B 58
Decimal Value27 88
Range0 <
This command specifies left and right margin positions. The n
n
n1 n
n1 n
1, n2
n1 n
< 255
2
2
2
and n
1
parameters
2
indicate respectively the number of columns for the left and right margins at the
current spacing. These margins are memorized in terms of absolute di spla cement from
the physical left edge of the page.
If n1 is equal to 0, the current left margin of the p age is us ed. 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 f or the r ight margin will be se t.
A-17
FF
Advances paper to the top of the next page. (IBM, EPSON)
ASCII CodeFF
Hexadecimal Value0C
Decimal Value12
This code is a terminator code, when receiv ed, causes al l data in the print buffer to be
printed out. Then it advances the paper to the first printable line of the next form. The
line counter is set to the first line value and the column counter is set to the left
margin value. This code cancels the double width printing set by SO code.
HT
Horizontal Tab. (IBM, EPSON)
ASCII CodeHT
Hexadecimal Value09
Decimal Value9
This code moves logically the print carriage to the next horizontal ta b 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-18
VT
Vertical Tab. (IBM, EPSON)
ASCII CodeVT
Hexadecimal Value0B
Decimal Value11
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-19
PPrriinntt MMoodde
e
DC2
Sets 10 cpi printing. (IBM)
ASCII CodeDC2
Hexadecimal Value 12
Decimal Value18
This is a terminator code. It causes all data present in the print buffer to be printed.
This command is accepted at any position w ithin the line. The character that follows
this command will be printed at 10 cpi. This command does not cancel doublewide
printing.
DC2
Cancels compressed printing. (EPSON)
ASCII CodeDC2
Hexadecimal Value12
Decimal Value18
This is a terminator code. It causes all data present in the pri nt buffer to b e pri nted. It
is accepted at any position within the line. The character that follows this command
will be printed as follows:
This command selects any combinati on of several attributes. The parameter n is the
n
n
n
255
sum up of the printing style values to be used. See the following table:
A-21
n
Style
0
1
2
4
8
16
32
64
128
To print the desiderated combination of pri nting attrib utes, calcul ate the n parameter
10 cpi
12 cpi
Proportional
Compressed
Emphasized
Double Strike
Double Width
Italic
Underlined
by adding up the values of each attribute.
ESC ( -
Sets score line. (EPSON)
ASCII CodeESC ( Hexadecimal Value 1B 28 2D
Decimal Value27 40 45
Range
This command enables/disables scoring of all characters and spaces following this
n
n
m
1 <
d
= 3
1
= 0
2
= 1
= 1
2
d
n1 n2 m d1 d
n1 n2 m d1 d
n1 n2 m d1 d
< 3
1
2
2
2
command according to the following parameters:
d
1
1
2
3
Line
Underline
Strikethrough
Overscore
A-22
d
2
Line
0
1
2
5
6
Any combination of scoring may be set simultaneously. Each type is independent of
Cancel score line
Single continuous line
Double continuous line
Single broken line
Double broken line
other types. Graphics characters are not scored.
ESC :
Sets 12 CPI. (IBM)
ASCII CodeESC :
Hexadecimal Value 1B 3A
Decimal Value27 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 <
Prints characters for one line from left to right. (EPSON)
ASCII CodeESC <
Hexadecimal Value 1B 3C
Decimal Value27 60
This command causes the printing of one line from left to right.
A-23
ESC [ @
Sets double high printing and double line feed. (IBM)
This command sets height, width and vertical spacing.
The l and h parameters specify the number of mode bytes mx contained in the
l h m1 m2 m3 m
l h m1 m2 m3 m
l h m1 m2 m3 m
4
4
4
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 control s the
character height.
m
0
1
2
3
Character Height
No change
Standard character height
Double character height
Line Spacing
No change
Line feeds unchanged
Line feeds unchanged
16
17
18
32
33
34
Character height unchanged
Standard character height
Double character height
Character height unchanged
Standard character height
Double character height
A-24
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-byt e is ignored.
m
0
1
2
4
Character Width
No change
Standard width character
Double width character
Line Spacing
No change
No change
No change
ESC _
Sets or cancels overscore printing. (IBM mode)
ASCII CodeESC _
Hexadecimal Value 1B 5F
Decimal Value27 95
Enables or disables the overscore printing. See the following table:
n
1
0
Overscore Printing
Enabled (all spaces and characters that follow are overscored)
Selects/deselects outline and shadow printing according to the parameters below:
n
n
n
3
n
0
1
2
3
Style
Normal
Outline
Shadow
Outline with Shadow
ESC a
Sets Letter Quality justification printing. (EPSON)
ASCII CodeESC a
Hexadecimal Value 1B 61
Decimal Value27 97
Range0 < n <
Selects from four types of justification, as follows:
n
n
n
3
A-26
n
Justification
0
1
2
3
Left
Centered
Right
allows an uniform printing between the margins when the buffer is full
ESC E
Sets emphasized printing. (IBM, EPSON)
ASCII CodeESC E
Hexadecimal Value1B 45
Decimal Value27 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, EPSON)
ASCII CodeESC F
Hexadecimal Value1B 46
Decimal Value27 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, EPSON)
ASCII CodeESC G
Hexadecimal Value1B 47
Decimal Value27 71
This command starts double-strike printi ng. ESC G must be canceled by ESC H.
A-27
ESC g
Sets 15 CPI. (EPSON)
ASCII CodeESC g
Hexadecimal Value 1B 67
Decimal Value27 103
Subsequent data will be printed at 15 cpi. This command is accepted at any position
within the line. 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, EPSON)
ASCII CodeESC H
Hexadecimal Value 1B 48
Decimal Value27 72
This command cancels double-strike pri nting with the ESC G command.
ESC I
Selects printing type for resident and DLL characters. (IBM)
ASCII CodeESC I
Hexadecimal Value 1B 49
Decimal Value27 73
This command selects the resident or the download font i n Draft o LQ printing mode.
n
n
n
It is ignored if you select a font that has not been downloaded or has been overwritten.
ASCII CodeESC M
Hexadecimal Value1B 4D
Decimal Value27 77
This command selects 12-cpi or 20-cpi character printing. If you change the pitch during proportional
mode (selected with the ESC p command) the change takes effect when the printer exits proportional
mode. The spacing is set to 20 cpi if the co mpressed printing has be en pr eviously selected by SI or ESC
SI command.
ESC P
Selects 10 or 17 cpi. (EPSON)
ASCII CodeESC P
Hexadecimal Value 1B 50
Decimal Value27 80
n
n
n
This command selects 10-cpi or 17-cpi character printing. If you change the pitch
during proportional mode (selected with the ESC p comma nd) the change takes effect
when the printer exits proportional mode. The spacing is set to 17 cpi if the
compressed printing has been previously selected by SI or ESC SI command.
A-29
ESC P
Sets or cancels proportional printing. (IBM)
ASCII CodeESC P
Hexadecimal Value 1B 50
Decimal Value27 80
This code is a terminator code; when receiv ed it causes all data in the print buffer to
n
n
n
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.
ESC p
Sets or cancels proportional printing. (EPSON)
ASCII CodeESC p
Hexadecimal Value 1B 70
Decimal Value27 112
This command selects the proportional or fixed spacing according to the following
n
n
n
values:
n
0
1
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.
Proportional Printing
Returns to current fixed character pitch
Selects proportional character spacing
A-30
ESC S
Sets subscript or superscript printing. (IBM, EPSON)
ASCII CodeESC S
Hexadecimal Value 1B 53
Decimal Value27 83
Selects the subscript or the superscript printing. See the following table:
n
1
0
The proportional printing of the subscript or superscript characters is performed at 2/3
Selection
Subscript Print enabled
Superscript Print enabled
n
n
n
of the proportional character width. Use the ESC T command to cancel super/subscript
printing.
ESC SI
Selects condensed mode. (IBM, EPSON)
ASCII CodeESC SI
Hexadecimal Value 1B 0F
Decimal Value27 15
This command selects the condensed mode in which character width is reduced as
follows:
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.
ESC s
Sets and resets Quiet printing. (EPSON)
ASCII CodeESC s
Hexadecimal Value1B 73
Decimal Value27 115
This command controls printing speed as follows:
n
0
1
Selection
Normal speed printing
Quiet speed printing
n
n
n
ESC T
Cancels subscript or superscript printing. (IBM, EPSON)
ASCII CodeESC T
Hexadecimal Value1B 54
Decimal Value27 84
This command cancels subscript or superscript pri nting selected by ESC S command.
A-32
ESC W
Sets or cancels double width printing. (IBM, EPSON)
ASCII CodeESC W
Hexadecimal Value 1B 57
Decimal Value27 87
Range0 < n <
Enables or disables the double width printing. See the following table:
n
1
0
Selection
Double Width Printing enabled
Double Width Printing disabled
n
n
n
1
ESC w
Sets or cancels double height printing. (EPSON)
ASCII CodeESC w
Hexadecimal Value 1B 77
Decimal Value27 119
Range0 < n <
Enables or disables the double-height printing of all characters. The first line of a page is
n
n
n
255
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
1
0
Selection
Double Height Printing enabled
Double Height Printing disabled
A-33
ESC x
Selects Letter Quality or Draft printing. (EPSON)
ASCII CodeESC x
Hexadecimal Value1B 78
Decimal Value27 120
This command selects either LQ or Draft printi ng according to the following va lues:
n
n
n
n
0
1
If you select proportional spacing w ith the ESC p command during Draft pri nting, the
Selection
Draft printing
Letter Quality printing
printer prints an LQ font instead. When you cancel proportional spacing wi th the ESC
p command, the printer returns to Draft printing.
ESC y
Selects yellow ribbon band. (IBM)
ASCII CodeESC y
Hexadecimal Value 1B 79
Decimal Value27 121
SI
Sets condensed printing. (IBM, EPSON)
ASCII CodeSI
Hexadecimal ValueOF
Decimal Value15
This command selects the condensed mode in which character width is reduced as follows:
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.
This command prints the next n1 + n2 x 256 characters from the table of all printable
n1
n2
n1 n
n
1 n2
n1 n
< 255
< 255
2
2
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)
ASCII CodeESC ^
Hexadecimal Value 1B 5E
Decimal Value27 94
Range0 < n <
This command prints the next character from the a ll characters table. Thi s sequence
n
n
n
255
prints only one character from the all character table.
ESC 6
Selects the Character Set 2. (EPSON, IBM)
ASCII CodeESC 6
Hexadecimal Value 1B 36
Decimal Value27 54
This command selects the character set 2.
A-37
ESC 7
Selects the Character Set 1. (EPSON, IBM)
ASCII CodeESC 7
Hexadecimal Value 1B 37
Decimal Value27 55
This command selects the character set 1.
ESC k
Selects LQ fonts. (EPSON)
ASCII CodeESC k
Hexadecimal Value1B 6B
Decimal Value27 107
Selects one of the available fonts in Letter Quality mode. See the following table:
n
0
1
2
3
4
5
6
7
11
If the Draft mode is selected when this command is sent, the new LQ font will be
The data within brackets above is repeated for each character you define.
The parameters in the command have the following meaning:
n and m
The n and m parameters are two decimal numb ers that define the first
and the last characters to be replaced in the character set in use.
a
0
a
1
a
2
d1 ...d
Maximum character width (height x wi dth):
Print quality
Draft
LQ
n
It sets space to the left of each proportional user-defined character.
Actual width of user-defined characters.
It sets space to the right of each proportional user-defined.
They are the character data that is printed.
10 cpi
24 x 12 24 x 10
Normal size
Super/subscript 16 x 36 16 x 30
24 x 36 24 x 30
12 cpi
ESC :
Copies characters from ROM to RAM. (EPSON)
ASCII CodeESC :
Hexadecimal Value 1B 3A 00
Decimal Value27 58
Range0 < n <
m
NUL n m
n m
n m
127
= 0
15 cpi
24 x 8
24 x 24
16 x 24
Proportional
Not available
24 x 42
16 x 42
This code copies the character generator in ROM into RAM area dedicated to the userdefined characters. The n parameter represents the LQ typestyle.
A-41
n
n
0
0
1
3
5
7
Before copying ROM characters to RAM, cancel ita li cs wi th the ESC 5 command. After
copying you can itali cize characters by sending the ESC 4 command.
ESC =
Defines downloaded characters. (IBM)
ASCII CodeESC = n
Hexadecimal Value1B 3D n
Decimal Value27 61 n
This sequence allows you to design and then down-line load special characters not
m id p t
m id p t
m id p t
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 char acter is a grap hic charac ter (connec ts at 6 lpi)
0: indicates that the character is an alphanumerical character
A-42
- Bit 6
0: indicates a DLL character
- Bit 5 to 0
1: indicates a resident character
These 6 bits indicate the effective number of dot columns of the
character shape stored in memory.
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 i s 10 dots and bi t 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.
A-43
- Bit 5 to 9
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:
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.
A-44
BBiitt--IImmaagge
e
ESC *
Sets dot graphics printing. (IBM XL24 AGM, EPSON)
ASCII CodeESC *
Hexadecimal Value1B 2A m
Decimal Value27 42 m
= 0,1,2,3,4,6,32,33,38,39,40
m
< 255
0 <
n
1
0 <
< 12
n
2
This command prints dot-graphics in 8-dot columns or 24-dot columns, depending on
m n1 n
2
n1 n2 d1.. d
n1 n2 d1.. d
d1.. d
x
x
x
the following parameters:
m
n1, n
2
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))
(number of dot columns)
256
(number of dot columns)
256
d1 … d
n2 = INT
n1 = MOD
Bytes of graphics data; x is determined by multiplying the total number
x
of columns times the number of bytes required for each column. See the
following table :
This command sends data for dot matrix graphics to the printer and allows the
selection of eight modes for both 8-wire g raphics 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-47
m (mode)
Mode is a one-byte value to select the graphics mode. Modes have a
vertical wire count (8 or 24) a nd a horizontal densi ty in dots per i nch.
See the following table:
Mode
0
1
2
3
8
9
11
12
data
For 8-wire modes, it is arrang ed 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 1
Horizontal Density
60
120
120
240
60
120
180
360
The graphic data is organized by byte.
Wires
8
8
8
8
24
24
24
24
Description
Same as ESC K graphic command
Same as ESC L graphic command
Same as ESC Y graphic command
Same as ESC Z graphic command
Same as ESC * (32)
Same as ESC * (33)
Same as ESC * (39)
Same as ESC * (40)
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.
st
A-48
ESC K
Normal density dot graphics printing (60 dpi). (IBM, EPSON)
Terminator code. This command prints dot gra phics at 60 horizontal dot per inch b y
n1 n2 p1 p2... p
n1 n2 p1 p2... p
n1 n
2 p 1 p2
< 255
n1
< 31
n
2
... p
x
x
x
60 vertical dpi. Th e parameter values should be calculated as follows:
n
n
p 1
1
2
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.
p
2
Sum of the values corresponding to the dots that should be printed in the
second column of the graphics pattern.
p
x
Sum of the values corresponding to the dots that should be printed in the
last column of the graphics pattern.
ESC L
Double density dot graphics p rinting (120 dpi). (IBM, EPSON)
ASCII CodeESC L
Hexadecimal Value 1B 4C
Decimal Value27 76
Range0 <
n1
0 <
n
2
0 < p < 255
n
1 n2 p1 p2
n
1 n2 p1 p2
n1 n
< 255
< 31
2 p 1 p2
... p
... p
... p
x
x
x
Terminator code. This command prints dot graphics at 120 horizontal dot per inch by
60 vertical dpi. Th e parameter values should be calculated as follows:
A-49
n
1
n
2
Remainder of the number of column divided by 256.
Integer result of the previous division.
p 1
Sum of the values corresponding to the dots that should be printed in
the first column of the graphics pattern.
p
2
Sum of the values corresponding to the dots that should be printed in
the second column of the graphics pattern.
p
x
Sum of the values corresponding to the dots that should be printed in
the last column of the graphics pattern.
ESC Y
Double density dot graphics printing at double-speed graphics (120 virtual
dpi). (IBM, EPSON)
Terminator code. This command prints dot graphics at 240 horizontal dot per inch by
n1 n2 p1 p2... p
n1 n2 p1 p2... p
n1 n
< 255
n1
0 <
< 31
n
2
0 < p < 255
2 p 1 p2
... p
x
x
x
60 vertical dpi. Th e parameter values should be calculated as follows:
n
n
p 1
1
2
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.
p
2
Sum of the values corresponding to the dots that should be printed in
the second column of the graphics pattern.
A-51
DDaattaa IInnppuutt CCoonnttrrool
l
CAN
Cancels line. (EPSON)
ASCII CodeCAN
Hexadecimal Value 18
Decimal Value24
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)
ASCII CodeCAN
Hexadecimal Value 18
Decimal Value24
This code clears all data stored in the preceding print buffer but does not cha nge the
current print position.
DC1
Selects printer. (IBM)
ASCII CodeDC1
Hexadecimal Value11
Decimal Value17
This command causes the printer to be enabled after it has been disabled by the ESC
Q 35 command.
A-52
DC1
Selects printer. (EPSON)
ASCII CodeDC1
Hexadecimal Value11
Decimal Value17
This command causes the printer to be enabled after it has been disabled by the DC3
command.
DC3
Deselects printer. (EPSON)
ASCII CodeDC3
Hexadecimal Value13
Decimal Value19
This code deselects the printer. The printer remains desel ected until it recei ves a DC1
command or power is turned off then on again. The printer ignores the ESC @
command (initialize printer) when it is deselected.
ESC #
Cancels MSB control. (EPSON)
ASCII CodeESC #
Hexadecimal Value 1B 23
Decimal Value27 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.
A-53
ESC =
Sets MSB to 0. (EPSON)
ASCII CodeESC =
Hexadecimal Value 1B 3D
Decimal Value27 61
This command sets the Most Significant bit (bit number 7) of all incoming data to 0.
All data is affected including graphics data.
ESC >
Sets MSB to 1. (EPSON)
ASCII CodeESC >
Hexadecimal Value1B 3E
Decimal Value27 62
This command sets the Most Significant bit (bit number 7) of all incoming data to 1.
All data is affected including graphics data.
This sequence tells the printer not to accept data from the host. The host must reset
n
n
n
the printer or select the printer by using DC1 (Select Printer) to accept data. To
deselect the printer, use ESC Q35.
A-54
MMiisscceellllaanneeoouus
s
BEL
Buzzer. (EPSON)
ASCII CodeBEL
Hexadecimal Value07
Decimal Value7
This code sounds the printer’s buzzer (for about 0.25 seconds).
BS
Print and space back one position. (IBM, EPSON)
ASCII CodeBS
Hexadecimal Value 08
Decimal Value8
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 the print position
moves to the left of the left margin.
ESC @
Initializes the printer. (EPSON)
ASCII CodeESC @
Hexadecimal Value 1B 40
Decimal Value27 64
This sequence causes the printer to be initialized and resets the printer to its default settings.
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 CodeDC4 DC4 ESC A
Hexadecimal Value 14 14 1B 41
Decimal Value20 20 27 65
This is terminator code and therefore causes the current contents of the print buffer to
n
n
n
be printed out. Then, the subsequent characters will be printed at the horizontal
spacing specified by the n parameter.
n
4
5
6
7
Spacing
15 cpi
17 cpi
20 cpi
24 cpi
A-58
AAuuttoommaattiicc SShheeeett FFeeeeddeer
r
ESC EM
Loading/ejection of paper. (EPSON)
ASCII CodeESC EM
Hexadecimal Value 1B 19
Decimal Value27 25
This command controls cut sheet feeding (ASF) according to the parameters below:
n
n
n
n
0
1
2
4
Description
Disables ASF and the printer (off line) after ejecting cut sheet
Enables the ASF and selects Bin 1
Enables the ASF and selects Bin 2
The ASF is enabled and the previous default bin is selected
//n//
ASF and Bin selection. (Compuprint)
ASCII Code//n//
Hexadecimal Value 2F 2F n 2F 2F
Decimal Value47 47 n 47 47
This command must start and finish with a CR, a LF or both; otherwise it will be
handled as if it were printable data.
n
1
2
C
Effect
Selects bin 1
Selects bin 2
Selects bin 1 once then bin 2. First sheet fed from bin 1 and following
from bin 2.
E
Selects envelope tray
R
Ejects the sheet without selecting
A-59
NNaattiivvee CChhaarraacctteerr SSeet
t
DC4 DC4 ESC g
Selects LQ fonts (Compuprint).
ASCII CodeDC4 DC4 ESC g n
Hexadecimal Value14 14 1B 67
Decimal Value20 20 27 103
n
n
n
0
1
2
3
4
5
6
7
11
If the down-line loading is selected, the command is stored and will be activated as
ISO 8859/2 Latin 2
ISO 8859/3 Latin 3
ISO 8859/4 Latin 4
ISO 8859/5 Latin/Cyrillic
ISO 8859/6 Latin/Arabic
ISO 8859/7 Latin/Greek
ISO 8859/8 Latin/Hebrew
ISO 8859/9 Latin 5
ISO 8859/15 Latin 9
CP 437 USA
CP 850 Multilingual
CP 860 Portugal
CP 863 Canada/France
13-digits European Article Nu mbering
Universal Product Code Type A
8-digits European Article Numb ering
Code 2 of 5 Interleaved
Code 2 of 5 Industrial
Code 2 of 5 Matrix
Code 3 of 9
8-digits European Article Numb ering
Codabar (all types)
Code 128
USPS-PostNet
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
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
Selection
No rotation
Rotation at 0°
Rotation at 90°
Rotation at 180°
Rotation at 270°
Selection
0
1
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
1/60”
1/180”
A-64
BBaarr CCooddee DDeessccrriippttiioon
n
EAN-8
EAN-13
UPC-A
DC4 DC4 ESC!
The EAN-8 bar code data field must only contain numeric data, and
n 1 p EM
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 C har acter s ar e to be pr inted , 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.
DC4 DC4 ESC!
The EAN-13 bar code data field must only contain numeric data, and
n 2 p EM
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.
DC4 DC4 ESC!
The UPC-A bar code data field allows 10 numeric characters plus one
n 3 p EM
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 ar e 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.
A-65
2 of 5
Interleaved
DC4 DC4 ESC!
The 2/5-INTERLEAVED bar code does not have a defined format
n 17 p EM
length. However, the total sum of the characters must be even. n
indicates the bar code height and must be i n 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.
2 of 5
Industrial
2 of 5 Matrix
DC4 DC4 ESC !
The 2/5 INDUSTRIAL bar code. Data format length is variable and
n 18 p EM
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.
DC4 DC4 ESC !
The 2/5 MATRIX bar code. Data format length is variable and the
n 19 p EM
supported character set only provides ASCII numeric figures 0 to 9. N
indicates the bar code height in units of 1/6 inch a nd must be in the
range 1 to 12. The parameter p must be NUL (hex. 00) if no Huma n
Readable Characters are to be printed, and 1 (hex. 01) if they are to
be printed.
A-66
Code 39
DC4 DC4 ESC !
The CODE 39 bar code. Data format length is variable and must
n 20 p EM
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
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 -.
SPACE $ / + % * ( as start / stop character)
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 NU L (hex.
00) if no Human Readable Characters are to be printed, and 1 (hex.
01) if they are to be printed.
CODABAR
DC4 DC4 ESC!
The Codabar bar code data fields do not have a defined format
n 22 p EM
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 possib le.
A-67
CODE 128
DC4 DC4 ESC !
The CODE-128 bar code data fields do not have a defined format
n 23 p EM
length and contain data belonging to the standard ASCI I 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 pa rt 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!
The POSTNET bar code data fields contain onl y numeric data and
n 24 p EM
do not have a defined format length. PO STNET 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.
This sequence causes the bar code symbol to be printed according to the previous
12
0 < p < 1
n1 data GS n2 data ... EM
data ... 19
n
1
data... 25
n
1
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.