Ptx_prm_lg_172288a Ptx Prm Lg 172288a
ptx_prm_lg_172288a ptx_prm_lg_172288a
ptx_prm_lg_172288a ptx_prm_lg_172288a
ptx_prm_lg_172288a ptx_prm_lg_172288a
User Manual: ptx_prm_lg_172288a
Open the PDF directly: View PDF
.
Page Count: 310
| Download | |
| Open PDF In Browser | View PDF |
®
LG Programmer’s Reference Manual
The Printronix P5000 series with DEC LG Emulation
The Printronix P5000 series with DEC LG Emulation
LG Programmer’s Reference Manual
®
172288-001, Rev A
Trademark Acknowledgements
Trademark Acknowledgements
ANSI is a registered trademark of American National Standards Institute, Inc.
Code V is a trademark of Quality Micro Systems.
Chatillon is a trademark of John Chatillon & Sons, Inc.
ENERGY STAR® is a registered trademark of the United States
Environmental Protection Agency. As an ENERGY STAR® Partner,
Printronix has determined that this product meets the ENERGY STAR®
guidelines for energy efficiency.
Ethernet is a trademark of Xerox Corporation.
IBM is a registered trademark of International Business Machines
Corporation.
IGP is a registered trademark of Printronix, Inc.
Intelligent Printer Data Stream and IPDS are trademarks of International
Business Machines Corporation.
LinePrinter Plus is a registered trademark of Printronix, Inc.
MS-DOS is a registered trademark of Microsoft Corporation.
PC-DOS is a trademark of International Business Machines Corporation.
PGL is a registered trademark of Printronix, Inc.
PrintNet is a registered trademark of Printronix, Inc.
Printronix is a registered trademark of Printronix, Inc.
PSA is a trademark of Printronix, Inc.
QMS is a registered trademark of Quality Micro Systems.
RibbonMinder is a trademark of Printronix, Inc.
SureStak is a trademark of Printronix, Inc.
Thermaline is a registered trademark of Printronix, Inc.
Torx is a registered trademark of Camcar/Textron Inc.
Utica is a registered trademark of Cooper Power Tools.
Printronix, Inc. makes no representations or warranties of any kind regarding
this material, including, but not limited to, implied warranties of
merchantability and fitness for a particular purpose. Printronix, Inc. shall not
be held responsible for errors contained herein or any omissions from this
material or for any damages, whether direct, indirect, incidental or
consequential, in connection with the furnishing, distribution, performance or
use of this material. The information in this manual is subject to change
without notice.
This document contains proprietary information protected by copyright. No
part of this document may be reproduced, copied, translated or incorporated
in any other material in any form or by any means, whether manual, graphic,
electronic, mechanical or otherwise, without the prior written consent of
Printronix, Inc.
All rights reserved.
Use of the term “LG Emulation” is to indicate compatibility with products from
Digital Equipment Corporation. No claim of affiliation with Digital Equipment
Corporation or Compaq Computer Corporation is made.
COPYRIGHT © 2000, PRINTRONIX, INC.
Table of Contents
1 Introduction......................................................... 13
About This Manual............................................................................... 13
How to Use This Manual ............................................................... 13
The LGplus Line Matrix Printer ............................................................ 14
Printer Features ................................................................................... 15
Printer Emulations ......................................................................... 15
Text Formatting and Language Options........................................ 15
Bar Code Formatting .................................................................... 16
Diagnostics.................................................................................... 16
Printing Speed ..................................................................................... 16
2 LG Emulation Control Codes.............................. 17
LG Emulation ....................................................................................... 17
Bar Code Printing .............................................................................. 17
Print Mode and Plot Mode ................................................................... 18
Optimizing Print Mode ......................................................................... 19
Optimizing Plot Mode........................................................................... 19
Character Printing................................................................................ 19
DEC Multinational Character Set......................................................... 21
Selecting Graphic Character Sets ....................................................... 22
Control Code Types ............................................................................ 23
Special Parsing Requirements ........................................................... 32
Control Code Description Format ....................................................... 34
Control Code Index.............................................................................. 35
Set/Reset Mode ................................................................................. 40
Line Feed/New Line Mode (LNM) ...................................................... 41
Carriage Return/New Line Mode (DECCRNLM) ................................. 42
Autowrap Mode (DECAWM) ............................................................... 43
Pitch Select Mode (DECPSM) ........................................................... 44
Set Page Orientation (DECSPO) ....................................................... 45
Position Unit Mode (PUM) ................................................................. 46
Force Plot Mode (DECFPM) .............................................................. 47
Select Size Unit (SSU) ....................................................................... 48
Graphic Size Selection (GSS) ............................................................ 49
Graphic Size Modification (GSM)
................................................... 50
Setting Plot Density .......................................................................... 51
Table of Contents
Set Graphics Density (DECSGD) ..................................................
52
Spacing .............................................................................................. 54
Spacing Pitch Increment (SPI) ............................................................ 55
Select Vertical (Line) Spacing (SVS) ................................................. 57
Set Vertical Pitch (DECVERP) ........................................................... 58
Select Horizontal (Character) Spacing (SHS) ..................................... 59
Set Horizontal Pitch (DECSHORP) ................................................... 60
Vertical Format .................................................................................. 61
Load Vertical Format Unit (VFU) ..................................................... 62
End Load (VFU) ............................................................................... 63
Channel Command ............................................................................. 64
Forms .................................................................................................. 66
Loading Forms Sequence (DECLFM) ................................................. 67
Form Types ........................................................................................ 71
Start Forms Sequence (DECIFM) ...................................................... 72
Terminate Forms Sequence (DECTFM) ............................................ 73
Delete Forms Sequence (DECDFM) ................................................. 73
Forms Considerations.......................................................................... 74
Request Forms Status (DECFMSR) .................................................. 75
Form Status Report (DECRFMS) ...................................................... 75
Logos ................................................................................................... 76
Loading Logos Sequence (DECLLG) ................................................ 76
Select Logo Sequence (DECILG) ...................................................... 78
Deleting Logos Sequence (DECDLG) ............................................... 78
Request Logo Status (DECRLGS) .................................................... 79
Logo Status Report (DECLGSR) ....................................................... 79
Page Print Area and Margins ............................................................. 80
Changing the Print Area .................................................................... 81
Page Format Select (PFS)................................................................... 82
Set Lines Per Physical Page (DECSLPP) ......................................... 86
Set Top and Bottom Margins (DECSTBM) ........................................ 87
Set Left and Right Margins (DECSLRM) ........................................... 88
Active Column and Active Line (Cursor Motion) ................................ 89
Forward Index (IND) .......................................................................... 89
Reverse Index (RI) ............................................................................. 90
Next Line (NEL) ................................................................................. 90
Horizontal Position Absolute (HPA) ................................................... 91
Horizontal Position Relative (HPR) .................................................... 91
Horizontal Position Backward (HPB) ................................................. 92
Vertical Position Absolute (VPA) ....................................................... 92
Vertical Position Relative (VPR) ........................................................ 93
Vertical Position Backward (VPB) ...................................................... 93
Table of Contents
Cursor Up (CUU) ............................................................................... 94
Partial Line Up (PLU) - Superscripting ............................................... 94
Partial Line Down (PLD) - Subscripting ............................................. 95
Tab Stops .......................................................................................... 95
Set Horizontal Tab Stops (DECSHTS) .............................................. 96
Horizontal Tab Stops (HTS) ............................................................... 97
Set Vertical Tab Stops (DECSVTS) ................................................... 97
Vertical Tab Stops (VTS) ................................................................... 98
Tab Clear (TBC) ................................................................................ 98
Character Set Selection ..................................................................... 99
Select Character Set Sequences (SCS) .......................................... 100
Assign User Preference Supplemental Set (DECAUPSS) ............... 102
Product Identification (DA) ............................................................... 104
Printer Status Requests and Reports .............................................. 104
Device Status Requests (DSRs) and Printer Responses ................ 105
Assigning and Selecting Font Files .................................................. 109
Assign Type Family or Font (DECATFF) ......................................... 110
Selecting Fonts for Printing (SGR) .................................................. 112
Deleting Fonts from RAM (DECLFF) ............................................... 113
Font Status Sequences ................................................................... 113
Request Font Status (DECRFS) ...................................................... 114
Font Status Report (DECFSR) ........................................................ 115
Character Attributes (SGR) .............................................................. 116
Character Expansion (GSM) ............................................................ 117
Bold Printing .................................................................................... 119
Crossed-Out Text ............................................................................ 120
Double Underlined Text ................................................................... 121
Italic Printing .................................................................................... 121
Overlined ......................................................................................... 122
Turn Off All Attributes
................................................................... 122
Underlined Text ............................................................................... 123
Justification (JFY) ............................................................................ 124
Sixel Graphics Processing ............................................................... 126
Character Processing in Sixel Graphics Mode .................................. 130
Drawing Vectors (DECVEC) ............................................................ 137
Block Characters ............................................................................. 138
Setting Block Character Parameters (DECBCS) ............................. 138
Start Block Character Mode (DECBLOCKC) .................................... 140
Stop Block Character Mode .............................................................. 140
Reset to Initial State (RIS) ................................................................. 141
Soft Terminal Reset (DECSTR) ........................................................ 141
Selecting LinePrinter Plus Emulations via DECIPEM........................ 142
Table of Contents
Selecting LinePrinter Plus Emulations via SOCS ............................. 143
7-Bit and 8-Bit Transmissions and Interpretations ............................ 144
Enter Draft Mode .............................................................................. 145
Exit Draft Mode ................................................................................. 145
Default Values and States ................................................................ 146
3 Character Sets .................................................. 151
Introduction ........................................................................................ 151
Selecting the Character Set and Language....................................... 151
OCR-A and OCR-B ..................................................................... 151
ASCII Character Set.................................................................... 152
DEC Multinational Character Sets .............................................. 155
Additional ISO and Special Character Sets ................................ 161
4 Bar Codes ......................................................... 203
Bar Codes ......................................................................................... 203
Select Bar Codes Attributes Sequence (DECSBCA) ........................ 203
Start Bar Coding (DECBARC) .......................................................... 207
Stop Bar Coding (Return from Other Coding System: ROCS) .......... 207
Bar Code Characteristics ................................................................. 208
Number of Bars per Character .................................................... 208
START, STOP, and CENTER Code Characters ....................... 209
Quiet Zone ................................................................................ 209
Intercharacter Gap .................................................................... 209
Number of Characters in a Bar Code .......................................... 209
Checksums ............................................................................... 209
Parity ......................................................................................... 209
Multiple Bar Codes ..................................................................... 210
Bar Code Styles ............................................................................... 211
Code 39 ........................................................................................... 211
Extended Code 39 ........................................................................... 211
Code 11 ........................................................................................... 213
Codabar a/t ...................................................................................... 213
Codabar b/n ..................................................................................... 214
Codabar c/* ...................................................................................... 214
Codabar d/e ..................................................................................... 215
EAN-8 .............................................................................................. 215
EAN-13 ............................................................................................ 216
Interleaved 2 of 5 ............................................................................. 216
UPC-A .............................................................................................. 217
UPC-E .............................................................................................. 218
Postnet .............................................................................................. 220
Code 128 - USS................................................................................. 220
Table of Contents
Code 128 - UCC ............................................................................... 228
Density and Spacing Between Bar Codes ........................................ 229
A LG Emulation
Character Sets....................................................... 231
Introduction ........................................................................................ 231
LG Emulation Character Set Charts .................................................. 231
U.S. ASCII ................................................................................... 238
DEC Finnish ................................................................................ 239
French ......................................................................................... 240
DEC French Canadian ................................................................ 241
German ....................................................................................... 242
Italian........................................................................................... 243
JIS Roman .................................................................................. 244
DEC Norwegian/Danish .............................................................. 245
Spanish ....................................................................................... 246
DEC Swedish .............................................................................. 247
DEC Great Britain ....................................................................... 248
ISO Norwegian/Danish................................................................ 249
DEC Dutch .................................................................................. 250
DEC Swiss .................................................................................. 251
DEC Portuguese ......................................................................... 252
VT100 Graphics .......................................................................... 253
DEC Supplemental...................................................................... 254
DEC Technical ............................................................................ 255
ISO Katakana .............................................................................. 256
7-Bit Hebrew ............................................................................... 257
7-Bit Turkish ................................................................................ 258
Greek Supplemental ................................................................... 259
Hebrew Supplemental ................................................................. 260
Turkish Supplemental ................................................................. 261
LG Emulation 96-Character Sets....................................................... 262
ISO Latin 1 .................................................................................. 263
ISO Latin 2 .................................................................................. 264
ISO Latin 5 .................................................................................. 265
ISO Latin 9 .................................................................................. 266
ISO Cyrillic .................................................................................. 267
ISO Greek ................................................................................... 268
ISO Hebrew................................................................................. 269
Table of Contents
B Interface Configuration with the VMS Operating
System ................................................................... 271
Parallel Interface................................................................................ 271
Serial Interface................................................................................... 272
C Type Family IDs, Font IDs, Font File IDs ......... 273
“Built-In" Font File IDs........................................................................ 273
Font File ID Field Definitions ............................................................. 274
Type Family IDs................................................................................. 275
Font File IDs ...................................................................................... 275
D Print Samples ................................................... 283
Introduction ........................................................................................ 283
Creating Block Characters................................................................. 283
Bar Codes.......................................................................................... 285
Logos ................................................................................................. 287
Sixel Graphics.................................................................................... 288
Forms................................................................................................. 289
Vertical Format Unit (VFU) ................................................................ 294
E Glossary ........................................................... 295
1
Introduction
About This Manual
This manual is designed so that you can quickly find the information you need
to program the Printronix DEC LG emulation that is provided with your printer.
Brief descriptions follow for each chapter in this book:
•
Chapter 1, “Introduction.” Provides an overview of this book, printer
features, and line matrix printing technology.
•
Chapter 2, “LG Emulation Control Codes.” Describes the LG
emulation control code commands that can be sent to the printer through
the host data stream. These commands allow you to send instructions to
the printer and configure many LG emulation parameters.
•
Chapter 3, “Character Sets.” Includes tables that list the hexadecimal
and decimal codes for the foreign language and special character sets
provided by the LG emulation.
•
Chapter 4, “Bar Codes.” Lists and describes the LG emulation control
codes used for printing bar codes.
•
Appendices. Several appendices provide character set charts for the LG
emulation, and information on configuring the VMS™ operating system
for use with the DEC LG printer.
How to Use This Manual
You can locate information three ways:
•
•
•
Use the Table of Contents at the front of the manual.
Use the Index at the back of the manual for references to topics and
tasks described in this manual.
Use the Glossary at the back of the manual to find definitions for
commonly used terminology.
Warnings and Special Information
Read and comply with all information highlighted under special headings:
WARNING
CAUTION
IMPORTANT
Conditions that could harm you as well as damage the equipment.
Conditions that could damage the printer or related equipment.
Information vital to proper operation of the printer.
NOTE: Information affecting printer operation.
13
Chapter
1
The DEC LG Emulation Line Matrix Printer
Related Documentation
Following is a list of related documentation for the DEC LG Emulation printer.
•
Printronix DEC LG Emulation Series Maintenance Manual - Explains how
to maintain and repair theDEC LG Emulation line matrix printer at the field
service level of maintenance. This manual covers alignments and
adjustments, preventive and corrective maintenance, troubleshooting,
and basic principles of operation.
•
Printronix DEC LG Series Operator's Guide - Describes the keys on the
control panel and provides quick reference information on daily printer
operations such as loading paper and replacing ribbons.
•
Printronix DEC LG Series Setup Guide - Describes how to unpack, install,
configure, run diagnostics, and clean the printer, and how to troubleshoot
simple fault conditions.
•
Printronix DEC LG Series LinePrinter Plus Programmer’s Reference
Manual - Describes the host control codes and character sets available
with the LinePrinter Plus printer control language.
•
Printronix DEC LG Series IGP/VGL Programmer's Reference Manual Provides information used with the optional Code V Printronix
emulation enhancement feature. The Code V Printronix emulation allows
you to create and store forms; generate logos, bar codes, and expanded
characters; create other graphics, and merge graphics with alphanumeric
data as a document is printed.
•
Printronix DEC LG Series IGP/PGL Programmer's Reference Manual Provides information used with the optional IGP/PGL Printronix
emulation enhancement feature. The IGP Printronix emulation allows you
to create and store forms; generate logos, bar codes, and expanded
characters; create other graphics, and merge graphics with alphanumeric
data as a document is printed.
The DEC LG Emulation Line Matrix Printer
The Printronix DEC LG Emulation printer is a line matrix printer. It uses a
variable-speed shuttle, micro-step paper feed control, and multi-phase
hammer firing to generate a wide range of horizontal and vertical dot densities
with no speed penalties.
14
Printer Emulations
Printer Features
Several standard features are provided with the Printronix DEC LG Emulation
printer, as described below.
Printer Emulations
Six printer emulations (or protocols) are selectable at the control panel:
•
•
•
•
•
•
LG emulation
Proprinter XL emulation
Epson FX-1050 emulation
P-Series emulation
IGP/PGL - Printronix Graphics Language emulation (optional upgrade)
IGP/VGL - Code V Graphics Language emulation (optional upgrade)
The DEC LG emulation may be configured using the emulation host control
codes described in this book, or can be configured via the control panel, as
described in the Setup Guide.
The Proprinter XL, Epson FX, and P-Series emulation host control codes are
described in the Printronix DEC LG Emulation LinePrinter Plus Programming
Reference Manual. (The LinePrinter Plus emulations can also be configured
via the control panel, as described in the Setup Guide.) The PGL and VGL
emulations are described in the user's manuals provided for those
enhancement options.
Text Formatting and Language Options
You can modify several parameters used primarily for printing text, either by
means of the host data stream or the configuration menus.
The text formatting and language options include:
•
•
Selectable print quality
•
•
Selectable forms length and width
Selectable alternate horizontal and vertical dot densities that enable you
to tailor output to a wider variety of printing requirements
Character-by-character attribute specification
1.Selectable pitch: normal, expanded, and compressed
2.Bold print
3.Overscoring
4.Single underline
5.Superscript and subscript printing
•
Resident multinational character sets
15
Chapter
1
Printing Speed
Bar Code Formatting
Several LG emulation control codes that allow you to define and print bar
codes are described in Chapter 4.
Diagnostics
The Setup Guide for these printers discusses the following diagnostic
features in more detail:
•
•
•
Built-in diagnostic self-tests
Configuration printout
Data stream hexadecimal code printout
Printing Speed
The speed at which text prints is measured in lines per minute (lpm). This
speed is inversely proportional to the number of dot rows required to produce
a character line, regardless of the number of characters in the line. More dot
rows are required to print lowercase characters with descenders;
consequently, those character lines print at a fractionally lower rate.
The DEC LG Emulation printer also prints dot-addressable graphic images.
The speed at which graphics are plotted is measured in inches per minute
(ipm). Unidirectional plotting produces slightly better print quality, and takes
about twice as long as bidirectional plotting. You can select either plotting
mode from the control panel.
Printing and plotting rates also vary according to the print quality you select.
Print quality refers to the way you instruct the printer to create characters. If,
for example, you select near letter quality (NLQ), the printer uses more dot
rows to form characters than if you choose high speed (HS) print quality.
Character formation and print speed are faster in HS because the printer uses
fewer dot rows to form characters. Vertical dot density is thus a factor in
printing speed. Nominal printing rates are charted in Appendix A of the Setup
Guide.
16
2
LG Emulation Control
Codes
LG Emulation
Emulation refers to the ability of a printer to execute the commands of other
printer control languages. LG is the default printer emulation when the printer
is powered on. If LG is not the active emulation, use the control panel
configuration menus to select the LG option nested under the “ACTIVE
EMULATION” main menu selection. (See Chapter 4 in your Printronix P5000
series with DEC LG Emulation Setup Guide.)
A printer control language (also called a printer protocol) is the coding system
used to convey, manipulate, and print data. It contains character codes and
command sequences.
A printer and its host computer must use the same printer control language. In
this manual, the terms printer control language, emulation, and protocol are
synonymous.
Bar Code Printing
Bar code printing is selected by control sequences, not by the operator control
panel.
Bar code printing, including the control codes related to bar code printing, is
described in Chapter 4 of this book.
17
Chapter
2
Print Mode and Plot Mode
Print Mode and Plot Mode
The DEC LG Emulation provides a print mode and a plot mode for printing
text and graphic elements, and a set of print fonts and plot fonts that are used
in each mode. Some example print fonts and plot fonts are listed in the table
of Ps2 values on page 109. A report of the available font files can be
requested using the font status sequences (see page 112), if you have a
serial connection to the printer.
In print mode, the DEC LG Emulation can print only the set of “print fonts.”
This mode is often preferable, because it is very fast and optimized for
printing text. The quality of the print font determines the print density in this
mode.
Plot mode handles graphic elements such as vectors and bar codes as well
as many built-in DEC plot fonts. Because graphic elements and built-in DEC
fonts are plotted, this mode is much slower than printer mode.
The printer will automatically switch between print mode and plot mode,
depending on the current print requirements. The default mode is print mode,
but the printer will often switch to plot mode when various densities are
needed to plot graphic elements. For instance, the DECSGD command will
allow many different combinations of horizontal and vertical densities that
cannot be used in print mode.
Plot mode is performed in graphic passes. In other words, all elements in a
given density are printed in the same paper motion. If the user chooses ten
elements in one density and then changes to another density, the ten
previous elements are printed and the paper moves forward in one pass. The
elements printed at the new density may cause reverse paper motion,
depending on where they are to be printed. Therefore, the user should
consider this when combining elements of various densities on a form.
When choosing print or plot fonts via the SGR command, the user should also
be aware that these fonts will only be used in their respective mode. For
instance, if the printer is in print mode, a selection of a plot font will not be
chosen until the printer is forced into plot mode. Likewise, if the printer is in
plot mode and a print font is chosen, this font will not be active until the printer
returns from plot mode to print mode.
18
Optimizing Print Mode
When you send a command such as SPI, DECSHORP, SHS, and SGR to the
printer to alter character spacing, font size, and font attributes, the printer will
switch to plot mode, causing the density to change and the printer throughput
to decrease.
To optimize print mode, set the Print Mode option to Enable with the control
panel. The switch to plot mode will be avoided and printer throughput will be
increased considerably.
Optimizing Plot Mode
Print mode text and graphic elements print at different densities. When the
two are mixed, a paper reversal can occur because of the different densities.
When the Plot Mode option is set to Enable from the control panel, Postnet
barcodes are printed in a Data Processing density (120 x 75 dpi) in the
following printing conditions:
1. Printer is currently in print mode.
2. Current density is 120 x 75 dpi.
3. Printer is in the portrait orientation.
Printing in Data Processing density speeds applications which use Postnet
barcodes and text. It reduces the chances of reverse motion and improves
throughput.
If the Plot Mode option is disabled, Postnet barcodes are printed in a Graphic
density (via Plot Mode) as dictated by the DECSGD command.
Character Printing
Print data sent to the printer consist of two types of character codes:
•
Printable Characters are codes representing alphabet characters,
punctuation marks, and graphic symbols
•
Control Codes are one or more bytes that instruct the printer how to
process and print characters and graphics
The DEC LG Emulation processes the character codes of the DEC
Multinational Character Set (page 21). Characters and codes from this chart
are identified and located by their column and row numbers. For example, the
ASCII character SUB is identified as 1/10, which means that it is located at
column 1 row 10.
You may send data from the host computer in either 7-bit or 8-bit form. (The
conversion processes from 7-bit to 8-bit form and vice versa are described on
page 28.)
19
Chapter
2
Character Printing
Printable Characters
Columns 0 through 7 of the DEC Multinational Character Set (page 21), are
the standard ASCII printable character set used in a 7-bit environment. If you
choose an 8-bit environment, the printable character set expands to include
columns 8 through 15.
If word length is 7-bits, printable characters are only generated from columns
2 through 7. If word length is set at 8-bits, printable characters can be
generated from columns 2 through 7 and columns 10 through 15. (Note that in
an 8-bit environment, columns 0 through 7 have the 8th bit set to zero, while
columns 8 through 15 always have the 8th bit set to 1.)
NOTE: The actual characters printed may not always be those shown in the
DEC Multinational Character Set because printable characters in the
column/row positions vary, depending upon the character set used.
20
B7
0
B6
0
0
0
B5
BITS
0
0
0
0
0
0
1
1
0
0
0
1
0
1
0
1
1
0
0
0
1
1
0
1
1
1
1
0
1
0
0
1
1
0
0
0
1
0
1
1
0
0
0
B6
0
B5
0
1
B4 B3 B2 B1
1 0 1
1
1
B7
BITS
Columns 8 and 9 can Columns 10 thru 15
be converted to 7-bit are only accessed
in 8-bit mode.
Escape sequences.
7-bit mode or bit 8 set to zero
B8
B8
1
1
1
1
0
1
0
OCTAL
DECIMAL
HEX
CHARACTER
33
27
1B
ESC
1
0
1
1
1
1
1
1
0
1
COLUMN
0
B4 B3 B2 B1 ROW
1
0 0 0 0
0 NUL
0
0
0
0 0 0 1
1
1
1
1
0 0 1 0
2
2
2
2
0 0 1 1
3
3
3
3
0 1 0 0
4 EOT
0 1 0 1
DC1
(XON)
2
3
4
5
6
20
16
10
SP
40
32
20
0
60
48
30
@
100
64
40
P
120
80
50
21
17
11
!
41
33
21
1
61
49
31
A
101
65
41
Q
121
81
51
a
7
8
9
140
96
60
p
160
112
70
200
128
80
141
97
61
q
161
113
71
10
11
12
220
144
90
(Not
Used)
240
160
A0
*
260
176
B0
À
300
192
C0
201
129
81
221
145
91
¡
241
161
A1
+
-
261
177
B1
Á
301
193
C1
Â
DCS
13
14
15
320
208
D0
à
340
224
E0
~
N
321
209
D1
á
341
225
E1
n
~
361
241
F1
302
194
C2
Ò
322
210
D2
^a
342
226
E2
ò
362
242
F2
ó
363
243
F3
360
240
F0
21
22
18
12
"
42
34
22
2
62
50
32
B
102
66
42
R
122
82
52
b
142
98
62
r
162
114
72
202
130
82
222
146
92
¢
242
162
A2
2
262
178
B2
23
19
13
#
43
35
23
3
63
51
33
C
103
67
43
S
123
83
53
c
143
99
63
s
163
115
73
203
131
83
223
147
93
£
243
163
A3
3
263
179
B3
~
A
303
195
C3
Ó
323
211
D3
~a
343
227
E3
4
4
4
24
20
14
$
44
36
24
4
64
52
34
D
104
68
44
T
124
84
54
d
144
100
64
t
164
116
74
IND
204
132
84
224
148
94
264
180
B4
Ä
304
196
C4
Ô
324
212
D4
ä
344
228
E4
ô
364
244
F4
5
5
5
5
25
21
15
%
45
37
25
5
65
53
35
E
105
69
45
U
125
85
55
e
145
101
65
u
165
117
75
NEL
205
133
85
225
149
95
0 1 1 0
6
6
6
6
26
22
16
&
46
38
26
6
66
54
36
F
106
70
46
V
126
86
56
f
146
102
66
v
166
118
76
206
134
86
226
150
96
0 1 1 1
7
7
7
7
27
23
17
47
39
27
7
67
55
37
G
107
71
47
W
127
87
57
g
147
103
67
w
167
119
77
207
135
87
227
151
97
1 0 0 0
8
BS
10
8
8
210
136
88
230
152
98
1 0 0 1
9
HT
11
9
9
211
137
89
231
153
99
W
251
169
A9
1 0 1 0
10 LF
12
10
0A
232
154
9A
ª
1 0 1 1
11 VT
13
11
0B
<<
1 1 0 0
12 FF
14
12
0C
34
28
1C
1 1 0 1
13 CR
15
13
0D
35
29
1D
1 1 1 0
14 SO
16
14
0E
1 1 1 1
15 SI
17
15
0F
DC3
(XOFF)
'
244
164
A4
¥
§
245
165
A5
µ
265
181
B5
Å
305
197
C5
~
O
325
213
D5
å
345
229
E5
o
~
365
245
F5
246
166
A6
¶
266
182
B6
Æ
306
198
C6
Ö
326
214
D6
æ
346
230
E6
ö
366
246
F6
247
167
A7
w
267
183
B7
Ç
307
199
C7
*
327
215
D7
270
184
B8
È
310
200
C8
Ø
330
216
D8
!
271
185
B9
É
311
201
C9
Ù
331
217
D9
252
170
AA
º
272
186
BA
Ê
312
202
CA
Ú
253
171
AB
>>
273
187
BB
Ë
313
203
CB
Û
1
274
188
BC
Ì
314
204
CC
275
189
BD
Í
315
205
CD
276
190
BE
Î
316
206
CE
277
191
BF
Ï
317
207
CF
250
168
A8
30
24
18
(
50
40
28
8
70
56
38
H
110
72
48
X
130
88
58
h
150
104
68
x
170
120
78
31
25
19
)
51
41
29
9
71
57
39
I
111
73
49
Y
131
89
59
i
151
105
69
y
171
121
79
SUB
32
26
1A
*
52
42
2A
:
72
58
3A
J
112
74
4A
Z
132
90
5A
j
152
106
6A
z
172
122
7A
VTS
212
138
8A
ESC
33
27
1B
+
53
43
2B
;
73
59
3B
K
113
75
4B
[
133
91
5B
k
153
107
6B
{
173
123
7B
PLD
213
139
8B
CSI
233
155
9B
54
44
2C
<
74
60
3C
L
114
76
4C
\
134
92
5C
l
154
108
6C
|
174
124
7C
PLU
214
140
8C
ST
234
156
9C
254
172
AC
-
55
45
2D
=
75
61
3D
M
115
77
4D
]
135
93
5D
m
155
109
6D
}
175
125
7D
RI
215
141
8D
235
157
9D
255
173
AD
36
30
1E
.
56
46
2E
>
76
62
3E
N
116
78
4E
^
136
94
5E
n
156
110
6E
~
176
126
7E
SS2
216
142
8E
236
158
9E
256
174
AE
37
31
1F
/
57
47
2F
?
77
63
3F
O
117
79
4F
_
137
95
5F
o
157
111
6F
DEL
177
127
7F
SS3
217
143
8F
237
159
9F
257
175
AF
CAN
ASCII
Control Codes
,
U.S. ASCII CHARACTER SET
HTS
Additional
Control Codes
¤
4
1
2
¿
Ü
..
Y
b
ç
347
231
E7
*
367
247
F7
350
232
E8
ø
370
248
F8
é
351
233
E9
ù
371
249
F9
332
218
DA
e^
352
234
EA
ú
372
250
FA
333
219
DB
ë
353
235
EB
û
373
251
FB
334
220
DC
ì
354
236
EC
ü
374
252
FC
335
221
DD
í
355
237
ED
336
222
DE
î
356
238
EE
337
223
DF
ï
357
239
EF
DEC SUPPLEMENTAL
CHARACTER SET
è
ÿ
375
253
FD
376
254
FE
(Not
Used)
377
255
FF
DEC Multinational Character Set
KEY
DEC Multinational Character Set
Chapter
2
Selecting Graphic Character Sets
Selecting Graphic Character Sets
Several graphic character sets reside in DEC LG Emulation including U.S.
ASCII, DEC Supplemental, DEC Technical, and VT100 Graphics.
Graphic character sets are selected for printing as follows:
1. Designate the set as one of the logical G0, G1, G2, or G3 sets.
2. Map (invoke) one of the G-sets into the graphic left (GL) or graphic right
(GR) logical set. (In a 7-bit environment, only the GL set is available.)
Figure 1 shows the process of designating and invoking character sets. The
Select Character Set (SCS) command designates the graphic character set
(see page 99). The Locking Shift and Single Shift commands map the logical
sets into the GL or GR set. See Locking and Single Shifts in this chapter.
When you select the character set using the control panel, it is done in two
sections. Under the GL menu, selecting a different character set will put it in
the logical G0 and G1 sets. GL is then mapped to G0.
Under the GR menu, choosing a character set will put it in the logical G2, G3,
and User Preference Supplemental Set. GR is then mapped to G2.
Figure 1. Designating and Invoking Character Sets
22
Control Code Types
Control codes do not print, they drive printer activity. The printer recognizes
two kinds of control codes:
•
•
Single-byte control codes
Escape sequences that include two or more bytes of control code
information
The following topics describe single-byte control codes and Escape
sequences in detail.
Control Codes
A control code is a single (one-byte) non-printing character that instructs the
printer to perform a specific operation. When the printer receives a control
character, it immediately performs the control operation instead of printing a
graphic character. The DEC LG Emulation printer recognizes two sets of
control characters:
•
•
ASCII control codes (7-bit codes)
Additional control codes (8-bit codes)
ASCII Control Codes
Table 1 defines the ASCII control codes recognized by the printer in LG
emulation mode. These codes are located in columns 0 and 1 of the Digital
Multinational Character Set (page 21), and the column/row coordinates from
this chart are printed beneath the Mnemonic category in Table 1. These
control codes are available in a 7-bit data environment or in an 8-bit
environment if bit 8 is set to 1.
NOTE: On many computers, an ASCII control code can be sent from the
input keyboard by holding down the CTRL key while depressing the
key specified in Table 1.
Additional Control Codes
The additional control codes are 8-bit control characters defined by ANSI and
LG unique sequences, and are available in an 8-bit data environment when
bit 8 is set to 1.Table 2 defines the additional control codes recognized by the
printer in LG emulation mode. These codes are in columns 8 and 9 of the
Digital Multinational Character Set (page 21), and the column/row coordinates
from this chart are printed beneath the Mnemonic category in Table 2.
The 8-bit additional control codes may be sent in 7-bit form as equivalent
escape sequences. Equivalent 7-bit escape sequences for the 8-bit additional
control codes are listed in Table 3. Control code conversion from 7-bit to 8-bit
data environments, and vice versa, is discussed on page 28.
23
Chapter
2
Control Code Types
Table 1. ASCII Control Codes
Mnemonic
Column/Row
24
Name
Key Pressed
with CTRL
Function
BEL
0/7
Bell
G
When a control code is received,
the printer produces a short audible
tone.
HT
0/9
Horizontal Tab
I
HT advances the active tab position to
the next horizontal tab stop on the line,
or to the right margin if there are no more
tab stops.The printer initially sets a
horizontal tab stop every eight
characters. Tab stops may be located
either at column numbers or at physical
positions on the page.
LF
0/10
Line Feed
J
LF advances the active line vertically by
one line. If less than one vertical line
space remains on the page, LF sets the
active line to the first line on the next
page. If line feed/new line (LNM) is set,
LF also advances the active column to
the left margin.
VT
0/11
Vertical Tab
K
VT moves the active line to the next
vertical tab stop. The DEC LG Emulation
printer initially sets a vertical tab stop for
every line on the page.
FF
0/12
Form Feed
L
FF advances the active line to the first
printable line on the next page.
CR
0/13
Carriage Return
M
CR returns the active column to the left
margin. If carriage return/new line mode
is set, CR also advances the active line
to the next line.
SO
0/14
Shift Out
N
SO locks character set G1 into GL.
SI
0/15
Shift In
O
SI locks character set G0 into GL.
DCI (XON)
1/1
Device Control 1
Q
DC1 informs the host computer that the
printer is ready to receive data.
DC3 (XOFF)
1/3
Device Control 3
S
DC3 tells the host computer to pause
before sending more data until the
printer sends DC1.
Table 1. ASCII Control Codes
Mnemonic
Column/Row
Name
Key Pressed
with CTRL
Function
CAN
1/8
Cancel
X
CAN immediately ends an escape or
control sequence. The printer interprets
the characters following CAN as
normal.CAN also cancels a Device
Control String (DCS) when received
within the command string of that DCS.
SUB
1/10
Substitute
Z
SUB immediately ends an escape or
control sequence. SUB replaces a
character received with an error in the
sequence. SUB prints as a space
character for sixel data.
ESC
1/11
Escape
[
ESC introduces an escape or control
sequence. If received in the middle of a
sequence, ESC immediately ends the
sequence and starts a new sequence.
ESC also immediately ends a Device
Control String (DCS).
BS
0/8
Backspace
H
BS moves the active horizontal position
back one Horizontal Advance Increment.
25
Chapter
2
Control Code Types
Table 2. Additional Control Codes
Mneumonic
Column/Row
Function
IND
8/4
Index
IND moves the active position down to
the same position on the next line. If the
new position is below the bottom margin,
the active position moves to the top of
the next page.
NEL
8/5
Next Line
NEL moves the active position to the left
margin on the next line. If the new
position is below the bottom margin, the
active position moves to the top of the
next page.
HTS
8/8
Horizontal Tab Set
HTS sets a horizontal tab at the active
column.
VTS
8/10
Vertical Tab Set
VTS sets a vertical tab at the active line.
PLD
8/11
Partial Line Down
PLD moves the active position down
one-half line. The distance moved is
specified as a parameter of the font, not
by vertical spacing escape sequences.
PLU
8/12
Partial Line Up
PLU moves the active position up onehalf line. The distance moved is
specified as a parameter of the font, not
by vertical spacing escape sequences.
RI
8/13
Reverse Index
RI moves the active line position up to
the same position on the preceding line.
SS2
8/14
Single Shift 2
SS2 moves character set G2 into Gl, to
print one character.
SS3
8/15
Single Shift 3
SS3 moves character set G3 into Gl, to
print one character.
DCS
9/0
Device Control String
DCS introduces a device control string.
CSI
9/11
Control String
Introducer
CSI introduces a sequence of one or
more bytes that define a control function.
ST
9/12
String Terminator
ST indicates the end of a device control
string (DCS).
9/DH-9/FH
26
Name
, , : See “note”
below.
Table 3. Equivalent 7-Bit and 8-Bit Additional Control Codes
Name
8-Bit Character
Column/Row
7-Bit Sequence
Column/Row
Index
IND
8/4
ESC D
1/11 4/4
Next Line
NEL
8/5
ESC E
1/11 4/5
Horizontal Tab Set
HTS
8/8
ESC H
1/11 4/8
Vertical Tab Set
VTS
8/10
ESC J
1/11 4/8
Partial Line Down
PLD
8/11
ESC K
1/11 4/11
Partial Line-Up
PLU
8/12
ESC L
1/11 4/12
Reverse Index
RI
8/13
ESC M
1/11 4/14
Single Shift 2
SS2
8/14
ESC N
1/11 4/14
Single Shift 3
SS3
8/15
ESC 0
1/11 4/15
Device Control String
DCS
9/0
ESC P
1/11 5/0
Control String Introducer
CSI
9/11
ESC [
1/11 5/12
String Terminator
ST
9/12
ESC \
1/11 5/12
27
Chapter
2
Control Code Types
8-Bit to 7-Bit Control Code Conversion
Convert 8-bit additional control codes to 7-bit escape sequences as follows:
•
•
Insert the ESC character.
Set the eighth bit of the final character to 0 and set its seventh bit to 1.
NOTE: Only control codes found in columns 8 and 9 of the character sets
may be converted as shown. Printable characters in columns 10
through 15 are not converted.
7-Bit to 8-Bit Control Code Conversion
Convert 7-bit escape sequences to 8-bit additional control codes as follows:
•
•
Remove the ESC character.
Set the eighth bit of the final character to 1 and set its seventh bit to 0.
Escape Code Sequences
The control codes discussed in the previous section are single-byte control
codes. The number of printer capabilities is greatly increased, however, by
combining character codes into escape sequences that contain two or more
bytes of information. Escape sequences always begin with the ASCII ESCape
character (location 1/11).
An ESC character in the data stream signals the printer to wait for special
instructions. The character codes following the ESC character tell the printer
what to do.
The printer in LG emulation mode recognizes three types of escape code
sequence:
•
•
•
Escape Sequences (do not include variable parameters)
Control Sequences (include variable parameters)
Device Control Strings (include variable parameters)
Escape Sequences
NOTE: Code sequences appear in this manual with spaces inserted between
command elements. This is done for readability; do not insert spaces
between code characters when you are programming unless the
ASCII space character is part of a code sequence. For example, a
code sequence printed in this manual as ESC [ 1 ; 4 m is
programmed as ESC[1;4m
An escape sequence uses two or more bytes to define a specific printer
control function, but does not include any variable parameters (although there
may be intermediate characters). The format for an escape sequence is:
28
ESC
I
F
1/11
2/0 - 2/15
3/0 - 7/14
Escape Sequence
Introducer
Intermediate
character(s)
Final character
After the escape sequence introducer, ESC, intermediate characters may or
may not follow in the sequence. These characters always come from the 2/0
through 2/15 (column/row) range of the Digital Multinational Character Set
(page 21). The final character signals the end of the escape sequence and
always comes from the 3/0 through 7/14 range of the Digital multinational
character set.
For example, if the intermediate character is SP (hex 20) and the final
character is G (hex 47), the resulting escape sequence is ESC SP G (hex 1B
20 47). This particular sequence tells the printer how to process data it sends
back to the host computer: send data in 7-bit form and send additional control
characters as 7-bit escape sequences.
If the characters following the ESC code are not within the defined ranges, or
if they are within the defined ranges but not recognized as a function of this
printer, the entire sequence is ignored.
Control Sequences
Control sequences begin with the control sequence introducer, CSI (9/11), in
an 8-bit data environment. They are also escape sequences, however,
because the 8-bit CSI control character can be represented by the 7-bit
escape sequence, ESC [. Control sequences may contain variable
parameters within the command sequence. The format for control sequences
is:
CSI
P
I
F
ESC
9/11
3/10 to 3/15
2/0 to 2/15
3/0 to 7/14
1/11 5/11
8-Bit Control
Sequence
Introducer
Parameter
character(s)
Intermediate
character(s)
Final
character
7-Bit Escape
Code CSI
equivalent
Parameter characters modify the action or interpretation of the command
sequence. There may be up to, but no more than, 16 parameters per
sequence. The ; (3/11) (semicolon) character is the delimiter that separates
parameters. This delimiter must be used whenever there are multiple
parameters in the control sequence.
29
Chapter
2
Control Code Types
Two kinds of parameters are used: numeric and selective. A numeric
parameter represents a numerical value. Numeric parameters are
represented in this manual as Pn, Pn1, Pn2 , etc. A selective parameter
chooses an action associated with the parameter value. Selective parameters
are represented in this manual as Ps, Ps1, Ps2, etc.
Parameters are interpreted as unsigned decimal integers with the most
significant digit first. Parameter values greater than the maximum allowable
65535 will be set to 65535. Do not use a decimal point in any parameter - the
printer will ignore the entire command. If no value is specified, zero (0) is
assumed. A value of zero or an omitted parameter indicates the printer default
value should be used for that sequence.
If the printer receives the parameter characters 3AH, 3DH, or 3EH anywhere
in the parameter string, it performs no action until the final character is
received, then ignores the entire sequence. These parameter characters are
sixel control codes and must not conflict with CSI sequences.
A CSI sequence containing one or more group(s) of invalid parameters is still
processed, but only the valid parameters are used. If all parameters in a
sequence are out of range or invalid, the printer waits for the final character,
then ignores the entire sequence.
Intermediate and final characters define the control function. For example, the
sequence, ESC [ 3 m (hex 1B 5B 33 6D), turns italic printing on. This
sequence uses one selective parameter [3], no intermediate characters, and
the final character [m].
The DEC LG Emulation processes control sequences with one intermediate
character only. If more than one intermediate character is received, the printer
waits for the final character, then ignores the entire control sequence. If no
intermediate characters are in the sequence, the final character determines
the control function.
30
Device Control Strings
The format of a device control string is:
DCS
P...P
I...I
F
9/0
3/0 to 3/15
2/0 to 2/15
3/0 to 7/14
8-Bit Device
Control String
Introducer
Parameter
character(s)
Intermediate
character(s)
Final
character
Introducer
D...D
F
9/12
Data (0 or more
characters)
String
Terminator
Protocol Selector
The DCS control character is the Device Control String introducer. DCS has
an 8-bit code of 9/0. This is equivalent to the escape sequence consisting of
the ESC (1/11) and P (5/0) characters. Both encodings are recognized as
DCS. After DCS is received, all characters received up to and including the
String Terminator (ST) are not printed but are stored as part of the control
string.
The protocol selector consists of parameter characters (P...P), intermediate
characters (I...I), and the final character. These characters are processed
identically to the format of a control sequence (see previous section). The
intermediate characters, if any, and the final character, specify the meaning of
the data. If present, the parameter string can further elaborate the
interpretation of the data.
If the protocol selector is parsed but not recognized, all data that follows is
ignored until it is either terminated by ST or aborted.
31
Chapter
2
Special Parsing Requirements
Special Parsing Requirements
Parsing is the process of separating a programming statement into basic units
that can be translated into machine instructions. Special parsing requirements
are necessary when invalid parameters are specified, when invalid control
functions are specified, and when control characters are embedded in control
functions. Generally, the printer recovers from these conditions by performing
as much of the function as possible (or, parsing the valid parameter from the
invalid).
When control sequences are not recognized by the printer or when selective
parameters are invalid, the printer ignores them. Parameter values greater
than the specified limit are set to the maximum allowable value for that
parameter. If a C0 (7-bit) control character is received within a control
sequence, the control character is executed by the printer as if it was received
before the control sequence. Parsing then resumes. The exceptions to this
rule follow:
•
When the control character is (18 hex) or (1A hex), the
sequence is aborted and the control character processed.
•
If the control character is ESC (1B hex), the sequence is aborted and a
new sequence begins.
•
If a C1 (8-bit) control character is received within an escape or control
sequence, the sequence is aborted and the C1 control character is then
processed, if it is applicable to the printer. If not, it is ignored.
•
When the (A0 hex) character is received within a control sequence, it is
processed as a (20 hex) character, and parsing then resumes.
•
If character (FF hex) is received within a control sequence, it is processed
as a (7F hex) character, then parsing resumes.
•
When a GR character is received during a control sequence, the eighth
bit is ignored. The remaining seven bits define a GL character.
The following messages explain error codes that might arise when using the
single shift control character:
•
If a C0 or C1 control character is received after a single shift control
character (8E hex) or (8F hex), the control character is
processed and the single shift flag remains set. If a control sequence is
received after (8E hex) or (8F hex), the sequence is
processed and the single shift flag remains set.
When the characters (20 hex) or (7F hex) are received after an
SS2 or SS3, the following occurs:
32
•
If the (94) character set resides in the set being accessed (either G2 or
G3), the or keys are processed and the single shift flag
remains set.
•
If the (94) character set resides in the set being accessed (either G2 or
G3), the printer images the corresponding character of that set (A0 hex or
FF hex), then resets the single shift flag.
•
If a GR character is received after an SS2 or SS3 sequence, the eighth bit
is ignored. The single shift function then applies the remaining seven bits
to define a GL character.
NOTE: An error condition exists any time a GR character follows an SS2 or
SS3 sequence. The software should never send a GR character after
an SS2 or SS3 character.
If either (A0 hex) or (FF hex) are received after SS2 or SS3, the following
occurs:
•
The DEC LG Emulation prints the error character (a reverse question
mark) and resets the single shift flag when a (94) character resides in the
set being accessed (either G2 or G3).
•
If a (96) character resides in the set being accessed (either G2 or G3), the
printer images the corresponding character, (A0 hex) or (FF hex), of that
set, then resets the single shift flag.
33
Chapter
2
Control Code Description Format
Control Code Description Format
The rest of this chapter discusses the control codes in detail. Where
applicable, the following information is listed for each control code sequence:
Name
The title or function of the control code. The LG or ASCII
mnemonic is in parentheses after the name.
ASCII CodeThe ASCII name for the control code. Escape sequences are in
7-bit (ASCII) form.
NOTE: In the code descriptions, the ASCII space character (2/0, hex 20,
decimal 32) is represented by SP.
Hex Code The code or escape sequence in hexadecimal numbers.
Dec Code The code or escape sequence in decimal numbers.
Purpose
The function(s) of the control code.
DiscussionA discussion of the uses of the sequence, and descriptions of any
exceptions or limitations to use.
34
Control Code Index
The LG emulation mode control codes listed below are grouped by related
functions.
Control code sequences in this manual are shown in 7-bit form. They can be
either 7-bit or 8-bit form, depending on your requirements. Code conversion
instructions are on page 28.
For commands that turn features on and off (set/reset, enable/disable), the
page number for the enabling command is listed. The disabling command is
on the same page.
IMPORTANT
In the index below, SP represents the ASCII space character (decimal
32, 20H). (A two-digit number followed by a subscripted capital “H” is a
hexadecimal number. Numbers without subscripts are decimal
numbers.)
FUNCTION
CODE
PAGE
ESC[Psh/ESC[Psl
page 40
Line Feed/New Line Mode (LNM)
ESC[20h
page 41
Carriage Return/New Line Mode (DECCRNLM)
ESC[?40h
page 42
Autowrap Mode (DECAWM)
ESC[?7h
page 43
Pitch Select Mode (DECPSM)
ESC[?29h
page 44
Set Page Orientation (DECSPO)
ESC[Ps&z
page 45
Position Unit Mode (PUM)
ESC[11h
page 46
Force Plot Mode (DECFPM)
ESC[?70h
page 47
Set/Reset Mode
Select Size Unit (SSU)
page 48
Graphic Size Selection (GSS)
ESC[PnSPC
page 49
Graphic Size Modification
ESC[Pn1;Pn2SPB
page 50
Setting Plot Density
Select Graphics Density (DECSGD)
page 51
ESC[Psh;Psv+{
page 52
35
Chapter
2
Control Code Index
FUNCTION
CODE
Spacing
page 54
Spacing Pitch Increment (SPI)
ESC[Pn1;Pn2SPG
page 55
Select Vertical (Line) Spacing (SVS)
ESC[PsSPL
page 57
Set Vertical Pitch (DECVERP)
ESC[Psz
page 58
Select Horizontal (Character) Spacing (SHS)
ESC[Psw
page 59
Set Horizontal Pitch (DECSHORP)
ESC[Psw
page 60
Vertical Format
page 61
Load Vertical Format Unit (VFU)
ESC[<1h
page 62
End Load (VFU)
ESC{<11
page 63
Channel Command
ESC[pl&y
page 64
Forms
Loading Forms Sequence (DECLFM)
page 66
DCSP1;P2&pRecordsST
Form Types
page 67
page 70
Start Forms Sequence (DECIFM)
DCSP1&rFormNameST
page 71
Terminate Forms Sequence (DECTFM)
ESC[#SP1
page 72
Delete Forms Sequence (DECDFM)
DCSPs&
page 72
Forms Considerations
page 73
Request Forms Status (DECRFMS)
CSI&-
page 74
Form Status Report (DECFMSR)
DCS&sFormsStringST
page 74
Logos
36
PAGE
page 75
Loading Logos Sequence (DECLLG)
DCSP1;P2&tRecordST
page 75
Select Logo Sequence (DECILG)
CSIPn&}
page 77
Deleting Logos Sequence (DECDLG)
CSIP1;P2Pn&|
page 77
Request Logo Status (DECRLGS)
CSI’p
page 78
Logo Status Report (DECSLGS)
DCS&wLogoStringST
page 78
FUNCTION
CODE
Page Print Area and Margins
PAGE
page 79
Page Format Select (PFS)
ESC[PsSPJ
page 81
Set Lines Per Physical Page (DECSLPP)
ESC[Pnt
page 85
Set Top and Bottom Margins (DECSTBM)
ESC[Pn1;Pn2r
page 86
Set Left and Right Margins (DECSLRM)
ESC[Pn1;Pn2s
page 87
Active Column and Active Line (“Cursor” Motion)
page 88
Forward Index (IND)
ESC D
page 88
Reverse Index (RI)
ESC M
page 89
Next Line (NEL)
ESC E
page 89
Horizontal Position Absolute (HPA)
ESC[Pn’
page 90
Horizontal Position Relative (HPR)
ESC[Pna
page 90
Horizontal Position Backward (HPB)
ESC[Pnj
page 91
Vertical Position Absolute (VPA)
ESC[Pnd
page 91
Vertical Position Relative (VPR)
ESC[Pne
page 92
Vertical Position Backward (VPB)
ESC[Pnk
page 92
Cursor Up (CUU)
ESC[PnA
page 93
Partial Line Up (PLU) - Superscription
ESC L
page 93
Partial Line Down (PLD) - Subscription
ESC K
page 94
Tab Stops
page 94
Set Horizontal Tab Stops (DECSHTS)
ESC [Pn;...;Pnu
page 95
Horizontal Tab Stops (HTS)
ESC H
page 96
Set Vertical Tab Stops (DECSVTS)
ESC[Pn;...;Pnv
page 96
Vertical Tab Stops (VTS)
ESC J
page 97
Tab Clear (TBC)
ESC[Psg
page 97
Character Set Selection (SCS)
page 98
Select Character Set Sequences
page 99
Assign User Preference Supp. Set (DECAUPSS)
DCS Ps !uD...DST
page 101
37
Chapter
2
Control Code Index
FUNCTION
Product Identification (DA)
CODE
ESC[c or ESC[0c
PAGE
page 103
Printer Status Requests and Reports
page 103
Device Status Requests (DSRs) and Printer
Responses
page 104
Send Extended Status Report
ESC[n or ESC[0n
page 104
Disable Unsolicited Status Reports
ESC[?1n
page 104
Enable Unsol. Brief Reports and Send Ext.
Report
ESC[?2n
page 104
Enable Unsol. Ext. Reports and Send Ext.
Report
ESC[?3n
page 104
Assigning and Selecting Font Files
page 108
Assign Type Family or Font (DECATFF)
DCSPs1;Ps2}IDStringST
page 109
Selecting Fonts for Printing (SGR)
CSIPsm
page 111
Deleting Fonts from RAM (DECLFF)
DCSO;1;0yST
page 112
Font Status Sequences
Request Font Status (DECRFS)
CSIPs;Ps”{
page 113
Font Status Report (DECFSR)
DCSI”{StringST
page 114
ESC[Psm
page 115
Character Expansion (GSM)
ESC[Pn1;pn2SP B
page 116
Bold Printing
ESC[Psm
page 118
Crossed-Out Text
ESC[Psm
page 119
Double-Underlined Text
ESC[Psm
page 120
Italic Printing
ESC[Psm
page 120
Overlined Text
ESC[Psm
page 121
Turn Off All Attributes
ESC[0m
page 121
Underlined Text
ESC[Psm
page 122
Justification (JFY)
ESC[PsSPF
page 123
Character Attributes (SGR)
38
page 112
FUNCTION
CODE
Sixel Graphics Processing
PAGE
page 125
Character Processing in Sixel Graphics Mode
ESC[Psm
page 129
Drawing Vectors (DECVEC)
ESC[Pn1;Pn2;Pn3;Pn4;Pn5;!|
page 136
Block Characters
page 137
Setting Block Character Parameters (DECBCS)
ESC[P1;P2;...P5’r
page 137
Start Block Character Mode (DECBLOCKC)
ESC%SP1
page 139
Stop Block Character Mode
ESC%@
page 139
Reset to Initial State (RIS)
ESC c
page 140
Soft Terminal Reset (DECSTR)
ESC[!p
page 140
Printer Reset
Selecting and Returning from LinePrinter Plus
Emulations
Select LinePrinter Plus Emulations via
(DECIPEM)
page 141
Select LinePrinter Plus Emulations via (SOCS)
page 142
7-Bit and 8-Bit Transmission and Interpretations
page 143
Draft Mode Printing
Enter Draft Mode
ESC%/3
page 144
Exit Draft Mode
ESC%@
page 144
Default Values and States
page 145
Bar Codes
Chapter
4
39
Chapter
2
Set/Reset Mode
Set/Reset Mode
Set (Enable)
Reset (Disable)
ASCII Code
ESC [ Ps h
ESC [ Ps l
Hex Code
1B 5B Ps 68
1B 5B Ps 6C
Dec Code
27 91 Ps 104
27 91 Ps 108
Purpose
Turns basic printing features on (set) or off (reset).
DiscussionSet/Reset Mode controls certain printer features that have two
settings: on or off. One sequence may be used to turn
several features on or off. Parameter values Ps determine
different printer modes.
Parameter values are either ANSI or LG private. All
parameters in a given sequence must be of the same type.
LG private parameters are preceded by the question mark
(“?”) character.
On Set/Reset features, default settings go into effect when
the printer is powered-up or a reset (RIS or DECSTR)
sequence is sent.
Table 4. Set/Reset Mode Parameter Values
Ps
(Parameter Values)
Printer Mode
Page No.
ANSI
11
Position Unit Mode (PUM)
page 46
20
Line feed/New line Mode (LNM)
page 41
?7
Autowrap Mode (DECAWM)
page 43
?29
Pitch Select Mode (DECPSM)
page 44
?40
Carriage Return/New Line
Mode (DECCRNLM)
page 42
?70
Force Plot Mode (DECFPM)
page 47
DEC Private
40
Line Feed/New Line Mode (LNM)
Set (Enable)
Reset (Disable)
ASCII Code
ESC [ 2 0 h
ESC [ 2 0 l
Hex Code
1B 5B 32 30 68
1B 5B 32 30 6C
Dec Code
27 91 50 48 104
27 91 50 48 108
Purpose
Defines the paper position according to how the line feed features
are enabled.
DiscussionAdvance the paper up one line by pressing the line feed key
once. A half-second pause ensues, then the paper will feed
one line. To feed paper continuously, hold down the line feed
key. After a half-second pause, the paper feeds up one line in
3-hertz intervals.
To enable further line feed features, (i.e., microstepping),
raise the printer cover and locate the control panel on the left
side. Four keys-UP, NEXT, DOWN, and PREV-control
additional line feed capabilities:
To move the paper up 1/600 inch, press the LINE FEED key
and the NEXT key together. For continuous forward paper
feed at 1/600 inch, hold down the LINE FEED key and the
NEXT key; the paper will feed at 3-hertz intervals after a halfsecond pause.
Whether Line Feed/New Line mode is enabled or disabled, a
Carriage Return control code is interpreted according
to the DECCRNLM mode in use. (See “Carriage Return/New
Line Mode,” page 42.)
LNM remains as selected from the last power-on session.
Factory default is LNM reset.
41
Chapter
2
Carriage Return/New Line Mode (DECCRNLM)
Carriage Return/New Line Mode (DECCRNLM)
Set (Enable)
Reset (Disable)
ASCII Code
ESC [ ?
Hex Code
1B 5B 3F 34 30 68
1B 5B 3F 34 30 6C
Dec Code
27 91 63 52 48 104
27 91 63 52 48 108
Purpose
Defines printer response to the Carriage Return (CR)
character.
Discussion
When the printer receives the CR character with Carriage
Return/New Line Mode enabled (set), it returns the active
column to the left margin and advances paper one line.
4
0
h
ESC [ ?
4
0
l
When the printer receives the CR character with Carriage
Return/New Line Mode disabled (reset), it returns the active
column to the left margin without advancing the active line.
LNM remains as selected from the last power-on session.
The factory default is LNM reset.
42
Autowrap Mode (DECAWM)
Set (Enable)
Reset (Disable)
ASCII Code
ESC [ ?
Hex Code
1B 5B 3F 37 68
1B 5B 3F 37 6C
Dec Code
27 91 63 55 104
27 91 63 55 108
Purpose
7
h
ESC [ ?
7
l
Determines what happens when text exceeds the right margin of
the page.
DiscussionWhen autowrap is enabled (set) and text runs past the right
margin, the active position moves to the left margin on the
next line, and no data are lost.
When autowrap is disabled (reset) and text runs past the right
margin, the data are lost.
DECAWM remains as selected from the last power-on
session. Factory default is DECAWM reset.
43
Chapter
2
Pitch Select Mode (DECPSM)
Pitch Select Mode (DECPSM)
Set (Enable)
Reset (Disable)
ASCII Code
ESC [ ?
Hex Code
1B 5B 3F 32 39 68
1B 5B 3F 32 39 6C
Dec Code
27 91 63 50 57 104
27 91 63 50 57 108
Purpose
2
9
h
ESC [ ?
2
9
l
Controls the Set Horizontal Pitch (DECSHORP) sequence.
DiscussionWhen Pitch Select Mode is enabled (set), the current font
determines the horizontal pitch.
When Pitch Select Mode is disabled (reset), the printer uses
the horizontal pitch selected by the Set Horizontal Pitch
(DECSHORP) sequence.
The power-up default is DECPSM reset. DECPSM is
overridden by an SPI command (page 55) or an SHS
command (page 59).
44
Set Page Orientation (DECSPO)
ASCII Code
ESC [ Ps & z
Hex Code
1B 5B Ps 26 7A
Dec Code
27 91 Ps 38 122
Purpose
Sets the intended reading orientation of the page with respect to
the paper feed direction.
DiscussionDECSPO is similar to the page orientation defined by PFS, but
has no effect on the page size or number of lines and
columns. All page related functions are interpreted in relation
to page orientation (margins, line and character spacing).
The default value is Ps = 0.
The selective parameters indicate the following:
Ps
Function
0
Portrait: Page orientation is in line
with the paper feed direction
1
Landscape: Page orientation is
perpendicular to the paper feed
direction.
45
Chapter
2
Position Unit Mode (PUM)
Position Unit Mode (PUM)
Set (Enable)
Reset (Disable)
ASCII Code
ESC [ 1
Hex Code
1B 5B 31 31 68
1B 5B 31 31 6C
Dec Code
27 91 49 49 104
27 91 49 49 108
Purpose
1
h
ESC [ 1
1
l
Selects a unit of measurement used with the escape sequences
that control spacing parameters.
DiscussionWhen Position Unit mode is enabled (set), it selects either
decipoints or pixels, depending on the setting of the Select
Size Unit (SSU) sequence.
When Position Unit mode is disabled (reset), it selects a
spacing unit equal to one character position called a
character cell. The width and height of the cell is equal to the
currently selected horizontal and vertical spacing increment.
Power-up default is PUM reset.
Table 5 lists the escape sequences affected by the PUM and
SSU settings.
Table 5. Escape Sequences With Spacing Parameters
Sequence Name
Page No.
Spacing Pitch Increment *
SPI*
page 55
Set Lines Per Physical Page
DECSLPP
page 85
Set Top and Bottom Margins
DECSTBM
page 86
Set Left and Right Margins
DECSLRM
page 87
Horizontal Position Absolute
HPA
page 90
Horizontal Position Relative
HPR
page 90
Horizontal Position Backward
HPB
page 91
Vertical Position Absolute
VPA
page 91
Vertical Position Relative
VPR
page 92
Vertical Position Backward
VPB
page 92
Set Horizontal Tab Stops
DECSHTS
page 95
Set Vertical Tab Stops
DECSVTS
page 96
Drawing Vectors*
DECVEC*
page 136
Select Barcode Parameters
DECSBCA
page 203
* Not affected by PUM setting.
46
DEC Mnemonic
Force Plot Mode (DECFPM)
Reset (Disable)
Set (Enable)
ASCII Code
ESC [ ?
Hex Code
1B 5B 3F 37 30 6C
1B 5B 3F 37 30 68
Dec Code
27 91 63 55 48 108
27 91 63 55 48 104
Purpose
7
0
l
ESC [ ?
7
0
h
Forces the printer to enter or stay in Plotting mode.
DiscussionThe printer normally operates in Printing mode (the default) to
achieve maximum throughput of standard fonts and spacing.
Plotting mode sacrifices speed but offers greater flexibility,
such as special fonts, font sizes, and character spacing.
Many of these features are available in print mode when the
Print Mode option is set to Enable with the control panel.
Force Plot mode prevents accidental shifting between the
printed and plotted fonts, and can reduce unnecessary paper
shift. The default for DECFPM = reset state.
For further information about plot mode, see overview
description on page 18.
47
Chapter
2
Select Size Unit (SSU)
Select Size Unit (SSU)
ASCII Code
ESC [ Ps SP I
Hex Code
1B 5B Ps 20 49
Dec Code
27 91 Ps 32 73
Purpose
Works with the Position Unit Mode (PUM) sequence to select a
unit of measurement for spacing parameters.
DiscussionWhen PUM is enabled (set), Select Size Unit selects either
decipoints or pixels as the spacing unit, depending on the
parameter settings shown below.
If the printer receives an SSU while PUM is disabled (reset),
the selected unit will take effect when PUM is set and will
then remain in effect until the printer receives either another
SSU or a reset sequence. Default value at power-up or reset
is decipoints. The printer will ignore all Ps values other than 2
or 7.
Ps
Spacing Unit
2
Decipoint (1/720 inch)
7
Pixel (1/600 inch)
The printer converts decipoints (D) into pixel (P) values by
using the formula shown below and rounding off the result to
the nearest integer:
P= Dx5
6
All arithmetic operations are performed using integer
instructions. For example, the formula above converts
decipoints to the nearest pixel.
NOTE:If you select decipoint units, do not use horizontal
position relative (HPR) and vertical position relative
(VPR) sequences. Using these commands with
decipoint units produces cumulative positioning
errors because they are rounded-off.
NOTE:The JIS Katakana character set is only available in the
10 CPI font size. The GSS and SSU control codes
can only be used with these character sets if 10
CPI is specified.
48
Graphic Size Selection (GSS)
ASCII Code
ESC [ Pn SP C
Hex Code
1B 5B Pn 20 43
Dec Code
27 91 Pn 32 67
Purpose
Sets the height and width of all characters in the selected font
that start after the control sequence.
DiscussionPn is a decimal value that species the height of the font in units
determined by the Select Size Unit (SSU) sequence. The
width of the font is implicitly defined by the height. For
example, the width of a 10-point font is 10 pitch. The initial
value for Pn is Pn = 100.
If the desired font height cannot be matched exactly, the next
smallest available font is selected. The GSS sequence
remains in effect until the printer receives another GSS
sequence or a Graphic Size Modification (GSM) sequence.
NOTE:The JIS Katakana character set is only available in the
10 CPI font size. The GSS and SSU control codes
can only be used with these character sets if 10 CPI
is specified.
49
Chapter
2
Graphic Size Modification (GSM)
Graphic Size Modification (GSM)
ASCII Code
ESC [ Pn1 ; Pn2 SP B
Hex Code
1B 5B Pn1 3B Pn2 20 42
Dec Code
27 91 Pn1 59 Pn2 32 66
Purpose
Modifies the height and width for all designated fonts as set by
the GSS sequence.
DiscussionPn1 is a decimal value that specifies the height of the font as a
percentage of the height set by the GSS sequence. Pn2 is a
decimal value that specifies the width as a percentage of the
width set by the GSS sequence. Data processing fonts can
be modified by two or three times their default height and two
times their default width.
GSM affects only the current print or plot mode. In Print
mode, GSM always changes the current pitch according to
the newly selected font. In Plot mode, the pitch is changed
only if Pitch Select mode is set.
The GSM sequence is effective until the printer receives
another GSM or GSS sequence.
NOTE:The GSM command will only work if the base font is
DP 10. See the DECATFF command.
50
Setting Plot Density
The printer can plot in several different densities (dots per inch, or dpi), from
30 dpi to 200 dpi.
The Plot mode fonts contain the information for the vertical and horizontal
densities they use. Determine non-text imaging densities (for sixels, bar
codes) by using these innate commands. Default values for both the vertical
and horizontal densities for graphic work are 100.
While density changes can occur anywhere on a page, they can also cause
vertical negative paper motion while printing. Judicious planning minimizes
this effect.
Plot speed is adversely affected by changes in density: the higher the density,
the slower the speed. Hence, plotting in 50 x 50 density is four times faster
than plotting in 100 x 100. If speed is a consideration, select lower density
plotting. The lowest density plot font available is the 60 x 75 density.
51
Chapter
2
Set Graphics Density (DECSGD)
Set Graphics Density (DECSGD)
ASCII Code
ESC [ Psh ; Psv & {
Hex Code
1B 5B Psh 3B Psv 26 7B
Dec Code
27 91 Psh 59 Psv 38 123
Purpose
Sets the darkness of drawn images.
DiscussionDECSGD controls darkness via the density of the physical pixels.
It does not change the resolution of the image (logical pixels),
only the darkness of the segments drawn.
NOTE:Psh and Psv do not affect the density of plotted text.
Text density comes from the current font.
DECSGD sets the density for graphics (sixels, logos, vectors,
block characters, and bar codes). The selective parameters,
Psh and Psv, designate the horizontal and vertical dot
densities used for plotting graphics.
•Psh Parameter (Psh) selects the horizontal dot density.
•Psv Parameter (Psv) selects the vertical dot density.
The actions of Psh and Psv are dependent on the print
orientation because x-direction print densities differ
significantly from y-direction print densities. (This is the only
printer instruction that is directly dependent on the current
orientation setting.) Table 6 defines how orientation is
designated by Psh and Psv.
Table 6. Psh and Psv Orientation
Direction
Portrait (Default)
Landscape
horizontal (Psh)
same as x
same as y
vertical (Psv)
same as y
same as x
x-density
same as horizontal
same as vertical
y-density
same as vertical
same as horizontal
Use Table 7 and Table 8 with Table 6 to establish the exact
orientations designated by Psh and Psv.
52
Table 7. X-Density Values
Psh
X-Density
(Portrait-dflt)
0
1
2
3
4
5
6
7
8
9
10
11
12
(Dots/Inch)
No change
50
60
70
80
90
100 (default)
110
120
130
140
150
200
Table 8.Y-Density Values
Psv
Y-Density
(Portrait-dflt)
0
1
2
3
4
5
6
7
8
9
10
11
(Dots/Inch)
No change
30
40
50
60
66.67
75
86
100 (default)
120
150
200
53
Chapter
2
Spacing
Spacing
The five spacing sequences covered in this section affect the spacing of lines
and characters. Horizontal pitch affects character spacing in characters per
inch (CPI). Vertical pitch affects line spacing in lines per inch (lpi).
DECSHORP and SHS affect character size in addition to spacing if Print
Mode is set to Enable with the control panel.
Table 9. Line and Character Spacing Sequences
Sequence Name
DEC Mnemonic
Page No.
Spacing Pitch Increment
SPI
page 55
Select Vertical Spacing
SVS
page 57
Set Vertical Pitch
DECVERP
page 58
Select Horizontal Spacing
SHS
page 59
Set Horizontal Pitch
DECSHORP
page 60
Horizontal and vertical pitch values can be changed by using the Select
Horizontal Spacing (SHS) and Select Vertical Spacing (SVS) sequences or
the Spacing Pitch Increment (SPI) sequence. These sequences can accept
two spacing units: decipoints or pixels. To select the unit of measurement,
use the Position Unit Mode (PUM) and Select Size Unit (SSU) sequences.
Alternatively, you can use Set Horizontal Pitch (DECSHORP) and Set Vertical
Pitch (DECVERP) sequences to alter spacing.
Except for DECSHORP, all spacing commands are acted upon as soon as
they are received, and the new spacing increments take effect immediately.
54
Spacing Pitch Increment (SPI)
ASCII Code
ESC [ Pn1 ;
Hex Code
1B 5B Pn1 3B Pn2 20 47
Dec Code
27 91 Pn1 59 Pn2 32 71
Purpose
Pn2 SP G
Sets the vertical and horizontal spacing increments for all
characters that follow in the data stream. You can select one
or both increments with a single Spacing Pitch Increment
sequence. The SPI sequence gives you the greatest flexibility
in adjusting white space (pitch) between characters and lines.
DiscussionThis command sequence uses decipoints or pixels as units.
Select the unit with the Select Size Unit (SSU) sequence.
Spacing Pitch Increment is not affected by the Position Unit
Mode (PUM) sequence or by the page orientation. For
example, if you set a vertical increment of 100 pixels (or 1/6
inch), the printer uses this setting for both portrait and
landscaped pages.
Pn1 selects the vertical spacing increment. Pn2 selects the
horizontal spacing increment. Parameters must be positive
integers. If you use a decimal point, the printer will ignore the
command. Printer default values are Pn1 = 0 and Pn2 = 0,
which selects the spacing of the current font.
You can change the SPI setting for horizontal spacing in
three ways:
•Use another SPI sequence.
•Use a Select Horizontal Spacing (SHS) sequence.
•Use a combination of the Pitch Select Mode (DECPSM) and
Select Horizontal Pitch (DECSHORP) sequences. Most
combinations are acceptable for this function.
You can change the SPI setting for vertical spacing in two
ways:
•Use a Set Vertical Spacing (SVS) sequence.
•Use a Set Vertical Pitch (DECVERP) sequence.
NOTE:If Pn1 or Pn2 is 0 (or omitted), the printer defaults to
the font file pitch setting.
If you set the Print Mode option to Enable with the
control panel, this command will not force the printer
into plot mode. The current print font will be used and
throughput will be at its maximum.
If the Print Mode option is set to Disable, this
command forces the printer into plot mode.
55
Chapter
2
Spacing Pitch Increment (SPI)
If a position command does not precede the printable (graphic)
character, the printer will place that character to the right of the
previously received character.
The distance between characters depends on the values of Pn1
and Pn2 in the most recent SPI, SHS, or DECSHORP sequence.
If you set the Pn1 or Pn2 values to 0, or if you do not send an SPI
sequence, the printer uses the default horizontal and vertical
spacing for the font currently in use.
Horizontal spacing is the same for all font styles.
56
Select Vertical (Line) Spacing (SVS)
ASCII Code
ESC [ Ps SP L
Hex Code
1B 5B Ps 20 4C
Dec Code
27 91 Ps 32 76
Purpose
Selects the vertical spacing (pitch) between lines that is used by
all fonts.
DiscussionPs selects the vertical pitch and vertical character position unit.
SVS does not affect the vertical size of the selected font.
Ps
Vertical Pitch
Vertical Character
Positioning Unit
0
6 lines per inch
1/6 inch (default)
1
4 lines per inch
1/4 inch
2
3 lines per inch
1/3 inch
3
12 lines per inch
1/12 inch
4
8 lines per inch
1/8 inch
5
5 lines per inch
1/5 inch
9
2 lines per inch
1/2 inch
10
10 lines per inch
1/10 inch
57
Chapter
2
Set Vertical Pitch (DECVERP)
Set Vertical Pitch (DECVERP)
ASCII Code
ESC [ Ps z
Hex Code
1B 5B Ps 7A
Dec Code
27 91 Ps 122
Purpose
Selects the number of lines printed per inch on the page.
DiscussionSelects the line spacing (vertical pitch) used with all fonts.
Ps selects the vertical pitch (lines per inch).
Ps
Vertical Pitch
0
6 lines per inch (current default)
2
8 lines per inch
7
10 lines per inch (This setting is accomplished by
reversing the paper.)
Changing vertical pitch to 8 lpi or 10 lpi alters the physical
size of the form, since form length is specified in terms of
lines per page.
Vertical tab stops are not affected by changes to vertical
pitch. For example, a vertical tab at line 15 remains set even
if you change vertical pitch from 6 lpi to 10 lpi.
58
Select Horizontal (Character) Spacing (SHS)
ASCII Code
ESC [ Ps SP K
Hex Code
1B 5B Ps 20 4B
Dec Code
27 91 Ps 32 75
Purpose
Selects character spacing (horizontal pitch).
DiscussionPs selects the horizontal pitch and the horizontal character
position unit. If Print Mode is set to Enable from the control
panel, Ps will change the character size with respect to the
selected pitch. If set to Disable, only the white space between
characters varies.
Ps
Horizontal Pitch
Horizontal Character
Position Unit
0
10 characters per inch
1/10 inch
1
12 characters per inch
1/12 inch
2
15 characters per inch
1/15 inch
3
6 characters per inch
1/6 inch
NOTE: If the Print Mode option is set to Disable with the
control panel, the SHS command can force the
printer into plot mode. If the page contains a dense
concentration of text (many text lines and many
characters per line), the SHS command will cause
the DEC LG Emulation to pause a few seconds
between pages.
To ensure faster text printing, select an appropriate
font and character size setting with DECATFF, SGR
instead of SHS. If the Print Mode is set to Enable
with the control panel, this command will not force
the printer into plot mode and there should be no
pause between pages.
59
Chapter
2
Set Horizontal Pitch (DECSHORP)
Set Horizontal Pitch (DECSHORP)
ASCII Code
ESC [ Ps w
Hex Code
1B 5B Ps 77
Dec Code
27 91 Ps 119
Purpose
Selects the character spacing for monospaced fonts. This
sequence selects the number of characters printed per
horizontal inch on a line. If the Print Mode option is set to
Enable with the control panel, the character size will change
to match the selected pitch. If Print Mode is set to Disable,
only the white space between the characters varies and can
force the printer into plot mode.
DiscussionPitch Select Mode (DECPSM) activates the Set Horizontal Pitch
(DECSHORP) sequence. When DECPSM is set (enabled),
the printer uses the horizontal pitch of the current font. When
DECPSM is reset (disabled), the printer uses the horizontal
pitch selected by the last DECSHORP sequence.
In addition to changing the character size and/or the white
space around characters, this sequence enacts the following:
•Resets the left and right margins to the printable limits.
•Resets the line home and line end positions to the printable
limits. (Refer to the Page Format Select [PFS] sequence
on page 81.)
•The current horizontal tabs remain as set.
•Can force the printer into plot mode when Print Mode is set
to Disable with the control panel.
Ps selects the horizontal pitch (characters per inch).
Ps
60
Horizontal Pitch (cpi)
0
Current font pitch
1
10 characters per inch
2
12 characters per inch
3
13.3 characters per inch
4
16.7 characters per inch
5
5 characters per inch (normal width characters)
6
6 characters per inch
8
8.25 characters per inch
9
15 characters per inch
Vertical Format
Vertical format consists of two control codes that program the printer to make
fast vertical paper movements (slewing) during print jobs. Vertical formatting
increases printer efficiency and reduces printing time for repetitive printing
jobs.
Vertical channels in the form are defined by downloading the Vertical Format
Unit (VFU) from the host to the printer. Subsequent data is then printed on the
form at the specified channel. These functions are achieved by using control
sequences.
Two control sequences, Load VFU and End VFU, are used to enact the VFU
load procedure. Besides loading the VFU, top-of-form is also defined. Top-ofform is determined by the actual paper position when the load VFU command
is sent to the printer; therefore, be sure to align the paper at the desired topof-form before sending the LOAD VFU command.
An example showing several VFU commands and the resulting output is
provided on page 294.
NOTE: In addition to using VFU commands, you may also ensure faster text
printing by selecting an appropriate font and character size setting
with DECATFF, SGR instead of the SHS command. The SHS
command can force the printer into plot mode. If the page contains a
dense concentration of text (many text lines and many characters per
line), the SHS command will cause the DEC LG Emulationto pause a
few seconds between pages.
61
Chapter
2
Load Vertical Format Unit (VFU)
Load Vertical Format Unit (VFU)
ASCII Code
ESC [ < 1 h
Hex Code
1B 5B 3C 31 68
Dec Code
27 91 60 49 104
Purpose
Downloads the VFU from the host to the printer.
DiscussionAll data following the begin load sequence is placed in VFU
memory except ASCII control codes. Any command entered
during load VFU is ignored except the End Load sequence.
All data must be in the VFU load format. If an error occurs
during the load, the load is cancelled. If a load overruns the
maximum forms length, the load is cancelled and any
remaining VFU data is printed. Cancelled loads default to the
current form length setting (as set from the control panel or
with the DECSLPP escape sequence).
VFU load format consists of 2 bytes (one byte pair) for each
line on the page. The structure of each byte follows:
Table 10. Byte 1 Structure (First Character of Pair)
Bits: 7
6
5
4
3
2
1
0
Value: X
1
C6
C5
C4
C3
C2
C1
Table 11. Byte 2 Structure (Second Character of Pair)
Bits: 7
6
5
4
3
2
1
0
Value: X
1
C12
C11
C10
C9
C8
C7
The variables in the two bytes are defined as follows:
C1 - C12 represent channels 1 through 12 with binary 1s and
0s.
C1 identifies the top-of-form (TOF).
C12 identifies the bottom-of-form (BOF).
Bit 7 for each byte is not used. Bit 6 for each byte is always 1.
NOTE:An example showing several VFU commands and the
resulting output is provided on page 294.
62
End Load (VFU)
ASCII Code
ESC [ < 1 l
Hex Code
1B 5B 3C 31 6C
Dec Code
27 91 60 49 108
Purpose
Ends the Vertical Format Unit load.
DiscussionWhen all VFUs are loaded, enact End Load VFU and the form
length set is complete.
NOTE:Load VFU is a long control string format. Make sure
that you do not send a CR, LF, or CR+LF in the
middle of the VFU data. To avoid having to send a
Carriage Return (CR) while entering the Load VFU
command, you may wish to set a wide command line
for your terminal device.
For example: for VMS, you may increase the
command line width for the terminal device used to
communicate with the printer to 132 characters, via
the command $set term/width=132.
An example showing several VFU commands and
the resulting output is provided on page 294.
63
Chapter
2
Channel Command
Channel Command
ASCII Code
ESC [ p1 & y
Hex Code
1B 5B p1 26 79
Dec Code
27 91 p1 38 121
Purpose
The channel commands control paper motion.
P1 consists of three digits: nnn. When the first n equals 9,
reverse paper motion occurs. If the first n equals any value
other than 0 or 9, the entire sequence is ignored. Table 12
gives the values of nnn for each channel.
Table 12. Channel Values
p1
nnn
Move Forward
to Channel
nnn
Move Backward
to Channel
000
1
900
1
001
2
901
002
3
902
003
4
903
004
5
904
005
6
905
006
7
906
007
8
907
008
9
908
009
10
909
010
11
910
011
12
911
* Selecting any other channel than those in this table
results in a default to channel 12.
64
Beware of the following conditions when the selected channel is in the
forward direction:
•If you try to print text at a channel not previously defined, the text prints at
channel 12 (BOF).
•If you try to print text at a channel not previously defined and channel 12
is also undefined, text prints at the next line.
•If a VFU table is not loaded and channel commands are sent to it, a line
feed occurs then the text prints.
•If you load a VFU table with more than one TOF and/or more than one
BOF already defined, the load is terminated and a warning message
is displayed on the front panel.
Beware of the following conditions when the selected channel is in the
reverse direction:
•If you try to print text at a channel not previously defined, a reverse line
feed occurs then the text prints.
•If you try to print text at a channel not previously defined and channel 12
is also undefined, a reverse line feed occurs then the text prints.
•If a VFU table is not loaded and channel commands are sent to it, a
reverse line feed occurs then the text prints.
•If you load a VFU table with more than one TOF and/or more than one
BOF already defined, the load is terminated and an error code is
displayed on the front panel.
65
Chapter
2
Forms
Forms
A form contains data. This data is a sequence of self-contained commands
and text that can occupy one or more pages of the form. The data form can be
downloaded then stored in printer memory for later use. The status report lists
the form IDs loaded in the printer.
Once a form is downloaded, it is selectable. Stored data is merged with the
fill-in data stream, and the merged data is printed as a completed form. When
selected, the printed form can be printed repeatedly with different sets of fill-in
data.
Fill-in data is a sequence of commands and text, usually variable and not
repeated data, used to fill in the empty fields of a form. Each fill-in data field is
terminated with a switch character, as explained in the following section. The
fill-in data for the last field of a page must terminate with a switch character
unless it is the last page of a form. In this case, use the Terminate Form
sequence.
Forms and fill-in data conform to the following :
•
•
Forms cannot be nested.
•
•
•
Form size must not exceed 64K bytes.
Up to 32 forms can be loaded into the printer, subject to available
memory.
Each form page must terminate with FF (0/12) and have at least one field.
Do not use a form-feed character for fill-in data.
The following sections describe how to load a form into memory, select the
form for printing, terminate form generation, and delete the form from storage.
Appendix D provides an example of commands and output for generating a
form, starting on page 289.
66
Loading Forms Sequence (DECLFM)
ASCII Code
DCS P1 ; P2 & p RECORD ST
Hex Code
90 P1 3B P2 26 70 RECORD 9C
Dec Code
144 P1 59 P2 38 112 RECORD 156
Purpose
Allows you to load forms into printer memory.
DiscussionThe Pn parameters define the format of the form as well as which
forms to delete. Forms can be loaded at any time except
during another download operation, or while a form is
printing. Once loaded, forms are selectable until:
•New forms are loaded with the P2 = 3 (replace all forms)
command
•Another form with the same number is loaded (replacing the
old form)
•System power is turned off (all loaded forms are lost)
P1 and P2 can be defined as follows:
•P1 is the form file indicator that specifies the form file format
used in the command string. The value must be 0 and the
file must be in the form file format, otherwise the entire
load form sequence is ignored.
P1
Function
0
DEC LG-series printer form file
format
Other
Sequence is ignored
•P2 defines the replacement action: which forms to delete
before the new form is loaded. If you choose to replace
all forms, note that the forms are deleted even if the new
form is not successfully loaded.
P2
Function
0/Missing
Replace the named form
3
Replace all forms
The form record includes a form header that defines form
parameters and size, and the form data string. It is
constructed as follows:
67
Chapter
2
Loading Forms Sequence (DECLFM)
•
•
•
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.2 Linearized : No Page Count : 310 Page Mode : UseOutlines Create Date : 1910:00:62 61:51:20 Producer : Acrobat Distiller 3.01 for Windows Title : Creator : FrameMaker+SGML 5.5P4fEXIF Metadata provided by EXIF.tools