The text of a manual · part 18 of 24
A758 USB Thermal Receipt and Impact Slip Printer: Owner's Guide, pages 171 to 180
Pages 171 to 180 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 171
Chapter 7: Programming Guide 163
Convert 6 Dots/mm Bitmap to 8 Dots/mm Bitmap ASCII: AX EOT n Hexadecimal: 1F 04 n Decimal: 31 04 n Value:
0 = Off 1 = On
Default :
0 (Off)
Selects or cancels 6 dot/mm A756 Graphic Emulation in A758 Native Mode. When the 6-dot/mm emulation is selected, logos and graphics are expanded horizontally and vertically during download to emulate their size on a 6dot/mm printer. The horizontal positioning commands also emulate positioning on a 6-dot/mm printer. Exception: This command is available in A758 Native Mode only.
A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide
189-9200399 Rev.A
A758-D100 12/04
Page 172
164 Chapter 7: Programming Guide
Status Commands Status Command Introduction The A758 has three methods of providing status to the application. These methods are through Batch Status Commands, Real Time Status Commands, and Auto Status Back. An application may use one or more of these methods to understand the current status of the printer. A brief description of each of these methods follows. Batch Status Commands – These commands are sent to the printer and stored in the printer’s buffer. Once the printer has processed all the previous commands these commands are processed and the proper status is returned to the application. In the event a condition causes the printer to go BUSY, it stops processing commands from the printer buffer. If a Batch Status Command remained in the buffer during this busy condition, it would not be processed. In fact, no Batch Commands are processed while the printer is in this state. Real-Time Commands – These commands are sent to the printer and are NOT stored in the printer’s buffer. Instead, they are acted on immediately (regardless of the printer’s BUSY status) and their response (if any) is returned to the application. This gives the application the ability to query the printer when it is in a busy state in order to correct whatever fault has occurred. Auto Status Back – This mechanism allows the application developer to program the printer to automatically respond with a four-byte status when certain conditions in the printer change. Please see the subsequent sections for a more detailed description of these status commands. At the end of this Status Commands section is a page entitled “Recognizing Data from the Printer”. This describes how to interpret what command or setting (in the case of Auto Status Back) triggered a response from the printer.
A758-D100 12/04
189-9200399 Rev.A
A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide
Page 173
Chapter 7: Programming Guide 165
Batch Mode For RS-232C printers, these commands enable the printer to communicate with the host computer following the selected handshaking protocol, either DTR/DSR or XON/XOFF. They are stored in the printer's data buffer as they are received, and are handled by the firmware in the order in which they are received. When a fault occurs, the printer will go busy at the RS-232C interface and not respond to any of the Batch Mode Printer Status commands. If the fault causing the busy condition can be cleared, such as by loading paper, or letting the thermal printhead cool down, the printer will resume processing the data in its receive buffer. Transmit Peripheral Device Status ASCII: ESC u 0 Hexadecimal: 1B 75 0 Decimal: 27 117 0 Bit 0 Return Value: 1 = Drawer 1 closed 0 = Drawer 1 open
Bit 1 1 = Drawer 2 closed 0 = Drawer 2 open
(Bits 2-7 are not used) Transmits current status of the cash drawers. One byte is sent to the host computer. In DTR/DSR protocol the printer waits for DSR = SPACE. If a drawer is not connected, the status will indicate it is closed. Exception: Unlike the A756, that had a dedicated connector and resultant dedicated status reporting for each cash drawer. The A758 has a single connector that shares data reporting from either cash drawer. When either cash drawer is opened, an open status is reported by the printer.
A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide
189-9200399 Rev.A
A758-D100 12/04
Page 174
166 Chapter 7: Programming Guide Request Alternate Status (Parallel Only) ASCII: ESC u n Hexadecimal: 1B 75 n Decimal: 27 117 n Value and Range of n: Value of n
Function
Description
00
Drawer 1
High = Open Low = Closed or Not Present
01
Drawer 2
High = Open Low = Closed or Not Present
02
Paper Low (Not Implemented. Interpreted as Paper Out.)
High = Paper Out Low = Paper Present
03
Paper Out (Default)
High = Paper Out Low = Paper Present
>03
Ignored, No Change
Printer Does Not Stay BUSY1
1PAPER EXHAUST LINE is valid to indicate previously requested status.
This command allows the printer to inform the host when the data in the buffer has been processed, when the IEEE 1284 interface is in unidirectional mode. When this command is sent to the printer, the printer goes “Busy” until all data that has been sent to the printer has been processed. The PAPER EXHAUST line shows the status for the cash drawer or receipt paper as shown in the table. Status information is limited to what can be sent by the dedicated lines: BUSY, ACK, PAPER EXHAUST, and FAULT.
A758-D100 12/04
189-9200399 Rev.A
A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide
Page 175
Chapter 7: Programming Guide 167 Transmit Printer Status ASCII: ESC v Hexadecimal: 1B 76 Decimal: 27 118 Sends status data to the host computer. The printer sends one byte to the host computer when it is not busy or in a fault condition. In DTR/DSR protocol, the printer waits for DSR = SPACE. Status Byte (RS-232C) Bit Function
0 Signifies
1 Signifies
0
Receipt Paper
Ok
Low
1
Receipt Cover or Front Cover
Closed
Open
2
Receipt Paper
Ok
Out
3
Always Zero
4
Always Zero
5
Slip Leading Edge Sensor
Not Covered
Covered
6
Slip Trailing Edge Sensor
Not Covered
Covered
7
Always Zero
Ok
Always Zero*
Always Zero*
Related Information: See Real Time Commands, in this document for details about fault condition reporting. * The printer does not process ESC v until an error condition is cleared.
A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide
189-9200399 Rev.A
A758-D100 12/04
Page 176
168 Chapter 7: Programming Guide Transmit Printer ID ASCII Hexadecimal Decimal
GS I n 1D 49 n 29 73 n
Value of n
1, 49 = Printer model ID 2, 50 = Type ID 3, 51 = ROM version ID
Transmits the printer ID specified by n as follows: N
Printer ID
Specification
ID (hexadecimal)
1, 49
Printer model ID
TPG, Inc. A758
0x28 (A758 Native Mode)
1, 49
Printer model ID
TPG, Inc. A756
0x26 (A756 Emulation)
2, 50
Type ID
Installed options
Refer to the table below
3, 51
ROM version ID
ROM version
0x00
4, 52
Logo Definition
Logo Definition
Refer to table below
Type ID (n=2) Bit
Off/On
Hex
Decimal
Function
0
Off
00
0
No two-byte character code installed.
On
01
1
Two-byte character code installed.
Off
00
0
No knife installed.
On
02
2
Knife installed.
2
-
-
-
Undefined
3
Off
00
0
No MICR installed.
On
08
8
MICR installed.
4
Off
00
0
Not used. Fixed to Off.
5
-
-
-
Undefined
6
-
-
-
Undefined
7
Off
00
0
Not used. Fixed to Off.
1
Type ID (n=4)
A758-D100 12/04
Bit
Off/On
Hex
Decimal
Function
0
Off
00
0
No logo definition loaded by application.
On
01
1
Logo loaded by application.
1
-
-
-
Undefined
2
-
-
-
Undefined
3
-
-
-
Undefined
4
Off
00
0
Not used. Fixed to Off.
5
-
-
-
Undefined
6
-
-
-
Undefined
7
Off
00
0
Not used. Fixed to Off.
189-9200399 Rev.A
A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide
Page 177
Chapter 7: Programming Guide 169 Transmit Printer ID, Remote Diagnostics Extension ASCII: GS I @ n Hexadecimal: 1D 49 40 n Decimal: 29 73 64 n Values of n:
Refer to table
Range of n:
32 – 255 (not all defined but reserved)
Performs the remote diagnostic function specified by n. Eighteen remote diagnostic items are defined: eight printer ID items and ten printer tally items. A group of four remote diagnostic functions is assigned to each diagnostic item. Most of the diagnostic items are maintained in non-volatile memory (NVRAM), but some are maintained in read-only memory (ROM). The table that follows describes the variables. The first item group in the table includes an example of data to send and to receive. Data sent from the host to write to NVRAM must contain all digits required by the remote diagnostic item. All data must be ASCII. The printer returns all ASCII data. It is preceded by the parameter n to identify the diagnostic item and is followed by a Carriage Return (0D) to signify the end of the data. The command performs the remote diagnostic function specified by n as described in the following table. Value of n ASC Hex
Dec
Space 20
32
Remote Diagnostic Item
Function
Serial #,
Write to NVRAM Example, send 14 bytes to printer: GS I @ 0x20 1234567890
10 digit ASCII !
21
33
Serial #
Write to NVRAM, and print on receipt to verify Example, send 14 bytes to printer: GS I @ ! 1234567890 This will print on receipt: Serial # written: 1234567890
“
22
34
Serial #
Not available, cannot clear Serial # item
#
23
35
Serial #
Return Serial #, preceded by n to identify Printer returns 12 bytes in above example: #1234567890<CR>
$
24
36
Class/model #, 15 digit ASCII
Write to NVRAM
%
25
37
Class/model #
Write to NVRAM, and print on receipt to verify
‘
27
39
Class/model #
Return Class/model #, returns 17 bytes
+
2B
43
Boot firmware part #, 12 digit ASCII
Return Boot firmware part #, returns 14 bytes
/
2F
47
Boot firmware CRC, 4 digit ASCII
Return Boot firmware CRC, returns 6 bytes
3
33
51
Flash firmware part #, 12 digit ASCII
Return Flash firmware part #, returns 14 bytes
7
37
55
Flash firmware CRC, 4 digit ASCII
Return Flash firmware CRC, returns 6 bytes
A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide
189-9200399 Rev.A
A758-D100 12/04
Page 178
170 Chapter 7: Programming Guide
Value of n ASC Hex
Dec
Remote Diagnostic Item
Function
Ç
80
128
Receipt lines tally, 8 digit ASCII numeric, max 99,999,999
Write to NVRAM Example, send 12 bytes to printer: GS I @ Ç00010000 To set receipt lines tally to 10,000
ü
81
129
Receipt lines tally
Write to NVRAM, and print on receipt to verify Example, send 12 bytes to printer: GS I @ ü00010000 This will print on receipt: Receipt tally written: 10,000
é
82
130
Receipt lines tally
Clear receipt lines tally to 0
â
83
131
Receipt lines tally
Return receipt lines tally, preceded by n to identify Printer returns 10 bytes in above example: â00010000<CR>
ä
84
132
Knife cut tally, 8 digit ASCII numeric, max 99,999,999
Write to NVRAM
à
85
133
Knife cut tally
Write to NVRAM, and print on receipt to verify
å
86
134
Knife cut tally
Clear knife cut tally to 0
ç
87
135
Knife cut tally
Return knife cut tally, returns 10 bytes
ê
88
136
Slip character tally, 8 digit ASCII numeric, max 99,999,999
Write to NVRAM
ë
89
137
Slip character tally
Write to NVRAM, and print on receipt to verify
è
8A
138
Slip character tally
Clear slip character tally to 0
ï
8B
139
Slip character tally
Return slip character tally, returns 10 bytes
î
8C
140
MICR read tally, 8 digit ASCII numeric, max 99,999,999
Write to NVRAM
ì
8D
141
MICR read tally
Write to NVRAM, and print on receipt to verify
Ä
8E
142
MICR read tally
Clear MICR read tally to 0
Å
8F
143
MICR read tally
Return MICR read tally, returns 10 bytes
É
90
144
Hours on tally, 8 digit ASCII numeric, max 99,999,999
Write to NVRAM
æ
91
145
Hours on tally
Write to NVRAM, and print on receipt to verify
Æ
92
146
Hours on tally
Clear Hours on tally to 0
ô
93
147
Hours on tally
Return Hours on tally, returns 10 bytes
ù
97
151
Boot firmware version
Return Boot firmware version, returns 6 bytes
ú
A3
163
Flash firmware version
Return Flash firmware version, returns 6 bytes
A758-D100 12/04
189-9200399 Rev.A
A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide
Page 179
Chapter 7: Programming Guide 171
Value of n ASC Hex
Dec
Remote Diagnostic Item
Function
ñ
A4
164
Flash cycles tally, 8 digit ASCII numeric, max 99,999,999
Write to NVRAM
Ñ
A5
165
Flash cycles tally
Write to NVRAM, and print on receipt to verify a
A6
166
Flash cycles tally
Clear Flash cycles cut tally to 0
ο
A7
167
Flash cycles tally
Return Flash cycles cut tally, returns 10 bytes
¿
A8
168
Knife jams tally, 8 digit ASCII numeric, max 99,999,999
Write to NVRAM
┌
A9
169
Knife jams tally
Write to NVRAM, and print on receipt to verify
┐
AA
170
Knife jams tally
Clear Knife jams tally to 0
½
AB
171
Knife jams tally
Return Knife jams tally, returns 10 bytes
¼
AC
172
Cover openings tally, 8 digit ASCII numeric, max 99,999,999
Write to NVRAM
¡
AD
173
Cover openings tally
Write to NVRAM, and print on receipt to verify
«
AE
174
Cover openings tally
Clear Cover openings tally to 0
»
AF
175
Cover openings tally
Return Cover openings tally, returns 10 bytes
█
B2
178
Max Temperature tally
Set Max temp tally to -273
|
B3
179
Max Temperature tally
Return Max Temperature tally, returns 10 bytes
┤
B4
180
Slip lines tally, 8 digit ASCII numeric, max 99,999,999
Write to NVRAM
╡
B5
181
Slip lines tally
Write to NVRAM, and print on receipt to verify
╢
B6
182
Slip lines tally
Clear Slip lines tally to 0
╖
B7
183
Slip lines tally
Return Slip Lines tally, returns 10 bytes
A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide
189-9200399 Rev.A
A758-D100 12/04
Page 180
172 Chapter 7: Programming Guide Transmit Status ASCII: GS r n Hexadecimal: 1D 72 n Decimal: 29 114 n Value of n:
1, 49 = printer status 2, 50 = cash drawer status 3, 51 = slip paper status 4, 52 = Flash Memory status
Transmits the status specified by n. This is a batch mode command which transmits the response after all prior data in the receive buffer has been processed. There may be a time lag between the printer receiving this command and transmitting the response, depending on the receive buffer status. When DTR/DSR RS-232C communications handshaking control is selected, the printer transmits the one-byte response only when the host signal DSR indicates it is ready to receive data. When XON/XOFF RS-232C communications handshaking control is selected, the printer transmits the one-byte response regardless of the host signal DSR. When Auto Status Back (ASB) is enabled using the Enable/Disable Automatic Status Back command (1D 61), the status transmitted by this command (Transmit Status) and the ASB status must be differentiated according to the information found in Recognizing Data from the Printer. This is found in the Real Time Commands section of this document. The status bytes to be transmitted are described in the following four tables. Printer Status (n = 1 or n = 49) Bit Off/On Hex Decimal
Status for Transmit Status
0
Off On
00 01
0 1
Receipt paper adequate. Receipt paper low.
1
Off On
00 02
0 2
Receipt paper adequate. Receipt paper low.
2
Off On
00 04
0 4
Receipt paper present. Receipt paper exhausted.
3
Off On
00 08
0 8
Receipt paper present. Receipt paper exhausted.
4
Off
00
0
Not used. Fixed to off.
5
Off
00
0
Slip leading edge sensor: paper present
On
20
32
Slip leading edge sensor: no paper.
Off
00
0
Slip trailing edge sensor: paper present
On
40
64
Slip trailing edge sensor: no paper.
Off
00
0
Not used. Fixed to off.
6
7
(Transmit Status - continued on the next page)
A758-D100 12/04
189-9200399 Rev.A
A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide