Zapne pumpu pred vypustanim aj pri ostatnych metodach
This commit is contained in:
parent
57a7510d05
commit
ce6214f631
@ -69,28 +69,46 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
|||||||
tstRslt.DoNotEvaluate = true;
|
tstRslt.DoNotEvaluate = true;
|
||||||
tstRslt.DoNotPublish = true;
|
tstRslt.DoNotPublish = true;
|
||||||
|
|
||||||
//------------------------------------------------
|
|
||||||
Bridge.OnActivity(this, Strings.Setting_the_flow);
|
|
||||||
//------------------------------------------------
|
|
||||||
int flowSetTime0 = StateMachine.Time;
|
int flowSetTime0 = StateMachine.Time;
|
||||||
float estFlowSetTime = 10.0f;
|
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);
|
if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower);
|
||||||
State.Create("Adjustment : Starting the pump")
|
|
||||||
.AddOperation(checkUiOp)
|
|
||||||
.AddOperation(cBrd.SetValvesOp(inPath.Pump, null))
|
|
||||||
.EnterState();
|
|
||||||
do
|
|
||||||
{
|
|
||||||
e = StateMachine.WaitRunDevsRunOps();
|
|
||||||
|
|
||||||
int flowSetTime = StateMachine.Time - flowSetTime0;
|
State.Create("Adjustment : 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);
|
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
|
||||||
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
|
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
|
||||||
|
|
||||||
if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; }
|
if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||||
}
|
}
|
||||||
while (!e.Contains(Event.ValvesSet));
|
while (!e.Contains(Event.TimerExpired));
|
||||||
|
|
||||||
|
|
||||||
|
State.Create("Adjustment : 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("Adjustment : Setting the flow")
|
State.Create("Adjustment : Setting the flow")
|
||||||
|
|||||||
@ -64,6 +64,48 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters
|
|||||||
Entities.TestResult tstRslt = new Entities.TestResult(test, repetitionNr, Entities.MetersKind.Combined);
|
Entities.TestResult tstRslt = new Entities.TestResult(test, repetitionNr, Entities.MetersKind.Combined);
|
||||||
|
|
||||||
|
|
||||||
|
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("CombinedMeters : 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("CombinedMeters : 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
|
||||||
{
|
{
|
||||||
///
|
///
|
||||||
@ -99,29 +141,6 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters
|
|||||||
|
|
||||||
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("CombinedMeters : 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("CombinedMeters : Setting the flow")
|
State.Create("CombinedMeters : Setting the flow")
|
||||||
.AddOperation(checkUiOp)
|
.AddOperation(checkUiOp)
|
||||||
|
|||||||
@ -62,6 +62,48 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
|||||||
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("FixedStartMassCollection : 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("FixedStartMassCollection : 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
|
||||||
{
|
{
|
||||||
///
|
///
|
||||||
@ -97,9 +139,6 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
|||||||
|
|
||||||
set_flow:
|
set_flow:
|
||||||
|
|
||||||
int flowSetTime0 = StateMachine.Time;
|
|
||||||
float estFlowSetTime = 10.0f;
|
|
||||||
|
|
||||||
//------------------------------------------------
|
//------------------------------------------------
|
||||||
Bridge.OnActivity(this, Strings.Setting_the_flow);
|
Bridge.OnActivity(this, Strings.Setting_the_flow);
|
||||||
//------------------------------------------------
|
//------------------------------------------------
|
||||||
|
|||||||
@ -59,6 +59,48 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
|
|||||||
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("ReferenceFlowmeterCalibration : 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("ReferenceFlowmeterCalibration : 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,29 +136,6 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
|
|||||||
|
|
||||||
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("ReferenceFlowmeterCalibration : 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("ReferenceFlowmeterCalibration : Setting the flow")
|
State.Create("ReferenceFlowmeterCalibration : Setting the flow")
|
||||||
.AddOperation(checkUiOp)
|
.AddOperation(checkUiOp)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user