Citizen BD2-1220 Installation manual

CONTROL BOARD FOR LT122X/132X
MODEL BD2-1220/1221
Rev.1.00 First Created Jun. 10th, 2001
Command Reference

REVISION
Rev.No. Date Content
Rev. 1.00 Jun. 10th, 2001 First created

— 1 —
1 HT Horizontal tab S.P.
<09>H
5
2 LF Printing and paper feed S.P.
<0A>H
6
3 CR Back to printing S.P.
<0D>H
7
4FF Printing in PAGE MODE and returning to P
<0C>H
8
STANDARD MODE
5 CAN Canceling print data in PAGE MODE P
<18>H
9
6 DLE EOT Sending status in real-time S.P.
<10>H<04>H<n>
10
7 DLE ENQ Real-time request to printer S.P.
<10>H<05>H<n>
13
8 ESC FF Printing data in PAGE MODE P
<1B>H<0C>H
14
9 ESC SP Setting the right spacing of the character S.P.*
<1B>H<20>H<n>
15
10 ESC ! Collectively specifying the printing mode S.P.
<1B>H<21>H<n>
17
11 ESC $ Specifying the absolute positions S.P.*
<1B>H<24>H<n1>
19
<n2>
12 ESC %
Specifying/Canceling download character set
S.P.
<1B>H<25>H<n>
21
<1B>H<26>H<s>H
13 ESC & Defining the download characters S.P.
<n><m>[<a><p1>
22
<p2> ⋅ ⋅ <ps×a>]
m-n+1
14 ESC *Specifying the bit image mode S.P.
<1B>H<2A>H<m>
24
<n1><n2>[<d>]k
15 ESC - Specifying/Canceling underline S.P.
<1B>H<2D>H<n>
26
16 ESC 2 Specifying 1/6-inch line feed rate S.P.
<1B>H<32>H
27
17 ESC 3 Setting line feed rate of minimum pitch S.P.*
<1B>H<33>H<n>
28
18 ESC = Data input control S.P.
<1B>H<3D>H<n>
29
19 ESC ? Deleting download characters S.P.
<1B>H<3F>H<n>
30
20 ESC @ Initializing the printer S.P.
<1B>H<40>H
31
21 ESC D Setting horizontal tab position S.P.
<1B>H<44>H [<n>]k<00>
32
22 ESC E Specifying/Canceling Emphasis Printing S.P.
<1B>H<45>H<n>
33
23 ESC G
Specifying/Canceling Double strike printing
S.P.
<1B>H<47>H<n>
34
24 ESC J
Printing and feeding paper in minimum pitch
S.P.*
<1B>H<4A>H<n>
35
25 ESC L Selecting PAGE MODE S
<1B>H<4C>H
36
26 ESC M Selection of character fonts S.P.
<1B>H<4D>H<n>
37
27 ESC R Selecting the international character set S.P.
<1B>H<52>H<n>
38
28 ESC S Selecting STANDARD MODE P
<1B>H<53>H
39
29 ESC T Selecting the character printing direction P
<1B>H<54>H<n>
40
in PAGE MODE
No.
Command
Function Mode Code Page
In the Mode column: S = STANDARD MODE, P = PAGE MODE
*shows the command affected by GS P.
1. PRINT CONTROL FUNCTIONS
1.1 Command List

