A better bug fix in LeakTest, ver. 2.26.1616

This commit is contained in:
Milan Hanajik
2021-04-14 11:33:15 +02:00
parent 997e0d2a6b
commit fd0d7dcf7b
2 changed files with 39 additions and 32 deletions
@@ -30,22 +30,17 @@ namespace TBF.BenchControl.TestMethods.LeakTest
/// </returns> /// </returns>
public IList<Event> Execute(Config.Entities.Test test, int repetitionNr, bool isLastRepetition, LeakTestParams testParams) public IList<Event> Execute(Config.Entities.Test test, int repetitionNr, bool isLastRepetition, LeakTestParams testParams)
{ {
IScale scale = null;
if ((testParams.MaxPressureDrop != 0) && (benchPath.PressMtrDown == null)) if ((testParams.MaxPressureDrop != 0) && (benchPath.PressMtrDown == null))
{ {
Bridge.OnError(this, Strings.Missing_a_pressure_meter); Bridge.OnError(this, Strings.Missing_a_pressure_meter);
return new List<Event> { Event.ConfigurationError }; return new List<Event> { Event.ConfigurationError };
} }
if (testParams.MaxMassIncrease > 0) IScale scale = outPath.Scale as IScale;
if (testParams.MaxMassIncrease > 0 && scale == null)
{ {
scale = outPath.Scale as IScale; Bridge.OnError(this, Strings.Missing_a_scale);
if (scale == null) return new List<Event> { Event.ConfigurationError };
{
Bridge.OnError(this, Strings.Missing_a_scale);
return new List<Event> { Event.ConfigurationError };
}
} }
IList<Event> e; /// Events from currently running operations IList<Event> e; /// Events from currently running operations
@@ -361,26 +356,38 @@ namespace TBF.BenchControl.TestMethods.LeakTest
tstRslt.DensityDiv = 0; tstRslt.DensityDiv = 0;
/// Main results /// Main results
tstRslt.MethodClass = TbfComponents.FindComponent(test.Method).ClassName; tstRslt.MethodClass = TbfComponents.FindComponent(test.Method).ClassName;
tstRslt.StartTime = TestStartTime; tstRslt.StartTime = TestStartTime;
tstRslt.EndTime = TestEndTime; tstRslt.EndTime = TestEndTime;
tstRslt.FlowSetTime = 0; tstRslt.FlowSetTime = 0;
tstRslt.TestTime = Convert.ToDouble(testParams.DurationPMax); /// [s] measurement time tstRslt.TestTime = Convert.ToDouble(testParams.DurationPMax); /// [s] measurement time
tstRslt.PulsesMaster = 0; /// Pulses of the master flow meter (test total) tstRslt.PulsesMaster = 0; /// Pulses of the master flow meter (test total)
tstRslt.MassStartRaw = StartMass.Val;
tstRslt.MassStart = Config.Formulas.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections); if (testParams.MaxMassIncrease > 0)
tstRslt.MassEndRaw = EndMass.Val; {
tstRslt.MassEnd = Config.Formulas.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections); tstRslt.MassStartRaw = StartMass.Val;
tstRslt.MassOfEvapWater = 0; tstRslt.MassEndRaw = EndMass.Val;
tstRslt.FlowMass = 0; /// [kg/h] tstRslt.MassStart = Config.Formulas.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections);
tstRslt.FlowVolume = 0; /// [m3/h] tstRslt.MassEnd = Config.Formulas.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
tstRslt.VolumeMaster = 0; /// [l] volume from the master flow meter }
tstRslt.VolumeCTV = 0; /// [l] 1000.0f is because density is in [kg/m3] else
tstRslt.ConstMasterRaw = 0; /// Convert the flow to [m3/h] {
tstRslt.ConstMaster = 0; /// Convert the flow to [m3/h] tstRslt.MassStartRaw = 0;
tstRslt.ErrorMaster = 0; tstRslt.MassStart = 0;
tstRslt.ErrorFlags = 0; tstRslt.MassEndRaw = 0;
tstRslt.InfoFlags = 0; tstRslt.MassEnd = 0;
}
tstRslt.MassOfEvapWater = 0;
tstRslt.FlowMass = 0; /// [kg/h]
tstRslt.FlowVolume = 0; /// [m3/h]
tstRslt.VolumeMaster = 0; /// [l] volume from the master flow meter
tstRslt.VolumeCTV = 0; /// [l] 1000.0f is because density is in [kg/m3]
tstRslt.ConstMasterRaw = 0; /// Convert the flow to [m3/h]
tstRslt.ConstMaster = 0; /// Convert the flow to [m3/h]
tstRslt.ErrorMaster = 0;
tstRslt.ErrorFlags = 0;
tstRslt.InfoFlags = 0;
bool pressureDropPassed = (testParams.MaxPressureDrop == 0) ? true : ((testParams.MaxPressureDrop > 0) ? (PressDownStat.First - PressDownStat.Last < testParams.MaxPressureDrop) bool pressureDropPassed = (testParams.MaxPressureDrop == 0) ? true : ((testParams.MaxPressureDrop > 0) ? (PressDownStat.First - PressDownStat.Last < testParams.MaxPressureDrop)
+2 -2
View File
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number // Build Number
// Revision // Revision
// //
[assembly: AssemblyVersion("2.26.1609.0")] [assembly: AssemblyVersion("2.26.1616.0")]
[assembly: AssemblyFileVersion("2.26.1609.0")] [assembly: AssemblyFileVersion("2.26.1616.0")]