FixedStartMassCollection method : Flow calculation modified, 5s trimmed at start/end, ver. 1.6.382
This commit is contained in:
+56
-4
@@ -320,6 +320,24 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
|||||||
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
|
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
|
||||||
|
|
||||||
/// Measurement loop - begin
|
/// Measurement loop - begin
|
||||||
|
int measurementLoopCont = 0;
|
||||||
|
|
||||||
|
int pulsesFixedStart_Start5 = 0;
|
||||||
|
int pulsesFixedStart_End_5 = 0;
|
||||||
|
int pulsesFixedStart_End_4 = 0;
|
||||||
|
int pulsesFixedStart_End_3 = 0;
|
||||||
|
int pulsesFixedStart_End_2 = 0;
|
||||||
|
int pulsesFixedStart_End_1 = 0;
|
||||||
|
int pulsesFixedStart_End = 0;
|
||||||
|
|
||||||
|
int timeFixedStart_Start5 = 0;
|
||||||
|
int timeFixedStart_End_5 = 0;
|
||||||
|
int timeFixedStart_End_4 = 0;
|
||||||
|
int timeFixedStart_End_3 = 0;
|
||||||
|
int timeFixedStart_End_2 = 0;
|
||||||
|
int timeFixedStart_End_1 = 0;
|
||||||
|
int timeFixedStart_End = 0;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
//--------------------------------
|
//--------------------------------
|
||||||
@@ -340,7 +358,10 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
|||||||
Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime));
|
Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (firstTime)
|
refFreq.Val = cBrd.ReferenceFreq;
|
||||||
|
refFlow.Val = cBrd.ReferenceFlow;
|
||||||
|
|
||||||
|
if (firstTime)
|
||||||
{
|
{
|
||||||
firstTime = false; /// Do the following only once
|
firstTime = false; /// Do the following only once
|
||||||
tstRslt.TempInStart = tempIn.Val;
|
tstRslt.TempInStart = tempIn.Val;
|
||||||
@@ -350,6 +371,28 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
|||||||
tstRslt.PressOutStart = pressOut.Val;
|
tstRslt.PressOutStart = pressOut.Val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (measurementLoopCont == 5)
|
||||||
|
{
|
||||||
|
pulsesFixedStart_Start5 = cBrd.EtPulses(0);
|
||||||
|
timeFixedStart_Start5 = StateMachine.Time;
|
||||||
|
}
|
||||||
|
///
|
||||||
|
pulsesFixedStart_End_5 = pulsesFixedStart_End_4;
|
||||||
|
pulsesFixedStart_End_4 = pulsesFixedStart_End_3;
|
||||||
|
pulsesFixedStart_End_3 = pulsesFixedStart_End_2;
|
||||||
|
pulsesFixedStart_End_2 = pulsesFixedStart_End_1;
|
||||||
|
pulsesFixedStart_End_1 = pulsesFixedStart_End;
|
||||||
|
pulsesFixedStart_End = cBrd.EtPulses(0);
|
||||||
|
///
|
||||||
|
timeFixedStart_End_5 = timeFixedStart_End_4;
|
||||||
|
timeFixedStart_End_4 = timeFixedStart_End_3;
|
||||||
|
timeFixedStart_End_3 = timeFixedStart_End_2;
|
||||||
|
timeFixedStart_End_2 = timeFixedStart_End_1;
|
||||||
|
timeFixedStart_End_1 = timeFixedStart_End;
|
||||||
|
timeFixedStart_End = StateMachine.Time;
|
||||||
|
|
||||||
|
|
||||||
tstRslt.TempInEnd = tempIn.Val;
|
tstRslt.TempInEnd = tempIn.Val;
|
||||||
tstRslt.TempOutEnd = tempOut.Val;
|
tstRslt.TempOutEnd = tempOut.Val;
|
||||||
tstRslt.TempDivEnd = tempDiv.Val;
|
tstRslt.TempDivEnd = tempDiv.Val;
|
||||||
@@ -359,8 +402,6 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
|||||||
|
|
||||||
AccumulateAveragedData();
|
AccumulateAveragedData();
|
||||||
|
|
||||||
refFreq.Val = cBrd.ReferenceFreq;
|
|
||||||
refFlow.Val = cBrd.ReferenceFlow;
|
|
||||||
tstRslt.AmbientTempAve = airTemperature.Val;
|
tstRslt.AmbientTempAve = airTemperature.Val;
|
||||||
tstRslt.AmbientPressAve = airPressure.Val;
|
tstRslt.AmbientPressAve = airPressure.Val;
|
||||||
tstRslt.AmbientHumiAve = airHumidity.Val;
|
tstRslt.AmbientHumiAve = airHumidity.Val;
|
||||||
@@ -376,6 +417,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
|||||||
|
|
||||||
float progress = Formulas.TestProgress(cBrd.EtPulses(0), totalPulses, estFlowSetTime, test.TstTime);
|
float progress = Formulas.TestProgress(cBrd.EtPulses(0), totalPulses, estFlowSetTime, test.TstTime);
|
||||||
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, true, cBrd, cBrd.TTime, progress));
|
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, true, cBrd, cBrd.TTime, progress));
|
||||||
|
|
||||||
|
measurementLoopCont++;
|
||||||
}
|
}
|
||||||
while (cBrd.EtPulses(0) < totalPulses);
|
while (cBrd.EtPulses(0) < totalPulses);
|
||||||
/// Measurement loop - end
|
/// Measurement loop - end
|
||||||
@@ -516,7 +559,16 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
|||||||
tstRslt.DensityDiv = Formulas.WaterDensityFromTemp(tstRslt.TempDivAvrg); /// [kg/m3]
|
tstRslt.DensityDiv = Formulas.WaterDensityFromTemp(tstRslt.TempDivAvrg); /// [kg/m3]
|
||||||
tstRslt.Time = cBrd.TTime; /// [s] measurement time
|
tstRslt.Time = cBrd.TTime; /// [s] measurement time
|
||||||
tstRslt.FlowMass = 3600.0f * tstRslt.MassDiff / tstRslt.Time; /// [kg/h]
|
tstRslt.FlowMass = 3600.0f * tstRslt.MassDiff / tstRslt.Time; /// [kg/h]
|
||||||
tstRslt.FlowVolume = 3600.0f * ltrPerRefPulse * cBrd.EtPulses(0) / tstRslt.Time; /// [l/h]
|
|
||||||
|
if (timeFixedStart_End_5 - timeFixedStart_Start5 > 0)
|
||||||
|
{
|
||||||
|
tstRslt.FlowVolume = (float)(3600.0 * ltrPerRefPulse * (double)(pulsesFixedStart_End_5 - pulsesFixedStart_Start5) / (double)(timeFixedStart_End_5 - timeFixedStart_Start5));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tstRslt.FlowVolume = 3600.0f * ltrPerRefPulse * cBrd.EtPulses(0) / tstRslt.Time; /// [l/h]
|
||||||
|
}
|
||||||
|
|
||||||
tstRslt.VolumeCTV = 1.00103f * 1000.0f * tstRslt.MassDiff / tstRslt.DensityOut; /// [l] 1000.0f is because density is in [kg/m3]
|
tstRslt.VolumeCTV = 1.00103f * 1000.0f * tstRslt.MassDiff / tstRslt.DensityOut; /// [l] 1000.0f is because density is in [kg/m3]
|
||||||
tstRslt.VolumeMaster = ltrPerRefPulse * cBrd.EtPulses(0); /// [l] volume from the master flow meter
|
tstRslt.VolumeMaster = ltrPerRefPulse * cBrd.EtPulses(0); /// [l] volume from the master flow meter
|
||||||
tstRslt.PulsesMaster = cBrd.EtPulses(0); /// Pulses of the master flow meter (test total)
|
tstRslt.PulsesMaster = cBrd.EtPulses(0); /// Pulses of the master flow meter (test total)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
|||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("Sensus")]
|
[assembly: AssemblyCompany("Sensus")]
|
||||||
[assembly: AssemblyProduct("TestBenchFramework")]
|
[assembly: AssemblyProduct("TestBenchFramework")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2013 - 2015 Sensus Slovensko, a.s.")]
|
[assembly: AssemblyCopyright("Copyright © 2013 - 2016 Sensus Slovensko, a.s.")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
|||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
[assembly: AssemblyVersion("1.6.150.1")]
|
[assembly: AssemblyVersion("1.6.382.1")]
|
||||||
[assembly: AssemblyFileVersion("1.6.150.1")]
|
[assembly: AssemblyFileVersion("1.6.382.1")]
|
||||||
|
|||||||
Reference in New Issue
Block a user