Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LPT and/or COM port approach in dbase IV

Status
Not open for further replies.

Ericzzz

Technical User
Jul 27, 2005
2
BE
I use a DOS only (6.22) pc with Dbase IV and made myself an 8 channel lpt port driven relay board wich works fine with commands from qbasic ( out ).

Does anyone know how to read/write from dbase to lpt or com ? ( ??? does not work, maybe if i manually signal printer ready on the port ? ). By my knowledge there is no dbaseIV command or function that gives one direct acces to ports... Any alternatives ?
 
SET PRINTER TO LPT1 && or LPT2, LPT3, etc.
SET PRINTER ON
<< your code here >>>
EJECT && or EJECT PAGE or ?? CHR(27)+"E" - printer reset
SET PRINTER OFF
SET PRINTER TO && release printer connection

Note that your code can use ??? (direct to printer without default formatting) or ?? (no carriage return) or ? (sends cariage return before string is sent). The key is to direct output to the printer connection.

Maybe thread290-716308 might give a few more ideas even if it's not exactly what you want. Keep searching.
 
Thx for your reply.

Already tried to SET PRINTER TO lpt1 ( only 1 lpt port installed, SET PRINTER TO 2/3 results in a invalid port err msg ),
SET PRINTER ON results in a printer not ready err msg ( PRINTERSTATUS()=.F. )
If i use the ??? command = printer not ready err msg.

wat did help was rewiring the connector to emulate a printer connection :
1 (data strobe) ---> 10 (Ack)
11(busy) , 12(paper end), 17(select inhibit) --> Ground
13(select) --> 15(!error) --Tied together, but floating

Now output from the ??? command reaches the board, still haven t figured out a way to read the port.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top