XP-80XX Programmer - Manual
XP-80XX Programmer - Manual
XP-80X Series
produced by the company. Command instructions for this programming manual include the following sections:
1) Command name and function overview. This is the first part of the command description. The command in
2) Format. This part uses ASCII code form, the hexadecimal code form and decimal code 3 forms to describe the
command.
Unless it is specified, the value range is a decimal number. For example, 1 ≤ n ≤ 4 in the following example,
where 1 is the 1 of the decimal number, rather than "1" in the ASCII code coding table.
5) Notes. Notes for the command are given. The details are given in this section because commands in different
modes and in conjunction with different commands can cause mutual interaction.
6) Reference. Other commands which are related to and similar to this command are given.
7) Some commands are only supported by some models, such as page mode (supports models: C300H, D300N,
Decimal code 24
[Description] In page mode, delete all the printing data in the current print area.
[Note] •This command is only valid in page mode.
•If there is an overlap between the previously set area and the current area, the overlap will also be
also deleted.
[Reference] ESC L, ESC W
m Connecting pin
0 Cash drawer socket pin 2
1 Cash drawer socket pin 5
The pulse high time is [t×100 ms] and the low time is [t×100 ms] .
[Note] •This command is ignored when the printer is executing a cash drawer open command (ESC p or
DEL DC4).
•In serial port mode, the printer executes the command as soon as it receives it.
•In the parallel mode, this command is not executed when the printer is busy.
•If the print data contains the same data as this command, the data will be executed as if it were the
command. The user must take this situation into consideration.
•Try not to insert this command in a 2-byte or other more command sequence.
•This command is valid even if the printer is prohibited by the ESC=(Select the peripheral setting)
command.
[Reference] ESC p
8. Printing in the ESC FF page mode
[Format] ASCII code ESC FF
Hexadecimal code 1B 0C
Decimal code 27 12
[Description] In page mode, all the contents of the buffer are printed.
[Note] •This command is only valid in page mode.
•The contents of the print buffer, ESC T and ESC W settings, and the positions of characters will
not be cleared after printing.
[Reference] FF, ESC L, ESC S
9. ESC SP n setting character spacing right
[Format] ASCII code ESC SP n
Hexadecimal code 1B 20 n
Decimal code 27 32 n
[Range] 0 ≤ n≤255
[Description] Sets the right spacing of characters to [n×lateral or longitudinal moving units] inches.
[Note] •When the character is enlarged, the right spacing is enlarged by the same multiple.
•The values set by this command are independent of each other in page mode and standard mode.
n Function
0, 48 Cancel underline mode
1, 49 Underline mode is selected (1 point of width)
2, 50 Underline mode is selected (2 points of width)
[Note] •Underlines can be placed under all characters (including spacing to the right), but do not include
spacing set by HT.
•Underlining cannot be applied to characters that are rotated 90°clockwise and inverted.
•When the underline mode is canceled, the following characters are not underlined and the width of
the underscore does not change The default width is a point of width.
•Changing the character size does not affect the current underline width.
•Underline selection can also be canceled by ESC! To be set. The last executed command is valid.
•This command does not affect the setting of the Chinese characters.
[Default] n=0
[Reference] ESC !
[Note] •When the printer is prohibited, all other commands are ignored except for the real-time
commands (DLE EOT, DLE ENQ, DLE DC4).
[Default] n=1
19. ESC? N Cancel the user-defined characters
[Format] ASCII code ESC ? n
Hexadecimal code 1B 3F n
Decimal code 27 63 n
[Range] 32 ≤n ≤127
[Description] Cancel the user-defined characters
[Note] •Cancels the code n character in the user-defined character. When it is canceled, this
character uses an internal font library.
•If the custom character does not exist, the command is ignored.
1. When the printing start position is set to the the position of upper left corner or the lower
right corner of the printing area by ESC T, the longitudinal movement unit is used;
2. When the printing start position is set to the position of lower left corner or the upper
right corner of the printing area by ESC T, the lateral movement unit is used;
• The maximum travel distance is 956 mm. If this distance is exceeded, the maximum
distance is taken.
[Reference] GS P
25. ESC L Select the page mode
[Format] ASCII code ESC L
Hexadecimal code 1B 4C
n Function
0, 48 Select standard ASCII typeface (12×24)
1, 49 Select compressed ASCII typeface (9×17)
n Character set
0 The United States
1 France
2 Germany
3 U. K.
4 Denmark I
5 Sweden
6 Italy
7 Spain I
8 Japan
9 Norway
10 Denmark II
11 Spain II
12 Latin America
13 Korea
14 Slovenia/Croatia
15 China
[Default] n=0
28. ESCS Select the standard mode
[Format] ASCII code ESC S
Hexadecimal code 1B 53
Decimal code 27 83
[Description] Set standard mode
[Note] •This command is valid in the page mode.
•This command clears the page buffer print data.
•This command places the current position at the beginning of the line.
•The page mode area is initialized to the default value.
•This command converts the settings of the following commands to values in the standard
mode:
1. Set the right spacing: ESC SP, FS S
2. Select the line spacing: ESC 2, ESC 3
•The following commands can be used to set relevant parameters in the standard mode, but
their settings are not effective until they enter the page mode:
1. Set the printing area in the page mode: ESC W
2. Set the area direction in the page mode: ESC T
•The following command is ignored in the standard mode:
1. Set longitudinal absolute printing position in the page mode: GS $
2. Set the relative printing position in the page mode: GS\
•The printer returns to the standard mode after the printer hardware reset or the ESC@
[Note] •If the current mode is the standard mode, only the internal flag bit is set without affecting
the printing.
•This command sets the start position of the print content in the printing area.
•Depending on the starting area of printing, the use of lateral or longitudinal movement units
is also different:
1. If the printing start position is at the position of upper left corner or lower right corner of
the printing area, the arrangement direction of the printed contents is perpendicular to the
printing feeding direction.
The following commands employ lateral movement units: ESC SP, ESC $, ESC\
The following commands utilize longitudinal movement units: ESC 3, ESC J, GS $, GS\
2. If the start position of the printer is the position of lower left corner or the upper right
corner of the printing area, the arrangement direction of the printed contents is the same as
the paper feeding direction of the printer.
The following commands employ lateral movement units: ESC 3, ESC J, GS $, GS \
The following commands utilize longitudinal movement units: ESC SP, ESC $, ESC \
[Default] n=0
[Reference] ESC $, ESC L, ESC W, ESC \, GS $, GS P, GS \
n Function
0, 48 Cancel clockwise 90 degrees mode
1, 49 Select clockwise 90 degree rotation mode
Hexadecimal code 1B 61 n
Decimal code 27 97 n
[Range] 0 ≤ n ≤ 2, 48 ≤ n ≤ 50
[Description] Make all print data be arranged in a specified alignment method.
The corresponding relationship between the value of n and the alignment method is as follows:
[Note] •This command is only valid at the beginning of the line in standard mode.
•This command changes only the internal flag bit in page mode.
•This command performs the alignment in the printing area.
•This command adjusts the blank spacing based on HT, ESC $, or ESC\\ commands.
[Default] n=0
[Instances]
AB C ABC AB C
AB C D ABCD ABCD
AB C D E AB C D E ABCDE
[Note] •When using this command to allow a print paper sensor to be active, printing is stopped only
when the corresponding paper is selected for the printing.
•When the roll paper sensor detects the end of the printing paper, the printer stops printing and
enters the offline status.
•When Bit 0 or Bit 1 is ON, the printer selects the paper exhaustion sensor as the print paper
sensor to stop printing.
[Default] n=0
36. ESC c 5 n Enable/prohibited button
[Format] ASCII code ESC c 5 n
Hexadecimal code 1B 63 35 n
Decimal code 27 99 53 n
[Range] 0 ≤ n ≤ 255
[Description] Enable/prohibited button
•The key is activated when the lowest bit of n is 0.
•The key is prohibited when the least significant bit of n is 1.
[Note] •Only the least significant bit of n is valid.
•When a key is prohibited, the key does not work.
•Keys are always available when macro commands are executed.
[Default] n=0
37. ESC d n Print and advance forward n lines
[Format] ASCII code ESC d n
Hexadecimal code 1B 64 n
Decimal code 27 100 n
[Range] 0 ≤n ≤ 255
[Description] Prints the data in the buffer and advances forward n lines (lines of characters).
[Note] • This command sets the printing start position of the printer at the beginning of the line.
• This command does not affect the row spacing set by ESC 2 or ESC 3.
M Connecting pin
0, 48 Pin 2 of cash drawer socket
1, 49 Pin 5 of cash drawer socket
[Note] • The high-level time of the cash drawer opening pulse is [t1×2 ms], and the flat time of the low
point is [t2×2 ms].
• If t2 < t1, the time for low level is [t1×2 ms].
[Reference] DLE DC4
39. ESCtn Select character code table
[Format] ASCII code ESC t n
Hexadecimal code 1B 74 n
Decimal code 27 116 n
[Range] 0 ≤n ≤ 10 , 16 ≤n ≤ 19
[Description] Select Page n from the character code table:
n Page
0 PC437 [US, European Standard]
1 Katakana
2 PC850 [Multilingual]
3 PC860 [Portuguese]
4 PC863 [Canada-French]
5 PC865 [Northern Europe]
6 West Europe
7 Greek
8 Hebrew
9 PC755:East Europe
10 Iran
16 WPC1252
17 PC866:Cyrillice*2
18 PC852:Latin2
19 PC858
[Default] n=0
[Reference] GS/
46. GS (A pL pH n m carries out the hexadecimal dump of print data
[Format] ASCII code GS ( A pL pH n m
Hexadecimal code 1D 28 41 pL pH n m
Decimal code 29 40 65 pL pH n m
[Range] pL=2, pH=0;
n=0, 48 ;m=1, 49;
47. GS/m Print download bitmap
[Format] ASCII code GS / m
Hexadecimal code 1D 2F m
Decimal code 29 47 m
[Range] 0 ≤ m ≤ 3, 48 ≤ m ≤ 51
[Description] Print a download bitmap. The print mode is specified by m. The print mode that m chooses is as
follows:
n Print location
0, 48 Do not print
1, 49 Above the bar-code
2, 50 Below the bar-code
3, 51 Print both above and below the
bar-code
[Note] • In the standard mode, this command is only effective at the beginning of the line.
• In the page mode, this command has no effect and the printer will treat the command as normal
characters.
• This command does not affect printing in the page mode.
• If the setting exceeds the maximum available printing width, then the maximum available print
width will be taken
• The lateral and longitudinal movement units are set by the GS P command, and changing the
longitudinal and lateral movement units does not affect the current left margin.
[Default] nL = 0, nH = 0
[Reference] GS P, GS W
[Note] • In the standard mode, this command is only valid at the beginning of the line.
• This command is not valid in the page mode. Command data will be treated as normal
characters.
• This command does not affect the printing in the page mode.
• If [Left Margin+Print Area Width] exceeds the printable area, the print area width will be the
printable area width minus the left margin.
• The units of lateral and longitudinal movement are set by the GS P command. Changing the
lateral and longitudinal units of movement does not affect the current left margin and area width.
• The width of the plot area is calculated in units of lateral movement.
[Default] nL = 76, nH = 2
[Reference] GS L, GS P
55. Set the longitudinal relative position in the GS\nL nH page mode
[Format] ASCII code GS \ nL nH
Hexadecimal code 1D 5C nL nH
Decimal code 29 92 nL nH
[Range] 0 ≤ nL ≤ 255
0 ≤ nH ≤ 255
n Typefaces
0, 48 Standard ASCII characters (12×24)
1, 49 Compressed ASCII characters (9×17)
[Note] • The HRI characters are characters that comment on the contents of the bar-code.
• The printing position of the HRI character is designated by the GS H command.
[Default] n=0
[Reference] GS H, GS k
59. GS h n Select the bar code height
[Format] ASCII code GS h n
Hexadecimal code 1D 68 n
Decimal code 29 104 n
[Range] 1 ≤ n ≤ 255
[Description] Select the bar code height.
Bar code height is n points..
• If the character set is not selected at the top of the bar-code data, the printer stops the processing of this
command and treats the remaining data as normal data.
• If "{" and the character immediately following it are not the combination which is designated above, the printer
stops the processing of this command and processes the remaining data as normal data.
• If the characters which is received by the printer are not bar-code character set data, the printer stops the
processing of this command and processes the remaining data as normal data.
• When the printer prints the HRI characters, the shift characters and the character set selection data are not
printed.
• The HRI characters of function characters are not printed.
• The HRI characters of the control characters (<00>H to <1F>H and <7F>H) are not printed;
<Other> Be sure to ensure the bar code left and right clearance. The gap varies based on the bar-code type.
[Reference] GS H, GS f, GS h, GS w
61. GS r n Return state
[Format] ASCII code GS r n
Hexadecimal code 1D 72 n
Decimal code 29 114 n
[Range] n = 1, 2, 49, 50
[Description] Returns the state which is specified by the value of n:
n Function
1, 49 Return paper sensor state
2, 50 Return to Cash Drawer state
[Note] • When the double width and double height modes are set at the same time, the characters are enlarged
twice in both lateral and longitudinal directions (including the left-right spacing).
• The printer can underline all characters, including left-right spacing. However, spaces caused by HT
commands (lateral ticks) cannot be underlined, nor characters rotated 90 degrees clockwise can be
underlined.
• The underline line width is set by the FS-regardless of the character size.
• When characters in a row differ in height, all characters in the row will be underlined.
• FS W or GS! can be used. Bold the characters, the last command is valid.
• You can also use FS-select or cancel the underline mode and the last command is valid.
[Default] n = 0
[Reference] FS - , FS W, GS !
[Range] (pL+pH×256)=4
cn=48
fn=69
m=48, n=48-56
m Function
0 Select standard PDF417
1 Select truncate PDF417
[Range] (pL+pH×256)=3
cn=48
fn=70
m=0, 1
[Default] m=0
85. GS (k <Function 080> PDF417: Storing data in the storage area
[Format] ASCII code GS ( k pL pH cn fn m d1…dk
Hexadecimal code 1D 28 6B pL pH 30 50 30 d1…dk
Decimal code 29 40 107 pL pH 48 80 48 d1…dk
[Description] Store PDF417 data in the storage area (d1.. . dk)
[Range] (pL+pH×256)=4-65535
cn=48
fn=80
m=48
d=0-255
k=(pL+pH×256)-3
87. GS (k <Function 081> PDF417: Print data in the storage area
[Format] ASCII code GS ( k pL pH cn fn m
Hexadecimal code 1D 28 6B 03 00 30 51 30
Decimal code 29 40 107 3 0 48 81 48
[Description] Print data in the storage area
[Range] (pL+pH×256)=3
cn=48
fn=81
m=48
88. GS (k <Function 167> QR Code: set the module size
[Format] ASCII code GS ( k pL pH cn fn n
Hexadecimal code 1D 28 6B 03 00 31 43 n
Decimal code 29 40 107 3 0 49 67 n
[Description] Set the dimensions of QR Code (in point)
[Range] (pL+pH×256)=3
[Range] (pL+pH×256)=3
cn=49
fn=69
n=48-51
[Default] n=48
90. GS (k <Function 180> QR Code: store data in the storage area
[Format] ASCII code GS ( k pL pH cn fn m d1…dk
Hexadecimal code 1D 28 6B pL pH 31 50 30 d1…dk
Decimal code 29 40 107 pL pH 49 80 48 d1…dk
[Description] Storing QR code data in the data storage area
[Range] cn=49
fn=80
m=48
d=0-255
k=(pL+pH×256)-3
m Connecting pin
0, 48 Pin 2 of cash drawer socket
1, 49 Pin 5 of cash drawer socket
[Note] • The high-level time of the cash drawer opening pulse is t1 ms, and the flat time of the low point
is t2 ms.
• If t2 < t1, then t2=t1.
100. The Cash Drawer pulse generated when ESC r drives printing
[Format] ASCII code ESC r
Hexadecimal code 1B 72
Decimal code 27 114
[Description] Sending the command generates a Cash Drawer pulse that has been set.
[Note] When using this command, please observe the following rules:
• When the host sends function data, the next data is sent after receiving the corresponding ID
from the printer.
• Using a serial interface printer, be sure to use this function when the host can receive data.
• The parallel interface printer is used for filtering without carrying out the instruction.
Printer
80 Printer
model ID
Instruction Printer information n value Specific information Return value (HEX) ASCII
1, 49 Printer ID 20 /
2, 50 Type ID 03 /
Printer ID
GS I n 3, 51 Version ID 62 /
4 / 00 /
Printer information 35 See model specific No /
Y. 1 Overview The printer has two operating modes: standard mode and page mode. in standard mode, whenever
that print line buffer is full or receive
The print or feed command causes the printer to print and feed the paper. In the page mode, all printing data and
paper feed commands are stored in the specified memory space, and the printer does not perform any operations.
Until an ESC FF or FF command is received, the printer will print all the contents of the print area.
For example, when the printer receives "ABCDEF" <LF> in standard mode, it immediately prints "ABCDEF"
and feeds one line of paper. In the page mode, the printer writes "ABCDEF" to the printing area in memory, and
the next print data is placed on the next line of the print area. The ESC L command switches the printer to page
mode, after which all data is processed in page mode. In this way, executing the ESC FF command prints all the
data received, while executing the FF command not only prints all the data received, but also switches the printer
to standard mode. Executing the ESC S command also switches the printer to standard mode, but it does not
printing data received in page mode and clears it.
Figure Y. 1 Switching between the standard mode and the page mode
Warning: The content of this manual should not be changed without permission, and the right to change the
product in technology, parts, software and hardware. If you need further information about the product, you can
contact the dealer. No section of this manual may be reproduced or transmitted in any forms or by any means
without permission.