Need to write a character directly to LPT1 port

Postby Biel EA6DD » Thu Jun 08, 2006 8:30 am

Look for LPT_timeout in the registry(HKEY_LOCAL_MACHINE,SYSTEM,ControlSet001,control,WOW). Try to set to 1 or 2, this may help in reduce the waiting time.
Saludos desde Mallorca
Biel Maimó
http://bielsys.blogspot.com/
User avatar
Biel EA6DD
 
Posts: 682
Joined: Tue Feb 14, 2006 9:48 am
Location: Mallorca

Postby Rafael Clemente » Thu Jun 08, 2006 10:13 am

Biel:
Had the value 15. Changed it to 1 but still not much difference.
Gracias por la idea!
Rafael
User avatar
Rafael Clemente
 
Posts: 365
Joined: Sat Oct 08, 2005 7:59 pm
Location: Barcelona, Spain

Postby tnhoe » Thu Jun 08, 2006 2:33 pm

or try BuildCommDcb( "LPT1:", @cDcb )
or try BuildCommDcb( "LPT1:9600,n,8,1", @cDcb )

By right we don't need the baud rate for LPT1.

Check also if the delay happens on SetCommState(), msgwait(), etc.
Try to remove the line causes delay.

Check also if anti-virus software causes the delay.

I used to print to 4" receipt printer without problem in FW195.
Never try with XP
Regards

Hoe, email: easywin3@yahoo.com
User avatar
tnhoe
 
Posts: 83
Joined: Tue Nov 08, 2005 11:09 am
Location: Malaysia

Postby tnhoe » Fri Jun 09, 2006 3:59 am

may be for LPT1 we only need :-

opencomm()
writecomm()
closecomm()
Regards

Hoe, email: easywin3@yahoo.com
User avatar
tnhoe
 
Posts: 83
Joined: Tue Nov 08, 2005 11:09 am
Location: Malaysia

Postby James Bott » Fri Jun 09, 2006 1:51 pm

Try this. Select Start-Printers and Faxes, then right-click on the print driver and select Properties then the Advanced tab. Select "Print directly to printer." This by-passes the spooler.
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Rafael Clemente » Wed Jun 14, 2006 8:28 pm

I sent the board to the factory for checking and I got it back with a note saying that it works Ok, but only under W98 and Me.

I was testing it with W2000 and Xp. Tried all the suggestions by Enrico, Thnoe, Randal, Biel and James. None of them worked which is not surprising after reading the note the manufacturer included.

What I can not imagine is why a simple paralell port board should not work under Xp... Any explanation?.

I guess I will set up an old W98 and try the damn board with it. In the meanwhile, thanks to all of you for your help and support.

Rafael
User avatar
Rafael Clemente
 
Posts: 365
Joined: Sat Oct 08, 2005 7:59 pm
Location: Barcelona, Spain

SALUDOS ENRICO

Postby sildata » Mon Jul 17, 2006 2:19 pm

Enrico: Has una prueba sencilla y elemental, bootea con un diskete de algun sistema operativo MS-DOS cualquier version que tengas, enseguida redirecciones el puerto "MODE LPT!=com1" A partir de alli cualquier instruccion que tipees por el teclado se emprimira por el puerto com1.
quizas esto te sonar un poco confuso, pero si no has solucionado todavia tu problema enviame un mensaje a mi correo y con gusto te enviare las instrucciones con mas exactitud, con esta prueba lo que consigues es verificar que los puertos de la computadora y el impresor inclusive el cable esta en operativos y en buen estado.
Saludos RODOLFO

sildata@cantv.net
sildata
 
Posts: 38
Joined: Thu May 11, 2006 7:41 pm

Postby Rafael Clemente » Tue Jul 18, 2006 11:12 pm

Rodolfo:
Ya lo solucioné: Cambié la placa de relés controlada por puerto paralelo por otro modelo, controlado por puerto serie. Hice un par de correcciones al programa y funcionó a la primera.
Saludos,
Rafael
User avatar
Rafael Clemente
 
Posts: 365
Joined: Sat Oct 08, 2005 7:59 pm
Location: Barcelona, Spain

Postby Badara Thiam » Wed Jul 19, 2006 10:49 am

I need just to send one ASCII character to LPT1 to activate the desired relay. The problem is that I can not find how to do it:



You can also try this command DOS :

copy MyAscCar.tmp lpt1.bmp

Regards, :wink:
Badara Thiam
http://www.icim.fr
User avatar
Badara Thiam
 
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 72 guests