Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 9 of 16

A760 Two-Color Thermal/Impact Hybrid Printer User Guide: Programming Supplement, pages 79 to 88

Pages 79 to 88 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 79

Revision F January 2010

A760 User Guide: Programming Supplement

79

Chapter 4: Programming commands

This command configures into EEPROM (permanent configuration switch setting) one or two combinations of character attribute mappings, including substitute attribute settings for color effects. The attributes of the character code are used to form the desired pixel character when the code is placed into the raster print buffer. An “m” bit value set to on in the “original attribute mapped table” above will have its attributes set to the corresponding bit value of “s” in the “attributes substituted table”. If m = 0 then no substitution takes place. The command is available only in A760 native mode. Once attributes have been defined and enabled they can be used in any emulation mode. A760 native mode must be used to turn the feature off. The operational theory of this command is that if (input character attributes) AND (original) = (original); then (output character attributes) = ([original] XOR [input character attributes]) OR (substituted). The input character’s original attributes are mapped to the substituted attributes, but any attributes not specified for mapping are unchanged. In the tables you will see that there are 7 input attributes and 9 outputs. It is expected that the alternate color attribute will be used most. For example, when the alternate color attribute is combined with the reverse substitution attribute, the result is white characters on a color background. The color reverse attribute without alternate color will print black text on a color background. Any mappings utilizing compressed and/or double-wide attributes will effect the length of a line and could cause unintended line wraps. Mappings containing double-high attributes could cause unintended receipt lengths. When both attribute mappings are set, processing is perform in order sequence. When two text attribute substitutions contain conflicting dependent remappings, the result is undefined.

Related information

This command is utilized in the CognitiveTPG LogoEZ® utility. The utility can be used to pre-configure new printers with a default colorization setup without requiring any application changes. The default setup was designed to provide a general level of colorization features that would not affect the printer operation. You can expand beyond the default features of the utility by modifying the application at the host. However, do not attempt to modify the settings within the utility. f = 1: s = 1H a = 30H f = 2: s = 32H r = 19H f = 3: s = 1H r = 7H t = 1H f = 4: s = 30H a = A0H

Page 80

80

Revision F January 2010

A760 User Guide: Programming Supplement Chapter 4: Programming commands

Convert 6-dots/mm bitmap to 8-dots/mm bitmap ASCII Hexadecimal Decimal

AX EOT n 1F 04 n 31 04 n

Value:

0 = Off 1 = On (When 0 and 1 are the LSB)

Default:

0 (Off )

Selects or cancels 6-dot/mm A758 graphic emulation in A758 emulation or A760 native modes.

When the 6-dot/mm emulation is selected, logos and graphics are expanded horizontally and vertically during download to emulate their size on a 6-dot/mm printer. The horizontal positioning commands also emulate positioning on a 6-dot/mm printer. Exception

This command is available in A758 or A760 native modes only.

Enable constant speed logos ASCII Hexadecimal Decimal

US { n 1F 7B n 31 123 n

Value:

0 = disabled 1 = enabled

This command allows the firmware to determine the optimal speed to print a logo. It is set prior to downloading the logo and reset after the logo has been downloaded.

In general, the “Set max target speed (1D A0 nl nh)” is the preferred command.

Page 81

Revision F January 2010

A760 User Guide: Programming Supplement

81

Chapter 4: Programming commands

Status Status command introduction The A760 has three methods of providing status to the application. These methods are through batch status commands, real time status commands and unsolicited status mode. 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 stored in the printer buffer. Periodically, when the printer has time, it scans the input buffer looking for these commands. When found by the printer, these commands are processed immediately. 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.

Unsolicited status mode – 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 unsolicited status mode) triggered a response from the printer.

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.

Page 82

82

Revision F January 2010

A760 User Guide: Programming Supplement Chapter 4: Programming commands

Transmit peripheral device status (RS-232C printers only) ASCII Hexadecimal Decimal

ESC u 0 1B 75 0 27 117 0

Value of returned byte:

Exceptions

Bit 0

Bit 1

1 = Drawer 1 Closed

1 = Drawer 2 Closed

0 = Drawer 1 Open

0 = Drawer 2 Open

Bits 2–7 are not used.

Unlike the A756, that had a dedicated connector and resultant dedicated status reporting for each cash drawer, the A760 has a single connector that shares data reporting from either cash drawer. When either cash drawer is open, an open status is reported by the printer.

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.

Request alternate status (parallel only) ASCII Hexadecimal Decimal

ESC u n 1B 75 n 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

High = Paper Out Low = Paper Present

Paper Low (Not Implemented. Interpreted as Paper Out.)

03 Paper Out (Default) High = Paper Out

Low = Paper Present >03 Ignored, No Change Printer Does

Not Stay BUSY1 PAPER EXHAUST LINE is valid to indicate previously requested status. 1

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 send to the printer, the printer goes “Busy” unit all data which has been sent to the print 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.

Page 83

Revision F January 2010

A760 User Guide: Programming Supplement

83

Chapter 4: Programming commands

Transmit paper sensor status ASCII Hexadecimal Decimal

ESC v 1B 76 27 118

Values: Status Byte (RS-232C) Bit Function

0 Signifies

1 Signifies

0 Receipt paper OK

