Résumé du contenu de la page N° 1
Command Reference
MOBILE LINE THERMAL PRINTER
MODEL
CMP-10
Rev. 3.10 Revised on Dec 13, 2006
Résumé du contenu de la page N° 2
REVISION Rev. No. Date Comment Rev. 1.00 2002/11/15 Newly issued Rev. 1.01 2002/12/18 Revised P. 1, P. 2, P. 47, P. 54, P. 56, P. 59 Rev. 1.02 2003/01/17 Added Chapter 3 (Character Codes Table) and Chapter 4 Rev. 2.00 2003/06/30 Added ESC >, ESC l, FF (Firmware Ver. 1.95) Revised GS ) Added Chapter 5 to Chapter 10 Rev. 3.00 2006/07/13 Added baud rate 38400 at page of ESC S n and 5.1 (2) Added GS z Rev. 3.01 2006/08/31 Revised range of CODE128 on Page56 Rev. 3.10 2006/12/13 Added new Chapter 4. D
Résumé du contenu de la page N° 3
1. CMP-10 COMMAND SET Code Command Function Page 1 BEL Sounds the Buzzer 4 * 2HT Horizontal Tab Command 5 3LF Printing and Paper Feed Command 6 4CRPrint one line Command 7 * 5ESC RS Sounds the Buzzer 7 6 ESC SP Setting the right space amount of the character 8 7 ESC ! Collective Specifying Printing Mode 9 8 ESC $ Specifying the Absolute Positions 11 9 ESC % Specifying/Canceling Download Character Set 12 10 ESC & Define user characters 13 11 ESC * Specifying the Bit Image Mode 14 * 12 ESC + Swit
Résumé du contenu de la page N° 4
Code Command Function Page 44 GS H Selecting of Printing Position of HRI Code 46 45 GS L Setting the left margin 47 46 GS W Setting the print area width 48 47 GS ^ Executing the Macro 50 48 GS a Enabling/Disabling ASB (Automatic Status Back) 51 49 GS f Selecting the font of HRI characters 54 50 GS h Selecting the height of the Bar Code 55 51 GS k Printing the bar code 56 52 GS w Selecting the horizontal size (Scale factor) of the Bar Code 61 53 GS z Saving AT command sequences to send to Bluetoo
Résumé du contenu de la page N° 5
2. COMMAND DETAILS 2.1 Description of Items XXXX ALL [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
Résumé du contenu de la page N° 6
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 —
Résumé du contenu de la page N° 7
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. [See Also] ESC D [Sample Program] PRINT #1, “0123456789012345678901”; PRINT #1, CHR$ (&HA); PRINT #1, CHR$ (&H9) + “AAA”; PRINT #1, CHR$ (&H9)
Résumé du contenu de la page N° 8
LF [Function] Printing and Paper Feed Command [Code] <0A>H [Outline] 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. [See Also] ESC 2, ESC 3 [Sample Program] PRINT #1, “AAA” + CHR$ (&HA); PRINT #1, “BBB” + CHR$ (&HA); PRINT #1, CHR$ (&HA); PRINT #1, “CCC” + CHR$ (&HA); [Print Results] AAA ← Print and line feed BBB ← Print and line feed ← Line feed only CCC ← Print and line
Résumé du contenu de la page N° 9
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
Résumé du contenu de la page N° 10
ESC SP n [Function] Setting the right space amount of the character [Code] <1B>H<20>H [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. [Default] n = 0 [Sample Program] PRINT #1, CHR$ (&H1B) + “ “ + CHR$ (0); PRINT #1, “AAAAA” + CHR$ (&HA); PRINT #1, CHR$ (&H1B) + “ “ + CHR$ (1); PRINT #1, “AAAAA” + CHR$ (&HA); PRINT #1, CHR$ (&H1B) + “ “ + CHR$ (12);
Résumé du contenu de la page N° 11
ESC ! n [Function] Collective Specifying Printing Mode [Code] <1B>H<21>H [Range] {0 =< n =< FF(Hex)} [Outline] Printing mode is assigned. Value Bit Function 01 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 Each n bit indicates the following: [Caution] •With double height and double width being specified simultaneously, double wide and doub
Résumé du contenu de la page N° 12
> > > [Sample Program] PRINT #1, CHR$(&H1B) + “!” + CHR$(&H00) + “H” ; PRINT #1, CHR$(&H1B) + “!” + CHR$(&H01) + “H” ; PRINT #1, CHR$(&H1B) + “!” + CHR$(&H08) + “H” ; PRINT #1, CHR$(&H1B) + “!” + CHR$(&H10) + “H” ; PRINT #1, CHR$(&H1B) + “!” + CHR$(&H20) + “H” ; PRINT #1, CHR$(&H1B) + “!” + CHR$(&HB9) + “H” ; PRINT #1, CHR$(&HA) ; END [Print Results] Font A Font B Font A + Emphasis Font B + Emphasis + Quadruple + Underline Font + Underline Font A + Double Width Font A + Double Height — 10 — > >
Résumé du contenu de la page N° 13
> > > > > ESC $ n1 n2 [Function] Specifying the Absolute Positions [Code] <1B>H<24>H [Range] {0 =< n1 =< FF(Hex)} {0 =< n2 =< 1(Hex)} [Outline] The printing start position is specified in the number of dots (1/203 inch unit) from the beginning of line. • The number of dots is divided by 256, whose quotient is taken as n2 and the residual as n1. • Therefore, the printing start position is equal to n1 + n2 × 256 from the beginning of line. [Caution] Specifying beyond the line end is ignore
Résumé du contenu de la page N° 14
ESC % n [Function] Specifying/Canceling Download Character Set [Code] <1B>H<25>H [Range] {0 =< n =< FF(Hex)} [Outline] Specifying/canceling download characters. Further, only the lowest bit (n0) is valid for n. n (Hex) Function 0 Selecting download character set 1 Canceling download character set [Caution] This setting cannot be restored to initial value even with Initialize command or by turning power OFF. It can be restored to the initial value by ESC _, a command for returning to initial
Résumé du contenu de la page N° 15
ESC & m n1 n2 [d] k [Function] Define user characters [Code] <1B>H<26>H[]k [Range] {m = 0, 1, 2, 3(Hex)} {20 =< n1 =< FF(Hex)} {n1 =< n2 =< FF(Hex)} {k=(n2-n1+1)*48} (m=2) {k=(n2-n1+1)*16} (m=3) [Outline] Defines a group of user characters. 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 charact
Résumé du contenu de la page N° 16
ESC * m n1 n2 [d] k [Function] Specifying the Bit Image Mode [Code] <1B>H<2A>H [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 quoti
Résumé du contenu de la page N° 17
[Sample Program] PRINT #1, CHR$(&H1B) + “ * ”; PRINT #1, CHR$(0) + CHR$(20) + CHR$(0); IMG1: GOSUB IMG1 PRINT #1, CHR$(&HFF); PRINT #1, CHR$(&HA); FOR I=1 TO 18 PRINT #1, CHR$(&H1B + “ * ”; PRINT #1, CHR$(&H85); PRINT #1, CHR$(1) + CHR$(20) + CHR$(0); NEXT I GOSUB IMG1 PRINT #1, CHR$(&HFF); PRINT #1, CHR$(&HA); RETURN PRINT #1, CHR$(&H1B) + “ * ”; IMG2: PRINT #1, CHR$(32) + CHR$(20) + CHR$(0); PRINT #1, CHR$(&HFF); GOSUB IMG2 PRINT #1, CHR$(&HFF); PRINT #1, CHR$(&HA); PRINT #1, CHR$(&HFF); PRIN
Résumé du contenu de la page N° 18
This command has one more version. [Function] Specifying the Bit Image Mode (PCX format) [Code] <1B>H<2A>H{<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 10 Non-compressed dat
Résumé du contenu de la page N° 19
> > 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 [Range] {0 =< n =< 02(Hex)} [Outline] Specifying/canceling an underline. •Types of underlines by n value are shown below: n (Hex) Type 0 Canceling an underline. 1 Specifying an underline
Résumé du contenu de la page N° 20
>>> > > > ESC . [Function] Printer self test [Code] <1B>H<2E>H [Range] None [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. [Sample Program] PRINT #1,