Thema: Delphi TComportDriver

Einzelnen Beitrag anzeigen

Benutzerbild von sk.Silvia
sk.Silvia

Registriert seit: 8. Feb 2006
Ort: Slovenia
90 Beiträge
 
Delphi 7 Personal
 
#1

TComportDriver

  Alt 3. Sep 2006, 12:20
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
  Mit Zitat antworten Zitat