Low (only if paper low sensor is (enabled)

1

Receipt cover 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*

*The printer does not process ESC v until an error condition is cleared.

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 DTS/DSR protocol, the printer waits for DSR = SPACE. Related information

See real time commands, in this document for details about fault conditions reporting.

Page 84

84

Revision F January 2010

A760 User Guide: Programming Supplement Chapter 4: Programming commands

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 4, 52 = Logo Definition

Transmits the printer ID specified by n as follows: n Printer ID Specification

ID (Hexadecimal)

1, 49 Printer model ID CognitiveTPG A760 0x28 (A758 emulation and

A760 native modes)

n = 4 : Logo Definition 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

0x00

3

-

-

-

Undefined

Refer to table next column

4

Off

00

0

Not used, Fixed to Off.

n = 2 or 50: Type ID

5

-

-

-

Undefined

Type ID (n = 2)

6

-

-

-

Undefined

Function

7

Off

00

0

Not used, Fixed to Off.

0 Off 00 0

No two-byte character code installed.

On 01 1

Two-byte character code installed.

1

Transmits the printer ID specified by n. This command is a batch mode command; that is, the response is transmitted 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.

1, 49 Printer model ID CognitiveTPG A756 0x26 (A756 emulation) 2, 50 Type ID Installed options Refer to the table below 3, 51 ROM version ID

ROM version

4, 52 Logo definition Logo definition

Bit

Off/On

Hex

Decimal

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.

Page 85

Revision F January 2010

A760 User Guide: Programming Supplement

85

Chapter 4: Programming commands

Transmit printer ID, remote diagnostics extension ASCII Hexadecimal Decimal

GS I @ n 1D 49 40 n 29 73 64 n

Values of n:

Refer to table

Range of n:

32–255 (not all defined but reserved)

Preforms the remote diagnostic function specified by n. Eighteen remote diagnostic items are defined: eight printer ID items and ten printer tally items. Most of the diagnostic items are maintained in non-volatile memory (NVRAM), but some are maintained in read-only memory (ROM).

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.

The table that follows describes the variables. Value of n ASCII

Hex

Dec

Remote diagnostic item

Function

Space 20 32 Serial #, 10 digit ASCII

Write to NVRAM Example, send 14 bytes to printer: GS I @ 0x20 1234567890

! 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

“

Not available, cannot clear serial # item

22

34

Serial #

# 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

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

Ç 80 128

ü 81 129 Receipt lines tally

Continued…

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

Page 86

86

Revision F January 2010

A760 User Guide: Programming Supplement Chapter 4: Programming commands

Value of n ASCII

Hex

Dec

Remote diagnostic item

Function

é

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 printed on receipt to verify

è

8A

138

Slip character tally

Clear slip tally to 0

ï

8B

139

Slip character tally

Return slip character tally, returns 10 bytes

î 8C 140

MICR read tally, 8 digit ASCII numeric 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 to 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

ñ A4 164

Flash cycles tally, 8 digit ASCII numeric, max 99,999,999

Write to NVRAM

Ñ

Flash cycles tally

Write to NVRAM, and print on receipt to verify

A5

Continued…

165

Page 87

Revision F January 2010

A760 User Guide: Programming Supplement Chapter 4: Programming commands

Value of n ASCII

Hex

Dec

Remote diagnostic item

Function a

A6

166

Flash cycles tally

Clear flash cycles cut tally to 0 o

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 ASCIInumeric, 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 ytes

B2

178

Max temperature tally

Reset max temperature reached value

| B3 179 Max temperature tally

Return max temperature reached since it was reset, returns 10 bytes

B4 180

Slip lines tally, 8 digit ASCII numeric, max 99,999,999

Write to NVRAM

B5

181

Slip line 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 line tally, returns 10 bytes

87

Page 88

88

Revision F January 2010

A760 User Guide: Programming Supplement Chapter 4: Programming commands

Transmit status ASCII Hexadecimal Decimal

GS r n 1D 72 n 29 114 n

Value of n:

1, 49 = printer status 2, 50 = cash drawer status 3, 51 = slip paper status 4, 52 = Flash memory user sector status

Range of n:

1–4 49–52

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. Printer status (n = 1 or n = 49)

When unsolicited status mode (USM) is enabled using the enable/disable unsolicited status mode command (1D 61), the status transmitted by this command (transmit status) and the USM 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. Exceptions

When n is out of the specified range, the command is ignored. Unlike the A756, that had a dedicated connector and resultant dedicated status reporting for each cash drawer, the A760 has a single connector that shares data reporting from either cash drawer. When either cash drawer is open, an open status is reported by the printer.

Cash drawer status (n = 2 or n = 50)

Bit Off/On Hex

Decimal

Status for transmit status

Bit Off/On Hex

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.

0 Off 00 0

On 01 1

One or both cash drawers open. Both cash drawers closed.

2

Off On

00 04

0 4

Receipt paper present. Receipt paper exhausted.

1 Off 00 0

On 02 2

One or both cash drawers open. Both cash drawers closed.

3

Off On

00 08

0 8

Receipt paper present. Receipt paper exhausted.

2

–

–

–

Undefined

3

–

–

–

Undefined

Off

00

0

4

Decimal

Status for transmit status

Not used. Fixed to off.

4

Off

00

0

Not used. Fixed to off.

5 Off 00 0

On 20 32

Slip leading edge sensor: paper present. Slip leading edge sensor: no paper.

5

–

–

–

Undefined.

6

–

–

–

Undefined.

7

Off

00

0

Not used. Fixed to off.

6 Off 00 0

On 20 32

Slip trailing edge sensor: paper present. Slip trailing edge sensor: no paper.

7

Not used. Fixed to off.

Off

00

0

Continued...