Microcom 814M Programming Manual

MODEL 814M
DIRECT THERMAL PRINTER
PROGRAMMING MANUAL
PART NUMBER 880048-0101
© 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 datacharacter /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]
[Format]
[Range]
[Description]
[Notes]
The name and function summary.
The command format is expressed in ASCII, Hex and Decimal separately.
The range of variation value is selected for a command.
The detailed functions of command.
Lists items that will be given attention to. The main features of the command are given in this
paragraph.
[Default]
[Reference]
The primary value used after initialization of the printer (power on).
Lists all other commands related or similar to the command.
5
2. Kiosk Command Set
HT
[Name] [Format]
[Description] [Notes]
[Default]
Horizontal tab. ASCII HT Hex 09 Decimal 9 Moves the print position to the next horizontal tab position.
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 character.
ESC D
[Reference]
LF
[Name] [Format]
[Description]
[Notes] [Reference]
Print and feeds one line. ASCII LF Hex 0A Decimal 10 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. This command sets the print position to the beginning of the line.
ESC 2, ESC 3
6
FF
[Name] [Format]
[Description]
[Notes]
[Reference]
CR
[Name] [Format]
Print and feed paper. ASCII FF Hex 0C Decimal 12 Under page mode, prints the data in the print buffer collectively and returns to standard mode.
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.
ESC FF, ESC L, ESC S
Print and carriage return ASCII CR Hex 0D
Decimal 13 [Description] [Notes]
[Reference]
When automatic line feed is enabled, this command functions the same as LF;
This command is disabled according to the printer configuration.
When automatic line feed is disabled, this command is ignored.
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 Off/On Hex. Description
0 0 0 Fixed to 0 1 1 2 Fixed to 1 2 0/1 00/04 Top cover closed / Top cover open 3 0/1 00/08 No FEED button action / FEED button action 4 1 10 Fixed to 1 5 0/1 0/20 Paper adequate / Paper end 6 0/1 00/40 Normal / Error 7 0 00 Fixed to 0
n=3, Transmits error status defined as below:
Bit Off/On Hex. Description
0 0 00 Fixed to 0 1 1 02 Fixed to 1 2 0 00 Fixed to 0 3 0/1 00/08 Cutter normal / Cutter error 4 1 10 Fixed to 1 5 0/1 00/20 Top cover closed / Top cover open
6 0/1 00/40
7 0 00 Fixed to 0
Print head temperature normal / Print head overheated
n=4, Transmits paper roll sensor status defined as below:
Bit Off/On Hex. Description
0 0 00 Fixed to 0 1 1 02 Fixed to 1 2 0/1 00/04 Paper adequate / Paper near end 3 0/1 00/08 Paper adequate / Paper near end 4 1 10 Fixed to 1 5 0/1 00/20 Paper adequate / Paper end 6 0/1 00/40 Paper adequate / Paper end 7 0 00 Fixed to 0
n = 5, Transmits printer status defined as below:
Bit Off/On Hex. Description
0 0/1 00/01 Paper adequate / Paper near end 1 1/1 00/02 Top cover closed / Top cover open 2 0/1 00/04 Paper adequate / Paper end 3 0/1 00/08 Print head normal / overheated
8
4 0/1 00/10 Cutter normal / Cutter error 5 0 00 Reserve 6 0 00 Reserve 7 0 00 Fixed to 0
n = 6, Transmits printer status defined as below:
Bit Off/On Hex. Description
0 0/1 00/01 PRST without paper / PRST with paper 1 0/1 00/02 Normal / Paper jam at printing site 2 0/1 00/04 Normal / Paper jam on PRST 3 0/1 00/08 Normal / Black mark missing 4 0/1 00/10 Auto paper loading normal / error 5 0/1 00/20 Buffer not full / buffer full 6 0/1 0/40 System normal / system error 7 0 0 Fixed to 0
n = 7, Transmits printer course status:
Bit Off/On Hex. Description Error
00000/10000 00/10
00001/10001 01/11
00010/10010 02/12
00011/10011 03/13
0~4
00100/10100 04/14
00101/10101 05/15
00110/10110 06/16
00111/10111 07/17
5 0/1 00/20
6 0/1 00/40
7 0/1 00/80
Printer idle status Normal / Error
Printing status Normal / Error
Cutting paper status Normal/ Error
PRST feeding paper status Normal / Error
PRST waiting status Normal / Error
PRST retraction status Normal / Error
PRST ejection status Error / Normal
Auto paper loading status Normal / Error
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
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
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 Off/On Hex. Description
0 0/1 00/01 PRST without paper / PRST with paper
1-3 0 00 Fixed to 0
4 1 02 Fixed to 1
5-7 0 00 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] [Format]
[Description] [Notes]
[Reference]
ESC FF
[Name] [Format]
[Description]
Cancel print data in page mode ASCII CAN Hex 18 Decimal 24 In page mode, deletes all print data in the print buffer.
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.
ESC L, ESC W
Print data in page mode ASCII ESC FF Hex 1B 0C Decimal 27 12 In page mode, prints all buffered data in the printing area collectively.
[Notes]
[Reference]
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 character data.
FF, ESC L, ESC S
10
ESC SP n
[Name] [Format]
[Range] [Description]
[Notes]
Set right-side character spacing ASCII ESC SP n Hex 1B 20 n Decimal 27 32 n 0 n 255 Sets the character spacing for the right side of the character to [n × horizontal or vertical motion units] inches.
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:
[Default] [Reference]
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 GS P
11
ESC ! n
[Name] [Format]
[Range] [Description]
[Notes]
[Default]
Select print mode ASCII ESC ! n Hex 1B 21 n Decimal 27 33 n 0 n 255 Selects print mode(s) with n as follows:
Bit 1/0 Hex Decimal Function
0 00 0 Standard ASCII characters 0 1 01 1 Compressed ASCII characters
1,2 Undefined.
0 00 0 Emphasized mode not selected 3 1 08 8 Emphasized mode selected 0 00 0 Double-height mode not selected 4 1 10 16 Double-height mode selected 0 00 0 Double-width mode not selected 5 1 20 32 Double-width mode selected
6 Undefined
0 00 0 Underline mode not selected 7 1 80 128 Underline mode selected
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 ESC -, ESC E, GS !
[Reference]
12
ESC $ nL nH
[Name] [Format]
[Range]
[Description]
[Notes]
Set absolute print position ASCII ESC $ nL nH Hex 1B 24 nL nH Decimal 27 36 nL nH 0 nL 255 0 nH 255 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.
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:
1When 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.
2When the starting position is set to the upper right or lower left of the printable
[Reference]
ESC % n
[Name] [Format]
[Range] [Description]
[Notes]
[Default]
area using ESC T, the vertical motion unit (y) is used.
ESC \, GS $, GS \, GS P
Select/cancel user-defined character set ASCII ESC % n Hex 1B 25 n Decimal 27 37 n 0 n 255 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.
When the user-defined character set is canceled, the internal character set is
automatically selected. n is available only for the least significant bit. n = 0
[Reference]
ESC &, ESC ?
13
ESC & y c1 c2 [x1 d1...d(y × x1)]...[xk d1...d(y × xk)]
[Name] [Format]
[Range]
[Description]
Define user-defined characters 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)] 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 Defines user-defined characters. y specifies the number of bytes in the vertical direction.
[Notes]
[Default]
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. 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. 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] [Format]
[Range]
[Description]
Download and print bit-image ASCII ESC * m nL nH d1...dk Hex 1B 2A m nL nH d1...dk Decimal 27 42 m nL nH d1...dk m = 0, 1, 32, 33, 35 0 nL 255 0 nH 3 0 d 255 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 Bit-Image Mode
0 8-dot single-density 8 67 DPI 101 DPI nL + nH × 256
1 8-dot double-density 8 67 DPI 203 DPI nL + nH × 256 32 24-dot single-density 24 203 DPI 101 DPI ( nL + nH × 256) × 3 33,35 24-dot double-density 24 203 DP 203 DPI ( nL + nH × 256) × 3
Vertical Direction Horizontal Direction
Number
of Dots
Dot
Density
Dot
density
Number of Data (K)
300DPI
m
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
Mode
Vertical Direction Horizontal Direction
Number
of Dots
Dot
Density
Dot
density
Number of Data (K)
16
[Notes]
If the value of m is out of the specified range, nL and data following are processed as
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] [Format]
[Range] [Description]
[Notes]
[Default] [Reference]
Turn underline mode on/off ASCII ESC - n Hex 1B 2D n Decimal 27 45 n 0 n 2, 48 n 50 Turns underline mode on or off, based on the following values of n:
n Function
0, 48 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. n = 0 HT, ESC !
18
ESC 2
[Name] [Format]
[Description] [Notes] [Reference]
ESC 3 n
[Name] [Format]
[Range] [Description] [Notes]
Select default line spacing ASCII ESC 2 Hex 1B 32 Decimal 27 50 Selects 1/6-inch line (approximately 4.23 mm) spacing. The line spacing can be set independently in standard mode and in page mode. ESC 3
Set line spacing ASCII ESC 3 n Hex 1B 33 n Decimal 27 51 n 0 n 255 Sets the line spacing to [ n × vertical or horizontal motion unit] inches. The line spacing can be set independently in standard mode and in page mode.
[Default] [Reference]
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). ESC 2, GS P
19
ESC = n
[Name] [Format]
[Range] [Description] [Notes]
[Default]
ESC ? n
[Name]
Set peripheral device ASCII ESC = n Hex 1B 3D n Decimal 27 61 n 0 n 255 Disable or enable peripheral device to which host computer sends data.
• 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. N = 1
Cancel user-defined characters
[Format]
[Range] [Description] [Notes]
[Reference]
ASCII ESC ? n Hex 1B 3F n Decimal 27 63 n 32 n 127 Cancels user-defined characters. 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. ESC &, ESC %
20
ESC @
[Name] [Format]
[Description]
[Notes]
Initialize printer ASCII ESC @ Hex 1B 40 Decimal 27 64 Clears the data in the print buffer and resets the printer mode to the default mode when the power was turned on.
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] [Format]
[Range]
Set horizontal tab positions ASCII ESC D n1... nk NUL Hex 1B 44 n1...nk 00 Decimal 27 68 n1...nk 0 1 n 255
[Description]
[Notes]
0 k 32 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. 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
[Example]
width changes. The character width is independent for each standard and page mode. When n = 8, printing position is at the ninth line
21
[Default]
[Reference]
ESC E n
[Name] [Format]
[Range] [Description]
[Notes]
The default tab positions are at intervals of 8 standard ASCII characters (columns 9, 17,
25). HT
Turn emphasized mode on/off ASCII ESC E n Hex 1B 45 n Decimal 27 69 n 0 n 255 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.
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.
[Default] [Reference]
ESC G n
[Name] [Format]
[Range] [Description]
[Notes]
Printer output is the same in double-strike mode and in emphasized mode. n = 0 ESC !, ESC G
Turn on/off double-strike mode ASCII ESC G n Hex 1B 47 n Decimal 27 71 n 0 n 255 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.
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] [Reference]
n = 0 ESC E, ESC !
22
ESC J n
[Name] [Format]
[Range] [Description]
[Notes]
Print and feed paper ASCII ESC J n Hex 1B 4A n Decimal 27 74 n 0 n 255 Prints the data in the print buffer and feeds the paper [ n × vertical or horizontal motion unit] inches. 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.
[Reference]
ESC L
[Name] [Format]
[Description] [Notes]
-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
Select page mode ASCII ESC L Hex 1B 4C Decimal 27 76 Switches from standard mode to page mode. 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
[Reference]
ESC M n
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 @. FF, CAN, ESC FF, ESC S, ESC T, ESC W, GS $, GS \
[Name] [Format]
[Range] [Description]
Select character font ASCII ESC M n Hex 1B 4D n Decimal 27 77 n n = 0, 1, 2, 3, 48, 49, 50, 51 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 ChineseGB2312
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] [Format]
[Range] [Description]
[Notes] [Default]
Select an international character set ASCII ESC R n Hex 1B 52 n Decimal 27 82 n 0 n 13 Selects an international character set n from the following table,see below:
n
Country
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 ] ^ ` { | } ~
23 24 40 5B 5C 5D 5E 60 7B 7C 7D 7E
ASCII Code (Hex)
This command is only enabled for 203DPI printer. n = 0
ESC S
[Name] [Format]
[Description] [Notes]
Select standard mode ASCII ESC S Hex 1B 53 Decimal 27 83 Switches from page mode to standard mode.
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
[Reference]
ESC T n
[Name] [Format]
-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.
FF, ESC FF, ESC L
Select print direction in page mode ASCII ESC T n Hex 1B 54 n
[Range]
[Description]
[Notes]
Decimal 27 84 n 0 n 3 48 n 51 Selects the print direction and starting position in page mode. n specifies the print direction and starting position as follows:
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
Loading...
+ 72 hidden pages