Genicom 5000 schematic

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.
-IGNORED No noticeable effect on printing will occur.
V
-VALID These sequences will not affect the printing mode in progress, but resumes.
A
–ACTIVE This sequence will take effect immediately.
D
–DATA These control codes are used as data.

Notes

will
take effect when normal printing
Note 1
Note 2
Note 3
Note 4

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
HT No 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 Normal
If printer option 1 is active, either in ANSI (4800) or ANSI (4410) emulation, SO and SI will activate or deactivate this printing mode. SO and ST are VALID in bar codes and oversize-ACTIVE in expanded. Please see Appendix G, Description of Strapping options, tables 5 and 6 on page
Error! Bookmark not defined.
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.
Will cause an error symbol to print (XOX).
Control Code Activity Levels
Dot
Graphics
Bar Codes Oversize POSTNET
GEK-????? 5000 Series Programmer’s Manual
1

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 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
Line
Terminator
No A
Normal
Dot
Graphics
AIAI
Bar
Codes
Oversize POSTNET
ANSI Emulation GEK-99???
2

CONTROL CODE DEFINITIONS

w
BEL Bell (07H):
Receipt of a BEL code causes the beeper to sound for 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 at the current CPI. If the print position is at the left margin no action is taken.
CR Carriage Return (0DH):
Line terminator. The paper position remains
Line terminator. The print position is reset to the
left margin and the paper position is left unchanged.
CSI Control Sequence Introducer (9BH):
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
Parallel and Serial Interface: Receipt of a
(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.
NOTE
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.
Signals the beginning of an ANSI
DC3(Device Control 3 – 13H):
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.
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.
ESC Escape (1BH):
CSI, above.
Parallel and Serial Interface: Receipt of a DC3 code
selected that
NOTE
Signals the beginning of an escape sequence. See also
GEK-????? 5000 Series Programmer’s Manual
3
FF Form Feed (0CH):
top of form position. If 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 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.
NOTE:
SETUP/FORMAT/MODIFY FORMAT/GENPRTOPTS selection can disable This feature.
SI Shift In (0FH):
an option strap from the CCU control panel menu using the
Used to exit a Special Print Mode (GENSPM) when
printer control strap A9 (Appendix G) is set.
SO Shift Out (0EH):
Used to enable a special, print mode (GENSPM)
when ANSI emulation strap 1 is reset.
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.
NOTE:
SETUP/FORMAT/MODIFY FORMAT/GENPRTOPTS selection can disable This feature.
an option strap from the CCU control panel menu using the
Advances the print position to the next
next
the
ANSI Emulation GEK-99???
4

ESCAPE SEQUENCE DIRECTORY

Sequence Meaning Page
CSI or ESC [ Control Sequence Introducer 8
CSI p1 p2 SP ~ GENEMU: Select emulation 10
ESC [p1 ; p2 SP B GSM: Modifies vertical (p1) and horizontal (p2)
character size
ESC [p1 ; p2 SP G SPI: Sets LPI (p1) and/or CPI (p2) in decipoints 22
ESC H HTS: Set a tab at current print position 20
ESC J VTS: Set a tab at current paper position 18
ESC K PLD: Moves print line down 3/72 inch (subscript) 15
ESC L PLU: Moves print line up 3/72 inch (superscript) 32
ESC P DCS: Introduces dot graphics 30
ESC Q Self-Test: Inactive. Sequence ignored.
ESC [ p1 a HPR: Moves print position right p1 distance (relative) 15
ESC [p1 b REP: Dot graphics: repeat preceding character p1
times
ESC c RIS: Resets printer to a known initial state 24
ESC [ p1 d VPA: Sets vertical position to p1 decipoints or lines 16
ESC [ pl e VPR: Moves paper forward p1 decipoints 16
ESC [ p1; p2 f HVP: Moves paper and print position (absolute) 16
ESC [ p1 g TBC: Clears tabs: p1=3 for horizontal 18
21
30
ESC [ p1 ; p... h SM: Set mode (PUM, LNM, proportional. character
mapping)
ESC [ p1 j HPB: Moves print position left by decipoints or
columns
ESC [ p1 k VPB: Moves paper backward by decipoints or lines 17
ESC [ p1 ;p ... l RM: Reset mode (PUM, LNM, proportional, character
mapping)
ESC [ p1;p ... m SGR: Selects font styles and enhancements 22
ESC [ p1 p2 ! p GENVF2: EVFU vertical paper movement command 34
ESC [ p1 ; p2 SP n
ESC [ p1 ; p2 ; p3 SP q GENGRM: Selects graphics horizontal and vertical dot
densities
ESC [ p1; p2 ; p3 r GENFD: Sets form length (pl), margins - top (p2),
bottom (p3)
ESC [ p1; p2 s GENSLR: Sets margins. Left (p1), right (p2) in
decipoints
GEK-????? 5000 Series Programmer’s Manual
5
24
16
22
31
18
19
Sequence Meaning Page
ESC [ p1 t Selects bar codes p1=3, quit bar code p1=0 36
ESC [ p1;pn u GENHTS: Sets horizontal tabs (p1, etc.) in decipoints
20
or columns
ESC [ p1 ; p12 v GENVTS: Sets vertical tabs (p1, etc.) in decipoints or
20
lines
ESC [ p1 x GENSNC: Selects international character sets 11
ESC [ p1; ...;p10 } Selects barcode parameters
ESC [ p1 SP } GENDFC: Download Font Control: checks printer for
25
downloaded font
OSC or ESC ] Operating System Command: introduces sequence 8
ESC ] 5 Not implemented. Sequence ignored.
ESC ] 9 Not implemented. Sequence ignored.
ESC ] ! Begins 12-channel EVFU table loading 32
ESC \ ST: String Terminator. Exits special modes 8
ESC [ p1 ` HPA: Horizontal Position Absolute 17
ESC [ p1 |
OSC 9 ; p1 ; ... ; p8-pn
Character Map Load 12
ST
ANSI Emulation GEK-99???
6

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
GEK-????? 5000 Series Programmer’s Manual
7

Housekeeping Sequences

ESC [ CSI (Control Sequence Introducer):
sequences, which 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):
Used to terminate 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 G, tables 5 and 6, 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 457 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";
ANSI Emulation GEK-99???
8
ESC Q GENTST (Self-Test):
Decimal: 27 102 or 120 Hex: 1B 5C or 9C BASIC: CHR$(27);"\";
This sequence is ignored.
GEK-????? 5000 Series Programmer’s Manual
9
CSI p1 p2 SP ~ GENEMU (Emulation Control):
for the printer to another emulation. The parameters in the sequence are defined as follows:
p1 Emulation identifier. This parameter will select the particular
emulation by a reference number as supplied by GENICOM engineering. The assigned numbers may be found in the table below.
p2 Reset control. The parameters of the printer to be reset or
defaulted are controlled by this parameter. It will not always be possible to meet the strict definition of this parameter, so each printer will have a definition of how the reset control is implemented. The values as currently defined are:
This sequence will switch the control
0
Hold values (default). All possible values for printer control (tabs, margins, page length, etc.) are to be retained.
1
Full reset. Reset 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
Indeterminate Conditions
If no emulation parameter is supplied, the emulation will remain 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 101 p1 p2 32 126 Hex: 1B 5B p1H p2H 20 7E BASIC: CHR$(27);"p1p2 ~";
ANSI Emulation GEK-99???
10

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
This sequence selects the
GEK-????? 5000 Series Programmer’s Manual
11

Character Map Load

p1 Country Map or Character Set
8592 ISO 8859-2 Latin Alphabet #2 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 will print 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 11), 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 ... ; p8–pn ST
This sequence signals the beginning of a
p1 Control Command
0 1
Store new character map Erase 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.
p2 GENSNC (CSI p1 x) select parameter. Values must be between
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 will be ignored.
p3 Reserved. This parameter is marked by inserting a semi-colon
(;) in the command sequence.
ANSI Emulation GEK-99???
12
p4 Reserved. This parameter is marked by inserting a semi-colon
(;) in the command sequence.
p5 Reserved. This parameter is marked by inserting a semi-colon
(;) in the command sequence.
p6 A literal string indicating the GENSNC select parameter of an
existing character map (such as 437, 850, etc.) 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 is to use an existing map as a base. The string is terminated by a semi-colon (;). The base character map will always default 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 will be used.
p7 A literal string which will be 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 will be used for display purposes.
p8-pn A trio of parameters used to specify the actual character map
substitution. A semi-colon must separate each parameter within the trio, and a semi-colon must terminate each trio. The semi-colon 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 will define whether the map will be for GL (7-bit) or GR (8-bit) substitution. If the first element is between 32 and 126 (inclusive), the map will be 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 will be 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
GEK-????? 5000 Series Programmer’s Manual
13
available character for the currently selected font are valid for this element.
3 Reserved. A semi-colon (;) is required to mark this element
position. A zero is permitted.
ANSI Emulation GEK-99???
14

Paper and Print Position Moves

ESC K PLD (Partial Line Down):
down 3/72 inch for subscript printing. Also used to return 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. The print line is moved 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 native mode, these sequences can be used in succession to advance or reverse the paper to another line. In the 4000 compatibility mode, 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
Line terminator. The print line is moved
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);"[p1a";
Line terminator. Moves the
GEK-????? 5000 Series Programmer’s Manual
15
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 p1H 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 plH 65 BASIC: CHR$(27);"[“;CHR$(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 p1H 3B p2 66 BASIC: CHR$(27);”[“;CHR$(p1);”;”;CHR$(p2);”f";
Line terminator. Sets the
ESC [ p1 j HPB (Horizontal Position Backward):
Line terminator. Moves the 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 p1H 6A BASIC: CHR$(27);"[“;CHR$(p1);”j";
ANSI Emulation GEK-99???
16
Loading...
+ 37 hidden pages