The text of a manual · part 17 of 24
A758 USB Thermal Receipt and Impact Slip Printer: Owner's Guide, pages 161 to 170
Pages 161 to 170 of 235
The original document is the PDF (3.8 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Axiohm A758
Page 161
Chapter 7: Programming Guide 153
Select Character Size ASCII: GS ! n Hexadecimal: 1D 21 n Decimal: 29 33 n Value of n:
1 - 8 = vertical number of times normal font 1 – 8 = horizontal number of times normal font
Range of n:
00 – 07, 10 – 17, … 70 – 77
Default of n:
0
Selects the character height using bits 0 to 2 and selects the character width using bits 4 to 7, as follows: Character Width Selection Hex Decimal Width
00
0
1 (normal)
10
16
2 (two times width)
20
32
3 (three times width)
30
48
4 (four times width)
40
64
5 (five times width)
50
80
6 (six times width)
60
96
7 (seven times width)
70
112
8 (eight times width)
Character Height Selection Hex Decimal Height
00
0
1 (normal)
01
1
2 (two times height)
02
2
3 (three times height
03
3
4 (four times height)
04
4
5 (five times height)
05
5
6 (six times height)
06
6
7 (seven times height)
07
7
8 (eight times height)
This command is effective for all characters (except for HRI characters). In Standard Mode, the vertical direction is the paper feed direction, and the horizontal direction is perpendicular to the paper feed direction. However, when character orientation changes in 90-degree clockwise-rotation mode, the relationship between vertical and horizontal directions is reversed. In Page Mode, vertical and horizontal directions are based on the character orientation. When characters are enlarged with different sizes on one line, all the characters on the line are aligned at the baseline. The Select Print Mode (1B 21 n) command can also select or cancel double-width and double-height modes. However, the setting of the last received command is effective. A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide
189-9200399 Rev.A
A758-D100 12/04
Page 162
154 Chapter 7: Programming Guide (Select Character Size - continued on the next page) Exceptions: If n is out of the defined range, this command is ignored. This command is only valid for the receipt station. This is only available in A758 Native Mode.
Select or Cancel White/Black Reverse Print Mode ASCII: GS B n Hexadecimal: 1D 42 n Decimal: 29 66 n Value of n:
0 = Off 1 = On (Only the lowest bit is used.)
Range of n:
0 – 255
Default of n:
0 (Off)
Turns on White/Black reverse printing mode. This command is only available in A758 Native Mode. In White/Black reverse printing mode, print dots and nonprint dots are reversed, which means that white characters are formed by printing a black background. When the White/Black reverse printing mode is selected it is also applied to character spacing, which is set by Right-Side Character Spacing (1B 20). This command can be used with built-in characters and user-defined characters, but does not affect the space between lines. White/Black Reverse Print Mode does not affect bit image, downloaded bit image, bar code, HRI characters, and spacing skipped by Horizontal Tab (09), Set Absolute Starting Position (1B 24…), and Set Relative Print Position (1B 5C). White/Black reverse mode has a higher priority than Underline Mode. When Underline Mode is on and White/Black Reverse Print Mode is selected, Underline Mode is disabled, but not canceled. Exceptions: This command is only valid on the receipt station. This is only available in A758 Native Mode.
A758-D100 12/04
189-9200399 Rev.A
A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide
Page 163
Chapter 7: Programming Guide 155
Select Superscript or Subscript Modes ASCII: AX ENQ n Hexadecimal: 1F 05 n Decimal: 31 05 n Value of n:
0 = Normal character size 1 = Select subscript size 2 = Select superscript size
Default:
0 (normal size)
Turns superscript or subscript modes on or off. This attribute may be combined with other characters size settings commands ( 12, 13, 1B 21 n, 1D 21 n, …) This command is only available on the receipt station in A758 Native Mode. Exceptions: This command is ignored if n is out of the specified range. This is only available in A758 Native Mode.
Summary of Rotated Printing The table shows the combinations of Set/Cancel Upside-Down Print, Set/Cancel Rotated Print (clockwise), and Rotated Print (counterclockwise). Rotated CCW is mutually exclusive with the other two commands. Unintended consequences may result when rotated CCW is mixed with other commands. The samples of the print show only the normal size characters. Double-wide and double-high characters are printed in the same orientation. Double-high characters cannot be printed on the slip station. They may also be mixed on the same line. Upside Down (1B 7B n)
Rotated CW (1B 56 n)
Rotated CCW (1B 12)
Resulting Output
Canceled
Canceled
Cleared
A BC
Canceled
Set
X
C B A
Set
Canceled
X
Set
Set
X
X
X
Set
A B C
C B A
A BC
Note:
The following print modes cannot be mixed on the same line:
♦
Standard and compressed pitch
♦
Vertical (normal) and rotated
♦
Right-side up and upside down
♦
Single high (normal) and double high
A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide
189-9200399 Rev.A
A758-D100 12/04
Page 164
156 Chapter 7: Programming Guide
Graphics Commands These commands are used to enter and print graphics data and are described in order of their hexadecimal codes.
Download BMP Logo ASCII: ESC (+*.BMP file) Hexadecimal: 1B (+*.BMP file) Decimal: 27 (+*.BMP file) Value:
Maximum width = Maximum height =
576 512
Enters a BMP file into RAM or Flash. This command is used by sending the hexadecimal file data (not file name) of a monochrome BMP file preceded by a 0 x 1B. The bit map is stored in the printer in the same manner as a down loaded bit image. The downloaded BMP file can be printed by using the Print Downloaded Bit Image (1D 2F m) command. Exceptions: BMP file images that are not monochrome are ignored. This command is only valid for the receipt station. This is only available in A758 Native Mode. Related Information: See 1D 22 n (Select Memory Type to save logos.)
Select Bit Image Mode ASCII: ESC * m n1 n2 d1 ... dn Hexadecimal: 1B 2A m n1 n2 d1 ... dn Decimal: 27 42 m n1 n2 d1 ... dn Sets the print resolution and enters one line of graphics data into the print buffer. Excess data is accepted but ignored. Any print command is required to print the data, after which the printer returns to normal processing mode. See the illustration graphic representation of the bit image. In A756 Emulation Mode, slip graphics are only 7- bit (MSB not printed.) In A758 Native Mode, slip graphics are 8-bit. (Select Bit Image Mode - continued on the next page)
A758-D100 12/04
189-9200399 Rev.A
A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide
Page 165
Chapter 7: Programming Guide 157 Values: Receipt Station No. of Dots (Vertical)
No. of Dots (Horizontal)
Number of Dots/Line
8 Dot Single Density
8 (68 DPI)
0 – 288 (101 DPI)
8 x 288
1
8 Dot Double Density
8 (68 DPI)
0 – 576 (203 DPI)
8 x 576
32
24 Dot Single Density
24 (203 DPI)
0 – 288 (101 DPI)
24 x 288
33
24 Dot Double Density
24 (203 DPI)
0 – 576 (203 DPI)
24 x 576
Value of m
Mode
0
Slip Station Value of m
Mode
No. of Dots** (Vertical)
No. of Dots (Horizontal)
Number of Dots/Line
0
7 Dot Single Density
7 (72 DPI)
330 (69.5 DPI)
7 x 330
1*
7 Dot Double Density
7 (72 DPI)
660 (139 DPI)
7 x 660
32, 33
Not Available on Slip
In single density, one byte (7 dots) is printed in each full dot column; in double density, one byte is printed in each half/full dot column. *Adjacent horizontal dots (overlapping dots) are not printed on the slip. **In A758 Native Mode. There are 8 vertical dots. Value of n (8-Dot Single-Density Mode)
Value of n (24-Dot Single-Density Mode)
Value of d n1 + (256 x n2)
3 x [n1 + (256 x n2)]
Number of Bytes of Data*
*Printed left to right (8-dot mode); Printed down then across (24-dot mode). Formulas: 8 Dot Single Density 24 Dot Single Density n1 + (256 x n2) 3 x [n1 + (256 x n2)]
(Select Bit Image Mode - continued on the next page)
A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide
189-9200399 Rev.A
A758-D100 12/04
Page 166
158 Chapter 7: Programming Guide 8-Dot Single-Density Mode
Receipt and Slip
Top of Bit Image d1 d2 d3 d4 dn
Receipt
Slip
MSB
MSB dn dn
LSB
LSB Most Significant Bit Is Not Printed In A756 Emulation
24-Dot Single-Density Mode - Receipt Only Top of Bit Image d1 d4 d7 MSB d2 d5 dn d3 d6 dn LSB
A758-D100 12/04
189-9200399 Rev.A
A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide
Page 167
Chapter 7: Programming Guide 159
Select Double-Density Graphics ASCII: ESC Y n1 n2 d1 … dn Hexadecimal: 1B 59 n1 n2 d1 ... dn Decimal: 27 89 n1 n2 d1 ... dn or or or
ESC L n1 n2 d1 ... dn 1B 4C n1 n2 d1 … dn 27 76 n1 n2 d1 ... dn
Value of n: Value of n (8-Dot Single Density Mode)
Value of n (24-Dot Single Density Mode)
n1 + (256 x n2)
3 x [n1 + (256 x n2)]
Value of d
Number of Bytes of Data (Printed Down, Then Across)
Enters one line of 7 (slip in A756 mode) or 8-dot double-density graphics into the print buffer. Any print command is required to print the line, after which the printer returns to normal processing mode. The number of bytes sent is represented by the formulas in the table. Each bit corresponds to one horizontal dot. Compare to Set Bit Image Mode (1B 2A, m=1) earlier in this document. Exception: 1B 4C n1 n2 d1 … dn is only valid in A756 Emulation Mode.
Select the Current Logo (Downloaded Bit Image) ASCII: GS # n Hexadecimal: 1D 23 n Decimal: 29 35 n Range of n:
0 – 255
Selects a logo to be defined or printed. The active logo n remains in use until this command is sent again with a different logo n. When this command precedes a logo definition, that definition is stored in Flash Memory as logo n. If there is already a different definition in Flash Memory for logo n, the first is inactivated and the new definition is used. The inactive definition is not erased from Flash and continues to take up space in Flash Memory. When this command precedes a logo print command and n is different from the previously active logo selected, the printer retrieves the logo definition for n from Flash Memory and prints it. If there is no definition for logo n, then no logo is printed. In the case of a previously existing application that expects only one possible logo, the printer will not receive the Select Current Logo (1D 23 n) command. In this case, the printer assigns 0 as the active logo identifier. It automatically stores any new logo definition in Flash Memory as logo 0, inactivating any previous logo 0 definition. If the Flash Memory space available for logos fills up with inactive logo 0 definitions, the firmware erases the old definitions at the next power cycle. This is the only case in which the printer erases Flash Memory without an application command. In the case of a new application using multiple logos, the Select Current Logo (1D 23 n) command is used. After that, the printer no longer automatically erases the logo definition Flash Memory page when it fills with multiple definitions. A A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide
189-9200399 Rev.A
A758-D100 12/04
Page 168
160 Chapter 7: Programming Guide new application using multiple logos, writing a user-defined character set into Flash Memory, or both, is responsible for erasing the logo and user-defined character set Flash Memory page when the logo area is full or before a new character set is defined. Exceptions: This command is only valid for the receipt station. However, it will be processed correctly regardless of whether the receipt station is currently selected.
Define Downloaded Bit Image ASCII: GS * n1 n2 d1 ... dn] Hexadecimal: 1D 2A n1 n2 d1 ... dn] Decimal: 29 42 n1 n2 d1 ... dn Value of n1: Value of n2: Value of d:
See the following table. See the following table. See the following table.
Value of n1
Value of n2
Value of d
1-56 (8 x n1 = Number of Horizontal Dot Columns)
1-64 (Number of Vertical Bytes)*
Bytes of Data (Printed Down Then Across)
*The number of bytes sent is represented by the following formula: n = 8 x n1 x n2 (n1 x n2 must be less than or equal to 4608). Enters a downloaded bit image (such as a logo) into RAM or Flash with the number of dots specified by n1 and n2 in A756 Emulation, unless loaded into Flash. The downloaded bit image is available until power is turned off, another bit image is defined, or either Initialize Printer (1B 40), or Define User-Defined Character Set (1B 26), command is received. By default, A756 Emulation loads downloaded bit image to SRAM, while A758 Native Mode loads them to Flash. See the illustration on the following page for a graphic representation of the downloaded bit image.
A758-D100 12/04
189-9200399 Rev.A
A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide
Page 169
Chapter 7: Programming Guide 161
C olum n
Top of G raphic
O ne R ow O ne
C olum n 72 x 8 M ax.
d d1 65 d2 MSB dn R ow 64 d M ax. 64 dn LSB
Exceptions: See the illustration for the Print Downloaded Bit Image command (1D 2F) for a representation of the bit image. Related Information: See 1D 22 n (Select Memory Type to store logos) and 1D 23 n (Select the Current Logo.)
A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide
189-9200399 Rev.A
A758-D100 12/04
Page 170
162 Chapter 7: Programming Guide
Print Downloaded Bit Image ASCII: GS / m Hexadecimal: 1D 2F m Decimal: 29 47 m Value and Range of m: Value of m
Print Mode
Vertical DPI1
Horizontal DPI*
0 1 2 3
Normal Double Wide Double High Quadruple
203 203 101 101
203 101 203 101
1Dot density measured in dots per inch
Prints a downloaded bit image in RAM or Flash on the receipt station at a density specified by m. It is ignored if any data is in the print buffer, if the downloaded bit image is undefined, or if the data defined exceeds one line. See the illustration for a representation of the bit image. Column
Top of Graphic
One
Column 72 x 8 Max.
Row One d1 d 65 d2 MSB dn Row 64 d Max. 64 dn LSB
Related Information: See 1D 22 n (Select Memory Type to store logos) and 1D 23 n (Select the Current Logo.)
A758-D100 12/04
189-9200399 Rev.A
A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide