diff --git a/TestBenchFramework/BenchControl/Sequences/MainSeq.cs b/TestBenchFramework/BenchControl/Sequences/MainSeq.cs index fabb76238..3e01cd891 100644 --- a/TestBenchFramework/BenchControl/Sequences/MainSeq.cs +++ b/TestBenchFramework/BenchControl/Sequences/MainSeq.cs @@ -239,7 +239,7 @@ namespace TBF.BenchControl.Sequences cycle_or_test_selected: - if (WaitBeginFormClosed()) goto stop; /// Make sure the entry form is closed + if (WaitBeginFormClosed()) goto stop_within_cycle; /// Make sure the entry form is closed Bridge.Bench2UI(ButtonsEtc.StopBtnEn); /// Hide buttons @@ -290,7 +290,7 @@ namespace TBF.BenchControl.Sequences if (e.Contains(Event.ConfigurationError)) goto select_cycle_or_test; if (e.Contains(Event.Error)) goto error; if (e.Contains(Event.OpArgumentError)) goto config_error; - if (e.Contains(Event.UiCmdStop)) goto stop; + if (e.Contains(Event.UiCmdStop)) goto stop_within_cycle; } else { @@ -332,7 +332,7 @@ namespace TBF.BenchControl.Sequences if (e.Contains(Event.Error)) goto error; if (e.Contains(Event.OpArgumentError)) goto config_error; - if (e.Contains(Event.UiCmdStop)) goto stop; + if (e.Contains(Event.UiCmdStop)) goto stop_within_cycle; } else { @@ -449,6 +449,22 @@ namespace TBF.BenchControl.Sequences goto select_procedure; + stop_within_cycle: + //-------------------------------- + State.Create("MainSeq : Turning IDLE -> Closing the valves") + .AddOperation(checkUiOp) + .AddOperation(StateMachine.ControlBoard.SetValvesOp(StateMachine.DefaultValvesOpen, + StateMachine.DefaultValvesClose)) + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + if (e.Contains(Event.Error)) goto error; + } + while (!e.Contains(Event.ValvesSet)); + + goto select_cycle_or_test; + stop: //-------------------------------- State.Create("MainSeq : Turning IDLE -> Closing the valves") diff --git a/TestBenchFramework/Properties/AssemblyInfo.cs b/TestBenchFramework/Properties/AssemblyInfo.cs index 4bb88e62a..443faf061 100644 --- a/TestBenchFramework/Properties/AssemblyInfo.cs +++ b/TestBenchFramework/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("1.3.23.1")] -[assembly: AssemblyFileVersion("1.3.23.1")] +[assembly: AssemblyVersion("1.3.24.1")] +[assembly: AssemblyFileVersion("1.3.24.1")]