S
sun100
Unregistered / Unconfirmed
GUEST, unregistred user!
我用的是SPCOMM,设计的目的是,:把现在所统计得的数量,发送到顾客显示屏幕上去.
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, SPComm;
type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
Comm1: TComm;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
Comm1.StartComm;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
strsend:string;
begin
if trim(edit1.Text)<>'' then
begin
strsend:=trim(edit1.Text);
comm1.WriteCommData(pchar(strsend),length(strsend));
end;
end;
怎么我在测试的时候,顾客显示屏上没有响应呢,(他们的频率,数据位,停止位,和校验位一致了),是什么原因呢
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, SPComm;
type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
Comm1: TComm;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
Comm1.StartComm;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
strsend:string;
begin
if trim(edit1.Text)<>'' then
begin
strsend:=trim(edit1.Text);
comm1.WriteCommData(pchar(strsend),length(strsend));
end;
end;
怎么我在测试的时候,顾客显示屏上没有响应呢,(他们的频率,数据位,停止位,和校验位一致了),是什么原因呢