From d2b745dd8ebafe34b909dfedafc4107b716a80f7 Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Thu, 8 Jun 2017 16:55:24 +0200 Subject: [PATCH] Temperature Tup and Tdown can be checked in Adjustment, Endurance, FlyingStart, FlyingStartMassCollection and FixedStart methods, ver. 2.14.573 --- Config/Properties/AssemblyInfo.cs | 4 +-- Results/Properties/AssemblyInfo.cs | 4 +-- .../TestMethods/Adjustment/AdjustmentSeq.cs | 30 +++++++++++++++++++ .../TestMethods/Endurance/EnduranceSeq.cs | 28 +++++++++++++++++ .../FixedStartMassCollectionSeq.cs | 25 ++++++++++++++++ .../TestMethods/FlyingStart/FlyingStartSeq.cs | 25 ++++++++++++++++ .../FlyingStartMassCollectionSeq.cs | 25 ++++++++++++++++ TestBenchFramework/Properties/AssemblyInfo.cs | 4 +-- 8 files changed, 139 insertions(+), 6 deletions(-) diff --git a/Config/Properties/AssemblyInfo.cs b/Config/Properties/AssemblyInfo.cs index fe3f1ae82..fab3f3ac9 100644 --- a/Config/Properties/AssemblyInfo.cs +++ b/Config/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.14.572.0")] -[assembly: AssemblyFileVersion("2.14.572.0")] +[assembly: AssemblyVersion("2.14.573.0")] +[assembly: AssemblyFileVersion("2.14.573.0")] diff --git a/Results/Properties/AssemblyInfo.cs b/Results/Properties/AssemblyInfo.cs index 236401db7..5b989132f 100644 --- a/Results/Properties/AssemblyInfo.cs +++ b/Results/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.14.572.0")] -[assembly: AssemblyFileVersion("2.14.572.0")] +[assembly: AssemblyVersion("2.14.573.0")] +[assembly: AssemblyFileVersion("2.14.573.0")] diff --git a/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs b/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs index 6db063a11..90c7ce11b 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs @@ -163,7 +163,37 @@ namespace TBF.BenchControl.TestMethods.Adjustment while (!e.Contains(Event.FlowReached)); flow_set: + int flowSetTime = StateMachine.Time - flowSetTime0; + + if (test.DoControlWaterTemp && benchPath.TempMtrUp != null && benchPath.TempMtrDown != null) + { + //--------------------------------------------------- + Bridge.OnActivity(this, Strings.Setting_temperature); + //--------------------------------------------------- + + State.Create(string.Format("{0}({1}) : Wait until the water temperature is within limits", test.Method, test.Name)) + .AddOperation(checkUiOp) + .AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp)) + .AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown)) + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + if (e.Contains(Event.Next)) goto temperature_set; + + if (TempUp.Val >= test.TempLimLo && TempUp.Val <= test.TempLimHi && + TempDown.Val >= test.TempLimLo && TempDown.Val <= test.TempLimHi) + { + goto temperature_set; + } + } + while (true); + } + + temperature_set: + /// Show the modeless dialog with error indication Program.MainWnd.Invoke(new ErrorsFormDlgt(OpenWMErrorsForm), new object[] { this, WaterMeters }); diff --git a/TestBenchFramework/BenchControl/TestMethods/Endurance/EnduranceSeq.cs b/TestBenchFramework/BenchControl/TestMethods/Endurance/EnduranceSeq.cs index 004208b12..ddfcf8475 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Endurance/EnduranceSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Endurance/EnduranceSeq.cs @@ -140,6 +140,34 @@ namespace TBF.BenchControl.TestMethods.Endurance double currentFlow = RefFlow.Val; + if (test.DoControlWaterTemp && benchPath.TempMtrUp != null && benchPath.TempMtrDown != null) + { + //--------------------------------------------------- + Bridge.OnActivity(this, Strings.Setting_temperature); + //--------------------------------------------------- + + State.Create(string.Format("{0}({1}) : Wait until the water temperature is within limits", test.Method, test.Name)) + .AddOperation(checkUiOp) + .AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp)) + .AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown)) + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + if (e.Contains(Event.Next)) goto temperature_set; + + if (TempUp.Val >= test.TempLimLo && TempUp.Val <= test.TempLimHi && + TempDown.Val >= test.TempLimLo && TempDown.Val <= test.TempLimHi) + { + goto temperature_set; + } + } + while (true); + } + + temperature_set: + if (test.Part <= 3) /// 0 = measurement /// 1 = measurement through line 1 /// 2 = measurement through line 2 diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs index f6ab6c44f..922526ee2 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs @@ -282,6 +282,31 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection } while (true); } + else if (test.DoControlWaterTemp && benchPath.TempMtrUp != null && benchPath.TempMtrDown != null) + { + //--------------------------------------------------- + Bridge.OnActivity(this, Strings.Setting_temperature); + //--------------------------------------------------- + + State.Create(string.Format("{0}({1}) : Wait until the water temperature is within limits", test.Method, test.Name)) + .AddOperation(checkUiOp) + .AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp)) + .AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown)) + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + if (e.Contains(Event.Next)) goto temperature_set; + + if (TempUp.Val >= test.TempLimLo && TempUp.Val <= test.TempLimHi && + TempDown.Val >= test.TempLimLo && TempDown.Val <= test.TempLimHi) + { + goto temperature_set; + } + } + while (true); + } temperature_set: diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs index b100052e6..7fa075537 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs @@ -240,6 +240,31 @@ namespace TBF.BenchControl.TestMethods.FlyingStart } while (true); } + else if (test.DoControlWaterTemp && benchPath.TempMtrUp != null && benchPath.TempMtrDown != null) + { + //--------------------------------------------------- + Bridge.OnActivity(this, Strings.Setting_temperature); + //--------------------------------------------------- + + State.Create(string.Format("{0}({1}) : Wait until the water temperature is within limits", test.Method, test.Name)) + .AddOperation(checkUiOp) + .AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp)) + .AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown)) + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + if (e.Contains(Event.Next)) goto temperature_set; + + if (TempUp.Val >= test.TempLimLo && TempUp.Val <= test.TempLimHi && + TempDown.Val >= test.TempLimLo && TempDown.Val <= test.TempLimHi) + { + goto temperature_set; + } + } + while (true); + } temperature_set: diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs index e5dbba1ea..52dee059b 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs @@ -368,6 +368,31 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection } while (true); } + else if (test.DoControlWaterTemp && benchPath.TempMtrUp != null && benchPath.TempMtrDown != null) + { + //--------------------------------------------------- + Bridge.OnActivity(this, Strings.Setting_temperature); + //--------------------------------------------------- + + State.Create(string.Format("{0}({1}) : Wait until the water temperature is within limits", test.Method, test.Name)) + .AddOperation(checkUiOp) + .AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp)) + .AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown)) + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + if (e.Contains(Event.Next)) goto temperature_set; + + if (TempUp.Val >= test.TempLimLo && TempUp.Val <= test.TempLimHi && + TempDown.Val >= test.TempLimLo && TempDown.Val <= test.TempLimHi) + { + goto temperature_set; + } + } + while (true); + } temperature_set: diff --git a/TestBenchFramework/Properties/AssemblyInfo.cs b/TestBenchFramework/Properties/AssemblyInfo.cs index 54ab71464..3315367d9 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.14.572.1")] -[assembly: AssemblyFileVersion("2.14.572.1")] +[assembly: AssemblyVersion("2.14.573.1")] +[assembly: AssemblyFileVersion("2.14.573.1")]