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

MSComm.Input not reading full string

Status
Not open for further replies.

phishbone

Programmer
Jun 18, 2003
11
CA
Hello,
I'm trying to read in from the COM port. The device connected to the PC sends the following string:

"1/1/4 12-30-0,65411,65411,0,46504,56080,65296,0,0,0,0,0"

but my VB program only reads in "1/1/4 12" and then I get a framing error. Does anyone know why I'm getting this?

I'm using:

MSComm1.InputLen = 0
MSComm1.PortOpen = True

Emily
 
Try something like this ...

Do
DoEvents
Loop Until MSComm1.InBufferCount >= 55 'string length
' Read the data in the serial port.
Instring = MSComm1.Input
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top