RegulValve.SetFlowOp in progress
This commit is contained in:
parent
e2650736cd
commit
d4eb52d70e
@ -385,20 +385,24 @@ namespace TBF.BenchControl.Elde.RegulValve
|
||||
}
|
||||
else if (opState == OpState.SettingFlow)
|
||||
{
|
||||
///
|
||||
/// Repeated untill the required flow is reached
|
||||
///
|
||||
if ((currentReqFlowLo <= flow) && (flow <= currentReqFlowHi))
|
||||
/// Regulation valve is setting flow to the required value
|
||||
|
||||
if ((currentReqFlowLo <= flow) && (flow <= currentReqFlowHi))
|
||||
{
|
||||
if (flowWithinBoundsTime++ >= regulValve.FlowStableSec)
|
||||
/// Flow is within range
|
||||
|
||||
if (flowWithinBoundsTime++ >= regulValve.FlowStableSec)
|
||||
{
|
||||
if (regulValve.RegulValveCfg.StoredPositionReuse)
|
||||
/// Flow is within range for sufficiently long time
|
||||
|
||||
if (regulValve.RegulValveCfg.StoredPositionReuse)
|
||||
{
|
||||
float storedPosition;
|
||||
if (regulValve.Dict.TryGetValue(reqFlowAve, out storedPosition))
|
||||
{
|
||||
/// update the stored valve position
|
||||
StoreTargetPosition(reqFlowAve, (rvPosition + storedPosition) / 2.0f);
|
||||
|
||||
StoreTargetPosition(reqFlowAve, (rvPosition + storedPosition) / 2.0f);
|
||||
log.InfoFormat("Run(): rv#={0} reqFlow={1} pos={2}% stored={3} <--- Updating a stored position",
|
||||
regulValveNr, reqFlowAve, rvPosition.ToString("F1"), storedPosition);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user