background image

 

                               13                                                                       14 

Chapter 3  Print Control Command 

 
 
3.

1

 Command Introduction 

 

TP UP-PH portable thermal printer provides a set of print 

control commands compatibale ESC/POS. 
    The format of command description is following: 
 

Control Code                               Function 

Format:       ASCII:  ASCII character sequence 
               Decimal:   Decimal number sequence 
        Hexadecimal:   Hexadecimal number sequence 

Explanation: 
    Explain the function and of the command and method of 
usage. 
Example: list some program example for understanding the 
command usage more easily. 
 

3

33

3 .2

.2

.2

.2 Paper Feed 

LF  

                Print and line feed 

Format:        ASCII:   LF 

Decimal:   10 

Hexadecimal:   0A 

Explanation: 
    Print content in line buffer and feed paper one line. If line 
buffer is empty, feed one line only.  
 

ESC J                Print and feed paper n dotline 

Format:       ASCII:   ESC   J     n 
                Decimal:   27    74    n 
         Hexadecimal:   1B    4A    n 

Explanation: 

Print content in line buffer and feed paper n dotline(1/203 

inch) as shown as following figure. 

The function of the command is valid only in current line. 
 

 

 

3

33

3 .3

.3

.3

.3 Line Space Setting 

ESC 2               Set line space in default value 

Format:        ASCII:  ESC   2 

Decimal:  27    50 

 

 

  Hexadecimal:  1B    32 

Explanation: 

Set line space in 30 dotline(default value). 

  

ESC 3        Set line space in n dotline(

1

/203 inch) 

Format:        ASCII:  ESC   3     n 
                 Decimal:  27    51    n 
          Hexadecimal:  1B    33    n 

Explanation: 

Set line space in n dotline(1/203 inch) as shown as following 

figure. n=0–255. Default n=30. 
 

 

 

 
 

 

Содержание UP-PH

Страница 1: ...P P P PH H H H Portable Thermal Portable Thermal Portable Thermal Portable Thermal Printer Printer Printer Printer User User User User s Manual s Manual s Manual s Manual Beta version Beta version Be...

Страница 2: ...eatures as following Structure for easy paper loading Rechargeable battery pack for quick replacing and portability IrDA infrared interface for easy interfacing and communication wireless Built in Chi...

Страница 3: ...ESC 2 Set 1 6 line space ESC 3 n Set n dot line space ESC Set bit map graphics ESC n Select user defined character ESC s n m a p sxa m n 1 Define user defined character ESC k n1 n1 nk nk CR Print cur...

Страница 4: ...g side close edge left or right with a height 5mm and width 15mm Reflectivity of black mark should be less than 10 and the others should be more than 90 1 10 Power Supply DC 6V 1500mAh rechargeable ba...

Страница 5: ...able battery is packed with TP UP PH printer It can be installed and locked on the bottom of the printer Slow charging is used by a DC12V 600mA adaptor packed When the plug of the adaptor is inserted...

Страница 6: ...ion 2 5 1 Serial Interface Connection TP UP PH portable printer provides a RS 232 serial port socket 6PIN RJ 11 modular jack 1 RJ 11 Pin Alignment Figure 2 4 RJ 11 Pin Alignment 2 Serial Port Signal D...

Страница 7: ...tors and Buttons Figure 2 7 Error indicator flash mode TP UP PH has two buttons ON and LF Their functions are following 1 Power on press button ON and release it until green indicator lights That mean...

Страница 8: ...10 Hexadecimal 0A Explanation Print content in line buffer and feed paper one line If line buffer is empty feed one line only ESC J Print and feed paper n dotline Format ASCII ESC J n Decimal 27 74 n...

Страница 9: ...Bit Function 0 1 0 Not defined 1 Not defined 2 Not defined 3 Not defined 4 Double height Off On 5 Double width Off On 6 Not defined 7 Not defined Default n 0 i e normal character size 3 5 User Defined...

Страница 10: ...printing mode m 0 1 32 or 33 n1 0 255 n2 0 1 d 0 255 k n1 256 n2 m 0 1 k n1 256 n2 3 m 32 33 The number of the horizontal dots is n1 256 n2 The maximunm number of the horizontal dots is shown as belo...

Страница 11: ...2 J NEXT J FOR J 0 TO 7 PRINT 1 CHR 2 J CHR 2 J CHR 2 J NEXT J NEXT I PRINT 1 CHR 10 NEXT K The printout after executed the program is shown as below GS Set download bit map graphic Format ASCII GS n1...

Страница 12: ...n1 nk nk CR Decimal 27 39 k n1 n1 nk nk 13 Hexadecimal 1B 27 k n1 n1 nk nk 0D Explanation The command is used to print curving graphics The value of k is the number of curves to be printed K 1 255 In...

Страница 13: ...ion n 0 disable the compensation function Default n 0 3 7 Other Control Commands ESC Initialize printer Format ASCII ESC Decimal 27 64 Hexadecimal 1B 40 Explanation The command is used to initialize t...

Страница 14: ...eight of the barcode to be printed 1 n 2 5 5 n i s t h e n u mb e r o f t h e v e r t i c a l d o t s D e fa u l t n 6 0 GS k Print barcode stripe Format ASCII GS k m d k NUL Decimal 29 107 m d k 0 He...

Страница 15: ...CODE128 are 2 cell barcode system 3 10 Black Mark Detecting GS FF Detect black mark and feed to next page top Format ASCII GS FF Decimal 29 12 Hexadecimal 1D 0C Explanation This command is valid only...

Страница 16: ...u Mu Must st st st remember don remember don remember don remember don t use sandpaper knife or t use sandpaper knife or t use sandpaper knife or t use sandpaper knife or screwdriver to scrape the pri...

Страница 17: ...After power off press and hold button ON more than 10 seconds until the both of red and green indicator light the printer enters into discharging state and cann t do any operations When the both of in...

Страница 18: ...acters in Code A There is no SHIFT character in Code C The character for selecting code set CODE A CODE B and CODE C The character can implement convertion between Code A B and C each other Function c...

Страница 19: ...52 U U 53 55 53 V V 54 56 54 W W 55 57 55 X X 56 58 56 Y Y 57 59 57 Z Z 58 5A 58 Code A Charc Code B Charc Code C Charc ASCII Location Charc Value 59 5B 59 60 5C 60 61 5D 61 62 5E 62 _ _ 63 5F 63 NUL...

Страница 20: ...7D 93 RS 94 7E 94 US DEL 95 7F 95 FNC3 FNC3 96 A1 96 FNC2 FNC2 97 A2 97 SHIF SHIF 98 A3 98 CODEC CODEC 99 A4 99 CODEB FNC4 CODEB A5 100 FNC4 CODEA CODEA A6 101 FNC1 FNC1 FNC1 A7 102 STARTA STARTA STAR...

Отзывы: