CITIZEN BD2-3890 Reference Guide

CONTROL BOARD FOR MLT-288/MLT-289
CONTROL BOARD FOR MLT-388/MLT-389
MODEL
MODEL
Rev. 1.01 Newly Issued on December 15th, 2005
BD2-2880/2890 BD2-3880/3890

REVISION

Rev. No. Date Content
0.00 2002.07.02 Newly authored
0.01 2003.06.10 2-34 Range changed.
1.00 2003.06.23 First version as 1.00.
1.01 2005.12.15 Numbers of reference page changed.
BD2-2880 command part modified.
2-37 Ranges of CODE39/ITF/CODABAR/CODE128 changed.
2-40 Ranges of CODE39/ITF/CODABAR/CODE128 changed.
i

1. PRINT CONTROL FUNCTIONS

1.1 Command List

Print Control Commands
BD2-3880/3890 Command Reference
Control Code
LF
CR ESC J ESC d
Printing and paper feed Print command Printing and feeding paper n/203 inch Printing and feeding the paper by n lines
Print Character Commands
Control Code
ESC SP
ESC ! ESC % ESC &
ESC –
ESC E
ESC G
ESC R
ESC V
ESC t
ESC {
Setting the right space amount of the character Collective specifying printing mode Specifying/canceling douwnload character set Defining download characters
Specifying/canceling underline Specifying/canceling highlighting Specifying/canceling double printing Selecting the international character set Specifying/Canceling 90°-right- turned Characters Selecting the character code table Specifying/canceling the inverted characters
Function Code Page
0Ah 0Dh 1Bh4Ah n 1Bh64h n
Function Code
1Bh20h n 1Bh21h n 1Bh25h n 1Bh26h s n m [ap1...ps×a]m–n+1 1Bh2Dh n 1Bh45h n 1Bh47h n 1Bh52h n 1Bh56h n 1Bh74h n 1Bh7Bh n
5 6 7 8
Page
9 10 12
13
15 16 17 18 19 20 21
Print Position Commands
Control Code
HT
ESC $
ESC D
ESC
ESC a
/
Horizontal tab command Specifying the absolute positions Setting horizontal tab position Specifying the relative positions Aligning the characters
Line Feed Span Commands
Control Code
ESC 2 ESC 3
Specifying 1/6-inch line feed rate Setting line feed rate of minimum pitch
Function Code
09h 1Bh24Ah n1 n2 1Bh44[n]k 00h 1Bh 5C n1 n2 1Bh 61h n
Function Code
1Bh 32h 1Bh 33h n
1
Page
22 23 24 25 26
Page
27 28
Bit Image Commands
BD2-3880/3890 Command Reference
Control Code
ESC *
GS *
GS /
Specifying the bit image mode
Defining the download, bit image
Printing the download, bit image
Status Command
Control Code
ESC v 1Bh 76h
Transmitting the printer status (Serial type)
Panel Switch Command
Control Code
ESC c5 1Bh 63h 35h n
Enabling/disabling the panel switches
Macro Commands
Control Code
Function Code
1Bh 2Ah m n1 n2[d]k
1Dh 2Ah n1 n2
1Dh 2F
Function Code
Function Code
Function Code
Page
29
31
33
Page
34
Page
35
Page
GS :
GS ^
Starting/ending macro definition
Executing the macro
Cutter Commands
Control Code
ESC i
ESC m
Activating auto cutter (Full cut)
Activating auto cutter (Partial cut)
Bar Code Commands
Control Code
GS H
GS f
GS h
GS k
GS w
Selecting of print position of HRI code
Selecting the font of HRI code
Selecting the height of the bar code
Printing the bar code
Selecting the horizontal size (scale factor) of bar code
1Bh 63h 35h n
1Dh 5Eh n1 n2 n3
Function Code
1Bh 69h
1Bh 6Dh
Function Code
1Dh 48H n
1Dh 66H n
1Dh 68H n
1Dh 6Bh n[‘d’]k 00h (1)
1Dh 6Bh m n[d1...dn] (2)
1Dh 77H n
36
37
Page
38
39
Page
40
41
42
43
47
52
2
Other Commands
BD2-3880/3890 Command Reference
Control Code
ESC =
ESC @
DC2 A
NOP Commands
Control Code
ESC c 3
ESC c 4
ESC p
ESC u
Function Code
Data input control
Initializing the Printer
Selecting the Print drive system
Function Code
NOP
NOP
NOP
NOP
1Bh 3Dh n
1Bh 40h
12h 41h n
Page
53
54
55
Page
3
BD2-3880/3890 Command Reference

1.2 Command Details

1.2.1 Description of Items

XXXX ALL
[Function]
Command Function
[Code]
[Range]
[Outline]
[Caution]
[Default]
[See Also]
[Sample Program]
used, version, and so on. For details, see the ma
Describes an argument value(setting range) for the command.
Describes a command outline.
Describes a caution as required.
Describes an initial value for the command when accompanied by an argument.
Describes the associated commands for use.
A sequence of code constituting a command is represented in hexadecimal number for < >H, binary number for < >B, and decimal number for < >, respectively; [ ]k represents a repeat count of k-times.
Describes a coding example in the Q-BASIC sample program.
* This example is only for your reference and differs depending on the language
nual for the language used.
4
LF
BD2-3880/3890 Command Reference
[Function]
[Code]
[Outline]
[See Also]
[Sample Program]
[Print Results]
Printing and Paper Feed Command
<0A>H
Prints data inside the input buffer and feeds lines based on the line feed amount having been set.
The head of the line becomes the next print starting position.
ESC 2, ESC 3
LPRINT "AAA" + CHR$ (&HA);
LPRINT "BBB" + CHR$ (&HA);
LPRINT CHR$ (&HA);
);
LPRINT "CCC" + CHR$ (&HA
Print and line feed
Print and line feed Line feed only
Print and line feed
5
CR
BD2-3880/3890 Command Reference
[Function]
[Code]
[Outline]
Print Command
<0D>H
1) When DS 1-2 is OFF:
This command is ignored.
2) When DS 1- 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, no printing is performed.
[See Also]
LF
[Sample Program]
LPRINT "AAA" + CHR$ (&HD);
LPRINT "BBB" + CHR$ (&HD);
LPRINT CHR$ (&HD);
LPRINT "CCC" + CHR$
[Print Results]
(&HD);
Print and line feed
Print and line feed Line feed only
Print and line feed
6
ESC J n
BD2-3880/3890 Command Reference
[Function]
[Code]
[Range]
[Outline]
Printing and feeding paper n/203 inch
<1B>H<4A>H<n>
{0 =< n =< FF} Data is described in Hex code.
Prints data inside the print buffer and feeds paper by n/360 inch. Since an actual mechanical
pitch is 1/203 inch, it is internally converted approximate to the value specified with this
command.
[Sample Program]
See Sample Program and Print Results for ESC 2 on Page
Specified volume does not remain.
The beginning of the line is to be considered as the next printing start position.
Initial value is not defined.
[Print Results]
48.
7
ESC d n
BD2-3880/3890 Command Reference
[Function]
[Code]
[Range]
[Outline]
Printing and Feeding the paper by n lines
<1B>H<64>H<n>
* {0 =< n =< FF} Data is described in Hex code.
Prints data inside the buffer and feeds paper by n lines.
[Default]
[Sample Program]
LPRINT "AAAAA"
LPRINT CHR$ (&H1B) + "d" + CHR$ (2);
LPRINT "AAAAA" + CHR$ (&HA);
[Print Results]
Specified line does not remain.
The beginning of the line is to be considered as the next printing start position.
The initial value is not defined.
2/6-inch line feed
8
ESC SP n
BD2-3880/3890 Command Reference
[Function]
[Code]
[Range]
Setting the right space amount of the character
<1B>H<20>H<n>
{0 =< n =< 20} (MLT-2880) Data is described in Hex code. {0 =< n =< 30} (MLT-38x0) Data is described in Hex code.
[Outline]
[Caution]
[Default]
The rightward space amount is set in dot unit (1/203 inch unit). In the initial value, it is n=0.
The rightward space amount in doublewide mode is made double of the set volume.
n = 0
[Sample Program]
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);
[Print Results]
0-dot space
1-dot space
12-dot space
9
ESC ! n
BD2-3880/3890 Command Reference
[Function]
[Code]
[Range]
[Outline]
[Caution]
Collective Specifying Printing Mode
<1B>H<21>H<n>
{0 =< n=< FF} Data is described in Hex code.
Printing mode is assigned. Each n bit indicates the following:
Va lu e
Bit Function 0 1
0 Character Font Font A Font B 1 Undefined 2 Undefined 3 High-lighting Canceled Specified 4 Double height Canceled Specified 5 Double width Canceled Specified 6 Undefined 7 Underline Canceled Specified
With double height and double width being specified simultaneously, double wide and
[Default]
[See Also]
double high characters are consisted.
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 having been specified by <ESC ->.
(The default setting is 1 dot width. )
Specification with this command is invalid to Kanji, except specification and cancellation
of highlighting
In case that double wide character and normal character exist in same one line, the layout
of underline is consistent one.
n = 0
ESC E, ESC
10
[Sample Program]
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$ (&H80) + "H";
LPRINT CHR$ (&H1B) + " ! " + CHR$ (&HB9) + "H";
LPRINT CHR$ (&HA);
[Print Results]
BD2-3880/3890 Command Reference
Font A Font B Font A + Highlighting
Font B + Highlighting + Quadruple + Underline Font A + Underline Font A + Double Width Font A + Double Height
11
ESC % n
BD2-3880/3890 Command Reference
[Function]
[Code]
[Range]
[Outline]
Specifying/Canceling Download Character Set
<1B>H<25>H<n>
{0 =< n =< FF} data is described in Hex code.
Specifying/canceling download characters.
Further, only the lowest bit (n0) is valid for n.
The lowest bit (n0) indicates the following.
[Caution] [Default] [See Also]
Download characters and download bit images cannot be defined simultaneously.
n = 0
ESC &
[Sample Program]
GOSUB SETCHR DATA 6
LPRINT CHR$ (&H1B) + "%" + CHR$ (0); DATA &HFF, &H80, &H00
LPRINT "@A" + CHR$ (&HA); DATA &H80, &H80, &H00
LPRINT CHR$ (&H1B) + "%" + CHR$ (1); DATA &H80, &H80, &H00
LPRINT "@A" + CHR$ (&HA); DATA &H80, &H80, &H00
END DATA &HFF, &HFF, &HFF
SETCHR: DATA &HFF, &HFF, &HFF
LPRINT CHR$ (&H1B) + "&”; DATA 12
LPRINT CHR$ (3) + "@" + "A”; DATA &HFF, &HFF, &HFF
FOR J=1 TO 2 DATA &H80, &H07, &HF9
READ REP DATA &H80, &HFF, &HF9
LPRINT CHR$ (REP); DATA &H87, &HFE, &H01
FOR I=1 TO REP*3 DATA &H9F, &H06, &H01
READ D DATA &HF8, &H06, &H01
LPRINTCHR$ (D); DATA &HF8, &H06, &H01
NEXT I DATA &H9F, &H06, &H01
NEXT J DATA &H87, &HFE, &H01
RETURN DATA &H80, &HFF, &HF9
[Print Results]
n0 Function
0 Canceling download character set 1 Specifying download character set
DATA &H80, &H07, &HF9
DATA &HFF, &HFF, &HFF
@A
Internal Character Set
A
Download Character
12
BD2-3880/3890 Command Reference
ESC & s n m [a [p] s a] m – n +1
[Function]
[Code]
[Range]
[Outline]
Defining Download Character
<1B>H<26>H<s><n><m> [<a><p1><p2><ps a>]m-n+1
{s = 03}
{20 (Hex) =< n =< m =< 7E (Hex)}
{0 =< a =< 0C(Hex)} (Font A)
{0 =< a =< 09(Hex)} (F ont B)
Defines the font of download characters of alphanumeric characters.
"s" indicates the number of bytes in vertical direction.
"n" indicates the start character code and m the end character code. To define only one character,
set n=m.
Character codes definable includes 95 ASCII codes in total between <20>H~<7E>H.
"a" indicates the number of dots in horizontal direction for definition.
"p" is the data to be defined, which indicate a pattern equal to "a" dot in horizontal direction from
×
×
[Caution]
[Default]
the left end. The rest of the pattern on the right side is filled with space.
The rest of data to be defined is s x a.
Download characters thus defined remain valid until redefinition, ESC @ execution,
GS * execution, or power OFF is practiced.
Download characters and download bit images can not be defined simultaneously.
Running this command clears the definition of the download bit image.
Same
as the internal character set
13
[Example]
BD2-3880/3890 Command Reference
9 dot
p4
p5
p6 p27
FONT B
p25
p26
24 dot
12 dot
p1
p4
p2
p5
p3
p6 p36
FONT A
p34
p35
MSB
LSB
24 dot
p1
p2
p3
Create each data bit by setting "1" for a printed dot and "0" for an unprinted dot.
[Sample Program]
[Print Results]
See Sample Program and Print Results for ESC % on Pa
ge 33.
MSB
LSB
14
ESC – n
BD2-3880/3890 Command Reference
[Function]
[Code]
[Range]
[Outline]
[Caution]
[See Also]
Specifying/ Canceling Underline
<1B>H<2D>H<n>
{0 =< n =< 02} data is described in Hex code.
Specifying/canceling an underline.
Types of underlines by n value are shown below:
n (Hex) Type
0 Canceling an underline. 1 Specifying an underline for 1-dot width. 2 Specifying an underline for 2-dots width.
An underline is attached to the full character width. It is, however, not attached to
the part having been skipped by horizontal tab command.
An underline is not attached to a 90 °- right-turned characters.
Specification/cancellation with this command is invalid to Kanji.
ESC !, FS
[Sample Program]
LPRINT CHR$ (&H1B) + "–" + CHR$ (0);
LPRINT "AAAAA" ;
LPRINT CHR$ (&H1B) + "
LPRINT "AAAAA" + CHR$ (&HA);
[Print Re
sults]
Underline Canceled
Underline Specified
" + CHR$ (1);
15
ESC E n
BD2-3880/3890 Command Reference
[Function]
[Code]
[Range]
[Outline]
[Caution]
[See Also]
Specifying/canceling highlighting
<1B>H<45>H<n>
{0 =< n =<FF} Data is described in Hex code.
Specifying/canceling the highlighting characters.
"n" is valid only for the lowest bit (n0).
Control by the lowest bit (n0) is shown as follows:
n0 Type
0 Canceling highlighting. 1 Specifying highlighting.
This is effective to all characters.
Dot configuration of a highlighted character includes one extra dot added at its side.
The print result of Double printing and highlight character printing is completely same.
ESC !
[Sample Program]
LPRINT CHR$ (&H1B) + "E" + CHR$ (0);
LPRINT "AAABBB" + CHR$ (&HA);
LPRINT CHR$ (&H1B) + "E" + CHR$ (1);
LPRINT "AAABBB" + CHR$ (&HA);
[Print Results]
Highlighting canceled
Highlighting canceled
16
Loading...
+ 42 hidden pages