Howdy, Stranger!

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

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Visual Basic 6 Serial Port Problem

part0part0 Posts: 2Member
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 the 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.