Sii DPU-S445 User Manual

DPU-S445 SERIES
THERMAL PRINTER
TECHNICAL REFERENCE
U00110811309
DPU-S445 SERIES THERMAL PRINTER TECHNICAL REFERENCE
U00110811300 May 2008 U00110811301 July 2008 U00110811302 January 2009 U00110811303 June 2009 U00110811304 February 2010 U00110811305 July 2011 U00110811306 October 2012 U00110811307 February 2013 U00110811308 August 2013 U00110811309 November 2013
Copyright © 2008-2013 by Seiko Instruments Inc.
All rights reserved.
Seiko Instruments Inc. (hereinafter referred to as "SII") has prepared this manual for use by SII personnel, licensees, and customers. The information contained herein is the property of SII and shall not be reproduced in whole or in part without the prior written approval of SII.
SII reserves the right to make changes without notice to the specifications and materials contained herein and shall not be responsible for any damages (including consequential) caused by reliance on the materials presented, including but not limited to typographical, arithmetic, or listing errors.
is a trademark of Seiko Instruments Inc.
IrDA Protocol Stack μDeepCore(r)1.1(C)ITX E-Globaledge Corp. All Rights Reserved.
ESC/P is trademarks of SEIKO EPSON CORPORATION.
BHT-Ir is trademarks of DENSO CORPORATION.
Bluetooth is registered trademarks of Bluetooth SIG, Inc.

PREFACE

This technical reference describes the DPU-S445 series thermal printer. (hereinafter referred to as “printer”)
Read the User’s Guide supplied with the printer for details regarding basic operation and maintenance procedures.
DPU-S445 series have the following models. DPU-S445-00A-E
(St andard model)
DPU-S445-01A-E
(Bluetooth supporting model)
The printer complies with EU RoHS Directive (2011/65/EU)
PREFACE-1
Manual Configuration
CHAPTER 1: TERMS USED IN THIS MANUAL
This chapter describes the basic terms that are frequently used in this technical reference.
CHAPTER 2: SPECIFICATIONS
This chapter describes the printer main body and thermal paper specifications.
CHAPTER 3: INTERFACE
This chapter describes 4 types of the interface specifications which are required to connect the host device with the printer.
CHAPTER 4: FUNCTION SETTINGS
This chapter describes the function settings, test print and hex dump mode.
CHAPTER 5: LAMP DISPLAY AND SWITCH FUNCTION
This chapter describes the printer status by lamp display and functions of switches.
CHAPTER 6: COMMAND DESCRIPTIONS
This chapter describes the function of commands supported by the printer.
APPENDIX A: CHARACTER SETS (CHARACTER CODE TABLE)
PREFACE-2

TABLE OF CONTENTS

Section Page
CHAPTER 1
TERMS USED IN THIS MANUAL
CHAPTER 2
SPECIFICATIONS
2.1 PRINTER SPECIFICATIONS............................................................................................. 2-1
2.2 SPECIFIED THERMAL PAPER SPECIFICATIONS.......................................................... 2-3
2.2.1 Timing Mark for the Cut Paper Dimensions.................................................................. 2-4
2.2.2 Thermal Label Paper Dimensions................................................................................. 2-6
2.3 SPECIFIED BATTERY PACK SPECIFICATIONS............................................................. 2-8
2.4 PRECAUTIONS FOR USE................................................................................................. 2-9
CHAPTER 3 INTERFACE
3.1 SERIAL INTERFACE SPECIFICATIONS (RS-232C CONFORMITY) ..............................3-1
3.2 USB INTERFACE SPECIFICATIONS................................................................................ 3-4
3.3 INFRARED INTERFACE SPECIFICATIONS..................................................................... 3-5
3.3.1 Physical Specifications.................................................................................................. 3-5
3.3.2 IrDA Specifications........................................................................................................3-5
3.3.3 BHT-Ir Specifications.....................................................................................................3-8
3.4 BLUETOOTH INTERFACE SPECIFICATIONS................................................................. 3-9
CHAPTER 4
FUNCTION SETTINGS
4.1 FUNCTION SETTING ........................................................................................................ 4-1
4.1.1 Function Settings(SWDIP1) .......................................................................................... 4-2
4.1.2 Function Settings(SWDIP2) .......................................................................................... 4-4
4.1.3 Function Settings(SWDIP3) .......................................................................................... 4-6
4.1.4 Function Settings(SWDIP4) .......................................................................................... 4-8
4.1.5 Function Settings by Switch Operation....................................................................... 4-10
4.1.6 Function Settings by Commands................................................................................ 4-13
4.2 TEST PRINT..................................................................................................................... 4-14
4.3 HEX DUMP MODE........................................................................................................... 4-15
CHAPTER 5
LAMP DISPLAY AND SWITCH FUNCTION
5.1 PRINTER STATE LAMP DISPLAY.................................................................................... 5-1
5.2 ERROR RECOVERY PROCEDURE
................................................................................. 5-2
5.3 POWER SWITCH............................................................................................................... 5-3
5.4 FEED SWITCH................................................................................................................... 5-3
CHAPTER 6
COMMAND DESCRIPTIONS
6.1 THE SUMMARY OF COMMAND FUNCTION................................................................... 6-1
6.2 FUNCTION CODES........................................................................................................... 6-5
6.3 CHARACTER CODES ....................................................................................................... 6-5
6.3.1 JIS Code System...........................................................................................................6-5
6.3.2 Shift JIS Code System .................................................................................................. 6-7
6.4 MEMORY............................................................................................................................ 6-9
6.4.1 RAM............................................................................................................................. 6-10
6.4.2 FLASH Memory........................................................................................................... 6-17
6.5 COMMAND DESCRIPTION............................................................................................. 6-19
6.5.1 Command Format .......................................................................................................6-19
6.5.2 Formatting Commands................................................................................................ 6-20
TOC-1
6.5.3 Line Spacing Commands............................................................................................ 6-24
6.5.4 Tab Setting Commands............................................................................................... 6-26
6.5.5 Print and Paper Feed Commands............................................................................... 6-28
6.5.6 Print Position Commands............................................................................................ 6-30
6.5.7 1-byte Character Set Selection Commands................................................................ 6-32
6.5.8 1-byte Characters Definition Commands.................................................................... 6-35
6.5.9 Character Decoration Commands............................................................................... 6-37
6.5.10 Character Pitch Adjustment Command....................................................................... 6-41
6.5.11 Kanji Character Set Selection Commands.................................................................. 6-44
6.5.12 Kanji Character Definition Commands........................................................................ 6-46
6.5.13 Kanji Character Decoration Commands .....................................................................6-48
6.5.14 Kanji Character Pitch Adjustment Command.............................................................. 6-51
6.5.15 Image Command......................................................................................................... 6-54
6.5.16 Stamp.......................................................................................................................... 6-58
6.5.17 Other Commands........................................................................................................6-62
6.5.18 Ruler Line Commands................................................................................................. 6-63
6.5.19 Optional Font Commands ........................................................................................... 6-67
6.5.20 Bar Code Commands.................................................................................................. 6-70
6.5.21 Routine Commands..................................................................................................... 6-84
6.5.22 Page Mode..................................................................................................................6-89
6.5.23 Status Commands....................................................................................................... 6-94
6.5.24 Character Set Command............................................................................................. 6-98
6.5.25 Auxiliary Function Commands ..................................................................................6-100
6.5.26 Download Mode ........................................................................................................6-113
6.6 DEFAULTS..................................................................................................................... 6-118
6.7 INITIAL AUTOMATIC STATUS TRANSMISSION ......................................................... 6-120
6.8 COMMAND INDEX
.........................................................................................................6-121
APPENDIX A
CHARACTER SETS (CHARACTER CODE TABLE)
A.1 CHARACTER CODE TABLE.............................................................................................A-1
A.2 INTERNATIONAL CHARACTER SETS.............................................................................A-3
A.3 KANJI CODE TABLE..........................................................................................................A-4
A.4 KANJI QUARTER SIZE CHARACTER SET......................................................................A-5
TOC-2
Table Page
TABLES
Table 1-1 Character Types and Relationship between 1-byte and 2-byte Characters................1-1
Table 2-1 General Specifications ................................................................................................. 2-1
Table 2-2 Thermal Paper Provided by SII.................................................................................... 2-3
Table 2-3 Specified Thermal Paper Specifications ...................................................................... 2-3
Table 4-1 Function Settings (SWDIP1) ........................................................................................ 4-2
Table 4-2 Function Settings (SWDIP2) ........................................................................................ 4-4
Table 4-3 Function Settings (SWDIP3) ........................................................................................ 4-6
Table 4-4 Function Settings (SWDIP4) ........................................................................................ 4-8
Table 5-1 Printer Status Signals................................................................................................... 5-1
Table 5-2 Error Recovery Procedure ........................................................................................... 5-2
Table 6-1 Command Summary ....................................................................................................6-1
Table 6-2 Functions Which Use the FLASH Memory and the RAM ............................................ 6-9
Table 6-3 Commands Which Use the FLASH Memory................................................................ 6-9
Table 6-4 Commands Which Use the RAM .................................................................................6-9
Table 6-5 Difference in Behavior Between the FLASH Memory and the RAM.......................... 6-10
Table 6-6 Capacity of Each Function ......................................................................................... 6-10
Table 6-7 The Number of Bytes for Memory Control Information of Each Function.................. 6-11
Table 6-8 Commands Which Allocate or Release the User Area of RAM.................................6-11
Table 6-9 GS 'p' 0 PDF417 Print Command Necessary Capacity............................................. 6-12
Table 6-10 GS 'p' 1 QR Code Print Command Necessary Capacity ......................................... 6-13
Table 6-11 GS 'p' 2 Data Matrix Print Necessary Capacity........................................................ 6-14
Table 6-12 Data Matrix Symbol Sizes........................................................................................ 6-15
Table 6-13 GS 'p' 3 MaxiCode Print Necessary Capacity.......................................................... 6-16
Table 6-14 Default Settings......................................................................................................6-118
TOC-3
Figure Page
FIGURES
Figure 1-1 Relationship between Input Buffer and Line Buffer .................................................... 1-1
Figure 1-2 Line Spacing ...............................................................................................................1-2
Figure 1-3 Character Spacing ......................................................................................................1-2
Figure 2-1 Dimensions .................................................................................................................2-2
Figure 2-2 Timing Mark for the Cut Paper (back surface)............................................................ 2-4
Figure 2-3 Example for the Cut Paper.......................................................................................... 2-5
Figure 2-4 Example for Thermal Label Paper Dimensions.......................................................... 2-6
Figure 6-1 Program Sample 1.................................................................................................... 6-23
Figure 6-2 Print Sample 1........................................................................................................... 6-23
Figure 6-3 Program Sample 2.................................................................................................... 6-25
Figure 6-4 Print Sample 2........................................................................................................... 6-25
Figure 6-5 Program Sample 3.................................................................................................... 6-31
Figure 6-6 Print Sample 3........................................................................................................... 6-31
Figure 6-7 Program Sample 4.................................................................................................... 6-34
Figure 6-8 Print Sample 4........................................................................................................... 6-34
Figure 6-9 Program Sample 5.................................................................................................... 6-42
Figure 6-10 Print Sample 5......................................................................................................... 6-43
Figure 6-11 Program Sample 6.................................................................................................. 6-52
Figure 6-12 Print Sample 6......................................................................................................... 6-53
Figure 6-13 Program Sample 7.................................................................................................. 6-57
Figure 6-14 Print Sample 7......................................................................................................... 6-57
Figure 6-15 Program Sample 8.................................................................................................. 6-61
Figure 6-16 Print Sample 8......................................................................................................... 6-61
Figure 6-17 Program Sample 9.................................................................................................. 6-62
Figure 6-18 Print Sample 9......................................................................................................... 6-62
Figure 6-19 Program Sample 10................................................................................................ 6-66
Figure 6-20 Print Sample 10....................................................................................................... 6-66
Figure 6-21 Program Sample 11................................................................................................ 6-69
Figure 6-22 Print Sample 11....................................................................................................... 6-69
Figure 6-23 Program Sample 12................................................................................................ 6-78
Figure
6-24 Print Sample 12....................................................................................................... 6-79
Figure 6-25 Program Sample 13................................................................................................ 6-80
Figure 6-26 Print Sample 13....................................................................................................... 6-81
Figure 6-27 Program Sample 14................................................................................................ 6-82
Figure 6-28 Print Sample 14....................................................................................................... 6-83
Figure 6-29 Program Sample 15................................................................................................ 6-88
Figure 6-30 Print Sample 15....................................................................................................... 6-88
Figure 6-31 Program Sample 16................................................................................................ 6-93
Figure 6-32 Print Sample 16....................................................................................................... 6-93
Figure 6-33 Program Sample 17................................................................................................ 6-97
Figure 6-34 Print Sample 17....................................................................................................... 6-97
Figure 6-35 Program Sample 18................................................................................................ 6-99
Figure 6-36 Print Sample 18....................................................................................................... 6-99
Figure 6-37 Program Sample 19.............................................................................................. 6-108
Figure 6-38 Print Sample 19..................................................................................................... 6-108
TOC-4
CHAPTER 1
TERMS USED IN THIS MANUAL
This chapter describes the terms used in this manual.
INPUT BUFFER AND LINE BUFFER
When the DPU-S445 (hereinafter it is referred to as “printer”) receives data (character codes and commands) from the host devices, it stores the data in the printer input buffer . The input buffer has a capacity of 4K bytes (4096 bytes). Then, the printer retrieves data from the input buffer. If data is character code, data is stored into the line buffer. If data is command, data is executed as command immediately.
The printer inputs character codes to the line buffer until the amount of character codes reaches the amount to be printed on one line, then prints the characters. The printer repeats this operation to print all the character data.
The relationship between the input buffer and line buffer is illustrated in Figure 1-1.
Host Device
Input Buf
fer
Line Buf
fer Print Operation
One Line of Characters is Printed.
Figure 1-1 Relationship betw
een Input Buffer and Line Buffer
1-byte characters and 2-byte characters
The printer can print two-size characters; 1-byte characters and 2-byte characters. Table 1-1 lists the character types which can be printed by 1-byte and 2-byte characters.
able 1-1 Character Types and Relationship between 1-byte and 2-byte Characters
T
Character Types
Katakana character (ANK)
1-byte characters
Extended graphics character (IBM Compatible)
Codepage 1252
2-byte characters Kanji, user-defined character
*1 The size of a character to be printed differs depending on the font specified. (See 2.1 Printer Specifications.)
1-1
Line Spacing
A
Line sp
acing is the space between the lines of printed characters (See Figure 1-2).
ABC
ABC
Line Spacing
Figure 1-2 Line Spacing
This printer use a line thermal print mechanism, therefore, a paper feed step is necessary before printing characters or bit images.
The line feed command with printing feeds the paper for height of characters or bit images. Therefore, a paper feed amount which is smaller than character or bit image height is ignored. Printing with underline feeds the paper 4 dot lines in addition to the character height. Line feeding without printing feeds the paper for specified line feed amount.
Character Spacing
Character spacing is the space between each character in the horizontal direction (See Figure 1-3).
B
Character Spacing
Figure 1-3 Character Spacing
Line
The word “line” in this manual indicates a line of characters. For example, the sentence “the printer feeds paper one line” indicates that the printer feeds paper a line of characters.
Dot Line
The words “dot line” in this manual indicate a line of dots in the vertical direction. For example, the sentence “the printer feeds paper by one dot line” indicates that the printer feeds paper by the space of 1 dot.
Paper Auto-loading
The paper auto-loading function which can loads the cut paper from the paper slot automatically by using the paper feed motor.
Notation in the Technical Reference
Hexadecimal
Hexadecimal is showing as follows; Example: 0AH (a hexadecimal unit 'H' is added behind a hexadecimal number.)
Character string A character string is showing as follows; Example: 'G' (a character string 'G' is enclosed with a single quotation mark.)
1-2
CHAPTER 2
SPECIFICATIONS

2.1 PRINTER SPECIFICATIONS

