Compare commits

...
4 changed files with 65 additions and 13 deletions
@@ -320,6 +320,24 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
/// 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
{
//--------------------------------
@@ -340,7 +358,10 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
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
tstRslt.TempInStart = tempIn.Val;
@@ -350,6 +371,28 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
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.TempOutEnd = tempOut.Val;
tstRslt.TempDivEnd = tempDiv.Val;
@@ -359,8 +402,6 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
AccumulateAveragedData();
refFreq.Val = cBrd.ReferenceFreq;
refFlow.Val = cBrd.ReferenceFlow;
tstRslt.AmbientTempAve = airTemperature.Val;
tstRslt.AmbientPressAve = airPressure.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);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, true, cBrd, cBrd.TTime, progress));
measurementLoopCont++;
}
while (cBrd.EtPulses(0) < totalPulses);
/// Measurement loop - end
@@ -516,7 +559,16 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
tstRslt.DensityDiv = Formulas.WaterDensityFromTemp(tstRslt.TempDivAvrg); /// [kg/m3]
tstRslt.Time = cBrd.TTime; /// [s] measurement time
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.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)
+2 -2
View File
@@ -51,9 +51,9 @@ namespace TBF
this.activityLabel = new System.Windows.Forms.Label();
this.mainTabControl = new System.Windows.Forms.TabControl();
this.homeTabPage = new System.Windows.Forms.TabPage();
this.ctrlBrdComponent = new ControlComponent3Munich.UserControl1();
this.ctrlBrdComponent = new ControlComponent_Torino2015.UserControl1();
this.processTabPage = new System.Windows.Forms.TabPage();
this.processTabPageCtrl = new TBF.Screens.ProcessTabPageCtrl6();
this.processTabPageCtrl = new TBF.Screens.ProcessTabPageCtrl24();
this.measurementTabPage = new System.Windows.Forms.TabPage();
this.MeasurementTabPageCtrl = new TBF.Screens.MeasurementTabPageCtrl();
this.insertTabPage = new System.Windows.Forms.TabPage();
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Sensus")]
[assembly: AssemblyProduct("TestBenchFramework")]
[assembly: AssemblyCopyright("Copyright © 2013 - 2015 Sensus Slovensko, a.s.")]
[assembly: AssemblyCopyright("Copyright © 2013 - 2016 Sensus Slovensko, a.s.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.6.150.1")]
[assembly: AssemblyFileVersion("1.6.150.1")]
[assembly: AssemblyVersion("1.6.382.1")]
[assembly: AssemblyFileVersion("1.6.382.1")]
+4 -4
View File
@@ -39,7 +39,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
<DefineConstants>TRACE;DEBUG;MURES_PT40</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -48,7 +48,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;MUNICH</DefineConstants>
<DefineConstants>TRACE;MURES_PT40</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -94,8 +94,8 @@
<SignManifests>true</SignManifests>
</PropertyGroup>
<ItemGroup>
<Reference Include="ControlComponent3Munich">
<HintPath>..\packages\ControlBoard\Munich\ControlComponent3Munich.dll</HintPath>
<Reference Include="ControlComponent3U">
<HintPath>..\packages\ControlBoard\MURES-PT40\ControlComponent3U.dll</HintPath>
</Reference>
<Reference Include="FluentNHibernate">
<HintPath>..\packages\FluentNHibernate.1.3.0.733\lib\FluentNHibernate.dll</HintPath>