CITIZEN CD-S500 Reference Guide

CONFIDENTIAL CD-S500 series
Serial dot impact printer
CD-S500 series
Command Reference
REVISION 1.00 2004.11.24
Command reference CITIZEN
1
CONFIDENTIAL CD-S500 series
<Attention>
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.
Appendix
Lists each character code table.
Command reference CITIZEN
4
CONFIDENTIAL CD-S500 series
Table of contents
1.
Outline......................................................................................................................................................P 6
1.1 Mode of Operation ..........................................................................................................................P 6
1.2 Character Set ..................................................................................................................................P 6
1.3 Control Commands......................................................................................................................... P 7
1.3.1 Explanation of Control Commands.................................................................................................. P 7
1.3.2 How to Send Control Commands..................................................................................................... P 7
2. Control Code Command ..........................................................................................................................P 8
2.1 ESC/POS Mode ...............................................................................................................................P 9
2.2 CBM1/CBM2 Mode......................................................................................................................... P 49
2.3 Star Mode........................................................................................................................................P 67
3. Character Code Table.............................................................................................................................. P 95
4. Attention on Use ......................................................................................................................................P 103
4.1 Cutter Operation ............................................................................................................................P 103
4.2 Cooling Operation by Head Temperature .....................................................................................P 103
4.3 Morning Shot ..................................................................................................................................P 103
4.4 Cover Opening-and-Closing Processing ........................................................................................P 104
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:
Program listing 10 A$="CITIZEN" 20 LPRINT CHR$(&HE) 30 LPRINT A$ 40 LPRINT CHR$(&HA)
CITIZEN
CITIZEN
Printing result
50 LPRINT A$ 60 END
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 Setting Specifying/Canceling emphasis printing ESC G 1B 47 O Setting Specifying/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 Setting O ESC U 1B 55 O O Specifying/Canceling single direction printing ESC V 1B 56 O Setting Specifying/Canceling 90° right-turned characters *1
ESC W 1B 57 O Setting the print area in PAGE MODE *1 ESC a 1B 61 O Setting Aligning 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 Setting Selecting 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 Setting Specifying/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
with “m”.
Drawer Kick-Out Connector m=0: Pin No. 2 m=1: Pin No. 5
On/Off [t × 100ms]
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.
7 3n 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
Unused Double
width
Double
height
Emphasis Unused Unused FONT
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.
“n” is valid for the lowest bit (n0).
Control by the lowest bit is as follows:
n=0: Canceling emphasis printing. (Initial value) n=1: Specifying emphasis printing.
Specifying/Canceling double strike printing/ESC G
[ASCII] ESC G n [Decimal] 27 71 n [Hexadecimal] 1B 47 n [Parameter] 0<
n<FFh
[Description] Specifies/Cancels the double strike printing.
“n” is valid for the lowest bit (n0).
Control by the lowest bit is as follows:
n=0: Canceling double strike printing. (Initial value) n=1: Specifying double strike printing.
Printing and feeding paper/ESC J
[ASCII] ESC J n [Decimal] 27 74 n [Hexadecimal] 1B 4A n [Parameter] 0<
n<FFh
[Description] Prints data stored in the print buffer and feeds paper by [n × 1/144] inches.
After execution of this command, the beginning of line becomes the next print start position.
This command does not affect the line feed width defined by ESC 2 or ESC 3.
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
23
CONFIDENTIAL CD-S500 series
ESC/POS mode
Selecting PAGE MODE/ESC L
[ASCII] ESC L [Decimal] 27 76 [Hexadecimal] 1B 4C [Parameter] [Description] Switches from STANDARD MODE to PAGE MODE.
This command becomes effective only if it is entered at the head of line.
With FF code or ESC S, ESC @, STANDARD MODE is restored.
The starting position of character mapping will be the point specified by ESC T
within the print area specified by ESC W.
The settings by the following commands, which have separate settings for PAGE MODE and STANDARD MODE, are changed to the settings for PAGE MODE.
Spacing setting: ESC SP Line feed setting: ESC 2, ESC 3
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.
(1) Spacing setting: ESC SP (2) Line feed setting: ESC 2, ESC 3
When the printer is powered ON or reset, or when ESC @ is executed, STANDARD MODE is selected.
Command reference CITIZEN
25
CONFIDENTIAL CD-S500 series
ESC/POS mode
Selection of character printing direction in PAGE MODE/ESC T
[ASCII] ESC T n [Decimal] 27 84 n [Hexadecimal] 1B 54 n [Parameter] 0<
n<3h, 30h<n<33h
[Description] Selects the printing direction and starting point of characters in PAGE MODE.
n Printing direction Starting point
0, 30h Left to right Top left
(A in the figure)
1, 31h Bottom to top Bottom left
(B in the figure)
2, 32h Right to left Bottom right
(C in the figure)
3, 33h Top to bottom Top right
(D in the figure)
A
Print Area
B
D
Paper Feed Discription
C
In STANDARD MODE, only internal settings of printer will be executed with this command.
The character mapping position will be the starting point within the print area specified by ESC W.
Default is n=0.
In Chinese and Japanese specification, only N=0, 2, 30h, 32h is valid.
Specifying/Canceling single direction printing/ESC U
[ASCII] ESC U n [Decimal] 27 85 n [Hexadecimal] 1B 55 n [Parameter] 0<
n<FFh
[Description] Specifies/cancels the single direction printing.
“n” is valid for the lowest bit (n0).
Control by the lowest bit is as follows:
n=0: Cancel the single direction printing. (Initial value) n=1: Specify the single direction printing.
Command reference CITIZEN
26
CONFIDENTIAL CD-S500 series
ESC/POS mode
Specifying/Canceling 90°-right-turned characters/ESC V
[ASCII] ESC V n [Decimal] 27 86 n [Hexadecimal] 1B 56 n [Parameter] 0<
n<1h, 30h<n<31h
[Description] Specifying/Canceling 90°-right-turned characters.
Depending on the “n” value, specifying or canceling is performed as follows:
n Function 0, 30 Canceling 90°-right-turned characters. 1, 31 Specifying 90°-right-turned characters.
In PAGE MODE, settings with this command are not affected.
In PAGE MODE, this command executes only the internal flagging of printer
without affecting printing in PAGE MODE.
Default is n=0.
This command is not valid in Chinese and Japanese specification.
Setting the print area in PAGE MODE/ESC W
[ASCII] ESC W xL xH yL yH dxL dxH dyL dyH [Decimal] 27 W xL xH yL yH dxL dxH dyL dyH [Hexadecimal] 1B W xL xH yL yH dxL dxH dyL dyH [Parameter] 0<
xL, xH, yL, yH, dxL, dxH, dyL, dyH <FFh
dxL=dxH=0 or dyL=dyH=0
[Description] Sets the location and the size of print area.
Horizontal start point = xL + xH × 256 / Vertical start point = yL + yH × 256 Horizontal length = d xL + dxH × 256 / Vertical Length = dyL + dyH × 256
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 disabled 00 0
0
Paper near-end sensor enabled 01 1 Paper near-end sensor disabled 00 0
1
Paper near-end sensor enabled 02 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 disabled 00 0
0
Paper near-end sensor disabled 01 1 Paper near-end sensor disabled 00 0
1
Paper near-end sensor disabled 02 2 2 Undefined 3 Undefined 4 Undefined 5 Undefined 6 Undefined 7 Undefined
Hexadecimal Decimal
Valu e
Printing stops after printing of the current line and paper feed are completed.
If printing stops, it will become offline.
If either of bit 0 and bit 1 is 1, a roll paper near-end sensor will be selected as a
paper end sensor effective for print stop.
Default is n=0.
Command reference CITIZEN
30
CONFIDENTIAL CD-S500 series
ESC/POS mode
Enabling/Disabling the operation panel switches/ESC c 5
[ASCII] ESC c 5 n [Decimal] 27 99 53 n [Hexadecimal] 1B 63 35 n [Parameter] 0<
n<FFh
[Description] Switches enabling/disabling the paper feed switch on the operation panel.
“n” is valid for the lowest bit “n0”. n=<*******0>B enables the paper feed switch. n=<*******1>B disables the paper feed switch.
While a cover is opened, the switch is invalid regardless of specification with
this command.
As for the operation key with the exception of paper feed, the switch is valid
regardless of specification with this command.
Default is n0=0.
Printing and feeding paper by “n” lines/ESC d
[ASCII] ESC d n [Decimal] 27 100 n [Hexadecimal] 1B 64 n [Parameter] 0<
n<255
[Description] Prints date in the print buffer and feeds paper by “n” lines.
The next print start position is set at the head of line.
If the maximum feeding amount exceeds 40 inches, paper feeding by 40 inches
will be executed.
Command reference CITIZEN
31
CONFIDENTIAL CD-S500 series
ESC/POS mode
Full cut/ESC i
[ASCII] ESC i [Decimal] 27 105 [Hexadecimal] 1B 69 [Parameter] [Description] Executes full cut of Receipt paper.
This command is effective only at the head of line.
We recommend to observe an interval between cuts of 3 seconds or more.
Partial cut/ESC m
[ASCII] ESC m [Decimal] 27 109 [Hexadecimal] 1B 6D [Parameter] [Description] Executes partial cut of Receipt paper (leaving one area uncut).
This command is effective only at the head of line.
We recommend to observe an interval between cuts of 3 seconds or more.
Generating the specified pulses/ESC p
[ASCII] ESC p m n1 n2 [Decimal] 27 112 m n1 n2 [Hexadecimal] 1B 70 m n1 n2 [Parameter] 0<
m<1 30h<m<31h 0<n1<FFh 0<n2<FFh
[Description] The signals specified by “n1” and “n2” are output to the drawer kick-out
connector pin specified by “m”.
m Connector pin 0, 30 Drawer kick-out connector pin No. 2 1, 31 Drawer kick-out connector pin No. 5
The ON time is n1 × 2ms, and the OFF time is n2 × 2ms.
In case of n2<n1, the OFF time is n1 × 2ms for execution.
T1 x 2ms ON time
T2 x 2ms OFF time
Command reference CITIZEN
32
CONFIDENTIAL CD-S500 series
ESC/POS mode
Selecting printing color/ESC r
[ASCII] ESC r n [Decimal] 27 114 n [Hexadecimal] 1B 72 n [Parameter] 0<
n<1 30h<n<31h
[Description] Specifies the color with n.
n Selection of color 0, 30h Black 1, 31h Red
This command is effective only at the head of line.
Default is n=0.
Selecting the character code table/ESC t
[ASCII] ESC t n [Decimal] 27 116 n [Hexadecimal] 1B 74 n [Parameter] 0<
n<255h n=FFh
[Description] The character code table depending on the value of “n” is as follows:
n Character code 0 PC437 (USA: Standard Europe) 1 Katakana 2 PC850 (Multilingual) 3 PC860 (Portugal) 4 PC863 (Canada−French) 5 PC865 (Norway) 6 PC852 (Latin 2) 7 PC866 (Russian) 8 PC857 (Turkey)
9 WPC1252 16 WPC1252 17 PC866 (Russian) 18 PC852 (Latin 2) 19 PC858 (EURO)
255 Blank page
The initial value of “n” is n=0.
Command reference CITIZEN
33
CONFIDENTIAL CD-S500 series
ESC/POS mode
Status signal of peripheral equipment/ESC u
[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:
Bit Function
Level of No.3 pin
0 1 Undefined 2 Undefined 3 Undefined 4 Unused Fixed at 0 5 Undefined 6 Undefined 7 Undefined
0 1
L”
Valu e
“H”
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<
n<FFh
[Description] Specifies/Cancels inverted characters.
“n” is valid for the lowest bit.
n=<*******0>B Cancels inverted characters. n=<*******1>B Specifies inverted characters.
Default is n0=0.
This command is effective only at the head of line.
Canceling inverted characters Specifying inverted characters
ABCDEFG 0123456
Paper feed direction
0123456 ABCDEFG
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
Table “Type ID”
Bit Function Hex. Decimal
Not equipped for 2 byte code 00 0
0
Equipped for 2 byte code 01 1
1 Equipped with auto cutter 02 2
Direct connection of customer
2
display 3 Without MICR reader 00 0 4 Unused 00 0 5 Undefined 6 Undefined 7 Unused 00 0
00 0
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 (READYBUSY) 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 (BUSYREADY) 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 n0, 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
3
Continuous paper sensor =Enabled 08 8 4 Undefined 5 Undefined 6 Undefined 7 Undefined
Valu e
Hex. Decimal
00 0 01 1
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
Valu e
Hex. Decimal
The 4th byte (Paper sensor information)
Bit Status
0 Undefined 1 Undefined 2 Undefined 3 Undefined 4 Unused 00 0 5 Undefined 6 Undefined 7 Unused 00 0
Valu e
Hex. Decimal
Default: n=0
Command reference CITIZEN
40
CONFIDENTIAL CD-S500 series
ESC/POS mode
Sending of status/GS r
[ASCII] GS r n [Decimal] 29 114 n [Hexadecimal] 1D 72 n [Parameter] 1<
n<2h, 49<n<50
[Description] Sends the specified status.
n=1, 49: Sends the paper sensor status. Cancels inverted characters. n=2, 50: Sends the drawer kick-out connector status.
When Serial Interface is used,
In case of DTR/DSR control..........The printer sends the status after
checking that the host is ready to receive. If the host isn’t ready to receive, the printer will wait until it becomes ready to receive.
In case of XON/XOFF control....... The printer sends the status without
checking whether the host is ready to receive or not.
This command is executed at time of editing.
Paper sensor status (n=1, 49)
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
Valu e
Hex. Decimal
Drawer kick connector status (n=2, 50)
Bit Status
Status of Pin 3 of Drawer “L” 00 0 0
Status of Pin 3 of Drawer “H” 01 1 1 Undefined 2 Undefined 3 Undefined 4 Unused 00 0 5 Undefined 6 Undefined 7 Unused 00 0
Valu e
Hex. Decimal
Command reference CITIZEN
41
CONFIDENTIAL CD-S500 series
ESC/POS mode
Writing data into the user NV memory/FS g 1
[ASCII] FS g 1 m a1 a2 a3 a4 nL nH d1..dk [Decimal] 28 103 49 m a1 a2 a3 a4 nL nH d1..dk [Hexadecimal] 1C 7B 31 m a1 a2 a3 a4 nL nH d1..dk [Parameter] m=0
0<
(a1 + (a2 × 256) + (a3 × 65536) + (a4 + 16777216)) <1023 (nL + (nH × 256)) <1024
1<
d<255
32< k= (nL + (nH × 256))
[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
0<
(a1 + (a2 × 256) + (a3 × 65536) + (a4 + 16777216) <1023 (nL + (nH × 256)) <80
1<
[Description] Reads data to the user NV memory.
“m” is fixed at 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”.
n Mode
0, 48 NORMAL MODE 144 DPI 160 DPI 1, 49 DOUBLE WIDTH MODE 144 DPI 80 DPI
65 DOUBLE HEIGHT MODE 72 DPI 160 DPI 66 QUADRUPLE SIZE MODE 72 DPI 80 DPI
Dot density in
vertical direction
Dot density in
horizontal direction
“n” denotes the NV bit image number.
“m” denotes the NV bit image mode.
The NV bit image refers to a bit image defined by FS q in the nonvolatile
memory and printed by FS p.
If the specified NV bit image “n” is undefined, this command will be invalid.
This command is valid only when there is no data in the print buffer.
This command doesn’t affect any printing modes (i.e. emphasis, double strike,
underline, character size, reversed characters, 90°-right turned characters) except inverted printing.
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
0<
yL<255
0<
yH<1 on condition that 1< (yL + yH × 256) <288
0<
d<255
0< k= (xL + xH × 256) × (yL + yH × 256) × 8 Total definition area =1M bits (256k bytes)
[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
Unused Unused Unused Double
height
Double
width
Unused Unused
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.
Registering the download Chinese characters/FS 2
[ASCII] FS 2 c1 c2 p1…pn [Decimal] 28 50 c1 c2 p1…pn [Hexadecimal] 1C 32 c1 c2 p1…pn [Parameter] c1 c2 Japanese spec. (JIS rating) c1=77h 21h<
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.
Deleting the download Chinese characters/FS ?
[ASCII] FS ? c1 c2 [Decimal] 28 63 c1 c2 [Hexadecimal] 1C 3F c1 c2 [Parameter] c1 c2 Japanese spec. (JIS rating) c1=77h 21h<c2<7Eh
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
Japanese specification.
Specifying the space for Chinese characters/FS S
[ASCII] FS S n1 n2 [Decimal] 28 85 n1 n2 [Hexadecimal] 1C 53 n1 n2 [Parameter] 0<
n1<32 n2<32
0<
[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.
Without data, only line feed is performed.
Printing/CR
[ASCII] CR [Decimal] 13 [Hexadecimal] 0D [Parameter] [Description] Performs printing.
While the AUTO LF setting of software switch is ON, it prints out the data inside the buffer and performs paper feed for one line.
While the AUTO LF setting of software switch is OFF, it does not perform paper feed.
Initial setting/DC1 (CBM1)
[ASCII] DC1 [Decimal] 17 [Hexadecimal] 11 [Parameter] [Description] Printer is initialized by this command.
Does not clear the contents of the input buffer.
Select/DC1 (CBM2)
[ASCII] DC1 [Decimal] 17 [Hexadecimal] 11 [Parameter] [Description] Printer is changed into a selection state.
Command reference CITIZEN
53
CONFIDENTIAL CD-S500 series
CBM mode
Specifying/Canceling inverted characters/DC2 (CBM1)
[ASCII] DC2 [Decimal] 18 [Hexadecimal] 12 [Parameter] [Description] Specifies/Cancels inverted characters.
This command is valid only when processed at the head of line. Erected and inverted characters cannot be mixed in one line.
Specifying of red character printing/DC2 (CBM2)
[ASCII] DC2 [Decimal] 18 [Hexadecimal] 12 [Parameter] [Description] This command is for specifying red characters.
By adjusting printer at the head of printing data, all of the character in a line will be printed in red.
Please use this command for every line to be changed to red character.
Specifying of red character printing/DC3 (CBM1)
[ASCII] DC3 [Decimal] 19 [Hexadecimal] 13 [Parameter] [Description] This command is for specifying red characters.
By adjusting printer at the head of printing data, all of the character in a line will be printed in red.
Please use this command for every line to be changed to red character.
De-select/DC3 (CBM2)
[ASCII] DC3 [Decimal] 19 [Hexadecimal] 13 [Parameter] [Description] Turns the printer to de-select state so that data cannot be received.
Please use DC1 (select command) to change to a selection state.
Command reference CITIZEN
54
CONFIDENTIAL CD-S500 series
CBM mode
Cancel/CAN
[ASCII] CAN [Decimal] 24 [Hexadecimal] 18 [Parameter] [Description] Clears the printing line data received before the command was executed.
Specifying the graphic/ESC *
[ASCII] ESC * nL nH dn [Decimal] 27 42 nL nH dn [Hexadecimal] 1B 2A nL nH dn [Parameter] 0<
nL<FFh 0<nH<03h
[Description] Prints according to bit image mode.
The number of dots printed is specified as nL, nH in 16 bits. Dot width: nL + (256 × nH)
Concerning bit image data (dn), bits to be printed are specified as “1” and bits not to be printed as “0”.
If bit image data have been input excess of dot positions that can be printed on one line, the excess data are discarded.
If bit image data have been input excess of dot number that can be printed on one line, the excess data are discarded.
Returns to normal data processing after bit image printing.
Printing will be one-sided.
TOP DATA LSB MSB
HEAD1
HEAD2
HEAD3
HEAD4
HEAD5
HEAD6
HEAD7
HEAD8
HEAD9
06543217
BOTTOM
Command reference CITIZEN
55
CONFIDENTIAL CD-S500 series
CBM mode
Specifying/Canceling an underline/ESC
[ASCII] ESC − n [Decimal] 27 45 n [Hexadecimal] 1B 2D n [Parameter] 0, 1, 30h, 31h [Description] Specifying/Canceling an underline.
Specifies underline at time of n=1, 31h
Cancels underline at time of n=0, 30h
The initial value is n=0.
Specifying the 1/9-inch line feed rate/ESC 1
[ASCII] ESC 1 [Decimal] 27 49 [Hexadecimal] 1B 31 [Parameter] [Description] Sets the line feed rate per line to 1/9-inch.
Setting the normal line feed rate/ESC 3
[ASCII] ESC 3 [Decimal] 27 51 [Hexadecimal] 1B 33 [Parameter] [Description] Sets the line feed rate per line to 1/6-inch.
Command reference CITIZEN
56
CONFIDENTIAL CD-S500 series
CBM mode
Setting page length/ESC C (CBM1)
[ASCII] ESC C n [Decimal] 27 67 n [Hexadecimal] 1B 43 n [Parameter] 1<
n<127
[Description] Sets the page length by n lines.
Setting page length/ESC C (CBM2)
[ASCII] ESC C n [Decimal] 27 67 n [Hexadecimal] 1B 43 n [Parameter] 14<
n<120
[Description] Sets the page length by n lines. Three-line space is made at the head and end of
a page.
When the value of n is outside the range, it is set at n=66.
Perforated line skip/ESC N
[ASCII] ESC N n [Decimal] 27 78 n [Hexadecimal] 1B 4E n [Parameter] 1<
n<126
[Description] Only the number specified by -n is not printed and performs line feed (skips).
It cannot be specified for more than 1 page length.
Canceling perforated line skip/ESC O
[ASCII] ESC O [Decimal] 27 79 [Hexadecimal] 1B 4F [Parameter] [Description] Cancels the perforated line skip.
Command reference CITIZEN
57
CONFIDENTIAL CD-S500 series
CBM mode
Selecting the character code table/ESC t
[ASCII] ESC t n [Decimal] 27 116 n [Hexadecimal] 1B 74 n [Parameter] 0<
n<255h
[Description] The character code table depending on the value of “n” is as follows:
n Character code 0 CBM Overseas 1 CBM Domestic 2 PC850 (Multilingual) 3 PC860 (Portugal) 4 PC863 (Canada−French) 5 PC865 (Norway) 6 PC852 (Latin 2) 7 PC866 (Russian) 8 PC857 (Turkey)
9 WPC1252 16 WPC1252 17 PC866 (Russian) 18 PC852 (Latin 2) 19 PC858 (EURO)
255 Blank page
The initial value of “n” is dependent upon the setting code page of software switch.
Buzzer sounding/ESC RS
[ASCII] ESC RS [Decimal] 27 30 [Hexadecimal] 1B 1E [Parameter] [Description] Produces short warning sound for approx. 200ms.
Command reference CITIZEN
58
CONFIDENTIAL CD-S500 series
CBM mode
Specifying the drive pulse width of peripheral equipment/ESC BEL
[ASCII] ESC BEL n1 n2 [Decimal] 27 7 n1 n2 [Hexadecimal] 1B 7 n1 n2 [Parameter] 0<
n1<127 0<n2<127
[Description] This is the power-distribution time setting command to drive peripheral
equipment (such as cash drawers). Power distribution time = n1 x 10 (ms) Delay time = n2 x 10 (ms)
To actually drive the drawer, use <BEL> or <FS> command.
Default is n1=n2=20.
ON
OFF
10 x n1 (ms) 10 x n2 (ms)
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 order 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.
Command reference CITIZEN
59
CONFIDENTIAL CD-S500 series
CBM mode
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.
Buzzer sounding/ RS
[ASCII] RS [Decimal] 30 [Hexadecimal] 1E [Parameter] [Description] Produces short warning sound for approx. 200ms.
Full cut/ESC P 0 (auto cutter loading model)
[ASCII] ESC P 0 [Decimal] 27 80 0 [Hexadecimal] 1B 50 0 [Parameter] [Description] Executes full cut of Receipt paper.
We recommend to observe an interval between cuts of 3 seconds or more.
Partial cut/ESC P 1 (auto cutter loading model)
[ASCII] ESC P 1 [Decimal] 27 80 1 [Hexadecimal] 1B 50 1 [Parameter] [Description] Executes partial cut of Receipt paper (leaving one area uncut).
We recommend to observe an interval between cuts of 3 seconds or more.
Command reference CITIZEN
60
CONFIDENTIAL CD-S500 series
CBM mode
Selecting the international character set/ESC R
[ASCII] ESC R n [Decimal] 27 82 n [Hexadecimal] 1B 52 n [Parameter] 0<
n<10
[Description] Selects the international character set depending on the value of “n”.
Default is U.S.A.
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
Command reference CITIZEN
61
CONFIDENTIAL CD-S500 series
CBM mode
Defining the download characters/ESC &
[ASCII] ESC & 0 n1 n2 [Decimal] 27 38 0 n1 n2 [Hexadecimal] 1B 26 0 n1 n2
[m0 m1 .. m5 m6 m7 m8 m9] x (n2–n1) (+1) [m0 m1 .. m5 m6 m7 m8 m9] x (n2–n1) (+1) [m0 m1 .. m5 m6 m7 m8 m9] x (n2–n1) (+1)
[Parameter] 20h<n1<n2<FFh
m0=00h or, m0=80h
[Description] ● Defines the download characters.
“n1” indicates the start character code and “n2” indicates the end character code. To define only character, set n1=n2.
Definable character codes is in the range of ASCII code (20h to FFh).
Once download characters are defined, they remain valid until redefinition,
execution of ESC and DC 2n or n1n2 is performed.
At time of m0=<80>H At time of m0=<00>H
Pin number Pin number
1
2
3
4
5
6
7
8
9
D8 D7 D6 D5 D4 D3 D2 D1
1
2
3
4
5
6
7
8
9
D8 D7 D6 D5 D4 D3 D2 D1
Dots horizontally next to each other cannot be printed.
Command reference CITIZEN
62
CONFIDENTIAL CD-S500 series
CBM mode
Specifying/Canceling the download character set/ESC %
[ASCII] ESC % n [Decimal] 27 37 n [Hexadecimal] 1B 25 n [Parameter] n=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
Defining of message/ESC /
[ASCII] ESC / n “data” CR or LF [Decimal] 27 37 n “data” CR or LF [Hexadecimal] 1B 25 n “data” CR or LF [Parameter] 1<
n<10
[Description] Defines upto 50 bites of messages in one line.
When the n value is specified beyond the defined domain, the data after n is treated as printing data.
Once messages are defined, they remain valid until redefinition.
Finish the end of data by CR (0DH) or LF (0AH).
When data is 50 bytes or more, the continuing data is treated as printing data.
Once download characters are defined, they remain valid until redefinition,
execution of ESC and DC 2n or n1n2 is performed.
Printing of message/ESC DC3
[ASCII] ESC DC3 n [Decimal] 27 19 n [Hexadecimal] 1B 13 n [Parameter] 1<
n<10
[Description] Prints out the message.
When the n value is specified beyond the defined domain, data is not printed.
Command reference CITIZEN
63
CONFIDENTIAL CD-S500 series
CBM mode
Setting printing line after paper near-end detection/ESC y
[ASCII] ESC y n [Decimal] 27 121 n [Hexadecimal] 1B 79 n [Parameter] 0<
n<255
[Description] Selects the printing line after paper near-end detection.
Stops printing after printing n x 2 lines after paper near-end detection.
Enters paper near-end state.
Paper end signal parallel changes by the time paper near-end is detected.
Default is n=0.
Deleting download characters, message, bit image/ESC DC2
[ASCII] ESC DC2 n1 n2 [Decimal] 27 18 n1 n2 [Hexadecimal] 1B 12 n1 n2 [Parameter] 0<
n1<3 n2(When selecting n1=0, select 0.)
0< (When selecting n1=1, 1< (When selecting n1=2, 32<
n2<10.)
n2<255.)
(When selecting n1=3, select 0.)
[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.
n20 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
becomes ordinary characters.
Specifying/canceling underline/ ESC –
[ASCII] ESC [Decimal] 27 45 [Hexadecimal] 1B 2D [Parameter] 0, 1, 30h, 31h [Description] Specifies/cancels underline.
When n=1, 31h, underline is set.
When n=0, 30h, underline is canceled.
The initial value is n=0.
Underline is not attached to the space by the horizontal tab.
Command reference CITIZEN
70
CONFIDENTIAL CD-S500 series
Star mode
Specifying the red printing/ ESC 4
[ASCII] ESC 4 [Decimal] 27 52 [Hexadecimal] 1B 34 [Parameter] [Description] Prints data following this command in red.
This command continues until the red printing cancel command is entered.
Canceling the red printing/ESC 5
[ASCII] ESC 5 [Decimal] 27 53 [Hexadecimal] 1B 35 [Parameter] [Description] Cancels red printing.
Selecting the inverted printing/SI
[ASCII] SI [Decimal] 15 [Hexadecimal] 0F [Parameter] [Description] This command is the inverted character specification command and prints
inverted characters.
This command is valid only when processed at the head of line. Erected and inverted characters cannot be mixed in one line.
Canceling the inverted printing/ DC2
[ASCII] DC2 [Decimal] 18 [Hexadecimal] 12 [Parameter] [Description] Cancels inverted printing.
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=1127. 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 column1 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.
8-dot standard density bit image/ESC K
[ASCII] ESC K n1 <0> m1 m2. [Decimal] 27 75 n1 <0> m1 m2. [Hexadecimal] 1B 4B n1 <0> m1 m2. [Parameter] 1 <
n1 < 200
[Description] This command executes the printing of bit image for the number of data
specified by n1. At this time, printing is performed in a single direction.
The data exceeding the number of data printable in one line is ignored.
Returns to the character mode automatically after printing bit image.
Pin number
1
2 3 4 5
6 7 8
9
Print data
D8 D7 D6 D5 D4 D3 D2 D1
Command reference CITIZEN
76
CONFIDENTIAL CD-S500 series
Star mode
8-dot double density bit image/ESC L
[ASCII] ESC K n1 n2 m1 m2. [Decimal] 27 75 n1 n2 m1 m2. [Hexadecimal] 1B 4B n1 n2 m1 m2. [Parameter] 1<
n1 < 400
[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
[ASCII] ESC BEL n1 n2 [Decimal] 27 07 n1 n2 [Hexadecimal] 1B 07 n1 n2 [Parameter] 1 <
n1 <127 1 <n2 <127
[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.
Status
b7 b6 b5 b4 b3 b2 b1 b0
0
Parity error 1: Error Framing error 1: Error Mechanical error 1: Error Paper near-end 1: near-end Buffer empty 1: Empty Overrun error 1: Overrun Drawer switch 1: Switch ON
Command reference CITIZEN
82
CONFIDENTIAL CD-S500 series
Star mode
Text start / STX
[ASCII] STX [Decimal] 02 [Hexadecimal] 02 [Parameter] [Description] This command is valid only with the serial interface.
The printer enters STX-ETX mode.
Text end / ETX
[ASCII] ETX [Decimal] 03 [Hexadecimal] 03 [Parameter] [Description] This command is valid only with the serial interface.
Ends STX-ETX mode and prints data.
Buzzer sounding/RS
[ASCII] RS [Decimal] 30 [Hexadecimal] 1E [Parameter] [Description] Produces short warning sound for approx. 200ms.
Command reference CITIZEN
83
CONFIDENTIAL CD-S500 series
Star mode
* ETX-STX mode
Start
STX/ETX mode
ENQ sending
Status receive
NO
Is the data buffer
empty?
STX sending
Odd parity
check?
Set the test byte contents
to (FF).
YES
YES
NO
Set the test byte contents
to (00).
1
ENQ sending
Status receive
Check byte receive
Is the status error?
NO
Check byte =
Test byte?
YES
ETX sending
(Printing)
YES
NO
CAN sending
Exclusive OR of test contents and sending data
Sending data to the printer
NO
Is it the last
data in
1block?
1
YES
Test byte
STX-ETX mode
end
Is there a data
block of STX- ETX
mode to be sent?
YES
NO
RET
Command reference CITIZEN
84
CONFIDENTIAL CD-S500 series
Star mode
Full cut / ESC d (auto cutter loading model)
[ASCII] ESC d n [Decimal] 27 100 n [Hexadecimal] 1B 64 n [Parameter] 0, 1, 30h, 31h [Description] Executes the cutting of paper.
n Cut operation 0
30
1
31
Full cut
Partial cut
We recommend to observe an interval between cuts of 3 seconds or more.
Selecting the character code table/ESC t
[ASCII] ESC t n [Decimal] 27 116 n [Hexadecimal] 1B 74 n [Parameter] 0 <
n<255
[Description] Selects a page n of the character code table.
n Character code 0 CBM Overseas 1 CBM Domestic 2 PC850 (Multilingual) 3 PC860 (Portugal) 4 PC863 (Canada−French) 5 PC865 (Norway) 6 PC852 (Latin 2) 7 PC866 (Russian) 8 PC857 (Turkey)
9 WPC1252 16 WPC1252 17 PC866 (Russian) 18 PC852 (Latin 2) 19 PC858 (EURO)
255 Blank page
The initial value of “n” is dependent upon the setting code page of software switch.
Command reference CITIZEN
85
CONFIDENTIAL CD-S500 series
Star mode
Defining messages/ESC /
[ASCII] ESC / n "data" CR or LF [Decimal] 27 37 n "data" CR or LF [Hexadecimal] 1B 25 n "data" CR or LF [Parameter] 1<
n<10
[Description] Messages up to 50 bytes can be defined in 1 line.
When the value of n is specified beyond the defined area, the data after n will be treated as printing data.
Once a message is defined, it remains valid until it is redefined.
End data with CR (0DH) or LF (OAH).
When data is 50 bytes or more, the following data will be treated as printing
data.
Once a message is defined, it remains valid until the download deletion command (ESC DC 2n1n2) is executed.
Printing messages/ ESC DC3
[ASCII] ESC DC3 n [Decimal] 27 19 n [Hexadecimal] 1B 13 n [Parameter] 1<
n<10
[Description] Message is printed.
When the value of n is specified out of the domain, don't print.
Setting printing line after paper near-end detection/ESC y
[ASCII] ESC y n [Decimal] 27 121 n [Hexadecimal] 1B 79 n [Parameter] 0<
n<255
[Description] Selects the printing line after paper near-end detection.
Stops printing after printing n x 2 lines after paper near-end detection.
Enters paper near-end state.
Paper end signal parallel changes by the time paper near-end is detected.
Default is n=0.
Command reference CITIZEN
86
CONFIDENTIAL CD-S500 series
Star mode
Deleting download characters, message, bit image/ESC DC2
[ASCII] ESC DC2 n1 n2 [Decimal] 27 18 n1 n2 [Hexadecimal] 1B 12 n1 n2 [Parameter] 0<
n1<3
0<
n2 (When selecting n1=0, select 0.)
(When selecting n1=1, 1<
n2<10.)
(When selecting n1=2, 32<
n2<224.)
(When selecting n1=3, select 0.)
[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.
When paper width is set as 76.2mm
Selected number of
columns
Selected fonts Space between
characters 9x9dots 3dots 33 columns 40 / 33:00 7x9dots 3dots 40 columns 9x9dots 2dots 35 columns 42 / 35:00 7x9dots 2dots 42 columns
Printing line
columns
<Print range>
Paper width: 76.2mm
400dot
386dot
When paper width is set as 69.5mm
Selected number of
columns
Selected fonts Space between
characters 9x9dots 3dots 30 columns 40 / 33:00 7x9dots 3dots 36 columns 9x9dots 2dots 32 columns 42 / 35:00 7x9dots 2dots 40 columns
Printing line
columns
Full columns
400dots
386dots
Full columns
360dots
360dots
<Print range>
Paper width: 76.2mm
Paper width: 69.5mm
360dot
360dot
Right offset: 40
Command reference CITIZEN
106
Loading...