3nStar RPT008 Operating and maintenance manual


Programmer Manual
Format Description
This manual applies to company's 80mm Series Thermal Receipt Printer POS-80XX series.
Command description of the programming manual includes the following sections:
1) an overview of the command names and functions. This is the first part of the command description. ASCII code is given
command of the form and function of the commandCan be summarized.
2) format. This section uses the ASCII coding forms, hexadecimal code form, decimal code in the form of three forms describing
the lifeOrder.
Which part of the range, compared with a decimal number without special instructions, such as in the following example 1 ≤ n
≤ 4, where 1 is a decimal number 1, rather than the ASCII code table “1."
3) range. Gives a range of variables.
4) description. Gives a detailed explanation of the command.
5) annotations. Notice is given command. Since the command in the different modes, with different commands, may cause the
phase Mutual influence, and this section gives the details.
6) reference. Associated with this command is given, similar to other commands.
DLE EOT n
HT
[Name]
[Format] ASCII HT
Hex 09
Decimal 9
[Description] Moves the print position to the next horizontal tab position.
[Details] • This command is ignored unless the next horizontal tab position has been set.
• If the next horizontal tab position exceeds the printing area, the printer sets the printing position to [Printing area
width + 1].
• Horizontal tab positions are set with ESC D.
• If this command is received when the printing position is at [printing area width + 1], the printer executes print buffer-
full printing of the current line and horizontal tab processing from the beginning of the next line.
• The default setting of the horizontal tab position for the paper roll is font A (12 × 24) every 8th character (9th, 17th,
25th, ... column).
[Reference] ESC D
Horizontal tab
LF
[Name] Print and line feed
[Format] ASCII LF
Hex 0A
Decimal 10
[Description] Prints the data in the print buffer and feeds one line based on the current line spacing.
[Note] This command sets the print position to the beginning of the line.
[Reference] ESC 2, ESC 3
[Name]
[Format] ASCII DLE EOT n
Hex 10 04 n
Decimal 16 4 n
[Range] 1 ≤ n ≤ 4
[Description] Real-time transmission specified by the parameter n printer status
.....
[Comment] · Immediately after receiving the order to return the relevant printer status
....
[Reference]
transmit real-time status

Programmer Manual
FF(*)
CR
CAN (*)
[Name] Print and return to standard mode in page mode
[Format] ASCII FF
Hex 0C
Decimal 12
[Description] Prints the data in the print buffer collectively and returns to standard mode.
[Details] • The buffer data is deleted after being printed.
• The printing area set by ESC W is reset to the default setting.
• The printer does not execute paper cutting.
• This command sets the print position to the beginning of the line.
• This command is enabled only in page mode.
[Reference] ESC FF, ESC L, ESC S
[Name] Print and carriage return
[Format] ASCII CR
Hex 0D
Decimal 13
[Description] When automatic line feed is enabled, this command functions the same as LF;
When automatic line feed is disabled, this command is ignored.
[Details] • Sets the print starting position to the beginning of the line.
• The automatic line feed is ignored with a serial interface model.
• This command is set according to the DIP switch 1-1 setting with a parallel interface model.
[Reference] LF
[Name] Cancel print data in page mode
[Format] ASCII CAN
Hex 18
Decimal 24
[Description] In page mode, deletes all the print data in the current printable area.
[Details] • This command is enabled only in page mode.
• If data that existed in the previously specified printing area also exists in the currently specified printing area, it is deleted.
[Reference] ESC L, ESC W
[Name] Real-time status transmission
[Format] ASCII DLE EOT n
Hex 10 04 n
Decimal 16 4 n
[Range] 1 ≤ n ≤ 4
[Description] Transmits the selected printer status specified by n in real-time, according to the following parameters:
n = 1: Transmit printer status
n = 2: Transmit off-line status
n = 3: Transmit error status
n = 4: Transmit paper roll sensor status
[Details] • The status is transmitted whenever the data sequence of <10>H<04>H< n> (1 ≤ n ≤ 4) is received.
Example:
In ESC ∗ m nL nH d1...dk, d1=<10>H, d2=<04>H, d3=<01>H
• This command should not be used within the data sequence of another command that consists of 2 or more bytes.
Example:
If you attempt to transmit ESC 3 n to the printer, but DTR (DSR for the host computer) goes to MARK before n is trans-
mitted andthen DLE EOT 3 interrupts before n is received, the code <10>H for DLE EOT 3 is processed as the code for
ESC 3 <10>H.
DLE EOT n (*)

•
• The printer transmits the current status. Each status is represented by onebyte data.
• The printer transmits the status without confirming whether the host computer can receive data.
• The printer executes this command upon receiving it.
• This command is executed even when the printer is off-line, the receive buffer is full, or there is an error status with a
serial interface model.
• With a parallel interface model, this command can not be executed when the printer is busy. This command is executed
even when the printer is off-line or there is an error status when DIP switch 2-1 is on with a parallel interface model.
• When Auto Status Back (ASB) is enabled using the GS a command, the status transmitted by the DLE EOT command
and the ASB status must be differentiated.
Even though the printer is not selected using ESC = (select peripheral device), this command is effective.
Bit
0
1
2
3
4
5,6
7
Off/On
0
1
0
1
0
1
1
0
Hex
00
02
00
04
00
08
10
00
Decimal
0
2
0
4
0
8
16
00
Function
Not used. Fixed to Off.
Not used. Fixed to On.
One or two cash drawer open
Both of two cash drawer closed
On-line
Off-line
Not used. Fixed to On.
Undefined.
Not used. Fixed to Off.
n = 2: Off-line Status
n = 1: Printer Status
Bit
0
1
2
3
4
5
6
7
Off/On
0
1
0
1
0
1
1
0
1
0
1
0
Hex
00
02
00
04
00
08
10
00
20
00
40
00
Decimal
0
2
0
4
0
8
16
0
32
0
64
0
Function
Not used.Fixed to Off.
Not used.Fixed to On.
Cover is closed.
Cover is open.
Paper is not being fed by using the FEED button.
Paper is beging fed by the FEED button.
Not used.Fixed to On.
No paper-end stop.
Printing is being stopped.
No error.
Error occurs.
Not used.Fixed to Off.
n = 3: Error Status
Bit
0
1
2
3
4
5
6
7
Off/On
0
1
0
1
1
0
1
0
1
0
Hex
00
02
00
08
10
00
20
00
40
00
Decimal
0
2
0
8
16
0
32
0
64
0
Function
Not used.Fixed to Off.
Not used.Fixed to On.
Undefined.
No auto-cutter error.
Auto-cutter error occurs.
Not used.Fixed to On.
No unrecoverable error.
Unrecoverable error occurs.
No auto-recoverable error.
Auto recoverable error occurs.
Not used.Fixed to Off.
Programmer Manual

Programmer Manual
n = 4: Continuous paper sensor Status
[Reference] DLE ENQ, GS a, GS r
DLE ENQ n (*)
Bit
0
1
2, 3
4
5,6
7
Off/On
0
1
0
1
1
0
1
0
Hex
00
02
00
0C
10
00
60
00
Decimal
0
2
0
12
16
0
96
0
Function
Not used.Fixed to Off.
Not used Fixed to On.
Paper roll near-end sensor:paper adequate.
Paper near-end is detected by the paper roll near-end sensor.
Not used.Fixed to On.
Paper roll sensor:Paper present.
Paper roll end detected by paper roll senso.
Not used.Fixed to Off.
[Name] Real-time request to printer
[Format] ASCII DLE ENQ n
Hex 10 05 n
Decimal 16 5 n
[Range] 1 ≤ n ≤ 2
[Description] Responds to a request from the host computer. n specifies the requests as follows:
[Details]
[Reference] DLE EOT
• This command is effective only when an auto-cutter error occurs.
• The printer starts processing data upon receiving this command.
• This command is executed even when the printer is off-line, the receive buffer is full, or there is an error status with a
serial interface model.
• With a parallel interface model, this command can not be executed when the printer is busy. This command is executed
even when the printer is off-line or there is an error status when DIP switch 2-1 is on with a parallel interface model.
• The status is also transmitted whenever the data sequence of <10>H<05>H< n> (1 ≤ n ≤ 2) is received.
Example:
In ESC * m nL nH dk, d1 = <10>H, d2 = <05>H, d3 = <01>H
• This command should not be contained within another command that consists of two or more bytes. Example: If you
attempt to transmit ESC 3 n to the printer, but DTR (DSR for the host computer) goes to MARK before n is transmitted,
and DLE ENQ 2 interrupts before n is received, the code <10>H for DLE ENQ 2 is processed as the code for ESC 3
<10>H.
• DLE ENQ 2 enables the printer to recover from an error after clearing the data in the receive buffer and the print buffer.
The printer retains the settings (by ESC !, ESC 3, etc.) that were in effect when the error occurred. The printer can be
initialized completely by using this command and ESC @. This command is enabled only for errors that have the
possib-ility of recovery, except for print head temperature error.
• When the printer is disabled with ESC = (Select peripheral device), the error recovery functions (DLE ENQ 1 and DLE
ENQ 2) are enabled, and the other functions are disabled.
n
1
2
Request
Recover from an error and restart printing from the line where the error occurred
Recover from an error aft clearing the receive and print buffers
DLE DC4 n m t (*)
[Name] Generate pulse at real-time
[Format] ASCII DLE DC4 n m t
Hex 10 14 n m t
Decimal 16 20 n m t
[Range] n = 1
m = 0, 1
1 ≤ t ≤ 8
[Description] Outputs the pulse specified by t to connector pin m as follows:

