The text of a manual · part 2 of 7
MtP Series & FieldPro Programmer's Manual: Introduction, pages 5 to 14
Pages 5 to 14 of 63, from MtP Series & FieldPro Programmer's Manual
The original document is the PDF (923 KB). 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 Printek MtP300
Page 5
Introduction This manual is intended to be used by software developers for the purpose of creating and/or modifying applications to make use of the special features offered by the Printek MtP and FieldPro Series of mobile thermal printers. This section of the manual describes the various models of printers and the features supported by this manual and the information contained in other sections. For printer set up and operating information for users, system integrators and information technology personnel, please refer to the printer’s Operator’s Manual for the specific model of interest.
Printer Models and Key Features Printek mobile thermal printers offer solutions for a wide variety of printing applications. The various models support flexible paper widths, printing from roll stock or flat stock in easy loading cassettes, label printing enhancements, and several host interface choices. The configuration options are shown below for each model. For additional information, please refer to the printer’s Operator’s Manual or visit www.printek.com.
Max Paper Size Label/Ticket Printing (Width x Diameter) RS-232 MtP300 3.12” x 2.625” Roll Front Black Mark Std MtP300LP 3.12” x 2.625” Roll Front/Back Black Mark, Gap Std MtP400 4.125” x 2.625” Roll Front Black Mark Std MtP400LP 4.125” x 2.625” Roll Front/Back Black Mark, Gap Std MtP400SL 4 x 6” Cassette n/a Std FieldPro RT43 4.125” x 1.75” Roll Front Black Mark Std Model
Host Interfaces IrDA Bluetooth Wi-Fi Opt Opt Opt Opt Opt Opt Opt Opt Opt Opt Opt Opt Opt Opt Opt n/a Opt Opt
Manual Contents The remaining sections of this manual provide information on printer commands offered for the various emulations as well as additional information helpful to programmers. Descriptions of each section are shown below. Selecting Emulations describes how to select the various printer emulations available. Printek Emulation describes in detail the Printek commands available. Mt3 Emulation provides a summary of the commands that are supported when emulating a Printek Mt3 printer. O’Neil Emulation provides a summary of the commands that are supported when emulating an O’Neil microFlash4t printer.
1
Page 6
Introduction ZPL-II Emulation provides a summary of the commands that are supported when emulating a Zebra ZPL-II compatible printer. CPCL Emulation provides a summary of the commands that are supported when emulating a Comtec CPCL compatible printer. Hex Dump describes the printer’s output while in Hex Dump mode, and how it may be used to debug software problems. Print & Font Samples provides character set mapping information and several font print samples. ASCII Character Tables provides a definition of ASCII control codes and an ASCII to Decimal to Hexadecimal conversion table. Printer Reset Conditions describes the state of the printer after a power up reset or receipt of a reset command. Glossary provides a reference for printer related terms.
2
Page 7
Selecting Emulations The emulations offered by Printer Mobile Thermal Printers allow for a great deal of language commonality between the various series of Printek printers as well as compatibility with systems and software that have been created for printers offered by other manufacturers. The Printek MtP and FieldPro Series printers offer Printek, O’Neil, ZPL-II and CPCL emulations plus a Printek Mt3 emulation to allow the printers to work with existing three inch applications. The printer’s default emulation may be selected through the control panel set up as described in the printer’s Operator’s Manual. To select an emulation temporarily, the host system may send an escape sequence as described below.
Select Emulation
ESC ESC n
This command selects emulation mode n by which future commands will be interpreted as described in the following table. The selected mode will be in effect until another Select Emulation command is received or until the printer is reset via an escape sequence appropriate for the current emulation, or the printer is manually reset by entering/exit the front panel set up mode or cycling power on the printer. Once the emulation has been selected, please refer to the section of this manual that describes the commands available for that emulation. Example: The following escape sequence will set the printer to Mt3 Emulation. Escape Sequence: ESC ESC Hexadecimal: 1B 1B n 0 1 2 3 4 5 6 ? @
4 04
Emulation Test (reserved for factory use) Printek Emulation O’Neil Emulation ZPL-II Emulation Mt3 Emulation CPCL Emulation Hex Dump Mode Previously Selected Emulation Default Emulation
If more than one emulation has been selected, ESC ESC ? will return to the previously selected emulation. This is particularly useful when the previous emulation is unknown. Please beware that the memory (stack) is only one level deep. ESC ESC @ will return to the default emulation, as specified by the “Emulation” value in the Interface setup menu. Note: Numeric values may be specified as either a binary or an ASCII value. As such, the example above may be sent as either 1B 1B 04 or 1B 1B 34.
3
Page 8
Page 9
Printek Emulation Introduction This section describes the control codes and escape sequences comprising Printek emulation. This emulation may be selected by setting “Emulation” to “Printek” in the appropriate interface setup menu, or via software with the ESC ESC 1 sequence. While this emulation is selected, control codes and escape sequences from other emulations are not available. Control codes and escape sequences are used to control printer operation. An ASCII control code is a single character in the range 00 hex through 1F hex, and 7F hex. The ESC (Escape) control code (1B hex) is used to introduce character strings called escape sequences, which provide an extension of the commands available with ASCII control codes. If a sequence accepts one numeric parameter, it will be represented as “n”. If a sequence accepts more than one numeric parameter, they will be represented as “n1 n2 ... nx”. Spaces are used when documenting escape sequences to increase readability. If a space character is actually a valid part of the sequence, it will be represented as “SPACE”. Characters that appear in italics (such as “n” and “n1” above) are not sent to the printer as is; they are used as a place holder indicating that some value must be supplied. Multiple character strings without intervening spaces typically represent control codes. For example, BS is the Backspace control code (08 hex), not the two characters “B” and “S” (42 and 53 hex), and SPACE is the space character (20 hex). An ASCII Control Code Table is provided on page 53 for your convenience. If you have any doubt about how to interpret a documented control code or escape sequence, refer to the hexadecimal representation in the example. The examples may also be helpful when analyzing a Hex Dump printed by the printer. Please refer to the “Hex Dump ” section of this manual on page 47.
5
Page 10
Printek Emulation
Control Codes and Escape Sequences Grouped by Function
Communications This section describes various methods of controlling the flow of data to and from the printer. Unlike other sections describing printer commands, the descriptions in this section indicate whether the command is one that is “received” by the printer, or “transmitted” by the printer. Note that some handshaking methods are only supported by the RS-232C Serial interface and are not supported for the IrDA, Bluetooth, or Wi-Fi interfaces.
End of Text (Received by Printer)
ETX
If “ETX/ACK” is set to “On” in the Serial Interface Menu (refer to the Operator’s Manual), then processing of an ETX from the printer’s input buffer causes the printer to transmit an ACK to the host computer. Since the ETX may be a legal value within an escape sequence, it is the user's responsibility to ensure that an ETX used for data handshake is not sent within an escape sequence. The user must also ensure that the maximum block size or the number of blocks sent at one time does not exceed the input buffer size of the printer. The input buffer size is 32K (32,768 Bytes) unless Minimum Buffer has been selected in the printer’s Options Menu. Please refer to the Operator’s Manual for more information. Control code: Hexadecimal:
ETX 03
Acknowledge (Transmitted by Printer)
ACK
Please refer to the “End of Text” description above. Control Code: Hexadecimal:
ACK 06
End of Transmission (Transmitted by Printer)
EOT
The printer sends an EOT character each time the printer’s input buffer becomes empty to indicate the printer is idle. Control Code: Hexadecimal:
EOT 04
Transmitter On (Transmitted by Printer, Serial Only)
XON (DC1)
When enabled for the Serial Interface (refer to the Operator’s Manual), this character is transmitted by the printer to indicate that the printer is on line and ready to receive data. See DC3/XOFF for more information. Control Code: Hexadecimal
6
XON 11
Page 11
Printek Emulation Transmitter Off (Transmitted by Printer, Serial Only)
XOFF (DC3)
When enabled for the Serial Interface (refer to the Operator’s Manual), this character is transmitted by the printer to indicate that the printer’s input buffer is nearly full and that the host computer should stop sending data. When the printer is able to accept data again, it will transmit DC1/XON. Control Code: Hexadecimal:
XOFF 13
Character Size and Line Spacing Select Character Pitch
ESC K n
Selects the character pitch according to the following table. n (hex)
Character Pitch/Font
Matrix
MtP300 13 28 30 36 38 41 44 48 52 57 64 72 48 52 57 12
Columns Per Line MtP400 & FieldPro RT43 22 41 43 52 55 59 64 69 75 83 92 104 69 75 83 17
00 5.5 cpi Sans Serif 37 x 60 01 10.2 cpi Sans Serif 20 x 26 02 10.7 cpi Sans Serif 19 x 26 03 12.7 cpi Courier 16 x 23 04 13.5 cpi Courier 15 x 23 05 14.5 cpi Courier 14 x 23 06 15.6 cpi Courier 13 x 23 07 16.9 cpi Courier 12 x 23 08 18.5 cpi Courier 11 x 23 09 20.3 cpi Courier 10 x 23 0A 22.6 cpi Courier 9 x 23 0B 25.4 cpi Courier 8 x 23 0C 16.9 cpi Sans Serif 12 x 23 0D 18.5 cpi Sans Serif 11 x 23 0E 20.3 cpi Sans Serif 10 x 23 0F 4.2 cpi Sans Serif * 48 x 60 ** Downloaded Fonts * Only available in firmware version 3.2 and later. ** For downloaded fonts, use font ID. First font = A, second = B, etc.
This command must be sent prior to any printable characters on the line. If sent after printable characters are received, a Carriage Return and Line Feed will be inserted and a new line started before the command takes effect. Example 1: The following escape sequence will select the 12.7 cpi Courier font. Escape Sequence: ESC Hexadecimal: 1B
K 4B
3 03
Example 2: The following escape sequence will select the first downloaded font. Escape Sequence: ESC Hexadecimal: 1B
K 4B
A 41
7
Page 12
Printek Emulation Set Printer to 12.7 cpi
SO
Sets the character size to 12 cpi. This is equivalent to sending ESC K 0x03. This command must be sent prior to any printable characters on the line. If sent after printable characters are received, a Carriage Return and Line Feed will be inserted and a new line started before the command takes effect. Control Code: Hexadecimal:
SO 0E
Set Printer to 22.6 cpi
SI
Sets the character size to 22.6 cpi. This is equivalent to sending ESC K 0x0A. This command must be sent prior to any printable characters on the line. If sent after printable characters are received, a Carriage Return and Line Feed will be inserted and a new line started before the command takes effect. Control Code: Hexadecimal:
SI 0F
Set Printer to 22. 6 cpi
DC4
Sets the character size to 22.6 cpi. This is equivalent to sending ESC K 0x0A. This command must be sent prior to any printable characters on the line. If sent after printable characters are received, a Carriage Return and Line Feed will be inserted and a new line started before the command takes effect. Control Code: Hexadecimal:
DC4 14
Double High On
FS
Enables double high printing. This will cause the characters and the interline spacing to be doubled in height. Double high printing will be in effect until the Double-High Off (GS) command is received. This command must be sent prior to any printable characters on the line. If sent after printable characters are received, a Carriage Return and Line Feed will be inserted and a new line started before the command takes effect. Control Code: Hexadecimal:
FS 1C
Double High Off
GS
Disables double high printing. This command must be sent prior to any printable characters on the line. If sent after printable characters are received, a Carriage Return and Line Feed will be inserted and a new line started before the command takes effect. Control Code Hexadecimal:
8
GS 1D
Page 13
Printek Emulation Double High/Wide On
DC2 D
Enables double high/wide printing. This command causes all characters on the current line to printed double high and double wide. Control Code Hexadecimal:
DC2 12
D 44
Double High/Wide Off
DC2 d
Disables double high/wide printing. This command cancels double high/wide printing for the current line. Control Code Hexadecimal:
DC2 12 d 64
Set Text Line Spacing
ESC a n
Sets the number of dot rows the paper is to be moved after printing each row of text. Each dot row is 0.125mm. 0 ≤ n ≤ 10. Example: The following escape sequence sets the line spacing to zero (as needed when printing line drawing characters when the PC Line Drawing character set is selected). Escape Sequence: ESC Hexadecimal: 1B a 61
0 00
Character Attributes Select Emphasized Mode
ESC U n
Selects emphasized printing mode. Emphasized mode may be used to highlight text by giving it a more bold appearance. n 0 1
Selection Emphasized Mode Off Emphasized Mode On
This command must be sent prior to any printable characters on the line. If sent after printable characters are received, a Carriage Return and Line Feed will be inserted and a new line started before the command takes effect. Example: The following escape sequence will set emphasized printing mode to On. Escape Sequence: ESC Hexadecimal: 1B
U 55
1 31
9
Page 14
Printek Emulation
Character Sets Select Extended Character Set
ESC F n
Selects the character set to be used when printing extended characters (hexadecimal 80-FF). n 1 2
Character Set International Character Set PC Line Drawing Character Set
When using the PC Line Drawing Character Set, the Text Line Spacing should be set to zero. Doing so will allow the vertical line characters to form continuous lines. This command must be sent prior to any printable characters on the line. If sent after printable characters are received, a Carriage Return and Line Feed will be inserted and a new line started before the command takes effect. Please refer to “Print & Font Samples” on page 49 for information on the specific characters contained in each character set. Example: The following escape sequence will select the International character set. Escape Sequence: ESC Hexadecimal: 1B
F 46
1 31
Horizontal Position Carriage Return
CR
Causes the current line to be printed and the paper to advance to the next line. The current print position is set to the beginning of the next line. Note that either a Carriage Return (CR) or a Line Feed (LF) will cause both functions to be performed. However, a Carriage Return and Line Feed “pair” (CRLF) will only perform a single line feed. Control code: Hexadecimal:
CR 0D
Backspace
BS
Removes the previous character from the print buffer. Backspacing can be done up to, but not beyond, the beginning of the line. Control code: Hexadecimal:
10
BS 08