DaBoonDockSaint
Member
Still experimenting with the Serial Port component on VB2005 and I have been having issues with my data received event. I set my received bytes threshold to 38 bytes which is the number of bytes that I am expecting every 1 sec and when I get data I read it in my byte array. I use threading.thread.sleep and when I process this data I clear my port buffer using serialport.discardinbuffer method. Now my problem, it appears that ever so many odd seconds I get a problem with my stream and I end up having 44 sometimes 45 bytes coming in and I loose about two seconds of data im wondering if this is something with my read method or if its just the stream being delayed, any experienced programmers have any idea whats going on?