T
TIGER@DELPHI
Unregistered / Unconfirmed
GUEST, unregistred user!
var:
sbuf:array[0..7] of byte;
sbuf[0]:=byte($1C); //帧头
sbuf[1]:=byte($1); //帧头
sbuf[2]:=byte($0); //命令号
sbuf[3]:=byte($63);
sbuf[4]:=byte($0);
sbuf[5]:=byte($0);
sbuf[6]:=byte($FF); //帧尾
sbuf[7]:=byte($81); //帧头
原来是这样做的用SPCOMM:
for i:=0 to 7 do
begin
delay(0.0001);
if not form1.comm1.writecommdata(@sbuf,1) then
begin
commflg:=false;
break;
end;
请问如何用MSCOMM来实现发送?万分跪谢!
sbuf:array[0..7] of byte;
sbuf[0]:=byte($1C); //帧头
sbuf[1]:=byte($1); //帧头
sbuf[2]:=byte($0); //命令号
sbuf[3]:=byte($63);
sbuf[4]:=byte($0);
sbuf[5]:=byte($0);
sbuf[6]:=byte($FF); //帧尾
sbuf[7]:=byte($81); //帧头
原来是这样做的用SPCOMM:
for i:=0 to 7 do
begin
delay(0.0001);
if not form1.comm1.writecommdata(@sbuf,1) then
begin
commflg:=false;
break;
end;
请问如何用MSCOMM来实现发送?万分跪谢!