pulse ON time is [ t × 100 ms] and the OFF time is [ t × 100ms].
[Details] • When the printer is in an error status when this command is processed, this command is ignored.
• When the pulse is output to the connector pin specified while ESC p or DEL DC4 is executed while this command is pr-
ocessed, this command is ignored.
• The printer executes this command upon receiving it.
• With a serial interface model, this command is executed even when the printer is off-line, the receive buffer is full, or
there is an error status.
• With a parallel interface model, this command cannot be executed when the printer is busy. This command is executed
even when the printer is off-line or there is an error status when DIP switch 2-1 is on.
• If print data includes the same character strings as this command, the printer performs the same operation specified by
this command. The user must consider this.
• This command should not be used within the data sequence of another command that consists of 2 or more bytes.
• This command is effective even when the printer is disabled with ESC = (Select peripheral device).
[Reference] ESC p
m
0
1
Connector pin
Drawer kick-out connector pin 2.
Drawer kick-out connector pin 5.
ESC FF (*)
[Name] Print data in page mode
[Format] ASCII ESC FF
Hex 1B 0C
Decimal 27 12
[Description] In page mode, prints all buffered data in the printing area collectively.
[Details] • This command is enabled only in page mode.
• After printing, the printer does not clear the buffered data, setting values for ESC T and ESC W, and the position for
buffering character data.
[Reference] FF, ESC L, ESC S
ESC SP n
[Name] Set right-side character spacing
[Format] ASCII ESC SP n
Hex 1B 20 n
Decimal 27 32 n
[Range] 0 ≤ n ≤ 255
[Description] Sets the character spacing for the right side of the character to [ n horizontal or vertical motion units].
[Details] •The right-side character spacing for double-width mode is twice the normal value. When characters are enlarged, the
right-side character spacing is n times normal value.
• This command does not affect the setting of kanji characters.
• This command sets values independently in each mode (standard and page modes).
• The horizontal and vertical motion unit are specified by GS P. Changing the horizontal or vertical motion unit does not
affect the current right-side spacing.
• The GS P command can change the horizontal (and vertical) motion unit. However, the value cannot be less than the
minimum horizontal movement amount, and it must be in even units of the minimum horizontal movement amount.
• In standard mode, the horizontal motion unit is used.
• In page mode, the horizontal or vertical motion unit differs in page mode, depending on starting position of the printable
area as follows:
1 When the starting position is set to the upper left or lower right of the printable area using ESC T, the horizontal motion
unit ( x) is used.
2 When the starting position is set to the upper right or lower left of the printable area using ESC T, the vertical motion
unit ( y) is used.
• The maximum right-side spacing is 255/180 inches. Any setting exceeding the maximum is converted to the maximum
automatically.
[Default] n = 0
[Reference] GS P
Programmer Manual

Programmer Manual
ESC ! n
[Name] Select print mode(s)
[Format] ASCII ESC ! n
Hex 1B 21 n
Decimal 27 33 n
[Range] 0 ≤n ≤255
[Description] Selects print mode(s) using n as follows:
[Details] • When both double-height and double-width modes are selected, quadruple size characters are printed.
• The printer can underline all characters, but can not underline the space set by HT or 90° clockwise rotated characters.
• The thickness of the underline is that selected by ESC , regardless of the character size.
• When some characters in a line are double or more height, all the characters on the line are aligned at the baseline.
• ESC E can also turn on or off emphasized mode. However, the setting of the last received command is effective.
• ESC —can also turn on or off underline mode. However, the setting of the last received command is effective.
• GS ! can also select character size. However, the setting of the last received command is effective.
• Emphasized mode is effective for alphanumeric and Kanji. All print modes except emphasized mode is effective only for
alphanumeric.
[Default] n = 0
[Reference] ESC -, ESC E, GS !
Bit
0
1
2
3
4
5
6
7
Off/On
Off
On
-
-
Off
On
Off
On
Off
On
-
Off
On
Hex
00
01
-
-
00
08
00
10
00
20
-
00
80
Decimal
0
1
-
-
0
8
0
16
0
32
-
0
128
Function
Character font A (12 ×24).
Character font B (9 ×17).
Undefined.
Undefined.
Emphasized mode not selected.
Emphasized mode selected.
Double-height mode not selected.
Double-height mode selected.
Double-width mode not selected.
Double-width mode selected.
Undefined.
Underline mode not selected.
Underline mode selected.
ESC $ nL nH
[Name] Set absolute print position
[Format] ASCII ESC $ nL nH
Hex 1B 24 nL nH
Decimal 27 36 nL nH
[Range] 0 ≤ nL ≤ 255
0 ≤ nH ≤ 255
[Description] ·Sets the distance from the beginning of the line to the position at which subsequent characters are to be printed.
·The di stance from the beginning of the line to the print position is [( nL + nH ×256) ×(vertical or horizontal motion
unit)] inches.
[Details] · Settings outside the specified printable area are ignored.
·The horizontal and vertical motion unit are specified by GS P.
·The GS P command can change the horizontal (and vertical) motion unit. However, the value cannot be less than the
minimum horizontal movement amount, and it must be in even units of the minimum horizontal movement amount.
· In standard mode, the horizontal motion unit ( x) is used.
· In page mode, horizontal or vertical motion unit differs depending on the starting position of the printable area as
follows:
1 When the starting position is set to the upper left or lower right of the printable area using ESC T, the horizontal motion
unit ( x) is used.
2 When the starting position is set to the upper right or lower left of the printable area using ESC T, the vertical motion
unit ( y) is used.
[Reference] ESC \, GS $, GS \, GS P

