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!

serial communication

Status
Not open for further replies.

3661nv95

Technical User
Oct 20, 2001
2
MU
I just wonder if somebody can help. I have some questions:

I have done a small BASIC program to read data from a scale.
EX: 10 OPEN "com1:1200,e,7,1,cs0,ds0,cd0" As #1 LEN=20
20 PRINT #1, CHR$(5)
30 A$ = INPUT(20, #1)
40 PRINT A$
The program works fine under GW BASIC.
However, when I compiled under TURBO BASIC V2.01, it works only once. I
get an I/O device error at LINE 30.
Can U advise why is that so.

1. Do U by any chance know any basic communication software or site
that I can refer to.

2. How does the "WAIT" command work? May be that I shouild include it
in my program.?

Please help & advise
Thanks a lot & Best Regards
Pierre
Email: cways@intnet.mu
 
u forgot to 'CLOSE #1' ? ----------------------------------------
There's no good nor evil, it's all in the mind.
 
Another quick fix: instead of GoTo 10 use GoTo 20.

This way the file remains opened and the internal pointer is NOT!! reset to the beginning of the file--which is what would happen if you closed the file.

Happy Programming.
--MiggyD It's better to have two heads to solve a problem from different angles than to have tunnel vision to a dead end.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top