Zapne pumpu pred vypustanim
This commit is contained in:
+42
-41
@@ -59,6 +59,48 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
|
|||||||
Entities.TestResult tstRslt = new Entities.TestResult(test, repetitionNr, Entities.MetersKind.Single);
|
Entities.TestResult tstRslt = new Entities.TestResult(test, repetitionNr, Entities.MetersKind.Single);
|
||||||
|
|
||||||
|
|
||||||
|
int flowSetTime0 = StateMachine.Time;
|
||||||
|
float estFlowSetTime = 10.0f;
|
||||||
|
|
||||||
|
//------------------------------------------------
|
||||||
|
Bridge.OnActivity(this, Strings.Setting_the_flow);
|
||||||
|
//------------------------------------------------
|
||||||
|
if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower);
|
||||||
|
|
||||||
|
State.Create("FlyingStartCollectionMethod : Starting the pump")
|
||||||
|
.AddOperation(checkUiOp)
|
||||||
|
.AddOperation(new Operations.TimerOp(5))
|
||||||
|
.EnterState();
|
||||||
|
do
|
||||||
|
{
|
||||||
|
e = StateMachine.WaitRunDevsRunOps();
|
||||||
|
|
||||||
|
int flowSetTime = StateMachine.Time - flowSetTime0;
|
||||||
|
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
|
||||||
|
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
|
||||||
|
|
||||||
|
if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||||
|
}
|
||||||
|
while (!e.Contains(Event.TimerExpired));
|
||||||
|
|
||||||
|
|
||||||
|
State.Create("FlyingStartCollectionMethod : Starting the pump")
|
||||||
|
.AddOperation(checkUiOp)
|
||||||
|
.AddOperation(cBrd.SetValvesOp(inPath.Pump, null))
|
||||||
|
.EnterState();
|
||||||
|
do
|
||||||
|
{
|
||||||
|
e = StateMachine.WaitRunDevsRunOps();
|
||||||
|
|
||||||
|
int flowSetTime = StateMachine.Time - flowSetTime0;
|
||||||
|
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
|
||||||
|
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
|
||||||
|
|
||||||
|
if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||||
|
}
|
||||||
|
while (!e.Contains(Event.ValvesSet));
|
||||||
|
|
||||||
|
|
||||||
if (!test.Emptying) /// If condition met => skip measuring and force emptying
|
if (!test.Emptying) /// If condition met => skip measuring and force emptying
|
||||||
{
|
{
|
||||||
///
|
///
|
||||||
@@ -94,47 +136,6 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
|
|||||||
|
|
||||||
set_flow:
|
set_flow:
|
||||||
|
|
||||||
int flowSetTime0 = StateMachine.Time;
|
|
||||||
float estFlowSetTime = 10.0f;
|
|
||||||
|
|
||||||
//------------------------------------------------
|
|
||||||
Bridge.OnActivity(this, Strings.Setting_the_flow);
|
|
||||||
//------------------------------------------------
|
|
||||||
if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower);
|
|
||||||
|
|
||||||
State.Create("FlyingStartCollectionMethod : Starting the pump")
|
|
||||||
.AddOperation(checkUiOp)
|
|
||||||
.AddOperation(new Operations.TimerOp(5))
|
|
||||||
.EnterState();
|
|
||||||
do
|
|
||||||
{
|
|
||||||
e = StateMachine.WaitRunDevsRunOps();
|
|
||||||
|
|
||||||
int flowSetTime = StateMachine.Time - flowSetTime0;
|
|
||||||
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
|
|
||||||
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
|
|
||||||
|
|
||||||
if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; }
|
|
||||||
}
|
|
||||||
while (!e.Contains(Event.TimerExpired));
|
|
||||||
|
|
||||||
|
|
||||||
State.Create("FlyingStartCollectionMethod : Starting the pump")
|
|
||||||
.AddOperation(checkUiOp)
|
|
||||||
.AddOperation(cBrd.SetValvesOp(inPath.Pump, null))
|
|
||||||
.EnterState();
|
|
||||||
do
|
|
||||||
{
|
|
||||||
e = StateMachine.WaitRunDevsRunOps();
|
|
||||||
|
|
||||||
int flowSetTime = StateMachine.Time - flowSetTime0;
|
|
||||||
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
|
|
||||||
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
|
|
||||||
|
|
||||||
if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; }
|
|
||||||
}
|
|
||||||
while (!e.Contains(Event.ValvesSet));
|
|
||||||
|
|
||||||
//--------------------------------
|
//--------------------------------
|
||||||
State.Create("FlyingStartCollectionMethod : Setting the flow")
|
State.Create("FlyingStartCollectionMethod : Setting the flow")
|
||||||
.AddOperation(checkUiOp)
|
.AddOperation(checkUiOp)
|
||||||
|
|||||||
Reference in New Issue
Block a user