diff --git a/TestBenchFramework/BenchControl/Operations/SetAllRegulValvesOp.cs b/TestBenchFramework/BenchControl/Operations/SetAllRegulValvesOp.cs index 1b154a3aa..42e2556a5 100644 --- a/TestBenchFramework/BenchControl/Operations/SetAllRegulValvesOp.cs +++ b/TestBenchFramework/BenchControl/Operations/SetAllRegulValvesOp.cs @@ -13,33 +13,27 @@ namespace TBF.BenchControl.Operations private static readonly ILog log = LogManager.GetLogger(typeof(SetAllRegulValvesOp)); public override string ToString() { return string.Format("SetAllRegulValvesOp()"); } - IList regulValves; int rvCount; IOperation[] setRVPosOps; - public SetAllRegulValvesOp(IList regulValves, string encodedPositions, int timeout) + public SetAllRegulValvesOp(IList regulValves, IList positions, int timeout) { - if (regulValves == null) throw new ArgumentNullException("regulValves"); - this.regulValves = regulValves; - rvCount = regulValves.Count; - - // Parse the positions - float[] positions = new float[rvCount]; - string[] rvPosStr = (encodedPositions != null) ? encodedPositions.Split(new char[] { ';' }) : new string[0]; - for (int i = 0; i < Math.Min(rvCount, rvPosStr.Length); i++) + if (regulValves == null || regulValves.Count == 0) { - float posPct; - if (float.TryParse(rvPosStr[i], out posPct) && posPct >= 0 && posPct <= 100.0f) - { - positions[i] = posPct; - } + rvCount = 0; } - setRVPosOps = new IOperation[rvCount]; - for (int i = 0; i < rvCount; i++) + else { - float posLo = Math.Max(positions[i] - 5.0f, 0); - float posHi = Math.Min(positions[i] + 5.0f, 100.0f); - setRVPosOps[i] = regulValves[i].SetRegulValvePositionOp(posLo, posHi, timeout); + rvCount = regulValves.Count; + if (positions == null || positions.Count != rvCount) throw new ArgumentNullException("positions"); + + setRVPosOps = new IOperation[rvCount]; + for (int i = 0; i < rvCount; i++) + { + float posLo = Math.Max(positions[i] - 3.0f, 0); + float posHi = Math.Min(positions[i] + 3.0f, 100.0f); + setRVPosOps[i] = regulValves[i].SetRegulValvePositionOp(posLo, posHi, timeout); + } } } @@ -60,6 +54,7 @@ namespace TBF.BenchControl.Operations { Event evnt = setRVPosOps[i].Run(); if (evnt == Event.Error) anyError = true; + else if (evnt == Event.OpArgumentError) anyTimeout = true; else if (evnt == Event.RegulValveTimeOut) anyTimeout = true; else if (evnt != Event.PositionReached) allDone = false; } diff --git a/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs b/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs index a60266054..01cf4be8c 100644 --- a/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs +++ b/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs @@ -337,8 +337,8 @@ namespace TBF.BenchControl.Sequences } else { - float lo = Math.Max(0, allRegvPositions[i] - 0.05f); - float hi = Math.Min(100.0f, allRegvPositions[i] + 0.05f); + float lo = Math.Max(0, allRegvPositions[i] - 3.0f); + float hi = Math.Min(100.0f, allRegvPositions[i] + 3.0f); rvPosOps.Add(RegulValves[i].SetRegulValvePositionOp(lo, hi, 60)); rvPosStr.Add(string.Format("RV{0}.SetRegulValvePositionOp({1}, {2}, 60s)", i, lo, hi)); } diff --git a/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs b/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs index 41b0fe11a..279efd9ec 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs @@ -94,42 +94,53 @@ namespace TBF.BenchControl.TestMethods.Adjustment Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); int flowSetTime0 = StateMachine.Time; - //------------------------------------------------ + //------------------------------------------------ + Bridge.OnActivity(this, Strings.Starting_the_pump); + //------------------------------------------------ + if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower); + /// + State.Create("Adjustment : Starting the pump") + .AddOperation(checkUiOp) + .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) + .AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60)) + .AddOperation(inPath.Pump != null ? cBrd.SetValvesOp(inPath.Pump, null) : null) + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } + + } + while (e.Contains(Event.ValvesBusy) || !e.Contains(Event.AllPositionsReached)); + + + if (test.TimeBeforeFlow > 0) + { + State.Create("Adjustment : Waiting before flow setting process starts") + .AddOperation(checkUiOp) + .AddOperation(new Operations.TimerOp(test.TimeBeforeFlow)) + .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + } + while (!e.Contains(Event.TimerExpired)); + } + + + //------------------------------------------------ Bridge.OnActivity(this, Strings.Setting_the_flow); //------------------------------------------------ - if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower); - - State.Create("Adjustment : Waiting 5 sec") - .AddOperation(checkUiOp) - .AddOperation(new Operations.TimerOp(5)) - .EnterState(); - do - { - e = StateMachine.WaitRunDevsRunOps(); - Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - - if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; } - } - while (!e.Contains(Event.TimerExpired)); - - - State.Create("Adjustment : Starting the pump") - .AddOperation(checkUiOp) - .AddOperation(cBrd.SetValvesOp(inPath.Pump, null)) - .EnterState(); - do - { - e = StateMachine.WaitRunDevsRunOps(); - Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - - if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; } - } - while (!e.Contains(Event.ValvesSet)); - - //-------------------------------- - State.Create("Adjustment : Setting the flow") + State.Create("Adjustment : Setting the flow") .AddOperation(checkUiOp) .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, 600)) /// timeout = 10 min. .EnterState(); diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs index b3475a056..d7b0aa5af 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs @@ -73,12 +73,22 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); int flowSetTime0 = StateMachine.Time; + + /// + /// Optionally display prompt to emerge temperature meters to appropriate baths for heat meters test + /// + IOperation heatMetersPromptOp = null; + if (heatMetersTestParams != null && !string.IsNullOrEmpty(heatMetersTestParams.Prompt)) + { + heatMetersPromptOp = new Operations.MessageBoxOp(heatMetersTestParams.Prompt); + } + //------------------------------------------------ - Bridge.OnActivity(this, Strings.Setting_the_flow); + Bridge.OnActivity(this, Strings.Starting_the_pump); //------------------------------------------------ if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower); - State.Create("FixedStartMassCollection : Starting the pump") + State.Create("FixedStartMassCollection : Waiting before starting the pump") .AddOperation(checkUiOp) .AddOperation(new Operations.TimerOp(5)) .EnterState(); @@ -91,11 +101,13 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } } while (!e.Contains(Event.TimerExpired)); - - + /// State.Create("FixedStartMassCollection : Starting the pump") .AddOperation(checkUiOp) - .AddOperation(cBrd.SetValvesOp(inPath.Pump, null)) + .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) + .AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60)) + .AddOperation(heatMetersPromptOp) + .AddOperation(inPath.Pump != null ? cBrd.SetValvesOp(inPath.Pump, null) : null) .EnterState(); do { @@ -104,17 +116,10 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } - } - while (!e.Contains(Event.ValvesSet)); + if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } - /// - /// 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); - } + } + while (e.Contains(Event.ValvesBusy) || !e.Contains(Event.AllPositionsReached)); if (!test.Emptying) /// If condition met => skip measuring and force emptying @@ -125,7 +130,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection State.Create("FixedStartMassCollection : Measuring the mass of water in the tank") .AddOperation(checkUiOp) .AddOperation(outPath.Balance.ReadMassOp(ref Mass)) - .AddOperation(heatMetersPrompt) + .AddOperation(heatMetersPromptOp) .EnterState(); do { @@ -148,7 +153,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection /// /// Empty the water tank /// - switch (EmptyTheTank(outPath.EmptyTankValve, outPath.Balance, heatMetersPrompt)) + switch (EmptyTheTank(outPath.EmptyTankValve, outPath.Balance, heatMetersPromptOp)) { case Event.Error: { retVal = Event.Error; goto stopTest; } case Event.UiCmdStop: { retVal = Event.UiCmdStop; goto stopTest; } @@ -163,7 +168,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection State.Create("FixedStartMassCollection : Starting the pump") .AddOperation(checkUiOp) .AddOperation(cBrd.SetValvesOp(inPath.Pump, null)) - .AddOperation(heatMetersPrompt) + .AddOperation(heatMetersPromptOp) .EnterState(); do { @@ -179,7 +184,7 @@ 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. - .AddOperation(heatMetersPrompt) + .AddOperation(heatMetersPromptOp) .EnterState(); do { @@ -219,7 +224,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection .AddOperation(heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2)) .AddOperation(heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1)) .AddOperation(heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2)) - .AddOperation(heatMetersPrompt) + .AddOperation(heatMetersPromptOp) .EnterState(); do { diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs index ce75b9bad..ac5aa6449 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs @@ -137,32 +137,35 @@ namespace TBF.BenchControl.TestMethods.FlyingStart heatMetersPromptOp = new Operations.MessageBoxOp(heatMetersTestParams.Prompt); } + //------------------------------------------------ + Bridge.OnActivity(this, Strings.Starting_the_pump); + //------------------------------------------------ + if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower); + /// + State.Create("FlyingStart : Starting the pump") + .AddOperation(checkUiOp) + .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) + .AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60)) + .AddOperation(heatMetersPromptOp) + .AddOperation(inPath.Pump != null ? cBrd.SetValvesOp(inPath.Pump, null) : null) + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } + + } + while (e.Contains(Event.ValvesBusy) || !e.Contains(Event.AllPositionsReached)); //------------------------------------------------ Bridge.OnActivity(this, Strings.Setting_the_flow); //------------------------------------------------ - - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - int flowSetTime0 = StateMachine.Time; - - if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower); - State.Create("FlyingStart : Starting the pump") - .AddOperation(checkUiOp) - .AddOperation(cBrd.SetValvesOp(inPath.Pump, null)) - .AddOperation(heatMetersPromptOp) - .EnterState(); - do - { - e = StateMachine.WaitRunDevsRunOps(); - Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - - if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; } - } - while (!e.Contains(Event.ValvesSet)); - - //-------------------------------- - State.Create("FlyingStart : Setting the flow") + int flowSetTime0 = StateMachine.Time; + 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(heatMetersPromptOp) diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs index 1642a1762..8e717d032 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs @@ -177,51 +177,28 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection heatMetersPromptOp = new Operations.MessageBoxOp(heatMetersTestParams.Prompt); } + //------------------------------------------------ + Bridge.OnActivity(this, Strings.Starting_the_pump); + //------------------------------------------------ + if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower); /// - /// Start the pump, set feeding regulation valves - /// - IList startFeedingOperations = new List(); - if (inPath.Pump != null) startFeedingOperations.Add(cBrd.SetValvesOp(inPath.Pump, null)); - - //for (int i = 0; i < inPath.RegulValves.Count; i++) - //{ - // GenericDevices.IRegulValve rv = inPath.RegulValves[i]; - // float position = inPath.RegulValvesPct[i]; - // if (rv.IsCoax) - // { - // startFeedingOperations.Add(rv.SetRegulValvePositionOp(position, position, 60)); - // } - // else - // { - // float lo = Math.Max(0, position - 2.0f); - // float hi = Math.Min(100.0f, position + 2.0f); - // startFeedingOperations.Add(rv.SetRegulValvePositionOp(lo, hi, 60)); - // } - //} - - if (startFeedingOperations.Count > 0) + State.Create("FlyingStartMassCollection : Starting the pump") + .AddOperation(checkUiOp) + .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) + .AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60)) + .AddOperation(heatMetersPromptOp) + .AddOperation(inPath.Pump != null ? cBrd.SetValvesOp(inPath.Pump, null) : null) + .EnterState(); + do { - //------------------------------------------------ - Bridge.OnActivity(this, Strings.Starting_the_pump); - //------------------------------------------------ - if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower); - /// - State.Create("FlyingStartMassCollection : Starting the pump") - .AddOperation(checkUiOp) - .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) - .AddOperation(heatMetersPromptOp) - .AddOperations(startFeedingOperations) - .EnterState(); - do - { - e = StateMachine.WaitRunDevsRunOps(); - Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + e = StateMachine.WaitRunDevsRunOps(); + Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); - if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } - } - while (!e.Contains(Event.ValvesSet)); + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } } + while (e.Contains(Event.ValvesBusy) || !e.Contains(Event.AllPositionsReached)); if (test.TimePump2StartV > 0) diff --git a/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs b/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs index 23589bb59..7084f19af 100644 --- a/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs @@ -60,18 +60,21 @@ namespace TBF.BenchControl.TestMethods.LeakTest State.Create("LeakTest : Starting the pump") .AddOperation(checkUiOp) - .AddOperation(cBrd.SetValvesOp(inPath.Pump, null)) .AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn)) .AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut)) .AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp)) .AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown)) - .EnterState(); + .AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60)) + .AddOperation(inPath.Pump != null ? cBrd.SetValvesOp(inPath.Pump, null) : null) + .EnterState(); do { e = StateMachine.WaitRunDevsRunOps(); if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; } - } - while (e.Contains(Event.ValvesBusy)); + if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } + } + while (e.Contains(Event.ValvesBusy) || !e.Contains(Event.AllPositionsReached)); + //------------------------------------------------ Bridge.OnActivity(this, Strings.Setting_the_water_pressure); diff --git a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs index a969a99df..84a6cb625 100644 --- a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs @@ -61,18 +61,21 @@ namespace TBF.BenchControl.TestMethods.PMaxTest State.Create("PMaxTest : Starting the pump") .AddOperation(checkUiOp) - .AddOperation(cBrd.SetValvesOp(inPath.Pump, null)) - .AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn)) - .AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut)) - .AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp)) - .AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown)) + .AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn)) + .AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut)) + .AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp)) + .AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown)) + .AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60)) + .AddOperation(inPath.Pump != null ? cBrd.SetValvesOp(inPath.Pump, null) : null) .EnterState(); do { e = StateMachine.WaitRunDevsRunOps(); - if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; } + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } } - while (e.Contains(Event.ValvesBusy)); + while (e.Contains(Event.ValvesBusy) || !e.Contains(Event.AllPositionsReached)); + //------------------------------------------------ Bridge.OnActivity(this, Strings.Setting_the_water_pressure); diff --git a/TestBenchFramework/Properties/AssemblyInfo.cs b/TestBenchFramework/Properties/AssemblyInfo.cs index d27691dfa..2b7f345be 100644 --- a/TestBenchFramework/Properties/AssemblyInfo.cs +++ b/TestBenchFramework/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.11.365.1")] -[assembly: AssemblyFileVersion("2.11.365.1")] +[assembly: AssemblyVersion("2.11.367.1")] +[assembly: AssemblyFileVersion("2.11.367.1")] diff --git a/clean.bat b/clean.bat index 017db0897..4a15536ba 100644 --- a/clean.bat +++ b/clean.bat @@ -1,5 +1,7 @@ rmdir /s /q Config\bin rmdir /s /q Config\obj +rmdir /s /q DeviceTest\bin +rmdir /s /q DeviceTest\obj rmdir /s /q Results\bin rmdir /s /q Results\obj rmdir /s /q ResultsBrowser\bin