background image

 

24                                                                                                                                                25 

 

see ESC% and ESC: commands. 
 

ESC %   

 

 

               Replace with User Defined Characters

 

Format 

ASCII           :  

ESC  %  m1 n1  m2 n2  ...  mk nk  NUL      

 

 

 

Decimal        :  

27   

37  m1 n1  m2 n2  ...  mk nk  0     

 

 

 

Hexadecimal:       1B  

25  m1 n1  m2 n2  ...  mk nk  00        

Explanation: 
This command is used to replace font characters n with user-defined characters m. 
m1, m2, ... mk are codes of user-defined characters. 
n1, n2, ... nk are codes of the characters in the current font - the replaced characters. 
The values m and n should be in the range 32 to 255.  The subscript k ranges from 1 
to 32.  The maximum number of replaced characters is 32. 
The NUL character is added to indicate the end of the commands.  Also refer ESC & 
ESC: commands. 
 

ESC :   

 

 

                              

Reinstate the Font Characters 

Format 

ASCII           :  

ESC  : 

      

 

 

 

 

Decimal        :  

27   

58   

   Hexadecimal: 

 1B 

 3A 

 

 

 

 

 

Explanation: 
The command reinstates the original characters in the font replaced by user-defined 
characters using ESC % command.  User-defined characters, however, are not 
deleted from the RAM in printer and may be brought back again with ESC %. 

3.5.2   

User Defined Characters Form 2 

 
Support user defined high density characters for 203 DPI horizontal and vertical. 
Compatible with printer using ESC/POS commands. 
 

.ESC %   

 

 

 

                      Select User Defined Characters 

Format 

ASCII           :  

ESC  %  n        

 

 

 

 

Decimal        :  

27   

37  n     

   Hexadecimal: 

 1B 

 25 

 

 

 

 

 

Explanation: 
This command can select /cancel user-defined characters. n should be in the range 0 
-1. 
If n =<00000001> B the user-defined characters are selected. 
If n=<00000000> B the regular characters are selected. 
Default setting is regular characters. Using ESC & command to define  
user-defined characters. 
 

ESC & 

 

 

 

                         Define User Defined Characters 

Format 

ASCII          :   

ESC  &  s  n  m  [a [p] s x a ]m-n+1 

 

 

 

Decimal        : 27   

38  s  n  m  [a [p] s x a ]m-n+1 

 

 

 

Hexadecimal:       1B  

26  s  n  m  [a [p] s x a ]m-n+1     

Explanation: 
This command allows characters to be defined.  s = 3, 32< = n < m < = 126, 0 < = a 
< = 12 (for font A), 0 < = a < = 9 (for font B), 0 < = p < = 255. 
- s stands for number of  bytes in vertical. S = 3. 
- n stands for starting  ASCII code of user-defined character. 
- m stands for ending ASCII code  of  user-defined character. 
When define only one character n=m. The maximum number of user-defined 
characters is 50 and the maximum number of times for different  
user-defined characters is 50 for each Font A & Font B.  
- a stands for number of dots horizontal. 
- p stands for data of user-defined characters, there are s x a character codes for each 
character for defining m-n+1 characters.    
- user-defined characters are valid till re-definition or return back to start position or 
power off. 
 

3.6  

Graphics Printing Commands 

3.6.1   

Bit Image Graph Setting Form I 

 

Only support bit map 101 DPI horizontal and 68 DPI vertical. 
 

ESC K 

 

 

 

 

 

                        Bit Image Graph Printing 

Format 

ASCII: 

 

ESC  K  n1  n2  ...  data 

...        

 

   Decimal: 

 27 

 75 

n1 

n2 

... 

data ... 

 

 

   Hexadecimal: 

1B 

 4B 

n1 

n2 

... 

data ... 

 

 

 

 

 

