FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Need to write a character directly to LPT1 port
Posts: 682
Joined: Tue Feb 14, 2006 09:48 AM
Need to write a character directly to LPT1 port
Posted: Thu Jun 08, 2006 08: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/
Posts: 365
Joined: Sat Oct 08, 2005 07:59 PM
Need to write a character directly to LPT1 port
Posted: 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

Posts: 83
Joined: Tue Nov 08, 2005 11:09 AM
Need to write a character directly to LPT1 port
Posted: Thu Jun 08, 2006 02: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
Posts: 83
Joined: Tue Nov 08, 2005 11:09 AM
Need to write a character directly to LPT1 port
Posted: Fri Jun 09, 2006 03:59 AM

may be for LPT1 we only need :-

opencomm()
writecomm()
closecomm()

Regards

Hoe, email: easywin3@yahoo.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Need to write a character directly to LPT1 port
Posted: Fri Jun 09, 2006 01: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.

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 365
Joined: Sat Oct 08, 2005 07:59 PM
Need to write a character directly to LPT1 port
Posted: Wed Jun 14, 2006 08: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

Posts: 38
Joined: Thu May 11, 2006 07:41 PM
SALUDOS ENRICO
Posted: Mon Jul 17, 2006 02: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

Posts: 365
Joined: Sat Oct 08, 2005 07:59 PM
Need to write a character directly to LPT1 port
Posted: 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

Posts: 160
Joined: Tue Oct 18, 2005 10:21 AM
Need to write a character directly to LPT1 port
Posted: 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, :-)
Badara Thiam
http://www.icim.fr

Continue the discussion