Hello Mark,

Monday, July 28, 2008, 8:58:36 AM, you wrote:

MR> Reduce your code to the bare minimum needed to reproduce the problem,
MR> and either doing that will give you the answer (it often does for me!)
MR> or else post it here.

I tried with a very simple test unit enclosed here.

I also tried to disconnect the usb-serial adapter when the program is
not running but I have the same problem...once I disconnect the
adapter and then reconnect I can't read anything from the serial port.

I tried with the following unit, it runs ok the first time the program
is run and the adapter is connected, when I disconnect it and
reconnect later it does not read any data anymore until I restart my
pc.





unit testsyn;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, synaser, synautil;

type
  TForm1 = class(TForm)
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;


var
  Form1: TForm1;
  ser:tblockserial;
  s:String;
  

implementation

{$R *.dfm}


procedure TForm1.FormShow(Sender: TObject);
begin
  ser:=TBlockSerial.Create;
  try
    ser.Connect('COM5');
    ser.config(19200,8,'N',1,false,false);
    s:=ser.ATCommand('+V');
    form1.Caption:=s;
  finally
    ser.free;
  end;
end;

end.



----------------------------
Famous Sport Quotes:

"One of the reasons Arnie (Arnold Palmer) is playing so well is that,
 before each tee-shot, his wife takes out his balls
 and kisses them - Oh my God, what have I just said?"
USTV commentator
----------------------------

Steve IK4WMH


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to