Bug fix in purging sequence when no RV-s
This commit is contained in:
@@ -481,18 +481,19 @@ namespace TBF.BenchControl.Sequences
|
||||
bool errorFlag = false;
|
||||
|
||||
///
|
||||
int lastStartedRV;
|
||||
for (lastStartedRV = 0; lastStartedRV < (rvPosOps.Count - 1); lastStartedRV++)
|
||||
{
|
||||
State stepStrt = State.Create(string.Format("SequenceBase.Transition() : Step {0}", step.ItemNr + 1))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(StateMachine.ControlBoard.SetValvesOp(Utils.ValvesOpen(step), Utils.ValvesClose(step)));
|
||||
for (int j = 0; j <= lastStartedRV; j++) stepStrt.AddOperation(rvPosOps[j]);
|
||||
stepStrt.EnterState();
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error) || e.Contains(Event.RegulValveTimeOut)) { errorFlag = true; break; }
|
||||
if (e.Contains(Event.UiCmdStop)) { stopFlag = true; break; }
|
||||
}
|
||||
int lastStartedRV = -1;
|
||||
for (int i = 0; i < rvPosOps.Count; i++)
|
||||
{
|
||||
State stepStrt = State.Create(string.Format("SequenceBase.Transition() : Step {0}", step.ItemNr + 1))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(StateMachine.ControlBoard.SetValvesOp(Utils.ValvesOpen(step), Utils.ValvesClose(step)));
|
||||
for (int j = 0; j <= i; j++) stepStrt.AddOperation(rvPosOps[j]);
|
||||
lastStartedRV = i;
|
||||
stepStrt.EnterState();
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error) || e.Contains(Event.RegulValveTimeOut)) { errorFlag = true; break; }
|
||||
if (e.Contains(Event.UiCmdStop)) { stopFlag = true; break; }
|
||||
}
|
||||
/// Max. valaue of lastStartedRV after exitting the loop is (rvPosOps.Count - 1)
|
||||
|
||||
if (!(stopFlag || errorFlag))
|
||||
|
||||
Reference in New Issue
Block a user