background image

 

28 

 

80 PRINT #1, CHR$(65) 

             'Restore the font character 

The printout of running the program in TP UP-PN printer is shown below: 

 

 

3.6 Printing Graphics Commands 

ESC K 

 

 

 

 

 

 

 

   Set bit-map graphics 

Format: 

ASCII 

ESC   K 

n1 

n2 

... 

data  ... 

 

 

Decimal 

27 

75 

n1 

n2 

... 

data  ... 

 

Hexadecimal 

1B 

4B 

n1 

n2 

... 

data  ... 

Explanation: 

The command set a n1

×

8 dot-matrix graphics. The width of the graphics 

is n1 dots and the height is 8 dots. The 8 dots in each column can be indicated 
by an 8-bit byte. The MSB is at the top position. 

The value of n1 and n2 indicates a 16-bit binary code. n1 is used as the 

lower byte and n2 the higher byte. The width of the bit -map graphics set by 
ESC K command is determined by the formula n2

×

256+n1. According to 

printer  T P   UP-PN, n2 should be 0 and n1 should range among 1 to the 
maximum number of dots in one line specified by the model of printer. 

The value of data corresponds to the byte of each dot column. The 

quantity of bytes should equal n1. 

For example: Printing two Chinese characters  “

中文

” (Chinese) with 

ESC K.  The dot matrix of these two characters is shown as below. Each 
character is composed of the 7X8 dot matrix in which dot columns are 7. 
There is one dot -column space between two continual characters. So there are 
total 15 dot columns and then n1=15, n2=0. All 15 bytes of the data indicated 
by hexadecimal are shown as follows:   
7C, 44, 44, FF, 44, 44, 7C, 00, 41, 62, 54, C8, 54, 62, 41. 

 

 

 

29 

 

 

 

 

The following BASIC program is in terms of the above instance. 
10 PRINT #1, CHR$(27);"W";CHR$(2);             'enlarge in V & H 
20 PRINT #1, CHR$(27);"K";CHR$(15)CHR$(0);      'ESC K   
30 FOR I=1 TO 15 
40 READ D: PRINT #1, CHR$(D);            'Input 15 bytes of data 
50 NEXT I 
60 PRINT #1, CHR$(13); 

 

      'Input CR 

70 DATA &H7C,&H44,&H44,&HFF,&H44,&H44,&H7C,0 
80 DATA &H41,&H62,&H54,&HC8,&H54,&H62,&H41 
The printout in TP UP-PN is shown below: 

 

 

ESC '  

 

 

 

 

 

 

 

Print curving graph lines 

Format: 

ASCII 

ESC   ' 

n1 

n2 

... 

nk 

CR 

 

 

Decimal 

27 

39 

n1 

n2 

... 

nk 

13 

 

Hexadecimal 

1B 

27 

n1 

n2 

... 

nk 

0D 

Explanation: 

The command prints curving graph lines along direction of paper feeding. 

The value of m is the quantity of curves. It ranges from 1 to the  maximum 
number of dots in one line specified by the model of printer. (Seeing at Section 
1.1) 

There are m dots in a horizontal dot line. n1, n2…nk represent positions 

of m curves. The value of nk should equal the value m. 

Each nk should be in the range of to the maximum number of dots in one 

Summary of Contents for UP-PN24S

Page 1: ...TP UP PN Portable Dot Matrix Printer User sManual The contents of this manual are subject to change without notice...

Page 2: ...s 13 3 1 Summary 13 3 2 Paper Feeding Commands 13 3 3 Formatting Commands 15 3 4 Character Setting Commands 21 3 5 User Defined Character Commands 26 3 6 Printing Graphics Commands 28 3 7 Initializati...

Page 3: ...ort EPSON M 190 series printer head The main models are shown in the follow table Model Character per line 5 7 Character dimension mm Print speed line s Fast feeding paper speed Print density dot line...

Page 4: ...2 Serial port Baud rate 9600bps Handshaking RTS CTS Data format 8 bit data none parity 1 bit stop Connector 6 pin RJ 11 modular jack Signal level EIA level 3 15V IrDA infrared port Communication dista...

