RegulValveTandem op SetFlowOp should be functional, to be tested
This commit is contained in:
@@ -21,16 +21,14 @@ namespace TBF.BenchControl.Elde.RegulValveTandem
|
||||
readonly RegulValve.RegulValve regulValve;
|
||||
readonly RegulValve.RegulValve fixedRV;
|
||||
|
||||
public int Idx1 { get { return regulValve.Idx1; } } /// 1..7
|
||||
public int DacValueClosed { get { return regulValve.DacValueClosed; } } /// 0..1023
|
||||
public int DacValueOpen { get { return regulValve.DacValueOpen; } } /// 0..1023
|
||||
///
|
||||
public int StableTime { get { return RegulValveTandemCfg.StableTime; } } /// 0=200ms, step=50ms, max. 1500ms (max.26)
|
||||
readonly float fixedPctLo; /// [%]
|
||||
readonly float fixedPctHi; /// [%]
|
||||
|
||||
public int FlowStableSec { get { return RegulValveTandemCfg.FlowStableSec; } } /// 0..60 sec
|
||||
///
|
||||
public float Position
|
||||
{
|
||||
get { return controlBoard.RValvePosition(Idx1); }
|
||||
get { return regulValve.Position; }
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +43,9 @@ namespace TBF.BenchControl.Elde.RegulValveTandem
|
||||
fixedRV = (RegulValve.RegulValve)TbfComponents.FindComponent(RegulValveTandemCfg.ParentName, components);
|
||||
if (fixedRV == null) throw new Exception("Cannot find fixed RV");
|
||||
|
||||
fixedPctLo = Math.Max(0.0f, RegulValveTandemCfg.FixedRVPosition - 3.0f);
|
||||
fixedPctHi = Math.Min(100.0f, RegulValveTandemCfg.FixedRVPosition + 3.0f);
|
||||
|
||||
this.dict = new Dictionary<float, float>();
|
||||
|
||||
log.Debug(this.ToString());
|
||||
@@ -61,9 +62,11 @@ namespace TBF.BenchControl.Elde.RegulValveTandem
|
||||
/// <param name="measuredFlow">Measured flow [m3/h]</param>
|
||||
/// <param name="timeout">Timeout in [s]</param>
|
||||
/// <returns>SetFlowOp instance</returns>
|
||||
public IOperation SetFlowOp(GenericDevices.IFlowMeter flowMeter, float requiredFlowLo, float requiredFlowHi, float pidCoef, FloatBox measuredFlow, int timeout)
|
||||
public IOperation SetFlowOp(GenericDevices.IFlowMeter flowMeter, float requiredFlowLo, float requiredFlowHi,
|
||||
float pidCoef, FloatBox measuredFlow, int timeout)
|
||||
{
|
||||
return new SetFlowOp(controlBoard, this, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, measuredFlow, timeout);
|
||||
return new SetFlowOp(controlBoard, regulValve, fixedRV, fixedPctLo, fixedPctHi,
|
||||
flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, measuredFlow, timeout);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -76,9 +79,11 @@ namespace TBF.BenchControl.Elde.RegulValveTandem
|
||||
/// <param name="measuredFlow">Measured flow [m3/h]</param>
|
||||
/// <param name="timeout">Timeout in [s]</param>
|
||||
/// <returns>SetFlowOp instance</returns>
|
||||
public IOperation SetFlowAndMeasureOp(GenericDevices.IFlowMeter flowMeter, float requiredFlowLo, float requiredFlowHi, float pidCoef, FloatBox measuredFlow, int timeout, float filterConstant)
|
||||
public IOperation SetFlowAndMeasureOp(GenericDevices.IFlowMeter flowMeter, float requiredFlowLo, float requiredFlowHi,
|
||||
float pidCoef, FloatBox measuredFlow, int timeout, float filterConstant)
|
||||
{
|
||||
return new SetFlowOp(controlBoard, this, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, measuredFlow, timeout, true);
|
||||
return new SetFlowOp(controlBoard, regulValve, fixedRV, fixedPctLo, fixedPctHi,
|
||||
flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, measuredFlow, timeout, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -90,12 +95,12 @@ namespace TBF.BenchControl.Elde.RegulValveTandem
|
||||
/// <returns>SetPositionOp instance</returns>
|
||||
public IOperation SetRegulValvePositionOp(float pctLo, float pctHi, int timeoutMs)
|
||||
{
|
||||
return new SetRegulValvePositionOp(controlBoard, this, pctLo, pctHi, timeoutMs);
|
||||
return null;
|
||||
}
|
||||
|
||||
public IOperation ChangeRegulValvePositionOp(float timePulseSec)
|
||||
{
|
||||
return new ChangeRegulValvePositionOp(controlBoard, this, timePulseSec);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user