Epson LQ-570 Quick Reference Guide

EPSON AMeRIc& INC.
Product Support Bulletin
EPSON
Subject: Date: 12/4/91
This bulletin provides detailed explainations and illustrations for some of the more commonly used printer commands used in ESC/P2 Listed below are the commands discussed in this bulletin.
Command
ESC X m n1 n2
ESC ( C m1 m2 n1 n1 Set Page Length in Defined Units ESC(v m1 m2 n1 n2 ESC(V m1 m2 n1 n2 ESCtn ESC ( t n1 n2 d1 d2 d3 ESC( A
Understanding and Using
Command Name Select Pitch and Point Size Set Relative Vertical Position
Set Absolute Vertical Position Select Character Table Assign Character Table
nln2d,.
.
Print Data as Characters
.&
ESCP/2
Commands and Syntax
PSB No: P-0082 Originator: JW
PSB Page
2 5 6 8
9 10 14
PSB No: P-0082 Page: 2 of 14
ESC X m n1 n2
C X m n1 a is
n2
are variables. The
spa&g. The
will always be 0 (zero). The variables
Thevaluesusedfor’m’ateO,l,18,21,24,30,36,4248,60,and72 usedasthevaluefor”m”,therewillbenochangeinpit~.
value far W, the character pitch will be proportional spacing. To determine the character then 360
m=30,
FortheRomanandSansSerifforrts,thevaiueausedfor’nimare0,16,20,TI,24, 28,3238,40,42,44,48,5238,8Oand84. “nlmare0,21,and42 l’heactualpaintsbthatwillprintisnl
example, if When select
the character pitch is 12 characters per inch.
selectina
twof3ortional
variable W” selects the point size and the variable
pit&
divided
nl=20, the
the
command for selecting pitch and point size
vadable W
for
all
other values of
by 60 equals 6 and the character pitch is 6 characters per inch. If
a
Doirft
wacina
point
size
size
laraer
tm=ll
(Select Pitch and Point Size)
is used to
In”
and
%I”,
divide 360 by
is 10. tf
than 24
for the
nl=48, the
(the
character me&.
where
select
ForaUotbrfonts,Utevaluesusedfor
the pitch, which is the character
“n2”,
91’
ate explained below.
lf”lVsusedasthe
For example, if
“m”.
didedby2
point
value for nl is treater than
size
is 24.
m, nl and
at this time,
tf’o”is
NOTE:
4&
rn=W
For
In the Basic programming language, the command would look like this.
LPRlf+lT spaced”
Ch6(27)
character size. At this time, n2 is
cHR$(n);*xll;CHRS(l);CHR$(48);~~~(o);”~his is 24 point proportional
is ESC,
cW(l) selects
proportional spacing,
m
zero (0).
chr$(48)
selects 24 point
PSB No: P-0082 Page: 3 of 14
10 INPUT “Point Siie”;A$ 20 B=VAL(A$)*2 21
RESTORE 70
22FORX=l 23READY
24
IF B=Y THEN GOT0
25NMTX
26CLS 27 PRINT A$ ” is not a valid point size choice.” 28
GOT0 10 30
C=VAL(A$) 40
LPRM CHR$(27);“X”;CHR$(l);CHR$(B);CHR$(O);”n‘lese
characters”
50
LPRtNT CHR$(27);“(V”;CHR$(2);CHR$(O);CHR$(C);CHR$(o)
60
GOT0 10 70
DATA
TO16
30
are
0,16,20,21,24,28,32,36,40,4~44,48,52,56,60,64
“;A$;”
point
Line 10 -allows you to specify the point size desired. Line 20 tine 21 -check to ensure that a valid point size was input
Line 30 - computes the value for
Line 40
Line 50
Line60-
NOTE: To hatt the program, hold down the
computes the value for
-
valid, the program jumps to line 30.
program prints a message on the screen and starts over again.
command. sends the “Set
-
pitch is set for proportional spacing for character spacing regardless of the point size.)
sends the “Set Relative Vertical Position” command to the printer. This
-
command advances the paper in preparation for printing the next line. causes the program to start again at the beginning.
Pitch
“nl”
in the ESC X command.
“nl ”
for advancing paper using the ESC ( v
and Point
tf
the point size is not valid, the
Size”
command to the printer. (Note: The
ail
point sizes to ensure proper
“CM
key and press the
tf
the point size is
“c”
key.
These are 8 point characters
These are 10 point characters These are 10.5 point characters
These are 12 point characters
These are 14 point characters
These are 16 point characters
PSB No: P-0082 Page: 4 of 14
These
These
are 18 point characters
are 20 point characters
These are 21 point characters
These are 22 point characters
These are 24 point characters
These are 26 point characters
These are 28 point characters
These are 30 point characters
These are 32 point characters
PSB No: P-0082 Page: 5 of 14
ESC ( C m1 m2 n1 n2 (Set Page Length in Defined Units
ESC ( C ml m2 nl n2 is the command for setting the page length in units where ml,
m2,
nl and n2 are variables. The
othenwise
ml =2 and To determine the values for n1 and n2 perform the following steps.
EXAMPLE
by the “ESC (
m2=0.
1.
Determine the desired page length in inches.
2
Multiply the page length by 380. Divide the result by 256 using long division.
3.
4.
The remainder in the quotient from step 3 is the value for n1.
The whole number in the quotient from step 3 is the value for n2.
5.
1.
The page length is 8.5
2
8.5 x 380 = 3060
3.
4.
5.
3080
nl=244 n2=11
divided
l.Y
command. Currently, the values for ml and m2 MUST be
by 258 =11 with
“uniV’
is usually
inches.
l/380
of an inch unless defined
a
remainder of 244.
II
In the Basic programming language, the command would look like this.
This command, as listed in the line above, will set the page length to 8.5 inches.
NOTE: The current line becomes the top of form. This command cancels any previously set top and bottom margin settings. margins via software command, the commands must be issued Length in Defined Units” command. The proper page length setting can be confirmed by issuing a “Form Feed” command, control panel while the printer is
chr$(l2),
“Cff Line”.
If
you wish to set the top and bottom
AFTER
or by pressing the “FF button on the
the
“Set
Page
Loading...
+ 11 hidden pages