Heat meters : Prompt message does not stop the sequence, disappears when conditions met, ver. 2.10.359
This commit is contained in:
+17
-21
@@ -107,22 +107,14 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
}
|
||||
while (!e.Contains(Event.ValvesSet));
|
||||
|
||||
///
|
||||
/// Display prompt to emerge temperature meters to appropriate baths for heat meters test
|
||||
///
|
||||
if (heatMetersTestParams != null && !string.IsNullOrEmpty(heatMetersTestParams.Prompt))
|
||||
{
|
||||
State.Create("FixedStartMassCollection : Show heat meters prompt (exchange temperature meters)")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(new Operations.MessageBoxOp(heatMetersTestParams.Prompt))
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
}
|
||||
while (!e.Contains(Event.OK));
|
||||
}
|
||||
///
|
||||
/// Optionally display prompt to emerge temperature meters to appropriate baths for heat meters test
|
||||
///
|
||||
IOperation heatMetersPrompt = null;
|
||||
if (heatMetersTestParams != null && !string.IsNullOrEmpty(heatMetersTestParams.Prompt))
|
||||
{
|
||||
heatMetersPrompt = new Operations.MessageBoxOp(heatMetersTestParams.Prompt);
|
||||
}
|
||||
|
||||
|
||||
if (!test.Emptying) /// If condition met => skip measuring and force emptying
|
||||
@@ -133,7 +125,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
State.Create("FixedStartMassCollection : Measuring the mass of water in the tank")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(outPath.Balance.ReadMassOp(ref Mass))
|
||||
.EnterState();
|
||||
.AddOperation(heatMetersPrompt)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
@@ -155,7 +148,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
///
|
||||
/// Empty the water tank
|
||||
///
|
||||
switch (EmptyTheTank(outPath.EmptyTankValve, outPath.Balance))
|
||||
switch (EmptyTheTank(outPath.EmptyTankValve, outPath.Balance, heatMetersPrompt))
|
||||
{
|
||||
case Event.Error: { retVal = Event.Error; goto stopTest; }
|
||||
case Event.UiCmdStop: { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
@@ -170,7 +163,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
State.Create("FixedStartMassCollection : Starting the pump")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(cBrd.SetValvesOp(inPath.Pump, null))
|
||||
.EnterState();
|
||||
.AddOperation(heatMetersPrompt)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
@@ -185,7 +179,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
State.Create("FixedStartMassCollection : Setting the flow")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, 600)) /// timeout = 10 min.
|
||||
.EnterState();
|
||||
.AddOperation(heatMetersPrompt)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
@@ -224,7 +219,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
.AddOperation(heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
|
||||
.AddOperation(heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
|
||||
.AddOperation(heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
|
||||
.EnterState();
|
||||
.AddOperation(heatMetersPrompt)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
|
||||
@@ -66,22 +66,16 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
TestProgressEventArgs.SetEstimatedTimes(new int[] { 1, 1, 1, 30, Convert.ToInt32(test.TstTime) + 15, 0, 0 });
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.JustStarted));
|
||||
|
||||
///
|
||||
/// Display prompt to emerge temperature meters to appropriate baths for heat meters test
|
||||
///
|
||||
if (heatMetersTestParams != null && !string.IsNullOrEmpty(heatMetersTestParams.Prompt))
|
||||
{
|
||||
State.Create("FixedStartMassCollection : Show heat meters prompt (exchange temperature meters)")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(new Operations.MessageBoxOp(heatMetersTestParams.Prompt))
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
}
|
||||
while (!e.Contains(Event.OK));
|
||||
}
|
||||
|
||||
///
|
||||
/// Optionally display prompt to emerge temperature meters to appropriate baths for heat meters test
|
||||
///
|
||||
IOperation heatMetersPrompt = null;
|
||||
if (heatMetersTestParams != null && !string.IsNullOrEmpty(heatMetersTestParams.Prompt))
|
||||
{
|
||||
heatMetersPrompt = new Operations.MessageBoxOp(heatMetersTestParams.Prompt);
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Setting_the_flow);
|
||||
@@ -94,7 +88,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
State.Create("FlyingStart : Starting the pump")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(cBrd.SetValvesOp(inPath.Pump, null))
|
||||
.EnterState();
|
||||
.AddOperation(heatMetersPrompt)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
@@ -109,6 +104,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
State.Create("FlyingStart : Setting the flow")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, 990)) /// timeout = 16.5 min.
|
||||
.AddOperation(heatMetersPrompt)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
@@ -143,13 +139,14 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
double Tw_last = 0;
|
||||
double Tc_last = 0;
|
||||
|
||||
State.Create("FixedStartMassCollection : Check temperature stabilized.")
|
||||
State.Create("FlyingStart : Check temperature stabilized.")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
|
||||
.AddOperation(heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
|
||||
.AddOperation(heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
|
||||
.AddOperation(heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
|
||||
.EnterState();
|
||||
.AddOperation(heatMetersPrompt)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
|
||||
+22
-23
@@ -106,22 +106,15 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
while (!e.Contains(Event.ValvesSet));
|
||||
}
|
||||
|
||||
///
|
||||
/// Display prompt to emerge temperature meters to appropriate baths for heat meters test
|
||||
///
|
||||
if (heatMetersTestParams != null && !string.IsNullOrEmpty(heatMetersTestParams.Prompt))
|
||||
{
|
||||
State.Create("FixedStartMassCollection : Show heat meters prompt (exchange temperature meters)")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(new Operations.MessageBoxOp(heatMetersTestParams.Prompt))
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
}
|
||||
while (!e.Contains(Event.OK));
|
||||
}
|
||||
///
|
||||
/// Optionally display prompt to emerge temperature meters to appropriate baths for heat meters test
|
||||
///
|
||||
IOperation heatMetersPrompt = null;
|
||||
if (heatMetersTestParams != null && !string.IsNullOrEmpty(heatMetersTestParams.Prompt))
|
||||
{
|
||||
heatMetersPrompt = new Operations.MessageBoxOp(heatMetersTestParams.Prompt);
|
||||
}
|
||||
|
||||
|
||||
if (inPath.Pump != null)
|
||||
{
|
||||
@@ -134,7 +127,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(cBrd.SetValvesOp(inPath.Pump, null))
|
||||
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
|
||||
.EnterState();
|
||||
.AddOperation(heatMetersPrompt)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
@@ -153,7 +147,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(new Operations.TimerOp(test.TimePump2StartV))
|
||||
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
|
||||
.EnterState();
|
||||
.AddOperation(heatMetersPrompt)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
@@ -172,7 +167,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(StateMachine.ControlBoard.SetValvesOp(benchPath.StopBFValve, null))
|
||||
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
|
||||
.EnterState();
|
||||
.AddOperation(heatMetersPrompt)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
@@ -189,7 +185,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(new Operations.TimerOp(test.TimeBeforeFlow))
|
||||
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
|
||||
.EnterState();
|
||||
.AddOperation(heatMetersPrompt)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
@@ -211,7 +208,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, 990)) /// timeout = 16.5 min.
|
||||
.EnterState();
|
||||
.AddOperation(heatMetersPrompt)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
@@ -245,13 +243,14 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
double Tw_last = 0;
|
||||
double Tc_last = 0;
|
||||
|
||||
State.Create("FixedStartMassCollection : Check temperature stabilized.")
|
||||
State.Create("FlyingStartMassCollection : Check temperature stabilized.")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
|
||||
.AddOperation(heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
|
||||
.AddOperation(heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
|
||||
.AddOperation(heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
|
||||
.EnterState();
|
||||
.AddOperation(heatMetersPrompt)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
|
||||
Reference in New Issue
Block a user