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
[ASCII] ESC u n
[Decimal] 27 117 n
[Hexadecimal] 1B 75 n
[Parameter] n=0
[Description] ● Sends the current status of drawer kick-out connector pin No.3 (1 byte).
● This command is valid only at Serial I/F.
● The status to be sent is 1 byte and its details are as follows:
● If the serial protocol is DTR and is only valid at serial I/F, before sending a
signal, the printer will check that the host is ready for receiving. If the host is
not ready for receiving, the printer will wait till it becomes ready for receiving.
If the serial protocol is XON/XOFF, the printer will not check that the host is
ready for receiving.
Sending the printer status/ESC v
[ASCII] ESC v
[Decimal] 27 118
[Hexadecimal] 1B 76
[Parameter]
[Description] ● Sends the current printer status (1 byte).
Bit Function
0 Paper near-end sensor Paper-in Paper-out
1 Paper near-end sensor Paper-in Paper-out
2 Paper end sensor Paper-in Paper-out
3 Paper end sensor Paper-in Paper-out
4 Unused Fixed at 0
5 Download of ANK or Kanji No download
6 Download of bit image Fixed at 0
7 Unused Fixed at 0
0 1
Valu e
Download enabled
● If the serial protocol is DTR and is only valid at serial I/F, before sending a
signal, the printer will check that the host is ready for receiving. If the host is
not ready for receiving, the printer will wait till it becomes ready for receiving.
If the serial protocol is XON/XOFF, the printer will not check that the host is
ready for receiving.
Command reference CITIZEN
34
CONFIDENTIAL CD-S500 series
ESC/POS mode
Specifying/Canceling inverted characters/ESC {
[ASCII] ESC { n
[Decimal] 27 123 n
[Hexadecimal] 1B 7B n
[Parameter] 0<
● In PAGE MODE, this command executes only the internal flagging of printer.
This command doesn’t affect printing in PAGE MODE.
Command reference CITIZEN
35
CONFIDENTIAL CD-S500 series
ESC/POS mode
Page feed + Full cut at time of BM specification / GS FF
[ASCII] GS FF
[Decimal] 29 12
[Hexadecimal] 1D 0C
[Parameter]
[Description] ● The command is effective only at time of BM specification.
● During the reception of the command:
When auto cutter is valid: BM center skips to auto cut position and
performs full cut after page feed.
When auto cutter is invalid: BM center skips to maual cut position and
performs full cut after page feed.
● When using this command, area between head and cut becomes unprintable
area.
When auto cutter is valid: Approx. 19mm
When auto cutter is invalid: Approx. 28mm
● When performing a partial cut, set the [CUTTER] of the software switch to
PAR.
Execution of test printing/GS ( A
[ASCII] GS ( A pL pH n m
[Decimal] 29 40 65 pL pH n m
[Hexadecimal] 1B 28 41 pL pH n m
[Parameter] pL=2, ph=0 (fixed)
0<
n<2, 30h<n<32h
1<
m<3, 31h<m<33h
[Description] ● Specifies the paper by n, pattern by m, and prints the test pattern >.
n Kind of paper
0 or 30h Roll paper
1 or 31h Roll paper
2 or 32h Roll paper
m Test pattern
1 or 31h HEX DUMP
2 or 32h Setting for soft switch
3 or 33h ASCII sliding
● This command is effective only at the head of line.
● Printer is automatically reset after the end of printing and returns to initial
power-on status.
● The printer state will be BUSY if process by this command is started.
● This command is ignored when PAGE MODE is selected.
Command reference CITIZEN
36
CONFIDENTIAL CD-S500 series
ESC/POS mode
Sending the printer ID/GS I
[ASCII] GS I n
[Decimal] 29 73 n
[Hexadecimal] 1D 49 n
[Parameter] 1<
[Description] ● Sends the specified printer ID.
n<3, 49<n<51, 65<n<69
n Type of printer ID Specification Value (Hex.)
1, 49 Model ID CD-S series 79
2, 50 Type ID Refer to Table “Type ID”.
3, 51 ROM version As per ROM version
65 Firmware version As per firmware version
66 Maker name CBM
67 Model name CD-S500
68 Serial number As per serial number
69 Type of Kanji −
● When Serial Interface is being used, under DTR/DSR control, the printer sends
the printer ID after checking that the host is ready to receive.
If the host is not ready to receive, the printer will wait until the host becomes
ready to receive. Under XON/XOFF control, the printer sends the printer ID
without checking whether the host is ready to receive or not.
● This command is executed at the time of mapping of the receive buffer.
Therefore, depending on the state of receive buffer, a delay between command
receiving and printer ID sending may occur.
● By specifying (1<
n<3, 49<n<51), one byte of printer ID will be sent.
● If ASB is enabled by GS a, it is necessary to discriminate between the printer
ID due to this command and the status due to ASB.
● By specifying (65<
n<69), the following printer information will be sent.
Header : Hexadecimal=5FH/Decimal=95 (1 byte)
Data : Printer information
NUL : Hexadecimal : 00H/Decimal = 0 (1 byte)
After data processing is completed, the following process will be executed.
(1) The process of (READY→BUSY) is executed. At this time, if the printer
state has already been BUSY, the printer will do nothing.
(2) The sending process of “Header + Data +NULL” is executed.
(3) The process of (BUSY→READY) is executed. At this time, if the printer
state has already been set to BUSY due to other causes, the printer will do
nothing.
Command reference CITIZEN
37
CONFIDENTIAL CD-S500 series
ESC/POS mode
Paper cutting/GS V
[ASCII] GS V m − (1)
[Decimal] 29 86 m
[Hexadecimal] 1D 56 m
[Form] GS V m n − (2)
[Decimal] 29 86 m n
[Hexadecimal] 1D 56 m n
[Parameter] (1) m=0, 1 m=48, 49
(2) m=65, 66 0h<
n<255
[Description] ● Executes the specified paper cutting.
● This command is effective only at the head of line.
m Function
0, 48 Full cut
1, 49 Partial cut (leaving one portion uncut)
65 Paper feed by (cut position + n × 1/144) and full cut
66
Paper feed by (cut position + n × 1/144) and partial cut
(leaving one portion uncut)
In case of (1)
● In case of m=0, full cut is executed.
● In case of m=1, partial cut is execute.
In case of (2)
In case of n=0, after paper is fed to the cut position, paper is cut.
In case of n≠0, after paper is fed to the position exceeding the cut position by (n
× 1/144) inches, paper is cut.
● We recommend to observe an interval between cuts of 3 seconds or more.
Command reference CITIZEN
38
CONFIDENTIAL CD-S500 series
ESC/POS mode
Enabling/Disabling Automatic Status Back/GS a
[ASCII] GS a n
[Decimal] 29 97 n
[Hexadecimal] 1D 61 n
[Parameter] 0<
n<FFh
[Description] ● Selects the status to be addressed by Automatic Status Back (ASB : Automatic
Status Back)
Bit Status to be addressed by ASB
Status of Drawer kick-out connector No. 3 pin = Disabled
0
Status of Drawer kick-out connector No. 3 pin = Enabled
Online/Offline status = Disabled 00 0
1
Online/Offline status = Enabled 02 2
Error status =Disabled 00 0
2
Error status =Enabled 04 4
Continuous paper sensor = Disabled 00 0
● If any one of statuses is enabled, the status at the time of execution of this
command will be sent. After that, the status will be sent each time an enabled
status changes.
● If all statuses are disabled, the ASB function will be disabled.
● The 4 byte statuses shown in the tables below are sent without checking that
the host is ready to receive or busy.
● The 4 byte statuses are continuous except XOFF code.
The 1st byte (Printer information)
Bit Status
0 Unused 00 0
1 Unused 00 0
Status of Drawer kick-out connector No. 3 pin = “L” 00 0
2
Status of Drawer kick-out connector No. 3 pin = “H” 04 4
Online status 00 0
3
Offline status 08 8
4 Unused 10 16
Rear/front cover closed 00 0
5
Rear/front cover opened 20 32
Not in the state of paper feeding by the paper feed switch
6
In the state of paper feeding by the paper feed switch 40 64
7 Unused 00 0
Valu e
Hex. Decimal
00 0
Command reference CITIZEN
39
CONFIDENTIAL CD-S500 series
ESC/POS mode
The 2nd byte (Error occurrence information)
Bit Status
0 Undefined 00 0
1 Undefined 00 0
No occurrence of mechanical error 00 0
2
Occurrence of mechanical error 04 4
No occurrence of auto cutter error 00 0
3
Occurrence of auto cutter error 08 8
4 Unused 00 0
No occurrence of unrecoverable error 00 0
5
Occurrence of unrecoverable error 20 32
No occurrence of auto recovery error 00 0
6
Occurrence of auto recovery error 40 64
7 Unused 00 0
Valu e
Hex. Decimal
The 3rd byte (Paper sensor information)
Bit Status
Roll paper near-end = Paper-in 00 0
0, 1
Roll paper near-end = Paper-out 03 3
Roll paper end = Paper-in 00 0
2, 3
Roll paper end = Paper-out 0C 12
4 Unused 00 0
5 Undefined − −
6 Undefined − −
7 Unused 00 0
[Description] ● Stores data into the user NV memory.
● This command is effective only at the head of line.
● “m” is fixed at 0.
● a1, a2, a3, a4 specify the start address for storing data at (a1 + (a2 × 256) + (a3
× 65536) + (a4 + 16777216)).
● nL, nH specify the stored data to (nL + (nH × 256)) bytes.
● “d” denotes the data to be stored.
● “User NV memory” refers to a storage area exclusively for character data
secured on nonvolatile memory.
In STANDARD MODE, this command is valid only when it is processed at the
head of line.
In PAGE MODE, this command is invalid.
● If this command is sent while a macro is being defined, the macro definition
process will be stopped and the execution of this command will be started.
● If the argument (m), the storage start address (a1, a2, a3, a4) or the number of
stored data (nL, nH) is outside the definition area, or in case of “the storage
start address (a1, a2, a3, a4) + the number of stored data (nL, nH)≥
1024”, this
command will become invalid and the following data will be processed as
normal data.
● At the time of completion of processing of the stored data (d) outside the
definition area, processing by this command will be stopped and the next data
will be processed as normal data. At this time, the data which has already been
processed will be stored into memory.
● Data storage processing executes “overwriting”. Therefore, the data which have
been already stored into the area for storage processing are erased.
● If an error occurs during the writing process, the error will be “Hardware
Error”.
● The data in the user NV memory can be read by FS g.
● The data in the user NV memory is not initialized by execution of ESC @,
execution of FS q, resetting or power OFF.
[Caution]
● Frequent use of the “writing into the nonvolatile memory” command (FS g 1)
may destroy memory. Therefore, the “writing into the nonvolatile memory”
command should be used “less than 10 times a day”.
● In some cases, the printer may become BUSY while data is being written into
the nonvolatile memory with this command.
While the printer is BUSY, it will stop receiving data and sending data from
the host (including real-time commands) will be prohibited.
Command reference CITIZEN
42
CONFIDENTIAL CD-S500 series
ESC/POS mode
Reading data to the user NV memory/FS g 2
[ASCII] FS g 2 m a1 a2 a3 a4 nL nH
[Decimal] 28 103 50 m a1 a2 a3 a4 nL nH
[Hexadecimal] 1C 7B 32 m a1 a2 a3 a4 nL nH
[Parameter] m=0
● a1, a2, a3, a4 specify the start address for sending data at (a1 + (a2 × 256) + (a3
× 65536) + (a4 + 16777216)).
● nL, nH specify the number of data to be sent to (nL + (nH × 256)) bytes.
● “User NV memory” refers to a storage area exclusively for character data
secured on nonvolatile memory.
● If the argument (m), the storage start address (a1, a2, a3, a4) or the number of stored
data (nL, nH) is outside the definition area, or in case of “the storage start address (a1,
a2, a3, a4) + the number of stored data (nL, nH) ≥
1024”, this command will become
invalid and the following data will be processed as normal data.
● After the preparation for sending data is completed, the following processes
will be executed.
(1) The printer state will change from READY to BUSY. If the state has
already been set to BUSY, the printer will do nothing.
(2) “Header + Data + NUL” will be sent.
(3) The printer state will change BUSY from to READY. At this time, if the
printer state has already been set to BUSY due to other causes, the printer
will do nothing.
● The configuration of “Header + Data + NUL” is as follows:
Header: Hexadecimal number = 5F/Decimal number = 95 (1 byte)
Data: Data in User NV memory “ (nL + (nH × 256)) bytes”
NUL: Hexadecimal number = 00H/Decimal number =0 (1 byte)
● When the DTR/DSR control is selected, all codes are sent continuously after
checking that the host can receive data when the header is sent. If the host cannot
receive data, the printer will wait until the host is ready for receiving data.
● When the XON/XOFF control is selected, all codes are sent continuously
without checking whether the host can receive data or not. Data that has been
sent is always continuous except for XOFF code.
● When parallel interface is used, the size of buffer for data to be sent (buffer
that stores all data to be sent except for ASB status) is 99 bytes. Data
exceeding 99 bytes will be discarded.
● Data in the user NV memory can be written by using FS g1.
● Depending on the state of receiving buffer, there may be a delay between
receiving this command and storing data.
● After the header is sent, all data will be sent without checking whether the
host can receive the data or not. Therefore, when this command is used, more
than (the number of sending data + 2) bytes of space should be secured in the
receiving buffer of the host in order not to fail to receive data.
● While data is being sent, real-time commands (DLE extension command) are
ignored. Even if ASB function is selected as enabled, ASB status will not be
sent while data are being sent.
● Accordingly, it is not possible to know any change in printer state by its status
during data sending. Users should pay attention to this.
Command reference CITIZEN
43
CONFIDENTIAL CD-S500 series
ESC/POS mode
Printing the NV bit images/FS p
[ASCII] FS p n m
[Decimal] 28 112 n m
[Hexadecimal] 1C 70 n m
[Parameter] 1<
n<255
0<
m<3, 48<m<51
[Description] ● Prints the NV bit images “n” with a mode “m”.
● When the print area set by GS L and GS W is not enough for one vertical line
of NV bit image, the line alone is dealt with as mentioned below. One vertical
line of NV bit image is 1 dot in NORMAL MODE (m=0, 48) and DOUBLE
HEIGHT WIDTH (m=2, 50) and 2 dots in DOUBLE WIDTH MODE (m=1, 49)
and QUADRUPLE SIZE MODE (m=3,51).
(1) The print are is extended to the right side within the limit of print area so
that one vertical line of NV bit image can be printed.
(2) When a sufficient print area cannot be maintained even after executing
(1), the print area is extended to the left side.
(The left margin is reduced.)
● If the size of bit image exceeding the limit of print area is specified, the data
within the limit of print area will be printed, but the data outside the print
area will not be printed.
● In NORMAL MODE and DOUBLE WIDTH MODE, regardless of the line feed
amount set by ESC 2 and ESC 3, a paper feed of (the height of NV bit image
“n”) dots is executed, while in DOUBLE HEIGHT MODE and QUADRUPLE
SIZE MODE, a paper feed of (the height of NV bit image “n” × 2) dots is
executed.
● After completion of this bit image printing, the head of line will be the next
printing position and normal data process will be executed.
Command reference CITIZEN
44
CONFIDENTIAL CD-S500 series
ESC/POS mode
Defining the NV bit images/FS q
[ASCII] FS q n [xL xH yL yH d1...dk] 1... [xL xH yL yH d1...dk] n
[Decimal] 28 113 n [xL xH yL yH d1...dk] 1... [xL xH yL yH d1...dk] n
[Hexadecimal] 1C 71 n [xL xH yL yH d1...dk] 1... [xL xH yL yH d1...dk] n
[Parameter] 1<
n<255
0<
xL<255
xH<3 on condition that 1< (xL + xH × 256) <1023
[Description] ● Defines the specified NV bit image.
● xL and xH denote the horizontal size of one NV bit image as (xL + xH × 256) × 8dots.
● yL and yH denote the vertical size of one NV bit image as (xL + xH × 256) × 8dots.
● All the previously defined NV bit images are deleted by this command.
Therefore, it is not possible to redefine any one of the previously defined
multiple data. To make it possible, all data must be resent.
●
During the time between the process start by this command and the completion of
hardware reset, any mechanical operation (such as initializing a printer head
position by opening a cover and paper feeding with switch) cannot be executed.
● NV bit image refers to a bit image that is defined by FS q in the nonvolatile
memory and printed by FS p.
● This command is valid only when it is specified at the head of line where
STANDARD MODE was selected,
● This command is valid only when it is specified at the head of line where PAGE
MODE was selected.
●
This command becomes valid after 7 bytes of <FS~yH> are processed as normal values.
● If the number of data exceeding the remaining capacity of the area defined by
(xL, xH, yL, yH) is specified, this command will be invalid.
● “d” denotes a definition data. Bits which correspond to dots to be printed are
represented as 1, and bits which correspond to dots not to be printed are
represented as 0.
●
“n” pieces of NV bit images are defined starting from the number 01H in ascending
order. Therefore, the first data group
[
xL xH yL yH d1...dk] becomes NV bit image
No.01H. This number is identical to the NV bit image number specified by FS p.
● The definition data of one NV bit image consists of [xL xH yL yH d1...dk].
Therefore, if only one NV bit image is defined, n=1; the data group [xL xH yL
yH d1...dk] will be processed once, and ([Data: (xL + xH × 256) × (yL + yH ×
256) × 8 + [header:4]] bytes of nonvolatile memory is used.
● The maximum definition area of this printer is 1M bits (128K bytes). Multiple
NV bit image can be defined, but data of bit images of which total size (bit
image data + header) exceeds 1M bits (128K bytes) cannot be defined.
● The printer state will be BUSY just before writing data into the nonvolatile memory.
● While this command is being executed, processes of ABS status sending and
status detection will not be executed even if ABS function is specified.
● If this command is sent while a macro is still being defined, the macro
definition process will be stopped and the process by this command will start.
● Once NV bit images are defined, the NV bit images are not initialized by
execution of ESC @, resetting or Power OFF.
● This command executes only definition of NV bit image, and it doesn’t start
printing. Printing of NV bit image will be executed by FS p.
Command reference CITIZEN
45
CONFIDENTIAL CD-S500 series
ESC/POS mode
Collectively specifying the Chinese character mode/FS !
[ASCII] FS ! n
[Decimal] 28 33 n
[Hexadecimal] 1C 21 n
[Parameter] 0<
n<255
[Description] ● Chinese character mode is specified with each bit by combination.
● Chinese character 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 − −
At 0 OFF − − − OFF OFF − −
UnusedUnusedUnusedDouble
height
Double
width
UnusedUnused
● An underline is attached to the character space <FS S n1 n2> but not attached
to the part having been skipped by the horizontal tab.
● The initial value is n=0.
● This command is effective only for model compatible with Chinese and
Japanese specification.
Specifying the Chinese character mode/FS &
[ASCII] FS &
[Decimal] 28 38
[Hexadecimal] 1C 26
[Parameter]
[Description] ● Specifies the Chinese character mode.
● This command is effective only for model compatible with Chinese and
Japanese specification.
Specifying/Canceling Chinese character underline/FS −
[ASCII] FS − n
[Decimal] 27 45 n
[Hexadecimal] 1C 2D n
[Parameter] 0, 1, 30h, 31h
[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 underline can be specified also by FS !, but the last processed command
will become effective.
● The initial value is n=0.
● This command is effective only for model compatible with Chinese and
Japanese specification.
Command reference CITIZEN
46
CONFIDENTIAL CD-S500 series
ESC/POS mode
Canceling the Chinese character mode/FS .
[ASCII] FS .
[Decimal] 28 46
[Hexadecimal] 1C 2E
[Parameter]
[Description] ● Cancels the Chinese character mode.
● This command is effective only for model compatible with Chinese and
Japanese specification.
Japanese spec. (Shifted JIS rating) c1=ECh 40h<
Chinese spec. (GB18030) c1=FEh A1h<
0<
p1…pn<255
c2<7Eh
c2<7Eh, 80h<c2<9Eh
c2<FEh
n=32
[Description] ● “c1” indicates the character’s first number of bytes and “c2” indicates the
second number of bytes.
● “n” indicates the start character code and “m” indicates the end character code.
To define only one character, set n=m.
● “pn” is the data to be defined, which indicates the pattern equal to 2 bytes in
vertical direction x16 dots in horizontal direction from the left end.
● Once download characters are defined, they remain valid until redefinition,
execution of ESC “@” and delete by FS ? or power OFF is performed.
● Definable character codes include 95 characters at maximum in the range of
ASCII code (20h to 7Eh).
● This command is effective only for model compatible with Chinese and
Japanese specification.
Japanese spec. (Shift JIS rating) c1=ECh 40h<c2<7Eh, 80h<c2<9Eh
Chinese spec. (GB18030) c1=FEh A1h<
c2<FEh
[Description] ● Deletes the download characters of specified by c1, c2.
● “c1” indicates the character’s first number of bytes and “c2” indicates the
second number of bytes.
● This command is effective only for model compatible with Chinese and
Japanese specification.
Command reference CITIZEN
47
CONFIDENTIAL CD-S500 series
ESC/POS mode
Selecting the code for Kanji characters/FS C
[ASCII] FS C n
[Decimal] 28 67 n
[Hexadecimal] 1C 43 n
[Parameter] 0, 1, 30h, 31h
[Description] ● Indicates the JIS character code for Japanese specification.
n=0 : JIS character code
n=1 : Shifted JIS character code
● The initial value is n=0.
● This command is effective only for model compatible with Chinese and
[Description] ● Specifies the horizontal space amount for Chinese characters.
n1 : Space amount on the left side
n2 : Space amount on the right side
● The initial value is n1=0, n2=2.
● This command is effective only for model compatible with Chinese and
Japanese specification.
Specifying/Canceling the quadruple large Chinese characters/FS W
[ASCII] FS W n
[Decimal] 28 87 n
[Hexadecimal] 1C 57 n
[Parameter] 0<
n<FFh
[Description] ● Specifies/cancels the quadruple large Chinese characters.
● “n” is valid for the lowest bit (n0).
● Control by the lowest bit is as follows:
n=<*******0> B : Cancel the quadruple large Chinese characters
n=<*******1> B : Specify the quadruple large Chinese characters
● The initial value is n=0.
● This command is effective only for model compatible with Chinese and
Japanese specification.
Command reference CITIZEN
48
CONFIDENTIAL CD-S500 series
CBM mode
2.2 CBM1/CBM2 Mode
The following commands are effective when [Command Type] of the software switch is set to
CBM1/CBM2.
Command Hex code Function
FF n 0C n Paper feed by n line
FF 0C Form feed
(CBM2)
SO 0E Double width large character
SI 0F Canceling double width large character
LF 0A Paper feed
CR 0D Printing
*1
DC1 11 Initial setting
DC2 12 Specify/Canceling inverted characters
DC3 13 Printing in red
CAN 18 Canceling
ESC * 1B 2A Graphic
ESC - 1B 2D Specifying/Canceling underline
ESC 1 1B 31 Specifying the 1/9 inch line feed rate
ESC 2 1B 32 Specifying the 2/9 inch line feed rate
ESC 3 1B 33 Setting the line feed rate
ESC C 1B 43 Setting page length
ESC N 1B 4E Perforated line skip
ESC O 1B 4F Canceling perforated line skip
ESC f 1 1B 66 01 Form feed
ESC t 1B 74 Selecting the character code table
ESC RS 1B 1E Buzzer sounding
ESC BEL 1B 07
Specifying the drive pulse width of peripheral equipment
BEL 07 Drive command A for drawer 1
FS 1C Drive command B for drawer 1
SUB 1A Drive command for drawer 2
RS 1E Buzzer sounding
ESC P 0 1B 50 00 Full cut
ESC P 1 1B 50 01 Partial cut (leaving one area uncut)
ESC R 1B 52 Selecting the international character set
ESC & 1B 26 Defining the download character
ESC % 1B 25 Specifying/Canceling the download character set
ESC / 1B 2F Defining of message
ESC DC3 1B 13 Printing of message
ESC y 1B 79 Setting print line after paper near end detection
ESC DC2 1B 12 Deleting download characters, message, bit image
GS * 1D 2A Defining download bit images
GS / 1D 2F Printing download bit images
GS FF 1D 0C Page feed + cut operation at time of BM spec.
(CBM1)
*1
*1
*1
*1
Command reference CITIZEN
49
CONFIDENTIAL CD-S500 series
CBM mode
*1: Effective only when [Command Type] of the software switch is set to CBM1. When selecting
CBM2, the operation will be as follows:
Command Hex code Function
DC1 11 Select
DC2 12 Print in red
CD3 13 De-select
Command Hex code When selecting 8 bit
data
SI 0F
SO 0E
Specifying double width
large characters
Canceling double width
large characters
When selecting 7 bit
data
SI SIde Character
SO SIde Character
Command reference CITIZEN
50
CONFIDENTIAL CD-S500 series
CBM mode
Feeding paper by “n” lines/FF n (CBM1)
[ASCII] FF n
[Decimal] 12 n
[Hexadecimal] 0C n
[Parameter] 1<
n<127
[Description] ● Paper feeds line number specified by n.
● Paper feed line can be specified from n=1 to 127.
● If data exist inside the print buffer, line feed specified by n is performed after
printout.
● Paper feed is not performed when 0 is specified.
Form feed/FF (CBM2)
[ASCII] FF
[Decimal] 12
[Hexadecimal] 0C
[Parameter]
[Description] ● Performs form feed for the next page after printing the data inside the buffer.
Form feed/ESC f 1
[ASCII] ESC f 1
[Decimal] 27 102 1
[Hexadecimal] 1B 66 1
[Parameter]
[Description] ● Performs form feed for the next page after printing the data inside the buffer.
Double width large character/SO (CBM1)
[ASCII] SO
[Decimal] 14
[Hexadecimal] 0E
[Parameter]
[Description] ● The data following this command is printed doubled in the horizontal direction.
● While double width large character will be effective until the command is
canceled, it is also canceled when one line is printed. Note that the double
width characters take up two ordinary characters worth of width, and that the
number of data will not exceed one line.
Command reference CITIZEN
51
CONFIDENTIAL CD-S500 series
CBM mode
Double width large character, specifying SI character/SO (CBM2)
[ASCII] SO
[Decimal] 14
[Hexadecimal] 0E
[Parameter]
[Description] ● The data following this command is printed doubled in the horizontal direction.
● While double width large character will be effective until the command is
canceled, it is also canceled when one line is printed. Note that the double
width characters take up two ordinary characters worth of width, and that the
number of data will not exceed one line.
● In case of serial I/F, SO character is printed when selecting 7 bit data.
Canceling double width large character/SI (CBM1)
[ASCII] SI
[Decimal] 15
[Hexadecimal] 0F
[Parameter]
[Description] ● This command cancels the double width large character set by SO. The
following data returns to normal character.
Canceling double width large character/Specifying SI character/SI (CBM2)
[ASCII] SI
[Decimal] 15
[Hexadecimal] 0F
[Parameter]
[Description] ● This command cancels the double width large character set by SO. The
following data returns to normal character.
● In case of serial I/F, SO character is printed when selecting 7 bit data.
Command reference CITIZEN
52
CONFIDENTIAL CD-S500 series
CBM mode
Paper feed/LF
[ASCII] LF
[Decimal] 10
[Hexadecimal] 0A
[Parameter]
[Description] ● If data exist inside the print buffer, line feed is performed after printout.
[Description] ● Deletes download character, message, bit image.
● Specifies download function to be deleted by n1.
n1 Deleting data
0 All (message, character, bit image)
1 Download message
2 Download character
3 Download bit image
● Specifies which data of the function specified by n1 by n2 is deleted.
● Deletes all the data registered by the download function specified by
n2=0 n1.
● n2≠0 deletes part of download data specified by n2 (value specified at
registering by download command).
Command reference CITIZEN
64
CONFIDENTIAL CD-S500 series
CBM mode
Defining the download bit image/GS *
[ASCII] GS * n1 n2 [<d>] x (n1 x n2 x 8)
[Decimal] 27 42 n1 n2 [<d>] x (n1 x n2 x 8)
[Hexadecimal] 1B 2A n1 n2 [<d>] x (n1 x n2 x 8)
[Parameter] 1<
n1<45
0<
n2<24
Set the data number to (n1 x n2 x 8) <
2048.
[Description] ● Defines the download bit images of dots specified by n1 and n2.
● The number of dots in horizontal direction is n1 x 8 and the number of dots in
vertical direction is n2 x 8.
“d” indicates bit image data.
● Once a download bit image is defined, it remains effective until redefinition,
execution of ESC, DC2 & n1 n2 is conducted.
d1
dn2
+1
d2
dn
2
dn2 X n2 X 8
MSB
LSB
Command reference CITIZEN
65
CONFIDENTIAL CD-S500 series
CBM mode
Printing the download bit image/GS /
[ASCII] GS / m
[Decimal] 27 47 m
[Hexadecimal] 1B 2F m
[Parameter] 0<
m<255
[Description] ● Prints the bit image defined by download bit image command.
[Caution]
If data exist in the print buffer, this command will be ignored.
If a download bit image has not been registered, this command is ignored.
Prints nothing unless m=0, 1, 2, 3.
Page feed + Full cut at time of BM specification / GS FF
[ASCII] GS FF
[Decimal] 29 12
[Hexadecimal] 1D 0C
[Parameter]
[Description] ● The command is effective only at time of BM specification.
● During the reception of the command:
When auto cutter is valid: BM center skips to auto cut position and performs
full cut after page feed.
When auto cutter is invalid: BM center skips to manual cut position and
performs full cut after page feed.
● When using this command, area between head and cut becomes unprintable
area.
When auto cutter is valid: Approx. 19mm
When auto cutter is invalid: Approx. 28mm
● When performing a partial cut, set the [CUTTER] of the software switch to
PAR.
Command reference CITIZEN
66
CONFIDENTIAL CD-S500 series
Star mode
2.3 Star Mode
The following commands are effective when [Command Type] of the printer is set to STAR.
Command Hex code Opportunity Ability
ESC 1B 52 Selecting the international character set
ESC 6 1B 36 NOP
ESC 7 1B 37 NOP
ESC M 1B 4D NOP
ESC P 1B 50 NOP
ESC : 1B 3A NOP
SO 0E Selecting double width large characters
DC4 14 Canceling double width large characters
ESC E 1B 45 Selecting emphasis characters
ESC F 1B 46 Canceling emphasis characters
ESC – 1B 2D Specifying/Canceling underline
ESC _ 1B 5F NOP
ESC 4 1B 34 Specifying the red printing
ESC 5 1B 35 Canceling the red printing
SI 0F Selecting the inverted printing
DC2 12 Canceling the inverted printing
LF 0A Printing and line feed
CR 0D Printing and line feed
ESC z 1B 7A Setting the standard line feed width
ESC 0 1B 30 NOP
ESC a 1B 61 Paper feed by n lines
FF 0C Page feed (form feed)
ESC C 1B 43 Setting the page length by n lines
ESC C 0 1B 43 00 Setting the page length by n inches
VT 0B Executing the vertical tab
ESC B 1B 42 Setting vertical tab positions
ESC N 1B 4E Setting the bottom margin
ESC O 1B 4F Canceling the bottom margin
ESC l 1B 6C Setting the left margin
ESC Q 1B 51 Setting the right margin
HT 09 Executing the horizontal tab
ESC D 1B 44 Setting horizontal tab positions
ESC 1 1B 31 Setting the 1/9-inch line feed rate
ESC A 1B 41 NOP
ESC 2 1B 32 Setting the 2/9-inch line feed rate
ESC J 1B 4A NOP
ESC K 1B 4B 8-dot standard density bit image
ESC L 1B 4C 8-dot double density bit image
ESC h 1B 68 Setting/Canceling double height characters
Command reference CITIZEN
67
CONFIDENTIAL CD-S500 series
Star mode
Command Hex code Opportunity Ability
ESC & 1B 26 Defining the download characters
ESC % 1B 25 Setting/Canceling the download characters
ESC BEL 1B 07 Setting the drive pulse width of peripheral
ESC RS 1B 1E Buzzer sounding
BEL 07 Drive command A for Drawer 1
FS 1C Drive command B for Drawer 1
SUB 1A Drive command for Drawer 2
CAN 18 Canceling print data
DC3 13 Setting Deselect Mode
DC1 11 Setting Select Mode
ESC U 1B 55 Setting/Canceling Single Direction Print Mode
ESC @ 1B 40 Initializing the printer
ENQ 05 Inquiry
STX 02 Text start
ETX 03 Text end
RS 1E Buzzer sounding
ESC d 1B 64
ESC t 1B 74 Selecting the character code table
ESC / 1B 2F Defining messages
ESC DC3 1B 13 Printing messages
ESC y 1B 79 Setting the printing lines after paper near-end
ESC DC2 1B 12 Deleting download characters, messages, bit
GS * 1D 2A Defining the download bit image
GS / 1D 2F Printing download bit images
GS FF 1D 0C Page feed and cutting at the time of BM
Full cut/partial cut
Command reference CITIZEN
68
CONFIDENTIAL CD-S500 series
Star mode
Selecting the international character set/ESC "R" n
[ASCII] ESC R n
[Decimal] 27 82 n
[Hexadecimal] 1B 52 n
[Parameter] 0<
n<10
[Description] ● Selects the international characters according to the value of n.
● Default is USA (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 South Korea
14 Slovenia/Croatia
15 China
64 Legal
Selecting double width large characters/SO
[ASCII] SO
[Decimal] 14
[Hexadecimal] 0E
[Parameter]
[Description] ● The data following this command is printed doubled in the horizontal direction.
● Note that the double width characters take up two ordinary characters worth of
width, and that the number of data will not exceed one line.
Command reference CITIZEN
69
CONFIDENTIAL CD-S500 series
Star mode
Canceling double width characters/DC4
[ASCII] DC4
[Decimal] 20
[Hexadecimal] 14
[Parameter]
[Description] ● This command cancels double width characters. The data following this
command are printed in ordinary character width.
Specifying emphasis characters/ESC E
[ASCII] ESC E
[Decimal] 27 69
[Hexadecimal] 1B 45
[Parameter]
[Description] ● The data following this command are printed with emphasis (double strike).
Emphasis character continues until the emphasis character cancel command is
entered.
Canceling emphasis characters/ESC F
[ASCII] ESC F
[Decimal] 27 70
[Hexadecimal] 1B 46
[Parameter]
[Description] ● This command cancels emphasis characters. The data following this command
This command is valid only when processed at the head of line.
Command reference CITIZEN
71
CONFIDENTIAL CD-S500 series
Star mode
Printing and line feed/LF
[ASCII] LF
[Decimal] 10
[Hexadecimal] 0A
[Parameter]
[Description] ● Prints data in the print buffer and feeds paper by one line. If there is no data
preceding this command, the printer only feeds paper by one line.
Printing and line feed/CR
[ASCII] CR
[Decimal] 13
[Hexadecimal] 0D
[Parameter]
[Description] ● The function is the same as <LF>.
Setting the standard line feed width/ESC z
[ASCII] ESC z
[Decimal] 27 122
[Hexadecimal] 1B 7A
[Parameter]
[Description] ● The line feed width becomes 1/6 inch.
Paper feed by n lines/ESC a
[ASCII] ESC a n
[Decimal] 27 97 n
[Hexadecimal] 1B 61 n
[Parameter] 1<
n<127
[Description] ● Feeds paper by lines specified by n. The number of lines to be fed can be
specified within the range of n=1−127. When this command is used, and if data
exist in the print buffer, it will print data and then feed paper for n lines.
Command reference CITIZEN
72
CONFIDENTIAL CD-S500 series
Star mode
Page feed (form feed)/FF
[ASCII] FF
[Decimal] 12
[Hexadecimal] 0C
[Parameter]
[Description] ● After printing the data in the print buffer, it shifts the print position to the
head of the next page.
Setting the page length by n lines/ESC C
[ASCII] ESC C n
[Decimal] 27 67 n
[Hexadecimal] 1B 43 n
[Parameter] 1<
n<255
[Description] ● Sets the 1-page length by n lines.
● Default is n = 42.
Setting the page length by n inches/ESC C <0>
[ASCII] ESC C 0 n
[Decimal] 27 67 0 n
[Hexadecimal] 1B 43 0 n
[Parameter] 1<
n<127
[Description] ●Sets the 1-page length by n inches.
Executing the vertical tab/VT
[ASCII] VT
[Decimal] 11
[Hexadecimal] 0B
[Parameter]
[Description] ● Feeds paper to the next vertical tab position.
If any tab position is not set, paper feed will not be executed. If the current
position is equal to or larger than the maximum vertical position, it will feed
paper to the top of the next page.
Command reference CITIZEN
73
CONFIDENTIAL CD-S500 series
Star mode
Setting vertical tab positions/ESC B
[ASCII] ESC B [n] k NUL
[Decimal] 27 66 [n] k NUL
[Hexadecimal] 1B 42 [n] k NUL
[Parameter] 1<
n<255 1<k<16
[Description] ● Cancels the vertical tab position that has already been set and sets a new
vertical tab position.
The vertical tab position to be set is set in ascending order and ended with
<00>.
The settable vertical tab is 16 at maximum.
If the tab setting position <nK> is equal to or smaller than the immediately
preceding setting position <nk-1>, the vertical tab position setting will be
considered to be done.
Setting the bottom margin/ESC N
[ASCII] ESC N n
[Decimal] 27 78 n
[Hexadecimal] 1B 4E n
[Parameter] 0<
n<255
[Description] ● Sets a bottom margin by n lines.
● Default is n=0.
Canceling the bottom margin/ ESC 0
[ASCII] ESC O
[Decimal] 27 79
[Hexadecimal] 1B 4F
[Parameter]
[Description] ● Cancels the bottom margin setting.
Setting the left margin/ESC l
[ASCII] ESC l n
[Decimal] 27 108 n
[Hexadecimal] 1B 6C n
[Parameter] 0<
n< (right margin-2)
[Description] ● Sets a left margin and prints from the line following the setting.
Command reference CITIZEN
74
CONFIDENTIAL CD-S500 series
Star mode
Setting the right margin/ESC Q
[ASCII] ESC Q n
[Decimal] 27 81 n
[Hexadecimal] 1B 51 n
[Parameter] 2 <
n < (Maximum printing column)
[Description] ●Sets a right margin and prints to n columns.
Executing the horizontal tab/HT
[ASCII] HT
[Decimal] 09
[Hexadecimal] 09
[Parameter]
[Description] ● Shifts the print position to the next horizontal tab position. If the next
horizontal tab position is not set, this command will be ignored.
Setting horizontal tab positions/ESC D
[ASCII] ESC D [n] k NUL
[Decimal] 27 68 [n] k NUL
[Hexadecimal] 1B 44 [n] k NUL
[Parameter] 1 <
n< Maximum printing column−1 1<k<16
[Description] ● Set horizontal tab positions.
n indicates the number of columns from the head of the line to the position
where the horizontal tab is set.
k indicates the number of the horizontal tab position to be set.
Tab positions are set to the position of “character width x n” from the head of
the line. At this time, the character width includes the right space amount of a
character. The character width doubles when double width printing is
specified.
The data <n>k indicating setting position is entered in ascending order and
ended with <00> H.
ESC D NUL clears all setting tab positions. After clearing, HT is ignored.
[Notes]
If the data <n>k is equal to or smaller than the immediately preceding data
<n>k-1, horizontal tab setting is considered to be to done. In this case, data
from the next is processed as ordinary data.
The settable vertical tab is 16 tabs at maximum. The data exceeding this is
processed as ordinary data. If data <n>k exceed the 1-line print area, it is set
as “setting column position = maximum printing column + 1."
Even when character width is changed after a horizontal tab position is set, the
horizontal tab position does not change.
Command reference CITIZEN
75
CONFIDENTIAL CD-S500 series
Star mode
Setting the 1/9-inch line feed rate/ESC 1
[ASCII] ESC 1
[Decimal] 27 49
[Hexadecimal] 1B 31
[Parameter]
[Description] ● The line feed rate is set to 1/9 inch.
Setting the 2/9-inch line feed rate/ ESC 2
[ASCII] ESC 2
[Decimal] 27 50
[Hexadecimal] 1B 32
[Parameter]
[Description] ● The line feed rate is set to 2/9 inch.
[Description] ● This command executes the printing of 8-dot double density (half dot printing)
bit image. At this time, printing is performed in a single direction.
● The data exceeding the number of data printable to one line is ignored.
● Returns to the character mode automatically after printing bit image.
● The relation between the head pin number and data for printing is the same as
that in 8-bit standard density image.
● During printing double density bit image, the dots adjoining in the horizontal
direction cannot be printed.
Specifying/Canceling double height characters/ESC h
[ASCII] ESC h n
[Decimal] 27 104 n
[Hexadecimal] 1B 68 n
[Parameter] 0, 1, 30h, 31h
[Description] ●The data following this command is printed double in the vertical direction.
● Bit image mode <ESC>"K" and <ESC> "L" are excluded.
● By combination with <SO> command, double height and width characters,
which characters doubled in the horizontal and vertical direction, can be
printed.
● This command cannot be combined with the inverted character <SI> command.
● The relation between double height and width characters and ordinary
characters is the bottom alignment.
n Double height character command
0
30
1
31
Cancels
Specifies
Command reference CITIZEN
77
CONFIDENTIAL CD-S500 series
Star mode
Defining the download characters/ ESC &
[ASCII] ESC & <0> n1 n2 [m0m1m2m3m4m5m6m7m8m9] x (n2–n1+1)
[Decimal] 27 38 <0> n1 n2 [m0m1m2m3m4m5m6m7m8m9] x (n2–n1+1)
[Hexadecimal] 1B 26 <0> n1 n2 [m0m1m2m3m4m5m6m7m8m9] x (n2–n1+1)
[Parameter] 20h <
n1 <n2 <FFh
m0=00h or m0=00h or m0=08h
[Description] ● Defines download characters.
●n1 and n2 indicate a character code to start and end the definition, respectively.
To define only one character, set n1=n2.
● Character codes can be defined within the range of <20>H to <FF>H by ASCII
code.
● The dots adjoining in the horizontal direction cannot be printed.
● Once the download characters are defined, they remain valid until they are
redefined or the download deletion command (ESC DC2n1n2) is executed.
At the time of m=[ 0] <80> H At the time of m =[ 0 ] <00> H
Pin number
1
●
2
●
3
●
4
●
●
5
●
6
●
7
●
8
●
9
D8
D7
D6
D5
D4
D3
D2
D1
Pin number
1
●
2
●
3
●
4
●
●
5
●
6
●
7
●
8
●
9
● Dots horizontally next to each other cannot be printed.
D8
D7
D6
D5
D4
D3
D2
D1
Command reference CITIZEN
78
CONFIDENTIAL CD-S500 series
Star mode
Specifies/Canceling the download characters/ESC %
[ASCII] ESC % n
[Decimal] 27 37 n
[Hexadecimal] 1B 25 n
[Parameter] 0, 1, 30h, 31h
[Description] ● Specifies/cancels the download characters. Download characters cannot be
printed by simply defining them by ESC & 0 command. Printing of download
characters is executed by sending of this command to the printer.
n Download character set
0
30
1
31
Cancels
Specifies
Setting the drive pulse width of peripheral equipment/ESC BEL n1 n2
[Description] ● This is the power-distribution time setting command to drive peripheral
equipment (such as cash drawers).
Power-distribution time = n1 × 10 (ms)
Delay time = n2 × 10 (ms)
● To actually drive the drawer, use <BEL> or <FS> command.
ON
OFF
10 x n1 (ms) 10 x n2 (ms)
● Default is n1 = n2 = 20 (200 mS).
Command reference CITIZEN
79
CONFIDENTIAL CD-S500 series
Star mode
Drive command A for Drawer 1/BEL
[ASCII] BEL
[Decimal] 7
[Hexadecimal] 7
[Parameter]
[Description] ● Drives the drawer connector pin 2 under condition set by ESC, BEL n1 n2
command.
● The command is executed by the order received in the buffer.
Drive command B for Drawer 1/FS
[ASCII] FS
[Decimal] 28
[Hexadecimal] 1C
[Parameter]
[Description] ● Drives the drawer connector pin 2 under condition set by ESC, BEL n1 n2
command.
Drive command for Drawer 2 / SUB
[ASCII] SUB
[Decimal] 26
[Hexadecimal] 1A
[Parameter]
[Description] ● Drives the drawer connector No.5 pin immediately after receiving the
command.
● Power-distribution time is fixed at 200ms for ON and 200ms for OFF.
● Drawer 1 and drawer 2 cannot be driven simultaneously.
Command reference CITIZEN
80
CONFIDENTIAL CD-S500 series
Star mode
Canceling of printing data / CAN
[ASCII] CAN
[Decimal] 24
[Hexadecimal] 18
[Parameter]
[Description] ● The input buffer and print buffer are cleared.
In STX-ETX mode of the serial interface printer, the data in the data buffer is
cleared, and then STX-ETX mode is ended.
Specifying the De-select mode / DC3
[ASCII] DC3
[Decimal] 19
[Hexadecimal] 13
[Parameter]
[Description] ● When the printer receives <DC3>, it ignores the data after the command.
Canceling of the deselect mode can be executed by <DC1>.
Specifying the select mode / DC1
[ASCII] DC1
[Decimal] 17
[Hexadecimal] 11
[Parameter]
[Description] ● When the printer receives the command, it inputs the data after the command
to the input buffer.
Specifying/Canceling single direction print mode / ESC U
[ASCII] ESC U n
[Decimal] 27 85 n
[Hexadecimal] 1B 55 n
[Parameter] 0<
n<255
[Description] ● Specifies/cancels the single direction printing.
n0=0 Two direction printing
n0=1 Single direction printing
Command reference CITIZEN
81
CONFIDENTIAL CD-S500 series
Star mode
Initialization of a printer/ ESC @
[ASCII] ESC @
[Decimal] 27 64
[Hexadecimal] 1B 40
[Parameter]
[Description] ● Cancels all the setting set after power-on and returns the printer to the same
condition as that of power-on.
Inquiry/ENQ
[ASCII] ENQ
[Decimal] 05
[Hexadecimal] 05
[Parameter]
[Description] ● This command is valid only with the serial interface. The printer sends status
information.
In STX-ETX mode, if this command is entered after receiving text information,
the printer will send status information and check byte.
[Description] ● Deletes download character, message, bit image.
● Specifies download function to be deleted by n2.
n1 Candidate for deletion
0 All (message, character, bit image)
1 Download message
2 Download character
3 Download bit image
● Specifies which data of the function specified by n1 by n2 is deleted.
● Deletes all the data registered by the download function specified by n2=0 n1.
● Deletes part of download data specified by n2 (value specified at registering by
download command).
Command reference CITIZEN
87
CONFIDENTIAL CD-S500 series
Star mode
Defining the download bit image/GS *
[ASCII] GS * n1 n2 [<d>] x (n1xn2x8)
[Decimal] 27 42 n1 n2 [<d>] x (n1xn2x8)
[Hexadecimal] 1B 2A n1 n2 [<d>] x (n1xn2x8)
[Parameter] 1<
n1<45
0<
n2<24
Set the data number to (n1 x n2 x 8) <
2048.
[Description] ● Defines the download bit images of dots specified by n1 and n2.
● The number of dots in horizontal direction is n1 x 8 and the number of dots in
vertical direction is n2 x 8.
“d” indicates bit image data.
● Once a download bit image is defined, it remains effective until redefinition,
execution of ESC, DC2 and n1 n2 is conducted.
dn2 x n2 + 1
d1
dn2
+1
d2
dn
2
dn2 x n2 x 8
MSB
LSB
Command reference CITIZEN
88
CONFIDENTIAL CD-S500 series
Star mode
Printing the download bit image/GS /
[ASCII] GS / m
[Decimal] 27 47 m
[Hexadecimal] 1B 2F m
[Parameter] 0<
m<255
[Description] ● Prints the bit image defined by download bit image command.
[Caution]
● If data exist in the print buffer, this command will be ignored.
● If a download bit image has not been registered, this command is ignored.
Prints nothing unless m=0, 1, 2, 3.
Page feed + Full cut at time of BM specification / GS FF
[ASCII] GS FF
[Decimal] 29 12
[Hexadecimal] 1D 0C
[Parameter]
[Description] ● The command is effective only at time of BM specification.
● During the reception of the command:
When auto cutter is valid: BM center skips to auto cut position and performs
full cut after page feed.
When auto cutter is invalid: BM center skips to manual cut position and
performs full cut after page feed.
● When using this command, area between head and cut becomes unprintable
area.
When auto cutter is valid: Approx. 19mm
When auto cutter is invalid: Approx. 28mm
● When performing a partial cut, set the [CUTTER] of the software switch to
PAR.
Command reference CITIZEN
89
CONFIDENTIAL CD-S500 series
STAR mode (domestic) STAR mode (overseas)
Command reference CITIZEN
96
CONFIDENTIAL CD-S500 series
CodePage437 (USA, Standard Europe6) Katakana
Command reference CITIZEN
97
CONFIDENTIAL CD-S500 series
CodePage850 (Multilingual) CodePage860(Portugal)
Command reference CITIZEN
98
CONFIDENTIAL CD-S500 series
CodePage863 (Canadian-French) CodePage865(Norway)
Command reference CITIZEN
99
CONFIDENTIAL CD-S500 series
CodePage852 (Latin 2) CodePage866 (Russian)
Command reference CITIZEN
100
CONFIDENTIAL CD-S500 series
CodePage857 (Turkey) CodePage858(Euro)
Command reference CITIZEN
101
CONFIDENTIAL CD-S500 series
WPC1252
Command reference CITIZEN
102
CONFIDENTIAL CD-S500 series
4. Attention on Use
4.1 Cutter Operation
The minimum cutting interval must be 1/2 inch (3 lines in 6LPI).
Once a cutting command is executed, even if any other cutting command is sent before paper feeds
for at least 1/2 inch, it is ignored and the cutting operation is not executed.
Moreover, a paper tends to be caught in a cutter when a paper is cut using a manual cutter.
Printing result immediately after a cut may produce clogging at the top-bottom of the print out page.
Please insert an extra line feed before printing to prevent clogging.
4.2 Cooling Operation by Head Temperature
Cooling is operated according to the thermistor temperature, which is monitored during printing.
Cooling operation
1/1duty
1/1duty
1/1duty
1/2duty
1/2duty
1/4duty
1/4duty
120 oC110 oC 100 oC
Cooling
130 oC
Cooling
Cooling
1/1duty — Normal printing.
1/2duty — Carriage empty-moves once at every one-line printing.
1/4duty — Carriage empty-moves 3 times at every one-line printing.
Cooling — A carriage empty-moves until it falls to a specified temperature.
Note: If an object having a high printing density such as bit image is printed during the above
control operation after the thermistor detects 100°C or higher, the printing quality may
deteriorate.
4.3 Morning Shot
When a printing is started at the following timing with the head temperature of 5°C or lower, the
carriage is moved to position B (see 9.5 Color Ribbon Change) and a dummy electricity-distribution
is performed before printing.
(1) First printing immediately after power-on.
(2) First printing after centering.
Caution: Depending on the thickness of the paper & the type of ribbon, the start up operation
may leave (vertical 9-pin) printing marks on the right edge of the paper.
Command reference CITIZEN
103
CONFIDENTIAL CD-S500 series
4.4 Cover Opening-and-Closing Processing
● Front cover opening/closing
1) Opening: Printing stops. If red printing is set, the ribbon color is changed to black. After
centering, the printer stands by at that state.
2) Closing: If red printing is set before the cover is opened, the printing color is returned to red. If
there is printing data, printing is resumed.
● Rear cover opening/closing
1) Opening: Printing stops. After centering, the printer stands by at that state. In case of printers
equipped with a rewinder, if the cover is opened when paper is loaded, paper feeds
forward for approximately 1 inch, and then centering is performed.
2) Closing: After initializing the home position and cut position, the printer performs the backlash
operation (forward paper feed for 12/144 inch), and then performs printing if there is
printing data.
Note :
(1) If the rear cover is opened during printing, it may cause a problem in the head or cutter.
Please check that printing has stopped when opening the rear cover.
(2) When closing the rear cover, hold the paper end by hand so that neither slack nor a crease
generates inside the printer.
(3) If a cutter problem occurs because of paper jam or other reasons, the printer may stop with the
cutter blade protruding, and the rear cover may be stuck with the cutter blade. In this case, do
not try to open the cover forcibly, but cancel the cutter error by pressing FEED switch.
If the error is not cancelled by pressing FEED switch, the cutter blade needs to be returned
manually before the cover is opened. Insert a screwdriver into the hole on the left side of the
rear cover and rotate it (the cutter blade returns when the screwdriver is rotated in either
direction).
(4) Be careful not to catch your finger in the cover when opening or closing the front/rear cover.
Especially, be careful with the manual cutter.
Command reference CITIZEN
104
CONFIDENTIAL CD-S500 series
4.5 Recording Paper
Use the recording paper shown below to maintain printing quality and stabilize paper feeding.
(1) Roll paper
a) Regular paper Paper width 76.2 ± 0.7 mm (3 ± 1 / 36 inches)
69.5 ± 0.6 mm (3 ± 1 / 36 inches)
57.5 ± 0.5 mm (2.26 ± 0.02 inches)
Roll diameter φ30mm to φ83 mm Core diameter Internal Diameter: φ 10 +2-/-0 mm
External diameter: φ 27mm or less Paper thickness 0.06 – 0.085 mm
Weight 52.3 – 64.0 g/m2 (JIS P8124)
(45 – 55 kg / 1000 sheets / 788mm × 1091 mm)
b) Thermal paper (Non-carbon 2P/3P paper, 1 original + 1copy/2 copies)
Paper width, roll diameter, core diameter
Same as regular paper.
Paper thickness 0.05 – 0.20 mm
The total thickness that can be cut is from 0.05 to
(2) Notes on roll paper
Starting to wind the roll paper (with a core). (Inside end processing)
1) It must not be folded. Inside end must be even.
2) It must not be rolled back.
3) There must be no glue on its center core.
4) It must be wound with its printing side facing outwards.
5) When 2P paper is used, there must be no glue between the top and bottom sheets.
6) When 3P paper is used, there must be no glue on the top, middle, or bottom sheets.
7) Use thermal paper with total thickness no greater than 0.20mm. Note that the printer will
not cut paper with total thickness greater than 0.14mm.
If you use thermal paper with total thickness greater than 0.14mm, do not use the cutter. Or,
rewind the bottom paper with the rewinder to reduce the total thickness (top paper + middle
paper) to 0.14mm or less.
Recommended paper
Recommended paper
Register paper (Oji Paper) or equivalent
0.14 mm.
2P NCR Super (Mitsubishi Paper Mills) (blue
background) or equivalent
Command reference CITIZEN
105
CONFIDENTIAL CD-S500 series
4.6 Paper Width and Printing Digit Number
This machine supports three kinds (76.2/69.5/57.5mm) of paper width.
When using the paper of 69.5/57.5mm width, a setup of paper width can be changed by setup of
Software SW,
The attached paper partition plate is set and a paper is set on a right end.