Command Reference
LINE THERMAL PRINTER
MODEL PPU-231II
Rev. 1.01 Newly issued on December 19, 2002
REVISION
Rev.No. |
Date |
Comment |
Rev. 1.00 |
Jun. 10, 2002 |
Newly issued |
|
|
|
Rev. 1.01 |
Dec. 19, 2002 |
Revised P. 12, P. 78, P. 79, P. 90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.PRINT CONTROL FUNCTIONS
1.1Command List
No. |
Command |
Function |
Mode |
Code |
Page |
||
1 |
HT |
Horizontal tab |
S.P. |
<09>H |
5 |
||
2 |
LF |
Printing and paper feed |
S.P. |
<0A>H |
6 |
||
3 |
CR |
Back to printing |
S.P. |
<0D>H |
7 |
||
|
|
|
Printing in PAGE MODE and returning to |
P |
|
|
|
|
|
|
STANDARD MODE |
|
|
||
4 |
FF |
|
|
<0C>H |
8 |
||
|
|
|
|||||
|
Printing and paper feeding to the top of |
S |
|||||
|
|
|
|
|
|||
|
|
|
the Black mark position |
|
|
||
|
|
|
|
|
|
||
5 |
CAN |
Canceling print data in PAGE MODE |
P |
<18>H |
9 |
||
6 |
DLE EOT |
Sending status in real-time |
S.P. |
<10>H<04>H<n> |
10 |
||
7 |
DLE ENQ |
Real-time request to printer |
S.P. |
<10>H<05>H<n> |
13 |
||
8 |
ESC FF |
Printing data in PAGE MODE |
P |
<1B>H<0C>H |
14 |
||
9 |
|
|
|
|
|
|
|
10 |
ESC SP |
Setting the right spacing of the character |
S.P.* |
<1B>H<20>H<n> |
15 |
||
11 |
ESC ! |
Collectively specifying the printing mode |
S.P. |
<1B>H<21>H<n> |
17 |
||
12 |
ESC $ |
Specifying the absolute positions |
S.P.* |
<1B>H<24>H<n1> |
19 |
||
|
|
|
|
|
<n2> |
|
|
13 |
ESC % |
Specifying/Canceling download character set |
S.P. |
<1B>H<25>H<n> |
21 |
||
|
|
|
|
|
<1B>H<26>H<s>H |
|
|
14 |
ESC & |
Defining the download characters |
S.P. |
<n><m>[<a><p1> |
22 |
||
|
|
|
|
|
<p2> <ps a>] |
|
|
|
|
|
|
|
m-n+1 |
|
|
15 |
ESC * |
Specifying the bit image mode |
S.P. |
<1B>H<2A>H<m> |
24 |
||
<n1><n2>[<d>]k |
|||||||
16 |
ESC - |
Specifying/Canceling underline |
S.P. |
<1B>H<2D>H<n> |
26 |
||
17 |
ESC 2 |
Specifying 1/6-inch line feed rate |
S.P. |
<1B>H<32>H |
27 |
||
18 |
ESC 3 |
Setting line feed rate of minimum pitch |
S.P.* |
<1B>H<33>H<n> |
28 |
||
19 |
ESC = |
Data input control |
S.P. |
<1B>H<3D>H<n> |
29 |
||
20 |
ESC ? |
Deleting download characters |
S.P. |
<1B>H<3F>H<n> |
30 |
||
21 |
ESC @ |
Initializing the printer |
S.P. |
<1B>H<40>H |
31 |
||
22 |
ESC D |
Setting horizontal tab position |
S.P. |
<1B>H<44>H [<n>]k<00> |
32 |
||
23 |
ESC E |
Specifying/Canceling Emphasis Printing |
S.P. |
<1B>H<45>H<n> |
33 |
||
24 |
ESC G |
Specifying/Canceling Double strike printing |
S.P. |
<1B>H<47>H<n> |
34 |
||
25 |
ESC J |
Printing and feeding paper in minimum pitch |
S.P.* |
<1B>H<4A>H<n> |
35 |
||
26 |
ESC L |
Selecting PAGE MODE |
S |
<1B>H<4C>H |
36 |
||
27 |
ESC M |
Selection of character fonts |
S.P. |
<1B>H<4D>H<n> |
37 |
||
28 |
ESC R |
Selecting the international character set |
S.P. |
<1B>H<52>H<n> |
38 |
||
29 |
ESC S |
Selecting STANDARD MODE |
P |
<1B>H<53>H |
39 |
||
30 |
ESC T |
Selecting the character printing direction |
P |
<1B>H<54>H<n> |
40 |
||
in PAGE MODE |
|||||||
|
|
|
|
|
|
— 1 —
No. |
Command |
Function |
Mode |
Code |
Page |
|
31 |
ESC V |
Specifying/Canceling 90°-right-turned |
S |
<1B>H<56>H<n> |
41 |
|
characters |
||||||
|
|
|
|
|
||
|
|
|
P* |
<1B>H<57>H<xL><xH> |
|
|
32 |
ESC W |
Defining the print area in PAGE MODE |
<yL><yH><dxL><dxH> |
42 |
||
|
|
|
|
<dyL><dyH> |
|
|
33 |
ESC \ |
Specifying the relative position |
S.P.* |
<1B>H<5C>H<nL><nH> |
44 |
|
34 |
ESC a |
Aligning the characters |
S.P. |
<1B>H<61>H<n> |
45 |
|
35 |
ESC c3 |
Selecting the Paper Sensor valid for |
S.P. |
<1B>H<63>H<33>H |
46 |
|
paper end signal output |
<n> |
|||||
36 |
ESC c4 |
Selecting the Paper Near-end Sensor valid |
S.P. |
<1B>H<63>H<34>H |
47 |
|
for print stop |
<n> |
|||||
37 |
ESC c5 |
Enabling/Disabling the panel switches |
S.P. |
<1B>H<63>H<35>H |
48 |
|
|
|
|
|
<n> |
|
|
38 |
ESC d |
Printing and feeding the paper by “n” lines |
S.P. |
<1B>H<64>H<n> |
49 |
|
39 |
ESC n |
Setting a remaining amount of printout |
S.P. |
<1B>H<6E>H<n> |
50 |
|
40 |
ESC t |
Selecting the character code table |
S.P. |
<1B>H<74>H<n> |
51 |
|
41 |
ESC { |
Specifying/Canceling the inverted characters |
S |
<1B>H<7B>H<n> |
52 |
|
42 |
GS ! |
Specifying the character size |
S.P. |
<1D>H<21>H<n> |
53 |
|
43 |
GS $ |
Specifying the absolute vertical position |
P* |
<1D>H<24>H<nL> |
55 |
|
|
|
of characters in PAGE MODE |
|
<nH> |
|
|
44 |
GS * |
Defining the download bit image |
S.P. |
<1D>H<2A>H<n1> |
56 |
|
<n2>[<d>]n1× n2× 8 |
||||||
45 |
GS ( A |
Execution of test printing |
S |
<1D>H<28>H<41>H |
58 |
|
<pL><pH><n><m> |
||||||
|
|
|
|
|
||
46 |
GS / |
Printing the downloaded bit image |
S.P. |
<1D>H<2F>H<m> |
59 |
|
47 |
GS : |
Starting/Ending macro definition |
S.P. |
<1D>H<3A>H |
60 |
|
48 |
GS A |
Correcting the position of black mark |
S.P. |
<1D>H<41>H<m> |
61 |
|
|
|
top position |
|
<n> |
|
|
49 |
GS B |
Specifying/Canceling the black/white |
S.P. |
<1D>H<42>H<n> |
62 |
|
inverted printing |
||||||
|
|
|
|
|
||
50 |
GS H |
Selecting of printing position of HRI |
S.P. |
<1D>H<48>H<n> |
63 |
|
characters |
||||||
|
|
|
|
|
||
51 |
GS I |
Sending the printer ID |
S.P. |
<1D>H<49>H<n> |
65 |
|
52 |
GS L |
Setting the left margin |
S* |
<1D>H<4C>H<nL> |
66 |
|
|
|
|
|
<nH> |
|
|
53 |
GS P |
Specifying the basic calculation pitch |
S.P. |
<1D>H<50>H<x> |
68 |
|
|
|
|
|
<y> |
|
|
54 |
GS R0 |
Collecting receipts |
S.P. |
<1D>H<53>H<30> |
69 |
|
|
|
|
|
H<n>H |
|
|
55 |
GS R1 |
Setting receipt collection timer |
S.P. |
<1D>H<53>H<31> |
70 |
|
|
|
|
|
H<n> |
|
|
56 |
GS S |
Detecting a black mark |
S.P. |
<1D>H<53>H |
71 |
|
In the Mode column: S = STANDARD MODE, P = PAGE MODE |
|
|
||||
|
|
* shows the command affected by GS P. |
(1)<1D>H<56>H<m> |
|
||
57 |
GS V |
Cutting the paper |
S.P.* |
(2)<1D>H<56>H<m> |
72 |
|
|
|
|
|
<n> |
|
— 2 —
No. |
Command |
Function |
Mode |
Code |
Page |
|
58 |
GS W |
Setting the print area width |
S.P.* |
<1D>H<57>H<nL> |
73 |
|
|
|
|
|
<nH> |
|
|
59 |
GS \ |
Specifying the relative vertical position |
S.P.* |
<1D>H<5C>H<nL> |
75 |
|
|
|
of a character in PAGE MODE |
|
<nH> |
|
|
60 |
GS ^ |
Executing the macro |
S.P. |
<1D>H<5E>H<n1> |
76 |
|
<n2><n3> |
||||||
61 |
GS a |
Enabling/Disabling ASB (Automatic |
S.P. |
<1D>H<61>H<n> |
77 |
|
Status Back) |
||||||
|
|
|
|
|
||
62 |
GS f |
Selecting the font of HRI characters |
S.P. |
<1D>H<66>H<n> |
80 |
|
63 |
GS h |
Specifying the height of the bar code |
S.P. |
<1D>H<68>H<n> |
81 |
|
|
|
|
|
(1)<1D>H<6B>H<m> |
|
|
64 |
GS k |
Printing the bar code |
S.P. |
[d1...dk]NUL |
82 |
|
(2)<1D>H<6B>H<m> |
||||||
|
|
|
|
<n>[d1...dn] |
|
|
65 |
GS r |
Sending status |
S.P. |
<1D>H<72>H<n> |
90 |
|
|
|
|
|
<1D>H<76>H<30>H |
|
|
66 |
GS v0 |
Printing of raster bit image |
S |
<m><xL><xH> |
91 |
|
|
|
|
|
<yL><yH>[<d>]k |
|
|
67 |
GS w |
Specifying the horizontal size |
S.P. |
<1D>H<77>H<n> |
93 |
|
(magnification) of bar code |
||||||
|
|
|
|
|
||
|
|
|
|
|
|
Command relative to NV memory
No. |
Command |
Function |
Mode |
Code |
Page |
|
|
|
|
<1C>H<67>H<33> |
|
|
|
|
|
<m>H<a1>H<a2>H |
|
68 |
FS g3 |
Writing data into the download user NV memory |
S |
<a3>H<a4>H<nL>H |
94 |
|
|
|
|
<nH>H[<d>]nL+ |
|
|
|
|
|
(nH× 256) |
|
|
|
|
|
<1C>H<67>H<34>H |
|
69 |
FS g4 |
Reading data from the download user NV memory |
S.P. |
<m>H<a1>H<a2>H |
96 |
<a3>H<a4>H<nL>H |
|||||
|
|
|
|
<nH>H |
|
70 |
FS p |
Printing the download NV bit images |
S |
<1C>H<70>H<n><m> |
98 |
71 |
FS q |
Defining the download NV bit image |
S |
<1C>H<71>H<n>H |
100 |
In the Mode column: S = STANDARD MODE, P = PAGE MODE * shows the command affected by GS P.
Commands Nos. 48 and 56 are available only if the Black mark feature is specified.
— 3 —
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 |
|
by < >H for hexadecimal numbers, < >B for binary numbers, |
|
and < > for decimal numbers, [ ] k denotes the number of |
|
repetition of “k” times. |
[Range] |
Indicates the values (setting range) of argumeuts of the |
|
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. |
[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. |
|
Examples are only for reference. They may vary depending |
|
on language and version. For details, please refer to a manual |
|
in your language. |
[Printing Result] |
Describes the print results obtained by executing the above |
|
programs. However, the print results shown are different in scale |
|
from actual print results. |
— 4 —
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. |
|||
[See Also] |
ESC D |
|
|
|
[Sample Program] |
LPRINT “0123456789012345678901”; |
|||
|
||||
|
LPRINT CHR$(&HA); |
|
||
|
LPRINT CHR$(&H9) + “AAA”; |
|||
|
LPRINT CHR$(&H9) + “BBB”; |
|||
|
LPRINT CHR$(&HA) ; |
|
||
|
LPRINT CHR$(&H1B) + “D”; |
|
||
|
LPRINT CHR$(3) + CHR$(7) + CHR$(14) + CHR$(0); |
|||
|
LPRINT CHR$(&H9) + “AAA”; |
|||
|
LPRINT CHR$(&H9) + “BBB”; |
|||
|
LPRINT CHR$(&H9) + “CCC” + CHR$(&HA) ; |
|||
|
END |
|
|
|
[Printing Result] |
12345678901234567890 |
|
||
|
|
|||
|
AAA |
BBB |
← |
Initially set horizontal tab |
|
AAA BBB |
CCC |
← |
When set to the 4th, 8th, and 15th columns |
— 5 —
LF
[Function] |
Printing and paper feed |
||
[Code] |
<0A>H |
|
|
[Outline] |
Prints data inside the print buffer and feeds paper based on the |
||
|
line feed amount having been set. |
||
[Caution] |
The head of the line becomes the next print starting position. |
||
[See Also] |
ESC 2, ESC 3 |
|
|
[Sample Program] |
LPRINT “AAA” + CHR$(&HA) ; |
||
|
|||
|
LPRINT “BBB” + CHR$(&HA) ; |
||
|
LPRINT CHR$(&HA) ; |
||
|
LPRINT “CCC” + CHR$(&HA) ; |
||
|
END |
|
|
[Print Results] |
AAA |
← |
Print and line feed |
|
|||
|
BBB |
← |
Print and line feed |
|
|
← |
Line feed only |
|
CCC |
← |
Print and line feed |
— 6 —
CR
[Function] |
Back to printing |
||
[Code] |
<0D>H |
|
|
[Outline] |
1) When DSW1-5 is OFF: |
||
|
This command is ignored. |
||
|
2) When DSW1-5 is ON: |
||
|
With data held inside the internal print buffer, printing and |
||
|
line feed are performed. |
||
|
Without data inside the internal print buffer, however, only |
||
|
line feed is performed. |
||
[See Also] |
LF |
|
|
[Sample Program] |
LPRINT “AAA” + CHR$(&HD) ; |
||
|
|||
|
LPRINT “BBB” + CHR$(&HD) ; |
||
|
LPRINT CHR$(&HD) ; |
||
|
LPRINT “CCC” + CHR$(&HD) ; |
||
|
END |
|
|
[Print Results] |
AAA |
← |
Print and line feed |
|
|||
|
BBB |
← |
Print and line feed |
|
|
← |
Line feed only |
|
CCC |
← |
Print and line feed |
— 7 —
FF |
(Page Mode) |
[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 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. |
[See Also] |
GS FF, GS < |
[Sample Program] |
|
|
LPRINT “ABC” ; CHR$ (&HA) ; |
|
LPRINT “123” ; CHR$ (&HC) ; |
|
LPRINT “HHHHH” ; CHR$ (&HA) ; |
|
LPRINT “gggg” ; CHR$ (&HC) ; |
|
END |
[Print Result]
ABC 123
HHHHH g g g g g
— 8 —
CAN
[Function] |
Canceling print data in PAGE MODE |
[Code] |
<18>H |
[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 |
— 9 —
DLE EOT n
[Function] |
Sending status in real-time |
|
|
||
[Code] |
<10>H<04>H<n> |
|
|
||
[Range] |
1 |
n 4 |
|
|
|
[Outline] |
Sends in real-time the status specified by “n”. |
|
|
||
|
|
|
|
|
|
|
n |
|
Status |
|
|
|
1 |
|
Printer status |
|
|
|
2 |
|
Status caused by an offline condition |
|
|
|
3 |
|
Status caused by an error |
|
|
|
4 |
|
Continuous paper detector status |
|
|
[Caution] |
• Each status represents the current status. It is 1 byte data. |
||||
|
• 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 |
n |
4) is |
||
|
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.
— 10 —
(1) Printer status (When n = 1 is specified)
Bit |
Status |
Hex. |
Decimal |
|
0 |
Unused |
00 |
0 |
|
1 |
Unused |
02 |
2 |
|
2 |
Undefined |
— |
— |
|
3 |
Online status |
00 |
0 |
|
Offline status |
08 |
8 |
||
|
||||
4 |
Unused |
10 |
16 |
|
5 |
Undefined |
— |
— |
|
6 |
Undefined |
— |
— |
|
7 |
Unused |
00 |
0 |
(2) Status caused by an offline condition (When n = 2 is specified)
Bit |
Status |
Hex. |
Decimal |
|
0 |
Unused |
00 |
0 |
|
1 |
Unused |
02 |
2 |
|
2 |
Unused |
00 |
0 |
|
|
Not in paper feed state triggered by |
00 |
0 |
|
|
FEED switch |
|||
3 |
|
|
||
In paper feed state triggered by FEED |
08 |
8 |
||
|
||||
|
switch |
|||
|
|
|
||
4 |
Unused |
10 |
16 |
|
|
Printing is not stopped because of |
00 |
0 |
|
|
“paper out” state |
|||
5 |
|
|
||
Printing is stopped because of |
20 |
32 |
||
|
||||
|
“paper out” state |
|||
|
|
|
||
6 |
Error not occurred |
00 |
0 |
|
Error occurred |
40 |
64 |
||
|
||||
7 |
Unused |
00 |
0 |
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”.
— 11 —
(3) Status caused by an error (when n = 3 is specified)
Bit |
Status |
Hex. |
Decimal |
|
0 |
Unused |
00 |
0 |
|
1 |
Unused |
02 |
2 |
|
|
No Black mark detection error occurred |
00 |
0 |
|
2 |
(only when “Black mark” is selected). |
|||
|
|
|||
A Black mark detection error occurred |
04 |
4 |
||
|
||||
|
(only when “Black mark” is selected). |
|||
|
|
|
||
3 |
Auto cutter error not occurred |
00 |
0 |
|
Auto cutter error occurred |
08 |
8 |
||
|
||||
4 |
Unused |
10 |
16 |
|
5 |
Unrecoverable error not occurred |
00 |
0 |
|
Unrecoverable error occurred |
20 |
32 |
||
|
||||
6 |
Auto recovery error not occurred |
00 |
0 |
|
Auto recovery error occurred |
40 |
64 |
||
|
||||
7 |
Undefined |
00 |
0 |
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)
|
Bit |
|
Status |
Hex. |
Decimal |
|
|
||||
|
0 |
|
Unused |
00 |
0 |
|
1 |
|
Unused |
02 |
02 |
|
2 |
|
Paper found by Paper Near-end Sensor 1 |
00 |
0 |
|
|
Paper not found by Paper Near-end Sensor 1 |
04 |
4 |
|
|
|
|
|||
|
3 |
|
Paper found by Paper Near-end Sensor 2 |
00 |
0 |
|
|
Paper not found by Paper Near-end Sensor 2 |
08 |
8 |
|
|
|
|
|||
|
4 |
|
Unused |
10 |
16 |
|
5 |
|
Paper found by Paper-end Sensor |
00 |
0 |
|
|
Paper not found by Paper-end Sensor |
20 |
32 |
|
|
|
|
|||
|
6 |
|
Paper found by Presenter Sensor |
00 |
0 |
|
|
Paper not found by Presenter Sensor |
40 |
64 |
|
|
|
|
|||
|
7 |
|
Unused |
00 |
0 |
[See Also] |
DLE ENQ, GS a, GS r |
|
|
— 12 —
DLE ENQ n
[Function] |
Real-time request to printer |
|
[Code] |
<10>H<05>H<n> |
|
[Range] |
1 n |
2 |
[Outline] |
The printer responds in real-time to the request that the host |
|
|
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. |
|
2 |
The printer clears the receive buffer and the print buffer, |
|
and then recovers from the error. |
|
|
|
|
[Caution] |
• This command is only effective if an auto cutter error has |
|
|
occurred. |
• This command is dealt with when it is received.
• This command is also executed even if the printer is in a receive-buffer full state.
• If another data string of <10>H<05>H<n> (1n
2) is received, the printer acts in the same way as with this command. The user should, therefore, be reminded of this fact.
[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 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.
•Even if DLE ENQ 2 is executed, the settings made by, for 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.
[See Also] |
DLE EOT |
— 13 —
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 |
— 14 —
ESC SP n
[Function] |
Setting the right spacing of the character |
[Code] |
<1B>H<20>H<n> |
[Range] |
0 n 255 |
[Outline] |
Sets the right spacing of character to [n × basic calculation pitch] |
|
inches. |
[Caution] |
• If the horizontal magnification of character is 2 or more, the |
|
right spacing increases with the magnification. |
|
• The right spacing can be set separately for the STANDARD |
|
and PAGE MODES. |
|
• The basic calculation pitch is set by GS P. Once defined, the |
|
right spacing is not changed if the basic calculation pitch is |
|
changed by GS P. |
|
• Fractions resulting from calculation are corrected with the |
|
minimum pitch of the mechanism, and the remainder is |
|
omitted. |
|
• In STANDARD MODE, this command uses the horizontal basic |
|
calculation pitch (x). |
|
• In PAGE MODE, the basic calculation pitch used by this |
|
command depends on the start point: |
|
(1) If the start point specified by ESC T is top left or bottom |
|
right, the command uses the horizontal basic calculation |
|
pitch (x). |
|
(2) If the start point specified by ESC T is top right or bottom |
|
left, the command uses the vertical basic calculation pitch |
|
(y). |
|
• The maximum right spacing is capable of approximately 31.906 |
|
mm (255/203 inches). A setting greater than this maximum is |
|
trimmed to the maximum. |
[Default] |
n = 0 |
[See Also] |
GS P |
— 15 —
[Sample Program]
LPRINT CHR$(&H1B) + “ ” + CHR$(0) ; LPRINT “AAAAA” + CHR$(&HA) ; LPRINT CHR$(&H1B) + “ ” + CHR$(1) ; LPRINT “AAAAA” + CHR$(&HA) ; LPRINT CHR$(&H1B) + “ ” + CHR$(12) ; LPRINT “AAAAA” + CHR$(&HA) ;
END
[Print Results]
AAAAA |
← |
0-dot space |
A A A A A |
← |
1-dot space |
A A A A |
A ← |
12-dots space |
— 16 —
ESC ! n
[Function] |
Collectively specifying the printing mode |
|
|||
[Code] |
<1B>H<21>H<n> |
|
|
|
|
[Range] |
0 n |
255 |
|
|
|
[Outline] |
Printing mode is assigned. |
|
|
|
|
|
|
|
|
|
|
|
Bit |
Function |
Value |
|
|
|
0 |
|
1 |
||
|
|
|
|
||
|
0 |
Character Font |
Font A |
|
Font B |
|
1 |
Undefined |
|
|
|
|
2 |
Undefined |
|
|
|
|
3 |
Emphasis |
Canceled |
|
Specified |
|
4 |
Double height |
Canceled |
|
Specified |
|
5 |
Double width |
Canceled |
|
Specified |
|
6 |
Undefined |
|
|
|
|
7 |
Underline |
Canceled |
|
Specified |
[Caution] |
• With double height and double width being specified |
||||
|
simultaneously, quadruple characters are created. |
•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.
[Default] |
n = 0 |
[See Also] |
ESC E, ESC –, GS ! |
— 17 —
[Sample Program]
LPRINT CHR$(&H1B) + “!” + CHR$(&H00) + “H” ;
LPRINT CHR$(&H1B) + “!” + CHR$(&H01) + “H” ;
LPRINT CHR$(&H1B) + “!” + CHR$(&H08) + “H” ;
LPRINT CHR$(&H1B) + “!” + CHR$(&H10) + “H” ;
LPRINT CHR$(&H1B) + “!” + CHR$(&H20) + “H” ;
LPRINT CHR$(&H1B) + “!” + CHR$(&HB9) + “H” ; LPRINT CHR$(&HA) ;
END
[Print Results]
Font A
Font B
Font A + Emphasis
|
|
|
|
Font B + Emphasis + Quadruple + Underline
Font A + Underline
Font A + Double Width
Font A + Double Height
— 18 —
ESC $ n1 n2
[Function] |
Specifying the absolute positions |
||
[Code] |
<1B>H<24>H<n1><n2> |
||
[Range] |
0 |
n1 |
255 |
|
0 |
n2 |
255 |
[Outline] |
The printing start position is specified with the number of dots |
||
|
(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.
[Caution] |
The basic calculation pitch is set by GS P. After the line feed |
|
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. |
[Default] |
The initial value is not defined. |
[See Also] |
ESC \, GS P, GS \, GS $ |
— 19 —
[Sample Program]
LPRINT CHR$(&H1B) + “$” ; LPRINT CHR$(0) + CHR$(0) + “A” ; LPRINT CHR$(&H1B) + “$” ; LPRINT CHR$(50) + CHR$(0) + “B” ; LPRINT CHR$(&H1B) + “$” ; LPRINT CHR$(0) + CHR$(1) + “C” ; LPRINT CHR$(&HA) ;
LPRINT CHR$(&H1B) + “$” ; LPRINT CHR$(100) + CHR$(0) + “A” ; LPRINT CHR$(&H1B) + “\” ;
LPRINT CHR$(&HC2) + CHR$(&HFF) + “B” ; LPRINT CHR$(&HA);
END
[Print Results]
Absolute Position Specified
0
<
A
50 |
100 |
< |
|
B |
< |
B |
A |
< |
–62 |
256
<
C
Relative Position Specified
— 20 —
ESC % n
[Function] |
|
Specifying/Canceling download character set |
|||
[Code] |
|
<1B>H<25>H<n> |
|
||
[Range] |
|
0 n 255 |
|
|
|
[Outline] |
|
Specifying/canceling download characters. |
|||
|
|
• Only the lowest bit (n0) is valid for n. |
|||
|
|
|
|
|
|
|
|
n0 |
|
Function |
|
|
|
|
|
|
|
|
|
0 |
|
Canceling download character set |
|
|
|
1 |
|
Specifying download character set |
|
[Caution] |
|
Download characters and download bit images cannot be |
|||
|
|
defined simultaneously. |
|
||
[Default] |
|
n = 0 |
|
|
|
[See Also] |
|
ESC & |
|
|
|
[Sample Program] |
|
DATA 6 |
|||
|
GOSUB SETCHR |
|
|||
|
LPRINT CHR$(&H1B) + “%” + CHR$(0) ; |
DATA &HEF, &H80, &H00 |
|||
|
LPRINT “@A” + CHR$(&HA) ; |
DATA &H80, &H80, &H00 |
|||
|
LPRINT CHR$(&H1B) + “%” + CHR$(1) ; |
DATA &H80, &H80, &H00 |
|||
|
LPRINT “@A” +CHR$(&HA) ; |
DATA &H80, &H80, &H00 |
|||
|
END |
|
DATA &HFF, &HFF, &HFF |
||
|
SETCHR: |
|
DATA &HFF, &HFF, &HFF |
||
|
LPRINT CHR$(&H1B) + “&” ; |
DATA 12 |
|||
|
LPRINT CHR$(3) + “@” + “A”; |
DATA &HFF, &HFF, &HFF |
|||
|
FOR J=1 TO 2 |
|
DATA &H80, &H07, &HF9 |
||
|
READ REP |
|
DATA &H80, &HFF, &HF9 |
||
|
LPRINT CHR$(REP) ; |
|
DATA &H87, &HFE, &H01 |
||
|
FOR I=1 TO REP 3 |
|
DATA &H9F, &H06, &H01 |
||
|
READ D |
|
DATA &HF8, &H06, &H01 |
||
|
LPRINT CHR$(D) |
|
DATA &HF8, &H06, &H01 |
||
|
NEXT I |
|
DATA &H9F, &H06, &H01 |
||
|
NEXT J |
|
DATA &H87, &HFE, &H01 |
||
|
RETURN |
|
DATA &H80, &HFE, &HF9 |
||
|
|
|
|
|
DATA &H80, &H07, &HF9 |
|
|
|
|
|
DATA &HFF, &HFF, &HFF |
[Print Results] |
|
|
← |
Internal Character Set |
|
|
|
|
|
||
|
|
|
← |
Download Character |
|
— 21 —
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 *, FS q execution, ESC ? deletion or 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 ? |
— 22 —
[Example] |
|
12dot |
|
|
|
9dot |
|||||||||
|
|
|
|
|
|
||||||||||
|
p1 |
p4 |
|
p34 |
|
|
|
|
p1 |
p4 |
|
p25 |
|
|
|
|
|
|
|
|
|
|
MSB |
|
|
|
|
|
|
|
MSB |
24dot |
p2 |
p5 |
|
p35 |
|
|
24dot |
p2 |
p5 |
|
p26 |
|
|
||
|
|
|
|
|
|
|
|
||||||||
|
|
|
|
|
|
|
|
||||||||
|
|
|
|
|
|||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
p3 |
p6 |
|
p36 |
|
|
LSB |
|
p3 |
p6 |
|
p27 |
|
|
LSB |
|
|
|
|
|
|
|
|
||||||||
|
|
|
|
|
|||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
||||||
|
|
|
Font A |
|
|
|
Font B |
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 page 23.
— 23 —
ESC * m n1 n2 [ d ] k
[Function] |
Specifying the bit image mode |
||||
[Code] |
<1B>H<2A>H<m><n1><n2> [<d>] k |
||||
[Range] |
m= 0, 1, 32, 33 |
|
|||
|
0 |
n1 |
255 |
|
|
|
0 |
n2 |
3 |
|
|
|
0 |
d |
255 |
|
|
|
k = n1 + 256 × |
n2 |
(m = 0, 1) |
||
|
k = (n1+ 256 × |
n2) × |
3 (m = 32, 33) |
||
[Outline] |
According to the number of dots specified in “n1”, “n2”, specify |
||||
|
the bit image of mode “m”. |
•The number of dots printed is divided by 256, whose quotient is taken as n2 and residual as “n1”.
•The total number of dots printed in the horizontal direction is equal to n1 + (256 × n2).
•When bit image data have been input in excess of dot positions that can be printed on one line, the excess data are discarded.
•”d” is bit image data. Bits to be printed are specified as “1” and those not as “0”.
•The bit image modes specified by m are shown as follows:
|
m |
|
Mode |
Vertical Direction |
Horizontal Direction |
||
|
|
No. of Dots |
Dot Density |
Dot Density |
Max. No. of Dots |
||
|
|
|
|
||||
|
0 |
|
8-dots single density |
8 |
67 DPI |
101 DPI |
288 |
|
1 |
|
8-dots double density |
8 |
67 DPI |
203 DPI |
576 |
|
32 |
24-dots single density |
24 |
203 DPI |
101 DPI |
288 |
|
|
33 |
24-dots double density |
24 |
203 DPI |
203 DPI |
576 |
|
[Caution] |
• When the value of m is out of the above range, the data |
||||||
|
|
|
following after n1 is processed as normal printing data. |
•After completion of bit image printing, the printer returns to normal data processing mode.
— 24 —
[Sample Program] |
|
LPRINT CHR$(&H1B) + “*”; |
IMG1: |
LPRINT CHR$(0) + CHR$(20) + CHR$(0); |
|
GOSUB IMG1 |
LPRINT CHR$(&HFF); |
LPRINT CHR$(&HA); |
FOR I=1 TO 18 |
LPRINT CHR$(&H1B + “*”; |
LPRINT CHR$(&H85); |
LPRINT CHR$(1) + CHR$(20) + CHR$(0); |
NEXT I |
GOSUB IMG1 |
LPRINT CHR$(&HFF); |
LPRINT CHR$(&HA); |
RETURN |
LPRINT CHR$(&H1B) + “*”; |
IMG2: |
LPRINT CHR$(32) + CHR$(20) + CHR$(0); |
LPRINT CHR$(&HFF); |
GOSUB IMG2 |
LPRINT CHR$(&HFF); |
LPRINT CHR$(&HA); |
LPRINT CHR$(&HFF); |
LPRINT CHR$(&H1B) + “*”; |
FOR I=1 TO 18 |
LPRINT CHR$(33) + CHR$(20) + CHR$(0); |
LPRINT CHR$(&H80); |
GOSUB IMG2 |
LPRINT CHR$(&H00); |
LPRINT CHR$(&HA); |
LPRINT CHR$(&H05); |
END |
NEXT I |
|
LPRINT CHR$(&HFF); |
|
LPRINT CHR$(&HFF); |
|
LPRINT CHR$(&HFF); |
|
RETURN |
[Print Results]
← 8-dots single density
← 8-dots double density
← 24-dots single density
← 24-dots double density
— 25 —
ESC – n
[Function] |
Specifying/Canceling underline |
||
[Code] |
<1B>H<2D>H<n> |
||
[Range] |
0 |
n |
2 |
|
48 |
n |
50 |
[Outline] |
Specifying/canceling an underline. |
|
|
|
|
|
n |
Function |
|
0.48 |
Canceling an underline |
|
1.49 |
Specifying an underline for 1-dot width |
|
2.50 |
Specifying an underline for 2-dots width |
[Caution] |
|
|
• An underline is attached to the full character width. It is, |
||
|
however, not attached to the part having been skipped by |
|
|
horizontal tab command. |
|
|
• An underline is not attached to a 90 - right-turned characters. |
|
[Default] |
n = 0 |
|
[See Also] |
ESC !, FS - |
[Sample Program]
LPRINT CHR$(&H1B) + “-” + CHR$(0); LPRINT “AAAAA”;
LPRINT CHR$(&H1B) + “-” + CHR$(1); LPRINT “AAAAA” + CHR$(&HA); END
[Print Results]
Underline Canceled
← →
A A A A A A A A A A ← →
Underline Specified
— 26 —
ESC 2
[Function] |
Specifying 1/6-inch line feed rate |
||
[Code] |
<1B>H<32>H |
|
|
[Outline] |
The line feed rate per line is specified by 1/6 inch. |
||
[Caution] |
Line feed rate can be specified respectively for both STANDARD |
||
|
MODE and PAGE MODE. |
||
[Sample Program] |
LPRINT “AAAAA” + CHR$(&HA); |
||
|
|||
|
LPRINT CHR$(&H1B) + “3” + CHR$(0); |
||
|
LPRINT “AAAAA” + CHR$(&HA); |
||
|
LPRINT CHR$(&H1B) + “3” + CHR$(50); |
||
|
LPRINT “AAAAA” + CHR$(&HA); |
||
|
LPRINT CHR$(&H1B) + “2”; |
||
|
LPRINT “AAAAA” + CHR$(&HA); |
||
|
LPRINT “AAAAA”; |
|
|
|
LPRINT CHR$(&H1B) + “J” + CHR$(100); |
||
|
LPRINT “AAAAA” + CHR$(&HA); |
||
|
LPRINT “AAAAA” + CHR$(&HA); |
||
|
END |
|
|
[Print Results] |
A A A A A |
< |
|
|
|
||
|
|
|
|
|
|
|
1/6-inch line feed |
|
|
< |
|
|
A A A A A |
< |
0/203-inch line feed |
|
|
||
|
|
< |
|
|
|
|
|
|
A A A A A |
< |
|
|
|
50/203-inch line feed |
|
|
|
|
|
|
|
< |
|
|
A A A A A |
< |
|
|
|
1/6-inch line feed |
|
|
|
|
|
|
|
< |
|
|
A A A A A |
< |
|
|
|
|
|
|
A A A A A |
|
100 /203-inch line feed |
|
< |
|
|
|
|
|
|
|
|
< |
1/6-inch line feed |
|
|
< |
|
|
A A A A A |
|
|
|
|
|
— 27 —
ESC 3 n
[Function] |
Setting line feed rate of minimum pitch |
[Code] |
<1B>H<33>H<n> |
[Range] |
0 n 255 |
[Outline] |
Sets the line feed width per line to [n × basic calculation pitch] |
|
inches. |
[Caution] |
The line feed width can be set separately for the STANDARD |
|
and PAGE MODES. |
|
The basic calculation pitch is set by GS P. Once defined, the line |
|
feed width is not changed if the basic calculation pitch is changed |
|
by GS P. |
|
Fractions resulting from calculation are corrected with the |
|
minimum pitch of the mechanism, and the remainder is omitted. |
|
• In STANDARD MODE, this command uses the vertical (Paper |
|
feed direction) basic calculation pitch (y). |
|
• In PAGE MODE, this command acts differently depending on |
|
the start point: |
|
(1) If the start point specified by ESC T is top left or bottom |
|
right, the command uses the vertical (Paper feed direction) |
|
basic calculation pitch (y). |
|
(2) If the start point specified by ESC T is top right or bottom |
|
left, the command uses the horizontal (Perpendicular to |
|
the paper feed direction) basic calculation pitch (x). |
|
The maximum settable line feed width is 1016 mm (40 inches). |
|
A setting greater than this maximum is trimmed to the |
|
maximum. |
[Default] |
Approx 4.23 mm |
[See Also] |
ESC 2, GS P |
— 28 —
ESC = n
[Function] |
Data input control |
|
|
|
||
[Code] |
<1B>H<3D>H<n> |
|
|
|
||
[Range] |
0 n |
255 |
|
|
|
|
[Outline] |
Selecting equipment for which data input from the host is valid. |
|||||
|
• Each bit of “n” indicates as follows: |
|
|
|
||
|
|
|
|
|
|
|
|
Bit |
Equipment |
|
|
Value |
|
|
|
0 |
|
1 |
||
|
|
|
|
|
||
|
0 |
Printer |
|
Invalid |
|
Valid |
|
1 |
Not defined |
|
|
|
|
|
2 |
Not defined |
|
|
|
|
|
3 |
Not defined |
|
|
|
|
|
4 |
Not defined |
|
|
|
|
|
5 |
Not defined |
|
|
|
|
|
6 |
Not defined |
|
|
|
|
|
7 |
Not defined |
|
|
|
|
|
• When the printer has not been selected, this printer abandons |
|||||
|
all the received data until it is selected by this command. |
|||||
[Caution] |
• Even when the printer has not been selected, it can become |
|||||
|
BUSY state through printer operation. |
|
|
|||
|
• When the printer is deselected, this printer discards all the |
|||||
|
data until it is selected with this command. (Except DLE EOT, |
|||||
|
DLE ENQ, and DLE DC4) |
|
|
|
||
[Default] |
n = 1 |
|
|
|
|
|
— 29 —
ESC ? n
[Function] |
Deleting download characters |
[Code] |
<1B>H<3F>H<n> |
[Range] |
32 n 126 |
[Outline] |
Deletes the downloaded characters of specified code. |
[Caution] |
• The character “n” indicates the character code used to delete |
|
the defined pattern. After the deletion, characters are printed |
|
in the same pattern as the internal characters. |
|
• This command deletes the code-defined pattern of the |
|
character font selected by ESC !. |
|
• This command is ignored if the specified character code is |
|
undefined. |
[See Also] |
ESC &, ESC % |
— 30 —