………………………………
var
f1:file of byte;
tmp:byte;
sendbyte:array of byte
begin
setlength(sendbyte,16);
read(f1,tmp);
sendbyte:=tmp;
sj_fsr(sendcomm,sendbyte);
until eof(f1)=true;
closefile(f1);
end;
Function sj_fsr(dd:TMSComm;str_fs:array of byte):Boolean;//发送模块
var
i:Integer;
MyVariant: Variant;
begin
Try
MyVariant :=VarArrayCreate ([0,High(str_fs)-1], varByte);
for i:=0 to High(str_fs)-1 do
MyVariant:=str_fs;
dd.Output:=MyVariant;
repeat
i:=i+1;
until dd.outBufferCount=0;
Result:=True;
Except
Result:=False;
End;
end;