|
Last change
on this file was 2, checked in by chronos, 13 years ago |
- Přidáno: Základní kostra projektu.
- Přidáno: Knihovna synapse.
|
|
File size:
876 bytes
|
| Line | |
|---|
| 1 | unit Unit1;
|
|---|
| 2 |
|
|---|
| 3 | interface
|
|---|
| 4 |
|
|---|
| 5 | uses
|
|---|
| 6 | Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
|---|
| 7 | SynaSer, StdCtrls, ExtCtrls;
|
|---|
| 8 |
|
|---|
| 9 | type
|
|---|
| 10 | TForm1 = class(TForm)
|
|---|
| 11 | Label1: TLabel;
|
|---|
| 12 | Edit1: TEdit;
|
|---|
| 13 | Label2: TLabel;
|
|---|
| 14 | Edit2: TEdit;
|
|---|
| 15 | Edit3: TEdit;
|
|---|
| 16 | Label3: TLabel;
|
|---|
| 17 | Button1: TButton;
|
|---|
| 18 | Bevel1: TBevel;
|
|---|
| 19 | Memo1: TMemo;
|
|---|
| 20 | procedure Button1Click(Sender: TObject);
|
|---|
| 21 | private
|
|---|
| 22 | { Private declarations }
|
|---|
| 23 | public
|
|---|
| 24 | { Public declarations }
|
|---|
| 25 | end;
|
|---|
| 26 |
|
|---|
| 27 | var
|
|---|
| 28 | Form1: TForm1;
|
|---|
| 29 |
|
|---|
| 30 | implementation
|
|---|
| 31 |
|
|---|
| 32 | {$R *.DFM}
|
|---|
| 33 |
|
|---|
| 34 | procedure TForm1.Button1Click(Sender: TObject);
|
|---|
| 35 | var
|
|---|
| 36 | ser:TBlockSerial;
|
|---|
| 37 | begin
|
|---|
| 38 | ser:=TBlockSerial.Create;
|
|---|
| 39 | ser.RaiseExcept:=True;
|
|---|
| 40 | try
|
|---|
| 41 | ser.Connect(Edit1.Text, StrToIntDef(Edit2.Text, 9600),8,'N',0,false,false);
|
|---|
| 42 | memo1.lines.text:=ser.ATCommand(Edit3.Text);
|
|---|
| 43 | finally
|
|---|
| 44 | ser.free;
|
|---|
| 45 | end;
|
|---|
| 46 | end;
|
|---|
| 47 |
|
|---|
| 48 | end.
|
|---|
| 49 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.