![Unitech MP300 Developer'S Manual Download Page 9](http://html1.mh-extra.com/html/unitech/mp300/mp300_developers-manual_4015125009.webp)
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