Bug fix in LeakTestSeq.
This commit is contained in:
parent
39197ddd71
commit
1905d3644e
@ -50,22 +50,17 @@ namespace TBF.Rig.TestMethods.LeakTest
|
||||
/// </returns>
|
||||
public IList<Event> Execute(Config.Entities.Test test, int repetitionNr, bool isLastRepetition, LeakTestParams testParams)
|
||||
{
|
||||
IScale scale = null;
|
||||
|
||||
if ((testParams.MaxPressureDrop != 0) && (benchPath.PressMtrDown == null))
|
||||
{
|
||||
Bridge.OnError(this, Strings.Missing_a_pressure_meter);
|
||||
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;
|
||||
if (scale == null)
|
||||
{
|
||||
Bridge.OnError(this, Strings.Missing_a_scale);
|
||||
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
|
||||
@ -379,26 +374,38 @@ namespace TBF.Rig.TestMethods.LeakTest
|
||||
tstRslt.DensityDiv = 0;
|
||||
|
||||
/// Main results
|
||||
tstRslt.MethodClass = TbfComponents.FindComponent(test.Method).ClassName;
|
||||
tstRslt.StartTime = TestStartTime;
|
||||
tstRslt.EndTime = TestEndTime;
|
||||
tstRslt.FlowSetTime = 0;
|
||||
tstRslt.TestTime = Convert.ToDouble(testParams.DurationPMax); /// [s] measurement time
|
||||
tstRslt.PulsesMaster = 0; /// Pulses of the master flow meter (test total)
|
||||
tstRslt.MassStartRaw = StartMass.Val;
|
||||
tstRslt.MassStart = Config.Formulas.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections);
|
||||
tstRslt.MassEndRaw = EndMass.Val;
|
||||
tstRslt.MassEnd = Config.Formulas.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
|
||||
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;
|
||||
tstRslt.MethodClass = TbfComponents.FindComponent(test.Method).ClassName;
|
||||
tstRslt.StartTime = TestStartTime;
|
||||
tstRslt.EndTime = TestEndTime;
|
||||
tstRslt.FlowSetTime = 0;
|
||||
tstRslt.TestTime = Convert.ToDouble(testParams.DurationPMax); /// [s] measurement time
|
||||
tstRslt.PulsesMaster = 0; /// Pulses of the master flow meter (test total)
|
||||
|
||||
if (testParams.MaxMassIncrease > 0)
|
||||
{
|
||||
tstRslt.MassStartRaw = StartMass.Val;
|
||||
tstRslt.MassEndRaw = EndMass.Val;
|
||||
tstRslt.MassStart = Config.Formulas.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections);
|
||||
tstRslt.MassEnd = Config.Formulas.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
|
||||
}
|
||||
else
|
||||
{
|
||||
tstRslt.MassStartRaw = 0;
|
||||
tstRslt.MassStart = 0;
|
||||
tstRslt.MassEndRaw = 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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user