Hi,
It's not continuous, we're using a chroma-meter to measure fruit colours so it's discreet packets of data transmitted when the trigger on the meter is pushed. I execute a ComPort.ClearBuffer call in the AfterOpen event of the Comport, if that's what you mean. We're getting a similar issue with a set of scales which only transmits a single weight value when it's print button is pushed. From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of Maurice Butler Sent: Wednesday, 10 March 2010 8:58 p.m. To: 'NZ Borland Developers Group - Delphi List' Subject: Re: [DUG] TComPort issue do you flush the buffer of the comport before you start trying to use it or do you have a continous stream of data coming in? -----Original Message----- From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of Willie Juson Sent: Wednesday, 10 March 2010 11:14 a.m. To: 'NZ Borland Developers Group - Delphi List' Subject: Re: [DUG] TComPort issue Another thing I forgot to add is if I put a break-point anywhere in the onRXBuf code then the corruption doesn't occur..... From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of Willie Juson Sent: Wednesday, 10 March 2010 10:57 a.m. To: 'NZ Borland Developers Group - Delphi List' Subject: [DUG] TComPort issue Hi, Is anyone using the TComPort component set successfully with D2009/D2010? We've been using it with no issues up until we upgraded to D2010. I've downloaded the latest version of the TComPort library I can find (ver 4 beta for D2010) and managed to get it installed ok then modified my program where it handles the RXBuf event - the "Buffer" parameter has changed to a PAnsiChar data type. What happens now is the first time I load the form (from another form in my application) and communicate with my device it works perfectly, however if I close the form and reopen it then the "Buffer" PAnsiChar returned in the event appears to be corrupted. If I completely close my app then restart it then same thing, first time into the form it works fine, after that it's corrupted. An example of the "Buffer" output is... First time in OK00#13#10 (calibrating) and OK00,040931,051754,018356#13#10 getting a reading. Second time in OK00#13#10Lo (calibrating) and OK00,041o100,0521o06,01857o1#13#1001857o getting a reading. Garbage is added into the result. Anyone got any ideas?
_______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe