1

How can i use TComport, from inside a thread (e.g OTL or Jedi Thread) to catch incoming strings? What the "SyncMethod" of TComport actually does? This is my code:

procedure TForm5.ComPort1RxChar(Sender: TObject; Count: Integer);
var
  Str:string;
  commapos:integer;
begin
  ComPort1.ReadStr(Str, Count);
  commapos:=System.Pos(',',str);
  if (commapos>0) then
    // Do Something
  else
    // Do Something else
end;

The above question can be implemented via TurboPower Async Pro with better resaults?

Thanks in advance.

P.S. It is a must to read incoming strings from a ComPort using a background worker.

TLama
  • 75,147
  • 17
  • 214
  • 392
Dim
  • 41
  • 4
  • See [Using the Events in a serial port component TComPort (v4) from a thread in Delphi?](http://stackoverflow.com/q/8563368/576719). – LU RD Nov 22 '14 at 13:09

0 Answers0