1. The contents of this manual may be changed without warning.
2. It prohibits transferring, diverting to some other purposes and copying the contents of this
manual without prior notice by any means.
3. Please contact us in case of doubtful points, typographical error or missing items with regards
to the content of this manual.
4. Our company take no responsibility for the influence of the employed result.
Star is the registered trademark of STAR MICRONICS CO., LTD.
EPSON is the registered trademark of Seiko Epson, Inc.
ESC/POS is the registered trademark of Seiko Epson, Inc.
Command reference CITIZEN
2
CONFIDENTIAL CD-S500 series
Revision list
Revision Date Details Remark
1.00 04/11/24 Original version
Command reference CITIZEN
3
CONFIDENTIAL CD-S500 series
Forward
This manual explains the control commands for CD–S500 series including ESC/POS mode,
CBM mode, and Star mode.
We advise you to read thoroughly the User’s Manual of the printer before using this manual.
General content of this manual
This manual is organized in the follwing manner so that you can conveniently use Citizen’s
CD–S500 printer series.
Outline
The type of operation mode and printer control commands are explained.
Control code
It explains the three control commands for the printer: ESC/POS mode, CBM mode, and Star
mode.
3. Character Code Table.............................................................................................................................. P 95
4. Attention on Use ......................................................................................................................................P 103
4.5 Recording Paper.............................................................................................................................. P 105
4.6 Paper Width and Printing Digit Number......................................................................................P 106
4.7 Paper Near-End (PNE) Detection.................................................................................................. P 108
5.Attention of Black Mark Sensor Equipped Model ................................................................................. P 109
5.1 Operation of Black Mark Equipped Model ................................................................................... P 109
5.2 FEED Switch Operation of Black Mark Equipped Model............................................................ P 109
5.3 Cautions on Program Creation ......................................................................................................P 109
5.4 Black Mark Position of Paper ........................................................................................................ P 110
6.Interface ................................................................................................................................................... P 112
6.1 Serial Interface ............................................................................................................................... P 112
6.2 IEEE 1284 Interface....................................................................................................................... P 113
6.3 Drawer Kick-out Interface ............................................................................................................. P 114
7.General specification ............................................................................................................................... P 115
Command reference CITIZEN
5
CONFIDENTIAL CD-S500 series
1. Outline
1.1 Mode of Operation
The products of CD-S500 dot-impact-printer series are equipped with ESC/POS mode, CBM mode
and Star mode.
1.2 Character Set
All the printing data sent to a printer from a host computer is automatically changed into 1 byte
alphanumeric katakana character (ANK) corresponding to the character and sign.
Regarding the change in the character set and the mode that are set as factory default, please refer
to the instructions manual attached to each printer.
Cautions: Please refer to the appendix of this manual about the contents of the character set.
Command reference CITIZEN
6
CONFIDENTIAL CD-S500 series
1.3 Control Commands
1.3.1 Explanation for Control Commands
Control commands control operation of printers, such as start/end of printing, and line feed,
paper feeding.
All functions associated with printing, such as type of character, enlargement of character, or format
are controlled.
Control commands vary with modes of operation. (See 1.1)
1.3.2 How to Send Control Commands
While there are several methods of sending control commands to a printer from a host computer,
method by BASIC is common.
Example .1
Character set “CITIZEN” is printed in normal size and enlarged size.
It is assumed that the printer is set under CBM mode.
Program Creation
Control commands in CBM mode lists that the command name for a double width large character is
SO, and 0E for hexadecimal code . Command name for canceling double width large character is SI
and 0F for hexadecimal code . Using these two codes, the resulting program will be as follows:
Command for specifying/canceling of double width large character are sent under line numbers
20 and 40. As a result, while the same character set is printed in line numbers 30 and 50, they
are printed in double width expansion in line number 30, and printing is canceled in line
number 50.
In this manual, BASIC is used for sample program. Please refer to the manual of BASIC for further
details in creating a program by BASIC.
Command reference CITIZEN
7
CONFIDENTIAL CD-S500 series
2. Control Code Command
This chapter explains the control commands currently supported according to each mode of
operation.
Explanation of each control commands is as follows.
Example :
Name of a command/Mnemonic
[Form type] Mnemonic code
[Decimal] The code which constitutes a command is indicated in decimal
number.
[Hexadecimal] The code which constitutes a command is indicated in
hexadecimal number.
[Parameter] Indicates the value (setting range) of argument of the command.
[Description] Explains the function of a command.
Command reference CITIZEN
8
CONFIDENTIAL CD-S500 series
ESC/POS mode
2.1 ESC/POS Mode
The following commands are effective when [Command Type] of the software switch is set to EPSON.
S: STANDARD MODE P: PAGE MODE
Setting: Command valid only for setup
Command Hex code S P Function
HT 09 O O Horizontal tabulation
LF 0A O O Line feed
FF 0C O O Data printing of PAGE MODE *1
CR 0D O O Returning to printing
CAN 18 O Canceling print data in PAGE MODE *1
DLE EOT 10 04 O O Real-time sending of status
DLE ENQ 10 05 O O Real-time request to printer
DLE DC4 10 14 O O Real-time output of specified pulse
ESC FF 1B 0C O Data printing in PAGE MODE *1
ESC RS 1B 1E O Buzzer Sounding *1
ESC SP 1B 20 O O Setting the spacing of characters
ESC ! 1B 21 O O Collectively specifying a printing mode
ESC % 1B 25 O O Specifying/Canceling the download character
ESC & 1B 26 O O Defining the download characters
ESC * 1B 2A O O Specifying the bit image mode
ESC – 1B 2D O O Specifying/Canceling underline
ESC 2 1B 32 O O Specifying the 1/6 inch line feed rate
ESC 3 1B 33 O O Specifying the N/144 inch line feed rate
ESC < 1B 3C O Return form
ESC = 1B 3D O O Selecting peripheral equipment
ESC ? 1B 3F O O Deleting the download characters
ESC @ 1B 40 O O Initializing the printer
ESC D 1B 44 O O Specifying horizontal tab positions
ESC E 1B 45 O SettingSpecifying/Canceling emphasis printing
ESC G 1B 47 O SettingSpecifying/Canceling double strike printing
ESC J 1B 4A O O Printing + n/144 inch forward feeding
ESC L 1B 4C O Selecting PAGE MODE *1
ESC M 1B 4D O O Selection of character fonts
ESC R 1B 52 O O Selecting the international character set
ESC S 1B 53 O Selecting STANDARD MODE *1
ESC T 1B 54 SettingO
ESC U 1B 55 O O Specifying/Canceling single direction printing
ESC V 1B 56 O SettingSpecifying/Canceling 90° right-turned characters *1
ESC W 1B 57 O Setting the print area in PAGE MODE *1
ESC a 1B 61 O SettingAligning the characters
ESC c 3 1B 63 33 O O Selecting the paper-less detection valid for paper end
ESC c 4 1B 63 34 O O Selecting the paper-less detection valid for print stop
ESC c 5 1B 63 35 O O Enabling/Disabling the panel switches
ESC d 1B 64 O O Printing + forward feeding by n line
ESC I 1B 69 O Full cut
ESC m 1B 6D O Partial cut (Leaving one area uncut)
ESC p 1B 70 O O Generating the specified pulse
ESC r 1B 72 O SettingSelecting printing color (black, red)
ESC t 1B 74 O O Selecting the character code table
ESC u 1B 75 O O Selecting the status of peripheral equipment
ESC v 1B 76 O O Sending the status of paper end detector
ESC { 1B 7B O SettingSpecifying/Canceling the inverted characters
GS FF 1D 0C O Page feeding + cut operation *2
GS ( A 1D 28 41 O Execution of test printing
GS I 1D 49 O O Sending the printer ID
GS V 1D 56 O O Paper cutting
Selection of character printing direction in PAGE MODE
(Only for product overseas)
signal output
*1
Command reference CITIZEN
9
CONFIDENTIAL CD-S500 series
ESC/POS mode
Command Hex code S P Function
GS a 1D 61 O O Enabling/Disabling Automatic Status Back
GS r 1D 72 O O Sending of status
FS g 1 1C 7B 31 O Writing data into the user NV memory
FS g 2 1C 7B 32 O Reading data from the user NV memory
FS p 1C 70 O Printing the NV bit images
FS q 1C 71 O Defining the NV bit images
*1: Incompatible with TM-U220.
*2: Command valid only at time of BM spec.
(These commands are effective only for model compatible with Japanese and Chinese specification.)
Command Hex code S P Function
FS ! 1C 21 O O Collectively specifying the Chinese character mode
FS & 1C 26 O O Selecting the Chinese character mode
FS – 1C 2D O O Specifying/canceling Chinese character underline
FS . 1C 2E O O Canceling the Chinese character mode
FS 2 1C 32 O O Registering the download Chinese characters
FS ? 1C 3F O O Deleting the download Chinese characters
FS C 1C 43 O O Selecting the code for kanji characters
(Japanese only)
FS S 1C 53 O O Specifying the space for Chinese characters
FS W 1C 57 O O Specifying/canceling quadruple large Chinese
characters
<Invalid command>
● Incompatible ESC command disregards 1 byte characters after ESC.
● Incompatible GS command disregards 1 byte characters after GS.
● Incompatible FS command disregards, including a parameter. (Only for product overseas)
Command Hex code S P Function
FS C 1C 43 n Disregards 3-byte characters
FS – 1C 2D n
FS & 1C 26
FS . 1C 2E
FS ! n 1C 21 n
FS S n1 n2 1C 53 n1 n2
3 ↑
2 ↑
2 ↑
3 ↑
4 ↑
Command reference CITIZEN
10
CONFIDENTIAL CD-S500 series
ESC/POS mode
Horizontal Tab/HT
[ASCII] HT
[Decimal] 9
[Hexadecimal] 09
[Parameter]
[Description] ● Shifts the printing position to the next horizontal tab position.
● Sending of the HT code that exceeds the specified area (when it exceeds the last
tab position in a line) will be ignored.
● The initial setting for horizontal tab position is set at intervals of 8 characters
with 7 × 9 font pitch (9th, 17th, 25th columns).
● Horizontal tab positions can be set up by ESC D command.
● The moving position of HT is not underlined while underline is specified.
A new-line/LF
[ASCII] LF
[Decimal] 10
[Hexadecimal] 0A
[Parameter]
[Description] ● Line feed is performed.
● When printing data is in a reception buffer, line feeds after printing.
● Line feed rate is 24 dots (1/6 inch) in an initial state.
● Setup is possible from 0 to 255 dots with ESC 3 command.
● Returns to initial value of 24 dots with ESC 2 command.
Data printing in page mode or BM use/FF
[ASCII] FF
[Decimal] 12
[Hexadecimal] 0C
[Parameter]
[Description] ● It is this command at the page mode or BM use time, and it accepts and is
effective.
● At time of a page mode
− Package printing of the data of a printing area is carried out, and it returns
to a standard mode.
− All the data of an applicable page is eliminated after printing.
● At time of BM use
When printing data is in a receiving buffer, it feeds the page so that the center
of the next BM is at the head.
Command reference CITIZEN
11
CONFIDENTIAL CD-S500 series
ESC/POS mode
Returning to printing/CR
[ASCII] CR
[Decimal] 13
[Hexadecimal] 0D
[Parameter]
[Description] ● It prints the unprinted data in the buffer.
● In case of serial interface
− Line feed is not performed. The next printing position becomes the head of
line.
● In case of parallel interface
− While the [AUTO LF] setting of the soft switch is OFF, line feed is not
performed. The next printing position becomes the head of line.
− While the [AUTO LF] setting of the soft switch is ON, line feed is performed.
The next printing position becomes the head of line.
Data canceling in PAGE MODE/CAN
[ASCII] CAN
[Decimal] 24
[Hexadecimal] 18
[Parameter]
[Description] ● This command is effective only in PAGE MODE.
● Erases all data contained in the print area set in PAGE MODE. All data in the
previously set print area are also erased if they are in the currently specified
print area.
Command reference CITIZEN
12
CONFIDENTIAL CD-S500 series
ESC/POS mode
Real-time sending of status/DLE EOT
[ASCII] DLE EOT n
[Decimal] 16 4 n
[Hexadecimal] 10 04 n
[Parameter] 1<
n<4
[Description] ● Sends in real-time the status specified by “n”.
n=1: Printer status.
n=2: Status caused by an offline condition.
n=3: Status caused by an error.
n=4: Paper detector status.
● This command is dealt with when it is received. Each status represents the
current status.
● The status is transferred without checking whether the host is ready to receive
or busy.
● This command cannot be interleaved into the code string of another command
consisting of 2 bytes or more codes.
● This command cannot be executed in a BUSY state under parallel interface.
(1) n=1: In case of printer status
Bit Function
0 Unused Fixed at 0
1 Unused Fixed at 1
2 Status of Pin 3 of Drawer
3 Online/Offline Online Offline
4 Unused Fixed at 1
5 Undefined − −
6 Undefined − −
7 Unused Fixed at 0
0 1
“L” “H”
Valu e
(2) n=2: In case of status caused by an offline condition
Bit Function
0 Unused Fixed at 0
1 Unused Fixed at 1
2 Status of rear cover Lever closed Lever closed
3 Paper feed by paper feed
switch
4 Unused Fixed at 1
5 Printing stop because of “paper
out” state
6 Error occurred Not occurred Occurred
7 Unused Fixed at 0
0 1
Not in paper
feed state
No stopping Stopping
Valu e
In paper
feed state
Command reference CITIZEN
13
CONFIDENTIAL CD-S500 series
ESC/POS mode
(3) n=3: In case of status caused by an error
Bit Function
0 Unused Fixed at 0
1 Unused Fixed at 1
2 Mechanical error occurred No error Error occurred
3 Auto Cutter error occurred No error Error occurred
4 Unused Fixed at 1
5 Unrecoverable error occurred No error Error occurred
6 Auto recovery error occurred No error Error occurred
7 Unused Fixed at 0
0 1
Valu e
Bit 2: If home position error or black mark error occurred, it will become “1”.
Bit 3: If cut position error occurred, it will become “1”.
In Bit 2, 3, ENQ n (1<
n<2) can be used to recover from the error after
removing the cause of the error.
It is not possible, however, to recover from any error due to defect in
hardware or mechanism.
Bit 5: If hardware error (RAM check, FROM write, 24V) occurred, it will become
“1”.
Bit 6: If a head overheat is detected, it will become “1”. If the temperature falls, it
will become “0”.
(4) n=4: In case of paper detector status
Bit Function
0 Unused Fixed at 0
1 Unused Fixed at 1
2 Paper found Paper not found
Detecting paper near-end
3
4 Unused Fixed at 1
5 Paper found Paper not found
Detecting paper-end
6
7 Unused Fixed at 0
0 1
Paper found Paper not found
Paper found Paper not found
Valu e
Command reference CITIZEN
14
CONFIDENTIAL CD-S500 series
ESC/POS mode
Real-time request of status/DLE ENQ
[ASCII] DLE ENQ n
[Decimal] 16 5 n
[Hexadecimal] 10 05 n
[Parameter] n=1, n=2
[Description] ● Responds in real-time to the request that the host specifies with number “n”.
n=1: After recovering from an error, the printer resumes printing from the
beginning of the line where the error occurred.
n=2: After clearing the receive buffer and the print buffer, the printer recovers
from the error.
● This command is effective only when an auto cutter error has occurred.
● This command will be processed as it is received.
● This command cannot be interleaved into the code string of another command
consisting of 2 bytes or more codes.
● This command cannot be executed in a BUSY state under parallel interface.
Real-time output of specified pulse/DLE DC4
[ASCII] DLE DC4 fn m t
[Decimal] 16 05 fn m t
[Hexadecimal] 10 05 fn m t
[Parameter] fn=1 fixed m=0, 1 1<
t<8
[Description] ● A signal specified with “t” is output at real time to the connector pin specified
● This command will be processed as it is received.
● This command cannot be interleaved into the code string of another command
consisting of 2 bytes or more codes.
● This command cannot be executed in a BUSY state under parallel interface.
Buzzer sounding/ESC RS
[ASCII] ESC RS
[Decimal] 27 30
[Hexadecimal] 1B 1E
[Parameter]
[Description] ● This command is effective only when buzzer setting of the software switch is
set to ON.
● If the command is received, buzzer sounds for approx. 200ms.
Command reference CITIZEN
15
CONFIDENTIAL CD-S500 series
ESC/POS mode
Data printing in PAGE MODE/ESC FF
[ASCII] ESC FF
[Decimal] 27 12
[Hexadecimal] 1B 0C
[Parameter]
[Description] ● This command is effective only in PAGE MODE.
● Executes a batch printout of data mapped in the print area in PAGE MODE.
Data, ESC T and ESC W settings and the character mapping position are held
even after printing.
Setting the spacing of characters/ESC SP
[ASCII] ESC SP n
[Decimal] 27 32 n
[Hexadecimal] 1B 20 n
[Parameter] 0<
n<255
[Description] ● Sets the spacing of characters in half-dot unit.
● “n” indicates the number of dots. Calculation unit is 1/160 inch.
● Default n=0
● Sets the right spacing of characters to [n × basic calculation pitch] inches.
● 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.
● In PAGE MODE, if the start point is top left or bottom right, the horizontal
basic calculation pitch 1/160 is used. If the start point is top right or bottom left,
the vertical basic calculation pitch 1/144 is used.
73n 73
Command reference CITIZEN
16
CONFIDENTIAL CD-S500 series
ESC/POS mode
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
Function Under-
line
At 1 ON − ON ON ON − −7 × 9
At 0 OFF − OFF OFF OFF − −9 × 9
UnusedDouble
width
Double
height
Emphasis Unused UnusedFONT
● An underline is attached to the character space <ESC SP n> but not attached
to the part having been skipped by the horizontal tab.
7
3HTn 73n
Command reference CITIZEN
17
CONFIDENTIAL CD-S500 series
ESC/POS mode
Specifying/Canceling the download character set/ESC %
[ASCII] ESC % n
[Decimal] 27 37 n
[Hexadecimal] 1B 25 n
[Parameter] 0<
n<FFh
[Description] ● Specifying/Canceling the download characters.
● The lowest bit “n0” is valid for “n”.
With n=<*******0>B, the download character set is canceled.
With n=<*******1>B, the download character set is specified.
● Only the lowest bit is valid for “n”.
● If the download character set is canceled, the internal character set will be
automatically specified.
● The initial value is n=0.
Defining the download characters/ESC &
[ASCII] ESC & s n m a p1… pn
[Decimal] 27 38 s n m a p1… pn
[Hexadecimal] 1B 26 s n m a p1… pn
[Parameter] s=2h
n<m<7Eh
20h<
In case of 9 × 9 0<
In case of 7 × 9 0<
0<
p1…pn<255
a<0Ch
a<09h
[Description] ● “s” indicates the number of bytes in vertical direction.
● “n” indicates the start character code and “m” indicates the end character code.
To define only one character, set n=m.
● “a” indicates the number of dots in horizontal direction.
● Definable character codes include 95 characters at maximum in the range of
ASCII code (20h to 7Eh).
● “pn” is the data to be defined, which indicates the pattern equal to “a” dots in
horizontal direction from the left end. The rest of pattern on the right side is
filled with space.
● Once download characters are defined, they remain valid until redefinition,
execution of ESC “@” and delete by ESC ? or power OFF is performed.
Command reference CITIZEN
18
CONFIDENTIAL CD-S500 series
ESC/POS mode
Specifying the bit image mode/ESC *
[ASCII] ESC * m nL nH dn
[Decimal] 27 42 m nL nH dn
[Hexadecimal] 1B 2A m nL nH dn
[Parameter] m=0, 1 0<
nL<FFh 0<nH<03h
[Description] ● According to the bit image mode specified by m, bit image data are printed.
● The number of dots printed is specified as nL, nH in 16 bits.
Dot width=nL + (256 × nH)
● If bit image data have been input excess of dot positions that can be printed on
one line, the excess data are discarded.
● Concerning bit image data (dn), bits to be printed are specified as “1” and bits
not to be printed as “0”.
● The printing modes specified by m are as follows:
Vert ic al
m(h) Mode
0 8-dots single density 8 200/210
1 8-dots double density 8 400/420
direction
No. of Dots Max. Dot
Horizontal
direction
Density
● When the value of m is out of the above range, the data after nL is processed as
normal printing data.
● If bit image data have been input excess of dot positions that can be printed on
one line, the excess data are discarded.
TOP
DATA MSB 7 6 5 4 3 2 1 0 LSB
BOTTOM
HEAD1 O
HEAD2 O
HEAD3 O
HEAD4 O
HEAD5 O
HEAD6 O
HEAD7 O
HEAD8 O
HEAD9 O
Command reference CITIZEN
19
CONFIDENTIAL CD-S500 series
ESC/POS mode
Specifying/Canceling an underline/ESC −
[ASCII] ESC − n
[Decimal] 27 45 n
[Hexadecimal] 1B 2D n
[Parameter] 0, 1, 2, 30h, 31h, 32h
[Description] ● Specifying/Canceling an underline.
● An underline is attached to the full character width but not attached to the
part having been skipped by the horizontal tab (HT) and the dot position shifts.
● The kinds of underline specified by n are as follows:
n=0: Canceling an underline.
n=1, 2: Specifying an underline for 1-dot width.
● The width of underline is a specified width regardless of character size.
● The underline can be specified also by ESC !, but the last processed command
will become effective.
● The initial value is n=0.
Specifying the 1/6-inch line feed rate/ESC 2
[ASCII] ESC 2
[Decimal] 27 50
[Hexadecimal] 1B 32
[Parameter]
[Description] ● Sets the line feed rate per line to 1/6-inch.
Setting the line feed rate/ESC 3
[ASCII] ESC 3 n
[Decimal] 27 51 n
[Hexadecimal] 1B 33 n
[Parameter] 0<
n<255
[Description] ● Sets the line feed rate per line to [n × 1/144] inches.
● The initial value is n=24 and approximately 1/6 inches (4.25mm).
● In PAGE MODE, if the start point is top left or bottom right, the horizontal
basic calculation pitch 1/144 is used. If the start point is top right or bottom left,
the vertical basic calculation pitch 1/160 is used.
Command reference CITIZEN
20
CONFIDENTIAL CD-S500 series
ESC/POS mode
Return home/ESC <
[ASCII] ESC <
[Decimal] 27 60
[Hexadecimal] 1B 3C
[Parameter]
[Description] ● This command is effective only in STANDARD MODE.
● Perform home position detection and return to a centering position.
Data input control/ESC =
[ASCII] ESC = n
[Decimal] 27 61 n
[Hexadecimal] 1B 3D n
[Parameter] n=1, 2, 3
[Description] ● Selects a peripheral equipment for which data input from the host is valid.
n Function
1 Only printer is valid.
2 Only customer display is valid.
3 Both printer and customer display are valid.
● When the printer has not been selected (n=2), the printer abandons all received
data until it is selected by this command (excluding DLE, EOT DLE, ENQ).
● The initial value is n=1.
● Returns to n=1 state by ESC @ under n=3 (Both printer and customer display
are valid).
Command reference CITIZEN
21
CONFIDENTIAL CD-S500 series
ESC/POS mode
Deleting the download characters/ESC ?
[ASCII] ESC ? n
[Decimal] 27 63 n
[Hexadecimal] 1B 3F n
[Parameter] 20<
n<7E
[Description] ● Deletes the download characters of specified code.
● “n” indicates the code of characters to be deleted.
● This command deletes the character font selected by ESC !.
● If the specified character code is undefined, this command will be ignored.
Initializing the printer/ESC @
[ASCII] ESC @
[Decimal] 27 64
[Hexadecimal] 1B 40
[Parameter]
[Description] ● Clears data stored in the print buffer and initializes various settings.
● Data in the receiving buffer are maintained.
● NV bit image definitions are maintained.
● User NV memory data are maintained.
Setting the horizontal tab format/ESC D
[ASCII] ESC D n1… nK NULL
[Decimal] 27 68 n1… nK NULL
[Hexadecimal] 1B 44 n1… nK NULL
[Parameter] 1<
n<255 0<k<32
[Description] ● The tab position is set to the position defined by “character width × n from the
left margin”. “k” indicates the number of horizontal tab position data to be set.
● At this time, the character width includes space between characters. If a
horizontal magnification of character is specified, the character width will
increase with the magnification.
● <nK> which denotes a setting position is processed in the increasing order and
ends at <00>h. When <nK> is equal to or smaller than its preceding <nK−1>,
the tab setting is finished. Then, the next data onward will be processed as
normal data.
● Settable tab positions are maximum 32. Tab positions specified exceeding this
limit is ignored.
● ESC “D” NULL clears all the set tab positions. The horizontal tab (HT)
command after clearing is ignored.
● Default is 7 × 9 and positions at eight-character intervals (9th, 17th, 25th,
33rd,... “n”th columns).
Command reference CITIZEN
22
CONFIDENTIAL CD-S500 series
ESC/POS mode
Specifying/Canceling emphasis printing/ESC E
[ASCII] ESC E n
[Decimal] 27 69 n
[Hexadecimal] 1B 45 n
[Parameter] 0<
n<FFh
[Description] ● Specifies/Cancels the printing of emphasized characters.
● In PAGE MODE, the following commands are effective only for setting.
(1) ESC V Specifying/Canceling 90°-turned characters.
(2) ESC a Alignment of characters
(3) ESC { Specifying/Canceling inverted characters
● In PAGE MODE, the following commands are ignored.
(1) GS (A Execution of test printing
● In PAGE MODE, the following commands become invalid.
(1) FS p Printing of NV bit image
(2) FS q Definition of NV bit image
(3) FS g 1 Data writing to user NV memory
(4) FS g 2 Data reading to user NV memory
Selection of character fonts/ESC M
[ASCII] ESC M n
[Decimal] 27 77 n
[Hexadecimal] 1B 4D n
[Parameter] 0, 1, 30h, 31h
[Description] ● Selects character fonts.
● The kinds of font specified by n are as follows:
n=0, 30 h: 9 × 9 dot font
n=1, 31 h: 7 × 9 dot font
● The initial value is n=0.
Command reference CITIZEN
24
CONFIDENTIAL CD-S500 series
ESC/POS mode
Selecting the international character set/ESC R
[ASCII] ESC R n
[Decimal] 27 82 n
[Hexadecimal] 1B 52 n
[Parameter] 0<
n<15, 64
[Description] ● Select the international character set.
● Default is U.S.A.
n=0
n(HEX) International character set
0 U.S.A.
1 France
2 Germany
3 U.K.
4 Denmark
5 Sweden
6 Italy
7 Spain
8 Japan
9 Norway
10 Denmark 2
11 Spain 2
12 Latin America
13 Korea
14 Slovenia/Croatia
15 China
64 Legal
Selecting STANDARD MODE/ESC S
[ASCII] ESC S
[Decimal] 27 83
[Hexadecimal] 1B 53
[Parameter]
[Description] ● Switches from PAGE MODE to STANDARD MODE.
● This command is effective only if it is entered in PAGE MODE.
● Data mapped in PAGE MODE are cleared.
● The print area defined by ESC W is initialized.
● The settings by the following commands, which have separate settings for
PAGE MODE and STANDARD MODE, are changed to the settings for PAGE
MODE.
● In STANDARD MODE, this command executes only the internal flagging of
printer without affecting printing in STANDARD MODE.
● If the horizontal start point or the vertical start point is out of the printable
area, this command will be canceled and the next data will be processed as
normal printing data.
● If the horizontal length or the vertical length is 0, this command will be
canceled and the next data will be processed as normal printing data.
● The character mapping position will be the start point specified by ESC T in
the print area.
If the (horizontal start point + horizontal length) exceeds the horizontal
printable area, the (horizontal printable area − horizontal start point) will be
taken as a horizontal length.
If the (vertical start point + vertical length) exceeds the vertical printable area, the
(vertical printable area − vertical start point) will be taken as a vertical length.
● If the calculation leaves a fraction, the fraction will be corrected with the
minimum pitch of the mechanism (203DPI) and the remainder will be omitted.
The horizontal start point and the horizontal length are calculated with the
basic calculation pitch 1/160. The vertical start point and the vertical length
are calculated with the basic calculation pitch 1/72.
Command reference CITIZEN
27
CONFIDENTIAL CD-S500 series
ESC/POS mode
● The print area, where the horizontal start point is X, the vertical start point is
Y, the horizontal length is Dx and the vertical length is Dy, will be as shown in
the figure below.
● The horizontal length of printable area for this printer is 4 inches and the
vertical length is ? inches.
(X,Y) Dx Paper
Paper feed direction
Dy
Print Area
(X+Dx-1,Y+Dy-1)
● An initial value is xL=xH=yL=yH=0.
dxL=B0, dxH=01, dyL=AA, dyH = it is 03.
Aligning the characters/ESC a
[ASCII] ESC a n
[Decimal] 27 97 n
[Hexadecimal] 1B 61 n
[Parameter] 0<
n<2h, 30h<n<32h
[Description] ● Print data are aligned in the specified position.
● Depending on the “n” value, alignment is carried
out as follows:
n Function
0, 30 Left end alignment
1, 31 Centering
2, 31 Right end alignment
● This command is valid only at the head of line.
● Default is n=0.
● In PAGE MODE, this command executes only the
internal flagging of printer without affecting
Left end alignment
ABC
ABCD
ABCDE
Centering
ABC
ABCD
ABCDE
Right end alignment
ABC
ABCD
ABCDE
printing in PAGE MODE.
Command reference CITIZEN
28
CONFIDENTIAL CD-S500 series
ESC/POS mode
Selecting the paper end sensor valid for paper end signal output/ESC c 3
[ASCII] ESC c 3 n
[Decimal] 27 99 51 n
[Hexadecimal] 1B 63 33 n
[Parameter] 0<
n<FFh
[Description] ● Selects a sensor with which output to PE signal of Centronics parallel I/F is
performed.
● Each bit of “n” means as follows:
Bit Function
Paper near-end sensor disabled00 0
0
Paper near-end sensor enabled01 1
Paper near-end sensor disabled00 0
1
Paper near-end sensor enabled02 2
Paper end sensor disabled 00 0
2
Paper end sensor enabled 04 4
Paper end sensor disabled 00 0
3
Paper end sensor enabled 08 8
4 Undefined
5 Undefined
6 Undefined
7 Undefined
Hexadecimal Decimal
Valu e
● This command is valid only for Parallel Interface specification. This command
is ignored on Serial Interface specification.
● When this command is executed, sensors are switched. Therefore, depending on
reception buffer conditions, change in PE signal may be delayed upon the
command receiving.
● If either of bit 2 and bit 3 is 1, a roll paper near-end sensor will be selected as a
paper end sensor effective for paper end signal output.
● Default is n=15.
Command reference CITIZEN
29
CONFIDENTIAL CD-S500 series
ESC/POS mode
Selecting the paper sensor valid for print stop/ESC c 4
[ASCII] ESC c 4 n
[Decimal] 27 99 52 n
[Hexadecimal] 1B 63 34 n
[Parameter] 0<
n<FFh
[Description] ● Selects the paper end sensor which helps to stop printing when a near-end
condition occurs.
Bit Function
Paper near-end sensor disabled00 0
0
Paper near-end sensor disabled01 1
Paper near-end sensor disabled00 0