procedure TForm1.sys_init(MAX:Double;MIN:Double;chennal_no:Integer;iXYPlot_temp:TiXYPlot);
var
index_max,index_min:Integer;
// i:Real;
begin
// StrToFloat()
index_max := iXYPlot_temp.AddLimit;
iXYPlot_temp.Limit[index_max].YAxisName:=iXYPlot_temp.Channel[chennal_no].YAxisName;
iXYPlot_temp.Limit[index_max].LineWidth := 1;
iXYPlot_temp.Limit[index_max].Style := iplsLiney;
iXYPlot_temp.Limit[index_max].Color := clRed;
iXYPlot_temp.Limit[index_max].LineStyle := psSolid;
iXYPlot_temp.Limit[index_max].Line1Position:=MAX;
//Result:=index_max;
index_min := iXYPlot_temp.AddLimit;
iXYPlot_temp.Limit[index_min].YAxisName:=iXYPlot_temp.Channel[chennal_no].YAxisName;
iXYPlot_temp.Limit[index_min].LineWidth := 1;
iXYPlot_temp.Limit[index_min].Style := iplsLiney;
iXYPlot_temp.Limit[index_min].Color := clRed;
iXYPlot_temp.Limit[index_min].LineStyle := psSolid;
iXYPlot_temp.Limit[index_min].Line1Position:=MIN;
end;
procedure TForm1.bar_create(value_channel_1:Double ; iPlot_temp:TiPlot ; getime_temp:TDateTime);
begin
try
//for i :=0 to count_temp-1 do
//begin
// 通道0的数据显示参数
iPlot_temp.Channel[0].DataStyle := ipdsFullFeature ;
iPlot_temp.Channel[0].TraceVisible := False;
iPlot_temp.Channel[0].BarEnabled := True;
iPlot_temp.Channel[0].BarWidth := 0.1 ;
iPlot_temp.Channel[0].BarPenUseChannelColor := False ;
iPlot_temp.Channel[0].AddXY(getime_temp+0.2, value_channel_1);
//通道1的数据显示参数
// end;
except
Application.MessageBox('数据建图出错','提示',0);
Exit;
end ;
end;
procedure TForm1.bar_create_0(value_channel_1:Double ; iPlot_temp:TiPlot ; getime_temp:TDateTime);
begin
try
iPlot_temp.Channel[1].DataStyle := ipdsFullFeature ;
iPlot_temp.Channel[1].TraceVisible := False;
iPlot_temp.Channel[1].BarEnabled := True;
iPlot_temp.Channel[1].BarWidth := 0.1 ;
iPlot_temp.Channel[1].BarPenUseChannelColor := False ;
iPlot_temp.Channel[1].AddXY(getime_temp+0.2, value_channel_1);
except
end
end;