Epson LQ-1500 User Manual - Page 107

Using the LQ-1500 Commands with BASIC, Control Codes by Function, <LF&gt

Page 107 highlights

Using the LQ-1500 Commands with BASIC Most versions of BASIC use the LPRINT command and the CHR$(n) function to send codes to the printer. In the CHR!$(n) function the value n is the number of the code that you want to send to the printer. For example, to set a right margin at column 60, the LQ-1500 command is: "Q" 60 In BASIC it looks like this: LPRINT CHR$(27) "Q" CHR$(60); Control Codes by Function Vertical Spacing Commands "J" n "0" Produces a line feed. Advances the paper n/180 inches (0 Sets the line spacing to 1/8 inch. n $255). "2" Sets the line spacing to 1/6 inch. "3" n "A" n Sets the line spacing to n/180 inch (0 n Sets the line spacing n/60 inches (0 255). n 85). "C" n "C" n Produces a form feed. Sets the length of the page to n lines (1 Sets the page length to n inches (1 n 127). 22). "N" n Sets a bottom margin of n lines (1 127). "O" Sets the bottom margin to 0 lines. "B" nl n2 n3. "/ " c "b" c nl n2 n3 Produces a vertical tab. Sets up to 16 vertical tabs on lines nl, n2, n3, etc. (l n 254). Selects a vertical tab channel (0 c s 7). Sets up to 16 vertical tabs on lines n1, n-2, n3, etc. of vertical tab channel c (0 c 7)(1 n 254). Horizontal Spacing Commands Produces a carriage return. "Q" n Sets a right margin at n columns (1 n 255). "I" n Sets the left margin at n columns (0 n 160). Produces a horizontal tab. "D" nl n2 n3 ... Sets up to 32 horizontal tabs at character positions n1. n2, n3, etc. (1 n 137). n "$" nl n2 " \ " nl n2 Increases the space between characters by n dots (0 n 127). Moves the print head to an absolute horizontal position. Moves the print head a specified distance from the last character printed. Print Style Commands "x" n "I" n "M" "P" "p" n Selects between the draft mode (n=0) and the letter-quality mode (n=l). Selects multiple printing styles (Master Select command) (0 n 255). Selects elite pitch. Cancels elite pitch. Turns proportional printing ON (n = 1) or proportional printing OFF (n=0).

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111

Using the LQ-1500 Commands with BASIC
Most versions of
BASIC use the LPRINT command and the CHR$(n) func-
tion to send codes to the printer. In the CHR!$(n) function the value n is the
number of the code that you want to send to the printer. For example, to set a
right margin
at
column 60, the LQ-1500 command is:
<ESC> “Q” 60
In
BASIC it looks like this:
LPRINT CHR$(27) “Q” CHR$(60);
Control Codes by Function
Vertical Spacing Commands
<LF>
<ESC> “J” n
<ESC> “0”
<ESC> “2”
<ESC> “3”
n
<ESC> “A”
n
<FF>
<ESC> “C” n
<ESC> “C” <NUL> n
<ESC> “N” n
<ESC> “O”
<VT>
<ESC> “B” nl n2 n3.
<ESC> “/
” c
<ESC> “b” c nl n2 n3
Produces a line feed.
Advances the paper n/180 inches (0
n
$255).
Sets the line spacing to 1/8 inch.
Sets the line spacing to
1/6
inch.
Sets the line spacing to n/180 inch (0
n
255).
Sets the line spacing n/60 inches (0
n
85).
Produces a form feed.
Sets the length of the page to n lines (1
n
127).
Sets the page length to n inches
(1
22).
Sets a bottom margin of
n
lines (1
127).
Sets the bottom margin to 0 lines.
Produces a vertical tab.
<NUL>
Sets up to 16 vertical tabs on lines
nl, n2,
n3, etc.
(l
n
254).
Selects a vertical tab channel (0
c s 7).
<NUL>
Sets up to 16 vertical tabs on lines n1, n-2, n3, etc. of vertical
tab channel c (0
c
7)(1
n
254).
Horizontal
Spacing Commands
<CR>
Produces a carriage return.
<ESC> “Q” n
Sets a right margin at n columns (1
n
255).
<ESC> "I" n
Sets the left margin at
n
columns (0
n
160).
<HT>
Produces a horizontal tab.
<ESC> “D” nl n2 n3 ... <NUL>
Sets up to 32 horizontal tabs at character positions
n1. n2, n3,
etc. (1
n
137).
<ESC> <SP> n
Increases the space between characters by n dots (0
n
127).
<ESC> "$" nl n2
Moves the print head to an absolute horizontal position.
<ESC>
” \ ” nl n2
Moves the print head a specified distance from the last charac-
ter printed.
Print Style Commands
<ESC> "x" n
Selects between the draft mode
(n=0)
and the letter-quality
mode (n=l).
<ESC> "I"
n
Selects multiple printing styles (Master Select command)
(0
n
255).
<ESC> "M”
Selects elite pitch.
<ESC> "P"
Cancels elite pitch.
<ESC> "p" n
Turns proportional printing ON
(n
= 1) or proportional print-
ing OFF (n=0).