Microcom | 814M | Specifications | Microcom 814M Specifications

MODEL 814M
DIRECT THERMAL PRINTER
PROGRAMMING MANUAL
PART NUMBER 880048-0101
Revised 04/14 MSG
© Copyright 2014 by Microcom Corporation, Lewis Center, Ohio – All rights reserved.
Printed in the United States of America
ii
Proprietary Statement
This manual contains information proprietary to Microcom Corporation. This information is
intended solely for the use of parties operating and maintaining such equipment described herein.
The reproduction, disclosure and/or use of such information without the authority of Microcom
Corporation to other parties is strongly prohibited.
Product Enhancements
Microcom Corporation is committed to the continual improvement of performance and quality in
our products. For this reason, specifications are subject to change without notice.
Liability Disclaimer
Microcom Corporation makes every effort to assure that all information and specifications
contained in this manual are accurate; however, mistakes are sometimes made. Microcom
Corporation shall not be liable for any damages resulting in the use or misuse of this product.
The exclusion or limitation involving consequential or incidental damage does not apply to all
states, therefore limitation mentioned above may or may not apply.
Centronics® is a registered trademark of Data Computer Corporation.
TrueType® is a registered trademark of Apple Computer, Inc.
Microsoft®, Windows®, Windows NT® are registered trademarks of Microsoft Corporation.
Other products and company names mentioned herein may be trademarks of their respective owners.
iii
iv
Table of Contents
1. General Information..................................................................................................................................Page 5
1.1 Key Terms .......................................................................................................................................................5
1.2 Command Explanation ...................................................................................................................................5
2. Kiosk Command Set.................................................................................................................................Page 6
HT............................................................................................................................................................... 6
LF ............................................................................................................................................................... 6
FF ............................................................................................................................................................... 7
CR .............................................................................................................................................................. 7
DLE EOT n ................................................................................................................................................. 7
CAN.......................................................................................................................................................... 10
ESC FF .................................................................................................................................................... 10
ESC SP n ................................................................................................................................................. 11
ESC ! n ..................................................................................................................................................... 12
ESC $ nL nH ............................................................................................................................................ 13
ESC % n................................................................................................................................................... 13
ESC & y c1 c2 [x1 d1...d(y × x1)]...[xk d1...d(y × xk)] .............................................................................. 14
ESC * m nL nH d1... dk ............................................................................................................................ 16
ESC - n..................................................................................................................................................... 18
ESC 2 ....................................................................................................................................................... 19
ESC 3 n.................................................................................................................................................... 19
ESC = n.................................................................................................................................................... 20
ESC ? n.................................................................................................................................................... 20
ESC @ ..................................................................................................................................................... 21
ESC D n1...nk NUL .................................................................................................................................. 21
ESC E n ................................................................................................................................................... 22
ESC G n ................................................................................................................................................... 22
ESC J n .................................................................................................................................................... 23
ESC L ....................................................................................................................................................... 23
ESC M n................................................................................................................................................... 24
ESC R n ................................................................................................................................................... 25
ESC S ...................................................................................................................................................... 25
ESC T n.................................................................................................................................................... 26
ESC V n ................................................................................................................................................... 27
ESC W xL xH yL yH dxL dxH dyL dyH ..................................................................................................... 27
ESC \ nL nH ............................................................................................................................................. 29
ESC a n.................................................................................................................................................... 30
ESC c 0 n ................................................................................................................................................. 30
ESC c 1 nL nH.......................................................................................................................................... 31
ESC c 3 n ................................................................................................................................................. 31
1
ESC c 4 n ................................................................................................................................................. 32
ESC c 5 n ................................................................................................................................................. 32
ESC c 8 n ................................................................................................................................................. 33
ESC c 9 t .................................................................................................................................................. 34
ESC c @ n ............................................................................................................................................... 34
ESC c I .................................................................................................................................................. 34
ESC d n.................................................................................................................................................... 35
ESC i ........................................................................................................................................................ 35
ESC l n X0l X0h Y0l Y0h X1l X1h Y1l Y1h............................................................................................... 35
ESC t n ..................................................................................................................................................... 36
ESC v ....................................................................................................................................................... 37
ESC { n..................................................................................................................................................... 37
FS p n m................................................................................................................................................... 38
FS q n [xL xH yL yH d1...dk]1...[xL xH yL yH d1...dk]n ............................................................................ 39
GS FF....................................................................................................................................................... 41
GS ! n ....................................................................................................................................................... 41
GS # n ...................................................................................................................................................... 42
GS $ nL nH............................................................................................................................................... 43
GS ( A pL pH n m ..................................................................................................................................... 43
GS ( E pL pH m [parameter] .................................................................................................................... 44
GS ( E pL pH m d1 d2 (m = 1) <Function 1> ........................................................................................... 44
GS ( E pL pH m d1 d2 d3 (m = 2) <Function 2> ...................................................................................... 45
GS ( E pL pH m [a1 b18...b11]...[ak bk8...bk1] (m = 3) <Function 3>...................................................... 45
GS ( E pL pH m a (m = 4) <Function 4> .................................................................................................. 46
GS * x y d1...d(x × y × 8).......................................................................................................................... 46
GS / m ...................................................................................................................................................... 47
GS : .......................................................................................................................................................... 48
GS B n...................................................................................................................................................... 49
GS C 0 n m .............................................................................................................................................. 49
GS C 1 aL aH bL bH n r ........................................................................................................................... 50
GS C 2 nL nH ........................................................................................................................................... 51
GS C ; sa ; sb ; sn; sr; sc; ........................................................................................................................ 51
GS H n ..................................................................................................................................................... 52
GS I n ....................................................................................................................................................... 53
GS L nL nH............................................................................................................................................... 53
GS P xL xH yL yH..................................................................................................................................... 54
GS V m GS V m n .................................................................................................................................. 55
GS W nL nH ............................................................................................................................................. 55
GS \ nL nH................................................................................................................................................ 56
GS ^ r t m ................................................................................................................................................. 57
GS a n ...................................................................................................................................................... 57
GS f n ....................................................................................................................................................... 59
GS h n ...................................................................................................................................................... 60
2
GS k m d1...dk NUL GS k m n d1...dn.................................................................................................... 60
GS o n ...................................................................................................................................................... 64
GS p n ...................................................................................................................................................... 65
GS q n ...................................................................................................................................................... 65
GS r n ....................................................................................................................................................... 65
GS w n ..................................................................................................................................................... 66
3.Chinese character control commands ..................................................................................................Page 67
FS ! n........................................................................................................................................................ 67
FS & ......................................................................................................................................................... 67
FS - n ....................................................................................................................................................... 68
FS ............................................................................................................................................................ 68
FS 2 c1 c2 d1...dk .................................................................................................................................... 69
FS S n1 n2 ............................................................................................................................................... 70
FS W n ..................................................................................................................................................... 71
4. Programming Instructions.....................................................................................................................Page 72
4.1 General Information ..................................................................................................................................... 72
4.2 Programming ABC ....................................................................................................................................... 72
4.2.1 Print modes ..................................................................................................................................... 72
4.2.2 Paper supported.............................................................................................................................. 73
4.2.3 PRST action modes ........................................................................................................................ 73
4.3 Programming examples............................................................................................................................... 74
4.3.1Initialization ...................................................................................................................................... 74
4.3.2 Set printing and print data(character /barcode/bit image)............................................................ 75
4.3.3 Print and cut paper.......................................................................................................................... 79
4.3.4 Status check.................................................................................................................................... 79
4.3.5 Download bit images into RAM or FLASH...................................................................................... 80
4.3.6 Recommendations on applicable flow for programm...................................................................... 83
Appendix A: ASCII TABLE .........................................................................................................................Page 84
Appendix B: Code Page Table...................................................................................................................Page 85
Appendix C: Code 128 Bar Code ..............................................................................................................Page 95
3
4
1. General Information
1.1 Key Terms
Real-time commands – These commands are acted on immediately upon being received by the printer (regardless
of the printer’s busy or error status).
Page mode -- Under this mode, the printer possesses all data in specified memory and thinks of this as a virtual
page. The page is printed when the printer receives a print command, either FF or ESC FF.
Standard mode – Standard mode is the default mode of printer uses to operate. Under this mode, the printer prints
data and feeds paper upon print line buffer full (data is enough for one print line) or receiving print command like LF.
Marked paper mode– Configuration of printer is marked paper.
Presenter – Presenter is the front mechanism of the KIOSK printer. It is used to accommodate the printout during
printing and retract the printout when the user does not take the printout. It is abbreviated as PRST in this
programming manual.
HRI Characters – Human readable interpretation of the barcode.
NV – Non-volatile memory in which data stored is not lost when powered off.
RAM – Random Access Memory
Motion unit – The motion unit has vertical motion unit and horizontal motion unit, which specify the least space for
vertical motion and horizontal motion.
ASB – Auto status back
DPI – Print dots per inch (one inch equals to 25.4mm). It is used to identify the resolution of a printer. For example,
203DPI means 203 print dots per inch.
Font 0 – A standard character, Font A size for 203 DPI model is 12 x 24; the size for 300 DPI is 18 x 34;
Font 1 – Compressed character, Font B size for 203 DPI model is 9 X 17; the size for 300 DPI is 13 X 24;
Asia Character Set – Double-byte code character used in Asia, the size for 203DPI is 24 x 24; the size for 300DPI
is 36 x 36.
1.2 Command Explanation
[Name]
The name and function summary.
[Format]
The command format is expressed in ASCII, Hex and Decimal separately.
[Range]
The range of variation value is selected for a command.
[Description]
The detailed functions of command.
[Notes]
Lists items that will be given attention to. The main features of the command are given in this
paragraph.
[Default]
The primary value used after initialization of the printer (power on).
[Reference]
Lists all other commands related or similar to the command.
5
2. Kiosk Command Set
HT
[Name]
Horizontal tab.
[Format]
ASCII
HT
Hex
09
Decimal
9
[Description]
Moves the print position to the next horizontal tab position.
[Notes]
ƒ This command is ignored unless the next horizontal tab position has been set.
ƒ If this command is received when the printing position is at the end of a line, the printer
prints the current line and moves the print position to the beginning of the next line.
ƒ Horizontal tab positions are set with ESC D.
ƒ When the print buffer is full, the printer acts as follows,
1) Under standard mode, prints current line and moves the print position to the
beginning of next line.
2) Under page mode, executes carriage return and moves the print position to the
beginning of next line.
The default setting of the horizontal tab position for the paper roll is every 8th ASCII
[Default]
character.
ESC D
[Reference]
LF
[Name]
Print and feeds one line.
[Format]
ASCII
LF
Hex
0A
Decimal
10
[Description]
Under standard mode, prints the data in the print buffer and feeds one line. It only feeds
one line when current buffer area is blank.
Under page mode, executes carriage return and moves the print position to the
beginning of the next line.
[Notes]
ƒ This command sets the print position to the beginning of the line.
[Reference]
ESC 2, ESC 3
6
FF
[Name]
Print and feed paper.
[Format]
ASCII
FF
Hex
0C
Decimal
12
[Description]
Under page mode, prints the data in the print buffer collectively and returns to standard
mode.
[Notes]
ƒ Under standard mode, this command functions the same as a LF command.
ƒ The buffer data is deleted after being printed.
ƒ This command sets the print position to the beginning of the line.
[Reference]
ESC FF, ESC L, ESC S
CR
[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;
[Notes]
ƒ This command is disabled according to the printer configuration.
ƒ When automatic line feed is disabled, this command is ignored.
[Reference]
LF
DLE EOT n
[Name]
Real-time status transmission
[Format] ASCII
DLE
EOT
n
Hex
10
04
n
Decimal
16
4
n
[Range] 2 ≤ n ≤7, 9 ≤ n ≤11
[Description] Transmits the selected printer status specified by n in real-time, according to the following
parameters:
n = 2: Transmit peripheral equipment status
n = 3: Transmit error status.
n = 4: Transmit paper roll sensor status.
n = 5: Transmit printer status (Equal to first byte data of ASB).
n = 6: Transmit printer status (Equal to second byte data of ASB).
n = 7: Transmit printer status (Equal to third byte data of ASB).
7
n = 9: Transmit PRST status.
n = 10: Reset printer
n = 11: Clear printer errors.(function as the clear errors command)
[Notes]
When n is out of range, the return value is invalid.
ƒ The printer transmits specified status immediately upon receiving this command
ƒ Even though the printer is not selected using ESC = (select peripheral device), this command
is still effective.
ƒ The printer transmits the status without confirming whether the host computer can receive
data.
ƒ This command is only valid for serial, USB and Ethernet interfaces.
ƒ The reset command is used to clear the error status and the print buffer. Do not attempt to
print while using this command.
n = 2, Transmits printer status defined as below:
Bit
0
1
2
3
4
5
6
7
Off/On
0
1
0/1
0/1
1
0/1
0/1
0
Hex.
0
2
00/04
00/08
10
0/20
00/40
00
Description
Fixed to 0
Fixed to 1
Top cover closed / Top cover open
No FEED button action / FEED button action
Fixed to 1
Paper adequate / Paper end
Normal / Error
Fixed to 0
n=3, Transmits error status defined as below:
Bit
0
1
2
3
4
5
Off/On
0
1
0
0/1
1
0/1
Hex.
00
02
00
00/08
10
00/20
6
0/1
00/40
7
0
00
Description
Fixed to 0
Fixed to 1
Fixed to 0
Cutter normal / Cutter error
Fixed to 1
Top cover closed / Top cover open
Print head temperature normal / Print head
overheated
Fixed to 0
n=4, Transmits paper roll sensor status defined as below:
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
Description
Fixed to 0
Fixed to 1
Paper adequate / Paper near end
Paper adequate / Paper near end
Fixed to 1
Paper adequate / Paper end
Paper adequate / Paper end
Fixed to 0
n = 5, Transmits printer status defined as below:
Bit
0
1
2
3
Off/On
0/1
1/1
0/1
0/1
Hex.
00/01
00/02
00/04
00/08
Description
Paper adequate / Paper near end
Top cover closed / Top cover open
Paper adequate / Paper end
Print head normal / overheated
8
4
5
6
7
0/1
0
0
0
00/10
00
00
00
Cutter normal / Cutter error
Reserve
Reserve
Fixed to 0
n = 6, Transmits printer status defined as below:
Bit
0
1
2
3
4
5
6
7
Off/On
0/1
0/1
0/1
0/1
0/1
0/1
0/1
0
Hex.
00/01
00/02
00/04
00/08
00/10
00/20
0/40
0
Description
PRST without paper / PRST with paper
Normal / Paper jam at printing site
Normal / Paper jam on PRST
Normal / Black mark missing
Auto paper loading normal / error
Buffer not full / buffer full
System normal / system error
Fixed to 0
n = 7, Transmits printer course status:
Bit
Off/On
Hex.
00000/10000
00/10
Printer idle status
Normal / Error
00001/10001
01/11
Printing status
Normal / Error
00010/10010
02/12
Cutting paper status
Normal/ Error
00011/10011
03/13
PRST feeding paper status
Normal / Error
00100/10100
04/14
PRST waiting status Normal
/ Error
00101/10101
05/15
PRST retraction status
Normal / Error
00110/10110
06/16
PRST ejection status Error /
Normal
00111/10111
07/17
Auto paper loading status
Normal / Error
5
0/1
00/20
6
0/1
00/40
7
0/1
00/80
0~4
Description
Error
Top cover open, print
head overheated, paper
end
Top cover open, print
head overheated, paper
end, paper jam
Top cover open, print
head overheated, paper
end, cutter error,
paper jam
Top cover open, print
head overheated, paper
end, paper jam
Top cover open, print
head overheated, paper
end
Top cover open, print
head overheated, paper
end , paper jam
Top cover open, print
head overheated, paper
end , paper jam
Top cover open, print
head overheated, paper
end
PrstIn with paper / PrstIn
without paper
No FEED button action /
FEED button action
Paper retract normally / user
took the paper away in the
process of retracting
Notes:
• The seventh byte will be cleared after the next cut.
• PrstIn indicates the state of the PrstIn sensor before or after retraction, with paper means that the
paper holder sensor detects paper.
• When the PrstIn sensor is in “with paper state” before retraction, the printer cannot judge whether
the paper was taken away by user in the retraction process.
n = 9, Transmit PRST status:
9
Bit
0
1-3
4
5-7
Off/On
0/1
0
1
0
Hex.
00/01
00
02
00
Description
PRST without paper / PRST with paper
Fixed to 0
Fixed to 1
Fixed to 0
n = 10, reset printer
ƒ Printer shall clear error information and buffer area and execute half-auto feeding.
n = 11, clear printer error
ƒ When executing this command, the printer shall clear errors automatically according to error
status. If the operation succeeds, it enters normal status, otherwise only via manual
operation.
CAN
[Name]
Cancel print data in page mode
[Format]
ASCII
CAN
Hex
18
Decimal
24
[Description]
In page mode, deletes all print data in the print buffer.
[Notes]
ƒ 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
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.
[Notes]
ƒ This command is enabled only in page mode.
ƒ After printing, the printer does not clear the buffered data, does not change the
settings for ESC T and ESC W, and does not change the position for buffering
[Reference]
character data.
FF, ESC L, ESC S
10
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] inches.
[Notes]
ƒ The horizontal and vertical motion units are specified by GS P.
ƒ Without setting right-side character spacing, only changing the horizontal or vertical
motion unit does not affect the current right-side spacing.
ƒ The right-side character spacing for double-width mode is twice the normal value.
When characters are enlarged, the right-side character spacing is enlarged
accordingly.
ƒ This command sets values independently in each mode (standard and page modes).
ƒ In standard mode, the horizontal motion unit is used.
ƒ In page mode, the horizontal or vertical motion unit is specified 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.
ƒ For 300DPI printers, the maximum right-side spacing is 288/305 inches. Any setting
exceeding the maximum is converted to the maximum automatically.
ƒ For 203DPI printers, the maximum right-side spacing is 288/203 inches. Any setting
exceeding the maximum is converted to the maximum automatically.
n=0
[Default]
GS P
[Reference]
11
ESC ! n
[Name]
Select print mode
[Format]
ASCII
ESC
!
Hex
1B
21 n
Decimal
27
n
33 n
[Range]
0 ≤ n ≤ 255
[Description]
Selects print mode(s) with n as follows:
Bit
0
1/0
0
Hex
00
Decimal
0
Function
Standard ASCII characters
1
01
1
Compressed ASCII characters
1,2
3
4
5
Undefined.
0
00
0
Emphasized mode not selected
1
08
8
Emphasized mode selected
0
00
0
Double-height mode not selected
1
10
16
Double-height mode selected
0
00
0
Double-width mode not selected
1
20
32
Double-width mode selected
0
00
0
Underline mode not selected
1
80
128
Underline mode selected
6
7
[Notes]
Undefined
ƒ When both double-height and double-width modes are selected, quadruple size
characters are printed.
ƒ The printer can underline all characters, but cannot underline the space set by HT or
90° clockwise-rotated characters.
ƒ The thickness of the underline is that selected by ESC -.
ƒ 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 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 last received command is effective.
n=0
[Default]
ESC -, ESC E, GS !
[Reference]
12
ESC $ nL nH
[Name]
Set absolute print position
[Format]
ASCII
ESC
$
Hex
1B
24 nL nH
Decimal 27
[Range]
nL nH
36 nL nH
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 as below.
♦ [(nL + nH × 256) × (vertical or horizontal motion unit)] inches.
[Notes]
ƒ Settings outside the specified printable area are ignored.
ƒ The horizontal and vertical motion units are specified by GS P.
ƒ In standard mode, the horizontal motion unit (x) is used.
ƒ In page mode, horizontal or vertical motion unit is selected 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
%
Hex
1B
25 n
Decimal 27
n
37 n
[Range]
0 ≤ n ≤ 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.
[Notes]
ƒ 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 ?
13
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]
203DPI model:
y=3
32 ≤ c1 ≤ c2 ≤ 127
0≤ x ≤ 12 Standard ASCII font
0≤ x ≤ 9
Compressed ASCII font
300DPI model:
0<y<6
32 ≤ c1 ≤ c2 ≤ 127
0≤ x ≤ 18 Standard ASCII font
0≤ x ≤ 12 Compressed ASCII font
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.
[Notes]
ƒ The allowable character code range is from ASCII code <20>H to <7F>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 data for the downloaded characters. The dot pattern is in the horizontal
direction from the left side.
ƒ 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.
ƒ The user-defined character definition is cleared when:
-ESC ? is executed.
-The power is turned off.
ƒ All user-defined Characters defined with this command will be cleared when the GS
* command is executed.
[Default]
ESC %, ESC ?
[Example]
203 DPI model
When standard ASCII font (12 × 24) is selected.
14
When compressed ASCII font (9×17) is selected.
15
ESC * m nL nH d1... dk
[Name]
Download and print bit-image
[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, 35
0 ≤ nL ≤ 255
0 ≤ nH ≤ 3
0 ≤ d ≤ 255
[Description] Selects a bit-image mode with m for the number of dots specified by nL and nH, d1...dk
is data, of which number is decided by horizontal dots number and selected bit-image
mode as follows:
203DPI
m
Vertical Direction
Number
Dot
of Dots
Density
Bit-Image Mode
0
8-dot single-density
8
67 DPI
1
8-dot double-density
8
32
24-dot single-density
24
33,35
24-dot double-density 24
203 DP
Horizontal Direction
Dot
Number of Data (K)
density
101 DPI
nL + nH × 256
67 DPI
203 DPI
nL + nH × 256
203 DPI
101 DPI
( nL + nH × 256) × 3
203 DPI
( nL + nH × 256) × 3
300DPI
m
Mode
Vertical Direction
Number
Dot
of Dots Density
Horizontal Direction
Dot
Number of Data (K)
density
0
8-dot single-density
8
100 DPI
150 DPI
nL + nH × 256
1
8-dot double-density
8
100 DPI
300 DPI
nL + nH × 256
32
24-dot single-density
24
300 DPI
150 DPI
( nL + nH × 256) × 3
33,35
24-dot double-density
24
300 DPI
300 DPI
( nL + nH × 256) × 3
16
ƒ If the value of m is out of the specified range, nL and data following are processed as
[Notes]
normal data.
ƒ 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.
ƒ 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:
When 24-dot bit image is selected:
17
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:
[Notes]
n
0, 48
Function
Turns off underline mode
1, 49
Turns on underline mode (1-dot thick)
2, 50
Turns on underline mode (2-dots thick)
ƒ The printer can underline all characters (including right-side character spacing), but
cannot underline the space set by HT.
ƒ The printer cannot underline 90° clockwise rotated characters and white/black
inverted characters.
ƒ 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.
[Default]
[Reference]
n=0
HT, ESC !
18
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.23 mm) spacing.
[Notes]
ƒ 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
Hex
1B
33 n
Decimal 27
n
51 n
[Range]
0 ≤ n ≤ 255
[Description]
Sets the line spacing to [ n × vertical or horizontal motion unit] inches.
[Notes]
ƒ The line spacing can be set independently in standard mode and in page mode.
ƒ The horizontal and vertical motion units are specified by GS P. Changing the
horizontal or vertical motion unit does not affect the current line spacing.
ƒ In standard mode, the vertical motion unit (y) is used.
ƒ In page mode, this command functions as follows, depending on the starting position
and direction of the printable area:
- When the starting position is set to the upper left or lower right of the
printable area with 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 with ESC T, the horizontal motion unit (x) is used.
ƒ The maximum paper feed amount is 600 mm (23.6 inches) for 300 DPI printer and
900mm (35.4 inches) for 203 DPI printer. If a paper feed amount of more than 600 mm
(300DPI) or 900mm (203DPI) is set, the printer feeds the paper only 600mm (300DPI)
or 900mm (203DPI).
Line spacing is equivalent to approximately 4.23mm (1/6 inches).
[Default]
ESC 2, GS P
[Reference]
19
ESC = n
[Name]
Set peripheral device
[Format]
ASCII
ESC
=
n
Hex
1B
3D
n
Decimal 27
61
n
[Range]
0 ≤ n ≤ 255
[Description]
Disable or enable peripheral device to which host computer sends data.
[Notes]
• The lowest bit of n is effective;
• When the LSB of n is 0, printer is disabled;
• When the LSB of n is 1, printer is enabled’
• When the printer is enabled when power on
When the printer is disabled, it ignores all data except for real-time command (DLE
EOT) until it is enabled by this command.
[Default]
N=1
ESC ? n
[Name]
Cancel user-defined characters
[Format]
ASCII
ESC
?
Hex
1B
3F n
Decimal 27
n
63 n
[Range]
32 ≤ n ≤ 127
[Description]
Cancels user-defined characters.
[Notes]
ƒ This command cancels the pattern defined for the character code specified by n. After
the user-defined characters are canceled, the corresponding pattern for the internal
character is printed.
ƒ If a user-defined character has not been defined for the specified character code, the
printer ignores this command.
[Reference]
ƒ ESC &, ESC %
20
ESC @
[Name]
Initialize printer
[Format]
ASCII
ESC
@
Hex
1B
40
Decimal 27
[Description]
64
Clears the data in the print buffer and resets the printer mode to the default mode when
the power was turned on.
[Notes]
ƒ The bit-image data or user-defined characters in RAM are cleared.
ƒ The macro definition is not cleared.
ƒ The NV bit image data is not cleared.
ESC D n1...nk NUL
[Name]
Set horizontal tab positions
[Format]
ASCII
ESC
D
Hex
1B
44 n1...nk 00
Decimal 27
[Range]
n1... nk NUL
68 n1...nk 0
1 ≤ n ≤ 255
0 ≤ k ≤ 32
[Description]
Sets horizontal tab positions.
♦ n+1 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.
[Notes]
ƒ 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.
ƒ 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 independent for each standard and page mode.
[Example]
When n = 8, printing position is at the ninth line
21
[Default]
The default tab positions are at intervals of 8 standard ASCII characters (columns 9, 17,
25).
[Reference]
HT
ESC E n
[Name]
Turn emphasized mode on/off
[Format]
ASCII
ESC
E
Hex
1B
45 n
Decimal 27
n
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.
[Notes]
ƒ Only the least significant bit of n is effective.
ƒ ESC ! turn on and off emphasized mode in the same way, the last received command
is available.
ƒ Printer output is the same in double-strike mode and in emphasized mode.
[Default]
n=0
[Reference]
ESC !, ESC G
ESC G n
[Name]
Turn on/off double-strike mode
[Format]
ASCII
ESC
G
Hex
1B
47 n
Decimal 27
n
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.
[Notes]
ƒ Only the least significant bit of n is enabled.
ƒ Printer output is the same in double-strike mode and in emphasized mode.
ƒ ESC ! can turn emphasized mode on/off, the last received command is effective.
[Default]
n=0
[Reference]
ESC E, ESC !
22
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.
[Notes]
ƒ 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 settings of ESC 2 or
ESC 3.
ƒ The horizontal and vertical motion units are specified by GS P.
ƒ 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 for selecting vertical motion unit(y) or horizontal motion unit(x):
-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 600mm (23.6 inches) for 300DPI printer and 900mm
(35.4 inches) for 203DPI printer. When the setting value exceeds the maximum, it is
converted to the maximum automatically.
GS P
[Reference]
ESC L
[Name]
Select page mode
[Format]
ASCII
ESC
L
Hex
1B
4C
Decimal 27
76
[Description]
Switches from standard mode to page mode.
[Notes]
ƒ 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 ESC S, the printer returns to standard mode.
23
ƒ 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 to those for page
mode:
-Set right-side character spacing: ESC SP
-Select line spacing: ESC 2, ESC 3
ƒ Only value settings is possible for the following commands in page mode; these
commands are not executed until switch to standard mode.
-Turn 90° clockwise rotation mode on/off: ESC V
-Turn upside-down printing mode on/off: ESC {
-Set left margin: GS L
-Set printable area width: GS W
ƒ The printer returns to standard mode, after it is reset, or executes ESC @.
[Reference]
FF, CAN, ESC FF, ESC S, ESC T, ESC W, GS $, GS \
ESC M n
[Name]
Select character font
[Format]
ASCII
ESC
M
n
Hex
1B
4D
n
Decimal 27
77
n
[Range]
n = 0, 1, 2, 3, 48, 49, 50, 51
[Description]
Selects character fonts.
N
Function
0,48
Select standard ASCII font
1,49
Select compressed ASCII font:
2,50
Select user defined character
3,51
Select Chinese font, include:
1)
Simplified Chinese(GB2312)
2)
Traditional Chinese(BIG5)
3)
Japanese (JIS/SJIS/EUC)
4)
Korean (KSC5601/EUC)
The printer will print selected Chinese font [simplified Chinese, traditional
Chinese, Japanese (EUC) or Korean (EUC)] according to its configuration
[Notes]
• When Chinese font is selected, Chinese font and western font can be printed
together. The font code in <20>H~<FE>H is identified as Western font
automatically, and those in <A1>H~<FE> are Chinese font.
• When Japanese is selected, the command switches western font to
Japanese.
• After Chinese font is selected, Font A is also enabled automatically.
24
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 ≤ 13
[Description]
Selects an international character set n from the following table,see below:
ASCII Code (Hex)
n
[Notes]
[Default]
Country
23
24
40
5B
5C
5D
5E
60
7B
7C
7D
7E
0
U.S.A
#
$
@
[
\
]
^
`
{
|
}
~
1
France
#
$
à
°
ç
§
^
`
é
ù
è
¨
2
Germany
#
$
§
Ä
Ö
Ü
^
`
ä
ö
ü
ß
3
U.K.
£
$
@
[
\
]
^
`
{
|
}
~
4
Denmark I
#
$
@
Æ
Ø
Å
^
`
æ
ø
å
~
5
Sweden
#
¤
É
Ä
Ö
Å
Ü
é
ä
ö
å
ü
6
Italy
#
$
@
°
\
é
^
ù
à
ò
è
ì
7
Spain I
Pt
$
@
¡
Ñ
¿
^
`
¨
ñ
}
~
8
Japan
#
$
@
[
¥
]
^
`
{
|
}
~
9
Norway
#
¤
É
Æ
Ø
Å
Ü
é
æ
ø
å
ü
10
Denmark II
#
$
É
Æ
Ø
Å
Ü
é
æ
ø
å
ü
11
Spain II
#
$
á
¡
Ñ
¿
é
`
í
ñ
ó
ú
12
Latin America
#
$
á
¡
Ñ
¿
é
ü
í
ñ
ó
ú
13
Korea
#
$
@
[
W
]
^
`
{
|
}
~
ƒ This command is only enabled for 203DPI printer.
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.
[Notes]
ƒ 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 page mode zone is initialized as default.
ƒ This command switches the settings for the following commands to those for standard
mode:
25
-Set right-side character spacing: ESC SP
-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 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
[Range]
84
n
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:
[Notes]
ƒ 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 starting position where data is buffered within the printing
area.
ƒ 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 perpendicular to the paper feed direction:
Commands using horizontal motion units: ESC SP, ESC $, ESC \
Commands using vertical motion units: ESC 3, ESC J, GS $, GS \
26
-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
27
86
n
[Range]
0 ≤ n ≤ 1, 48 ≤ n ≤ 49
[Description]
Turns 90° clockwise rotation mode on/off. n is used as follows:
[Notes]
n
0, 48
Function
Turns off 90° clockwise rotation mode
1, 49
Turns on 90° clockwise rotation mode
ƒ This command only affects printing in standard mode.
ƒ When underline mode is turned on, the printer does not underline 90° clockwise
rotation.
ƒ 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 W xL xH yL yH dxL dxH dyL dyH
[Name]
Set printing area in page mode
[Format]
ASCII
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:
Horizontal starting position: x0 = [(xL + xH × 256) × (horizontal motion unit)]inches
Vertical starting position:
Printing area width:
y0 = [(yL + yH × 256) × (vertical motion unit)]inches
dx = [dxL + dxH × 256] × (horizontal motion unit)]inches
27
Printing area height:
[Notes]
dy = [dyL + dyH × 256] × (vertical motion unit)]inches
ƒ 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 set to (vertical printable area – vertical starting
position).
ƒ The horizontal and vertical motion units are specified by GS P. Changing the
horizontal or vertical motion unit does not affect the current printing area.
ƒ 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.
Decided by printer configuration
[Default]
CAN, ESC L, ESC T, GS P
[Reference]
28
ESC \ nL nH
[Name]
Set horizontal relative print position
[Format]
ASCII
ESC
Hex
1B
5C
nL nH
Decimal
27
92
nL nH
[Range]
\
nL
nH
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] inches
[Notes]
ƒ 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): 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 units are specified by GS P.
ƒ 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
29
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:
[Notes]
n
Justification
0,48
Left justification
1, 49
Centering
2, 50
Right justification
ƒ 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.
[Default]
n=0
[Example]
ESC c 0 n
[Name]
Select paper type to be used
[Format]
ASCII
ESC
c
Hex
1B
63 30 n
Decimal 27
0
n
99 48 n
[Range]
n =0,1, 2
[Description]
Selects paper type specified by n as follows.
n
Paper type
0
Continuous paper
1,2
Marked paper
[Notes]
[Default]
n=0
30
ESC c 1 nL nH
[Name]
Set cutting position
[Format]
ASCII
ESC
c
Hex
1B
63 31 nL nH
Decimal 27
[Range]
1
nL nH
99 49 nL nH
0 ≤ nL ≤ 255; 0 ≤ nH ≤ 255;
N=(nL + nH x 256 )( If n < 19, n = 19)
[Description]
Sets the cutting position to a place when marked paper is selected.
[Notes]
• Direction settings: feeding paper is front, reversing feed paper is back.
• The relationship between N and the cutting position is defined as below.
If n increase, the cutting position move backward; If n decrease, the position move
forward : n/8(mm)for 203DPI, n/12(mm)for 300DPI.
• When nL = nH = 255, the N saved to printer will not loss even when printer is turned
off/on.
ESC c 3 n
[Name]
Select paper-end signal of paper sensor
[Format]
ASCII
ESC
c
3
Hex
1B
63 33 n
Decimal
27
99 51 n
n
[Range] 0 ≤ n ≤ 255
[Description] Select paper sensor to output paper-end signal
• The definition of n bit is as follows:
Bit
0/1
Hex
Decimal
0
0
00
0
undefined
1
0
00
0
Paper-near-end sensor is not available
1
02
2
Paper-near-end sensor is available
2
0
00
0
undefined
3
0
00
0
Paper end sensor is not available
1
08
8
Paper end sensor is available
4-7
[Notes]
Function
undefined
• It is possible to select two sensors to output signals. Then, if any of the sensors detect 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.
[Default]
n=0
31
ESC c 4 n
[Name]
Select paper sensor(s) to stop printing
[Format]
ASCII
ESC
c
4
Hex
1B
63 34 n
Decimal
27
99 52 n
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:
Bit
0
1
0/1
Hex
Decimal
Function
0
00
0
Paper roll near end sensor disabled
1
01
1
Paper roll near end sensor enabled
0
00
0
Paper roll near end sensor disabled
1
02
2
Paper roll near end sensor enabled
2-7
[Notes]
Undefined
• When either bit 0 or 1 is on, the printer selects the paper roll near-end sensor. When the paper roll
sensor detects a paper-end, the printer goes off-line after current printing stops.
[Default]
n=0
ESC c 5 n
[Name]
Enable/disable panel buttons
[Format]
ASCII
ESC
c
Hex
1B
63 35 n
Decimal 27
5
n
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.
[Notes]
ƒ Only the LSB of n is valid.
ƒ When the panel buttons are disabled, none of them are usable.
ƒ In the macro ready mode, the panel buttons are always enabled.
[Default]
n=0
32
ESC c 8 n
[Name]
Select PRST action mode
[Format]
ASCII
ESC
c
Hex
1B
63 38 n
Decimal 27
8
n
99 56 n
[Range]
0≤n≤3
[Description]
Selects PRST action mode specified by n as follows.
[Notes]
N
PRST action mode
0
Retraction mode
1
Ejection mode(special model)
2
PRST holding waiting mode
3
PRST disabled mode
Printer operates after receiving command, then if PRST is enabled, proceed as follows:
ƒ During printing, the PRST starts and hold the paper head. The PRST will
accommodate the printout and hold the end of paper after the printing is finished. After
the waiting time, the PRST operates as follows:
1) In retraction mode, retract the printout into a waste-bin, after reach a
setting time. Its main purpose: user doesn’t take it away in specified time,
and avoid pollution and keep secrecy for customers.
2) In ejection mode, discharge the printout after reach a setting time. Its main
purpose: If user doesn’t take paper away in specified time, it discharges for
next printout.
3) In waiting mode, wait until the user takes the printout away after a setting
time.
ƒ If the PRST is disabled, it takes no actions during printing and after printing. It is
recommended to remove the PRST to prevent from paper jam if the PRST function is
not desired.
ƒ ESC c 9 can set the waiting time before action of PRST.
ƒ ESC c 9
[Reference]
33
ESC c 9 t
[Name]
Set PRST waiting time
[Format]
ASCII
ESC
c
Hex
1B
63 39 t
Decimal 27
9
t
99 57 t
[Range]
0 ≤ n ≤ 240
[Description]
Sets the time period (t in seconds) for PRST to wait before it takes any actions set by
ESC c 8.
[Notes]
ƒ Actions here mean the PRST action modes specified in ESC c 8 command
[Reference]
ƒ ESC c 8
ESC c @ n
[Name]
Enable/disable real-time commands
[Format]
ASCII
ESC
c
Hex
1B
63 40 n
Decimal 27
@ n
99 64 n
[Range]
0 ≤ n ≤ 255
[Description]
Enables or disables the real-time commands.
♦ When the LSB of n is 0, the real-time commands are disabled.
♦ When the LSB of n is 1, the panel buttons are enabled.
[Notes]
ƒ Only the LSB of n is valid.
ƒ When the printer is turned on, the real-time commands are always enabled.
ƒ When error occurs, the real-time commands are automatically enabled.
[Reference]
DLE EOT n
ESC c I
[Name]
PRESENTER retract immediately
[Format]
ASCII
ESC
c
I
Hex
1B
63
49
99
73
Decimal 27
[Description]
PRESENTER retract the paper immediately
[Notes]
This command does not change the waiting time of PRESENTER.
[Reference]
ESC c 8
34
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 (character line).
[Notes]
ƒ 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 600mm (23.6 inches) for 300DPI printer and is
900mm (35.4 inches) for 203DPI printers. If the paper feed amount (nx line spacing)
of more than 600mm (300DPI) or 900mm (203DPI) is specified, the printer feeds the
paper only 600mm (300DPI) or 900mm (203DPI).
[Reference]
ESC 2, ESC 3
ESC i
[Name]
Cut paper
[Format]
ASCII
ESC
i
Hex
1B
69
Decimal 27
105
[Notes]
Cut paper
[Description]
• If the paper feeding length (L1) is less than the minimum page length (Lm) specified
when executing this command, the printer feeds paper (Lm-L1) long and cuts paper.
Otherwise, the printer cuts paper directly.
• In marked paper mode, cutting position is specified with marks and cuts paper.
ESC l n X0l X0h Y0l Y0h X1l X1h Y1l Y1h
[Name]
Underline command
[Forma]
ASCII
Hex
1B
Decimal
[Range]
ESC
27
l
6C
108
n
n
X0l X0h Y0l Y0h X1l X1h Y1l Y1h
X0l X0h Y0l Y0h X1l X1h Y1l Y1h
n
X0l X0h Y0l Y0h X1l X1h Y1l Y1h
0 ≤ n ≤ 255
[Description]
Set the position of start point and end point, then make a line in printing buffer area. n indicates
the dots of thickness.
X0l X0h Y0l Y0h set the start point(X0,Y0),X1l X1h Y1l Y1h set the end point
X0 = X0l + X0h×255,Y0 = Y0l + Y0h×255,X1 = X1l + X1h×255,
35
(X1,Y1).
Y1 = Y 1l + Y1h×255.
[Notes]
• This command is effective only in page mode.
• This command can only make horizontal line and vertical line, so Y0 must equal to Y1 when X0
is unequal to X1,and X0 must equal to X1 when Y0 is unequal to Y1.
• This command is not effective when the start point and end point exceeds the printing
ESC t n
[Name]
Select character code table
[Format]
ASCII
ESC
t
n
Hex
1B
74
n
Decimal 27
116
n
[Range]
0 ≤ n ≤ 5, 16 ≤ n ≤ 19,
[Description]
Selects a page n from the character code table.
[Notes]
n
Page
0
PC437
1
Katakana
2
PC850
3
PC860
4
PC863
5
PC865
16
WPC1252
17
PC866
18
PC852
19
PC858
ƒ This command is enabled only for 203 DPI printers.
ƒ If the character set in printer is Chinese font, this command is not effective.
ƒ If printer font is Chinese character font, use ESC M n command to select English font
first, then select page code with this command.
[Default]
ƒ Details see appendix 2 (Character code table)
n=0
36
area.
ESC v
[Name]
Transmit device status
[Format]
ASCII
ESC
v
Hex
1B
76
Decimal 27
118
[Description]
Transmits the device status in one-byte data.
[Notes]
• The command is non-real time
• Transmits the status via serial interface and/or USB interface. If printer has serial and
USB interfaces, the data return to serial and USB interface at same time.
Define returned bytes as follows:
Bit
On/Off
Hex
Device Status
0
0/1
00/01
Paper adequate / Paper near end
1
0/1
00/02
Print head close / Print head open
2
0/1
00/04
Paper adequate / Paper end
3
0/1
00/08
Print head normal / overheat
4
0/1
00/10
Cutter normal / Cutter error
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.
♦ When the LSB of n is 0, upside-down printing mode is turned off.
♦ When the LSB of n is 1, upside-down printing mode is turned on.
[Notes]
ƒ Only the LSB of n is valid.
ƒ This command is enabled only when processed at the beginning of a line in standard
mode.
ƒ When this command is input in page mode, the printer performs only internal flag
operations.
ƒ This command does not affect printing in page mode.
[Default]
[Example]
n=0
37
FS p n m
[Name]
Print NV bit image
[Format]
ASCII
FS
p
n
m
Hex
1C
70
n
m
Decimal 28
[Range]
112
n
m
1 ≤ n ≤ 255
0 ≤ m ≤ 3 , 48 ≤ m ≤51
[Description]
Prints a NV bit image n using the mode specified by m.
203DPI:
m
Vertical Dot Density
(DPI)
Mode
Horizontal Dot
Density (DPI)
0.48
Normal
203
203
1.49
Double-width
203
101
2.50
Double-height
101
203
3.51
Quadruple
101
101
300DPI:
m
Vertical Dot Density
(DPI)
Mode
Horizontal Dot
Density (DPI)
0.48
Normal
300
300
1.49
Double-width
300
150
2.50
Double-height
150
300
3.51
Quadruple
150
150
♦ n is the number of the NV bit image (defined using the FS q command).
♦ m specifies the bit image mode.
[Notes]
ƒ NV bit image means a bit image which is defined in a non-volatile memory by FS q and
printed by FS p.
ƒ This command is not effective when the specified NV bit image has not been defined.
ƒ This command is not affected by print modes (emphasized, double-strike, underline,
character size, white/black reverse printing, or 90° rotated characters, etc.), except
upside-down printing mode.
ƒ If the downloaded bit-image to be printed exceeds one line, the excess data is not
printed.
ESC *, FS q, GS /, GS v 0
[Reference]
38
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]
1 ≤ n ≤ 255
0 ≤ xL ≤ 255
1 ≤ ( xL + xH × 256) ≤ 1023
1 ≤ ( yL + yH × 256) ≤ 8191
0 ≤ d ≤ 255
k = ( xL + xH × 256) × ( yL + yH × 256) × 8
Total defined data area(MAX) = 512K 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.
[Notes]
ƒ Frequent write command execution may cause damage to the NV memory.
Therefore, it is recommended to write the NV memory 10 times or less a day.
ƒ This command cancels all NV bit images that have already been defined by this
command. The printer cannot redefine only one of several data definitions previously
defined. In this case, all data needs to be sent again.
ƒ During the processing of this command, the printer is busy to write data to NV memory
and stops receiving any more commands. Therefore, before the ending of the
processing of this command, do not send any other commands even real-time
commands to the printer.
ƒ 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.
ƒ This command commences 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 the defined range by xL, xH, yL, yH.
ƒ In the first group of NV bit images, when any of the parameters xL, xH, yL, yH is out
of the definition range, this command is disabled.
ƒ In groups of NV bit images other than the first one, when the printer processes xL, xH,
39
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 512K 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 512K bytes (64K bytes).
(Different printer download different space, please refer to printer configuration)
ƒ During the processing of this command, the printer does not transmit status and does
not respond to status inquiry as well.
ƒ 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.
[Reference]
FS p
[Example]
When xL = 64, xH = 0, yL = 96, yH = 0
40
GS FF
[Name]
Feed paper until the next black mark reaches print position
[Format]
ASCII
GS
FF
Hex
1D
0C
Decimal 29
[Description]
12
Feed paper until the next black mark reaches print position
GS ! n
[Name]
n select character size
[Format]
ASCII
GS
!
n
Hex
1D
21
n
Decimal 29
[Range]
33
n
0 ≤ n ≤ 255
(1 ≤ vertical number of times ≤ 6, 1 ≤ horizontal number of times ≤ 6)
[Description] Selects the character height using bits 0 to 3 and selects the character width using bits 4
to 7, as follows:
Bit
Off/On
0-3
Character height selection. See Table 2.
4-7
Character width selection. See Table 1.
Table 1
Hex
Decimal
Table 2
41
Function
Character Width Selection
[Notes]
Character Height Selection
ƒ
Hex
Decimal
Width
Hex
Decimal
Width
ƒ
00
0
1 (normal)
00
0
1 (normal)
ƒ
10
16
2
01
1
2
20
32
3
02
2
3
30
48
4
03
3
4
40
64
5
04
4
5
50
80
6
05
5
6
60
96
6
06
6
6
70
112
6
07
7
6
ƒ
ƒ
ƒ This command is effective for all characters (alphanumeric and Kanji) 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]
[Reference]
n=0
ESC !
GS # n
[Name]
Specify a number for the bit-image to be downloaded.
[Format]
ASCII
GS
#
n
Hex
1D
23
n
Decimal 29
35
n
[Range]
0≤n≤7
[Description]
Specifies a number for the bit-image to be downloaded. This number is to be used when
downloading and printing this bit-image.
[Notes]
ƒ The command is only enabled for bit-images in RAM and the settings are erased
when the printer is turned off.
42
GS $ nL nH
[Name]
Set absolute vertical print position in page mode
[Format]
ASCII
GS
$
nL nH
Hex
1D
24
nL nH
Decimal 29
36
nL nH
[Range]
0 ≤ nL ≤ 255, 0 ≤ nH ≤ 255
[Description]
♦ Sets the absolute vertical print starting position for buffer character data in page
mode.
♦ This command sets the absolute print position to [(nL + nH × 256) × (vertical or
horizontal motion unit)] inches.
[Notes]
ƒ This command is effective only in page mode.
ƒ If the [(nL+ nH × 256) × (vertical or horizontal motion unit)] exceeds the specified
printing area, this command is ignored.
ƒ The horizontal starting buffer position does not move after enabling the
command.
ƒ The reference starting position is specified by ESC T.
ƒ This command operates as follows, depending on the starting position of the
printing area specified by ESC T:
-When the starting position is set to the upper left or lower right, this command
sets the absolute position in the vertical direction.
-When the starting position is set to the upper right or lower left, this command
sets the absolute position in the horizontal direction.
ƒ The horizontal and vertical motion units are specified by GS P.
[Reference]
ESC $, ESC T, ESC W, ESC \, GS P, GS \,
GS ( A pL pH n m
[Name]
Execute test printing
[Format]
ASCII
GS
(
A
pL pH n m
Hex
1D
28
41
pL pH n m
[Range] ( pL+( pH × 256))=2 (pL=2, pH=0)
0 ≤ n ≤ 2, 48 ≤ n ≤ 50
1 ≤ m ≤ 3, 49 ≤ m ≤ 51
[Description] • Execute the test printing in the mode decided by n, m
m specifies a test pattern.
m
Test pattern
1, 49
Hexadecimal dump
2, 50
Printer status print
3, 51
Rolling pattern print
43
[Notes]
• This command is enabled only when processed at the beginning of a line in standard mode.
• This command is not effective in page mode.
• When this command is received during macro definition, the printer ends macro definition and
begins performing this command.
• The printer cuts the paper at the end of the test print.
GS ( E pL pH m [parameter]
[Name]
User-defined commands
[Description] The user-defined commands control the values which are stored in the user NV memory.
The functions selected by m as below:
m
Format
Function
1
GS ( E pL pH m d1 d2
Enter user-defined mode
2
GS ( E pL pH m d1 d2 d3
End user-defined mode
3
GS ( E pL pH m [a1 b18 …b11]…[ak bk8…bk1]
Sets
the
customized
data
of
memory switch
4
GS ( E pL pH m a
Transmits the customized data in
the memory switch
• The number of bytes is specified by pL、pH is ( pL + ( pH
256)).
• m specifies the function
• d1、d2、d3 specifies the parameters to select the mode.
• a specifies the type of the stored data.
• bk8...bk1 specifies the value to be set to the stored data which is specified by a .
• In the Function 2, the printer performs the software reset. Therefore, the printer clears the receive
and print buffers, and resets all settings (user-defined characters, downloaded bit images, macros,
and the character style) to the mode that was in effect at power on.
[Notes]
Frequent write command executions by a NV memory write command may damage the NV memory.
Therefore, it is recommended to write the NV memory 10 times or less a day.
GS ( E pL pH m d1 d2 (m = 1) <Function 1>
[Format]
ASCII
Hex
1D
Decimal 29
[Range]
GS
(
28
40
E
45
69 pL
pL
pH
1
pL
pH
m
d1
pH
01 d1 d2
d2
d1 d2
pL = 3, pH = 0
m=1
d1 = 73
d2 = 78
[Description] • Enters to the user-defined mode and transmits the following data:
Header: Hexadecimal = 37H /Decimal = 55 (1 byte)
44
Flage:
Hexadecimal = 20H /Decimal = 32 (1 byte)
NUL:
Hexadecimal = 00H /Decimal = 0 (1 byte)
• In the user-defined mode, only the following commands can be executed:
Function 2, Function 3 and Function 4 of this command and GS I:
GS ( E pL pH m d1 d2 d3 (m = 2) <Function 2>
[Format]
ASCII
GS
(
Hex
1D
28 45
p L pH
02
d1 d2 d3
40 69
p L pH
2
d1 d2 d3
Decimal 29
[Range]
E
pL
pH m
d1 d2 d3
pL = 4, pH = 0
m=2
d1 = 79
d2 = 85
d3 = 84
[Description]• Ends the user-defined mode and performs the software reset. Therefore, the printer clears the
receive and print buffers, and resets all settings (user-defined characters, downloaded bit images,
macros, and the character style) to the mode that was in effect at power on.
• The function with m = 2 of this command is only effective on the user-defined mode.
GS ( E pL pH m [a1 b18...b11]...[ak bk8...bk1] (m = 3) <Function 3>
[Format]
ASCII
Hex
GS
1D
Decimal 29
[Range]
(
28 45
E
pL
40 69
pL
pH m
pH 03
pL
[a1 b18...b11]...[ak bk8...bk1]
[a1 b18...b11]...[ak bk8...bk1]
pH 3
[a1 b18...b11]...[ak bk8...bk1]
10 ≤ ( pL + pH x 256) ≤ 65530
(where ( pL + pH x 256) = 9 (k + 1: 0
pL
255; 0
pH 255)
m=3
1 ≤ a ≤ 8
b = 48, 49, 50
1 ≤ k ≤ 7281
[Description] Changes the setting of the memory switch specified with a using the value of b
b
Function
48
Sets the specified bit to 0
49
Sets the specified bit to 1
50
Does not change the previous status of the specified bit
• The total bits of the memory switch is 8.
• The value of b is processed in order of bit 8 to bit 1;
• If an error occurs in the process of writing data, the memory error process is executed.
• Set b as “2” (50) to the reserved bit.
45
• If the settings are changed, they become effective when the BA-T500 is reset other power is turned
on again.
• The setting values can be checked by executing the self-test.
GS ( E pL pH m a (m = 4) <Function 4>
[Format]
ASCII
GS
(
E
pL
pH m
a
Hex
1D
28
45
pL
pH 04
a
40
69
pL pH 4
Decimal
[Range]
29
a
( pL + pH x 256) = 2 ( pL = 2, pH = 0)
m=4
1 ≤ a ≤ 8
[Function]
Sends the setting values of the memory switch specified with a
The contents of the transmit data are as follows:
Transmit data
Hex
Decimal
Number of data
①Header
37H
55
1 byte
②Flag
21H
33
1 byte
③Data
30H, 31H
48, 49
8 bytes
④NUL
00H
0
1 byte
Contents of data shown in ③ above:
The on/off setting of the memory switch is defined as [Off: Hex=30H/Decimal=48] or [On: Hex=31H
/ Decimal=49]. Each 1 byte for 8 memory switches are transmitted from bit 8 to bit 1.
Example: Transmitted data: “10110001”
(31H, 30H, 31H, 31H, 30H, 30H, 30H, 31H)
Switch No.
8
7
6
5
4
3
2
1
Status
On
Off
On
On
Off
Off
Off
On
• If an unsupported memory switch number is selected, this command is ignored.
• If this command is ignored, the printer doesn’t send any data.
GS * x y d1...d(x × y × 8)
[Name]
Define downloaded bit image
[Format]
ASCII
GS
*
x y d1...d(x × y × 8)
Hex
1D
2A
x y d1...d(x × y × 8)
Decimal 29
[Range]
42
x y d1...d(x × y × 8)
1 ≤ x ≤ 255, 1 ≤ y ≤ 255
x × y ≤ 2048
0 ≤ d ≤ 255
[Description]
Defines a downloaded bit image using the number of bytes specified by x and y
♦ x specifies the number of dots in the horizontal direction.
46
♦ y specifies the number of dots in the vertical direction.
[Notes]
ƒ 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 maximum capacity for bit-images in RAM is 16K bytes.
ƒ The execution of ESC & command will erase the bit-images in RAM downloaded with
this command.
ƒ 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 printer is reset or the power is
turned off.
ƒ The number for the bit-image downloaded is defined by GS # command.
ƒ The following figure shows the relationship between the downloaded bit image and
the printed data.
GS /
[Reference]
GS / m
[Name]
Print downloaded bit image
[Format]
ASCII
GS
/
m
Hex
1D
2F
m
Decimal 29
47
m
[Range]
0 ≤ m ≤ 3, 48 ≤ m ≤ 51
[Description]
Prints a downloaded bit image using the mode specified by m.
m selects a mode from the table below:
203DPI:
m
Mode
Vertical Dot Density
(DPI)
Horizontal Dot
Density (DPI)
0, 48
Normal
203
203
1, 49
Double-width
203
101
2, 50
Double-height
101
203
47
3, 51
Quadruple
101
101
300DPI
m
[Notes]
Vertical Dot Density
(DPI)
Mode
Horizontal Dot
Density (DPI)
0, 48
Normal
300
300
1, 49
Double-width
300
150
2, 50
Double-height
150
300
3, 51
Quadruple
150
150
ƒ This command is ignored if a downloaded bit image has not been defined.
ƒ This command has no effect in the print modes (emphasized, double-strike,
underline, character size, or white/black reverse printing), except for upside-down
printing mode.
ƒ The command sets the position after printing to the beginning of next line.
ƒ If the downloaded bit-image to be printed exceeds the printable area, the excess data
is not printed.
ƒ The command prints bit-images in RAM and not that in NV memory. The number for
the bit-image to be printed is defined by GS # command.
[Reference]
GS * , GS #
GS :
[Name]
Start/end macro definition
[Format]
ASCII
GS
:
Hex
1D
3A
Decimal 29
58
[Description]
Starts or ends macro definition.
[Notes]
ƒ Macro definition starts when this command is received during normal operation.
Macro definition ends when this command is received during macro definition.
ƒ When GS ^ is received during macro definition, the printer ends macro definition and
clears the definition.
ƒ When GS *、FS q is received during macro definition, the printer ends macro definition
and clears the definition.
ƒ Macro operates once automatically when macro definition is over.
ƒ Macro is not defined when the power is turned on.
ƒ The defined contents of the macro are not cleared by ESC @. Therefore, ESC @ can
be included in the contents of the macro definition.
ƒ The contents of the macro can be defined up to 2046 bytes. If the macro definition
exceeds 2046 bytes, excess data is processed as normal data.
[Reference]
GS ^
48
GS B n
[Name]
Control 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.
[Notes]
ƒ Only the LSB of n is valid.
ƒ This command is available for all built-in characters and user-defined characters
except HRI characters.
ƒ When white/black reverse printing mode is on, it also applies to the character
spacing set by ESC SP.
ƒ This command does not affect bit images, user-defined bit images, bar codes,
HRI characters, and spacing skipped by HT, ESC $, and ESC \.
ƒ This command does not affect the space between lines.
ƒ Underline mode is disabled when white/black reverse mode is selected. (If
underline was enabled, it will be re-enabled when white/black reverse mode is
[Default]
turned off.
n=0
GS C 0 n m
[Name]
Select counter print mode
[Format]
ASCII
GS
C
0
n
Hex
1D
43 30 n
m
Decimal
29
67 48 n
m
[Range]
m
0 ≤ n ≤ 5
0 ≤ m ≤ 2, 48 ≤ m ≤ 50
[Description]
Select a print mode for the serial number counter
n specifies the number of digitals to be printed as follows:
when n = 0, the printer prints the actual digits.
when n = 1 to 5, the printer prints the actual digits indicated by the number value.
m specifies the printing position within the entire range of printer digits as follow:
49
[Notes]
m
Printing position
Processing of digits less than those specified
0,48
Align right
Adds spaces to the left
1,49
Align right
Adds 0 to the left
2,50
Align left
Adds spaces to the right
• If n or m out of the defined range, the previously set print mode is not changed.
• If n =0,mdoes not have any meaning.
[Default]
n = 0, m = 0
[Reference] GS C 1, GS C 2, GS C, GS c
[Examples]
GS C 1 aL aH bL bH n r
[Name] Select count mode (A)
[Format]
[Range]
ASCII
GS
C
1
aL aH bL bH n
r
Hex
1D
43 31 aL aH bL bH n
r
Decimal 29
67 49 aL aH bL bH n
r
0 ≤ aL ≤ 255
0 ≤ aH ≤ 255
0 ≤ bL ≤ 255
0 ≤ bH ≤ 255
0 ≤ n ≤ 255
0 ≤ r ≤ 255
[Description]
Select a count mode for the serial number counter.
• aL, aH bL, bH specify the counter range.
• n indicates the stepping amount when counting up or down.
• r indicates the repetition number when the counter value is fixed.
[Notes]
Count-up mode is specified when
[ aL + aH 256] < [ bL + bH 256] , n
0 and r
0.
0 and r
0.
ƒ Count-down mode is specified when
[ aL + aH 256] > [ bL + bH 256] ,n
ƒ Count stop when
[ aL + aH x 256] = [ bL + bH x 256] , n = 0 or r = 0.
50
ƒ If setting count-up mode, the minimum value of the counter is [ aL + aH x 256],the maximum
number is [ bL + bH x 256].If counting up reaches a value exceeding the maximum, it is
resumed with the minimum value.
ƒ If setting count-down mode, the maximum value of the counter is [aL + aH x 256], the
minimum number is [ bL + bH x 256].If counting down reaches a value less than the minimum,
it is resumed with the maximum value.
ƒ When this command is executed, the internal counter that indicates the repetition number
specified by r is cleared.
[Default]
aL = 1, aH = 0, bL = 255, bH = 255, n =1, r = 1
[Reference] GS C 0, GS C 2, GS C, GS c
GS C 2 nL nH
[Name]
Select counter
[Format]
ASCII
[Range]
GS
C
2
nL
Hex
1D
43
32 nL mH
Decimal
29
67
50 nL mH
mH
0 ≤ nL ≤ 255
0 ≤ nH ≤ 255
[ Description] Set the serial number counter value
ƒ nL and nH determine the value of the serial number set by [ nL + nH x 256].
[Notes]
In count-up mode, if the counter value specified by this command goes out of the counter
operation range specified by GS C 1 or GS C;, it is forced to convert to the minimum value.
ƒ In count-down mode, if the counter value specified by this command goes out of the counter
operation range specified by GS C 1 or GS C;, it is forced to convert to the maximum value.
[Default]
nL = 1, nH = 0
[Reference]
GS C 0, GS C 1, GS C ; GS c
GS C ; sa ; sb ; sn; sr; sc;
[Name]
Select count mode
[Format]
[Range]
ASCII
GS
C
;
sa ;
sb ;
sn ;
sr
;
sc
Hex
1D
43 3B sa 3B sb 3B sn 3B sr
3B sc
3B
Decimal
29
67 59 sa 59 sb 59 sn 59 sr
59 sc
59
0 ≤ sa ≤ 65535
0 ≤ sb ≤ 65535
0 ≤ sn ≤ 255
0 ≤ sr ≤ 255
0 ≤ sc ≤ 255
These values are all character strings
51
;
[Description]

Select a count mode for the serial number counter.
• sa, sb, sn, sr and scare all displayed in ASCII characters, using the codes for "0" to "9".
• sa and sb set the counter range.
• sn indicates the stepping amount of counting up or down.
• sr indicates the repetition number with the counter value fixed.
• sc indicates the counter value.
[Notes]
•
ƒ
Count-up mode is specified when:sa < sb ,sn
0 , sr
ƒ
Count-down mode is specified when:sa > sb , sn
ƒ
Count stop when:sa = sb or sn = 0 or sr = 0.
0.
0 , sr
0.
When count-up mode is specified, sa is the minimum counter value and sb is the maximum
counter value. If the counter value set by sc is outside the counter operation range, the counter
value is forced to convert to the minimum value.
ƒ When count-down mode is specified, sa is the maximum counter value and sb is the minimum
counter value. If the counter value set by sc is outside the counter operation range, the counter
value is forced to convert to the maximum value.
ƒ Parameters sa to sc can be omitted. If omitted, these argument values are unchanged.
ƒ Parameters sa to sc must not contain characters, except 0 to 9.
ƒ If an incorrect syntax is used, the corresponding parameter setting has no effect, and the data
after that is processed as normal data.
[Default]
sa = 1, sb = 65535, sn = 1, sr = 1, sc = 1
[Reference] GS C 0, GS C 1, GS C 2, GS c
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:
[Notes]
n
Printing position
0, 48
Not printed
1, 49
Above the bar code
2, 50
Below the bar code
3, 51
Both above and below the bar code
ƒ HRI indicates Human Readable Interpretation.
ƒ The commands (include white/black reverse, emphasized, character size, underline,
90° clockwise-rotation) don’t affect HRI.
ƒ HRI characters are printed using the font specified by GS f.
52
[Default]
n=0
[Reference]
GS f, GS k
GS I n
[Name]
Transmit printer configuration
[Format]
ASCII
GS
I
Hex
1D
49
n
Decimal 29
73
n
n
[Range]
n = 68, 69, 153
[Description]
Transmits the printer configuration specified by n as follows:
[Notes]
n
Printer configuration
68
Transmit firmware version
69
Transmit Boot Loader version
153
Transmit Printer name
ƒ This command is only enabled for USB and/or serial interfaces. If printer has serial
and USB interface, data return to serial and USB interface at the same time.
GS L nL nH
[Name]
Set left margin
[Format]
ASCII
GS
L
nL nH
Hex
1D
4C
nL nH
Decimal 29
[Range]
76
nL nH
0 ≤ nL ≤ 255
0 ≤ nH ≤ 255
[Description]
Sets the left margin using nL and nH.
The left margin is set to [(nL + nH × 256) × horizontal motion unit)] inches.
[Notes]
ƒ This command is only effective 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 does not affect printing in page mode.
ƒ If the setting exceeds the printable area, this command is ignored.
ƒ The horizontal and vertical motion units are specified by GS P. Changing the
horizontal and vertical motion unit does not affect the current left margin.
53
[Default]
nL = 0, nH = 0
[Reference]
GS P, GS W
GS P xL xH yL yH
[Name]
Set horizontal and vertical motion units
[Format]
ASCII
GS
P
xL xH yL yH
Hex
1D
50
xL xH yL yH
Decimal 29
[Range]
80
xL xH yL yH
x = xL + xH x 256, y = yL + yH x 256
0 ≤ x ≤ 360 ,0 ≤ y ≤ 360
0 ≤ y ≤360
[Description]
Sets the horizontal and vertical motion units to approximately 25.4/ x mm {1/ x inches}
and approximately 25.4/ y mm {1/ y inches} respectively. When x and y are set to 0, the
default setting of each value is used.
[Notes]
ƒ The horizontal direction is perpendicular to the paper feed direction and the vertical
direction is the paper feed direction.
ƒ In standard mode, the following commands use x or y, regardless of character rotation
(upside-down or 90° clockwise rotation):
-Commands using x: ESC SP, ESC $, ESC \, FS S, GS L, GS W
-Commands using y: ESC 3, ESC J, GS V
ƒ In page mode, the following command use x or y, depending on character orientation:
- When the print starting position is set to the upper left or lower right of the
printing area using ESC T (data is buffered in the direction perpendicular to the
paper feed direction):
Commands using x: ESC SP, ESC $, ESC W, ESC \, FS S
Commands using y: ESC 3, ESC J, ESC W, GS $, GS \, GS V
- When the print starting position is set to the upper right or lower left of the
printing area using ESC T (data is buffered in the paper feed direction):
Commands using x: ESC 3, ESC J, ESC W, GS $, GS \
Commands using y: ESC SP, ESC $, ESC W, ESC \,FS S,
GS V.
ƒ If the related commands are not executed after changing motion unit, relative settings
shall not be changed.
ƒ The minimum motion unit is a combined result of this command and other commands.
300 DPI model: x = 305, y = 305; 203 DPI model: x = 203, y = 203
ESC SP, ESC $, ESC 3, ESC J, ESC W, ESC \, GS $, GS L, GS V, GS W, GS \
[Default]
[Reference]
54
GS V m GS V m n
[Name]
Select cut mode and cut paper
[Format]
ASCII
GS
m
Hex
1D
56
m
Decimal
29
86
m
ASCII
[Range]
V
GS
V
m
n
Hex
1D
56
m
n
Decimal
29
86
m
n
m = 0, 48
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
[Notes for
[Note for
and ]
]
Print mode
0,48
Full cut
66
Feeds paper (n × vertical motion unit) inches and cuts the paper fully.
ƒ This command is only effective when processed at the beginning of a line.
ƒ When m = 0 or 48, if the paper feed length (L1) is less than the minimum page
length (Lm) specified when executing this command, the printer feeds paper
(Lm-L1) long and cuts paper. Otherwise, the printer cuts paper directly.
ƒ When m = 66, the printer feeds paper (n × vertical motion unit) first. If the total
paper feed length (L2) is less than the minimum page length (Lm) specified
when executing this command, the printer feeds paper (Lm-L2) long and cuts.
Otherwise, the printer cuts paper directly.
ƒ The horizontal and vertical motion units are specified by GS P.
ƒ The vertical motion unit (y) is used for calculating the paper feed length.
ƒ In marked paper mode cutting position is set with mark and cut paper.
GS W nL nH
[Name]
Set printing area width
[Format]
ASCII
GS
W
nL nH
Hex
1D
57
nL nH
Decimal 29
[Range]
87
nL nH
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.
55
[Notes]
ƒ This command is only effective when processed at the beginning of the line in page
mode.
ƒ 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 and print
area width.
[Reference]
ƒ The horizontal motion unit (x) is used for calculating the printing area width.
GS L, GS P
GS \ nL nH
[Name]
Set relative vertical print position in page mode
[Format]
ASCII
GS
\
nL nH
Hex
1D
5C
nL nH
Decimal 29
[Range]
92
nL nH
0 ≤ nL ≤ 255
0 ≤ nH ≤ 255
[Description]
Sets the absolute vertical print starting position from the current position in page mode.
This command sets the distance from the current position to [(nL + nH × 256) × vertical
or horizontal motion unit] inches.
ƒ This command is ignored unless page mode is selected.
[Notes]
ƒ When pitch N is specified to the movement downward:
nL + nH × 256 = N
When pitch N is specified to the movement upward (the negative direction).
nL + nH × 256 = 65536 – N
ƒ Any setting that exceeds the specified printing area is ignored.
ƒ This command function as follows specify motion unit, depending on the print starting
position set by ESC T:
- When the starting position is set to the upper left or lower right of the printing, the
vertical motion unit (y) is used.
- When the starting position is set to the upper right or lower left of the printing
area, the horizontal motion unit (x) is used.
ƒ The horizontal and vertical motion units are specified by GS P.
56
ESC $, ESC T, ESC W, ESC \, GS $, GS P
[Reference]
GS ^ r t m
[Name]
Execute macro
[Format]
ASCII
GS
^
r
t
m
Hex
1D
5E
r
t
m
t
m
Decimal 29
[Range]
94
r
0 ≤ r ≤ 255
0 ≤ t ≤ 255
m = 0, 1
[Description]
Executes a macro.
♦ r specifies the number of times to execute the macro.
♦ t specifies the waiting time for executing the macro.
♦ m specifies macro executing mode.
When m = 0:
The macro executes r times continuously at the interval specified by t (t x 250
ms).
When m = 1:
After waiting for the period specified by t, the PAPER OUT LED indicators blink
and the printer waits for the FEED button to be pressed. After the button is
pressed, the printer executes the macro once. The printer repeats the operation
r times.
[Notes]
ƒ The waiting time is t × 250 ms for every macro execution.
ƒ If this command is received while a macro is being defined, the macro definition is
aborted and the definition is cleared.
ƒ If the macro is not defined or if r is 0, the command is disabled.
ƒ When the macro is executed (m = 1), paper always cannot be fed by using the FEED
button.
[Reference]
GS :
GS a n
[Name]
Enable / Disable Automatic Status Back (ASB)
[Format]
ASCII
GS
a
Hex
1D
61
Decimal 29
097
n
n
n
[Range]
0 ≤ n ≤ 255
[Description]
Enables or disables Automatic Status Back function.
57
When the LSB of n = 0, the ASB function is disabled.
When the LSB of n = 1, the ASB function is enabled.
Only the LSB of n is valid.
[Notes]
ƒ If the ASB function is enabled, the printer automatically transmits a four byte data
status. After this, a four byte data status is returned automatically when the printer
status changes.
ƒ Transmit data status only via serial and/or USB interface. If printer has serial and USB
interface, data is returned to the serial and USB interfaces at the same time.
ƒ The four byte status is defined as follows.
First byte (printer information)
Bit
Off/On
Hex.
Status for ASB
0
0/1
00
Paper adequate/ Paper near end
1
0/1
02
Top cover closed / Top cover open
2
0/1
00/04
Paper adequate/ Paper end
3
0/1
00/08
Print head temperature normal/ Print head
overheated
4
0/1
00/10
Cutter normal/ Cutter error
5
0/1
00
Reserve
6
0/1
00
Reserve
7
0
00
Fixed to 0
Second byte (printer information)
Bit
Off/On
Hex.
Description
0
0/1
00/01
PRST without paper / PRST with paper
1
0/1
00/02
Normal/Paper jam on printing part
2
0/1
00/04
Normal/Paper jam on PRST
3
0/1
00/08
Normal/Black mark missing
4
0/1
00/10
Normal/Auto paper loading error
5
0/1
00/20
Buffer not full/buffer full
6
0/1
00/40
System normal/error
7
0
00
Fixed to 0
Third byte (printer information)
Bit
0-4
Off/On
Hex.
Description
00000/10000
00/10
Printer idle status
Normal/Error
00001/10001
01/11
Printing status
Normal/ Error
00010/10010
02/12
Cutting paper status
Normal/ Error
00011/10011
03/13
PRST feeding paper
status Normal/ Error
00100/10100
04/14
PRST waiting status
Normal/Error
58
Possible error*
Top cover open,
Print head overheated, paper end/
near end
Top cover open, Print head
overheated, paper end/ near
end ,Paper jam
Top cover open, Print head
overheated, paper end / near end ,
cutter error
Paper jam
Top cover open, Print head
overheated, paper end / near end ,
paper jam
Top cover open, Print head
overheated, paper end / near end
00101/10101
05/15
PRST retraction
status Normal/Error
00110/10110
06/16
PRST ejection status
Error/Normal
00111/10111
07/17
5
0/1
00/20
6
0/1
00/40
7
0/1
00/80
Auto paper loading
status Normal/Error
PrstIn with paper /
PrstIn without paper
No FEED button
action/FEED button
action
Paper retract
normally/user take the
paper away in the
process of retracting
Top cover open, Print head
overheated, paper end / near end ,
paper jam
Top cover open, Print head
overheated, paper end / near end ,
paper jam
Top cover open, Print head
overheated, paper end / near end
Fourth byte (printer information)
Bit
Off/On
Hex.
Description
0-3
000
00
Fixed to 0
4-7
111
70
Fixed to 1
Notes:
• The function of the fifth and the seventh bytes are optional (by setting the state of the
PrstIn sensor), the fifth and the seventh bytes are 0 when the function is effective.
• The fifth and the seventh bytes both indicate states and do not effect the action of the
printer.
• The seventh byte will be cleared after the next cut.
• PrstIn indicates the state of the PrstIn sensor before or after retraction, with paper means
that the paper holder is full of paper or some paper is absorbed on the channels.
• When the PrstIn sensor is in ‘with paper’ state before retraction, the printer cannot
determine if the paper was taken away by user in the retraction process
ƒ Explanation of above printer status.
1) Printing status is defined as the process from printing startup to printing finish.
2) Cutting paper status is defined as the whole process from feeding paper to cutting
position before cut to back paper to normal position after cut.
3) PRST paper feeding status is defined as the process from the start of PRST
[Reference]
presenting paper after cutting paper status to the start of PRST holding paper for
being taken away.
DLE EOT n
GS f n
[Name]
Select font for Human Readable Interpretation (HRI) characters
[Format]
ASCII
GS
f
n
Hex
1D
66
n
Decimal 29
[Range]
102
n
n = 0, 1, 48, 49
59
[Description]
Selects a font for the HRI characters used when printing a bar code.
n selects a font from the following table:
n
Font
0,48
Standard ASCII characters :
203DPI (12 × 24)
300DPI (18 x 34)
1,49
Compressed ASCII characters:
203DPI ( 9 x 17)
300DPI (12 x 24)
[Notes]
ƒ HRI indicates Human Readable Interpretation.
ƒ HRI characters are printed at the position specified by GS H.
[Default]
n=0
[Reference]
GS H, GS k
GS h n
[Name]
Select bar code height
[Format]
ASCII
GS
h
n
Hex
1D
68
n
Decimal 29
104
n
[Range]
1 ≤ n ≤ 255
[Description]
n specifies the number of dots in the vertical direction.
[Default]
n = 162
[Reference]
GS k
GS k m d1...dk NUL GS k m n d1...dn
[Name] Print bar code
[Format]
ASCII
GS
Hex
1D
Decimal
ASCII
k
29
GS
m
6B
107
k
m
d1...d k NUL
m
d1...d k 00
m
d1...d k 0
n
d1... dn
Hex
1D
6B
m
n
d1... dn
Decimal
29
107
m
n
d1... dn
[Range] 0 ≤ m ≤ 6, m = 10, 11, 12 (k and d depends on the bar code system used)
65 ≤ m ≤ 73, m = 75, 76, 77 (k and d depends on the bar code system used)
[Description] Selects a bar code system and prints the bar code.
m selects a bar code system as follows:
60
m
Bar Code System
Number of
Characters
Remarks
0
UPC-A
11 ≤ k ≤ 12
48 ≤ d ≤ 57
1
UPC-E
11 ≤ k ≤ 12
48 ≤ d ≤ 57
2
JAN13 (EAN13)
12 ≤ k ≤ 13
48 ≤ d ≤ 57
3
JAN 8 (EAN8)
7≤k≤8
48 ≤ d ≤ 57
4
CODE39
1 ≤ k ≤ 255
45 ≤ d ≤ 57, 65 ≤ d ≤ 90, 32, 36, 37,43
5
ITF
1 ≤ k ≤ 255
48 ≤ d ≤ 57
6
CODABAR
1 ≤ k ≤ 255
48 ≤ d ≤ 57, 65 ≤ d ≤ 68 , 36, 43, 45,46,47,58
10
PDF 417
1 ≤ k ≤ 928
0< d ≤ 255
11
QRCODE
1 ≤ k ≤ 928
0 < d ≤ 255
12
MAXICODE
1 ≤ k ≤ 84
48 ≤ d ≤ 57, 65 ≤ d ≤ 90, 97 ≤ d ≤122
65
UPC-A
11 ≤ n ≤ 12
48 ≤ d ≤ 57
66
UPC-E
11 ≤ n ≤ 12
48 ≤ d ≤ 57
67
JAN13 (EAN13)
12 ≤n ≤ 13
48 ≤ d ≤ 57
68
JAN 8 (EAN8)
7 ≤n ≤ 8
48 ≤ d ≤ 57
69
CODE39
1 ≤ n ≤ 255
45 ≤ d ≤ 57, 65 ≤ d ≤ 90, 32, 36, 37,43
d1 = dk = 42 (1)
70
ITF
1 ≤ n ≤ 255
48 ≤ d ≤ 57
71
CODABAR
1 ≤ n ≤ 255
48 ≤ d ≤ 57 65 ≤ d ≤ 68, 36, 43,45,46,47 58
72
CODE93
1 ≤ n ≤ 255
0 ≤ d ≤ 127
73
CODE128
2 ≤ n ≤ 255
0 ≤ d ≤ 127
75
PDF417
1 ≤ n ≤ 255
0 ≤ d ≤ 255
76
QRCODE
1 ≤ k ≤ 255
0 ≤ d ≤ 255
77
MAXICODE
1 ≤ k ≤ 84
48 ≤ d ≤ 57, 65 ≤ d ≤ 90
[Notes]
▪ This command ends with a NUL code
▪ When UPC-A or UPC-E barcode system is selected, if more than 12 bytes barcode data is
received, the printer will process the excess data as normal data.
▪ When JAN13 (EAN13) barcode system is selected, if more than 13 bytes barcodes data is
received, the printer will process the excess data as normal data.
▪ When JAN8 (EAN8) barcode system is selected, if more than 8 bytes barcodes data is received,
the printer will process the excess 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.
▪ The first data of CODABAR barcode should be between from 65 ~ 68, and the last data should
be one of 42, 65, 66, 67, 68, 69, 78, 84.
▪ The first data and the last data of CODE39 barcode should be 42, otherwise the printer will force
the first data and the last data to 42.
▪ When selecting QRCODE barcode, d1...d k(d1…dn)consists of five parts, the format is as
following:
61
1) Daabbcc,
D:Linking structure mode, input particular identifier “D”, this mode is selectable. If this mode is
selected, the rest three parameters and separate symbol should be specified.
aa: The position of particular symbol, input 2 bit numbers in hex.
bb: The sum of symbol, input 2 bit numbers in hex.
Cc: Even or odd data, input 2 bit numbers in hex.
It is a fixed separate symbol
2) E: Error correction class. Range: L, M, Q, H, the correction class increases in turn.
3) M: Mask figure reference, Range: Default is automatic mask.
4) M: Data input mode, Range: A or M, A means automatic mode (recommended mode), M means
manual mode; If A mode is specified, you don’t need specify the character mode; If M mode is
specified, you must specify the character mode. Default mode is automaitic mode.
5) <Character mode><DATA1>,
<Character mode><DATA2>,
<Character mode><DATA3>,
……………………….
<Character mode ><DATAn>
Note: n>=200
Character input mode<N, A, B, K>
N: Number (0~9)
A: Number and alphabet mixed (0~9)(A~Z)(SP,$,%,*,+,-,.,/,:)
Bxxxx: 8 bit as a byte (0x00~0xFF)
K: Katakana
The legal bar width: The ratio of wide and narrow bar can not be adjusted.
Fox example:
1D 6B 0B 51 41 2C 30 31 32 33 34 35 36 37 38 39 41 42 43 44 20 32 44 20 63 6F 64 65 00
(Recommend automatic mode, the data mode symbol A can be omitted)
1D 6B 4c 12 48 4D 2C 4E 31 32 33 34 35 36 37 38 39 31 32 33 34 35
1D 6B 0B 4D 4D 2C 41 41 43 2D 34 32 00
1D 6B 0B 4C 4D 2C 4E 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 2C 41 41 42 43 2C
42 30 30 30 36 71 72 63 6F 64 65 00
1D 6B 0B 46 2C 4C 4D 2C 4E 30 31 32 33 34 35 36 37 38 39 2C 41 31 32 41 41 42 42 2C
42 30 30 30 36 71 72 63 6F 64 65 00
▪ When selecting MAXICODE barcode, the length of d1...d k (d1…dn) is not beyond the 84
characters, it consists of five parts, the format is as following:
1)
5 numbers of basic post code;
2)
4 numbers of the second post code;
3)
3 numbers of nation code;
4)
3 numbers of service class;
5)
Character string.
62
Legal character: Number and alphabet;
Variable length: Adjustable.
The legal bar width: The ratio of wide and narrow bar can not be adjusted.
For example:
1D 6B 0C 33 32 37 38 39 35 35 35 35 38 34 30 36 36 36 54 48 49 53 20 50 41 43 4B 41 47
45 49 53 20 47 4F 49 4E 47 20 54 4F 20 44 41 54 41 4D 41 58 43 4F 52 50 2E 00
[Notes]
· 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 beyond of the specified range, the printer stops command processing and processes the
following data as normal data.
[Notes in standard mode]
· If d is beyond the specified range, the command will be disabled.
· If the horizontal size is beyond printing area, the overrun parts will not be printed.
· 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, this command is ignored.
· 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 reverse printing, or 90° rotated character, etc.), except for upside-down
printing mode.
[Notes 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 beyond the specified range, this command is ignored.
· If bar code width is beyond the printing area, this command is ignored.
When CODE128 (m = 73) is used:
· Refer to the relative information of the CODE 128 bar code and its character sets.
· When using the CODE 128 in this printer, take the following points into account for data
transmission:
- The top of the bar code data string must be code set selection character (any of CODE A, CODE
B or CODE C) which selects
- Special characters are defined by combining two characters "{" and one character. The ASCII
character "{" is defined by transmitting "{" twice consecutively.
63
The following data should be selected in corresponding character sets.
Specific
[Example]
Transmit data
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
FNC2
{2
7B, 32
123, 50
FNC3
{3
7B, 33
123, 51
FNC4
{4
7B, 34
123, 52
"{"
{{
7B, 7B
123, 123
Example data for printing "No. 123456"
In this example, the printer first prints "No." using CODE B, then prints the following numbers
using CODE C.
GS k 73 10 123 66 78 111 46 123 67 12 34 56
· If the top of the bar code data is not the code set selection character, the printer stops command
processing and processes the following data as normal data.
· If combination of "{" and the following character does not apply any special character, the printer
stops command processing and processes the following data as normal data.
· If the printer receives characters that cannot be used in the special code set, the printer stops
command processing and processes the following data as normal data.
· The printer does not print HRI characters that correspond to the shift characters or code set
selection characters.
· HRI character for the function character is space.
· HRI characters for the control character (<00>H to <1F>H and <7F>H) are not printed.
<Others>
Be sure to keep spaces on both right and left sides of a bar code. (Spaces are different
depending on the types of the bar code.)
[Reference] GS H, GS f, GS h, GS w.
GS o n
[Name]
Set all the parameters to define the QRCODE
[Format]
ASCII
GS
o
m nA nB nC
Hex
1D
6F
m nA nB nC
Decimal 29
111
m nA nB nC
64
[Range]
m = 0, 1 ≤ nA ≤ 255, 0 ≤ nB ≤ 1, 1 ≤ nC ≤ 2
[Description] he meaning of n is defined as follows:
Parameters
[Notes]
Meaning of the parameters
m
Fixed to 0
nA
Width of barcode basic cells
nB
Language mode 0:Chinese 1:Japanese
nC
Symbol type
1:Original type 0: Enhanced type
When the parameter is beyond the range, this command will be disabled.
GS p n
[Name]
Set all the parameters to define the PDF417
[Format]
ASCII
Hex
1D
Decimal 29
GS
p
nA nB nC nD nE nF
70
nA nB nC nD nE nF
112
nA nB nC nD nE nF
[Range]
1 ≤ nA ≤ 10, 1 ≤ nB ≤100, 3 ≤ nC ≤ 90,1 ≤ nD ≤ 30, 1 ≤ nE ≤ 7, 2 ≤ nF ≤ 25
[Description]
the meaning of n is defined as follows:
[Notes]
parameters
meaning of the parameters
nA
Aspect scale factor of height
nB
Aspect Scale factor of width
nC
Number of rows
nD
Number of columns
nE
Width of basic cells
nF
Height of basic cells
nA and nB are valid when nC and nD are equal to zero.
GS q n
[Name]
Set error correcting grade of PDF417
[Format]
ASCII
Hex
1D
Decimal 29
GS
q
71
n
113
n
n
[Range]
0 ≤ n≤ 8
[Description]
Set error correcting grade of PDF417
GS r n
[Name]
Transmit status
[Format]
ASCII
GS
r
n
Hex
1D
72
n
Decimal 29
114
n
65
[Range]
n = 1, 49
[Description]
Transmits the status specified by n as follows:
N
1, 49
[Notes]
Function
Transmits paper sensor status and paper end sensor status
ƒ This command is valid for serial model and / or USB model only. If printer has serial
and USB interfaces, data is returned to serial and USB interfaces at the same time.
ƒ The status types to be transmitted are shown below:
Paper sensor status (n = 1, 49):
Bit
0, 1
2, 3
4
Off/On
Hex
Decimal
Status for ASB
Off
00
0
Paper near-end sensor: paper adequate
On
03
3
Paper near-end sensor: paper near end
Off
00
0
Paper end sensor: paper adequate
On
0c
12
Paper end sensor: paper end
Off
00
0
Not used. Fixed to 0.
5,6
7
[Reference]
Undefined
Off
00
0
Not used. Fixed to 0.
DLE EOT
GS w n
[Name]
Set bar code width
[Format]
ASCII
GS
w
n
Hex
1D
77
n
Decimal 29
119
n
[Range]
2≤n≤6
[Description]
Set the horizontal size of the bar code.
n specifies the bar code width as follows:
Binary-level Bar Code
Thin element width
Thick element
(dots)
width (dots)
n
Module Width (dots) for
Multi-level Bar Code
2
2
2
5
3
3
3
8
4
4
4
10
5
5
5
13
6
6
6
15
♦ Single-level bar codes are as follows:
UPC-A, UPC-E, JAN13 (EAN13), JAN8 (EAN8), CODE93, CODE128
♦ Binary-level bar codes are as follows:
[Default]
[Reference]
CODE39, ITF, CODABAR
n=2
GS k
66
3.Chinese character control commands
FS ! n
[Name] Set print mode for Chinese character
[Format]
ASCII
FS
!
n
Hex
1C
21
n
Decimal 28
[Range]
33
n
0 ≤ n ≤ 255
[Description] Set the print mode for Chinese character, using n as follows:
Bit
0/1
Decimal
Function
0, 1
--
--
--
Undefined
2
0
00
0
Double-width mode is off
1
04
4
Double-width mode is on
0
00
0
Double-height mode is off
1
08
8
Double-height mode is on
4-6
--
--
--
Undefined
7
0
00
0
Underline mode is off
1
80
128
Underline mode is on
3
[Notes]
Hex
• When double-width and double-height mode are set (including right and left side character
spacing), the width and height are doubled at the same time.
• The printer can underling all the character (including right and left side character spacing),
except the space by HT and 90 degree clockwise-rotated characters
• The thickness of underline is specified by FS, regardless with the character size
• When some of the characters on a line are not in the same height, all the characters on
the line are aligned at the baseline.
• It is possible to emphasize the Chinese character by FS W or GS !, the last received
command is effective.
• It is possible to choose underline mode by FS –, the last received command is effective.
[Default]
n=0
[Reference] FS, FS W, GS !
FS &
[Name]
[Format]
Select Chinese character mode
ASCII
Hex
Decimal
[Description]
[Notes]
FS
1C
&
26
28
38
Select Chinese character mode.
• When the Chinese character mode is selected, the printer checks the code is for Chinese
67
character or not, then process the first byte and the second byte if the code is for Chinese.
• When use Chinese GB18030 character set, the printer process the third and the forth byte
if the Chinese character is forth-byte code.
• The printer select Chinese character mode automatically when the power is turned on.
[Reference] FS . , FS C
FS - n
[Name]
[Format]
Turn underline mode off/on for Chinese character
ASCII
FS
-
n
Hex
1C
2D
n
Decimal
28
45
n
[Range] 0 ≤ n ≤ 2, 48 ≤ n ≤ 50
[Description] Turn underline mode off/on for Chinese character, based on the value of the n:
n
[Notes]
Function
0, 48
Turn underline mode off for Chinese character
1, 49
Turn underline mode on for Chinese character(1 dot thick)
2, 50
Turn underline mode on for Chinese character(2 dot thick)
• The printer can underline all the character (including right and left side character spacing),
except the space by HT and 90 degree clockwise-rotated characters.
• When the underline mode for Chinese characters is turned off, underline printing is no longer
executed, but the previously specified thickness is not changed, the default thickness is 1 dot.
• The thickness of the underline will not change if the character size changes.
• It is possible to turn off the underline mode for Chinese characters using FS !, the last
received command becomes effective.
[Default]
n=0
[Reference] FS !
FS .
[Name]
[Format]
Cancel Chinese character mode
ASCII
FS
.
Hex
1C
2E
Decimal
28
46
[Description] Cancel Chinese character mode
[Notes]
• When Chinese character mode is canceled, all the characters are processed one byte at a
time as ASCII code.
• The printer selects Chinese character mode automatically when the power is turned on.
[Reference] FS &, FS C
68
FS 2 c1 c2 d1...dk
[Name]
Defined user-defined Chinese character
[Format]
ASCII
FS
2
c1 c2 d1...dk
Hex
1C
32
c1 c2 d1...dk
Decimal 28
[Range]
50
c1 c2 d1...dk
c1, c2 indicate character code for the defined character
c1 = FEH
A1H ≤ c2 ≤ FEH
0 ≤ d ≤ 255
k = 72
[Description]
[Notes]
Defined user-defined Chinese character specified by c1 and c2.
• c1 ,c2 indicate character code for the defined character,c1 specifies first byte, c2 specifies
the second byte.
• d indicate data.1 indicate to print 1 dot ,0 indicate not print a dot.
[Default]
No user-defined Chinese character.
[Reference] FS C
The relationship of a user-defined Chinese character and the data is described as follow:
69
FS S n1 n2
[Name] Set the right and left character spacing
[Format]
ASCII
FS
S
n1
n2
Hex
1C
53
n1
n2
Decimal 28
[Range]
83
n1
n2
0 ≤ n1 ≤ 255
0 ≤ n2 ≤ 255
[Description] Set the right spacing and the left spacing to n1 and n2 respectively.
• The left spacing is [n1 × horizontal or vertical motion unit] inch, and the right spacing is [n2
×horizontal or vertical motion unit] inch.
[Notes] • When double-width is set, the right and the left spacing is doubled.
• In standard mode, the horizontal motion unit is used.
• In page mode, it is depending on starting position of the printable area as follows:
- When the starting position is set to the upper left or lower right, the horizontal motion unit
is used.
- When the starting position is set to the upper right or lower left, the vertical motion unit is
used.
- The maximum spacing of Chinese character is 36 mm, all setting exceeding the
maximum is converted to the maximum automatically.
[Default]
n1 = 0, n2 = 0
70
FS W n
[Name] Select/cancel quadruple-size mode of Chinese character
[Format]
[Range]
ASCII
FS
W
n
Hex
1C
57
n
Decimal
28
87
n
0 ≤ n ≤ 255
[Description] Select/cancel quadruple-size mode of Chinese character .
• When the LSB of n is 0, quadruple-size mode of Chinese character is turned off.
• When the LSB of n is 1, quadruple-size mode of Chinese character is turned on.
[Notes] • Only the LSB of n is effective.
• When quadruple-size mode is turned on, the size of Chinese character is same as when
double-width mode and double-height mode are both turned on.
• When quadruple-size mode is turned off, the characters are printed in normal size.
• All the character are aligned at the baseline.
• FS ! or GS ! also can select or cancel quadruple-size mode of Chinese character, the last
received command is effective.
[Default]
n=0
[Reference] FS !, GS !
71
4. Programming Instructions
4.1 General Information
1) All programming examples are given in Hex.
2) Commands cited in the instructions are bolded and underlined. For instance, 1B 40. Data following
the commands are not underlined. For instance, 42 43.
3) Contents in parentheses are interpretations of the commands. Parentheses and their contents are
not parts of the commands transmitted to printer.
4.2 Programming ABC
4.2.1 Print modes
a) Standard mode (Line mode)
Standard mode is the default print mode of Kiosk series. In this mode, the printer prints data and feed
paper as long as the line buffer full (data buffered is enough for one print line) or receiving a print
command. For instance, 0A.
Examples:
1B 40 (Initialize the printer)
41 42 43 44 45 46
0A (Print)
Printout: ABCDEF
b) Page mode
In this mode, the printer stores all print data in memory as a virtual page. The virtual page is physically
printed when the printer receives a print command such as 1B 0C or 0C.
Examples:
1B 4C (switch to page mode)
1B 57 20 00 00 00 60 02 20 03 (set print area in page mode)
50 72 69 6E 74 20 49 6E 20 50 61 67 65 20 4D 6F 64 65 33 33 33
0C (print)
1D 56 00 (cut paper).
Printout: Print In Page Mode 333
The standard mode is switched with page mode as follows.
72
4.2.2 Paper supported
Black mark paper is thermal sensitive paper on which black marks are published regularly. The black
marks are referenced to set print area and cut position. Refer to relative user’s manual for detailed black
mark requirements.
Examples:
1B 63 30 02 (select black mark paper)
1D 0C (move the next label to print position) 33 33 33 33 42 6C 61 63 6B 20 4D 61 72 6B 20
50 61 70 65 72
0A (print)
1D 56 00 (cut paper)
Printout:3333Black Mark Paper
Continuous paper is normal thermal sensitive paper rolls which is not used for fixing position.
Examples:
1B 63 30 00 (select continuous paper) 33 33 33 33 20 53 65 72 69 65 73 20 50 61 70 65 72
0A (print)
1D 56 00 (cut paper)
Printout: 3333 Series Paper
4.2.3 PRST action modes
Refer to commands 1B 63 38 n and 1B 63 39 n for detailed information.
If the PRST is enabled, the PRST will startup to hold the front end of printed paper during printing and
accommodate the printed paper. When the printing is finished and the paper is cut, the PRST hands out
the printout by holding the back-end of printed paper and waits for a specified time for the user to take
it away. After the waiting time, the PRST will
a) In retraction mode, retract the printout into a waste-bin to avoid environmental pollution and keep
secret of user-specified information in case the user do not take away the printout within limited time.
b) In ejection mode, discharge the printout to enable the next print (customized model).
c) In waiting mode, wait until the user takes the printout away and discharge it before next printing starts.
If the PRST is disabled, the PRST has no action during printing or after printing. With this selection, the
PRST part is disassembled to avoid paper jam.
Examples:
1) Select continuous paper, standard mode, PRST retraction mode and print.
0A (Set the print starting position to the beginning of the line)
1B 40 (initialize printer)
1B 63 30 00 (select continuous paper)
1B 63 39 04 (set PRST waiting time)
73
1B 63 38 00 (select PRST action mode)
1B 53 (switch to standard mode)
33 33 33 33 33 20 49 6E 20 73 74 61 6E 64 61 72 64 20 6D 6F 64 65 2E 20 54 68 65 20 70 61 70 65 72 20 69
73 20 63 6F 6E 74 69 6E 75 6F 75 73 2E 20 54 68 65 20 70 72 65 73 65 6E 74 65 72 73 20 69 6E 20 72 65 74
72 61 63 74 69 6F 6E 20 6D 6F 64 65 21
0A (print)
1D 56 00 (cut paper)
After transmits the above command, then
Printout: 33333 In standard mode. The paper is continuous. The presenters in
retraction mode!
PRST action: After printing and cutting, the PRST presents out the printed paper and waits for
the user to take it away. If the printout is not taken away within 4 seconds, the PRST retracts
the paper into a waste bin.
2) Select marked paper, page mode and PRST ejection mode.
0A(set the print starting position to the beginning of the line)
1B 40 (initialize printer)
1B 63 30 02 (select black mark paper)
1B 63 39 04 (set PRST waiting time)
1B 63 38 02 (set PRST action mode)
1B 4C (switch into pager mode)
1B 57 00 00 00 00 80 02 00 04 (select print area)
33 33 33 33 33 20 49 6E 20 70 61 67 65 20 6D 6F 64 65 20 61 6E 64 20 74 68 65 20 70 61 70 65 72 20 69 73
20 62 6C 61 63 6B 20 6D 61 72 6B 20 70 61 70 65 72 20 74 68 65 20 70 72 65 73 65 6E 74 65 72 20 69 73 20
69 6E 20 65 6A 65 63 74 69 6F 6E 20 6D 6F 64 65 21
0C(print)
1D 56 00(cut paper)
After transmits the command, then
Printout:33333 In page mode and the paper is black mark paper the presenter is in ejection
mode!
PRST action: After printing and cutting, the PRST presents out the printed paper and wait until the
user takes it away.
4.3 Programming examples
In this paragraph, the most commonly used commands are outlined below (Refer to 2. command set for
detailed usage). The general programming approach followed by programmers is “initialization->set
printing and print data->print and present printout->status check”, read descriptions below carefully for
quickly mastering this approach.
4.3.1Initialization
1) Initialize printer
:1B 40.
2) Select paper type :1B 63 30 n, n = 0 (continuous paper); n = 2(black mark paper).
74
3) Select print mode :1B 53 switch to standard mode (Default) 1B 4C switch to page mode.
4) Select PRST action mode :1B 63 38 n,1B 63 39 n.
4.3.2 Set printing and print data(character /barcode/bit image)
1) Set print area and print position
a) Horizontal tab(09)
b) Set horizontal absolute print position(1B 24)
c) Set horizontal tab positions(1B 44)
d) Select print direction in page mode(1B 54 n)
e) Set print area in page mode(1B 57)
f) Set relative print position(1B 5C nL nH)
g) Select justification(1B 61 n)
h) Set absolute vertical print position in page mode(1D 24)
i) Set left margin(1D 4C)
j) Set horizontal and vertical motion unit(1D 50)
k) Set print area width(1D 57)
l) Set relative vertical print position in page mode(1D 5C)
Examples:
a) Set print area in page mode (width:76, height:100)
0A (set the print starting position to the beginning of the line)
1B 4C (switch to page mode)
1B 57 20 00 00 00 60 02 20 03(set print area)
(The following hex string will print “Print In Page Mode 33333333333333333333333333333333333”)
50 72 69 6E 74 20 49 6E 20 50 61 67 65 20 4D 6F 64 65 20 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
0C(print)
1D 56 00(cut paper)
b) Set horizontal tab position and absolute print position
0A(set the print starting position to the beginning of the line)
1B 40 (Initialize printer)
1B 53(switch to standard mode)
33 33 33 33 33 33
1B 44 08 10 20 00(set horizontal tab position)
09(move the print position to the next horizontal tab position)
33 33 33 33
09(move the print position to the next horizontal tab position)
33 33 33 33
09(move the print position to the next horizontal tab position)
33 33 33 33
75
0A (print)
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
0A (print)
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
1B 24 50 00 (set absolute print position)
(The following hex string will print “New absolute start position 333333333333333“)
4E 65 77 20 61 62 73 6F 6C 75 74 65 20 73 74 61 72 74 20 70 6F 73 69 74 69 6F 6E 20 33 33 33 33 33 33 33
33 33 33 33 33 33 33 33
0A (print)
1D 56 00 (cut paper)
c) Select print direction in page mode
1B 4C (switch to page mode)
1B 57 20 00 00 00 60 02 20 03 (set print area in page mode)
1B 54 00 (select print direction in page mode)
30 30 30 30 30 30 30 30 30 30 30
0A (print)
1B 54 01 (select print direction in page mode)
31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31
0A (print)
1B 54 02 (select print direction in page mode)
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
0A (print)
1B 54 03 (select print direction in page mode)
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
0A (print)
(The following hex string will print “Print End“)
50 72 69 6E 74 20 45 6E 64
0C (print)
1D 56 00 (cut paper)
2) Set character property
a) Turn underline mode on/off (1B 2D n)
b) Select print mode (1B 21 n)
c) Turn up-side-down printing mode on/off (1B 7B n)
d) Select character size(1D 21)
e) Turn white/black reverse printing mode on/off (1D 42 n)
Examples:
0A (set the print starting position to the beginning of the line)
1B 40 (initialize printer)
1B 53 (switch to standard mode)
76
(The following hex string will print “Select underline print mode“)
53 65 6C 65 63 74 20 75 6E 64 65 72 6C 69 6E 65 20 70 72 69 6E 74 20 6D 6F 64 65
1B 2D 02 (turn underline mode on)
(The following hex string will print “Now it works! Select Print mode“)
4E 6F 77 20 69 74 20 77 6F 72 6B 73 21 20 53 65 6C 65 63 74 20 50 72 69 6E 74 20 6D 6F 64 65
1B 21 01 (select print mode)
33 33 33 33 33 33 33
1B 21 00 (select print mode)
(The following hex string will print “Open inverse print mode“)
4F 70 65 6E 20 69 6E 76 65 72 73 65 20 70 72 69 6E 74 20 6D 6F 64 65
0A (print)
1B 7B 01 (turn upside-down printing mode on)
(The following hex string will print “OK!“)
4F 4B 21
0A (print)
1B 7B 00 (turn upside-down printing mode off)
(The following hex string will print “OK! Now I'll show you zoom mode“)
4F 4B 21 20 4E 6F 77 20 49 27 6C 6C 20 73 68 6F 77 20 79 6F 75 20 7A 6F 6F 6D 20 6D 6F 64 65
0A (print)
1D 21 33 (select character size)
(The following hex string will print “OK! It works!“)
4F 4B 21 20 49 74 20 77 6F 72 6B 73 21
0A (print)
1D 21 00 (select character size)
1D 42 01 (turn white/black reverse printing mode on)
33 33 33 33 33 33 33
1D 42 00 (turn white/black reverse printing mode off)
33 33 33 33 33
0A(print)
1D 56 00 (cut paper)
3) Print character/barcode/bit image
a) Print characters
To print ASCII characters, send ASCII codes of characters to printer.
Examples:
1B 40 (initialize printer)
4D 69 63 72 6F 63 6F 6D 20 43 6F 72 70 6F 72 61 74 69 6F 6E
0A (print)
1D 56 00 (cut paper)
Printout:“Microcom Corporation”
b) Print barcode (Refer to command set for detailed information)
77
z Select barcode height (1D 68)
z Select barcode width (1D 77)
z Select font for HRI characters(1D 66)
z Select printing position for HRI characters (1D 48)
z Print barcode (1D 6B)
Example 1: print Code 128 in standard mode
0A (set the print starting position to the beginning of the line)
1B 40 (initialize printer)
1B 53 (switch to standard mode)
(The following hex string will print “Print Code 128“)
50 72 69 6E 74 20 43 6F 64 65 20 31 32 38
1D 68 78 (Select barcode height)
1D 77 03 (Select barcode width)
1D 66 00 (Select font for HRI characters)
1D 48 03 (Select printing position for HRI characters)
1D 6B 49 0B 7B 42 4E 6F 2E 31 32 33 34 35 36 (print barcode)
1D 56 00(cut paper)
Example 2: print code128 in page mode
0A (set the print starting position to the beginning of the line)
1B 4C (switch to page mode)
1B 57 20 00 00 00 60 02 20 03 (set print area in page mode)
1D 5C 80 00 (set relative vertical print position in page mode)
1D 68 78 (set barcode height)
1D 77 03 (set barcode width)
1D 66 00 (select font for HRI characters)
1D 48 03 (select printing position for HRI characters)
1D 6B 49 0B 7B 42 4E 6F 2E 31 32 33 34 35 36 (print barcode)
0C (print)
1D 56 00 (cut paper)
Note: In page mode, the value for relative vertical print position should be larger than the selected
barcode height. Otherwise, the barcode will not be printed completely.
c) Print bit images
User may download a bit image into RAM or Flash and print it (Refer to Command set for details).
Examples: Download a bit image (bit image number 0) into RAM and print it.
0A (set the print starting position to the beginning of the line)
1B 53 (switch to standard mode)
1D 23 00 (specify a number for the bit image to be downloaded)
1D 2F 00 (print downloaded bit image)
1D 2F 01 (print download bit image)
1D 2F 02 (print downloaded bit image)
78
1D 2F 03 (print downloaded bit image)
1D 56 00 (cut paper)
4.3.3 Print and cut paper
To print in line mode, use command 0A. To print in page mode, use command 0C or 1B 0C (do not clear
buffer). Cut paper command is 1D 56 00.
Examples:
1B 4C (switch to page mode)
1B 57 20 00 00 00 60 02 20 03 (set print area in page mode)
(The following hex string will print “Print In Page Mode“)
50 72 69 6E 74 20 49 6E 20 50 61 67 65 20 4D 6F 64 65
1B 0C (print without clearing buffer)
1D 56 00 (cut paper)
1B 0C (print without clearing buffer)
1D 56 00 (cut paper)
0C (print and clear buffer)
1D 56 00 (cut paper)
4.3.4 Status check
User may check the printer status (normal or error) through either real-time status transmission
command or automatic status back function which can transmit status data to host automatically when
error (paper end, print head open, cutter error, paper jam etc.) occurs.
1) Real-time status transmission (10 04 n) command
This command is automatically enabled when the printer is turned on or when an error occurs after the
printer is powered on. Users can use the real-time enable/disable command (1B 63 40 n) to turn on / off
real time commands. When printing with printer drivers, the real-time command is automatically disabled
by the printer driver. If you want to check printer status with the real-time status transmission command
after printing, you must enable the real-time command by using command 1B 63 40 n.
Note: do not check printer status while the printer is printing with the printer driver due to following
reasons.
a) If the status inquiry command is sent to the printer in API mode through USB port, the printer will
process this command as normal bit image data and consequently cause abnormal printout.
b) If the status inquiry command is sent to the printer through the serial interface or the USB interface,
the printer will also process this command data as normal bit image data and consequently cause
abnormal printout.
2) ASB (1D 61 n)
If the ASB command is enabled, the printer will automatically transmit a four-byte status to host when
error occurs or specified printer status changes.
How to obtain correct printer status using ASB.
a) First confirm if the fourth byte is synchronous data and first three bytes are set to text.
b) Printer process status is transmitted based on the third byte of the printers return value. The lower four
bits of third byte gives information on what process the printer is in and whether there are any errors.
79
c) The status of the first byte and second byte based on printer process status give exact printer status
information.
For example,
“01 04 15 F0” is returned by printer.
F0 is synchronous data which cannot be analyzed.
15 : i.e. “10+05” and “05” means the printer is in PRST retraction process and “10”
means that there are error occurring in this process.
04 : means PRST paper jam
01 : means the paper is near end
From information above, the user can learn that printing has finished but PRST has failed to retract the
printout (after the programmed waiting time) and the paper is near end.
The detailed information refers to 1D 61 n
4.3.5 Download bit images into RAM or FLASH
User may download one or more bit images into RAM (RAM bit images) or FLASH (FLASH bit images).
Bit images in FLASH are retained when the printer is powered off while those in RAM are cleared when
the printer is turned off or initialized using command 1B 40. Therefore, the user would need to
re-download the bit images into RAM whenever the printer is restarted or initialized.
Refer to command 1D 2A (download bit images into RAM) and 1C 71 (download bit images into NV) for
detailed information on how to perform the download. In both RAM bit image download and NV bit image
download, a number must be specified for the image to be downloaded. Please read carefully the
commands 1D 2A and 1C 71 for the difference between RAM bit image download and NV bit image
download.
Bit image data processing (example using BMP format bit images)
1. The data is arranged in column data type in the bit image download command. Refer to command 1D
2A and 1C 71 for details.
2. BMP format bit image data is arranged in line data type. Normally, a monochromic BMP image is made
of sixty two (62) bytes of BMP image attributes description (including bit image width and height etc.) and
normal image data. The BMP image data is arranged in multiples of 4 bytes. For example, if the width
is 34 dots, 8 bytes instead of 5 bytes are needed to store the data. Therefore, the total amount of bytes
a bit image occupies in the memory is “(Line width in bits+31)/32*4 * line height in bits”
Below is an example written in VC++ (for reference only).
Note: A non-monochrome BMP image must be transformed into a monochrome image (1-bit color depth)
before downloading it to the printer. Both the height (in pixels) and width (in pixels) of the BMP image
shall be a multiple of eight (8), otherwise the printer may not be able to handle the data correctly.
//************************************************//
//Function: AntiRotateBmp90D
//
//Utility: Transform bmp format bit image into a format that the printer can accept //
//Parameter: pBmpData---Pointer to source data //
//
nPixelsOfWidth----bit image width (in dots)
//
//
nPixelsOfHeight---bit image height (in dots)
//
//
pBmpDataRotated---Pinter to target data
//
//Value return: 1: data transformation ok. 0: parameter error. //
80
//************************************************//
int AntiRotateBmp90D(
char *pBmpData,
const int nPixelsOfWidth,
const int nPixelsOfHeight,
char *pBmpDataRotated
)
{
// Define process variables
int nBytesOfWidth = 0,nBytesOfHeight = 0;
int i=0,col=0,row=0,index = 0,colbyte = 0;
char* midData;
unsigned char tempdata = 0,colnum = 0,rownum = 0;
unsigned char temp[8] = {0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01};
//Comparing parameters
if (pBmpData == NULL || pBmpDataRotated == NULL) return 0;
if (nPixelsOfWidth <= 0 || nPixelsOfHeight <= 0) return 0;
if ((nPixelsOfWidth % 8) != 0 || (nPixelsOfHeight % 8) != 0) return 0;
//get real image dimension
nBytesOfWidth = (nPixelsOfWidth+31)/32*4;
nBytesOfHeight = nPixelsOfHeight / 8;
//White/black reverse,the value 1 in BMP data is for white which is contrary to the printer definition.
midData = (char*)malloc(nBytesOfWidth*nPixelsOfHeight+1);
for(i=0;i<nBytesOfWidth*nPixelsOfHeight;i++){midData[i] = 0xff-pBmpData[i];}
//Rotation. BMP data is arranged in lines while data downloaded to printer are arranged in columns.
for (row = 0; row <nPixelsOfWidth; row++){
for (colbyte = 0; colbyte < nBytesOfHeight; colbyte++){
index = row * nBytesOfHeight + colbyte;
pBmpDataRotated[index] = 0x00;
for (col = 0; col < 8; col++){
colnum = col % 8;
rownum = row % 8;
if(colnum >= rownum)
tempdata = temp[col] & (midData[(nPixelsOfHeight-1-colbyte*8-col)
nBytesOfWidth + row / 8] >> (colnum-rownum));
else
tempdata = temp[col] & (midData[(nPixelsOfHeight-1-colbyte*8-col)
nBytesOfWidth + row / 8] << (rownum-colnum));
pBmpDataRotated[index] |= tempdata;
}
}
}
//release interim buffer
81
*
*
free(midData);
return 1;
}
Example:Download a bit image into RAM and print it.
1D 23 00 (Define a number for the image to be downloaded)
1D 2A 1C 06 (Bit image of Microcom Logo follows)
000000000000000000000000000000000000000000000000000000000000000000000000003FFFFF
FFF8007FFFFFFFFC00FFFFFFFFFC00FFFFFFFFFC00FFFFFFFFFC00FFFFFFFFF800FC000000
0000FC0000000000FC0000000000FC0000000000FC0000000000FC0FFFFFF000FC0FFFFFF800
FC0FFFFFFC00FC0FFFFFFC00FC0FFFFFFC00FC0FFFFFF800FC0000000000FC0000000000FC
0000000000FC00000000007C00000000003E00000000001FFFFFFFF8000FFFFFFFFC0003FFFFF
FFC0007FFFFFFFC000FFFFFFFFC001FFFFFFFF8007C0000000000FC0000000000FC000000000
0FC0000000000FC0000000000FC0FFFFFF000FC0FFFFFFC00FC0FFFFFFC00FC0FFFFFFC00F
C0FFFFFFC00FC0FFFFFF800FC0000000000FC0000000000FC0000000000FC0000000000FC000
0000000FE0000000000FFFFFFFFF800FFFFFFFFFC00FFFFFFFFFC00FFFFFFFFFC007FFFFFFF
F8003FFFFFFFF000000000000000000000000000000000000000000000000000000000000000000
001008000FFFFF907F800FFFFF90C1C00FFFFF9100400FFFFF1100400FF0001100400FFF00100
00007FFF0100000007FFF1000000007FF90000000003F9000000000FF900000001FFF10000001FF
FC107F000FFFC011C1C00FFC001100400FE0001100400FFFFF91E3800FFFFF907F000FFFFF90
00000FFFFF1000000000001000000000001000000FFFFF1000000FFFFF9000000FFFFF9000000F
FFFF90000007FFFF11FFC0000000110C00003FC011080000FFF8119E0003FFFC10F3C007FFFE1
0000007E03F1000000FC00F1000000F800F9000000F80079000000F00079000000F00079000000F
80079000000F800F11FFC007C00F11FFC003E03E110C0000000011880000000010F00007FFFF10
00000FFFFF9000000FFFFF9000000FFFFF9000000FFFFF1000000F07801000000F07E01000000F
07F01000000F07F8107F000F07FE11C1C00F8F7F1100400FFF1F91004007FE0F91F78007FE0790
7F0003F801900000000000900000000E0010000000FFF010000003FFFC10000007FFFE10000007
FBFF1000000FC01F1000000F800F91FFC00F00079108000F00079108000F0007919F000F000790
F3C00F80079000000F800F10000007E03F10000007FFFE10000003FFFC10000001FFF810000000
3FC0100000000000100000007FE01003C001FFF8107F0003FFFE11C20007FFFF11FE0007E03F1
01FC00F800F9001C00F80079000000F00079000000F00079000000F00079000000F80079000000F
800F10000007C01E11000003E03C11000000000011FFC0001F8011FFC000FFF011000003FFFC11
000007FFFE10000007F07F1000000FC01F1000000F80079000000F00079000000F00079000000F0
0079000000F000791FFC00F800791FFC00FC01F10000007F07F10000007FFFE10000003FFFC10
000000FFF0100000001F801000000000001000000000001000000FFFFF90FF800FFFFF9180C00F
FFFF9100400FFFFF1180C00FF80010FF800FFF80103E0007FFF0100000007FFF1000000003FF9
0000000003F9000000001FF900000001FFF10000001FFF81000000FFFC01000000FFC0011FFC00
FE00010E0000FFFFF901C000FFFFF9007000FFFFF91FFC00FFFFF100000000000100000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000A
1D 23 00 (Select the number of the bit image to be printed)
1D 2F 00 (Print the RAM bit image)
82
4.3.6 Recommendations on applicable flow for programm
Make good use of ASB command during programming, since the ASB command is able to
automatically transmit printer status messages. Remember to enable the ASB function by using
command 1D 61 after the printer is turned on.
1) Inquiry printer status
Make sure to send printing data only when the printer is in normal status. We provide all status of
printer, at last printer transmits data to print in normal idle status.
2) Transmits the data to be printed (include the command settings before printing)
If printed data is bit image, don’t transmit status inquiry command when processing printing data.
3) Check printer status after printing. If the ASB is enabled, the status is transmitted automatically.
83
Appendix A: ASCII TABLE
ASCII
Decim
al
HEX
ASCII
Decima
l
HEX
ASCII
Decima
l
HEX
ASCII
Decima
l
HEX
NULL
0
00
SP
32
20
@
64
40
`
96
60
SOH
1
01
!
33
21
A
65
41
a
97
61
STX
2
02
“
34
22
B
66
42
b
98
62
EXT
3
03
#
35
23
C
67
43
c
99
63
EOT
4
04
$
36
24
D
68
44
d
100
64
ENQ
5
05
%
37
25
E
69
45
e
101
65
ACK
6
06
&
38
26
F
70
46
f
102
66
BEL
7
07
‘
39
27
G
71
47
g
103
67
BS
8
08
(
40
28
H
72
48
h
104
68
HT
9
09
)
41
29
I
73
49
i
105
69
LF
10
0A
*
42
2A
J
74
4A
j
106
6A
VT
11
0B
+
43
2B
K
75
4B
k
107
6B
FF
12
0C
,
44
2C
L
76
4C
l
108
6C
CR
13
0D
-
45
2D
M
77
4D
m
109
6D
SO
14
0E
.
46
2E
N
78
4E
n
110
6E
SI
15
0F
/
47
2F
O
79
4F
o
111
6F
DLE
16
10
0
48
30
P
80
50
p
112
70
DC1
17
11
1
49
31
Q
81
51
q
113
71
DC2
18
12
2
50
32
R
82
52
r
114
72
DC3
19
13
3
51
33
S
83
53
s
115
73
DC4
20
14
4
52
34
T
84
54
t
116
74
NAK
21
15
5
53
35
U
85
55
u
117
75
SYN
22
16
6
54
36
V
86
56
v
118
76
ETB
23
17
7
55
37
W
87
57
w
119
77
CAN
24
18
8
56
38
X
88
58
x
120
78
EM
25
19
9
57
39
Y
89
59
y
121
79
SUB
26
1A
:
58
3A
Z
90
5A
z
122
7A
ESC
27
1B
;
59
3B
[
91
5B
{
123
7B
FS
28
1C
<
60
3C
\
92
5C
|
124
7C
GS
29
1D
=
61
3D
]
93
5D
}
125
7D
RS
30
1E
>
62
3E
^
94
5E
~
126
7E
US
31
1F
?
63
3F
_
95
5F
127
7F
84
Appendix B: Code Page Table
Code Page 0 (PC437: USA)
85
Code Page 1(Katakana)
86
Code Page 2 ( PC850: Multilingual)
87
Code Page 3 (PC860: Portuguese)
88
Code Page 4 (PC863: Canadian- French)
89
Code Page 5 (PC865: Nordic)
90
Code Page 16 (WPC1252)
91
Code Page 17 (PC866: Cyrillic #2)
92
Code Page 18 (PC852 Latin2 )
93
Code Page 19 (PC858)
94
Appendix C: Code 128 Bar Code
A.1 Description of the CODE128 Bar Code
Code 128 bar codes can encode 128 unique ASCII characters, 2-digit numerals and special
characters by using one bar code character that is defined by combining code set A, code set B and
code set C. Each code set is used for representing the following characters:
· Code set A: ASCII characters 00H to 5FH
· Code set B: ASCII characters 20H to 7FH
· Code set C: 2-digit numeral characters using one character (100 numerals from 00 to 99)
The following special characters are also available in CODE128:
· SHIFT characters
In code set A, the character just after SHIFT is processed as a character for code set B. In code set
B, the character just after SHIFT is processed as a character for code set A. The character recovers
the previous code set before SHIFT when starting from the second character. SHIFT characters are
used only for switching between code set A and code set B, but cannot make the current code set
enter or exit code set c status.
· Code set selection character (CODE A, CODE B, CODE C).
This character switches the following code set to code set A, B, or C.
· Function character (FNC1, FNC2, FNC3, FNC4)
Code set C allows only FNC1.
95
A.2 Character Set
Characters in Code Set A:
Character
Transmit data
Hex
Decimal
NULL
00
0
SOH
01
STX
Character
Transmit data
Transmit data
Character
Hex
Decimal
(
28
40
P
50
80
1
)
29
41
Q
51
81
02
2
*
2A
42
R
52
82
ETX
03
3
+
2B
43
S
53
83
EOT
04
4
,
2C
44
T
54
84
ENQ
05
5
-
2D
45
U
55
85
ACK
06
6
.
2E
46
V
56
86
BEL
07
7
/
2F
47
W
57
87
BS
08
8
0
30
48
X
58
88
HT
09
9
1
31
49
Y
59
89
LF
0A
10
2
32
50
Z
5A
90
VT
0B
11
3
33
51
[
5B
91
FF
0C
12
4
34
52
\
5C
92
CR
0D
13
5
35
53
]
5D
93
SO
0E
14
6
36
54
^
5E
94
SI
0F
15
7
37
55
_
5F
95
DLE
10
16
8
38
56
FNC1
7B,31
123,49
DC1
11
17
9
39
57
FNC2
7B,32
123,50
DC2
12
18
:
3A
58
FNC3
7B,33
123,51
DC3
13
19
;
3B
59
FNC4
7B,34
123,52
DC4
14
20
<
3C
60
SHIFT
7B,53
123,83
NAK
15
21
=
3D
61
CODEB
7B,42
123,66
SYN
16
22
>
3E
62
CODEC
7B,43
123,67
ETB
17
23
?
3F
63
CAN
18
24
@
40
64
EM
19
25
A
41
65
SUB
1A
26
B
42
66
ESC
1B
27
C
43
67
FS
1C
28
D
44
68
GS
1D
29
E
45
69
RS
1E
30
F
46
70
US
1F
31
G
47
71
SP
20
32
H
48
72
!
21
33
I
49
73
"
22
34
J
4A
74
#
23
35
K
4B
75
$
24
36
L
4C
76
%
25
37
M
4D
77
&
26
38
N
4E
78
'
27
39
O
4F
79
96
Hex
Decimal
Characters in Code Set B:
Character
Transmit data
Hex
Decimal
SP
20
32
!
21
"
Character
Transmit data
Transmit data
Character
Hex
Decimal
H
48
72
p
70
112
33
I
49
73
q
71
113
22
34
J
4A
74
r
72
114
#
23
35
K
4B
75
s
73
115
$
24
36
L
4C
76
t
74
116
%
25
37
M
4D
77
u
75
117
&
26
38
N
4E
78
v
76
118
'
27
39
O
4F
79
w
77
119
(
28
40
P
50
80
x
78
120
)
29
41
Q
51
81
y
79
121
*
2A
42
R
52
82
z
7A
122
+
2B
43
S
53
83
{
7B,7B
123,123
,
2C
44
T
54
84
|
7C
124
-
2D
45
U
55
85
}
7D
125
.
2E
46
V
56
86
—
7E
126
/
2F
47
W
57
87
DEL
7F
127
0
30
48
X
58
88
FNC1
7B,31
123,49
1
31
49
Y
59
89
FNC2
7B,32
123,50
2
32
50
Z
5A
90
FNC3
7B,33
123,51
3
33
51
[
5B
91
FNC4
7B,34
123,52
4
34
52
\
5C
92
SHIFT
7B,53
123,83
5
35
53
]
5D
93
CODEA
7B,41
123,65
6
36
54
^
5E
94
CODEC
7B,43
123,67
7
37
55
_
5F
95
8
38
56
`
60
96
9
39
57
a
61
97
:
3A
58
b
62
98
;
3B
59
c
63
99
<
3C
60
d
64
100
=
3D
61
e
65
101
>
3E
62
f
66
102
?
3F
63
g
67
103
@
40
64
h
68
104
A
41
65
i
69
105
B
42
66
j
6A
106
C
43
67
k
6B
107
D
44
68
l
6C
108
E
45
69
m
6D
109
F
46
70
n
6E
110
G
47
71
o
6F
111
97
Hex
Decimal
Characters in Code Set C
Character
Transmit data
Hex
Decimal
0
00
0
1
01
2
Character
Transmit data
Transmit data
Character
Hex
Decimal
40
28
40
80
50
80
1
41
29
41
81
51
81
02
2
42
2A
42
82
52
82
3
03
3
43
2B
43
83
53
83
4
04
4
44
2C
44
84
54
84
5
05
5
45
2D
45
85
55
85
6
06
6
46
2E
46
86
56
86
7
07
7
47
2F
47
87
57
87
8
08
8
48
30
48
88
58
88
9
09
9
49
31
49
89
59
89
10
0A
10
50
32
50
90
5A
90
11
0B
11
51
33
51
91
5B
91
12
0C
12
52
34
52
92
5C
92
13
0D
13
53
35
53
93
5D
93
14
0E
14
54
36
54
94
5E
94
15
0F
15
55
37
55
95
5F
95
16
10
16
56
38
56
96
60
96
17
11
17
57
39
57
97
61
97
18
12
18
58
3A
58
98
62
98
19
13
19
59
3B
59
99
63
99
20
14
20
60
3C
60
FNC1
7B,31
123,49
21
15
21
61
3D
61
CODEA
7B,41
123,65
22
16
22
62
3E
62
CODEB
7B,42
123,66
23
17
23
63
3F
63
24
18
24
64
40
64
25
19
25
65
41
65
26
1A
26
66
42
66
27
1B
27
67
43
67
28
1C
28
68
44
68
29
1D
29
69
45
69
30
1E
30
70
46
70
31
1F
31
71
47
71
32
20
32
72
48
72
33
21
33
73
49
73
34
22
34
74
4A
74
35
23
35
75
4B
75
36
24
36
76
4C
76
37
25
37
77
4D
77
38
26
38
78
4E
78
39
27
39
79
4F
79
98
Hex
Decimal
Download PDF