ESC % n
[Name] Select/cancel user-defined character set
[Format] ASCII ESC % n
Hex 1B 25 n
Decimal 27 37 n
[Range] 0 ≤ nL ≤ 255
[Description] • Selects or cancels the user-defined character set.
• When the LSB of n is 0, the user-defined character set is canceled.
• When the LSB of n is 1, the user-defined character set is selected.
[Details] • When the user-defined character set is canceled, the internal character set is automatically selected.
• n is available only for the least significant bit.
[Default] n = 0
[Reference] ESC &, ESC ?
ESC & y c1 c2 [x1 d1...d(y×x1)]...[xk d1...d(y ×xk)]
[Name] Define user-defined characters
[Format] ASCII ESC & y c1 c2 [x1 d1 ... d (y×x1)] ... [xk d1 ... d (y×xk)]
Hex 1B 26 y c1 c2 [x1 d1 ... d (y×x1)] ... [xk d1 ... d (y ×xk)]
Decimal 27 38 y c1 c2 [x1 d1 ... d (y×x1)] ... [xk d1 ... d (y ×xk)]
[Range] y = 3
32 ≤ c1 ≤ c2 ≤ 127
0 ≤ x ≤ 12 standard ASCII font (12×24)
0 ≤ x ≤ 9 compressed ASCII font (9×17)
0 ≤ d1 ... d (y × xk) ≤ 255
[Description] • Defines user-defined characters.
• y specifies the number of bytes in the vertical direction.
• c1 specifies the beginning character code for the definition, and c2 specifies the final code.
• x specifies the number of dots in the horizontal direction.
[Details] • The allowable character code range is from ASCII code <20>H to <7E>H (96 characters).
• It is possible to define multiple characters for consecutive character codes. If only one character is desired, use c1 = c2.
• d is the dot data for the characters. The dot pattern is in the horizontal direction from the left side. Any remaining dots
on the right side are blank.
• The data to define a user-defined character is (y×x) bytes.
• Set a corresponding bit to 1 to print a dot or 0 to not print a dot.
• This command can define different user-defined character patterns by each fonts. To select a font, use ESC !
• A user-defined character and a downloaded bit image cannot be defined simultaneously. When this command is
executed, the downloaded bit image is cleared.
• The user-defined character definition is cleared when:
① ESC @ is executed.
② ESC ? is executed.
③ FS q is executed.
④ GS *is executed.
⑤ The printer is reset or the power is turned off.
• When the user-defined characters are defined in font B (9×17), only the most significant bit of the 3rd byte of data in
vertical direction is effective.
[Default] The internal character set
[Reference] ESC %, ESC ?
[Example]
• When font A (12×24) is selected.
Programmer Manual

Programmer Manual
12dot
d1 d4 d7
d2 d5
d3 d6
24dot
d34
d35
d36
MSB
LSB
9dot
d1 d4 d7
d2 d5
d3 d6
17dot
d34
d35
d36
MSB
LSB
• When font B (9×17) is selected.
d1=
d2= <03> H
d3= <00> H
<OF> H d4=
d5= <80> H
d6= <00> H
<30> H d4=
d5= <40> H ...
d6= <20> H ...
<40> H ...
d1=
d2= <FF> H
d3= <80> H
<1F> H d4=
d5= <08> H
d6= <00> H
<08> H d4=
d5= <04> H ...
d6= <00> H ...
<10> H ...

ESC * m nL nH d1... dk
[Name] Select bit-image mode
[Format] ASCII ESC * m nL nH d1...dk
Hex 1B 2A m nL nH d1...dk
Decimal 27 42 m nL nH d1...dk
[Range] m = 0, 1, 32, 33
0 ≤ nL ≤ 255
0 ≤ nH ≤ 3
0 ≤ d ≤ 255
[Description] Selects a bit-image mode using m for the number of dots specified by nL and nH, as follows:
[Details] • If the values of m is out of the specified range, nL and data following are processed as normal data.
• The nL and nH indicate the number of dots of the bit image in the horizontal direction. The number of dots is calculated
by nL + nH ×256.
• If the bit-image data input exceeds the number of dots to be printed on a line, the excess data is ignored.
• d indicates the bit-image data. Set a corresponding bit to 1 to print a dot or to 0 to not print a dot.
• If the width of the printing area set by GS L and GS W less than the width required by the data sent with the ESC *
command, the following will be performed on the line in question (but the printing cannot exceed the maximum
printable area):
① The width of the printing area is extended to the right to accommodate the amount of data.
② If step ① does not provide sufficient width for the data, the left margin is reduced to accommodate the data.
• After printing a bit image, the printer returns to normal data processing mode.
• This command is not affected by print modes (emphasized, double-strike, underline, character size or white/black
reverse printing), except upside-down printing mode.
• The relationship between the image data and the dots to be printed is as follows:
• When 8-dot bit image is selected:
Mode
8-dot single-density
8-dot double-density
24-dot single-density
24-dot double-density
m
0
1
32
33
Vertical Direction
Number of Dots
8
8
24
24
Dot Density
67 DPI
67 DPI
200DPI
200 DPI
Horizontal Direction
nL + nH×256
nL + nH ×256
(nL + nH×256)×3
(nL + nH×256)×3
Dot Density
100 DPI
200 DPI
100DPI
200 DPI
Number of Data (K)
d1 d2 d3
MSB
LSB
Bit-image data
Print data
d1 d2 d3
Single density Double density
Print data
1 dot
Programmer Manual

d1 d4 d7
d2 d5 d8
d3 d6 d9
MSB
LSB
Bit-image data
Print data
d1 d2 d3
Single density Double density
Print data
1 dot
Bit-image data
d4 d5 d6 d7 d8 d9
• When 24-dot bit image is selected:
ESC – n
[Name] Turn underline mode on/off
[Format] ASCII ESC - n
Hex 1B 2D n
Decimal 27 45 n
[Range] 0 ≤ n ≤ 2, 48 ≤ n ≤ 50
[Description] Turns underline mode on or off, based on the following values of n:
[Details] • The printer can underline all characters (including right-side character spacing), but cannot underline the space set by
HT.
• T h e p r i nter cannot underline 90 clockwise rotated characters and white/black inverted characters.
• W h e n underline mode id turned off by setting the value of n to 0 or 48, the following data is not underlined, and the
underline thickness set before the mode is turned off does not change. The default underline thickness is 1 dot.
• Changing the character size does not affect the current underline thickness.
• Underline mode can also be turned on or off by using ESC !. Note, however, that the last received command is effective.
•This command does not affect the setting of Kanji characters.
[Default] n = 0
[Reference] ESC !
n
0,48
1,49
2,50
Function
Turns off underline mode
Turns on underline mode (1-dot thick)
Turns on underline mode (2-dots thick)
Programmer Manual
ESC 2
[Name] Select default line spacing
[Format] ASCII ESC 2
Hex 1B 32
Decimal 27 50
[Description] Selects 1/ 6-inch line (approximately 4.23mm) spacing.
[Details] The line spacing can be set independently in standard mode and in page mode.
[Reference] ESC 3

