Rev. 1.002001/10/19Newly issued
Rev. 2.002002/05/09Added “GS p” on Page 89.
Rev. 2.012003/06/19Added parameter on ESC t (After MPV3.12000).
1. PRINT CONTROL FUNCTIONS
1.1 Command List
No.
Command
1 HTHorizontal tabS.P.
2 LFPrinting and paper feedS.P.
3 CRBack to printingS.P.
Printing in PAGE MODE and returning to
4FF
5 CANCanceling print data in PAGE MODEP
6 DLE EOT Sending status in real-timeS.P.
7 DLE ENQ Real-time request to printer S.P.
8 DLE DC4 Outputting specified pulse in real-timeS.P.
9 ESC FFPrinting data in PAGE MODEP
10 ESC RSBuzzer-onS.P.
11 ESC SPSetting the right spacing of the characterS.P.*
12 ESC !Collectively specifying the printing modeS.P.
13 ESC $Specifying the absolute positionsS.P.
14 ESC %
15 ESC &Defining the download charactersS.P.
16 ESC
17 ESC -Specifying/Canceling underlineS.P.
18 ESC 2Specifying 1/6-inch line feed rateS.P.
19 ESC 3Setting line feed rate of minimum pitchS.P.*
20 ESC =Data input controlS.P.
21 ESC ?Deleting download charactersS.P.
22 ESC @Initializing the printerS.P.
23 ESC DSetting horizontal tab positionS.P.
24 ESC ESpecifying/Canceling Emphasis PrintingS.P.
25 ESC G
26 ESC J
27 ESC LSelecting PAGE MODES
28 ESC MSelection of character fontsS.P.
29 ESC RSelecting the international character setS.P.
30 ESC SSelecting STANDARD MODEP
STANDARD MODE
Printing and paper feeding to the top of
the Label (Black mark position)
Specifying/Canceling download character set
Specifying the bit image modeS.P.
*
Specifying/Canceling Double strike printing
Printing and feeding paper in minimum pitch
Commands Nos. 71, 72, 73, and 79 are available only if the "Label" (Black mark) feature
is specified.
— 4 —
1.2 Command Details
1.2.1 Descriptions of Each Item
XXXX
[Function]The name of a command.
[Code]The string of codes comprising the command is represented
[Range]Indicates the values (setting range) of argumeuts of the
[Outline]Describes the functions of the command.
[Caution]Describes important points and cautionary notes, as required.
[Default]Initial values for the command if it has arguments.
[Reference]Describes commands related to the command when it is used.
[Sample Program]Describes examples of coding on Quick-Basic.
[Printing Result]Describes the print results obtained by executing the above
by < >H for hexadecimal numbers, < >B for binary numbers,
and < > for decimal numbers, [ ] k denotes the number of
repetition of “k” times.
command.
Note: If values outside the defined domain specified with
control codes are used, malfunctions could possibly
occur, so be sure to use the values within the defined
domain.
Examples are only for reference. They may vary depending
on language and version. For details, please refer to a manual
in your language.
programs. However, the print results shown are different in scale
from actual print results.
— 5 —
1.2.2 Command Details
HT
[Function]Horizontal tab
[Code]<09>H
[Outline]Shifts the printing position to the next horizontal tab position.
• Ignored when the next horizontal tab position has not been
set.
[Caution]• The horizontal tab position is set by ESC D.
• The initial setting of horizontal tab positions is at intervals of
8 characters for font A at 9th, 17th, 25th, 33rd, columns.
[Function]Printing in PAGE MODE and returning to STANDARD MODE
[Code]<0C>H
[Outline]Executes a batch printout of the data mapped in the entire print
area, and then returns to STANDARD MODE.
[Caution]• All mapped data is erased after printout.
• The print area set up by ESC W is initialized.
• This command does not execute a paper cut.
• After this command is executed, the beginning of the line is
taken as the start position for the next print.
• This command is only effective when the PAGE MODE is
selected.
[See Also]ESC FF, ESC L, ESC S, GS FF
FF(Standard Mode)
[Function]Printing and paper feeding to the top of the label (Black mark
position)
[Code]<0C>H
[Outline]This command prints the data in the printer buffer and searches
for the head of the next label (Black mark position)
[Caution]This command is valid only when the label printer is selected
with DS2-7. It is ignored when the thermal paper is specified.
After sending one label worth of print data, be sure to send this
command or GS FF command. After the user intentionally
moved the label paper, this command cannnot search for the
head of the label properly.
[Outline]Erases all data contained in the currently effective print area in
PAGE MODE.
[Caution]• This command is only effective when PAGE MODE is selected.
• If the previously established print area overlaps the currently
effective print area, the overlapped data in the previously
established area will be erased.
[See Also]ESC L, ESC W
— 10 —
DLE EOT n
[Function]Sending status in real-time
[Code]<10>H<04>H<n>
[Range]1
[Outline]Sends in real-time the status specified by “n”.
[Caution]• Each status represents the current status. It is 1 byte data.
n 4
n Status
1 Printer status
2Status caused by an offline condition
3Status caused by an error
4Continuous paper detector status
• The status is transferred without checking whether the host is
ready to receive or busy.
• This command is executed even if the printer is in offline state,
receive-buffer full state, or error state.
• This command is dealt with when it is received.
• If another data string of <10>H<04>H<n> (1
received, the printer acts the same way as with this command.
Therefore, the user should be reminded of this fact.
[Example 1]
Suppose a command “ESC * mnL nH [d1 ... dk]”, where d1 =
<10>H, d2 = <04>H, d3 = <01>H.
• The DLE EOT n command cannot be interleaved into the code
string of another command consisting of 2 bytes or more.
[Example 2]
If the printer sends DLE EOT 3 after the host has sent up to ESC
3 in its attempt to send ESC 3 n, the printer handles the ESC 3
as ESC 3 <10>H. Thus, the user should be cautious.
• If ASB (Automatic Status Back) is enabled by GS a, it is
necessary to discriminate between the status due to ASB and
the status due to this command.
Status caused by an offline condition (When n = 2 is specified)
BitStatusHex.Decimal
0Unused000
1Unused022
Cover closed000
2
Cover open044
Not in paper feed state triggered by
FEED switch
3
In paper feed state triggered by FEED
switch
4Unused1016
Printing is not stopped because of
“paper out” state
5
Printing is stopped because of
“paper out” state
Error not occurred000
6
Error occurred4064
7Unused000
000
044
000
088
000
2032
Bit 5: Printing is stopped if the paper end detector detects a
“paper out” state, or if the printer is out of paper when
the Paper Near-end Sensor is enabled by ESC c 4. At this
time, bit 5 = “1”.
— 12 —
(3) Status caused by an error (when n = 3 is specified)
BitStatusHex.Decimal
0Unused000
1Unused022
No label detection error occurred
(only when "Label" is selected).
2
A label detection error occurred
(only when "Label" is selected).
Auto cutter error not occurred000
3
Auto cutter error occurred088
4Unused1016
Unrecoverable error not occurred000
5
Unrecoverable error occurred2032
Auto recovery error not occurred000
6
Auto recovery error occurred4064
7Undefined000
000
044
Bit 3: If this error occurred because of a paper jam, for example,
remove the cause of the error, and then DLE ENQ n (1
n 2) can be used to recover from the error. However, it
is not possible to recover from any error due to a circuit
problem (e.g., broken wire).
Bit 6: If a head overheat error is detected, the printing is stopped
until the head temperature falls. At this time, bit 6 = “1”.
(4) Continuous paper detector status (When n = 4 is specified)
BitStatusHex.Decimal
0Unused000
1Unused0202
Paper found by Paper Near-end Sensor
2,3
Paper not found by Paper Near-end Sensor
4Unused1016
Paper found by Paper-end Sensor000
5,6
Paper not found by Paper-end Sensor6096
7Unused000
000
0C12
[See Also]DLE ENQ, GS a, GS r
— 13 —
DLE ENQ n
[Function]Real-time request to printer
[Code]<10>H<05>H<n>
[Range]1
[Outline]The printer responds in real-time to the request that the host
[Caution]• This command is only effective if an auto cutter error has
[See Also]DLE EOT
n 2
specifies with number “n”.
n Function
After recovering from an error, the printer resumes
1
printing from the beginning of the line where the error
occurred.
• This command is dealt with when it is received.
• This command is also executed even if the printer is in a
• If another data string of <10>H<05>H<n> (1
[Example 1]
If, for example, a command “ESC * m nL nH {d} k”, where d1 =
<10>H, d2=<05>H, d3=<01>H1, is given, the DLE ENQ n
command cannot be interleaved into the code string of another
command consisting of two bytes or more.
[Example 2]
• If the printer sends DLE ENQ 2 when the host has sent up to
• Even if DLE ENQ 2 is executed, the settings made by, for
The printer clears the receive buffer and the print buffer,
2
and then recovers from the error.
occurred.
receive-buffer full state.
n 2) is received,
the printer acts in the same way as with this command. The
user should, therefore, be reminded of this fact.
ESC 3 in its attempt to send ESC 3 n, the printer treats the ESC
3 as ESC 3 <10>H. Thus, the user should be careful.
example, ESC ! and ESC 3 retain the conditions when the error
occurred. A combined use of this command and ESC @ can
completely initialize the printer.
— 14 —
DLE DC4 n m t
[Function]Outputting specified pulse in real-time.
[Code]<10>H<14>H<n><m><t>
[Range] n=1, m=0,1
1
t 8
[Outline]A signal specified with “t” is output to the connector pin
specified with “m”.
mConnector pin
0Pin No. 2 of drawer Kick-Out Connector
1Pin No. 5 of drawer Kick-Out Connector
[Details]• On-time and off-time are set at t × 100 msec, respectively.
• In case an error occurred during the processing of this
command, the command is ignored.
• In case (ESC p or DLE DC4 under execution), during the
processing of this command the command is ignored.
• This command will be processed as it is received.
• In specification of serial interface, the command is executed
even in offline, reception buffer full and error conditions.
• In specification of parallel interface, this command cannot be
executed while the printer is BUSY.
• This command will be valid, even if specifying the printer is
invalid due to the selection of peripheral units (ESC =).
[Caution]• If another command with the same data string as this is
received, the printer operates the same way as with this
command. The user should, therefore, be careful.
• The command cannot be inserted in another string of
commands which consist of codes of 2 bytes or more.
[Reference]ESC p
— 15 —
ESC FF
[Function]Printing data in PAGE MODE
[Code]<1B>H<0C>H
[Outline]Executes a batch printout of the data mapped in the entire print
area in PAGE MODE.
[Caution]• This command is only effective when PAGE MODE is selected.
• Mapped data, as well as the ESC T and ESC W settings, and
the character mapping position are held even after printing.
[See Also]FF, ESC L, ESC S
ESC RS
[Function]Sound Buzzer
[Code]<1B>H<1E>H
[Outline]Sound the buzzer for 200 ms.
[Caution]This command is buffered before execution.
• An underline is attached to the full character width, which,
however, is not attached to the part having been skipped by
the horizontal tab. Neither is it attached to 90
-right-turned
characters.
• The underline width is as specified by the <ESC –> command.
(The default setting is 1 dot width.)
• In case characters with different vertical magnification ratios
coexist on the same line, they are printed on the same base
line.
Font B + Emphasis + Quadruple + Underline
Font A + Underline
Font A + Double Width
Font A + Double Height
— 20 —
ESC $ n1 n2
[Function]Specifying the absolute positions
[Code]<1B>H<24>H<n1><n2>
[Range]0
[Outline]The printing start position is specified with the number of dots
[Caution]The basic calculation pitch is set by GS P. After the line feed
[Default]The initial value is not defined.
[See Also]ESC \, GS P, GS \, GS $
n1 255
0
n2 255
(1/203 inch unit) from the beginning of a line.
• The number of dots is divided by 256, whose quotient is taken
as “n2” and the residual as “n1”.
• Therefore, the printing start position is equal to n1 + n2 × 256
from the beginning of a line.
width is set, if the basic calculation by GS P leaves a fraction,
the fraction is corrected with the minimum pitch of the
mechanism, and the remainder is omitted.
In STANDARD MODE, this command uses the horizontal (Paper
feed direction) basic calculation pitch (x).
In PAGE MODE, this command acts differently depending on
the start point:
(1) If the start point specified by ESC T is top right or bottom
left, the command uses the vertical (Paper feed direction)
basic calculation pitch (y).
(2) If the start point specified by ESC T is top left or bottom
right , the command uses the horizontal (Perpendicular to
the paper feed direction) basic calculation pitch (x).
Specification beyond the end of the line is ignored.
LPRINT CHR$(&H1B) + “&” ;
LPRINT CHR$(3) + “@” + “A”;
FOR J=1 TO 2
READ REP
LPRINT CHR$(REP) ;
FOR I=1 TO REP∗3
READ D
LPRINT CHR$(D)
NEXT I
NEXT J
RETURN
DATA 6
DATA &HEF, &H80, &H00
DATA &H80, &H80, &H00
DATA &H80, &H80, &H00
DATA &H80, &H80, &H00
DATA &HFF, &HFF, &HFF
DATA &HFF, &HFF, &HFF
DATA 12
DATA &HFF, &HFF, &HFF
DATA &H80, &H07, &HF9
DATA &H80, &HFF, &HF9
DATA &H87, &HFE, &H01
DATA &H9F, &H06, &H01
DATA &HF8, &H06, &H01
DATA &HF8, &H06, &H01
DATA &H9F, &H06, &H01
DATA &H87, &HFE, &H01
DATA &H80, &HFE, &HF9
DATA &H80, &H07, &HF9
DATA &HFF, &HFF, &HFF
[Print Results]
← Internal Character Set
← Download Character
— 23 —
ESC & s n m [a [p] s×a] m–n+1
[Function]Defining the download characters
[Code]<1B>H<26>H<s>H<n><m>[<a><p1><p2> ⋅ ⋅ <ps × a>]m-n+1
[Range]s = 3
32
n m 126
0
a 12 (Font A)
0
a 9 (Font B)
0
p1 ⋅ ⋅ ps × a 255
[Outline]Defines the font of download characters of alphanumeric
characters.
• “s” indicates the number of bytes in vertical direction.
• “n” indicates the start character code and “m” the end
character code. To define only one character, set n=m.
• Character codes definable includes 95 ASCII codes in total in
the range of <20>H to <7E>H.
• “a” indicates the number of dots to be defined in horizontal
direction.
• “p” is the data to be defined, which indicate a pattern equal to
“a” dots in horizontal direction from the left end. The rest of
the pattern on the right side is filled with space.
The number of data to be defined is s × a.
• Download characters thus defined remain valid until
redefinition, ESC @, GS
power OFF is performed.
[Caution]• Download characters and download bit images cannot be
defined simultaneously.
• Running this command clears the definition of the download
bit image.
[Default]Same as the internal character set.
[See Also]ESC %, ESC ?
, FS q execution, ESC ? deletion or
*
— 24 —
[Example]
12dot
9dot
24dot
p1 p4
p2
p3
p5
p6
p34
MSB
p35
p36
Font AFont B
LSB
24dot
p1 p4
p2
p3
p5
p6
p25
MSB
p26
p27
LSB
Create each data bit by setting “1” for a printed dot and “0” for
an unprinted dot.
[Sample Program]Refer to Sample Program and Print Results for ESC % on