Genicom 5000 Programmer's Manual PDF
Genicom 5000 Programmer's Manual PDF
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 V-VALID No noticeable effect on printing will occur. These sequences will not affect the printing mode in progress, but will take effect when normal printing resumes. This sequence will take effect immediately. These control codes are used as data.
AACTIVE DDATA
Notes
Note 1 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).
POSTNET Note 4 Note 4 Note 4 Note 4 Note 4 Note 4 Note 4 A Note 4 Note 4 Note 4 Note 4
GEK-?????
ANSI Emulation
GEK-99???
BS
CR CSI
Carriage Return (0DH): Line terminator. The print position is reset to the left margin and the paper position is left unchanged. Control Sequence Introducer (9BH): Signals the beginning of an ANSI control sequence. When 8-bit data is used. CSI (9BH) can be substituted for ESC [ (1BH 5BH). Also see ESC.
Device Control 1 (11H): Parallel and Serial Interface: Receipt of a DC1 code with the printer in local mode puts the printer online
DC1
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.
DC3(Device Control 3 13H): Parallel and Serial Interface: Receipt of a DC3 code w Through menu options, a serial interface protocol may be selected that transmits a DC3 code to the host to signal that the printer Is not 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. ESC Escape (1BH): Signals the beginning of an escape sequence. See also CSI, above.
GEK-?????
FF
Form Feed (0CH): Line terminator. The paper is advanced to the next top of form position. If the EVFU is enabled and programmed, paper will advance to the next stop in channel 1. NOTE An option strap from the CCU control panel menu using the SETUP/FORMAT/MODIFY FORMAT/GENPRTOPTS selection can disable This feature.
HT
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 next
line. When printing horizontal dot graphics, the paper is advanced to the next dot row.
NOTE: an option strap from the CCU control panel menu using the SETUP/FORMAT/MODIFY FORMAT/GENPRTOPTS selection can disable This feature. SI SO VT Shift In (0FH): Used to exit a Special Print Mode (GENSPM) when
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: an option strap from the CCU control panel menu using the SETUP/FORMAT/MODIFY FORMAT/GENPRTOPTS selection can disable This feature.
ANSI Emulation
GEK-99???
GEK-?????
Sequence ESC [ p1 t ESC [ p1;pn u ESC [ p1 ; p12 v ESC [ p1 x ESC [ p1; ...;p10 } ESC [ p1 SP } OSC or ESC ] ESC ] 5 ESC ] 9 ESC ] ! ESC \ ESC [ p1 ` ESC [ p1 | OSC 9 ; p1 ; ... ; p8-pn ST
Meaning Selects bar codes p1=3, quit bar code p1=0 GENHTS: Sets horizontal tabs (p1, etc.) in decipoints or columns GENVTS: Sets vertical tabs (p1, etc.) in decipoints or lines GENSNC: Selects international character sets Selects barcode parameters GENDFC: Download Font Control: checks printer for downloaded font Operating System Command: introduces sequence Not implemented. Sequence ignored. Not implemented. Sequence ignored. Begins 12-channel EVFU table loading ST: String Terminator. Exits special modes HPA: Horizontal Position Absolute Character Map Load
Page 36 20 20 11 25 8
32 8 17 12
ANSI Emulation
GEK-99???
GEK-?????
Housekeeping Sequences
ESC [ ESC ] CSI (Control Sequence Introducer): This sequence is used to begin sequences, which generally have multiple parameters. OSC (Operating System Command): This is another special sequence introducer. Sequences which begin with OSC require the ST string terminator sequence (ESC \) to end them. ST (String Terminator): Used to terminate the loading of EVFU tables. download fonts, and dot graphics strings. 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 Character Size Character Pitch Country Selection Code Page Line Spacing Partial Line Up Partial Line Down Bold Print Underline Mode Expanded Mode Proportional Mode Horizontal Tab Table Left Margin Right Margin Form Number Page Size Top Margin Bottom Margin Forms Position Vertical Tab Table Vertical Format Unit Graphics Density VFU Load In Progress Bar Code Mode Dot Graphics Gothic Draft 1X Vertical. 1X Horizontal 10 CPI USA 457 6 LPI Reset Reset Inactive Inactive Inactive Reset Empty None - Column 0 None - Maximum 7 7920 decipoints/ 66 lines/11 inches None None Top of form - current position Empty Default 60 H DPI, 72 V DPI, horizontal format Exit (nothing saved) Inactive Inactive
ESC \ ESC c
27 99: 1B 63 CHR$(27);"c";
ANSI Emulation
GEK-99???
ESC Q
GENTST (Self-Test): This sequence is ignored. Decimal: Hex: BASIC: 27 102 or 120 1B 5C or 9C CHR$(27);"\";
GEK-?????
CSI p1 p2 SP ~
GENEMU (Emulation Control): This sequence will switch the 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. 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: 0 1 p1 0 10 1-19 20 21 22 23 24 30 40 41 Hold values (default). All possible values for printer control (tabs, margins, page length, etc.) are to be retained. Full reset. Reset parameters to initial state. Manufacturer GENICOM GENICOM GENICOM IBM IBM Epson IBM Epson Data Products Printronix Printronix Emulation ANSI 4410 ANSI Reserved Graphics Printer Proprinter XL 9-wire FX286-e Proprinter XL 24-wire LQ2500 ANSI P300 P5008
p2
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: Decimal: Hex: BASIC: CSI p1 p2 SP ~ 27 101 p1 p2 32 126 1B 5B p1H p2H 20 7E CHR$(27);"p1p2 ~";
ANSI Emulation
10
GEK-99???
GEK-?????
11
Country Map or Character Set 8859-2 Latin Alphabet #2 8859-3 Latin Alphabet #3 8859-4 Latin Alphabet #4 8859-5 Latin/Cyrillic 8859-6 Latin/Arabic 8859-7 Latin/Greek 8859-8 Latin/Hebrew 8859-9 Latin Alphabet #5
p2
p3
ANSI Emulation
12
GEK-99???
p4 p5 p6
Reserved. This parameter is marked by inserting a semi-colon (;) in the command sequence. Reserved. This parameter is marked by inserting a semi-colon (;) in the command sequence. 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. 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.
p7
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-?????
13
available character for the currently selected font are valid for this element. Reserved. A semi-colon (;) is required to mark this element position. A zero is permitted.
ANSI Emulation
14
GEK-99???
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: Hex: BASIC: 27 76 1B 4C CHR$(27);"L";
NOTE
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 Manual. ESC [ p1 a HPR (Horizontal Position Relative): Line terminator. Moves the 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: Hex: BASIC: 27 91 p1 97 1B 5B p1 61 CHR$(27);"[p1a";
GEK-?????
15
ESC [ p1 d
VPA (Vertical Position Absolute): Line terminator. Sets the vertical 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: Hex: BASIC: 27 91 p1 100 1B 5B p1H 64 CHR$(27);"[;CHR$(p1);d";
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 Missing or 0 - 4 5-9 10-14 15-19 17,280 or greater Decimal: Hex: BASIC: Movement In Inches No Movement 1/144 inch 2/144 inch 3/144 inch 24 inches
27 91 p1 95 1B 5B plH 65 CHR$(27);"[;CHR$(p1);e";
ESC [ p1 ; p2 f
HVP (Horizontal and Vertical Position): Line terminator. Sets the 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: Hex: BASIC: 27 91 p1 52 96 1B 5B p1H 3B p2 66 CHR$(27);[;CHR$(p1);;;CHR$(p2);f";
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: Hex: BASIC: 27 91 p1 106 1B 5B p1H 6A CHR$(27);"[;CHR$(p1);j";
ANSI Emulation
16
GEK-99???
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 would exceed the margin. A VPB with a p1 value of 5 decipoints or less is ignored. Decimal: Hex: BASIC: 27 91 p1 107 1B 5B p1H 6B CHR$(27);"[p1k";
ESC [ p1
HPA (Horizontal Position Absolute): Line terminator. Moves the 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 9,504 is ignored. Decimal: Hex: BASIC: 27 91 p1 96 1B 5B p1 60 CHR$(27);"[p1'";
GEK-?????
17
VTS (Vertical Tab Set): Sets a tab at the current paper 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: Hex: BASIC: 27 74 1B 4A CHR$(27);"J";
ESC [ p1 g
TBC (Tab Clear): Clears horizontal or vertical tab stops based on the p1 value as follows: p1 p1 p1 p1 = = = = 0 1 3 4 Clear Clear Clear Clear horizontal tab at current print position. vertical tab at current paper position. all horizontal tabs. all vertical tabs.
More than one parameter can be used. Example: To clear all horizontal and vertical tabs, send: ESC [ 3 ; 4 g Decimal: Hex: BASIC: ESC [ p1; p2 ; p3 r 27 101 p1 103 1B 5B p1 67 CHR$(27);"[p1;"g";
GENFD (Forms Definition): Establishes the form length (p1), the 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 - top of page to last printable line. Decimal: Hex: BASIC: 27 91 p1 p2 p3 r 1B
ANSI Emulation
18
GEK-99???
Sequence ESC [r ESC [8280r ESC [;720r ESC [;;7200r ESC [7920:360:7560r Decimal: Hex: BASIC: ESC [ p1; p2 s
Explanation Default values of 11-inch form length, zero top and bottom margins. 11.5-inch form length, default top and bottom margins of zero Default length of 11 inches, top margin of I inch. Default bottom margin of zero. Default length of 11 inches, default top margin of zero, and a 1-inch bottom margin. 11-inch form length, -inch top and bottom margins
GENSLR (Set Left/Right Margins): The p parameters are distances 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 will set the left margin to zero (column 1) and the right margin to 9,504 decipoints (column 132 at 10 cpi for the 13.2-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: Hex: BASIC: 27 91 p1 p2 115 1B 5B p1H p2H 73 CHR$(27);"[";CHR$(p1);CHR$(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.
GEK-?????
19
ESC [ p1 ; p ...; u
GENHTS (Multiple Horizontal Tab Set): Sets up to 22 horizontal 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;20u (tabs can be specified in any order). Decimal: Hex: BASIC: 27 101 p1 59 p2 59 p22 59 117 1B 5B p1 3B p2 3B ... 3B p22 3B 75 CHR$(27);"[p1;p2;p . . . ;u"
ESC [ p1 ; ; p12 ; v GENVTS (Multiple Vertical Tab Set): Sets up to 12 vertical tabs. 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: Hex: BASIC: 27 101 p1 59 p2 59 p12 59 118 1B 5B p1 3B p2 3B p12 3B 76 CHR$(27);[p1;p2;...p12;v";
ANSI Emulation
20
GEK-99???
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 moves (line feed). The top or bottom of oversize characters can be used depending on the state of menu option GENPRTOPTS/Group 2, Strap 13. When this sequence is received with a value of 200 or more, expanded printing will start, providing the printer is in the text mode (not bar codes. oversize, etc. Examples: ESC [;200 B ESC [200;200 B ESC [800;400 B X1 Vertical X2 Vertical X8 Vertical X2 Horizontal X2 Horizontal X4 Horizontal
During vertically expanded printing, blank lines (lines with no printed characters) are not expanded from the current lpi setting. Decimal: Hex: BASIC: 27 101 p1 59 p2 32 66 1B 5B p1 3B p2 20 42 CHR$(27);"[p1;p2 B";
GEK-?????
21
ESC [ p1 ; p2 SP G
SPI (Spacing Increment): This sequence is used to set line spacing (p1) and character spacing or pitch (p2). If the parameter is missing or zero, the spacing will remain 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 p1 LPI (decipoints) 3 240 4 180 6 120 8 90 CPI Spacing p2 CPI (decipoints) 10 72 12 60 13.3 54 15 42 16.7 36
27 91 p1 59 p2 32 71 1B 5B p1 3B p2 20 47 CHR$(27);"[p1;p2 G";
SGR (Select Graphic Rendition): Font style and enhancements (bold and underline) are selected with this sequence. 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 0 1 4 5 21 22 24 25 26 Parameter 10 11 12 13 14 15 16 17 18 19 Enhancement Cancel all print enhancements Bold (enhancement) Underline (enhancement) Double Wide Underline Cancel Bold Cancel Underline Cancel Expanded Cancel Proportional Font Default Font - Data Processing Gothic Draft Font Character Graphics Gothic NLQ Font Courier NLQ Font High Speed Draft Font OCR-A OCR-B Italic NLQ Font or Download A* Correspondence or Download B*
*A download font (if loaded) overrides any other font. See Character Map Load on page 12.
ANSI Emulation
22
GEK-99???
ESC [ p1 ; p ... m
(continued) Examples: For Gothic NLQ font underlined send: ESC [4;13m To cancel underlining and retain Gothic NLQ - send one of the following: ESC [;13m Decimal: Hex: BASIC: ESC [0;13m ESC [0m ESC [24m
GEK-?????
23
SM (Set Mode): Sets the mode or modes specified by the parameters listed below. Parameters preceded by the 'greater than' sign are privately defined modes and should be sent separately. Parameter Number 20 Mode Mnemonic LNM Mode Function 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 move. The following parameters are privately defined modes. Parameter Number >1 >2 >5 Mode Mnemonic GENPRM GENC1C GENCS2 Mode Function Proportional Print Mode C1 Control Code Mode Character Set 2 Mode
GENPRM (Proportional Print Mode): This 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 G, tables 5 and 6). 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 E 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 G, tables 5 and 6). EXAMPLE: To print proportional, send ESC [>1h. Decimal: Hex: BASIC: ESC [ p1 ... pn 1 ESC ] 5 27 101 62 53 104 1B 5B 3E 35 68 CHR$(27);"[p1h";
or
CHR$(27);"[>p1h";
RM (Reset Mode): Resets any modes turned on by the Set Mode command above. Parameters and syntax are the same. BFL (Begin Font Load): This sequence will not be honored if 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: Hex: BASIC: 27 93 53 1B 5D 35 CHR$(27);"]5";
ANSI Emulation
24
GEK-99???
ESC [ p1 SP }
GENDFC (Download Font Control): Using the serial interface, this 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: Hex: BASIC: 27 101 p1 32 125 1B 5B p1 20 7D CHR$(27);"[p1 }";
GEK-?????
25
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) will be shown as an X and a binary 0 (empty dot position) will be shown as a 0.
Six-Bit Graphics
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 (?) 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 the following: Horizontal Graphics 0X0X0X Vertical Graphics 0 X 0 X 0 X
Notice that in horizontal graphics that the character is printed on a single horizontal dot row. In vertical graphics, the character Is printed six dots high, a 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.
ANSI Emulation
26
GEK-99???
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 @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ Value 40H 41H 42H 43H 44H 45H 46H 47H 48H 49H 4AH 4BH 4CH 4DH 4EH 4FH 50H 51H 52H 53H 54H 55H 56H 57H 58H 59H 5AH 5BH 5CH 5DH 5EH 5FH Dots 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 Character a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ ? Value 60H 61H 62H 63H 64H 65H 66H 67H 68H 69H 6AH 6BH 6CH 6DH 6EH 6FH 70H 71H 72H 73H 74H 75H 76H 77H 78H 79H 7AH 7BH 7CH 7DH 7EH 7FH Dots 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:
GEK-?????
27
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 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 2 3 . . 6 Byte 1 1 1 1 . . 1 2 2 2 . . 2 3 3 3 . . 3 4 4 4 . . 4 5 5 5 . . 5 6 6 6 . . 6 1 1 1 . . 1 Byte 2 2 2 2 . . 2 3 3 3 . . 3 4 4 4 . . 4 5 5 5 . . 5 6 6 6 . . 6 1 1 1 . . 1 Byte n 2 2 2 . . 2 3 3 3 . . 3 4 4 4 . . 4 5 5 5 . . 5 6 6 6 . . 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 1 2 3 4 5 6 1 bit 1 2 3 4 5 6 2 bit 1 2 3 4 5 6 3 bit 1 2 3 4 5 6 n bit 1 2 3 4 5 6
ANSI Emulation
28
GEK-99???
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 1 2 3 4 5 6 7 8 1 bit 1 2 3 4 5 6 7 8 2 bit 1 2 3 4 5 6 7 8 3 bit 1 2 3 4 5 6 7 8 n bit 1 2 3 4 5 6 ...7 ...8
GEK-?????
29
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> ESC " 2 n1 <data bytes> ESC " 3 n1 <data bytes> 60 dpi horizontal 120 dpi horizontal 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: Hex: BASIC: ESC [ p1 b 27 101 80 1B 5B 50 CHR$(27);"P";
REP (Repeat text or dot graphics character): Repeats the single preceding character p1 times. If p1 is 0 or unspecified, it is set to 1. The maximum value for p1 is 32,767. Decimal: Hex: BASIC: 27 101 p1 98 1B 5B p1H 62 CHR$(27);"[p1b";
ANSI Emulation
30
GEK-99???
ESC [ p1 ; p2 ; p3 q GENGRM: Selects the 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 null 0 1 2 3 4 5 6+ Selects Graphics Format Reserved: Vertical format 60h x 72v if no p2 or p3 Reserved: Vertical format 60h x 72v if no p2 or p3 Reserved: Vertical format 120h x 72v if no p2 or p3 Reserved: Vertical format 120h x 144v if no p2 or p3 Reserved: Sequence ignored Horizontal format 60h x 72v if no p2 or p3 Similar to 4, above, if p3 = 5, 6, or 7, else ignore Reserved: Sequence ignored
Note: p2 and p3 are ignored in this mode. p2 null 0-6 7+ p3 null 0-3 4 5 6-7 8-10 11+ Decimal: Hex: BASIC: Selects Vertical Density 72dpiv (p1=4 only) 144dpiv 72dpiv
Selects Horizontal Density 60dpih (p1=4 only) Reserved: Leave current value unchanged Reserved: Leave current value unchanged Reserved: 120dpih 120dpih Reserved: 60dpih 60dpih 27 91 p1 p2 p3 112 1B 5B p1H p2H p3H 70 CHR$(27);"[plp2p3q";
GEK-?????
31
ESC ] !
Starts EVFU table loading sequence. Each line of the form requires 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: Hex: BASIC: 27 93 33 1B 5D 21 CHR$(27);"]!";
y: x:
ANSI Emulation
32
GEK-99???
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.
31 filler lines
Selects channel 5. See Table of Channel Codes 8 filler lines Selects channel 8. See Table of Channel Codes Exit EVFU loading.
GEK-?????
33
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 It 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 1 2 3 4 5 6 7 8 9 10 11 12
DESCRIPTION Top Margin (first line Bottom Margin (last line) Single Spacing Double Spacing Triple Spacing Half Form Quarter Form Tenth Line Bottom of Form (bottom margin) Bottom of Form minus 1 line Top of Form minus 1 line (last line this form Top of Form
ANSI Emulation
34
GEK-99???
NOTE Establish Top of Form locally before printing out forms. When executing the program, paper will slew to the top of the next form before beginning to print.
GEK-?????
35
BARCODES
Thirteen different styles of barcodes 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 barcode symbol size and density are also adjustable. NOTE 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.
ANSI Emulation
36
GEK-99???
SI LPRINT CHR$15); Deactivates barcodes and allows printing of normal text. ESC[0t LPRINT CHR$(27);"[0t"; Deselects barcodes. When an ESC[0t is received before the SI code, barcodes are both deactivated and deselected.
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-?????
37
Barcode 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 Barcode 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: Range: p5* 2 (2/120 inch, approximately .017 inch) 2, 4, 6, . . . 126
Wide bar width, number x 1/120 inch Default: Range: 6 (6/120 inch, approximately . 050 inch) 2, 4, 6, . . . 254
p6
Narrow space width, number x 1/120 inch Default: Range: 2 (2/120 inch, approximately . 017 inch) 2. 4, 6, . . .126
p7*
Wide space width, number x 1/120 inch Default: Range: 6 (6/120 Inch. approximately .050 inch) 2, 4, 6, . . . 254
p8*
Intercharacter space width, number x: 1/120 inch Default: Range: 2 (2/120 inch, approximately . 017 inch) 2, 4, 6 . . . 126
* Parameters p5, p7, and p8 are not programmable in some barcode styles since they are generated from other parameters.
ANSI Emulation
38
GEK-99???
p9
Barcode rotation and human-readable line (HRL) font style (if used).
0 1 2 3 4 No rotation - use currently selected font style, cpi, and lpi. This is the default setting. No rotation - use special HRL font. 90-degree rotation use special HRL font 180-degree rotation use special FIRL font. 270-degree rotation use special HRL font.
p 10
Default for barcode styles 5, 6, 13, and 14 is 120 dpi. Default for all other styles is 60 dpi.
Barcodes printed at 90 or 270 degrees rotation will print at the same speed (120 x 144) regardless of the selected horizontal density. A missing parameter will leave the corresponding value unchanged.
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 reset using the initialization switch.
A zero parameter value for p2p8 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 barcode.
If no changes are made to the parameters of the barcode, the printer will use the following factory-set values.
GEK-?????
39
ANSI Emulation
40
GEK-99???
GEK-?????
41
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 10 LPRINT CHR$(27); "[3t"; 20 LPRINT "1a34567890"; 30 LPRINT CHR$(27); "[0t"
ANSI Emulation
42
GEK-99???
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 - change style to Code 128, change height to 1/4" (3/12"). and use the special HRL font. 10 20 30 40 LPRINT LPRINT LPRINT LPRINT CHR$(27); CHR$(27); "[3t"; "1234567890"; 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 "1234567890"; 30 LPRINT CHR$27); "[0t"
GEK-?????
43
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 20 30 40 50 60 70 80 LPRINT LPRINT LPRINT LPRINT LPRINT LPRINT LPRINT LPRINT CHR$27); "[1440;2880;u"; CHR$27); "[3t"; "1234"; CHR$(9); "5678"; CHR$(9); "9012"; 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 20 30 40 50 60 70 80 LPRINT LPRINT LPRINT LPRINT LPRINT LPRINT LPRINT LPRINT CHR$(27); "[3g"; CHR$(27); "[3t"; "1234"; CHR$(9); "5678"; CHR$(9); "9012"; CHR$(27); "[0t"
ANSI Emulation
44
GEK-99???
code occupies. The semicolon in BASIC Is used to suppress a LF/CR after an LPRINT statement. IMPORTANT Strap 13 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.
EXAMPLE 2: Strap 13 IN
10 20 30 40 LPRINT LPRINT LPRINT LPRINT CHR$(27); "[3t"; "1234567890"; CHR$(27); "[0t"; "STRAP 13 IN"
GEK-?????
45
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 to print or inhibit the printing of the HRL (p3).
ANSI Emulation
46
GEK-99???
GEK-?????
47
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 "A10 OUT" is the ending quiet zone. 10 20 30 40 50 60 70 80 LPRINT LPRINT LPRINT LPRINT LPRINT LPRINT LPRINT LPRINT CHR$(27); "[1080;2160;u"; CHR$(27); "[3t"; "12345"; CHR$(9); "12345"; CHR$(9); "12345"; CHR$(27); "[0t";
ANSI Emulation
48
GEK-99???
LPRINT CHR$(27);"[0|"; or 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).
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
GEK-?????
49
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: Decimal: Hex: BASIC: ESC [ p1; p2 B 27 91 p1 59 p2 66 1B 5B p1H 3B p2 42 CHR$(27);"[";p1;";";p2;"B";
ANSI Emulation
50
GEK-99???
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 20 30 40 50 60 LPRINT LPRINT LPRINT LPRINT LPRINT LPRINT CHR$(27); CHR$(27); "ABCabc" CHR$(27); CHR$(27); "1234" "[300;300 B"; "El:"; "CO:"; "[100;100 B"
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.
GEK-?????
51
ANSI Emulation
52
GEK-99???
GEK-?????
53