(1) Stopping a cycle after ErrorFlags STOP, (2) Bug fix in R.Entities.MeterTestRslt, ver. 2.26.1681

This commit is contained in:
Milan Hanajik 2021-06-24 13:57:31 +02:00
parent 4f9b07ba20
commit e1d3be7e56
31 changed files with 201 additions and 98 deletions

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
/// Copyright (c) 2013-2021 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@ -30,8 +30,10 @@ namespace Results.Entities
public virtual double KorrErrQ { get; set; } /// [%] not mapped to results DB, saved to Oracle DB
public virtual bool TestDone { get; set; } /// true = test was completed
public virtual bool Passed { get; set; } /// true = test passed, water meter is OK
#if IPERL
public virtual string ExtraDataPath { get; set; } /// Relative path to a file with opto-data/raw-data
#endif
#if ORACLE_DB
public virtual string ExtraDataPath { get; set; } /// Relative path to a file with opto-data/raw-data
public virtual double LastError { get; set; } /// [%] Previous test error at this Q in case Pruefindex > 1
#endif
@ -141,8 +143,10 @@ namespace Results.Entities
KorrErrQ = oriMTR.KorrErrQ;
TestDone = oriMTR.TestDone;
Passed = oriMTR.Passed;
#if ORACLE_DB
#if IPERL
ExtraDataPath = oriMTR.ExtraDataPath;
#endif
#if ORACLE_DB
LastError = oriMTR.LastError;
#endif
}
@ -169,8 +173,10 @@ namespace Results.Entities
KorrErrQ = src.KorrErrQ;
TestDone = src.TestDone;
Passed = src.Passed;
#if ORACLE_DB
#if IPERL
ExtraDataPath = src.ExtraDataPath;
#endif
#if ORACLE_DB
LastError = src.LastError;
#endif
}
@ -201,8 +207,10 @@ namespace Results.Entities
writer.Write(KorrErrQ);
writer.Write(TestDone);
writer.Write(Passed);
#if ORACLE_DB
#if IPERL
writer.Write((ExtraDataPath != null) ? ExtraDataPath : string.Empty);
#endif
#if ORACLE_DB
writer.Write(LastError);
#endif
writer.Write((TestRslt != null && TestRslt.Name() != null) ? TestRslt.Name() : string.Empty);
@ -230,8 +238,10 @@ namespace Results.Entities
KorrErrQ = reader.ReadDouble();
TestDone = reader.ReadBoolean();
Passed = reader.ReadBoolean();
#if ORACLE_DB
#if IPERL
ExtraDataPath = reader.ReadString();
#endif
#if ORACLE_DB
LastError = reader.ReadDouble();
#endif
TestRslt = null;

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2015-2018 Sensus Slovensko a.s.
/// Copyright (c) 2015-2021 Sensus Slovensko a.s.
///
using FluentNHibernate.Mapping;
using Results.Entities;
@ -26,8 +26,10 @@ namespace Results.Mappings
Map(x => x.Error);
Map(x => x.TestDone);
Map(x => x.Passed);
#if ORACLE_DB
#if IPERL
Map(x => x.ExtraDataPath);
#endif
#if ORACLE_DB
Map(x => x.LastError);
#endif
References(x => x.WaterMeter);

View File

@ -176,6 +176,7 @@ namespace TBF.BenchControl
OpArgumentError,
ConfigurationError,
RecoverableError, /// Something like flow setting or mass measurement timeout
ErrorFlagsStop, /// ErrorFlags error that is configured to stop the cycle
Yes,
No,
Next, /// To move to the next state when debugging

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
/// Copyright (c) 2021 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
@ -20,7 +20,7 @@ namespace TBF.BenchControl.GenericDevices
/// <param name="switchTimeEnd">Diverter or valve switch time in s on test end</param>
/// <param name="infoFlags">Similar to error flags, contains only warnings</param>
/// <returns>Error flags</returns>
long GetErrorFlags(TestRslt testRslt, bool diverter, bool startStopValve, float switchTimeStart, float switchTimeEnd, out long infoFlags);
long GetErrorFlags(TestRslt testRslt, bool diverter, bool startStopValve, float switchTimeStart, float switchTimeEnd, out long infoFlags, out bool stopCycle);
/// <summary>
/// Get water meter error flags (evaluated from all meter test results)

View File

