background image

Programmer Manual 

 
 
 
 
 
 
 
 
 
 
 
 
 
1. Control Command List

 

Num Control 

Code 

Function 

01 HT 

Horizontal 

tab 

02 

LF 

Print and line feed 

03 

CR 

Print and carriage return 

04 

DLE EOT n 

Real-time status transmission 

05 

DLE ENQ n 

Real-time response to computer 

06 

ESC SP n 

Set right-side character spacing 

07 

ESC ! n 

Select print modes 

08 

ESC % n 

Select/Cancel user-defined character set 

09 ESC 

Define 

user-defined 

characters 

10 

ESC * 

Select bit-image mode 

11 

ESC - n 

Turn underline mode on/off 

12 

ESC 2 

Select default line spacing 

13 

ESC 3 n 

Set line spacing 

14 ESC 

Return 

home 

15 

ESC ? n 

Cancel user-defined characters 

16 ESC 

Initialize 

printer 

17 

ESC D [n]k NUL 

Set horizontal tab position 

18 

ESC E n 

Turn emphasized mode on/off 

19 

ESC G n 

Turn double-strike mode on/off 

20 

ESC J n 

Print and feed paper 

21 

ESC K n 

Print and reverse feed paper 

22 

ESC M n 

Select an character font 

23 

ESC R n 

Select an international character set 

24 

ESC U n 

Turn unidirectional print mode on/off 

Summary of Contents for D45

Page 1: ...D45 IMPRESORA DE IMPACTO ...

Page 2: ... user defined characters 10 ESC Select bit image mode 11 ESC n Turn underline mode on off 12 ESC 2 Select default line spacing 13 ESC 3 n Set line spacing 14 ESC Return home 15 ESC n Cancel user defined characters 16 ESC Initialize printer 17 ESC D n k NUL Set horizontal tab position 18 ESC E n Turn emphasized mode on off 19 ESC G n Turn double strike mode on off 20 ESC J n Print and feed paper 21...

Page 3: ... c1 c2 d1 dk Define user defined Kanji characters 43 FS c1 c2 Cancel user defined Kanji characters 44 FS S n1 n2 Set Kanji characters spacing 45 FS W n Select Cancel Kanji character double and quadruple size print 46 GS F pL pH a m nL nH Set the offset of black mark position 47 GS FF Feed paper to the black mark position 48 ESC n Set reverse feed length 49 ESC nL nH Set length of the receipt 50 ES...

Page 4: ...image data to be printed 3 Print buffer full This is the state where the print buffer is full If new print data is input while the print buffer is full the data in the print buffer is printed out and a line feed is executed This is the same operation as the LF command operation 4 Start of line The start of line state satisfies the following condition There is no print data including spaces and por...

Page 5: ...he horizontal tab position for the paper roll is font B 9 X 9 every 8 characters 9th 17th 25th column Reference ESC D 2 LF Name Print and line feed Format ASCII LF Hex 0A Decimal 10 Description Prints the data in the print buffer and feeds one line based on the current line Detail This command sets the print position to the beginning of the line Reference ESC 2 ESC 3 3 CR Name Print and carriage r...

Page 6: ...nd is valid even when the printer is disabled with ESC Select peripheral device This command is being processed as soon as received by the printer Note The status is transmitted whenever the data sequence of 10 H 04 H n 1 n 4 is received Example In ESC m nL nH d1 dk d1 10 H d2 04 H d3 01 H This command should not be used within the data sequence of another command that consists of 2 or more bytes ...

Page 7: ...1 Hex Decimal Function 0 0 00 0 Fixed to Off 1 1 02 2 Fixed to On 2 Undefined 3 0 00 0 No auto cutter error 1 08 8 Auto cutter error occurs 4 1 10 16 Fixed to On 5 0 00 0 No unrecoverable error 1 20 32 Unrecoverable error occurs 6 0 00 0 Temperature and voltage of print head is normal 1 40 64 Temperature and voltage of print head is over range 7 0 00 0 Fixed to Off n 4 Feed Status Bit 1 0 Hex Deci...

Page 8: ...ve buffer and the print buffer The printer retains the settings by ESC ESC 3 etc that were in effect when the error occurred The printer can be initialized completely by using this command and ESC This command is enabled only for errors that have the possibility of recovery except for print head temperature error When the printer is disabled with ESC Select peripheral device the error recovery fun...