— 2 —
30 ESC V Specifying/Canceling 90°-right-turned S
<1B>H<56>H<n>
41
characters
<1B>H<57>H<xL><xH>
31 ESC W Defining the print area in PAGE MODE P*
<yL><yH><dxL><dxH>
42
<dyL><dyH>
32 ESC \ Specifying the relative position S.P.*
<1B>H<5C>H<nL><nH>
43
33 ESC a Aligning the characters S.P.
<1B>H<61>H<n>
45
34 ESC c3 Selecting the Paper Sensor valid for S.P.
<1B>H<63>H<33>H
46
a paper end signal output
<n>
35 ESC c4 Selecting the Paper Near-end Sensor valid S.P.
<1B>H<63>H<34>H
47
for print stop
<n>
36 ESC c5 Enabling/Disabling the panel switches S.P.
<1B>H<63>H<35>H
48
<n>
37 ESC d
Printing and feeding the paper by “n” lines
S.P.
<1B>H<64>H<n>
49
38 ESC t Selecting the character code table S.P.
<1B>H<74>H<n>
50
39 ESC {
Specifying/Canceling the inverted characters
S
<1B>H<7B>H<n>
51
40 GS ! Specifying the character size S.P.
<1D>H<21>H<n>
52
41 GS $ Specifying the absolute vertical position P*
<1D>H<24>H<nL>
54
of characters in PAGE MODE
<nH>
42 GS *Defining the download bit image S.P.
<1D>H<2A>H<n1>
55
<n2>[<d>]n1×n2×8
43 GS ( A Execution of test printing S
<1D>H<28>H<41>H
57
<pL><pH><n><m>
44 GS / Printing the downloaded bit image S.P.
<1D>H<2F>H<m>
58
45 GS : Starting/Ending macro definition S.P.
<1D>H<3A>H
59
46 GS B Specifying/Canceling the black/white S.P.
<1D>H<42>H<n>
60
inverted printing
47 GS H Selecting of printing position of HRI S.P.
<1D>H<48>H<n>
61
characters
48 GS I Sending the printer ID S.P.
<1D>H<49>H<n>
63
49 GS L Setting the left margin S*
<1D>H<4C>H<nL>
<nH>
64
50 GS P Specifying the basic calculation pitch S.P.
<1D>H<50>H<x>
<y>
66
(
1)<1D>H<56>H<m>
51 GS V Cutting the paper S.P.*
(2)<1D>H<56>H<m>
67
<n>
52 GS W Setting the print area width S.P.*
<1D>H<57>H<nL>
<nH>
68
53 GS \ Specifying the relative vertical position S.P.*
<1D>H<5C>H<nL>
70
of a character in PAGE MODE
<nH>
No.
Command
Function Mode Code Page
In the Mode column: S = STANDARD MODE, P = PAGE MODE
*shows the command affected by GS P.

— 3 —
Command relative to NV memory
<1C>H<67>H<33>
<m>H<a1>H<a2>H
62 FS g3
Writing data into the download user NV memory
S
<a3>H<a4>H<nL>H
89
<nH>H[<d>]nL+
(nH×256)
<1C>H<67>H<34>H
63 FS g4
Reading data from the download user NV memory
S.P.
<m>H<a1>H<a2>H
91
<a3>H<a4>H<nL>H
<nH>H
64 FS p Printing the download NV bit images S
<1C>H<70>H<n>
<m>
93
65 FS q Defining the download NV bit image S
<1C>H<71>H<n>H
95
No.
Command
Function Mode Code Page
No.
Command
Function Mode Code Page
In the Mode column: S = STANDARD MODE, P = PAGE MODE
*shows the command affected by GS P.
54 GS ^ Executing the macro S.P.
<1D>H<5E>H<n1>
71
<n2><n3>
55 GS a Enabling/Disabling ASB (Automatic Status S.P.
<1D>H<61>H<n>
72
Back)
56 GS f Selecting the font of HRI characters S.P.
<1D>H<66>H<n>
75
57 GS h Specifying the height of the bar code S.P.
<1D>H<68>H<n>
76
(1)<1D>H<6B>H<m>
58 GS k Printing the bar code S.P.
[d1...dk]NUL
77
(2)<1D>H<6B>H<m>
<n>[d1...dn]
59 GS r Sending status S.P.
<1D>H<72>H<n>
85
60 GS v0
<1D>H<76>H<30>H
Printing of raster bit image S
<m><xL><xH>
86
<yL><yH>[<d>]k
61 GS w Specifying the horizontal size S.P.
<1D>H<77>H<n>
88
(magnification) of bar code

— 4 —
1.2 Command Details
1.2.1 Descriptions of Each Item
XXXX
[Function] The name of a command.
[Code] The string of codes comprising the command is represented
by < >H for hexadecimal numbers, < >B for binary numbers,
and < > for decimal numbers, [ ] k denotes the number of
repetition of “k” times.
[Range] Indicates the values (setting range) of argumeuts of the
command.
Note: If values outside the defined domain specified with
control codes are used, malfunctions could possibly
occur, so be sure to use the values within the defined
domain.
[Outline] Describes the functions of the command.
[Caution] Describes important points and cautionary notes, as required.
[Default] Initial values for the command if it has arguments.
[Reference] Describes commands related to the command when it is used.
[Sample Program] Describes examples of coding on Quick-Basic.
Examples are only for reference. They may vary depending
on language and version. For details, please refer to a manual
in your language.
[Printing Result] Describes the print results obtained by executing the above
programs. However, the print results shown are different in scale
from actual print results.

— 5 —
1.2.2 Command Details
HT
[Function] Horizontal tab
[Code] <09>H
[Outline] Shifts the printing position to the next horizontal tab position.
• Ignored when the next horizontal tab position has not been
set.
[Caution] • The horizontal tab position is set by ESC D.
• The initial setting of horizontal tab positions is at intervals of
8 characters for font A at 9th, 17th, 25th, 33rd, columns.
[See Also] ESC D
[Sample Program]
[Printing Result]
← Initially set horizontal tab
←When set to the 4th, 8th, and 15th columns
LPRINT “0123456789012345678901”;
LPRINT CHR$(&HA);
LPRINT CHR$(&H9) + “AAA”;
LPRINT CHR$(&H9) + “BBB”;
LPRINT CHR$(&HA) ;
LPRINT CHR$(&H1B) + “D”;
LPRINT CHR$(3) + CHR$(7) + CHR$(14) + CHR$(0);
LPRINT CHR$(&H9) + “AAA”;
LPRINT CHR$(&H9) + “BBB”;
LPRINT CHR$(&H9) + “CCC” + CHR$(&HA) ;
END

— 6 —
LF
[Function] Printing and paper feed
[Code] <0A>H
[Outline] Prints data inside the print buffer and feeds paper based on the
line feed amount having been set.
• The head of the line becomes the next print starting position.
[See Also] ESC 2, ESC 3
[Sample Program]
[Print Results] AAA ← Print and line feed
BBB ← Print and line feed
← Line feed only
CCC ← Print and line feed
LPRINT “AAA” + CHR$(&HA) ;
LPRINT “BBB” + CHR$(&HA) ;
LPRINT CHR$(&HA) ;
LPRINT “CCC” + CHR$(&HA) ;
END

— 7 —
CR
[Function] Back to printing
[Code] <0D>H
[Outline] 1) When DSW-2 is OFF:
This command is ignored.
2) When DSW-2 is ON:
With data held inside the internal print buffer, printing and
line feed are performed.
Without data inside the internal print buffer, however, only
line feed is performed.
[See Also] LF
[Sample Program]
[Print Results] AAA ← Print and line feed
BBB ← Print and line feed
← Line feed only
CCC ← Print and line feed
LPRINT “AAA” + CHR$(&HD) ;
LPRINT “BBB” + CHR$(&HD) ;
LPRINT CHR$(&HD) ;
LPRINT “CCC” + CHR$(&HD) ;
END

— 8 —
FF
[Function] Printing in PAGE MODE and returning to STANDARD MODE
[Code] <0C>H
[Outline] Executes a batch printout of the data mapped in the entire print
area, and then returns to STANDARD MODE.
[Caution] • All mapped data is erased after printout.
• The print area set up by ESC W is initialized.
• This command does not execute a paper cut.
• After this command is executed, the beginning of the line is
taken as the start position for the next print.
• This command is only effective when the PAGE MODE is
selected.
[See Also] ESC FF, ESC L, ESC S

— 9 —
CAN
[Function] Canceling print data in PAGE MODE
[Code] <18>H
[Outline] Erases all data contained in the currently effective print area in
PAGE MODE.
[Caution] • This command is only effective when PAGE MODE is selected.
• If the previously established print area overlaps the currently
effective print area, the overlapped data in the previously
established area will be erased.
[See Also] ESC L, ESC W

— 10 —
DLE EOT n
[Function] Sending status in real-time
[Code] <10>H<04>H<n>
[Range] 1 n 4
[Outline] 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: Continuous paper detector status
[Caution] • Each status represents the current status. It is 1 byte data.
• The status is transferred without checking whether the host is
ready to receive or busy.
• This command is executed even if the printer is in offline state,
receive-buffer full state, or error state.
• This command is dealt with when it is received.
• If another data string of <10>H<04>H<n> (1 n 4) is
received, the printer acts the same way as with this command.
Therefore, the user should be reminded of this fact.
[Example 1]
Suppose a command “ESC * mnL nH [d1 ... dk]”, where d1 =
<10>H, d2 = <04>H, d3 = <01>H.
• The DLE EOT n command cannot be interleaved into the code
string of another command consisting of 2 bytes or more.
[Example 2]
If the printer sends DLE EOT 3 after the host has sent up to ESC
3 in its attempt to send ESC 3 n, the printer handles the ESC 3
as ESC 3 <10>H. Thus, the user should be cautious.
• If ASB (Automatic Status Back) is enabled by GS a, it is
necessary to discriminate between the status due to ASB and
the status due to this command.

