MP300 Mobile Printer Developer’s Manual Rev. A Copyright 2008 Unitech Electronics Co., Ltd. All rights reserved. Unitech is a registered trademark of Unitech Electronics Co., Ltd.
Preface About This Manual No part of this publication may be reproduced or used in any form, or by any electrical or mechanical means, without permission in writing from the manufacturer. This includes electronic or mechanical means, such as photocopying, recording, or information storage and retrieval systems. The material in this manual is subject to change without notice. © Copyright 2008 Unitech Electronics Co., Ltd. All rights reserved.
Table of Contents Preface Support ����������������������������������������������������������������������������������������������������������������� 3 General Precautions ������������������������������������������������������������������������������������������� 3 Chapter 1.0 Printer Character Set 1.0 Unitech MP300 Printer Character Set ���������������������������������������������������������� 6 1.
Chapter 1.0 1.1 Control Characters Printer Character Set 1.0 Unitech MP300 Printer Character Set Character Sets can be grouped into 3 categories – Control Characters, ACII Print Characters and Extended Print Characters. • • • • • • • • • • Control Characters Defined as character encoding {0x00..0x1F} Designed to control the printer operation ASCII Print Characters Defined as character encoding {0x20..
Chapter 2.0 Table 1.0 - Control Characters 1.2 Printable Character Sets Printer Font Control The printer has two resident character sets – namely Courier International and Courier PC Line Draw. Two commands are defined to select these character sets. Command String Selected Character Set Esc – ‘F’ –‘ 1’ Courier International Character Set Esc – ‘F’ –‘ 2’ Courier PC Line- Draw Character Set 2.0 Unitech MP300 Printer Font Control Table 1.
2.2 Character Height Control Commands A single byte control command is defined to control the printed character height. Normal height of a character is 23. EXTEND control character (^ \) selects a double height, which is equal to 46. EXTEND OFF control character (^]) selects a normal height. The command is applied to all the characters on a line following the control character.
Chapter 3.0 8-Bit Dot Addressable Graphic Commands Command String Printer Action Esc-’v’-height-width-counter-data-counter-data…. Prints a compressed graphic with the specified attributes. Table 3.1 – 8-bit Compressed Graphic Commands 3.0 8-Bit Dot Addressable Graphic Commands Graphic String Component Function of the component The Unitech MP300 printer uses a single line thermal head, which has 576 heating elements pitched at 0.125 mm. The total print width is 48 mm.
Chapter 4.0 The RLE compressed graphics command: Bar Codes ESC ‘v’ height width counter data… DEC 27 118 2 6 255 85 255 HEX 0x1B 0x76 0x02 0x06 0xFF 0x55 0xFF DEC 0 3 170 17 85 0 253 85 HEX 0x00 0x03 0xAA 0x11 0x55 0x00 0xFD 0x55 3.3 A quick Review of Graphic Logo Commands Graphic Images can be stored in the form of a logo. This allows the printer to store them in memory locations and print them as needed. The Unitech MP300 printer currently supports 8 logos.
Command String Printer Output Esc-‘Z’-‘1’-0x07- 0x0a-‘CODE-39’ Prints CODE -39, 1mm high Table 4.1 – CODE 39 Examples Code 128 Data Bytes: The data bytes are defined by which character set is defined. The printer accepts all characters 0x20h - 0x7Fh with the translations defined above. Also, characters 0x080 - 0x86 may be used as code 128 control characters: 4.
#27 #122 #50 #05 #40 #137 #49 #50 #51 #52 0x1B 0x7A 0x32 0x05 0x28 0x89 0x31 0x32 0x33 0x34 0x89 ‘1’ ‘2’ ‘3’ ‘4’ ESC ‘z’ ‘2’ 0x05 ‘(’ 4.2.1 UCC/EAN-128 specifications 4.4 UPC/EAN/JAN specifications Description: The UCC/EAN-128 specification is an internationally recognized format for application identifiers in code 128 bar codes. The bar code symbology is identical to Code 128. These identifiers are not intended for point-of-sale applications.
Chapter 5.0 4.5 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 start/stop pairs {A/T, B/M, C/*, D/E} Elements per symbol: 7 (4 bars, 3 spaces) Character density: 8.1 CPI Bar width: 0.25mm Characters per line: 20 (maximum) plus start/stop, automatically centered.
The printer may be operated in five peak-power modes, as listed in the table below Power Mode Command Maximum Dots Selected Maximum Current 1- Low Esc-‘P’-0x01 Heat < 64 elements at a time Less than 1.0 Amp 2- Medium Esc-‘P’-0x02 Heat <128 elements at a time Less than 2.0 Amps 3- High Esc-‘P’-0x03 Heat < 192 elements at a time Less than 3.0 Amps 4- Very High Esc-‘P’-0x06 Heat < 384 elements at a time Less than 9.0 Amps 5- Auto Control Esc-‘P’- 0x07 64,128,192, or 384 at a time 1.
Chapter 6.
Chapter 7.0 6.2 Black Mark Printer Commands Black Mark Command Command String Description Reverse Dot Feed <‘Q’> <‘J’> Perform reverse dot line feeds, 0.125mm each. Out of Paper Sensitivity <’Q’> <’Q’> On paper detect fail, postpone the paper out error response for 0.125mm dot lines before flagging a paper out error. Forward Black Mark Seek <‘Q’> <‘F’> Seek black mark using forward feed until dot line feeds have been processed, each dot line feed 0.250mm.
A.1.2 Flash Font Tables for Models MP200 and MP300 Flash fonts are stored in 7 banks. Each bank holds one complete table ( The table holds both ASCII and extended characters) . Thus for example Courier Font 1 & 2 International is in bank 0, Courier 3 International is in Bank 1, Courier 1 & 2 Line Draw is in Bank 4 ( notice that the empty banks do not count)., etc. The table below describes the commands needed to print with a certain font. Please note that character ‘-‘ is not part of the string.
A.1.3 Default International and PC Line Graphic Font (08w x 23h) International Font - 08w x 23h ! ! A.1.4 Default International and PC Line Graphic Font (10w x 23h) International Font - 10w x 23H Command String to Select: esc esc File Name: TB-A -10.DW1 + TBXn1023.DW1 PC Line Graphic - 10w x 23h Command string to Select: esc- esc- File Name: TB-A-10.DW1 + TBXi0823.DW1 Table A.
A.1.5 Default International and PC Line Graphic Font (12w x 23h) International Font - 12w x 23h Command String to Select: esc- esc- or esc- A.1.6 EXAMPLE: In this example the character ‘A’ (character code 0x41) stored in ASCII TABLE ‘0” is replaced with user designed character ‘A’. STEP 1 – Describe the Bitmap: This is best done within a font-editing program. Characters must be right justified within the 16 x 23 bit cell.
A.2.0 Graphic Logo Print Option STEP 2 – Enter flash font program mode: Send <‘D’> <‘A’> <0> to select ASCII flash font upload and wait for the printer to deactivate the CTS line. For the 2500/1500 or the 3750 printers the last number can be anything between 0..7 STEP 3 – Wait for the printer ready indicators: Wait for the printer to reactivated the CTS line and transmitted the character ‘?’ STEP 4 – Load new the character: Upload the user defined ASCII ‘A’ character.
Command Command Description Printer Response Esc – D-L-n Select Flash Logo Mode ? Esc – L-G-n Load/Record Graphic Logo none Esc- L-G- Stop Loading Graphic Logo D!X Esc-L-g-n Print Graphic Logo Printer Prints Logo n • Print your logo document to a file, name it , using Unitech graphic driver. Table A.7 – Graphic Logo Commands Table Please note: The characters ‘-‘ , ‘<’ or ‘>’ are not part of the command string. Decimal code for Esc is (27). A.2.
Chapter 8.0 Appendix B Three Track Magnetic Card Reader Option A three track Magnetic Card Reader is available on the Unitech MP300 model printers. The MC reader is designed to read magnetically encoded data from cards conforming to ANSI/ISO 7810, 7811 standards. The MC reader converts the F2F encoded signals on the magnetic card, to ISO7811 compatible ASCII format and transmit the information to the host computer or a terminal.
B.2.0 Magnetic Card Read command strings Six Commands strings are provided, to read the magnetic cards. These commands are summarized in the tables below. The general syntax for commands is as follows: Command String – General Syntax <’M’>< n> Track #CR Command String - Example <’M’> ‘9’ ‘ 9’ 1 CR Table B.1 – Magnetic Card Read Command Strings – general form • The ESC-M command turns on the power to the MC Reader • The next two bytes, are used to set the MC reader’s timer.
Chapter 9.0 B.5.0 Interfacing to the Magnetic Card Reader • This section details the software steps required to access the MC reader from a computer or a terminal. • The Host Selects the printer by activating the RTS input line or sending wake-up characters to the printer. • The Printer Sends the XON command to the host to indicate that it is ready to receive data from host. • Once XON is received the host sends ASCII serial command string to enablethe magnetic card reader (e.g. Esc-m004-cr).
Switch # 1, 2, 3, 6 4&5 4&5 6 7 8 Function Switch Switch Switch NOTES: Communication Interface SW1 SW2 SW3 RS232 OFF OFF OFF Also set 4&5 IrDA and RS232 ON OFF OFF 9600 baud IrDA ONLY ON ON OFF IR Direct Mode ON ON OFF 802.11b and RS232 OFF OFF ON Also set 4&5 802.11b ONLY OFF ON ON Also set 4&5 BT and RS232 OFF OFF ON Also set 4&5 BT ONLY OFF ON ON Also set 4&5 SW6 Also set 4&5 ON 9600 baud Comm.
RJ25 CONNECTOR PIN # FUNCTIONAL DESCRIPTION SIGNAL NAME 3 RS232 from Host (INPUT) RXD 2 RS232 from Printer (OUTPUT) TXD 6 Request to send from Host (INPUT) RTS 4 Clear to send from Printer(OUTPUT) CTS 1 5 Logic common COM Table C.1 – Serial Interfaces Signals and pinouts C.1.4 RS232C TECHNICAL SPECIFICATIONS Technical Specification Name Technical Specification Value Data Transfer Rate 2400 – 38.
Chapter 10.0 C.3.1 The Bluetooth™ interface power modification The Bluetooth™ interface increases the battery power consumption by 50 milli Amp. To compensate the increased power demand, the trickle charge rate is modified to help extend the life of the internal battery cartridge. The printer modification is such that the printer can be set to operate in either the MANUAL POWER OFF or CONTINUOUS ON mode of operation. C.3.
Font Name Character size (WxH) Command String Section Command String Printer Action 24 CPI normal 8x23 ESC+’k’+’5’ 2.1 ESC – ‘L’ – ‘G’ – n Prepare printer to load image A.2.2 21 CPI normal 9x23 ESC+’k’+’4’ 2.1 ESC – ‘G’ – 0x0FF Loading Logo Complete A.2.2 19 CPI normal 10x23 ESC+’k’+’3’ 2.1 ESC – ‘L’ – ‘g’ – n Print stored logo image A.2.2 16 CPI normal 12x23 ESC+’k’+’2’ 2.1 ESC – ‘z’ – n1 – n2 – L – [data] Print Bar Code without visible text 4.