Page 9: ...9 1 2 Undefined 3 0 00 0 Emphasized mode not selected 1 08 8 Emphasized mode selected 4 0 00 0 Double height mode not selected 1 10 16 Double height mode selected 5 0 00 0 Double width mode not selected 1 20 32 Double width mode selected 6 Undefined 7 0 00 0 Underline mode not selected 1 80 128 Underline mode selected Details When both double height and double width modes are selected quadruple si...

Page 10: ...de for the definition and c2 specifies the final code x specifies the number of dots in the horizontal direction Details The allowable character code range is from ASCII code 20 H to 7E H 95 characters It is possible to define multiple characters for consecutive character codes If only one character is desired use c1 c2 d is the dot data for the characters The dot pattern is in the horizontal dire...

Page 11: ...dots to be printed on a line the excess data is ignored d indicates the bit image data Set a corresponding bit to 1 to print a dot or to 0 to not print a dot Selects a bit image mode using m for the number of dots specified by nL and nH as follows m Mode Vertical Direction Dot Density Horizontal Direction Dot Density 0 8 dot single density 60dpi 90 1 8 dot double density 60 180 Details If the valu...

Page 12: ...lt n 0 12 ESC 2 Name Select default line spacing Format ASCII ESC 2 Hex 1B 32 Decimal 27 50 Description Selects 1 6 inch approximately 4 23mm line spacing Reference ESC 3 13 ESC 3 n Name Set line spacing Format ASCII ESC 3 n Hex 1B 33 n Decimal 27 51 n Range 0 n 255 Description Sets the line spacing to n x 0 176 mm 1 44inches Default n 24 Reference ESC 2 14 ESC Name Return home Format ASCII ESC He...

Page 13: ... is in effect when the power is turned on Details The DIP switch settings are not checked again 17 ESC D n1 nk NUL Name Set horizontal tab positions Format ASCII ESC D n1 nk NUL Hex 1B 44 n1 nk NUL Decimal 27 68 n1 nk NUL Range 1 n 255 0 k 32 Description Sets horizontal tab positions n specifies the column number for setting a horizontal tab position from the beginning of the line k indicates the ...

Page 14: ...led Bit image is not to be emphasized This command and ESC turn on and off emphasized mode in the same way Printer output is the same in double strike mode ESC G and in emphasized mode Alphanumeric characters and Kanji characters are affected by this command Note Bi direction print is with a lower speed in the emphasized mode Default n 0 Reference ESC ESC G 19 ESC G n Name Turn on off double strik...

Page 15: ...Decimal 27 75 n Range 0 n 48 Description Print the data in the print buffer and reverse feeds the paper n x 0 176mm 1 44inches Details If n exceeds the specified range printer prints data but do not reverse feed paper Note Do not execute this command twice at a time Reverse feed paper may cause the following problems 1 Incorrect line spacing 2 Printing noise is larger than in normal situation 3 Pa...

Page 16: ... Name Turn unidirectional print mode on off Format ASCII ESC U n Hex 1B 55 n Decimal 27 85 n Range 0 n 255 Description Turn unidirectional print mode on off When the LSB of n is 0 unidirectional print mode is turned off When the LSB of n is 1 unidirectional print mode is turned on Details Only the least significant bit of n is enabled The print direction of unidirectional print mode is from left t...

Page 17: ... of n is 1 the panel buttons are disabled Details Only the least significant bit of n is enabled When the panel buttons are disabled none of them are usable including FEED button Use GS z 0 to set paper loading latency time in which FEED button is enabled to feed paper Default n 0 27 ESC d n Name Print and feed n lines Format ASCII ESC d n Hex 1B 64 n Decimal 27 100 n Range 0 n 255 Description Pri...

Page 18: ...ger than in normal situation 3 Paper may be dirtied by friction with ribbon Reference ESC d 29 ESC p m t1 t2 Name Generate pulse Format ASCII ESC p m t1 t2 Hex 1B 70 m t1 t2 Decimal 27 112 m t1 t2 Range m 0 1 48 49 0 t1 255 0 t2 255 Details The pulse ON time is t1 x 2 ms and the OFF time is t2 x 2 ms If t2 t1 the OFF time is t1x 2 ms If t2 is less than 50 then t2 is assumed to be 50 30 ESC r n Nam...

Page 19: ...2 19 PC858 32 ESC n Name Turn upside down printing mode on off Format ASCII ESC n Hex 1B 7B n Decimal 27 123 n Range 0 n 255 Description Turns upside down printing mode on or off When the LSB of n is 0 upside down printing mode is turned off When the LSB of n is 1 upside down printing mode is turned on Details Only the least significant bit of n is enabled This command is enabled only when process...

Page 20: ...ects the mode as follows M Cutting Mode 0 48 Full cut 1 49 Partial cut 65 66 Feed paper cutting position n vertical motion unit and cut the paper partially one point left uncut This command is effective only processed at the beginning of a line When m 0 48 1 49 printer cuts paper directly When n 65 66 printer feeds paper cutting position n vertical motion unit and cuts paper partially Feed paper i...

Page 21: ...st is ready to receive data DSR signal is SPACE If the host computer is not ready to receive data DSR signal is MARK the printer waits until the host is ready When XON XOFF control is selected the printer transmits only 1 byte without confirming the condition of the DSR signal This command is executed when the data in the receive buffer is developed Therefore there may be a time lag between receiv...

Page 22: ...er will be on line again The paper wait time is within t1 x 0 5 seconds from the time the printer finishes loading the paper During this time Paper can be fed by pressing the FEED button and the printer can be set on line by using the DLE ENQ command After the paper wait time printer is on the recovery confirmation status During the paper wait time the time of feeding paper by pressing FEED button...

Page 23: ...N Details When both double width and double height modes are set including right and left side character spacing quadruple size characters are printed The printer can underline all characters including right and left side character spacing but cannot underline the space set by HT Default n 0 Reference FS FS W 39 FS Name Select Kanji characters mode Format ASCII FS Hex 1C 26 Decimal 28 38 Descripti...

Page 24: ...s mode is set when printer is power on Reference FS FS C 42 FS 2 c1 c2 d1 dk Name Define user defined Kanji characters Format ASCII FS 2 c1 c2 d1 dk Hex 1C 32 c1 c2 d1 dk Decimal 28 50 c1 c2 d1 dk Range Available in Simplified Kanji supporting models c1 FEH A1H c2 FEH 0 d 255 k 32 Description Defines user defined Kanji characters for the character codes specified by c1 and c2 Details c1 and c2 ind...

Page 25: ...escription Sets left and right side Kanji character spacing n1 and n2 respectively Details When double width mode is set the left and right side character spacing is twice the normal value Unit of spacing between Kanji characters is half dot Default n1 0 n2 2 45 FS W n Name Turn quadruple size mode on off for Kanji characters Format ASCII FS W n Hex 1C 57 n Decimal 28 87 n Range 0 n 255 Descriptio...

Page 26: ...is command is executed Setting offset of the print starting position a 1 is enabled in GS FF Setting offset of the paper cutting tearing position a 2 is enabled in GS V m Default value of nL and nH is 0 viz when the black mark sensor senses the black mark the print head position corresponding to where on the paper is set as the print starting position and the paper cutting tearing position corresp...

Page 27: ...nherence mechanism value of mechanism DP330 L0 43mm Q0 18mm When the mechanism is installed in the printer enclosure values of L0 and Q0 will change that is L0 43 ΔL Q0 18 ΔL 5 ΔL calculation method 1 Load the paper first and trim the paper edge 2 Send 20 characters E to the printer and print these out 3 Feed the paper to proper position and measure the length within the paper end and the top of E...

Page 28: ...and GS F 4 0 1 0 28 1 After finished these steps and when every receipt is printed Feed paper to the print starting position by using command GS FF Data is sent to the printer and printed out line by line Feed paper to the cutting tearing position by using command GS V m where the receipt can be cut or tear Example 2 Paper The distance between cutting tearing position and black mark position is 12...

Page 29: ...s 20mm Cutting tearing paper position offset calculation For the length within black mark position and the cutting tearing paper position is larger than L0 43mm then Cutting tearing paper position offset 43 140 130 0 176 301 dots Set the cutting tearing paper position offset by the following command GS F 4 0 2 0 45 1 Print starting position offset calculation 20 18 0 176 301 312 dots Set the print...

Page 30: ...to the beginning of print position set by the command GS F a 1 When black mark paper is on the print position no FEED operation is processed No reverse feed is executed in partial cut mode 48 ESC n Name Set length of the receipt Format ASCII ESC n Hex 1B 5E n Decimal 27 94 n Details The parameters set by this command are invalid when power turned off or in initialization When this command sets the...

Page 31: ...o the host computer that means the communication before sending data has been set up successfully At that time the printer can receive and print any data and commands from the host computer Printer returns 1B E8 for errors or the shortage of paper 53 ESC Name Print end code Format ASCII ESC Hex 1B 7D Decimal 27 125 Details The host computer send end code 1BH 7DH Hexadecimal to printer When the pri...

Reviews: