epson esc code

This forum is for general support of Xbase++
Post Reply
Message
Author
Zdeno Bielik
Posts: 147
Joined: Thu Jan 28, 2010 9:24 am
Location: Nitra, Slovakia
Contact:

epson esc code

#1 Post by Zdeno Bielik »

Hi,

please, what esc code/sequence I must send to the epson dot-matrix printer for simulate pressing load/eject button?
I can without problems change e.g. fonts or size or normal vs bold vs wide of text...

TIA & regards
Zdeno

Victorio
Posts: 620
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: epson esc code

#2 Post by Victorio »

maybe of this ?
FF · · · Form feed. Print buffer, eject page, move cursor to top of next page at left margin C-29

ESC EM · · · Control paper loading/ejecting · · · C-157

ESC @ · · · Reset. dump buffered data, eject any partly printed page, return all settings to default. Should start each page.

Zdeno Bielik
Posts: 147
Joined: Thu Jan 28, 2010 9:24 am
Location: Nitra, Slovakia
Contact:

Re: epson esc code

#3 Post by Zdeno Bielik »

variants of sequence „ESC EM ...“ was first experiments before posting this request
it didn’t work for me…
I need load-off paper in tractor(not single A4 sheets) before new print
so I’m looking for other tips or may be I do something wrong…


#define PRN_RESET ( Chr( 27 ) + Chr( 64 ) )

#define PRN_cDraftOn ( Chr(27) + Chr(120) + Chr(0) )
#define PRN_cDraftOff ( Chr(27) + Chr(120) + Chr(1) ) && == Nlq On (namiesto 1 moze byt aj 49)
#define PRN_cBoldOn ( Chr(27) + Chr(71) + Chr(27) + Chr(69) ) && double strike + emphasized
#define PRN_cBoldOff ( Chr(27) + Chr(70) + Chr(27) + Chr(72) )
#define PRN_cWideOn ( Chr(27) + Chr(87) + Chr(1) ) && double width
#define PRN_cWideOff ( Chr(27) + Chr(87) + Chr(0) )
* Local cSansSerifOn := ( Chr(27) + Chr(58) + Chr(0) + Chr(1) + Chr(0) )
#define PRN_cSansSerifOn ( Chr(27) + Chr(107) + Chr(1) ) && TypeFace


* Decimal 27 25 n - ESC EM
/*
n =
49 “1” Selects loading from bin 1 of the cut-sheet feeder
50 “2” Selects loading from bin 2 of the cut-sheet feeder
66 “B” Loads paper from the rear tractor
70 “F” Loads paper from the front tractor
82 “R” Ejects one sheet of single-sheet paper
*/
#define PRN_cEM_1 ( Chr(27) + Chr(25) + Chr(49) )
#define PRN_cEM_2 ( Chr(27) + Chr(25) + Chr(50) )
#define PRN_cEM_B ( Chr(27) + Chr(25) + Chr(66) )
#define PRN_cEM_F ( Chr(27) + Chr(25) + Chr(70) )
#define PRN_cEM_R ( Chr(27) + Chr(25) + Chr(82) )

Wolfgang Ciriack
Posts: 478
Joined: Wed Jan 27, 2010 10:25 pm
Location: Berlin Germany

Re: epson esc code

#4 Post by Wolfgang Ciriack »

The Epson dot matrix printer eject the paper with a FF. Important is, that you give the right paper size with your esc sequences.
Here in Germany, most of the endless paper (tractor) has a 12" length, what is a little bit longer than A4 page size.
You can set the default paper size within the printer menu (often it is rechable when you press the SET key with power on).
Over the menu you can set, that the paper is transported to the cutter line of the printer automaticly (if it is a model, that supports this). If a new print is beginning, the printer returns the paper to the TOF position before printing.
_______________________
Best Regards
Wolfgang

Zdeno Bielik
Posts: 147
Joined: Thu Jan 28, 2010 9:24 am
Location: Nitra, Slovakia
Contact:

Re: epson esc code

#5 Post by Zdeno Bielik »

Viktor, Wolfgang,

many thanks for tips!
With new Epson LQ-350 printer all is OK now!
With set parameters:
- PageLenght to 3"
- AutoTearOff to On
- ManualFeedTimeOut to 0.5
- CharacterTable to 852

and added Chr12(PageEject) at end of printed text before print
it works now how end-customer need:
program prints ticket and printer move paper to TearOff position
and before next print of ticket the paper is moved back

Post Reply