RegulValve.SetFlowOp : RqrdFlowRangeRatio = 0.5, requiredFlowLo/HI -= Config.Formulas.GetCorrection(...), ver. 2.26.1679
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2017 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -17,6 +17,10 @@ namespace TBF.BenchControl.Elde.RegulValve
|
||||
return string.Format("SetFlowOp({0}, Qfrom={1}, Qto={2})", regulValve.Name, requiredFlowLo, requiredFlowHi);
|
||||
}
|
||||
|
||||
|
||||
public const double RqrdFlowRangeRatio = 0.5;
|
||||
|
||||
|
||||
/// Set by the constructor
|
||||
readonly ControlBoardDev controlBoard;
|
||||
readonly RegulValve regulValve;
|
||||
@@ -93,9 +97,11 @@ namespace TBF.BenchControl.Elde.RegulValve
|
||||
nominalFlow = flowMeter.NominalFlow;
|
||||
maximalFlow = nominalFlow * 1.25;
|
||||
|
||||
this.reqFlowAve = (requiredFlowLo + requiredFlowHi) / 2;
|
||||
this.requiredFlowLo = (0.7 * requiredFlowLo) + (0.3 * this.reqFlowAve); /// Move the lower limit 15% of the range up
|
||||
this.requiredFlowHi = (0.7 * requiredFlowHi) + (0.3 * this.reqFlowAve); /// Move the upper limit 15% of the range down
|
||||
double rdrdFlowLoBeforeCorr = requiredFlowLo - Config.Formulas.GetCorrection(requiredFlowLo, flowMeter.Corrections);
|
||||
double rdrdFlowHiBeforeCorr = requiredFlowHi - Config.Formulas.GetCorrection(requiredFlowHi, flowMeter.Corrections);
|
||||
this.reqFlowAve = (rdrdFlowLoBeforeCorr + rdrdFlowHiBeforeCorr) / 2;
|
||||
this.requiredFlowLo = (RqrdFlowRangeRatio * rdrdFlowLoBeforeCorr) + ((1 - RqrdFlowRangeRatio) * this.reqFlowAve); /// Move the lower limit a bit of the range up
|
||||
this.requiredFlowHi = (RqrdFlowRangeRatio * rdrdFlowHiBeforeCorr) + ((1 - RqrdFlowRangeRatio) * this.reqFlowAve); /// Move the upper limit a bit of the range down
|
||||
|
||||
if (flowBox == null) throw new ArgumentNullException("flowBox");
|
||||
this.flowBox = flowBox;
|
||||
@@ -174,12 +180,12 @@ namespace TBF.BenchControl.Elde.RegulValve
|
||||
|
||||
currentReqFlowLo = requiredFlowLo; /// Default lower limit
|
||||
currentReqFlowHi = requiredFlowHi; /// Default upper limit
|
||||
if (flow != 0)
|
||||
{
|
||||
flowBox.Val = flow;
|
||||
if (flow >= reqFlowAve) currentReqFlowHi = reqFlowAve; /// Decrease upper limit
|
||||
if (flow <= reqFlowAve) currentReqFlowLo = reqFlowAve; /// Increase lower limit
|
||||
}
|
||||
//if (flow != 0)
|
||||
//{
|
||||
// flowBox.Val = flow;
|
||||
// if (flow >= reqFlowAve) currentReqFlowHi = reqFlowAve; /// Decrease upper limit
|
||||
// if (flow <= reqFlowAve) currentReqFlowLo = reqFlowAve; /// Increase lower limit
|
||||
//}
|
||||
|
||||
flowWithinBoundsTime = 0;
|
||||
|
||||
|
||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.26.1675.0")]
|
||||
[assembly: AssemblyFileVersion("2.26.1675.0")]
|
||||
[assembly: AssemblyVersion("2.26.1679.0")]
|
||||
[assembly: AssemblyFileVersion("2.26.1679.0")]
|
||||
|
||||
Reference in New Issue
Block a user