Rev. 3.002006/07/13Added baud rate 38400 at page of ESC S n and 5.1 (2)
Rev. 3.012006/08/31Revised range of CODE128 on Page56
Rev. 3.102006/12/13Added new Chapter 4. Deleted [Remarks] on page 63.
Revised GS )
Added Chapter 5 to Chapter 10
Added GS z
1. CMP-10 COMMAND SET
CodeCommand FunctionPage
1BELSounds the Buzzer4
2HTHorizontal Tab Command5
3LFPrinting and Paper Feed Command6
4CRPrint one line Command7
5ESC RSSounds the Buzzer7
6ESC SPSetting the right space amount of the
character8
7ESC !Collective Specifying Printing Mode9
8ESC $Specifying the Absolute Positions11
9ESC %Specifying/Canceling Download Character Set12
10ESC &Define user characters13
11ESC *Specifying the Bit Image Mode14
12ESC +Switch OFF the printer17
13ESC –Specifying/ Canceling Underline17
14ESC .Printer self test18
15ESC 2Specifying 1/6-inch line feed rate18
16ESC 3Setting line feed rate of minimum pitch19
17ESC =Data Input Control20
18ESC >Saving current setting21
19ESC ?Reading magnetic stripe reader22
20ESC @Initializing the Printer23
21ESC DSetting Horizontal Tab Position24
22ESC ESpecifying/canceling highlighting25
23ESC GSpecifying/canceling Double Printing26
24ESC JPrinting and feeding paper n/203 inch27
25ESC RSelecting Code table27
26ESC SSetting serial interface communication speed28
27ESC TPrinting Diagnostic information28
28ESC VSpecifying/Canceling 90°-right- turned
Characters29
29ESC YSpecifying print density30
30ESC ZReturning diagnostic information31
31ESC \Specifying the relative positions34
32ESC _Setting the printer in default state34
33ESC `Returning the battery voltage and Printer
Head temperature35
34ESC aAligning the characters36
35ESC c5Enabling/Disabling Panel Switches37
36ESC dPrinting and Feeding the paper by n lines38
37ESC vTransmitting the printer status39
38ESC xSelecting the time interval for automatically
switching Off the printer40
39ESC {Specifying/Canceling the Inverted Characters41
40GS )Setting of printer flags42
41GS *Defining the Download Bit Image (LOGO)43
42GS /Printing the Download, Bit Image44
43GS :Starting/Ending Macro Definition45
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
— 1 —
CodeCommand FunctionPage
44GS HSelecting of Printing Position of HRI Code46
45GS LSetting the left margin47
46GS WSetting the print area width48
47GS ^Executing the Macro50
48GS aEnabling/Disabling
ASB (Automatic Status Back)51
49GS fSelecting the font of HRI characters54
50GS hSelecting the height of the Bar Code55
51GS kPrinting the bar code56
52GS wSelecting the horizontal size (Scale factor) of the Bar Code61
53GS zSaving AT command sequences to send to Bluetooth module62
54ESC lSpecify/canceling black mark function64
55FFPrinting and paper feeding to the black mark position64
* indicates a unique command or a non-compatible command.
*
*
— 2 —
2. COMMAND DETAILS
2.1 Description of Items
XXXXALL
[Function]Command Function
[Code]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.
[Range]Indicates an argument value (setting range) for the command in hexadecimal number
(partly in decimal number).
* When used for application other than defined in each control, an error may occur.
Always use in the defined range.
[Outline]Describes a command outline.
[Caution]Describes a caution as required.
[Default]Describes an initial value in hexadecimal number for the command when accompanied
by an argument.
[See Also]Describes the associated commands for use.
[Sample Program]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 manual for the language used.
— 3 —
BEL
[Function]Sounds the Buzzer
[Code]<07>H
[Outline]By executing this command the buzzer will beep.
This command functions in the same manner as ESC RS.
— 4 —
HT
[Function]Horizontal Tab Command
[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.
•Initial setting of the horizontal tab position is each 8 characters in 9th, 17th, 25th,
columns from FONT A.
AAA ←Print and line feed
BBB ←Print and line feed
←Line feed only
CCC ←Print and line feed
— 6 —
CR
[Function]Print one line Command
[Code ]<0D>H
[Outline]This command is ignored or its action is the same as LF depending on the last
execution of GS ) 2 command (FLAG SETTING COMMAND).
If Flag 2 is 0, carriage return (CR) command is ignored.
If Flag 2 is 1, CR comamnd will act as LF command.
[Default]CR command is ignored. If you want that it acts like LF command set flag 2 to 1 by
GS ) command.
[See Also]GS )
ESC RS
[Function]Sounds the Buzzer
[Code]<1B>H<1E>H
[Outline]By executing this command the buzzer will beep.
This command functions in the same manner as BEL.
— 7 —
ESC SP n
[Function]Setting the right space amount of the character
[Code]<1B>H<20>H<n>
[Range]{0 =< n =< 20(Hex)}
[Outline]The rightward space amount is set in dot unit (1/203 inch unit).
[Caution]The rightward space amount in doublewide mode is made double of the set volume.
m=0: Copy internal character set A to user character set A
(Parameters n1, n2 and d are omitted)
m=1: Copy internal character set B to user character set B
(Parameters n1, n2 and d are omitted)
m=2: For Font A (12 × 24), n1 denotes Start character code and n2 End character
code. Every character is 48 bytes, two bytes for each line. Only the first nibble
of the second byte is used.
m=3: Define character group with ASCII codes between >= n1 and =< n2 for character
set B (9 × 16). Every character is 16 bytes.
[Caution]The data for character set A is composed from left to right and from top to bottom
with two bytes for each horizontal line. The first byte contains the first 8 bits with
the left most bit is MSB. From the second byte only the first nibble (the most significant
4 bits) is valid.
The data for character set B is composed from left to right and from top to bottom
with only one byte for each horizontal line. The nineth bith is alawys 0.
Downloaded characters are valid even after switching off the printer or after issuing
Initialize command.
Download character
Font A (12 × 24)
(Last 4 bits are not used and fixed as zero.)
d1d2d1
d3d4d2
d5d6d3
d7d8d4
d9d10d5
24
Font B (9 × 16)
(9th dot is fixed as space.)
16
d14
d15
d16
d43
d45d46
d47d48
MSBLSB
d44
87654321
— 13 —
00
8 7654321
00
ESC * m n1 n2 [d] k
[Function]Specifying the Bit Image Mode
[Code]<1B>H<2A>H<m><n1><n2> [d] k
[Range]{m= 0, 1, 20, 21(Hex)}
{0 =< n1 =< FF(Hex)}
{0 =< n2 =< 1(Hex)}
{0 =< d =< FF(Hex)}
{k = n1 + FF(Hex) x n2} (m=0, 1(Hex)) Number of bytes containing image data
{k = (n1 + FF(Hex) x n2) x 3} (m=20, 21(Hex)) Number of bytes containing image data
[Outline]According to the number of dots specified in n1, n2, specify the bit image of mode m.
• The No. of dots printed is divided by 256, whose quotient is taken as n2 and residual
as n1.
•Bit image data is sent starting from the top to bootom and from the left to right
(vertical columns scanning). In modes m=0, and 1 only one byteper column is sent
and in mode m-20h, 21h 3 bytes for each column are sent.
•d is bit image data, the bits subject to printing are taken as “1” and those not as
“0”.
• The bit image modes specified by m are shown as follows:
[Function]Specifying the Bit Image Mode (PCX format)
[Code]<1B>H<2A>H<m><n>{<a><00>H} [d]k
[Range]{m= 10, 11 or 12(Hex)}
{0 =< n =< 30(Hex)}
{0 =< a =< 18(Hex)}
{0 =< d =< FF(Hex)}
{0 =< k =< n x 18(Hex)}
[Outline]Designates a bit image of n*8 dots horizontal by 24 or a dots vertical.
Dot density is fixed at 203 dpi both horizontally and vertically.
Bit image mode selected by the value of m is shown in the following table.
m (Hex)Type
10Non-compressed data of 24 dots vertical
(Argument “a” and 00(Hex) are not used.)
11Compressed data of 24 dots vertical
(Argument “a” and 00(Hex) are not used.)
12Compressed data of a dots vertical
n denotes the number of bytes for horizontal size of a bit image.
d denotes a graphic data.
In 10(Hex) mode, data is in n × 24 bytes.
For data in 11(Hex) mode, the size in non-compressed format shall be n × 24 bytes.
For data in 12(Hex) mode, the size in non-compressed format shall be n × a bytes.
Compression system in 11(Hex) and 12(Hex) is the same as that for PCX file format
(monochrome). The printer receives the compressed data, reproduces it in the
following format and prints as bit-image data.
AIf either of upper two bit of input byte is 0, the byte is treated as graphic data.
If both of upper two bit of graphic data to be printed are 0, it is necessary to send
the data to printer in “B” format described below.
B If both of upper two bit of input byte are 0, the remaining 6 bit specifies the times
the data is repeated. The number of times to be repeated is specified in 0-3F(Hex).
The byte follows this byte is treated as graphic data to be repeated.
Graphics data should line up from left to right and from top to bottom.
— 16 —
ESC +
[Function]Switch OFF the printer
[Code]<1B>H<2B>H
[Range]None
[Outline]This command is used for switching off the printer from the host.
Sending this command causes the same operation as that by setting the power switch
to off.
ESC – n
[Function]Specifying/ Canceling Underline
[Code]<1B>H<2D>H<n>
[Range]{0 =< n =< 02(Hex)}
[Outline]Specifying/canceling an underline.
•Types of underlines by n value are shown below:
n (Hex)Type
0Canceling an underline.
1Specifying an underline for 1-dot width.
2Specifying an underline for 2-dots width.
[Caution]• 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.
[Outline]Prints test page, downloaded bit image, and self-diagnostic information. The self-
diagnostic information includes print density, print head temperature, battery voltage,
Serial or IrDA interface, baud rate, and memory switch setting.
[See Also]ESC T
ESC 2
[Function]Specifying 1/6-inch line feed rate
[Code]<1B>H<32>H
[Outline]The line feed rate per line is specified by 1/6 inch.
[Outline]This command saves International character, Serial port baud rate, Print density, Auto
power off time and maximum speed at Infrared communication to NV memory so
that the setting can be resumed automatically when power on after setting data on
RAM memory is gone by like battery is disconnected.
n (Hex)Type
0Max speed at Infrared communication is 115200 bps.
1Max speed at Infrared communication is 57600 bps.
[Caution]Do NOT use this command frequently.
NEVER turn the printer off during command is running. Otherwise there is a risk to
lose the firmware updating function.
Power is turned off automatically when setting is saved.
[Default]n = 0
[See Also]ESC R, ESC S, ESC Y, ESC x
— 21 —
ESC ? n
[Function]Reading magnetic stripe reader
[Code]<1B>H<3F>H<n>
[Range]{0 =< n =< 7(Hex)}
[Outline]When the command is received the bicolor LED is shining in RED and the printer is
waiting for the magnetic card to be swiped through the reader. If even after 10
seconds the card is not swiped the command is aborted automatically.
Printer returns the information read from the tracks followed by 00(Hex).
Reads the data of the track in the following table by the value of n.
n (Hex)Track
0Invalid
1Track 1
2Track 2
3Track 1 and 2
4Track 3
5Invalid
6Track 2 and 3
7Invalid
The format of the data read is as follows.
TrackHeaderCard dataFooter
TrackTrack 1 is F1 (Hex)
Track 2 is F2 (Hex)
Track 3 is F3 (Hex)
HeaderTrack 1: “%”
Track 2: “;”
Track 3: “+” or “;”
Card dataASCII data
Footer“?”
If reading track is more than one (n=3 or 6), footer data of track 1 or 2 is followed by
track data of track 2 or 3.
[Caution]The command for reading multiple tracks at a time may often result in read error.
If reading is unsuccessful, repeat it.
— 22 —
Loading...
+ 56 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.