@ -900,7 +900,7 @@ namespace TBF.BenchControl.Sequences
if (testMethod.DoTransitions() && !e.Contains(Event.RecoverableError))
{
if (currentTestFinished && !isLastRepetition)
if (currentTestFinished && !isLastRepetition && !e.Contains(Event.ErrorFlagsStop))
{
/// Make a transition between two test repetitions
rsltTransBetween = Transition(transitionBetween, TransitionContext.BetweenTests); /// Transition or SetRoute - start of test
@ -931,7 +931,7 @@ namespace TBF.BenchControl.Sequences
{
goto config_error;
}
else if (rsltTransBefore == Event.UiCmdStop || e.Contains(Event.UiCmdStop) || e.Contains(Event.RecoverableError))
else if (rsltTransBefore == Event.UiCmdStop || e.Contains(Event.UiCmdStop) || e.Contains(Event.RecoverableError) || e.Contains(Event.ErrorFlagsStop))
{
goto stop_within_cycle;
}

View File

@ -61,6 +61,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment
public IList<Event> Execute(Test test, int repetitionNr, bool isLastRepetition, DebugMode mode)
{
float simulatedError = 4.5f; /// %
bool stopCycle = false;
int rangeIx = 0; /// Default range, used for non-Elde flowmeters
if (outPath.FlowMeter is Elde.FlowMeter.FlowMeter)
@ -395,7 +396,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment
///
Results.Entities.TestRslt tstRslt = BatchRslts.GetTestRslt(testName, test.Part);
if (tstRslt != null)
if (tstRslt != null)
{
Results.Utils.GetCounterStates(tstRslt, Program.LocalSettings.Counters);
UpdateTempPressDensAmb(tstRslt);
@ -431,7 +432,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment
tstRslt.DiverterStart = 0;
tstRslt.DiverterEnd = 0;
long infoFlags = 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0, out infoFlags) : 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0, out infoFlags, out stopCycle) : 0;
tstRslt.InfoFlags = infoFlags;
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
@ -504,6 +505,8 @@ namespace TBF.BenchControl.TestMethods.Adjustment
/// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(testName, test.Part));
if (stopCycle) retVal = Event.ErrorFlagsStop;
stopTest:
/// Close the modeless form
@ -517,7 +520,8 @@ namespace TBF.BenchControl.TestMethods.Adjustment
/// Quit this sequence
///
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
|| retVal == Event.Error || retVal == Event.ConfigurationError)
|| retVal == Event.RecoverableError || retVal == Event.ErrorFlagsStop
|| retVal == Event.Error || retVal == Event.ConfigurationError)
{
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
.AddOperation(checkUiOp)

View File

@ -663,7 +663,8 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
///
Results.Entities.TestRslt tstRslt = BatchRslts.GetTestRslt(testName, test.Part);
if (tstRslt != null)
bool stopCycle = false;
if (tstRslt != null)
{
Results.Utils.GetCounterStates(tstRslt, Program.LocalSettings.Counters);
UpdateTempPressDensAmb(tstRslt);
@ -708,7 +709,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
tstRslt.DiverterStart = switchTimeStart;
tstRslt.DiverterEnd = switchTimeEnd;
long infoFlags = 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, switchTimeStart, switchTimeEnd, out infoFlags) : 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, switchTimeStart, switchTimeEnd, out infoFlags, out stopCycle) : 0;
tstRslt.InfoFlags = infoFlags;
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
@ -808,7 +809,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
/// Quit this sequence ///
///----------------------///
if (isLastRepetition)
if (isLastRepetition || stopCycle)
{
/// Stop the pump
State.Create(string.Format("{0}({1}) : Test(s) completed -> Stopping the pump", test.Method, test.Name))
@ -823,7 +824,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
while (!e.Contains(Event.ValvesSet) || ((inPath.Pump is GenericDevices.IPumpFM) && !e.Contains(Event.TurnPumpOnOffDone)));
}
return new List<Event> { Event.Done };
return stopCycle ? new List<Event> { Event.ErrorFlagsStop } : new List<Event> { Event.Done };
//====================================
stopTest:

View File

@ -679,7 +679,8 @@ namespace TBF.BenchControl.TestMethods.DiverterTest
///
Results.Entities.TestRslt tstRslt = BatchRslts.GetTestRslt(testName, test.Part);
if (tstRslt != null)
bool stopCycle = false;
if (tstRslt != null)
{
Results.Utils.GetCounterStates(tstRslt, Program.LocalSettings.Counters);
UpdateTempPressDensAmb(tstRslt);
@ -731,7 +732,7 @@ namespace TBF.BenchControl.TestMethods.DiverterTest
(tstRslt.DiverterStart * 1000).ToString("F0"), tstRslt.DivStart10, tstRslt.DivStart50, tstRslt.DivStart90,
(tstRslt.DiverterEnd * 1000).ToString("F0"), tstRslt.DivEnd90, tstRslt.DivEnd50, tstRslt.DivEnd10);
long infoFlags = 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, tstRslt.DiverterStart, tstRslt.DiverterEnd, out infoFlags) : 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, tstRslt.DiverterStart, tstRslt.DiverterEnd, out infoFlags, out stopCycle) : 0;
tstRslt.InfoFlags = infoFlags;
///
@ -774,8 +775,9 @@ namespace TBF.BenchControl.TestMethods.DiverterTest
}
#if IPERL
meterRslt.WaterMeter.CalibFactor = iPerl.CalibFactor;
meterRslt.ExtraDataPath = iPerl.ExtraDataPath;
#endif
iPerl.LastTestResult2 = iPerl.LastTestResult; /// Save shift previous test result
iPerl.LastTestResult2 = iPerl.LastTestResult; /// Save shift previous test result
iPerl.LastTestResult = meterRslt; /// Save this test result
}
}
@ -869,6 +871,8 @@ namespace TBF.BenchControl.TestMethods.DiverterTest
/// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(testName, test.Part));
if (stopCycle) retVal = Event.ErrorFlagsStop;
stopTest:
StopRecordingStatistics(); /// Make sure graph files are closed
@ -877,7 +881,8 @@ namespace TBF.BenchControl.TestMethods.DiverterTest
/// Quit this sequence
///
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
|| retVal == Event.Error || retVal == Event.ConfigurationError)
|| retVal == Event.RecoverableError || retVal == Event.ErrorFlagsStop
|| retVal == Event.Error || retVal == Event.ConfigurationError)
{
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
.AddOperation(checkUiOp)

View File

@ -351,6 +351,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
///
Results.Entities.TestRslt tstRslt = BatchRslts.GetTestRslt(testName, test.Part);
bool stopCycle = false;
if (tstRslt != null)
{
Results.Utils.GetCounterStates(tstRslt, Program.LocalSettings.Counters);
@ -386,7 +387,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
tstRslt.DiverterStart = 0;
tstRslt.DiverterEnd = 0;
long infoFlags = 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0, out infoFlags) : 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0, out infoFlags, out stopCycle) : 0;
tstRslt.InfoFlags = infoFlags;
///
@ -445,7 +446,9 @@ namespace TBF.BenchControl.TestMethods.Endurance
{
meterRslt.WaterMeter.ResultCode |= iPerl.ResultCode;
}
#if IPERL
meterRslt.ExtraDataPath = iPerl.ExtraDataPath;
#endif
iPerl.LastTestResult2 = iPerl.LastTestResult; /// Save shift previous test result
iPerl.LastTestResult = meterRslt; /// Save this test result
}
@ -644,7 +647,8 @@ namespace TBF.BenchControl.TestMethods.Endurance
/// Quit this sequence
///
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
|| retVal == Event.Error || retVal == Event.ConfigurationError)
|| retVal == Event.RecoverableError || retVal == Event.ErrorFlagsStop
|| retVal == Event.Error || retVal == Event.ConfigurationError)
{
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
.AddOperation(checkUiOp)

View File

@ -785,6 +785,7 @@ namespace TBF.BenchControl.TestMethods.FixedStart
///
Results.Entities.TestRslt tstRslt = BatchRslts.GetTestRslt(testName, test.Part);
bool stopCycle = false;
if (tstRslt != null)
{
Results.Utils.GetCounterStates(tstRslt, Program.LocalSettings.Counters);
@ -822,7 +823,7 @@ namespace TBF.BenchControl.TestMethods.FixedStart
tstRslt.DiverterStart = switchTimeStart;
tstRslt.DiverterEnd = switchTimeEnd;
long infoFlags = 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, true, switchTimeStart, switchTimeEnd, out infoFlags) : 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, true, switchTimeStart, switchTimeEnd, out infoFlags, out stopCycle) : 0;
tstRslt.InfoFlags = infoFlags;
if (compound)
@ -1014,6 +1015,7 @@ namespace TBF.BenchControl.TestMethods.FixedStart
/// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(testName, test.Part));
if (stopCycle) retVal = Event.ErrorFlagsStop;
stopTest:
@ -1023,7 +1025,8 @@ namespace TBF.BenchControl.TestMethods.FixedStart
/// Quit this sequence
///
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
|| retVal == Event.Error || retVal == Event.ConfigurationError)
|| retVal == Event.RecoverableError || retVal == Event.ErrorFlagsStop
|| retVal == Event.Error || retVal == Event.ConfigurationError)
{
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
.AddOperation(checkUiOp)

View File

@ -566,7 +566,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
///
Results.Entities.TestRslt tstRslt = BatchRslts.GetTestRslt(testName, test.Part);
if (tstRslt != null)
bool stopCycle = false;
if (tstRslt != null)
{
Results.Utils.GetCounterStates(tstRslt, Program.LocalSettings.Counters);
UpdateTempPressDensAmb(tstRslt);
@ -603,7 +604,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
tstRslt.DiverterStart = switchTimeStart;
tstRslt.DiverterEnd = switchTimeEnd;
long infoFlags = 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, true, switchTimeStart, switchTimeEnd, out infoFlags) : 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, true, switchTimeStart, switchTimeEnd, out infoFlags, out stopCycle) : 0;
tstRslt.InfoFlags = infoFlags;
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
@ -669,6 +670,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
/// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(testName, test.Part));
if (stopCycle) retVal = Event.ErrorFlagsStop;
stopTest:
@ -678,7 +680,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
/// Quit this sequence
///
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
|| retVal == Event.Error || retVal == Event.ConfigurationError)
|| retVal == Event.RecoverableError || retVal == Event.ErrorFlagsStop
|| retVal == Event.Error || retVal == Event.ConfigurationError)
{
State.Create("FixedStartAdvanced : Stopping diverter, gate, etc.")
.AddOperation(checkUiOp)

View File

@ -782,6 +782,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEval
///
Results.Entities.TestRslt tstRslt = BatchRslts.GetTestRslt(testName, test.Part);
bool stopCycle = false;
if (tstRslt != null)
{
Results.Utils.GetCounterStates(tstRslt, Program.LocalSettings.Counters);
@ -819,7 +820,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEval
tstRslt.DiverterStart = switchTimeStart;
tstRslt.DiverterEnd = switchTimeEnd;
long infoFlags = 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, true, switchTimeStart, switchTimeEnd, out infoFlags) : 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, true, switchTimeStart, switchTimeEnd, out infoFlags, out stopCycle) : 0;
tstRslt.InfoFlags = infoFlags;
tstRslt.Components = Results.Entities.Components
@ -838,6 +839,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEval
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.TransitionAfter));
if (stopCycle) retVal = Event.ErrorFlagsStop;
stopTest:
@ -847,7 +849,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEval
/// Quit this sequence
///
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
|| retVal == Event.Error || retVal == Event.ConfigurationError)
|| retVal == Event.RecoverableError || retVal == Event.ErrorFlagsStop
|| retVal == Event.Error || retVal == Event.ConfigurationError)
{
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
.AddOperation(checkUiOp)

View File

@ -927,6 +927,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollDeferredEval
///
Results.Entities.TestRslt tstRslt = BatchRslts.GetTestRslt(testName, test.Part);
bool stopCycle = false;
if (tstRslt != null)
{
Results.Utils.GetCounterStates(tstRslt, Program.LocalSettings.Counters);
@ -965,7 +966,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollDeferredEval
tstRslt.DiverterStart = switchTimeStart;
tstRslt.DiverterEnd = switchTimeEnd;
long infoFlags = 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, true, switchTimeStart, switchTimeEnd, out infoFlags) : 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, true, switchTimeStart, switchTimeEnd, out infoFlags, out stopCycle) : 0;
tstRslt.InfoFlags = infoFlags;
tstRslt.Components = Results.Entities.Components
@ -984,6 +985,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollDeferredEval
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.TransitionAfter));
if (stopCycle) retVal = Event.ErrorFlagsStop;
stopTest:
@ -993,7 +995,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollDeferredEval
/// Quit this sequence
///
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
|| retVal == Event.Error || retVal == Event.ConfigurationError)
|| retVal == Event.RecoverableError || retVal == Event.ErrorFlagsStop
|| retVal == Event.Error || retVal == Event.ConfigurationError)
{
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
.AddOperation(checkUiOp)

View File

@ -959,6 +959,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
///
Results.Entities.TestRslt tstRslt = BatchRslts.GetTestRslt(testName, test.Part);
bool stopCycle = false;
if (tstRslt != null)
{
Results.Utils.GetCounterStates(tstRslt, Program.LocalSettings.Counters);
@ -997,7 +998,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
tstRslt.DiverterStart = switchTimeStart;
tstRslt.DiverterEnd = switchTimeEnd;
long infoFlags = 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, true, switchTimeStart, switchTimeEnd, out infoFlags) : 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, true, switchTimeStart, switchTimeEnd, out infoFlags, out stopCycle) : 0;
tstRslt.InfoFlags = infoFlags;
if (compound)
@ -1189,6 +1190,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
/// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(testName, test.Part));
if (stopCycle) retVal = Event.ErrorFlagsStop;
stopTest:
@ -1198,7 +1200,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
/// Quit this sequence
///
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
|| retVal == Event.Error || retVal == Event.ConfigurationError)
|| retVal == Event.RecoverableError || retVal == Event.ErrorFlagsStop
|| retVal == Event.Error || retVal == Event.ConfigurationError)
{
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
.AddOperation(checkUiOp)

View File

@ -704,6 +704,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartTankCollection
///
Results.Entities.TestRslt tstRslt = BatchRslts.GetTestRslt(testName, test.Part);
bool stopCycle = false;
if (tstRslt != null)
{
Results.Utils.GetCounterStates(tstRslt, Program.LocalSettings.Counters);
@ -741,7 +742,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartTankCollection
tstRslt.DiverterStart = switchTimeStart;
tstRslt.DiverterEnd = switchTimeEnd;
long infoFlags = 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, true, switchTimeStart, switchTimeEnd, out infoFlags) : 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, true, switchTimeStart, switchTimeEnd, out infoFlags, out stopCycle) : 0;
tstRslt.InfoFlags = infoFlags;
if (compoundTestParams != null)
@ -863,6 +864,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartTankCollection
/// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(testName, test.Part));
if (stopCycle) retVal = Event.ErrorFlagsStop;
stopTest:
@ -872,7 +874,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartTankCollection
/// Quit this sequence
///
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
|| retVal == Event.Error || retVal == Event.ConfigurationError)
|| retVal == Event.RecoverableError || retVal == Event.ErrorFlagsStop
|| retVal == Event.Error || retVal == Event.ConfigurationError)
{
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
.AddOperation(checkUiOp)

View File

@ -461,7 +461,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
///
Results.Entities.TestRslt tstRslt = BatchRslts.GetTestRslt(testName, test.Part);
if (tstRslt != null)
bool stopCycle = false;
if (tstRslt != null)
{
Results.Utils.GetCounterStates(tstRslt, Program.LocalSettings.Counters);
UpdateTempPressDensAmb(tstRslt);
@ -497,7 +498,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
tstRslt.DiverterStart = 0;
tstRslt.DiverterEnd = 0;
long infoFlags = 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0, out infoFlags) : 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0, out infoFlags, out stopCycle) : 0;
tstRslt.InfoFlags = infoFlags;
if (compoundTestParams != null)
@ -618,8 +619,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
}
#if IPERL
meterRslt.WaterMeter.CalibFactor = iPerl.CalibFactor;
#endif
meterRslt.ExtraDataPath = iPerl.ExtraDataPath;
#endif
iPerl.LastTestResult2 = iPerl.LastTestResult; /// Save shift previous test result
iPerl.LastTestResult = meterRslt; /// Save this test result
}
@ -715,6 +716,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
/// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(testName, test.Part));
if (stopCycle) retVal = Event.ErrorFlagsStop;
stopTest:
@ -735,8 +737,9 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
///
/// Quit this sequence
///
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
|| retVal == Event.Error || retVal == Event.ConfigurationError)
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
|| retVal == Event.RecoverableError || retVal == Event.ErrorFlagsStop
|| retVal == Event.Error || retVal == Event.ConfigurationError)
{
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
.AddOperation(checkUiOp)

View File

@ -734,7 +734,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
///
Results.Entities.TestRslt tstRslt = BatchRslts.GetTestRslt(testName, test.Part);
if (tstRslt != null)
bool stopCycle = false;
if (tstRslt != null)
{
Results.Utils.GetCounterStates(tstRslt, Program.LocalSettings.Counters);
UpdateTempPressDensAmb(tstRslt);
@ -783,7 +784,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
(tstRslt.DiverterStart * 1000).ToString("F0"), tstRslt.DivStart10, tstRslt.DivStart50, tstRslt.DivStart90,
(tstRslt.DiverterEnd * 1000).ToString("F0"), tstRslt.DivEnd90, tstRslt.DivEnd50, tstRslt.DivEnd10);
long infoFlags = 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, tstRslt.DiverterStart, tstRslt.DiverterEnd, out infoFlags) : 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, tstRslt.DiverterStart, tstRslt.DiverterEnd, out infoFlags, out stopCycle) : 0;
tstRslt.InfoFlags = infoFlags;
}
else
@ -814,7 +815,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
tstRslt.DivEnd10 = 0;
long infoFlags = 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0, out infoFlags) : 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0, out infoFlags, out stopCycle) : 0;
tstRslt.InfoFlags = infoFlags;
}
@ -996,8 +997,9 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
}
#if IPERL
meterRslt.WaterMeter.CalibFactor = iPerl.CalibFactor;
meterRslt.ExtraDataPath = iPerl.ExtraDataPath;
#endif
iPerl.LastTestResult2 = iPerl.LastTestResult; /// Save shift previous test result
iPerl.LastTestResult2 = iPerl.LastTestResult; /// Save shift previous test result
iPerl.LastTestResult = meterRslt; /// Save this test result
}
}
@ -1070,6 +1072,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
/// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(testName, test.Part));
if (stopCycle) retVal = Event.ErrorFlagsStop;
stopTest:
@ -1079,7 +1082,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
/// Quit this sequence
///
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
|| retVal == Event.Error || retVal == Event.ConfigurationError)
|| retVal == Event.RecoverableError || retVal == Event.ErrorFlagsStop
|| retVal == Event.Error || retVal == Event.ConfigurationError)
{
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
.AddOperation(checkUiOp)

View File

@ -851,7 +851,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative
///
Results.Entities.TestRslt tstRslt = BatchRslts.GetTestRslt(testName, test.Part);
if (tstRslt != null)
bool stopCycle = false;
if (tstRslt != null)
{
Results.Utils.GetCounterStates(tstRslt, Program.LocalSettings.Counters);
UpdateTempPressDensAmb(tstRslt);
@ -904,7 +905,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative
(tstRslt.DiverterStart * 1000).ToString("F0"), tstRslt.DivStart10, tstRslt.DivStart50, tstRslt.DivStart90,
(tstRslt.DiverterEnd * 1000).ToString("F0"), tstRslt.DivEnd90, tstRslt.DivEnd50, tstRslt.DivEnd10);
long infoFlags = 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, tstRslt.DiverterStart, tstRslt.DiverterEnd, out infoFlags) : 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, tstRslt.DiverterStart, tstRslt.DiverterEnd, out infoFlags, out stopCycle) : 0;
tstRslt.InfoFlags = infoFlags;
if (compoundTestParams != null)
@ -1079,8 +1080,9 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative
}
#if IPERL
meterRslt.WaterMeter.CalibFactor = iPerl.CalibFactor;
meterRslt.ExtraDataPath = iPerl.ExtraDataPath;
#endif
iPerl.LastTestResult2 = iPerl.LastTestResult; /// Save shift previous test result
iPerl.LastTestResult2 = iPerl.LastTestResult; /// Save shift previous test result
iPerl.LastTestResult = meterRslt; /// Save this test result
}
}
@ -1174,6 +1176,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative
/// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(testName, test.Part));
if (stopCycle) retVal = Event.ErrorFlagsStop;
stopTest:
StopRecordingStatistics(); /// Make sure graph files are closed
@ -1182,7 +1186,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative
/// Quit this sequence
///
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
|| retVal == Event.Error || retVal == Event.ConfigurationError)
|| retVal == Event.RecoverableError || retVal == Event.ErrorFlagsStop
|| retVal == Event.Error || retVal == Event.ConfigurationError)
{
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
.AddOperation(checkUiOp)

View File

@ -794,7 +794,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
///
Results.Entities.TestRslt tstRslt = BatchRslts.GetTestRslt(testName, test.Part);
if (tstRslt != null)
bool stopCycle = false;
if (tstRslt != null)
{
Results.Utils.GetCounterStates(tstRslt, Program.LocalSettings.Counters);
UpdateTempPressDensAmb(tstRslt);
@ -851,7 +852,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
(tstRslt.DiverterStart * 1000).ToString("F0"), tstRslt.DivStart10, tstRslt.DivStart50, tstRslt.DivStart90,
(tstRslt.DiverterEnd * 1000).ToString("F0"), tstRslt.DivEnd90, tstRslt.DivEnd50, tstRslt.DivEnd10);
long infoFlags = 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, tstRslt.DiverterStart, tstRslt.DiverterEnd, out infoFlags) : 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, tstRslt.DiverterStart, tstRslt.DiverterEnd, out infoFlags, out stopCycle) : 0;
tstRslt.InfoFlags = infoFlags;
if (compoundTestParams != null)
@ -1027,8 +1028,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
}
#if IPERL
meterRslt.WaterMeter.CalibFactor = iPerl.CalibFactor;
#endif
meterRslt.ExtraDataPath = iPerl.ExtraDataPath;
#endif
iPerl.LastTestResult2 = iPerl.LastTestResult; /// Save shift previous test result
iPerl.LastTestResult = meterRslt; /// Save this test result
}
@ -1129,6 +1130,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
/// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(testName, test.Part));
if (stopCycle) retVal = Event.ErrorFlagsStop;
stopTest:
StopRecordingStatistics();
@ -1136,7 +1139,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
///
/// Quit this sequence
///
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
|| retVal == Event.RecoverableError || retVal == Event.ErrorFlagsStop
|| retVal == Event.Error || retVal == Event.ConfigurationError)
{
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))

