曲线的添加
1、 选择趋势曲线控件及图示按钮等控件;
2、双击 ComboBox
下拉框,输入列表成员,输入脚本程序: #ComboBox2.ListClear();
SWITCH (#ComboBox.ListGetSelection(),0) CASE 0: #ComboBox2.ListaddItem(\温度曲线\ #ComboBox2.ListaddItem(\风压曲线\ #ComboBox2.ListaddItem(\振动曲线\ #ComboBox2.ListaddItem(\风速曲线\ #ComboBox2.ListaddItem(\风量曲线\ DEFAULT: ENDSWITCH 3、双击ComboBox2
下拉框点击,输入脚本程序:
if #ComboBox.GetWindowsText()==\一号风机\温度曲线\
then #ListBox.ListClear();
#ListBox.ListAddItem(\电机A相绕组温度曲线\ #ListBox.ListAddItem(\电机B相绕组温度曲线\ #ListBox.ListAddItem(\电机C相绕组温度曲线\ #ListBox.ListAddItem(\电机前轴温度曲线\ #ListBox.ListAddItem(\电机后轴温度曲线\ #ListBox.ListAddItem(\风机轴承温度1曲线\ #ListBox.ListAddItem(\风机轴承温度2曲线\ #ListBox.ListAddItem(\风机轴承温度3曲线\ #ListBox.ListAddItem(\风机轴承温度4曲线\
else if #ComboBox.GetWindowsText()==\一号风机\风
压曲线\
then #ListBox.ListClear();
#ListBox.ListAddItem(\风机静压曲线\ #ListBox.ListAddItem(\风机全压曲线\ #ListBox.ListAddItem(\风机动压曲线\
else if #ComboBox.GetWindowsText()==\一号风机\振动曲线\
then #ListBox.ListClear();
#ListBox.ListAddItem(\风机水平振动曲线\ #ListBox.ListAddItem(\风机垂直振动曲线\
else if #ComboBox.GetWindowsText()==\一号风机\风速曲线\
then #ListBox.ListClear();
#ListBox.ListAddItem(\风机风速曲线\
else if #ComboBox.GetWindowsText()==\一号风机\风量曲线\
then #ListBox.ListClear();
#ListBox.ListAddItem(\风机风量曲线\
else if #ComboBox.GetWindowsText()==\二号风机\温度曲线\
then #ListBox.ListClear();
#ListBox.ListAddItem(\电机A相绕组温度曲线\ #ListBox.ListAddItem(\电机B相绕组温度曲线\#ListBox.ListAddItem(\电机C相绕组温度曲线\ #ListBox.ListAddItem(\电机前轴温度曲线\#ListBox.ListAddItem(\电机后轴温度曲线\#ListBox.ListAddItem(\风机轴承温度1曲线\#ListBox.ListAddItem(\风机轴承温度2曲线\ #ListBox.ListAddItem(\风机轴承温度3曲线\#ListBox.ListAddItem(\风机轴承温度4曲线\
else if #ComboBox.GetWindowsText()==\二号风机\风压曲线\
then #ListBox.ListClear();
#ListBox.ListAddItem(\风机静压曲线\
#ListBox.ListAddItem(\风机全压曲线\#ListBox.ListAddItem(\风机动压曲线\
else if #ComboBox.GetWindowsText()==\二号风机\振动曲线\
then #ListBox.ListClear();
#ListBox.ListAddItem(\风机水平振动曲线\ #ListBox.ListAddItem(\风机垂直振动曲线\
else if #ComboBox.GetWindowsText()==\二号风机\风速曲线\
then #ListBox.ListClear();
#ListBox.ListAddItem(\风机风速曲线\
else if #ComboBox.GetWindowsText()==\二号风机\风量曲线\
then #ListBox.ListClear();
#ListBox.ListAddItem(\风机风量曲线\else #ListBox.ListClear();
endif endif endif endif endif endif endif endif endif endif
4、双击“显示所需曲线” 按钮左键动作中输入脚本程序:
if #ComboBox.GetWindowsText()==\一号风机\温度曲线\ then
FOR i = 0 TO 10 STEP 1
if #ListBox.IsCurSelection(i)==1 then SWITCH (i) CASE 0:
b1.desc=\CASE 1:
b1.desc=\CASE 2:
b1.desc=\CASE 3:
b1.desc=\CASE 4:
b1.desc=\CASE 5:
b1.desc=\CASE 6;
b1.desc=\CASE 7:
b1.desc=\CASE 8:
b1.desc=\DEFAULT:
ENDSWITCH
#SuperCurve.AddCurveEx(#ListBox.ListGetItem(i),$Curtime-60,60,b1.desc,0,150);
#SuperCurve.SetCurveAppearance(#SuperCurve.FindCurve(#ListBox.ListGetItem(i)),#ListBox.ListGetItem(i),Rand(255),0,0) endif NEXT endif
if #ComboBox.GetWindowsText()==\一号风机\风压曲线\ then
FOR i = 0 TO 5 STEP 1
if #ListBox.IsCurSelection(i)==1 then SWITCH (i) CASE 0:
b1.desc=\CASE 1:
b1.desc=\CASE 2:
b1.desc=\
DEFAULT:
ENDSWITCH
#SuperCurve.AddCurveEx(#ListBox.ListGetItem(i),$Curtime-60,60,b1.desc,0,5000);
#SuperCurve.SetCurveAppearance(#SuperCurve.FindCurve(#ListBox.ListGetItem(i)),#ListBox.ListGetItem(i),Rand(255),0,0) endif NEXT endif
if #ComboBox.GetWindowsText()==\一号风机\振动曲线\
then
FOR i = 0 TO 5 STEP 1
if #ListBox.IsCurSelection(i)==1 then SWITCH (i) CASE 0:
b1.desc=\CASE 1:
b1.desc=\
DEFAULT:
ENDSWITCH
#SuperCurve.AddCurveEx(#ListBox.ListGetItem(i),$Curtime-60,60,b1.desc,0,20);
#SuperCurve.SetCurveAppearance(#SuperCurve.FindCurve(#ListBox.ListGetItem(i)),#ListBox.ListGetItem(i),Rand(255),0,0) endif NEXT endif
if #ComboBox.GetWindowsText()==\一号风机\风速曲线\ then
FOR i = 0 TO 5 STEP 1
if #ListBox.IsCurSelection(i)==1 then SWITCH (i) CASE 0:
b1.desc=\DEFAULT:
ENDSWITCH
#SuperCurve.AddCurveEx(#ListBox.ListGetItem(i),$Curtime-60,60,b1.desc,0,20);
#SuperCurve.SetCurveAppearance(#SuperCurve.FindCurve(#ListBox.ListGetItem(i)),#ListBox.ListGetItem(i),Rand(255),0,0) endif NEXT endif
if #ComboBox.GetWindowsText()==\一号风机\风量曲线\ then
FOR i = 0 TO 5 STEP 1
if #ListBox.IsCurSelection(i)==1 then SWITCH (i) CASE 0:
b1.desc=\