Page 5: ...ed Full charging needs 14 hours Fast charging need take off the battery and put it on the optional quick charger CX 101 option Full charging needs only 4 hours For the first use of the printer we reco...

Page 6: ...u can press down the right end of the cassette only after lay the left end down to the axle deep enough Now check the ribbon if or not it is tight and keeps on the inside of the cassette Turn the knob...

Page 7: ...eless To communicate the IrDA infrared transmitter and receiver of the host should aim at the infrared window of the printer Communication parameters are following as Baud rate 9600bps Data bit 8 Pari...

Page 8: ...ng indicator LF Button Status indicator Chapter 3 Printing Control Commands 3 1 Summary TP UP PN portable thermal printer provides a set of print control commands includes byte control commands ESC co...

Page 9: ...map graphics Normally set n 3 at text printing mode Default value is n 3 Example n dot line Observe the effect of the command by following BASIC program 10 FOR I 1 TO 10 STEP 2 20 PRINT 1 CHR 27 1 CHR...

Page 10: ...l its values must be limited to the range of page length set by ESC C command The character NUL added at last indicates the end of the command All the vertical tab position can be canceled by ESC B NU...

Page 11: ...printout of running this program in TP UP PN is as follows HT Horizontal tab Format ASCII HT Decimal 9 Hexadecimal 09 Explanation Printing continues to the position of next horizontal tab set by ESC D...

Page 12: ...that is no left margin The position is absolutely set by this command so it is not affected by ESC U and ESC W character enlarge commands For instance to set left margin into 6 you can send following...

Page 13: ...Enlarge width height Format ASCII ESC W n Decimal 27 87 n Hexadecimal 1B 57 n Explanation The printing width and height will be n times bigger than normal one The value of n should range among 1 to 4...

Page 14: ...ng the command Carriage Return or DC4 commands can terminate SO command However normal and width enlarging characters can be mixed in the same line DC4 Cancel double width printing Format ASCII DC4 De...

Page 15: ...n1 m2 n2 mk nk 0 Hexadecimal 1B 25 m1 n1 m2 n2 mk nk 00 Explanation This command can replace the character n of current fonts with user defined character m the user defined character m will be printed...

Page 16: ...below Each character is composed of the 7X8 dot matrix in which dot columns are 7 There is one dot column space between two continual characters So there are total 15 dot columns and then n1 15 n2 0...

Page 17: ...X The printout of running above program in TP UP PN printer is as below Paper feeding direction 3 7 Initialization Command ESC Initialize printer Format ASCII ESC Decimal 27 64 Hexadecimal 1B 40 Expla...

Page 18: ...the current line printing and start Chinese character printing next line FS Exit Chinese printing Mode Format ASCII FS Decimal 28 46 Hexadecimal 1C 2E Explanation This command is used to exit Chinese...

Page 19: ...be printed on the printing side of the paper The position of the black mark is the paper tearing line The position and size of the black mark printed are shown as below picture The reflectivity of th...

Page 20: ...apacity of the battery strongly recommend charging after discharging sufficiently 1 Discharging on printer After power off press and hold button ON more than 10 seconds until the both of red and green...

Page 21: ...within 0o C 40o C Charging the battery usually in the temperature exceed the range will lower the capability of the battery Overcharge the battery from time to time may be underutilized resulting ins...

Page 22: ...e leakage and lower the capacity if charge the battery in the temperature too high 2 Never short circuiting the cells use the correct polarity when charging or it may cause the deformation leakage eve...

Page 23: ...tery q Overall dimension 153 L 116 D 65 H q Weight About 530g excluding the paper roll q Working condition Temperature 0 50o C relative humidity 10 80 Appendix 2 Printing Control Commands Decimal Hexa...

Page 24: ...27 87 1B 57 ESC W n Enlarge in width height 27 99 1B 63 ESC c n Inverse printing 27 102 1B 66 ESC fm n Print blank character or blank line 27 105 1B 69 ESC i n Turn reverse printing on off 27 108 1B 6...

Page 25: ...Character code table 2...

Reviews: