ДП_поясняк (1231259), страница 13
Текст из файла (страница 13)
try
ADC0:=copy(bs,3,4);
ADC1:=copy(bs,8,4);
ADC2:=copy(bs,13,4);
ADC3:=copy(bs,18,4);
ADC4:=copy(bs,23,4);
ADC5:=copy(bs,28,4);
ADC6:=copy(bs,33,4);
ADC7:=copy(bs,38,4);
ADC8:=copy(bs,43,4);
buf:=strtoint(ADC8);
if 0 in TIntegerSet(buf) then toolbutton5.ImageIndex:=5
else toolbutton5.ImageIndex:=4;
if 1 in TIntegerSet(buf) then toolbutton6.ImageIndex:=5
else toolbutton6.ImageIndex:=4;
if 2 in TIntegerSet(buf) then toolbutton7.ImageIndex:=5
else toolbutton7.ImageIndex:=4;
if 3 in TIntegerSet(buf) then toolbutton8.ImageIndex:=5
else toolbutton8.ImageIndex:=4;
if 4 in TIntegerSet(buf) then toolbutton9.ImageIndex:=5
else toolbutton9.ImageIndex:=4;
if 5 in TIntegerSet(buf) then toolbutton10.ImageIndex:=5
else toolbutton10.ImageIndex:=4;
if 6 in TIntegerSet(buf) then toolbutton11.ImageIndex:=5
else toolbutton11.ImageIndex:=4;
if 7 in TIntegerSet(buf) then toolbutton12.ImageIndex:=5
else toolbutton12.ImageIndex:=4;
Panel10.Caption:='t= '+ floattostrF(( (4.85/1024)*strtoint(ADC0)*100-273.15),fffixed,3,0)+' °C';
Panel3.Caption:=floattostrF( ((4.85/1024)*strtoint(ADC1)),fffixed,4,2 )+' В';
Panel4.Caption:=floattostrF( ((4.85/1024)*56*strtoint(ADC1)),fffixed,4,2 )+' В';
Panel5.Caption:=ADC3;
Panel6.Caption:=ADC4;
Panel7.Caption:=ADC5;
Panel8.Caption:=ADC6;
Panel9.Caption:=ADC7;
except
end;
end;
end;
procedure TForm1.ToolButton4Click(Sender: TObject);
begin
Com_conf.ShowModal;
end;
procedure TForm1.ToolButton3Click(Sender: TObject);
begin
zigconf.showmodal;
end;
procedure TForm1.CP1Click(Sender: TObject);
begin
TCP_conf.showmodal;
end;
procedure TForm1.Zigbee1Click(Sender: TObject);
begin
zigconf.showmodal;
end;
procedure TForm1.Button8Click(Sender: TObject);
begin
Afdataterminal1.ClearBuffer;
end;
end.















