Citizen BD2-2880, BD2-3880, BD2-3890, BD2-2890, MLT-388 Command Reference Manual

...
CONTROL BOARD FOR MLT-288/MLT-289
CONTROL BOARD FOR MLT-388/MLT-389
MODEL
BD2-2880/2890
MODEL
BD2-3880/3890
Rev. 1.01 Newly Issued on December 15th, 2005
Command Reference
i
REVISION
Rev. No. Date Content
0.00 2002.07.02 Newly authored
BD2-2880 command part modified.
0.01 2003.06.10 2-34 Range changed.
2-37 Ranges of CODE39/ITF/CODABAR/CODE128 changed.
2-40 Ranges of CODE39/ITF/CODABAR/CODE128 changed.
1.00 2003.06.23 First version as 1.00.
1.01 2005.12.15 Numbers of reference page changed.
BD2-3880/3890 Command Reference
1
1. PRINT CONTROL FUNCTIONS
1.1 Command List
Print Control Commands
Print Character Commands
Print Position Commands
Line Feed Span Commands
LF
CR ESC J ESC d
0Ah 0Dh 1Bh4Ah n 1Bh64h n
5 6 7 8
Control Code
Printing and paper feed Print command Printing and feeding paper n/203 inch Printing and feeding the paper by n lines
Function Code Page
HT ESC $
ESC D
ESC
ESC a
09h 1Bh24Ah n1 n2 1Bh44[n]k 00h 1Bh 5C n1 n2 1Bh 61h n
Control Code
Horizontal tab command Specifying the absolute positions Setting horizontal tab position Specifying the relative positions Aligning the characters
Function Code
22 23 24 25 26
Page
/
ESC 2 ESC 3
1Bh 32h 1Bh 33h n
Control Code
Specifying 1/6-inch line feed rate Setting line feed rate of minimum pitch
Function Code
27 28
Page
ESC SP
ESC ! ESC % ESC &
ESC –
ESC E ESC G
ESC R
ESC V
ESC t
ESC {
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
Control Code
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
9 10 12
13
15 16 17 18 19 20 21
Page
BD2-3880/3890 Command Reference
2
Bit Image Commands
Status Command
Panel Switch Command
Macro Commands
Cutter Commands
Bar Code Commands
ESC *
GS *
GS /
1Bh 2Ah m n1 n2[d]k
1Dh 2Ah n1 n2
1Dh 2F
Control Code
Specifying the bit image mode
Defining the download, bit image
Printing the download, bit image
Function Code
29
31
33
Page
ESC v 1Bh 76h
Control Code
Transmitting the printer status (Serial type)
Function Code
34
Page
ESC c5 1Bh 63h 35h n
Control Code
Enabling/disabling the panel switches
Function Code
35
Page
GS :
GS ^
1Bh 63h 35h n
1Dh 5Eh n1 n2 n3
Control Code
Starting/ending macro definition
Executing the macro
Function Code
36
37
Page
ESC i
ESC m
1Bh 69h
1Bh 6Dh
Control Code
Activating auto cutter (Full cut)
Activating auto cutter (Partial cut)
Function Code
38
39
Page
GS H
GS f
GS h
GS k
GS w
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
Control Code
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
Function Code
40
41
42
43
47
52
Page
BD2-3880/3890 Command Reference
3
Other Commands
NOP Commands
ESC =
ESC @
DC2 A
1Bh 3Dh n
1Bh 40h
12h 41h n
Control Code
Data input control
Initializing the Printer
Selecting the Print drive system
Function Code
53
54
55
Page
ESC c 3
ESC c 4
ESC p
ESC u
Control Code
NOP
NOP
NOP
NOP
Function Code
Page
BD2-3880/3890 Command Reference
4
1.2 Command Details
1.2.1 Description of Items
XXXX ALL
Command Function
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 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.
Describes a coding example in the Q-BASIC sample program.
* This example is only for your reference and differs depending on the language
used, version, and so on. For details, see the ma
nual for the language used.
[Function]
[Code]
[Range]
[Outline]
[Caution]
[Default]
[See Also]
[Sample Program]
BD2-3880/3890 Command Reference
5
LF
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
[Print Results]
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
[Function]
[Code]
[Outline]
[See Also]
[Sample Program]
BD2-3880/3890 Command Reference
6
CR
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.
LF
LPRINT "AAA" + CHR$ (&HD);
LPRINT "BBB" + CHR$ (&HD);
LPRINT CHR$ (&HD);
LPRINT "CCC" + CHR$
(&HD);
Print and line feed
Print and line feed Line feed only
Print and line feed
[Function]
[Code]
[Outline]
[See Also]
[Sample Program]
[Print Results]
BD2-3880/3890 Command Reference
7
ESC J n
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.
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.
See Sample Program and Print Results for ESC 2 on Page
48.
[Function]
[Code]
[Range]
[Outline]
[Sample Program]
[Print Results]
BD2-3880/3890 Command Reference
8
ESC d n
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.
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.
LPRINT "AAAAA"
LPRINT CHR$ (&H1B) + "d" + CHR$ (2);
LPRINT "AAAAA" + CHR$ (&HA);
2/6-inch line feed
[Function]
[Code]
[Range]
[Outline]
[Default]
[Sample Program]
[Print Results]
BD2-3880/3890 Command Reference
9
ESC SP n
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.
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
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);
0-dot space
1-dot space
12-dot space
[Function]
[Code]
[Range]
[Outline]
[Caution]
[Default]
[Sample Program]
[Print Results]
BD2-3880/3890 Command Reference
10
ESC ! n
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
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
[Function]
[Code]
[Range]
[Outline]
[Caution]
[Default]
[See Also]
BD2-3880/3890 Command Reference
11
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);
Font A Font B Font A + Highlighting
Font B + Highlighting + Quadruple + Underline Font A + Underline Font A + Double Width Font A + Double Height
[Sample Program]
[Print Results]
BD2-3880/3890 Command Reference
12
ESC % n
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.
n0 Function
0 Canceling download character set 1 Specifying download character set
Download characters and download bit images cannot be defined simultaneously.
n = 0
ESC &
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
DATA &H80, &H07, &HF9
DATA &HFF, &HFF, &HFF
Internal Character Set
Download Character
[Function]
[Code]
[Range]
[Outline]
[Caution] [Default] [See Also] [Sample Program]
[Print Results]
@A
A
BD2-3880/3890 Command Reference
13
ESC & s n m [a [p] s a] m – n +1
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
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
×
×
[Function]
[Code]
[Range]
[Outline]
[Caution]
[Default]
BD2-3880/3890 Command Reference
14
[Example]
Create each data bit by setting "1" for a printed dot and "0" for an unprinted dot.
[Print Results]
See Sample Program and Print Results for ESC % on Pa
ge 33.
[Sample Program]
p1
p2
p3
p4
p5
p6 p36
p35
p34
12 dot
MSB
LSB
24 dot
p1
p2
p3
p4
p5
p6 p27
p26
p25
MSB
LSB
FONT A
FONT B
9 dot
24 dot
BD2-3880/3890 Command Reference
15
ESC – n
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
LPRINT CHR$ (&H1B) + "–" + CHR$ (0);
LPRINT "AAAAA" ;
LPRINT CHR$ (&H1B) + "
" + CHR$ (1);
LPRINT "AAAAA" + CHR$ (&HA);
[Print Re
sults]
Underline Canceled
Underline Specified
[Function]
[Code]
[Range]
[Outline]
[Caution]
[See Also]
[Sample Program]
BD2-3880/3890 Command Reference
16
ESC E n
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 !
LPRINT CHR$ (&H1B) + "E" + CHR$ (0);
LPRINT "AAABBB" + CHR$ (&HA);
LPRINT CHR$ (&H1B) + "E" + CHR$ (1);
LPRINT "AAABBB" + CHR$ (&HA);
Highlighting canceled
Highlighting canceled
[Function]
[Code]
[Range]
[Outline]
[Caution]
[See Also]
[Sample Program]
[Print Results]
Loading...
+ 42 hidden pages