background image

 

26 

 

Explanation: 

If n=1, then turn inverse printing on. If n=0, turn it off. Reverse printing 

is usual in wall-mounted printer, so that the printout is easy to read. The 
default is n=0. 

 

3.5 User-Defined Character Commands 

ESC  &   

 

 

 

 

 

Define user-defined character 

Format: 

ASCII 

ESC   & 

n1 

n2 

... 

n6 

 

 

Decimal 

27 

38 

n1 

n2 

... 

n6 

 

Hexadecimal 

1B 

26 

n1 

n2 

... 

n6 

Explanation: 
   The command allows user to define a user-defined character. The 
parameter m is the code of this character. The value of the code ranges among 
32 and 255. 
   Parameter n1, n2,  …   ,   n6 are  the structure code of the character. The 
character is composed of 6X8 dot matrix, that is, 6 dot-columns by 8 dot -lines. 
One byte of the data corresponds to one column of the character. The MSB of 
the byte is at top of the column. Refer to following structure: 

 

 

User-defined characters are stored in RAM but they will be lost when 

power off. 

If several ESC & commands used the identical value of the m only the 

last m would be available. The number of the user-defined character is able up 
to 32. Please refer to ESC % and ESC : commands. 

 

 

 

27 

 

ESC  %   

 

 

 

 

Replace with user-defined character 

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 can replace the character n of current fonts with 

user-defined character m. the user-defined character m will be printed after 
issuing the command, which is substitute for the character n in current fonts. 

m1, m2…mk are codes of user-defined character. 
n1, n2…nk are codes of characters in current fonts and will be replaced. 
Value for both m and n ranges among 32 and 255. 
The value of subscript ? ranges among 1 and 32. The maximum number 

of characters that can be replaced is 32. 

The character NUL adds in the last to indicate the end of the command. 
Please refer to ESC & and& ESC : commands. 

 

ESC : 

 

 

 

 

 

 

    Restore the font character 

Format: 

ASCII 

ESC   : 

 

 

Decimal 

27 

58 

 

Hexadecimal 

1B 

3A 

Explanation: 
    The command restores the original character of Font, which has been 
replaced with the user-defined character set by ESC % command. However the 
user-defined character is still in RAM and can be called back by the ESC % 
command. 
    Using the following BASIC program can observe the effect of ESC &, 

ESC % and  ESC : commands. 

10 PRINT #1, CHR$(27);"W";CHR$(2);              'Enlarge in V and H 
20 PRINT #1, CHR$(27);"&";CHR$(65);       'ESC & command 
30 PRINT #1, CHR$(&H02)CHR$(&H7C)CHR$(&H40); 

40 PRINT #1, CHR$(&HC0)CHR$(&H40)CHR$(&H00); 

50 PRINT #1, CHR$(27);"%";CHR$(65)CHR$(65)CHR$(0); 'ESC % 

command 

60 PRINT #1, CHR$(65) 

 

        'Print defined character 

70 PRINT #1, CHR$(27);":";   

        'ESC :command 

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: