Repettition nr. > 1 can be selected in the main sequence.
This commit is contained in:
@@ -678,7 +678,8 @@ namespace TBF.BenchControl.Sequences
|
|||||||
}
|
}
|
||||||
else if (selection == Selection.RestOfCycle)
|
else if (selection == Selection.RestOfCycle)
|
||||||
{
|
{
|
||||||
Test slctdTest = TBF.BenchControl.StateMachine.GetTest(selection);
|
int repetNr;
|
||||||
|
Test slctdTest = TBF.BenchControl.StateMachine.GetTest(selection, out repetNr);
|
||||||
if (slctdTest == null)
|
if (slctdTest == null)
|
||||||
{
|
{
|
||||||
UiBridge.Bridge.OnError(this, string.Format("No test specified"));
|
UiBridge.Bridge.OnError(this, string.Format("No test specified"));
|
||||||
@@ -766,7 +767,7 @@ namespace TBF.BenchControl.Sequences
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
e = testMethodSequence.Execute(test, outerLoopMode, outerLoopCounter);
|
e = testMethodSequence.Execute(test, outerLoopMode, (outerLoopMode ? outerLoopCounter: repetNr));
|
||||||
|
|
||||||
if (e.Contains(Event.ConfigurationError))
|
if (e.Contains(Event.ConfigurationError))
|
||||||
{
|
{
|
||||||
@@ -820,7 +821,8 @@ namespace TBF.BenchControl.Sequences
|
|||||||
}
|
}
|
||||||
else /// if (selection == Selection.Test)
|
else /// if (selection == Selection.Test)
|
||||||
{
|
{
|
||||||
Test test = TBF.BenchControl.StateMachine.GetTest(selection);
|
int repetNr;
|
||||||
|
Test test = TBF.BenchControl.StateMachine.GetTest(selection, out repetNr);
|
||||||
if (test == null)
|
if (test == null)
|
||||||
{
|
{
|
||||||
UiBridge.Bridge.OnError(this, string.Format("No test specified"));
|
UiBridge.Bridge.OnError(this, string.Format("No test specified"));
|
||||||
@@ -861,7 +863,7 @@ namespace TBF.BenchControl.Sequences
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
e = testMethodSequence.Execute(test, false, 0);
|
e = testMethodSequence.Execute(test, false, repetNr);
|
||||||
|
|
||||||
if (e.Contains(Event.Error)) goto error;
|
if (e.Contains(Event.Error)) goto error;
|
||||||
if (e.Contains(Event.OpArgumentError)) goto config_error;
|
if (e.Contains(Event.OpArgumentError)) goto config_error;
|
||||||
|
|||||||
@@ -414,8 +414,9 @@ namespace TBF.BenchControl
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="selection">Selection.Q1, .Q2, .Q3 or .Test</param>
|
/// <param name="selection">Selection.Q1, .Q2, .Q3 or .Test</param>
|
||||||
/// <returns>The selected test or null</returns>
|
/// <returns>The selected test or null</returns>
|
||||||
public static Config.Entities.Test GetTest(Sequences.MainSeq.Selection selection)
|
public static Config.Entities.Test GetTest(Sequences.MainSeq.Selection selection, out int repetNr)
|
||||||
{
|
{
|
||||||
|
repetNr = 1;
|
||||||
if ((selection == Sequences.MainSeq.Selection.Q1) && (Tests.Count >= 1))
|
if ((selection == Sequences.MainSeq.Selection.Q1) && (Tests.Count >= 1))
|
||||||
{
|
{
|
||||||
return Tests[0];
|
return Tests[0];
|
||||||
@@ -432,9 +433,17 @@ namespace TBF.BenchControl
|
|||||||
{
|
{
|
||||||
foreach (var test in Tests)
|
foreach (var test in Tests)
|
||||||
{
|
{
|
||||||
if (Utils.TestTitle(test, 1).Equals(UiBridge.Bridge.SelectedTestName)) return test;
|
for (int i = 1; i <= test.Repeats; i++)
|
||||||
|
{
|
||||||
|
if (Utils.TestTitle(test, i).Equals(UiBridge.Bridge.SelectedTestName))
|
||||||
|
{
|
||||||
|
repetNr = i;
|
||||||
|
return test;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -51,7 +51,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
|||||||
|
|
||||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null);
|
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null);
|
||||||
|
|
||||||
int repetitionNr = outerLoopMode ? outerLoopCounter : 1; /// First test: repetitionNr=1
|
int repetitionNr = Math.Max(1, outerLoopCounter); /// First test: repetitionNr = 1
|
||||||
|
|
||||||
|
|
||||||
if (test.Volume >= outPath.Scale.Capacity * Constants.TankFullFactor)
|
if (test.Volume >= outPath.Scale.Capacity * Constants.TankFullFactor)
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
|||||||
/// int refPulses = (int)(timeSec * (2000.0f * targetFlow / pOut.FlowMeter.NominalFlow));
|
/// int refPulses = (int)(timeSec * (2000.0f * targetFlow / pOut.FlowMeter.NominalFlow));
|
||||||
int totalPulses = (int)(test.Volume / LtrPerRefPulse + 0.5f);
|
int totalPulses = (int)(test.Volume / LtrPerRefPulse + 0.5f);
|
||||||
|
|
||||||
int repetitionNr = outerLoopMode ? outerLoopCounter : 1; /// First test: repetitionNr=1
|
int repetitionNr = Math.Max(1, outerLoopCounter); /// First test: repetitionNr = 1
|
||||||
|
|
||||||
//====================================
|
//====================================
|
||||||
// Transition or SetRoute - Start
|
// Transition or SetRoute - Start
|
||||||
|
|||||||
+1
-1
@@ -118,7 +118,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
|||||||
LtrPerRefPulse = outPath.FlowMeter.LtrPerPulse;
|
LtrPerRefPulse = outPath.FlowMeter.LtrPerPulse;
|
||||||
int totalPulses = (int)(test.Volume / LtrPerRefPulse + 0.5f);
|
int totalPulses = (int)(test.Volume / LtrPerRefPulse + 0.5f);
|
||||||
|
|
||||||
int repetitionNr = outerLoopMode ? outerLoopCounter : 1; /// First test: repetitionNr = 1
|
int repetitionNr = Math.Max(1, outerLoopCounter); /// First test: repetitionNr = 1
|
||||||
|
|
||||||
|
|
||||||
if (test.Volume > outPath.Scale.Capacity * Constants.TankFullFactor)
|
if (test.Volume > outPath.Scale.Capacity * Constants.TankFullFactor)
|
||||||
|
|||||||
Reference in New Issue
Block a user