From b2099ad68caccc5a63beaa5a72a734c152c2943e Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Fri, 16 Apr 2021 15:22:11 +0200 Subject: [PATCH] Standing start/stop method fixed, ver. 3.1.1627 --- TBF/Properties/AssemblyInfo.cs | 4 +- .../StandingStartMassCollectionSeq.cs | 42 +++++++++++++------ 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index e45f4b630..5846a8d14 100644 --- a/TBF/Properties/AssemblyInfo.cs +++ b/TBF/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("3.1.1624.0")] -[assembly: AssemblyFileVersion("3.1.1624.0")] +[assembly: AssemblyVersion("3.1.1627.0")] +[assembly: AssemblyFileVersion("3.1.1627.0")] diff --git a/TBF/Rig/TestMethods/StandingStartMassCollection/StandingStartMassCollectionSeq.cs b/TBF/Rig/TestMethods/StandingStartMassCollection/StandingStartMassCollectionSeq.cs index 69eeec107..a8fc73eaf 100644 --- a/TBF/Rig/TestMethods/StandingStartMassCollection/StandingStartMassCollectionSeq.cs +++ b/TBF/Rig/TestMethods/StandingStartMassCollection/StandingStartMassCollectionSeq.cs @@ -360,9 +360,9 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection } while (!e.Contains(Event.FlowReached)); - /// - /// Flow is withing required range at this point - /// +/// +/// Flow is withing required range at this point +/// int flowSetTime = StateMachine.Time - flowSetTime0; @@ -440,16 +440,33 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection while (true); } - /// - /// Temperature is withing required range at this point - /// +/// +/// Temperature is withing required range at this point +/// IOperation testInProgress = cBrd.StandingStartStopTestOp(test, test.Qfrom, test.Qto, totalPulses, true); //----------------------------------------------------------------- Bridge.OnActivity(this, Strings.Stopping_flow_for_the_fixed_start); //----------------------------------------------------------------- - State.Create(string.Format("{0}({1}) : Closing the start/stop valve before the fixed start test", test.Method, test.Name)) + State.Create(string.Format("{0}({1}) : Stop flow regulation", test.Method, test.Name)) + .AddOperation(checkUiOp) + .AddOperations(readTempPressOps) + .EnterState(); + e = StateMachine.WaitRunDevsRunOps(); + if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + + State.Create(string.Format("{0}({1}) : Start the standing start/stop test", test.Method, test.Name)) + .AddOperation(checkUiOp) + .AddOperations(readTempPressOps) + .AddOperation(testInProgress) + .EnterState(); + e = StateMachine.WaitRunDevsRunOps(); + if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + + State.Create(string.Format("{0}({1}) : Close the start/stop valve before measuring the start mass", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperations(readTempPressOps) .AddOperation(testInProgress) @@ -457,7 +474,8 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection .EnterState(); do { e = StateMachine.WaitRunDevsRunOps(); - if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } + if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } + if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } } while (!e.Contains(Event.ValvesSet)); @@ -475,7 +493,7 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection if (heatMetersPath == null) LogProcessDataHeader(processDataLogger, "Start mass"); else LogProcessDataHeaderHeatMeters(processDataLogger, "Start mass"); - State.Create(string.Format("{0}({1}) : Measuring the start mass", test.Method, test.Name)) + State.Create(string.Format("{0}({1}) : Measure the start mass", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperations(readTempPressOps) .AddOperation(testInProgress) @@ -511,7 +529,7 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection { string[] startImages = new string[sensPath.RegisterReaders.Length]; - State state2 = State.Create(string.Format("{0}({1}) : Grabbing images", test.Method, test.Name)) + State state2 = State.Create(string.Format("{0}({1}) : Grab images", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperations(readTempPressOps) .AddOperation(testInProgress); @@ -542,7 +560,7 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection } Bridge.OnActivity(this, Strings.Enter_water_meter_data); - State.Create(string.Format("{0}({1}) : Entering begin-state", test.Method, test.Name)) + State.Create(string.Format("{0}({1}) : Enter start states of water meters", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperations(readTempPressOps) .AddOperation(testInProgress) @@ -689,7 +707,7 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection EndTime = (double)StateMachine.Time; TestEndTime = DateTime.Now; - State.Create(string.Format("{0}({1}) : Closing the start/stop valve at the end of the fixed start test", test.Method, test.Name)) + State.Create(string.Format("{0}({1}) : Closing the start/stop valve at the end of the standing start/stop test", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperations(readTempPressOps) .AddOperation(testInProgress)