Series Programmer’s Manual Psion Teklogix Corporation 3000 Kustom Drive Hebron, KY 41048 800-322-3437 www.psionteklogix.com Psion Teklogix, Rev.
Manual Revision Notes: Released as Part Number 5886 in October, 2004 • Original release for the MLP 3040 Series printers. • Based on MLP Series firmware version 1.7. Released as Part Number 6035 in March, 2005 • Added support for the MLP 3030 Series printers. • Based on MLP Series firmware version 2.0. Released as Part Number 6035 Rev. A in October, 2005 • Updated to reflect MLP Series firmware version 2.8. Released as Part Number 6035 Rev.
TABLE OF CONTENTS Manual Revision Notes: .......................................................................................................................................ii Acknowledgements...............................................................................................................................................ii Introduction ..........................................................................................................................................................
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 Psion Teklogix PTX Print 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.
Introduction O’Neil Emulation provides a summary of the commands that are supported when emulating an O’Neil microFlash4t printer. 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.
Selecting Emulations The emulations offered by Printer Mobile Thermal Printers allow for a great deal of language commonality between the various series of Psion Teklogix printers as well as compatibility with systems and software that have been created for printers offered by other manufacturers. The Psion Teklogix PTX Print Series printers offer Printek, O’Neil, ZPL-II and CPCL emulations to allow the printers to work with existing three inch applications.
Printek Emulation Introduction This section describes the control codes and escape sequences comprising the default Printek emulation for PTX Print Series printers. 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.
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.
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.
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.
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.
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.
Printek Emulation Horizontal Tab HT Advances to the next horizontal tab stop. If no tab stop exists between the active column and the right margin, the print position will advance to the beginning of the next line. Horizontal tab stops are associated with columns, not absolute physical positions. Changing the character spacing or font will change the physical position of the tab stops. Default tab stops are set to every fourth column, i.e. 5,9,13,17,21,25,29,33,37 ….
Printek Emulation Variable Size Reverse Line Feed ESC Q J n Causes paper to be moved in the reverse direction n x 0.125mm. 0 ≤ n ≤ 255. A Carriage Return is also performed. Note that reverse paper motion is not supported in MLP3040 SL models and this command is ignored. Example: The following escape sequence moves paper in the reverse direction two millimeters (2 ÷ 0.125). Escape Sequence: ESC Hexadecimal: 1B Q 51 J 4A 16 10 Vertical Tab VT Advances the paper five lines.
Printek Emulation Bar Codes Several types barcode symbols may be printed using the following command. The specification for each bar code type is also described. Print Bar Code ESC a t n h data Psion Teklogix printers support several bar code symbologies including Code 39, Code 128, UCC/EAN-128, Interleaved 2 of 5, UPC/EAC/JAN, and Codabar. The following table describes the Bar Code command. Details for each specific bar code type, including examples, are found below.
Printek Emulation Code 128 Specifications Description: Each symbol starts with Leading Quiet Zone, followed with Start Symbol, Data Symbols, ending with Stop Symbol and Trailing Quiet Zone. Character set: 256 ASCII via three Code Sets and an “Extend” function. Elements per symbol: 6 (3 bars, 3 spaces) Character density: 9.1 CPI Bar width: 0.25mm The first character position in the data portion of the escape sequence must contain a “Start Character”, as defined below.
Printek Emulation Example 2: The following escape sequence will print a bar code using numeric pairs of numeric characters containing “123456” that is 10mm high without human readable text. Escape Sequence: ESC z Hexadecimal: 1b 7A 2 32 7 07 80 Start C 1 50 89 31 2 32 3 33 4 34 5 35 6 36 Example 3: The following escape sequence will print the same data as in Example 1, “ABC123”, using Code Sets that allow a mixture of alphanumeric character and numeric pairs.
Printek Emulation Elements per symbol: 4 (2 bars, 2 spaces) Character density: 14.5 CPI Bar width: 0.25mm Note: When specifying the bar code height that h represents the total height including a 1.25mm drop bar pattern printed after the barcode pattern. Example 1: The following escape sequence will print a UPC-A bar code containing “12345678901” that is 30mm high followed by human readable text. Note that a check digit “9” is also sent, but will be ignored and recalculated by the printer.
Printek Emulation Codabar Specifications Description: Each symbol starts with Leading Quiet Zone, followed with Start Symbol, Data Symbols, ending with Stop Symbol and Trailing Quiet Zone. Character set: 0-9, $, -, :, /, ., + and the start/stop pairs of A/T, B/N, C/*, and D/E. Elements per symbol: 7 (4 bars, 3 spaces) Character density: 8.1 CPI Bar width: 0.
Printek Emulation is 0-255 Example 1: The following escape sequence will print a horizontal line 2mm long starting 2mm from the left margin. Escape Sequence: ESC Hexadecimal: 1B # 23 1 01 4 04 0 00 0 00 255 FF 255 FF Example 2: The following escape sequence will print a square box 2mm x 1mm starting 2mm from the left margin, and then move the paper forward an additional 5mm.
Printek Emulation Multiple “sets” of counters and data may be sent to the printer as necessary to describe the graphic pattern to be printed. The values specified by the counter(s) are interpreted as follows.
Printek Emulation The counter may be considered as either a signed 7 bit value or an unsigned 8 bit value. For signed 7 bit values: 0 ≤ c ≤ 127 -128 ≤ c ≤ –1 For unsigned 8 bit values: 0 ≤ c ≤ 127 128 ≤ c ≤ 255 Process the next (c + 1) bytes as simple 8 bit graphic patterns. Repeat the next byte (-c + 1) times. Process the next (c+1) bytes as simple 8 bit graphic patterns. Repeat the next byte (256 - c + 1) times.
Printek Emulation Example: id = 0 This example will print the following signature. The size of the grid that the image is specified in is 277 points wide by 145 points high. When printed the image will be scaled to fit between the left and right margins.
Printek Emulation Example: id = 1 This example will print the following image, but it will be scaled to fit between the left and right margins.
Printek Emulation Load Graphic Image ESC L G n This command indicates that graphic commands describing an image to be stored is to follow. The value of n is used to identify this particular graphic image and may be any printable ASCII character (0x21 ≤ n ≤ 0x7E). This same value is then used to print the graphic. The graphic data is sent using Graphic commands as described on page 17. The image may consist of up to 2,436 graphic lines.
Printek Emulation Black Mark Sensing The PTX Print Series printers can print on preprinted forms on roll media by using a “black mark” to sense the beginning of each form. The black mark is located on the form in a position where the printer’s paper out sensor can be used to detect its presence. Additionally, the MLP “LP” models are capable of sensing a black mark on the back side of the form and for sensing the gap between labels. The recommended position for the black mark is described below.
Printek Emulation Forward Seek Black Mark ESC Q F n This command causes the printer to move the paper forward up to n dot rows to seek the beginning of a black mark on a form where 0 ≤ n ≤ 255 0.250mm dot rows. If the black mark is found, the printer responds with the escape sequence ESC Q ? ? n1 n2 where n1 n2 represent the number of dot rows the paper was moved before the black mark was detected.
Printek Emulation Printer Controls Bell BEL Causes the printer's bell to sound. Control code: Hexadecimal: BEL 07 CANCEL CAN Deletes all data in the printer’s input buffer and resets the printer to power up default values. Refer to “Printer Reset Conditions” on page 55 for more information. Control Code: Hexadecimal: CAN 18 Print Contrast ESC P n Sets the contrast, or relative “darkness”, of the characters or graphic images to be printed where 0 ≤ n ≤ 9 (hexadecimal 30-39).
Printek Emulation Select Format ESC l n Causes the current line to be printed, and then loads the format parameters for Format n. 1 ≥ n ≥ 5. If Format n is already selected, this command is ignored. Refer to the Printer Configuration section of the Operator’s Manual for complete details. Example: This escape sequence selects Format 2. Escape Sequence: ESC Hexadecimal: 1B l 6C 2 02 Select Emulation ESC ESC n Select the printer emulation mode to be used for future commands.
Printek Emulation Reset ESC c ESC * 0 Deletes all data in the printer’s input buffer and resets the printer to power up default values. Refer to “Printer Reset Conditions” on page 55 for more information.
Printek Emulation Print Buffer Status String The print buffer status will be retuned as a four digits representing the number bytes in the buffer that remain to be processed, divided by 32. For example, if b1-b4 = “0020”, this would indicate that there are at least 20 x 32, or 640, bytes remaining to be processed. A value of “0000” would indicate that the buffer is empty. Magnetic Card Reader Status String The MCR status indicates the presence of a reader in the printer, and if present, its current status.
Printek Emulation Query Printer Firmware Version ESC P ( This command returns a string containing the printer’s firmware version designation as three ASCII digits. The three digits may be interpreted by adding a decimal point between the first two digits as shown in the example below. Example: This following escape sequence requests the printer’s firmware version.
Printek Emulation Magnetic Card Reader Read Magnetic Card Data ESC M n1 n2 t CR If the optional Magnetic Card Reader (MCR) is installed in the printer, this command instructs the printer to read data from a card such as a credit card or driver’s license. The MCR is a three track reader designed to read magnetically encoded data conforming to ANSI/ISO 7810, 7811 standards. The card specifications are listed below.
Printek Emulation If for any reason the MCR is unable to read the card’s data, the printer will transmit an error message string in the format shown below. The characters n1 n2 represent an error number and error message is a description of the error. Possible values are described in the subsequent table.
Printek Emulation Control Code and Escape Sequence Summary Communications (RS-232C Serial Interface Only) End of Text ETX Acknowledge (Transmitted by Printer) ACK Printer Idle (Transmitted by Printer) EOT Transmitter On (Transmitted by Printer) XON (DC1) Transmitter Off (Transmitted by Printer) XOFF (DC3) Character Size and Line Spacing Select Character Pitch Set Printer to 12.7 cpi Set Printer to 22.6 cpi Set Printer to 22.
Printek Emulation Black Mark Sensing Set Paper Out Sensitivity Forward Seek Black Mark Reverse Seek Black Mark ESC Q Q n ESC Q F n ESC Q B n Printer Controls Sound Bell Cancel Print Contrast Enable Buffer Mode Disable Buffer Mode Print Buffer Contents (Buffer Mode) Select Format Select Emulation Store Printer Command File Reset Printer Turn Printer Off BEL CAN ESC P n ESC P $ ESC P # EOT ESC l n ESC ESC n ESC T type id size name data ESC c, ESC * 0 ESC * 1 Printer Status Commands Print Battery Status Q
Mt3 Emulation Selecting Mt3 Emulation allows applications written for the PTX Print series printers to operate properly. When using this emulation in an MLP3040 or PrintAbout MP 2000, the printer matches the print width of the Printek Mt3. For information on selecting emulations using Escape Sequences, please refer to “Selecting Emulations” on page 3. For information selecting emulations through the printer’s control panel set up, please refer to the printer’s Operator’s Manual.
Mt3 Emulation Bar Codes Print Bar Code Print Bar Code With Human Readable Text ESC z t n h data ESC Z t n h data Graphics 8 Bit Graphics 8-Bit Graphics * 8 Bit Compressed Graphics ESC V n1 n2 data ESC # h w data ESC v h w c data [c data] [c data] … Storing and Printing Graphic Logos Enter Flash Logo Mode Load Graphic Logo Store Graphic Logo Print Graphic Logo ESC D L ESC L G 0 ESC L G DEL ESC L g 0 Black Mark Sensing Set Paper Out Sensitivity Forward Seek Black Mark Reverse Seek Black Mark ESC Q Q n
O’Neil Emulation O’Neil Emulation allows Printek printers to respond to commands designed to operate an O’Neil microFlash printer. The commands that are supported are listed below. Note: Items marked with an asterisk (*) are Printek extensions. Refer to the Printek Emulation section of this manual.
O’Neil Emulation Printer Controls Sound Bell * Cancel Line Buffer Reset Select Easy Print Mode BEL CAN ESC @ ESC E Z Easy Print Mode Move Paper Forward Move Paper Backward Select Line Printer Mode Print Test Page Save Graphic {AHEAD:n} {BACK:n} {LP} {TP} {SAVE:n} This command has been added to provide a mechanism for storing graphic images. The image defined in the PRINT command that immediately follows will be stored as a graphic named “n”, where n is a string of up to five characters in length.
O’Neil Emulation Magnetic Card Reader Commands Configure Reader Configure MCR Enable MCR Disable MCR Zero MCR Data Read MCR Status Read MCR Data ESC{CCR:n} ESC{CMR:n} ESC{ME!} ESC{MD!} ESC{MZ!} ESC{RS?} ESC{MR?} Printer Controls Select Emulation ESC ESC n Font Mapping Line Printer Mode 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x28 0x29 0x2a 0x2b 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x5b 0x5d 0x60 0x61 0x62 0x63 0x7a Font Used 10.2 cpi Sans Serif A Bold 20.3 cpi Sans Serif A 10.
ZPL-II Emulation ZPL-II Emulation supports a subset of the Zebra ZPL-II command set and allows Printek printers to respond to commands designed to control a ZPL-II compatible printer. The commands that are supported are listed below.
ZPL-II Emulation Set absolute contrast Select ZPL-II Adjust tear-off position Start Format Recall Graphic Recall Format End Format ~SD n1 ^SZ2 ~TA n1 ^XA or STX ^XG n1,n2,n3 ^XF n1,n2,n3 ^XZ or ETX Additional Printer Control Select Emulation ESC ESC n Bar Code and Font Indices Bar Code Interleaved 2 of 5 Code 39 PDF417 EAN-8 UPC-E Code 128 EAN-13 Codabar (ANSI) UPC-A Index 2 3 7 8 9 C E K U Font Requested Zebra Font A Zebra Font B Zebra Font C Zebra Font D Zebra Font E Zebra Font F Zebra Font G Index
CPCL Emulation CPCL Emulation supports a subset of the Comtec CPCL command set and allows Printek printers to respond to commands designed to control a CPCL compatible printer. The commands that are supported are listed below. Note: This emulation is only available in units with firmware version 2.0 or later. CPCL Commands Terminate and Print File Form Feed Place Text on Label Place Text on Label, Rotated 90° CCW Place Text on Label, Rotated 180° Place Text on Label, Rotated 270° CCW Place Mult.
CPCL Emulation CPCL Commands (Continued) Set Printer to Use Gap Sensing (LP Models Only) Set Printer to Use Back Mark Sensing (LP Only) Print PCX formatted Graphic Print Different Character Styles On One Line Print Different Character Styles Vertically Left Justify Fields Center Justify Fields Right Justify Fields Draw a Circle ** Print a Logo/Graphic ** Save Label Job as Logo ** Utility Commands Set Line Printer Font Set Line Feed Height Set Horizontal Position Set Horizontal and Vertical Position Set Vert
CPCL Emulation Additional Printer Control Select Emulation ESC ESC n * Supported barcode types: UPCA,UPCE,EAN13,EAN8,39,39C,I2OF5,I2OF5C,128,UCCEAN128,CODABAR,CODABAR16 ** Additional command extensions.
Hex Dump Mode Hex Dump provides a way to print, in a readable form, all the data received by the printer. This tool is useful to programmers for debugging programs when sending control codes and escape sequences to the printer. Hex Dump mode may also be used to detect what commands are being sent by a particular software application to help determine which emulation mode is needed for that application.
Print & Font Samples These print samples were produced on an MLP3040.
Print & Font Samples Courier Font With International Extended Character Set Courier Font PC Line Drawing Extended Character Set 50
Print & Font Samples Sans Serif Font 51
ASCII Character Tables ASCII Control Code Definitions The following table is provided as a reference to the control character descriptions as provided by the ASCII definition. Not all of these definitions are supported by Psion Teklogix printers and some are emulation dependent. For more information consult the appropriate chapter for the emulation being used.
ASCII Character Tables Decimal to Hexadecimal TO ASCII Conversion Table Dec 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 54 Hex 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F ASCII NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT F
Printer Reset Conditions The following list describes what conditions are assumed whenever the printer is powered on. This list includes all variables which may be modified by the user for all emulations even though some emulations cannot modify all the variables shown. Refer to the appropriate section for the emulation being used.
Glossary 802.11 Wireless networking communication standards created by IEEE. access point An interface between a wireless network and a wired network. Ad-Hoc A Wi-Fi network consisting of only stations (no access point). Same as Peerto-Peer. ASCII American Standard Code for Information Interchange. authentication The process a Wi-Fi station uses to identify itself to another station. bandwidth The amount of data that be transferred in a given period of time.
IP Internet Protocol. A specification for packets, or datagrams, of data and an addressing method to allow the exchange of data with another system. Must be combined with another protocol such as TCP to create a complete connection with the other system. LAN Local Area Network. LCD Liquid crystal display. LED Light emitting diode. line pitch The vertical spacing of rows of characters. Measured in lpi. lpi Lines per inch. margin An area along any edge of a form where data may not be printed.