— 11 —
(1) Printer status (When n = 1 is specified)
Bit Status Hex. Decimal
0 Unused 00 0
1 Unused 02 2
2 Unused 00 0
3Online status 00 0
Offline status 08 8
4 Unused 10 16
5 Undefined — —
6 Undefined — —
7 Unused 00 0
(2)
Status caused by an offline condition (When n = 2 is specified)
Bit Status Hex. Decimal
0 Unused 00 0
1 Unused 02 2
2Head-down 00 0
Head-up 04 4
Not in paper feed state triggered by 00 0
FEED switch
3In paper feed state triggered by FEED 08 8
switch
4 Unused 10 16
Printing is not stopped because of 00 0
“paper out” state
5Printing is stopped because of 20 32
“paper out” state
6Error not occurred 00 0
Error occurred 40 64
7 Unused 00 0
Bit 5: Printing is stopped if the paper end detector detects a
“paper out” state, or if the printer is out of paper when
the Paper Near-end Sensor is enabled by ESC c 4. At this
time, bit 5 = “1”.

— 12 —
(3) Status caused by an error (when n = 3 is specified)
Bit Status Hex. Decimal
0 Unused 00 0
1 Unused 02 2
2 Undefined — —
3Auto cutter error not occurred 00 0
Auto cutter error occurred 08 8
4 Unused 10 16
5Unrecoverable error not occurred 00 0
Unrecoverable error occurred 20 32
6Auto recovery error not occurred 00 0
Auto recovery error occurred 40 64
7 Undefined 00 0
Bit 3: If this error occurred because of a paper jam, for example,
remove the cause of the error, and then DLE ENQ n (1
n 2) can be used to recover from the error. However, it
is not possible to recover from any error due to a circuit
problem (e.g., broken wire).
Bit 6: If a head overheat error is detected, the printing is stopped
until the head temperature falls. At this time, bit 6 = “1”.
(4) Continuous paper detector status (When n = 4 is specified)
Bit Status Hex. Decimal
0 Unused 00 0
1 Unused 02 02
2,3
Paper found by Paper Near-end Sensor
00 0
Paper not found by Paper Near-end Sensor
0C 12
4 Unused 10 16
5,6 Paper found by Paper-end Sensor 00 0
Paper not found by Paper-end Sensor 60 96
7 Unused 00 0
[See Also] DLE ENQ, GS a, and GS r

— 13 —
DLE ENQ n
[Function] Real-time request to printer
[Code] <10>H<05>H<n>
[Range] 1 n 2
[Outline] The printer 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: The printer clears the receive buffer and the print buffer,
and then recovers from the error.
[Caution] • This command is only effective if an auto cutter error has
occurred.
• This command is dealt with when it is received.
• This command is also executed even if the printer is in a
receive-buffer full state.
• If another data string of <10>H<05>H<n> (1 n 2) is received,
the printer acts in the same way as with this command. The
user should, therefore, be reminded of this fact.
[Example 1]
If, for example, a command “ESC * m nL nH {d} k”, where d1 =
<10>H, d2=<05>H, d3=<01>H1, is given, the DLE ENQ n
command cannot be interleaved into the code string of another
command consisting of two bytes or more.
[Example 2]
• If the printer sends DLE ENQ 2 when the host has sent up to
ESC 3 in its attempt to send ESC 3 n, the printer treats the ESC
3 as ESC 3 <10>H. Thus, the user should be careful.
• Even if DLE ENQ 2 is executed, the settings made by, for
example, ESC ! and ESC 3 retain the conditions when the error
occurred. A combined use of this command and ESC @ can
completely initialize the printer.
[See Also] DLE EOT

— 14 —
ESC FF
[Function] Printing data in PAGE MODE
[Code] <1B>H<0C>H
[Outline] Executes a batch printout of the data mapped in the entire print
area in PAGE MODE.
[Caution] • This command is only effective when PAGE MODE is selected.
• Mapped data, as well as the ESC T and ESC W settings, and
the character mapping position are held even after printing.
[See Also] FF, ESC L, ESC S