Table 2-1 General Specifications
Item Specification
Total number of dots 832 dots/line Effective dot number 832 dots/line Resolution W 8 dots/mm x H 8 dots/mm Printing width / paper width 104 / 112 mm Printing speed 90 mm/s max.
24 dots 1-byte characters: 52 characters
Number of character per line
(right character space is 4 dots) 24 dots 2-byte characters: 26 characters (left character space is 0 dot, right character space is 8 dots)
24 dots 1-byte characters: 24 x 12 dots Character size (H x W)
16 dots 1-byte characters: 16 x 8 dots
24 dots 2-byte characters: 24 x 24 dots
16 dots 2-byte characters: 16 x 16 dots
Katakana character set Character set
Extended gra
Codepage 1252 character set
JIS 1st and 2nd level of Kanji
Serial (RS-232C conformity) Interface
USB (Ver.2.0 conformity)
Infrared (IrDA Ver.1.2 / BHT-Ir protocol conformity)
Bluetooth (Ver.2.0+EDR conformity) Input buffer size 4K bytes Dimensions (W x D x H) 145 mm x 135mm x 8mm
Mass Operating temperature and humidity
range Storage temperature and humidity
range
EMC
Regulations
The wireless telegraph law regulation conformity
3*
Approx. 490 g (including the battery pack, excluding paper)
Temperature: 0 to 50°C
Humidity: 30%RH to 80%RH (Non condensing)
Temperature: -25 to 60°C
Humidity: 5%RH to 90%RH (Non condensing)
VCCI Class B, FCC Class B, Industry Canada Class B,
CE (EMC), CCC , KC
FCC, IC, CE (R&TTE
Safety CB, CE (LVD), CCC
Countries under the regulations
Japan, USA, Canada, EU, EFTA, Australia, New Zealand,
China, Korea, Taiwan, Brazil
1*
phics character set
4*
), Radio Law of Japan, ANATEL
4*
2*
2*
3*
2-1
*1: Using AC adapter, printing ratio is 7.5% or lower, thermal head temperature is 25°C. *2: SII Japanese font set installed (at shipping). *3: Only for DPU-S445-01A-E. *4: Only for DPU-S445-00A-E.
Dimensions
Paper Inlet
Paper Outlet
Unit : mm
Figure 2-1 Dimensions
2-2

2.2 SPECIFIED THERMAL PAPER SPECIFICATIONS

Table 2-2 Thermal Paper Provided by SII
Item Specifications
Model TP-341L-1 Type Normal paper roll Paper width
Outside diameter 48mm max. Paper thickness 59 ±5 μm Printing surface of Paper roll Outside
Table 2-3 Specified Thermal Paper Specifications
Item Specifications
PD160R-N Oji Paper Co., Ltd.
Paper roll
TF50KS-E2D Nippon Paper Industries Co. P350 Kanzaki Specialty Papers
Paper mode
1*
Cut paper
KT55F20 Papierfabrik August Koehler AG TC98KS-LH Nippon Paper Industries Co. TF8067 Mitsubishi Hi-Tech Paper
Label
paper TL69KS-HW76B Nippon Paper Industries Co.
Paper width
112
Outside diameter 50 mm max. Inside diameter
8 mm min. (Label paper: Outside diameter of paper core should be
25.4 mm min.) Spectral reflectivity Black, near-infrared reflectance should be 6% and below. Printing surface of Paper roll Outside
*1 Use each specified thermal paper in an applicable thermal paper mode.
112
0
-1.0
0
-1.0
mm
mm
2-3

2.2.1 Timing Mark for the Cut Paper Dimensions

9 min.
5
3 max.
112
0
-1.0
16
Insertion direction of paper
Unit : mm
Figure 2-2 Timing Mark for the Cut Paper (back surface)
2-4
(1) Example of use of the cut paper
(
)
An example of use of the cut paper is shown Figure 2-2. (a)
Set the function setting of Paper Mode to “Cut paper”. (b) Set the paper length as page length. (c) Insert the cut paper. (d) Print data within the printable area sho wn in Figure 2-3 . (The position of print e nd must be at the
positio
n of 15mm or longer from the bottom edge of the paper.)
(e) The cut paper is ejected by sending Form Feed command at the end of printing.
Repeat steps (c) to (e).
6mm
A B C D E F 0 1 2 3 4 5 a b c d e f
Form Feed command
Paper length
90 to297mm
Paper ejection
Printable area
15mm or longer
Figure 2-3 Example for the Cut Paper
Page length Paper length
2-5

2.2.2 Thermal Label Paper Dimensions

8
3
b. Paper cut position
Printing area
0
112
-1.0
110
6
20 to 250
A B C D E F 0 1 2 3 4 5 a b c d e f
Form Feed command
To the beginning of the next label
Page length
Non-printing area
a. Print start position
Label length
A B C D E F 0 1 2 3 4 5 a b c d e f
Thermal label paper (surface)
12
3 max
9 min
.
.
Backing (back surface)
5
Unit : mm
Figure 2-4 Example for Thermal Label Paper Dimensions
2-6
(1) Example of use of thermal label paper
An example of use of the thermal label paper is shown Figure 2-4. (a)
Set the function setting of Paper Mode to “Mark Roll Paper”. (b) Insert the thermal label paper. (c) Set the page length as the length from the beginning of the current label to the beginning of the
next label. (d) Set the skip amount (non-printing area) between lab els. (e) Print data within the printable area. (f) Use Form Feed command to find the beginning of the next label. The mark on the next label is
detected and the beginning of the next label is located by sending Form Feed command.
The print start position after the beginning of the next label is placed at position 'a', and the paper
cut position is 'b' as shown in Figure 2-4.
Rep
eat steps (e) to (f).
(NOTE) When Mark Position Correct of SWDIP 4-5 is set as Enable, the printer operates
paper feeding to backward 5 mm just before printing proce ss after placing print start position. If this function set as Enable, use the thermal label paper 40mm or longer length to prevent paper jamming from feeding paper backward.
2-7

2.3 SPECIFIED BATTERY PACK SPECIFICATIONS

Item Specification
Model BP-L0725-A1 Available printing lines 1*10000 lines min. Battery Cycle Life 2*300 cycles
*1: 25C, character spacing is 4 dots, line spacing is 34 dots, TF50KS-E2D selection, print density is 100%, continuous printing with 'H' 1-byte characters, serial communication, fully charged with 8.4 V by specified battery charger. *2: 25C, charged in the printer with specified AC adapter, print ratio is 12.5%, charged with 70%* or more of fully charged. * The rate in environment of 0 to 50C becomes 40% or more.
2-8

2.4 PRECAUTIONS FOR USE

Always print the two-dimensional bar code and ladder bar code (its bar i s to be printed verticality to
the printer) within 0 to 40°C to ensure the bar code's reading accuracy.
The two-dimensional bar code and ladder bar code printing al ways requires the low speed mode to
ensure its reading accuracy. Set the print speed to the low speed mode by using Motor Speed
Select (GS 'E') command.
The height of the ladder bar code requires over 10 mm to ensure its reading accuracy. To print data at a temperature of 15°C o r lower, be sure to set data for black p rinting to 78 mm or
less (see figure below).
At a low temperature, the total number of black printing areas (w1 + w2 in the figure above, for example) should not exceed 78mm for parts having high printed ratios* (including the ladder bar code part). Be aware, in particular, that reverse printing and ruled line tend to increase the ratio. * Parts where many black dots are used when viewed in the direction vertical to the paper feed direction.
Use of the battery pack at low temperature will run out of power in a shorter time. When printing ruled lines, a 2-dot configuration is needed. In case of a 1-dot configuratio n, the
printed lines may be invisible.
Always use the printer within the shadowed range depicted in figure below Relationship between
Temperature and Humidity.
[% RH]
90 8 70
0
40°C, 80%RH
60
5
0
50°C, 47%RH
Humidity
04
03 20 10
0 10 20 30 40
Temperature
2-9
50
[°C]
When using a Bluetooth interface, the radio environment around the printer may cause a failu re in
communications. This is due to the specifications of Bluetooth, which is a radio comm unications standard.
When handling this product, be aware of static elect ricity. If the static electri city is discha rg ed, this
could case communication failure. When this problem occurs, disconnect the USB connector that is connected to the host device and wait few seconds before connect it again.
When the printer is left unused for a long period of time, a white powd er appears to the surface of
platen. (This is the powder by which an ingredient of a thermal paper was recrystallized.) If the powder appears to the platen, wipe the platen with ethanol and use the printer after ethanol has dried completely. Also, make sure not to adhere ethanol except the platen area. If ethanol adheres except the platen area, wipe it off immediately.
(NOTE) Refer to "SAFETY PRECAUTIONS" and "OPERATING PRECAUTIONS" on DPU-
S445 SERIES USER'S GUIDE which be included with the printer for other precautions.
2-10

CHAPTER 3 INTERFACE

This chapter describes 4 types of the interface specifications which are required to connect the host device with the printer.
Irrespective of the interface used, amount of the input buffer in the printer is 4k bytes, and transmission buffer is 768 bytes. If the transmission buffer becomes the condition of the buffer full, the printer waits data processing until the buffer can be received data. Be aware that printing process does not performed in that meantime.

3.1 SERIAL INTERFACE SPECIFICATIONS (RS-232C CONFORMITY)

(1) General specifications
Item Specification
Synchronization Asynchronous Signal level Baud rate 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 bps
Data bit length*1 7 bits or 8 bits Stop bit length 1 bit or 2 bits Parity None, odd or even Reset Break signal input to RxD (20ms or longer)
*1: When selecting 7 bits, the data transmission such as the status from a printer is not performed. Also, the command that uses 80H and more parameters and character printing over 80H are not available.
MARK = –3.0 to –15.0 V: Logic '1' SPACE= +3.0 to +15.0 V: Logic '0'
(2) Pin assignment
Pin No. Name I/O Function
1 N.C. - No connection 2 TxD O Sends data from the printer to the host device.
3 RxD I 4 - - Internally connected with pin No.6.
5 GND - Signal ground 6 - - Internally connected with pin No.4. 7 CTS I Outputs SPACE when the host device can receive data. 8 RTS O Outputs SPACE when the printer can receive data.
Receives data from the host device. Break signal input (SPACE) resets the printer.
3-1
(3) Connector
8
3260-8S3: HIROSE ELECTRIC CO., LTD. or equivalent
1
(4) Examples of connection with the host device (a standard personal computer)
(Shield)
(Shield)
8-pin – 25-pin 8-pin – 9-pin
(5) Dat
a reception
Busy control
In Busy Control, RTS outputs MARK until the printer is ready to receive data after power ON. After the printer is ready, RTS outputs SPACE and the received data is input to the input buffer. When there are 33 bytes or less remaining in the input buffer, RTS outputs MARK. The host device does not transmit data during RTS outputs MARK. When the input buffer is ready to receive data (there are 65 bytes or more in the input buffer) after stopping data reception, RTS once again outputs SPACE. If an error occurs in the printer, R TS outputs MARK and inhibits data entry until the error is cleared. If an error is cleared, RTS outputs SPACE again. For RTS output when an error occurs, the setting is changed by Busy Output When Error Occurs at function setting.
Xon/Xoff control
In Xon/Xoff control, TXD outputs Xon code (11H) from power ON until the printer is ready to receive data. Received data is input to the input buffer. When there are 65 bytes or less remaining in the input buffer, TXD outputs Xoff code (13H). The host device does not transmit data while Xoff code is received. When the input buffer is ready to receive data (there are 129 bytes or more in the input buffer) after stopping data reception, TXD once again outputs Xon code. When this control method is selected, the RTS signal always outputs SPACE. If an error occurs in the printer, TXD outputs Xoff code and inhibits data entry until the error is cleared. When the error is cleared, TXD outputs Xon code again. For Xoff code transmission when an error occurs, the setting is changed by Busy Output When Error Occurs at function setting.
Data reception error in serial communication
When Parity is selected as Yes by the function setting, a '!' is printed next to data in which a parity error occurred and a '?' is printed next to data in which any other error (framing error, etc.) occurred. If a serial data reception error occurs, no error indication other than the printing of '!' and '?' is performed (for example, the ERROR lamp does not light).
3-2
(6) Data transmission
Busy control
In Busy Control, the conditions which transmit status information to the host device from the printer are as follows; When CTS Control of function setting sets to Enable, the printer sends data from TXD after confirming CTS status as SPACE. When CTS Control of function setting sets to Disable, the printer sends data from TXD regardless of the condition of the host device.
Xon/Xoff control
In Xon/Xoff control, the conditions which transmit status information to the host device from the printer is that the printer sends data from TXD regardless of the condition of the host device.
(NOTE) Be aware that if the transmission buffer becomes full, the printer does not print
until the buffer is available.
3-3

3.2 USB INTERFACE SPECIFICATIONS

(1) General specifications
Item Specification
USB Version Ver 2.0 conformity USB Printing class specification 1.1 Communication speed Full speed12 Mbps Communication protocol Bulk transfer
(2) Pin assignment
Pin No. Name I/O Function
1 Vbus - USB power supply 2 D- I/O USB data signal 3 D+ I/O USB data signal 4 N.C. - No connection 5 GND - GND
(3) Connector
5
1
Mini B type
(4) Dat
a reception
USB data reception uses a bulk-out transfer method. The data are received even during the printing operation, and when the data accumulate in the input buffer by the amount of input buffer + 2 packets, the NAK response continues until amount of the input buffer becomes 129 bytes or more. The number of bytes that can be received with one packet is maximum 64 bytes. When an error occurs, the NAK response continues until the error is cleared after receiving data of 2 packets. For the operation when an error occurs, the setting is changed by Busy Output When Error Occurs at function setting.
(5) Data transmission
USB data transmission uses a bulk-in transfer method. The response data are stored temporarily in the transmission buffer, and a response is made to the bulk-in packet request from the host device. If no transmission data exist, the zero length data is returned when the bulk-in request is received. The number of bytes that can be transmitted with one packet is maximum 64 bytes.
(NOTE) Be aware that if the transmission buffer becomes full, the printer does not print
until the buffer is available.
3-4

3.3 INFRARED INTERFACE SPECIFICATIONS

The printer can communicate with the host device through the infrared interface. The infrared interface used in the printer conforms to the physical layer standard (V er 1.2) specified by the Infrared Data Association (IrDA). The printer supports the minimum infrared transmission functions as the second station specified by IrDA and BHT-Ir protocol specified by DENSO CORPORATION.

3.3.1 Physical Specifications

Transmission distance 0.2m max. Transmission range 15° Infrared transmission pulse width Typ. 1.63 s

3.3.2 IrDA Specifications

