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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display Output through to COM1 Port

Status
Not open for further replies.

codo

IS-IT--Management
Oct 31, 2001
187
ID
I'm planned to use computer with two display device, first a monochrome monitor connect to VGA card and the 2nd is a Customer Display device (2 lines display monitor like on supermarket cashier) that connect to COM1 Port.
Is there any source code for foxpro for DOS about how to direct the output (using @...say or ?? command) through display device that using COM1 Port ?
 
Use:
SET PRINTER TO COM1
SET PRINTER ON
*-- What ever ?? commands will be sent to com1.

*-- Don,t forget to synchronize baud rate bits etc.
*-- With your PC and the com1 device
*-- You may want to use this in the autoexec.bat
MODE com1:96,7,1 ( may want to look for the correct syntax)
or using the run command in foxpro.
lc_redir= "MODE com1:96,7,1"
RUN &lc_redir
Regards,
EMC
 
While EMC's code will definitely work if you are running under DOS, it may or may not work on Win9x, and will likely NOT work under NT / 2000 / XP.

Note: You can also use low-level IO (FPOEN, FWRITE, etc.) to write to the COM ports - there is sample code if you installed the optional components of FPD. It also has the same "restictions" as far as the OS is concerned.

Rick
 
thx guys i will give it try....
 
I allready tried the command:
SET PRINTER TO COM1
SET PRINTER ON
?? "Hello"
but it comes with a messagge "Printer not Ready, Retry or NO? "
but when i run DOS command "dir>com1" it's work (displaying a files on current directory)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top