View File

@ -724,7 +724,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
///
Results.Entities.TestRslt tstRslt = BatchRslts.GetTestRslt(testName, test.Part);
if (tstRslt != null)
bool stopCycle = false;
if (tstRslt != null)
{
Results.Utils.GetCounterStates(tstRslt, Program.LocalSettings.Counters);
UpdateTempPressDensAmb(tstRslt);
@ -777,7 +778,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
(tstRslt.DiverterStart * 1000).ToString("F0"), tstRslt.DivStart10, tstRslt.DivStart50, tstRslt.DivStart90,
(tstRslt.DiverterEnd * 1000).ToString("F0"), tstRslt.DivEnd90, tstRslt.DivEnd50, tstRslt.DivEnd10);
long infoFlags = 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, tstRslt.DiverterStart, tstRslt.DiverterEnd, out infoFlags) : 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, tstRslt.DiverterStart, tstRslt.DiverterEnd, out infoFlags, out stopCycle) : 0;
tstRslt.InfoFlags = infoFlags;
if (compoundTestParams != null)
@ -952,10 +953,10 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
meterRslt.WaterMeter.ResultCode |= iPerl.ResultCode;
}
#if IPERL
meterRslt.WaterMeter.CalibFactor = iPerl.CalibFactor;
#endif
meterRslt.WaterMeter.CalibFactor = iPerl.CalibFactor;
meterRslt.ExtraDataPath = iPerl.ExtraDataPath;
iPerl.LastTestResult2 = iPerl.LastTestResult; /// Save shift previous test result
#endif
iPerl.LastTestResult2 = iPerl.LastTestResult; /// Save shift previous test result
iPerl.LastTestResult = meterRslt; /// Save this test result
}
@ -1076,6 +1077,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
/// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(testName, test.Part));
if (stopCycle) retVal = Event.ErrorFlagsStop;
stopTest:
StopRecordingStatistics(); /// Make sure graph files are closed
@ -1083,8 +1086,9 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
///
/// Quit this sequence
///
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
|| retVal == Event.Error || retVal == Event.ConfigurationError)
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
|| retVal == Event.RecoverableError || retVal == Event.ErrorFlagsStop
|| retVal == Event.Error || retVal == Event.ConfigurationError)
{
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
.AddOperation(checkUiOp)

View File

@ -484,7 +484,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartTankCollection
///
Results.Entities.TestRslt tstRslt = BatchRslts.GetTestRslt(testName, test.Part);
if (tstRslt != null)
bool stopCycle = false;
if (tstRslt != null)
{
Results.Utils.GetCounterStates(tstRslt, Program.LocalSettings.Counters);
UpdateTempPressDensAmb(tstRslt);
@ -536,7 +537,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartTankCollection
(tstRslt.DiverterStart * 1000).ToString("F0"), tstRslt.DivStart10, tstRslt.DivStart50, tstRslt.DivStart90,
(tstRslt.DiverterEnd * 1000).ToString("F0"), tstRslt.DivEnd90, tstRslt.DivEnd50, tstRslt.DivEnd10);
long infoFlags = 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, tstRslt.DiverterStart, tstRslt.DiverterEnd, out infoFlags) : 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, tstRslt.DiverterStart, tstRslt.DiverterEnd, out infoFlags, out stopCycle) : 0;
tstRslt.InfoFlags = infoFlags;
if (compoundTestParams != null)
@ -639,9 +640,10 @@ namespace TBF.BenchControl.TestMethods.FlyingStartTankCollection
meterRslt.WaterMeter.ResultCode |= iPerl.ResultCode;
}
#if IPERL
meterRslt.WaterMeter.CalibFactor = iPerl.CalibFactor;
meterRslt.WaterMeter.CalibFactor = iPerl.CalibFactor;
meterRslt.ExtraDataPath = iPerl.ExtraDataPath;
#endif
iPerl.LastTestResult2 = iPerl.LastTestResult; /// Save shift previous test result
iPerl.LastTestResult2 = iPerl.LastTestResult; /// Save shift previous test result
iPerl.LastTestResult = meterRslt; /// Save this test result
}
}
@ -735,6 +737,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartTankCollection
/// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(testName, test.Part));
if (stopCycle) retVal = Event.ErrorFlagsStop;
stopTest:
StopRecordingStatistics(); /// Make sure graph files are closed
@ -743,7 +747,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartTankCollection
/// Quit this sequence
///
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
|| retVal == Event.Error || retVal == Event.ConfigurationError)
|| retVal == Event.RecoverableError || retVal == Event.ErrorFlagsStop
|| retVal == Event.Error || retVal == Event.ConfigurationError)
{
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
.AddOperation(checkUiOp)

View File

@ -462,7 +462,6 @@ namespace TBF.BenchControl.TestMethods.LeakTest
/// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(testName, test.Part));
stopTest:
StopRecordingStatistics();
@ -473,7 +472,8 @@ namespace TBF.BenchControl.TestMethods.LeakTest
/// Quit this sequence
///
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
|| retVal == Event.Error || retVal == Event.ConfigurationError)
|| retVal == Event.RecoverableError || retVal == Event.ErrorFlagsStop
|| retVal == Event.Error || retVal == Event.ConfigurationError)
{
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
.AddOperation(checkUiOp)

View File

@ -51,6 +51,7 @@ namespace TBF.BenchControl.TestMethods.ManualEntry
///
Results.Entities.TestRslt tstRslt = BatchRslts.GetTestRslt(testName, test.Part);
bool stopCycle = false;
if (tstRslt != null)
{
Results.Utils.GetCounterStates(tstRslt, Program.LocalSettings.Counters);
@ -85,7 +86,7 @@ namespace TBF.BenchControl.TestMethods.ManualEntry
tstRslt.DiverterStart = 0;
tstRslt.DiverterEnd = 0;
long infoFlags = 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0, out infoFlags) : 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0, out infoFlags, out stopCycle) : 0;
tstRslt.InfoFlags = infoFlags;
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)