ESC 3 n
[Name] Set line spacing
[Format] ASCII ESC 3 n
Hex 1B 33 n
Decimal 27 51 n
[Range] 0 ≤ n ≤ 255
[Description] Sets the line spacing to [ n ×vertical or horizontal motion unit] inches.
[Details] • The line spacing can be set independently in standard mode and in page mode.
• The horizontal and vertical motion unit are specified by GS P. Changing the horizontal or vertical motion unit does not
affect the current line spacing.
• The GS P command can change the horizontal (and vertical) motion unit. However, the value cannot be less than the
minimum vertical movement amount, and it must be in even units of the minimum vertical movement amount.
• In standard mode, the vertical motion unit (y) is used.
• In page mode, this command functions as follows, depending on the starting position of the printable area:
① When the starting position is set to the upper left or lower right of the printable area using ESC T, the vertical moti-
on unit (y) is used.
② When the starting position is set to the upper right or lower left of the print able area using ESC T, the horizontal
motion unit ( x) is used.
• The maximum paper feed amount is 1016 mm (40 inches). Even if a paper feed amount of more than 1016 mm (40
inches) is set, the printer feeds the paper only 1016 mm (40 inches).
[Default] Line spacing equivalent to approximately 4.23mm (1/6 inches).
[Reference] ESC 2, GS P
ESC = n (*)
[Name] Set peripheral device
[Format] ASCII ESC = n
Hex 1B 3D n
Decimal 27 61 n
[Range] 1 ≤ n ≤ 255
[Description] Selects device to which host computer sends data, using n as follows:
[Details] When the printer is disabled, it ignores all data except for error-recovery commands (DLE EOT, DLE ENQ, DLE DC4)
until it is enabled by this command.
[Default] n = 1
Bit Off/On Hex Decimal Function
0
1-7
Off
On
00
01
0
1
Printer disabled
Printer enabled
Undefined
ESC ? n
[Name] Cancel user-defined characters
[Format] ASCII ESC ? n
Hex 1B 3F n
Decimal 27 63 n
[Range] 32 ≤ n ≤ 126
[Description] Cancels user-defined characters.
[Details] • This command cancels the pattern defined for the character code specified by n. After the user-defined characters is
canceled, the corresponding pattern for the internal character is printed.
• This command deletes the pattern defined for the specified code in the font selected by ESC !.
• If a user-defined character has not been defined for the specified character code, the printer ignores this command.
[Reference] ESC &, ESC %
Programmer Manual

Programmer Manual
ESC @
[Name] Initialize printer
[Format] ASCII ESC @
Hex 1B 40
Decimal 27 64
[Description] Clears the data in the print buffer and resets the printer mode to the mode that was in effect when the power was
turned on.
[Details] • The DIP switch settings are not checked again.
• The data in the receive buffer is not cleared.
• The macro definition is not cleared.
• The NV bit image data is not cleared.
• The data of the user NV memory is not cleared.
ESC D n1...nk NUL
[Name] Set horizontal tab positions
[Format] ASCII ESC D n1...nk NUL
Hex 1B 44 n1...nk 00
Decimal 27 68 n1...nk 0
[Range] 1 ≤ n ≤ 255
0 ≤ k ≤ 32
[Description] • Sets horizontal tab positions.
• n specifies the column number for setting a horizontal tab position from the beginning of the line.
• k indicates the total number of horizontal tab positions to be set.
[Details] • The horizontal tab position is stored as a value of [character width ×n] measured from the beginning of the line. The
character width includes the right-side character spacing, and double-width characters are set with twice the width of
normal characters.
• This command cancels the previous horizontal tab settings.
• When setting n = 8, the print position is moved to column 9 by sending HT.
• Up to 32 tab positions ( k = 32) can be set. Data exceeding 32 tab positions is processed as normal data.
• Transmit [ n] k in ascending order and place a NUL code 0 at the end.
• When [ n] k is less than or equal to the preceding value [ n] k-1, tab setting is finished and the following data is
processed as normal data.
• ESC D NUL cancels all horizontal tab positions.
• The previously specified horizontal tab positions do not change, even if the character width changes.
• The character width is memorized for each standard and page mode.
[Default] The default tab positions are at intervals of 8 characters (columns 9, 17, 25,...) for font A (12 ×24).
[Reference] HT
ESC E n
[Name] Turn emphasized mode on/off
[Format] ASCII ESC E n
Hex 1B 45 n
Decimal 27 69 n
[Range] 0 n 255
[Description] ·Turns emphasized mode on or off
·When the LSB of n is 0, emphasized mode is turned off.
·When the LSB of n is 1, emphasized mode is turned on.
[Details] • Only the least significant bit of n is enabled.
• This command and ESC ! turn on and off emphasized mode in the same way.
Be careful when this command is used with ESC !.
[Default] n = 0
[Reference] ESC !

