Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi TComportDriver (https://www.delphipraxis.net/76380-tcomportdriver.html)

sk.Silvia 3. Sep 2006 12:20


TComportDriver
 
hi there, after long search i found this http://www.delphi3000.com/articles/article_2663.asp?SI=

so i decided to ask right there, but however after a mounth i didnt get any ansewer (here my question bellow
)

iam a bit begginer (a student in 2grade), i worked much with delphi, but never with drivers... i will just make a simple serial port driver, and will ask if you have any documentation for your code, or a sample where it is used would be fine

i just want to make a driver for
baudrate : 192000
Start bit : 1
Data bits : 8
Stop bit : 1

Internal Adresses 00(version) 01(x) 02(y) 03(z)

command ?aapp(cr)
response >xxxxx(cr)
end with (cr)

in your code i found procedures for seting boundrate, handshake bits and so, but have no clue how to get it together

BIG Thanks:)


i also made some peace of code, tahat didnt worked

Delphi-Quellcode:
var
  Form1: TForm1;
  DT:TComportDriverThread;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  DT:=TComportDriverThread.Create(Form1);
  DT.ComPort       :=pnCOM1;
  DT.ComPortSpeed  :=br19200;
  DT.ComPortDataBits:=db8BITS;
  DT.ComPortStopBits:=sb1BITS;
  DT.Connect;
  //if DT.Connected then ShowMessage('GREAT');
  //if DT.Disconnect then ShowMessage('Connection Lost');
end;

procedure TForm1.Button2Click(Sender: TObject);
  begin
  if DT.SendString('?'+Edit1.Text) then ShowMessage('Data Sended');
  end;

procedure TForm1.Button3Click(Sender: TObject);
var tmp:string;
  begin
  tmp:='';
  DT.ReadString(tmp);
  Edit2.Text:=tmp;
  end;

end.
i tryied to find a sample of it, but with no success

please, if anyone coul help me with this :cat:


Alle Zeitangaben in WEZ +1. Es ist jetzt 08:20 Uhr.

Powered by vBulletin® Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2021 by Daniel R. Wolf