More comments in SetFlowOp

This commit is contained in:
Milan Hanajik 2015-02-01 15:07:15 +01:00
parent ae5abde1e6
commit 0238a96975

View File

@ -200,6 +200,9 @@ namespace TBF.BenchControl.Elde.RegulValve
if (opState == OpState.ValveMoveToPosition)
{
///
/// Done once, issues an appropriate ValveMove(...) command
///
controlBoard.ValveMove(regulValveNr, RegulValveMode.TargetPosition,
new float[2] { targetPositionLo, targetPositionHi },
regulValve.StableTime);
@ -209,6 +212,9 @@ namespace TBF.BenchControl.Elde.RegulValve
}
else if (opState == OpState.SettingPosition)
{
///
/// Repeated untill position is reached
///
if ((targetPositionLo <= rvPosition) && (rvPosition <= targetPositionHi))
{
opState = OpState.ValveMoveToFlow;
@ -217,6 +223,9 @@ namespace TBF.BenchControl.Elde.RegulValve
}
else if (opState == OpState.ValveMoveToFlow)
{
///
/// Done once, issues an appropriate ValveMove(...) command
///
if (reqFlowLo >= reqFlowHi || reqFlowLo > nominalFlow || reqFlowHi <= 0)
{
return Event.OpArgumentError;
@ -236,6 +245,9 @@ namespace TBF.BenchControl.Elde.RegulValve
}
else if (opState == OpState.SettingFlow)
{
///
/// Repeated untill the required flow is reached
///
if ((reqFlowLo <= flow) && (flow <= reqFlowHi))
{
if (flowWithinBoundsTime++ >= regulValve.FlowStableSec)