[DUG] Async Pro COM Port component
Trevor Jones
trevorj at ihug.co.nz
Mon Jun 20 14:56:24 NZST 2005
Phil,
Even though I used Async Pro back in the BP7 days, I've had little luck in
making it work reliably in multi-threaded environments in Windows. I kept
running into problems like the one that you describe, and difficulty getting
the events to re-arm (if that is what is called) and found that the
architecture which allows you to use the same Port component for either
async serial or async TCP comms unnecessarily complex.
I ended up using this thing instead:
http://sourceforge.net/projects/comport/
and have nothing but good things to say about it. It seems much easier to
use and I like the things like the little LED components that you can plop
on a form and hook up to certain control lines on the com port (DSR, CTS
etc) and the combo-box components that allow you to directly control
whichever property of the comport you specify (Baud rate, parity etc).
I know its not fun to have a different component set suggested when all
you really want is help on a specific problem, but since I finally gave up
on Async Pro and made the switch, I've been really glad I did.
Trevor
-----Original Message-----
From: delphi-bounces at ns3.123.co.nz [mailto:delphi-bounces at ns3.123.co.nz] On
Behalf Of Phil Middlemiss
Sent: Monday, 20 June 2005 12:44 p.m.
To: NZ Borland Developers Group - Delphi List
Subject: [DUG] Async Pro COM Port component
I'm using the Async Pro COM Port component to comunicate with a device.
If I send some commands to the device using HyperTerminal then the
device behaves correctly. If I try using the TApdComPort.PutString
method then it appears to have been successfully sent but the device
reacts as if it has not received it.
Most tellingly, if I put a break point on the PutString call, step over
it each time it is called, and the let it continue running the device
behaves correctly, which makes me think that I should be doing something
to let the device process each string I send? I've tried putting a call
to ProcessCommunications straight after the PutString call, but that
makes no difference.
The HyperTerminal settings are 4800, 8, None, 1, No Flow Control. I've
tried to match these to the TApdComPort settings, but I'm obviously
missing something.
The settings I use for the TApdComPort are:
FComDrv.Baud := 4800;
FComDrv.DataBits := 8;
FComDrv.Parity := pNone;
FComDrv.StopBits := 1;
FComDrv.HWFlowOptions := [];
Any clues?
Phil.
_______________________________________________
Delphi mailing list
Delphi at ns3.123.co.nz
http://ns3.123.co.nz/mailman/listinfo/delphi
More information about the Delphi
mailing list