Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[General] ESC command format for thermal printer using hyperterminal

Status
Not open for further replies.

rkmuchandikar

Newbie level 4
Joined
Jan 10, 2014
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
36
i m trying to send esc commmand sequence to thermal printer using hyper terminal

but i dnt know which format i sholud used

eg,

ESC % n this is 1 command as per module which will print data using different font ..but whenever i send this command printer simply print this command as it is(ESC % n). it should not print this command it should accept command as shld change font.

plz help me
 

This must be similar to the Epson compatible command set.

I believe it includes sending character ASCII 27, folllowed by the parameters.

What ASCII sequence are you sending? It would not happen to be three letters "ESC", would it?
 

This must be similar to the Epson compatible command set.

I believe it includes sending character ASCII 27, folllowed by the parameters.

What ASCII sequence are you sending? It would not happen to be three letters "ESC", would it?


Thanx for reply,


commands are follwing,

for reset

1. ESC @
format <1Bh><40h>

for font change
2. ESC % n
formaat <1Bh><25h><n>

that format is given with command in technical module...



but i have tried sending both ESC command and format given but still not working
 

Is there a space between ESC & @??? If so then you have to send <0x1B><0x20><0x40>

Can you attach the datasheet of the thermal printer?
 

hello,

if your printer follow EPSON ESC sequence ..example of use
and document for standard ESC commandes

Code:
void MHardcopy()
{
 int yt,x,y,t,k;
 int my;
 int Dx;
 byte Hi,Lo;
 byte pr;
 StateLP();
 if (etatLP==1)
 {
 my=596;
 EnteteLP();
 Lp(27);Lp('~');Lp('5');Lp(1); 	/* mode IBM */
 Lp(27);Lp('3');Lp(24);         /* was 24   interligne 12/216 pouce    */
 Lp(10);Lp(13);
 y=1;
 Dx=780;
 Hi=(byte)(Dx>>8);Lo=(byte)(Dx & 0x00FF);
 while(y<=my)
 {
/*	Lp(27);Lp('Z');Lp(Lo);Lp(Hi);*/
/*	Lp(27);Lp('K');Lp(Lo);Lp(Hi);*/
/*	Lp(27);Lp('L');Lp(Lo);Lp(Hi);*/
	Lp(27);Lp('Y');Lp(Lo);Lp(Hi);	/*	IBM mode  120 points /pouce */
	for (x=10;x<=790;x++)
   {
    yt=y;
    pr=0;
     for (t=0;t<8;t++)
     {
      pr=pr << 1;
      k=getpixel(x,yt);		/* exclusion noir,gris,blanc clair */
	/*if ((k!=0)&&(k!=8)&&(k!=7)) pr=pr|1;*/
	if (k!=0) pr=pr|1;
      yt++;
     }
     Lp(pr);
   }
  y=yt;
  Lp(27);Lp('3');Lp(24);     /*    8 aiguilles => 24/216= 8/72 eme */
  Lp(10);Lp(13);
  }
  Lp(27);Lp('@');
  Lp(27);Lp(2);			 /* 6 lignes par pouce */
  Lp(13);Lp(10);
 }
 else
 Couine();
}

EPSON_ESC_Cdes_a.jpg

EPSON_ESC_Cdes_b.jpg
 

Thanx to all for giving me suggetions,,,,i found the problem and solution....problem was that ESC is not command its button on our keypad, when we press esc its hex value is given to hyperterminal,,,,,but we cant send hex value of esc using hyperterminal......for that we have to use other serial terminal software REALTERM....where we can hex value og ESC
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top