unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, OoMisc, AdPort, StdCtrls, ADTrmEmu;
type
TForm1 =
class(TForm)
Label1: TLabel;
ComPort: TApdComPort;
procedure ComPortTriggerAvail(CP: TObject; Count: Word);
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
telegram :
string;
implementation
{$R *.dfm}
procedure TForm1.ComPortTriggerAvail(CP: TObject; Count: Word);
var c: char;
i: integer;
begin
for i := 1
to ( count )
do
begin
c := ComPort.GetChar;
telegram := telegram + c;
end;
label1.Caption := telegram;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
ComPort.ComNumber := 1;
end;
end.