View File

@ -283,7 +283,6 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
/// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(testName, test.Part));
stopTest:
StopRecordingStatistics();
@ -294,7 +293,8 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
/// Quit this sequence
///
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
|| retVal == Event.Error || retVal == Event.ConfigurationError)
|| retVal == Event.RecoverableError || retVal == Event.ErrorFlagsStop
|| retVal == Event.Error || retVal == Event.ConfigurationError)
{
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
.AddOperation(checkUiOp)

View File

@ -57,6 +57,7 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
public IList<Event> Execute(Test test, int repetitionNr, bool isLastRepetition, TestParams testParams, DebugMode mode)
{
float simulatedError = 4.5f; /// %
bool stopCycle = false;
int rangeIx = 0; /// Default range, used for non-Elde flowmeters
if (outPath.FlowMeter is Elde.FlowMeter.FlowMeter)
@ -390,7 +391,7 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
///
Results.Entities.TestRslt tstRslt = BatchRslts.GetTestRslt(testName, test.Part);
if (tstRslt != null)
if (tstRslt != null)
{
Results.Utils.GetCounterStates(tstRslt, Program.LocalSettings.Counters);
UpdateTempPressDensAmb(tstRslt);
@ -425,7 +426,7 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
tstRslt.DiverterStart = 0;
tstRslt.DiverterEnd = 0;
long infoFlags = 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0, out infoFlags) : 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0, out infoFlags, out stopCycle) : 0;
tstRslt.InfoFlags = infoFlags;
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
@ -499,6 +500,8 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
/// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(testName, test.Part));
if (stopCycle) retVal = Event.ErrorFlagsStop;
stopTest:
/// Close the modeless form
@ -512,7 +515,8 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
/// Quit this sequence
///
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
|| retVal == Event.Error || retVal == Event.ConfigurationError)
|| retVal == Event.RecoverableError || retVal == Event.ErrorFlagsStop
|| retVal == Event.Error || retVal == Event.ConfigurationError)
{
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
.AddOperation(checkUiOp)

View File

@ -57,6 +57,7 @@ namespace TBF.BenchControl.TestMethods.PulsesTestManual
public IList<Event> Execute(Test test, int repetitionNr, bool isLastRepetition, DebugMode mode)
{
float simulatedError = 4.5f; /// %
bool stopCycle = false;
int rangeIx = 0; /// Default range, used for non-Elde flowmeters
if (outPath.FlowMeter is Elde.FlowMeter.FlowMeter)
@ -392,7 +393,7 @@ namespace TBF.BenchControl.TestMethods.PulsesTestManual
///
Results.Entities.TestRslt tstRslt = BatchRslts.GetTestRslt(testName, test.Part);
if (tstRslt != null)
if (tstRslt != null)
{
Results.Utils.GetCounterStates(tstRslt, Program.LocalSettings.Counters);
UpdateTempPressDensAmb(tstRslt);
@ -427,7 +428,7 @@ namespace TBF.BenchControl.TestMethods.PulsesTestManual
tstRslt.DiverterStart = 0;
tstRslt.DiverterEnd = 0;
long infoFlags = 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0, out infoFlags) : 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0, out infoFlags, out stopCycle) : 0;
tstRslt.InfoFlags = infoFlags;
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
@ -497,13 +498,16 @@ namespace TBF.BenchControl.TestMethods.PulsesTestManual
/// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(testName, test.Part));
if (stopCycle) retVal = Event.ErrorFlagsStop;
stopTest:
///
/// Quit this sequence
///
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
|| retVal == Event.Error || retVal == Event.ConfigurationError)
|| retVal == Event.RecoverableError || retVal == Event.ErrorFlagsStop
|| retVal == Event.Error || retVal == Event.ConfigurationError)
{
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
.AddOperation(checkUiOp)

View File

@ -259,7 +259,8 @@ namespace TBF.BenchControl.TestMethods.RoiDetection
/// Quit this sequence
///
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
|| retVal == Event.Error || retVal == Event.ConfigurationError)
|| retVal == Event.RecoverableError || retVal == Event.ErrorFlagsStop
|| retVal == Event.Error || retVal == Event.ConfigurationError)
{
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
.AddOperation(checkUiOp)

View File

@ -459,7 +459,8 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest
///
Results.Entities.TestRslt tstRslt = BatchRslts.GetTestRslt(testName, test.Part);
if (tstRslt != null)
bool stopCycle = false;
if (tstRslt != null)
{
Results.Utils.GetCounterStates(tstRslt, Program.LocalSettings.Counters);
UpdateTempPressDensAmb(tstRslt);
@ -493,7 +494,7 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest
tstRslt.DiverterStart = switchTimeStart;
tstRslt.DiverterEnd = switchTimeEnd;
long infoFlags = 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, switchTimeStart, switchTimeEnd, out infoFlags) : 0;
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, switchTimeStart, switchTimeEnd, out infoFlags, out stopCycle) : 0;
tstRslt.InfoFlags = infoFlags;
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
@ -549,11 +550,13 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest
/// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(testName, test.Part));
if (stopCycle) retVal = Event.ErrorFlagsStop;
///----------------------///
/// Quit this sequence ///
///----------------------///
if (isLastRepetition)
if (isLastRepetition || stopCycle)
{
/// Stop the pump
State.Create(string.Format("{0}({1}) : Test(s) completed -> Stopping the pump", test.Method, test.Name))
@ -568,7 +571,7 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest
while (!e.Contains(Event.ValvesSet) || ((inPath.Pump is GenericDevices.IPumpFM) && !e.Contains(Event.TurnPumpOnOffDone)));
}
return new List<Event> { Event.Done };
return stopCycle ? new List<Event> { Event.ErrorFlagsStop } : new List<Event> { Event.Done };
stopTest:
@ -577,23 +580,24 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest
///
/// Quit this sequence
///
if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError
|| retVal == Event.Error || retVal == Event.ConfigurationError)
if (isLastRepetition || retVal == Event.UiCmdStop
|| retVal == Event.OpArgumentError
|| retVal == Event.RecoverableError
|| retVal == Event.ErrorFlagsStop
|| retVal == Event.Error
|| retVal == Event.ConfigurationError)
{
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
.AddOperation(checkUiOp)
.AddOperation(cBrd.StopPreviousOp())
.EnterState();
do
{
do {
e = StateMachine.WaitRunDevsRunOps();
if (TestAndLogUiCmdStop(test, e)) break;
}
while (!e.Contains(Event.PreviousStopped));
}
stopTestWOStoppingDivGateEtc:
return new List<Event> { retVal };
}
}

