Citizen PD-24 User Manual

CITIZEN
Command Reference
Model name: PD24
REVISION: 1.10
Citizen Systems Co., Ltd
1
Revision list
REV Date Details
1.0 10/12/2004 Original version (tentative version)
1.1 5/24/2005
- ESC~SI: Low baud rate support for serial interface
- ESC~SI: Added the ‘Image generation speed’ setting.
2
Contents
Revision list..................................................................................................................................................... 2
Contents...........................................................................................................................................................3
Setting the top of form (TOF) /ESC~B ...........................................................................................................7
Setting power OFF time/ESC~O..................................................................................................................... 8
Registering the bit map data/ESC~b ...............................................................................................................9
Printing the bit map data /ESC~b.................................................................................................................. 10
Specifing the font size /ESC~f ...................................................................................................................... 11
Setting in PAGE MODE/ESC~L...................................................................................................................12
Page feed (only for PAGE MODE marker detection) /ESC FF ....................................................................15
Setting printing paper/FS H...........................................................................................................................16
Setting print density/ FS I.............................................................................................................................. 17
Printer operating status report command / FS G ...........................................................................................18
Printing the compressed bit image/ ESC~G.................................................................................................. 19
Specifying the coordinate of printing position/ESC~X................................................................................. 22
Setting the printing position of barcode character/GS H...............................................................................23
Setting/Cancelling the turning of barcode/GS r ............................................................................................ 23
Setting the height of barcode/GS h................................................................................................................24
Setting the width of barcode/ GS w...............................................................................................................24
Selecting the type of l barcode/ GS k............................................................................................................ 25
Selecting the type of two-dimensional barcode/GS~ k ................................................................................. 28
Setting the width of module of two-dimensional barcode/ GS~w ................................................................31
Selecting printing mode/ ESC~U.................................................................................................................. 32
Printer power OFF/ ESC~p ...........................................................................................................................33
Selecting the code page/ ESC~P ................................................................................................................... 34
Selecting Windows character/ ESC~s ........................................................................................................... 35
Printing the sequential character/ ESC~¥...................................................................................................... 36
Printing the character/ESC~^........................................................................................................................ 37
Enabling/disabling the black mark function/ ESC~E.................................................................................... 38
Setting the marker detection level/ESC~e.....................................................................................................39
Printer operating status report command 2/ ESC~Y .....................................................................................41
Starting registering the printer command and flash memory/ ESC~CS........................................................ 42
Calling from printer command and flash memory/ ESC~CL........................................................................43
Reading the factory setting/ ESC~SF............................................................................................................ 44
Reading the default setting value/ ESC~SL ..................................................................................................45
Writing the printer’s internal setting to flash memory / ESC~SS .................................................................46
Setting the inside of printer/ESC~SI .............................................................................................................47
Returning to printing/ CR.............................................................................................................................. 54
Line feed/LF.................................................................................................................................................. 55
Page feed/FF..................................................................................................................................................56
Forward paper feeding/ ESC J ......................................................................................................................57
Setting page length by line/ ESC C............................................................................................................... 58
Setting page length by inch unit/ESC C NUL............................................................................................... 58
Setting perforated line skip/ESC N ............................................................................................................... 59
Cancelling perforated line skip/ESC O ......................................................................................................... 59
Setting the right margin/ESC Q.....................................................................................................................60
Setting the left margin/ ESC I ....................................................................................................................... 61
Setting the 1/8-inch line feed rate/ESC O ..................................................................................................... 62
Setting the 1/6-inch line feed rate/ESC 2 ......................................................................................................62
Setting the n/60-inch line feed rate/ESC A ...................................................................................................63
3
Setting the n/180-inch line feed rate/ESC 3 .................................................................................................. 63
Setting the n/360-inch line feed rate/ESC +.................................................................................................. 63
Specifying horizontal tab positions/ESC D...................................................................................................64
Execution of horizontal tab/HT.....................................................................................................................65
Setting vertical tab positions/ESC B ............................................................................................................. 66
Execution of vertical tab/VT ......................................................................................................................... 66
Specifying the absolute position/ESC $ ........................................................................................................ 67
Specifying the relative position/ESC ¥ .........................................................................................................68
Setting the VFU tab /ESC b ..........................................................................................................................69
Specifying the VFU channel/ESC /............................................................................................................... 69
Back space/BS............................................................................................................................................... 70
Selecting the font style/ESC k....................................................................................................................... 71
Selecting the character code table/ESC t....................................................................................................... 72
Selecting the international character set/ESC R............................................................................................ 73
Specifying/Cancelling proportional font/ESC p............................................................................................ 74
Specifying the character equivalent to 10CPI/ESC P....................................................................................75
Specifying the character equivalent to 12CPI/ ESC M .................................................................................75
Specifying the character equivalent to 15CPI/ESC g.................................................................................... 75
Specifying super/subscript/ESC S................................................................................................................. 76
Canceling super/subscript/ESC T.................................................................................................................. 76
Specifying italic/ESC 4 ................................................................................................................................. 77
Cancelling italic/ESC 5 ................................................................................................................................. 77
Specifying reduced printing/SI...................................................................................................................... 78
Specifying reduced printing/ESC SI ............................................................................................................. 78
Cancelling reduced printing/DC 2.................................................................................................................78
Specifying double-width expansion with automatic cancel/SO....................................................................79
Specifying double-width expansion with automatic cancel/ESC SO............................................................79
Cancelling double-width expansion with automatic cancel/DC4..................................................................79
Specifying/canceling double width large characters/ESC W........................................................................ 80
Specifying/cancelling double height large characters/ESC w....................................................................... 80
Specifying emphasis printing/ESC E ............................................................................................................ 81
Cancelling emphasis printing/ESC F ............................................................................................................81
Specifying double strike printing/ESC G...................................................................................................... 82
Cancelling double strike printing/ESC H...................................................................................................... 82
Specifying/Cancelling underline/ESC − ....................................................................................................... 83
Collectively specifying a printing mode/ ESC!............................................................................................. 84
Selecting character style/ ESC q ...................................................................................................................85
Setting the spacing of characters/ESC SP ..................................................................................................... 86
Aligning the characters/ESC a ......................................................................................................................87
Specifying the download character set/ESC % .............................................................................................88
Copying character set/ESC : .........................................................................................................................89
Defining the download characters/ESC & ....................................................................................................90
Selecting the bit image mode/ESC *.............................................................................................................92
Setting bit image repeat/ESC * ..................................................................................................................... 94
8-dot single density bit image/ESC K ........................................................................................................... 95
8-dot double density bit image/ESC L .......................................................................................................... 95
8-dot double speed/density bit image/ESC Y................................................................................................ 96
8-dot quadruple density bit image/ESC Z ..................................................................................................... 96
Changing the bit image mode/ESC ? ............................................................................................................97
Initializing the printer/ESC @....................................................................................................................... 98
4
Cancelling high order side control code/ESC 6 ............................................................................................99
Setting high order side control code/ESC 7 ................................................................................................ 100
Cancelling data/CAN .................................................................................................................................. 101
Deleting one character/DEL........................................................................................................................ 101
Appendix b: Black Mark Specification....................................................................................................... 102
5
Citizen original command
6
Setting the top of form (TOF) /ESC~B
[ASCII] ESC ~ B m n1 n2 [Decimal] 27 7E 66 m n1 n2 [Hexadecimal] 1B 126 42 m n1 n2
[Parameter] m = 1, 3 m = 255: Checking the setting rate [Description]
For setting, only binary data are acceptable. m = 1: Setting the normal form feed
3. Setting the form feed at marker detection
Sets the feed rate for auto feeding. The feed rate for normal operation and marker detection can be set.
Calculation unit for n1, n2 is dot (1 dot=1/8mm). Setting value: “n1+(n2×256)dot”.
The set values are stored in the flash memory and remain effective even after the power is off.
Do not use this command together with other print commands because it writes data into the flash memory.
When setting a feed rate for marker detection, be sure to set a value greater than the mark width (ESC~e).
After data are stored in the flash memory, the printer power is automatically turned OFF. The set values become
effective when the power is turned ON again.
Default value for form feed is set at 95 in normal operation and 194 in black mark detection.
Setting check
Setting can be checked by specifying m=255. ESC ~ 255 0: Prints the setting ESC ~ 255 1: Returns the setting (only when the cable interface is used).
(Print result)
VTOP : 95 VTOP (EYEMARK): 194
(Return result) [Hexadecimal packet]
?? ?? ?? ??
FB
*1 *2 *3
*1: Return start code *2: Form feed setting rate in normal operation (word length) *3: Form feed setting in black mark detection (word length)
* The form feed setting for normal operation is used when auto feed operation is set to enable in the internal
setting of the printer. The form feed setting for marker detection is used when black mark operation is set to enable in the internal setting of the printer. Refer to the section on internal settings of printer.
7
Setting power OFF time/ESC~O
[ASCII] ESC ~ O n [Decimal] 27 126 79 n [Hexadecimal] 1B 7E 4F n
[Parameter] 0 ≤ n ≤ 255
[Description]
Specifies the auto power OFF time. If no data is received or operated during a set period of time after the last receive of data or the last operation of the FEED button, the printer power will be automatically turned off.
Setting can be set up to 255 minutes in a minute unit. If you wish to set Power OFF setting as invalid, set the time to 0 minute.
Default setting is the time set as low power time in the internal setting of the printer.
The set values are stored and kept in the flash memory.
Do not use this command together with other print commands because it writes data into the flash memory.
After data are stored in the flash memory, the printer power is automatically turned OFF. The set values
become effective when the power is turned ON again.
Val ue Tim e
0 No Power OFF
1 1 min.
10 10 min.
100 100 min.
255 255 min.
During a print wait state (ie. when unprinted data are remaining in the printer due to an error, etc.), the printer power will not be automatically turned OFF.
8
Registering the bit map data/ESC~b
[ASCII] ESC ~ b FFh n1 n2 d1 d2 d3 … dn 0 0 [Decimal] 27 126 98 255 n1 n2 d1 d2 d3 … dn 0 0 [Hexadecimal] 1B 7E 62 FF n1 n2 d1 d2 d3 … dn 0 0
[Description]
Stores Windows bitmap data into the flash memory. The structure of bitmap data is the same as that of BMP file data. Refer to Windows-related references for more details about BMP files.
The structure of parameters is as follows.
{n1, n2, d1, d2, d3 … dn} ……… (1)
‘d1, d2 … dn’ is the same as the data structure of BMP files. n1, n2 specify the BMP file size. n1 specifies the remainder of BMP file size divided by 256. n2 specifies the quotient of BMP file size divided by 256. Sends the BMP file data after sending n1, n2.
Several BMP file data can be written at a time into the flash memory by repeating the parameter sequence (1). BMP file data are assigned with a number accordingly in sequence from 0, based on which printing of BMP data is executed. This sequence is completed by specifying 0 in n1 and n2 (no BMP file data).
A registration area up to 64KB (64 × 1024 = 65536 bytes) is available.
BMP file data registered in the flash memory before this command is sent will be all deleted.
Data writing to the flash memory is available only a limited number of times. Avoid registering BMP files on a regular
basis.
Do not use this command together with other print commands because it writes data into the flash memory.
Restriction in BMP file
BMP files support only two-color materials.
It does not support color pallets.
9
Printing the bit map data /ESC~b
[ASCII] ESC ~ b n [Decimal] 27 126 98 n [Hexadecimal] 1B 7E 62 n
[Parameter] 0 ≤ n ≤ 254
[Description]
Prints out BMP file data registered in the flash memory.
Specify the number of the BMP data to be printed in the parameter ‘n’.
When an unregistered number is specified, the command will be ignored.
BMP images are printed in a printable area. When an image lies across right side areas, the image will not
be fully printed.
10
Specifing the font size /ESC~f
[ASCII] ESC ~ f m n [Decimal] 27 126 102 m n [Hexadecimal] 1B 7E 66 m n
[Parameter] m=0 or 30h n=0,2 or 30h, 32h
[Description]
m=0: ANK font
n= 0: 24 dot size character font
2: 16 dot size character font
Default is 24 dot size font.
Fonts of various sizes are selected for printing.
11
Setting in PAGE MODE/ESC~L
[ASCII] ESC ~ L n1 n2 d1 d2 d3 [Decimal] 27 126 76 n1 n2 d1 d2 d3 [Hexadecimal] 1B 7E 4C n1 n2 d1 d2 d3
[Parameter] n1: Specify 1 for line printing mode (normal mode). Specify 3 for page printing mode or line print page-length setting
mode. n2: Specify 0. d1: Specify 0 for portrait line printing mode (normal mode). Specify 1 for landscape page printing mode. Specify 2 for
portrait page printing mode. Page length can be set with d2 and d3 parameters after specifying 3 (specifying n1 = 3) to
call up line printing mode. d2, d3: Specify this parameter for switching to page printing mode or when 3 is specified in d1. Specify print width (actual
paper length) in dots. One dot is 1/203 inch. Divide the value by 256, and specify the remainder in d2 and the quotation in d3. Up to 2374 dots can be specified. When d1 = 3, up to 4466 dots can be specified.
[Description]
Portrait line printing mode (normal print mode - The printer is in this mode at power-ON.) Data are printed horizontally with the paper feed direction pointing upwards. A Feed command actually feeds a paper. Upon receiving of a Terminate command (such as CR, LF), the printer starts printing immediately.
Landscape page printing mode Data are printed vertically with the paper feed direction pointing upwards. A Feed command does not actually feed a paper, but moves the printing position horizontally. Actual printing starts when page feed (FF, ESC FF) is selected. The page format is maintained even after form feed.
Portrait page printing mode Data are printed horizontally with the paper feed direction pointing upwards. A Feed command does not actually feed a paper, but moves the printing position vertically. Actual printing starts when page feed (FF, ESC FF) is selected. The page format is maintained even after form feed.
Specifying the page length in line printing mode Page length can be specified with line printing mode. Normally page length is specified with ESC C command in ESC/P mode. With this command, however, page length can be set in dots.
When page printing mode is specified, previous line print data that remain unprinted will be all printed. On the other hand, when line printing mode is specified, previous page print data that remain unprinted will be all deleted.
We recommend initializing the printer with ESC @ when switching to page printing mode or line printing mode.
<Restriction in page printing mode>
The maximum logical paper length is 832 dots in landscape page printing mode. Maximum printing width is
11.69 inches (2374 dots/203 dpi).
The maximum logical paper length in portrait page printing mode is the value specified in d2 and d3
parameters. Printing width is 832 dots.
12
Logical paper
length: 2374
dots max
Print width: 832 dots
Print width:
2374 dots max
Logical paper length: 832 dots
At power-ON, page printing mode is canceled and the printer is switched to line printing mode.
Printing density cannot be set by line in page printing mode. Sets the printing density for the entire page.
In page mode, decoded data and the page format are maintained until a Form Feed command (FF, ESC FF)
is received. However, if page printing mode setting is executed again before a form feed, all previous data will be lost.
ESC @ Initialize command clears data decoded internally on the memory. Page printing mode itself cannot be initialized.
In page printing mode, barcodes that lie across logical papers lengths are not printed.
13
In page printing mode, when a print data is specified at a position that exceeds a logical paper length, the data is decoded after automatic form feed.
In page printing mode, when ANK double-height character printing (ESC w) is executed at the head of a page, the double height characters cannot be fully printed, with their top area missed. In such a case, leave a one-line space before printing double height characters.
To return from page printing mode to line printing mode, turn off the power and then turn it on again, or specify line printing mode separately.
Restriction on page length in line printing mode
Page length can be specified up to 22 inch (22×203=4466 dots)
<Setting the Line Printing Mode>
Default is line printing mode. The following shows an example of program (BASIC) for switching from page printing
mode to line printing mode.
LPRINT CHR$(&H1B); “~L”; CHR$(1); CHR$(0); CHR$(0);
Line printing: dl = 0
Fixed at 0
Line printing mode: n1 = 1
<Setting the Page Printing Mode>
The following shows a program for setting paper length to 8 inches in landscape mode.
LPRINT CHR$(&H1B); “~L”; CHR$(3); CHR$(0); CHR$(1); CHR$(88); CHR$(6);
Landscape printing: dl = 1
Fixed at 0
Page printing mode: n1 = 3
Next, convert the paper length to be set into dots.
In this case, the paper length is set to 8 inches. Therefore:
8 inches × 203 dpi = 1624 dots
Next, obtain parameters d2 and d3 from the number of dots.
Divide 1624 dots, the number of dots of paper length, by 256.
1624 / 256 = 6 …… 88
Specify 88, the remainder of 1624 dots divided by 256, in d2.
Specify 6, the quotient of 1624 dots divided by 256, in d3.
14
Page feed (only for PAGE MODE marker detection) /ESC FF
[ASCII] ESC FF [Decimal] 27 12 [Hexadecimal] 1B OC
[Description]
Executes page feed while in page printing mode.
The difference with FF page feed in ESC/P Emulation command is that, in ESC FF, form feed will not be
executed when print data is unavailable in the printer.
When the black mark operation is set to enable, this command starts marker detection along with page feed.
15
Setting printing paper/FS H
[ASCII] FS H n [Decimal] 28 72 n [Hexadecimal] 1C 48 n
[Parameter] n=1, 2, 3 or 31h, 32h, 33h
[Description] Switches the paper type.
n = 1: Regular paper (the setting value at power-on) n=2: 2 sheets of carbon paper
Printing paper can be set by line unit.
Setting besides the parameter range will be ignored.
The initial value (regular paper, 2 sheets of carbon paper) at power-on (default) represents the paper that is
set as the print paper type in the internal setting of the printer.
Setting values in the paper setting return to default when an Initialize command is executed or printing mode is changed.
16
Setting print density/ FS I
[ASCII] FS I n [Decimal] 28 73 n [Hexadecimal] 1C 49 n
[Parameter] n = 0, 1, 2, 3, 4 or 30h, 31h, 32h, 33h, 34h
[Description]
Specifying the printing density.
n=30h -2 (light) n=31h -1 n=32h 0 (Normal) n=33h +1 n=34h +2 (dark)
Settings other than the above will be ignored.
Can be set by line unit (except in page printing mode).
The initial value at power-on (default) is the value that is set as print density in the internal setting of the printer.
Print density setting values return to default when an Initialize command is executed or print mode is changed.
17
Printer operating status report command / FS G
[ASCII] FS G [Decimal] 28 71 [Hexadecimal] 1C 47
[Description]
When using the command, set the printer operating status return control to enable in the internal setting of the printer.
This command prints the printer operation status.
Data to be returned are 2 bytes and are FBh + content (30h to 3Fh).
Settings
Paper-in 0
Paper-out 1 9
Battery normal 0
Battery needs recharging 1
printer head temperature
normal
printer head temperature
abnormal
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
0 0 1 1
0
O
1
Printing cannot be continued when printer head temperature becomes abnormal. Stop printing and leave the printer for a while, or turn off the power and turn it on again after a while.
When the data in the receiving buffer becomes full, a communication will be temporarily halted. In case of an error such as paper-out, no printing will be executed. Therefore, the receiving buffer of the printer becomes full in a short time, which may lead to a temporary communication halt. In such case, the printer may not be able to receive this command from the host and the return function may not work properly.
When using this command, do not send the command and print data at the same time. Whenever possible, execute each command separately.
*
In PD24, since received data in the buffer will not be processed under offline status such as paper out, the printer monitors and returns the printer operating status report command at data receive level. Therefore, when the printer status return control is set to enable in the internal setting of the printer, and if data, such as a bit image, contains a character sequence which is the same as the printer operating status report command, the printer may identify the data as this command and return the data. Since character sequences identified as the printer operating status report command are directly sent to the receive data analysis part, these data will not be lost.
During infrared communication, printer status is returned within the infrared connection at the time of receive of the printer operating status report command. When the connection with the other station is disconnected, printer status return data will be cleared.
18
Printing the compressed bit image/ ESC~G
[ASCII] ESC ~ G data [Decimal] 27 126 71 data [Hexadecimal] 1B 7E 47 data
[Data format] There are following 4 types of data.
String image data
Repeat image data
EOL (End Of Line)
EOD (End Of Data)
(1) String image data
String image data prints the desired bit map data.
Format: c, d1, d2, d3, d4 … dn
‘c’ indicates data length and that the data in the following format is string data. Specify an image data with subsequent ‘dn’. Data length can be specified from 1 to 127.
7 6 5 4 3 2 1 0
C
Data length
O: String image
‘dn’ is 1-byte bitmap data and specifies a bitmap image in the raster direction.
□ □ □ □ □ □ □ □
Left← →Right
An example is shown below.
Data 05h
12h 34h 56h 78h 9Ah
Print result □□□■□□■□□□■■□■□□□■□■□■■□□■■■■□□□■□□■■□■□
dn 7 6 5 4 3 2 1 0
19
(2) Repeat image data
Repeat image data repeats printing of the same bitmap data on a 1-byte basis.
Format c d
‘c’ indicates that the data in the following data format is repeat data and specifies the number of repetition of the data. Specify an image data with the following ‘d’ value.
7 6 5 4 3 2 1 0
Number of repetition
1: Repeat image
The number of repetition can be specified from 1 to 127. ‘d’ is 1-byte bitmap data and specifies a bitmap image in the raster direction.
□ □ □ □ □ □ □ □
Left← →Right
An example is shown below. Data 85h
Print result □□□■□□■□□□□■□□■□□□□■□□■□□□□■□□■□□□□■□□■□ 1 2 1 2 1 2 1 2 1 2
(3) EOL
EOL terminates a 1-dot sequence and executes printing and feeding of the 1-dot sequence. Data are 00h.
(4) EOD
EOD terminates printing of a compressed bit image. Data are 80h.
Compressed bit image sample program (BASIC) A sample of printing program is shown below.
WIDTH LPRINT 255 W = 48
12h
dn 7 6 5 4 3 2 1 0
20
LPRINT CHR$(27); "~G"; LPRINT CHR$(&H80 + W); CHR$(&HFF); CHR$(0); ' FOR L = 1 TO 100 LPRINT CHR$(1); CHR$(&H80); LPRINT CHR$(W - 2 + &H80); CHR$(0); LPRINT CHR$(1); CHR$(&H1); LPRINT CHR$(0); 'EOL NEXT L ' LPRINT CHR$(&H80 + W); CHR$(&HFF); CHR$(0); LPRINT CHR$(&H80); 'EOD END
21
Specifying the coordinate of printing position/ESC~X
[ASCII] ESC ~ X y1 y2 x1 x2 [Decimal] 27 126 88 y1 y2 x1 x2 [Hexadecimal] 1B 7E 58 y1 y2 x1 x2
[Parameter] Specifies the y1, y2Y coordinates. Specifies in y1 the remainder of Y-coordinate value divided by 256. Specifies in y2 the quotient of Y-coordinate value divided by 256.
Specifies the x1, x2X coordinates. Specifies in x1 the remainder of X-coordinate value divided by 256. Specifies in x2 the quotient of X-coordinate value divided by 256.
[Description]
Specifies the printing position with X, Y coordinates in landscape printing and portrait page printing mode.
Unit for coordinate is 1/203.
Cannot be used in normal printing mode (portrait line printing)
With ESC~X, printing data can be overlapped.
Position exceeding the right-left margin cannot be specified.
Y
X
X
Y
22
Setting the printing position of barcode character/GS H
[ASCII] GS H n [Decimal] 29 72 n [Hexadecimal] 1 48 n
[Parameter] n = 0, 1, 2, 3 or 30h, 31h, 32h, 33h
[Description]
Selects the printing position of barcode character when printing the barcode
“n” means as follows:
n printing position
0, 30h Cannot print
1, 31h Upper area of barcode
2, 32h Lower area of barcode
3, 33h Upper and lower area of barcode
The initial value is n=0
Changing the font size will not change the size of barcode character
Returns to default value with initializing command.
Setting/Cancelling the turning of barcode/GS r
[ASCII] GS r n [Decimal] 29 114 n [Hexadecimal] 1D 72 n
[Parameter] n = 0, 1
[Description]
When n = 0, barcodes are positioned horizontally. When n = 1, barcodes are positioned vertically.
Default at power-ON is n = 0.
When vertical positioning of barcodes is specified, barcode symbols turn around 90 degrees counterclockwise.
Returns to default value with initializing command.
23
Setting the height of barcode/GS h
[ASCII] GS h n [Decimal] 29 104 n [Hexadecimal] 1D 68 n
[Parameter] 1 ≤ n ≤ FFh
[Description]
Selects the height of barcode.
“n” indicates the number of dots in vertical direction.
The initial value is n=A2h (162 dots)
Returns to default value with initializing command.
Setting the width of barcode/ GS w
[ASCII] GS w n [Decimal] 29 119 n [Hexadecimal] 1D 77 n
[Parameter] n = 2, 3, 4
[Description]
Selects the width of barcode
“n” indicates the number of dots for narrow barcode in horizontal direction.
The initial value is n=3
Returns to default value with initializing command.
24
Selecting the type of l barcode/ GS k
[ASCII] GS k n Dn NUL [Decimal] 29 107 n Dn NUL [Hexadecimal] 1D 6B n Dn NUL
[Parameter] 1 ≤ n ≤ FFh
[Description]
Code: [1D] h + [6B] h + n + Ds + [00] h ..........1
0 ≤ n ≤ 6
Code: [1D] h + [6B] h + n + s + Ds .............................2
41h ≤ n ≤ 49h Selects a barcode system and prints out the barcode.
The beginning of line becomes the next print start position.
“n” means as follows:
In case of 1:
n Barcode system Definition area of s Definition area of D
0 UPC - A Bh ≤ s ≤ Ch 30h ≤ D ≤ 39h
1 UPC – E Bh s Ch 30h D 39h
2 JAN13 (EAN13) Ch ≤ s ≤ Dh 30h ≤ D ≤ 39h
3 JAN8 (EAN8) 7h ≤ s ≤ 8h 30h ≤ D ≤ 39h
4 CODE39 1 ≤ s
5 ITF
6 CODEBAR 1 ≤ s
1 s (even
number)
This command is terminated by a NULL code. For UPC-A and UPC-E, upon input of 12-byte barcode data, the barcode is printed out and subsequent data are processed as normal data.
For JAN13, upon input of 13-byte barcode, the barcode is printed out and subsequent data are processed as normal data. For JAN8, upon input of 8-byte barcode, the barcode is printed out and subsequent data are processed as normal data. Be sure that the number of data of ITF barcode is always an even number. When the number of data is an odd number, the last data will be ignored.
30h D 39h, 41h D 5Ah, 20h
24h, 25h, 2Bh, 2Dh, 2Eh, 2Fh
30h D 39h
30h D 39h, 41h D 44h, 24h
2Bh, 2Dh, 2Eh, 2Fh, 3Ah
25
In case of 2:
n
Barcode system Definition area of s Definition area of D
41h UPC - A Bh s Ch 30h D 39h
42h
43h
44h
45h CODE39
46h ITF
47h CODEBAR
48h CODE93 1 s ≤ FFH
49h CODE128 2 s ≤ FFh 0h D ≤ 7Fh
UPC - C Bh
JAN13 (EAN13) Ch
JAN8 (EAN8) 7h
s Ch 30h D 39h
s Dh 30h D 39h
s 8h
1
s FFH 30h D 39h
1
s FFH (even
number)
1
s FFH
30h D ≤ 39h, 41h ≤ D 5Ah, 24h
25h, 2Bh, 2Dh, 2Eh, 2Fh
D 39h
30h
30h D ≤ 39h, 41h ≤ D 44h, 24h
2Bh, 2Dh, 2Eh, 2Fh, 3Ah
0h
D 7Fh
‘s’ indicates the number of data and processes ‘s’ bytes from the next data as barcode data.
If ‘s’ is beyond the definition area, the command processing will be canceled and subsequent data will be processed as
normal data.
If ‘D’ is beyond the definition area, only paper feed will be executed and subsequent data will be processed as normal data.
If a character code ‘Dn’ is an unprintable character, subsequent data will be treated as normal characters.
<Caution>
If the width of a barcode is beyond the printing area of the line, the barcode will not be printed and only paper feed will be executed. Regardless of the line-feed rate set in ESC 3, ESC 2, etc., paper feed will be executed for the barcode height (including characters when barcode characters are specified).
After the printing of barcode, beginning of line becomes the next print start position.
Barcode characters are not affected by emphasized printing, overlapped printing, underline, character size,
character decoration, etc.
In page printing mode, barcodes positioned across logical paper lengths are not printed.
* CODE-128 supplementary explanation
The head of barcode data must be a code set select character (one of CODE-A, CODE-B, or CODE-C). Select the first code set from them.
Specify special characters with ‘{’ and the subsequent 1 character, 2 characters in total. Specify the ASCII character ‘{’ itself by sending ‘{’ twice consecutively.
(Special character) (Send data)
<ASCII> [Hexadecimal] [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
26
FNC1 {1 7B,31 123,49 FNC2 {2 7B32 123,50 FNC3 {3 7B,33 123,51 FNC4 {4 7B,34 123,52
{ {{ 7B,7B 123,123
Refer to barcode-related books, etc. for the code set character structure of CODE-A, CODE-B, and CODE­C.
As an example, a case for printing 10-digit data in CODE 128 is shown.
When CODE A is specified and the barcode data is 1234567890, to send data to the printer:
[1D] [6B] [49] ---------- GS k n [0C] ---------- s [7B] [41] ---------- CODE A [31] [32] [33] [34] [35] ---------- '12345' [36] [37] [38] [39] [40] ---------- '67890' [0D] [0A] ---------- CR LF
In this case, the parameter ‘s’ (data length) consists of 2 bytes indicating CODE A and 10 bytes indicating the data ‘1234567890’, 12 bytes in total.
27
Selecting the type of two-dimensional barcode/GS~ k
[ASCII] GS ~ k n [Decimal] 29 126 107 n [Hexadecimal] 1D 7E 6B n
[Parameter] n = 0, 1
[Description]
Two-dimensional barcode is selected from ‘n’
n = 0: PDF417
1: QR
Detail of each barcode is illustrated as follows
PDF417 command format GS ~ k n t e a1 a2 h w dl dh data
n: PDF417 specification
n = Fixed at 00h
t: PDF417 type
t = 00h: Normal type, default 01h: Omission type
e: Error correction level
s = 00h to 08h (error correction level: 0 to 8). Default: 01h a1, a2: Aspect ratio a1 = 00h to 09h (vertical). Default is 01h. a2 = 00h to 09h (horizontal). Default is 03h.
h: Number of vertical symbol columns
h = 00h, 03h to 5Ah (90); 00h is automatically calculated; default is 00h
w: Number of horizontal symbol code words.
w = 00h, 01h to 1Eh (30); 00h is automatically calculated; default is 00h
dl, dh: Number of data
0 ≤ dh × 256 + dl bytes ≤ FFFFh
data: barcode data
A “code word” is a basic unit of symbol characters to be encoded. With PDF417, barcodes larger than 928 code words
cannot be printed. Depending on the error correction label selected, error correction code words may be added. Therefore, code words of data to be printed need some space.
A higher level of error correction level improves its correction performance, but at the same time, it also makes the size of barcodes bigger.
When printing barcode symbols by aspect ratio, specify 0 for both the number of vertical symbol columns ‘h’ and the number of horizontal symbol code words ‘w.’
When the number of vertical symbol columns ‘h’ is set to 00h, the number of vertical columns is determined based on the number of horizontal symbol code words ‘w’ and the number of all data code words. At this time, if the number of vertical columns exceeds 90, add some horizontal code words and obtain the number of vertical columns again. Repeat this procedure until all code words fall into place. If the number of horizontal cord words exceeds 30, the data will be treated as an error and will not be printed.
When the number of horizontal symbol code words is set to 00h, the number of horizontal code words is determined
28
based on the number of vertical symbol columns and the number of all data code words. At this time, if the number of horizontal code words exceeds 30, add some vertical columns and obtain the number of horizontal code words again. Repeat this procedure until all code words fall into place. If the number of vertical columns exceeds 90, the data will be treated as an error and will not be printed.
QR command operation <Auto setting mode> GS ~ k n a c p m e k i data NUL
<Manual Mode> GS ~ k n a c p m e k i s (t data NUL) s
n: QR specification
n = Fixed at 01h
a:Division function. Prints the QR Division code at maximum of 16 units
a=00h:Default value-Division function unavailable 01h:Division function available
c: Code number. Ignored when the division function is not used. Specifies the code number for dividing.
c = Upper 4 bits: Specify the code number from 1 to 16 (00h to 0Fh) Lower 4 bits: Specify the dividing number from 1 to 16 (00h to 0Fh) Example) When the code number is 1 and the dividing number is 2: c = 01h When the code number is 12 and the dividing number is 15: c = BEh
p: Parity data. Ignored when the division function is not used. Functions as XOR value of all data.
m: Model number
m-00h: Model 1 Version 1to 14 01h: Model 2 Version 1to 40 Default value
e:Error correction level
e=00h: High density level [L] -Default value 01h: Standard level [M] 02h: Reliable level [Q] 03h: Highly reliable level [H]
k: Mask number
k=00h to 07h: Mask 0 to 7 08h: No mask 09h: Auto selection -Default
i: Data input mode
i=00h:Auto setting mode 01h: Manual mode
Specifying data at Auto setting mode: The following manual mode data (numbers, alphanumeric characters, binary data, and KANJI characters) can be specified freely. Add a NUL code (00h) at the end of data to indicate termination.
Specifying data at Manual mode: ‘Character mode + data + NUL’ of ‘s’ units can be specified as a block of character­string data.
t: Character code mode
t = N (4Eh): Numbers and ASCII numbers 0 to 9 are supported. A(41h):Alphanumeric characters 0 to 9, A-Z, space, $, %, *, +, , /, : B(42h): Binary 4 byte size character(n)+ (data) n Example: 0003 (ASCII) + abc 0010 (ASCII) + 1234567890
29
s: Size of character-string data repetition
Example) When s = 3: 3 <t + data + NUL > <t + data + NUL > <t + data + NUL>
Division mode 1 and division mode 2 can be specified in QR division mode of the internal setting menu. Use division mode 1 when the user divides data in advance before sending the data. In such cases, the printer only symbolizes this data and information of a given code number. Use division mode 2 when dividing operation is left to the printer. The printer divides and symbolizes the given data in the printer at the same time based on the code number specification of the code number and information of the dividing number specification. Note that, in either mode, the parity value of all data must be always specified for parity data. Especially in division mode 1, where the user divides data, the parity code reader will fail to combine QR codes unless the parity value of all data before data are divided is set for parity data.
Choose an appropriate error correction level in accordance with the use environment. When using the printer in an environment where printed QR codes may easily get dirty, you can improve the reading ratio of the barcode reader by employing a higher error correction level.
Use a mask number in such cases that reading is adversely affected by, for example, uneven symbols or a pattern similar to the position detection pattern at a state where symbol data are allocated. Auto selction is normally acceptable.
30
Setting the width of module of two-dimensional barcode/ GS~w
[ASCII] GS ~ w n m I [Decimal] 29 126 119 n m I [Hexadecimal] 1D 7E 77 n m I
[Parameter] n = 0, 1
[Description]
The size of two-dimensional barcode modules can be specified with the value of ‘n’. The unit is dot.
n = 0: PDF417 module width specification 1: QR module width specification
For PDF417, module width and symbol column height can be specified.
m: Module width (01h to 08h) I: Symbol column height (01h to 08h)
The symbol column height of PDF417 is internally converted into ‘(Module width) × (Symbol column height setting value I)’.
For QR codes, only module width can be set. For QR code module width setting, skip parameter I.
m: Module width (01h to 0Fh)
31
Selecting printing mode/ ESC~U
[ASCII] ESC ~ U n [Decimal] 27 126 85 n [Hexadecimal] 1B 7E 55 n
[Parameter] n=0, 1, 2 or 30h, 31h, 32h
[Description] Selects the printing mode depending on the value of “n”.
n = 0: 2-step feed mode
1: 1-step feed mode 2: Phase lock mode
In 1- and 2-step feed modes, data are printed while the motor is in motion. The printing speed increases in order of (phase lock) <(1-step feed) < (2-step feed).
In phase lock mode, data are printed with the motor fixed. Print quality is higher than that in 1- and 2-step feed mode.
For barcode printing and bitmap image printing, data are printed forcibly in phase lock mode.
The printer is in phase lock mode at power-on.
32
Printer power OFF/ ESC~p
[ASCII] ESC ~ p [Decimal] 27 126 112 [Hexadecimal] 1B 7E 70
[Parameter] None
[Description]
Turns OFF the power of the printer.
When already edited but not printed image data exist, the data are printed and then the power is turned OFF.
[Caution]
After turning the power OFF, infrared communication with the host and Bluetooth communication will be terminated.
33
Selecting the code page/ ESC~P
[ASCII] ESC ~ P n [Decimal] 27 7E 80 n [Hexadecimal] 1B 7E 50 n
[Parameter] 0 ≤ n ≤ 255
[Description]
Selects the code page.
n = 0: PC437 (U.S.A.) 1: PC850 (MULTILINGUAL) 2: PC860 (PORTUGAL) 3: PC863 (FRENCH - CANADA) 4: PC865 (NORWAY) 5: SCANDINAVIA 6: YUASCII 7: PC852 (LATIN 2) 8: PC855 (CYRILLIC) 9: PC866 (RUSSIAN) 10: HUNGARIAN 11: KAMENICKY 12: TURKEY 13: PC861 (ICELANDIC) 14: WELSH 15: MAZOVIA 16: UKRAINIAN 40: NEW HEBREW 41: OLD HEBREW 42: DEC HEBREW 50: 437 GREEK 51: GREEK 851 52: GREEK ABC 53: GREEK ELOT 928 54: CYPRUS 55: MALTA 60: ARABIC NLS 61: ARABIC EXT 62: UNISYS CODEPAGE 100: BRAZIL ABICOMP 101: BRAZIL ASCII 108: LATIN 1 109: PC858 110: ISO LATIN 9
34
Selecting Windows character/ ESC~s
[ASCII] ESC ~ s n [Decimal] 27 7E 115 n [Hexadecimal] 1B 7E 73 n
[Parameter] 0 ≤ n ≤ 255
[Description]
Selects the Windows 3.1 character set n = 0: US ANSI 1: CYRILLIC ANSI 2: EASTERN EUROPE ANSI
35
Printing the sequential character/ ESC~¥
[ASCII] ESC ~ ¥ n1 n2 [Decimal] 27 7E 92 n1 n2 [Hexadecimal] 1B 7E 5C n1 n2
[Parameter] 0 ≤ n1, n2 ≤ 255
[Description]
The number of data specified in n1, n2 will be processed as character code and not as control code
n1, n2: Indicates the number of data specified as character
Assign the remainder of the number of data divided by 256 in n1. Assign the quotient of the number of data divided by 256 in n2 .
Unlike ESC 6, the lower control code domain can be printed as character data.
36
Printing the character/ESC~^
[ASCII] ESC ~ ^ [Decimal] 27 7E 94 [Hexadecimal] 1B 7E 5E
[Description]
1 byte data following this command is processed as character data.
37
Enabling/disabling the black mark function/ ESC~E
[ASCII] ESC ~ E n [Decimal] 27 126 69 n [Hexadecimal] 1B 7E 45 n
[Parameter] n = 0: Mark function disabled (the setting saved) 1: Mark function enabled (the setting saved) 3: Mark function disabled (temporary setting) 4: Mark function enabled (temporary setting)
[Description]
Selects the enabling/disabling of the black mark function.
By the setting memory with parameter ‘n’ = 1 or 0, the enabled/disabled state of the mark function setting is saved in the
flash memory storage area in the printer. After data are written into the flash memory, the printer power is automatically turned OFF. The set values are reflected at the next power ON.
By the temporary setting with parameter ‘n’ = 4 or 3, the mark function setting is enabled/disabled when
ESC~E command is received. This content remains effective until it is newly switched to enabled/disabled by setting the parameter ‘n’ to 4 or 3, or the printer is powered OFF.
38
Setting the marker detection level/ESC~e
[ASCII] ESC ~ e n m [Decimal] 27 126 101 n m [Hexadecimal] 1B 7E 65 n m
[Parameter] n=0, 1: Sets the detection level. 128: Sets the mark width 255: Checks the internal setting.
[Description]
Sets the detection level. n = 0: Setting the upper sensor detection level 1: Setting the lower sensor detection level
[Sensor Output]
Marker center position
Paper-out reference value
Upward
sensor-detection level
Marker width
Downward
sensor-detection level
m: Setting value (1 to 1024), on a word unit (2 bytes) m = (V × 1023) / 3 V: Sensor detection level [V] Default value ‘m’ = 120 Default sensor detection level V = Approx. 0.4 [V]
Normally, set the same value for the upper and lower sensor detection levels.
Mark width
Mark width can be set with ‘n’ = 128. Specify the setting value ‘m’ in dots. 1mm = 8 dots. Specify a value smaller than the form feed setting value for marker detection (ESC~B).
Print direction
Mark width
39
Default mark width is 5mm (40 dots).
Do not use this command together with other print commands because it writes data into the flash memory.
After data is stored in the flash memory, the printer is automatically powered OFF. The setting becomes
effective when the power is turned ON again.
Setting check Settings can be checked by specifying ‘n’ = 255.
ESC~e 255 0 : Prints out the setting.
1: Returns the setting.
(Return result) [Hexadecimal packet]
** ** ** 01
FB
*1 *2 *3 *4 *5
*1: Return start code *2: Sensor detection level (up) value *3: Sensor detection level (down) value *4: Mark width *5: Enabling/disabling (= 1/0) the marker detection function
40
Printer operating status report command 2/ ESC~Y
[ASCII] ESC ~ Y [Decimal] 27 126 89 [Hexadecimal] 1B 7E 59
[Description]
When using this command, set the printer operating status return control to enable in the internal setting of
the printer.
On receiving this command, the printer prints out the data in the buffer and outputs its operation status.
Data to be returned are 2 bytes and are FBh + content (30h to 3Fh).
Setting
Paper-in 0
Paper-out 1
Printing 0
Printing complete 1
Printer head temperature
normal
Printer head temperature
abnormal
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
0 0 1 1
0
0
1
When the receiving buffer of the printer becomes full, communication will be temporary halted. Since printing will not
be executed in case of an error such as paper-out, the receive buffer becomes full in a short time, which may lead to a temporary communication halt. In such a case, the host may not be able to send this command to the printer.*
Printing operation indicates the printer is in either state where unprinted data exist in the buffer, data are being decoded
in the page memory, or data are being actually printed on a paper.
Completion of printing indicates that any unprinted data does not exist and data are not being printed on a paper.
When using this command, do not send the command and printing data at the same time. Whenever
possible, execute each command separately.
*
In PD24, since receive data are not analyzed under offline status such as paper-out, the printer monitors and returns the
printer operating status report command at data receive level. Therefore, when the printer status return control is set to enable in the internal setting of the printer, and if data, such as a bit image, contains a character sequence which is the same as the printer operating status request command, the printer may identify the data as this command and return the data. Since character sequences identified as the printer operating status report command are directly sent to the receive data analysis part, these data will not be lost.
During infrared communication, printer status is returned within the infrared connection at the time of
receive of the printer operating status report command. When the connection with the other station is disconnected, printer status return data are cleared.
During printing operation, receive contents may not be completely real time. Make judgments from several
ESC~Y return contents.
41
Starting registering the printer command and flash memory/ ESC~CS
[ASCII] ESC ~ C S n1 n2 d1 d2 dn [Decimal] 27 126 67 83 n1 n2 d1 d2 dn [Hexadecimal] 1B 7E 43 53 n1 n2 d1 d2 dn
[Description]
Registers a series of printer commands in the flash memory.
{d1 d2 ... dn} is a data string to be registered.
n1 and n2 indicate the number of data to be registered. Divide the number of data to be registered by 256
and specify its remainder in n1, its quotient in n2.
For registering several command groups, send the command groups consecutively. Registration is
completed upon receive of the command group with the number of data = 0.
ESC~CS n1 n2 d1 d2 … dn Command group 1 n1 n2 d1 d2 … dn Command group 2 00 ‘Number of data = 0’ command group
Command groups are assigned with a number in sending order from 0 before registered. Up to No. 255 can be registered (total number of registration: 256). Specify this number to call out a given command.
When a new registration begins, data that have been previously registered in the flash memory will be all deleted.
A registration area up to 64KB (64 × 1024 = 65536 bytes) is available.
[Caution]
Do not register ESC~CS command in the registration command group.
When calling out another command group with ESC~CL from the registration command group, be sure to
register ESC~CL command at the end of the command group. Otherwise, print result cannot be assured.
Registration area = (Management domain) + (Raw-data domain) Management domain: 4 × 256 Raw-data domain: 65536 – (Management domain) – 1 = 64511
42
Calling from printer command and flash memory/ ESC~CL
[ASCII] ESC ~ C L n [Decimal] 27 126 67 76 n [Hexadecimal] 1B 7E 43 4C n [Parameter] 0 ≤ n ≤ 255
[Description]
Calls out a printer command group registered in the flash memory.
‘n’ specifies the number of the command group to be called out.
When an unregistered number is specified, the command will be ignored.
43
Reading the factory setting/ ESC~SF
[ASCII] ESC ~ S F [Decimal] 27 126 83 70 [Hexadecimal] 1B 7E 53 46
[Description]
Reads the factory setting of the printer’s internal setting
The command is used in conjunction with Flash memory writing command (ESC~SS)
ESC~SF ←Reads the factory setting ESC~SS ←Writes the setting for flash memory
Printer can be restored to factory setting with the above command.
44
Reading the default setting value/ ESC~SL
[ASCII] ESC ~ S L [Decimal] 27 126 83 76 [Hexadecimal] 1B 7E 53 4C
[Description]
Reads the default value of printer’s internal setting. The difference between factory setting values and default setting values is that while factory setting values are set during manufacturing, default setting values are set when the user changes the internal setting of the printer and settings are stored in the internal setting user area of the flash memory.
This command is used in conjunction with the flash memory writing command (ESC~SS) and the internal setting command (ESC~SI).
ESC~SLReads the default value ESC~SI···Sets the internal setting of the printer. ESC~SI···Sets the internal setting of the printer. ESC~SI···Sets the internal setting of the printer. ESC~SSWrites the setting for flash memory.
45
Writing the printer’s internal setting to flash memory / ESC~SS
[ASCII] ESC ~ S S [Decimal] 27 126 83 83 [Hexadecimal] 1B 7E 53 53
[Description]
Writes the internal setting of the printer to flash memory.
Do not use this command together with other print commands because it writes data into the flash memory.
After data are stored in the flash memory, the printer power is automatically turned OFF. The set values
become effective when the power is turned ON again.
Be sure to use this command in conjunction with factory setting (ESC~SF) or default value (ESC~SL). If this command is used separately, unexpected values may be set.
46
Setting the inside of printer/ESC~SI
[ASCII] ESC ~ S I n m [Decimal] 27 126 83 73 n m [Hexadecimal] 1B 7E 53 49 n m
[Parameter] n: Setting category m: Setting value by category
[Description]
Sets the internal setting of the printer.
Set the factory setting (ESC~SF), and default value (ESC~SL) before using the command.
ESC~SL ←Reads the default setting value ESC~SI ←Sets the internal setting of the printer ESC~SI ←Sets the internal setting of the printer ESC~SI ←Sets the internal setting of the printer ESC~SS ←Writes the setting for flash memory
● n=0 : Sets the serial interface communication speed.
1: Sets the serial interface data length. 2: Sets the serial interface stop bit length. 3: Sets the serial interface parity bit. 4: Sets the serial interface flow control. 5: Sets the printing density 6: Sets the type of printing paper 7: Sets the operation for automatic feed 8: Sets the black mark detection 9: Sets the character set. 10: Sets the international character set. 12: Sets the character pitch.. 13: Sets the auto power OFF.time. 14: Setting the return control of printer status. 16: Selects the font style. 16: Sets the code page. 20: Sets the IrCZ infrared communication speed 21: Sets the IrCZ infrared stop bit length 23: Sets the Link off 24: Sets the recharging of the main unit 25: Sets the Bluetooth communication mode 26: Sets the Bluetooth BOND history deletion 27: Sets the QR code division mode 28: Sets the type of interface 29: Sets the Cable auto recognition mode 255: Sets the printing of printer’s internal setting
47
Sets the serial interface communication speed: n=0
Sets the communication speed of the cable interface connection
m = 0: 4800 bps
1: 9600 bps 2: 19200 bps 3: 38400 bps 4: 57600 bps 5: 115200 bps 6: 600 bps 7: 1200 bps 8: 2400 bps
Sets the serial data length: n=1
Sets the data length in cable interface connection.
m=0 : 8 bit data length 1 : 7 bit data length
Sets the serial stop bit length.: n=2
Sets the serial stop bit length. in cable interface connection.
m=0 : 1 stop bit m=1 : 2 stop bit
Sets the serial parity bit.: n=3
Sets the parity bit in cable interface connection.
m=0 : parity bit unavailable 1: Even Parity 2 Odd Parity
Serial interface flow control: n=4
Sets the flow control in cable interface connection.
m=0 : XON/XOFF control m=1 : DTR/DSR control
Sets the printing density: n=5
Sets the default value of printing density.
m=0: Density 0 m=1: Density −1 m=2: Density −2 m=3: Density +1 m=4: Density +2
Sets the type of printing paper: n=6
Sets the default setting for the type of printing paper.
m=0: Specifies normal paper m=1: Specifies 2 pieces of carbon paper
Setting the operation for automatic feed: n=7
Sets the enabling/disabling of automatic feed.
m=0: disabled m=1: enabled
48
Setting the black mark detection:n=8
Sets the enabling/disabling of Marker detection. If auto feed setting is set to enable at the same time, mark
detection will be executed during auto feeding as well.
m=0: disabled m=1: enabled
Setting the character set.: n=9
Sets the default character set.
m=1: Graphic character code m=2: Italic code
Setting the international characters: n=10
Sets the default setting of international character
m=0: Japan 1: USA 2: France 3: Germany 4: England 5: Denmark 6: Sweden 7: Italy 8: Spain 9: Norway 10: Denmark2 11: Spain2 12: LatinAmerica 13: Korea 14: Legal
Setting the character pitch: n=12
Sets the default setting of character pitch.
m= 0: 10 cpi or equivalent 1: 12 CPI equivalent 2: 15 CPI equivalent 3:
Proportional
4: 17 CPI equivalent 5: 20 CPI equivalent
Setting the auto power OFF time.: n=13
Sets the auto power OFF time.
m=0 : auto power OFF disabled 1~255 : 1~255 minutes.
Setting the return control of printer status: n=14
Sets the enabling/disabling of the return control of printer status. Sends the return control of printer status to FS G, ESC~Y when it is enabled.
m=0: disabled
49
1: enabled
Selecting the Font style: n=16
Selects the default setting of Font style.
m=0: Roman 1: Sans serif 2: Courier 3: Prestige 4: Script
Selecting the
Selects the default setting of code page.
Code page: n=17
m = 0: PC437 (U.S.A.) 1: PC850 (MULTILINGUAL) 2: PC860 (PORTUGAL) 3: PC863 (FRENCH - CANADA) 4: PC865 (NORWAY) 5: SCANDINAVIA 6: YUASCII 7: PC852 (LATIN 2) 8: PC855 (CYRILLIC) 9: PC866 (RUSSIAN) 10: HUNGARIAN 11: KAMENICKY 12: TURKEY 13: PC861 (ICELANDIC) 14: WELSH 15: MAZOVIA 16: UKRAINIAN 40: NEW HEBREW 41: OLD HEBREW 42: DEC HEBREW 50: 437 GREEK 51: GREEK 851 52: GREEK ABC 53: GREEK ELOT 928 54: CYPRUS 55: MALTA 60: ARABIC NLS 61: ARABIC EXT 62: UNISYS CODEPAGE 100: BRAZIL ABICOMP 101: BRAZIL ASCII 108: LATIN 1 109: PC858 110: ISO LATIN 9 120: US ANSI 121: CYRILLIC ANSI 122: EASTERN EUROPE ANSI
50
IrCZ infrared communication speed: n=20
Sets the communication speed of the IrCZ infrared interface specification.
m = 0: 9600 bps 1: 19200 bps 2: 38400 bps
IrCZ infrared interface stop bit length: n=21
Sets the stop bit length of the IrCZ infrared interface specification.
m=0: 1 stop bit 1: 2 stop bit
Setting the Link off: n=23
Sets the link OFF control. “Link OFF control” disables the auto power-off control of the printer while the printer
is detected by device detection operation of the host during IrDA communication.
m=0: disabled 1: enabled
Setting the Bluetooth communication mode: n=25
Sets the Bluetooth communication mode. In NORMAL, communication with any Bluetooth equipment is available. In BOND, data are authenticated with a pass key before communication is connected. These are available only with Bluetooth-equipped models.
m=0: NORMAL 1: BOND
Deleting the Bluetooth BOND history: n=26
When Bluetooth communication mode is switched to BOND for authentication, the history record of the authentication equipment called ‘link key’ is saved in the printer. Based on this record, authentication can be skipped from the next time for already authenticated equipment. By enabling BOND history record deletion at this time, all history records will be deleted at the next power-ON of the printer. After records are deleted, the printer is automatically turned OFF and this setting as well automatically becomes ineffective. These are available only with Bluetooth-equipped models.
m=0: invalid 1:valid
Setting the QR code division mode: n=27
Sets the division barcode system of QR code. In division mode 1, the user divides data and prints out division barcodes. In division mode 2, the printer divides a given data based on division specification information and prints out division barcodes.
m=0: division mode 1
1: division mode 2
Selecting the type of interface: n=28
Selects the type of interface.
m=0: Cable interface 1: IrDA interface
51
3: IrCZ interface 4: USB interface 5: Bluetooth interface Bluetooth in m=5 is only for model equipped with Bluetooth interface.
Setting the Cable auto selection mode: n=29
Sets the enabling/disabling of the Cable auto selection mode. When this code is set to enable, if a cable is plugged at the time of power-on of the printer, Interface mode will be automatically set to the cable.
m=0: disabled 1: enabled
Image generation speed setting: n=31
Image generation speed can be set. When set to ‘Fast,’ data can be printed faster than usual. However, there are some differences as follows.
1) DEL code function is not available while page mode is specified.
2) Justification (full-just) of alignment command (ESC a) is not available.
3) When horizontal tab (HT) and alignment command (ESC a) are specified at the same time, the horizontal tab (HT) is not available.
4) When absolute position specification command (ESC $) and alignment command (ESC a) are specified at the same time, the absolute position specification command (ESC $) is not available.
m=0: Normal 1: Fast
Setting the printing of printer’s internal setting: n=255
Prints out the current state of internal setting values of the printer. After printing out, the printer is automatically turned OFF.
m=0: Prints the printer’s internal setting
Be sure to write the setting value in the flash memory with ESC~SS after setting categories using this
command. The set values become effective at the next power-ON.
52
ESC/P Emulation Command
53
Returning to printing/ CR
[ASCII] CR [Decimal] 13 [Hexadecimal] OD
[Description]
Data in the receiving buffer will not be printed.
Moves the print start position immediately after this code to the head of the same line (left margin).
* Caution With the use of CR, print data in the same line can be overlapped. Since printing is executed by LF code in
PD Series, CR operation includes decoding print data before CR in the printer memory and moving the next print start position (memory decoding position) to the head of the line.
54
Line feed/LF
[ASCII] LF [Decimal] 10 [Hexadecimal] 0A
[Description]
Prints the data in the receiving buffer and performs line feed.
After setting the LF code, the head of line (left margin) becomes the next printing start position.
Line feed rate can be set with ESC 0, ESC 2, ESC 3, ESC A.
Initial value is 30/203 inch.
When print data, CR code, and LF code are entered in this order, data are printed by CR code and then line
feed is executed by LF code.
Cancels the double-width expansion with automatic cancel (SO, ESC SO).
* CautionWhen data without [CR], such as [print data] + [LF], are received, an operation equivalent to CR is
executed within LF processing before line feed is executed.
As a result of line feed, if the next print position falls within the perforation skip (bottom margin) area, the printer feeds
paper until the position comes to the top of the next page.
55
Page feed/FF
[ASCII] FF [Decimal] 12 [Hexadecimal] 0C
[Description]
Prints out data in the print buffer and feeds paper to the top of the next page according to the page length
set in advance.
The head of line (left margin) becomes the next printing start position.
Cancels the double-width expansion with automatic cancel (SO, ESC SO).
56
Forward paper feeding/ ESC J
[ASCII] ESC J n [Decimal] 27 74 n [Hexadecimal] 1B 4A n
[Parameter] 0 ≤ n ≤ 255
[Description]
Prints data stored in the print buffer and feeds paper by [n /203] inches.
The specified value of paper feed (n/203) is valid only when using this command. It does not affect the line
feed rate setting.
After the execution of the command, printing end position becomes the next printing start position. It does
not return to the left margin.
As a result of line feed, if the next printing position falls within the perforated line skip (bottom margin) area, the printer
feeds paper until the position comes to the top of the next page. The print start position does not return to the left edge.
57
Setting page length by line/ ESC C
[ASCII] ESC C n [Decimal] 27 67 n [Hexadecimal] 1B 43 n
[Parameter] 1 ≤ n ≤ 127
[Description]
Sets the page length by n lines.
Page length is set as an absolute length of (Line feed rate) × (Number of lines). Once this command is set, even when
the line feed rate is changed, the page length does not change. When the line feed rate is set to 0, this code is ignored.
The paper position at the time of execution of the command becomes the head of line.
Cancels the perforated line skip (bottom margin) setting by ESC N.
Default is set to approx. 11.6 inch. (A4 paper size).
Setting page length by inch unit/ESC C NUL
[ASCII] ESC C NUL n [Decimal] 27 67 0 n [Hexadecimal] 1B 43 00 n
[Parameter] 1 ≤ n ≤ 15
[Description]
Paper position at the time of execution of the command becomes the head of line.
Page length is set as an absolute length. Therefore, once this command is set, even when the line feed rate is changed,
the page length does not change.
Cancels the perforated line skip (bottom margin) setting by ESC N.
Default is set to approx. 11.6 inch. (A4 paper size).
While page length is set to ‘n’ inch, due to the difference in vertical top of form between EPSON and PD24, 1 inch is
calculated as approximately 180/203 for PD24. In such case, differences will occur between EPSON and PD24 as follows.
Unit: inch EPSON PD24
1. 180/180 180/203
5 900/180 900/203
10 1800/180 1800/203 15 2700/180 2700/203
- 58 -
Setting perforated line skip/ESC N
[ASCII] ESC N n [Decimal] 27 78 n [Hexadecimal] 18 4E n [Parameter] 1 ≤ n ≤ 127
[Description]
Sets the perforated line skip by n lines.
After this setting, n lines from the end of a page are not printed and the paper is automatically fed for this
range.
Once this command is set, even when the line feed rate is changed, the skip rate does not change.
Perforated line skip is canceled when page length is newly set.
Cancelling perforated line skip/ESC O
[ASCII] ESC O [Decimal] 27 79 [Hexadecimal] 18 4F
[Description]
Cancels the perforated line skip setting.
In addition to this code, perforated line skip is cancelled when a page length is newly set by ESC C or ESC
C NUL code.
At default setting, perforated line skip is disabled.
- 59 -
Setting the right margin/ESC Q
[ASCII] ESC Q n [Decimal] 27 81 n [Hexadecimal] 1B 51 n [Parameter] 1 ≤ n ≤ 255
[Description]
Sets the right margin by n columns.
‘n’ indicates the number of columns when taking the left end, the printers’ physical starting position of printing, as 0. ‘n
– 1’ columns from the left margin shall be the print area.
Specify ‘n’ based on the character width currently set. Therefore, the maximum value of ‘n’ changes depending on the
character width. The character width at the time of setting includes the value of character-to-character space rate. When 10CPI, 12CPI, 15CPI, reduced printing, or double-wide enlarged printing is specified, data are processed in units of the character width specified.
Even when the pitch between the command position and the left margin is one character or less, at least one character is
printed.
Upon this setting, data in the print buffer will be cleared. Be sure to set this command at the head of a line.
For proportional printing, set the value taking character pitch as 10CPI.
Values less than the left margin will be ignored.
Once the right margin is set, even when character width is changed, the right margin position does not change.
Default is 832-dot position.
Left end
Left margin
Left margin
Right margin
Right end
Right margin
Printable area
Value ‘n’ of right margin
Value ‘n’ of left margin
- 60 -
Setting the left margin/ ESC I
[ASCII] ESC I n [Decimal] 27 108 n [Hexadecimal] 1B 6C n
[Parameter] 1 ≤ n ≤ 255
[Description]
Sets the left margin by n columns.
‘n' indicates the number of columns from the physical printing start position of the printer.
Specify ‘n’ based on the character width currently set. Therefore, the maximum value of ‘n’ changes depending on the
character width. The character width at the time of setting includes the value of character-to-character space rate. When 10CPI, 12CPI, 15CPI, reduced printing, or double-wide enlarged printing is specified, data are processed in units of the character width specified.
For proportional printing, set the value taking character pitch as 10CPI.
Even when the interval with the right margin is one character or less, at least one character is printed.
Upon this setting, data in the print buffer will be cleared. Be sure to set this command at the head of a line.
Once the left margin is set, even when character width is changed, the right margin position does not change.
Default is 0-dot position.
- 61 -
Setting the 1/8-inch line feed rate/ESC O
[ASCII] ESC 0 [Decimal] 27 48 [Hexadecimal] 1B 30
[Description]
Sets the line feed rate to EPSON: 1/8-inch ≒ 22/203inch.
Setting the 1/6-inch line feed rate/ESC 2
[ASCII] ESC 2 [Decimal] 27 50 [Hexadecimal] 1B 32
[Description]
Initial power-on status.
Sets the line feed rate to EPSON: 1/6-inch 30/203inch
- 62 -
Setting the n/60-inch line feed rate/ESC A
[ASCII] ESC A n [Decimal] 27 65 n [Hexadecimal] 1B 41 n
[Parameter] 0 ≤ n ≤ 85
[Description]
Sets the line feed rate to approx. n/67.6
Sets the line feed rate to 3/203 dot unit.
Setting the n/180-inch line feed rate/ESC 3
[ASCII] ESC 3 n [Decimal] 27 51 n [Hexadecimal] 18 33 n
[Parameter] 0 ≤ n ≤ 255
[Description]
Sets the line feed rate to n/203.
Sets the line feed rate to 1 dot unit.
Setting the n/360-inch line feed rate/ESC +
[ASCII] ESC + n [Decimal] 27 43 n [Hexadecimal] 1B 2B n
[Parameter] 0 ≤ n ≤ 255
[Description]
Sets the line feed rate to n/406
Sets the line feed rate to 1/406 dot unit.
- 63 -
Specifying horizontal tab positions/ESC D
[ASCII] ESC D n1 n2 … nk NUL [Decimal] 27 68 n1 n2 nk 0 [Hexadecimal] 1B 44 n1 n2 nk 00
[Parameter] 1 ≤ n ≤ 255, 0 ≤ k ≤ 32
[Description]
Sets horizontal tab positions.
‘n’ indicates the number of columns from the left margin. ‘k’ indicates the number of horizontal tab positions. Up to 32
positions can be set.
Horizontal tabs are set as an absolute position of (Current character width) × (Number of columns). Therefore, even
when the character width is changed, the horizontal tab position does not change. The character width at the time of setting includes the value of character-to-character space rate. When 10CPI, 12CPI, 15CPI, reduced printing, or double­wide enlarged printing is specified, data are processed in units of the character width specified.
NUL code indicates the termination of setting.
Set horizontal tab positions in ascending order. When a smaller value is set after a larger value, the setting
is terminated at that point.
Immediately after power-ON, horizontal tab positions of a size equivalent to 10CPI are set every 8
columns. All horizontal tab positions are canceled by ESC D NUL code without a parameter.
The setting is initialized by ESC @ Initialize command.
- 64 -
Execution of horizontal tab/HT
[ASCII] HT [Decimal] 9 [Hexadecimal] 09
[Description]
Shifts the print position to the next horizontal tab position.
When HT code is set in an unspecified area (when it is set beyond the last tab position in a line), the input
will be ignored.
Immediately after power-ON, horizontal tab positions of a size of 10CPI are set every 8 columns.
Given horizontal tab positions can be set by ESC D code.
When underline is specified, the underline will not be drawn at a moving area of HT.
When image generation speed is set to fast, if you use Horizontal Tab (HT) and Alignment Command (ESC a) at the
same time, the function of Horizontal Tab (HT) will not be available.
- 65 -
Setting vertical tab positions/ESC B
[ASCII] ESC B n1 n2 … nk NUL [Decimal] 27 66 n1 n2 nk 0 [Hexadecimal] 1B 42 n1 n2 nk 00
[Parameter] 1 ≤ n ≤ 255, 0 ≤ k ≤ 16
[Description]
Sets the vertical tab position.
n indicates the line number from the head of line and k indicates the number of vertical tab position.
Settable tab positions are maximum 16.
Vertical tabs are set as an absolute position of (Line feed rate) × (Number of lines). Therefore, even when the line feed
rate is changed after setting, the horizontal tab position does not change.
NUL code indicates the termination of setting.
Set vertical tab positions in ascending order. When a smaller value is set after a value larger than that, the
setting is terminated at that point. All vertical tab positions can be canceled with ESC B NULL code without a parameter.
At the initial state, no vertical tab position is set. When VT is executed in this state, the printer performs in
the same manner as in LF.
When VT is executed after tab positions are cleared by ESC B NUL, the printer performs in the same manner as in CR.
Execution of vertical tab/VT
[ASCII] VT [Decimal] 11 [Hexadecimal] 0B
[Description]
Prints data in the print buffer and feeds paper to the vertical tab position set by ESC B code.
When no vertical tab position is set, the printer performs in the same manner as in LF code.
When VT code is entered beyond the last vertical tab position, the printer performs in the same manner as in FF code.
When VT is executed after tab positions are cleared by ESC B NUL, the printer performs in the same manner as in CR.
Cancels double-width enlarged printing specified by SO code or ESC SO code.
- 66 -
Specifying the absolute position/ESC $
[ASCII] ESC $ n1 n2 [Decimal] 27 36 n1 n2 [Hexadecimal] 1B 24 n1 n2
[Parameter] 0 ≤ n1 ≤ 255, 0 ≤ n2 ≤ 255
[Description]
Specifies the print start position of the next data as an absolute position in dots.
‘Specifying an absolute position’ means to specify the next print start position by the number of dots from the left
margin.
‘n1’and ‘n2’ indicate the number of dots from the left margin.
Number of dots = n1 + 256 × n2
The number of dots is calculated on a 2/203 inch basis.
Values specified beyond the right margin will be ignored.
When an underline is specified, the underline will not be drawn at a moving area.
When image generation speed is set to high, if you use ‘Specifying the absolute position’ command (ESC $) and
Position Alignment command (ESC a) at the same time, the function of ‘Specifying the absolute position’ command (ESC $) will not be available.
Left end
Left margin position
Left margin
Current print position
ABCDEFG HIJ
Absolute position specification
Next print start position
- 67 -
Specifying the relative position/ESC ¥
[ASCII] ESC ¥ n1 n2 [Decimal] 27 92 n1 n2 [Hexadecimal] 1B 5C n1 n2
[Parameter] 0 ≤ n1 ≤ 255, 0 ≤ n2 ≤ 255
[Description]
Specifies the print start position of the next data as a relative position in dots.
‘To specify by a relative position’ means to specify the next print start position by the number of given rightward or
leftward dots, based on the print position immediately before this code.
The number of dots is calculated on a 1/203 inch basis. ‘n1’ and ‘n2’ indicate the number of dots from a print position
used as the reference. Specify leftward moving with two’s complement.
Number of dots = n1 + 256 × n2
−1440 (n1 + 256 × n2) 1440
The number of dots and the values of ‘n1’ and ‘n2’ correspond as follows. (The values of ‘n1’ and ‘n2’ in the table are in
hexadecimal.))
Number of dots
1140
05 A0
00 02
2
00
1
0
FF FF
-1
-2 FF FF
FF FD
-3
-1440 FA 60
n1 n2
01
00 00
Values beyond the left margin or right margin will be ignored.
Underline Specification (ESC-, FS-) by the moving area of ESC ¥ is processed as follows.
Type of underline
specification
Moving direction of ESC¥
Leftward Rightward
ESC- Not drawn Lines are drawn.
FS-
Not drawn Not drawn
Left edge
Left margin position
Left margin
Next printing start position
DEF
Negative direction
Current printing position
Reference position
ABC
Positive direction
Next printing start position
DEF
- 68 -
Setting the VFU tab /ESC b
[ASCII] ESC b n m1 m2…mk NUL [Decimal] 27 98 n m1 m2…mk 0 [Hexadecimal] 1B 62 n m1 m2…mk 00 _ [Parameter] 0 ≤ n ≤ 7, 1 ≤ m ≤ 255, 0 ≤ k ≤ 16
[Description]
Sets the vertical tab position specified by ‘m’ in the channel specified by ‘n’.
‘n’ indicates the channel number and ‘m’ indicates the vertical tab position (number of lines).
Up to 8 channels are available. Specify with the number from 0 to 7.
th
Specify ‘m’ with the number of lines from the first line of the page (0
line) in the current line feed rate.
Once the vertical tab position is set, even when the line feed rate is changed, the tab position does not change.
If ESC b n NUL code is entered without ‘m’ specified, vertical tabs specified in channel ‘n’ will be all deleted.
Immediately after power-ON, no vertical tab is set in any channel.
Specify tab positions in ascending order of the line. When a value smaller than previous ‘m’ is specified, the setting is
completed at that point. The setting is completed also when a position is specified beyond the print area.
Use ESC / code to specify the channel for executing a tab.
It is set to channel 0 in Vertical Tab Position (ESC B code).
VFU: VerticaI Format Unit
Specifying the VFU channel/ESC /
[ASCII] ESC / n [Decimal] 27 47 n [Hexadecimal] 1B 2F n
[Parameter] 0 ≤ n ≤ 255
[Description]
Specifies a VFU channel by ‘n’ to change the vertical tab position in the page to the setting specified in the
channel.
‘n’ indicates the channel number.
In the initial setting at power-on, channel 0 is specified.
This code is used for setting a vertical tab position in that page by channel specification; vertical tabs are not executed (ie.
the print position does not move).
Use VT code to execute vertical tabs.
- 69 -
Back space/BS
[ASCII] BS [Hexadecimal] 8 [Decimal] 08
[Description]
Moves back the print position leftward for a character in the current character width.
When no print data exists before BS code in the same line, or when previous data is a bitmap image, HT code, or
absolute/relative position specification, the print position does not change.
Cannot move back beyond the left margin.
- 70 -
Selecting the font style/ESC k
[ASCII] ESC k n [Decimal] 27 107 n [Hexadecimal] 1B 6B n
[Parameter] n = 0, 1, 2, 3, 4 or 30h, 31h, 32h, 33h, 34h
[Description]
Selects the font style.
n = 0: Roman n = 1: Sanserif n = 2: Courier n = 3: Prestige n= 4: Script
Default is Roman.
- 71 -
Selecting the character code table/ESC t
[ASCII] ESC t n [Decimal] 27 116 n [Hexadecimal] 1B 74 n
[Parameter] n = 0, 1
[Description]
Selects either Italic code or Expanded Graphics code.
When n = 0, Italic code is selected. When n = 1, Expanded Graphics code is selected.
With this code, several language characters can be used at the same time without specification by ESC R
code. See the Character Code Table for character types.
The character code table corresponding to the printer for IBM PC Series becomes available. It is useful
when using foreign-made application software.
With the use of ESC 6 or ESC 7 code, you can switch either to use upper 32 codes as a control code or to use them as a
character code.
- 72 -
Selecting the international character set/ESC R
[ASCII] ESC R n [Decimal] 27 82 n [Hexadecimal] 1B 52 n
[Parameter] 0 ≤ n ≤ 13, 64
[Description]
Selects the character set suitable for each country.
Default is n=0 (U.S.A.) (Factory default setting)
n = 0: USA 1: France 2: Germany 3: UK 4: Denmark 5: Sweden 6: Italy 7: Spain 8: Japan 9: Norway 10: Denmark II 11: Spain II 12: Latin America 13: South Korea 64: Legal
- 73 -
Specifying/Cancelling proportional font/ESC p
[ASCII] ESC p n [Decimal] 27 112 n [Hexadecimal] 1B 70 n
[Parameter] n=0, 1 or “0”, “1”
[Description]
Specifies/Cancels the proportional font.
Selects the proportional font when n=1 or “1”
Cancels the proportional font when n=0 or “0”
The command has priority over other specified character pitch.
Character width when proportional font is specified varies depending on the proportional spacing.
- 74 -
Specifying the character equivalent to 10CPI/ESC P
[ASCII] ESC P [Decimal] 27 80 [Hexadecimal] 1B 50
[Description]
Specifies 10CPI-equivalent characters (18 dots) for printing after this code.
To cancel this code, specify another pitch.
This is the default setting at power-ON.
Specifying the character equivalent to 12CPI/ ESC M
[ASCII] ESC M [Decimal] 27 77 [Hexadecimal] 1B 4D
[Description]
Specifies 12CPI-equivalent characters (15 dots) for printing after this code.
To cancel this code, specify another character pitch.
Specifying the character equivalent to 15CPI/ESC g
[ASCII] ESC g [Decimal] 27 103 [Hexadecimal] 1B 67
[Description]
Specifies 15CPI-equivalent characters (12 dots) for printing after this code.
To cancel this code, specify another pitch.
This code is disabled when Proportional is specified.
- 75 -
Specifying super/subscript/ESC S
[ASCII] ESC S n [Decimal] 27 83 n [Hexadecimal] 1B 53 n
[Parameter] n=0, 1 or 30h, 31h
[Description]
Prints out subsequent print data in superscript or subscript.
Specifies superscript (printing on upper half of normal characters) when ‘n’ = 0 or 30h. Specifies subscript (printing on the lower half of normal characters) when ‘n’ = 1 or 31h.
Character codes can be set within the following range.
32 to 126 (20h to 7Eh) 128 to 175 (80h to AFh) … For Extended Graphic 224 to 239 (E0h to EFh) …… For Extended Graphic
Canceling super/subscript/ESC T
[ASCII] ESC T [Decimal] 27 84 [Hexadecimal] 1B 54
[Description]
Cancels the super/subscript
- 76 -
Specifying italic/ESC 4
[ASCII] ESC 4 [Decimal] 27 52 [Hexadecimal] 1B 34
[Description]
Prints out print data in Italic.
For some characters, the left or right edge of characters may be missed at either or both ends of the paper.
Extended graphic codes B0h to DFh, F4h, and F5h cannot be printed in Italic; they are printed in normal
characters.
Cancelling italic/ESC 5
[ASCII] ESC 5 [Decimal] 27 53 [Hexadecimal] 1B 35
[Description]
Cancels the italic character.
- 77 -
Specifying reduced printing/SI
[ASCII] SI [Decimal] 15 [Hexadecimal] 0F
[Description]
Prints out subsequent data in reduced size.
The character width is reduced to approximately 60% when printed.
This code cannot be combined with 15CPI specification.
Specifying reduced printing/ESC SI
[ASCII] ESC SI [Decimal] 27 15 [Hexadecimal] 1B 0F
[Description]
It executes the same command as SI code.
Cancelling reduced printing/DC 2
[ASCII] DC2 [Decimal] 18 [Hexadecimal] 12
[Description]
Cancels the reduced printing.
- 78 -
Specifying double-width expansion with automatic cancel/SO
[ASCII] SO [Decimal] 14 [Hexadecimal] 0E
[Description]
Executes the double-width expansion printing.
SO code cancels the double-width expansion with DC4 code or line feed. It can also be cancelled with ESC
W, ESC ! c odes.
Specifying double-width expansion with automatic cancel/ESC SO
[ASCII] ESC SO [Decimal] 27 14 [Hexadecimal] 1B 0E
[Description]
It executes the same command as SO code.
Cancelling double-width expansion with automatic cancel/DC4
[ASCII] DC4 [Decimal] 20 [Hexadecimal] 14
[Description]
Cancels the double-width expansion with SO code, ESC SO code.
- 79 -
Specifying/canceling double width large characters/ESC W
[ASCII] ESC W n [Decimal] 27 87 n [Hexadecimal] 1B 57 n
[Parameter] n = 1, 0 or 31h, 30h
[Description]
Specifies the double width large characters.
Specifies the double width large characters when n=1 or 31h.
Cancels the double width large characters when n=0 or 30h.
The double width large characters specified by this code cannot be cancelled with DC4 code or line feed.
The double width large characters specified by SO, ESC SO can be cancelled with ESC W 0.
Specifying/cancelling double height large characters/ESC w
[ASCII] ESC w n [Decimal] 27 119 n [Hexadecimal] 1B 77 n
[Parameter] n = 1, 0 or 31, 30h
[Description]
Specifies the double height large characters.
Specifies the double height large characters when n=1 or 31h.
Cancels the double height large characters when n=0 or 30h.
- 80 -
Specifying emphasis printing/ESC E
[ASCII] ESC E [Decimal] 27 69 [Hexadecimal] 1B 45
[Description]
Prints out print data in emphasized characters.
Prints out data in slightly wider characters.
Cancelling emphasis printing/ESC F
[ASCII] ESC F [Decimal] 27 70 [Hexadecimal] 1B 46
[Description]
Cancels the emphasis printing.
- 81 -
Specifying double strike printing/ESC G
[ASCII] ESC G [Decimal] 27 71 [Hexadecimal] 1B 47
[Description]
Specifies the double strike printing of a data.
Cancelling double strike printing/ESC H
[ASCII] ESC H [Decimal] 27 72 [Hexadecimal] 1B 48
[Description]
Cancels the double strike printing.
- 82 -
Specifying/Cancelling underline/ESC
[ASCII] ESC - n [Decimal] 27 45 n [Hexadecimal] 1B 2D n
[Parameter] n=0, 1 or 30h, 31h
[Description]
Specify/cancels an underline.
Specifies underline at time of n=1, 31h
Cancels underline at time of n=0, 30h
Underlines are not drawn on the following areas.
Moving area by Horizontal Tab (HT) or Absolute Position (ESC $) Leftward moving area by Relative Position (ESC ¥) Characters of B0h to DFh, F4h, and F5h of Extended Graphic code
- 83 -
Collectively specifying a printing mode/ ESC!
[ASCII] ESC ! n [Decimal] 27 33 n [Hexadecimal] 1B 21 n
[Parameter] 0 ≤ n ≤ 255
[Description]
Printing mode is specified with each bit by combination.
Printing mode is specified with each bit under n.
Bit 7 6 5 4 3 2 1 0
At 1
At 0
Combination of printing mode
With ESC ! code, a combination of several printing modes can be specified at one time. A combination with other codes (such as SO and SI) is also available, but in such case, a code needs to be specified for each specification. By specifying 0 in ‘n’ with ESC ! code, you can cancel the specification of all printing modes and return the setting to default.
Proportional
Underline Italic
Cancel Cancel
Double
width
10CPI 12CPI 15CPI
○ ○ ○ ○ ○ × ○ ○ ○
×” mark cannot be combined because of character size.
Bit Corresponding code
0 ESC M, ESC P 1 ESC p 2 SI, DC2 3 ESC E, ESC F 4 ESC G, ESC H 5 ESC W 6 ESC 4, ESC 5 7 ESC -
Double
width
Cancel
Emphasis Super/Sub Reduction Double
Double
strike
printing
Emphasis
Reduction Proportional 12CPI
Cancel Cancel Cancel Cancel
strike
printing
10CPI
Underline
- 84 -
Selecting character style/ ESC q
[ASCII] ESC q n [Decimal] 27 113 n [Hexadecimal] 1B 71 n
[Parameter] n = 0, 1, 2, 3
[Description]
Selects the character style.
When ‘n’ = 1, outline characters are selected.
When ‘n’ = 2, shadowed characters are selected.
When ‘n’ = 3, shadowed outline characters are selected.
When n=0, it cancels the character style.
Extended graphic codes B0h to DFh, F4h, and F5h are printed in normal characters.
85
N
Setting the spacing of characters/ESC SP
[ASCII] ESC SP n [Decimal] 27 32 n [Hexadecimal] 1B 20 n
[Parameter] 0 ≤ n ≤ 127
[Description]
Sets the spacing of characters.
“n” indicates the number of dots. Calculation unit is 1/203 inch.
Default is n=0
Sets the right spacing of characters to [n × basic calculation unit] inches. Spacing of characters will be
indicated as follows.
umber of dots of each character
Left space of each
character
If the horizontal magnification of character is 2 or more, the spacing increases with the magnification.
Character width used during horizontal tab position, left margin, right margin setting includes space
between characters.
each character
Right space of
Space secured by ESC SP
86
t
Aligning the characters/ESC a
[ASCII] ESC a n [Decimal] 27 97 n [Hexadecimal] 1B 61 n
[Parameter] n = 0, 1, 2, 3
[Description]
Selects the aligning of characters.
Performs the aligning of characters by “n” value.
When n=0, left end alignment is performed (default). When n=1, centering is performed. When n=2, right end alignment is performed. When n=3, even alignment is performed.
Left end alignment
Centering
Right end alignmen
Even alignment
Default is n=0
Position alignment is executed between right and left margins when CR, LF, or FF code is entered or buffer-full printing
is executed.
Specifies position alignment at the head of a line.
BS and DEL codes will be ignored.
When ‘n’ = 1 or 2, HT, ESC $ and ESC ¥ codes will be ignored. When ‘n’ = 3, character data after these
codes will be full-justified.
The range of printing length to which full justification can be applied (in one line) is 75 to 125% of the
length between the right and left margins. Print position is determined by adjustment of space width.
When image generation speed is set to fast, full adjustment in case of ‘n’ = 3 does not function.
87
Specifying the download character set/ESC %
[ASCII] ESC % n [Decimal] 27 37 n [Hexadecimal] 1B 25 n
[Parameter] n = 0, 1 or 30h, 31h
[Description]
Specifies/cancels the download characters set.
When n=1, 31h, it specifies the download characters set. However, if no character is defined for download
character set, the specification will be ignored.
When ‘n’ = 0 or 30h, the download character set is canceled and the setting returns to the internal character set.
Before specifying a download character set, be sure to specify the same character type.
88
Copying character set/ESC :
[ASCII] ESC : NUL n s [Decimal] 27 53 0 n s [Hexadecimal] 1B 3A 00 n s
[Parameter] n = 0 s = 0
[Description]
‘s’ is a font number of embedded character set.
Copies the currently selected character set to a download character set.
Specify a character attribute (high-quality character, proportional character, 15CPI, super/subscript character) to be
copied before entering this code. Defined characters are printed in this pitch. Note, however, that characters are printed in the character width pitch defined when ‘proportional’ is specified.
Clear download characters already defined before copying a character set. Copying range is characters
from 20h to 7Eh.
89
Defining the download characters/ESC &
[ASCII] ESC & s n m a0 a1 a2 p1 pk [Decimal] 27 38 s n m a0 a1 a2 p1 pk [Hexadecimal] 1B 26 s n m a0 a1 a2 p1 pk
[Parameter] S = 0, 32 ≤ n ≤ m ≤ 127 (20h ≤ n ≤ m ≤ 7Fh)
[Description]
Defines the download characters.
‘S’ is always 0.
‘n’ specifies a character code that starts defining. ‘m’ specifies a character code that completes defining. To
define only one character, specify ‘n’ = ‘m’.
a0’, ‘a1’, and ‘a2’ specify character width.
MSB
p
1
LSB
MSB
p
2
LSB
MSB
p
3
LSB
MSB
p
4
LSB
MSB
p
5
LSB
MSB
p
6
LSB
……
……
……
MSB p
k-2
LSB
MSB p
k-1
LSB
MSB
p
LSB
MSB
MSB
p
p
LSB
MSB
p
LSB
……
3
……
4
1
LSB
MSB
k
p
LSB
2
K=3 × a1: High-quality characters, Proportional characters
K=2 × a1: 15CPI characters, Super-/Sub-script characters
(Character: Height×width(a0+a1+a2))
24-dot system 10CPI-equivalent character: 24 × 18, 12CPI-equivalent character: 24 × 15 15CPI-equivalent character: 16 × 12, Proportional: 24 × 21* Super-/sub-script: 16 × 12 * is the maximum character width. The maximum value of ‘a1’ is 19.
90
MSB p
k-1
LSB
MSB
p
LSB
k
16-dot system 10CPI-equivalent character: 16 × 12, 12CPI-equivalent character: 16 × 10 15CPI-equivalent character: 16 × 8, Proportional: 16 × 14** Super-/sub-script: 16 × 12 ** is the maximum character width. The maximum value of ‘a1’ is 12.
To define several download characters, send ‘a0 … pk’ the number of times equal to the number of characters to be
defined (m – n + 1).
Cannot be used together with external character defining.
91
Selecting the bit image mode/ESC *
[ASCII] ESC * m n1 n2 data [Decimal] 27 42 m n1 n2 data [Hexadecimal] 1B 2A m n1 n2 data
[Parameter] m = 0, 1, 2, 3, 4, 6, 32, 38, 39 0 ≤ n1 ≤ 255, 0 ≤ n2 ≤ 11
[Description]
Selecting the bit image mode depending on the “m " value. (See chart below)
n1, n2 indicates the number of dots in horizontal direction.
n1: Remainder of the number of dots divided by 256. n2: Quotient of the number of dots divided by 256.
The maximum number of dots in horizontal direction is as follows.
m
(decimal)
0 60DPI 101DPI 416 1 120DPI 203DPI 832
8 dots
24 dots
The number of dots is defined by (n1 + n2 × 256). Therefore, the number of data that needs to be sent is
defined as follows. When ‘m’ = 0, 1, 2, 3, 4, or 6: n1 + n2 × 256 When ‘m’ = 32, 33, 34, or 39: (n1 + n2 × 256) × 3
2 120DPI 203DPI 832 3 240DPI 203DPI 832 4 80DPI 101DPI 416
6 90DPI 101DPI 416 32 60DPI 101DPI 416 33 120DPI 203DPI 832 38 90DPI 101DPI 416 39 180DPI 203DPI 832
Dot density in horizontal
direction
EPSON PD24
Maximum value for
n1+256×n2
92
Correspondence between data and dots
8-dot bit image
7 2 6 2 5 2 4 2 3 22 21 20
2
2 7 2 6 2 5 2 4 2 3 22 21 20 27 26 25 24 23 22 21 20 2 7 2 6 2 5 2 4 23 22 21 2
24-dot bit image
0
93
Setting bit image repeat/ESC *
[ASCII] ESC * m r1 r2 n1 n2 data [Decimal] 27 42 m r1 r2 n1 n2 data [Hexadecimal] 1B 2A m r1 r2 n1 n2 data
[Parameter] ‘m’ = 167 When ‘m’ = 167: 0 n1 180, n2 = 0
[Description]
Selects a bit image according to the value of ‘m’ and repeats printing the number of times specified.
‘r1’ and ‘r2’ indicate the number of times the bit image is to be printed.
r1: Remainder of the number of times divided by 256 r2: Quotient of the number of times divided by 256
‘n1’ and ‘n2’ indicate the number of dots in horizontal direction of the bit image to be repeated. n1: Remainder of the horizontal number of dots of the bit image to be printed divided by 256. n2: Quotient of the horizontal number of dots of the bit image to be printed divided by 256.
m = 167, 0 n 180, n2 = 0
m Vertical dot density Horizontal dot density Adjacent dot specification
24 dots 167 203DPI 203DPI Available
94
8-dot single density bit image/ESC K
[ASCII] ESC K n1 n2 data [Decimal] 27 75 n1 n2 data [Hexadecimal] 1B 4B n1 n2 data
[Parameter] 0 ≤ n1 ≤ 255, 0 ≤ n2 ≤ 1
[Description]
This command executes the printing of 8 dot single density bit image for the number of data specified by n1, n2.
n1, n2 indicates the dot position. Set the values as follows.
n1: Remainder of the number of dot positions divided by 256. n2: Quotient of the number of dot positions divided by 256
When ESC K is specified, the printer prints out data in the following resolution: Vertical dot 3/203 in. Horizontal dot 2/203 in.
The maximum number of dot positions is 416.
8-dot double density bit image/ESC L
[ASCII] ESC L n1 n2 data [Decimal] 27 76 n1 n2 data [Hexadecimal] 1B 4C n1 n2 data
[Parameter] 0 ≤ n1 ≤ 255, 0 ≤ n2 ≤ 3
[Description]
This command executes the printing of 8 dot double density bit image for the number of data specified by n1, n2.
‘n1’ and ‘n2’ can be specified in the same manner as ESC K.
When ESC L is specified, the printer prints out data in the following resolution: Vertical dot 3/203 in.
Horizontal dot 1/203 in.
The maximum number of dot positions is 832.
95
8-dot double speed/density bit image/ESC Y
[ASCII] ESC Y n1 n2 data [Decimal] 27 89 n1 n2 data [Hexadecimal] 1B 59 n1 n2 data
[Parameter] 0 ≤ n1 ≤ 255, 0 ≤ n2 ≤ 3
[Description]
This command executes the printing of 8 dot double speed/density bit image for the number of data specified by n1, n2.
‘n1’ and ‘n2’ can be specified in the same manner as ESC K.
When ESC L is specified, the printer prints out data in the following resolution: Vertical dot 3/203 in.
Horizontal dot 1/203 inch.
The maximum number of dot positions is 832. However, horizontally adjacent dots are omitted in printing.
8-dot quadruple density bit image/ESC Z
[ASCII] ESC Z n1 n2 data [Decimal] 27 90 n1 n2 data [Hexadecimal] 1B 5A n1 n2 data
[Parameter] 0 ≤ n1 ≤ 255, 0 ≤ n2 ≤ 3
[Description]
This command executes the printing of 8 dot quadruple density bit image for the number of data specified by n1, n2.
‘n1’ and ‘n2’ can be specified in the same manner as ESC K.
When ESC L is specified, the printer prints out data in the following resolution: Vertical dot 3/203 inch.
Horizontal dot 1/203 inch.
The maximum number of dot positions is 832. However, horizontally adjacent dots are omitted in printing.
96
Changing the bit image mode/ESC ?
[ASCII] ESC ? c m [Decimal] 27 63 c m [Hexadecimal] 1B 3F c m
[Parameter] c = “K”, “L”, “Y”, “Z” (4Bh, 4Ch, 59h, 5Ah) m = 0, 1, 2, 3, 4, 6, 32, 33, 38, 39
[Description]
Converts the bit image mode of ESC K, ESC L, ESC Y, and ESC Z into the mode of ESC *.
Specifies the value of ‘m’ in the same manner as parameter ‘m’ to be specified in ESC * modes.
‘c’ indicates the type of bit image (ESC K, ESC L, ESC Y, ESC Z) to be converted.
Specifies ‘c’ as follows.
ESC K → ESC ? K m ESC L → ESC ? L m ESC Y → ESC ? Y m ESC Z →ESC ? Z m
The power-ON default setting of each code is as follows.
ESC K → ESC * 0 ESC L → ESC * 1 ESC Y → ESC * 2 ESC Z → ESC * 3
97
Initializing the printer/ESC @
[ASCII] ESC @ [Decimal] 27 64 [Hexadecimal] 1B 40
[Description]
Changes the software setting of the printer to the same one as power-ON setting.
Data in the print buffer will be cleared.
User definition area (download character) will not be cleared.
98
Cancelling high order side control code/ESC 6
[ASCII] ESC 6 [Decimal] 27 54 [Hexadecimal] 1B 36
[Description]
Eliminates a function that works as a control code from upper 32 codes in the character code table so that it can be used as a character code.
Relevant character codes are from 128 to 159 (80h to 9Fh).
This is the power-ON setting.
99
Setting high order side control code/ESC 7
[ASCII] ESC 7 [Decimal] 27 55 [Hexadecimal] 1B 37
[Description]
Adds a function as a control code to upper 32 codes in the character code table so that it cannot be used as a character code.
Relevant character codes are from 128 to 159 (80h to 9Fh).
The content of the code to be controlled corresponds to 0 to 31 (00h to 1Fh) of lower character codes.
100
Loading...