The text of a manual · part 14 of 16
A760 Two-Color Thermal/Impact Hybrid Printer User Guide: Programming Supplement, pages 129 to 138
Pages 129 to 138 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 129
Revision F January 2010
A760 User Guide: Programming Supplement
129
Chapter 4: Programming commands
Download to active flash sector ASCII Hexadecimal Decimal
GS DC1 aL aH cL cH d1… dn 1D 11 aL aH cL cH d1… dn 29 17 aL aH cL cH d1… dn
Value of aL:
low byte of the address
Value of aH:
high byte of the address
Value of cL:
low byte of the count
Value of cH:
high byte of the count
Value of d:
data bytes, 0–255
Value of n (for number of data bytes)
Range of address (aL aH)
Range of count (cL cH)
((cH * 256) + cL)
0000–FFFF (hexadecimal)
0001–FFFF (hexadecimal)
Range:
Addresses run from 0 to 64K.
Contains a start address (aH × 256 + aL) and count (cH × 256 + cL) of binary bytes to load into the selected sector, followed by that many bytes. The start address is relative to the start of the sector. Addresses run from 0 to 64K. The count must always be 256.
The printer may return one of several responses. ACK means that the data was written correctly and the host should transmit the next block. NAK means that, for some reason, the data was not written correctly. This could mean that communications failed or that the write to flash failed. The alternatives seem to be to retry the block or halt loading and assume a hardware failure. Related information
Available only in download mode.
Download paper type description (ColorPOS®) ASCII Hexadecimal Decimal
GS Ox8E nL nH d1 … dn 1D 8E m nL nH d1… dn 29 142 nL nH d1 … dn
This command will store in flash memory a paper type description identified by the structure in d1..dn, adding the uniquely (by type category and version) identified structure for subsequent use by the set paper type command. nL+ nH *256 define the number of bytes x that follow. These bytes contain the proprietary structure and CRC to operate the thermal print head. This structure contains the hardware parameter values needed to print on formulations of monochrome and two-color thermal papers. New paper definitions should be obtained from trusted sources such as the CognitiveTPG Web site in order to optimize print quality while preventing premature head burnout or other damaging effects. New definitions do not change any which had already been set. If an immediate effect is desired, follow up this command with a set paper type m n (where m n are bytes 0 and 1 of the description). Once stored in flash memory, this paper type, selectable by ID m n, remains a valid choice by the set paper type command until firmware flash memory is erased.
Restrictions: If the value of m n = 0 0, then the command will be ignored. It is thus impossible to overwrite the default monochrome paper setting. This command will be ignored if the head type – carried in the description (d1…dx) – is incompatible with the head type in the printer itself or if a description with ID m n already exists. There is room in firmware flash memory for a maximum of 16 paper type descriptions; of these one is reserved for monochrome descriptions, with m n =0 0 description that is always populated, and factory preloaded of two color descriptions. Thus 13 remaining spaces are free for dynamic use; once these are used up further download paper type descriptions will be ignored, and a firmware reload will be necessary to again free up (except for m n = 0 0) the paper type description space.
Page 130
130
Revision F January 2010
A760 User Guide: Programming Supplement Chapter 4: Programming commands
Return paper type description (ColorPOS®) ASCII Hexadecimal Decimal
GS Ox8F m 1D 8F m 29 143 m
Value and range of m:
m is the paper type index, (0< = m< = 15)
This command will return from flash memory a paper type description indexed by m, (0<=m<=15) sending back the data sequence used in the download paper type description command, i.e. the return is 1D 8F m nL nH (d1…dn) which was stored in slot m; or a value of n = 0 if slot m does not have a description stored. m = 0 x ff asks for a return of the current paper type. For all valid descriptions, the last two bytes will be a CRC value and the first 24 bytes will be as follows:
# Bytes Offset
Definition
1
0
Manufacturer paper type category
1
1
Version in type category
1
2
Printhead type
1
3
Structure format type
20 4
Descriptive name as a null terminated ASCII string
Reset firmware ASCII Hexadecimal Decimal
GS (SPACE) 1D FF 29 255
Ends the load process and reboots the printer. Before executing this command, the printer should have firmware loaded and external switches set to the runtime settings. Application software for downloading should prompt the user to set the external switches and confirm before sending this command. If the downloading was started from a diagnostic, the reboot will cause the printer to re-enter download state unless the external switches are changed.
Page 131
Revision F January 2010
A760 User Guide: Programming Supplement
131
Chapter 4: Programming commands
Ethernet setup commands The following commands are designed to set the required printer internal parameters for Ethernet operation. The commands can only be used in the Flash download (boot) mode (see page 126). See page 20 for default setup.
Restore default settings ASCII Hexadecimal Decimal
US BS NUL 1F 08 00 31 8 0
Restores the Ethernet settings to the preset values.
Default settings are: IP address:
Net mask:
Gateway: Raw TCPIP port 9001: Telnet Daemon: LP Daemon: Bootp: DHCP: Inactivity timeout: Keep alive pings:
192.0.0.192 (in use after boot time-out of two minutes) 0.0.0.0 (default mask of selected IP is used) none active enabled disabled disabled enabled enabled disabled
Setting IP address ASCII Hexadecimal Decimal
US BS SOH n1 n2 n3 n4 1F 08 01 n1 n2 n3 n4 31 8 1 n1 n2 n3 n4
Default:
192.0.0.192
Sets the IP address value specified by the values of n1 to n4.
Setting Net Mask ASCII Hexadecimal Decimal
US BS STX n1 n2 n3 n4 1F 08 02 n1 n2 n3 n4 31 8 2 n1 n2 n3 n4
Default:
0.0.0.0
Sets the Net Mask value specified by the values n1 to n4.
Setting the Gateway ASCII Hexadecimal Decimal
US BS ETX n1 n2 n3 n4 1F 08 03 n1 n2 n3 n4 31 8 3 n1 n2 n3 n4
Default:
none
Sets the printer to the gateway having the IP address value specified by the values n1 to n4. A gateway, even when the printer is on another subnet, is not always needed.
The printer initiates no connection and obtains the gateway address from the host packets.
Page 132
132
A760 User Guide: Programming Supplement
Revision F January 2010
Chapter 4: Programming commands
Setting raw TCPIP port 9001 ASCII Hexadecimal Decimal
US BS EOT n1 n2 n3 n4 1F 08 04 n1 n2 n3 n4 31 8 4 n1 n2 n3 n4 n1 = 0: n1 = 1:
disabled enabled
Default:
enabled
Sets the port where the printer will look for raw tcpip communications.
LP Daemon ASCII Hexadecimal Decimal
US BS ENQ n1 1F 08 05 n1 31 8 5 n1 n1 = 0: n1 = 1:
disabled enabled
Default:
disabled
Enables or disables the printer LP Daemon. The LP listens on port 515.
Telnet Daemon ASCII Hexadecimal Decimal
US BS ACK n1 1F 08 06 n1 31 8 6 n1 n1 = 0: n1 = 1:
disabled enabled
Default:
enabled
Enables or disables the printer Telnet server. The Telnet server listens on port 23.
BootP ASCII Hexadecimal Decimal
US BS BELL n1 1F 08 07 n1 31 8 7 n1 n1 = 0: n1 = 1:
disabled enabled
Default:
disabled
Enables or disables the use of BootP at power-up to obtain an IP address. BootP is a subset of DHCP.
DHCP (auto-configuration) ASCII Hexadecimal Decimal
US BS BS n1
1F 08 08 n1 31 8 8 n1 n1 = 0: n1 = 1:
disabled enabled
Default:
enabled
Enables or disables the use of DHCP at power-up to obtain an IP address. If no address is found within two minutes, DHCP obtains the default IP address.
Page 133
Revision F January 2010
A760 User Guide: Programming Supplement
133
Chapter 4: Programming commands
Inactivity timeout ASCII Hexadecimal Decimal
US BS HT n1
1F 08 09 n1 31 8 9 n1 n1 = 0: n1 = 1:
disabled enabled
Default:
enabled
Enables or disables resetting of open TCP ports after five (5) minutes inactivity.
Keep alive pings ASCII Hexadecimal Decimal
US BS LF n1
1F 08 0A n1 31 8 10 n1 n1 = 0: n1= 1:
disabled enabled
Default:
enabled
Enables or disables sending of the keep alive pings (self arps). Keep alive pings may be required for use with such things as smart hubs; to remind the smart hub to which port a printer is connected. If enabled, self arps are sent every ten (10) minutes.
Page 134
134
A760 User Guide: Programming Supplement
Revision F January 2010
Appendix A: Commands by hexadecimal code
Appendix A: Commands listed by hexadecimal code By command code Note: Bold commands are new two-color, (ColorPOS®) commands. Code (hexadecimal)
Command
Page
09
Horizontal tab
46
0A
Print and feed paper one line
42
0C
Print and eject slip
42
0C
Print and return to standard mode/print and eject slip
106
0D
Print and carriage return
42
10
Clear printer
33
10 04 n
Real-time status transmission (DLE sequence)
92
10 05 n
Real-time request to printer (DLE sequence)
94
11
Close form
33
12
Select double-wide characters
52
13
Select single-wide characters
52
14 n
Feed n print lines
42
15 n
Feed n dot rows
43
16 n
Add n extra dot rows
43
17
44
18
Open form
34
18
Cancel print data in page mode
106
1A
Perform partial knife cut (or code 1B 6D)
34
1B (+*.BMP file)
Download BMP logo
62
1B 07
Generate tone
34
1B 0C
Print data in page mode
106
Page 135
Revision F January 2010
A760 User Guide: Programming Supplement
135
Appendix A: Commands by hexadecimal code Code (hexadecimal)
Command
Page
1B 12
Select 90 degree counter-clockwise rotated print
52
1B 14 n
Set column
46
1B 16 n
Select pitch (column width)
52
1B 20 n
Set right-side character spacing
53
1B 21 n
Select print mode
53
1B 24 nL nH
Set absolute starting position
47
1B 25 n
Select or cancel user-defined character set
54
1B 26 s c1 c2
Define user-defined character sets
54
1B 27 m a0 a1 a2 d1…dm
Write to user data storage
122
1B 2A m n1 n2 d1…dn
Select bit image mode
63
1B 2D n
Select or cancel underline mode
55
1B 32
Set vertical line spacing to 1/6 inch
47
1B 33 n
Set vertical line spacing
47
1B 34 m a0 a1 a2
Read from user data storage
122
1B 3A 30 30 30
Copy character set from ROM to RAM
55
1B 3C
Return home
34
1B 3D n
Select peripheral device (for multi-drop)
35
1B 3F n
Cancel user-defined character
56
1B 40
Initialize printer
35
1B 43 n
Set slip paper eject length
35
1B 44 [n] k 00
Set horizontal tab positions
48
1B 45 n
Select or cancel emphasized mode
56
1B 47 n
Select double-strike
56
1B 48
Cancel double-strike
57
1B 49 n
Select or cancel italic print
57
1B 4A n
Print and feed paper
44
Page 136
136
A760 User Guide: Programming Supplement
Revision F January 2010
Appendix A: Commands by hexadecimal code Code (hexadecimal)
Command
Page
1B 4B n
Print and reverse feed paper
44
1B 4C
Select page mode
107
1B 4C n1 n2 d1. . . dn
Select double-density graphics (A756 emulation)
64
1B 52 n
Select international character code
57
1B 53
Select standard mode
108
1B 54 n
Select print direction in page mode
108
1B 56 n
Select or cancel 90 degree clockwise rotated print
58
1B 57 n1, n2…n8
Set print area in page mode
109
1B 59 n1 n2 d1…dn
Select double-density graphics
64
1B 5B 7D
Switch to flash download (boot) mode
126
1B 5C n1 n2
Set relative print position
49
1B 61 n
Select justification
50
1B 63 30 n
Select receipt or slip for printing; slip for MICR read
35
1B 63 31 n
Select receipt or slip for setting line spacing
36
1B 63 33 n
Select paper sensors to output paper end signals (parallel only)
36
1B 63 34 n
Select sensors to stop printing
37
1B 63 35 n
Enable or disable panel button
37
1B 64 n
Print and feed n lines
44
1B 65 n
Print and reverse feed n lines
45
1B 66 m n
Set slip paper waiting time
37
1B 6A k
Read from non-volatile memory (NVRAM)
122
1B 6D
Perform partial knife cut (or code 1A)
34
1B 70 n p1 p2
Generate pulse to open cash drawer
38
1B 72 m
Set current color
38
1B 73 n1 n2 k
Write to non-volatile memory (NVRAM)
122
1B 74 n
Select international character set
57
Page 137
Revision F January 2010
A760 User Guide: Programming Supplement
137
Appendix A: Commands by hexadecimal code Code (hexadecimal)
Command
Page
1B 75 0
Transmit peripheral device status (RS-232C printers only)
82
1B 75 n
Request alternate status (A756 emulation only)
82
1B 76
Transmit paper sensor status
83
1B 77 01
Read MICR data and transmit
112
1B 77 46
Check flip command
120
1B 77 46-47
Enhanced check flip status reporting
120
1B 77 50
Define parsing format, save in NVRAM
112
1B 77 52
Transmit last MICR read
112
1B 77 70
Define parsing format, do not save permanently
112
1B 7B n
Select or cancel upside-down print mode
58
1C
Select slip station
39
1D 00
Return boot sector firmware part number
127
1D 01
Return segment number status of flash memory
127
1D 02 n
Select flash memory sector to download
127
1D 03 n
Real-time request to printer (GS sequence)
94
1D 04 n
Real-time status transmission (GS sequence)
92
1D 05
Real-time printer status transmission
95
1D 06
Get firmware CRC
127
1D 07
Return microprocessor CRC
128
1D 0E
Erase all flash contents except boot sector
128
1D 0F
Return main program flash CRC
128
1D 10 n
Erase selected flash sector
128
1D 11 aL aH cL cH d1…dn
Download to active flash sector
129
1D 14 n
Reverse feed n lines
45
1D 15 n
Reverse feed n dots
45
1D 21 n
Select character size
59
1D 22 55 n1 n2
Flash memory user sectors allocation
123
Page 138
138
A760 User Guide: Programming Supplement
Revision F January 2010
Appendix A: Commands by hexadecimal code Code (hexadecimal)
Command
Page
1D 22 n
Select memory type (SRAM/flash) where to save logos or user-defined fonts
123
1D 23 n
Select the current logo (downloaded bit image)
65
1D 24 nL nH
Set absolute vertical print position in page mode
110
1D 2A n1 n2 d1…dn
Define downloaded bit image
66
1D 2F m
Print downloaded bit image
67
1D 3A
Select or cancel macro definition
111
1D 40 n
Erase user flash sector
124
1D 42 n
Select or cancel white/black reverse print mode
60
1D 48 n
Select printing position for HRI characters
99
1D 49 n
Transmit printer ID
84
1D 49 40 n
Transmit printer ID, remote diagnostics extension
85
1D 4C nL nH
Set left margin
50
1D 50 x y
Set horizontal and vertical minimum motion units
46
1D 56 m
Select cut mode and cut paper (or code 1D 56 m n)
39
1D 56 m n
Select cut mode and cut paper (or code 1D 56 m)
39
1D 57 nL nH
Set printing area width
51
1D 5C nL nH
Set relative vertical print position in page mode
110
1D 5E r t m
Execute macro
111
1D 61 n
Select or cancel unsolicited status mode
96
1D 66 n
Select pitch for HRI characters
99
1D 68 n
Select bar code height
99
1D 6B m d1…dk 00 or 1D 6B m n d1…dn
Print bar code
100
1D 6B m nL nH d1 ... dn
Print GS1 DataBar (RSS), data length specified
102
1D 6B n d1 ... 00
Print GS1 DataBar (RSS), null terminated
103
1D 70 a b c d e f
Select PDF 417 parameters
104
1D 71 a b c d e fL fH
Set GS1 DataBar (RSS) parameters
102
1D 72 n
Transmit status
88
1D 77 n
Select bar code width
105
1D 81 m n
Set paper type (for two-color printing)
40