recv401是接收回来的数组
procedure Tchartview.Timer1Timer(Sender: TObject);
var
j,i: integer;
begin
if combobox1.Text <> '' then
tmp := selectchan(StrToInt(combobox1.Text));
if (strtoint(combobox1.Text)>0) and (strtoint(combobox1.Text)<=16) then
if chartflag[1]=1 then
for j := 0 to 49do
begin
valcom1[1, j] := (recv401[j * 96 + 497 + (tmp.a - 1) * 6] * 256 +
recv401[j * 96 + 496 + (tmp.a - 1) * 6]);
series1.Add(valcom1[1, j]);
valload1[1, j] := (recv401[j * 96 + 499 + (tmp.a - 1) * 6] *
256 + recv401[j * 96 + 498 + (tmp.a - 1) * 6]);
series2.Add(valload1[1, j]);
valdis1[1, j] := (recv401[j * 96 + 501 + (tmp.a - 1) * 6] *
256 + recv401[j * 96 + 500 + (tmp.a - 1) * 6]);
series3.Add(valdis1[1, j]);
chartflag[1]:=0;
if chartview1 <> nil then
for i := 0 to high(chartview1)do
if (strtoint(chartview1.ComboBox1.Text)>0) and (strtoint(chartview1.ComboBox1.Text)<=16) then
chartflag[1]:=1
else
chartflag[1]:=0;
end;
if series1.Count > 2000 then
series1.clear;
timer1.Enabled := False;
end;