From f2676993b1b95fb1afad9a7c3e34ff95d4cc5253 Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Fri, 25 Sep 2015 10:15:46 +0200 Subject: [PATCH] Results from pressure and leak tests fixed for compound meters, version 1.5.124. --- .../TestMethods/LeakTest/LeakTestSeq.cs | 46 ++++++++++++++++++ .../TestMethods/PMaxTest/PMaxTestSeq.cs | 48 ++++++++++++++++++- TestBenchFramework/Properties/AssemblyInfo.cs | 4 +- 3 files changed, 95 insertions(+), 3 deletions(-) diff --git a/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs b/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs index abe9a5e42..9793cadb3 100644 --- a/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs @@ -303,6 +303,8 @@ namespace TBF.BenchControl.TestMethods.LeakTest tstRslt.TimeDivEnd4 = 0; tstRslt.TimeDivEnd5 = 0; + if (StateMachine.Procedure.MetersKind == Entities.MetersKind.Single) + { for (int i = 0; i < Program.WMsCount; i++) { if (sensPath.RegisterReaders[i] != null) @@ -319,6 +321,45 @@ namespace TBF.BenchControl.TestMethods.LeakTest tstRslt.Meters[i].Passed = true; } } + } + else + { + for (int iCmbnd = 0; iCmbnd < Program.CompoundWMsCount; iCmbnd++) + { + tstRslt.CombinedMeters[iCmbnd].VolumeRef = 0; + + for (int i = 2 * iCmbnd; i < 2 * iCmbnd + 2; i++) + { + if (sensPath.RegisterReaders[i] == null || sensPath.RegisterReaders[i].PulsesPerLtr <= float.Epsilon) + { + tstRslt.Meters[i].PulsesPerLiter = 1.0f; + } + else + { + tstRslt.Meters[i].PulsesPerLiter = sensPath.RegisterReaders[i].PulsesPerLtr; + } + + tstRslt.Meters[i].SerialNr = (WaterMeters.Count > i) ? WaterMeters[i].SerialNr : string.Empty; + tstRslt.Meters[i].VolumeStart = 0; + tstRslt.Meters[i].VolumeEnd = 0; + tstRslt.Meters[i].VolumeRef = 0; + tstRslt.Meters[i].VolumeMeter = 0; + tstRslt.Meters[i].Time = test.TstTime; + tstRslt.Meters[i].TimeStart = 0; + tstRslt.Meters[i].TimeEnd = testParams.DurationPMax; + tstRslt.Meters[i].PulsesMeter = 0; + tstRslt.Meters[i].PulsesMaster = 0; + tstRslt.Meters[i].VolumeErrorPct = 0; + tstRslt.Meters[i].Passed = true; + } + + tstRslt.CombinedMeters[iCmbnd].VolumeMeter = 0; + tstRslt.CombinedMeters[iCmbnd].PulsesMaster = 0; + tstRslt.CombinedMeters[iCmbnd].Time = testParams.DurationPMax; + tstRslt.CombinedMeters[iCmbnd].VolumeErrorPct = 0; + tstRslt.CombinedMeters[iCmbnd].Passed = true; + } + } /// Add data - end AddOrOverwriteResult(tstRslt); @@ -358,5 +399,10 @@ namespace TBF.BenchControl.TestMethods.LeakTest retList.Add(retVal); return retList; } + + bool IsMainMtr(int i) + { + return (i % 2) == 0; + } } } diff --git a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs index c93b67013..65198475a 100644 --- a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs @@ -215,6 +215,8 @@ namespace TBF.BenchControl.TestMethods.PMaxTest tstRslt.TimeDivEnd4 = 0; tstRslt.TimeDivEnd5 = 0; + if (StateMachine.Procedure.MetersKind == Entities.MetersKind.Single) + { for (int i = 0; i < Program.WMsCount; i++) { if (sensPath.RegisterReaders[i] != null) @@ -227,9 +229,48 @@ namespace TBF.BenchControl.TestMethods.PMaxTest tstRslt.Meters[i].PulsesMeter = 0; tstRslt.Meters[i].PulsesMaster = 0; tstRslt.Meters[i].Time = testParams.DurationPMax; - tstRslt.Meters[i].VolumeErrorPct= 0; + tstRslt.Meters[i].VolumeErrorPct = 0; + tstRslt.Meters[i].Passed = true; + } + } + } + else + { + for (int iCmbnd = 0; iCmbnd < Program.CompoundWMsCount; iCmbnd++) + { + tstRslt.CombinedMeters[iCmbnd].VolumeRef = 0; + + for (int i = 2 * iCmbnd; i < 2 * iCmbnd + 2; i++) + { + if (sensPath.RegisterReaders[i] == null || sensPath.RegisterReaders[i].PulsesPerLtr <= float.Epsilon) + { + tstRslt.Meters[i].PulsesPerLiter = 1.0f; + } + else + { + tstRslt.Meters[i].PulsesPerLiter = sensPath.RegisterReaders[i].PulsesPerLtr; + } + + tstRslt.Meters[i].SerialNr = (WaterMeters.Count > i) ? WaterMeters[i].SerialNr : string.Empty; + tstRslt.Meters[i].VolumeStart = 0; + tstRslt.Meters[i].VolumeEnd = 0; + tstRslt.Meters[i].VolumeRef = 0; + tstRslt.Meters[i].VolumeMeter = 0; + tstRslt.Meters[i].Time = test.TstTime; + tstRslt.Meters[i].TimeStart = 0; + tstRslt.Meters[i].TimeEnd = testParams.DurationPMax; + tstRslt.Meters[i].PulsesMeter = 0; + tstRslt.Meters[i].PulsesMaster = 0; + tstRslt.Meters[i].VolumeErrorPct = 0; tstRslt.Meters[i].Passed = true; } + + tstRslt.CombinedMeters[iCmbnd].VolumeMeter = 0; + tstRslt.CombinedMeters[iCmbnd].PulsesMaster = 0; + tstRslt.CombinedMeters[iCmbnd].Time = testParams.DurationPMax; + tstRslt.CombinedMeters[iCmbnd].VolumeErrorPct = 0; + tstRslt.CombinedMeters[iCmbnd].Passed = true; + } } /// Add data - end @@ -270,5 +311,10 @@ namespace TBF.BenchControl.TestMethods.PMaxTest retList.Add(retVal); return retList; } + + bool IsMainMtr(int i) + { + return (i % 2) == 0; + } } } diff --git a/TestBenchFramework/Properties/AssemblyInfo.cs b/TestBenchFramework/Properties/AssemblyInfo.cs index 8cb50b23d..c09827621 100644 --- a/TestBenchFramework/Properties/AssemblyInfo.cs +++ b/TestBenchFramework/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("1.5.123.1")] -[assembly: AssemblyFileVersion("1.5.123.1")] +[assembly: AssemblyVersion("1.5.124.1")] +[assembly: AssemblyFileVersion("1.5.124.1")]