View File

@ -72,7 +72,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication.iPerlHead
}
public bool Disabled;
public bool CommFailed;
public bool CommFailed;
public int ResultCode;
@ -377,8 +377,8 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication.iPerlHead
if (DebugLevel == DebugMode.Normal)
{
/// Prepare serial port
optoSerialPort = new SerialPort(string.Format("COM{0}", iperlHeadCfg.OptoComPortNr),
9600, Parity.None, 8, StopBits.One);
string portName = string.Format("COM{0}", iperlHeadCfg.OptoComPortNr);
optoSerialPort = new SerialPort(portName, 9600, Parity.None, 8, StopBits.One);
optoSerialPort.Handshake = Handshake.None;
optoSerialPort.Open();
log.FatalFormat("{0} initialized: {1}", Name, this);

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2017-2020 Sensus Slovensko a.s.
/// Copyright (c) 2017-2021 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@ -26,7 +26,7 @@ namespace TBF.BenchControl.Various.ErrorFlags
/// <param name="switchTimeStart">Diverter or valve switch time in s on test start</param>
/// <param name="switchTimeEnd">Diverter or valve switch time in s on test end</param>
/// <returns>Error flags</returns>
public long GetErrorFlags(TestRslt testRslt, bool diverter, bool startStopValve, float switchTimeStart, float switchTimeEnd, out long infoFlags)
public long GetErrorFlags(TestRslt testRslt, bool diverter, bool startStopValve, float switchTimeStart, float switchTimeEnd, out long infoFlags, out bool stopCycle)
{
/// Any E# is 'true' on error, 'false' when OK
@ -137,6 +137,25 @@ namespace TBF.BenchControl.Various.ErrorFlags
if (E21 && (errorsCfg.TestParams.E21 == info)) _infoFlags |= (long)ErrorFlagMask.E21;
if (E36 && (errorsCfg.TestParams.E36 == info)) _infoFlags |= (long)ErrorFlagMask.E36;
stopCycle = false;
if (E1 && (errorsCfg.TestParams.E1 == stop)) stopCycle = true;
if (E2 && (errorsCfg.TestParams.E2 == stop)) stopCycle = true;
if (E3 && (errorsCfg.TestParams.E3 == stop)) stopCycle = true;
if (E4 && (errorsCfg.TestParams.E4 == stop)) stopCycle = true;
if (E5 && (errorsCfg.TestParams.E5 == stop)) stopCycle = true;
if (E6 && (errorsCfg.TestParams.E6 == stop)) stopCycle = true;
if (E7 && (errorsCfg.TestParams.E7 == stop)) stopCycle = true;
if (E8 && (errorsCfg.TestParams.E8 == stop)) stopCycle = true;
if (E9 && (errorsCfg.TestParams.E9 == stop)) stopCycle = true;
if (E10 && (errorsCfg.TestParams.E10 == stop)) stopCycle = true;
if (E11 && (errorsCfg.TestParams.E11 == stop)) stopCycle = true;
if (E12 && (errorsCfg.TestParams.E12 == stop)) stopCycle = true;
if (E13 && (errorsCfg.TestParams.E13 == stop)) stopCycle = true;
if (E14 && (errorsCfg.TestParams.E14 == stop)) stopCycle = true;
/// E15, E16, E17, E18, E19, E20 skipped
if (E21 && (errorsCfg.TestParams.E21 == stop)) stopCycle = true;
if (E36 && (errorsCfg.TestParams.E36 == stop)) stopCycle = true;
infoFlags = _infoFlags;
return errorFlags;
}

View File

@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.26.1679.0")]
[assembly: AssemblyFileVersion("2.26.1679.0")]
[assembly: AssemblyVersion("2.26.1681.0")]
[assembly: AssemblyFileVersion("2.26.1681.0")]