Tally Genicom Matrix Printer User Manual

7265
Programmer's Manual
Matrix printer

Table of Contents

Chapter 1. Introduction............................................................................................................1
Control Code Summary .......................................................................................................3
Control Code Comparison, 7 Bit/8 Bit..................................................................................4
8-bit Control Codes..............................................................................................................4
Escape Sequence Summary ...............................................................................................6
Printer Handshaking............................................................................................................8
Printer Control .....................................................................................................................9
Graphics Rendition (Fonts and Modes) .............................................................................15
NATIONAL CHARACTER SET......................................................................................16
Forms Setup......................................................................................................................20
Superscript/Subscript.........................................................................................................21
Vertical Movement.............................................................................................................22
Margins..............................................................................................................................25
Horizontal Movement.........................................................................................................26
Tabs...................................................................................................................................28
Dot Graphics......................................................................................................................29
Sample Basic Program for Dot Coding ..........................................................................30
Graphics Control Functions............................................................................................31
7265 Programmer’s Manual
Copyright © 2004 TallyGenicom
i
Table of Contents
Chapter 3. ANSI Bar Codes....................................................................................................33
Before You Begin - Set the Form Length.............................................................................34
Setting Bar Code Parameters..............................................................................................35
General Rules for Assigning Parameters.........................................................................36
Bar Code Command Sequences .....................................................................................37
Element Widths................................................................................................................39
Other Parameters.............................................................................................................40
Delimiters.............................................................................................................................42
Horizontal Tab Delimiter...................................................................................................44
Horizontal Position - Relative Delimiter............................................................................45
Calculating Characters per Inch ..........................................................................................47
Bar Code Style Characteristics............................................................................................48
Interleaved 2 of 5 (Style 0)...............................................................................................48
Bidirectional/Industrial 2 of 5 (Styles 1 and 3)..................................................................48
Matrix 2 of 5 (Style 2).......................................................................................................49
Code 3 of 9 (Style 4) ........................................................................................................49
EAN-8 (Style 5)................................................................................................................50
EAN-13 (Style 6)..............................................................................................................50
Code 11 (Style 7).............................................................................................................51
Codabar A/t, B/n, C/*, D/e (9, 10, 11, 12).........................................................................52
UPC-A (Style 13)..............................................................................................................52
UPC-E (Style 14)..............................................................................................................53
Code 93 (Style 15)...........................................................................................................54
Code 128 (Style 16) .........................................................................................................54
MSI (Style 19) ..................................................................................................................55
POSTNET (Style 50)........................................................................................................56
Calculating the Checksum for Code 3 of 9 ..........................................................................58
Calculating the Checksum for CODE 93..............................................................................58
Code 93 Checksums for Full ASCII..................................................................................60
Chapter 4. ANSI Oversized Font.............................................................................................63
Control Function Summary..................................................................................................64
Oversized Control Functions ...............................................................................................64
Oversized Versus Expanded ...............................................................................................66
Setting the Expansion..........................................................................................................66
Device Timeout with Very Large Characters .......................................................................67
What is a Character Cell ?...................................................................................................68
Oversized Character Dimensions – 0 Oversized Character Dimensions - 270
o
...............................................................................69
o
...................................................................................70
Vertical Position-Relative in Oversized................................................................................70
Implementing the Line Feed Function - 0 Line Spacing and Intercharacter Spacing – 270
7265 Programmer’s Manual
Copyright © 2004 TallyGenicom
o
..........................................................................71
o
................................................................72
ii
Table of Figures
Figure 2-1 Default Character Set for ANSI Emulation, 00 to 7F
........................................5
Figure 2-2 Default Character Set for ANSI Emulation, 80 to FF..............................................6
Figure 2-3 National Character Substitutions 0 - 18 ...............................................................17
Figure 2-4 Effects of Character Spacing Parameters............................................................22
Figure 2-5 Dot Column Coding..............................................................................................29
Figure 2-6 Dot Graphics Example ........................................................................................30
Figure 3-1 Parts of a Bar Code ............................................................................................35
Figure 3-2 Effects of Rotation Parameters ............................................................................40
Figure 3-3 Comma, Space, and Asterisk Delimiters..............................................................43
Figure 3-4 Horizontal Tab Delimiter.......................................................................................44
Figure 3-5 Horizontal Position-Relative Delimiter..................................................................45
Figure 3-6 Vertical Bar Code Sumbols.................................................................................46
Figure 4-1 Expanded and Oversized.....................................................................................66
Figure 4-2 Character Cells ....................................................................................................68
Figure 4-3 Vertical Character Dimensions.............................................................................69
Figure 4-4 Sideways Character Dimensions .........................................................................70
7265 Programmer’s Manual
Copyright © 2004 TallyGenicom
iii
Chapter 1.
Introduction
The TallyGenicom 7265 provides rugged, versatile impact printers useful in a variety of
applications. Flexibility of use is guaranteed by the wide range of software emulations and programming options. The current printer characteristics are the result of years of application experience. It is a hallmark of TallyGenicom products that they may be used with a broad
range of systems, hardware, emulations, and protocols.
All trademarks and registered trademarks are property of their respective holders.
CENTRONICS of GENICOM LLC Epson of Epson America, Incorporated DEC of COMPAQ Corporation GENICOM of TallyGenicom LP IBM and Proprinter of International Business Machines Corporation
The information in this manual is believed to be accurate and correct. However, TallyGenicom makes no claim as to its absolute accuracy and reserves the right to make improvements to this document from time to time.
7265 Programmer’s Manual
Copyright © 2004 TallyGenicom Chapter 1 Introduction
1
ANSI
The TallyGenicom im ple m entation of ANSI X3.64 is the native control protocol for the 7265
printer, as it is for a variety of other TallyGenicom impact matrix printer families. The control functions presented here are a superset of ANSI control sets familiar to our customers. For the most part, ANSI drivers written for other TallyGenicom printers should only need to be modified as features introduced on the 7265 Series printers are exercised. Examples of such new features include user-defined formats, alternate paper paths, user-defined character substitutions, and remote selection of emulations.
Enabling the application to select among emulations provides access to some of the 7265 features not supported in emulated products. Toward this end, the printer can be commanded to maintain the current status of fonts, pitches, tabs, margins and so forth across emulation changes. Although some minute differences due to translations from, say, columns to decipoints may be discernible when switching from one emulation to another, the printer is quite predictable when switching from another emulation to ANSI and then back again.
The 7265 is a decipoint machine. Locations and dimensions such as tabs, margins, absolute and relative positions, and form lengths are described in ANSI control sequences in units of 1/720 inch. If you have the choice of describing your page in one or another of the supported emulations, consider that ANSI gives you more flexible control of locations of objects on the page.
In this chapter we include spaces between characters in escape sequences for clarity. ESC H, for instance, is easier to read than is ESCH. Where the space character forms a component of a control sequence, then it is designated by <SP> .
Listed below are the control codes interpreted by this printer, along with page numbers where you can find detailed descriptions.
7265 Programmer’s Manual Copyright © 2004 TallyGenicom
2

Control Code Summary

Code Hex Description
ETX 03 ETX/ACK Communication Protocol ACK 06 ETX/ACK Communication Protocol BEL 07 Sound Beeper
BS 08 Backspace HT 09 Horizontal Tab
LF 0A Line Feed VT 0B Vertical Tab FF 0C Form Feed CR 0D Carriage Return SO 0E Barcode / Oversized On
SI 0F Barcode / Oversized Off
DC1(XON) 11 Printer Ready
DC3(XOFF) 13 Printer Busy
ESC 1B Escape DEL 7F Delete
If 8-bit control code interpretation is enabled ...
IND 84 Index NEL 85 Next Line HTS 88 Set Horizontal Tab VTS 8A Set Vertical Tab PLD 8B Partial Line Down PLU 8C Partial Line Up
RI 8D Reverse Index
DCS 90 Device Control String
PU1 91 Private Use 1
CSI 9B Control String Introducer
ST 9C String Terminator
OSC 9D Straps and Options Introducer
Some of the control codes are interpreted when encountered within a graphics data sequence. Interpretations relative to graphics are shown on page 31.
7265 Programmer’s Manual
Copyright © 2004 TallyGenicom Chapter 2 ANSI
3
ompar ison, 7 Bi t/ 8 Bi t
8 B i t Hex Description 7 Bit Hex
IND 84 Index ESC D 1B 44 NEL 85 Next Line ESC E 1B 45 HTS 88 Set Horizontal Tab ESC H 1B 48 VTS 8A Set Vertical Tab ESC J 1 B 4A PLD 8B Partial Line Down ESC K 1B 4B PLU 8C Partial Line Up ESC L 1B 4C
RI 8D Reverse Index ESC M 1B 4D
DCS 90 Device Control String ESC P 1B 50
PU1 91 Private Use 1 ESC Q 1B 51
CSI 9B Control String Introducer ESC [ 1B 5B
ST 9C String Terminat or ESC \ 1B 5C
OSC 9D Straps and Options Introducer ESC ] 1B 5D

8-bit Control Codes

ANSI assigns control functions to characters 80 hex through 9F hex and calls these characters C1 codes. You can set the printer to either interpret 80 hex - 9F hex as control codes or not. The ISU default status of this option is disabled.
You can toggle the status of the 8-bit control code enable from the Emulations Options Menu or with escape sequences. The pertinent escape sequences are the ANSI private use sequences described on page 12. In 8-bit mode, all of the lower contro l codes and ESC sequences remain active. For example, you can use either PLD or ESC K for subscript printing. In 7-bit mode, only ESC K is available.
If 8-bit control code interpretation is disabled, then the printer processes characters 80 hex through 9F hex according to IBM PC character sets 1 or 2, depending on which is currently selected. The default is character set 1. You can toggle the character set selection from the Emulation Options Menu.
If 8-bit control code interpretation is disabled and character set 1 is active, then the printer strips the most significant bit of characters 80 hex through 9F hex. For example, if you send 8A hex when 8-bit control code interpretation is disabled and character set 1 is active, then the printer treats 8A hex as 0A hex and performs a line feed.
7265 Programmer’s Manual Copyright © 2004 TallyGenicom
4
0 123 456 7 00 NUL@P`p 1 DC1 !1AQaq 2“2BRbr 3 ETX DC3 #3CScs 4$4DTdt 5 ENQ %5EUeu 6 ACK &6FVfv 7 BEL ‘7GWgw 8 BS (8HXhx 9 HT )9IYIy
A LF *:JZjz B VT ESC +;K[k{ C FF ,<L\ l| D CR -=M]m} E SO .>N^n~
F SI /?O_oDEL
Figure 2-1 Default Character Set for ANSI Em ulati on, 00 to 7F
7265 Programmer’s Manual Copyright © 2004 TallyGenicom
5
Code is Hexadecimal, Ordered Column|Row
89ABCDEF 0 DCS á
1 PU1 í
4 IND ñ
5 NEL Ñ
6a
7o
8 HTS ¿
9
A VTS
B PLD CSI
C PLU ST D RI OSC
AB CD
¬ EFG
½ IJK
¼ MN Oæ P
¡ QR Sز
!"#
%& '
()*
,-#
/01
345
789
:;<
>?@
$
±
+
.
2
6
÷
=
º
H
L
E F
« TUVW
» XYZ[
Figure 2-2 Default Character Set for ANSI Emulation, 80 to FF

Escape Sequence Summary

In this chart, the 7-bit representation is given. Use the Comparison Chart on page 4 to convert 7 bit to 8 bit sequences.
Code Description
ESC H Set Horizontal Tab ESC J Set Vertical Tab ESC K Subscript Printing ESC L Superscript Printing ESC P Enter Dot Graphics ESC c Restore to Initial State ESC \ Exit Dot Graphics Modes ESC [(p1);(p2)<SP>B Graphic Size Modification ESC [(p1);(p2)<SP>G Line/Character Spacing
!
7265 Programmer’s Manual Copyright © 2004 TallyGenicom Chapter 2 ANSI
6
Code Description
ESC [(p1);(p2)<SP>~ Select Emulation
ESC [(p)` Horizontal Position Absolute
ESC [(p)a Horizontal Position Relative ESC [(p)d Vertical Position Absolute ESC [(p)e Vertical Position Relative ESC [(p1);(p2)f Vertical and Horizontal Position Absolute ESC [(Ps)g Clear Tabs ESC [(p1);...(pn)h Set Auto CR on LF ESC [>(p1);...(pn)h Set Mode (GENICOM) ESC [(p)j Horizontal Position Backwards ESC [(p)k Vertical Position Backwards ESC [(p1);...(pn)l Reset Auto CR on LF ESC [>(p1);...(pn)l Reset Mode (GENICOM) ESC [(P1);...(Pn)m Fonts and Print Modes (SGR) ESC [(p1)p Select Paper Path ESC [(p1)q Select Graphics Density ESC [(p1);(p2);(p3)r Forms Setup ESC [(p1);(p2)s Sets Left and Right Margins ESC [(p1)t ENA/DIS Oversized/Expanded/Bar Code ESC [(p1);(p2);...(p22)u Set Horizontal Tabs at Certain Positions ESC [(p1);(p2);...(p12)v Set Vertical Tabs at Certain Positions ESC [(p1);(p2);…} Set Bar Code Parameters ESC [(p)x National Character Sets
7265 Programmer’
Copyright © 2004 TallyGenicomenico Chapter 2 ANSI
Manual 7

Pr inter Handshaking

Commands Description
DC1 PRINTER READY
In serial interface, if the printer is strapped for XON/XOFF handshaking, then the printer sends DC1 to the host to signal that the printer is ready to accept data.
In parallel interface, if the printer is strapped for select/ deselect by received DC1/DC3 codes, then the host sends DC1 to the printer to set the printer online.
Dec 17 Hex 11
DC3 PRINTER NOT READY
In serial interface, if the printer is strapped for XON/XOFF handshaking, then the printer sends DC3 to the host to signal that the printer cannot, for the moment, accept any more data.
In parallel interface, if the printer is strapped for select/ deselect by received DC1/DC3 codes, then the host sends DC3 to the printer to set the printer to Standby. In Standby, the printer will accept and acknowledge data from the interface, but will discard all data received.
Dec 19 Hex 13
ETX ETX/ACK COMMUNICATION PROTOCOL
In serial interface, if the printer is strapped for ETX/ACK handshaking, then the host sends the ETX control code at the end of a block of data.
Dec 3 Hex 03
ACK ETX/ACK COMMUNICATION PROTOCOL
In serial interface, if the printer is strapped for ETX/ACK handshaking, then the printer sends an ACK in response to and ETX from the host to indicate that it is ready to receive more data.
Dec 6 Hex 06
7265 Programmer’s Manual Copyright © 2004 TallyGenicom Chapter 2 ANSI
8

Printer Control

Commands Description
SO SHIFT OUT
You can strap the printer to start either barcode (page 37) or oversized (page 64)
mode, whichever is enabled, on receipt of SO. The ISU status of SO/SI control is disabled. You can enable SO/SI control from Software Options on the printed menu,
or from the host via the Straps and Options control sequence. See page 14.
Dec 14 Hex 0E
SI SHIFT IN
If the printer is strapped to turn on barcode or oversized on receipt of SO, then SI
turns barcode (page 37) or oversized (page 64) mode off.
Dec 15 Hex 0F
ESC ESCAPE
Introduces an escape sequence. The printer evaluates characters following the ESC character to determine if the sequence is valid. If the sequence is valid, then the printer responds to the command. If the sequence is not valid, then the printer aborts the process, discarding at least the first character following ESC.
Dec 27 Hex 1B
ESC P (DCS)
ESC [ (CSI)
ESC \ (ST)
ESC ] (OSC)
DEVICE CONTROL STRING The control function introducer for the device control string structure, which is used to
frame graphics. Dec 144 Hex 90
The CSI character is the control function introducer for the ANSI control sequence. Control sequences are multi-character control functions that accept parameters.
Dec 155 Hex 9B
STRING TERMINATOR Terminates the DCS and the OSC sequence. Dec 156 Hex 9C
The OSC character is the introducer for straps and options.
Dec 157 Hex 9D
BEL BEEPER
Dec 7 Hex 07
9
7265 Programmer’s Manual
Copyright © 2004 TallyGenicom Chapter 2 ANSI
Commands Description
DEL DELETE
DEL is a printable character, or is a valid graphics data byte if received
in dot graphics
Dec 127 Hex 7F
ESC [(p1); (p2)<SP>~
SELECT EMULATION If p2 is 0, which is the default, then the current settings in the printer remain in effect
through the emulation change to the extent that selected features are supported in the target emulation. This affects such things as, font selection, character pitch, margins, tabs, and so forth. If p2 is 1, then the status of such parameters reverts to defaults dependent on the selected emulation.
p1 selects
0 GENICOM ANSI 1 Tally ANSI
2-21 Reserved 22 Epson FX286e
mode.
p2 selects
0-1 full reset
Example: Select Epson emulation with full reset: Dec 27 91 50 50 59 49 32 126 Hex 1B 5B 32 32 3B 31 20 7E
ESC [(p1)p SELECT PAPER PATH
p1 selects
08 unload current path 10 unload current path and load tractor 2 12 unload current path and load tractor 1 Forms in the current path should be torn off before changing paper paths. If
you send a command to change paper paths and there is more paper downstream of the print head than 1/2 times the current form length or six inches, whichever is greater, then the printer returns paper to the position that was current before the command was received, and a fault condition is set.
If you send a command to change paper paths and the target path is the current path, then the printer executes a form feed. If you load tractor 2
when tractor 2 is not installed, the command will be ignored.
Example: Unload tractor 1 and load tractor 2: Dec 27 91 49 48 112 Hex 1B 5B 31 30 70
7265 Programmer’s Manual
Copyright © 2004 TallyGenicom Chapter 2 ANSI
10
Commands Description
ESC c RESET TO INITIAL STATE
Recalls the user format presently assigned to the current paper path. Dec 27 99 Hex 1B 63
ESC [(p1)t ENABLE/DISABLE OVERSIZED/EXPANDED/BAR CODE MODES
p1 Effect Page
0 reset special modes 1 select oversized printing 4-2 2 select expanded printing 4-2 3 select bar code 3-6 Oversized printing and bar codes are explained in separate chapters. When
expanded printing is selected, the current font is expanded horizontally and vertically in 100% increments according to expansion factors specified by ESC
[(p1);(p2)<SP>B (see page 11). The range of expansion is 1x through 8x.
Example: select expanded printing Dec 27 91 50 116 Hex 1B 5B 32 74
ESC [(p1); (p2)<SP>B
GRAPHIC SIZE MODIFICATION Sets the size of expanded and oversized characters. The effect of this command on
oversized is explained in a separate chapter. When expanded print is selected, the argument units for parameters p1 and p2 are
percentages of the vertical and horizontal dimensions of the current font. Parameter p1 controls the vertical expansion and p2 controls the horizontal expansion. The argument limits for expanded print are 800;800 (8x the parent font size).
Oversized enables much larger expansions. Parameters are rounded down to the nearest 100.
Note: This printer goes into expanded mode immediately on receiving this command. Any text between this sequence and a countermanding ESC [(p1)t
sequence (see page 11) is printed according to the specified expansion.
If height and width are different values, the height will be set the same as the width.
ESC [(p1); ...(pn)h
SET MODE (ANSI)
p Effect
20 auto CR on LF Dec 27 91 50 48 104 Hex 1B 5B 32 30 68
7265 Programmer’s Manual
Copyright © 2004 TallyGenicom Chapter 2 ANSI
11
Commands Description
ESC [(p1); ...(pn)l
RESET MODE (ANSI) Resets mode(s) set by ESC [(p1);..(pn)h.
p Effect
20 reset auto CR on LF Example: reset auto CR on LF Dec 27 91 50 48 108 Hex 1B 5B 32 30 6C
ESC [> (p1);..(pn)h
ESC [> (p1);..(pn)l
SET MODE (GENICOM) This is an ANSI private use sequence.
p Effect
1 proportional print 2 reserved 3 80 hex - 9B hex interpreted as C1 control codes 4 bold mode accomplished by overstrike 5 select character set 2 Example: set proportional print Dec 27 91 62 49 104 Hex 1B 5B 3E 31 68 RESET MODE (GENICOM) Resets modes set by ESC [>(pn)h. See the previous command. The parameter
definitions are the same. Example: reset proportional print Dec 27 91 62 49 108 Hex 1B 5B 3E 31 6C
7265 Programmer’s Manual
Copyright © 2004 TallyGenicom Chapter 2 ANSI
12
Commands Description
ESC [(p1); (p2);<SP>{
PAPER SHEAR If the paper shear option is installed, then note that the appropriate strap must be set
in the hardware options menu in order for the paper shear to work. Parameter p1 = 1 selects the paper shear. Parameter p2 = 1 executes a cutting sequence: If the vertical position is not at top-of-
form, then a form feed is executed. Paper is advanced to the shear position and cut. Next, it is advanced an inch to eject the sheet that has been cut off; then it is retracted to the top margin on the following form. The horizontal position following a shear is the left margin. The shear position should be set from the control panel so that paper is cut precisely at the perforation. If a non-zero top print reference is needed, then set the top print reference first and then set the shear position.
Dec 27 91 49 59 49 32 123 Hex 1B 5B 31 3B 31 20 7B
7265 Programmer’s Manual Copyright © 2004 TallyGenicom Chapter 2 ANSI
13
Commands Description
ESC ]6;4; (p3);(p4) ESC \
STRAPS AND OPTIONS This command enables downline control of options found at various places in the
printer menus. This includes the Emulation and Software Options menus, as well as the User-defined Options menu. For details and descriptions, see the User’s Manual.
p3 = 0 reset
1set
p4 =
4 auto cr on lf 5 auto lf on cr 6 auto cr on vt
14 auto wrap
7265 Programmer’s Manual
Copyright © 2004 TallyGenicom Chapter 2 ANSI
14

Graphics Rendition (Fonts and Modes)

Command Description
ESC [(p1); ...(pn)m
SELECT GRAPHICS RENDITION Selects print modes and fonts. p1 Printing Mode 0 normal printing - resets all modes (but does not affect font selection) 1 set bold print 4 set underline 5 set doublewide 6 set proportional * 10 and 11 Gothic DP 12 Gothic LQ 13 Courier DP 14 Courier LQ 15 Gothic Italic DP 16 Gothic Italic LQ 17 Courier Italic DP 18 Courier Italic LQ 19 Wide Gothic DP * 22 cancel bold 24 cancel underline 25 cancel doublewide / expanded 26 cancel proportional 30 select black ribbon color
31 select red ribbon color 32 select green ribbon color 33 select yellow ribbon color 34 select blue ribbon color 35 select magenta ribbon color
36 select cyan ribbon color
7265 Programmer’s Manual Copyright © 2004 TallyGenicom Chapter 2 ANSI
15

NATIONAL CHARACTER SET

Command Description
ESC [(p)x SELECT NATIONAL CHARACTER SET
p Character Set
0 USA 1 Germany 2 French A 6 Italian 7 United Kingdom 8 Spanish 9 Danish/Norwegian A
16 Swedish/Finnish D
If a parameter value (p) is not recognized, then the default character set (0 - USA) is selected.
To use substitutions that have characters in the 80 hex to 95 hex range, first disable 8-bit control code processing, either by escape sequence or from the Emulation Options Menu. Next, enable character set 2, either by the Straps and Options control
sequence on page 14 or from the Emulation Options menu. This causes ASCII
codes 80 hex - 9F hex to be mapped to printable characters instead of control codes. Example: To select the United Kingdom character set: Dec 27 91 55 120 Hex 1B 5B 37 78
7265 Programmer’s Manual
Copyright © 2004 TallyGenicom Chapter 2 ANSI
16
D/N = Danish/Norwegian S/F = Swedish/Finnish
Code D
Location H352336243826422A6440915B925C935D945E9660
Character
p
Set
0USA
1Germany
2 French A
6Italian
7UK
8 Spanish
9D/N A
16 Swedish
#$&* @[ \ ] ^` { #$&* §ÄÖÜ^` äöüߢ¥ £$&* à° ç§^` éùè¨ ¢¥
£
$&*
£
$&*@[\]^`{
^
$&* @í Ñ¿^` ¨ ñ} ~¢¥
§°ç é
#$&* @ÆØÅ^` æøå~¢¥
¤
&*
É
ÄÖÅ
^
Üé
1237B1247C1257D1267E1559B157
!
}~¢¥
ùàòè ì
!
}~¢¥
¢¥
äöåü¢¥
9C
Figure 2-3 National Character Substitutions 0 - 18
7265 Programmer’s Manual Copyright © 2004 TallyGenicom Chapter 2 ANSI
17

Line/Character Spacing

Command Description
ESC [(p1); (p2) <SP> G
LINE/CHARACTER SPACING Sets the vertical and horizontal pitch in decipoints. Parameter (p1) is the
spacing between lines and (p2) is the spacing between characters. Unspecified parameters remain at their current values. This command does not affect oversized printing selected by ESC [1t.
7265 Programmer’s Manual Copyright © 2004 TallyGenicom Chapter 2 ANSI
18
Commands Description
ESC [(p1); (p2) <SP> G
LINE/CHARACTER SPACING p1 = line spacing parameter p2 = character spacing parameter If you select doublewide printing (ESC [5m), then the printer doubles character
spacing set by this command. If the designed pitch of the current font is 10 cpi and doublewide is set, then a character spacing argument of 72 results in a pitch of 5 cpi, at which horizontal segments of line-draw characters are contiguous.
Example: ESC [90;60 <sp> G sets the vertical spacing to 8 lines per inch and the horizontal spacing to 12
characters per inch. (720 divided by 8 = 90, and 720 divided by 12 = 60).
Dec 27 91 52 48 59 54 48 32 71 Hex 1B 5B 39 30 3B 36 30 20 47
p2 CPI
120 6
The quick brown fox jumped
90 8 72 10 60 12 51 14 45 16 40 18 36 20
The quick brown fox jumped over
The quick brown fox jumped over the lazy
The quick brown fox jumped over the lazy dog’s back.
The quick brown fox jumped over the lazy dog’s back.
The quick brown fox jumped over the lazy dog’s back.
The quick brown fox jumped over the lazy dog’s back.
The quick brown fox jumped over the lazy dog’s back.
Figure 2-4 Effects of Character Spacing Parameters
7265 Programmer’s Manual Copyright © 2004 TallyGenicom Chapter 2 ANSI
19

Forms Setup

Command Description
ESC [(p1); (p2);(p3);(p4) ;(p5)r
FORMS SETUP Sets top of form and sets form length, as well as top and bottom margins, in decipoints.
Parameter p1 is form length 720ths , p2 is the top margin, p3 sets the length of white space between the baseline of the last allowed
line and the end of form. p4 is the top print reference, and p5 is the left print reference Any parameter not specified is assigned its default value. Maximum form length is
15840 decipoints (22 inches).
Default Values
p1 7920 decipoints 11-inch form p2 0 decipoints 0-inch top margin p3 0 decipoints 0-inch bottom margin p4 0 decipoints 0-inch top print reference p5 0 decipoints 0-inch left print reference Example: Set 8-inch form length, one-inch top margin, one-inch bottom margin
Dec 27 91 53 55 54 48 59 55 50 48 59 55 50 48 114 Hex 1B 5B 35 37 36 30 3B 37 32 30 3B 37 32 30 72 Note: Before you send this command, verify that the top print reference is zero in the
target paper path. One way to do this is to park and then load paper in the target path. The top edge of the paper should line up with the top of the print head. If not, then set the top print reference to zero from the menu and save the change to the format associated with the target paper path. You must once again park and load paper in the target path in order for the new print reference to take effect.
Next, send a command to set the vertical position-absolute to zero. If you do not do this, then the printer establishes top-of-form at the current top margin, and form registration is lost.
7265 Programmer’s Manual Copyright © 2004 TallyGenicom Chapter 2 ANSI
20

Superscript/Subscript

Command Description
ESC K (PLD)
ESC L (PLU)
NOTE: The partial line up does not respect top of form; that is, following a form feed, ESC L causes a partial line movement upward. Also, partial line down does not respect bottom of form; that is, when printing the last line on the form, ESC L causes a partial line movement downward.
SUBSCRIPT PRINTING Moves paper 1/2 line below the current line for subscript printing. ESC K is used to
return to the original line following ESC L (superscript). If 8-bit control code processing is enabled then Dec 139 Hex 8B otherwise Dec 27 75 Hex 1B 4B SUPERSCRIPT PRINTING Moves paper 1/2 line above the current line for superscript printing. ESC L is used to
return to the original line following ESC K (subscript). If 8-bit control code processing is enabled then Dec 140 Hex 8C otherwise Dec 27 76 Hex 1B 4C
When printing the last line on a form, do not send a line feed (LF) code to move directly from superscript to subscript. The LF code will be acted upon as the bottom of form terminator.
7265 Programmer’s Manual Copyright © 2004 TallyGenicom Chapter 2 ANSI
21

Vertical Movement

p
Absolute positions are calculated from the top and left print references without respect to margin settings. The top of a character cell located at vertical position-absolute 0 is at top print reference. The left edge of a character cell located at horizontal position-absolute 0 is at the left print reference. If the default left print reference is current, and if the left tractor position(s) are as shipped, then this is about 0.6 inches from the left edge of the paper.
Top and left print references are adjustable from the printer menu.
To
Shee
A
Extreme
Left Position
Character Printed at Zero Position
CAUTION: Do not attempt reverse paper motion across a perforation, since this may cause the paper to snag on the print head. Vertical position accuracy is not specified for reverse paper moves greater than 1.5 inches.
7265 Programmer’s Manual Copyright © 2004 TallyGenicom Chapter 2 ANSI
22

Vertical Movement

Commands Description
LF LINE FEED
Advances the paper one line according to the spacing currently in effect. Dec 10 Hex 0A
VT VERTICAL TAB
Advances paper to the next vertical tab setting. If the current print position is at or beyond the last tab setting, the paper advances to the top of form. If no tabs are set, then VT is processed according to the status of emulation option strap 14.
Dec 11 Hex 0B
FF FORM FEED
Advances the paper to the top margin on the next form.
Dec 12 Hex 0C ESC D (IND)
ESC E (NEL)
ESC M (RI)
INDEX
Advances the paper to the next line. The current column is not changed, regardless
of the status of auto CR on LF.
Dec 132 Hex 84
NEXT LINE
The next line character advances the paper to the next line. The current column is
reset to the left margin. Auto CR on LF has no effect.
Dec 133 Hex 85
REVERSE INDEX
Moves the paper back one line.
Dec 141 Hex 8D
7265 Programmer’s Manual Copyright © 2004 TallyGenicom Chapter 2 ANSI
23
Commands Description
ESC [(p)e VERTICAL POSITION RELATIVE
Advances paper p decipoints. This command enables printing below the bottom
margin of the current form and above the top margin of the following form. The
example below advances the paper 4 1/4 inches.
Example: ESC [3060e
Dec 27 91 51 48 54 48 101 Hex 1B 5B 33 30 36 30 65 ESC [(p)k VERTICAL POSITION BACKWARDS
Moves the vertical position backwards to (p) decipoints above the current position.
The horizontal position does not change.
If the target position is above the top margin, then the vertical position is the top
margin. If no top margin is set, and the target position is above top-of-form, then the
vertical position is top-of-form.
NOTE: The printer economizes vertical motion with vertical logic seeking, so this
command may cause reverse paper motion in some instances and not in others.
Reverse paper motion can cause problems with some forms.
Example: ESC [1080k moves the vertical position up by 1.5 inches.
Dec 27 91 49 48 56 48 107 Hex 1B 5B 31 30 38 30 6B ESC [(p)d VERTICAL POSITION ABSOLUTE
Moves the current print position to p decipoints from the top of the form.
The following example advances the paper to 2 inches below top of form.
Example: ESC [1440d
Dec 27 91 49 52 52 48 100 Hex 1B 5B 31 34 34 30 64 ESC[(p1);
(p2)f
VERTICAL AND HORIZONTAL POSITION ABSOLUTE
Moves the print position to any coordinate on the page. Coordinates are measured
in decipoints. Parameter p1 is the vertical coordinate, which is measured from the
top print reference. Parameter p2 is the horizontal coordinate, which is measured
from the left print reference. The computation of absolute positions is not influenced
by margin settings. Top and left print references are adjustable from the control
panel.
You can print characters beyond the left, top, and bottom margin setting, but no
printing is allowed beyond the right margin.
EXAMPLE: ESC [1440;2160f
Prints the next character 2 inches from the top print reference and 3 inches from the
left print ref erence.
Dec 27 91 49 52 52 48 59 50 49 54 48 102
Hex 1B 5B 31 34 34 30 3B 32 31 36 30 66
7265 Programmer’s Manual Copyright © 2004 TallyGenicom Chapter 2 ANSI
24

Margins

Use the Forms Setup command, page 2-39, to set vertical margins.
Commands Description
ESC [(p1);6 (p2)s SET LEFT AND RIGHT MARGIN
Sets the left and right margin in decipoints; p1 is the left margin and p2 is the right. Distances are measured from the left print reference. This command takes effect following the next line terminator (you cannot set margins for the current line).
EXAMPLE: Set the left margin at 0.4 inch and right margin at 6.9 inches, making a 6.5-inch print line.
Dec 27 91 50 56 56 59 52 57 54 56 115 Hex 1B 5B 32 38 38 3B 34 39 36 38 73
ESC [s ASSIGN MARGIN DEFAULTS
Assigns the default parameters. Sets the left margin to zero, right margin to maximum print line width of the printer. This command takes effect following the next line terminator.
Dec 27 91 115 Hex 1B 5B 73
7265 Programmer’s Manual Copyright © 2004 TallyGenicom Chapter 2 ANSI
25

Horizontal Movement

Commands Description
HT HORIZONTAL TAB
Causes the current print position to move to the next tab stop. If no tabs are set, then the current position moves one space. If tab(s) are set but no tab(s) are set between the active print position and the right margin, then following characters on the line are either discarded or printed on the next line, depending on the status of auto wrap.
Dec 9 Hex 09
CR CARRIAGE RETURN
Initiates printing and returns the current print position to the left margin. Dec 13 Hex 0D
ESC [(p)a HORIZONTAL POSITION RELATIVE
Advances the current print position by the distance specified. Parameter p is specified in decipoints.
Example: ESC [1080a advances the print position 1.5 inches. Dec 27 91 49 48 56 48 97 Hex 1B 5B 31 30 38 30 61
ESC [(p)j HORIZONTAL POSITION BACKWARDS
Moves the horizontal position (p) decipoints left of the current position. Actual distance between symbols separated by this command is the argument (p)
minus the current horizontal pitch (text or graphics). For example, if you print an uppercase E at 10 cpi, move backwards by (p), and print another uppercase E, then the distance between leading edges of the two characters is (p) - 72 decipoints. If you print graphics at 72 dpi, move backwards by p, and print another graphics column, then the distance between the two graphics columns is (p) – 10 decipoints.
This command enables printing left of the left margin. Any data located left of the left print reference is discarded.
Example: ESC [1080j moves the horizontal position back by 1.5 inches. Dec 27 91 49 48 56 48 106 Hex 1B 5B 31 30 38 30 6A
7265 Programmer’s Manual 26 Copyright © 2004 TallyGenicom Chapter 2 ANSI
Loading...
+ 379 hidden pages