The printer conforms to IrDA second station.
(1) Transmission specifications
Baud Rate 9600 to 115200 bps Data Size 64 to 512 bytes Window Size 1 Additional BOFs 0 to 48 Maximum Turn Around T i me 500ms Minimum Turn Around T i me 10ms Link Disconnect/Threshold Time 3 to 40 s
Ver.1.2 and supports only the minimum infrared transmission functions as the
Item S
Item Specification
pecification
(2) Services supported by IrLAP
1. Connect service
2. Data service
3. Disconnect service IrLAP does not support a transfer for non-number and sniffing services.
The printer does not initiate connections.
Service Hint Printer, IrCOMM
Device Nickname DPU-S445
3-5
(3) Services supported by IrLMP
1. Connect service
2. Disconnect service
3. Data service A single LSAP address does not support multiple connections. furthermore, LSAP address 7 and 9 can
not share the connection state. If multiple connections are requested, a disconnect request is transmitted and the printer waits until it receives a disconnect command.
IAS server: LSAP address 0 IAS client: Not supported Printer application: LSAP address 7 (3-wireraw/IrLPT) and address 9 (3-wire/9-wire)
(4) IAS service
IAS service is supported by 'GetValueByClass' only. Return values for GetValueByClass inquiries are listed below.
1.
Inquiry Inquiry
Class Device Class IrLPT Attribute Device Name Attribute IrDA:IrLMP:LsapSel
Return value Return value
Device Name Sll Thermal Printer Lsap address 7
2. 5.
Inquiry
Class IrDA:IrCOMM Class IrDA:IrLMP Attribute Parameters Attribute IrDA:IrLMP:LsapSel
Return value Return value
Service type 3-Wireraw Lsap address 7 Port type Serial
3 6.
Inquiry Inquiry
4.
Class IrDA:IrCOMM Class IrDA:IrCOMM Attribute IrDA:IrLMP:LsapSel Attribute IrDA:TinyTP:LsapSel
Return value Return value
Lsap address 7 Lsap address 9
(5) TinyTP
Flow control is performed by this layer when connecting with 3-Wire or 9-Wire. '5' is transferred to the primary station as the initial credit when connecting the LMP layer.
3-6
(6) IrCOMM
Supports 3-Wireraw, IrLPT, 3-Wire and 9-Wire. Flow control is performed only by the IrLAP layer when connecting with 3-Wireraw or LrLPT. Flow control is performed by the TinyTP layer when connecting with 3-Wire or 9-Wire.
Xon/off control and line status control are not supported.
(7) Command response processing during IrDA transmission
If the printer receives a command that requires transmission of data from the remote station during IrDA transmission, and then stores the data in the transmission buffer and transfers them at transmit timing to the remote station.
The printer clears a response data in the transmission buffer when transmission to the remote station is disconnected for busy state. When the remote station is in disconnection, the printer does not store the data in the transmission buffer and the data is cleared.
However the printer transfers the status regardless of the remote station state when initial automatic status transmission is enabled. The printer transfers status when the remote station is connected again if automatic status transmission has not deactivated by power off.
(NOTE) Be aware that if the transmission buffer becomes full, the printer does not print
until the buffer is available.
3-7

3.3.3 BHT-Ir Specifications

The printer also support
s BHT-Ir communication specified by DENSO CORPORATION.
The printer can receive data from the 'BHT-6500' made by DENSO CORPORATION when Data Input Mode SWDIP2-1 and SWDIP2-2 is selected to BHT-Ir. The inherent processing of the printer for BHT-Ir communication is shown below: See BHT-Ir protocol specification for details of the protocol.
(1) ID
Printer ID: 3445H (fixed)
(2) Text format
Only text is valid. Files with 'PD3', 'FN3' or 'EX3' extension can not be processed.
(3) Input buffer full processing when receiving header.
Upon receiving the header, the printer inhibit s connection with the host device when the remaining amount of the input buffer becomes 512 bytes or less after subtracting the field number of the data text indicated in heading text.
(4) Input buffer full processing when receiving data
Upon receiving data, the printer sends WACK supervisory sequence to a host device for requiring temporarily delay of the data output from the host device as the input buffer full state when the remaining amount of the input buffer is 255 bytes or less. Then, the printer sends the ACK supervisory sequence to the host device to restart data transmission when the remaining amount of the input buffer is 512 bytes or more. The printer transfers the EOT supervisory sequence and stops when the input buffer full status continues more than 1 minute.
(5) Command response processing during BHT-Ir transmission
No response command is transferred in BHT-Ir transmission mode. Although response data is generated, it is discarded.
3-8

3.4 BLUETOOTH INTERFACE SPECIFICATIONS

Bluetooth-supporting model can perform wireless communication by Bluetooth communication function. When Data Input Mode of the function setting is set to Bluetooth/USB, internal Bluetooth module of the printer operates regardless of its communication. When using the printer at the place with radio limitations like a hospital or an airplane, set Data Input Mode of the function setting as Serial/USB or IrDA/USB to stop Bluetooth communication.
(1) General specifications
Item Specification
Bluetooth version 2.0+EDR conformity Transmitted electric power class Class 2 Connection mode Peer-to-peer Profile SPP PIN code*1 None (default) Device name*1 DPU-S445 (default)
*1: This specification can be changed by the command.
(2) Security
The printer does not set with PIN code or the Link Key in default. Bluetooth device uses security mode 1, so no encryption is used. Bluetooth device becomes security mode 3 if PIN code is set by Set default/Set test print header command or Bluetooth Link Key selection of the function setting is set to Enable, and encryption is used. When the setting of Bluetooth Link Key is Disable and selection of PIN code is canceled, Bluetooth device becomes security mode 1 again, and no encryption is used.
(3) Input buffer
Capacity of input buffer for internal Bluetooth module is 3Kbytes. Received data is stored in the input buffer of Bluetooth module, and then these data is to be processed after data transfer to input buffer of the printer. If an error occurs, the printer stops receiving data after data that stored into input buffer of Bluetooth until the error is cleared. For the operation when an error occurs, the setting is changed by Busy Output When Error Occurs at function setting.
(NOTE) Be aware that if the transmission buffer becomes full, the printer does not print
until the buffer is available.
(4) Link key saving
If the Bluetooth Link Key selection of the function setting is set to Enable, the printer saves the link key to connect with the host device in the pairing process. The host devices can be saved up to 10. When requiring to save the 11th host device, perform the pairing after clearing the saved host devices in the printer. To clear the all of saved host device data, set the Bluetooth Link Key selection of the function setting as Disable after setting Data Input Mode of the function setting as Bluetooth. The printer clears the stored host device data after the above process.
3-9

4.1 FUNCTION SETTING

CHAPT
ER 4
FUNCTION SETTINGS
The communication method, a paper types, and so on can be preset in this printe Preset these functions before using the printer.
The function settings of the printer are stored in FLASH memory. Once these are set, these changing again.
The function settings are specified through the software DIP switch (hereinafter referred to as SWDIP switch), SWDIP1 to 4. Details for settings of SWDIP 1 to 4 are descri bed below. The value that is indicated by boldface and shaded cell shows a default setting value. The words in pare ntheses in the table are indicated in test print.
r.
are stored until
4-1

4.1.1 Function Settings(SWDIP1)

Table 4-1 Function S s (SWDIP1)
SWDIP Function
1-8 Data Control f Xon/Xof 1-7 Stop Bit 2 bits
1-6 1
-5 1-4 Bit Length 7 bits 1-3
1-2 1-1
Data Control
Select flow control in serial communication as BUSY (hardware) control or Xon/Xoff control. In BUSY c In Xon/Xoff control, flow control is performed u
Stop Bit selecti
Parity See table below
Baud Rate See table below
selection
ontrol, flow control is performed using RTS signal in the printer.
on
etting
Value
0 1
Busy
1 bit
8 bits
sing codes of Xon(11H) or Xoff(13H) from the printer.
Select Stop Bit in serial communication 1 bit or 2 ts.
Parity selection
Select Parity in s ommunication a ven, Odd None.
Bit Length selection
Select Bit Length in serial communication as 8 or 7 bits.
erial c s E or
Parity SWDIP1-6 SWDIP1-5
None 0 0
Odd 0 1
None 1 0
Even 1 1
as bi
4-2
Baud Ra
te selection
Select Baud Rate of communications as Serial and BHT-Ir.
Baud Rate SWDIP1-3 SWDIP1-2 SWDIP1-1
1200 0 0
1*
0 2400 0 1 0 4800 0 0
1*
1 9600 0 1 1 19200 1 0 0 38400 1 0 1 57600 1 1 0
115200 1 1 1
*1 This setting is enabled only when Serial is selected as the communication mode. When BHT-Ir is selected as the communication mode, the baud rate is set to 2400 bps automatically.
4-3

4.1.2 Function Settings(SWDIP2)

Table 4-2 Function Se (SWDIP2)
SW Function
DIP
2 to Status Output Ena-8 Au ble 2 ode Shift-JIS-7 Kanji C Code 2 ize 16 do-6 Font S ts 2-5 Auto Power Off Enable 2-4 atible Character Set IBM Comp 2-3 Auto Loading Disable
2-2 2-1
Auto Status Output selection
When Auto Status Output selection sets to Enable, the printer send device every one second. Refer to the descriptions of Automatic Status Response (DC2 'e') co mmand fo Moreover, refer to 6.7 INITIAL AUTOMATIC STATUS TRANSMISSION
Data Input Mode See below
ttings
Value
0 1
Disable
JIS Code
24 dots Disable
ANK
Enable
s printer status to the host
r the code to be sent.
for more details.
(N into the
OTE) When this function set to Enable, the printer keeps on storing dat a
transmission buffer if the printer status is not receiv ed. The condition of the transmission buffer as buffer full may not work because status data can not be created. Note that the printer does not perform printing processing until the transmission buffer full is cleared.
Kanji Code selection
Select Kanji Code in default as JIS Code or Shift-JIS Code. This setting Kanji Code System (FS 'C') command (6.5.11 Kan
Font Size selection
Select Font Size in default as 16 or 24 dots. This setting can be chan Size (DC2 'F') com
Auto Power Off selection
When Auto Power Off selection sets to Enable, the printer turns itself off after passing a set time. This setting can be changed by Set default/Set test print header (DC2 'i') command (6.5.25 Auxiliary Function Commands). The default value is 30 minutes.
Character Set selection
Select Character Set as IBM compatible or ANK. This setting can be changed by Select character code table (ESC 't') command. See Appendix A CHARACTER CODE for character code.
mand (6.5.24 Character Set Command).
ji Character Set Selection commands).
can be changed by Select
ged by Select Character Font
Auto Loading selection
When Auto Loadin g selection sets to Enable, the printer detects the thermal paper inserted from the paper slot and loads that automatically.
4-4
Da
ta Input Mode selection
Select the communication method. Refer to CHAPTER 3 INTERFACE for more detail.
ode SWDIP2-2 SWDIP2-1 Data Input M
BHT-Ir/USB 0 0
Serial/USB 0 1
IrDA/USB 1 0
Bluetooth/USB 1 1
*1 This setting is enabled for Bluetooth-supporting model only. Bluetooth-supporting model is shipped with this setting value (Bluetooth/USB).
1*
4-5

4.1.3 Function Settings(SWDIP3)