ESC G n
[Name] Turn on/off double-strike mode
[Format] ASCII ESC G n
Hex 1B 47 n
Decimal 27 71 n
[Range] 0 ≤ n ≤ 255
[Description] • Turns double-strike mode on or off.
• When the LSB of n is 0, double-strike mode is turned off.
• When the LSB of n is 1, double-strike mode is turned on.
[Details] • Only the lowest bit of n is enabled.
• Printer output is the same in double-strike mode and in emphasized mode.
[Default] n = 0
[Reference] ESC E
ESC J n
[Name] Print and feed paper
[Format] ASCII ESC J n
Hex 1B 4A n
Decimal 27 74 n
[Range] 0 ≤ n ≤ 255
[Description] Prints the data in the print buffer and feeds the paper [ n ×vertical or horizontal motion unit] inches.
[Details] • After printing is completed, this command sets the print starting position to the beginning of the line.
• The paper feed amount set by this command does not affect the values set by ESC 2 or ESC 3.
• The horizontal and vertical motion unit are specified by GS P.
• The GS P command can change the vertical (and horizontal) motion unit. However, the value cannot be less than the
minimum vertical movement amount, and it must be in even units of the minimum vertical movement amount.
• In standard mode, the printer uses the vertical motion unit ( y).
• In page mode, this command functions as follows, depending on the starting position of the printable area:
① When the starting position is set to the upper left or lower right of the printable area using ESC T, the vertical motion
unit (y) is used.
② When the starting position is set to the upper right or lower left of the print able area using ESC T, the horizontal
motion unit ( x) is used.
• The maximum line spacing is 1016mm (40 inches). When the setting value exceeds the maximum, it is converted to
the maximum automatically.
[Reference] GS P
ESC L (*)
[Name] Select page mode
[Format] ASCII ESC L
Hex 1B 4C
Decimal 27 76
[Description] Switches from standard mode to page mode.
[Details] • This command is enabled only when processed at the beginning of a line in standard mode.
• This command has no effect in page mode.
• After printing by FF is completed or by using ESC S, the printer returns to standard mode.
• This command sets the position where data is buffered to the position specified by ESC T within the printing area
defined by ESC W.
• This command switches the settings for the following commands (in which the values can be set independently in
standard mode and page mode) to those for page mode:
① Set right-side character spacing: ESC SP, FS S
② Select default line spacing: ESC 2, ESC 3
• Only valve settings is possible for the following commands in page mode; these commands are not executed.
① Turn 90°clockwise rotation mode on/off: ESC V
② Select justification: ESC a
③ Turn upside-down printing mode on/off: ESC {
Programmer Manual

④ Set left margin: GS L
⑤ Set printable area width: GS W
• The following command is ignored in page mode:
① Execute test print: GS ( A
• The following command is not available in page mode:
① Print NV bit image: FS p
② Define NV bit image: FS q
③ Write to user NV memory: FS g 1
④ Print raster bit image: GS v 0
• The printer returns to standard mode when power is turned on, the printer is reset, or ESC @ is used.
[Reference] FF, CAN, ESC FF, ESC S, ESC T, ESC W, GS $, GS \
Programmer Manual
ESC G n
[Name] Turn on/off double-strike mode
[Format] ASCII ESC G n
Hex 1B 47 n
Decimal 27 71 n
[Range] 0 ≤ n ≤ 255
[Description] • Turns double-strike mode on or off.
• When the LSB of n is 0, double-strike mode is turned off.
• When the LSB of n is 1, double-strike mode is turned on.
[Details] • Only the lowest bit of n is enabled.
• Printer output is the same in double-strike mode and in emphasized mode.
[Default] n = 0
[Reference] ESC E
ESC M n (*)
[Name] Select character font
[Format] ASCII ESC M n
Hex 1B 4D n
Decimal 27 77 n
[Range] n = 0, 1, 48, 49
[Description] Selects character fonts.
n
0,48
1,49
Function
Tcharacter font A (12×24) selected.
Character font B (9×17) selected.
ESC R n
[Name] Select an international character set
[Format] ASCII ESC R n
Hex 1B 52 n
Decimal 27 82 n
[Range] 0 ≤ n ≤ 15
[Description] Selects an international character set n from the following table:
n
0
1
2
3
4
5
6
Character
U.S.A
France
Germany
U.K
Denmark
Sweden
Italy

7
8
9
10
11
12
13
14
15
Spain
Japan
Norway
Denmark
Spain
Latin
Korea
Sloveina/Croatia
Chinese
The character sets for Slovenia/Croatia and China are supported only in the Simplified Chinese model.
[Default] Simplified Chinese model: n = 15
Models other than the Simplified Chinese model: n = 0
ESC S (*)
[Name] Select standard mode
[Format] ASCII ESC S
Hex 1B 53
Decimal 27 83
[Description] Switches from page mode to standard mode.
[Details] • This command is effective only in page mode.
• Data buffered in page mode are cleared.
• This command sets the print position to the beginning of the line.
• The printing area set by ESC W are initialized.
• This command switches the settings for the following commands (in which the values can be set independently in
standard mode and page mode) to those for standard mode:
① Set right-side character spacing: ESC SP, FS S
② Select default line spacing: ESC 2, ESC 3
• The following commands are enabled only to set in standard mode.
① Set printing area in page mode: ESC W
② Select print direction in page mode: ESC T
• The following commands are ignored in standard mode.
① Set absolute vertical print position in page mode: GS $
② Set relative vertical print position in page mode: GS \
• Standard mode is selected automatically when power is turned on, the printer is reset, or command ESC @ is used.
[Reference] FF, ESC FF, ESC L
ESC T n (*)
[Name] Select print direction in page mode
[Format] ASCII ESC T n
Hex 1B 54 n
Decimal 27 84 n
[Range] 0 ≤ n ≤ 3
48 ≤ n ≤ 51
[Description] Selects the print direction and starting position in page mode. n specifies the print direction and starting position as
follows:
n
0, 48
1, 49
2, 50
3, 51
Print Direction
Left to right
Bottom to top
Right to left
Top to bottom
Starting Position
Upper left
Lower left
Lower right
Upper right
Print area
B C
A D
Forward
Programmer Manual

[Details] • When the command is input in standard mode, the printer executes only internal flag operation. This command does
not affect printing in standard mode.
• This command sets the position where data is buffered within the printing area set by ESC W.
• Parameters for horizontal or vertical motion units ( x or y) differ as follows, depending on the starting position of the
printing area:
① If the starting position is the upper left or lower right of the printing area, data is buffered in the direction perpendic-
ular to the paper feed direction: Commands using horizontal motion units: ESC SP, ESC $, ESC \ Commands using ver-
tical motion units: ESC 3, ESC J, GS $, GS \
② If the starting position is the upper right or lower left of the printing area, data is buffered in the paper feed direction:
Commands using horizontal motion units: ESC 3, ESC J, GS $, GS \
Commands using vertical motion units: ESC SP, ESC $, ESC \
[Default] n = 0
[Reference] ESC $, ESC L, ESC W, ESC \, GS $, GS P, GS \
ESC V n (*)
[Name] Turn 90° clockwise rotation mode on/off
[Format] ASCII ESC V n
Hex 1B 56 n
Decimal 27 86 n
[Range] 0 ≤ n ≤ 1, 48 ≤ n ≤ 49
[Description] Turns 90° clockwise rotation mode on/off n is used as follows:
[Details] • This command affects printing in standard mode. However, the setting is always effective.
• When underline mode is turned on, the printer does not underline 90°clockwise-rotated.
• Double-width and double-height commands in 90° rotation mode enlarge characters in the opposite directions from
double-height and double- width commands in normal mode.
[Default] n = 0
[Reference] ESC !, ESC -
n
0,48
1,49
Function
Turns off 90° clockwise rotation mode
Turns on 90° clockwise rotation mode
ESC W xL xH yL yH dxL dxH dyL dyH (*)
[Name] Set printing area in page mode
[Format] ASC II ESC W xL xH yL yH dxL dxH dyL dyH
Hex 1B 57 xL xH yL yH dxL dxH dyL dyH
Decimal 27 87 xL xH yL yH dxL dxH dyL dyH
[Range] 0 ≤ xL, xH, yL, yH, dxL, dxH, dyL, dyH ≤ 255 (except dxL= dxH=0 or dyL= dyH=0)
[Description] • The horizontal starting position, vertical starting position, printing area width, and printing area height are defined
as x0, y0, dx (inch), dy (inch), respectively. Each setting for the printing area is calculated as follows:
x0 = [( xL + xH × 256) × (horizontal motion unit)]
y0 = [( yL + yH × 256) × (vertical motion unit)]
dx = [ dxL + dxH × 256] × (horizontal motion unit)]
dy = [ dyL + dyH × 256] × (vertical motion unit)]
The printing area is set as shown in the figure below.
[Details] • If this command is input in standard mode, the printer executes only internal flag operation. This command does not
affect printing in standard mode.
• If the horizontal or vertical starting position is set outside the printable area, the printer stops command processing and
processes the following data as normal data.
• If the printing area width or height is set to 0, the printer stops command processing and processes the following data
as normal data.
• This command sets the position where data is buffered to the position specified by ESC T within the printing area.
• If (horizontal starting position + printing area width) exceeds the printable area, the printing area width is automatically
set to (horizontal printable area - horizontal starting position).
• If (vertical starting position + printing area height) exceeds the printable area, the printing area height is automatically
Programmer Manual

