The text of a manual · part 7 of 16
A760 Two-Color Thermal/Impact Hybrid Printer User Guide: Programming Supplement, pages 59 to 68
Pages 59 to 68 of 154
The original document is the PDF (2.3 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 TPG A760
Page 59
Revision F January 2010
A760 User Guide: Programming Supplement
59
Chapter 4: Programming commands
Select character size ASCII Hexadecimal Decimal
GS ! n 1D 21 n 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
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.
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)
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.
50
80
6 (six times width)
Exceptions
60
96
7 (seven times width)
70
112
8 (eight times width)
If n is out of the defined range, this command is ignored. This command is only valid for the receipt station.
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 is only available in A758 emulation and A760 native modes.
Page 60
60
Revision F January 2010
A760 User Guide: Programming Supplement Chapter 4: Programming commands
Select or cancel white/black reverse print mode ASCII Hexadecimal Decimal
GS B n 1D 42 n 29 66 n
Value of n:
0 = Off 1 = On (When 0 and 1 are the least significant bit, LSB)
Range of n:
0–255
Default:
0 (Off )
Turns on white/black reverse print mode. In white/black reverse print mode, print dots and non-print dots are reversed, which means that white characters are printed on a black background. When the white/black reverse print 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 print 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. Bar codes, logos, and bit images are not affected by this command. Exceptions
This command is only valid for the receipt station. This is only available in A758 emulation and A760 native modes.
Reverse color text mode (ColorPOS®) ASCII Hexadecimal Decimal
GS 0x85 m n 1D 85 m n 29 133 m n
Value of m:
0 = white 1 = black 2 = paper color
If m = n but not zero, the printer produces solid printing in the given color. This tactic can be used to minimize the firmware busy work.
Value of n:
0 = white 1 = black 2 = paper color
Default:
m = 0 (off )
The value of current color and white/black reserve print mode is superceded by the value of n whenever this mode is on (m>0).
Sets a mode for reverse printing effects on text. The background color is specified by m, while the text color is specified by n. Setting m = 0 turns off the mode.
Bar codes, logos, and bit images are not affected by this command.
Page 61
Revision F January 2010
A760 User Guide: Programming Supplement
61
Chapter 4: Programming commands
Text strike-through mode (ColorPOS®) ASCII Hexadecimal Decimal
GS 0x85 m n 1D 8D n m 29 141 n m
Value of m:
0 = retain same color as the character itself 1 = black 2 = paper color
Value of n:
standard cell height
Default:
n = 0 (off )
Prints a strike-through over characters. If the strikethrough is as wide as the cell height, this will produce a cell that will be printed as a solid current color.
When characters are greater than normal size, such as double-high, the number of character rows claimed by n also increases proportionally, such as doubling for doublehigh cells. Location of the strike-through on a cell is on a cell-by-cell basis, so mixing cell sizes on the same print row will give uneven results.
Select superscript or subscript modes ASCII Hexadecimal Decimal
AX ENQ n 1F 05 n 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 emulation and A760 native modes. Exceptions
This command is ignored if n is out of the specified range.
Page 62
62
Revision F January 2010
A760 User Guide: Programming Supplement Chapter 4: Programming commands
Graphics 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 66 77 (+*.BMP file) Value:
Maximum width = 576 (640 for 8.5 mm paper)
The downloaded BMP logo can be printed by using the print downloaded bit image (1D 2F m) command.
if user flash memory had filled up with inactive logo 0 definitions upon next power cycle). Warnings about the effect of running out of defined logo space during a download apply (i.e. the command is ignored). The application is required to manage user data space, downloaded font space, and logo space.
To downloaded BMP file to save it as a logo, send the hexadecimal code 1B followed by the whole BMP file.
After downloading a logo to the printer, wait 100 ms to allow the printer time to write the logo to flash.
The printer decodes the BMP file header and will save the image data after checking important parameters, such as:
The downloaded BMP file can be printer by using the print downloaded bit image (1D 2F m) command.
• • •
Exceptions
Maximum height = 512
Enters a downloaded BMP logo into RAM or flash.
Width, Height, Number of colors (only monochrome images are accepted)
BMPs and bit images continue to be definable only for the receipt station. However, there is no longer an automatic erasure whenever the user downloads a character set (as happened previously) as well as in the case where the current logo was never set > 0, (the automatic erasure
BMP file images that are not monochrome are put into the print buffer. This command is only valid for the receipt station. This is only available in A758 emulation and A760 native modes. Related information
Microsoft BMP bitmap file format.
Page 63
Revision F January 2010
A760 User Guide: Programming Supplement Chapter 4: Programming commands
Select bit image mode ASCII Hexadecimal Decimal
ESC * m n1 n2 d1 ... dn 1B 2A m n1 n2 d1 ... dn 27 42 m n1 n2 d1 ... dn
Value of m: Receipt Station Value of m
Mode
No. of dots (vertical)
No. of dots (horizontal)
No. of dots/line
0
8-Dot single-density
8 (68 DPI)
0–288 (101 DPI)
8 × 288
1
8-Dot double-density
8 (68 DPI)
0–576 (203 DPI)
8 × 576
32
24-Dot single-density
24 (203 DPI)
0–288 (101 DPI)
24 ×288
33
24-Dot double-density
24 (203 DPI)
0–576 (203 DPI)
24 × 576
Value of m
Mode
No. of dots (vertical)**
No. of dots (horizontal)
No. of dots/line
0
7-Dot single-density
7 (72 DPI)
330 (69.5 DPI)
7 × 330
1*
7-Dot double-density
7 (72 DPI)
660 (139 DPI)
7 × 660
32, 32
Not available on slip
Slip Station
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 emulation and A760 native modes, there are 8 vertical dots. Value of n: Value of n (8-dot single-density mode) Value of n (24-dot single-density mode) Value of d n1 + (256 × n2)
3 x [n1 + (256 × 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 × n2) 3 x [ n1 + (256 × n2)]
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 for graphic representations of the bit image on next page. In A756 emulation mode, slip graphics are only 7-bit (MSB not printed.) In A758 emulation and A760 native modes, slip graphics are 8-bit.
63
Page 64
64
Revision F January 2010
A760 User Guide: Programming Supplement Chapter 4: Programming commands 24-Dot single-density mode Top of bit image
8-Dot single-density mode
Receipt MSB
Top of bit image d1 d4 d7 MSB d1 d2 d3 d4 dn dn d2 d5 dn
LSB d3 d6 dn LSB
Select double-density graphics ASCII Hexadecimal Decimal
ESC Y n1 n2 d1 ... dn 1B 59 n1 n2 d1 ... dn 27 89 n1 n2 d1 ... dn or ESC L n1 n2 d1 ... dn or 1B 4C n1 n2 d1 ... dn or 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)]
Enters one line of 7 (slip in A756 mode) or 8-dot doubledensity 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.
Value of d Number of bytes of data (printed down, then across)
Each bit corresponds to one horizontal dots. Compare to set bit image mode (1B 2A, m=0) earlier in this document. Exception
1B 4C n1 n2 d1 ... dn is only valid in A756 emulation mode.
Page 65
Revision F January 2010
A760 User Guide: Programming Supplement
65
Chapter 4: Programming commands
Select the current logo (downloaded bit image) ASCII Hexadecimal Decimal
GS # n 1D 23 n 29 35 n
Range of n:
0 – 255
Default:
0
Selects a color or monochrome 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 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. Exception
This command is only valid for the receipt station, However, it will processed correctly, regardless of whether the receipt station is currently selected.
Page 66
66
Revision F January 2010
A760 User Guide: Programming Supplement Chapter 4: Programming commands
Define downloaded bit image ASCII Hexadecimal Decimal
GS * n1 n2 d1 ... dn] 1D 2A n1 n2 d1 ... dn] 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 1–64 (number of vertical bytes) horizontal dot columns)
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 in to flash. If in RAM, the downloaded bit image is available until power is turned off, another bit image is defined, or initialize printer (1B 40) command is received, or define user-defined character set (1B 26), command is received.
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.)
By default, A756 emulation loads downloaded bit image to SRAM, while A758 emulation and A760 native modes loads them to flash. See the illustration below for a graphic representation of the downloaded bit image. Exception Column one
Top of graphic
Column 72 x 8 max.
Row one d1 d 65 d2 MSB dn Row 64 d max. 64 dn LSB
Page 67
Revision F January 2010
A760 User Guide: Programming Supplement
67
Chapter 4: Programming commands
Print downloaded bit image ASCII Hexadecimal Decimal
GS / m 1D 2F m 29 47 m
Value and range of m:
This command is used to print a previously stored monochrome or color logo from printer memory on the receipt station. The logo is identified as the one indicated by the most recent select current logo command or 0 if a select current logo command has not yet been given. Parameter m is interpreted as follows: Value of m Print mode
Vertical DPI
Horizontal DPI
0
Normal
203
203
1
Double-wide
203
101
2
Double-high
101
203
3
Quadruple
101
101
The indexed downloaded bit image from RAM or flash will be printed on the receipt station at a size specified by m. If the bit image is a monochrome one, it is printed in the current color; otherwise it is printed as a two-color image. If doubling or quadrupling exceeds the print paper width maximums (576 or 640 with 82.5 mm paper) the left side of the image is printed and the bits to the right of the maximum column are discarded. If the available width is greater than the bit image, its printing will adhere to any currently set right, left, or center justification. This command is ignored if the index refers to an undefined logo/ bit image.
Print raster monochrome graphics (ColorPOS®) ASCII Hexadecimal Decimal
GS 0x82 n1…..n72 (576 dots) for 80 mm paper, or n80 (640 dots) for 82.5 mm paper 1D 82 n1…..n72 (576 dots) for 80 mm paper, or n80 (640 dots) for 82.5 mm paper 29 130 n1…..n72 (576 dots) for 80 mm paper, or n80 (640 dots) for 82.5 mm paper
Value and range of n: n1 to n72/n80 corresponds to one dot row data for a thermal receipt printer.
Each bit defines whether or not a dot of the current color will be printed. This command is used for printing a monochrome graphic in real-time. Offsets, page and any other modes or overlays, including watermark do not apply and are overridden by this command. A complete rendering of the intended final image should have been done by the application before sending the dot rows.
If two-color paper is indicated by the set paper type command, then the raster will be printed in the color that is defined by the set current color command.
��� ��
��
� ��
���
���
������
Page 68
68
Revision F January 2010
A760 User Guide: Programming Supplement Chapter 4: Programming commands
Print raster color graphics (ColorPOS®) ASCII Hexadecimal Decimal
GS 0x83 n1…..n144 (576 dots 80 mm paper) / n160 (640 dots, 82.5 mm paper) 1D 83 n1…..n144 (576 dots 80 mm paper) / n160 (640 dots, 82.5 mm paper) 29 13 n1…..n144 (576 dots 80 mm paper) / n160 (640 dots, 82.5 mm paper)
Value and range of n: n1 to n144 / n160 corresponds to one dot row data.
This command is used for printing a single raster of color graphics in real-time. Offsets, page and any other modes or overlays, including watermark, and current color do not apply to this command. A complete rendering of the intended final image has to be done by the application before sending the dot rows.
For each printed dot row starting at the top left, two-part bit strings are used to define (in the first half), all dots that are of either color (i.e. not white). The second half string defines only the dots where the color = black. Thus all dots which are on in the first half string but not on in the second half string, select the secondary color. The parameter of this command is thus a string of bytes for one dot row with the same structure as defined for the thermal color format file given in the download color logo command.
���
�
���
��
��
��
���
������
������������������
���
���
���
���
�������
��������������������