[DUG] Async Pro COM Port component

Phil Middlemiss phil at tumonz.co.nz
Mon Jun 20 12:44:17 NZST 2005


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.


More information about the Delphi mailing list