|
|
|
@@ -5,6 +5,8 @@ using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using log4net;
|
|
|
|
|
using Common;
|
|
|
|
|
using Config.Entities;
|
|
|
|
|
using TBF.Resources;
|
|
|
|
|
using TBF.UiBridge;
|
|
|
|
|
using TBF.Rig.GenericDevices;
|
|
|
|
@@ -76,7 +78,7 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
public IList<Event> Execute(Config.Entities.Test test, int repetitionNr, bool isLastRepetition,
|
|
|
|
|
bool compound,
|
|
|
|
|
HeatMeters.TestParams heatMetersTestParams,
|
|
|
|
|
Config.Entities.DebugMode debugLevel)
|
|
|
|
|
Common.DebugMode debugLevel)
|
|
|
|
|
{
|
|
|
|
|
ControlBoard.IControlBoard cBrd = StateMachine.ControlBoard;
|
|
|
|
|
IScale scale = cBrd.Devices.Scale as IScale;
|
|
|
|
@@ -205,7 +207,7 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
.EnterState();
|
|
|
|
|
do {
|
|
|
|
|
e = StateMachine.WaitRunDevsRunOps();
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.JustStarted));
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.JustStarted));
|
|
|
|
|
|
|
|
|
|
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
|
|
|
|
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
|
|
|
@@ -218,7 +220,7 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
Bridge.OnActivity(this, Strings.Starting_the_pump);
|
|
|
|
|
//------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.FlowSetting));
|
|
|
|
|
int flowSetTime0 = StateMachine.Time;
|
|
|
|
|
|
|
|
|
|
if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower);
|
|
|
|
@@ -232,8 +234,8 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
.EnterState();
|
|
|
|
|
do {
|
|
|
|
|
e = StateMachine.WaitRunDevsRunOps();
|
|
|
|
|
Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
|
|
|
|
Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Progress.FlowSetting));
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.FlowSetting));
|
|
|
|
|
|
|
|
|
|
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
|
|
|
|
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
|
|
|
@@ -252,8 +254,8 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
.EnterState();
|
|
|
|
|
do {
|
|
|
|
|
e = StateMachine.WaitRunDevsRunOps();
|
|
|
|
|
Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
|
|
|
|
Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Progress.FlowSetting));
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.FlowSetting));
|
|
|
|
|
|
|
|
|
|
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
|
|
|
|
}
|
|
|
|
@@ -288,8 +290,8 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
.EnterState();
|
|
|
|
|
do {
|
|
|
|
|
e = StateMachine.WaitRunDevsRunOps();
|
|
|
|
|
Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
|
|
|
|
Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Progress.FlowSetting));
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.FlowSetting));
|
|
|
|
|
|
|
|
|
|
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
|
|
|
|
}
|
|
|
|
@@ -312,8 +314,8 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
.EnterState();
|
|
|
|
|
do {
|
|
|
|
|
e = StateMachine.WaitRunDevsRunOps();
|
|
|
|
|
Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
|
|
|
|
Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Progress.FlowSetting));
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.FlowSetting));
|
|
|
|
|
|
|
|
|
|
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
|
|
|
|
}
|
|
|
|
@@ -327,8 +329,8 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
.EnterState();
|
|
|
|
|
do {
|
|
|
|
|
e = StateMachine.WaitRunDevsRunOps();
|
|
|
|
|
Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
|
|
|
|
Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Progress.FlowSetting));
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.FlowSetting));
|
|
|
|
|
|
|
|
|
|
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
|
|
|
|
}
|
|
|
|
@@ -342,8 +344,8 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
.EnterState();
|
|
|
|
|
do {
|
|
|
|
|
e = StateMachine.WaitRunDevsRunOps();
|
|
|
|
|
Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
|
|
|
|
Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Progress.FlowSetting));
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.FlowSetting));
|
|
|
|
|
|
|
|
|
|
if (e.Contains(Event.OpArgumentError)) { retVal = Event.OpArgumentError; goto stopTest; }
|
|
|
|
|
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
|
|
|
@@ -532,7 +534,7 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
{
|
|
|
|
|
e = StateMachine.WaitRunDevsRunOps();
|
|
|
|
|
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Test));
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.Test));
|
|
|
|
|
|
|
|
|
|
if (e.Contains(Event.Error)) { retVal = Event.Error; break; }
|
|
|
|
|
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; break; }
|
|
|
|
@@ -559,7 +561,7 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
|
|
|
|
|
if (heatMetersTestParams != null)
|
|
|
|
|
{
|
|
|
|
|
for (int i = 0; i < Config.Data.HeatMetersCount; i++)
|
|
|
|
|
for (int i = 0; i < Common.Data.HeatMetersCount; i++)
|
|
|
|
|
{
|
|
|
|
|
Rig.RegisterReaders.StandingStartStop.RegisterReader volumeRegisterReader =
|
|
|
|
|
sensPath.RegisterReaders[2 * i] as Rig.RegisterReaders.StandingStartStop.RegisterReader;
|
|
|
|
@@ -576,7 +578,7 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
for (int i = 0; i < Config.Data.WMsCount; i++)
|
|
|
|
|
for (int i = 0; i < Common.Data.WMsCount; i++)
|
|
|
|
|
{
|
|
|
|
|
GenericDevices.IRegReader rr = sensPath.RegisterReaders[i];
|
|
|
|
|
|
|
|
|
@@ -697,7 +699,7 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
double T_in = (TempRefHi1.Val + TempRefHi2.Val) / 2; /// [°C]
|
|
|
|
|
double T_out = (TempRefLo1.Val + TempRefLo2.Val) / 2; /// [°C]
|
|
|
|
|
double deltaVolume = LtrPerRefPulse * RefPulsesDelta; /// [l]
|
|
|
|
|
double deltaEnergy = (0.001 * deltaVolume) * (T_in - T_out) * Config.Formulas.HeatCoefficientWater(16, T_in, T_out, heatMetersTestParams.FlowMeasuredAtHiTempPipe); /// [J] = [m3] * [K] * [J/(m3 K)]
|
|
|
|
|
double deltaEnergy = (0.001 * deltaVolume) * (T_in - T_out) * Formulas.HeatCoefficientWater(16, T_in, T_out, heatMetersTestParams.FlowMeasuredAtHiTempPipe); /// [J] = [m3] * [K] * [J/(m3 K)]
|
|
|
|
|
Energy.Update(deltaEnergy);
|
|
|
|
|
VolumeForEnergy.Update(deltaVolume);
|
|
|
|
|
lastEnergyUpdateTime = StateMachine.Time;
|
|
|
|
@@ -706,8 +708,8 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.Test));
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Test));
|
|
|
|
|
Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Progress.Test));
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.Test));
|
|
|
|
|
}
|
|
|
|
|
while (cBrd.RefPulses < initialPulsesCount + totalPulses && !e.Contains(Event.TestCompleted) && !e.Contains(Event.Next));
|
|
|
|
|
|
|
|
|
@@ -779,14 +781,14 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double massStart = Config.Formulas.CorrectedValue(StartMass.Val, scale.Corrections);
|
|
|
|
|
double massEnd = Config.Formulas.CorrectedValue(EndMass.Val, scale.Corrections);
|
|
|
|
|
double densityOut = Config.Formulas.WaterDensityFromTempPress((TempUpStat.Average + TempDownStat.Average) / 2,
|
|
|
|
|
double massStart = MeasurementCorrection.CorrectedValue(StartMass.Val, scale.Corrections);
|
|
|
|
|
double massEnd = MeasurementCorrection.CorrectedValue(EndMass.Val, scale.Corrections);
|
|
|
|
|
double densityOut = Formulas.WaterDensityFromTempPress((TempUpStat.Average + TempDownStat.Average) / 2,
|
|
|
|
|
(PressUpStat.Average + PressDownStat.Average) / 2);
|
|
|
|
|
double buoyancy = Config.Formulas.Buoyancy();
|
|
|
|
|
double buoyancy = Formulas.Buoyancy();
|
|
|
|
|
double massOfEvaporatedWater = (double)(tMass2 - tMass1) * outPath.Scale.EvaporationRate(TempDivStat.Average);
|
|
|
|
|
double volumeCTV = 1000.0 * buoyancy * (massEnd - massStart + massOfEvaporatedWater) / densityOut;
|
|
|
|
|
if (debugLevel == Config.Entities.DebugMode.Simulate) volumeCTV = test.Volume;
|
|
|
|
|
if (debugLevel == Common.DebugMode.Simulate) volumeCTV = test.Volume;
|
|
|
|
|
|
|
|
|
|
double refEnergy = Energy.Sum * volumeCTV / VolumeForEnergy.Sum; /// [J]=[J]*[l]/[l]
|
|
|
|
|
|
|
|
|
@@ -818,7 +820,7 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
do {
|
|
|
|
|
e = StateMachine.WaitRunDevsRunOps();
|
|
|
|
|
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Test));
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.Test));
|
|
|
|
|
|
|
|
|
|
if (e.Contains(Event.Error)) { retVal = Event.Error; break; }
|
|
|
|
|
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; break; }
|
|
|
|
@@ -854,7 +856,7 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
|
|
|
|
|
if (heatMetersTestParams != null)
|
|
|
|
|
{
|
|
|
|
|
for (int i = 0; i < Config.Data.HeatMetersCount; i++)
|
|
|
|
|
for (int i = 0; i < Common.Data.HeatMetersCount; i++)
|
|
|
|
|
{
|
|
|
|
|
Rig.RegisterReaders.StandingStartStop.RegisterReader volumeRegisterReader =
|
|
|
|
|
sensPath.RegisterReaders[2 * i] as Rig.RegisterReaders.StandingStartStop.RegisterReader;
|
|
|
|
@@ -871,7 +873,7 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
for (int i = 0; i < Config.Data.WMsCount; i++)
|
|
|
|
|
for (int i = 0; i < Common.Data.WMsCount; i++)
|
|
|
|
|
{
|
|
|
|
|
GenericDevices.IRegReader rr = sensPath.RegisterReaders[i];
|
|
|
|
|
|
|
|
|
@@ -962,7 +964,7 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
tstRslt.ConstMaster = 1;
|
|
|
|
|
}
|
|
|
|
|
/// Calculated master pulses per liter
|
|
|
|
|
tstRslt.ErrorMaster = Config.Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV);
|
|
|
|
|
tstRslt.ErrorMaster = Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV);
|
|
|
|
|
|
|
|
|
|
tstRslt.FlowMean = (float)RefFlowStat.Average;
|
|
|
|
|
tstRslt.FlowStart = (float)RefFlowStat.First;
|
|
|
|
@@ -985,8 +987,8 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
{
|
|
|
|
|
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
|
|
|
|
|
|
|
|
|
Results.Entities.MeterTestRslt mainMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.CompoundMain);
|
|
|
|
|
Results.Entities.MeterTestRslt auxMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.CompoundAux);
|
|
|
|
|
Results.Entities.MeterTestRslt mainMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Common.CompoundMeterId.CompoundMain);
|
|
|
|
|
Results.Entities.MeterTestRslt auxMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Common.CompoundMeterId.CompoundAux);
|
|
|
|
|
|
|
|
|
|
for (int isAux = 0; isAux <= 1; isAux++) /// 0=main, 1=aux
|
|
|
|
|
{
|
|
|
|
@@ -1004,11 +1006,11 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
meterRslt.PulsesMeter = meterRslt.VolumeMeter;
|
|
|
|
|
meterRslt.PulsesMaster = tstRslt.PulsesMaster;
|
|
|
|
|
meterRslt.TestTime = tstRslt.TestTime;
|
|
|
|
|
meterRslt.Error = Config.Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, meterRslt.VolumeRef); /// Not used for evaluation
|
|
|
|
|
meterRslt.Error = Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, meterRslt.VolumeRef); /// Not used for evaluation
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Results.Entities.MeterTestRslt compoundMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.Compound);
|
|
|
|
|
Results.Entities.MeterTestRslt compoundMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Common.CompoundMeterId.Compound);
|
|
|
|
|
|
|
|
|
|
if (compoundMeterRslt != null && mainMeterRslt != null && auxMeterRslt != null)
|
|
|
|
|
{
|
|
|
|
@@ -1016,7 +1018,7 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
compoundMeterRslt.VolumeMeter = mainMeterRslt.VolumeMeter + auxMeterRslt.VolumeMeter;
|
|
|
|
|
compoundMeterRslt.PulsesMaster = tstRslt.PulsesMaster;
|
|
|
|
|
compoundMeterRslt.TestTime = tstRslt.TestTime;
|
|
|
|
|
compoundMeterRslt.Error = Config.Formulas.ErrorFromVolumes(compoundMeterRslt.VolumeMeter, compoundMeterRslt.VolumeRef);
|
|
|
|
|
compoundMeterRslt.Error = Formulas.ErrorFromVolumes(compoundMeterRslt.VolumeMeter, compoundMeterRslt.VolumeRef);
|
|
|
|
|
compoundMeterRslt.Passed = (compoundMeterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
|
|
|
|
&& (compoundMeterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
|
|
|
|
&& (tstRslt.ErrorFlags == 0);
|
|
|
|
@@ -1048,8 +1050,8 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
{
|
|
|
|
|
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
|
|
|
|
|
|
|
|
|
Results.Entities.MeterTestRslt volumeRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.HeatMeterVolume);
|
|
|
|
|
Results.Entities.MeterTestRslt energyRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.HeatMeterEnergy);
|
|
|
|
|
Results.Entities.MeterTestRslt volumeRslt = BatchRslts.GetMeterTestRslt(testName, i, Common.CompoundMeterId.HeatMeterVolume);
|
|
|
|
|
Results.Entities.MeterTestRslt energyRslt = BatchRslts.GetMeterTestRslt(testName, i, Common.CompoundMeterId.HeatMeterEnergy);
|
|
|
|
|
|
|
|
|
|
GenericDevices.IRegReader volumeRegReader =
|
|
|
|
|
(sensPath.RegisterReaders.Length > 2 * i) ? sensPath.RegisterReaders[2 * i] : null;
|
|
|
|
@@ -1068,7 +1070,7 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
volumeRslt.PulsesMaster = tstRslt.PulsesMaster; /// <----------------- ???
|
|
|
|
|
volumeRslt.TestTime = tstRslt.TestTime;
|
|
|
|
|
|
|
|
|
|
volumeRslt.Error = Config.Formulas.ErrorFromVolumes(volumeRslt.VolumeMeter, volumeRslt.VolumeRef);
|
|
|
|
|
volumeRslt.Error = Formulas.ErrorFromVolumes(volumeRslt.VolumeMeter, volumeRslt.VolumeRef);
|
|
|
|
|
volumeRslt.Passed = !heatMetersTestParams.EvaluateVolume ||
|
|
|
|
|
((volumeRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty) &&
|
|
|
|
|
(volumeRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty) &&
|
|
|
|
@@ -1087,7 +1089,7 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
energyRslt.PulsesMeter = energyRslt.VolumeMeter;
|
|
|
|
|
energyRslt.PulsesMaster = tstRslt.PulsesMaster; /// <----------------- ???
|
|
|
|
|
|
|
|
|
|
energyRslt.Error = Config.Formulas.ErrorFromVolumes(energyRslt.VolumeMeter, energyRslt.VolumeRef);
|
|
|
|
|
energyRslt.Error = Formulas.ErrorFromVolumes(energyRslt.VolumeMeter, energyRslt.VolumeRef);
|
|
|
|
|
energyRslt.Passed = (energyRslt.Error >= heatMetersTestParams.ErrorLimitLo)
|
|
|
|
|
&& (energyRslt.Error <= heatMetersTestParams.ErrorLimitHi)
|
|
|
|
|
&& (tstRslt.ErrorFlags == 0);
|
|
|
|
@@ -1105,7 +1107,7 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
{
|
|
|
|
|
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
|
|
|
|
|
|
|
|
|
Results.Entities.MeterTestRslt meterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.Single);
|
|
|
|
|
Results.Entities.MeterTestRslt meterRslt = BatchRslts.GetMeterTestRslt(testName, i, Common.CompoundMeterId.Single);
|
|
|
|
|
GenericDevices.IRegReader regReader = sensPath.RegisterReaders[i];
|
|
|
|
|
|
|
|
|
|
if (meterRslt != null && regReader != null)
|
|
|
|
@@ -1119,7 +1121,7 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
meterRslt.PulsesMeter = meterRslt.VolumeMeter;
|
|
|
|
|
meterRslt.PulsesMaster = tstRslt.PulsesMaster;
|
|
|
|
|
meterRslt.TestTime = tstRslt.TestTime;
|
|
|
|
|
meterRslt.Error = Config.Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, meterRslt.VolumeRef);
|
|
|
|
|
meterRslt.Error = Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, meterRslt.VolumeRef);
|
|
|
|
|
meterRslt.Passed = (meterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
|
|
|
|
&& (meterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
|
|
|
|
&& (tstRslt.ErrorFlags == 0);
|
|
|
|
@@ -1160,7 +1162,7 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
|
|
|
|
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName, tstRslt));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.TransitionAfter));
|
|
|
|
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.TransitionAfter));
|
|
|
|
|
|
|
|
|
|
/// Append the results to the CSV-file
|
|
|
|
|
allResults.Info(TestResult2CsvLine(testName, test.Part));
|
|
|
|
|