Genicom 5000 Series Programmer's Manual

Page 1
GEnicom
5000 Series
Programmer’s Manual
GEK – 00031B
Page 2
Table of Contents Page
overview of printer emulation...............................................................8
Control Codes......................................................................................8
Escape Sequences ...............................................................................8
CSI and OSC .......................................................................................9
Line Terminators ...............................................................................10
Decipoints .........................................................................................10
SCS Smart Graphics Capabilities.......................................................10
Chapter 2. ANSI Emulation............................................................ 11
Control Code and Escape Sequence Activity Levels.............................11
Notes............................................................................................11
Control Code Activity Levels ............................................................12
Escape Sequence Activity Levels......................................................13
Control Code Definitions....................................................................14
Escape Sequence Directory................................................................16
ANSI ESCAPE SEQUENCE CATEGORIES ..........................................18
Housekeeping Sequences ................................................................19
Character Set Selection...................................................................22
Character Map Load........................................................................23
Paper and Print Position Movements ...............................................25
Margins and Tabs ...........................................................................28
Font Handling and Enhancements ..................................................31
Graphics............................................................................................36
Six-Bit Graphics .............................................................................36
Dot Patterns and Densities..............................................................36
Horizontal Format ........................................................................38
Vertical Format ............................................................................38
Eight-Bit Graphics ..........................................................................39
Horizontal Format ........................................................................39
Vertical Format ............................................................................39
Other Graphics Considerations.....................................................40
Graphics Sequences........................................................................40
Electronic Vertical Format Unit - EVFU..............................................42
Downloading the EVFU ...................................................................42
Loading the Table............................................................................42
BASIC Programming Example for EVFU Table Loading .................43
EVFU Default..................................................................................44
Skip to Channel Command .............................................................44
BASIC Programming Example for Skip to Channel........................45
Bar codes ..........................................................................................46
Entering and Exiting Bar Codes ......................................................46
5000 Programmer’s Manual GEK-00029B
2
Page 3
Table of Contents Page
Chapter 2. ANSI Emulation (Continued)
ANSI 4800/4410 Strap 1 OUT ........................................................ 46
ANSI 4800/4410 Strap 1 IN ........................................................... 46
Setting Bar Code Parameters.......................................................... 47
Bar Code Dimensions .................................................................. 48
Default Bar Code Characteristics ................................................. 50
Human-Readable Line (HRL) .......................................................... 50
Font Styles and Enhancements ...................................................... 50
Spacing and Bar Code Editing Aids ................................................ 50
Bar Code Readability Statement ..................................................... 51
Bar Code Program Examples .......................................................... 52
Test Program.................................................................................. 52
Error Symbol.................................................................................. 52
Changing Parameters ..................................................................... 53
Commas and Spaces as Delimiters ................................................. 53
Horizontal Spacing ......................................................................... 54
Printer Option Strap 11, Group 2 IN ............................................... 55
EXAMPLE 1: Strap 11 OUT.......................................................... 55
EXAMPLE 2: Strap 11 IN ............................................................. 55
EXAMPLE 3: Strap 11 OUT with no suppression of LF/CR on line 30
.................................................................................................... 56
Vertical Bar Codes.......................................................................... 57
COMMAS: With HRL.................................................................... 57
COMMAS: Without HRL............................................................... 58
SPACES: With HRL...................................................................... 58
SPACES: Without HRL................................................................. 58
Horizontal Tabs ........................................................................... 59
OVERSIZE CHARACTER FONT ......................................................... 60
Entering and Exiting Oversize ........................................................ 60
Selecting Size ................................................................................. 61
Size Parameters for Rotation ........................................................ 61
Spacing Between Characters........................................................ 61
Sample Programs ........................................................................... 62
Example 1 ................................................................................... 62
Example 2 ................................................................................... 62
Example 3: Showing the Importance of Resetting Scaling Factors. 63
Printer Control Strap GenPrtOpts/Group 2/Strap 13................... 64
Example 4: GenPtrOpts | Group 2 Strap 13 IN ............................ 65
Example 5: GenPtrOpts | Group 2 Strap 13 OUT ........................... 65
GEK-00029B Table of Contents
3
Page 4
Table of Contents Page
Chapter 3.Printronix P300/P600 Emulation .................................. 66
Introduction ......................................................................................66
Control Codes....................................................................................66
Printronix Graphics ...........................................................................69
Dot Patterns and Densities..............................................................69
Dot Patterns.................................................................................70
Normal-Density Graphics .............................................................71
High-Density Graphics .................................................................71
P300/600 8-Bit Horizontal Graphics ...............................................71
P300/600 Electronic Vertical Format Unit .........................................72
Using the EVFU ..............................................................................72
Points to Remember .....................................................................72
PI Lead Codes – Use with Serial Interface......................................73
Codes Not Using the PI Lead.........................................................73
Example EVFU Loading Program ..................................................74
Example Form Printout ................................................................75
Sample Program to Print Form......................................................75
Chapter 4.Printronix P-Series Emulation ....................................... 76
Special Function Control Character (SFCC)........................................76
Command Line................................................................................76
Set and Reset Codes........................................................................77
Command Index ................................................................................78
Control Codes....................................................................................80
character sets, FONT handling and enhancements.............................82
Housekeeping Commands..................................................................92
Plot Mode Graphics Operational Description ......................................98
Plot Density ....................................................................................98
Normal Density Plot Mode ...............................................................98
Double Density Plot Mode ...............................................................98
Plot Mode Format............................................................................98
Plot Data Line Format .....................................................................99
Normal Density Plot Mode Format ...................................................99
Double Density Plot Mode Format .................................................100
Plot Mode Graphic Character Chart...............................................101
Exiting Plot Mode Graphics ...........................................................101
Plot Mode Graphics density commands............................................102
Differences From Target Printer Emulation ......................................104
Discarded Commands ...................................................................104
Select Extended Character Set (SFCC OSET;n) ...........................104
Download a Language (SFCC V)..................................................104
Download a Character Shape (SFCC c) .......................................104
5000 Programmer’s Manual GEK-00029B
4
Page 5
Table of Contents Page
Chapter 4.Printronix P-Series Emulation (Continued)
Postnet Bar codes (SFCC |p*xxxxx-yyyy-zz*).............................. 104
Ribbon Minder Enable/Disable (SFCC r E/SFCC r D) ................ 104
Ribbon Minder Set Job Rate (SFCC r J nnnn E) ......................... 104
Ribbon Minder Worn Message (SFCC r A n)................................ 104
Command Line Debug..................................................................... 105
Font Styles, Pitches, and Character Sets ......................................... 106
Font Styles ................................................................................... 106
Font Pitches ................................................................................. 106
Character Sets ............................................................................. 106
Extended Character Sets .............................................................. 106
Form Length................................................................................. 106
Plot Mode Graphic Densities......................................................... 107
Enhancements ............................................................................. 107
High Vertical Density Plot Mode Graphics .................................. 107
Chapter 5.Proprinter Emulation.................................................. 108
Introduction.................................................................................... 108
Differences from proprinter ............................................................. 108
Proprinter Control Codes................................................................. 108
Command Directory........................................................................ 111
Escape Sequences........................................................................... 112
Proprinter Dot Graphics.................................................................. 119
Chapter 6.Epson FX286-e Emulation .......................................... 122
Introduction.................................................................................... 122
Conventions Used in this Chapter ................................................ 122
Print Mode Combinations ............................................................. 123
Functional Differences .................................................................... 124
Additional Escape Sequences .......................................................... 125
Unsupported Escape Sequences...................................................... 125
FX-286e Control Codes ................................................................... 126
FX-286e Escape Sequence DIRECTORY .......................................... 129
FX-286e Escape Sequence GROUPINGS.......................................... 131
Margins .......................................................................................... 132
Line Spacing ................................................................................... 134
Character Spacing .......................................................................... 135
Tabs ............................................................................................... 136
Paper Movement ............................................................................. 138
Print Position .................................................................................. 139
Print Modes .................................................................................... 141
Special Character Printing .............................................................. 145
GEK-00029B Table of Contents
5
Page 6
Table of Contents Page
Chapter 6.Epson FX286-e Emulation (Continued)
Miscellaneous Commands ...............................................................149
FX-286e Dot Graphics .....................................................................150
Specifying Graphics Line Length ...................................................150
Image Data Bytes ..........................................................................151
Graphics Programming Example ...................................................151
Printed Results of Sample Program ...............................................151
FX-286e Dot Graphics Control Sequences........................................152
Chapter 7.DEC LG / Compaq LG Plus Emulation.......................... 155
Control Code Definitions..................................................................155
Commands ......................................................................................158
Chapter 8.PPL3 Plus Emulation ................................................... 195
INTRODUCTION ..............................................................................195
General Considerations.................................................................195
Coded Characters .........................................................................195
7-Bit Versus 8-Bit Environments ..................................................196
Printable Characters .....................................................................198
CONTROL CODES ...........................................................................199
Introduction..................................................................................199
C0 Control Characters ..................................................................199
C1 Control Characters ..................................................................201
SPECIAL CHARACTER PROCESSING ..............................................203
Hex 20 ..........................................................................................203
Hex 7F ..........................................................................................203
Hex A0..........................................................................................203
Hex FF ..........................................................................................203
Special Character Parsing .............................................................204
ESCAPE SEQUENCE / control function syntax................................205
Escape Sequence Syntax...............................................................205
Control Sequence Syntax ..............................................................205
Parameter Values Within Control Sequences .................................206
COMMAND DIRECTORY..................................................................207
COMMAND DICTIONARY.................................................................209
PAGE COORDINATE SYSTEM..........................................................251
Coordinate System Models ............................................................251
Character Cell Model ..................................................................252
Point Model ................................................................................252
Point Model Has Precedence .......................................................252
Origin and Extent .........................................................................252
Origin.........................................................................................252
5000 Programmer’s Manual GEK-00029B
6
Page 7
Table of Contents Page
Chapter 8.PPL3 Plus Emulation (Continued)
Printable Area............................................................................ 253
Positioning and Movement............................................................ 253
Horizontal Advance Increments .................................................... 254
Fixed HAI................................................................................... 254
SIXEL GRAPHICS ........................................................................... 256
Terminology and Concepts............................................................ 256
General Sixel Graphics Operation................................................. 257
Sixel Graphics Commands............................................................ 258
Appendix A. Using the Hex Dump................................................ 261
Appendix B. Font Print Samples.................................................. 262
Appendix C. Postnet Bar codes.................................................... 265
Entering and Exiting POSTNET Bar Codes ...................................... 265
Selecting POSTNET Style Bar Codes ............................................. 265
Appendix D. Description of Strapping Options ............................ 268
General Printer Options Definitions................................................. 269
Legacy Parallel Software Strap Definitions....................................... 270
Emulation Option descriptions........................................................ 271
Appendix E. DSC Code Charts ........................................................ 275
Index .......................................................................................... 310
GEK-00029B Table of Contents
7
Page 8
CHAPTER 1. INTRODUCTION
OVERVIEW OF PRINTER EMULATION
Commands are sent to the printer in the form of control codes and escape sequences. These differ from normal data to be printed in that they give instructions to the printer on paper movement, style of print, size, density, and many other selectable features.
Certain protocols are needed so that the printer can recognize and act on these commands sent from the host.
The shuttle matrix printer contains emulations to make it behave in a manner that is functionally similar to other printers. The emulations that it contains are:
▪ ANSI Standard X3.64-1979 (Default)
▪ Printronix P300/P600
▪ Printronix P Series
▪ IBM Proprinter
▪ Epson FX286-e (9-wire dot matrix)
▪ DEC LG / Compaq LGPlus
▪ DEC PPL III
Each emulation has a set of control codes and/or escape sequences that are explained in this manual. There is a separate chapter for each emulation.
CONTROL CODES
Control codes are used to transmit information other than printable characters to the printer. They may occupy the first 32 locations on the ASCII code chart and are represented by two- or three-letter abbreviations. Locations 0X80 through 0X9F may also be interpreted as control codes, depending on the emulation and settings.
The control code <LF> (10 decimal, 0A hex), for instance, is almost universally interpreted as a line feed. However, the response of the printer to other control codes will depend on the emulation.
ESCAPE SEQUENCES
Remote selection of the printer's functions and features is achieved by using command strings (a combination of characters and parameters) preceded by an <ESC> (27 decimal, IB hex) or CSI character (155 decimal, 9B hex). Escape sequences associated with similar functions will vary from one emulation to the next.
Chapter 1. Introduction GEK-00029B
8
Page 9
NOTE The physical spaces in the escape sequences shown in this publication are only for clarification purposes and are not used in the actual string. If a space is actually needed in the sequence, it will be shown as an <SP> in the mnemonic form of the sequence. In the decimal form, it will appear as a 32, and in the hexadecimal form, as 20.
Examples are shown below of escape sequences as written in the text: with parameters filled in and written in the BASIC programming language assuming the use of the LPRINT instruction. The parameter values are actualized in these examples, but will be shown as parameters thereafter. Note that parameters are surrounded by angle brackets (<>).
Tab Clear
Mnemonic: <ESC> [ <p1> g (assume p1=16) Decimal: 27 91 16 103 Hex: 1B 5B 10 67 BASIC: CHR$(27);"[16g"
Horizontal Tabs Set
Mnemonic: <ESC> [ <p1> ; <p2>... u (assume p1=648,
p2=1386, p3=2808) Decimal: 27 91 648 59 1386 59 2808 117 Hex: 1B 5B 288 3B 56A 3B 0AF8 75 BASIC: CHR$(27);"[648;1386;2808u"
CSI AND OSC
Expand Characters
Mnemonic: <ESC> [ <p1> ; <p2> SP B (assume p1=200
and p2=200) Decimal: 27 91 200 59 200 32 66 Hex: 1B 5B C8 3B C8 20 42 BASIC: CHR$(27);"[200;200 B"
A control sequence introducer <CSI> signals the beginning of an ANSI sequence using the <ESC> code and the left bracket ([). <CSI> (9B hex) can be used instead of <ESC> [ (1B 5B hex) when the printer is receiving and processing 8-bit data. <ESC> [ will be used predominately in this manual for the examples.
An operating system command (OSC) signals the start of a download sequence using the <ESC> code and the right bracket (]). <OSC> (9D hex) can be use instead of <ESC> ] (1B 5D hex) when the printer is receiving and processing 8 bit data. <ESC> ] will be used predominately in this manual for the examples.
GEK-00029B 5000 Series Programmer’s Manual
9
Page 10
LINE TERMINATORS
Some control codes and escape sequences act as line terminators. Line terminators cause all data received since the last terminator to be printed. Without a terminator, data will remain buffered.
DECIPOINTS
Throughout this manual decipoints are used as a unit of measure. A decipoint equals 1/720th of an inch and is used as a standard of measurement for parameters associated with set distances. A few examples are margins, tabs, and vertical paper movements. See Appendix D for the decipoint conversion tables.
SCS SMART GRAPHICS CAPABILITIES
The 5000 series printers have SCS smart graphics processing as a standard feature that can be enabled via the CCU control panel menus. The graphics emulations include both IGP and QMS Code V version 2. There are separate programming manuals for each of these graphics language emulations.
The graphics printing emulations provide capabilities for such things as:
▪ Barcoding (including POSTNET codes)
▪ Rotated text
▪ Downloading of and host-controlled selection of predefined forms
▪ Loading of data into predefined forms
▪ Dynamic alphanumeric data
Chapter 1. Introduction GEK-00029B
10
Page 11
CHAPTER 2. ANSI EMULATION
CONTROL CODE AND ESCAPE SEQUENCE ACTIVITY LEVELS
ANSI control codes and escape sequences are assigned activity levels depending on which print mode is currently active. The following charts provide information on what to expect from the control codes and escape sequences in each printing mode.
I
-IGNORED No noticeable effect on printing will occur.
V
-VALID These sequences do not affect the printing mode in progress, but take effect when normal printing resumes.
A
–ACTIVE This sequence takes effect immediately.
D
–DATA These control codes are used as data.
Notes
Note 1
Note 2
Note 3
Note 4
When printer option 1 is active, either in ANSI (4800) or ANSI (4410) emulation, <SO> and <SI> activate or deactivate this printing mode. <SO> and <SI> are VALID in bar codes and oversize print mode. They are ACTIVE in expanded print mode. Please see Appendix D, Description of Strapping options, ANSI (4800) or ANSI (4410) tables on page 271 for details on options which affect printer operation in ANSI emulation.
VALID during enhanced oversize, ACTIVE during normal oversize.
Discarded while in the native mode. Causes an error symbol to print (XOX).
GEK-00029B 5000 Series Programmer’s Manual
11
Page 12
Control Code Activity Levels
Control
Code
BEL No A A D A Note 4
BS Yes A I I I Note 4
CR Yes A A I A Note 4 DC1 No A A D A Note 4 DC3 No A A D A Note 4 DEL No Note 3 Note 3 D Note 3 Note 4
FF Yes A A I A Note 4
HTNo AAAA A
LF Yes A A I A Note 4
SI No A I Note 1 Note 1 Note 4 SO No A I Note 1 Note 1 Note 4 VT Yes A A I A Note 4
Line
Terminator
Control Code Activity Levels
Normal
Dot
Graphics
Bar
Codes
Oversize POSTNET
Chapter 2. ANSI Emulation GEK-00029B
12
Page 13
Escape Sequence Activity Levels
Escape Sequence
DCS (Graphics) No A I I A I Font Load No A I I A I GENBCS No A A A A I GENFD No A AAA I GENGRM No A V A A I GENHTS No A A A A I GENOSM No A V V A I GENSLR No A A A A I GENSNC No A V V Note 2 I GENSPM No A V A A A GENTST Yes A A I A I GENVFU Yes A AAA I DENVTS No A A A A I GSM No A V V A I HPA Yes A AAA I HPB Yes A AAA I HPR No A AAA I HTS No A AAA I HVP Yes A AAA I PLD Yes A I I A I PLU Yes A I I A I REP No A A I A I RIS No A AAA I RM No A AAA I SGR No A V V Note 2 I SM No A AAA I SPI No A V V Note 2 I ST No I A I I I TBC No A AAA I VFU Load No A I I A I VPA Yes A AAA I VPB Yes A AAA I VPR Yes A AAA I VTS No A AAA I
Line
Terminator
Normal
Dot
Graphics
Bar
Codes
Oversize POSTNET
GEK-00029B 5000 Series Programmer’s Manual
13
Page 14
CONTROL CODE DEFINITIONS
BEL Bell (07H):
approximately 1/2 second after any preceding printable data has
been processed.
BS Back Space (08H):
unchanged and the print position is moved left one character space
from the current. If the print position is at the left margin, no action
is taken.
CR Carriage Return (0DH):
to the left margin, and the paper position is left unchanged.
CSI Control Sequence Introducer (9BH):
ANSI control sequence. When 8-bit data is used, CSI (9BH) can be
substituted for ESC [ (1BH 5BH). Also see ESC.
DC1 Device Control 1 (11H):
DC1 code with the printer in local mode puts the printer online
(selects printer) and enables receipt of data.
Through CCU menu options, a serial interface protocol may be
selected that transmits a DC1 code to the host to signal that the
printer is ready to receive data.
The print position can also be set to the left margin via the CCU Control Panel Menu using the SETUP/FORMAT/MODIFY FORMAT/PRINT CONTROL menu selection.
Receipt of a BEL code causes the beeper to sound for
Line terminator. The paper position remains
Line terminator. The print position is reset
Parallel and Serial Interface: Receipt of a
NOTE
Signals the beginning of an
DC3 Device Control 3 (13H):
DC3 code when online places the printer in local mode (deselects
printer) and causes it to ignore all data except a <DC1>.
Through menu options, a serial interface protocol may be
transmits a <DC3> code to the host to signal that the printer is not ready to
receive data.
(See note for <DC1), above.)
ESC Escape (1BH):
CSI above.
Signals the beginning of an escape sequence. See also
Parallel and Serial Interface: Receipt of a
selected that
Chapter 2. ANSI Emulation GEK-00029B
14
Page 15
FF Form Feed (0CH):
top-of-form position. When the EVFU is enabled and programmed, paper will advance to the next stop in channel 1.
An option strap from the CCU Control Panel Menu using the SETUP/FORMAT/MODIFY FORMAT/GENPRTOPTS selection can disable this feature.
Line terminator. The paper is advanced to the
NOTE
next
HT Horizontal Tab (09H):
horizontal tab location. If no tabs are set, an HT code is either converted to a space or ignored, depending on the menu option settings.
LF Line Feed (0AH):
Line terminator. The paper is advanced to the
line. When printing horizontal dot graphics, the paper is advanced to the next dot row.
(See note for <FF>, above.)
SI Shift In (0FH):
Used to exit a Special Print Mode (GENSPM) when
ANSI emulation strap 1 (Appendix G, tables 5 and 6) is active.
SO Shift Out (0EH):
Used to enable a special print mode (GENSPM)
ANSI emulation strap (Appendix G, tables 5 and 6) 1 is inactive.
VT Vertical Tab (0BH):
Line terminator. The paper is advanced to
next vertical tab stop. If no tabs are set, a VT code causes a line feed. When using the EVFU, paper advances to the next stop in channel 12.
(See note for <FF>, above.)
Advances the print position to the next
next
when
the
GEK-00029B 5000 Series Programmer’s Manual
15
Page 16
ESCAPE SEQUENCE DIRECTORY
Sequence Meaning Page
CSI or ESC [ Control Sequence Introducer 19
CSI p1 p2 SP ~ GENEMU: Selects emulation 21
ESC [p1 ; p2 SP B GSM: Modifies vertical (p1) and horizontal (p2)
31
character size
ESC [p1 ; p2 SP G SPI: Sets lpi (p1) and/or cpi (p2) in decipoints 32
ESC H HTS: Sets a tab at current print position 30
ESC J VTS: Sets a tab at current paper position 28
ESC K PLD: Moves print line down 3/72 inch (subscript) 25
ESC L PLU: Moves print line up 3/72 inch (superscript) 42
ESC P DCS: Introduces dot graphics 40
ESC Q Self-Test: Inactive. Sequence ignored.
ESC [ p1 a HPR: Moves print position right p1 distance (relative) 25
ESC [ p1 b REP: Dot graphics: repeat preceding character p1
40
times
ESC c RIS: Resets printer to a known initial state 35
ESC [ p1 d VPA: Sets vertical position to p1 decipoints or lines 26
ESC [ pl e VPR: Moves paper forward p1 decipoints 26
ESC [ p1; p2 f HVP: Moves paper and print position (absolute) 26
ESC [ p1 g TBC: Clears tabs: p1=3 for horizontal 28
ESC [ p1 ; ...; pn h SM: Set mode (PUM, LNM, proportional, character
34
mapping)
ESC [ p1 j HPB: Moves print position left by decipoints or
26
columns
ESC [ p1 k VPB: Moves paper backward by decipoints or lines 27
ESC [ p1 l RM: Reset mode (PUM, LNM, proportional, character
32
mapping)
ESC [ p1; ... pn m SGR: Selects font styles and enhancements 32
ESC [ p1 p2 ! p GENVF2: EVFU vertical paper movement command 44
ESC [ p1 ; p2 ; p3 q GENGRM: Selects graphics horizontal and vertical dot
41
densities
ESC [ p1; p2 ; p3 r GENFD: Sets form length (pl), margins: top (p2),
28
bottom (p3)
ESC [ p1; p2 s GENSLR: Sets margins: left (p1), right (p2) in
29
decipoints
ESC [ p1 t Selects bar codes p1=3, quit bar code p1=0 46
Chapter 2. ANSI Emulation GEK-00029B
16
Page 17
Sequence Meaning Page
ESC [ p1;… pn u GENHTS: Sets horizontal tabs (p1, etc.) in decipoints
30
or columns
ESC [ p1 ;… p12;v GENVTS: Sets vertical tabs (p1, etc.) in decipoints or
30
lines
ESC [ p1 x GENSNC: Selects international character sets 22
ESC [ p1 ; ...;p10 } Selects bar code parameters
ESC [ p1 SP } GENDFC: Download Font Control: Checks printer for
35
downloaded font
OSC or ESC ] Operating System Command: introduces sequence 19
ESC ] 5 BFL (Begin Font Load): Valid only if download option
35
is installed.
ESC ] ! Begins 12-channel EVFU table loading 42
ESC \ ST: String Terminator. Exits special modes 19
ESC [ p1 ` HPA: Horizontal Position Absolute 27
OSC 9 ; p1 ; ... ; p8-pn
Character Map Load 23
ST
GEK-00029B 5000 Series Programmer’s Manual
17
Page 18
ANSI ESCAPE SEQUENCE CATEGORIES
The ANSI escape sequences have been separated according to
functionality. Special areas of interest, such as graphics and the
electronic vertical format unit (EVFU), have been described in
separate sections. The functional groups are:
▪ Housekeeping
▪ Paper and Print Positioning
▪ Margins and Tabs
▪ Font Handling and Enhancements
▪ Graphics
▪ EVFU
Chapter 2. ANSI Emulation GEK-00029B
18
Page 19
Housekeeping Sequences
ESC [ CSI (Control Sequence Introducer):
sequences, that generally have multiple parameters.
ESC ] OSC (Operating System Command):
sequence introducer. Sequences which begin with OSC require the ST string terminator sequence (ESC \) to end them.
ESC \ ST (String Terminator):
Terminates the loading of EVFU tables,
download fonts, and dot graphics strings.
ESC c RIS (Reset to Initial State):
Resets the printer to either the standard state shown below or to the state stored in the customer save area of memory. The RIS sequence can be disabled by ANSI option strap 3 (see Appendix D, ANSI (4800) or ANSI (4410), option 3).
RIS – Reset to Initial State
Parameter State
Font Style Gothic Draft Character Size 1X Vertical, 1X Horizontal Character Pitch 10 cpi Country Selection USA Code Page 437 Line Spacing 6 lpi Partial Line Up Reset Partial Line Down Reset Bold Print Inactive Underline Mode Inactive Expanded Mode Inactive Proportional Mode Reset Horizontal Tab Table Empty Left Margin None - Column 0 Right Margin None - Maximum Form Number 7 Page Size 7920 decipoints/ 66 lines/11 inches Top Margin None Bottom Margin None Forms Position Top of form - current position Vertical Tab Table Empty Vertical Format Unit Default Graphics Density 60 H dpi, 72 V dpi, horizontal format VFU Load In Progress Exit (nothing saved) Bar Code Mode Inactive Dot Graphics Inactive
This sequence is used to begin
This is another special
Decimal 27 99: Hex: 1B 63 BASIC: CHR$(27);"c";
GEK-00029B 5000 Series Programmer’s Manual
19
Page 20
ESC Q GENTST (Self-Test):
Decimal: 27 102 or 120 Hex: 1B 5C or 9C BASIC: CHR$(27);"Q";
This sequence is ignored.
Chapter 2. ANSI Emulation GEK-00029B
20
Page 21
CSI p1 p2 SP ~ GENEMU (Emulation Control):
another emulation. The parameters in the sequence are defined as follows:
p1 Emulation identifier. This parameter selects the particular
emulation by a reference number supplied by GENICOM engineering. The assigned numbers may be found in the table below.
p2 Reset control. Permits the parameters of the printer to be
reset or defaulted. It is not always possible to meet the strict definition of this parameter, so each printer has a definition of how the reset control is implemented. The values as currently defined are:
0
Hold values (default). All possible values for printer control, e.g., tabs, margins, page length, are to be retained.
1
Full reset. Resets parameters to initial state.
p1 Manufacturer Emulation
0GENICOM ANSI
10 GENICOM 4410 ANSI
1-19 GENICOM Reserved
20 IBM Graphics Printer 21 IBM Proprinter XL 9-wire 22 Epson FX286-e 23 IBM Proprinter XL 24-wire 24 Epson LQ2500 30 Data Products ANSI 40 Printronix P300 41 Printronix P5008
Switches the control of the printer to
Indeterminate Conditions
If no emulation parameter is supplied, the emulation remains in the current state and the rest of the sequence is ignored. Other parameter values and other parameters are reserved.
Mnemonic: <CSI> <p1> <p2> <SP> ~ Decimal: 27 91 <p1> <p2> 32 126 Hex: 1B 5B <p1> <p2> 20 7E BASIC: CHR$(27);"<p1><p2><SP>~";
GEK-00029B 5000 Series Programmer’s Manual
21
Page 22
Character Set Selection
ESC [ p1 x GENSNC (Select National Characters):
national character substitution if the currently selected character style supports it. The following values may be used for p1.
p1 Country Map or Character Set
0 USA (ISO) 1 German (ISO) 2 French A (ISO) 3 French B 4 French Canadian 5 Dutch (Netherlands) 6 Italian 7 United Kingdom (ISO) 8Spanish
9 Danish/Norwegian A 10 Danish/Norwegian B 11 Danish/Norwegian C 12 Danish/Norwegian D 13 Swedish/Finnish A 14 Swedish/Finnish B 15 Swedish/Finnish C 16 Swedish/Finnish D 17 Swiss 18 (Ignored) 19 Yugoslavian 20 United Kingdom A 21 Turkish 22 Greek 23 Italian (ISO) 24 Spanish (ISO)
437 IBM PC USA (MS Code Page 437) 850 IBM PC Multilingual (MS Code Page 850) 852 Microsoft Code Page 852 (East Europe) 853 Microsoft Code Page 853 (Turkey) 855 Microsoft Code Page 855 (Cyrillic) 860 Microsoft Code Page 860 863 Microsoft Code Page 863 (French Canadian) 864 Microsoft Code Page 864 865 Microsoft Code Page 865 866 Microsoft Code Page 866 (Russian)
867 Microsoft Code Page 867 8572 USSR GOST (Russian) 8573 Greek Code Page 437 8574 DEC Multinational (LA-210) 8575 Roman 8 8576 Polish Mazowia 8577 Turkish 8-bit Code Page 8578 Greek Code Page 851 8591 ISO 8859-1 Latin Alphabet #1 8592 ISO 8859-2 Latin Alphabet #2
This sequence selects the
Chapter 2. ANSI Emulation GEK-00029B
22
Page 23
Character Map Load
p1 Country Map or Character Set
8593 ISO 8859-3 Latin Alphabet #3 8594 ISO 8859-4 Latin Alphabet #4 8595 ISO 8859-5 Latin/Cyrillic 8596 ISO 8859-6 Latin/Arabic 8597 ISO 8859-7 Latin/Greek 8598 ISO 8859-8 Latin/Hebrew 8599 ISO 8859-9 Latin Alphabet #5
OSC 9 ; p1 ; ... ; Character Map Load: p8-pn ST
Character Map Load data transfer. Character map definitions, which follow this sequence, are stored in non-volatile memory. The character map is selected with the GENICOM Select National Characters (GENSNC) command using the p2 parameter that is specified in the load sequence for this command. The load is terminated by a String Terminator (ST) sequence. The downloaded character map replaces the USA ISO character set in character map memory.
A single character map containing 128 substitutions may be specified. A character map may be designated for either the GL table (codes 20H-7EH) or the GR table (codes 80H-FFH). Any substitutions not specified within a character map load will be mapped one-to-one. For example, code 41H prints the character normally found at location 41H (upper case A). When a character map designated as a GR map is selected by the GENSNC command (see Character Set Selection on page 22), the GL map will automatically be mapped one-to-one. A standard GL (7-bit) character map, such as French A, may be specified as the base for a downloaded GR (8-bit) character map, but an 8-bit GR map, Code Page 866, for example, may NOT be used as the base for a GL character map.
The complete syntax for the Character Set Load is shown below: <OSC>9;<p1>;<p2>;...;<pn><ST>
This sequence signals the beginning of a
p1 Control Command
p2 GENSNC (CSI p1 x) select parameter. Values must be between
p3 Reserved. This parameter is marked by inserting a semicolon
p4 Reserved. This parameter is marked by inserting a semicolon
GEK-00029B 5000 Series Programmer’s Manual
0 1
Stores new character map Erases existing character. In this case, parameters p2­pn are ignored and need not be supplied. An existing downloaded character map need not be erased before a new character map is loaded.
All other values of p1 are reserved.
90 and 99 in order not to interfere with GENICOM standard character maps. If a downloaded character map select parameter is a value other than 90 through 99, the download character map command is ignored.
(;) in the command sequence.
(;) in the command sequence.
23
Page 24
p5 Reserved. This parameter is marked by inserting a semicolon
(;) in the command sequence.
p6 A literal string indicating the GENSNC select parameter of an
existing character map (such as 437 or 850) to be used as a base in which substitutions from this command sequence may be made. This string may be up to 10 characters in length and must be specified only if the downloaded character map uses an existing map as a base. The string is terminated by a semi-colon (;). The base character map always defaults to Code Page 437 if an ACT character map is specified and the downloaded character map is a GR table. If the downloaded map is a GL table, p6 must specify an existing GL table as the base or a one-to-one default base is used.
p7 A literal string used to identify the character map in the
Progam Mode Font – Country menu. This string may be up to 20 characters in length and is terminated by a semi-colon (;). Note that only the first 11 characters of this string are used for display purposes.
p8-pn A trio of parameters used to specify the actual character map
substitution. A semicolon must separate each parameter within the trio, and a semicolon must terminate each trio. The semicolon is not required for the last trio that immediately precedes the String Terminator (ESC \).
The elements of each trio are defined as follows: 1 A decimal number that identifies the destination
character. This is the character value received from the host. For example, an upper case "A" has a decimal value of 65. Values of 32 through 126 and 128 through 255 are valid for this element.
The first element processed in the first substitution trio defines whether the map is for GL (7-bit) or GR (8-bit) substitution. If the first element is between 32 and 126 (inclusive), the map is GL, and the first element of each trio must also be between 32 and 126. Likewise, if the first element of the first trio is between 128 and 255, the map is a GR map and all first elements must fall between 128 and 255. The character substitution map is discarded if this rule is violated.
2 A decimal number that identifies the source character.
This is the location value of the desired character pattern in the printer font set. For example, an upper case "A" has a decimal value of 65. Values of 0 through the last available character for the currently selected font are valid for this element.
3 Reserved. A semicolon (;) is required to mark this element
position. A zero is permitted.
Chapter 2. ANSI Emulation GEK-00029B
24
Page 25
Paper and Print Position Movements
ESC K PLD (Partial Line Down):
3/72 inch for subscript printing. Also returns to the original line following a partial line up (<ESC> L - superscript) sequence. See note below.
Decimal: 27 75 Hex: 1B 4B BASIC: CHR(27)$;"K";
ESC L PLU (Partial Line Up):
Line terminator. Moves the print line up 3/72 inch for superscript printing. Also used to return to the original line following a partial line down (ESC K - subscript) sequence. See note.
Decimal: 27 76 Hex: 1B 4C BASIC: CHR$(27);"L";
In the 4800 emulation, these sequences can be used in succession to advance or reverse the paper to another line. In the 4410 emulation, they can be used in pairs to change from superscript directly to subscript or subscript directly to superscript, but can not be used to position the paper.
Also see the SScript: ON/OFF menu selection in the User's Manual.
Line terminator. Moves the print line down
NOTE
ESC [ p1 a HPR (Horizontal Position Relative):
print position to the right of the current position. The distance specified by the p1 parameter is in decipoints. An HPR move exceeding the right margin sets the print position at the margin. If the p1 parameter is zero or missing, the command is ignored.
Decimal: 27 91 <p1> 97 Hex: 1B 5B <p1> 61 BASIC: CHR$(27);"[<p1>a";
Line terminator. Moves the
GEK-00029B 5000 Series Programmer’s Manual
25
Page 26
ESC [ p1 d VPA (Vertical Position Absolute):
position to the value specified by <p1>, moving paper forward or backward to the new position. The distance specified by the <p1> parameter is in decipoints. This command can be used to print inside top and bottom margins. If the specified position is not within the current page, the command is ignored. If the parameter value is omitted or less than 5 decipoints, it will result in the vertical position being set to the top of form position.
Decimal: 27 91 <p1> 100 Hex: 1B 5B <p1> 64 BASIC: CHR$(27);"[";CHR$(<p1>);"d";
Line terminator. Sets the vertical
ESC [ p1 e VPR (Vertical Position Relative):
Line terminator. Increases the current vertical position by the value specified by p1. Decipoints are converted to provide the 1/144-inch moves shown in the table.
Decipoint Value Movement In Inches
Missing or 0 – 4 No Movement 5-9 1/144 inch 10-14 2/144 inch 15-19 3/144 inch
17,280 or greater 24 inches
Decimal: 27 91 <p1> 95 Hex: 1B 5B <pl> 65 BASIC: CHR$(27);"[<p1>e";
ESC [ p1 ; p2 f HVP (Horizontal and Vertical Position):
vertical paper position to the value of <p1> and the print position to the <p2> value. Values are sent as decipoints. HVP can position printing inside margins. The vertical position can not exceed the form length and the horizontal position cannot exceed the maximum width for the printer.
Decimal: 27 91 <p1> 52 96 Hex: 1B 5B <p1> 3B <p2> 66 BASIC: CHR$(27);"[<p1>;<p2>;f";
Line terminator. Sets the
ESC [ p1 j HPB (Horizontal Position Backward):
print position left of the current position by the distance specified in <p1>. Values are sent as decipoints. The print position is set to the left margin if the <p1> value would exceed the margin. An HPB with a <p1> value of zero is ignored.
Decimal: 27 91 <p1> 106 Hex: 1B 5B <p1> 6A BASIC: CHR$(27);"[<p1>j";
Chapter 2. ANSI Emulation GEK-00029B
Line terminator. Moves the
26
Page 27
ESC [ p1 k VPB (Vertical Position Backwards):
Line terminator. Moves the paper in reverse by the distance specified by p1. Values can be sent as decipoints. The paper position is set to the top margin if the p1 value exceeds the margin. A VPB with a p1 value of 5 decipoints or less is ignored.
Decimal: 27 91 <p1> 107 Hex: 1B 5B <p1> 6B BASIC: CHR$(27);"[<p1>k";
ESC [ p1 ' HPA (Horizontal Position Absolute):
print position to the value specified in <p1>. Values are sent as decipoints. Position zero is column one. The print position is set to the right margin if the <p1> value would exceed the margin. An HPB with a <p1> value greater than 9792 is ignored.
Decimal: 27 91 <p1> 96 Hex: 1B 5B <p1> 60 BASIC: CHR$(27);"[<p1>'";
Line terminator. Moves the
GEK-00029B 5000 Series Programmer’s Manual
27
Page 28
Margins and Tabs
ESC H HTS (Horizontal Tab Set):
and updates any existing horizontal tab table. A total of 22 tabs can be set. If this number is exceeded, the leftmost 22 tabs will be retained.
Decimal: 27 72 Hex: 1B 48 BASIC: CHR$(27);"H";
ESC J VTS (Vertical Tab Set):
Sets a tab at the current print position and updates any existing vertical tab table. A total of 12 tabs can be set. If this number is exceeded, the 12 tabs closest to the top of the page will be retained.
Decimal: 27 74 Hex: 1B 4A BASIC: CHR$(27);"J";
ESC [ p1 g TBC (Tab Clear):
Clears horizontal or vertical tab stops based on the
p1 value as follows: p1 = 0 Clears horizontal tab at current print position.
p1 = 1 Clears vertical tab at current print position. p1 = 3 Clears all horizontal tabs. p1 = 4 Clears all vertical tabs.
More than one parameter can be used. Example: To clear all horizontal and vertical tabs, send:
Sets a tab at the current print position
<ESC> [ 3 ; 4 g Decimal: 27 91 <p1> 103
Hex: 1B 5B <p1> 67 BASIC: CHR$(27);"[<p1>;"g";
ESC [ p1; p2 ; p3 r GENFD (Forms Definition):
top margin <p2>, and the bottom margin <p3> in decipoints. Default parameters are for an 11-inch (7,920 decipoints) long form with a top and bottom margin of zero.
p1 - maximum allowable length is 24 inches (17,280 decipoints). p2 - top of page to first print line p3 – non-printable area at bottom of form
Decimal: 27 91 <p1> <p2> <p3> r Hex: 1B 5B <p1> <p2> <p3> BASIC: CHR$(27);”[<p1>;<p2>;<p3>r";
Establishes the form length <p1>, the
Chapter 2. ANSI Emulation GEK-00029B
28
Page 29
Sequence Explanation
ESC [ r Default values of 11-inch form length,
zero top and bottom margins.
ESC [ 8280 r 11.5-inch form length, default top and
bottom margins of zero
ESC [ ; 720 r Default length of 11 inches, top margin
of 1-inch.
Default bottom margin of zero.
ESC [ ; ; 720 r Default length of 11 inches, default top
margin of zero, and a 1-inch bottom margin.
ESC [ 7920 ; 360 ; 360 r 11-inch form length, ½-inch top and
bottom margins
Decimal: 27 91 <p1> <p2> <p3> 114 Hex: 1B 5B <p1> <p2> <p3> 72 BASIC: CHR$(27);"[<p1><p2><p3>r";
ESC [ p1; p2 s GENSLR (Set Left/Right Margins):
from the left edge of the printable area of the paper. Parameter <p1> sets the left margin and <p2> sets the right margin. An omitted parameter clears that margin. Invalid parameters set the left margin to zero (column 1) and the right margin to 9,504 decipoints (column 136 at 10 cpi for the 13.6-inch machines).
A new left margin takes effect following any line terminator that normally calls for a print position set to the left. A new right margin takes effect when the print position reaches the new margin.
Margin settings stored as decipoint values are enforced to the nearest 1/120 of an inch. Character printing operates at 1/120 of an inch.
Decimal: 27 91 <p1> <p2> 115 Hex: 1B 5B <p1> <p2> 73 BASIC: CHR$(27);"[<p1><p2>s";
NOTE There is a physical left margin of .6 to 1.6 inches from the edge of the paper to the first printable column. This distance is adjustable by sliding all four tractors sideways. The margins set with this sequence begin at the first physical print position, not at the edge of the paper.
The p parameters are distances
GEK-00029B 5000 Series Programmer’s Manual
29
Page 30
ESC [ p1 ; ... p22; u GENHTS (Multiple Horizontal Tab Set):
tabs. The p parameters are set in decipoints. If more than 22 tabs are set, the highest numbered tabs (farthest
right) will be pushed out of the tab table. Tabs set in front of the left margin, or beyond the right margin. are not usable. Moving the margins will make them active.
Example: To place tabs at columns 10, 20, and 40 at 10 cpi, send ESC [ 10 ; 40 ; 20 u (tabs can be specified in any order).
Decimal: 27 91 <p1> 59 <p2> 59 … <p22> 59 117 Hex: 1B 5B <p1> 3B <p2> 3B ... 3B <p22> 3B 75 BASIC: CHR$(27);"[<p1>;<p2>; ... ;<p22>;u"
Sets up to 22 horizontal
ESC [ p1 ; …; p12 ; v GENVTS (Multiple Vertical Tab Set):
The p parameters are set in decipoints. If more than 12 tabs are set, the 12 tabs nearest the top of form will be retained. If a tab is set in the top margin area, it will be stored but will not be active until the margin is moved. If a tab is set beyond the bottom margin, attempting to move to that tab will advance the paper to the next top of form.
Decimal: 27 91 <p1> 59 <p2> 59 … <p12> 59 118 Hex: 1B 5B <p1> 3B <p2> 3B … <p12> 3B 76 BASIC: CHR$(27);"[<p1>;<p2>;...;<p12>;v";
Sets up to 12 vertical tabs.
Chapter 2. ANSI Emulation GEK-00029B
30
Page 31
Font Handling and Enhancements
ESC [ p1; p2 SP B GSM (Graphic Size Modification):
vertical <p1> and horizontal <p2> size of expanded and oversize characters. When using expanded characters, the currently selected font style is used. Oversize uses its own distinct font style.
Parameter values are percentages of the normal size character, so values over 100 are needed for expansion. Expansion factors are obtained by dividing values by 100.
Example: A parameter value of 526 would be divided by 100 to produce an expansion factor of 5 (5X expansion). Values less than 100 are treated as 1X expansion.
X1:
0-199 (Default)
X2:
200-299
X3:
300-399
X4:
400-499
X5:
500-599
X6:
600-699
Mixed sizes within a line can be top or bottom justified depending on the Program Mode menu option (see VExOpt:Default and VExOpt: Baseline).
The top of an expanded character is used as the starting point for vertical paper movement (line feed). The top or bottom of oversize characters can be used depending on the state of menu option SETUP | FORMAT | MODIFY FORMAT |GENPRTOPTS | GROUP 2 |Strap 13.
When this sequence is received with a value of 200 or more, expanded printing starts if the printer is in the text mode (not bar codes, oversize, etc.
This sequence modifies the
X7:
700-799
X8:
800-UP
Examples:
ESC [ ; 200 B X1 Vertical X2 Horizontal ESC [ 200 ; 200 B X2 Vertical X2 Horizontal ESC [ 800 ; 400 B X8 Vertical X4 Horizontal
During vertically expanded printing, blank lines (lines with no printed characters) are not expanded from the current lpi setting.
Decimal: 27 91 p1 59 p2 32 66 Hex: 1B 5B p1 3B p2 20 42 BASIC: CHR$(27);"[<p1>;<p2>B";
GEK-00029B 5000 Series Programmer’s Manual
31
Page 32
ESC [ p1 ; p2 SP G SPI (Spacing Increment):
(p1) and character spacing or pitch (p2). If the parameter is missing or zero, the spacing remains unchanged. In the native mode, p1 can range from 1 to 17,820 decipoints (24 inches). The printable area (between the top and bottom margin) can not be exceeded. The range of p2 is dependent on the font and will be ignored if exceeded.
Examples of Spacing Values
LPI Spacing CPI Spacing
p1
LPI
(decipoints)
3 240 10 72 4 180 12 60 6 120 13.3 54 890 1542
Decimal: 27 91 p1 59 p2 32 71 Hex: 1B 5B p1 3B p2 20 47 BASIC: CHR$(27);"[<p1>;<p2>G";
This sequence is used to set line spacing
p2
CPI
(decipoints)
16.7 36
ESC [ p1 ; pn... m SGR (Select Graphic Rendition):
enhancements (bold and underline). One font designator plus any number of enhancements can be entered in the escape sequence using the parameter values in the following table. If the requested font is not installed, the default font is selected.
Parameter Enhancement
0 Cancel all print enhancements 1 Bold (enhancement) 4 Underline (enhancement)
5Double Wide 21 Underline 22 Cancel Bold 24 Cancel Underline 25 Cancel Expanded 26 Cancel Proportional
Parameter Font
10 Default Font - Data Processing 11 Gothic Draft Font 12 Character Graphics 13 Gothic NLQ Font 14 Courier NLQ Font 15 High Speed Draft Font 16 OCR-A 17 OCR-B 18 Italic NLQ Font or Download A* 19 Correspondence or Download B*
Selects font style and
Chapter 2. ANSI Emulation GEK-00029B
32
Page 33
ESC [ p1 ; p ... m (continued)
*A download font (if loaded) overrides any other font. See Character Map Load on page 23.
Examples: For Gothic NLQ font underlined send:
ESC [ 4 ; 13 m To cancel underlining and retain Gothic NLQ - send one of the following:
ESC [ ; 13 m
ESC [ 0 ; 13 m
ESC [ 0 m
ESC [ 24m Decimal: 27 91 <p1> ; <pn> m
Hex: 1B 5B <p1> 3B ... <pn> 6D BASIC: CHR$(27);"[<p1>;...<pn> m";
GEK-00029B 5000 Series Programmer’s Manual
33
Page 34
ESC [ p1; ... pn h SM (Set Mode):
listed below. Parameters preceded by the 'greater than' sign are privately defined modes and should be sent separately.
Sets the mode or modes specified by the parameters
Parameter
Number
Mode
Mnemonic Mode Function
20 LNM Line Feed New Line Mode
LNM - Line Feed New Line Mode
. When using this mode, a received line feed command causes a carriage return (new line). When LNM is reset, a line feed command only causes a vertical position movement.
The following parameters are privately defined modes.
Parameter
Number
Mode
Mnemonic
Mode Function
>1 GENPRM Proportional Print Mode >2 GENC1C C1 Control Code Mode >5 GENCS2 Character Set 2 Mode
GENPRM (Proportional Print Mode):
Enables proportional printing. This mode does not apply to the oversize character feature. When reset (default), characters are spaced at the current cpi.
GENC1C (C1 Control Code Mode - PC Set 1):
When set, it allows the use of C1 control codes. When reset, 80H - 9FH are ignored. See Appendix E for an explanation of how character sets are mapped. The default state is set using ANSI emulation option 6 (see Appendix D, ANSI (4800) or ANSI (4410) Tables).
GENSC2 (Character Set 2 Mode - PC Set 2):
Selects character set 2 of any of the 8-bit international character sets. See PC Set 2 in Appendix H for an explanation of how character sets are mapped. The default state is set using option strap 7 in the ANSI emulation options (see Appendix D, ANSI (4800) or ANSI (4410) Tables).
EXAMPLE: To print proportional, send ESC [ > 1 h. Decimal: 27 91 62 49 104
Hex: 1B 5B 3E 31 68 BASIC: CHR$(27);"[>1h";
ESC [ p1 ... pn l RM (Reset Mode):
Resets any modes turned on by the Set Mode
command above. Parameters and syntax are the same.
Chapter 2. ANSI Emulation GEK-00029B
34
Page 35
ESC ] 5 BFL (Begin Font Load):
This sequence is not honored when self-test determines that the download font option is not installed. Permits downloading of customer-defined font characters into printer nonvolatile memory from the host. Loading is terminated when an ESC \ sequence is received.
Decimal: 27 93 53 Hex: 1B 5D 35 BASIC: CHR$(27);"]5";
ESC [ p1 SP } GENDFC (Download Font Control):
command allows the host to see if at least one valid font is loaded (p1=2). The printer sends DCS 30H 30H ST if a font is loaded, DCS 44H 45H ST if no font is loaded. It also provides the capability to erase the download font area (p1=1).
Decimal: 27 91 <p1> 32 125 Hex: 1B 5B <p1> 20 7D BASIC: CHR$(27);"[<p1>}";
Using the serial interface, this
GEK-00029B 5000 Series Programmer’s Manual
35
Page 36
GRAPHICS
Six-Bit Graphics
The ANSI emulation graphics mode provides both horizontal and vertical dot plotting methods. These methods enable the printing of ASCII characters in their binary code form. Since each character has a unique pattern of 1s and 0s (dots and voids) that make up its binary code, the correct placement of these binary forms enables you to form larger images on the paper.
For clarity in the text, a binary 1 (a printed dot) is shown as an X and a binary 0 (empty dot position) will be shown as a 0.
In the graphics mode, only the low order six bits of a character are used (bits 1-6). Looking at an ASCII code chart, the question mark
character bit 7). Since only the first 6 bits are used. a "?" prints six dots on the paper. An asterisk "*" is represented by 010101 which prints the following:
(?)
is represented by the binary number 1111110 (bit 1 -
Horizontal Graphics Vertical Graphics
0 X
0X0X0X 0
X 0 X
Notice that in horizontal graphics the character is printed on a single horizontal dot row. In vertical graphics, the character is printed six dots high, one character per dot column.
Using the question mark that prints all dots, a series of these characters in horizontal graphics produces a one-dot-high solid line across the paper. The same character in vertical graphics produces a six-dot high band across the paper.
By repeating, omitting and mixing characters across a page, images such as graphs, charts, and pictures can be produced.
Dot Patterns and Densities
The chart on the next page shows the dot patterns for each of the ASCII characters. Each character represents six dots or dot positions, and their spacing is dependent on the density selected. At 60 dpi density, the dots are spaced 1/60 inch apart. At 120 dpi, each character represents six dots spaced 1/120 inch apart.
Chapter 2. ANSI Emulation GEK-00029B
36
Page 37
This chart shows the dot patterns for the ASCII characters needed to cover all dot/void combinations. Other valid characters (although they are repeat patterns of the characters in the chart) are 20H-3FH.
Character Value Dots Character Value Dots
@40H A41H B42H C43H D44H E45H
F46H G47H H48H
I49H
J4AH K4BH
L4CH
M4DH
N4EH O4FH
P50H Q51H R52H
S53H
T54H U55H V56H
W57H
X58H
Y59H
Z5AH
[5BH
\5CH
]5DH ^5EH _5FH
000000 X00000 0X0000 XX0000 00X000 X0X000 0XX000 XXX000 000X00 X00X00 0X0X00 XX0X00 00XX00 X0XX00 0XXX00 XXXX00 0000X0 X000X0 0X00X0 XX00X0 00X0X0 X0X0X0 0XX0X0 XXX0X0 000XX0 X00XX0 0X0XX0 XX0XX0 00XXX0 X0XXX0 0XXXX0 XXXXX0
’60H a61H b62H
c63H d64H e65H
f66H g67H h68H
i69H
j6AH k6BH
l6CH
m6DH
n6EH o6FH p70H q71H
r72H s73H t74H
u75H
v76H
w77H
x78H y79H
z7AH
{7BH |7CH
}7DH ~7EH ?7FH
00000X X0000X 0X000X XX000X 00X00X X0X00X 0XX00X XXX00X 000X0X X00X0X 0X0X0X XX0X0X 00XX0X X0XX0X 0XXX0X XXXX0X 0000XX X000XX 0X00XX XX00XX 00X0XX X0X0XX 0XX0XX XXX0XX 000XXX X00XXX 0X0XXX XX0XXX 00XXXX X0XXXX 0XXXXX XXXXXX
Legend: X=dot 0=no dot (void)
GEK-00029B 5000 Series Programmer’s Manual
37
Page 38
Horizontal Format
Graphics data printed in horizontal format is comprised of a stream of bytes from left to right across each dot row.
This chart shows that byte 1 (or character 1) in row 1 prints its six bits from left to right in a single dot row. The next byte (byte 2) prints its six bits, representing a character, in the same dot row across the page.
Byte Row
!!!!
""""
Byte 1 Byte 2 Byte n
1 1 2 3 4 5 6 1 2 3 4 5 6 …1 2 3 4 5 6 2 1 2 3 4 5 6 1 2 3 4 5 6 …1 2 3 4 5 6 3 1 2 3 4 5 6 1 2 3 4 5 6 …1 2 3 4 5 6
. . . . . . . . . . . . . …. . . . . .
. . . . . . . . . . . . . …. . . . . .
6 1 2 3 4 5 6 1 2 3 4 5 6 …1 2 3 4 5 6
Vertical Format
In vertical format, each byte (or character) occupies six dot rows of one column. Each character is one dot wide and six dots high. The next character (byte 2) is printed beside the first, moving from left to right across the page.
Byte
!!!!
Row bit bit bit …bit
11 1 1…1 22 2 2…2 33 3 3…3 44 4 4…4 55 5 5…5 66 6 6…6
1 2 3 …n
Chapter 2. ANSI Emulation GEK-00029B
38
Page 39
Eight-Bit Graphics
Horizontal Format
Graphics data printed in horizontal format is comprised of a stream of bytes from left to right across each dot row.
This chart shows that byte 1 (or character 1) in row 1 prints its eight bits from left to right in a single dot row. The next byte (byte 2) prints its eight bits, representing a character, in the same dot row across the page.
Byte
!!!!
Row
""""
1 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 …1 2 3 4 5 6 7 8 2 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 …1 2 3 4 5 6 7 8 3 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 …1 2 3 4 5 6 7 8
. . . . . . . . . . . . . …. . . . . .
. . . . . . . . . . . . . …. . . . . .
8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 …1 2 3 4 5 6 7 8
Byte 1 Byte 2 Byte n
Vertical Format
In vertical format, each byte (or character) occupies six dot rows of one column. Each character is one dot wide and six dots high. The next character (byte 2) is printed beside the first, moving from left to right across the page.
Byte
!!!!
Row bit bit bit …bit
11 1 1…1 22 2 2…2 33 3 3…3 44 4 4…4 55 5 5…5 66 6 6…6 7 7 7 7 ...7 8 8 8 8 ...8
1 2 3 …n
GEK-00029B 5000 Series Programmer’s Manual
39
Page 40
Other Graphics Considerations
In horizontal format, an LF causes the paper to advance one or two dot rows based on the vertical dot density, regardless of whether 6-bit or 8-bit graphics has been selected.
In vertical format, the paper is advanced as the dot rows (6 or 8, depending on graphics mode) are printed.
Graphics Sequences
ESC P DCS (Device Control String):
Enters dot graphics mode at the density and format previously selected by the ESC [ <p1> ;<p2> ; <p3> q sequence. Following this sequence, the printer prints discrete dots and leaves spaces based on the 1s and 0s in the low order six bits of each byte received. forming graphic dot rows from left to right. To exit from dot graphics mode, use ESC \.
While in graphics mode (after ESC P and before the ESC \ sequence), 8-bit graphics can be printed instead of 6-bit by using one of the following sequences:
ESC " 1 n1 <data bytes> 60 dpi horizontal ESC " 2 n1 <data bytes> 120 dpi horizontal ESC " 3 n1 <data bytes> Uses current horizontal and vertical
density.
n1 number of data bytes to follow <data bytes> n1 bytes of graphics data
When the number of bytes of 8-bit data specified by n1 have been processed, and prior to receiving an ESC \ sequence, the data will print as 6-bit graphics.
Decimal: 27 91 80 Hex: 1B 5B 50 BASIC: CHR$(27);"P";
ESC [ p1 b REP (Repeat Text or Dot Graphics Character):
preceding character p1 times. If p1 is 0 or unspecified, it is set to 1. The maximum value for p1 is 32,767.
Repeats the single
Decimal: 27 91 <p1> 98 Hex: 1B 5B <p1> 62 BASIC: CHR$(27);"[<p1>b";
Chapter 2. ANSI Emulation GEK-00029B
40
Page 41
ESC [ p1 ; p2 ; p3 q GENGRM – Select Graphics Mode:
format, and horizontal or vertical density for dot graphics.
IMPORTANT
This sequence must be sent before entering the graphics mode with ESC P.
The first parameter selects the graphics mode: the second parameter selects the vertical spacing, and the third selects the horizontal dot spacing.
p1
value Selects Graphics Format
null Reserved: Vertical format 60h x 72v if no <p2> or <p3>
0 Reserved: Vertical format 60h x 72v if no <p2> or <p3> 1 Reserved: Vertical format 120h x 72v if no <p2> or <p3> 2 Reserved: Vertical format 120h x 144v if no <p2> or <p3> 3 Reserved: Sequence ignored 4 Horizontal format 60h x 72v if no <p2> or <p3> 5 Similar to 4, above, if <p3> = 5, 6, or 7, else ignore
6+ Reserved: Sequence ignored
Note: <p2> and <p3> are ignored in this mode.
p2 Selects Vertical Density
null 72dpiv (p1=4 only)
0-6 144dpiv
7+ 72dpiv
Selects the graphics mode,
p3 Selects Horizontal Density
null 60dpih (p1=4 only)
0-3 Reserved: Leave current value unchanged
4 Reserved: Leave current value unchanged 5 Reserved: 120dpih
6-7 120dpih
8-10 Reserved: 60dpih
11+ 60dpih
Decimal: 27 91 <p1> <p2> <p3> 112 Hex: 1B 5B <p1> <p2> <p3> 70 BASIC: CHR$(27);"[<pl><p2><p3>q";
GEK-00029B 5000 Series Programmer’s Manual
41
Page 42
ELECTRONIC VERTICAL FORMAT UNIT - EVFU
Downline vertical tab loading is accomplished through the EVFU. The EVFU allows loading a form table with a minimum form length of .33 inches (240 decipoints) and a maximum length of 24 inches (17,280 decipoints).
Since the maximum length is 24 inches, the number of lines is dependent on the lpi setting. 3 lpi = 72 lines. 4 lpi = 96 lines. 6 lpi = 144 lines, and 8 lpi = 192 lines. Exceeding the maximum causes a fault.
Downloading the EVFU
▪ The vertical format type must be set to VtType:Emul VFU through
the control panel using the Program Mode.
▪ No paper instruction lead (PI) is required.
▪ When the printer has an EVFU table loaded, VFU is displayed on
the control panel.
ESC ] ! Start EVFU table loading sequence
an entry. Dummy values (filler codes - See Table of Channel Codes on page 5-30) are required in lines with no channel. Two bytes are required for each line of the form. Loading Is terminated by the ESC \ sequence.
Decimal: 27 93 33 Hex: 1B 5D 21 BASIC: CHR$(27);"]!";
Loading the Table
The first table location is normally loaded with the channel 1 code. This is defined as the top-of-form (TOF) channel. The table may be left without channel 1, and a command to skip to channel 1 will cause a normal form feed as though there were no VFU. Two bytes are loaded for each line of the form to be controlled. One or more channel numbers may be indicated in the two-byte code.
The format of two-byte channel control code is:
Bit Number 8 7 6 5 4 3 2 1
Channel Numberxone654321
First Byte xoneyyyyyy
Bit Number 8 7 6 5 4 3 2 1
Channel Number x one 12 11 10 9 8 7
Second Byte xoneyyyyyy
. Each line of the form requires
Chapter 2. ANSI Emulation GEK-00029B
y: 0 = no stop in channel
1 = stop in channel
x: bit has no meaning
42
Page 43
NOTE
To make characters acceptable, bit 7 must be set.
Each "channel control code" pair of bytes has the capability to indicate multiple channels since each channel indication has a unique bit position, which is either ON=1 or OFF=0.
TABLE OF CHANNEL CODES
Decimal
Value
1 2 1 2 1 2 Remarks
64 64 1000000 1000000 @ @ Fillers: see Note 65 64 100000 66 64 1000010 1000000 B @ Channel 2 68 64 1000100 1000000 D @ Channel 3 72 64 1001000 1000000 H @ Channel 4 80 64 1010000 1000000 P @ Channel 5 96 64 1100000 1000000 ` @ Channel 6 64 65 1000000 100000 64 66 1000000 1000010 @ B Channel 8 64 68 1000000 1000100 @ D Channel 9 64 72 1000000 1001000 @ H Channel 10 64 80 1000000 1010000 @ P Channel 11 64 96 1000000 1100000 @ ` Channel 12
Binary
Value
1
1000000 A @ Channel 1
1
ASCII
Character
@ A Channel 7
BASIC Programming Example for EVFU Table Loading
PROGRAM INSTRUCTION REMARKS
1500 WIDTH "LPT1:" 255 Required by some BASIC languages to avoid auto LF at
column 80 1510 LPRINT CHR$(27);"]I"; Enables EVFU loading. 1520 LPRINT CHR$(65);CHR$(64); Resets TOF, Channel 1 Sao Table of Channel Codes 1530 FOR I=1 to 4 1531 LPRINT CHR$(64);CHR$(64); 4 filler lines 1532 NEXT I 1540 LPRINT CHR$(68);CHR$(64); Selects Channel 3. See Table of Channel Codes 1550 FOR I=1 to 16 1551 LPRINT CHR$(64);CHR$(64); 16 filler lines 1552 NEXT I 1560 LPRINT CHRS$72);CHR$(64); Selects channel 4. See Table of Channel Codes 1570 FOR I=1 to 31 1571 LPRINT CHR$(64);CHR$(64); 31 filler lines 1572 NEXT I 1580 LPRINT CHR$(80);CHR$(64); Selects channel 5. See Table of Channel Codes 1590 FOR I=1 to 8 1591 LPRINT CHR$(64);CHR$(64); 8 filler lines 1592 NEXT I 1600 LPRINT CHR$(64);CHR$(66); Selects channel 8. See Table of Channel Codes 1610 LPRINT CHR$(27);"\"; Exit EVFU loading. 1620 END
GEK-00029B 5000 Series Programmer’s Manual
43
Page 44
EVFU Default
The default EVFU will be generated based on the current form length and lpi setting under the following conditions:
▪ When the printer is initialized
▪ When either the forms definition or lpi setting is changed
▪ When the start EVFU load escape sequence ESC ] is immediately
followed by the end load sequence ESC \
▪ When the emulation is changed from P Series or Dataproducts, to
ANSI
The following chart shows how the default EVFU table is defined:
CHANNEL DESCRIPTION
1 Top Margin (first line 2 Bottom Margin (last line) 3 Single Spacing 4Double Spacing 5Triple Spacing 6Half Form 7 Quarter Form 8Tenth Line
9 Bottom of Form (bottom margin) 10 Bottom of Form minus 1 line 11 Top of Form minus 1 line (last line this form) 12 Top of Form
Skip to Channel Command
ESC [ p1 ; p2 ! p GENVFU (VFU Channel Command):
movement to the channel specified by the number formed by p1 and p2. Valid channel numbers are in the range 1- 12.
0;1 - selects channel 1 0;9 - selects channel 9 1;1 - selects channel 11
Channel 1 is always used for TOF; channel 12 is always used for vertical tab. When the channel number is greater than 12, the program defaults to channel 1. If the table has not been loaded and a channel command is received, it is ignored.
Decimal: 27 91 <p1> ; <p2> ! 112 Hex: 1B 5B <p1> 3B <p2> 21 70 BASIC: CHR$(27);"[<p1>;<p2>!p";
Commands vertical paper
Chapter 2. ANSI Emulation GEK-00029B
44
Page 45
BASIC Programming Example for Skip to Channel
This is a sample program showing the use of the skip-to-channel command. It makes use of the previously loaded EVFU program.
PROGRAM INSTRUCTION REMARKS
10 WIDTH “LPT1:”,255 Required by some BASIC languages to avoid
auto LF at column 80 20 LPRINT CHR$(27);”[0;1!p”; Go to top of form (channel 1) 30 LPRINT “TOP OF FORM”; Print the indicated words 40 LPRINT CHR$(27);”[0;3!p”; Go to channel 3 50 LPRINT “LINE 6”; Print the indicated words 60 LPRINT CHR$(27);”[0;4!p”; Go to channel 4 70 LPRINT “LINE 25”; Print the indicated words 80 LPRINT CHR$(27);”[0;5!p”; Go to channel 5 90 LPRINT “LINE 57”; Print the indicated words
100 LPRINT CHR$(27);”0;8!p”; Go to channel 8 110 LPRINT “END OF FORM”; Print the indicated words 120 END
NOTE
Establish Top of Form locally before printing forms. When executing the program, paper slews to the top of the next form before beginning to print.
GEK-00029B 5000 Series Programmer’s Manual
45
Page 46
BAR CODES
Thirteen different styles of bar codes and POSTNET are available. Each style (except POSTNET) can be rotated 90, 180, or 270 degrees and printed with or without a human-readable line (HRL). The bar code symbol size and density are also adjustable.
Control sequences given in the following text show the proper syntax needed from the host. The second line has examples of code written in the BASIC program language.
Entering and Exiting Bar Codes
Before the printer can print input data as bar code symbols, the bar code mode must be both selected and activated. There are two ways for this to be accomplished depending on the setting of printer option 1 for both 4800 and 4410 ANSI emulation.
SETUP | FORMAT | MODIFY FORMAT | GENPRTOPTS | ANSI | Printer Option 1 (See Appendix G, Tables 5 and 6) is used to enable the SI (shift in) and SO (shift out) ASCII codes to activate and deactivate special mode functions. In this case, the special mode function is bar codes. With Option 1 enabled, code SO will turn on or activate the bar code mode. SI will turn bar codes off.
NOTE
ANSI 4800/4410 Strap 1 OUT
Enter the bar code mode of printing with the following control sequence sent by the host. (See Appendix D for strapping options.)
ESC [ 3 t LPRINT CHR$(27)*."[3t";
Data sent after the above sequence is interpreted and printed as bar codes.
Exit the bar code mode using: ESC [ 0 t
LPRINT CHR$(27);"[0t";
ANSI 4800/4410 Strap 1 IN
(See Appendix D for strapping options.) ESC [ 3 t
LPRINT CHR$(27);"[3t"; Selects the bar code special mode.
SO LPRINT CHR$(14); Activates bar codes and prints all received data as bar codes. (Only after it has been selected by ESC [3 t above.)
Chapter 2. ANSI Emulation GEK-00029B
46
Page 47
SI LPRINT CHR$(15); Deactivates bar codes and allows printing of normal text.
ESC [ 0 t LPRINT CHR$(27);"[0t"; Deselects bar codes.
When an ESC [ 0 t is received before the SI code, bar codes are both deactivated and deselected.
Setting Bar Code Parameters
Select the style, height, spacing, orientation, and print density for the bar code using the following escape sequence. The second line in the example (written in BASIC) shows the parameters that are the default values for the printer.
ESC [<p1>;<p2>;…;<p10>}
Example
LPRINT CHR$(27);"[4;9;1;2;6;2;6;2;0;0}";
0Interleaved 2 of 5 10Codabar b/n 1 (Reserved for future use) 11 Codabar c/* 2 (Reserved for future use) 12 Codabar d/e 3 (Reserved for future use) 13 UPC-A 4 Code 3 of 9 (default) 14 UPC-E 5EAN-8 15Code 93 6EAN-13 16Code 128 (A, B, C) 7 Code 11 17 (Reserved for future use) 8 (Reserved for future use) 18 (Reserved for future use) 9 Codabar a/t 50 POSTNET (see note)
p1: Style
NOTE When using POSTNET, parameters <p2> through <p10> are invalid. If these parameters are changed, they will be retained in memory and will affect other styles if selected. See Appendix F for more information on POSTNET.
GEK-00029B 5000 Series Programmer’s Manual
47
Page 48
Bar Code Dimensions
NOTE The following dimensions are for barcodes printed at 0 and 180 degrees rotation. Barcodes printed at 90 or 270 degrees rotation will be compressed by a 6:5 ratio due to the difference in size of the horizontal and vertical grids.
p2 Bar code height in 1/12-inch increments
Minimum: 1=l/12 inch Maximum: 120=10 inches Default: 9=9/12 inch (3 / 4 inch) Human-readable line is not included in height.
p3 Human-readable line
0=Do not print human-readable line 1=Print human-readable line (default)
p4 Narrow bar width, number x 1/120 inch
Default: 2 (2/120 inch, approximately .017 inch) Range: 2, 4, 6, . . . 126
p5* Wide bar width, number x 1/120 inch
Default: 6 (6/120 inch, approximately . 050 inch) Range: 2, 4, 6, . . . 254
p6 Narrow space width, number x 1/120 inch
Default: 2 (2/120 inch, approximately . 017 inch) Range: 2. 4, 6, . . .126
p7* Wide space width, number x 1/120 inch
Default: 6 (6/120 Inch. approximately .050 inch) Range: 2, 4, 6, . . . 254
p8* Intercharacter space width, number x: 1/120 inch
Default: 2 (2/120 inch, approximately . 017 inch) Range: 2, 4, 6 . . . 126
* Parameters <p5>, <p7>, and <p8> are not programmable in some bar code styles since they are generated from other parameters.
Chapter 2. ANSI Emulation GEK-00029B
48
Page 49
p9 Bar code rotation and human-readable line (HRL) font style (if
used). 0 No rotation - use currently selected font style, cpi, and
lpi. This is the default setting. 1 No rotation - use special HRL font. 2 90-degree rotation use special HRL font 3 180-degree rotation use special FIRL font. 4 270-degree rotation use special HRL font.
p 10 Horizontal print density
0 60 dpi horizontal by 144 dpi vertical print density 1 120 dpi horizontal by 144 dpi vertical print density
Default for bar code styles 5, 6, 13, and 14 is 120 dpi. Default for all other styles is 60 dpi.
Bar codes printed at 90 or 270 degrees rotation will print at the same speed (120 x 144) regardless of the selected horizontal density.
IMPORTANT If no parameters have previously been entered, then the factory default values will be used. If previous values have been sent from the host, these values will prevail until changed by the host or the printer is initialized.
A missing parameter will leave the corresponding value unchanged. A zero parameter value for p2–p8 will cause the default value to be
selected. Use semicolons as place holders when changing parameters. LPRINT CHR$(27);"[;;;;;;;;;1}" Changes only parameter 10.
LPRINT CHR$(27);"15;;0}" Changes only parameters 1 and 3. LPRINT CHR$(27);"[16}" Changes only the style of the bar code.
If no changes are made to the parameters of the bar code, the printer will use the following factory-set values.
GEK-00029B 5000 Series Programmer’s Manual
49
Page 50
Default Bar Code Characteristics
p1=4 Code 39 p2=9 3/4 inch height p3=1 Human-readable line printed p4=2 Narrow bar width 1/60 inch p5=6 Wide bar width 1/20 inch p6=2 Narrow space width 1/60 inch p7=6 Wide space width 1/20 inch p8=2 Intercharacter space width 1/60 inch p9=0 No rotation, use currently selected font p10=0 Horizontal print density 60 dpi
Human-Readable Line (HRL)
The human-readable line is printed 0. 10 inch below the bar code symbol. The height of the HRL and the 0.10 inch space are not included in the bar code height parameter (p2).
A diamond symbol appearing in the human-readable line indicates one of the following conditions:
• Margin overrun. The data to be printed exceeds the available space remaining inside the programmed margins.
• The DEL character has been received while printing in a bar code style that permits the use of all 128 ASCII characters.
• An invalid character has been received. An example of this would be a letter "A" sent to the printer while printing a style 5 bar code. Style 5 (EAN-8) only accepts the digits 0-9.
Font Styles and Enhancements
Non-rotated bar codes can be printed with an HRL in any of the fonts available to the printer.
If enhancements are desired (e.g., bold, underline, or expanded) the HRL must be printed using the normal text mode. Print the bar code symbol(s) without the HRL first. Exit the bar code mode and print the HRL using the normal text mode with enhancements.
Rotated bar codes use a special font for the human-readable line.
Spacing and Bar Code Editing Aids
There is a 0.25-inch space called a quiet zone at the beginning and end of every bar code. As a result, the minimum distance between two horizontal bar codes is 0.50 inch.
Most bar code styles accept commas. spaces, and horizontal tabs as delimiters to separate bar codes. A comma adds no additional space between bar codes, so the separation is the width of the quiet zone or
0.50 inch. A space character adds 0.10 inch to the quiet zone for a total of 0.60 inch separation. A horizontal tab adds the appropriate number of empty spaces to go to the next tab.
Chapter 2. ANSI Emulation GEK-00029B
50
Page 51
Bar Code Readability Statement
The following information is provided to ensure that the best results are obtained from your printed bar codes.
Use bar code readers designed to operate in the visible light frequency range. Optional infrared-readable ribbon cartridges are available.
Use bar code readers designed to read medium- or low-density bar code symbols. Avoid readers with apertures less than 7 mils (.007 inch or .18 mm).
Using bar code size parameters smaller than the default settings may produce unacceptable results.
GEK-00029B 5000 Series Programmer’s Manual
51
Page 52
Bar Code Program Examples
The following program examples are provided to help you become familiar with the bar code escape sequences. The programs are written in BASIC and printed using the LUST command. All bar codes are actual size.
Test Program
This is the minimum code needed to print a bar code. Use it to test the printer's ability to print bar codes when more complicated programs are not producing results.
Line 10 turns on the bar code mode. line 20 contains the data to be printed as a bar code symbol, and line 30 turns off the bar code mode.
10 LPRINT CHR$(27); "[3t"; 20 LPRINT "1234567890"; 30 LPRINT CHRS(27); "[0t";
Error Symbol
This example shows the error symbol in the HRL and the error pattern in the symbol. The error pattern causes the entire symbol to be rejected by the bar code reader.
The error was caused by the lowercase "a" being inserted into the data. The default style, Code 3 of 9. accepts only uppercase A-Z, the numbers 0-9, and the characters -, ., $, /, + and %.
10 LPRINT CHR$(27); "[3t"; 20 LPRINT "1a34567890"; 30 LPRINT CHR$(27); "[0t"
Chapter 2. ANSI Emulation GEK-00029B
52
Page 53
Changing Parameters
This example changes the style p1, height p2, and the HRL font p9 of the bar code. Notice that semicolons are used as place holders for the parameters not being changed.
Line 10 - changes style to Code 128, changes height to 1/4" (3/12"). and use the special HRL font.
10 LPRINT CHR$(27);"[16;3;;;;;;;1;} 20 LPRINT CHR$(27); "[3t"; 30 LPRINT "1234567890"; 40 LPRINT CHR$(27); "[0t"
Commas and Spaces as Delimiters
When a comma delimiter is used to separate bar codes, no additional space Is added to the quiet zones. Since the ending .25-inch quiet zone of one bar code symbol meets the beginning quiet zone of the next bar code, a total of .50-inch separates the two. Style 7 (line 5) is used for these examples since Code 11 uses both spaces and commas as delimiters.
10 LPRINT CHR$(27); "[7}"; 20 LPRINT CHR$(27); "[3t"; 30 LPRINT "1234,56,7890"; 40 LPRINT CHR$(27); "[0t"
When spaces are used as delimiters, an additional 1-inch is added to the quiet zones. Note that multiple spaces can be used.
10 LPRINT CHR$27); "[3t" 20 LPRINT "1234 56 7890"; 30 LPRINT CHR$27); "[0t"
GEK-00029B 5000 Series Programmer’s Manual
53
Page 54
Horizontal Spacing
Use horizontal tabs for spacing bar code symbols across the page. Line 10 sets horizontal tabs at 1440 and 2880 decipoints (2 and 4-inches). The HT codes in lines 40 and 60 cause a jump to the next tab.
10 LPRINT CHR$(27); "[1440;2880;u"; 20 LPRINT CHR$(27); "[3t"; 30 LPRINT "1234"; 40 LPRINT CHR$(9); 50 LPRINT "5678"; 60 LPRINT CHR$(9); 70 LPRINT "9012"; 80 LPRINT CHR$(27); "[0t"
When no horizontal tabs are set, an HT code acts as a space, adding
0.1 inch to the separation. Total separation is 0.6 inch when the HT is added to the quiet zones.
Line 10 clears all previously set horizontal tabs for this example. 10 LPRINT CHR$(27); "[3g";
20 LPRINT CHR$(27); "[3t"; 30 LPRINT "1234"; 40 LPRINT CHR$(9); 50 LPRINT "5678"; 60 LPRINT CHR$(9); 70 LPRINT "9012"; 80 LPRINT CHR$(27); "[0t"
Chapter 2. ANSI Emulation GEK-00029B
54
Page 55
Printer Option Strap 11, Group 2 IN
Printer control strap 11 is used for positioning the paper after printing a bar code. Strap 11 IN sets the paper to the top of the bar code after printing; Strap 11 OUT leaves the paper position as is after printing available.
The state of strap 11 can be checked and changed using the setup menu.
In the following examples, lines 10 to 30 print the bar code symbol and line 40 adds a line of text to be printed.
Examples 1 and 2 show the effect strap 11 has on the position of the text.
In example 3, the semicolon at the end of line 30 has been deleted to show that Strap 11 only affects the same horizontal zone that the bar code occupies. The semicolon in BASIC is used to suppress a LF/CR after an LPRINT statement.
Strap 11 is only effective after exiting the bar code mode. As in the printout above, printing multiple bar codes without exiting (line 80 above) causes all the bar codes to be printed in the same horizontal area of the paper regardless of the condition of strap 13. Also, some form of printable data must be on the line before a paper move command (see line 40 in the examples); if not, the paper will not backup to the top of the bar code.
a bar code. (See Appendix D for a complete listing of options
IMPORTANT
EXAMPLE 1: Strap 11 OUT
10 LPRINT CHR$(27); "[3t"; 20 LPRINT "1234567890"; 30 LPRINT CHR$(27); "[0t"; 40 LPRINT "STRAP 11 OUT"
EXAMPLE 2: Strap 11 IN
10 LPRINT CHR$(27); "[3t"; 20 LPRINT "1234567890"; 30 LPRINT CHR$(27); "[0t"; 40 LPRINT "STRAP 11 IN"
GEK-00029B 5000 Series Programmer’s Manual
55
Page 56
EXAMPLE 3: Strap 11 OUT with no suppression of LF/CR on line 30
10 LPRINT CHR$(27); "[3t"; 20 LPRINT "1234567890"; 30 LPRINT CHR$(27); "[0t" 40 LPRINT "STRAP 11 OUT"
Chapter 2. ANSI Emulation GEK-00029B
56
Page 57
Vertical Bar Codes
▪ Line 10 sets parameter p9 for 90-degree rotation using the special
font for the HRL.
▪ Line 20 turns on the bar code mode.
▪ Line 30 is the data to be printed as a bar code symbol.
▪ Line 40 turns off the bar code mode.
10 LPRINT CHR$(27); "[;;;;;;;;2}"; 20 LPRINT CHR$(27); "[3t"; 30 LPRINT "12345"; 40 LPRINT CHR$(27); "[0t"
Commas and spaces used as delimiters serve the same function as in horizontal bar codes. However, the quiet zones rotate with the symbol, leaving almost no horizontal separation between bar codes on the same line.
In the following examples, line 10 is used printing of the HRL (p3).
COMMAS: With HRL
10 LPRINT CHR$(27);"[;;1}"; 20 LPRINT CHR$(27); "[3t"; 30 LPRINT "1234,5678,9012"; 40 LPRINT CHR$(27); "[0t"
to print or
inhibit the
GEK-00029B 5000 Series Programmer’s Manual
57
Page 58
COMMAS: Without HRL
10 LPRINT CHR$(27); "[;;0}"; 20 LPRINT CHR$(27); "[3t"; 30 LPRINT "1234,5678,9012"; 40 LPRINT CHR$(27); "[0t"
SPACES: With HRL
10 LPRINT CHR$(27);"[;;1}"; 20 LPRINT CHR$(27); "[3t"; 30 LPRINT "1234 40 LPRINT CHR$(27); "[0t"
5678 9012";
SPACES: Without HRL
10 LPRINT CHR$(27); "[;;0}"; 20 LPRINT CHR$(27); "[3t"; 30 LPRINT "1234 5678 9012"; 40 LPRINT CHR$(27); "[0t"
Chapter 2. ANSI Emulation GEK-00029B
58
Page 59
Horizontal Tabs
▪ Line 10 sets horizontal tab stops at 1080 and 2160 decipoints (1.
5 and 3 inches).
▪ Lines 40 and 60 are ITT codes that cause a jump to the next tab
stop.
Line 90 is a line of text to show positioning on the paper. The vertical separation between the bar code symbol and the text "TEXT STRAP 13 OUT" is the ending quiet zone.
10 LPRINT CHR$(27); "[1080;2160;u"; 20 LPRINT CHR$(27); "[3t"; 30 LPRINT "12345"; 40 LPRINT CHR$(9); 50 LPRINT "12345"; 60 LPRINT CHR$(9); 70 LPRINT "12345"; 80 LPRINT CHR$(27); "[0t";
90 LPRINT "TEXT STRAP 13 OUT"
GEK-00029B 5000 Series Programmer’s Manual
59
Page 60
OVERSIZE CHARACTER FONT
The oversize font is composed of special block-style characters that can be expanded 156 times the size of standard fonts. This will produce letters up to 15.25-inches (388mm) high by 13 inches (330mm) wide. Oversize characters can be rotated 90, 180, or 270 degrees.
Do not confuse oversize characters with expanded characters. The expanded character feature, (standard in your printer), expands all existing fonts up to 8 times the normal size. These characters are not rotatable.
The oversize character feature works with the ANSI protocol.
Entering and Exiting Oversize
The following sequences are used to enter, rotate, and exit oversize printing:
ESC [ 0 | Exit oversize printing. ESC [ 1 | Select oversize font with no rotation. ESC [ 2 | Select oversize font with 90-degree rotation. ESC [ 3 | Select oversize font with 180-degree rotation. ESC [ 4 | Select oversize font with 270-degree rotation.
LPRINT CHR$(27);"[0| LPRINT CHR$(27);"[0|";CHR$(124);
Once oversize has been turned on, it will remain on until an ESC [ 0 | sequence is used to turned it off. It does not turn off due to line terminators (CR and LF).
";
or
Chapter 2. ANSI Emulation GEK-00029B
60
Page 61
Selecting Size
ESC [p1;p2 B is the sequence used to set the vertical (p1) and horizontal (p2) size of the oversize characters. A p1 value of 300 would increase the vertical size of the character 300% or 3 times.
The last two digits of each parameter are necessary to comply with the ANSI standard, but are ignored by the printer. Using the above example for p1, any three-digit number starting with 3 (300-399) will be interpreted as 3 times normal size. Likewise, 400-499 equals 4 times, 1200-1299 equals a 12-times increase in size, and so on. The maximum size is 15600;15600 (156 times) and the minimum or default is 200;200 (2 times).
Since this same sequence is used to change size in the expanded mode, the parameters must be cleared to normal size, ESC [ 100 ; 100 B, to prevent entering expanded mode when oversize is turned off.
Mnemonic: ESC [ <p1>; <p2> B Decimal: 27 91 <p1> 59 <p2> 66 Hex: 1B 5B <p1> 3B <p2> 42 BASIC: CHR$(27);"[";<p1>;<p2>;B";
Size Parameters for Rotation
The <p1> and <p2> size parameters are always relative to a rotation angle of zero degrees. That is, the characters are expanded first and then rotated.
Spacing Between Characters
For non-rotated characters and characters rotated 180 degrees, the horizontal spacing between characters is 1/60-inch times the <p2> parameter.
For characters rotated 90 or 270 degrees, the horizontal spacing between characters is 3/60-inch times the p1 parameter.
Vertical spacing is dependent on vertical paper move commands (LF, CR, VPR, etc.), the state of menu option GenPrtOpts/Group 2/Strap 13, and the character size and line spacing currently in effect.
GEK-00029B 5000 Series Programmer’s Manual
61
Page 62
Sample Programs
Example 1
The first example shows the code used to print oversize. Line 10 sets the size to X3 vertical (V) and X3 horizontal (H). Line 20
enters oversize printing with printed. Line 40 exits oversize printing. Line 50 returns the size parameters to X 1 V - X 1 H.
10 LPRINT CHR$(27); "[300;300B"; 20 LPRINT CHR$(27); "[1|"; 30 LPRINT "ABCabc"; 40 LPRINT CHR$(27); "[0|"; 50 LPRINT CHR$(27); "[100;100B"
no rotation. Line 30 is the data to be
Example 2
The next two examples demonstrate the importance of setting the size parameters back to X1 V - X1 H after printing oversize. This is the same program used in Example 1 with an additional line added.
Line 60 prints 1234 in the currently selected font. 10 LPRINT CHR$(27); "[300;300 B";
20 LPRINT CHR$(27); "El:"; 30 LPRINT "ABCabc" 40 LPRINT CHR$(27); "CO:"; 50 LPRINT CHR$(27); "[100;100 B" 60 LPRINT "1234"
Chapter 2. ANSI Emulation GEK-00029B
62
Page 63
Example 3: Showing the Importance of Resetting Scaling Factors
If line 50, which sets the size to X1 V and X1 H. is removed, the data printed in line 60 is now subject to the expanded mode of printing.
NOTE In BASIC, LPRINT statements automatically generate an LF/CR at the end of the line unless suppressed by a semicolon. Since line 30 does not end with a semicolon, an LF/CR occurred at the lpi in effect (still in oversize). This accounts for the vertical distance between the ABCabc line and the 1234 line.
Notice (below) that the 1234 printed line is expanded vertically by X3 10 LPRINT CHR$(27); "[300;300B";
20 LPRINT CHR$(27); "[1|"; 30 LPRINT "ABCabc"; 40 LPRINT CHR$(27); "[0|" 60 LPRINT "1234"
GEK-00029B 5000 Series Programmer’s Manual
63
Page 64
Printer Control Strap GenPrtOpts/Group 2/Strap 13
This printer control strap is used for positioning the paper after printing oversize characters. When this strap is set to IN, the paper is positioned at the top of the oversize character after printing; when set to OUT, the paper position remains as is after printing oversize.
The state of the printer strap can be checked and changed using the configuration menu.
In the following examples:
▪ Lines 10-30 print oversize characters at X3.
▪ Line 50 changes the oversize to X4 V by X6 H.
▪ Lines 70-80 print oversize and exits.
▪ Line 90 returns the parameters to X1 to prevent expanded
printing.
▪ Lines 100-110 print normal text to show the effect that strap 13
has on positioning.
IMPORTANT Line spacing was set back to normal (6 lpi) when normal text was selected in line 90. When strap 13 is IN and the paper position returns to the top of oversize, vertical moves (CR, LF, VPA, VPR) must be used to move the paper to prevent overprinting on the oversize characters.
Chapter 2. ANSI Emulation GEK-00029B
64
Page 65
Example 4: GenPtrOpts | Group 2 Strap 13 IN
The oversize characters and the first line of normal printing are aligned at the first print line. The second line of normal printing (Text Text Text . . .) started printing one line below Strap 13 IN and overprints the oversized text.
100 LPRINT CHR$(27);"[300;300B"; 110 LPRINT CHR$(27);"[1|"; 120 LPRINT "ABC"; 130 LPRINT CHR$(27);"[400;600B"; 140 LPRINT "ABC"; 150 LPRINT CHR$(27);"[0|"; 160 LPRINT CHR$(27);"[100;100B"; 170 LPRINT "Strap 13 IN"; 180 LPRINT "Text Text Text Text Text Text Text"
Example 5: GenPtrOpts | Group 2 Strap 13 OUT
Paper motion is not returned after printing oversized characters.
100 LPRINT CHR$(27);"[300;300B"; 110 LPRINT CHR$(27);"[1|"; 120 LPRINT "ABC"; 130 LPRINT CHR$(27);"[400;600B"; 140 LPRINT "ABC"; 150 LPRINT CHR$(27);"[0|"; 160 LPRINT CHR$(27);"[100;100B"; 170 LPRINT "Strap 13 OUT"; 180 LPRINT "Text Text Text Text Text Text Text"
GEK-00029B 5000 Series Programmer’s Manual
65
Page 66
CHAPTER 3. PRINTRONIX P300/P600 EMULATION
INTRODUCTION
This printer is plug-compatible with the Printronix 300/600 family of line printers. It accepts and acts upon all control codes utilized by this family of printers in a manner that is as functionally equivalent as possible.
The following is a list of the control codes (and their functions) utilized by the Printronix printer. Any control codes not listed will be discarded.
When changing from the ANSI emulation to the P Series emulation. the ANSI vertical tab table does not transfer and the horizontal tab table set In the ANSI mode is not available. Ali menu parameters set before changing emulations will carry over except for these.
CONTROL CODES
ACK Line at 8 LPI (06H):
the entire line to be printed at 8 lpi. Since this code is momentary, it will not affect subsequent lines. Each line must receive an <ACK> code for the switch to 8 lpi.
BEL Bell Code (07H):
beeper to. sound for approximately 1 second.
BS Elongated Character Line (08H):
causes that line to be printed at double height. Standard- and double-high characters cannot be mixed on the same line.
CR Carriage Return Slew Zero or Edit Mode (ODH):
i.e., with the P300/600 Emulation Strap 01 OUT, a <CR> will left-justify the line in the buffer, but no printing will occur. The next line of data received can then modify the line. With the strap IN, the 0 slew mode is invoked. In this mode, the line modification feature is deleted and a <CR> is treated in the same manner as in the ANSI protocol. The print control, DEFINE CR, with the definition set to CR=CR+LF converts a carriage return to a linefeed. With the definition set to CR=CR, the printer ignores received carriage returns.
DC1 Ready/Select (11H):
select the printer in both serial and parallel interfaces. A serial interface protocol can be selected to transmit a <DC1> code to inform the host of a ready condition. See Appendix G for strap information.
A received <ACK> anywhere on the line causes
A <BEL> code received at the interface causes the
A <BS> code anywhere on the line
A received <DC1> can be used to remotely
In the edit mode,
If a <DC1> or <DC3> control character is received with strap 8 in GenPrtOpts set to OUT, the control is treated as a VFU Channel Command. See Appendix G, General Printer Options, Group 2.
Chapter 3. Printronix P300/P600 Emulation GEK-00029B
NOTE
66
Page 67
DC3 Busy/Select (13H):
p
the printer in both serial and parallel interfaces. A serial interface protocol can be used to transmit a DC3 code to inform the host of a busy condition.
If a <DC1> or <DC3> control character is received with strap 8 in GenPrtOpts Group 2 set to OUT, the control is treated as a VFU Channel Command. See Appendix D, General Printer O
tions, Group 2 on page 345.
A received DC3 can be used to remotely deselect
NOTE
DEL Delete (7FH):
In graphics mode, the delete character is treated as data. In the edit mode, a <DEL> following a <CR> erases (replace with a space) previously accepted (buffered, but not printed) characters.
DLE High Vertical Density Graphics (10H):
an <ENQ> code anywhere on the same line causes paper motion for that line to be 1/144 inch instead of the normal 1/72 inch. If not preceded by an <ENQ> code, the <DLE> is discarded. If there are no graphics commands (EOT or ENQ) in the line, the DLE code is treated as an EVFU channel command.
ENQ Normal Density Plot Line (05H):
An <ENQ> anywhere in the line causes the line to be treated as normal-density (60 dpi) plot mode graphics. An <LF> code causes the line to be printed as one dot row and the paper is advanced. If there is a <DLE> anywhere in the line, the paper is advanced by 1/144 inch. Otherwise, the paper is advanced by 1/72 inch.
EOT High Density Plot Line (04H):
An EOT is used to print at 120 dpi. This code anywhere in the line causes the line to be treated as high-density plot mode graphics. The line must be terminated with a CR (printer strap A29 must be OUT). The characters are treated as dot information and the CR at the end of the line will not cause the paper to advance. The code causes dots to be printed in the even-numbered dot column positions. A second line of the same data with the normal plot mode command (ENQ) is required to fill in the remainder of the dots and to advance the paper.
ETX End of Transmission (03H):
The ETX code is used in the serial interface with the ACK code as part of an interface protocol. The ETX is received from the host at the end of a data block. The host then stops sending data until an ACK is received.
A <DLE> code preceded by
FF Form Feed (0CH):
paper advanced to the top of form.
HT Horizontal Tab (09H):
LF Line Feed (0AH):
the paper to the next line. If the line is a plot mode line, the paper is advanced one dot row or not at all, depending on the density of the plot mode. See Printronix Mode Graphic Density Table.
RS Record Separator (1EH):
beginning of an EVFU load. [Need replacement wording here for the margin notes in the tech review.]
GEK-00029B 5000 Series Programmer’s Manual
A form feed causes the line to be printed and the
An HT is replaced by a space character.
An LF causes the line to be printed and advances
The RS character is used to signal the
67
Page 68
SI Shift In (0FH):
An SI code anywhere in the line causes the remainder
of the line and all following lines to be printed in the standard font.
SO Shift Out (0EH).
remainder of the line of the line and all subsequent lines (until an SI code is received) to be printed in the alternate font. The alternate font is selected with printer P300/600 emulation straps S13-S16, set in the GenPtrOpts function of the CCU menu.
An SO code anywhere in the line causes the
SP Space (20H):
The space code causes a blank in the character position represented by the code. Following a carriage return in edit mode, space codes do not modify the contents of the print buffer. The SP is used as a skip code to pass over characters in the buffer. When using the character graphics font the character in the 20H position is printed instead of a blank.
UNDL Underline (5FH):
When using the legacy parallel interface, hardware strap H7 IN causes a CR to be substituted for an underline character. (See Appendix G. Hardware Straps.) All software straps that apply to a CR will apply if the option is selected.
US Unit Separator (1FH):
an EVFU load sequence.
VT Vertical Tab (0BH):
A VT causes the line to be printed and paper advanced until the next tab position is reached. If the VFU is enabled, channel 12 is accessed instead.
The US character is used to signal the end of
Chapter 3. Printronix P300/P600 Emulation GEK-00029B
68
Page 69
PRINTRONIX GRAPHICS
The Printronix emulation graphics mode provides a horizontal dot placement plotting method. This method enables the printing of ASCH characters in their binary code form. Since each character has a unique pattern of 1s and 0s (dots and voids) that make up its binary code, the correct placement of these binary forms enables you to form larger images on the paper.
For clarity in the text, a binary 1 (a printed dot) Will be shown as an X and a binary 0 (empty dot position) will be shown as a 0.
In the graphics mode, only the low order six bits of a seven- or eight­bit character are used (bits 1-6). Looking at an ASCH code chart, the question mark character (?) is represented by the binary number 1111110 (bit 1 - bit 7). Since only the first 6 bits are used, a ? would print six dots on the paper. An asterisk (*) is represented by 010101 which would print 0X0X0X0 across the page horizontally.
Using the question mark that prints all dots, a series of these characters produces a one dot high solid line across the paper. By repeating, omitting, and mixing characters across a page, images such as graphs, charts, and pictures can be produced.
Dot Patterns and Densities
The chart on the next page shows the dot patterns for each of the ASCII characters. Each character represents six dots (or dot positions)* and their spacing is dependent on the density selected.
Graphics data printed in horizontal format is comprised of a stream of bytes from left to right across each dot row.
This chart shows that byte 1 (or character 1) in row 1 will print its six bits from left to right in a single dot row. The next byte (byte 2) prints its six bits, representing a character, in the same dot row across the page.
Byte
!!!!
Row
""""
1 1 2 3 4 5 6 1 2 3 4 5 6 …1 2 3 4 5 6 2 1 2 3 4 5 6 1 2 3 4 5 6 …1 2 3 4 5 6 3 1 2 3 4 5 6 1 2 3 4 5 6 …1 2 3 4 5 6
. . . . . . . . . . . . . …. . . . . .
. . . . . . . . . . . . . …. . . . . .
6 1 2 3 4 5 6 1 2 3 4 5 6 …1 2 3 4 5 6
Byte 1 Byte 2 Byte n
GEK-00029B 5000 Series Programmer’s Manual
69
Page 70
Dot Patterns
This chart shows the dot patterns for the ASCII characters needed to cover all dot/void combinations. Characters from 20H to 3FH provide the same patterns as characters 60H through 7FH. Characters from 00H through 1FH, which are not recognized as line terminators or plot mode codes, are ignored.
Character Value Dots Character Value Dots
@40H A41H B42H C43H D44H E45H
F46H G47H H48H
I49H
J4AH K4BH
L4CH
M4DH
N4EH O4FH
P50H Q51H R52H
S53H
T54H U55H V56H
W57H
X58H
Y59H
Z5AH
[5BH
\5CH
]5DH ^5EH _5FH
000000 X00000 0X0000 XX0000 00X000 X0X000 0XX000 XXX000 000X00 X00X00 0X0X00 XX0X00 00XX00 X0XX00 0XXX00 XXXX00 0000X0 X000X0 0X00X0 XX00X0 00X0X0 X0X0X0 0XX0X0 XXX0X0 000XX0 X00XX0 0X0XX0 XX0XX0 00XXX0 X0XXX0 0XXXX0 XXXXX0
’60H a61H b62H c63H d64H e65H
f66H g67H h68H
i69H
j6AH k6BH
l6CH
m6DH
n6EH o6FH p70H q71H r72H s73H
t74H u75H v76H
w77H
x78H y79H z7AH
{7BH |7CH
}7DH ~7EH ?3FH
00000X X0000X 0X000X XX000X 00X00X X0X00X 0XX00X XXX00X 000X0X X00X0X 0X0X0X XX0X0X 00XX0X X0XX0X 0XXX0X XXXX0X 0000XX X000XX 0X00XX XX00XX 00X0XX X0X0XX 0XX0XX XXX0XX 000XXX X00XXX 0X0XXX XX0XXX 00XXXX X0XXXX 0XXXXX XXXXXX
Chapter 3. Printronix P300/P600 Emulation GEK-00029B
70
Page 71
Each line to be printed as graphics must have one of the three graphic control codes (ENQ, EOT, DLE) in the line of data. The ENQ and EOT codes can be placed anywhere in the line of data. When used, the DLE code must always be placed after the ENQ code.
The following densities are available using the formats shown:
Horizontal Vertical Line Format Required
Density
60 72 ENQ, data, LF terminator
120 72 EOT, data, CR terminator
ENQ, data, LF terminator
60 144 ENQ, DLE, data, LF terminator
120 144 EOT, data, CR terminator
ENQ, DLE, data, LF terminator
The dot pattern for a particular character is the same regardless of density. The density difference is a shift to the right by 1/120 inch for high density.
Normal-Density Graphics
At 60 dpi horizontal density, one line of characters is used for each dot row. The normal density plot mode character (ENQ) can appear anywhere in the line. The line must be terminated with an LF. At the end of graphics printing, send an empty data line containing only an LF.
High-Density Graphics
At 120 dpi horizontal density, each dot row requires two lines of characters. The first line contains the high density plot mode code (EOT) and must be terminated with a CR.
The DEFINE CR setting in the printer control setup menu must be set to CR=CR.
The second line contains the normal density plot mode code (ENQ) and must be terminated with an LF.
At the end of graphics printing, send an empty data line containing only an LF for proper termination.
P300/600 8-Bit Horizontal Graphics
Horizontal Vertical Syntax
60 72 <ESC>"1<count><data><LF>
120 72 <ESC>"2<count><data><LF>
60 144 <ESC>"1<count><data><DLE><LF>
120 144 <ESC>"2<count><data><DLE><LF>
IMPORTANT
GEK-00029B 5000 Series Programmer’s Manual
71
Page 72
P300/600 ELECTRONIC VERTICAL FORMAT UNIT
The electronic vertical format unit (EVFU) is used to download vertical tabs to the printer. It allows jumps to preselected lines on the form through vertical moves of the paper.
The maximum form length is 22 inches (176 lines at 8 lpi).
Using the EVFU
Using the EVFU is a two-step process. The first step is to load the channel control table with codes for the form being used. One byte must be loaded for each line of the form. A channel code can be inserted in the byte to indicate a stop (or vertical tab location).
The second step is to send a channel command to jump to a specified channel (location on the paper).
On the following pages are charts and sample programs showing the codes for loading the EVFU table and selecting channels for paper moves.
Points to Remember
▪ When a table is downloaded, VFU will be displayed.
▪ The vertical format type must be set to Emulation VFU through
the control panel using the
Select |Emulation VFU
▪ The
GenPtrOpts | Group 2
select/deselect must be set to OUT.
Setup | Vertical Format | Type
menu option.
strap to enable received
▪ Printer option 3 (see Table 11 in Appendix D, Printronix 300/600
Emulation Options) must be enabled to enable EVFU loading. If option 3 is not enabled when a start load RS code is received, the table will not be loaded and all control characters received before the end load US code will be interpreted as data.
▪ When using serial interface with the PI lead enabled, the interface
settings menu must have the serial options set to
bit.
Send the EVFU table at the start of a line to prevent a loss of data. These charts contain the channel commands to load the EVFU table
and for selecting a channel for vertical moves.
PI Lead Use 8-
Chapter 3. Printronix P300/P600 Emulation GEK-00029B
72
Page 73
PI Lead Codes – Use with Serial Interface
The PI lead is not used in the parallel interface. To use the PI lead with the serial interface, 8-bit codes must be sent.
Data Lines
PI 7 6 5 4 3 2 1 Channel
1 XX00000 1 TOF 128 NUL 1 XX00001 2 129 none 1 XX00010 3 130 none 1 XX00011 4 131 none 1 XX00100 5 132 none 1 XX00101 6 133 none 1 XX00110 7 134 none 1 XX00111 8 135 BEL 1 XX01000 9 136 BS 1 XX01001 10 137 HT 1 XX01010 11 138 LF 1 XX01011 12 VT 139 VT 1 XX01100 13 140 FF 1 XX01101 14 141 CR 1 1101110 Start Load 238 none 1 1101111 End Load 239 none
Channel
number
or Command
Decimal
Number
ASCII
Codes Not Using the PI Lead
Data Lines
PI 7 6 5 4 3 2 1 Channel
0 0000000 1 TOF 16 DLE 0 0000001 2 17 DC1 0 0000010 3 18 DC2 0 0000011 4 19 DC3 0 0000100 5 20 DC4 0 0000101 6 21 NAK 0 0000110 7 22 SYN 0 0000111 8 23 ETB 0 0001000 9 24 CAN 0 0001001 10 25 EM 0 0001010 11 26 SUB 0 0001011 12 VT 27 ESC 0 0001100 13 28 FS 0 0001101 14 29 GS 0 0001110 Start Load 30 RS 0 0001111 End Load 31 US
Channel
number
or Command
Decimal
Number
ASCII
GEK-00029B 5000 Series Programmer’s Manual
73
Page 74
Example EVFU Loading Program
▪ Using standard CENTRONICS parallel interface with 36-pin
connector and P Series protocol.
▪ Using the channel code chart without the PI lead.
▪ This program loads the EVFU table with channel stops at lines 6,
25, 57, and 66.
▪ Set the printer as follows:
GenPtrOpts | Group 2 | Strap 8
SELECT/DESELECT operation.
▪ Set up vertical format emulation (VFU)
PROGRAM INSTRUCTION REMARKS
1500 WIDTH "LPT1:". 255
Required by some BASIC languages to
avoid auto LF at column 80 1510 LPRINT CHR$(30); Selects SL channel. 1520 LPRINT CHR$(16); Selects TOF. Channel 1 1530 FOR 1=1 to 4 1530 FOR I-1 to 4 1531 LPRINT CHR$(17);
Selects Channel 2 for 4 filler lines 1532 NEXT 1 1540 LPRINT CHR$(18); Selects Channel 3 (for line 6 printing) 1550 FOR 1=1 to 18 1551 LPRINT CHR$(17);
Selects Channel 2 for 18 filler lines 1552 NEXT I 1560 LPRINT CHR$(19); Selects Channel 4 (for line 25 printing) 1570 FOR 1=1 to 31 1571 LPRINT CHR$(17);
Selects Channel 2 for 31 filler lines 1572 NEXT I 1580 LPRINT CHR$(20); Selects Channel 5 (for line 57 printing) 1590 FOR 1=1 to 8 1591 LPRINT CHR$(17);
Selects Channel 2 for 8 filler lines 1592 NEXT I 1600 LPRINT CHR$(21); Selects Channel 6 (for line 66 printing) 1610 LPRINT CHR$(31); Selects EL Channel 1620 END
OUT to deactivate coded
A start load RS code immediately followed by a stop load US code will clear the EVFU table. The BASIC code to do this follows
10 LPRINT CHR$(30); 20 LPRINT CHR$(31);
Chapter 3. Printronix P300/P600 Emulation GEK-00029B
74
Page 75
Example Form Printout
This example uses the VFU table created in the previous example.
NOTE Establish top of form locally before printing. When running the program, paper will slew to the top of the next form before printing begins.
Sample Program to Print Form
The following sample program uses the EVFU program from the prior example.
Program Instruction Remarks
10 WIDTH “LPT1:”;255 Required by some BASIC
languages to avoid auto LF
20 LPRINT CHR$(16); Go to Top of Form (Channel
1) 25 LPRINT “TOP OF FORM”; Print the indicated words 30 LPRINT CHR$(18); Go to Channel 3 35 LPRINT “TOP MARGIN, LINE 6”; Print the indicated words 40 LPRINT CHR$(19); Go to Channel 4 45 LPRINT “LINE 25”; Print the indicated words 50 LPRINT CHR$(20); Go to Channel 5 55 LPRINT “BOTTOM MARGIN, LINE 57”; Print the indicated words 60 LPRINT CHR$(21); Go to Channel 6 65 LPRINT “END OF FORM”; Print the indicated words 70 END
GEK-00029B 5000 Series Programmer’s Manual
75
Page 76
CHAPTER 4. PRINTRONIX P-SERIES EMULATION
SPECIAL FUNCTION CONTROL CHARACTER (SFCC)
When a printer control code consists of more than one character, it is called a command or escape sequence. This emulation uses a
Function Control Character (SFCC)
command sequence. The SFCC alerts the printer that a command sequence—not printable characters follows.
▪ In this P-Series emulation mode, you may choose 0 to 127 to be
the SFCC via the Emulation Settings of the Set Up Menu.
The general format for a command sequence in the P-Series emulation is:
SFCC (parameter 1 ..... parameter n) (terminator)
Command Line
In the P-Series emulation mode, print format, font, or international language selection can also be controlled by a longer sequence known as a Command Line. Command Lines are string type commands placed between complete lines of text and affecting the text that follows. The P-Series Emulation has six Command Lines: PMODE, OSET, PSET, LPI, LINES, and INCHES. Each of these Command Lines is discussed in this chapter under the appropriate Control Code function.
as the first character of a
Special
For example, you can set the form length in inches by using the following command line:
SFCC INCHES ; n f
where n is the whole number of inches and f is the fractional increment in 0.5 inch increments.
When using the SFCC in a Command Line, it must be the first non-blank symbol in the line (space, hex 20, is a blank symbol).
In addition, characters following spaces (other than a valid line terminator) in a Command Line are ignored so that user comments can be included on the Command Line. The valid line terminators are Form Feed (FF), Line Feed (LF), and Carriage Return (CR); however, when used in the Command Line, these line terminators do any paper motion.
not
cause
Chapter 4. Printronix P Series Emulation GEK-00029B
76
Page 77
Set and Reset Codes
Some print attributes are set and reset (turned ON and OFF) by using an SFCC command sequence and the numbers one(1) or zero(0). These numbers may be in the form of hexadecimal code 01H and 00H, or the ASCII code for the printable symbols of decimal 1 and 0 (hexadecimal code 31 and 30).
GEK-00029B 5000 Series Programmer’s Manual
77
Page 78
COMMAND INDEX
Command Format Page
Vertical Motion
Form Feed <FF> 81 Forms Length Set (Inches) <SFCC> INCHES 93 Forms Length Set (Lines) <SFCC> LINES 93 Line Feed <LF> 81 Line Spacing 1/6 Inch (6 lpi) <SFCC> 2
<SFCC> LPI
Line Spacing 1/8 Inch (8 lpi) <SFCC> 0
<SFCC> LPI
Line Spacing 8 or 10.3 LPI (1 line only) <ACK>
<SFCC> f
Line Spacing 7/72 Inch <SFCC> l 96 Line Spacing n/72 Inch
(used with SFCC 2) Vertical Tab <VT> 97
Horizontal Motion
Backspace <BS> 80 Carriage Return <CR> 80
<SFCC> A 96
94
95
95
Print Attributes
Bold Print <SFCC> G 84 Bold Print Off <SFCC> H 85 Emphasized Print <SFCC> E 85 Emphasized Print Off <SFCC> F 86 Overscoring <SFCC> _ 90 Underline <SFCC> - 91
Printer Control
Bell <BEL> 80 Emulation Reset <SFCC> @ 92
Font Control
Download New Character Shape (not supported) Double Wide (Elongated) Characters
(1 line only)
<SFCC> h <BS>
86
Expanded (Double Wide) Print <SFCC> W 1 85 Expanded (Double Wide) Print Reset <SFCC> W 0
86
<DC4>
continued
Chapter 4. Printronix P Series Emulation GEK-00029B
78
Page 79
Font Control (continued)
Font Selection <SFCC> X
89
<SFCC PMODE
Superscript/Subscript Printing <SFCC> S 90 Superscript/Subscript Printing Reset <SFCC> T 90
Plot Mode Graphics
Plot, Even Dot (High Horizontal Density) <EOT> 103 Plot, Odd Dot (Normal Density) <SFCC> d
103
<ENQ>
Plot, High Vertical Density (1/144) <DLE> 102 Plot, Single Line (High Horizontal Density) <NAK> 103
Character Set Control
Character Set Select <SFCC> 1 82 Character Set Select: ECMA Extended (Not supported) Character Set Select: Int’l Languages <SFCC> PSET or <SFCC> R 84 Character Set Select: Substitution Table (Not supported) Execute Control Codes <SFCC> 7 92 Print Control Codes <SFCC> 6 92 Download a Language (Not supported) Extended Character Set <SO>
87 <SFCC> <SO> <SFCC> n <SFCC> 4
Extended Character Set Cancel <SI>
88 <SFCC> <SI> <SFCC> o <SFCC> 5
GEK-00029B 5000 Series Programmer’s Manual
79
Page 80
CONTROL CODES
Backspace Backspace <BS>
character space toward the first character column. When configured from the control panel for backspace, BS moves the character position one character space to the left at the current character pitch setting. This code is ignored if the logical print position is at the first character column.
Decimal: 8 Hex: 08H BASIC: CHR$(8);
Indeterminate Conditions
This code can also be configured form the control panel to print double-high characters instead of a backspace.
Bell Bell <Bel>:
The printer's audible alarm will sound for 1/2 second
when the bell code is received by the printer.
Format
<Bel>
Decimal: 7 Hex: 07H BASIC: CHR$(7);
Indeterminate Conditions
Bell code cannot be disabled.
: Moves the logical print position to the left one
Carriage Return Carriage Return <CR>:
character column. The CR code may or may not cause printing or paper motion, depending on the CR CODE configuration parameter value.
Format
<CR> Decimal: 13
:
Hex
0DH
BASIC: CHR$(13); If the CR CODE option menu is set for CR=CR, the characters
following the CR are printed over the previous characters on the line. If identical characters are placed in the same position on the line, those characters are printed in double strike print when the Overstrike mode is enabled from the control panel.
The CR=CR configuration causes subsequent printable data to overprint previous data at half speed if Overstrike is enabled from the control panel (and prints somewhat faster if Overstrike is disabled), unless an intervening paper motion command is received.
If the CR CODE is configured for: CR=CR+LF Control code CR is converted to perform a carriage return and line
feed function.
Returns the logical print position to the first
Chapter 4. Printronix P Series Emulation GEK-00029B
80
Page 81
Form Feed Form Feed <FF>:
position to the next top-of-form and moves the character position to the first character column. The FF code cancels all single-line only print attributes.
Format
<FF> Decimal: 12
Hex: 0CH BASIC: CHR$(12);
Indeterminate Conditions
Forms length can be modified by using the control panel or forms length control codes.
The Form Feed command may reacts differently if a VFU is active (refer to VFU section).
Prints the data in the buffer, advances the paper
Line Feed Line Feed <LF>:
the vertical character position one line at the current line space setting and moves the logical print position to the left margin.
The LF function cancels all single line print attributes such as double high (elongated) and double wide (expanded) characters.
In the Even Dot Graphics Plot mode (high density graphics), the LF code does not cause paper position motion; the data in the buffer is plotted and the logical print position is set at character column 1 in anticipation of the Odd Dot Plot control code to complete high density graphic plotting. In the Odd Dot Graphics Plot mode (normal density graphics), the LF code plots the data in the buffer, advances the paper position a single dot row at the current vertical dot density, and positions the logical print position at character column 1.
Format
<LF> Decimal: 12
Hex: 0AH BASIC: CHR$(12);
Prints the data in the buffer (if any) and advances
GEK-00029B 5000 Series Programmer’s Manual
81
Page 82
CHARACTER SETS, FONT HANDLING AND ENHANCEMENTS
Character Set Select
Selects the character set, extended character set, and the international language for a specific character set.
Format
<SFCC> l xyz x: character set
y: international language for the selected character set table z: extended character set for the selected character set
Decimal: <SFCC> 108 x y z Hex: <SFCC> 6C xH yH zH BASIC: CHR$(<SFCC>);CHR$(108);”xyz”;
Character Set Select (x)
(x) Character Set
0(30) Code Page 437 1(31) Code Page 8859-1 2(32) Invalid (Defaults to Code Page 437) 3(33) Code Page 8574
(2A) Unchanged
International Language Select (y)
x 0(30) 1(31) 2(32) 3(33)
y CP 437 CP 8859-1 CP 8574
0(30) ASCII (USA) ASCII (USA) NA ASCII (USA) 1(31) French EBCDIC NA French 2(32) German NA German 3(33) English NA English 4(34) Danish NA Norw/Danish 5(35) Swedish NA Swedish 6(36) Italian NA Italian 7(37) Spanish NA Spanish 8(38) Japanese NA Japanese
9(39) Fr. Canadian NA Fr. Canadian 10(3A) Latin Amer NA Dutch 11(3B) Norwegian NA Finnish 12(3C) Danish II NA Swiss 13(3D) Spanish II NA 14(3E) Latin AM II NA
Chapter 4. Printronix P Series Emulation GEK-00029B
82
Page 83
Character Set (continued) Select
Extended Character Set Select (z)
z
0(30) CP 850 1(31) 2(32) 3(33) 4(34) 5(35) 6(36) 7(37) 8(38)
9(39) 10(3A) 11(3B) 12(3C)
1
Valid only if x = 0. All other values of z are ignored including ‘*’
Indeterminate conditions
If the (*) character is the value selected for x, the character set does not change. If (*) or (X) is selected for y, the previously selected international language is used.
Notes
x 0(30)
IBM PC
1
1(31) 2(32) 3(33)
NA NA NA
This command implementation is different than the target printer due to limitations in Font character sets. Refer to the “Emulation Differences” section of this document.
GEK-00029B 5000 Series Programmer’s Manual
83
Page 84
Select International Character Set
Selects the international character using the parameter (where the parameter is one of the values in the table below).The ultimate character set selected is a function of the parameter and the currently-active code page.
Format
<SFCC> P S E T ; n or <SFCC> R n Decimal: <SFCC> 80 83 69 84 59 n
Hex: <SFCC> 50 53 45 54 3B nH BASIC: CHR$(<SFCC>);”PSET;”;CHR$(n);
International Character Set
n Character Set Select
PSET CP 437 CP 8859-1 CP 8574
0 ASCII (USA) ASCII (USA) ASCII (USA) 1 French EBCDIC French 2 German German 3 English English 4Danish Nor./Danish 5 Swedish Swedish 6 Italian Italian 7 Spanish Spanish 8 Japanese Japanese
9 F. Canadian F. Canadian 10 Latin Am. Dutch 11 Finnish Finnish 12 Swiss Swiss
Bold Print ON
Indeterminate Conditions
Selecting SFCC RX accesses the substitution table for the current character set.
Notes
This command implementation is different than the target printer due to limitations in Font character sets. Refer to the “Emulation Differences” section of this chapter.
Selects Bold Print mode. All characters are printed twice using direct overprint (striking each dot twice) until reset by the Bold Print off code or a printer reset. When SFCC j is used, Bold Print printing is selected for one line only; it is reset by the Bold Print off control code, emulation reset, or a paper motion command.
Format
<SFCC> G Decimal: <SFCC> 71
Hex : <SFCC> 47 BASIC: CHR$(<SFCC>);”G”
Chapter 4. Printronix P Series Emulation GEK-00029B
84
Page 85
Bold Print OFF
Deselects Bold Print mode.
Format
<SFCC> H Decimal: <SFCC> 72
Hex: <SFCC> 48 BASIC: CHR$(<SFCC>);”H”;
Indeterminate Conditions
This sequence resets Bold Print printing only. Other attributes ( double wide, etc) remain active.
Single Line Double High
Emphasized Print ON
Selects elongated (double high) character printing for one line only. Elongated characters are approximately double height but standard width. The elongated character control code is a line-by-line print attribute; when the control code is received, one entire line of elongated characters is printed and then automatically reset at the end of the line.
Format
<SFCC> h Primary command format <BS> Selects Double High when the Double High print option is
selected from the control panel. Decimal: <SFCC> 104 or
8
Hex : <SFCC> 68 or
08H
BASIC: CHR$(<SFCC>);”h”; or
CHR$(8);
Indeterminate Conditions
When configured for double high print from the control panel menu, the control code BS (Hex 08) also selects elongated character printing for a single line.
Selects Emphasized Print mode. Emphasized print, also called "shadow" printing, consists of printing each letter twice, the second printing horizontally offset (1/240th inch) from the first. Emphasized print is turned off by the emphasized print reset control code or emulation reset.
Format
<SFCC> E Decimal: <SFCC> 69
Hex: <SFCC> 45 BASIC: CHR$(<SFCC>);”E”;
Indeterminate Conditions
Emphasized print is ignored during superscript or subscript printing, and when 15-20 cpi characters are selected.
GEK-00029B 5000 Series Programmer’s Manual
85
Page 86
Emphasized Print OFF
Deselects Emphasized Character print mode.
Format
<SFCC> F Decimal: <SFCC> 70
Hex: <SFCC> 46 BASIC: CHR$(<SFCC>);”F”;
Indeterminate Conditions
This sequence resets Emphasized printing only. Other attributes (bold, double wide, etc) remain active.
Double Wide Print
Double Wide Print (continuous): Selects or resets expanded (double wide) print.
Format
<SFCC> W n) Decimal: <SFCC> 87 n
Hex: <SFCC> 57 nH BASIC: CHR$(<SFCC>);n
n = 1 selects expanded print (hex 01 or hex 31) n = 0 resets expanded print (hex 00 or hex 30)
When expanded print using SFCC W is received, all characters print double wide until reset by the expanded print reset control
printer reset.
Single Line Double Wide Print (single line): Double Wide Print
print for one line only. This expanded print control code is a line-by­line print attribute. When the SFCC k control code is received, the current line is printed double wide and then automatically reset at the end of the line.
Format <SFCC> k Decimal: <SFCC> 107
Hex: <SFCC> 6B BASIC: CHR$(<SFCC>);”k”;
code,
Selects expanded (double wide)
This control code can be reset by a paper motion control code (LF, VT, CR, etc.), SFCC @ (printer reset), CAN or SFCC W (double wide print).
Chapter 4. Printronix P Series Emulation GEK-00029B
86
Page 87
Extended Character Set Select
Extended Character Set Access: Accesses the extended character set in the range ADH to FFH hex using codes 20H to 7FH. Used in 7-bit systems as if data bit 8 was set to 1. For example, sending code 20 hex accesses the symbol at code point A0H. If a printable symbol is not available at the code point, a space is printed.
Format
<SO> or <SFCC> <parameter> <SO>
<SFCC> <SO> <SFCC> n <SFCC> 4
Decimal: 14
<SFCC> 14 <SFCC> 110 <SFCC> 4
Hex: 0EH
<SFCC> 0E <SFCC> 6E <SFCC> 34
BASIC: CHR$(14);
CHR$(<SFCC>);CHR$(14); CHR$(<SFCC>);”n”; CHR$(<SFCC>);”4”;
Indeterminate Conditions
<SFCC> 4 is not canceled by the next paper motion command; 0E, <SFCC> 0E, <SFCC> 6E are canceled by paper motion.
GEK-00029B 5000 Series Programmer’s Manual
87
Page 88
Extended Character Extended Character Set Cancel: Set Cancel
as selected by SO, SFCC SO, SFCC n, SFCC 4, and selects the primary Character Set.
Used in 7-bit systems as if data bit 8 was set to 1. For example, sending code 20 hex accesses the symbol at code point 0A0H hex. If a printable symbol is not available at the code point, a space is printed.
Format <SI> or <SFCC> <parameter> <SI>
<SFCC> <SI> <SFCC> o <SFCC> 5
Decimal: 15
<SFCC> 15 <SFCC> 111 <SFCC> 5
Hex: 0FH
<SFCC> 0FH <SFCC> 6FH <SFCC> 35H
BASIC: CHR$(15);
CHR$(<SFCC>);CHR$(15); CHR$(<SFCC>);CHR$(111); CHR$(<SFCC>);CHR$(5);
Cancels the extended character set
Chapter 4. Printronix P Series Emulation GEK-00029B
88
Page 89
Font Select Font Selection:
in characters per inch (cpi).
Format
<SFCC> X <m> <n> or <SFCC> P M O D E ; n
Decimal: <SFCC> 88 <m> <n>
Hex: <SFCC> 58 (parm 1, parm 2)
BASIC: CHR$(<SFCC>);”X”;CHR$(<m>);CHR$(<n>);
<SFCC> X <m> <n> Format
m = font code n = pitch code (cpi)
m (hex) 0(30) 1(31) 2(32) 3(33) 4(34) 5(35) 6(36)
FONT DP NLQ DP DP DP OCR-A OCR-B
n (hex) Characters Per Inch
0(30) 10 10 101010 10 10 1(31) 12 12 121212 - ­2(32) 13.3 13.3 13.3 13.3 13.3 - ­3(33) 15 15 151515 - ­4(34) 17.1 17.1 17.1 17.1 17.1 - -
<SFCC> PMODE;n Format
Selects a font (DP, NLQ, or OCR) and character pitch
<SFCC> 80 77 79 68 69 3B <n>
<SFCC> 50 4D 4F 44 45 3B <nH>
CHR$(<SFCC>);”PMODE;<n>”;
n ranges from 0 to 6 to select the font and pitch combination. All other values are invalid.
n = pitch code (cpi) An asterisk (*) (hex 2A) may be substituted for m or n. Whenever the
asterisk replaces m or n, its current value does not change. Values other than those shown in the table below are ignored.
PMODE switches to the Primary Character Set and selects font and pitch according to the following table.
‘n’ Font and Pitch
0 Data Processing 10 CPI 1 Data Processing 12 CPI 2 Data Processing 15 CPI 3NLQ 10 CPI 4 Data Processing 10 CPI 5 OCR-A 10 CPI 6 OCR-B 10 CPI
Notes
This command implementation is different than the target printer due to limitations in Font character sets. Refer to the “Emulation Differences” section of this chapter.
GEK-00029B 5000 Series Programmer’s Manual
89
Page 90
Overscoring Overscoring:
characters.
Format
<SFCC> _ <n> Decimal: <SFCC> 95 <n>
Hex: <SFCC> 5F <nH> BASIC: CHR$(<SFCC>);”_<n>”;
n = 0 disables automatic overscoring (hex 00 or hex 30) n = 1 enables automatic overscoring (hex 01 or hex 31) When automatic overscore is enabled, all characters, including
spaces, are overscored until the feature is disabled.
Enables or disables automatic overscoring of all
Super/Subscript Superscript or Subscript:
Format
<SFCC> S <n> Decimal: <SFCC> 83 <n>
Hex: <SFCC> 53 <nH> BASIC: CHR$(<SFCC>);”S<n>”;
n = 0 enables superscript printing (hex 00 or hex 30) n = 1 enables subscript printing (hex 01 or hex 31)
Details
When the super/subscript control code is received, all characters print as superscript or subscript until reset by the super/subscript reset control code or printer reset. Emphasized print is ignored if super/subscript printing is active.
When the BS feature is enabled from the control panel menu, both superscript and subscript characters can be printed in the same character column using the Backspace (BS) control code.
Indeterminate Conditions
Overlapping lines may occur when combining Superscript or Subscript printing with other print attributes such as Double High or with small line spacing.
Selects superscript or subscript printing.
Super/Subscript Superscript or Subscript Reset: Reset
printing.
Format
<SFCC> T Decimal: <SFCC> 84
Hex: <SFCC> 54 BASIC: CHR$(<SFCC>);”T”;
Chapter 4. Printronix P Series Emulation GEK-00029B
Deselects superscript or subscript
90
Page 91
Underline Character Underlining:
all characters.
Format
<SFCC> - <n> Decimal: <SFCC> 45 <n>
Hex: <SFCC> 2D <nH> BASIC: <CHR$(<SFCC>);”-<n>”;
n = 0 disables automatic underlining (hex 00 or hex 30) n = 1 enables automatic underlining (hex 01 or hex 31)
Details
When automatic underline is enabled, all characters, including spaces, are underlined until the feature is disabled.
Enables or disables automatic underlining of
GEK-00029B 5000 Series Programmer’s Manual
91
Page 92
HOUSEKEEPING COMMANDS
Print Control Codes
Execute Control Codes
Forces the hex codes 80H to 9FH to become printable symbols in the currently selected character set. Cancels the executable control code operation activated by the SFCC 7.
Format
<SFCC> 6 Decimal: <SFCC> 6
Hex : <SFCC> 36 BASIC: CHR$(<SFCC>);”6”;
Indeterminate Conditions
This feature can also be selected from the control panel. Forces the hex codes 80H to 9FH to execute as control codes.
Cancels the printable control code operation activated by the SFCC 6.
Format
<SFCC> 7 Decimal: <SFCC> 7
Hex: <SFCC> 37 BASIC:
CHR$(<SFCC>);”7”;
Indeterminate Conditions
This feature is also selectable by control panel operations.
Emulation Reset
Initializes all printing parameters to values previously saved. When reset to the previously saved values, the current line is set to the top­of-form position. Font, line spacing, international language selection, margins, form length, skip-over perforation, and character pitch are reset to previously saved values. Character-by-character and line-by­line attributes are canceled. The vertical format unit is cleared.
Format
<SFCC> @ Decimal: <SFCC> 64
Hex : <SFCC> 40 BASIC: CHR$(<SFCC>);”@”;
Chapter 4. Printronix P Series Emulation GEK-00029B
92
Page 93
Set Forms Length In Inches
Set Form Length (Inches
)
Format
<SFCC> I N C H E S ; <n> ; <f> Decimal: <SFCC> 73 77 67 72 69 83 59 <n> 59 <f>
Hex : <SFCC> 49 4E 43 48 45 53 3B <nH> 3B <fH> BASIC: CHR$(<SFCC>):”INCHES<n>;<f>”;
n = a whole number from 1 to 22 specifying the number of inches on
a page.
f = a fractional number in 0.5 inch increments (minimum forms
length is 0.5 inches).
Details
When this command is received, the current position becomes the first line of the form and the form length value becomes the new form length. Vertical tab positions set below the bottom of the form are cleared.
NOTE Form length is defined in inches, therefore subsequent line spacing changes do not affect the results of this command.
Set Form Length In Lines
Indeterminate Conditions
Form length can also be set from the control panel menu. If a VFU is enabled and loaded, this command is ignored
.
The form length is set to the number of lines defined by the quotient of n and the current line spacing so that the units are in inches.
Form length can also be set from the control panel menu.
Format
<SFCC> L I N E S ; <n> Decimal: <SFCC> 76 73 78 69 83 59 <n>
Hex : <SFCC> 4C 49 4E 45 53 3B <nH> BASIC: CHR$(<SFCC>);”LINES;<n>”;
n = 1 to 192 to specify the number of lines per page at the current
spacing.
Indeterminate Conditions
If a VFU is enabled and loaded, this command is ignored.
GEK-00029B 5000 Series Programmer’s Manual
93
Page 94
Set Line Spacing (1/6 Inch)
Sets line spacing to 6 lpi or as set by SFCC A.
Formats <SFCC> L P I ; n or <SFCC> A n followed by
<SFCC> 2
Details
Using the SFCC LPI ; n command, the value of n can be 6 or 8 only. If n = 6, this command sets line spacing to 1/6 inch. Values of n other than 6 or 8 are ignored.
The SFCC command stores a line spacing value in 1/72 inch to be activated by the SFCC 2 sequence. The default value for this stored value is 6 LPI (12/72).
SFCC 2 asserts n/72-inch line spacing as set by SFCC A. If no distance has been set by SFCC A, the distance is 1/6 inch.
Decimal: <SFCC> 76 80 73 59 <n> or
<SFCC> 65 <n> followed by <SFCC> 2
Hex: <SFCC> 4C 50 49 59 <nH> or
<SFCC> 41 <nH> followed by <SFCC> 2
BASIC: CHR$(<SFCC>);”LPI;<n>”; or
CHR$(<SFCC>);”A<n>”; followed by CHR$(<SFCC>);”2”;
Chapter 4. Printronix P Series Emulation GEK-00029B
94
Page 95
Set Line Spacing (1/8 Inch)
There are two formats for this command.
The SFCC 0 command specifies continuous line spacing at 1/8-inch increments (8 lpi).
In the SFCC LPI ; n command, the value of n can be 6 or 8 only. If n = 8, this command sets line spacing to 1/8 inch. Values of n other than 6 or 8 are ignored.
Formats
<SFCC> 0 or <SFCC> L P I ; <n>
Decimal: <SFCC> 0 or
<SFCC> 76 80 73 59 <n>
Hex: <SFCC> 30 or
<SFCC> 4C 50 49 3B <nH>
BASIC: CHR$(<SFCC>);”0”; or
CHR$(<SFCC>);”LPI;<n>”;
Details
When the 1/8-inch line spacing control code is received, all lines print at 8 lpi until a new line spacing is selected or power is reset. The control code line spacing selection overrides the control panel line spacing setting.
Single Line Spacing
Selects line spacing of 8 or 10.3 lpi for the current line only.
Formats
<ACK> or <SFCC> f
Decimal: 6 or
<SFCC> 102
Hex: 06 or
<SFCC> 66
BASIC: CHR$(6); or
CHR$(<SFCC>);CHR$(6);
Details
The default line spacing is reselected automatically after the current line terminates.
If the alternate line spacing selected from the control panel is 8 lpi, the ACK control code sets the line spacing to 8 lpi. If 10.3 lpi was selected from the control panel, the ACK control code sets the line spacing to 10.3 lpi (7/72 inch).
GEK-00029B 5000 Series Programmer’s Manual
95
Page 96
Set Line Spacing 7/72 Inch
Specifies the line spacing at 7/72-inch (10.3 lpi) increments.
Format
<SFCC> 1 Decimal: <SFCC> 1
Hex: <SFCC> 31 BASIC: CHR$(<SFCC>);”1”;
Details
When the 7/72-inch line spacing control code is received, all lines print at the 7/72-inch line spacing until a new line spacing is selected or power is reset.
Indeterminate Conditions
Overlapping lines may occur when combining this control code with other print attributes such as Elongated (Double High), Superscript, or Subscript;
Set Line Spacing n/72 Inch
Stores a line spacing of n/72-inch increments.
Format
<SFCC> A <n> followed by <SFCC> 2
Decimal: <SFCC> 65 <n> followed by
<SFCC> 2
Hex: <SFCC> 41 <nH> followed by
<SFCC> 2
BASIC: CHR$(<SFCC>);”A<n>”; followed by
CHR$(<SFCC>);”2”;
n = 1 to 24 (all others are ignored)
Details
When the SFCC A control sequence is received, all line feed commands following an SFCC 2 sequences are at n/72-inch line spacing until a new line spacing is selected or power is reset.
The SFCC 2 sequence asserts the line spacing that was stored by the preceding SFCC A sequence.
Indeterminate Conditions
Small values of n may result in overlapping lines. Overlapping lines may also occur if print attributes such as Elongated (Double High), Superscript, or Subscript characters are used on the same line. Printing at different horizontal and vertical densities will not overlap.
Chapter 4. Printronix P Series Emulation GEK-00029B
96
Page 97
Set Line Spacing n/216 Inch
Specifies the line spacing at n/216 inch increments.
Format
<SFCC> 3 <n> Decimal: <SFCC> 3 <n>
Hex: <SFCC> 33 <nH> BASIC: CHR$(<SFCC>);”3<n>”
n = 1 to 255 When the n/216 inch line spacing control code is received, all line
feeds following are at n/216 inch line spacing until a new line spacing is selected or power is reset.
The vertical character position moves only in multiples of the current dot row spacing. If the distance to move is other than a multiple of the current dot row spacing, the remainder is added to the next paper motion command.
Indeterminate Conditions
Caution should be used when combining this control code with other print attributes such as Elongated (Double High), Superscript, or Subscript; overlapping lines may occur.
Vertical Tab Vertical Tab <VT>:
Prints the data in the buffer and
advances the paper to the next vertical tab position.
Format
<VT> Decimal: 11
Hex: 0B BASIC: CHR$(11);
Details
If a vertical tab format is defined in the EVFU (channel 12) and the VFU is enabled, the paper is moved to the next vertical tab position. If a vertical tab format is not defined, the paper is advanced to the next line at the current line spacing.
GEK-00029B 5000 Series Programmer’s Manual
97
Page 98
PLOT MODE GRAPHICS OPERATIONAL DESCRIPTION
Plot Density
Plot density refers to the number of dots per inch (dpi) printed in a single dot row. Two types of plot density are available in this emulation:
▪ Normal density plot mode
▪ Double density plot mode
Normal Density Plot Mode
▪ Selected using the
“SFCC e” control sequence.
▪ The odd-numbered dot columns (120 DPI grid) are addressed to
produce a horizontal density of 60 DPI.
Double Density Plot Mode
▪ Selected using the
“<SFCC> d” control sequence. The even dot mode must be used in conjunction with the odd dot plot control code ENQ (05 hex) or “<SFCC> e” sequence.
▪ The even dots are sent first, followed by the odd dots, allowing a
maximum of 1632 dots in a single dot row at 120 dpi (13.6 inch line).
▪ The vertical density remains the same as in normal density
plotting.
Plot Mode Format
▪ Each data byte specifies six possible dot columns.
▪ Using odd dot plot, bits 1 to 6 of the data byte address the odd-
numbered dot columns; using even dot plot, bits 1 to 6 of the data byte address the even-numbered dot columns.
odd
dot plot control code ENQ (05 hex) or the
even
dot plot control code EOT (04 hex), or the
▪ Bit 6 and/or bit 7 of the data byte must be a 1 (true) bit in the
Plot mode.
▪ Bit 8 of the data byte is ignored in Plot Mode; it can be either 1 or
0.
▪ The binary equivalent of the plot data bytes must be known in
order to accurately address specific dot positions.
Chapter 4. Printronix P Series Emulation GEK-00029B
98
Page 99
Plot Data Line Format
1. The plot mode control code: either 05 hex (or “SFCC e”) for normal
density, or 04 hex (or “SFCC d”) combined with 05 hex for double density plotting.
2. The data bytes to be plotted.
3. The line terminator 0A hex or 0C hex. With print width set to 13.6 inches, a plot data line may contain any
number of bytes up to a maximum of 136 for horizontal dot density of 60 dpi or 272 bytes for a horizontal density of 120 dpi.
A plot data line may contain any number of data bytes up to the maximum. If automatic line feed is disabled from the control panel menu, any bytes over the maximum are lost (graphic character will not wrap at the right margin). If the maximum is exceeded and automatic line feed is enabled, a line feed (LF) is forced and the remaining plot data are printed as text on the next line (graphic characters will wrap in this case).
The plot mode command may occur anywhere in the line, but plot speed may decrease if it is not at the beginning of the line.
Normal Density Plot Mode Format
1. Send the plot command code ENQ (05 hex) or the control
sequence “SFCC e”.
2. Send the plot data.
3. End with a line terminator, either a LF (0A hex) or a FF (0C hex).
A CR (if CR = CR + LF has been configured from the control panel menu) may also be used instead of the LF code.
4. A line feed (0A hex) used as the line terminator causes the
contents of the buffer to be plotted and the paper advances a single dot row at the vertical density of the current mode.
5. A form feed (0C) hex used as the line terminator causes the
contents of the buffer to be plotted and the paper to advance to the top of the next form.
GEK-00029B 5000 Series Programmer’s Manual
99
Page 100
Double Density Plot Mode Format
1. Send the even dot plot control code EOT (04 hex) or control sequence “SFCC d”, followed by a line of data.
2. Send a line terminator, which causes the printer to plot the contents of the buffer. The paper does density plot; the printer now waits for the second line of data.
3. Send the odd dot plot control code ENQ (05 hex) or control sequence “SFCC e” and a second line of data, followed by a line terminator.
▪ A line feed (0A hex) used as the line terminator causes the
contents of the buffer to be plotted and the paper advances a
single dot row,
mode. A CR (if CR = CR + LF is configured) may also be used with the same result.
▪ A form feed (0C) hex used as the line terminator causes the
contents of the buffer to be plotted and the paper to advance to the top of the next form.
not
advance in double
based on the vertical density of the current
Chapter 4. Printronix P Series Emulation GEK-00029B
100
Loading...