Visual Basic 6 Serial Port Problem

Hi,

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 serial port.

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

Anyone please help thanks.

Regards,

sk

Sign In or Register to comment.

Howdy, Stranger!

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

Categories