advertisement
Character Definition And Format
Tally ANSI
This language is an emulation of the Tally MT660 native language, which was based on ANSI 3.64. It is the default emulation of the 6800 Series printers.
This language has been enhanced as needed throughout the development of the 6800 Series printers.
Character Definition And Format
This section presents and explains the Reserved Control Codes and Escape
Sequences that control how printed output will look, where it will print, characters that are available, etc.
Attributes, Print Position, and Type Styles
This escape sequence is used for setting up fonts by allowing you to control the print attributes (boldface, underline, overline, etc.), print position
(superscript and subscript), and type style selection. The basic sequence is:
ESC
1B
[
5B n
1 n
1
;
3B n n
2
2
;
3B nx nx m
6D
ASCII Command
Hex Equivalent
This sequence changes both the primary and secondary fonts, but does not change the character set selected except when changing into or out of the
OCR sets. In this command you may combine codes for attributes, print positions, and type styles. You may send all of the attributes available and the printer will act on all of them. However, when you send type style codes and super- and subscript codes, the printer will act only on the last type style code and whichever of the super- and subscript commands appears last.
The codes in the following lists may be listed in any order in the command.
Each code must be separated from the following code by a semicolon.
Using this escape sequence, you can select such things as Italicized Courier font by sending a code to select the Courier type style along with a code to
select italic printing (see Table 1 on page 10 for an explanation of combining
character definition and format codes).
The codes in Table 1 may be listed in any order in the command. Each code
must be separated from the following code by a semicolon.
9
Chapter 1
Tally ANSI
Table 1. Character Definition and Format Codes
1
60
4
3
61
0
14
15
19
10
11
12
13
Parameter Code
ASCII
62
63
0
Parameter
Description
HEX
Attribute Selections
34 Underline
33
31
Italic
Boldface
3630
3631
30
Print Positon
Overline
Strikethrough
End Attribute
3632
3633
Superscript printing
Subscript printing
30
Type Styles
End Super-/subscript
3130
3131
3132
3133
Data Processing
Gothic
OCR-A (ANSI & DIN)
OCR-B (ANSI & DIN)
3134
3135
3139
Draft
Courier
Downloaded Font
Combining Attributes
Any of the attributes discussed in the ESC [nm sequence may be included in a single escape sequence. The escape sequence begins the same as one requesting a single code but changes after the first attribute byte. A semicolon
(;) must be inserted between each code listed in the sequence. For example, to print a single word in a sentence with the boldface and underline attributes, send the following escape sequence
ESC
1B
[
5B
1
31
;
3B
4
34 m
6D
10
Character Definition And Format
immediately before the word in the data stream and follow the word with the escape sequence:
ESC
1B
[
5B
0
30 m
6D
Example: To boldface and italicize the word "only" in the sentence:
Enter: Boldface and italicize the word ESC[1;3monlyESC[0m in this sentence.
Printer Output: Boldface and italicize the word
only
in this sentence.
Languages and Character Sets
The numerous language and character set selections are defined in the
Character Sets section of this manual. The following commands can be used:
Table 2. Language and Character Set Selections
Language
ISO 2 - IRV
ISO 4 - UK
ISO 6 - US
ISO 10 - Swed/Fin Basic
ISO 11 - Swedish/Finnish
ISO 14 - Japanese
ISO 15 - Italian
ISO 16 - Portuguese
ISO 17 - Spanish
ISO 21 - German
ISO 60 - Nor/Danish
ISO 69 - French
Canadian
Hungarian
Chinese
French T6
Swedish/Finnish T6
Tally ANSI G0
ESC(Z
ESC(K
ESC(‘
ESC(f
ESC(w
ESC(i
ESC(T
ESC(2
ESC(3
ESC (@
ESC(A
ESC(B
ESC(G
ESC(H
ESC(J
ESC(Y
ESC(L
Tally ANSI G1
ESC)Z
ESC)K
ESC)’
ESC)f
ESC)w
ESC)i
ESC)T
ESC)2
ESC)3
ESC)@
ESC)A
ESC)B
ESC)G
ESC)H
ESC)J
ESC)Y
ESC)L
11
Chapter 1
Tally ANSI
Table 2. Language and Character Set Selections
Language Tally ANSI G0 Tally ANSI G1
Italian T6
Canadian Alternate
French Withdrawn
Nor/Danish T6
ISO 8859-1 - Latin 1
ISO 8859-2 - Latin 2
ISO 8859-5 - Cyrillic
ISO 8859-7 - Greek
ISO 8859-9 - Turkish
ISO 8859-15 Latin 9
Code Page 437 - IBM Proprinter
Code Page 850 - Latin 1
Code Page 851 - Greek
Code Page 852 - Latin 2
Code Page 855 - Russian Cyrillic
Code Page 857 - Turkish
Code Page 863 - French Canadian ESC(0x85
Code Page 866 - Cyrillic ESC(0x8E
Code Page 1250 - Win 98 Latin 2
Code Page 1251 - Win 98 Cyrillic
ESC(p
ESC(q
Code Page 1252 - Win 98 Latin 1
Code Page 1253 - Win 98 Greek
ESC(r
ESC(s
Code Page 1254 - Win 98 Turkish ESC(t
DEC Multinational ESC(<
DEC Turkish
Siemens Turkish
HP Roman-8
ISO Katakana - ISO 13
Line Draw
ESC(y
ESC(z
ESC(0x83
ESC(1
ESC(7
ESC(4
ESC(x
ESC(R
ESC(5
ESC)4
ESC)x
ESC)R
ESC)5
ESC,A or ESC(% ESC-A or ESC)%
ESC(& ESC)&
ESC(*
ESC(-
ESC)*
ESC)-
ESC(.
ESC(/
ESC(0x80
ESC (0x82
ESC(0x88
ESC(0x87
ESC(0x8A
ESC(0x8D
ESC).
ESC)/
ESC)0x80
ESC)0x82
ESC)0x88
ESC)0x87
ESC)0x8A
ESC)0x8D
ESC)0x85
ESC)0x8E
ESC)p
ESC)q
ESC)r
ESC)s
ESC)t
ESC)>
ESC)y
ESC)z
ESC)0x83
ESC)1
ESC)7
12
Character Definition And Format
Table 2. Language and Character Set Selections
SAP 8859-1
SAP 8859-2
SAP 8859-5
Language Tally ANSI G0
ESC(+
ESC(,
ESC(#
Tally ANSI G1
ESC)+
ESC),
ESC)#
Primary and Secondary Fonts and Languages
This escape sequence allows a font style and some language substitutions to be loaded into the primary (G0) and secondary (G1) areas. To load your primary and alternate character sets, use the sequence:
ESC
1B
[
5B n
1 n
1
;
3B n n
2
2
!
21 s
73 where: n
1
= the value field for the primary (G0) character set.
n
2
= the value field for the alternate (G1) character set.
There are six groupings of Character Sets to select from on your printer.
Table 3. Language and Font Selections
ASCII Values
Language
Gothic
(user default)
US
German
Norwegian/Danish-T6 13
French-T6
UK
14
15
10
11
12
Spanish
Swedish/Finnish-T6
Italian-T6
Special Characters
Downloaded Char. Set
16
17
18
19
Courier
46
47
48
49
43
44
45
40
41
42
Draft
100 or 700
101 or 701
102 or 702
103 or 703
104 or 704
105 or 705
106 or 706
108 or 708
108 or 708
109 or 709
700
6
7
8
9
3
4
5
0
1
2
DP
13
Chapter 1
Tally ANSI
Table 4. Language and Font Selections
ASCII Values
Language Sets
OCR-A OCR-B Special Sets
OCR-A
Default
ANSI
DIN
OCR-B
Default
ANSI
DIN
Line Draw Char. Set
600
601
602
610
611
612
720
The following examples show how to use this escape sequence in a variety of ways.
Example 1:
To select US Data Processing as the primary set (n1 = 1) and Italian Data
Processing as the alternate set (n2 = 8) use the escape sequence:
ESC
1B
[
5B
1
31
;
3B
8
38
!
21 s
73
Example 2:
You may change to another primary set without changing the alternate set by omitting n2 in the sequence. For example, the original escape sequence shown above can be modified to:
ESC
1B
[
5B
1
31
2
32
!
21 s
73
This escape sequence would change the primary character set to German
Gothic (n1 = 12). The alternate character set remains unchanged.
14
Character Definition And Format
Example 3:
To change the alternate character set to the Spanish Courier (n2 = 46) without changing the primary set, modify the escape sequence to:
ESC
1B
[
5B
;
3B
4
34
6
36
!
21 s
73
Selecting Primary and Secondary Sets
There are two ways to access the primary and alternate character sets. Once the primary and alternate character sets are loaded, they can be accessed using the Shift In (SI, HEX 0F) and Shift Out (SO, HEX 0E) codes to select the sets for actual printing; SI selects the primary set, and SO selects the alternate set.
The second way to access the primary and alternate character sets uses the
8th bit to select either primary or alternate set. To use this method, set the 8th
Bit Parameter to Data in the Configuration Menu. With 8th Bit set to Data, when the 8th bit is high, it performs the same function as the SO Command; it selects the Alternate Character Set. When the 8th bit is low, it performs the same function as the SI Command; it selects the Primary Character Set.
Downloading Fonts and Characters
The Tally ANSI Emulation includes a download font function that allows the user to download fonts and characters from the host computer.
When the printer is turned on or reset, the Download Font Memory is loaded with the Default Character Set. The user can replace any or all of these characters with downloaded characters.
To enter Download Font Mode use the escape sequence:
ESC
1B
[
5B
<
3C
2
32 h
68
The Enter Download Sequence is followed by the Character Data Record, which defines the character and the memory location it will be downloaded to.
To exit Download Font Mode use the escape sequence
ESC
1B
[
5B
<
3C
NOTE:
l = lower case L
2
32 l
6C
15
Chapter 1
Tally ANSI
Character Data Records
Each downloaded character is defined by a sequence of characters called a
Character Data Record. These records follow the rules for the Intel HEX format. The format for each record is as follows:
:
m
n
1
-n
2 d data c CR LF where:
: = Record start. Every record starts with a colon (:). Every colon sent while in the Load Mode is interpreted as a start-of-record. Only Character Data
Record bytes may be sent after a colon and before the checksum. Any other characters or control codes sent will be ignored except ESC and a colon.
Each byte of the record that follows the colon is sent in hexadecimal format.
m = Number of bytes in record. The first byte of each record is the number of data bytes in that record. In this emulation this number is always 16 (HEX 10).
n1 n2 = The high- and low-order bits of memory load address.
d = Record type (00 for data).
data = Dot pattern designators. Hexadecimal description of the dot patterns necessary for the character.
c = Checksum. This byte is used to check the data for accuracy.
16
Character Definition And Format
Dot Matrix
Each character that will be downloaded is defined on the same 11x11 dot matrix used for the Data Processing Font (see Figure 3–1). Most characters use only the upper case rows and normal columns. Characters such as g, j, p, q, and y use the descender rows as well. Superscripts and characters with diacritics may use the ascender rows. Graphic characters that must join from side to side without a break use the left and right link columns.
In the Normal Columns area, adjacent horizontal dot positions will not print. If you do attempt to download adjacent dots among the normal columns, the printer will discard the right dot of each pair.
Ascender Rows
Left
Link
Right
Link
Upper Case
Rows
Descender Rows
Figure 1. Download Dot Matrix
Computing the Memory Address
The second and third bytes are the memory addresses for the record location in download font memory. This address is determined by multiplying the
ASCII code for the character by HEX 10. For special user-defined characters, select a character location in the ASCII basic set and use that location to compute the memory address. For example, to find the address for an uppercase k (K), multiply 4B (HEX value for K) by HEX 10. The second byte of the record would then be 04, and the third byte would be B0.
17
Chapter 1
Tally ANSI
18
Row 1
Row 7
Row 8
Row 9
Row 10
Row 11
Row 2
Row 3
Row 4
Row 5
Row 6
Converting Dot Matrix Data to Character Data
To convert the dot matrix image of the character in the figure below perform the procedure that follows it:
0000
000000000000
000000000000
00101010100
00000100000
00000100000
00000100000
00000100000
00000100000
00101010100
000000000000
000000000000
0000
Figure 2. Converting Dots to Binary
1.
Convert each row to binary 1s (ones) and 0s (zeros), where a 1 represents a primary impact point (the center of the dot).
2.
Rearrange the data into a linear form by putting the second row at the right side of the first row, the third row at the right side of the second, and so on to form one long sequence of bits. Add four 0 bits to the beginning of the line, and three 0 bits to the end of the line for a total of 128 bits in the sequence.
+4
0000
Row 1
00000000000
Byte 1 Byte 2
Row 2
00000000000
Byte 3
Row 3....
00101010100
......
Row 11 +3
00000000000 0110
Byte 16
Figure 3. Downloaded Bit Sequence
3.
Convert the 128 bits to 16 bytes beginning at the leftmost 8 bits, which become Byte 1 (see above).
Character Definition And Format
13
14
15
16
9
10
11
12
7
8
5
6
3
4
1
2
Byte
4.
Reverse the sequence of bits in each byte as shown below.
Table 5. Binary Conversion and Sequence Reversal
00000100
00000000
10000000
00010000
00000010
00000010
10101000
00000000
00000000
00000000
Initial Binary
#
00000000
00000000
00000000
00001010
10100000
00100000
Æ
Æ
Æ
Æ
Æ
Æ
Æ
Æ
Æ
Æ
Æ
Æ
Æ
Æ
Æ
Æ
Reversed
Binary #
00000000
00000000
00000000
00000101
00000101
00000100
00100000
00000000
00000001
00001000
01000000
01000000
00010101
00000000
00000000
00000000
Æ
Æ
Æ
Æ
Æ
Æ
Æ
Æ
Æ
Æ
Æ
Æ
Æ
Æ
Æ
Æ
HEX
5.
Convert the binary format to hexadecimal format. For the example, the hexadecimal sequence would be:
00000050050420000108404015000000
15
00
00
00
15
08
40
40
05
04
20
00
00
00
00
50
19
Chapter 1
Tally ANSI
Computing the Checksum
The checksum is computed by adding together all of the non-zero bytes between the colon and the checksum of the Character Data Record. This sum is subtracted from the next larger multiple of 256. The result is entered as the checksum data byte before the sequence is transmitted to the printer. The checksum for the character in Figure 5 would be:
Decimal
32
1
5
4
16
4
176
80
8
64
64
+21
475
HEX
05
04
20
01
10
04
B0
50
08
40
40
+15
1DB
512
– 475
37 Decimal
25 HEX
The same operation is performed by the printer after the data is received. The result is compared to the transmitted checksum to ensure data accuracy.
Composing the Character Data Record
After converting the matrix into character data and computing the checksum, you are ready to assemble the Character Data Record. The first character is a colon; followed by a 1 and a 0 for the byte count. Next, there are four characters for the two address bytes, and then two 0’s for the record type.
Then come 32 characters for the 16 data bytes, and two characters for the checksum. Then optional comments may be inserted before the mandatory
Carriage Return (CR). A Line Feed may follow the CR, as may other comments.
20
Character Definition And Format
Do not include any additional colons.
To load the character into the memory location for the upper-case letter K, the
Data Record would be:
:1004B0000000005005042000010840401500000025
Proportional Spacing
This command you to improve the appearance and readability of text output.
When this function is activated the print space of each character is adjusted according to the width of the character. The sequences for controlling
Proportional Spacing are:
Begin Proportional Spacing
ESC
1B
[
5B
<
3C
End Proportional Spacing
6
36 h
68
ESC
1B
[
5B l = Lower-case L
<
3C
6
36 l
6C
21
Chapter 1
Tally ANSI
Characters Per Inch
The following escape sequence selects the characters per inch (CPI):
ESC
1B
[
5B n n w
77 where: n = a value from the table below.
CPI
5 CPI
6 CPI
6.67 CPI
7.5 CPI
8.33 CPI
8.37 CPI
10 CPI
12 CPI
13.33 CPI
15 CPI
16.67 CPI
17.14 CPI
20 CPI
4
5
13
15
9
10
11
12
8
1
6
17
7
Table 6. CPI Selections
ASCII
39
3130
3131
3132
3133
3135
34
35
38
31
36
3137
37
HEX
The CPI value may be changed at any time. However, selecting a new CPI value cancels a previous horizontal size selection (see the next escape sequence), and selecting a new horizontal size cancels the previous CPI value.
22
Character Definition And Format
Character Height and CPI
This sequence allows you more control over how characters will look when they are printed out on the printer. With this command you can change both the character height and the character width, allowing you to print in wide characters for increased readability. To change character size, use the following escape sequence:
ESC
1B
[
5B n
1 n
1
;
3B n n
2
2 where: n
1
= one of the values from the following table.
Sp
20
B
42
ASCII
500
600
700
800
100
200
300
400
900
1000
Table 7. Character Height Multipliers n1 values
Char. Height Amount of
Increase
HEX
313030
323030
333030
343030
353030
363030
373030
383030
393030
31303030
=
=
=
=
=
=
=
=
=
= normal height (10 CPI) twice normal height three times normal height four times normal height five times normal height six times normal height seven times normal height eight times normal height nine times normal height ten times normal height
NOTE:
Changing the height of a character set will change the distance the paper moves in response to a Line Feed Command.
23
Chapter 1
Tally ANSI
where: n
2
= one of the values from the following table.
Table 8. Character Width Multipliers
Range of n
2
values
0
1-54
55-59
60-63
64-70
71-79
80-91
92-109
110-118
119-126
127-141
142-159
160-182
183-200
CPI
Selections
Default (10 CPI)
20
17.14
14.67
15
13.33
12
10
8.57
8.33
7.5
6.67
6
5
Table 8 lists all of the available CPIs on this emulation and the values used to
select them. This command will work with any alphanumeric font.
A new CPI selection will cancel the horizontal size selected with this command, and selecting a new horizontal size cancels the previous CPI selection.
24
Page Formatting
Page Formatting
Many of the parameters for formatting the print and page characteristics (such as LPI, Horizontal Tabs, etc.) can be set from your host computer using escape sequences. This section discusses and explains the Escape
Sequences and Reserved Control Codes used for page formatting.
Line Per Inch
The following escape sequence selects lines per inch (LPI):
ESC
1B
[
5B n n z
7A where:
n = one of the values from the Table 9 below.
1.5 LPI
2 LPI
3 LPI
4 LPI
5 LPI
6 LPI*
8 LPI
9 LPI
10 LPI
12 LPI
LPI
Selection
Table 9. LPI Selections n Value
ASCII
11
3
4
13
9
10
7
8
6
15
HEX
37
38
39
3130
3131
33
34
3133
36
3135
The LPI may be changed anywhere on a form. The current LPI setting is used to compute the physical form length when loading a
VFU
or selecting a form length. Changing the LPI does not change the physical form length, bottomof-form skip, vertical tab stops, or
VFU
channel positions. However, it does change the size of the units by which they are set and reported. For example, an 11 inch form at 6 LPI has 66 lines, but the same form length has 88 lines at
8 LPI.
25
Chapter 1
Tally ANSI
Variable Line Spacing
You may set up these emulations to use variable line spacing in increments of n/720 inch. To set up variable line spacing, use the sequence:
ESC
1B
[
5B
<
3C n n
Sp
20 h
68
NOTE:
A space is required before h.
where: n = desired line spacing in increments of n/720 inch.
Horizontal Tabs
The Tally ANSI sets default tabs at every eighth column. The following commands allow the user to manipulate Horizontal Tabs according to job requirements.
Setting Tabs
To set up to 16 horizontal tabs, use the sequence:
ESC
1B
[
5B n
1 n
1
;
3B n n
2
2
;
3B n n
3
3
;
3B
...n
...n
16
16 u
75 where n1-n16 = the column assigned as tab stop locations (up to 16 may be specified).
Example:
To set horizontal tabs at columns 15, 30, and 45, use the sequence:
ESC
1B
[
5B
15
3135
;
3B
30
3330
;
3B
45
3435 u
75
Current Position
Horizontal tabs may also be set at the current position while sending a line of print data. To set a horizontal tab at the current position, use the sequence:
ESC
1B
H
48
26
Page Formatting
Clearing Tabs
To clear tab stops at specific columns, use the sequence:
ESC
1B
[
5B n
1 n
1
;
3B n n
2
2
;
3B n n
3
3
;
3B
...n
...n
16
16 where n
1
-n
16
= previously selected tab stop that will be removed.
Clearing All Horizontal Tabs
To clear all horizontal tabs (including the default tab settings), use the sequence: q
71
ESC
1B
[
5B
3
33 g
67
Clearing Current Horizontal Tab
To clear a horizontal tab at the current position, use the sequence:
ESC
1B
[
5B
0
30 g
67
Setting Left and Right Margins
This escape sequence allows the user to set the left and right margins from the host. However, instead of using column numbers, which change when the
CPI setting is changed, this command sets absolute margins in increments of
1/120 of an inch that do not change location when the CPI selection is changed.
The basic margin setting sequence is:
ESC
1B
[
5B
LM
LM
;
3B
RM
RM
“
22 s
73
Each margin setting is calculated from the first dot position on the page. For example, if you want the left margin set 1 inch from the first dot position and the right margin set at 8 inches from the first dot position, multiply 120 x the desired inch setting and enter that amount in the proper location in the escape sequence.
27
Chapter 1
Tally ANSI
To finish this example, you would finally enter margin values of 120/120 and
960/120, which would give you the escape sequence:
ESC
1B
[
5B
120 ;
313230 3B
960 “
393630 22 s
73
Setting Vertical Format
The top of the first line of print on a page is called the top-of-form (TOF) position. Vertical position is measured from this point. The form length is the distance from one TOF to the next. The bottom-of-form (BOF) skip is the distance between the last line of print on the page and the next TOF. Once the TOF and form length have been set, the paper will automatically advance to the next TOF whenever the print position advances into the BOF skip area.
Vertical formatting includes the following settings:
•
Physical length of the total form.
•
Position of the first printed line on a form (TOF).
•
Position of bottom-of-form and/or bottom-of-form skip.
•
Position of any other vertical stops on a form.
There are three ways to set vertical format. One way involves using the menus on the printer to set the desired parameter values through the control panel. The other ways involve sending escape sequences or control codes from the host computer.
Form Length Select
The form length can be selected through the control panel or by sending the
Form Length Select (FLS) escape sequence from the host. The basic FLS escape sequence is:
ESC
1B
[
5B n n t
74 where: n = Form Length
If n = :
0, form length is 11 inches.
1, form length is 12 inches.
2-255, form length is equal to the value of n (in lines).
The FLS Command resets the current paper position as the TOF. Make sure the paper is aligned at the desired top-of-form before sending the FLS
Command.
28
Page Formatting
To calculate form length, multiply the form length in inches by the lines per inch. For instance, a 15.5" form printed at 6 LPI has a form length of 93 lines:
15.5" Form Length x 6 LPI = 93 (Total lines on form)
To set the form length for a 15.5" form, send the sequence:
ESC
1B
[
5B
93
3933 t
74
Even though the form length can be set in number of lines, the printer divides the Form Length in lines by the LPI setting and stores the form length in inches, not number of lines. Subsequent changes in LPI will not change the physical form length.
Vertical Format Unit (VFU) Commands
The VFU Load not only sets values for the form length and bottom-of-form skip (see also, Skp Whn in the Operator’s Manual), but also sets up vertical tabs on the page that are used by VFU Channel Commands. Load the printer
VFU memory from your computer and then use VFU Channel Commands to move the paper to specific locations. Your printer uses electronic memory for its VFU, allowing the page format to be defined by commands from your computer up to a maximum storage of 255 lines.
Form lengths and vertical tab positions stored in the VFU memory are based on the Lines Per Inch (LPI) setting in effect at the time the VFU is loaded.
Settings are not affected by changes in LPI or by entering Plot Mode.
VFU Load
To load the VFU, two escape sequences are needed, one to begin and one to end the load.
The VFU Load Command resets the current paper position as the top-of-form.
Make sure the paper is aligned at the desired top-of-form before sending the
VFU Load Command.
To begin a VFU download, use the sequence:
ESC
1B
[
5B
<
3C
1
31 h
68
29
Chapter 1
Tally ANSI
To end a VFU download, use the sequence:
ESC
1B
[
5B
<
3C
1
31 l
6C l = lowercase L
After the Begin-load escape sequence, all data, except ASCII control codes, is treated as VFU formatting information and is placed in VFU memory. All
ASCII control codes and Escape sequences are ignored except the End-load sequence.
VFU Load Errors
All data must be in the proper VFU Load format. If an error occurs during the load or a load overruns memory length, the load is canceled and any remaining VFU data is printed. Canceled loads default to the current form length setting (as set from the control panel or with the FLS Escape
Sequence).
To use the Vertical Format Units you download you must send a Vertical
Channel Command, discussed below.
VFU Data Format
Bit:
7
Value: x x
6
1
1
5
C6
C12
4
C5
C11
3
C4
C10
2
C3
C9
1
C2
C8
0
C1
C7
Byte 1
Byte 2 where:
Bit 7 (x) = Not used.
Bit 6 = Always 1.
Bits 0–5 = VFU channels (C1–C12 = channels 1–12).
1 = channel present
0 = no channel
The byte-pairs for a sample load are shown below. The form length used for this example is 16 lines long; therefore, 16 byte-pairs are needed.
30
Page Formatting
13
14
15
16
9
10
11
12
7
8
5
6
3
4
1
2
Byte
#
Line
#
Binary
Value
1
ESC[<1h x1000001
2 x1000000 x1000000
3
4 x1000000 x1000000 x1000000 x1000000
5
6
7
8 x1000000 x1000000 x1000000 x1000000 x1000000 x1000000 x1000000 x1000000 x1000000
42
40
40
40
40
40
40
40
40
40
40
40
41
40
40
40
Table 10. Sample VFU Download
Hex
Value
Channel or
Function
Start Code
1
Byte
#
Line
#
2 29
30
31
32
25
26
27
28
21
22
23
24
17
18
19
20
Binary
Value
9
10
11
12
13
14 x1000000 x1000000 x1000000 x1000000
15
16 x1000000 x1100000 x1001000 x1000010
ESC[<1| x1000000 x1000000 x1000000 x1000000 x1100100 x1000000 x1000000 x1000000
Hex
Value
Channel or
Function
40
60
48
42
40
40
40
40
64
40
40
40
40
40
40
40
6 and 3
12
4
8
Stop
Code
31
Chapter 1
Tally ANSI
Paper And Print Position Movement
There are varieties of commands and escape sequences used to select paper and print movement functions. This section shows both the reserved commands and escape sequences.
When entering or exiting the Character or Plot modes, any data in the print buffer is printed. In Character Mode, the print position moves to the left margin of the current line, or to the current dot row in Plot Mode. If no paper motion command is issued, printing continues at the current print position. The following commands affect print position by moving the paper vertically or print position horizontally or both.
Reserved Control Codes
Horizontal Tab HT 09
This control code moves the print position to the next horizontal tab stop on a line. For multiple tabs, string multiple HT Control Codes together. The printer ignores HT Control Codes if horizontal tabs are not set or if the command is placed in a line beyond the available tabs.
By default, the printer sets a tab stop every 8 columns. These default tab stops can be altered or cleared using the Horizontal Tab Escape Sequence, listed earlier in this chapter.
In the Tally ANSI Emulation, horizontal tab stops change physical location with a change of the left margin or CPI. For example, if a stop is set at column
16, it will always be 15 columns from the left margin, but the physical distance will change for all CPIs.
Form Feed FF 0C
The FF Control Code advances the paper to the first print position of the next form. When Print on Paper Command (POPC) is set to ON, the FF Control
Code initiates printing of the preceding buffer contents, then the paper moves to the next TOF.
Vertical Tab VT 0B
When the VFU is enabled, the VT Control Code is used to advance the paper to the next VT Channel location whether the printer is in Character Mode or
Plot Mode.
The VT Channel is selected through the printer control panel. If the VFU is not enabled, a VT Command causes a single line feed. If POPC is enabled, the preceding buffer contents are printed before the VT Command is performed.
32
Paper And Print Position Movement
Carriage Return CR 0D
The Carriage Return (CR) Control Code moves the print position back to the left margin. It can be used to overstrike previously printed characters, to print from more than one character set, or to print more than one character size on a single line.
You can overstrike any character to create a special character or symbol, or you can overstrike to create bolder print, underline, etc.
Overstrike is possible only if Auto Line Feed is disabled.
In Automatic Line Feed Mode (Auto LF), when the printer encounters a CR
Command, any printable data previously received is printed and the current print position (cursor) moves to the first column of the next line.
Line Feed LF 0A
The Line Feed (LF) Control Code advances the paper one line in Character
Mode or one dot-row in Plot Mode.
If the Auto Carriage Return Parameter is set to ON, the printer also moves the print position to the left margin when it receives a Line Feed Command.
If Print on Paper Command (POPC) is enabled, any character data previously received is printed before the move.
•
Character Mode
When a LF Command is issued in Character Mode, the actual distance the paper moves in response to a single LF Command depends on the
LPI or the Variable Line Spacing setting.
•
Plot Mode
When a LF Command is issued in Plot Mode, the actual distance the paper moves depends on the plot density setting for vertical DPI.
For example, with a density of 100 dots per inch the paper would advance
1/100 inch, and with a density of 50 dots per inch the paper would advance 1/50 inch.
Save Print Position
The Save Print Position (SPP) Command saves the current print position into the printer’s memory. The SPP escape sequence is:
ESC
1B
P
50
B
42
33
Chapter 1
Tally ANSI
Restore Vertical Print Position
The Restore Vertical Print Position Command moves the paper to the last saved vertical cursor position. If no vertical cursor position has been saved on the current form, the paper moves to the current top-of-form. In either case, the active print position is moved to the left margin. The escape sequence is:
ESC
1B
P
50
A
41
Relative Paper Motion
The Relative Paper Motion (RPM) Command moves the paper forward or backward a requested number of increments from its current print position.
Movement distance is dictated by the print mode (Character or Plot). The
POPC Parameter dictates whether previous buffer contents are printed when the RPM Command is encountered.
Exceptions:
•
Reverse paper motion stops at the Top-Of-Form (TOF) location on the current form.
•
Forward motion into a Bottom-Of-Form (BOF) skip area advances the paper to the next TOF, then forward motion continues the remaining number of increments.
The relative paper motion escape sequence is:
ESC
1B
[
5B c c n n n n where: c = Paper movement direction.
0 = forward paper motion
9 = reverse paper motion nn = Number of increments the paper moves.
Range = 1 to 99 ASCII or 31 to 3939 HEX.
Example 1:
Moving the paper forward five lines.
!
21 v
76
ESC
1B
[
5B
0
30
0
30
5
35
!
21 v
76
34
Paper And Print Position Movement
Example 2:
Moving the paper backward 13 lines.
ESC
1B
[
5B
9
39
1
31
3
33
!
21 v
76
Reverse Form Feed
The Reverse Form Feed Command moves the paper backward to the top-ofform (TOF) position of the current form. If the paper is already positioned at the TOF when this command is received, no movement will occur. The
Reverse Form Feed escape sequences:
ESC
1B
[
5B f
66
Forward Index
The Forward Index Command moves the paper forward one line with no change in horizontal position. This command is valid only in Character Mode; it is not allowed in Plot Mode. The Forward Index escape sequence is:
ESC
1B
D
44
Example:
Input: AESCDBESCDCESCDDCRLF
Output:
A
B
C
D
After the CRLF, the print position would be on this line at the left margin.
35
Chapter 1
Tally ANSI
Reverse Index
The Reverse Index Command moves the paper backward one line with no change in horizontal position. This command will not move the print location past the top of the current form and is valid only in Character Mode. The
Reverse Index escape sequence is:
ESC
1B
M
4D
Example:
Input: AESCMBESCMCESCMDCRLFLFLFLF
Output:
D
C
B
A
After the final LF, the print position would be on this line at the left margin.
Partial Line Advance
The Partial Line Advance Command moves the paper up or down a partial line for use in superscripting and subscripting. A parameter of 0 moves the paper up; 1 moves the paper down.
ESC
1B
[
5B n n
Sp
20 p
70
VFU Channel Commands
After the VFU Memory is loaded, the format is set. To use the VFU Format, you must select VFU Mode on the printer. After selecting VFU Mode, you can send VFU Channel Commands to move the paper either forward or backward to the desired location. All reverse moves stop at the TOF if the requested channel is not found. The escape sequence for moving the paper to a desired channel is:
ESC
1B
[
5B c c nn nn
!
21 p
70
36
Paper And Print Position Movement
where: c = Paper motion direction.
0 = forward paper motion. 9 = reverse paper motion.
nn = VFU channel to which the paper will move. The value for each channel is shown below:
Table 11. VFU Channel Values
Channel
7
8
5
6
3
4
1
2
9
10
11
12
ASCII
04
05
06
07
00
01
02
03
08
09
10
11
HEX
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3130
3131
The following examples give the format for forward and backward moves.
Example 1:
To move the paper forward (c = 0) to channel 4 (nn = 03), the escape sequence is:
ESC
1B
[
5B
0
30
0
30
3
33
!
21 p
70
37
Chapter 1
Tally ANSI
Example2:
To move the paper backward (c = 9) to channel 1 (nn = 00), the escape sequence is:
ESC
1B
[
5B
9
39
0
30
0
30
!
21 p
70
Plot Mode
When Plot Mode is selected, all input data is treated as plotting data. All graphics in Plot Mode are designed and printed one dot-row at a time.
In Plot Mode the data stream dictates each dot to be printed. Data bytes are either bit images of the dots to be printed, or they are commands to repeat the previous bit image one or more times. Both the density of dots in the horizontal row, and the density of rows can be varied.
When switching from Character Printing to Plot Mode and vice versa, any data in the print buffer is printed. After the data prints out in Character Mode, the print position moves to the left margin of the current line. In Plot Mode it stays at the current dot row. If no paper motion command is issued, printing continues at the current print position.
When the printer enters Plot Mode, it starts plotting at the left margin, at the top row of the character dot matrix. When the printer exits Plot Mode, the position of the next print location depends on the setting of the ModPlot
Parameter.
Plot Mode Commands
In Plot Mode, all control codes and escape sequences may be used. All of the commands work the same except the following:
•
Line Feeds advance by the dot-row instead of line distances.
•
Horizontal Tabs are not recognized.
•
Forward Index commands are not recognized.
•
Reverse Index commands are not recognized.
Entering Plot Mode
To enter Plot Mode, use the escape sequence:
ESC
1B
[
5B
<
3C
3
33 h
68
38
Plot Mode
Exiting Plot Mode
To exit Plot Mode and enter Character Mode, use the escape sequence:
ESC
1B
[
5B
<
3C
3
33 l
6C l = lowercase L
When the Modplot Parameter is set to ON, the printer automatically performs an Align to Line Boundary function and moves the print position to the next line down instead of the next dot row down. The default for this parameter is
ON. The examples that follow show the actual results of both Modplot ON and
Modplot OFF in Tally ANSI Emulation.
Line 1: Character Data
Line 2: Plot Data
On
Line 3: Character Data
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
On
Line 1: Character Data
Line 2: Plot Data
Line 3: Character Data
Figure 4. Alignment Using ModPlot
Align to Line Boundary
When you are exiting from the Plot Mode and the ModPlot Parameter is OFF it is necessary to send an Align to Line Boundary Command to advance the paper to the next line down (as measured from the current TOF). Without this command, characters and graphics would touch. The escape sequence is:
ESC
1B
P
50
@
40
39
Chapter 1
Tally ANSI
Plot Data
Two types of information are needed for plot data. The first is an ASCII character (or numerical equivalent in whatever base number system your host requires; octal, decimal, hexadecimal, etc.) that designates which dot pattern you want to print. The second is a one or two byte numeric equivalent (oct., dec., or hex.) of the number of repetitions of the dot pattern you require. This information is converted into the following binary equivalents by the host for transmission to the printer.
Table 12. Plot Data Format
Bits
Plot Data
7
Dot Pattern Code
Repeat 1 - 15 Times
Repeat 16 - 240 Times x x x
6
1
0
0
5
d
1
1
4
d
0
1
3
d m n
2
d m n
1
d m n
0
d m n where: x = Not used for Plot Data.
dddddd = Binary representation of the desired dot pattern.
0 = no dot
1 = dot mmmm =Binary equivalent of 1–15 repetitions.
nnnn = Binary equivalent of 16–240 repetitions in multiples of 16.
A sample Dot Pattern Code is shown below. Six bits represent the dot pattern.
Input Byte
Bit 6 5 4 3 2 1 0
1 1 1 0 1 0 1
Output Dot Pattern
0 1 2 3 4 5
Always a 1 for dot pattern codes
The clear arrows indicate dot-to-bit translation.
The solid black arrows indicate bit-to-dot output.
Figure 5. Sample Dot Pattern Code
40
Plot Mode
Plot data is received as binary code that represents the dot pattern to be printed, as shown above. If you do not have a table of the various dot patterns possible with their decimal and hexadecimal equivalents, you can use the following method to compute the numeric equivalents.
First, plot out the dot pattern, then convert the six dot pattern to a six-bit binary number (0 for no dot and 1 for a dot). For example:
1 0 1 0 1 1
Figure 6. Sample Bit Pattern
Now reverse the order of the binary digits. The leftmost dot position (most significant bit) becomes the least significant bit and so on.
101011
Ö
101011
Convert the new binary number, 110101, to whatever number system you use
(octal, decimal, hexadecimal, etc.) to send the code to the printer. The host computer then retranslates the numbers you use back to their binary equivalents for transmission to the printer.
41
Chapter 1
Tally ANSI
Plotting Dot Patterns
To construct the data code for a specific dot pattern and have the printer print that dot pattern, refer to the table below and perform the procedure that follows.
Dot Pattern
D c
D
Table 13. Dot Patterns and Identifiers
CODE
Dot Pattern
ASCII HEX DEC
@ 40 64
CODE
ASCII HEX DEC
‘ 60 96
A 41 65 g 61 97
42
43
44
66
67
68 b d d
62
63
64
98
99
100
K
L
I
J
E
F
G
H
M
N
O
49
4A
4B
4C
45
46
47
48
4D
4E
4F
73
74
75
76
69
70
71
72
77
78
79 k l j i e f g h m n o
69
6A
6B
6C
65
66
67
68
6D
6E
6F
105
106
107
108
101
102
103
104
109
110
111
P
Q
50
51
80
81 p q
70
71
112
113
42
Plot Mode
Dot Pattern
Table 13. Dot Patterns and Identifiers
CODE
Dot Pattern
ASCII HEX DEC
R 52 82
CODE
ASCII HEX DEC
r 72 114
S 53 83 s 73 115
]
^
_
\
[
Y
Z
W
X
T
U
V
54
55
56
57
58
59
5A
5B
5C
5D
5E
5F
84
85
86
87
88
89
90
91
92
93
94
95 t u v w x y z
|
{
}
~
DEL
7D
7E
7F
79
7A
7B
7C
74
75
76
77
78
125
126
127
121
122
123
124
116
117
118
119
120
1.
Find the desired dot pattern from the two dot pattern columns.
2.
Look to the right of the dot pattern and determine the number for this
particular dot pattern. Table 13 provides the ASCII, Hexadecimal, and
Decimal equivalent. Whatever code you use, this number becomes the dot-pattern designator.
43
Chapter 1
Tally ANSI
3.
Send the Enter Plot Mode escape sequence followed by the dot-pattern designator (ASCII = u), like this:
ESC
1B
[
5B
<
3C
3
33 h
68 u
75
The desired dot pattern will print one time.
Repeating a Pattern
To repeat a dot pattern, add the desired number of repetitions after the dotpattern designator. When no repetitions are designated, the printer defaults to
1 and the dot pattern will be printed 1 time. For repetitions of 15 or fewer, the
ASCII codes used to designate the number of repetitions begin with Sp (0) and continue through to the / (15).
In the example that follows the table, we show the sequence of actions required to compose an ASCII data code.
Table 14. Repetition Conversion Table
Repetitions
1–15
12
13
14
15
10
11
8
9
6
7
4
5
2
3
0
1
ASCII
Value
/
.
,
–
*
+
(
)
&
‘
$
%
“
#
Sp
!
Multiples of 16
00
16 x 1 = 16
16 x 2 = 32
16 x 3 = 48
16 x 4 = 64
16 x 5 = 80
16 x 6 = 96
16 x 7 = 112
16 x 8 = 128
16 x 9 = 144
16 x 10 = 160
16 x 11 = 176
16 x 12 = 192
16 x 13 = 208
16 x 14 = 224
16 x 15 = 240
ASCII
Value
>
?
<
=
;
:
8
9
6
7
4
5
2
3
0
1
44
Plot Mode
For example, if you wanted to print a pattern 10 times you would look up 10 in the repetition column above; the ASCII character that corresponds to 10 is an asterisk (*). Therefore, placing an asterisk after a dot-pattern designator would cause the printer to repeat the pattern 10 times.
For numbers greater than 15, you must send a two-byte code:
•
Byte 1 = (the remainder of the number of desired repetitions) ÷ 16
•
Byte 2 = (number of desired repetitions)
— (largest possible multiple of 16 that will result in a positive integer or 0)
The maximum number of times a dot pattern may be repeated per request is
255. The ASCII characters that are used to represent multiples of 16 are 0–?
(HEX 30–3F).
Example:
To send 70 repetitions, you must first find the largest multiple of 16 that is less than or equal to 70, then subtract that number from 70 to find the remainder.
From the above table you can see that the largest multiple of 16 that is less than or equal to 70 is 64. Subtracting 64 from 70 gives us a result of 6. To find the ASCII equivalent of 6, use Figure 19. To compile the 2-byte code for 70 repetitions, remember, the remainder comes first. The result will be & for the remainder of 6, followed by 4 for the multiple of 16 (64).
ESC
1B
[
5B
<
3C
3
33 h
68 u
75
&
26
4
34
Stringing Commands Together
Different dot-pattern designators may be strung together in a single escape sequence to enable printing special graphics. To illustrate stringing designators together, we will use a single dot-pattern command repeated eight times and string together 6 of these commands. That escape sequence is:
ESC[<3h
A
1B 41
(
28
A
41
(
28
A
41
(
28
A
41
(
28
A
41
(
28
A
41
(
28
CRLF
0D0A
Where:
A = The dot pattern.
( = 8 repetitions of the dot pattern. (See Table 13 on page 42).
45
Chapter 1
Tally ANSI
This would result in the selected dot pattern being printed 48 times across the page. Or you may send just a single command that specifies that the selected dot pattern is to be printed 48 times:
ESC
1B
[
5B
<
3C
3
33 h
68
A
41
SP
20
3
33
CR
0D
LF
0A
The second escape sequence format is more economical and easier to use when stringing commands together, but either of the above commands would result in a horizontal line of 48 dots across the page.
Repeating either of the above command/CRLF sequences would cause printing of vertical bars across the page. For example, repeating either of the above sequences 100 times would result in:
The advantage of being able to string commands together is that it enables you to put commands for different dot patterns together in one escape sequence for designing special graphics to be printed on your printer. In the next example, the plot density has been set to 60 DPI by 60 DPI to show the dot pattern clearly. Sending the following escape sequence 20 times,
ESC[<3hA$1CRLFB$1CRLFD$1CRLFH$1CRLFP$1CRLF`$1CRLF will result in the following graphic:
46
Miscellaneous Functions
Plot Density
In Plot Mode, your printer will print in a variety of dot densities, both horizontally and vertically. The default density in Plot Mode is 100 dots per inch (DPI) in both the horizontal and vertical directions. To select a different density, use the escape sequence:
ESC
1B
[
5B n
1 n
1
;
3B n
2 n
2
!
21 q
71 where: n1 = Horizontal density in DPI. Valid values are 40, 48, 50, 72, 75, 80, 90,
96, 100, 120, 144, 150, 160, 180, 200, and 240.
n2 = Vertical density in DPI. Any value from 40 to 288 is allowed.
When you change the plot densities, they remain active until the printer is turned off or they are changed again.
To determine the number of dot patterns necessary to print a full line, multiply the line length by the horizontal DPI, then divide the total by 6 (each dot pattern = 6 bits).
Example:
If line length = 13.2" and DPI = 100, then
Total dots per line = 13.2 x 100=1320, and
Total dot patterns per line = 1320/6 = 220
Therefore, to print a full 13.2 inch line at 100 DPI you would have to send 220 dot patterns.
Shading effects can be created by printing different dot patterns in subsequent rows.
Miscellaneous Functions
Reset Printer to Powerup Settings
You can reset the printer to all its powerup settings by sending the escape sequence:
ESC
1B
~ = tilde
[
5B
6
36
~
7E
47
Chapter 1
Tally ANSI
Custom Message Display
You can create and send a message of up to 16 characters to the control panel display with the sequence:
ESC
1B
P
50
F
46 mess mess
ESC
1B
\
5C where: mess = The message to be displayed (up to 16 characters).
Any ASCII characters may be used for your custom display, but to avoid confusion, your message should be different from any of the standard messages. The message remains on the control panel display until the next operator action or an error occurs.
Example:
If the printer needs to be loaded with a different size of paper before printing correspondence, alert the operator to change paper by sending a Bell
Command and issuing the Custom Display Command immediately before the letter data. To display the message Change Paper on the control panel, the escape sequence would be:
ESC PF
C
h a n g e SP P a
1B5046 43 68 61 6E 67 65 20 50 61 p e r ESC\
70 65 72 1B5C
Save Current Configuration
This escape sequence allows you to save the Current Configuration to the
Powerup Configuration from the host computer.
ESC
1B
P
50
C
43
48
Miscellaneous Functions
Alternate Escape Sequences
Since some systems will not allow ESC (1B hex) to be sent as the escape function, you can substitute the following codes:
^
5E
OR
CR
0D
^
5E
CR
0D
LF
0A
But they must be placed in Column 1 (the left margin), and Alt ESC must be set to ENABLED through the control panel (see the Codes Category of the
Configuration Menu).
POSTNET Bar Codes
POSTNET Bar Code Mode allows you to make use of the mail handling systems that the United States Postal Service (USPS) has implemented. In addition, POSTNET Bar Codes allow you to take advantage of postal discounts available through USPS for mail pieces using POSTNET Bar
Codes for regular 5 digit, Zip+4, and Advanced Bar Code (ABC) zip codes.
The basic sequence is:
ESC
1B
P
50 b
62 data data
After entering POSTNET Mode, any ASCII characters can be sent. However, only the characters 0–9 will be printed. All others, except the reserved control codes and the Space character (Hex 20) are ignored. All reserved control codes, except the ESC (HEX 1B) and the HT (HEX 09) control codes, cancel
POSTNET Mode. After POSTNET Mode is canceled, the printer will perform the requested function, such as Line Feed or Form Feed.
The Space character can be used to space between bar codes. If placed inside a bar code, it will terminate the current bar code and cause the framing bar to print. Then the cursor will move the equivalent of one space. Additional spaces can be sent and the cursor position will move the requested number of spaces, then another bar code can be printed. Use the Space character between bar codes only.
The ESC Control Code is used in some applications to select different parameters while in POSTNET Mode.
49
Chapter 1
Tally ANSI
The HT Control Code is used while in POSTNET Mode to control horizontal space between bar codes. To use the HT Control Code, the procedure is:
If you are NOT going to use the Default Tabs, begin here:
1.
Clear all current Horizontal Tab settings.
2.
Set desired Horizontal Tabs.
If using the Default Tabs, begin here:
3.
Enter POSTNET Mode.
4.
Send data + HT....data + HT....
5.
Exit POSTNET Mode.
Example:
ESC
P
1B 50 b
62
9 9 9 9 9
39 39 39 39 39
HT 9 8 9 8
09 39 38 39 38
9 CR
39 0D
The above sequence would cause bar codes representing the digits 99999 and 98989 to print on the same line, spaced at whatever distance the
Horizontal Tabs designate, then the printer would exit the POSTNET Mode.
PLANET Bar Codes
PLANET is similar to POSTNET in "look and feel", and is intended to complement the use of POSTNET for mass mailers. For more information, see the PLANET Bar Code website, http://www.planetcodes.com/.
The escape sequence for printing PLANET bar codes is:
ESC
1B
P
50 f
62 data data
The syntax is the same as POSTNET.
50
Miscellaneous Functions
Emulation and Configuration Switching
In addition to being able to change emulations or configurations through the printer control panel, you can use this escape sequence to change emulations or configurations from your host computer.
Unlike changing emulations through the control panel, when this escape sequence is used to change emulations, it does not change the Powerup or
Alternate configurations that are currently loaded on the printer. The only configuration that is affected is the Current Configuration. The basic switching sequence is:
ESC
1B
[
5B
<
3C n n h
68 where: n = One of the selections from the list below.
10 = Powerup Emulation
11 = Default Emulation
13 = Epson Emulation
14 = Tally ANSI Emulation
15 = IBM Proprinter Emulation
16 = Genicom ANSI
17 = LG01 Emulation
18 = HP 2564C Emulation
19 = MTPL Emulation
20 = WinEmul
30 = Config 1
31 = Config 2
32 = Config 3
33 = Config 4
34 = Config 5
35 = Config 6
36 = Config 7
37 = Config 8
38 = Config 9
39 = Config 10
51
Chapter 1
Tally ANSI
Reserved Control Codes
In this emulation there are different combinations of reserved control codes you may use to control various aspects of printer operations. In addition, there are reserved control codes that are used "behind the scenes" in communication between the host computer and the printer, and in data handling protocols.
The table below lists the codes for the Tally ANSI Emulation. In addition, we show in which interface they are valid and give a basic explanation of their function.
Interface Key:
S = Serial
C = Centronics
In the Serial and Centronics interfaces, when an invalid control code is received, it is discarded.
ASCII
ETX*
ENQ*
ACK*
BEL
HT
LF
VT
FF
CR
SO
SI
DC1* (XON)
DC3* (XOFF)
NAK
Interface
S
S
S
S, C
S, C
S, C
S, C
S, C
S, C
S, C
S, C
S, C
S, C
S
Table 15. Tally ANSI Control Codes
Function
Signals the End of Text to the Printer.
Enquiry code sent by the computer to the printer.
Sent by the printer to indicate that there were no errors in the data transmission.
Sounds printer alarm for .5 seconds.
Moves the print position to the next horizontal tab stop.
Advances paper one line for printing or one row for plotting.
Advances paper to the next selected VFU Vertical Tab channel.
Advances the paper to the top of the next form.
Moves the print position to the left margin of the current line.
Selects the alternate character set for printing.
Selects the primary character set for printing.
When the data buffer is ready to accept more data, XON allows new data to be sent from the host computer.
XOFF stops data transmission from the host computer when the data buffer signals it is full.
Printer warns host that there was an error in the data transmission.
52
Escape Sequence Summary
ASCII
ESC
DEL
Interface
S, C
S, C
Table 15. Tally ANSI Control Codes
Function
Tells the printer that the data that follows is not to be printed but is to be interpreted as a control function.
The Delete Control Code defaults to the Rubout character. It can be used to delete characters in the buffer if your printer is setup properly. Call your technical support for set up procedure.
Escape Sequence Summary
The following escape sequences are supported:
Table 16. Tally ANSI Escape Sequence Summary
Sequence
ESC D
ESC H
ESC M
ESC P@
ESC PA
ESC PB
ESC PC
ESC PD
ESC PF msg
ESC \\
ESC PG
ESC PH
Function Description
Index
Forward
Set Tab
Index
Reverse
Align to Line
Boundary
Restore
Cursor
Position
Save Cursor
Position
Save
Powerup
Configuration
Upload
Configuration
Custom
Display
Config
Report
CalData
Report
Moves the paper forward one line with no change to the horizontal position.
Sets a tab stop at the current horizontal position.
Moves the paper backward one line with no change to the horizontal position. Requires the RevPap control panel parameter to be set to ON.
Moves the vertical position to the next line relative to top of form as defined by the current LPI setting.
Moves the print position to the beginning of the saved vertical position. If a reverse paper movement is required, RevPap must be ON.
Saves the current vertical position.
Saves the current configuration into the Powerup
Configuration.
Uploads the configuration and calibration reports to the host via the serial interface. Special for TUS Production.
Displays a message on the control panel display.
Causes a config report to be printed. Special for TUS
Production.
Causes a cal data report to be printed. Special for TUS
Production.
53
Chapter 1
Tally ANSI
Sequence
ESC Pb
ESC Pc or
ESC Pe
ESC Pd
ESC Pf
ESC, A
ESC ( xx
ESC - A
ESC) xx
ESC [ n z
ESC [ n w
ESC [ n m
ESC [ n t
ESC [ n u
ESC [ n q
ESC [ 3 g
ESC [ 0 g
ESC [ 6 ~
ESC [ cn !p
ESC [ cn !v
Table 16. Tally ANSI Escape Sequence Summary
Function Description
POSTNET
Mode
UK Post
Mode
KIX Mode
PLANET
Mode
Select G0
Character
Set
Select G1
Character
Set
Select LPI
Select CPI
Select
Attributes
Select From
Length
Set
Horizontal
Tabs
Clear
Horizontal
Tabs
Clear All
Tabs
Clear Current
Tab
Reset
VFU Channel
Command
Relative paper Motion
Causes the following digits to be printed as POSTNET bar codes.
Causes the following digits to be printed as UK postal bar codes. Special for Tally UK.
Causes the following digits to be printed as Dutch KIX postal bar codes. Special for Tally UK.
Causes the following digits to be printed as PLANET postal bar codes.
Selects the G0 character set.
Selects the G1 character set.
Selects lines per inch.
Selects characters per inch.
Selects bold, italics, overline, strikethrough, underline, subscript and superscript attributes. Also DP, Draft, Gothic,
Courier, OCR-A and OCR-B font styles and downloaded font.
Select form length. 2 to 255 lines, or 11 inches or 12 inches.
Sets horizontal tab stops.
Clears horizontal tab stops.
Clear all tab stops.
Clear a tab stop at the current horizontal position.
Resets to Powerup Configuration.
Performs a VFU channel move. If a reverse paper movement is required, RevPap must be ON.
Performs a relative paper move. If a reverse paper movement is required, RevPap must be ON.
54
Escape Sequence Summary
Table 16. Tally ANSI Escape Sequence Summary
Sequence Function Description
ESC [ n !s
ESC [ n sp B
ESC [ n1;n2 !q
Select
Character
Sets
Select
Character
Size
Select Plot
Density
Selects the primary (G0) and alternate (G1) fonts and character sets (languages).
Selects the character height and width.
Selects the horizontal and vertical plot densities. Also selects shuttle speed and spacing (speed and spacing options are undocumented).
Set Margins Sets the left and right margins in 1/120ths.
Partial Line Performs a partial (half) line advance up or down.
ESC [n “s
ESC [ n sp p
ESC [ f
ESC [ < 1 h
ESC [ < 1 l
ESC [ < 2 h
ESC [ < 2 l
ESC [ < 3 h
ESC [ < 3 l
Reverse FF Backs paper up to the previous TOF. RevPap must be ON.
VFU
Download
Begins and ends a VFU download.
Font
Download
Plot Mode
Begins and ends a font download.
Begins and ends plot mode.
ESC [ < 6 h
ESC [ < 6 l
ESC [ < n h
Proportional
Spacing
Begins and ends proportional spacing.
Emulation &
Configuration
Switching
Changes emulations when n = 10 - 39
ESC [ < n sp h Variable Line
Spacing
Sets the line advance distance in 1/720ths.
55
advertisement
Related manuals
advertisement
Table of contents
- 9 Tally ANSI
- 9 Character Definition And Format
- 25 Page Formatting
- 32 Paper And Print Position Movement
- 38 Plot Mode
- 47 Miscellaneous Functions
- 52 Reserved Control Codes
- 53 Escape Sequence Summary
- 56 Genicom ANSI
- 56 Emulation Definition
- 90 Emulation Exceptions
- 92 Emulation Enhancements
- 92 Printronix P5000
- 92 Printronix P6000
- 93 Printronix P600
- 93 HP 2564C
- 96 Emulation Enhancements
- 96 DEC LG01
- 97 Epson FX-1180
- 100 IBM Proprinter III XL
- 101 MTPL
- 101 Emulation Differences
- 104 Emulation Enhancements
- 104 PJL
- 107 MT660 Industrial Graphics
- 107 QMS Code V
- 107 Printronix Graphics Language
- 109 Filter Structure and Logic
- 110 Filter Procedure for Matching Targets
- 111 Target Matching Rules
- 112 Building, Testing, and Implementing Intellifilter
- 112 IFILTER.EXE
- 113 BUILDLOD.EXE
- 115 TallyGenicom Customer Support Center
- 115 TallyGenicom Supplies Department
- 116 Corporate Offices