0% found this document useful (0 votes)
77 views

SLK-TS100 Programming Manual

Uploaded by

tanrikulu.orcun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views

SLK-TS100 Programming Manual

Uploaded by

tanrikulu.orcun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 53

Thermal Printer

Programmer Manual

MODEL : SLK-TS100
Programmer Manual

Format Description

This manual applies to company's 80mm Series Thermal Receipt Printer SLK-TS100.
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.

HT

[Name] Horizontal tab


[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

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
• Even though the printer is not selected using ESC = (select peripheral device), this command is effective.
• 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.

n = 1: Printer Status

Bit Off/On Hex Decimal Function


0 0 00 0 Not used. Fixed to Off.
1 1 02 2 Not used. Fixed to On.
0 00 0 One or two cash drawer open
2
1 04 4 Both of two cash drawer closed
0 00 0 On-line
3
1 08 8 Off-line
4 1 10 16 Not used. Fixed to On.
5,6 Undefined.
7 0 00 00 Not used. Fixed to Off.

n = 2: Off-line Status

Bit Off/On H ex Decimal Function


0 0 00 0 Not used.Fixed to Off.
1 1 02 2 Not used.Fixed to On.
0 00 0 Cover is closed.
2
1 04 4 Cover is open.
0 00 0 Paper is not being fed by using the FEED button.
3
1 08 8 Paper is beging fed by the FEED button.
4 1 10 16 Not used.Fixed to On.
0 00 0 No paper-end stop.
5
1 20 32 Printing is being stopped.
0 00 0 No error.
6
1 40 64 Error occurs.
7 0 00 0 Not used.Fixed to Off.

n = 3: Error Status

Bit Off/On Hex Decimal Function


0 0 00 0 Not used.Fixed to Off.
1 1 02 2 Not used.Fixed to On.
2 Undefined.
0 00 0 No auto-cutter error.
3
1 08 8 Auto-cutter error occurs.
4 1 10 16 Not used.Fixed to On.
0 00 0 No unrecoverable error.
5
1 20 32 Unrecoverable error occurs.
0 00 0 No auto-recoverable error.
6
1 40 64 Auto recoverable error occurs.
7 0 00 0 Not used.Fixed to Off.
m Connector pin
0 Drawer kick-out connector pin 2.
1 Drawer kick-out connector pin 5.

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

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
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.
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:

m Mode Vertical Direction Horizontal Direction


Number of Dots Dot Density Dot Density Number of Data (K)
0 8-dot single-density 8 67 DPI 100 DPI nL + nH×256
1 8-dot double-density 8 67 DPI 200 DPI nL + nH ×256
32 24-dot single-density 24 200DPI 100DPI (nL + nH×256)×3
33 24-dot double-density 24 200 DPI 200 DPI (nL + nH×256)×3
[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:

Bit-image data
d1 d2 d3
MSB

d1 d2 d3

LSB
Print data Print data
1 dot

Single density Double density


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:
Bit Off/On Hex Decimal Function
Off 00 0 Printer disabled
0
On 01 1 Printer enabled
1-7 Undefined
[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

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


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 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
7 Spain
8 Japan
9 Norway
10 Denmark
11 Spain
12 Latin
13 Korea
14 Sloveina/Croatia
15 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 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:
n Function
0,48 Turns off 90° clockwise rotation mode
1,49 Turns on 90° clockwise rotation mode

[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 -

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
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:
n Justification
0,48 Left justification
1,49 Centering
2,50 Right justification
[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]

Left justification Centering Right justification

ABC ABC ABC


ABCD ABCD ABCD
ABCDE ABCDE ABCDE
ESC p m t1 t2

[Name] Generate pulse


[Format] ASCII ESC p m t1 t2
Hex 1B 70 m t1 t2
Decimal 27 112 m t1 t2
[Range] m = 0, 1, 48, 49
0 İ t1 İ 255, 0İ t2 İ 255
[Description] Outputs the pulse specified by t1 and t2 to connector pin m as follows:
m Connector pin
0,48 Drawer kick-out connector pin 2.
1,49 Drawer kick-out connector pin 5.

[Details] • The pulse ON time is [ t1×2 ms] and the OFF time is [ t2×2 ms].
• If t2 < t1, the OFF time is [ t1x 2 ms]
[Reference] DLE Dc4

ESC t n

[Name] Select character code table


[Format] ASCII ESC t n
Hex 1B 74 n
Decimal 27 116 n
[Range] 0 İ n İ10, 16 İ n İ 21
[Description] Selects a page n from the character code table.
n Page
0 PC437 [U.S.A.Standard Europe]
1 Katakana
2 PC850:Multilingual
3 PC860:Portuguese
4 PC863 [Canadian French]
5 PC865:Nodic
6 West Europe
7 Greek
8 Hebrew
9 PC755:East Europe
10 Iran
16 WPC1252
17 PC866:Cyrillic#2
18 PC852:Latin2
19 PC858
20 IranII
21 Latvian

[Default] n = 0

ESC { n

[Name] Turns on/off upside-down printing mode


[Format] ASCII ESC { n
Hex 1B 7B n
Decimal 27 123 n
[Range] 0 İ n İ 255
[Description] • Turns upside-down printing mode on or off.
FS q n [xL xH yL yH d1…dk]1…[xL xH yL yH d1…dk]n (*)

[Name] Define NV bit image


[Format] ASCII FS q n [xL xH yL yH d1...dk]1...[ xL xH yL yH d1...dk]n
Hex 1C 71 n [xL xH yL yH d1...dk]1...[ xL xH yL yH d1...dk]n
Decimal 28 113 n [xL xH yL yH d1...dk]1...[ xL xH yL yH d1...dk]n
[Range] 0 İ n İ 255
0 İ xL İ 255
0 İ xH İ 3 (when 1 İ (xL + xH×256) İ 1023)
0 İ yL İ 255
0 İ yL İ 1 (when 1 İ (yL + yHr256) İ 288)
0 İ d İ 255
k = (xL + xH×256) ×(yL + yH×256)×8
Total defined data area = 0.5M bits (64K bytes) [Description] Define the NV bit image specified by n .
• n specifies the number of the defined NV bit image.
• xL, xH specifies (xL + xH×256) × 8 dots in the horizontal direction for the NV bit image you are defining.
• yL, yH specifies (yL + yH ͖ 256) ͖ 8 dots in the vertical direction for the NV bit image you are defining.
[Details] • This command cancels all NV bit images that have already been defined by this command. The printer can not redefine
only one of several data definitions previously defined. In this case, all data needs to be sent again.
• From the beginning of the processing of this command till the finish of hardware reset, mechanical operations (includ-
ing initializing the position of the printer head when the cover is open, paper feeding by using the FEED button, etc.)
cannot be performed.
• During processing this command, the printer is in BUSY when writing the data to the NV user memory and stops
receiving data. Therefore it is prohibitted to transmit the data including the real-time commands during the execution of
this command.
• NV bit image means a bit image which is defined in a non-volatile memory by FS q and printed by FS p.
• In standard mode, this command is effective only when processed at the beginning of the line.
• In page mode, this command is not effective
• This command is effective when 7 bytes <FS<yH> is processed as a normal value.
• When the amount of data exceeds the capacity left in the range defined by xL, xH, yL, yH, the printer processes xL,
xH, yL, yH out of the defined range.
• In the first group of NV bit images, when any of the parameters xL, xH, yL, yH is out of the definition range, this comm-
and is disabled.
• In groups of NV bit images other than the first one, when the printer processes xL, xH, yL, yH out of the defined range,
it stops processing this command and starts writing into the NV images. At this time, NV bit images that haven¡¯t been
defined are disabled (undefined), but any NV bit images before that are enabled.
• The d indicates the definition data. In data (d) a 1 bit specifies a dot to be printed and a 0 bit specifies a dot not to be
printed.
• This command defines n as the number of a NV bit image. Numbers rise in order from NV bit image 01H. Therefore, the
first data group [xL xH yL yH d1...dk] is NV bit image 01H, and the last data group [xL xH yL yH d1...dk] is NV bit image n.
The total agrees with the number of NV bit images specified by command FS p.
• A definition data of a NV bit image consists of [xL xH yL yH d1...dk]. Therefore, when only one NV bit image is defined
n=1, the printer processes a data group [xL xH yL yH d1...dk] once. The printer uses ([data: (xL + xH × 256) ×(yL + yH×
256) × 8] + [header :4])bytes of NV memory.
• The definition area in this printer is a maximum of 0.5M bits (64K bytes). This command can define several NV bit
images, but cannot define a bit image data whose total capacity [bit image data + header] exceeds 0.5M bits (64K bytes).
• The printer is busy immediately before writing into NV memory.
• The printer does not transmit ASB status and perform status detection during processing of this command even when
ASB is specified.
• When this command is received during macro definition, the printer ends macro definition, and begins performing this
command.
• Once a NV bit image is defined, it is not erased by performing ESC @, reset, and power off.
• This command performs only definition of a NV bit image and does not perform printing.Printing of the NV bit image is
performed by the FS p command.
[Details] • Frequent write command execution may cause damage the NV memory.
Therefore, it is recommended to write the NV memory 10 times or less a day.
• The printer performs a hardware reset after the procedure to place the image into the NV memory. Therefore, user-
[Details] • This command is all characters (alphanumeric and Kanji) effective except for HRI characters.
• If n is outside of the defined range, this command is ignored.
• In standard mode, the vertical direction is the paper feed direction, and the horizontal direction is perpendicular to the
paper feed direction. However, when character orientation changes in 90° clockwise-rotation mode, the relationship
between vertical and horizontal directions is reversed.
• In page mode, vertical and horizontal directions are based on the character orientation.
• When characters are enlarged with different sizes on one line, all the characters on the line are aligned at the baseline.
The ESC ! command can also turn double-width and double-height modes on or off. However, the setting of the last
received command is effective.
[Default] n = 0
[Reference] ESC !

GS * x y d1...d(x × y × 8)

[Name] Define downloaded bit image


[Format] ASCII GS * xy d1 ... d (x × y × 8)
Hex 1D 2A xy d1 ... d (x × y × 8)
Decimal 29 42 xy d1 ... d (x × y × 8)
[Range] 1 İ x İ 255,
1 İ y İ 48
x × y İ 912
0 İ d İ 255
[Description] Defines a downloaded bit image using the number of dots specified by x and y
• x specifies the number of dots in the horizontal direction.
• y specifies the number of dots in the vertical direction.
[Details] • The number of dots in the horizontal direction is x × 8, in the vertical direction it is y × 8.
• If x × y is out of the specified range, this command is disabled.
• The d indicates bit-image data. Data ( d) specifies a bit printed to 1 and not printed to 0.
The downloaded bit image definition is cleared when:
ESC @ is executed.
ESC & is executed.
FS q is executed.
Printer is reset or the power is turned off.
• The following figure shows the relationship between the downloaded bit image and the printed data.
GSBn (*)

[Name] Turn white/black reverse printing mode


[Format] ASCII GS B n
Hex 1D 42 n
Decimal 29 66 n
[Range] 0 İ n İ 255
[Description] • Turns on or off white/black reverse printing mode.
• When the LSB of n is 0, white/black reverse mode is turned off.
• When the LSB of n is 1, white/black reverse mode is turned on.
[Details] • Only the lowest bit of n is valid.
• This command is available for built-in characters and user-defined characters.
• When white/black reverse printing mode is on, it also applied to character spacing set by ESC SP.
• This command does not affect bit image, user-defined bit image, bar code, HRI characters, and spacing skipped by HT,
ESC $, and ESC \.
• This command does not affect the space between lines.
• White/black reverse mode has a higher priority than underline mode. Even if underline mode is on, it is disabled (but
not canceled) when white/black reverse mode is selected.
[Default] n = 0

GS H n

[Name] Select printing position for HRI characters


[Format] ASCII GS H n
Hex 1D 48 n
Decimal 29 72 n
[Range] 0 İ n İ 3, 48 İ n İ 51
[Description] Selects the printing position of HRI characters when printing a bar code. n selects the printing position as follows:
n Print Position
0,48 Do not print
1,49 Top of the bar code
2,50 Below the barcode
3,51 The barcode are printed below
• HRI indicates Human Readable Interpretation.
[Details] •HRI characters are printed using the font specified by GS f.
[Default] n = 0
[Reference] GS f, GS k
ķ GS V m ĸ GS V m n

[Name] Select cut mode and cut paper


[Format] ྙ ASCII GS V m
Hex 1D 56 m
Decimal 29 86 m
ྚ ASCII GS V m n
Hex 1D 56 m n
Decimal 29 86 m n
[Range] ྙ m=0,48 , m =1,49
ྚ m = 66, 0 ˺ n ˺ 255
[Description] Selects a mode for cutting paper and executes paper cutting. The value of m selects the mode as follows:
m Print mode
0,48 one point left uncut
1,49 Partial cut
Feeds paper (cutting position + [ n × (vertical motion unit)]), and cuts the paper
66 partially (one point left uncut).

[Details for ྙ and ྚ„


• This command is effective only processed at the beginning of a line.
[Details for ྙ„ • Only the partial cut is available; there is no full cut.
[Details for ྚ„ • When n = 0, the printer feeds the paper to the cutting position and cuts it.
When n = 0, the printer feeds the paper to (cutting position + [ n × vertical motion unit]) and cuts it.
• The horizontal and vertical motion unit are specified by GS P.
• The paper feed amount is calculated using the vertical motion unit (y). 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.

GS W nL nH

[Name] Set printing area width


[Format] ASCII GS W nL nH
Hex 1D 57 nL nH
Decimal 29 87 nL nH
[Range] 0 İ nL İ 255
0 İ nH İ 255
[Description] Sets the printing area width to the area specified by nL and nH.
• The printing area width is set to [( nL + nH × 256) × horizontal motion unit]] inches.ǂ
Printable area

Left margin Printing area width


[Details] • This command is effective only processed at the beginning of the line.
• In page mode, the printer performs only internal flag operations.
• This command does not affect printing in page mode.
• If the [left margin + printing area width] exceeds the printable area, [printable area width - left margin) is used.
• The horizontal and vertical motion units are specified by GS P. Changing the horizontal and vertical motion units does
not affect the current left margin.
• The horizontal motion unit ( x) is used for calculating the printing area width.
The calculated result is truncated to the minimum value of the mechanical pitch.
• If the width set for the printing area is less than the width of one character, when the character data is developed, the
following processing is performed:
The printing area width is extended to the right to accommodate one character.
If the printing area width cannot be extended sufficiently, the left margin is reduced to accommodate one character.
If the printing area width cannot be extended sufficiently, the right space is reduced.
• If the width set for the printing area is less than one line in vertical, the following processing is performed only on the
m Bar Code System Numder of characters Character Remarks
65 UPC-A 11 İ n İ 12 0~9 48 İ d İ 57
66 UPC-E 11 İ n İ 12 0~9 48 İ d İ 57
67 JAN13 (EAN13) 12 İ n İ 13 0~9 48 İ d İ 57
68 JAN8 (EAN8) 7İ nİ 8 0~9 48 İ d İ 57
0~9, 45 İ d İ 57㸪
A~Z 65 İ d İ 90㸪
69 CODE39 1 İ k İ 255 SP㸪$㸪%㸪+㸪 d = 32, 36, 37,
ĸ -㸪 / 43, 45, 46, 47
*(Start / end character) d = 42(Start / end character)
70 ITF 1 İ n İ255㸦Even number㸧 0~9 48 ʇ d ʇ 57
0~9, 48 ʇ d ʇ 57,
A~D 65 ʇ d ʇ 68,
71 CODABAR 1 İ n İ 255
$, +, -, ., d = 36, 43, 45, 46,
/,: 47, 58
72 CODE93 1 İ n İ 255 NUL~SP(7FH) 0 ʇ d ʇ 127
73 CODE128 2 İ n İ 255 NUL~SP(7FH) 0 ʇ d ʇ 127

[Details for ྙ„
· This command ends with a NUL code.
· When the bar code system used is UPC-A or UPC-E, the printer prints the bar code data after receiving 12 bytes bar
code data and processes the following data as normal data.
· When the bar code system used is JAN13 (EAN13), the printer prints the bar code after receiving 13 bytes bar code
data and processes the following data as normal data.
· When the bar code system used is JAN8 (EAN8), the printer prints the bar code after receiving 8 bytes bar code data
and processes the following data as normal data.
· The number of data for ITF bar code must be even numbers. When an odd number of data is input, the printer ignores
the last received data.
[Details for ྚ„
· n indicates the number of bar code data, and the printer processes n bytes from the next character data as bar code
data.
· If n is outside of the specified range, the printer stops command processing and processes the following data as
normal data. [Details in standard mode] .
· If d is outside of the specified range, the printer only feeds paper and processes the following data as normal data.
· If the horizontal size exceeds printing area, the printer only feeds the paper.
· This command feeds as much paper as is required to print the bar code, regardless of the line spacing specified by
ESC 2 or ESC 3.
· This command is enabled only when no data exists in the print buffer. When data exists in the print buffer, the printer
processes the data following m as normal data.
· After printing bar code, this command sets the print position to the beginning of the line.
· This command is not affected by print modes (emphasized, double-strike, underline, character size, white/black reve-
rse printing, or 90° rotated character, etc.), except for upside-down printing mode.
[Details in page mode]
· This command develops bar code data in the print buffer, but does not print it. After processing bar code data, this
command moves the print position to the right side dot of the bar code.
· If d is out of the specified range, the printer stops command processing and processes the following data as normal
data. In this case the data buffer position does not change.
· If bar code width exceeds the printing area, the printer does not print the bar code but moves the data buffer position
to the left side out of the printing area.
When CODE128 (m = 73) is used:
Transmit data
Special character
ASCII Hex Decimal
SHIFT {S 7B, 53 123,83
CODE A {A 7B, 41 123, 65
CODE B {B 7B, 42 123, 66
CODE C {C 7B, 43 123, 67
FNC1 {1 7B, 31 123, 49
Bit Off/On Hex Decimal Status for ABS
Off 00 0 Cash drawer opening.
0
On 01 1 No cash drawer opening.
1-3 — — Undefined.
4 Off 00 0 Not used. Fixed to Off.
5,6 — — Undefined.
7 Off 00 0 Not used. Fixed to Off.

[Reference] DLE EOT, GS a

GS v 0 m xL xH yL yH d1...dk

[Name] Print raster bit image


[Format] ASCII GS v 0 m xL xH yL yH d1 ... dk
Hex 1D 76 30 m xL xH yL yH d1 ... dk
Decimal 29 118 48 m xL xH yL yH d1 ... dk
[Range] 0 İ m İ 3, 48 İ m İ 51
0 İ xL İ 255
0 İ xH İ 255
0 İ yL İ 255
0 İ d İ 255
k = (xL + xH × 256) × (yL + yH × 256) (k ӆ 0)
[Description] Selects Raster bit-image mode. The value of m selects the mode, as follows:
n Mode Vertical Dot Density Horizontal Dot ensity
0,48 Normal 200 DPI 200 DPI
1,49 Double-width 200 DPI 100 DPI
2,50 Double-height 100 DPI 200 DPI
3,51 Quadruple 100 DPI 100 DPI
· xL, xH, select the number of data bits ( xL+ xH×256) in the horizontal direction for the bit image.
· yL, yH, select the number of data bits ( yL+ yH×256) in the vertical direction for the bit image.
[Details] • In standard mode, this command is effective only when there is no data in the print buffer.
• This command has no effect in all print modes (character size, emphasized, double-strike, upside-down, underline,
white/black reverse printing, etc.) for raster bit image.
• If the printing area width set by GS L and GS W is less than the minimum width, the printing area is extended to the
minimum width only on the line in question. The minimum width means 1 dot in normal (m=0, 48) and double-height
(m=2, 50), 2 dots in double-width (m=1, 49) and quadruple (m=3, 51) modes.
• Data outside the printing area is read in and discarded on a dot-by-dot basis.
• The position at which subsequent characters are to be printed for raster bit image is specified by HT (Horizontal Tab),
ESC $ (Set absolute print position), ESC \ ( Set relative print position), and GS L (Set left margin ). If the position at
which subsequent characters are to be printed is not a multiple of 8, print speed may decline.
• The ESC a (Select justification) setting is also effective on raster bit images.
• When this command is received during macro definition, the printer ends macro definition, and begins performing this
command. The definition of this command should be cleared.
• d indicates the bit-image data. Set time a bit to 1 prints a dot and setting it to 0 does not print a dot.
FS &

[Name] Select Kanji character mode


[Format] ASCII FS &
Hex 1C 26
Decimal 28 38
[Description] Selects Kanji character mode.
[Reference] FS .,

FS – n

[Name] Turn underline mode on/off for Kanji characters


[Format] ASCII FS - n
Hex 1C 2D n
Decimal 28 45 n
[Range] 0 İ n İ 2, 48 İ n İ 50
[Description] Turns underline mode for Kanji characters on or off, based on the following values of n.
n Function
0,48 Turns off underline mode for Kanji characters
1,49 Turns on underline mode for Kanji characters (1-dot thick)
2,50 Turns on underline mode for Kanji characters (2-dot thick)
[Details] • The printer can underline all characters (including right- and left-side character spacing), but cannot underline the
space set by HT and 90° clockwise-rotated characters.
• After the underline mode for Kanji characters is turned off by setting n to 0, underline printing is no longer performed,
but the previously specified underline thickness is not changed. The default underline thickness is 1 dot.
• The specified line thickness does not change even when the character size changes.
• It is possible to turn underline mode on or off using FS !, and the last received command is effective.
[Default] n = 0
[Reference] FS !

FS .

[Name] Cancel Kanji character mode


[Format] ASCII FS .
Hex 1C 2E
Decimal 28 46
[Description] Cancels Kanji character mode.
[Reference] FS &,

FS 2 c1 c2 d1...dk Define user-defined characters

[Format] ASCII FS 2 c1 c2 d1 ... dk


Hex 1C 32 c1 c2 d1 ... dk
Decimal 28 50 c1 c2 d1 ... dk
[Range] c1, c2 define the character of the representative character encoding
C1=FEH
A1H İ c2 İ FEH
0 İ d İ 255
k = 72
[Description]Defined by the designated c1, c2 characters
[Default] • c1, c2 on behalf of a user-defined character encoding, c1 specifies the first byte, c2 specify the second byte.
[Notes] • d represents the data. 1 to print a dot, 0 means no printing point.
No custom characters.
Between custom Kanji fonts and data relationship shown below:
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.
ྛ The maximum right-side spacing is 255/180 inches for the paper roll and is approximately 35.983 mm {255/150
inches}. Any setting exceeding the maximum is converted to the maximum automatically.
[Default] n1 = 0, n2 = 0
[Reference] GS P

FS W n

[Name] Turn quadruple-size mode on/off for Kanji characters


[Format] ASCII FS W n
Hex 1C 57 n
Decimal 28 87 n
[Range] 0 İ n İ 255
[Description] • Turns quadruple-size mode on or off for Kanji characters.
• When the LSB of n is 0, quadruple-size mode for Kanji characters is turned off.
• When the LSB of n is 1, quadruple-size mode for Kanji characters is turned on.
[Details] • Only the lowest bit of n is valid.
• In quadruple-size mode, the printer prints the same size characters as when double-width and double-height modes
are both turned on.
• When quadruple-size mode is turned off using this command, the following characters are printed in normal size.
• When some of the characters on a line are different in height, all the characters on the line are aligned at the baseline.
• FS ! or GS ! can also select and cancel quadruple-size mode by selecting double-height and double-width modes, and
the setting of the last received command is effective.
[Default] n = 0
[Reference] FS !, GS !

The printer features a command prompt

ESC B n t

[Name] Printer to print single Beeper


[Format] ASCII ESC B n t
Hex 1B 42 n t
Decimal 27 66 n t
[Range] 1 <= n <= 9,1 <= t <= 9
[Description] • printer to print single Beeper.
• n is the number of times the buzzer.
• t is the number of tweets buzzer each time (t × 50) ms

ESC C m t n

[Name] Printer to print single Beeper and alarm light flashes


[Format] ASCII ESC C m t n
Hex 1B 43 m t n
Decimal 27 67 m t n
Range] 1 <= m <= 20,1 <= t <= 20,0 <= n <= 3,
[Description] •printer to print single Beeper and alarm lights blinking.
• m: 1 <= m <= 20, refers to the warning light flashes the number of times or buzzer.
• t: 1 <= t <= 20, refers to the warning lights flashing at intervals of t * 50 ms or buzzer interval of (t × 50) ms.
• When n = 0, the buzzer does not beep while warning light does not blink;
• When n = 1, the buzzer sounds; when n = 2, warning lights flashing;
• When n = 3, the buzzer sounds, while warning lights flashing;
B set of characters
Appendix Y: print mode and its conversion
Y.1 Summary printer has two operating modes: standard mode and page mode. In standard mode , as long as the
line printer buffer is full , or received
Print or feed command, the printer will print the paper in hand . In page mode , all of the print data and feed
commands are in the specified memory space, the printer does not perform any operation is stored . Until it receives
an ESC FF or FF command, the printer will print all the content areas are printed.
For example : When the printer is in standard mode received "ABCDEF" <LF>, it immediately "ABCDEF" to print out
a line of paper in hand . In page mode , the printer will "ABCDEF" is written in memory of the print area, the next
print data on the next line of the print area . ESC L command to switch the printer to the page mode , all data are
processed after this in page mode . All data can thus execute ESC FF command received print out all the data , but
can only execute FF command received print out, and the printer will switch to standard mode. ESC S command
execution can also switch the printer to standard mode , but it does not print in page mode the received data, and
these data will be cleared .
ESCFF

ESC L
Standard Mode Page Mode Print
ESC S

FF
Print
Processing Direction
(x0, y0)

24

base line

A dot

[unit: Dot] (dx, dy)


Printing chea

xx8
Barcode
12
User-defined (GS k m)

24×2=48 bitmaps
(GS xy)
+

12 GS h n
6×8=48
nH×256=nL

24 24
bitmap
(ESC + m nL NH)
HRI Character
base line
B dot B dot B dot B dot

Data processing of direction


(x0, y0)

xx8
24-3

6×8=48

base line
3

A dot User-defined bitmaps


(GS xy)
+
27
24-3

base line
3

B dot B dot

[unit: Dot] (dx, dy)


Printing chea

Storage location map Y.3 print data


Storage location map Y.3 download bitmap
[Default] n=0

[Description] Sets the number of rows for PDF417.

• When n = 0 specifies automatic processing.

• When n is not 0, sets the number of rows to n rows.

[Notes] Settings of this function affect the processing of Functions 081 and 082.

• When automatic processing (n = 0) is specified, the maximum number of rows is 90.

• When automatic processing (n = 0) is specified, the number of rows is calculated by the print area when processing Functions 081, 082 and
module height (Function 068).

• Settings of this function are effective until ESC @ is executed, the printer is reset, or the power is turned off.

GS ( k <Function 067>

[Name] PDF417: Set the width of the module

[Format] ASCII GS ( k pL pH cn fn n

[Hex] 1D 28 6B 03 00 30 43 n

[Decimal] 29 40 107 3 0 48 67 n

[Range] (pL + pH × 256) = 3

cn = 48

fn = 67

n=2-8

n: different depending on the printers

[Default] n: different depending on the printers

[Description] Sets the width of the module for PDF417 to n dots.

[Notes] Settings of this function affect the processing of Functions 081 and 082.

• Settings of this function are effective until ESC @ is executed, the printer is reset, or the power is turned off.

GS ( k <Function 068>

[Name] PDF417: Set the row height

[Format] ASCII GS ( k pL pH cn fn n

[Hex] 1D 28 6B 03 00 30 44 n

[Decimal] 29 40 107 3 0 48 68 n

[Range] (pL + pH × 256) = 3

cn = 48

You might also like