Visual Basic 6 Serial Port Problem - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Visual Basic 6 Serial Port Problem

part0part0 Posts: 2Member

I am facing a problem in receiving data from the serial port com. As it stated "Receive Buffer Overflow".

I have configure the setting as shown below.

MSComm1.Settings = "115200,N,8,1"
MSComm1.InBufferSize = 16384 'max input buffer size
MSComm1.CommPort = 1
MSComm1.InputLen = 1
MSComm1.RThreshold = 1 '1 byte receive
MSComm1.SThreshold = 1 '1 byte send
MSComm1.PortOpen = True

Ok my incoming data size is 25k bytes.

And every bytes that comes into the serial port it will be written into a text file in this case which i know it empty the InBuffer.

But to my surprise it does not empty it when it continues receving of data which makes me cant receive all the 25k of data. Btw there is no control signals between the device and the port.

So how can i receive unlimited number of bytes without having the buffer overflow problem ?

Anyone please help thanks.


Sign In or Register to comment.