Explanation: 
This command is designed to print n1 x 8 bit image.  The width of  this bit map is n1 
+ n2 x 256 dots and the height is 8 dots.  
Each column has 8 dots and can be presented by a byte (8 bits and bit 7 presents the 
highest dot in the column). The data are the bytes of relative columns in the graphics 
sequential from left to right..  The number of bytes should be n1 + n2 x 256. 
 

3.6.2   

Bit Map Graph Setting Form II 

 

ESC *  

 

 

 

 

                                                       Set Bit Map  

Format 

ASCII           :  

ESC  *  m  n1  n2  [d] k.        

 

 

 

 

Decimal        :  

27   

42  m  n1  n2  [d] k  

 

 

 

Hexadecimal:       1B  

2A m  n1  n2  [d] k         

Explanation: 
This command is for setting  bit map by using m and n1,n2. The bit map graph can 
be printed by either followed LF command or the width of the graph exceeds the 
width of the line. So, this command allows to print both characters and graphics in 
same line. 
m = 0, 1, 32, 33.  n1 = 0 - 255, n2 = 0 - 3, d = 0 - 255. 
k = n1 + 256 x n2  (m = 0, 1) 

Summary of Contents for TP UP-NH

Page 1: ...arance 5 2 2 Loading Printing Paper 6 2 3 Power ON and OFF 8 2 3 1 Connecting of Power 8 2 3 2 Auto Power OFF 10 2 4 Indicator and Function Key 11 2 5 Connecting of Parallel Interface 11 2 6 Connectin...

Page 2: ...th 57 5 mm 0 5 mm Printing Density 8 dots mm 384dots line Printing Speed 12 5mm sec DC9V 1A Printing Width 48mm 1 2 Printing Paper Thermal Paper Roll Paper Width 57 5 mm 0 5mm OD 50 mm max Build in I...

Page 3: ...ter side Signal Level EIA 3V to 12V Parallel compatible with PC Printer port Handshaking BUSY or ACK protocol Connect Socket D Sub 25pin male in printer side Signal Level TTL 1 10 Power Supply DC9V 1A...

Page 4: ...into paper in slot on rear of printer mechanism like figure 2 5 Figure 2 6 is not correct for paper roll hold outside the case Insert the paper end through paper in slot on the back of the printer fi...

Page 5: ...inter is on power Wait another 600ms to initialize printer before sending data 3 Example of Using Parallel Interface for PC Basic Formal Explanation 100 DEF SEG H40 Bottom of BIOS database 200 prtr PE...

Page 6: ...er port 1 The Pin Assignment of DB 25 is shown as follows PinN o Signal I O Description 1 STB In Strobe pulse to read data Reading occurs at falling edge 2 D0 In Data line D0 3 D1 In Data line D1 4 D2...

Page 7: ...he printer is busy and unable to receive data Space indicates that printer is ready to receive data 7 GND Printer Signal ground 20 DTR Host In SPACE status for not less than 3ms for control of printer...

Page 8: ...anation The printing position is advanced to the next horizontal tab HT command will not execute if the current print position exceeds the last horizontal tab ESC f Print Blank Characters or Lines For...

Page 9: ...The command is canceled by a Carriage Return or using DC4 command DC4 Cancel Double width Printing Format ASCII DC4 Decimal 20 Hexadecimal 14 Explanation Double width printing is canceled if it has be...

Page 10: ...26 s n m a p s x a m n 1 Explanation This command allows characters to be defined s 3 32 n m 126 0 a 12 for font A 0 a 9 for font B 0 p 255 s stands for number of bytes in vertical S 3 n stands for s...

Page 11: ...it Map Graph Format ASCII GS n Decimal 29 47 n Hexadecimal 1D 2F n Explanation This command print out the down load bit map graph set by command GS n for selection of bit map n 0 3 The relative graph...

Page 12: ...and Description Page No 0 00 NUL Nil 27 9 09 HT Horizontal Tab 17 10 0A LF Line Feed 15 13 0D CR Carriage Return 27 14 0E SO Select Double width Printing 19 20 14 DC4 Cancel Double width Printing 20 2...

Reviews: