diff --git a/TBF/BenchControl/Sequences/MainSeq.cs b/TBF/BenchControl/Sequences/MainSeq.cs index faa60df18..c1f8ed8fc 100644 --- a/TBF/BenchControl/Sequences/MainSeq.cs +++ b/TBF/BenchControl/Sequences/MainSeq.cs @@ -700,7 +700,7 @@ namespace TBF.BenchControl.Sequences !StateMachine.GetPaths(test, (StateMachine.Procedure.MetersKind == MetersKind.HeatMeter), out inPath, out benchPath, out outPath, out sensPath, out heatMetersPath, - out transitionBefore, out transitionAfter, + out transitionBefore, out transitionBetween, out transitionAfter, out errorMsg)) { UiBridge.Bridge.OnError(this, errorMsg); @@ -727,7 +727,7 @@ namespace TBF.BenchControl.Sequences !StateMachine.GetPaths(test, (StateMachine.Procedure.MetersKind == MetersKind.HeatMeter), out inPath, out benchPath, out outPath, out sensPath, out heatMetersPath, - out transitionBefore, out transitionAfter, + out transitionBefore, out transitionBetween, out transitionAfter, out errorMsg)) { UiBridge.Bridge.OnError(this, errorMsg); @@ -764,9 +764,11 @@ namespace TBF.BenchControl.Sequences /// e = testMethod.Execute(test, outerLoopMode, (outerLoopMode ? outerLoopCounter: repetNr)); /// Event rsltTransBefore = Event.Done; + Event rsltTransBetween = Event.Done; Event rsltTransAfter = Event.Done; { int timeEstTransBefore = testMethod.DoTransitions() ? GetTransitionTimeEst(transitionBefore) : 1; + int timeEstTransBetween = testMethod.DoTransitions() ? GetTransitionTimeEst(transitionBetween) : 1; int timeEstTransAfter = testMethod.DoTransitions() ? GetTransitionTimeEst(transitionAfter) : 1; TestProgressEventArgs.SetEstimatedTimes(new int[] { 1, timeEstTransBefore, 1, 30, 0, Convert.ToInt32(test.TstTime) + 15, timeEstTransAfter, 0 }); @@ -781,6 +783,7 @@ namespace TBF.BenchControl.Sequences bool currentTestFinished = true; if (rsltTransBefore == Event.Done) { + bool doOneMoreRepetition = false; do { log.InfoFormat("Test {0}: Execute(., {1}, {2})", test.Name, repetNr, isOuterLoopMode || repetNr == test.Repeats); @@ -801,8 +804,16 @@ namespace TBF.BenchControl.Sequences if (e.Contains(Event.OuterLoopStart)) break; /// Do not repeat OuterLoopStart test in this loop if (currentTestFinished && !isOuterLoopMode) repetNr++; + + doOneMoreRepetition = currentTestFinished && !isOuterLoopMode && (repetNr <= test.Repeats); + + if (testMethod.DoTransitions() && doOneMoreRepetition) + { + rsltTransBetween = Transition(transitionBetween, TransitionContext.BeforeTest); /// Transition or SetRoute - start of test + log.InfoFormat("Test {0}: Transition({1}, BetweenTests) returned {2}", test.Name, (transitionBetween == null ? "null" : transitionBetween.Name), rsltTransBetween); + } } - while (currentTestFinished && !isOuterLoopMode && repetNr <= test.Repeats); + while ((rsltTransBetween == Event.Done) && doOneMoreRepetition); if (currentTestFinished && !isOuterLoopMode && repetNr > test.Repeats) repetNr = 1; /// Reset repetNr } @@ -815,7 +826,7 @@ namespace TBF.BenchControl.Sequences } } - if (rsltTransBefore == Event.Error || e.Contains(Event.Error)) + if (rsltTransBefore == Event.Error || rsltTransBetween == Event.Error|| e.Contains(Event.Error)) { isOuterLoopMode = false; goto error; @@ -882,8 +893,8 @@ namespace TBF.BenchControl.Sequences StateMachine.GetPaths(dfrrdData.Test, (StateMachine.Procedure.MetersKind == MetersKind.HeatMeter), out inPath, out benchPath, out outPath, out sensPath, out heatMetersPath, - out transitionBefore, out transitionAfter, - out errorMsg); + out transitionBefore, out transitionBetween, out transitionAfter, + out errorMsg); ITestMethodWith2ndPass testMethod = TbfComponents.FindComponent(dfrrdData.Test.Method) as ITestMethodWith2ndPass; @@ -929,7 +940,7 @@ namespace TBF.BenchControl.Sequences !StateMachine.GetPaths(test, (StateMachine.Procedure.MetersKind == MetersKind.HeatMeter), out inPath, out benchPath, out outPath, out sensPath, out heatMetersPath, - out transitionBefore, out transitionAfter, + out transitionBefore, out transitionBetween, out transitionAfter, out errorMsg)) { UiBridge.Bridge.OnError(this, errorMsg); @@ -959,6 +970,7 @@ namespace TBF.BenchControl.Sequences Event rsltTransAfter = Event.Done; { int timeEstTransBefore = testMethod.DoTransitions() ? GetTransitionTimeEst(transitionBefore) : 1; + int timeEstTransBetween = testMethod.DoTransitions() ? GetTransitionTimeEst(transitionBetween) : 1; int timeEstTransAfter = testMethod.DoTransitions() ? GetTransitionTimeEst(transitionAfter) : 1; TestProgressEventArgs.SetEstimatedTimes(new int[] { 1, timeEstTransBefore, 1, 30, 0, Convert.ToInt32(test.TstTime) + 15, timeEstTransAfter, 0 }); diff --git a/TBF/BenchControl/Sequences/SequenceBase.cs b/TBF/BenchControl/Sequences/SequenceBase.cs index 4ada4d525..d821a1dfe 100644 --- a/TBF/BenchControl/Sequences/SequenceBase.cs +++ b/TBF/BenchControl/Sequences/SequenceBase.cs @@ -58,6 +58,7 @@ namespace TBF.BenchControl.Sequences protected static BenchControl.HeatMetersPath heatMetersPath; protected static TransitionSequence transitionBefore; + protected static TransitionSequence transitionBetween; protected static TransitionSequence transitionAfter; diff --git a/TBF/BenchControl/StateMachine.cs b/TBF/BenchControl/StateMachine.cs index c4fd46dd0..74fcc181f 100644 --- a/TBF/BenchControl/StateMachine.cs +++ b/TBF/BenchControl/StateMachine.cs @@ -602,6 +602,7 @@ namespace TBF.BenchControl out MetersPath pmtrs, out HeatMetersPath phmtrs, out TransitionSequence transitionBefore, + out TransitionSequence transitionBetween, out TransitionSequence transitionAfter, out string errorMsg) { @@ -610,7 +611,8 @@ namespace TBF.BenchControl pout = null; phmtrs = null; transitionBefore = null; - transitionAfter = null; + transitionBetween = null; + transitionAfter = null; foreach (var path in feedingPaths) { @@ -654,7 +656,8 @@ namespace TBF.BenchControl foreach (var tr in TransitionSequences) { if (tr.Name == test.RelTransBefore) transitionBefore = tr; - if (tr.Name == test.TransitionAfter) transitionAfter = tr; + if (tr.Name == test.RelTransBetween) transitionBetween = tr; + if (tr.Name == test.TransitionAfter) transitionAfter = tr; } if (pout.Scale == null) diff --git a/TBF/ProcedureDlg.cs b/TBF/ProcedureDlg.cs index f5bf95b6b..24d73e4d3 100644 --- a/TBF/ProcedureDlg.cs +++ b/TBF/ProcedureDlg.cs @@ -1149,6 +1149,7 @@ namespace TBF HeatMeterSensors, #endif TrnStart, + TrnBetween, TrnStop, ColumnsCount } @@ -1168,7 +1169,8 @@ namespace TBF lv.Columns.Add(new ColumnHeader { Text = Strings.Heat_meter_sensors, Width = 110 }); #endif lv.Columns.Add(new ColumnHeader { Text = Strings.TransitionStart_chdr, Width = 100 }); - lv.Columns.Add(new ColumnHeader { Text = Strings.TransitionEnd_chdr, Width = 100 }); + lv.Columns.Add(new ColumnHeader { Text = Strings.TransitionBetween_chdr, Width = 100 }); + lv.Columns.Add(new ColumnHeader { Text = Strings.TransitionEnd_chdr, Width = 100 }); processEditors = new Control[] { @@ -1181,8 +1183,9 @@ namespace TBF #if HEAT_METERS new ComboBox(), /// Heat meters #endif - new ComboBox(), /// TransitionStart - new ComboBox(), /// TransitionEnd + new ComboBox(), /// Transition-Start + new ComboBox(), /// Transition-Between + new ComboBox(), /// Transition-End }; foreach (var path in feedingPaths) ((ComboBox)processEditors[(int)ProcessClmn.Feeding]).Items.Add(path.Name); @@ -1194,11 +1197,13 @@ namespace TBF #endif ((ComboBox)processEditors[(int)ProcessClmn.TrnStart]).Items.Add("---"); + ((ComboBox)processEditors[(int)ProcessClmn.TrnBetween]).Items.Add("---"); ((ComboBox)processEditors[(int)ProcessClmn.TrnStop]).Items.Add("---"); foreach (var trans in transitionSequences) { ((ComboBox)processEditors[(int)ProcessClmn.TrnStart]).Items.Add(trans.Name); - ((ComboBox)processEditors[(int)ProcessClmn.TrnStop]).Items.Add(trans.Name); + ((ComboBox)processEditors[(int)ProcessClmn.TrnBetween]).Items.Add(trans.Name); + ((ComboBox)processEditors[(int)ProcessClmn.TrnStop]).Items.Add(trans.Name); } foreach (var ctrl in processEditors) @@ -1234,6 +1239,7 @@ namespace TBF lvi.SubItems.Add(test.HeatMetersPath); #endif lvi.SubItems.Add(string.IsNullOrEmpty(test.RelTransBefore) ? "---" : test.RelTransBefore); + lvi.SubItems.Add(string.IsNullOrEmpty(test.RelTransBetween) ? "---" : test.RelTransBetween); lvi.SubItems.Add(string.IsNullOrEmpty(test.TransitionAfter) ? "---" : test.TransitionAfter); processListViewEx.Items.Add(lvi); @@ -1285,7 +1291,11 @@ namespace TBF { entity.RelTransBefore = lvi.SubItems[(int)ProcessClmn.TrnStart].Text.Equals("---") ? string.Empty : lvi.SubItems[(int)ProcessClmn.TrnStart].Text; } - if ((processEditors[(int)ProcessClmn.TrnStop] as ComboBox).Items.Contains(lvi.SubItems[(int)ProcessClmn.TrnStop].Text)) + if ((processEditors[(int)ProcessClmn.TrnBetween] as ComboBox).Items.Contains(lvi.SubItems[(int)ProcessClmn.TrnBetween].Text)) + { + entity.RelTransBetween = lvi.SubItems[(int)ProcessClmn.TrnBetween].Text.Equals("---") ? string.Empty : lvi.SubItems[(int)ProcessClmn.TrnBetween].Text; + } + if ((processEditors[(int)ProcessClmn.TrnStop] as ComboBox).Items.Contains(lvi.SubItems[(int)ProcessClmn.TrnStop].Text)) { entity.TransitionAfter = lvi.SubItems[(int)ProcessClmn.TrnStop].Text.Equals("---") ? string.Empty : lvi.SubItems[(int)ProcessClmn.TrnStop].Text; } @@ -1360,6 +1370,7 @@ namespace TBF ((e.SubItem == (int)ProcessClmn.Output) && !(processEditors[(int)ProcessClmn.Output] as ComboBox).Items.Contains(e.DisplayText)) || ((e.SubItem == (int)ProcessClmn.Sensor) && !(processEditors[(int)ProcessClmn.Sensor] as ComboBox).Items.Contains(e.DisplayText)) || ((e.SubItem == (int)ProcessClmn.TrnStart) && !(processEditors[(int)ProcessClmn.TrnStart] as ComboBox).Items.Contains(e.DisplayText)) || + ((e.SubItem == (int)ProcessClmn.TrnBetween) && !(processEditors[(int)ProcessClmn.TrnBetween] as ComboBox).Items.Contains(e.DisplayText)) || ((e.SubItem == (int)ProcessClmn.TrnStop) && !(processEditors[(int)ProcessClmn.TrnStop] as ComboBox).Items.Contains(e.DisplayText))) { e.DisplayText = e.Item.SubItems[e.SubItem].Text; diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index b2ddfd1ae..97118af7c 100644 --- a/TBF/Properties/AssemblyInfo.cs +++ b/TBF/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.18.1062.0")] -[assembly: AssemblyFileVersion("2.18.1062.0")] +[assembly: AssemblyVersion("2.18.1063.0")] +[assembly: AssemblyFileVersion("2.18.1063.0")] diff --git a/TBF/Resources/Strings.Designer.cs b/TBF/Resources/Strings.Designer.cs index 3caec56b6..181c30941 100644 --- a/TBF/Resources/Strings.Designer.cs +++ b/TBF/Resources/Strings.Designer.cs @@ -4924,7 +4924,16 @@ namespace TBF.Resources { } /// - /// Looks up a localized string similar to Transition - End. + /// Looks up a localized string similar to Between rep. - transition. + /// + internal static string TransitionBetween_chdr { + get { + return ResourceManager.GetString("TransitionBetween_chdr", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to End - transiiton. /// internal static string TransitionEnd_chdr { get { @@ -4942,7 +4951,7 @@ namespace TBF.Resources { } /// - /// Looks up a localized string similar to Transition - Start. + /// Looks up a localized string similar to Start - transition. /// internal static string TransitionStart_chdr { get { diff --git a/TBF/Resources/Strings.cs.resx b/TBF/Resources/Strings.cs.resx index 76e4146c2..8ab3861e4 100644 --- a/TBF/Resources/Strings.cs.resx +++ b/TBF/Resources/Strings.cs.resx @@ -1009,13 +1009,13 @@ Tol. červený. [%] - Přechod - Konec + Konec - přechod Přechody - Přechod - Start + Start - přechod Typ @@ -1341,4 +1341,7 @@ Ručné zadávání výšky hladiny + + Mezi opak. - přechod + \ No newline at end of file diff --git a/TBF/Resources/Strings.resx b/TBF/Resources/Strings.resx index 7ad02e3ea..9485398f2 100644 --- a/TBF/Resources/Strings.resx +++ b/TBF/Resources/Strings.resx @@ -758,10 +758,10 @@ Emergency STOP - Transition - End + End - transiiton - Transition - Start + Start - transition Starting the cameras @@ -1879,4 +1879,7 @@ Manual level measurement + + Between rep. - transition + \ No newline at end of file diff --git a/TODO.txt b/TODO.txt index b1a7bf9f4..deab60840 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,9 +1,12 @@ Vyroba: -- Zobrazit vysledok 1. testu ihned - Odlogovat zo zvysenej urovne po 10 min. Igor -- cerveny RV +- kalibracia meraca hladiny +- stabilne meranie hladiny +- niekedy neprepne diverter +- sekvencia medzi opakovanymi skuskami + - testovanie citlivosti vodomera - zivotnostne: menit prietok 15 min. - diverter test (prietok 1x, vahy bud vzdy alebo 1x)