Combined meters measurement corrections, Q_rise and Q_fall in results

This commit is contained in:
Milan Hanajik
2015-01-17 08:57:50 +01:00
parent cfd812eab6
commit ad665e5f0b
6 changed files with 21 additions and 6 deletions
+1
View File
@@ -1,5 +1,6 @@
- dokoncenie process obrazovky - dokoncenie process obrazovky
- brat desatinnu bodku aj ciarku - brat desatinnu bodku aj ciarku
- dat zapamatanie polohy RV do Parametrov
BUGS HI – High importance BUGS HI – High importance
@@ -321,8 +321,11 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters
/// Optionally supress pulses from the large water meter /// Optionally supress pulses from the large water meter
if (testParams.SupressTrills) if (testParams.SupressTrills)
{ {
WMPulses[0] = 0; for (int i = 0; i < tstRslt.Meters.Count; i += 2)
tstRslt.Meters[0].PulsesMeter = 0; {
WMPulses[i] = 0;
tstRslt.Meters[i].PulsesMeter = 0;
}
} }
/// ///
@@ -225,7 +225,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
} }
int time = StateMachine.Time; int time = StateMachine.Time;
int diff = WMPulses[1] - lastWMPulses[1]; int diff = WMPulses[(test.Part - 1) * 2 + 1] - lastWMPulses[(test.Part - 1) * 2 + 1];
flowsForDetection[0] = cBrd.ReferenceFreq * outPath.FlowMeter.NominalFlow / 2000.0f; flowsForDetection[0] = cBrd.ReferenceFreq * outPath.FlowMeter.NominalFlow / 2000.0f;
pulseFreqsForDetection[0] = (float)diff / (float)(time - lastTime); pulseFreqsForDetection[0] = (float)diff / (float)(time - lastTime);
lastTime = StateMachine.Time; lastTime = StateMachine.Time;
@@ -300,10 +300,12 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
if (rvPulse > 0) if (rvPulse > 0)
{ {
Qrise = detectedFlow; Qrise = detectedFlow;
tstRslt.QRise = detectedFlow;
} }
else else
{ {
Qfall = detectedFlow; Qfall = detectedFlow;
tstRslt.QFall = detectedFlow;
} }
UiBridge.Bridge.OnLog(this, string.Format("detected flow={0}\r\n", detectedFlow.ToString("F2"))); UiBridge.Bridge.OnLog(this, string.Format("detected flow={0}\r\n", detectedFlow.ToString("F2")));
@@ -533,8 +535,11 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
/// Optionally supress pulses from the large water meter /// Optionally supress pulses from the large water meter
if (testParams.SupressTrills) if (testParams.SupressTrills)
{ {
WMPulses[0] = 0; for (int i = 0; i < tstRslt.Meters.Count; i += 2)
tstRslt.Meters[0].PulsesMeter = 0; {
WMPulses[i] = 0;
tstRslt.Meters[i].PulsesMeter = 0;
}
} }
/// ///
+3 -1
View File
@@ -77,7 +77,9 @@ namespace TBF.Entities
public virtual float ErrorMaster { get; set; } public virtual float ErrorMaster { get; set; }
public virtual float PulsesMaster { get; set; } public virtual float PulsesMaster { get; set; }
public virtual float ConstMaster { get; set; } /// Pulses per liter master flow meter public virtual float ConstMaster { get; set; } /// Pulses per liter master flow meter
public virtual float TimeDivStart0 { get; set; } public virtual float QRise { get; set; } /// Detected Q_rise of a composed meter
public virtual float QFall { get; set; } /// Detected Q_fall of a composed meter
public virtual float TimeDivStart0 { get; set; }
public virtual float TimeDivStart1 { get; set; } public virtual float TimeDivStart1 { get; set; }
public virtual float TimeDivStart2 { get; set; } public virtual float TimeDivStart2 { get; set; }
public virtual float TimeDivStart3 { get; set; } public virtual float TimeDivStart3 { get; set; }
@@ -111,6 +111,8 @@ namespace TBF.Forms
AllItems.Add(new ResultItemSpec("Reference pulses", "Ref.pulses", x => x.PulsesMaster.ToString(), null)); AllItems.Add(new ResultItemSpec("Reference pulses", "Ref.pulses", x => x.PulsesMaster.ToString(), null));
/// Combined water meters only results /// Combined water meters only results
AllItems.Add(new ResultItemSpec("Q rise", "Q rise [m3/h]", null, (x, y, z) => Utils.FloatToStr(x.TestResult.QRise, 4)));
AllItems.Add(new ResultItemSpec("Q fall", "Q fall [m3/h]", null, (x, y, z) => Utils.FloatToStr(x.TestResult.QFall, 4)));
AllItems.Add(new ResultItemSpec("Error large WM", "Error-L [%]", null, (x, y, z) => x.VolumeErrorPct.ToString("F2"))); AllItems.Add(new ResultItemSpec("Error large WM", "Error-L [%]", null, (x, y, z) => x.VolumeErrorPct.ToString("F2")));
AllItems.Add(new ResultItemSpec("Error small WM", "Error-S [%]", null, (x, y, z) => y.VolumeErrorPct.ToString("F2"))); AllItems.Add(new ResultItemSpec("Error small WM", "Error-S [%]", null, (x, y, z) => y.VolumeErrorPct.ToString("F2")));
AllItems.Add(new ResultItemSpec("Serial Nr large WM", "s/n", null, (x, y, z) => x.SerialNr)); AllItems.Add(new ResultItemSpec("Serial Nr large WM", "s/n", null, (x, y, z) => x.SerialNr));
@@ -83,6 +83,8 @@ namespace TBF.Mappings
Map(x => x.ErrorMaster); Map(x => x.ErrorMaster);
Map(x => x.PulsesMaster); Map(x => x.PulsesMaster);
Map(x => x.ConstMaster); /// Pulses per liter master flow meter Map(x => x.ConstMaster); /// Pulses per liter master flow meter
Map(x => x.QRise);
Map(x => x.QFall);
Map(x => x.TimeDivStart0); Map(x => x.TimeDivStart0);
Map(x => x.TimeDivStart1); Map(x => x.TimeDivStart1);
Map(x => x.TimeDivStart2); Map(x => x.TimeDivStart2);