set to (vertical printable area - vertical starting position).
• The horizontal and vertical motion unit are specified by GS P. Changing the horizontal or vertical motion unit does not
affect the current printing area.
• The GS P command can change the horizontal (and vertical) motion unit.
However, the value cannot be less than the minimum horizontal movement amount, and it must be in even units of
minimum hori-zontal movement amount.
• Use the horizontal motion unit ( x) for setting the horizontal starting position and printing area width, and use the
vertical motion unit ( y) for setting the vertical starting position and printing area height.
• When the horizontal starting position , vertical starting position, printing area width, and printing area height are defined
as X, Y, Dx, and Dy respectively, the printing area is set as shown in the figure below.
• This printable area for this printer is approximately 72 mm in the horizontal direction and approximately 117.3 mm
(1662/360 inches) in the vertical direction.
[Default] xL = xH = yL = yH = 0
dxL = 0, dxH = 2, dyL = 126, dyH = 6
[Reference] CAN, ESC L, ESC T, GS P
(x, y)
Dy
Dx
Print atea
Forward
(x+Dx-1, Dy-1)
ESC \ nL nH
[Name] Set relative print position
[Format] ASCII ESC \ nL nH
Hex 1B 5C nL nH
Decimal 27 92 nL nH
[Range] 0 ≤ nL ≤ 255
0 ≤ nH ≤ 255
[Description] • Sets the print starting position based on the current position by using the horizontal or vertical motion unit.
• This command sets the distance from the current position to [( nL + nH×256)×horizontal or vertical motion unit]
[Details] • Any setting that exceeds the printable area is ignored.
• When pitch N is specified to the right:
nL+ nH×256 = N
When pitch N is specified to the left (the negative direction), use the complement of 65536.
When pitch N is specified to the left:
nL+ nH×256 = 65536 - N
• The print starting position moves from the current position to [ N×horizontal or vertical motion unit]
• The horizontal and vertical motion unit are specified by GS P.
• The GS P command can change the horizontal (and vertical) motion unit. However, the value cannot be less than the
minimum horizontal movement amount, and it must be in even units of the minimum horizontal movement amount.
• In standard mode, the horizontal motion unit is used.
• In page mode, the horizontal or vertical motion unit differs as follows, depending on the starting point of the printing area:
①When the starting position is set to the upper left or lower right of the printable area using ESC T, the horizontal motion
unit ( x) is used.
②When the starting position is set to the upper right or lower left of the printable area using ESC T, the vertical motion
unit ( y) is used.
[Reference] ESC $, GS P
Programmer Manual

