Professional Documents
Culture Documents
TSP600 Series
TSP700 Series
TSP800 Series
Programmers Manual
Notice
All rights reserved. Reproduction of any part of this manual in any form whatsoever,
without STARs express permission is forbidden.
The contents of this manual are subject to change without notice.
All efforts have been made to ensure the accuracy of the contents of this manual at the time
of going to press. However, should any errors be detected, STAR would greatly appreciate
being informed of them.
The above notwithstanding, STAR can assume no responsibility for any errors in this
manual.
TABLE OF CONTENTS
1. OUTLINE ............................................................................................ 1
2. STAR LINE MODE ............................................................................ 2
2-1. Command Summary .................................................................... 2
2-2. Command Specification ............................................................... 6
3. STAR PAGE MODE (TSP800 Only) ............................................... 46
3-1. Command Summary .................................................................. 46
3-2. Command Specification ............................................................. 48
4. DP8340 MODE (TSP800 Only) ....................................................... 69
4-1. Command Summary .................................................................. 69
4-2. Command Specification ............................................................. 70
5. ESC/POS MODE Command Summary ............................................ 75
Appendix 1 : How to set various bar codes ........................................... 77
Appendix 2 : Sensor adjustment mode .................................................. 85
Appendix 3 : Character code tables ....................................................... 86
A3-1. STAR Line mode ............................................................. 86
A3-2. STAR Page mode (TSP800 Only) ................................. 101
A3-3. DP8340 mode (TSP800 Only) ....................................... 105
1. OUTLINE
1-1.
TSP600/700 Series
1-2.
TSP800 Series
LINE MODE
Control codes
Hexadecimal
codes
Function
<ESC> R n
1B 52 n
<ESC> / 1
<ESC> / <1>
1B 2F 31
1B 2F 01
<ESC> / 0
<ESC> / <0>
1B 2F 30
1B 2F 00
<ESC> b n1 n2 n3 n4
d1 ... <RS>
1B 62 n1 n2 n3 n4
d1 ... 1E
<ESC> M
1B 4D
11
<ESC> p
1B 70
11
Page
6
6
6
7
<ESC> P
1B 50
11
<ESC> :
1B 3A
11
<ESC> <SP> n
1B 20 n
11
<SO>
0E
12
<DC4>
14
12
<ESC> W n
1B 57 n
<ESC> <SO>
1B 0E
12
<ESC> <DC4>
1B 14
12
<ESC> h n
1B 68 n
13
<ESC> i n1 n2
1B 69 n1 n2
13
<ESC> 1
<ESC> <1>
<ESC> 0
<ESC> <0>
1B 2D 31
1B 2D 01
Select underlining
1B 2D 30
1B 2D 00
Cancel underlining
<ESC> _ 1
<ESC> _ <1>
1B 5F 31
1B 5F 01
Select upperlining
<ESC> _ 0
<ESC> _ <0>
1B 5F 30
1B 5F 00
Cancel upperlining
13
13
14
14
Hexadecimal
codes
Function
Page
<ESC> 4
1B 34
14
<ESC> 5
1B 35
14
<SI>
0F
Inverted printing
14
<DC2>
12
14
<ESC> E
1B 45
15
<ESC> F
1B 46
15
<ESC><GS> t n
1B 1D 74 n
15
Hexadecimal
codes
Function
Page
<ESC> C n
1B 43 n
16
<ESC> C <0> n
1B 43 00 n
16
<ESC> N n
1B 4E n
16
<ESC> O
1B 4F
17
<ESC> l n
1B 6C n
17
<ESC> Q n
1B 51 n
17
Hexadecimal
codes
Function
Page
<LF>
0A
Line feed
18
<CR>
0D
18
<ESC> a n
1B 61 n
18
<FF>
0C
Form feed
18
<HT>
09
Horizontal tab
18
<VT>
0B
Vertical tab
19
<ESC> z 1
<ESC> z <1>
1B 7A 31
1B 7A 01
19
<ESC> 0
1B 30
19
<ESC> J n
1B 4A n
19
<ESC>I n
1B 49 n
20
20
20
<ESC> <GS>A n1 n2 1B 1D 41 n1 n2
21
<ESC> <GS>R n1 n2 1B 1D 52 n1 n2
21
<ESC> <GS>a n
Alignment
22
1B 1D 61 n
LINE MODE
Control codes
Hexadecimal
codes
Function
<ESC> K n <0>
m1 m2 ...
1B 4B n 00 m1 m2
...
<ESC> L n1 n2
m1 m2 ...
1B 4C n1 n2 m1 m2
Print high density graphics
...
25
1B 6B n 00 d1 ...
26
<ESC> X n1 n2 d1 ...
1B 58 n1 n2 d1 ...
Page
23
29
LINE MODE
<ESC> <FS> q n
1B 1C 71 n
Define logo data
[x11 x12 y11 y12 d [k1]]1 ... [x11 x12 y11 y12 d [k1]]1 ...
30
<ESC> <FS>p n m
32
1B 1C 70 n m
Hexadecimal
codes
1B 26 01 01 n
m1 m2 ... m48
33
1B 26 01 00 n
34
<ESC> % 1
<ESC> % <1>
1B 25 31
1B 25 01
<ESC> % 0
<ESC> % <0>
1B 25 30
1B 25 00
Function
Page
34
34
Hexadecimal
codes
<ESC> <BEL> n1 n2
1B 07 n1 n2
<BEL>
07
35
<FS>
1C
35
<EM>
19
35
<SUB>
1A
35
Function
Page
35
Hexadecimal
codes
Function
<ESC> d n
1B 64 n
36
<ESC> d t
1B 64 74
36
Page
Other Commands
Control codes
Hexadecimal
codes
Function
<CAN>
18
<ESC> <GS> # m N n1
n2 n3 n4 <LF> <NUL>
1B 1D 23 m N n1
n2 n3 n4 0A 00
<ESC> @
1B 40
Initialize printer
<ENQ>
05
Request status
41
<EOT>
04
Request status
42
Request status
42
<ESC> <RS> a n
1B 1E 61 n
37
37
41
45
45
LINE MODE
Page
CODE
<ESC> R
HEX
REMARKS
1B
52
LINE MODE
Character set
U.S.A.
France
Germany
England
Denmark I
Sweden
Italy
Spain I
FUNCTION
CODE
<ESC> /
REMARKS
HEX
1B
2F
n
8
9
10
11
12
13
14
64
Character set
Japan
Norway
Denmark II
Spain II
Latin America
Korea
Ireland
Legal
n
n
FUNCTION
CODE
<ESC> b
REMARKS
1B
62
n2
n3
n4
di
...
dk <RS>
n1
n2
n3
n4
di
...
dk
1E
UPC-E
UPC-A
JAN/EAN-8
JAN/EAN-13
CODE 39
ITF
CODE 128
CODE 93
NW-7
LINE MODE
HEX
n1
Narrow : wide
Narrow : wide
Narrow : wide
Narrow : wide
Narrow : wide
Narrow : wide
Narrow : wide
Narrow : wide
Narrow : wide
ITF
2:5 dots
4:10 dots
6:15 dots
2:4 dots
4:8 dots
6:12 dots
2:6 dots
3:9 dots
4:12 dots
LINE MODE
The bar code printing start position is at the upper end of the
current line.
If the bar code is positioned beyond the right margin, neither
the bar code nor the character below the bar code will be
printed.
Data of CODE 128 and CODE 93
When <LF> is used in a command, some kinds of control code
cannot be sent by the host PC. The control code should be sent
as the data as shown below:
LINE MODE
ITF:
LINE MODE
CODE
NUL 00H
SOH 01H
STX 02H
ETX 03H
EOT 04H
ENQ 05H
ACK 06H
BEL 07H
BS
08H
HT
09H
LF
0AH
VT
0BH
FF
0CH
CR
0DH
SO
0EH
SI
0FH
DLE 10H
DC1 11H
DC2 12H
DC3 13H
DC4 14H
NAK 15H
SYN 16H
ETB 17H
CAN 18H
EM
19H
SUB 1AH
ESC 1BH
FC
1CH
GS
1DH
RS
1EH
US
1FH
DEL 7FH
Special code
FORMAT
%@ 25H 40H
%A 25H 41H
%B 25H 42H
%C 25H 43H
%D 25H 44H
%E 25H 45H
%F 25H 46H
%G 25H 47H
%H 25H 48H
%I 25H 49H
%J 25H 4AH
%K 25H 4BH
%L 25H 4CH
%M 25H 4DH
%N 25H 4EH
%O 25H 4FH
%P 25H 50H
%Q 25H 51H
%R 25H 52H
%S 25H 53H
%T 25H 54H
%U 25H 55H
%V 25H 56H
%W 25H 57H
%X 25H 58H
%Y 25H 59H
%Z 25H 5AH
%[ 25H 5BH
% 25H 5CH
%] 25H 5DH
%^ 25H 5EH
%_ 25H 5FH
%5 25H 35H
10
CODE
25H
FORMAT
%0 25H 30H
Function codes
CODE
FNC1
FNC2
FNC3
FNC4
FORMAT
%1 25H 31H
%2 25H 32H
%3 25H 33H
%4 25H 34H
FORMAT
%6 25H 36H
%7 25H 37H
%8 25H 38H
Start codes
CODE
START A
START B
START C
FUNCTION
CODE
<ESC> M
1B
4D
REMARKS
FUNCTION
CODE
<ESC> p
HEX
1B
70
REMARKS
FUNCTION
CODE
<ESC> P
HEX
1B
50
REMARKS
FUNCTION
CODE
<ESC> :
HEX
1B
3A
REMARKS
FUNCTION
CODE
<ESC> <SP>
HEX
REMARKS
1B
20
n
n
11
LINE MODE
HEX
FUNCTION
CODE
HEX
REMARKS
FUNCTION
CODE
<DC4>
HEX
14
LINE MODE
REMARKS
FUNCTION
CODE
<ESC> W
HEX
REMARKS
1B
57
n
n
Character width
Unmagnify
Double
Triple
n
3
4
5
Character width
Quadruple
Quintuple
Sextuple
CODE
<ESC> <SO>
HEX
1B
0E
REMARKS
FUNCTION
CODE
<ESC><DC4>
HEX
REMARKS
1B
14
FUNCTION
CODE
<ESC> h
REMARKS
1B
68
Character height
Unmagnify
Double
Triple
n
3
4
5
Character height
Quadruple
Quintuple
Sextuple
CODE
<ESC> i n1 n2
HEX
REMARKS
1B
69 n1 n2
FUNCTION
Underlining
CODE
<ESC>
HEX
REMARKS
1B
2D
n
n
LINE MODE
HEX
FUNCTION
Upperlining
CODE
<ESC> _
HEX
1B
5F
n
n
LINE MODE
REMARKS
FUNCTION
CODE
<ESC> 4
HEX
1B
34
REMARKS
FUNCTION
CODE
<ESC> 5
HEX
1B
35
REMARKS
FUNCTION
Inverted printing
CODE
HEX
<SI>
0F
REMARKS
FUNCTION
CODE
<DC2>
HEX
REMARKS
12
Cancels inverted printing.
14
FUNCTION
CODE
<ESC> E
1B
HEX
45
REMARKS
FUNCTION
CODE
<ESC> F
46
REMARKS
FUNCTION
CODE
<ESC> <GS> t n
1B
HEX
REMARKS
LINE MODE
1B
HEX
1D 74 n
n (Hex)
(00)H
(01)H
(02)H
(03)H
(04)H
(05)H
(06)H
(07)H
(08)H
(09)H
(0A)H
(0B)H
(0C)H
(0D)H
(0E)H
(0F)H
(10)H
(11)H
(12)H
(13)H
(14)H
Character Table
Normal*
CodePage437 (USA, Std. Europe)
Katakana
CodePage437 (USA, Std. Europe)
Codepage 858 (Multilingual)
Codepage 852 (Latin-2)
Codepage 860 (Portuguese)
Codepage 861 (Icelandic)
Codepage 863 (Canadian French)
Codepage 865 (Nordic)
Codepage 866 (Cyrillic Russian)
Codepage 855 (Cyrillic Bulgarian)
Codepage 857 (Turkish)
Codepage 862 (Hebrew)
Codepage 864 (Arabic)
Codepage 737 (Greek)
Codepage 851 (Greek)
Codepage 869 (Greek)
Codepage 928 (Greek)
Codepage 772 (Lithuanian)
Codepage 774 (Lithuanian)
15
n(Hex)
(15)H
(20)H
(21)H
(22)H
(40)H
(41)H
(42)H
(43)H
(44)H
(45)H
(46)H
(47)H
(48)H
(49)H
(4A)H
(4B)H
(4C)H
(4D)H
(4E)H
(4F)H
(FF)H
Character Table
Codepage 874 (Thai)
Codepage 1252 (Windows Latin-1)
Codepage 1250 (Windows Latin-2)
Codepage 1251 (Windows Cyrillic)
Codepage 3840 (IBM-Russian)
Codepage 3841 (Gost)
Codepage 3843 (Polish)
Codepage 3844 (CS2)
Codepage 3845 (Hungarian)
Codepgae 3846 (Turkish)
Codepage 3847 (Brazil-ABNT)
Codepage 3848 (Brazil-ABICOMP)
Codepage 1001 (Arabic)
Codepage 2001 (Lithuanian-KBL)
Codepage 3001 (Estonian-1)
Codepage 3002 (Estonian-2)
Codepage 3011 (Latvian-1)
Codepage 3012 (Latvian-2)
Codepage 3021 (Bulgarian)
Codepage 3041 (Maltese)
User Setting (Blank Code Page)
CODE
<ESC> C
HEX
1B
43
n
n
LINE MODE
REMARKS
Sets the page length using the current line spacing, where n is
between 1 and 127.
Changing the line spacing later does not alter the physical page
length.
The current line becomes the top of the page.
Resets the bottom margin.
Invalid when start position detect is ON.
FUNCTION
CODE
<ESC> C <0>
HEX
REMARKS
1B
43
00
CODE
<ESC> N
REMARKS
FUNCTION
HEX
1B
4E
n
n
Sets the bottom margin to n lines at the current line spacing, where
n is between 0 and 255.
Changing the line spacing later does not alter the bottom margin.
Bottom margin is reset when you change the page length.
Setting is invalid if the printing area on one page is 36 mm or less.
Invalid when start position detect is ON.
16
FUNCTION
CODE
<ESC> O
1B
4F
REMARKS
FUNCTION
CODE
<ESC> l
HEX
1B
6C
n
n
REMARKS
FUNCTION
CODE
<ESC> Q
HEX
REMARKS
1B
51
n
n
17
LINE MODE
HEX
CODE
HEX
Line feed
<LF>
0A
REMARKS
Prints the current line and feeds the paper to the next line.
If there is no data to print, only line feed is performed.
FUNCTION
Carriage return
CODE
LINE MODE
HEX
<CR>
0D
REMARKS
Prints the current line and feeds the paper to the next line.
This command is ignored when CR code is invalid.
FUNCTION
CODE
<ESC> a
HEX
1B
61
n
n
REMARKS
Prints the current line and feeds the paper n lines (where n is
between 1 and 127).
FUNCTION
Form feed
CODE
HEX
<FF>
0C
REMARKS
Feeds the paper to the top of the next page, according to the page
length set by <ESC>Cn or <ESC>C<0>n when print start
position detect is ON, and according to the sensor output when print
start detect is OFF. The print position is at the left margin in both
cases.
FUNCTION
Horizontal tab
CODE
HEX
REMARKS
<HT>
09
Moves the print position to the next horizontal tab stop. Ignored if
there is no next horizontal tab stop on the current line.
18
CODE
HEX
Vertical tab
<VT>
0B
REMARKS
When start position detect is invalid, feeds the paper to the next
vertical tab stop and moves the print position to the left margin.
If no vertical tabs are set, this command is ignored.
Performs a line feed if the current line is at or below the last vertical
tab stop.
This command is ignored when start position detect is valid.
FUNCTION
CODE
<ESC> z
HEX
1B
7A
or <ESC> z
31
or
1B
<1>
7A
01
REMARKS
FUNCTION
CODE
<ESC> 0
HEX
1B
30
REMARKS
FUNCTION
CODE
<ESC> J
HEX
REMARKS
1B
4A
n
n
19
LINE MODE
FUNCTION
FUNCTION
CODE
<ESC> I
HEX
1B
49
n
n
REMARKS
FUNCTION
CODE
<ESC> B
LINE MODE
HEX
1B
42
n1
n2
...
<0>
n1
n2
...
00
REMARKS
Cancels all current vertical tab stops and sets new vertical tab stops
at lines n1, n2, etc., where n1, n2, etc. are numbers between 1 and
255. A maximum of 16 vertical tab stops can be set.
The tab stops must be specified in ascending order; any violation
of ascending order terminates the tab stop list. Standard termination is by the <0> control code.
The vertical tab stops are set in terms of the current line spacing and
do not move if the line spacing is changed later.
Invalid when start position detect is valid.
<ESC> "B" <0> cancels all vertical tab.
FUNCTION
CODE
<ESC> D
HEX
REMARKS
1B
44
n1
n2
...
<0>
n1
n2
...
00
Cancels all current horizontal tab stops and sets new tab stops at
columns n1, n2, etc. at the current character pitch, where n1, n2,
etc. are numbers between 1 and 255. A maximum of 16 horizontal
tab stops can be set.
The tab stops must be specified in ascending order; any violation
of ascending order terminates the tab stop list. Standard termination is by the <0> control code.
The horizontal tab stops are set in terms of the current character
pitch and do not move if the character pitch is changed later.
<ESC> "D" <0> cancels all horizontal tab.
20
CODE
<ESC> <GS> A
HEX
1B
1D
41
n1
n2
n1
n2
REMARKS
Sets the absolute position based on the left margin position for
starting the next printing.
0 n1, n2 255
The start of the next printing is the (n1 + n2 256 dot) position from
the left margin position.
Settings that exceed the print area are ignored.
FUNCTION
CODE
<ESC> <GS> R
HEX
REMARKS
1B
1D
52
n1
n2
n1
n2
Sets the relative position based on the current position for starting
the next printing.
0 n1, n2 255
The start of the next printing is the (n1 + n2 256 dot) position from
the current position.
1. Settings that exceed the printing area are ignored.
2. When set in the right direction from the current position with
regard to the character direction, this specifies positive integers and when set in the left direction, this specifies negative
integers.
3. Negative integers are shown with the compliment 65536.
For example, if moving N pitches in the left direction:
n1 + n2 256 = 65536 N.
21
LINE MODE
FUNCTION
FUNCTION
Alignment
CODE
<ESC> <GS> a
HEX
REMARKS
1B
1D
61
n
n
Alignment Position
Left
Center
Right
LINE MODE
ABC
ABCD
ABCDE
ESC GS a 0
ESC GS a 1
ABC
ABCD
ABCDE
ESC GS a 2
ABC
ABCD
ABCDE
22
FUNCTION
CODE
<ESC> K
HEX
1B
4B
n1
n2
n1
n2
D8
Image data
D7
D6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
23
D5
LSB
D4
D3
D2
D1
LINE MODE
EXAMPLE
d 6 d 7 d 8 d 9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30
D8
D7
D6
D5
D4
D3
D2
D1
First, since the volume of data is 30, n1 = (1E)H. If the data d1 ~ d30
is converted to hexadecimal, it appears as shown below.
LINE MODE
Data
Binary
Hexadecimal
Data
Binary
Hexadecimal
Data
Binary
Hexadecimal
d1
d2
d3
d4
d5
d6
d7
d8
d9
d10
00000001
00011110
00111110
01011111
00011111
01011110
00011110
00111111
00101111
00111110
01
1E
3E
5F
1F
5E
1E
3F
2F
3E
d11
d12
d13
d14
d15
d16
d17
d18
d19
d20
00111110
00000010
00000010
00111110
00111110
00101111
00101111
00111110
00101110
00101110
3E
02
02
3E
3E
2F
2F
3E
2E
2E
d21
d22
d23
d24
d25
d26
d27
d28
d29
d30
00111110
00101110
00101110
00111110
00101111
00101111
00111110
00111110
00000010
00000010
3E
2E
2E
3E
2F
2F
3E
3E
02
02
Printing Sample
24
CODE
<ESC> L
HEX
REMARKS
1B
4C
n1
n2
n1
n2
D8
Image data
D7
D6
1
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
D5
LSB
D4
D3
D2
D1
LINE MODE
FUNCTION
EXAMPLE
d 6 d 7 d 8 d 9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30
D8
D7
D6
D5
D4
D3
D2
D1
First, since the volume of data is 30, n1 = (1E)H. If the data d1 ~ d30
is converted to hexadecimal, it appears as shown below.
Binary
Hexadecimal
Data
Binary
Hexadecimal
Data
Binary
Hexadecimal
d1
d2
d3
d4
d5
d6
d7
d8
d9
d10
00000001
00011110
00111110
01011111
00011111
01011110
00011110
00111111
00101111
00111110
01
1E
3E
5F
1F
5E
1E
3F
2F
3E
d11
d12
d13
d14
d15
d16
d17
d18
d19
d20
00111110
00000010
00000010
00111110
00111110
00101111
00101111
00111110
00101110
00101110
3E
02
02
3E
3E
2F
2F
3E
2E
2E
d21
d22
d23
d24
d25
d26
d27
d28
d29
d30
00111110
00101110
00101110
00111110
00101111
00101111
00111110
00111110
00000010
00000010
3E
2E
2E
3E
2F
2F
3E
3E
02
02
LINE MODE
Data
Horizontal density is three times that of the bit image for <ESC>k.
(Compare the print samples.)
Printing Sample
FUNCTION
CODE
<ESC>
<0>
d1...dk [k = n 24]
1B
6B
00
d1...dk [k = n 24]
HEX
REMARKS
Prints a bit image using 1 horizontal dot and 1 vertical dot for 1 dot
of input data.
<Print area>
104mm (TSP800)
: 1 n 104
72mm (TSP600/700)
: 1 n 72
52.5mm (TSP700)
: 1 n 52
80mm (TSP700)
: 1 n 80
50.8mm (TSP600/700)
: 1 n 50
26
Dot position
d2
b1 b0 b7 b6 b5 b4 b3 b2
dn+2
b1 b0 b7 b6 b5 b4 b3 b2
d2n+2
b1 b0 b7 b6 b5 b4 b3 b2
d3n+2
b1 b0 b7 b6 b5 b4 b3 b2
d4n+2
b1 b0 b7 b6 b5 b4 b3 b2
d5n+2
b1 b0 b7 b6 b5 b4 b3 b2
d6n+2
b1 b0 b7 b6 b5 b4 b3 b2
d7n+2
b1 b0 b7 b6 b5 b4 b3 b2
d8n+2
b1 b0 b7 b6 b5 b4 b3 b2
d9n+2
b1 b0 b7 b6 b5 b4 b3 b2
d10n+2
b1 b0 b7 b6 b5 b4 b3 b2
d11n+2
b1 b0 b7 b6 b5 b4 b3 b2
d12n+2
b1 b0 b7 b6 b5 b4 b3 b2
d13n+2
b1 b0 b7 b6 b5 b4 b3 b2
d14n+2
b1 b0 b7 b6 b5 b4 b3 b2
d15n+2
b1 b0 b7 b6 b5 b4 b3 b2
d16n+2
b1 b0 b7 b6 b5 b4 b3 b2
d17n+2
b1 b0 b7 b6 b5 b4 b3 b2
d18n+2
b1 b0 b7 b6 b5 b4 b3 b2
d19n+2
b1 b0 b7 b6 b5 b4 b3 b2
d20n+2
b1 b0 b7 b6 b5 b4 b3 b2
d21n+2
b1 b0 b7 b6 b5 b4 b3 b2
d22n+2
b1 b0 b7 b6 b5 b4 b3 b2
d23n+2
b1 b0 b7 b6 b5 b4 b3 b2
27
b1 b0
b1 b0
b1 b0
b1 b0
b1 b0
b1 b0
b1 b0
b1 b0
b1 b0
b1 b0
b1 b0
b1 b0
b1 b0
b1 b0
b1 b0
b1 b0
b1 b0
b1 b0
b1 b0
b1 b0
b1 b0
b1 b0
b1 b0
b1 b0
dn
b7 b6 b5 b4 b3
d2n
b7 b6 b5 b4 b3
d3n
b7 b6 b5 b4 b3
d4n
b7 b6 b5 b4 b3
d5n
b7 b6 b5 b4 b3
d6n
b7 b6 b5 b4 b3
d7n
b7 b6 b5 b4 b3
d8n
b7 b6 b5 b4 b3
d9n
b7 b6 b5 b4 b3
d10n
b7 b6 b5 b4 b3
d11n
b7 b6 b5 b4 b3
d12n
b7 b6 b5 b4 b3
d13n
b7 b6 b5 b4 b3
d14n
b7 b6 b5 b4 b3
d15n
b7 b6 b5 b4 b3
d16n
b7 b6 b5 b4 b3
d17n
b7 b6 b5 b4 b3
d18n
b7 b6 b5 b4 b3
d19n
b7 b6 b5 b4 b3
d20n
b7 b6 b5 b4 b3
d21n
b7 b6 b5 b4 b3
d22n
b7 b6 b5 b4 b3
d23n
b7 b6 b5 b4 b3
d24n
b7 b6 b5 b4 b3
b2 b1 b0
b2 b1 b0
b2 b1 b0
b2 b1 b0
b2 b1 b0
b2 b1 b0
b2 b1 b0
b2 b1 b0
b2 b1 b0
b2 b1 b0
b2 b1 b0
b2 b1 b0
b2 b1 b0
b2 b1 b0
b2 b1 b0
b2 b1 b0
b2 b1 b0
b2 b1 b0
b2 b1 b0
b2 b1 b0
b2 b1 b0
b2 b1 b0
b2 b1 b0
b2 b1 b0
LINE MODE
d1
b7 b6 b5 b4 b3 b2
dn+1
b7 b6 b5 b4 b3 b2
d2n+1
b7 b6 b5 b4 b3 b2
d3n+1
b7 b6 b5 b4 b3 b2
d4n+1
b7 b6 b5 b4 b3 b2
d5n+1
b7 b6 b5 b4 b3 b2
d6n+1
b7 b6 b5 b4 b3 b2
d7n+1
b7 b6 b5 b4 b3 b2
d8n+1
b7 b6 b5 b4 b3 b2
d9n+1
b7 b6 b5 b4 b3 b2
d10n+1
b7 b6 b5 b4 b3 b2
d11n+1
b7 b6 b5 b4 b3 b2
d12n+1
b7 b6 b5 b4 b3 b2
d13n+1
b7 b6 b5 b4 b3 b2
d14n+1
b7 b6 b5 b4 b3 b2
d15n+1
b7 b6 b5 b4 b3 b2
d16n+1
b7 b6 b5 b4 b3 b2
d17n+1
b7 b6 b5 b4 b3 b2
d18n+1
b7 b6 b5 b4 b3 b2
d19n+1
b7 b6 b5 b4 b3 b2
d20n+1
b7 b6 b5 b4 b3 b2
d21n+1
b7 b6 b5 b4 b3 b2
d22n+1
b7 b6 b5 b4 b3 b2
d23n+1
b7 b6 b5 b4 b3 b2
Printing Sample
EXAMPLE
MSB
LSB
MSB
LSB
LINE MODE
d1
d3
d5
d7
d9
d11
d13
d15
d17
d19
d21
d23
d25
d27
d29
d31
d33
d35
d37
d39
d41
d43
d45
d47
d2
d4
d6
d8
d10
d12
d14
d16
d18
d20
d22
d24
d26
d28
d30
d32
d34
d36
d38
d40
d42
d44
d46
d48
Data
Binary
d1
d3
d5
d7
d9
d11
d13
d15
d17
d19
d21
d23
d25
d27
d29
d31
d33
d35
d37
d39
d41
d43
d45
d47
00000000
00011111
00111111
01110111
11111000
11111000
11111000
00001111
00011111
00011111
00111110
00111000
011111001
01110011
01110011
11111001
11111000
11111110
11111111
11111111
00000000
00000000
00000000
00000000
Hexa- Data
decimal
00
1F
3F
77
F8
F8
F8
0F
1F
1F
3E
38
79
73
73
F9
F8
FE
FF
FF
00
00
00
00
d2
d4
d6
d8
d10
d12
d14
d16
d18
d20
d22
d24
d26
d28
d30
d32
d34
d36
d38
d40
d42
d44
d46
d48
Binary
Hexadecimal
00000000
11111000
11111100
01110111
00011111
00011111
00011111
11110000
11111000
11111000
01111100
00011100
10011110
11001110
11001110
10011111
00011111
01111111
11111111
11111111
00000000
00000000
00000000
00000000
00
F8
FC
EE
1F
1F
1F
F0
F8
F8
7C
1C
9E
CE
CE
9F
1F
7F
FF
FF
00
00
00
00
28
CODE
<ESC>
n1
n2
d1...dk [k = (n1+n2256)3]
1B
n1
n2
d1...dk [k = (n1+n2256)3]
HEX
REMARKS
Prints a bit image of the input data using horizontal and vertical
resolutions of 8 dots/mm.
Data extending past the right margin is ignored.
The relationship between the input data and the actual printing is
shown below.
<Print area>
104mm (TSP800)
:1 n1 + n2 256 832
72mm (TSP600/700)
:1 n1 + n2 256 576
52.5mm (TSP700)
:1 n1 + n2 256 420
80mm (TSP700)
:1 n1 + n2 256 640
50.8mm (TSP600/700)
:1 n1 + n2 256 406
d1
Dot
Position
MSB
d2
LSB
b7 b6 b5 b4 b3 b2 b1 b0
MSB
d3
LSB
b7 b6 b5 b4 b3 b2 b1 b0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
29
MSB
LSB
b7 b6 b5 b4 b3 b2 b1 b0
LINE MODE
FUNCTION
FUNCTION
CODE
<ESC> <FS> q n [x11 x12 y11 y12 d [k1]] 1... [xn1 xn2 yn1
yn2 d[kn]]n
1B
1C 71
yn2 d[kn]]n
HEX
REMARKS
LINE MODE
d [11] d [21]
d [n1]
d [12] d [22]
d [n2]
Data
MSB
LSB
d [x1] d [x2]
31
d [xn]
LINE MODE
FUNCTION
CODE
<ESC> <FS> p
1B
HEX
REMARKS
1C
70
LINE MODE
0 m 3 or 0 m 3
m = 0 or 0 Normal
m = 1 or 1 Double-width
m = 2 or 2 Double-height
m = 3 or 3 Quadruple ( double-width, double height )
Note) If there is unprinted data in the line buffer, this command will be
executed after the data in the line buffer is printed out.
This command is not affected by print modes (emphasized, underline, character size, etc.) except inverted printing.
Print start position in the horizontal direction is the left margin
position. Horizontal print area follows the left and right margin
settings.
If the horizontal size of the logo image exceeds the horizontal print
area, the exceeded data is not printed.
32
FUNCTION
CODE
HEX
REMARKS
1B
26
01
01
m1
m2
...
m48
m1
m2
...
m48
Defines one new character and stores it in RAM for later use.
n is the character code of the character defined and must be
between 32 and 127.
The character matrix is 12 dots wide and 24 dots high.
Relationship between the character pattern and the character data
is shown below.
EXAMPLE
MSB
LSB
MSB
LSB
m1
m3
m5
m7
m9
m11
m13
m15
m17
m19
m21
m23
m25
m27
m29
m31
m33
m35
m37
m39
m41
m43
m45
m47
m2
m4
m6
m8
m10
m12
m14
m16
m18
m20
m22
m24
m26
m28
m30
m32
m34
m36
m38
m40
m42
m44
m46
m48
Ignored
4 bits
33
LINE MODE
LINE MODE
FUNCTION
CODE
HEX
Hexa- Data
decimal
Data
Binary
m1
m3
m5
m7
m9
m11
m13
m15
m17
m19
m21
m23
m25
m27
m29
m31
m33
m35
m37
m39
m41
m43
m45
m47
00011000
00111000
01111000
00011000
00011000
00011000
00011000
00011001
00011011
00000110
00001100
00011011
00110111
01100110
00000000
00000000
00000001
00000011
00000111
00000111
00000000
00000000
00000000
00000000
18
38
78
18
18
18
18
19
1B
06
0C
1B
37
66
00
00
01
03
07
07
00
00
00
00
m2
m4
m6
m8
m10
m12
m14
m16
m18
m20
m22
m24
m26
m28
m30
m32
m34
m36
m38
m40
m42
m44
m46
m48
Binary
Hexadecimal
00000000
00000000
00000000
00000000
00000000
01100000
11000000
10000000
00000000
00000000
00000000
11000000
11100000
01100000
01100000
11000000
10000000
00000000
11100000
11100000
00000000
00000000
00000000
00000000
00
00
00
00
00
60
C0
80
00
00
00
C0
E0
60
60
C0
80
00
E0
E0
00
00
00
00
26
01
00
n
n
REMARKS
FUNCTION
CODE
HEX
<ESC> %
1B
25
or <ESC> % <1>
31
or
1B
25
REMARKS
FUNCTION
CODE
HEX
REMARKS
<ESC> %
1B
25
01
or <ESC> % <0>
30
or
1B
25
00
CODE
<ESC><BEL> n1
1B
07
n1
n2
REMARKS
FUNCTION
CODE
HEX
<BEL>
07
REMARKS
FUNCTION
CODE
HEX
<FS>
1C
REMARKS
FUNCTION
CODE
<EM>
HEX
19
REMARKS
Drives peripheral device #2. The drive pulse width and delay time
are fixed at 200 ms.
FUNCTION
CODE
HEX
REMARKS
<SUB>
1A
Drives peripheral device #2. The drive pulse width and delay time
are fixed at 200 ms.
35
LINE MODE
HEX
n2
CODE
<ESC> d
HEX
REMARKS
1B
64
n
n
n = 0 or <0> : TSP700/800
Cuts the paper fully immediately.
LINE MODE
n = 1 or <1> : TSP600/700/800
Cuts the paper leaving one point uncut immediately.
n = 2 or <2> : TSP700/800
Cuts the paper fully after feeding the paper to
the cutting position.
When print start position detect is ON, feeds the
paper to the next print start position first, feeds
the paper to the cutting position, then cuts the
paper fully.
n = 3 or <3> : TSP600/700/800
Cuts the paper fully after feeding the paper to
the cutting position.
When print start position detect is ON, feeds the
paper to the next print start position first, feeds
the paper to the cutting position, then cuts the
paper leaving one point uncut.
FUNCTION
CODE
<ESC> d
HEX
REMARKS
1B
64
t
74
36
Other Commands
FUNCTION
CODE
<CAN>
18
REMARKS
Clears the line buffer, and initializes the commands set already.
Does not affect the external equipment drive conditions set by the
code <ESC> <BEL> n1 n2. (This is the same during a mechanical
error.)
FUNCTION
CODE
<ESC> <GS># m N n1 n2 n3 n4
HEX
REMARKS
<LF> <NUL>
1B 1D 23 m N 2C n1 n2 n3 n4
0A
00
(Default)
0
Setting
Always 0
Start-position delect (*1)
Zero style
International character set
n4
0
1
2
Country
USA
France
Germany
n4
C
D
E
F
Country
Latin America
Korea
Ireland
Legal
n4
3
4
5
Country
UK
Denmark #1
Sweden
OFF
Normal zero
1
ON
Slashed zero
See below
n4
6
7
8
n4
9
A
B
Country
Itary
Spain #1
Japan
37
Country
Norway
Denmark #2
Spain #2
LINE MODE
HEX
LINE MODE
n4
Character table
Print colum
4
Valid
3
Valid
55 (TSP800)
33/35/48/53
(TSP700)
27/28/38/42
(TSP700)
33/48
(TSP600)
27/38
(TSP600)
4
Invalid
3
Invalid
Setting
Always 0
Always 0
Print colum
Print area
n3
0
Print colum
EPSON
compatible
Max.
colum
n4
0
1
2
3
2
See bolow (ESC/POS mode only)
See bolow
Print area
Left margin
72 mm (576dots)
32 dots
52.5 mm (420dots)
24 dots
80 mm (640dots)
40 dots
50.8 mm (406dots)
24 dots
72 mm (576dots)
0 dot
52.5 mm (420dots)
0 dot
80 mm (640dots)
0 dot
50.8 mm (406dots)
0 dot
Print area
72 mm (576 dots)
52.5 mm (420 dots)
80mm (640 dots)
50.8 mm (406 dots)
38
Font-A
42 colums
31 colums
47 colums
30 colums
48 colums
35 colums
53 colums
33 colums
Font-B
56 colums
41 colums
63 colums
40 colums
64 colums
46 colums
71 colums
45 colums
b) TSP600
Setting
Always 0
Always 0
Print colum
Print area
n3
0
Print colum
EPSON
compatible
Max.
colum
n4
0
1
2
3
2
See bolow (ESC/POS mode only)
See bolow
Print area
Left margin
72 mm (576dots)
32 dots
50.8 mm (406dots)
24 dots
72 mm (576dots)
0 dot
50.8 mm (406dots)
0 dot
Print area
72 mm (576 dots)
50.8 mm (406 dots)
39
Font-A
42 colums
30 colums
48 colums
33 colums
Font-B
56 colums
40 colums
64 colums
45 colums
LINE MODE
n1
n2
n3
n4
Table 1
MSW3-E MSW3-D MSW3-C MSW3-B MSW3-A MSW3-9 MSW3-8 Character Table
LINE MODE
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
1
1
0
0
0
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
0
0
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
1
40
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
1
Normal*
CodePage 437 (USA, Std. Europe)
Katakana
CodePage 437 (USA, Std. Europe)
Codepage 858 (Multilingual)
Codepage 852 (Latin-2)
Codepage 860 (Portuguese)
Codepage 861 (Icelandic)
Codepage 863 (Canadian French)
Codepage 865 (Nordic)
Codepage 866 (Cyrillic Russian)
Codepage 855 (Cyrillic Bulgarian)
Codepage 857 (Turkish)
Codepage 862 (Hebrew)
Codepage 864 (Arabic)
Codepage 737 (Greek)
Codepage 851 (Greek)
Codepage 869 (Greek)
Codepage 928 (Greek)
Codepage 772 (Lithuanian)
Codepage 774 (Lithuanian)
Codepage 874 (Thai)
Codepage 1252 (Windows Latin-1)
Codepage 1250 (Windows Latin-2)
Codepage 1251 (Windows Cyrillic)
Codepage 3840 (IBM-Russian)
Codepage 3841 (Gost)
Codepage 3843 (Polish)
Codepage 3844 (CS2)
Codepage 3845 (Hungarian)
Codepage 3846 (Turkish)
Codepage 3847 (Brazil-ABNT)
Codepage 3848 (Brazil-ABICOMP)
Codepage 1001 (Arabic)
Codepage 2001 (Lithuanian-KBL)
Codepage 3001 (Estonian-1)
Codepage 3002 (Estonian-2)
Codepage 3011 (Latvian-1)
Codepage 3012 (Latvian-2)
Codepage 3021 (Bulgarian)
Codepage 3041 (Maltese)
User setting (Blank code page)
FUNCTION
Initialize printer
CODE
<ESC> @
40
REMARKS
Reinitializes the printer. Clears the print buffer and returns settings
to their power-up values.
Does not clear the input buffer, downloaded characters, or conditions for peripheral devices.
FUNCTION
Request status
CODE
<ENQ>
05
HEX
REMARKS
Status byte
b7
b6
b5
b4
b3
b2
b1
b0
Constantly
set at 0
41
LINE MODE
1B
HEX
FUNCTION
Request Status
CODE
<EOT>
04
HEX
REMARKS
Status byte
b7
b6
b5
b4
b3
b2
b1
b0
LINE MODE
Constantly
set at 0
Constantly
set at 0
Constantly
set at 0
Near-end sensor
1: Near-end
Paper empty
1 : empty
Constantly
set at 0
Constantly
set at 0
Constantly
set at 0
FUNCTION
Request status
CODE
HEX
REMARKS
1B
06
01
Contents
Always1
0
-
42
Header #1
7
8
9
10
11
12
13
14
15
00100011B
00100101B
00100111B
00101001B
00101011B
00101101B
00101111B
Contents
0
-
Always0
Always0
Header #2
Version No. n
1
2
3
4
5
6
7
8
9
10
00000010B
00000100B
00000110B
00001000B
00001010B
00001100B
00001110B
00100000B
00100010B
00100100B
(02 Hex)
(04 Hex)
(06 Hex)
(08 Hex)
(0A Hex)
(0C Hex)
(0E Hex)
(20 Hex)
(22 Hex)
(24 Hex)
...
...
16
...
...
30
31
43
LINE MODE
(23 Hex)
(25 Hex)
(27 Hex)
(29 Hex)
(2B Hex)
(2D Hex)
(2F Hex)
Contents
Always0
<ETB> command
Compulsion switch
ON Line / OFF Line
Always0
Cover open
Invalid
Always0
0
Unexecuted
Open
ON Line
Close
1
Executed
Close
OFF Line
Open
-
LINE MODE
Contents
Always0
Invalid
Mechanical error
Auto cutter error
Always0
Un recoverable error
Print stop due to high temperature print head
Always0
1
-
No error
No error
Error
Error
Error
Stop
-
No error
Printing
Contents
Always0
Invalid
Invalid
Invalid
Always0
Invalid
Buffer overflow
Always0
1
-
No error
44
Error
-
1
-
Not near-end
Not empty
Near-end
Empty
-
Contents
Always0
Invalid
Invalid
Invalid
Always0
Invalid
Invalid
Always0
CODE
<ESC> <RS> a
1B
1E
1
-
FUNCTION
HEX
61
n
n
REMARKS
FUNCTION
CODE
<ESC> ? <LF><NUL>
HEX
REMARKS
1B
3F
0A
00
45
LINE MODE
Bit
0
1
2
3
4
5
6
7
PAGE MODE
Control codes
<ESC> C<LF> <NUL>
<ESC> D n1n2n3n4 <LF>
<NUL>
<ESC> L n1n2 ; x1x2x3x4
, y1y2y3y4, x5x6x7x8
, y5y6y7y8, d, w <LF>
<NUL>
<ESC> E n1n2 <LF> <NUL>
<ESC> PC n1n2 ; x1x2x3x4
, y1y2y3y4, w, h,
c, r1r2, d1d2 <LF> <NUL>
<ESC> PB n1n2 ; x1x2x3x4
, y1y2y3y4, w, b,
m, h1h2h3h4 <LF> <NUL>
<ESC> Y d1d2 <LF> <NUL>
Hexadecimal codes
1B 43 0A 00
1B 44 n1n2n3n4 0A
00
1B 4C n1n2 3B x1x2x3x4 2C
y1y2y3y4 2C x5x6x7x8 2C
y5y6y7y8 2C d 2C w 0A 00
Function
Clear format
Define print area
Pages
48
48
49
1B 45 n1n2 0A 00
1B 50 43 n1n2 3B x1x2x3x4
2C y1y2y3y4 2C w 2C h 2C c
2C r1r2 2C d1d2 0A 00
1B 50 42 n1n2 3B x1x2x3x4
2C y1y2y3y4 2C w 2C b 2C m
2C h1h2h3h4 0A 00
1B 59 d1d2 0A 00
49
50
52
53
Hexadecimal codes
1B 52 43 n1n2 3B a1a2.an
0A 00
1B 52 42 n1n2 3B a1a2.an
0A 00
1B 51 n x1x2x3x4 2C
y1y2y3y4 2C h1h2h3h4 2C
w1w2w3 2C n11n12n13
n.n1k <LF>.nm1nm2
.nmk 0A 00
1B 48 n x1x2x3x4 2C
y1y2y3y4 2C (BMP file data)
2C 0A 00
1B 47 n1n2 2C n3n4 1B 30
Function
Set character string data
55
56
57
58
46
Pages
54
58
58
Other commands
Hexadecimal codes
1B 49 0A 00
1B 57 s1s2s3s4 2C
h1h2h3h4 0A 00
1B 42 d n1n2 0A
00
1B 23 N 2C n1n2n3n4 0A
00
1B 3F 0A 00
05
04
1B 06 01
1B 1E 61 n
<ESC> N n1n2 <LF> <NUL> 1B 4E n1n2 0A 00
<ESC> F n1n2 ; d1.....d48 1B 46 n1n2 3B d1.d48
0A 00
<LF> <NUL>
1B 5A n 0A 00
<ESC> Z n <LF> <NUL>
47
Function
Print Label
Print Label
Pages
59
59
Enable cutter
60
60
Reset printer
Request status
Request status
Request status
Set status transmission condition
Select international character set
Register download character
61
62
63
63
67
67
68
Select zerostyle
68
PAGE MODE
Control codes
<ESC> I <LF> <NUL>
<ESC> W
s1s2s3s4,
h1h2h3h4 <LF> <NUL>
<ESC> B d n1n2 <LF>
<NUL>
<ESC> # N, n1n2n3n4 <LF>
<NUL>
<ESC> ? <LF> <NUL>
<ENQ>
<EOT>
<ESC> <ACK> <SOH>
<ESC> <RS> a n
<ESC> C <LF><NUL>
1B
HEX
43
0A
00
PAGE MODE
REMARKS
When the printer receives this command, all defined format and
image data are cleared.
The format defined by the following commands will be cleared.
<ESC> D
<ESC> E
<ESC> L
<ESC> PC <ESC> PB
<ESC> Y
<ESC> RC <ESC> RB <ESC> Q
<ESC> H
<ESC> K
<ESC> B
FUNCTION
CODE
<ESC> D
1B
HEX
REMARKS
n1n2n3n4
0A
00
ABCD
EFG
44
ABCD
EFG
40 mm
50 mm
ABCD
EFG
ABCD
EFG
48
CODE
HEX
REMARKS
: Line direction
Note:
FUNCTION
CODE
HEX
REMARKS
1B
45
n1n2 0A
00
PAGE MODE
FUNCTION
PAGE MODE
FUNCTION
CODE
<ESC> P
C
n1n2
,
w
,
h
d1d2 <LF> <NUL>
HEX
1B
2C
d1d2
REMARKS
50
w
0A
43
2C
00
n1n2
h
; x1x2x3x4 , y1y2y3y4
,
c
,
r1r2
,
3B x1x2x3x4 2C y1y2y3y4
2C
c
2C
r1r2 2C
r2
d1d2
Note:
50
CB A
C
B
A
r1=1(90)
r2=0( 0)
A B C
r1=0(0)
r2=0(0)
CB A
A
B
C
Start position
r1=0( 0)
r2=2(180)
r1=0( 0)
r2=1(90)
A B C
Start position
r1=0(0)
r2=0(0)
A B C
A B C
r1=1(90)
r2=1(90)
51
Start position
C
B
A
r1=0( 0)
r2=3(270)
Start position
r1=2(180)
r2=2(180)
r1=3(270)
r2=3(270)
PAGE MODE
A B C
A B C
r1=0(0)
r2=0(0)
r1=3(270)
r2=0( 0)
A
B
C
r1=2(180)
r2=0( 0)
Start position
FUNCTION
CODE
<ESC> P
B
n1n2
y1y2y3y4 ,
w
,
h1h2h3h4<LF><NUL>
1B
50
42
n1n2
y1y2y3y4 2C
w
2C
HEX
h1h2h3h4 0A
REMARKS
;
b
x1x2x3x4
,
,
m
3B x1x2x3x4 2C
b
2C
m
2C
00
PAGE MODE
This command defines start position and type of bar code string.
n1n2
: Bar code string number (00 to 31)
x1x2x3x4 : Print start position in the X direction (0000 to 1040
0.1 mm)
y1y2y3y4 : Print start position in the Y direction (0000 to 2000
0.1 mm)
w
: Mode (See Appendix for details)
b
: Bar code type (1 to 9)
1: CODE 39
2: INTERLEAVED 2 OF 5 (ITF)
3: CODE 93
4: UPC-A
5: JAN/EAN-8
6: JAN/EAN-13
7: CODE 128
8: NW-7
9: UPC-E
m
: Bar code rotation direction (0 to 3) (clockwise)
0
1
2
3
0 degree 90 degrees 180 degrees 270 degrees
h1h2h3h4 : Bar code height (0000 to 1999 0.1 mm)
Note:
52
Start position
Start position
m=1
90
m=2
180
m=3
270
FUNCTION
CODE
HEX
REMARKS
1B
59
d1d2 0A
PAGE MODE
m=0
0
00
(default)
d1d2
00 dot 01 dot 02 dots
Small size
1
1.125 1.25
character
Standard size
2
2.125 2.25
character
Boldface
3
3.125 3.25
character
(unit: mm)
03 dots 04 dots 05 dots 06 dots 07 dots
1.375
1.5
1.625
1.75
1.875
2.375
2.5
2.625
2.75
2.875
3.375
3.5
3.625
3.75
3.875
HEX
REMARKS
<ESC> R
1B
52
n1n2
;a1a2.an
43
n1n2 3Ba1a2.an
<LF><NUL>
0A
00
PAGE MODE
54
FUNCTION
CODE
<ESC>
n1n2
1B
52
42
n1n2
REMARKS
3B a1a2.an 0A
00
55
PAGE MODE
HEX
; a1a2.an<LF> <NUL>
FUNCTION
CODE
<ESC> Q
n x1x2x3x4 , y1y2y3y4
h1h2h3h4 , w1w2w3 ,n11n12n13n.n1k
<LF>.nm1nm2.nmk <LF> <NUL>
HEX
1B
51
n x1x2x3x4 2C y1y2y3y4 2C
h1h2h3h4 2C w1w2w3 2Cn11n12n13n.n1k
<LF>.nm1nm2.nmk
0A
00
This command stores graphic data into image memory.
n
: ; : OR mode
: : Overwrite mode
x1x2x3x4 : Print start position in the X direction. (0000 to 1040
0.1 mm)
y1y2y3y4 : Print start position in the Y direction. (0000 to 2000
0.1 mm)
h1h2h3h4 : Defines the length (Y direction) of the graphic area.
(0001 to 1600 dots)
w1w2w3 : Defines the width (X direction) of the graphic area.
(001 to 104 dots)
n11.nmk: n11 represents data in the 1st line. Each line ends with
<LF>.
Data (X direction) appears in the same way as bit
image data. n21 represents data in the 2nd line.
REMARKS
PAGE MODE
Note:
56
FUNCTION
CODE
<ESC> H
(BMP file data)
n
,
HEX
1B
48
(BMP file data)
n x1x2x3x4 2C y1y2y3y4 2C
2C
0A
00
REMARKS
x1x2x3x4 , y1y2y3y4
<LF> <NUL>
n : Mode
OR mode:
ABCDEFGHIJK
ABCDEFGHIJK
ABCDEFGHIJK
ABCDEFGHIJK
ABCDEFGHIJK
ABCDEFGHIJK
ABCDEFGHIJK
ABCDEFGHIJK
ABCDEFGHIJK
ABCDEFGHIJK
ABCDEFGHIJK
ABCDEFGHIJK
OVERWRITE mode:
ABCDEFGHIJK
ABCDEFGHIJK
ABCDEFGHIJK
ABCDEFGHIJK
ABCDEFGHIJK
ABCDEFGHIJK
ABCDEFGHIJK
ABCDEFGHIJK
ABCDEFGHIJK
ABCDEFGHIJK
ABCDEFGHIJK
ABCDEFGHIJK
x1x2x3x4
: Print start position in the X direction
y1y2y3y4
: Print start position in the Y direction
BMP file data : Command accepts BMP non-compressed monochrome graphic file as binary file.
Note :
PAGE MODE
BMP file contains white pixel (dots). There are two mode in this
command depending on how to handle these white pixels when
there are black pixels already set in the area to be printed on.
FUNCTION
CODE
<ESC> G
HEX
REMARKS
1B
n1n2
47
n3n4
<ESC> 0
n1n2 2C n3n4
1B
30
FUNCTION
CODE
<ESC> K n
<LF> <NUL>
HEX
PAGE MODE
REMARKS
1B
0A
x1x2x3x4
51 n
00
y1y2y3y4 , d1d2d3
; : OR mode
: : Overwrite mode
CODE
<ESC> X <LF><NUL>
HEX
REMARKS
1B
58
0A
00
When the printer receives this command, the defined image data
are cleared.
The following commands will be cleared by<ESC> X
<ESC> RC<ESC> RB<ESC> Q<ESC> H<ESC> K
58
Other commands
Print Label
FUNCTION
HEX
<ESC> I <LF><NUL>
1B
49
0A
00
REMARKS
FUNCTION
Print Label
CODE
HEX
REMARKS
1B
57 s1s2s3s4 2C h1h2h3h4
0A
00
This command prints out the data within the defined print area.
Print area defined by <ESC>D is ignored.
When print start position detect is ON, the paper will be fed to the
next print start position after printing.
If unrecoverable error occurs during printing, a series of these
operation will be repeated after the printer recovers from the error
condition.
s1s2s3s4 : Print start position in the Y direction (unit: 0.1 mm)
h1h2h3h4: Print length from the print start position (unit: 0.1
mm)
59
PAGE MODE
CODE
FUNCTION
Enable cutter
CODE
<ESC> B
HEX
REMARKS
1B
PAGE MODE
CODE
HEX
REMARKS
n1n2 <LF><NUL>
n1n2 0A
00
FUNCTION
42
1B
23
, n1n2n3n4<LF> <NUL>
2C n1n2n3n4 0A
00
60
n4
0
1
2
(Default)
0
Setting
Parameter
n1
Always 0
n2
n3
n4
OFF
Start-position detect
Normal zero
Zero style
International character set
Country
USA
France
Germany
n4
3
4
5
Country
UK
Denmark #1
Sweden
n4
6
7
8
Country
Itary
Spain #1
Japan
ON
Slashed zero
See below
n4
9
A
B
Country
Norway
Denmark #2
Spain #2
FUNCTION
Reset printer
CODE
<ESC>
1B
3F
HEX
<LF><NUL>
0A
00
REMARKS
Resets the printer and prints self-test. This command will also set
memory switch conditions without the need to turn the printer
power OFF and ON again.
EXAMPLE
LPRINT CHR$(&H1B);?;CHR$(&H0A);CHR$(&H00);
61
PAGE MODE
n4 Country
C Latin America
FUNCTION
Request status
CODE
<ENQ>
05
HEX
When the printer receives this command, the printer sends back a
status byte for the current printer condition immediately to the
host.
REMARKS
Note:
Status byte
b7
b6
b5
b4
b3
b2
b1
b0
PAGE MODE
Constantly
set at 0
62
FUNCTION
Request status
CODE
<EOT>
04
HEX
When the printer receives this command, the printer sends back a
status byte for the current printer condition immediately to the
host.
REMARKS
Note:
b7
b6
b5
b4
b3
b2
Constantly
set at 0
b1
b0
Constantly
set at 1
Constantly
set at 0
Near-end sensor
1: Near-end
Paper empty
1 : empty
Constantly
set at 0
Constantly
set at 0
Constantly
set at 0
FUNCTION
Request status
CODE
HEX
REMARKS
1B
06
01
When the printer receives this command, the printer sends back a
status byte for the current printer condition to the host.
63
PAGE MODE
Status byte
Contents
0
-
Always1
Header #1
PAGE MODE
7
8
9
10
11
12
13
14
15
00001111B
00100001B
00100011B
00100101B
00100111B
00101001B
00101011B
00101101B
00101111B
(0F Hex)
(21 Hex)
(23 Hex)
(25 Hex)
(27 Hex)
(29 Hex)
(2B Hex)
(2D Hex)
(2F Hex)
Contents
Always0
0
-
Always0
64
Header #2
00000010B
00000100B
00000110B
00001000B
00001010B
00001100B
00001110B
00100000B
00100010B
00100100B
(02 Hex)
(04 Hex)
(06 Hex)
(08 Hex)
(0A Hex)
(0C Hex)
(0E Hex)
(20 Hex)
(22 Hex)
(24 Hex)
...
...
16
...
...
30
31
PAGE MODE
Version No. n
1
2
3
4
5
6
7
8
9
10
Contents
Always0
<ETB> command
Compulsion switch
ON Line / OFF Line
Always0
Cover open
OFF Line due to ON Line switch pushed
Always0
0
Unexecuted
Open
ON Line
Close
1
Executed
Close
OFF Line
Open
OFF Line
-
Contents
Always0
Invalid
Mechanical error
Auto cutter error
Always0
Un recoverable error
Print stop due to high temperature print head
Always0
65
1
Error
Error
Error
Stop
-
Contents
Always0
Invalid
Invalid
Invalid
Always0
Invalid
Buffer overflow
Always0
1
-
Overflow
-
PAGE MODE
Bit
0
1
2
3
4
5
6
7
Contents
Always0
Invalid
Near-end
Paper empty
Always0
Invalid
Invalid
Always0
1
Near-end
Empty
-
Contents
Always0
Invalid
Invalid
Invalid
Always0
Invalid
Invalid
Always0
1
-
66
FUNCTION
CODE
<ESC> <RS> a
1B
1E
61
REMARKS
FUNCTION
CODE
HEX
REMARKS
1B
4E
n1n2 0A
00
Country
U.S.A
France
Germany
n1n2
03
04
05
Country
n1n2 Country
UK
06 Itary
Denmark #1 07 Spain #1
Sweden
08 Japan
n1n2 Country
12 Latin America
67
n1n2
09
10
11
Country
Norway
Denmark #2
Spain #2
PAGE MODE
HEX
FUNCTION
CODE
<ESC> F
HEX
REMARKS
1B
n1n2
46
; d1.d48 <LF><NUL>
n1n2 3B d1.d48
0A
00
d45
d47
d46
d48
PAGE MODE
CODE
<ESC> Z
REMARKS
1B
5A
LSB
d2
d4
d6
d7
d10
FUNCTION
HEX
LSB MSB
d1
d3
d5
d7
d9
n <LF><NUL>
n
0A
00
68
Hexadecimal
codes
Function
<LF>
0A
70
<CR>
0D
70
<SO>
0E
70
<DC4>
14
70
<ESC> 1
<ESC> <1>
<ESC> 0
<ESC> <0>
1B 2D 31
1B 2D 01
Underline isrtruction
1B 2D 30
1B 2D 00
Underline release
<SI>
0F
71
Page
70
<DC2>
12
71
<ESC> E
1B 45
71
<ESC> F
1B 46
71
<ESC> 4
1B 34
71
<ESC> 5
1B 35
71
<ESC> R n
1B 52 n
72
<ESC> a n
1B 61 n
72
<ESC> C n
1B 43 n
72
<ESC> N n
1B 4E n
73
<ESC> O
1B 4F
73
<FF>
0C
Form feed
73
<ESC> @
1B 40
73
<ESC> <BEL> n1 n2
1B 07 n1 n2
73
<BEL>
07
74
<FS>
1C
74
<SUB>
1A
74
<ENQ>
05
Enquiry
74
<CAN>
18
74
69
DP8340 MODE
70
LF
(0A)H
Print and line feed instruction
OUTLINE
CODE
CR
(0D)H
Print and line feed instruction
FUNCTION
OUTLINE
CODE
SO
(0E)H
Expanded character instruction
FUNCTION
DP8340 MODE
OUTLINE
CODE
DC4
(14)H
Release from expanded characters
FUNCTION
OUTLINE
CODE
ESC-1
(1B)H (2D)H (01)H or (1B)H (2D)H (31)H
Underline mode selection
FUNCTION
OUTLINE
CODE
FUNCTION
ESC-0
(1B)H (2D)H (00)H or (1B)H (2D)H (30)H
Release from underline mode
OUTLINE
FUNCTION
SI
(0F)H
Inverted print instruction
OUTLINE
CODE
DC2
(12)H
Release from inverted print instruction
FUNCTION
OUTLINE
CODE
ESC E
(1B)H (45)H
Emphasized print mode instruction
FUNCTION
OUTLINE
CODE
FUNCTION
ESC F
(1B)H (46)H
Release from emphasized print instruction
OUTLINE
CODE
ESC 4
(1B)H (34)H
Highlighted character print instruction
FUNCTION
OUTLINE
CODE
ESC 5
(1B)H (35)H
Release from highlighted character print instruction
FUNCTION
OUTLINE
71
DP8340 MODE
CODE
CODE
FUNCTION
OUTLINE
ESC R n
(1B)H (52)H n
International character set selection
Selects an international character set according to the value of
n, as shown bolow:
n:
0:
1:
2:
3:
4:
5:
6:
7:
CODE
FUNCTION
Character set
U.S.A.
France
Germany
England
Denmark I
Sweden
Italy
Spain I
n:
8:
9:
10 :
11 :
12 :
13 :
14 :
64 :
Character set
Japan
Norway
Denmark II
Spain II
Latin America
Korea
Ireland
Legal
ESC a n
(1B)H (61)H n
n-line feed
DP8340 MODE
OUTLINE
After printing the data in the current line, n lines are fed by this
code. The value of n ranges from 1 to 127.
CODE
ESC C n
(1B)H (43)H n
Sets page length in lines
FUNCTION
OUTLINE
72
FUNCTION
ESC N n
(1B)H (4E)H n
Sets bottom margin in lines
OUTLINE
CODE
FUNCTION
ESC O
(1B)H (4F)H
Cancels bottom margin.
OUTLINE
CODE
FF
(0C)H
Form feed
FUNCTION
OUTLINE
The FF code prints the data in the current line and transports
the paper to the start of the next page.
CODE
ESC @
(1B)H (40)H
Printer initialization
FUNCTION
OUTLINE
All printing conditions except ESC BEL n1 n2, the line buffer
and data buffer are set to the power on default condition.
CODE
ESC BEL n1 n2
(1B)H (07)H n1 n2
Sets peripheral unit drive #1 pulse duration.
FUNCTION
OUTLINE
DP8340 MODE
CODE
BEL
(07)H
Trigger peripheral unit drive #1
DP8340 MODE
OUTLINE
CODE
FUNCTION
FS
(1C)H
Trigger peripheral unit drive #1
OUTLINE
CODE
SUB
(1A)H
Trigger peripheral unit drive #2
FUNCTION
OUTLINE
CODE
ENQ
(05)H
Enquiry
FUNCTION
OUTLINE
CODE
CAN
(18)H
Clears print buffer
FUNCTION
OUTLINE
Upon input of this code the data buffer and line buffer is
cleared.
74
HT
LF
CR
FF
DLE EOT
DLE ENQ
DLE DC4
CAN
ESC FF
ESC SP
ESC !
ESC $
ESC %
ESC &
ESC
ESC ESC 2
ESC 3
ESC =
ESC ?
ESC @
ESC D
ESC E
ESC G
ESC J
ESC L
ESC M
ESC R
ESC S
ESC T
ESC V
ESC W
ESC \
ESC a
ESC c 3
ESC c 4
ESC c 5
ESC d
Hexadecimal Code
09
0A
0D
0C
10
10
10
18
1B
1B
1B
1B
1B
1B
1B
1B
1B
1B
1B
1B
1B
1B
1B
1B
1B
1B
1B
1B
1B
1B
1B
1B
1B
1B
IB
1B
1B
1B
04
05
14
FF
20
21
24
25
26
2A
2D
32
33
3D
3F
40
44
45
47
4A
4C
4D
52
53
54
56
57
5C
61
63
63
63
64
33
34
35
Function
Horizontal tab
Print line feed
Carriage return
Page mode print and return
Real time transmission of status
Real time request to printer
Generate pulse at real time
Cancel print data in page mode
Print page mode data
Set right space amount of character
Select print mode
Designate absolute printing
Designate/cancel download character set
Define download characters
Designate bit image mode
Designate/cancel underline
Set 1/6 inch line feed amount
Set line feed amount
Select peripheral equipment
Delete download characters
Initialize printer
Set horizontal tab position
Designate/cancel emphasized print
Designate/cancel double print
Print and paper feed
Select page mode
Select character
Select an international character set
Select standard mode
Select character print direction in page mode
Designate/cancel 90 character rotation
Set print range in page mode
Designate relative position
Align position
Select no-paper detector for output of no-paper signal
Select no valid paper detector at print stop
Enable/disable panel switch
Print and paper feed n lines
75
ESC/POS
Control Code
Control Code
Hexadecimal Code
ESC/POS
ESC p
ESC t
ESC {
FS g 1
FS g 2
FS p 1C
FS q n
GS !
GS $
1B
1B
1B
1C
1C
70
1C
1D
1D
70
74
7B
67
67
71
21
24
GS
GS ( A
GS /
GS :
GS B
GS E
GS H
GS I
GS L
GS P
GS V
GS W
GS \
1D
1D
1D
1D
1D
1D
1D
1D
1D
1D
1D
1D
1D
2A
28
2F
3A
42
45
48
49
4C
50
56
57
5C
GS ^
GS a
Gs b
GS f
GS h
GS k
GS r
GS v 0
GS w
ESC GS =
ESC GS t
ESC GS #
1D
1D
1D
1D
1D
1D
1D
1D
1D
1B
1B
1B
5E
61
62
66
68
6B
72
76
77
1D
1D
1D
31
32
41
00
3D
74
23
Function
Designate pulse generation
Select character code table
Designate/cancel inverted printing
Write to user NV memory
Read from user NV memory
Print NV bit image
Define NV bit image
Designate character size
Designate absolute position of vertical direction of
characters in page mode
Define download bit image
Execute test print
Print download bit image
Start/finish macro definition
Designate/cancel reverse printing
Select print speed and head energizing time
Select print position of HRI characters
Printer ID transmission
Set left margin
Set basic calculated pitch
Paper cut
Set print range
Designate the relative position of vertical characters when
printing in the page mode
Execute macro
Enable/disable automatic status transmission
Smoothing setting/cancel
Select HRI character font
Set bar code height
Printing of bar code
Transmission of status
Print raster bit image
Set lateral size of bar code
Write to space code page
Select character code table
Set memory switch
76
1:3
1:3
1:2
1:2
1:2
3.625
5.625
7.25
3.25
4.875
6.5
b) Vertical printing
In vertical printing, one dot is added to each white bar which is horizontally
printed. (This is because the width of black bars is made wider due to the
change of printing characteristics caused by heating of the printing head. As
a result, the number of dots for white bars and for black bars are different
even when white and black bars have the same narrow-element width.
Length of each element is as shown below.
Item
Length of one
character (mm)
6.625
8.625
4.25
77
6.25
7.875
3.875
5.5
7.125
APPENDIX
Item
Width of narrow
elements
Width of wide
elements
Ratio
Inter-character
space
Length of one
character (mm)
2) REQUIREMENTS
a) The Start code and the Stop code of CODE 39 are automatically added.
b) The position defined by the control command locates the bar code symbols.
It is necessary to provide space for a quiet zone for bar code symbol.
3) ANSI and AIM specifications (for reference only)
a) Width of narrow elements:
Minimum 0.0075 inch (0.191 mm)
b) Ratio of narrow-element width to width-element width:
1 : 2.2 (the width of narrow elements is 0.508 mm or smaller)
1 : 2 (the width of narrow elements is 0.508 mm or greater)
c) Inter-element space:
Minimum is the same as the narrow-element width.
Maximum is three times the narrow-element width or 1.524 mm, whichever
is greater.
d) Bar height:
For hand scanners, the minimum is 0.25 inch (6.35 mm) or 15% of the bar
code-length, whichever is greater.
For non-hand scanners, the minimum is 0.8 inch (20.3 mm) or 25% of the
bar code-length, whichever is greater.
e) Quiet zone:
Minimum is ten times the narrow-element width or 0.10 inch (2.54 mm),
whichever is greater.
For hand scanners, the minimum is 0.25 inch (6.35 mm) or greater.
APPENDIX
EXAMPLE Bar code string number 11 ,starting position of bar code (X,Y)
= 10 mm, 10 mm, use Mode 2 of CODE39, Bar code height
10mm data:ABCDEFG, bar code rotation direction 0 degree.
LPRINT CHR$(&H1B);PB11;0100;0100,2,1,0,0100;
CHR$(&H0A);CHR$(&H00);
LPRINT CHR$(&H1B);RB11;ABCDEFG;CHR$(&H0A);
CHR$(&H00);
78
12
1:2
1:2
1:2
1:3
1:3
1:3
3.5
10.5
4.5
6.75
b) Vertical printing
Item
Length of two
character (mm)
7.375 9.625
EXAMPLE Bar code string number 25, starting position of bar code (X, Y)
= 5 mm, 10 mm, use Mode 1 of ITF, Bar code height 10 mm
Data: 0123456, bar code rotation direction 0 degree
LPRINT CHR$(&H1B);PB25;0050,0100,1,2,0,0100;
CHR$(&H0A); CHR$(&H00);
LPRINT CHR$(&H1B);RB25;0123456; CHR$(&H0A);
CHR$(&H00);
79
APPENDIX
2) REQUIREMENTS
a) When this code is used, the start and stop patterns are automatically
inserted.
b) When the number of digits for bar code data is an odd number, the printer
automatically adds 0 in the highest digit position.
c) Details conform to the AIM, USS-12/5, ANSI, and JIS X 0502 specifications
(3) CODE 93
1) Each mode and module width
a) Horizontal printing
Item
Module width
Width of one
character (mm)
3.375
4.5
3.75
4.875
2) REQUIREMENTS
a) The start and stop patterns are automatically inserted.
b) The check characters are automatically inserted.
c) 2-character set codes are same as CODE 128. (Expect FNC1-4, and START
A-C)
EXAMPLE Bar code number 00, starting position of bar code (X, Y) = 40
mm, 16 mm Mode 2 of CODE 93, Bar code rotation: 0 degree.
Bar code height 10 mm, Data ABCDefg
APPENDIX
LPRINT CHR$(&H1B);PB00;0400,0160,2,3,0,0100;
CHR$(&H0A);CHR$ (&H00);
LPRINT CHR$(&H1B);RB00;ABCDefg;
CHR$(&H0A);CHR$ (&H00);
80
(4) UPC
(5) JAN/EAN-8
(6) JAN/EAN-13
These codes are common commodity codes, mainly used for miscellaneous
goods or groceries sold at supermarkets.
1) Each mode and bar code width
a) Horizontal printing
Item
Mode 1
Module width
2 dots
Bar code width
JAN/EAN-8 16.75 mm
JAN/EAN-13, UPC 23.75 mm
Mode 2
3 dots
Mode 3
4 dots
25.125 mm
36.625 mm
33.5 mm
47.5 mm
Note: Right and left guard bars are included, white spaces are not included.
b) Vertical printing
Item
Mode 1
Module width
2 dots
Bar code width
JAN/EAN-8 13.375 mm
JAN/EAN-13, UPC 27.624 mm
Mode 2
3 dots
Mode 3
4 dots
27.75 mm
39.5 mm
36.125 mm
51.375 mm
Note: Right and left guard bars are included, white spaces are not included.
2) REQUIREMENTS
b) JAN/EAN-13
Must consist of a 12 or 13 numeric digits; otherwise, the command is
ignored. The check digit is automatically added using modules 10/3 weight.
When the calculated value and the value in the 13th digit differ, the former
value has precedence over the latter values.
c) UPC-A Must consist of a 11 or 12 numeric digits, otherwise, the command
is ignored. The check digit is automatically added using modules 10/3
weight.
When the calculated value and the value in the 12th digit differ, the former
value has precedence over the latter values.
81
APPENDIX
a) JAN/EAN-8
Must consist of a 7 or 8 numeric digits, otherwise, the command is ignored.
The check digit is automatically added using modules 10/3 weight.
When the calculated value and the value in the 8th digit differ, the former
value has precedence over the latter values.
EXAMPLE Bar code string number 10, starting position of bar code (X, Y)
= 5 mm, 10 mm, use Mode 1 of EAN-13, Bar code height 10 mm
data:246801357956, bar code rotation direction 0 degree
LPRINT CHR$(&H1B);PB10;0050,0100,1,6,0,0100;
CHR$(&H0A);CHR$(&H00);
LPRINT CHR$(&H1B);RB10;246801357956;
CHR$(&H0A);CHR$(&H00);
(7) CODE 128
This code can represent 128 ASCII characters.
1) Each mode and module width
a) Horizontal printing Note: The start and stop bars are not included.
Item
Module width
Width of one
character
Mode 1
2 dots
Mode 2
3 dots
Mode 3
4 dots
2.75 mm
4.125 mm
5.5 mm
Mode 1
2 dots
Mode 2
3 dots
Mode 3
4 dots
3.125 mm
4.5 mm
6.5 mm
b) Vertical printing
Item
Module width
Width of one
character
APPENDIX
2) REQUIREMENTS
%(25 H) is sent as data %0(25H 35H). Control codes 00H to 1FH and 7FH are
sent as data % followed by 40H to 5FH and 35 H. For example, control code 7FH
is sent as data %5 (25H 35H). Function codes are sent as data % followed by 1
to 4 (31H to 34H). The start code is sent as data % followed by 6 to 8(36H to 38H).
Although CODE 128 data requires START CODE, the printer automatically adds
START CODE. Please omit START CODE when sending data to the printer.
82
SO
SI
DLE
DC1
DC2
DC3
DC4
NAK
SYN
ETB
CAN
EM
SUB
ESC
FS
GS
RS
US
DEL
0EH
0FH
10H
11H
12H
13H
14H
15H
16H
17H
18H
19H
1AH
1BH
1CH
1DH
1EH
1FH
7FH
Format
%@
%A
%B
%C
%D
%E
%F
%G
%H
%I
%J
%K
%L
%M
HEX
25H 40H
25H 41H
25H 42H
25H 43H
25H 44H
25H 45H
25H 46H
25H 47H
25H 48H
25H 49H
25H 4AH
25H 4BH
25H 4CH
25H 4DH
%N
%O
%P
%Q
%R
%S
%T
%U
%V
%W
%X
%Y
%Z
%[
%
%]
%^
%
%5
25H 4EH
25H 4FH
25H 50H
25H 51H
25H 52H
25H 53H
25H 54H
25H 55H
25H 56H
25H 57H
25H 58H
25H 59H
25H 5AH
25H 5BH
25H 5CH
25H 5DH
25H 5EH
25H 5FH
25H 35H
Special code
Code
HEX
%
25H
Format
%0
HEX
25H 30H
Function codes
Code
HEX
FNC1
FNC2
FNC3
FNC4
Format
%1
%2
%3
%4
HEX
25H 31H
25H 32H
25H 33H
25H 34H
Start codes
Code
HEX
START A
START B
START C
Format
%6
%7
%8
HEX
25H 36H
25H 37H
25H 38 H
APPENDIX
Control codes
Code
HEX
NUL
00H
SOH
01H
STX
02H
ETX
03H
EOT
04H
ENQ
05H
ACK
06H
BEL
07H
BS
08H
HT
09H
LF
0AH
VT
0BH
FF
0CH
CR
0DH
EXAMPLE Bar code string number 00, starting position of bar code (X, Y)
= 15 mm, 5 mm, use Mode 1 of CODE128, Bar code height 15
mm, data: 1213477657, and CR (carriage return)
LPRINT CHR$(&H1B);PB00;0150,0050,1,7,0150;
CHR$(&H0A);CHR$(&H00);
LPRINT CHR$(&H1B);RB00;1213477657%M;
CHR$(&H0A);CHR$(&H00);
83
(8) NW-7
NW-7 bar code can represent numeric characters 0 to 9 and special characters
such as - , $ , : , / , . , + with one of character from A to D as Start or Stop code
in NW-7.
1) Width of character in each mode
Width of each bar code character varies since number of narrow bars and wide
bars are different in each character.
Normal character
(number of narrow element : 5 , number of wide element : 2)
0 to 9 , $ , Wide character
(number of narrow element : 4 , number of wide element : 3)
: , / , . , + , A to D
Length of each bar code character includes a space between characters.
a) Horizontal direction print
Item
Width of narrow
elements
Width of wide
element
Ratio
Space between
characters
Length of
(Normal)(mm)
1:3
1:3
1:2
1:2
1:2
4.5
5.25
6
7
2.75
3.125
4.25
5.125
5.5
6.25
2.5
2.75
3.75
4.125
5
5.5
(Normal)(mm)
APPENDIX
84
APPENDIX
Operation Procedure
1) Select sensor adjustment mode with DIP switch setting.
2) Turn the power ON while holding FEED switch pushed (POWER LED
will lights), then release FEED switch immediately.
3) With the paper roll uninstalled, turn fully VR1 counterclockwise.
If ERROR LED lights, adjustment is not necessary.
If not, adjust VR1 until both POWER / ERROR LEDs light.
4) Install the paper roll and confirm that only POWER LED lights.
5) Turn the power OFF.
6) Select standard mode with DIP switch setting.
85
APPENDIX
Note: The (7F)H code is a space when neither normal nor katakana.
86
APPENDIX
87
APPENDIX
Note: Other characters are the same as those for Character table: Normal.
88
APPENDIX
Note: Other characters are the same as those for Character table: Normal.
89
APPENDIX
Note: Other characters are the same as those for Character table: Normal.
90
APPENDIX
Note: Other characters are the same as those for Character table: Normal.
91
8 9 A B C D E F
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
8 9 A B C D E F
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
8 9 A B C D E F
APPENDIX
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
8 9 A B C D E F
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
Note: Other characters are the same as those for Character table: Normal.
92
APPENDIX
Note: Other characters are the same as those for Character table: Normal.
93
Note: Other characters are the same as those for Character table: Normal.
APPENDIX
94
8 9 A B C D E F
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
8 9 A B C D E F
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
8 9 A B C D E F
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
Note: Other characters are the same as those for Character table: Normal.
95
APPENDIX
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
8 9 A B C D E F
APPENDIX
Note: Other characters are the same as those for Character table: Normal.
96
APPENDIX
Note: Other characters are the same as those for Character table: Normal.
97
APPENDIX
Note: Other characters are the same as those for Character table: Normal.
98
Note: Other characters are the same as those for Character table: Normal.
APPENDIX
99
APPENDIX
100
APPENDIX
101
APPENDIX
102
APPENDIX
103
APPENDIX
104
APPENDIX
105
APPENDIX
106
APPENDIX
DP8340 Mode
(IBM Character Set #1)
107
APPENDIX
108
APPENDIX
DP8340 Mode
(IBM Character Set #2)
109
APPENDIX
110
APPENDIX
DP8340 Mode
(JAPAN)
111
APPENDIX
112
APPENDIX
DP8340 Mode
International Character Set
113
http://www.starmicronics.com
Please access the following URL
http://www.star-micronics.co.jp/service/
frame_sp_spr_e.htm
for the lastest revision of the manual.
http://www.starmicronics.co.uk
2001.10.12
Printed in Japan, 80872097