The text of a manual · part 4 of 7
TPSK Printer Series 24 & 12V User Manual, pages 31 to 40
Pages 31 to 40 of 67
The original document is the PDF (1.9 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 TPSK
Page 31
SET PRINTING AREA WIDTH Sets the width of the printing area. If the setting exceeds the printable area, the maximum value of the printable area is used. The width of the printing area is set to ((nH X 256) + nL) dots. The width of the printing area follows the Set Left Margin command (1D 4C). See the Set Left Margin command (GS L) earlier in this document for a description. The command is ignored if it is not at the beginning of the line. ASCII Hexadecimal Decimal Range of nL
GS W nL nH 1D 57 nL nH 29 87 nL nH
Range of nH
0-255 0-255
Default
384 dots (the maximum printable area)
Note:
where nL is a multiple of 4. Minimum print area width = 4
Formulas To set the width of the printing area to one inch, send the four-byte string: GS W 203 0 Or, to set the width of the printing area to two inches, send the four-byte string: GS W 150 1 Where 2 inches = 406/203, and 406 = (1 X 256) + 150. ←
Printable area 384 dots ------------→
←Left margin→
←Printing area width→
Exceptions This command is effective only at the beginning of a line. If the setting exceeds the printable area, the maximum value of the printable area is used. The maximum printable area is 384 dots.
TPSK 12 & 24 V User’s Manual
Page 30 / 66
Reference: FDE 31 08 972 Issue Z
Page 32
5.5 Print characteristics commands These commands control what the printed information looks like, selection of character sets, and setting of margins. The commands are described in order of their hexadecimal codes.
SELECT PRINT MODE Selects the print mode: standard, compressed, underlined, double high or doublewide. ASCII Decimal
ESC ! n 1B 21 n 27 33 n
Value of n:
See table
Hexadecimal
Value of n 1 Bit
Function
0
1
Bit 0
Pitch
Standard Pitch
Compressed Pitch
(See chart below) Bit 4
Double High
Canceled
Set
Bit 5
Double Wide
Canceled
Set
Bit 7
Underlined Mode
Canceled
Set (bar thickness = 2)
1
Bits 1, 2,3 and 6 are not used
Default
0 (for bits 0, 4, 5, 7)
This command affects the pitch selection. Pitch
CPI
Standard Compressed
12.7 16.9
Exceptions Refer to the above table for exceptions. Related Information See the Print Specifications Guide for a description of standard and compressed character pitches.
TPSK 12 & 24 V User’s Manual
Page 31 / 66
Reference: FDE 31 08 972 Issue Z
Page 33
SELECT OR CANCEL UNDERLINE MODE Turns underline mode on or off. Underlines cannot be printed for spaces set by: the Horizontal Tab, Set Absolute Start Position, Set Relative Print Position commands, or in white/black reverse print mode. Underline mode may also be turned ON and OFF with the Select Print Mode(s) command (1B 21). ASCII Hexadecimal Decimal Value of n
Default
ESC - n 1B 2D n 27 45 n 0.48 = Cancel underline mode 1-49 = Select underline mode and bar thickness = 2 2-50 = (Cancel underline mode)
SELECT OR CANCEL WHITE/BLACK REVERSE PRINT MODE Turns on White/Black reverse printing mode. In White/Black reverse printing 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 printing mode is selected it is also applied to character spacing which is set by Right-Side Character Spacing (ESC SP). 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 graphics, logos, bar code, HRI characters, and spacing skipped by Horizontal Tab (HT), Set Absolute Starting Position (ESC $), and Set Relative Print Position (ESC \). ASCII
GS B n 1D 42 n Decimal 29 66 n n is the least significant Bit, LSB Hexadecimal
Value of n
0 = Off
Default
1 = On 0 (Off)
Exceptions Only the lowest bit of n is valid.
TPSK 12 & 24 V User’s Manual
Page 32 / 66
Reference: FDE 31 08 972 Issue Z
Page 34
5.6 Font commands SELECT INTERNATIONAL CHARACTER SET Selects the character set mapping to be used. ASCII Decimal
ESC R n 1B 52 n 27 82 n n
Country
Hexadecimal
0 1 2 3 4 5 6 7 8 9 10
USA France Germany UK Denmark I Sweden Italy Spain Japan Norway Denmark II
Default = 0 Additional codes n U.S.A. France Germany U.K. Denmark I Sweden Italy Spain Japan Norway Denmark II
0 1 2 3 4 5 6 7 8 9 10
35D 23H # # # £ # # # Pt # # #
36D 24H $ $ $ $ $ ¤ $ $ $ ¤ $
TPSK 12 & 24 V User’s Manual
64D 40H @ à § @ @ É @ @ @ É É
91D 5BH [ ° Ä [ Æ Ä ° i [ Æ Æ
92D 5CH \ ç Ö \ Ø Ö \ Ñ ¥ Ø Ø
Page 33 / 66
93D 5DH ] § Ü ] Å Å é ¿ ] Å Å
94D 5EH ^ ^ ^ ^ ^ Ü ^ ^ ^ Ü Ü
96D 60H ` ` ` ` ` é ù ` ` é é
123D 7BH { é ä { æ ä à " { æ æ
124D 7CH ù ö ø ö ò ñ ø ø
125D 7DH } è ü } å å è } } å å
126D 7EH ~ " ß ~ ~ ü i ~ ~ ü ü
Reference: FDE 31 08 972 Issue Z
Page 35
5.7 Graphics commands These commands are used to enter and print graphics data and are described in order of their hexadecimal codes.
PRINT RASTER GRAPHICS Prints one row of data. n1 . .. nl: bytes describing the line to print. <11> has to be sent at the beginning of each dot line, the following 48 bytes give the status of the 384 dots. ASCII Decimal
DC1 n1 ...n48 11 n1 ...n48 17 n1 ...n48
Value of n n1…n48 = Data bytes
Range for ni
0 - 255
Hexadecimal
Note: to convert a bmp file so that it can be sent to the printer using this graphic command. The bmp must be defined ‘black and white’, 384 pixels wide (or less but multiple of 8). The <11> must be added to the file every 48 bytes (or less depending on the number of pixels on the image width).
5.8 Logo commands SELECT THE CURRENT LOGO 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, or command 1B40 is sent, or printer is rebooted. 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 use memory space in the flash. 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 memory and prints it. If there is no definition for logo n, then no logo is printed. An application using multiple logos, into flash memory, is responsible for erasing the flash memory page when the logo area is full. ASCII Decimal
GS # n 1D 23 n 29 35 n
Range of n
0 – 64
Hexadecimal
TPSK 12 & 24 V User’s Manual
Page 34 / 66
Reference: FDE 31 08 972 Issue Z
Page 36
DEFINE DOWNLOADED BIT IMAGE Enters a downloaded bit image (such as a logo) into Flash with the number of dots specified by n1 and n2. The downloaded bit image is available until another bit image is defined, or either Initialize Printer (1B 40 or 1D 40 31), command is received. See the illustration below for a graphic representation of the downloaded bit image. Top of Graphic
Column
One
Column 48 x 8 Max.
Row One d1 d 65 d2 MS B dn Row 64 d Max. 64 dn LSB
ASCII Hexadecimal Decimal
GS * n1 n2 d1 ... dn 1D 2A n1 n2 d1 ... dn 29 42 n1 n2 d1 ... dn
Value of n Value of n1
Value of n2
Value of d
1-48 (8 x n1 = Number of 1-255 (Number of Bytes of Data (Printed Vertical Bytes)1 Down, Then Across) Horizontal Dot Columns) 1 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 49138).
Exceptions:
See the illustration for the Print Downloaded Bit Image command (1D 2F) for a representation of the bit image.
TPSK 12 & 24 V User’s Manual
Page 35 / 66
Reference: FDE 31 08 972 Issue Z
Page 37
PRINT DOWNLOADED BIT IMAGE Prints the downloaded bit image at a density specified by m. It is ignored if any data is in the print buffer, if the downloaded bit image is undefined. See the illustration on the previous page for a representation of the bit image. ASCII Hexadecimal Decimal
GS / m 1D 2F m 29 47 m
Value and Range of m Value of m
Print Mode
Vertical 1 DPI
0 Normal 203 1 Double Wide 203 2 Double High 101 3 Quadruple 101 1 Dot density measured in dots per inch
Horizontal DPI*
203 101 203 101
RETURN LOGO CHECKSUM Returns the checksum of a logo downloaded using “Define Downloaded Bit Image”. ASCII Hexadecimal Decimal
US e n 1F 65 n 31 101 n
Returns 4 Bytes: Command ID + Flag + checksum of the logo specified by n. Byte 1 Byte 2
= 65h = 01
- if logo n exists - if logo n doesn’t exist. Byte 3 = Checksum (LSB) or 00h if logo n doesn’t exist. Byte 4 = Checksum (MSB) or 00h if logo n doesn’t exist. Checksum is two’s complement of sum of all bytes in the download sequence. Ex: Checksum = -(0x1D + 0x2A + … ) for the “Define Downloaded Bit Image” command.
TPSK 12 & 24 V User’s Manual
Page 36 / 66
Reference: FDE 31 08 972 Issue Z
Page 38
5.9 Printer status commands These commands enable the printer to communicate with the host computer. 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 were received. When a fault occurs, the printer will go busy at the communication interface and not respond to either of the Printer Status commands. If the fault causing the busy condition can be cleared, such as by loading paper, or letting the thermal print head cool down, the printer will resume processing the data in its reception buffer. Real Time commands allow the printer to respond immediately, even though it is busy at the communication interface. See the following section, Real Time Commands, for details about these commands.
TRANSMIT PAPER SENSOR STATUS 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. See the following table. ASCII Hexadecimal Decimal
ESC v 1B 76 27 118
Values Status Byte Bit
Function
0 Signifies
1 Signifies
0
Paper Low
OK
Low
1
Door/Lid
Closed
Opened
2
Paper Out
Present
Out
3
JAM
OK
JAM
4
High position
Down position
5
Flapper on paper path Temperature
In valid range
Too hot or too cold
6
Voltage
In valid range
Too high or too low
7
Not Used
Fixed to Zero
Fixed to Zero
Related Information
See Busy Line and Fault Conditions in the Real Time Commands section of this document for details about fault condition reporting.
Note: in the case of : an opened lid, a paper out, a Jam, and a flapper down; the printer will stop feeding paper before reporting the status.
TPSK 12 & 24 V User’s Manual
Page 37 / 66
Reference: FDE 31 08 972 Issue Z
Page 39
TRANSMIT PRINTER ID Transmits the printer model, type of version as defined below. This command is processed as normal printer data. ASCII
GS I n 1D 49 n 29 73 n
Hexadecimal Decimal
Operand: Limit:
n = printer ID select Decimal: 1 ≤ n ≤ 2; 49 ≤ n ≤ 50 ; n = 66,67,68 Hex:
01 ≤ n ≤ 02; 31 ≤ n ≤ 32 ; n = 42,43,44 “GS I” OPERAND AND RETURNED STATUS DEFINITION Value Decimal n Decim al
Hex
Printer ID
Function
1, 49
01, 31
Model
TPSK Bit
2, 50
66 67 68
02, 32
42 43 44
Type
Manufacturer Printer name Serial number
0 1 2 3 4 5 6 7
53
Function 2-byte character code Undefined Undefined Undefined Fixed Undefined Undefined Fixed AXIOHM TPSK Depends on actual S/N
Hex
35
Value 0 1 Not installed Installed
Always 0
-
Always 0
-
Note: for n = 66, 67, 68 the printer response is sent back in the following format. Header: Data: NULL:
5F (hex) ASCII string 00 (hex)
TPSK 12 & 24 V User’s Manual
Page 38 / 66
Reference: FDE 31 08 972 Issue Z
Page 40
TRANSMIT PRINTER ID, REMOTE DIAGNOSTICS EXTENSION Performs the remote diagnostic functions specified by n. Each returned message is defined as: n + data + <CR> ASCII Hexadecimal Decimal
GS I @ n 1D 49 40 n 29 73 64 n
Values of n (Refer to table) Value of n Hex Dec
Remote diagnostic item
20
Serial #, 10 digit ASCII
32
Function
* Write to NVRAM
Example, send 14 bytes to printer: GS I @ 0x20 1234567890 Return Serial #, preceded by n to identify Printer returns 12 bytes in above example: #1234567890<CR>
23
35
Serial #
24
36
27
39
Class/model #, 15 digit ASCII Class/model #
2F
47
Boot firmware CRC, 4 digit ASCII
Return Boot firmware CRC, returns 6 bytes
37
55
Flash firmware CRC, 4 digit ASCII
Return Flash firmware CRC, returns 6 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
* Write to NVRAM Return Class/model #, returns 17 bytes
* 0 x 20 ≤ digit ≤ 0 x 7A If any digit is out of the defined range, Write to NVRAM is ignored.
TPSK 12 & 24 V User’s Manual
Page 39 / 66
Reference: FDE 31 08 972 Issue Z