Programmer Manual
ESC a n
[Name] Select justification
[Format] ASCII ESC a n
Hex 1B 61 n
Decimal 27 97 n
[Range] 0 ≤ n ≤ 2, 48 ≤ n ≤ 50
[Description] Aligns all the data in one line to the specified position n selects the justification as follows:
[Details] • The command is enabled only when processed at the beginning of the line in standard mode.
• If this command is input in page mode, the printer performs only internal flag operations.
• This command has no effect in page mode.
• This command executes justification in the printing area.
• This command justifies the space area according to HT, ESC $ or ESC \.
[Default] n = 0
[Example]
n
0,48
1,49
2,50
Justification
Left justification
Centering
Right justification
Left justification
ABC
ABCD
ABCDE
Centering
ABC
ABCD
ABCDE
ABC
ABCD
ABCDE
Right justification
ESC c 3 n (*)
[Name] Select paper sensor(s) to output paper end signals
[Format] ASCII ESC c 3 n
Hex 1B 63 33 n
Decimal 27 99 51 n
[Range] 0 ≤ n ≤ 255
[Description] • Selects the paper sensor(s) to output paper end signals
• Each bit of n is used as follows:
[Details] • It is possible to select multiple sensors to output signals. Then, if any of the sensors detects a paper end, the paper
end signal is output.
• The command is available only with a parallel interface and is ignored with a serial interface.
• Sensor is switched when executing this command. The paper end signal switching be delayed depending on the
receive buffer state.
• If either bit 0 or bit 1 is on, the paper roll near-end sensor is selected as the paper sensor outputting paper-end signals.
• If either bit 2 or bit 3 is on, the paper roll end sensor is selected as the paper sensor outputting paper-end signals.
• When all the sensors are disabled, the paper end signal always outputs a paper present status.
[Default] n = 15
Bit
0
1
2
3
4 - 7
Off/On
Off
Off
On
On
Off
On
Off
On
Hex
00
00
01
02
- -
00
04
08
00
Decimal
0
1
-
0
0
4
0
8
Function
Paper roll near-end sensor disabled
Paper roll near-end sensor enabled
Paper roll end sensor disabled
Paper roll near-end sensor enabled
Paper roll end sensor disabled
Paper roll near-end sensor enabled
Paper roll end sensor disabled
Paper roll near-end sensor enabled
Undefined
2

ESC c 4 n (*)
[Name] Select paper sensor(s) to stop printing
[Format] ASCII ESC c 4 n
Hex 1B 63 34 n
Decimal 27 99 52 n
[Range] 0 ≤ n ≤255
[Description] Selects the paper sensor(s) used to stop printing when a paper-end is detected, using n as follows:
[Details] • When a paper sensor is enabled with this command, printing is stopped only when the corresponding paper is selected
for printing.
• When a paper-end is detected by the paper roll sensor, the printer goes offline after printing stops.
• When either bit 0 or 1 is on, the printer selects the paper roll near-end sensor for the paper sensor to stop printing.
[Default] n = 0
Bit
0
1
2 - 7
Off/On
Off
Off
On
On
Hex
00
00
01
02
- -
Decimal
0
1
-
0
Function
Paper roll near-end sensor disabled
Paper roll near-end sensor enabled
Paper roll end sensor disabled
Paper roll near-end sensor enabled
Undefined
2
ESC C 5 n
[Name] Enable/disable panel buttons
[Format] ASCII ESC c 5 n
Hex 1B 63 35 n
Decimal 27 99 53 n
[Range] 0 ≤ n ≤ 255
[Description] Enables or disables the panel buttons.
• When the LSB of n is 0, the panel buttons are enabled.
• When the LSB of n is 1, the panel buttons are disabled.
[Details] • Only the lowest bit of n is valid.
• When the panel buttons are disabled, none of them are usable when the printer cover is closed.
• In this printer, the panel buttons are the FEED button.
• In the macro ready mode, the FEED button are enabled regardless of the settings of this command; however, the paper
cannot be fed by using these buttons.
[Default] n = 0
ESC d n
[Name] Print and feed n lines
[Format] ASCII ESC d n
Hex 1B 64 n
Decimal 27 100 n
[Range] 0 ≤ n ≤ 255
[Description] Prints the data in the print buffer and feeds n lines.
[Details] • This command sets the print starting position to the beginning of the line.
• This command does not affect the line spacing set by ESC 2 or ESC 3.
• The maximum paper feed amount is 1016 mm (40 inches). If the paper feed amount ( nx line spacing) of more than
1016 mm (40 inches) is specified, the printer feeds the paper only 1016 mm (40 inches).
[Reference] ESC 2, ESC 3
Programmer Manual
Table of contents
Other 3nStar Printer manuals