Table 4-3 Function S s (SWDIP3)
SW Function
DIP
3-8 Reserved Fix to 1 3-7 3-6 3-5 3-4 3-3 3-2 3-1
Print Density selection
Normally, select nt density as 10 .
Density See table below Print
r Select See table below Pape
Paper Mode See table below
the pri 0%
Print Density SWDIP3-7 SWDIP3-6
95% 0 0
etting
Value
0 1
100% 0 1
105% 1 0 110% 1 1
(NOTE) If too much energy is applied to the thermal head, it would shorten its life span and
cause the paper feed problem. Set an accurate thermal paper selection and print density. If sele thermal paper that is ferent fr the one specified in the thermal cting the dif om pape or in case of not setting the print density in 100%, verify the r selection perform with your actual device fore printing. ance be
Thermal Pa ction
Select the th aper by Paper Select.
per sele
ermal p
Paper Sel SWDIP3-4
PD160R-N 0 0 0
TC98KS-LH 0 0 1
Reserved 0 1 1
KT55F20 1 0 0
TF8067 1 0 1
TL69KS-HW76B 1 1 0
ect SWDIP3-5 SWDIP3-3
P350 0 1 0
TF50KS-E2D (TP-341L-1) 1 1 1
4-6
Paper Mode selection
Select Paper Mode as the thermal paper in use.
(
Cut Paper mode
1)
per Mode SWDIP3-2 SWDIP3-1
Pa
Cut Paper 0 0
Roll Paper 0 1
Mark Roll Paper 1 0
Reserved 1 1
This mode assumes that to should be printed the mark on back side to detect paper position when loading Refer to 2.2 SPECIFIED THERMAL PAPER SPECIFICATION for the paper dim
print the thermal paper which be cut by a certain fixed length. The paper
the paper automatically.
ensions.
(a) Auto loading operation
In this mode, the printer feeds the thermal paper to the set value by detecting the
g the thermal paper from the paper slot, and then becomes print-ready status.
loadin When the mark for detection is feeding the thermal paper up t for error release by pressing the FEED switch. When the FEED switch is fed one dot l Amount of p is 50 mm.
ine and the printer goes print-ready status.
aper feed can be set by Set Default/Set Test Print Header (DC2 'i') command. The default
(b) Process of out-of-paper
The printer processes the error operation by lighting the lamp if out-of-paper error detected.
2)
(
Roll Paper mode This mode assumes that to print the thermal paper roll.
(a) Process of out-of-pa
The printer processes the error operation by lighting the lamp if out-of-paper erro
not printed on the back side, the printer stops as an error status after
o paper length which is set. At this time, the printer is in the state waiting
pressed, the thermal paper is
detection
per detection
paper mark after
r detected.
(3) Mark Roll Paper mod
This mode assumes that to print the thermal paper roll with the printed mark at regular intervals on the back side which to detect paper position. Refer to 2.2 SPECIFIED THERMAL PAPER SPECIFICATION for the paper roll dimensions.
e
(a) Operation of paper detection
In this mode, the printer determines the status as the out-of-paper error by feedi ng the thermal paper 10mm or longer, if it is less than 10mm, the printer determines the status as the mark and does not detect the out-of-paper error.
4-7

4.1.4 Function Settings(SWDIP4)

Table 4-4 Function S s (SWDIP4)
etting
Value
SW n
DIP Functio
0 1
etooth Link Key Selection
4
Blu (Bluetooth Link
Key)
Enable -8 4 ix to 1 -7 Reserved F 4
Busy Output When Error Occurs (Error
)
Unbu
sy -6
4 Position Correct Enab-5 Mark le 4-4
Bluetooth Baud Rate See below
4-3 4-2 CTS Control 4-1 Auto Activation by AC
Bluetooth Li
nk Key Selection
This function is set to Ena
ble, the printer saves the link key from the host device to connect in the
Enable Enable
pairing process. When once a pairing is performed for the host device, the pri the host device using the link key from the next time without a pairing. If this function is set to Enable and PIN code is not specified in advance, th
de as '0000'.
co
Disable
Busy
Disable
Disable Disable
nter can connect to
e printer processes PIN
Busy Output When Erro
This function can select whether data reception be comes busy status or not wh If this function is disabled, data reception does not
r Occurs
en an error occurs.
become busy status while an error occurs and data reception is available. However, regardless of this setting if receiving buffer become s full, data recepti st s.
atu
Mark Positi
on Correct selection
on turns to busy
When Mark Position Correct selection sets to Enable and Paper M ode SWDIP3-1 to 3-2 is selected to Mark Roll Paper, the printer feeds the paper roll in backward as following conditions:
Beginning of a printing right after power-on or resetting. Beginning of a printing right after performance paper home feed by FEED switch or page
feed execution.
To use this function, there are several restrictions. Refer to 2.2 SPECIFIED THERMAL PAPER SPECIFICATION.
4-8
Bluetooth Baud Rate selection
Bluetooth Baud Rate in Bluetooth communication. Usually, select Bluetooth baud rate to
Select 230400bps.
Bluetoo e
th Baud Rat SWDIP4-4 SWDIP4-3
230400 bps 0 0
57600 bps 1 0
115200 bps 1 0
230400 bps 1 1
CTS Control selection
When CTS Control selec
tion sets to Enable and Data Control SWDIP1-8 i s selected to Busy, the printer transmits data after identifying CTS of the host device as SPACE. When CTS Control selecti
on sets to Disable or selecting serial communication as Xon/Xoff control,
the printer transmits data regardless of status of the host device.
Auto Activation by AC selection
When Auto Activation by AC selection sets to Enable, the printer turns the power on after plugging specified AC adapter to the outlet.
4-9

4.1.5 Function Settings by Switch Operation

A function setting can be performed by switch operation. Use the functi Operate the following procedures to enter the printer to the function settings mo de.
on settings by switch operation in the function setting
s mode of the printer.
(a) Be sure that
the thermal paper is set to the printer and the printer is turned off. If the thermal
paper is not set, set the thermal paper to the printer.
Hint
When an error occurs during the function settings mode, the printer exit
setting mode and returns to the power off after blinking the POWER and ERROR lamps. Therefore, the function setting mode exits the function setting m occurs in settings. So set the thermal paper of length enough to prev error.
(b) Press the POWER switch and the FEED switch o
n the printer at the same time until the POWER lamp and ERROR lamp light. Ke g the POWER and FEED switches until two lamps blink in six seconds, and
ep on pressin
th immediately.
en release the POWER and FEED switches
(c) When the following message is pr
Select Function Setting Mode: Feed SW / HEX Dump Mode: Power SW
Hint
When the POWER switch is pressed at th
  If you do not press any switch within 30 seconds after a message is printed, the printer
turns off.
When the POWER and ERROR lamps start to blink, release your finger from the POWER
and ERROR switches within 5 seconds. If it is ongoing, the printer exits function setting mode. In such a case, turn the power off and try the procedure fro
inted, press the FEED switch.
is time, the printer becomes in HEX dump mode.
(d) When the following message is printed, press the FEED switch.
s the function
ode if out-of-paper error
ent from occurring an
m (1) again.
[SETTING MODE] Yes: Feed SW / No: Power SW
Hint
If the POWER switch pressed, the printer exits the function setting mode and turns the
power off.
If you do not press any switch within 30 seconds after a message is printed, the printer
turns off.
The printer becomes in the function settings mode and becomes i n the state of waiting for switch operation. In the function setting mode, you can initialize or modify settings. To set the settings to defaults, perform
operation (1). To change settings, perform operation (2).
4-10
Initializing SWDIP switch settings
(1)
(a) When the following message is printed in the function setting mode, press the FEED switch.
Load Default Setting? Yes: Feed SW / No: Power SW
(b) When the following message is printed, the printer turns off.
Th o defaults. Initialization is complete.
e settings
(2) Chang
ing SWDIP switch settings
(a) When the following message is printed in the
Hint
There are SWDIP switches from 1 to 4 in the printer, so set 8 bits within SWDIP switches In function setting mode, the POWER lamp blinks once by pressing either the POWER
are set t
Default Setting Saved. Setting Mode Finished.
function setting mode, press the POWER switch.
Load Default Setting? Yes: Feed SW / No: Power SW
respectively. switch or the FEED switch. Be sure to confirm the POWER lamp blinking in order to
ensure proper operation.
4-11
Operation 1: SWDIP switch selection
(a) If pressing the FEED switch after printing the message shown below, the
(operation 2). If pressing the POWER switch instead of the FEED switch, the details of the printed SWDIP switch (SWDIP switch 1) are not changed, and the next SWDIP switch is selected (operation
1)
.
DIP Switch setting mode. DIP SW-1=******** Change Setting? Yes: Feed SW / No: Power SW
Hint
"********" in the message indicates the setting of the SWDIP switch. The leftmost bit is the
sign
If SWDIP switches 1 to 4 are skipped, the function setting mode ca
Operation 2
: SWDIP switch setting
(a) When the message
(SWDIP*-8) to the lea
most (operation 3).
ificant bit (SWDIP*-8) and the rightmost bit is the least significant bit (SWDIP*-1).
shown at the following is printed, set the bits from the most significant bit
st significant bit (SWDIP*-1).
function setting shifts
n be terminated
Input 8 bits. 1: Feed SW / 0: Power SW
To set
1: Press the FEED switch. To set 0: Press the POWER switch. For example, to set 10101110, press the switches in the following sequence:
D, POWER, FEED, POWER, FEED, FEED, FEED, FEED, POWER.
FEE
(b) When the switches are pressed eight times (for eight bits), the following message is printed.
DIP SW-1=********” Save Setting? Yes: Feed SW / No: Power SW
When t ssed, the message shown at the following is printed, and the setting is saved.
When pressing the POWER switch instead of the FEED switch, the message shown at the following is printed and the setting is not changed.
he FEED switch is pre
DIP SW-1=******** Saved.
DIP SW-1 Not Changed.
After this operation, the function setting shifts next SWDIP switch (operation 1). After setting SWDIP switch 4, the setting function exits setting mode (operation 3).
4-12
Operation 3: Exiting function setting mode
(a) If pressi
ng the FEED switch after printing the message shown below, the function setting shifts
(operation 1).
DIP Switch setting mode. Continue: Feed SW / Quit: Power SW
If pressing the POWER switch after printing the message shown below, the printer exits the function
mo
setting The function setting is now complete.
de and turns off.
Setting Mode Finished.

4.1.6 Function Settings by Commands

The command is transmitted to the printer by selected communication. For det
ails of commands, refer to Function Settings (DC2 ‘k’) command (“6.5.25 Auxiliary Function
Commands”).
4-13

4.2 TEST PRINT

The printer has a test print function that prints the contents of Function Settings and ch
(a) Be sure that the thermal paper is set to the printer and the printer is turned off. If the thermal
aper is not set, set the thermal paper to the printer.
p
(b) Press the POWER
POWER lamp lights, release the POWER switch first and then the FEED switch second. (c) The test print is performed. (d) The printer goes to print-ready status after test printing is completed.
switch and the FEED switch on the printer at the same time until the
aracter strings for test.
4-14

4.3 HEX DUMP MODE

This function can b the followin
g steps.
(a) Be sure that the thermal paper is installed to the pri
e used to check whether the host device transmits data to the printe r correctly. Perform
nter and the printer is turned off. (b) Keep on pressing the POWER and FEED switches in six seconds. (c) Release the POWER and FEED switches after blinking the POWER and ERROR lamps. (d) Pr ssage below.
(e) After printing the message below, th
The e Input dat
code, 16 bytes at a time. If the input buffer contains less than 16 bytes of dat a, it is printed when the FEED switch is pressed.
ess the POWER switch after printing the me
Select Function Setting Mode: Feed SW / HEX Dump Mode: Power SW
e printer enters a HEX dump mode.
[HEX DUMP MODE]
xample of printing using BASIC is shown below:
a from host computer. The data input through the printer interface is
printed as hexadecimal
16 bytes Input PRINT#1,"abcdefghijklmn" to the host computer and press the Return key.
The printer prints 'abcdefghijklmn' in hexadecimal number and two control codes (0DH and 0AH).
OK
PRINT #1,"abcdefghijklm n"
Host device
Less than 16 bytes Input PRINT#1,"abc" to the host computer, press the Return key , and then pr ss the FEED switch.
The printer prints 'abc' in hexadecimal number and
OK
PRINT #1,"abc"
[HEX DUMP MODE] 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 0D 0A
Printer
e
two control codes (0DH and 0AH).
[HEX DUMP MODE] 6
1 62 63 0D 0A
Host device
(f) Press the POWER switch to exit the HEX dump printing.
Hint
Some BASIC use a PR# statement instead of PRINT#. Refer to the computer manual for
details on BASIC.
4-15
Printer
CHAPTER 5
LAMP DISPLAY AND SWITCH FUNCTION
This chapter explains printer status by lamp display and functions of switches.

5.1 PRINTER STATE LAMP DISPLAY

Table 5-1 lists states of the printer, display that by two lamps (POWER and ERROR lamps).
Table 5-1 Printer Status Signals
Printer status Error
Power OFF Off Off
Power ON (Print-ready) On Off
Initializing On On
Out-of-paper error Thermal paper is not inserted On Blink
Paper cover open error Paper cover is opened On Blink twice
Battery low, power failure
Thermal head temperature error
Power supply voltage is out of the stipulated range
Thermal head temperature is out of the stipulated range
1*
2*
Recharging Battery pack is recharging Blink Off
Function setting mode
Mode where function settings can be set
Function setting mode shifting Blink Blink
FLASH memory accessing FLASH memory is operating Short blink Short blink
Hardware error Error occurs in hardware Off Blink
*1: Range of stipulated power supply voltage is 6.5Vpower supply voltage ≦9.7V *2: Range of stipulated temperature is -10°C≦ head temperature ≦80°C
Display
POWER ERROR
Blink On
Blink twi
ce On
Off On
Display Pattern : On, : Off
Items Pattern
Blink
Short blink
Blink twice
........
○........
.......
5-1

5.2 ERROR RECOVERY PROCEDURE

When an error occurs, the printer stops printing operation. Moreover, when Busy Output When Error Occurs is enabled in the Function Settings, the status of data reception becomes busy. However, Some errors can be recovered to a status just before a printing stop after clearing errors. Error recovery procedure is shown below. In this case, the printer resumes the printing from next line or next dot line a print stopped.
Table 5-2 Error Recovery Procedure
Item Recovery Procedure
Cut Paper mode: Insert the thermal paper from the paper slot, the printer loads the thermal paper automatically and returns to print-ready status if the mark is detected. When the mark is not detected,
Out-of-paper
press the FEED switch to recover to print-ready status .
Roll Paper / Mark Roll Paper mode: Open the
paper cover and replace the thermal paper. Close the paper cover, so the printer returns to print-ready status automatically one second later.
Paper cover open
Close the paper cover, so the printer returns to print-ready status automatically one second later.
The printer returns to print-ready status automatically if
Thermal head temperature error
Power failure
thermal head temperature becomes within the stipulated range.
Return the power supply voltage to the stipulated range, and then press the FEED switch.
2*
1* 3*
Hardware error Non-recoverable error
*1: In this case, paper feed operation is performed. *2: Range of stipulated temperature is -5°C head temperature ≦75°C *3: Range of stipulated power supply voltage is 6.5Vpower supply voltage ≦9.7V
1*
5-2

5.3 POWER SWITCH

Turning ON / OFF the printer and changing the mode to the print-ready can be performed by the POWER switch.
(NOTE) Always use the POWER switch to turn off the printer.
Do not power off the printer by removing the AC adapter or the battery pack. If doing so, the memory may be damaged.

5.4 FEED SWITCH

The paper can be fed by the FEED switch. The action differs depending upon SWDIP3-1 to 3-2 of the function settings.
Cut Paper / Roll Paper mode
The printer feeds a small amount of thermal paper by pressing this switch once and the switch is held down, the thermal paper is fed continuously.
Mark Roll Paper mode
The printer feeds the paper until paper mark detection by pressing this switch once. The printer stops its operation if the printer does not detect the mark after feeding the thermal paper up to paper length which is set. The amount of maximum paper length to mark detection can be set by Set default/Set test print header (DC2 'i') command (6.5.25 Auxiliary Function Commands). The default value is 300 mm.
The printer does not feed the thermal paper if pressing FEED switch in the following case.
When the paper cover opens  When power supply voltage is larger than 9.7V.  When the printer is in the download mode. (For the download mode, refer to 6.5.26 Download
Mode)
5-3
CHAPTER 6
COMMAND DESCRIPTIONS
This chapter describes the functions of the commands supported by the printer.

6.1 THE SUMMARY OF COMMAND FUNCTION

The printer supports the ESC/P based commands.
Table 6-1 Command Summary (1/4)
Command Function Page
ESC 'C' Set Page Length at n Lines 6-20
ESC 'C' 0 Set Page Length at n Inches 6-20
ESC 'N' Set Bottom Margin 6-20
ESC 'O' Cancel Bottom Margin 6-21
ESC 'Q' Set Right Margin 6-21
ESC 'l' Set Left Margin 6-22
ESC '0' Set 1/8-inch Line Spacing 6-24
ESC '2' Set 1/6-inch Line Spacing 6-24
ESC '3' Set n-dot-line Line Spacing 6-24
ESC 'B' Set Vertical Tab Positions 6-26
ESC 'D' Set Horizontal Tab Positions 6-27
CR Print and Carriage Return 6-28
LF Print and Line Feed 6-28
FF Page Feed (Form Feed) 6-28
ESC 'J' Print and Feed Paper 6-29
GS '<' Marked Paper Form Feed 6-29
HT Execute Horizontal Tab 6-30
VT Execute Vertical Tab 6-30
ESC '$' Set Absolute Position 6-30
ESC '\' Set Relative Position 6-30
6-1
Table 6-1 Command Summary (2/4)
Command Function
Page
ESC 'R' Select International Character 6-32
ESC 't' Select Character Code Table 6-32
DC2 'y' Euro Character Specify 6-33
ESC '%' Set/Cancel Download Character Set 6-35
ESC '&' Define Download Characters 6-35
DC2 'D' Download Characters Area Operation 6-36
SO Select Expanded Character Mode with Automatic Cancellation 6-37
DC4 Cancel Expanded Character Mode with Automatic Cancellation 6-37
ESC 'W' Select/Cancel Expanded Character Mode 6-37
ESC 'w' Select/Cancel Double Height Mode 6-37
ESC 'E' Select Emphasized Print Mode 6-37
ESC 'F' Cancel Emphasized Print Mode 6-38
ESC 'G' Select Double Print Mode 6-38
ESC 'H' Cancel Double Print Mode 6-38
ESC '-' Select/Cancel Underline Mode 6-38
ESC '!' Set Print Mode 6-39
DC2 'Y' Character Rotation 6-40
ESC SP Set Character Spacing 6-41
FS '&' Select Kanji Mode 6-44
FS '.' Cancel Kanji Mode 6-44
FS 'C' Select Kanji Code System 6-44
FS 'r' Select Kanji Quarter Size Character Mode 6-45
FS DC2 Cancel Kanji Quarter Size Character Mode 6-45
FS '2' Define User-defined Character 6-46
DC2 'G' User-defined Character Area Operation 6-47
FS 'J' Select Vertical Writing 6-48
FS 'K' Select Horizontal Writing 6-48
FS 'W' Select/Cancel Quadruple-size Kanji Character 6-48
FS '-' Select/Cancel Kanji Underline Mode 6-49
FS '!' Set Kanji Print Mode 6-50
FS 'S' Set Kanji Left- and Right-side Spacing 6-51
ESC '*' Set Bit Image Mode 6-54
GS 'v' '0' Raster Bit Image Print 6-56
DC2 'T' Stamp Define 6-59
DC2 'S' Stamp Select 6-60
DC2 'V' Stamp Print Out 6-60
DC2 'W' Stamp Abort 6-60
DC2 'U' Stamp Clear 6-60
CAN Cancel Print Data in Buffer 6-62
6-2
Table 6-1 Command Summary (3/4)
Command Function
Page
DC3 '+ Ruler Line ON 6-63
DC3 '-' Ruler Line OFF 6-63
DC3 'A' Ruler Line Buffer A 6-63
DC3 'B' Ruler Line Buffer B 6-63
DC3 'C' Ruler Line Buffer Clear 6-64
DC3 'D' Define Ruler Line by Dot 6-64
DC3 'F' Define Ruler Line with Repeating Patterns 6-64
DC3 'L' Define Ruler Line by Line 6-64
DC3 'V' Ruler Line LSB/MSB Image 6-65
DC3 'P' Print One dot Line after Printing Line Buffer Data 6-65
DC3 '(' Continuous Ruler Line Command Input 6-65
DC2 'P' Define Optional Font 6-67
DC2 'O' Select Optional Font 6-68
DC2 'Q' Optional Font Area Release 6-68
GS 'H' Select HRI Character Print Position 6-70
GS 'f' Select HRI Character Font 6-70
GS 'h' Set Bar Code Height 6-70
GS 'k' Print Bar Code 6-71
GS 'w' Set Width of Bar Code 6-73
GS 'P' Set Bar Code Print Position 6-73
GS 'n' Nominal Fine Element Width 6-73
GS 'o' PDF Row Height 6-74
GS 'p' 0 PDF417 Print 6-74
DC2 ';' QR Code and Data Matrix Module Sizes 6-75
GS 'p' 1 QR Code Print 6-75
GS 'p' 2 Data Matrix Print 6-76
GS 'p' 3 Maxi Code Print 6-77
DC2 'E' 0 Set Routine Format 6-84
DC2 'E' 1 Set Routine Parameter Data 6-86
DC2 'E' 2 Execute Routine Format 6-87
DC2 'E' 3 Delete All Routine Data 6-87
DC2 'z' 0 Page Mode Select 6-89
DC2 'z' 1 Page Mode Print 6-90
DC2 'z' 2 Page Mode Vertical Position Specify 6-90
DC2 'z' 4 Page Mode Data Registration 6-90
DC2 'z' 5 Page Mode Data Calling 6-90
6-3
Table 6-1 Command Summary (4/4)
Command Function
Page
DC2 '$' '1' Rectangle Print 6-91
DC2 '$' '2' Line Type Property 6-92
DC2 '$' '3' Line Width Property 6-92
DC2 '$' '4' Fill Property 6-92
DC2 'e' Enable/Disable Automatic Status Transmission 6-94
DC2 'r' Send Remaining RAM Response 6-94
DC2 'v' Send VP Voltage 6-95
DC2 'q' Send RAM Checksum 6-95
DC2 'l' Send SWDIP Switch Settings 6-95
DC2 'j' Execute Response Request 6-96
DC2 'F' Select Character Font Size 6-98
DC2 '!' Select Paper 6-100
DC2 '~' Select Print Density 6-100
GS 'E' Motor Speed Select 6-101
DC2 'a' Set Automatic Power-off Time 6-101
DC2 '#' Select Overlap Mode 6-101
DC2 '=' Select Image LSB/MSB 6-102
GS 'g' '0' Maintenance Counter Initialization 6-103
GS 'g' '1' Maintenance Counter Preservation 6-103
GS 'g' '2' Maintenance Counter Transmission 6-104
DC2 '{' User Area Data Registration/Clears 6-105
DC2 '*' '1' User Area Defragment 6-105
DC2 '*' '2' Remaining User Area Response 6-106
DC2 'R' User Area Initialization 6-106
ESC '@' Initialize Printer 6-106
DC2 's' 't' 'p' Power Off 6-107
DC2 'k' Function Settings 6-109
DC2 'i' Set Default/Set Test Print Header 6-110
DC2 DC2 Download Mode Selection 6-113
'@' Hardware Reset 6-113
',' Area of 2-byte Character Download 6-113
'{' Data Structure of a 2-byte Character 6-117
6-4

6.2 FUNCTION CODES

One of the following control codes is attached to the beginning of each command. These control codes are also called function codes.
HT(09H), LF(0AH), VT(0BH), FF(0CH), CR(0DH), SO(0EH), DC2(12H), DC3(13H), DC4(14H), CAN(18H), ESC(1BH), FS(1CH), GS(1DH)
Function codes may or may not have parameters or image data.
The number of bytes per command differs based on the type of command. Some commands are only 1 byte long, while some are up to several hundred bytes in length.

6.3 CHARACTER CODES

This section describes character codes.
The character code range and user-defined character codes are different depending on JIS code system or Shift JIS code system which is selected with the Kanji Code System Select command (FS 'C').

6.3.1 JIS Code System

When the JIS Code System is selected with the Kanji Code System Select command can be printed using 2-byte character codes after Kanji mode is selected with the Kanji Mode Specify command (FS '&').
The command functions as 1-byte character code or the first or second byte of 2-byte character code. If a command is input in 2-byte character codes, the next data is always processed as the first byte. However, the next data is 1-byte character code for Cancel Kanji Mode, FS '.'. If a command is input as the second byte of 2-byte character code, the first byte is ignored.
(1) 1-byte character codes
00H - 1FH: Commands are processed as commands.
20H - 7EH: The codes are processed as 1-byte character code.
7FH: Ignored (except that when 7FH is defined as downloaded character and downloaded
character operation is effective).
80H - FEH: The codes are processed as 1-byte character code.
FFH: It differs from each character set.
If the extended graphics character set or the katakana character set are selected, they are ignored. If the Codepage 1252 is selected, it is processed as the character code.
(2) 2-byte character codes
2-byte character codes specify Kanji characters, Kanji quarter size characters or user-defined character.
(FS ‘C’), Kanji characters
- First byte
00H: 1-byte character area in Kanji ROM. Specify the 1-byte character in the Kanji ROM
with the next data of 00H.
21H - 76H: 2-byte character area.
77H: User-defined character area.
78H - 7EH: 2-byte character area.
If the codes other than the above are not commands, these codes are ignored. The next data to be received is processed as the first byte.
6-5
- Second byte
(If the first byte is 00H)
20H - 7EH: The codes are processed as 1-byte character in the Kanji ROM.
80H - FEH: The codes are processed as 1-byte character in the Kanji ROM.
FFH: It differs from each character set.
If the extended graphics character set or the katakana character set are selected, they are ignored with the first byte. If the Codepage 1252 is selected, it is processed as the character code.
(If the first byte is not 00H)
21H - 7EH: The codes are processed as the second byte of Kanji characters or user-defined
character.
If the codes other than the above are not commands, these codes are ignored with the first byte. The next data to be received is processed as the first byte. The codes not defined as JIS or special characters in the 2-byte character area are processed as 2-byte character spaces.
Printed 2-byte character code conforms to JIS X 0208-1997.
(3) 2-byte character codes when mounting Korean character
2-byte character codes specify Korean or user-defined character.
- First byte
00H: 1-byte character area. Specify the 1-byte character with the next data of 00H.
77H: User-defined character area.
A1H - FDH: Korean character area.
The other codes are ignored unless they are commands. The next data to be received is processed as the first byte.
- Second byte
(If the first byte is 00H)
20H - 7EH: The codes are processed as 1-byte character.
80H - FEH: The codes are processed as 1-byte character.
FFH: It differs from each character set.
If the extended graphics character set or the katakana character set are selected, they are ignored with the first byte. If the Codepage 1252 is selected, it is processed as the character code.
(If the first byte is 77H)
21H - 7EH: The codes are processed as the second byte of user-defined character.
6-6
(If the first byte is A1H to FDH)
A1H - FEH: The codes are processed as the second byte of Korean.
The other codes are ignored unless they are commands. The next data to be received is processed as the first byte.

6.3.2 Shift JIS Code System

If the Shif
t JIS Code System is selected with the Kanji Code System Select command, Kanji characters can be printed with 2-byte character codes without entering the Kanji Mode Specify command. The command functions as 1-byte character code or the second byte of 2-byte character code. If a command is input for the second byte of 2-byte character code, the first byte is ignored.
(1) 1-byte character codes
00H - 1FH: Commands are processed as commands.
20H - 7EH: The codes are processed as 1-byte character code.
7FH: Ignored (except that when 7FH is defined as downloaded character and downloaded
character operation is effective).
80H - FEH: See (2).
FFH: It differs from each character set.
If the extended graphics character set or the katakana character set are selected, they are ignored with the first byte. If the Codepage 1252 is selected, it is processed as the character code.
(2) 2-byte character codes
2-byte character codes specify Kanji and user-defined character.
- First byte
81H - 9FH: 2-byte character area.
E0H - EBH: 2-byte character area.
ECH: User-defined character area.
EDH - EFH: 2-byte character area.
The other codes 80H - FEH are processed as 1 byte characters.
- Second byte
40H - 7EH: The codes are processed as the second byte of Shift JIS code or user-defined
character.
80H - FCH: The codes are processed as the second byte of Shift JIS code or user-defined
character.
If the codes other than the above are not commands, these codes are ignored with the first byte.
The codes not defined as Shift JIS or special characters in the 2-byte character area are processed as 2-byte character spaces.
6-7
(3) 2-byte character codes when mounting Korean character
2-byte character codes specify Korean or user-defined character.
- First byte
A0H: User-defined character area.
A1H - FDH: Korean characters area when selecting Korean.
The other codes are ignored unless they are commands. The next data to be received is processed as the first byte.
- Second byte (If the first byte is A0H)
A1H - FEH: The codes are processed as the second byte of user-defined character.
(If the first byte is A1H-FDH)
A1H - FEH: The codes are processed as the second byte of Korean.
The other codes are ignored unless they are commands. The next data to be received is processed as the first byte.
6-8

6.4 MEMORY

The printer has the FLASH memory and the RAM in which there is a user area for each. The user area is the storage for using particular functions. Allocated function differs between the FLASH memory and the RAM. The functions used in the FLASH memory and the RAM are as follows. Refer to this section to use the following functions.
Table 6-2 Functions Which Use the FLASH Memory and the RAM
Function FLASH memory RAM
User-defined character
Downloaded character
Optional font
Routine function
Stamp
Template data -
Two-dimensional barcode -
Commands which relate to these functions are as follows.
Table 6-3 Commands Which Use the FLASH Memory
Command Command Name
DC2 'z' 4 n Page Mode Data Registration
DC2 '{' a n m User Area Data Registration/Clears
DC2 '*' '1' User Area Defragment
DC2 '*' '2' Remaining User Area Response
Table 6-4 Commands Which Use the RAM
Command Command Name
DC2 ’T’ Stamp Define
DC2 ’U’ Stamp Clear
DC2 ’P’ Define Optional Font
DC2 ’Q’ Optional Font Area Release
DC2 ’E’ 0 Set Routine Format
DC2 ’E’ 1 Set Routine Parameter Data
DC2 ’E’ 3 Delete All Routine Data
DC2 ’z’ 0 Page Mode Select
ESC ’%’ Set/Cancel Download Character Set
ESC ’&’ Define Download Characters
DC2 ’D’ Download Characters Area Operation
FS ’2’ Define User-defined Character
DC2 ’G’ User-defined Character Area Operation
6-9
In order to register the user-defined character, downloaded character, optional font, and stamp, it is required to register them to the RAM, and then to the FLASH memory using User Area Data Registration/Clears (DC2 '{') command.
Do not execute User Area Defragment (DC2 '*' '1') command while the stamp is selected.
The behavior differs between the FLASH memory and the RAM when, for example, executing a command.
Table 6-5 Difference in Behavior Between the FLASH Memory and the RAM
Status FLASH Memory RAM
When executing Reset command, "Power Off"
1*
command, or turning off the power by the
Store contents Store contents
POWER switch (with the power supply)
When executing "User Area Initialization" command or starting up the printer after the
Store contents Delete contents
power supply is disconnected
*1: Contents are stored only when the battery which is within the specified voltage range or the AC adapter is connected.
Among functions which use the memory, it is required to confirm the remaining capacity of the FLASH memory and the RAM for optional font, routine function, and stamp. The details are as follows.

6.4.1 RAM

User area of RAM
(1)
The RAM has 232280 bytes of user area. Allocate or release the user area for each function. Allocation of the area means that the user area is divided into a partition for a specified function to be used exclusively. Release of the area means that a partition of the area which is set for a specified function is removed so that it is available to other functions. The initialization of the user area of RAM is executed and the following number of bytes of the user area shown in Table 6-6 is allocated when "User Area Initialization" command is executed or the printer is
arted up after the power supply is disconnected.
st
Table 6-6 Capacity of Each Function
Function Capacity (Bytes)
Availability of
Release
User-defined character 9784 Available
Downloaded character 6248 Available
Optional font 0 Available
Routine function 0 Available
Stamp 0 Available
Capacity for user-defined character and downloaded character are allocated from the beginning. This area can be released by a command and can be increased for optional font, routine function, or stamp. When registering optional font, routine function, or stamp, always check the remaining capacity of the user area of RAM. Registering data that exceeds the remaining capacity is ignored.
6-10
For "Define Optional Font", "Set Routine Format", "Set Routine parameter Data", or "Stamp Define" command, the area is allocated automatically at command execution.
When the area is allocated, memory control information is always added to the head of the allocated area. The number of bytes for memory control information differs depending on the functions. The number of bytes for memory control information for each function is shown in Table 6-7.
able 6-7 The Number of Bytes for Memory Control Information of Each Function
T
Function Capacity (Bytes)
User-defined character 8
Downloaded character 8
Optional font 12
Routine function 10
Stamp 11
(2) Required capacity of each function
Capacity to be allocated differs depending on the function. For user-defined character and downloaded character, it is fixed to 9784 and 6248 bytes respectively. For optional font, routine function, or stamp, its size is (the number of data + Memory control Information) bytes. Moreover, for routine function and stamp, the above-mentioned area per registration data is allocated.
(3) Precautions for stamp
It is impossible to use the commands which allocate or release the user area of RAM listed in Table 6-8 when st
amp is selected by "Stamp Select" command.
Table 6-8 Commands Which Allocate or Release the User Area of RAM
Command Command Name
DC2 'T' Stamp Define
DC2 'U' Stamp Clear
DC2 'P' Define Optional Font
DC2 'Q' Optional Font Area Release
DC2 'E' 0 Set Routine Format
DC2 'E' 1 Set Routine Parameter Data
DC2 'E' 3 Delete All Routine Data
DC2 'z' 0 Page Mode Select
DC2 'D' Download Characters Area Operation
DC2 'G' User-defined Character Area Operation
DC2 'R' User Area Initialization
If the commands listed in Table 6-8 are input during selection of the stamp, the stamp selection is canceled. Also, do not input "User Area Defragment" command during selection of the stamp which uses FLASH memory.
6-11
(4) Usage of the user area of RAM at two-dimensional bar code function
At two-dimensional bar code print, empty user area of the RAM is used temporarily at bar code print. The two-dimensional bar code printing operates as described below depending on the parameter, remaining capacity of the user area of RAM, and the value of the maximum number of the data which can be specified:
When the parameter of the command is outside the range:
CPU ignores the part outside and processes the remaining data as character codes.
When the remaining capacity of the user area of RAM is short:
All of data is processed as character codes.
When the command is normal and the user area of RAM has been allocated but the data more
than maximum data size is specified:
All of the data is discarded. Since settable data size varies depending on the type of two-dimensional bar codes, refer to each explanation of two-dimensional bar code commands. Moreover, note that settable data size changes in accordance with the value of specified parameter.
When the command is normal and the user area of RAM has been allocated, but the bar code
cannot be printed within printable area:
The command is ignored.
When the command is normal, the user area of RAM has been allocated and the bar code can
be printed within printable area:
The two-dimensional bar code is printed.
The necessary remaining capacity differs according to types and sizes of bar codes. The necessary capacity is as follows:
(a) Necessary Capacity of PDF417
The total remaining capacity of area 1 to 4 shown in Table 6-9 is necessary for PDF417 print. For an example, when number of bar code dat
a byte =15, error correction level=3, number of column
number=8, and number of row=20;
Area1 = 15+1 = 16 bytes Area2 = 2048 bytes Area3 = 2
()
23 +
= 32 bytes
Area4 = (8+7) 202 = 600 bytes Total = 2696 bytes (Assume that the remaining capacity is even number of bytes.)
Table 6-9 GS 'p' 0 PDF417 Print Command Necessary Capacity
Area Capacity (Bytes)
Area1 N+1 bytes1*
Area2 2048 bytes
()
Area3 2
2L+
bytes2*
Area4 (C+7)R2 bytes3*
*1: N: Number of bar code data byte When remaining capacity of the RAM is an odd number, one more byte is necessary. When N+1 is an odd number, one more byte is necessary. *2: L: Error correction level *3: C: Number of column, R: Number of row
6-12
[
]
(b) Necessary Capacity of QR Code
The total remaining capacity of area1 to 3 shown in Table 6-10 is necessary for QR Code print. For an example, when number of bar code dat
a byte=30, model=2, and version=4;
Area1 = 302+560 = 620 bytes Area2 = 8006 bytes
7+33
Area3 = 33int
8
3+1 = 496 bytes
Total = 9122 bytes
(Assume that the remaining capacity is even number of bytes.)
Table 6-10 GS 'p' 1 QR Code Print Command Necessary Capacity
Area Capacity (Bytes)
Area1 N2+560 bytes 1*
Area 2 8006 bytes
+
7M
Area 3
M×int
[ ]
×3 bytes 2*
8
M=17+V×4
*1: N: Number of bar code data When remaining capacity of the RAM is an odd number, one more byte is necessary. When number of bar code data byte is an odd number, one more byte is necessary. *2: M: Number of modules for one side of the QR Code. V: Version The int () means that less than a decimal point will be omitted. When area 3 becomes an odd number, one more byte is necessary.
6-13
(c) Necessary Capacity of Data Matrix
The total remaining capacity of area1 to 4 shown in Table 6-11 is necessary for Data Matrix print. For an example, when number of bar code dat
a byte =20 and symbol size=22 (vertical) 22
(horizontal);
Area1 = 20 bytes Area2 = 2230 bytes Area3 = (30+20+1) 2 = 102 bytes Area4-A = 1 (30+68) 2 = 196 bytes
Area4-B= 33
{
int ×
16
int20
+×
1520
+
[ ][ ]
16
1522
+
}
= 168 bytes
222
Total = 2548 bytes (Area4 uses a value of Area4-A.) (Assume that the remaining capacity is even number of bytes.)
Table 6-11 GS 'p' 2 Data Matrix Print Necessary Capacity
Area Capacity (Byte)
Area1 N bytes1*
Area2 2230 bytes Area3 (D+E+1)2 bytes2*
+
16
3*4*
15X
}
2Y
bytes
3*5*
Area4-A I(B+68) 2 bytes
15Xm
+
[ ][]
{
Area4-B
*1: N: Number of bar code data When remaining capacity of the RAM is an odd number, one more byte is necessary When number of bar code data byte is an odd number, one more byte is necessary *2: D: Number of data code word. E: Number of error correction code word. These values are decided from symbol sizes. See Table 6-12
*3: Area 4-A and area 4-B are used commonly. The larger number will be used
*4: The I will be calculated as follows:
I=int
When the above value is an odd number, plus 1 to the value. B will be calculated as follows:
B=int
*5: X: Horizontal size of the symbol Y: Vertical size of the symbol Xm: Horizontal size of the map matrix Ym: Vertical size of the map matrix See Table 6-12 for sizes of the map matrixes.
The int () means that less than a decimal point will be omitted.
When E is 68 or less, I=1 When E exceeds 68,
( )
( )
int ×
67E +
68
1ID +
I
16
intYm
+×
6-14
Table 6-12 Data Matrix Symbol Sizes
Symbol size Map matrix size Number of the Code Word
Vertical Horizontal Vertical Horizontal Data Error correction
10 10 8 8 3 5
12 12 10 10 5 7
14 14 12 12 8 10
16 16 14 14 12 12
18 18 16 16 18 14
20 20 18 18 22 18
22 22 20 20 30 20
24 24 22 22 36 24
26 26 24 24 44 28
32 32 28 28 62 36
36 36 32 32 86 42
40 40 36 36 114 48
44 44 40 40 144 56
48 48 44 44 174 68
52 52 48 48 204 84
64 64 56 56 280 112
72 72 64 64 368 144
80 80 72 72 456 192
88 88 80 80 576 224
96 96 88 88 696 272
104 104 96 96 816 336
120 120 108 108 1050 408
132 132 120 120 1304 496
144 144 132 132 1558 620
8 18 6 16 5 7
8 32 6 28 10 11
12 26 10 24 16 14
12 36 10 32 22 18
16 36 14 32 32 24
16 48 14 44 49 28
6-15
(d) Necessary Capacity of MaxiCode
The total remaining capacity of area1 to 2 shown in Table 6-13 is necessary for MaxiCode print. For an example, when number of bar code dat
a byte=33;
Area 1 = 33+1 = 34 bytes Area 2 = 7684 bytes Total = 7718 bytes (Assume that the remaining capacity is even number of bytes.)
Table 6-13 GS 'p' 3 MaxiCode Print Necessary Capacity
Area Capacity (Bytes)
Area 1 N bytes1*
Area 2 7684 bytes
*1:N: Number of bar code data When remaining capacity of the RAM is an odd number, one more byte is necessary. When number of bar code data byte is an odd number, one more byte is necessary.
6-16

6.4.2 FLASH Memory

y
The FLASH memory is used for functions of user-defined character, downloaded character, optional font, routine function, stamp, and template data. The user area of FLASH memory consists of the shared area and the dedicated area. The shared area has 262144 bytes, and used by routine function and stamp data. The dedicated area is used by user-defined character, downloaded character, optional font, and template data.
Data except for template data registered in the FLASH memory is used when there is no corresponding data in the user area of RAM. If corresponding data exists in the user area of RAM, the data registered in the RAM is used preferentially.
The data in the FLASH memory is copied to the user area of RAM when "User Area Initialization" command is executed or the printer is started after the power supply is disconnected, there is no areas for user-defined character or downloaded character in the user area of RAM, and user-defined character or downloaded character is registered in the FLASH memory.
(1) Use status of the shared area in the user area
Shared area has the following status:
In use state (storage state)  Release state (Erasable state)  Empty state
In use
Release Empt
All the shared area is in “Empty state” immediately after the factory shipment. When some data is registered, necessary area is allocated from the shared area. At the time, the area turns from "Empty state" to “In use state”. When the data is in use condition is released, the memory turns to “Released state (Erasable state).” This area cannot be used again in this state.
6-17
[1] Status immediately after
the factory shipment
Empty state
[2] State that some data is
registered.
Data (1) In use state
Empty state
[3] State that the data is
released.
Data (1) Released state
Empty state
[4] State that the registration and
release are repeated.
Data (1) Released state
Data (2) In use state
Data (3) In use state
Data (4) Released state
Data (5) In use state
Data (6) Released state
Empty state
[5] State that the "User Area Defragment"
command (DC2 '*' '1') is executed.
Data (2) In use state
Data (3) In use state
Data (5) In use state
Empty state
When the data is stored and released repeatedly, the shared area turns to the [4] state. To use the “Released state (Erasable state)” area again, execute the User Area Defragment (DC2 '*' '1') command. The [5] shows the shared area after the command is executed.
Execute Remaining User Area Response (DC2 '*' '2') command to check the remaining capacity.
(2) Precautions on the user area of FLASH memory when rewriting, releasing, and allocating
The maximum rewritable number of the FLASH memory is approximately 100000 times. Execute the User Area Defragment command after the remaining capacity of the FLASH memory is getting low to make the most of the maximum rewritable number.
Do not turn the power off when executing a command which accompanies writing to or deleting from the FLASH memory. If doing so may break the FLASH memory and it may not work. To confirm the FLASH memory writing/erasing, send Execute Response Request (DC2 ‘j’) command (6.5.23 Status Commands) behind the command as the above-mentioned and check response code.
6-18

6.5 COMMAND DESCRIPTION

(a)
(b)
(c) (a)
(b) (c)
Each command for the printer is described respectively.
This section explains each command.

6.5.1 Command Format

Each command is described in the following format.
6-19

6.5.2 Formatting Commands

ESC 'C' n Set page Length at n Lines
Code 1BH 43H n
n127
1
Function Set page length at n lines.
The page length is (current line spacing x n) dot lines.
If the line spacing is zero, this command is ignored. The current position becomes the beginning of the page. The bottom margin set by ESC 'N' is canceled. If n = 0, the page length is set at n inches. This setting is canceled by Page Mode Select (DC2 'z' 0) command. Moreover, this command is ignored in the page mode.
Default Cut paper mode : 38 lines (line spacing 34 dots lines)
Roll paper mode : No page length setting Mark roll paper mode : 38 lines (line spacing 34 dots lines)
ESC 'C' 0 n Set Page Length at n Inches
Code 1BH 43H 00H n
n22
1
Function Sets the page length at n inches.
The current position becomes the beginning of the page.
The page length is n x 203 dot lines. The bottom margin set by ESC 'N' is canceled. If n = 0 or n This setting is canceled by Page Mode Select (DC2 'z' 0) command. Moreover, this command is ignored in the page mode.
Default Cut paper mode : 6.4 inches (1292 dots lines)
Roll paper mode : No page length setting Mark roll paper mode : 6.4 inches (1292 dots lines)
23, this command is ignored.
ESC 'N' n Set Bottom Margin
Code 1BH 4EH n
n127
1
Function Sets the bottom margin at n lines.
The last dot (n x current line spacing) of the page is the skip amount (non-printable area).
The skip amount does not change even if the line spacing is set after setting the bottom margin. The bottom margin is canceled when the page length is modified. If the bottom margin exceeds the page length, this command is ignored. If the page length is not specified in the initial state in the roll paper mode, this command is ignored. This setting is canceled by Page Mode Select (DC2 'z' 0) command. Moreover, this command is ignored in the page mode.
Default The bottom margin is not defined.
6-20
g
ESC 'O' Cancel Bottom Margin
Code 1BH 4FH
Function Cancels bottom margin.
If the page length is not specified in the initial state in the roll paper mode, this command is
ignored.
Default The bottom margin is canceled.
Top of the page
Printable area
The defined page len
th
The defined bottom margin
Non-printable area
ESC 'Q' n Set Right Margin
Code 1BH 51H n
n255
1
Function Sets the right margin at n columns from the left edge (first column).
Column n (current character pitch x n) from the left edge becomes the right margin.
The character width includes character spacing. The character width is also doubled in double-width setting. The character width is not calculated by double when Select expanded character mode with automatic cancellation (SO) command is selecting. The line buffer data is cleared and the next print position becomes the left margin. The right margin does not move if the character pitch is changed later. When n is smaller than the left margin columns, the command is ignored. If the printable area is one character or less, one character is printed. This command is ignored in the page mode.
Default Maximum number of digits for printing. (at shipping)
Printer initial state after power-on can be changed by Set default/Set test print header (DC2 'i') command.
6-21
p
ESC 'l' n Set Left Margin
Code 1BH 6CH n
n255
0
Function Sets the left margin at n columns from the left edge (first column).
Column n (current character pitch x n) from the left edge becomes the left margin.
The character width includes character spacing. The character width is also doubled in double-width setting. The character width is not calculated by double when Select expanded character mode with automatic cancellation (SO) command is selecting. The line buffer data is cleared and the next print position becomes the left margin. The left margin does not move if the character pitch is changed later. When n is larger than the right margin columns, the command is ignored. If the printable area is one character or less, one character is printed. This command is ignored in the page mode.
Default n=0 (at shipping)
Printer initial state after power-on can be changed by Set default/Set test print header (DC2 'i') command.
When the left margin is set at fifth column and the right margin is set at 17th column, the
printable area is as follows:
Columns
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
Non-printable area
Left margin
Printable area
Maximum
rintable area
Right margin
Non-printable area
6-22
100 OPEN "COM1:9600,N,8,1" FOR OUTPUT AS #1 110 PRINT #1,"Page Length : 5 line" 120 PRINT #1,"Skip Length : 2 line" 130 PRINT #1,"Right Margin : 34 char" 140 PRINT #1,"Left Margin : 17 char" 150 PRINT #1,CHR$(&H0D); 160 PRINT #1,CHR$(&H1B);"C";CHR$(5); 'Page Length : 5 line 170 PRINT #1,CHR$(&H1B);"N";CHR$(2); 'Skip Length : 2 line 180 PRINT #1,CHR$(&H1B);"Q";CHR$(34); 'Right Margin : 34 char 190 PRINT #1,CHR$(&H1B);"l";CHR$(17); 'Left Margin : 17 char 200 FOR I=&H20 TO &HFE 210 PRINT #1,CHR$(I); 220 NEXT I 230 PRINT #1,CHR$(&H0D); 240 CLOSE #1 250 END
Figure 6-1 Program Sample 1
Figure 6-2 Print Sample 1
6-23

6.5.3 Line Spacing Commands

ESC '0' Set 1/8-inch Line Spacing
Code 1BH 30H
Function Sets the line spacing amount to 1/8 of an inch (26 dots lines).
If the line buffer contains data and the line spacing amount is smaller than the character height,
the data in the buffer is printed and line feeding is performed by the character height.
Default 34 dots lines
Printer initial state after power-on can be changed by Set default/Set test print header (DC2 'i')command.
ESC '2' Set 1/6-inch Line Spacing
Code 1BH 32H
Function Sets the line spacing to 1/6 of an inch (34 dots lines).
If the line buffer contains data and the line spacing amount is smaller than the character height,
the data in the buffer is printed and line feeding is performed by the character height.
Default 34 dots lines
Printer initial state after power-on can be changed by Set default/Set test print header (DC2 'i') command.
ESC '3' n Set n-dot-line Line Spacing
Code 1BH 33H n
n255
0
Function Sets line spacing.
The line spacing is set to n dot lines.
If the line buffer contains data and the line spacing amount is smaller than the character height, the data in the buffer is printed and line feeding is performed by the character height.
Default 34 dots lines
Printer initial state after power-on can be changed by Set default/Set test print header (DC2 'i') command.
6-24
100 OPEN "COM1:9600,N,8,1" FOR OUTPUT AS #1 110 PRINT #1,CHR$(&H1B);"0"; 120 PRINT #1,"ESC+0 ----- 1/8 inch line space" 130 PRINT #1,CHR$(&H1B);"2"; 140 PRINT #1,"ESC+2 ----- 1/6 inch line space" 150 FOR I=0 TO 96 STEP 24 160 PRINT #1,CHR$(&H1B);"3";CHR$(I); 170 PRINT #1,"ESC+3+n -----";I;"dot-line line space" 180 NEXT I 190 PRINT #1,"---------------------------------------" 200 CLOSE #1 210 END
Figure 6-3 Program Sample 2
Figure 6-4 Print Sample 2
6-25

6.5.4 Tab Setting Commands

ESC 'B' {DATA} NUL Set Vertical Tab Positions
Code 1BH 42H {p1 p2••• pk} 00H
p255
1
k16
0
Function Sets the vertical tab position.
The tab position is the (current line spacing × p lines) dot position with respect to the page
starting position. If the line spacing is zero, ESC 'B' is ignored and the subsequent data is processed as normal data. The positions, p, are input in ascending order and the command ends with 00H (NUL). The value of p is equal to or less than the value of the preceding p, the vertical tab position setting ends, and the following data is processed as normal data. Preset vertical tabs are cleared. A maximum of 16 vertical tab positions k can be set. If more tab positions are specified, they are ignored until the value becomes 00H or the preceding value. ESC 'B' NUL clears all vertical tab positions. If p exceeds the page length, the tab position is invalid. The following data is processed as normal data. Even if the line spacing is changed after setting vertical tab positions, the tab positions are not changed. If the page length is not specified in the initial state in the roll paper mode, this command is ignored.
Default No definition.
When the vertical tab is set at every fifth line and the vertical tab execution (VT command) and
'VTAB' are sent alternately, the print operation is as follows.
Line spacing
Tab position 4
Tab position 4
1 2
VT command
3 4 5
VTAB
6 7
VT command
8
9 10 11
VTAB
12
6-26
ESC 'D' {DATA} NUL Set Horizontal Tab Positions
Code 1BH 44H {p1 p2•••pk} 00H
p255
1
k32
1
Function Sets horizontal tab positions.
The tab position is the (current character with × p columns) position with respect to the left
margin. The character width includes the character spacing. The character width is also doubled in double-width mode. The character width is not calculated by double when Select expanded character mode with automatic cancellation (SO) command is selecting. The positions, p, are input in ascending order and the command ends with 00H (NUL). The value of p is equal to, or less than the value of the preceding p, the horizontal tab position setting ends. The following data is processed as normal data. Tab positions exceeding the right margin are invalid. They become valid when the right margin is changed so that they are included in the printable area. Preset horizontal tabs are cleared. Up to 32 tab positions k can be set. Data which exceeds 32 tab positions will be ignored until the value becomes 00H or the preceding value. ESC 'D' NULL clears all horizontal tab positions.
Default Every eight Katakana characters in 24-dot fonts.
When the horizontal tab is set at every seventh column, the horizontal tab execution (HT
command) and 'HTAB' are sent alternately, the printing operation is as follows.
Columns
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
H T A B HT AB
HT command
Tab position
HT command
Tab position
Tab position
HT command
6-27

6.5.5 Print and Paper Feed Commands

CR Print and Carriage Return
Code 0DH
Function Functions the same as an LF command.
If the line buffer contains data and the line spacing amount is smaller than the character height,
the data in the buffer is printed and line feeding is performed by the character height.
LF Print and Line Feed
Code 0AH
Function After data in the line buffer is printed out, the printer feeds one line.
The next print starting position becomes the beginning of the next line (left margin).
If the line buffer contains data and the line spacing is smaller than the character height, the data in the line buffer is printed and one line is fed by the character height. If the line buffer does not contain data before this code is received, the printer only feeds one line. The select expanded character mode with automatic cancellation selected by SO is canceled. The LF command that follows CR is ignored.
FF Page Feed (Form Feed)
Code 0CH
Function When page length is specified, the printer performs page feed up to specified page length after
data in the line buffer is printed out. When page length is not specified, the printer performs page feed up to mark by specified value with Set default/Set test print header (DC2 'i')command after data in the line buffer is printed out. The next print starting position becomes the beginning of the next line (left margin).
The select expanded character mode with automatic cancellation selected by SO is canceled.
In the cut paper mode:
If an out-of-paper error occurs during page feeding, the page feed ends at the time. Then, the paper is fed at low speed. When new paper is loaded, it is not fed, and the page insertion position is regarded as the beginning of the page.
In the roll paper mode:
When page length is not specified, this command is ignored. When page length is specified, if an out-of-paper error occurs during page feeding, the page feed ends at the time. When new paper is loaded, it is not fed, and the page insertion position is regarded as the beginning of the page.
In the mark roll paper mode:
The paper mark is detected by this command and paper form feed is executed. If an out-of-paper error occurs, the printer operation is same as in the roll paper mode.
6-28
ESC 'J' n Print and Feed Paper
Code 1BH 4AH n
n255
0
Function Prints the data in the print buffer and feeds the paper one dot line.
If the line buffer contains data and n is smaller than the character height, the data in the line
buffer is printed and one line is fed by the character height. If the line buffer contains data, the select expanded character mode with automatic cancellation selected by SO is canceled. If the line buffer does not contain data before this code is received, the printer only feeds n dot lines. The predetermined line spacing remains unchanged.
ABC
n
GS '<' Marked Paper Form Feed
Code 1DH 3CH
Function Performs the marked paper form feed.
This command is effective only when marked paper is selected.
In the Mark Roll Paper mode or Cut Paper mode, the printer performs its operation as same as
Page feed (FF) command.
In the Mark Roll Paper mode, the printer executes the paper form feed to the cutting position. If
data is remaining in the line buffer, the printer executes paper feed after printing data in the line buffer.
The select expanded character mode with automatic cancellation selected by SO is canceled.
6-29

6.5.6 Print Position Commands

HT Execute Horizontal Tab
Code 09H
Function Moves the print position to the next horizontal tab position.
This command is ignored if the next horizontal tab position is not set.
This command is ignored if the next horizontal tab position exceeds the right margin. The horizontal tab position is set using the ESC 'D' command.
Default The default tab positions are at intervals of 8 characters.
VT Execute Vertical Tab
Code 0BH
Function Feeds the paper to the next vertical position.
If the line buffer contains data, it is printed and the print position moves to the next tab position.
When a VT command is input after the last vertical tab position, the command functions in the same way as the FF command. If the next vertical tab position is not set, the command functions in the same way as the LF command. If the print position enters the perforated line skip area when a VT command is executed, the paper is fed to the beginning of the next page. The vertical tab position is set using the ESC 'B' command. The select expanded character mode with automatic cancellation selected by SO is canceled. If the page length is not specified in the initial state in the roll paper mode, the command functions in the same way as the LF command.
Default No definition.
ESC '$' nl nh Set Absolute Position
Code 1BH 24H nl nh
nh256+nl2399
0
Function Sets the print starting position at the specified number of dots (nhnl) in the right direction from
the left margin.
Any print start position specification exceeding the right margin is ignored.
ESC '\' nl nh Set Relative Position
Code 1BH 5CH nl nh
nh256+nl2399
-2399
Function Sets the print starting position at the specified number (nhnl) of dots from the current position to
the right or left.
Any specification exceeding the printable area is ignored.
Negative numbers are specified using the 2's complement with the number of dots. Example: Move N dots to the left. nhnl=65536-N
Default nl=0, nh=0
6-30
100 OPEN "COM1:9600,N,8,1" FOR OUTPUT AS #1 110 PRINT #1,CHR$(&H1B);"2"; 120 PRINT #1,CHR$(&H1B);"C";CHR$(25); 130 PRINT #1,CHR$(&H1B);"B";CHR$(3);CHR$(6);CHR$(9);CHR$(12);CHR$(0); 140 PRINT #1,CHR$(&H1B);"D";CHR$(10);CHR$(20);CHR$(30);CHR$(0); 150 PRINT #1,"--------------- Page top ---------------" 160 PRINT #1,"Carrige Return + CR";CHR$(&H0D); 170 PRINT #1,"Line Feed + LF";CHR$(&H0A); 180 PRINT #1,"100 dot-line feed + ESC+J";CHR$(&H1B);"J";CHR$(100); 190 PRINT #1,"Vertical Tab + VT";CHR$(&H0B); 200 PRINT #1,"Vertical Tab + VT";CHR$(&H0B); 210 PRINT #1,CHR$(&H09);"HTAB";CHR$(&H09);"HTAB";CHR$(&H09);"HTAB" 220 PRINT #1,CHR$(&H1B);"$";CHR$(&HFA);CHR$(&H0); '250 dots 230 PRINT #1,"Absolute Position"; 240 PRINT #1,CHR$(&H1B); "\";CHR$(&HF0);CHR$(&HFE); 250 PRINT #1,"=================Relative Position" 260 PRINT #1,"Form Feed + FF";CHR$(&H0C); 270 PRINT #1,"------------ Next page top -------------" 280 CLOSE #1 290 END
Figure 6-5 Program Sample 3
Figure 6-6 Print Sample 3
6-31

6.5.7 1-byte Character Set Selection Commands

ESC 'R' n Select International Character
Code 1BH 52H n
n12
0
Function n selects an international character set from the following table.
n Country
0 U.S.A.
1 France
2 Germany
3 U.K.
4 Denmark l
5 Sweden
6 Italy
7 Spain
8 Japan
9 Norway
10 Denmark II
11 Spain II
12 Latin America
The downloaded character and optional font are not affected by the international character sets.
If n is selected out of range, this command is ignored.
Default n=8 (Japan)
Printer initial state after power-on can be changed by Set default/Set test print header (DC2 'i')command.
ESC 't' n Select Character Code Table
Code 1BH 74H n
Function Selects a character code table.
Only two low-order bits are valid.
n = 0: Extended graphics character set (IBM Compatible) n = 1: Katakana character set (ANK) n = 2: Codepage 1252 character set n = 3: Ignored 00H to 1FH are treated as control codes and no characters are printed regardless of the selected code table. 7FH is ignored. For character font, see the Appendix A.1 Character Code Table.
Default Depends on the setting of bit 4 of SWDIP switch 2.
6-32
DC2 'y' n Euro Character Specify
Code 12H 79H n
n=0, 32
Function Exchanges the font of character code n of the one-byte system to Euro characters.
When n is 0, the exchange to the Euro characters is released and the font returns before
selection. Only one character code to be exchanged to Euro characters is available. When an exchange to Euro characters for other character code is performed, the last change to Euro characters for character code is released.
Default n=0 (not selected)
n254 (except 127)
6-33
100 OPEN "COM1:9600,N,8,1" FOR OUTPUT AS #1 110 PRINT #1,CHR$(&H1B);"$";CHR$(&HD8);CHR$(0);"23 24 40 5B 5C 5D 5E 60 7B 7C 7D 7E" 120 FOR I=0 TO 12 130 RESTORE 310 140 FOR J=0 TO I 150 READ CNTRY$ 160 NEXT J 170 PRINT #1,CNTRY$;CHR$(&H1B);"$";CHR$(&HA8);CHR$(0);:GOSUB 250 180 NEXT I 190 FOR I=0 TO 1 200 PRINT #1,CHR$(&H1B);"t";CHR$(I); 210 PRINT #1,"#$%&01234567ABCDEFGabcdefg
アイウエオ"
220 NEXT I 230 CLOSE #1 240 END 250 PRINT #1,CHR$(&H1B);"R";CHR$(I);" "; 260 PRINT #1,CHR$(&H23);" ";CHR$(&H24);" ";CHR$(&H40);" "; 270 PRINT #1,CHR$(&H5B);" ";CHR$(&H5C);" ";CHR$(&H5D);" "; 280 PRINT #1,CHR$(&H5E);" ";CHR$(&H60);" ";CHR$(&H7B);" "; 290 PRINT #1,CHR$(&H7C);" ";CHR$(&H7D);" ";CHR$(&H7E) 300 RETURN 310 'COUNTRY NAME 320 DATA USA,FRANCE,GERMANY,ENGLAND,ENGLAND,DENMARK 1,SWEDEN 330 DATA ITALY,SPAIN,JAPAN,DENMARK 2,SPAIN 2,LATIN AMERICA
Figure 6-7 Program Sample 4
Figure 6-8 Print Sample 4
6-34

6.5.8 1-byte Characters Definition Commands

ESC '%' n Set/Cancel Download Character Set
Code 1BH 25H n
Function Sets or cancels the downloaded character set.
Only the least significant bit of n is valid.
n = 0: Cancel the downloaded character set. n = 1: Set the downloaded character set. When the downloaded character set is set, it can be printed. When the downloaded character set is input with undefined character code, the optional font or the selected internal character set is printed. However, the 7FH character code is ignored. If the downloaded character set and optional font are defined in the same character code and both are selected, the downloaded character set is given priority.
Default n=0 (Cancel)
ESC '&' s n m {DATA} Define Download Characters
Code 1BH 26H s n m {d1 d2•••dk}
s=0
nm7FH
20H
Function Defines the downloaded character in the user area of RAM.
s indicates the character set number of the downloaded character.
n is the beginning of the definition of downloaded character and m is the end of the definition of
downloaded character. If either n or m is defined, n must be equal to m. If n or m is out of range, the data out of range is ignored and the following data will be processed as normal data. The font size of the downloaded character registered is decided by current selected font size. The downloaded character for 24- or 16-dot fonts are defined simultaneously because both are registered in separate areas.
d indicates the defining data. The bit corresponding to the dot to be printed is set to 1, and the bit
corresponding to the dot not to be printed is set to 0. Multiple character codes can be defined at the same time. If the previously defined character code is defined again, it is overwritten. The size of data per character for a selected font is as follows: 24-dot font: 48 bytes/character 16-dots font: 16 bytes/character The total number of character patterns (k) is as follows: 24-dot font: k=48 16-dot font: k=16 Enter font data by using eight vertical dots as one byte. If the downloaded character area is released, ESC '&' is ignored and the following data will be processed as normal data. For 24-dot fonts, a character is defined as 24 x 16 dots. The following restrictions apply to the actual printing. If the right space + character width is 16 dots or more, the character can be printed as 24 x 16 dots. If it is 16 dots or less, only the (character width + character right-side spacing) dots are printed. To print the whole character regardless of the character right-side spacing, the font must be defined as 12 dots (horizontal) or less.
(m-n+1) (m-n+1)
6-35
•24-dot font •16-dot font
d4
d5
d6
16 dots
d46
d47
d48
MSB
LSB
16 dots
8 dots
d3
d1 d15
d4
d2
d16
MSB
LSB
d1
24 dots
d2
d3
DC2 'D' n Download Characters Area Operation
Code 12H 44H n
Function Allocates or releases the downloaded character area in the user area of RAM.
Only the least significant bit (LSB) of n is valid.
n = 0: Releases the downloaded character area. n = 1: Allocates the downloaded character area.
When the download area is released, the downloaded character is erased and the downloaded
character set specification is released. The following commands are ignored. ESC '&' Define downloaded character ESC '%' Select/cancel downloaded character set
The downloaded character area after RAM initialization is 6248 bytes long. If the downloaded
character area is released, the remaining capacity increases by 6248 bytes.
The remaining capacity of the user area of RAM must be at least 6248 bytes to reallocate the
downloaded character area. If the remaining capacity is insufficient, the downloaded character area is not allocated and DC2 'D' 1 is ignored.
Default n=1 (Allocate the downloaded character area)
6-36

6.5.9 Character Decoration Commands

SO Select Expanded Character Mode with Automatic Cancellation
Code 0EH
Function Prints 1-byte characters and 2-byte characters following this code in double-width characters.
This mode is canceled by DC4, LF, VT, FF, ESC 'W', GS '<' or CR, or by buffer-full printing.
When the line buffer is cleared, the expanded character mode is canceled.
DC4 Cancel Expanded Character Mode with Automatic Cancellation
Code 14H
Function Cancels expanded character mode set by SO code for 1-byte characters and 2-byte characters.
The expanded character mode set by ESC 'W' 1 is not canceled.
ESC 'W' n Select/Cancel Expanded Character Mode
Code 1BH 57H n
Function Selects or cancels the expanded character mode for 1-byte characters and 2-byte characters.
Only the least significant bit (LSB) of n is valid.
n = 1: Select the expanded character mode. n = 0: Cancel the expanded character mode. ESC 'W' 0 releases the expanded character mode selected by SO.
Default n=0 (Cancel the expanded character mode)
ESC 'w' n Select/Cancel Double Height Mode
Code 1BH 77H n
Function Selects or cancels the double height mode for 1-byte characters.
Only the least significant bit (LSB) of n is valid.
n = 1: Select the double height mode. n = 0: Cancel the double height mode.
Default n=0 (Cancel the double height mode)
ESC 'E' Select Emphasized Print Mode
Code 1BH 45H
Function Selects emphasized print mode for 1-byte characters and 2-byte characters.
The emphasized print mode can also be selected or canceled with ESC '!', but the most recently
processed command is effective.
6-37
ESC 'F' Cancel Emphasized Print Mode
Code 1BH 46H
Function Cancels the emphasized print mode for 1-byte characters and 2-byte characters.
The emphasized print mode can also be selected or canceled with ESC '!', but the most recently
processed command is effective. The double print mode is also canceled.
ESC 'G' Select Double Print Mode
Code 1BH 47H
Function Selects the double print mode for 1-byte characters and 2-byte characters.
Same as in emphasized print mode.
ESC 'H' Cancel Double Print Mode
Code 1BH 48H
Function Cancels the double print mode for 1-byte characters and 2-byte characters.
The emphasized print mode is also canceled.
ESC '-' n Select/Cancel Underline Mode
Code 1BH 2DH n
Function Selects or cancels underline mode for 1-byte characters.
Only the least significant bit (LSB) of n is valid.
n = 1: Select the underline mode. n = 0: Cancel the underline mode. The underline is attached to all printing characters, including character right-side spacing. The underline, however, is not attached when skipped by Horizontal Tab (HT), Set Absolute Position (ESC '$'), or Set Relative Position (ESC '\') command. This command is not valid for 2-byte characters. The underline width can also be modified with FS '-'. When the underline width is not specified by FS '-', default width is set as 1-dot underline. If the underline is canceled by n=0, the subsequent 1-byte characters are not underlined. The underline mode can also be selected or canceled with ESC '!', but the most recently processed command is effective.
Default n=0 (Cancel underline mode)
6-38
ESC '!' n Set Print Mode
Code 1BH 21H n
Function Sets a print mode for 1-byte characters.
Each bit of n is used as follows:
Bit Function n=0 n=1
0 Undefined - -
1 Undefined - -
2 Undefined - -
3 Emphasized printing Canceled Set
4 Double printing Canceled Set
5 Double-width Canceled Set
6 Undefined - -
7 Underline Canceled Set
The underline is attached to all character widths, including character right-side spacing.
However, it is not attached when skipped by HT or other commands. The underline width can also be modified with FS '-'. When the underline width is not specified by FS '-', default width is set as 1-dot underline. This command is valid for 2-byte characters, except underlines. If emphasized printing is canceled, double printing is canceled. If double printing is canceled, emphasized printing is canceled. The underline mode can also be selected or canceled by other commands, but the most recently processed command is effective.
Default n=0 (Cancel emphasized printing mode/double printing mode/double-width printing
mode/underline mode)
6-39
DC2 'Y' n Character Rotation
Code 12H 59H n
Function Selects the direction of rotation of 1-byte and 2-byte characters.
Only two low-order bits are valid.
n = 0: Cancel character rotation. n = 1: Rotate the character 90° clockwise. n = 2: Rotate the character 90° counterclockwise. n = 3: Ignore the command. If the character is decorated, the decorated character is rotated. Character decoration applies to a line. If the character rotation is doubled vertically, it is doubled in the Y direction (character widths are doubled). If the width is doubled, the character is doubled in the X direction (characters are doubled vertically). Character rotation cannot be underlined. The following characters can be rotated:
• Extended graphics characters
• Katakana characters
• Codepage 1252
• Downloaded character
• Kanji
• Kanji quarter size characters
• User-defined character Optional font cannot be rotated. The four rightmost dots of 24 characters are not printed. When downloaded character are in 24-dot fonts, they are printed as 24 fonts must be 12 dots or less. If character rotation and vertical writing are specified in Kanji mode, vertical writing is given priority.
16 dots fonts of extended graphics characters and Katakana
12 dots. Therefore, the
Default n=0 (Cancel character rotation)
6-40

6.5.10 Character Pitch Adjustment Command

ESC SP n Set Character Spacing
Code 1BH 20H n
n127
0
Function Sets the character right-side spacing for 1-byte characters in dot units (n).
If a character code is input after this command, it is printed with (character width + set character spacing). The character left-side spacing will be 0 dot. Only the seven significant bits of n are valid. n must be 0 to 127 dots. The character right-side spacing for double-width mode is twice the value set by this command. It can be expanded to up to 254 dots. This command does not change the spacing of 2-byte characters. This also does not change the spacing of 1-byte characters in the Kanji ROM. (See FS 'S' for details on the spacing of 2-byte characters.)
Default n=4 (at shipping)
Printer initial state after power-on can be changed by Set default/Set test print header (DC2 'i') command.
6-41
100 OPEN "COM1:9600,N,8,1" FOR OUTPUT AS #1 110 PRINT #1,CHR$(&H12);"F0"; '16 dots font 120 PRINT #1,CHR$(&H1B);"&";CHR$(0);"DD"; 'D 130 RESTORE 460 : N=16 : GOSUB 430 140 PRINT #1,CHR$(&H12);"F1"; '24 dots font 150 PRINT #1,CHR$(&H1B);"&";CHR$(0);"oo"; 'o 160 RESTORE 480 : N=48 : GOSUB 430 170 PRINT #1,CHR$(&H1B);"%1"; 'Down Load Select 180 PRINT #1,CHR$(&H12);"F0";"16 dots Down Load Select" 190 PRINT #1,CHR$(&H12);"F1";"24 dots Down Load Select" 200 PRINT #1,CHR$(&HE);"DoubleWidth by SO" 210 PRINT #1,"Normal print" 220 PRINT #1,"Normal"; 230 PRINT #1,CHR$(&H1B);"-1";"+UnderLine"; 240 PRINT #1,CHR$(&H1B);"W1";"+DoubleWidth"; 250 PRINT #1,CHR$(&H1B);"w1";"+DoubleHeight"; 260 PRINT #1,CHR$(&H1B);"E";"+Emphasize"; 270 PRINT #1,CHR$(&H1B);"-0";"-UnderLine"; 280 PRINT #1,CHR$(&H1B);"W0";"-DoubleWidth"; 290 PRINT #1,CHR$(&H1B);"w0";"-DoubleHeight"; 300 PRINT #1,CHR$(&H1B);"F";"-Emphasize"; 310 PRINT #1,CHR$(&H1B);"!";CHR$(&HB8);"+CollectivelySet"; 320 PRINT #1,CHR$(&H1B);"!";CHR$(&H00);"-CollectivelyClear" 330 PRINT #1,CHR$(&H12);"Y2";"Rotation Left" 340 PRINT #1,CHR$(&H12);"Y1";"Rotation Right" 350 PRINT #1,CHR$(&H12);"Y0";"Rotation Off";CHR$(&H0D);CHR$(&H0D); 360 PRINT #1,"Character space" 370 FOR I=0 TO 25 380 PRINT #1,CHR$(&H1B);" ";CHR$(I); 390 PRINT #1,CHR$(&H41+I); 400 NEXT I : PRINT #1,CHR$(&H0D); 410 CLOSE #1 420 END 430 FOR I=0 TO N-1 440 READ D$ : PRINT #1,CHR$(VAL("&h"+D$)); 450 NEXT I : RETURN 460 '16x8 Font 470 DATA 80,80,C0,C0,E0,E0,F0,F0,F8,F8,FC,FC,FE,FE,FF,FF 480 '24x12 Font 490 DATA 80,80,80,C0,C0,C0,E0,E0,E0,F0,F0,F0,F8,F8,F8,FC 500 DATA FC,FC,FE,FE,FE,FF,FF,FF,00,00,00,00,00,00,00,00 510 DATA 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
Figure 6-9 Program Sample 5
6-42
Figure 6-10 Print Sample 5
6-43

6.5.11 Kanji Character Set Selection Commands

FS '&' Select Kanji Mode
Code 1CH 26H
Function Selects Kanji mode.
In Kanji mode, only 2-byte character codes are accepted.
1-byte character in SII Japanese font set (at shipping) can be printed by entering 00H code. This command is ignored when Shift-JIS is selected as the Kanji code system.
Default Cancel Kanji mode.
+ 1-byte
FS '.' Cancel Kanji Mode
Code 1CH 2EH
Function Cancels Kanji mode.
This command is ignored when Shift-JIS is selected as the Kanji code system.
Default Cancel Kanji mode.
FS 'C' n Select Kanji Code System
Code 1CH 43H n
Function Selects Kanji code system.
Only the least significant bit of n is valid.
n = 0: JIS code system. n = 1: Shift-JIS code system. The Kanji mode is canceled and the Shift-JIS is set to the Kanji code system when Shift-JIS is selected as the Kanji code system by this command.
Refer to 6.3 CHARACTER CODES for character code system or applicable Kanji code
correspond.
Default Depends on the setting of SWDIP2-7.
6-44
FS 'r' n Select Kanji Quarter Size Character Mode
Code 1CH 72H n
Function Selects Kanji quarter size character mode.
Only the least significant bit of n is valid.
n = 0: Superscript n = 1: Subscript Only the least significant bit of n is valid, and it can be set only in Kanji mode. When Kanji mode is ineffective, FS 'r' is ignored. If one of the following Kanji codes is input, a Kanji quarter size character is printed. 2321H to 237EH: Alphanumeric 2421H to 247EH: Hiragana 2521H to 257EH: Katakana The other Kanji codes are printed as normal 2-bytes characters, user-defined character, or 1-byte characters in Kanji ROM. Only 2330H to 2339H ('0' to '9') can be printed as 16-dot Kanji quarter size characters. The other alphanumeric, Hiragana, and Katakana have horizontal 8-dot spacing. The Kanji quarter size character mode can be canceled with the Cancel Kanji Mode (FS '.') command. For character font, see the Appendix A.4 Kanji quarter size character set.
This command is valid for SII Japanese font set (at shipping) mounted.
Default Cancel Kanji Quarter Size Character Mode.
FS DC2 Cancel Kanji Quarter Size Character Mode
Code 1CH 12H
Function Cancels Kanji Quarter Size Character Mode.
Kanji Quarter Size Character Mode is canceled and the following characters are printed in Kanji
character mode.
Default Cancel Kanji Quarter Size Character Mode.
6-45

6.5.12 Kanji Character Definition Commands

FS '2' c1 c2 {DATA} Define User-defined Character
Code 1CH 32H c1 c2 {d1 d2•••dk}
Function Defines user-defined character pattern of Kanji for the character code specified by c1 and c2 in
the user are of RAM.
c1 and c2 indicate a Kanji code for the user-defined character to be defined.
c1 indicates the first byte, and c2, the second byte. c1 and c2 depend on selected kanji code system or mounted font set, refer to 6.3 CHARACTER CODES for det
If c1 or c2 is out of range, the range is ignored and the following data will be processed as
normal data.
Since 24-dot user-defined character and 16-dot user-defined character are registered in
different areas, up to 94 characters of each type can be defined at the same time.
Whether a 24-dot or 16-dot user-defined character is registered according to the font selected
when this command is input.
The number of bytes (k) of the pattern is as follows:
24-dot: k = 3 16-dot: k = 2
ails.
24 = 72 bytes 16 = 32 bytes
d indicates font data. 8 vertical dots of font data must be input as 1 byte.
Default Undefined
•24-dot font •16-dot font
24 dots
1
2
2
3
24 dots
4
5
6
70
71
72
MSB
1 31
16 dots
2
LSB
16 dots
3
4
MSB
32
LSB
6-46
DC2 'G' n User-defined Character Area Operation
Code 12H 47H n
Function Allocates or releases the user-defined character area in the user area of RAM.
Only the least significant bit (LSB) of n is valid.
n = 0: Releases the user-defined character area. n = 1: Allocates the user-defined character area.
When the user-defined character area is released, the user-defined character is erased and the
user-defined character definition commands are ignored.
The user-defined character area after RAM initialization is 9784 bytes. If the user-defined
character area is released, the remaining capacity of the user area of RAM increases 9784 bytes.
The remaining capacity must be at least 9784 bytes to reallocate the user-defined character
area. If the remaining capacity is insufficient, the user-defined character area is not allocated and DC2 'G' 1 is ignored.
Default n=1 (Allocate the User-defined character area.)
6-47

6.5.13 Kanji Character Decoration Commands

FS 'J' Select Vertical Writing
Code 1CH 4AH
Function Selects vertical writing.
Valid in Kanji mode only.
Character decoration applies to a line. If the vertically written character is doubled vertically, it is
doubled in the Y direction (character widths are doubled). If the width is doubled, the character is doubled in the X direction (characters are doubled vertically).
Default Horizontal writing.
FS 'K' Select Horizontal Writing
Code 1CH 4BH
Function Selects horizontal writing.
Valid in Kanji mode only.
Default Horizontal writing.
FS 'W' n Select/Cancel Quadruple-size Kanji Character
Code 1CH 57H n
Function Selects or cancels quadruple-size Kanji character.
Only the least significant bit of n is valid.
n = 1: Select quadruple-size Kanji character. n = 0: Cancel quadruple-size Kanji character.
A quadruple-size character is generated by specifying double height and double width.
When a quadruple-size Kanji character is canceled, it becomes a normal character.
Default n=0 (Canceled quadruple-size Kanji character)
6-48
FS '-' n Select/Cancel Kanji Underline Mode
Code 1CH 2DH n
Function Select or cancel underline mode.
Only the low two bits of n is valid.
n = 0: Cancel underline mode. n = 1: Select 1-dot underline mode. n = 2: Select 2-dot underline mode. n = 3: Ignore the command.
The underline is attached to all printing characters, including character right-side spacing.
However, the underline is not attached when skipped by HT or other commands.
This command is not valid for 1-byte characters, however underline setting is valid for 1-byte
characters.
If the underline is canceled by n=0, the subsequent 2-byte characters are not underlined.
The underline mode can also be selected or canceled with FS '!', but the most recently
processed command is effective.
Default n=0 (Cancel underline mode.)
6-49
FS '!' n Set Kanji Print Mode
Code 1CH 21H n
Function Sets a print mode for 2-byte characters.
Each bit of n is used as follows:
Bit Function n=0 n=1
Printing direction selection Horizontal writing Vertical writing
0
1 Undefined - -
2 Double-width Canceled Set
3 Double height Canceled Set
4 Kanji quarter size character Canceled Set
5 Kanji quarter size character position Subscript Superscript
6 Undefined - -
7 Under line Canceled Set
The underline is attached to all character widths, including right- and left-side character spacing.
However, it is not attached to the characters skipped by HT or other commands, or the characters rotated by 90°.
The underline width is specified by FS '-' regardless of the character size. When the underline
width is not specified by FS '-', default width is set as 1-dot underline.
This command does not affect 1-byte character, however the only double-width mode is valid for
1-byte characters.
If the print mode can also be selected or canceled by another command, the most recently
processed command is effective.
The Kanji quarter size character can be selected or canceled in Kanji mode only. Bit 4 is ignored
in non-Kanji mode.
Default n=0
6-50

6.5.14 Kanji Character Pitch Adjustment Command

FS 'S' nl nr Set Kanji Left- and Right-side Spacing
Code 1CH 53H nl nr
nl127
0
nr127
0
Function Sets the left-side spacing nl and the right-side spacing nr of 2-byte characters.
Only the seven least significant bits of nl and nr are valid. Up to 127 dots can be set.
The character spacing specified by this command does not apply to 1-byte characters.
The character spacing for double-width mode is twice the value set by this command.
It can be expanded to up to 254 dots.
Default nl=0, nr=8 (at shipping)
Printer initial state after power-on can be changed by Set default/Set test print header (DC2 'i') command.
6-51
100 OPEN "COM1:9600,N,8,1" FOR OUTPUT AS #1 110 GJ$=CHR$(&H77)+CHR$(&H21) 120 PRINT #1,CHR$(&H12);"F0"; '16 dots font 130 PRINT #1,CHR$(&H1C);"2";GJ$; '7721H 140 RESTORE 570 : N=32 : GOSUB 540 150 PRINT #1,CHR$(&H12);"F1"; '24 dots font 160 PRINT #1,CHR$(&H1C);"2";GJ$; '7721H 170 RESTORE 600 : N=72 : GOSUB 540 180 FOR I=&H30 TO &H33 '2330~2333 190 K$=K$+CHR$(&H23)+CHR$(I) 200 NEXT I 210 FOR I=&H41 TO &H44 '2341~2444 220 K$=K$+CHR$(&H23)+CHR$(I) 230 NEXT I 240 FOR I=&H21 TO &H23 '3021~3024 250 K$=K$+CHR$(&H30)+CHR$(I) 260 NEXT I : K$=K$+GJ$ 270 PRINT #1,CHR$(&H1C);"&"; 280 FOR J=0 TO 1 290 PRINT #1,CHR$(&H12);"F";CHR$(J); 300 FOR I=0 TO 1 310 PRINT #1,CHR$(&H1C);"W";CHR$(I); 320 PRINT #1,CHR$(&H1C);"r";CHR$(I);K$ 330 NEXT I : NEXT J 340 PRINT #1,CHR$(&H1C);"W0"; 350 PRINT #1,CHR$(&H1C);"J"; 360 FOR I=2 TO 0 STEP -1 370 PRINT #1,CHR$(&H1C);"-";CHR$(I);K$ 380 NEXT I 390 PRINT #1,CHR$(&H1C);"K"; 400 FOR I=2 TO 0 STEP -1 410 PRINT #1,CHR$(&H1C);"-";CHR$(I);K$ 420 NEXT I 430 FOR I=2 TO 0 STEP -1 440 PRINT #1,CHR$(&H12);"Y";CHR$(I);K$ 'Rotation 450 NEXT I 460 PRINT #1,CHR$(&H1C);"!";CHR$(&HBD);K$ 470 PRINT #1,CHR$(&H1C);"!";CHR$(&H0);K$ 480 FOR I=0 TO 18 490 PRINT #1,CHR$(&H1C);"S";CHR$(I);CHR$(I); 'Kanji space 500 PRINT #1,CHR$(&H30);CHR$(&H21+I); 510 NEXT I : PRINT #1,CHR$(&H0D);CHR$(&H1C);"."; 520 CLOSE #1 530 END 540 FOR I=0 TO N-1 550 READ D$ : PRINT #1,CHR$(VAL("&h"+D$)); 560 NEXT I : RETURN 570 '16x16 Font 580 DATA 80,80,C0,C0,E0,E0,F0,F0,F8,F8,FC,FC,FE,FE,FF,FF 590 DATA 80,80,C0,C0,E0,E0,F0,F0,F8,F8,FC,FC,FE,FE,FF,FF 600 '24x24 Font 610 DATA 80,80,80,C0,C0,C0,E0,E0,E0,F0,F0,F0,F8,F8,F8,FC 620 DATA FC,FC,FE,FE,FE,FF,FF,FF,80,80,80,C0,C0,C0,E0,E0 630 DATA E0,F0,F0,F0,F8,F8,F8,FC,FC,FC,FE,FE,FE,FF,FF,FF 640 DATA 80,80,80,C0,C0,C0,E0,E0,E0,F0,F0,F0,F8,F8,F8,FC 650 DATA FC,FC,FE,FE,FE,FF,FF,FF
Figure 6-11 Program Sample 6
6-52
Figure 6-12 Print Sample 6
6-53
Loading...