— 15 —
ESC SP n
[Function] Setting the right spacing of the character
[Code] <1B>H<20>H<n>
[Range] 0 n 255
[Outline] Sets the right spacing of character to [n ×basic calculation pitch]
inches.
[Caution] • If the horizontal magnification of character is 2 or more, the
right spacing increases with the magnification.
• The right spacing can be set separately for the STANDARD
and PAGE MODES.
• The basic calculation pitch is set by GS P. Once defined, the
right spacing is not changed if the basic calculation pitch is
changed by GS P.
• Fractions resulting from calculation are corrected with the
minimum pitch of the mechanism, and the remainder is
omitted.
• In STANDARD MODE, this command uses the horizontal basic
calculation pitch (x).
• In PAGE MODE, the basic calculation pitch used by this
command depends on the start point:
(1) If the start point specified by ESC T is top left or bottom
right, the command uses the horizontal basic calculation
pitch (x).
(2) If the start point specified by ESC T is top right or bottom
left, the command uses the vertical basic calculation pitch
(y).
• The maximum right spacing is capable of approximately 31.906
mm (255/203 inches). A setting greater than this maximum is
trimmed to the maximum.
[Default] n = 0
[See Also] GS P

— 16 —
[Sample Program]
[Print Results] AAAAA ← 0-dot space
AAAAA ← 1-dot space
AAAAA← 12-dots space
LPRINT CHR$(&H1B) + “ ” + CHR$(0) ;
LPRINT “AAAAA” + CHR$(&HA) ;
LPRINT CHR$(&H1B) + “ ” + CHR$(1) ;
LPRINT “AAAAA” + CHR$(&HA) ;
LPRINT CHR$(&H1B) + “ ” + CHR$(12) ;
LPRINT “AAAAA” + CHR$(&HA) ;
END

— 17 —
ESC ! n
[Function] Collectively specifying the printing mode
[Code] <1B>H<21>H<n>
[Range] 0 n 255
[Outline] Printing mode is assigned.
Bit Function Value
01
0 Character Font Font A Font B
1 Undefined
2 Undefined
3 Emphasis Canceled Specified
4 Double height Canceled Specified
5 Double width Canceled Specified
6 Undefined
7 Underline Canceled Specified
[Caution] • With double height and double width being specified
simultaneously, quadruple characters are created.
• An underline is attached to the full character width, which,
however, is not attached to the part having been skipped by
the horizontal tab. Neither is it attached to 90 -right-turned
characters.
• The underline width is as specified by the <ESC –> command.
(The default setting is 1 dot width.)
• In case characters with different vertical magnification ratios
coexist on the same line, they are printed on the same base
line.
[Default] n = 0
[See Also] ESC E, ESC –, GS !

— 18 —
[Sample Program]
[Print Results] Font A
Font B
Font A + Emphasis
Font B + Emphasis + Quadruple + Underline
Font A + Underline
Font A + Double Width
Font A + Double Height
∨∨∨
LPRINT CHR$(&H1B) + “!” + CHR$(&H00) + “H” ;
LPRINT CHR$(&H1B) + “!” + CHR$(&H01) + “H” ;
LPRINT CHR$(&H1B) + “!” + CHR$(&H08) + “H” ;
LPRINT CHR$(&H1B) + “!” + CHR$(&H10) + “H” ;
LPRINT CHR$(&H1B) + “!” + CHR$(&H20) + “H” ;
LPRINT CHR$(&H1B) + “!” + CHR$(&HB9) + “H” ;
LPRINT CHR$(&HA) ;
END
∨∨ ∨∨
Other manuals for BD2-1220
1
This manual suits for next models
1
Table of contents
Other Citizen Controllers manuals

Citizen
Citizen BD2-1220 User manual

Citizen
Citizen CBM-909 Series User manual

Citizen
Citizen CBM-626 User manual

Citizen
Citizen BD2-2880 User manual

Citizen
Citizen CBM-202 Series User manual

Citizen
Citizen BD2-2890DD s User manual

Citizen
Citizen CBM-909PC SERIES User manual

Citizen
Citizen BD2-2880 Installation manual

Citizen
Citizen SA-SD User manual