Read data from a serial port 
Author Message
 Read data from a serial port

I'm trying to read a text file from a serial port, actually from a hand
held device that connects to my serial port.  The unit has a dos program
that reads the data, but its very clumsy to "shell" to the dos program.

I have a copy of IO.VBX and VBIO.VBX (I think those are the two that I've
run across) but I'm not sure how to address the port.  

If anyone can offer a suggestion or maybe, better yet, show a few lines of
code on how to read from serial port 1.  

Lastly, I might need to mention that I'm using VB3 - and its not the
professional version so I can't use MSCOMM.VBX.

thanks,
--
SLiM



Tue, 13 Apr 1999 03:00:00 GMT  
 Read data from a serial port



Quote:
>I'm trying to read a text file from a serial port, actually from a hand
>held device that connects to my serial port.  The unit has a dos program
>that reads the data, but its very clumsy to "shell" to the dos program.

The method used by Qbasic still works in VB3.  Look at OPEN COM in
Qbasic Help.  Here is a typical program:

OPEN "COM1:9600" for input as #1
B$=""
DO UNTIL B$ = something useful
  B$ = B$ + INPUT$(1,1)
LOOP

Quote:
>I have a copy of IO.VBX and VBIO.VBX (I think those are the two that I've
>run across) but I'm not sure how to address the port.  

You don't need these.

By the way, when you say it is very clumsy to shell to the DOS program,
what do you mean exactly?  If you mean the replacement of the desktop by
a full DOS screen you can get around that, and run the DOS program
minimised by using a PIF with "Windowed" checked.

If you mean the DOS program doesn't terminate itself when it has
finished then you are right; and it is more than clumsy, it is unusable.
--
Peter Hesketh




Wed, 14 Apr 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to read data from a serial port

2. DLL for reading serial port data

3. read data from serial port using vba for Access

4. Reading data off of a serial port

5. problems with read data from serial port

6. Reading data from a machine on the serial port

7. WANTED: VB MODULE TO READ DATA FROM SERIAL PORT

8. WANTED: VB MODULE TO READ DATA FROM SERIAL PORT

9. read/write data to the serial port

10. Reading serial/parallel port data

11. How to loop comm port control to read text files through serial port in VB3

12. I/O port, Parallel port, Serial port

 

 
Powered by phpBB® Forum Software