Unitech MP300 Developer'S Manual Download Page 9

Copyright 2008 Unitech Electronics Co., Ltd. All rights reserved. Unitech is a registered trademark of Unitech Electronics Co., Ltd.

16

Copyright 2008 Unitech Electronics Co., Ltd. All rights reserved. Unitech is a registered trademark of Unitech Electronics Co., Ltd.

17

Command String

Printer Output

Esc-‘Z’-‘1’-0x07- 0x0a-‘CODE-39’

Prints  CODE -39, 1mm high

                                                                        

 Table 4.1 – CODE 39 Examples

4.2 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: 

  Support for full 256 ASCII set among three 

subsets.

Elements per symbol: 

6 (3 bars, 3 spaces)

Character density: 

9.1 CPI 

Bar width: 

  0.25mm

Characters per line: 

18 alphanumeric characters, or 36 numeric only 

(maximum) - automatically centered.

Code 128 Start character:

<start character> = {0x87, 0x88, 0x89} determines the character set to be printed

Start Character

Characters  Sent to 

Printer

Characters Read by Bar 

Code Reader

IF   <start character> is  

0x87  CODE A

0x020  through  0x03F  

ASCII (#32 - #63)

0x020  through  0x03F  

ASCII (#32 - #63)

0x040  through  0x07F  

ASCII (#64 - #127)

0x00   through  0x07F  

ASCII (#0 - #31)

IF   <start character> is 

0x88  CODE B

0x020 through 0x07F 

ASCII (#32 - #127)         

0x020 through 0x07F 

ASCII (#32 - #127)

IF   <start character> is 

0x89  CODE C

(Each number must be 

paired with another)

PAIRS 0x030 through 

0x039 ASCII (#48 - #57)

PAIRS 0x030 through 

0x039 ASCII

 (#48 - #57)

Table 4.2 – Code 128 Start Character

Code 128 Data Bytes:

<DATA>

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:

HEX

DEC

CODE A

CODE B

CODE C

0x080

128

FNC 3

FNC 3

0x081

129

FNC 2

FNC 2

0x082

130

SHIFT

SHIFT

0x083

131

change to C

change to C

0x084

132

change to B

FNC 4

change to B

0x085

133

FNC 4

change to A

change to A

0x086

134

FNC 1

FNC 1

FNC 1

                                              

Table 4.3 – Code 128 Data Bytes

FNC 1:  reserved CODE 128 character (used for UCC/EAN128)

FNC 2:  message append (not supported by all bar code readers)

FNC 3:  Initialize bar code reader

FNC 4:  extend characters (bar code reader reads cha 128)

     For example:  ‘a’ is changed from #97 to #97+128 = #225

Notice: It is possible to switch code sets in the middle of the bar code.  This is useful 

with heavily numeric alphanumeric bar codes (see example below).

 Code 128 EXAMPLES:

Print alphanumeric bar code “A2a”, 12.5mm high, with human readable text:

n = 3 printed char 1 start character = 4

L = 12.5mm / 0.125mm = #100

start character = START B (full ASCII alpha numeric) = #136

#27 

#90

#50

#04

#100

#136

#65

#50

#97

0x1B

0x5A

0x32

0x04

0x64

0x88

0x41

0x32

0x60

ESC

‘Z’

‘2’

0x04

‘d’

0x88

‘A’

‘2’

‘a’

Print all-numeric bar code “1234”, 5mm high, without human readable text:

n1 = 4 printed char 1 start character = 5

L = 5mm / 0.125mm = #40

start character = START C (numeric pairs) = #137

Summary of Contents for MP300

Page 1: ...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...

Page 2: ...ical related issues Should an equipment problem occur please contact the Unitech regional service representatives nearest you For complete contact information please visit the Web sites listed below U...

Page 3: ...int Contrast Control Command 21 5 2 Printer Peak Power Control Command 21 5 3 Printer Battery Voltage Monitor Commands 22 5 4 Auto Power Down Command 22 5 5 Printer Operating Mode Commands 23 5 6 Supe...

Page 4: ...ack Space Remove previous character in print buffer HT I 0x09 09 Horizontal Tab Tab to 5 9 13 17 21 25 29 33 37 or to the beginning of next line LF J 0x0A 10 Line Feed Advance to beginning of next lin...

Page 5: ...ter Font Control 2 0 Unitech MP300 Printer Font Control Four commands are defined with the Unitech MP300 printer which allow the user to select different typefaces change the character height width as...

Page 6: ...line feeds desired at the beginning of a line use the three character commands from the table below It is important to mention that while printing PC Line Draw characters the line spacing must be set...

Page 7: ...each to be received Valid Graphic character sets are from 0x00 to 0xFF Hex using bits 0 7 Esc J n Performs n 0 125mm feed Esc V 0x01 0x00 72 bytes of data This code prints a single line of graphic Ta...

Page 8: ...Graphic Logo none Esc L G OxFF Stop Loading Graphic Logo D X Esc L g n Print Graphic Logo Printer Prints Logo n Table 3 3 Graphic Logo Commands Chapter 4 0 Bar Codes 4 0 Bar Codes The Unitech MP300 pr...

Page 9: ...IRS 0x030 through 0x039 ASCII 48 57 PAIRS 0x030 through 0x039 ASCII 48 57 Table 4 2 Code 128 Start Character Code 128 Data Bytes DATA The data bytes are defined by which character set is defined The p...

Page 10: ...tered Example Command String Printer Output Esc Z 3 0x0A 0x50 1234567890 Prints interleaved 2 of 5 12345678 10 mm high Table 4 4 Interleaved 2 of 5 Example 4 4 UPC EAN JAN specifications Description E...

Page 11: ...d text or graphics depends on the type of the thermal paper used the printer battery voltage and the printer contrast setting selected by the host application Ten levels of printer contrast settings a...

Page 12: ...5 2 Printer Battery Voltage Monitor Commands 5 4 Auto Power Down Command In order to conserve battery life the printer features an auto power down timer The power down timer defaults to 20 seconds on...

Page 13: ...se ESC P Enable Buffer Empty response printer ready for more data EOT D transmitted on buffer empty EOT D 0x04 Buffer Empty Response Transmitted if printer buffer empty and the printer is ready for mo...

Page 14: ...h bits n2 holds the low four bits 0x30 4 low bits n1 and n2 can have values 0x30 through 0x3f Table 6 0 Black Mark Printer Commands Chapter 7 0 Appendix A A 1 0 Flash Font Download for MP200 and MP300...

Page 15: ...certain font Please note that character is not part of the string The default Printer setting is Courier International 21CPI decimal code 27 107 4 Font Type Command String Font Name Font Print Command...

Page 16: ...International and PC Line Graphic Font 08x23h Graphic 08w x 23h Command String to Select esc F1 esc k4 or esc k5 File Name TB A 08 DW2 TBXn0823 DW1 A 08 DW2 TBXi0823 DW1 PC Line esc F2 esc k4 or esc...

Page 17: ...s 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 To ensure the charac...

Page 18: ...operation of the printer remove the battery cartridge from the printer for several seconds Replace the battery cartridge and the new fonts will be ready for use To ensure optimal operation of the pri...

Page 19: ...e use the MP300 driver Use Wordpad or any Windows application to prepare your logo document From printer Setup of Wordpad application Set the paper margins to 0 12 Print your logo document to a file n...

Page 20: ...d 6 Wait for D X response to come back from the printer This indicates that file transmission and storage is completed 7 Cycle power 8 To test the LOGO prn file issue print commands Esc L g n Chapter...

Page 21: ...M nn 6 CR Read Tracks 1 2 and 3 simultaneously ESC C Cancel MC Read process nn ASCII 01 through 99 seconds nn 00 disables the MC reader timer Table B 2 Magnetic Card Read Command Strings Details B 3 0...

Page 22: ...enablethe magnetic card reader e g Esc m004 cr The printer turns on the GREEN READY LED Once the operator swipes the magnetic card the printer transmits in ASCII format the tracks information found on...

Page 23: ...erial Interface to the host computer A minimum of two connections is required for operation RXD pin 3 and Common pin 1 The proper baud rate and protocol settings are required to communicate with the h...

Page 24: ...ll wake up and print the requested data Pressing the power switch again will turn the printer OFF The printer can be either in Set IrDA mode which is fixed at 9600 bps baud rate or in Variable IrDA mo...

Page 25: ...r will remain active waiting for the wireless print command Pressing the ON switch Again will turn the printer OFF For each wireless demonstration again turn the printer on by pressing the ON switch O...

Page 26: ...eceived 5 5 ESC P Select Buffer mode characters are printed on D 5 5 ESC V n1 n2 data 8 bit Graphic command 3 1 ESC v n1 n2 data 8 bit Compressed Graphic Command 3 2 Table QR4 Printer Graphic Commands...

Reviews: