[DUG] TComPort issue
Willie Juson
willie.juson at satara.co.nz
Wed Mar 10 11:13:32 NZDT 2010
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-bounces at delphi.org.nz [mailto:delphi-bounces at 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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20100310/724d8c79/attachment.html
More information about the Delphi
mailing list