// SimpleCtrlScriptStart {invalid} main() { EP_setTrend(); } void EP_setTrend() { EP_setCurve("#1_1", $DP, "", "dpUnit", "autoscale"); time endTime = getCurrentTime(), startTime; startTime = endTime - 1800; //this.curveRemoveData("#1_1", endTime); this.curveRemoveInterval("#1_1", startTime, endTime); this.timeScaleVisibility(0,false,0); this.timeBegin(startTime); this.timeInterval(endTime-startTime); this.scrollPercent(2); delay(1); this.gotoNow; } void EP_setCurve(string sCurveName, string sDpe, string sLegendName, string sLegendUnit, string sCurveRange) { bool bAutoscale = false; dyn_float afMinMax; if(sLegendName == "dpComment") sLegendName = dpGetComment(sDpe); if(sLegendUnit == "dpUnit") sLegendUnit = dpGetUnit(sDpe); if(sCurveRange == "dpRange") { dpGet(sDpe+":_pv_range.._min", afMinMax[1], sDpe+":_pv_range.._max", afMinMax[2]); } else if(sCurveRange == "autoscale") { bAutoscale = true; afMinMax = makeDynFloat(0, 0); } else { afMinMax = strsplit(sCurveRange, '|'); } if(bAutoscale) setValue("", "curveAutoscale", sCurveName, bAutoscale); else setValue("", "curveMin", sCurveName, afMinMax[1], "curveMax", sCurveName, afMinMax[2], "curveAutoscale", sCurveName, bAutoscale); setValue("", "curveLegendName", sCurveName, sLegendName, "curveLegendUnit", sCurveName, sLegendUnit, "connectDirectly", sCurveName, sDpe+":_online.._value"); } // SimpleCtrlScript {EP_setTrend} // DP1 {System1:CondenserStatusSystem.RelativeHumidity} // Curve1 {#1_1} // Legend1 {} // Unit1 {dpUnit} // Range1 {autoscale} // SimpleCtrlScriptEnd {EP_setTrend}