From 61bfa51fa78de3735eb4c99d34bdb6a6948934e1 Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Sat, 2 Jan 2016 10:37:11 +0100 Subject: [PATCH] Uncertainty used when evaluating tests, in TestWizard, UI, etc., version 2.1.171. --- Config/Properties/AssemblyInfo.cs | 6 +- Results/Properties/AssemblyInfo.cs | 8 +- ResultsBrowser/Properties/AssemblyInfo.cs | 8 +- .../BenchControl/Sequences/SequenceBase.cs | 19 ++-- .../TestMethods/Adjustment/AdjustmentSeq.cs | 3 +- .../TestMethods/Adjustment/WMErrorsForm.cs | 2 +- .../TestMethods/Adjustment/WMErrorsForm12.cs | 2 +- .../TestMethods/Adjustment/WMErrorsForm24.cs | 2 +- .../CombinedMeters/CombinedMetersSeq.cs | 3 +- .../CombinedWithDetectionSeq.cs | 3 +- .../FixedStartAdvancedSeq.cs | 6 +- .../FixedStartCombinedMetersSeq.cs | 8 +- .../FixedStartMassCollectionSeq.cs | 8 +- .../TestMethods/FlyingStart/FlyingStartSeq.cs | 3 +- .../FlyingStartCollectionMethodSeq.cs | 3 +- .../TestMethods/PMaxTest/PMaxTestSeq.cs | 102 +++++++++--------- .../ReferenceFlowmeterCalibrationSeq.cs | 3 +- .../iPerlCommunicationSeq.cs | 4 +- .../WaterMeters/iPerl/WaterMeter.cs | 4 +- TestBenchFramework/Properties/AssemblyInfo.cs | 6 +- .../VolumeAndErrorSelection.Designer.cs | 38 +++++-- .../TestWizard/VolumeAndErrorSelection.cs | 14 ++- 22 files changed, 146 insertions(+), 109 deletions(-) diff --git a/Config/Properties/AssemblyInfo.cs b/Config/Properties/AssemblyInfo.cs index baf6c603e..6eef8eb14 100644 --- a/Config/Properties/AssemblyInfo.cs +++ b/Config/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Sensus")] [assembly: AssemblyProduct("Config")] -[assembly: AssemblyCopyright("Copyright © 2013 - 2015 Sensus Slovensko a.s.")] +[assembly: AssemblyCopyright("Copyright © 2013 - 2016 Sensus Slovensko a.s.")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.0.2.0")] -[assembly: AssemblyFileVersion("2.0.2.0")] +[assembly: AssemblyVersion("2.1.171.0")] +[assembly: AssemblyFileVersion("2.1.171.0")] diff --git a/Results/Properties/AssemblyInfo.cs b/Results/Properties/AssemblyInfo.cs index 6dc5c1d97..0024818cc 100644 --- a/Results/Properties/AssemblyInfo.cs +++ b/Results/Properties/AssemblyInfo.cs @@ -8,9 +8,9 @@ using System.Runtime.InteropServices; [assembly: AssemblyTitle("Results")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] +[assembly: AssemblyCompany("Sensus")] [assembly: AssemblyProduct("Results")] -[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyCopyright("Copyright © 2016")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.0.2.0")] -[assembly: AssemblyFileVersion("2.0.2.0")] +[assembly: AssemblyVersion("2.1.171.0")] +[assembly: AssemblyFileVersion("2.1.171.0")] diff --git a/ResultsBrowser/Properties/AssemblyInfo.cs b/ResultsBrowser/Properties/AssemblyInfo.cs index 0d5d221b6..ca95f9111 100644 --- a/ResultsBrowser/Properties/AssemblyInfo.cs +++ b/ResultsBrowser/Properties/AssemblyInfo.cs @@ -8,9 +8,9 @@ using System.Runtime.InteropServices; [assembly: AssemblyTitle("ResultsBrowser")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] +[assembly: AssemblyCompany("Sensus")] [assembly: AssemblyProduct("ResultsBrowser")] -[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyCopyright("Copyright © 2015 - 2016 Sensus Slovensko a.s.")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.0.2.0")] -[assembly: AssemblyFileVersion("2.0.2.0")] +[assembly: AssemblyVersion("2.1.171.0")] +[assembly: AssemblyFileVersion("2.1.171.0")] diff --git a/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs b/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs index dc15497d4..fdbff8fb9 100644 --- a/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs +++ b/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs @@ -818,8 +818,8 @@ namespace TBF.BenchControl.Sequences sb.Append(";"); sb.Append(tstRslt.Volume); sb.Append(";"); sb.Append(tstRslt.Qfrom); sb.Append(";"); sb.Append(tstRslt.Qto); - sb.Append(";"); sb.Append(tstRslt.ErrLimLo); - sb.Append(";"); sb.Append(tstRslt.ErrLimHi); + sb.Append(";"); sb.Append(tstRslt.ErrLimLo + tstRslt.Uncertainty); + sb.Append(";"); sb.Append(tstRslt.ErrLimHi - tstRslt.Uncertainty); sb.Append(";"); sb.Append("0"); sb.Append(";"); sb.Append("60"); sb.Append(";"); sb.Append("0"); @@ -899,7 +899,8 @@ namespace TBF.BenchControl.Sequences sb.Append(";"); sb.Append(mtrRslt.PulsesMeter); /// WM Np met - pocet impulzov zo skusaneho meradla sb.Append(";"); sb.Append(mtrRslt.PulsesMaster); /// WM Np elm - pocet impulzov etalonu pocas merania pre prislusny vodomer sb.Append(";"); sb.Append(mtrRslt.Time); /// WM Tmet - cas merania (obmedzany pri synchro skuske) - bool ok = (mtrRslt.VolumeErrorPct >= tstRslt.ErrLimLo) && (mtrRslt.VolumeErrorPct <= tstRslt.ErrLimHi); + bool ok = (mtrRslt.VolumeErrorPct >= tstRslt.ErrLimLo + tstRslt.Uncertainty) + && (mtrRslt.VolumeErrorPct <= tstRslt.ErrLimHi - tstRslt.Uncertainty); sb.Append(";"); sb.Append(ok ? "OK" : "NOK"); /// WM Vysledok (t.j. ci je v hraniciach chyb) - OK/NOK sb.Append(";"); sb.Append(mtrRslt.Q2Correction.ToString("F1")); /// iPerl Q2 correction factor used during the test / AN value - hodnota z analogoveho prevodnika sb.Append(";"); sb.Append(mtrRslt.VolumeStart); /// WM Volume_start - pri datastreamovych hodnotach (alebo kamera) @@ -921,7 +922,8 @@ namespace TBF.BenchControl.Sequences sb.Append(";"); sb.Append(mtrRslt.PulsesMeter); /// WM Np met - pocet impulzov zo skusaneho meradla sb.Append(";"); sb.Append(mtrRslt.PulsesMaster); /// WM Np elm - pocet impulzov etalonu pocas merania pre prislusny vodomer sb.Append(";"); sb.Append(mtrRslt.Time); /// WM Tmet - cas merania (obmedzany pri synchro skuske) - bool ok = (mtrRslt.VolumeErrorPct >= tstRslt.ErrLimLo) && (mtrRslt.VolumeErrorPct <= tstRslt.ErrLimHi); + bool ok = (mtrRslt.VolumeErrorPct >= tstRslt.ErrLimLo + tstRslt.Uncertainty) + && (mtrRslt.VolumeErrorPct <= tstRslt.ErrLimHi - tstRslt.Uncertainty); sb.Append(";"); sb.Append(ok ? "OK" : "NOK"); /// WM Vysledok (t.j. ci je v hraniciach chyb) - OK/NOK sb.Append(";"); sb.Append(" "); /// WM AN value - hodnota z analogoveho prevodnika (teraz nic) sb.Append(";"); sb.Append(mtrRslt.VolumeStart); /// WM Volume_start - pri datastreamovych hodnotach (alebo kamera) @@ -1007,7 +1009,8 @@ namespace TBF.BenchControl.Sequences tstRslt.Meters[i].PulsesMaster = tstRslt.PulsesMaster; tstRslt.Meters[i].VolumeStart = 0; tstRslt.Meters[i].VolumeErrorPct = errorPct; - tstRslt.Meters[i].Passed = (test.ErrLimLo <= errorPct) && (errorPct <= test.ErrLimHi); + tstRslt.Meters[i].Passed = (errorPct >= test.ErrLimLo + test.Uncertainty) + && (errorPct <= test.ErrLimHi - test.Uncertainty); tstRslt.Meters[i].VolumeMeter = test.Volume * (1.0f + 0.01f * errorPct); tstRslt.Meters[i].PulsesMeter = sensPath.RegisterReaders[i].PulsesPerLtr * tstRslt.Meters[i].VolumeMeter; tstRslt.Meters[i].Disabled = false; @@ -1124,7 +1127,8 @@ namespace TBF.BenchControl.Sequences tstRslt.Meters[i].TimeEnd = test.TstTime; tstRslt.Meters[i].PulsesMaster = tstRslt.PulsesMaster; tstRslt.Meters[i].VolumeErrorPct = errorPct; - tstRslt.Meters[i].Passed = (test.ErrLimLo <= errorPct) && (errorPct <= test.ErrLimHi); + tstRslt.Meters[i].Passed = (errorPct >= test.ErrLimLo + test.Uncertainty) + && (errorPct <= test.ErrLimHi - test.Uncertainty); tstRslt.Meters[i].PulsesMeter = sensPath.RegisterReaders[i].PulsesPerLtr * tstRslt.Meters[i].VolumeMeter; } @@ -1133,7 +1137,8 @@ namespace TBF.BenchControl.Sequences tstRslt.CombinedMeters[iCmbnd].PulsesMaster = tstRslt.PulsesMaster; tstRslt.CombinedMeters[iCmbnd].Time = test.TstTime; tstRslt.CombinedMeters[iCmbnd].VolumeErrorPct = Formulas.ErrorFromVolumes(tstRslt.CombinedMeters[iCmbnd].VolumeMeter, tstRslt.CombinedMeters[iCmbnd].VolumeRef); - tstRslt.CombinedMeters[iCmbnd].Passed = (tstRslt.ErrLimLo <= tstRslt.CombinedMeters[iCmbnd].VolumeErrorPct) && (tstRslt.CombinedMeters[iCmbnd].VolumeErrorPct <= tstRslt.ErrLimHi); + tstRslt.CombinedMeters[iCmbnd].Passed = (tstRslt.CombinedMeters[iCmbnd].VolumeErrorPct >= tstRslt.ErrLimLo + tstRslt.Uncertainty) + && (tstRslt.CombinedMeters[iCmbnd].VolumeErrorPct <= tstRslt.ErrLimHi - tstRslt.Uncertainty); } return tstRslt; diff --git a/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs b/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs index 43911684f..a81038f9e 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs @@ -338,7 +338,8 @@ namespace TBF.BenchControl.TestMethods.Adjustment { tstRslt.Meters[i].VolumeErrorPct = -100; } - tstRslt.Meters[i].Passed = (tstRslt.ErrLimLo <= tstRslt.Meters[i].VolumeErrorPct) && (tstRslt.Meters[i].VolumeErrorPct <= tstRslt.ErrLimHi); + tstRslt.Meters[i].Passed = (tstRslt.Meters[i].VolumeErrorPct >= tstRslt.ErrLimLo + tstRslt.Uncertainty) + && (tstRslt.Meters[i].VolumeErrorPct <= tstRslt.ErrLimHi - tstRslt.Uncertainty); tstRslt.Meters[i].Disabled = false; } diff --git a/TestBenchFramework/BenchControl/TestMethods/Adjustment/WMErrorsForm.cs b/TestBenchFramework/BenchControl/TestMethods/Adjustment/WMErrorsForm.cs index 722315445..b94ddba33 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Adjustment/WMErrorsForm.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Adjustment/WMErrorsForm.cs @@ -140,7 +140,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment { if (!disabled[i]) { - PaintOne(graphics, rects[i], tr.Meters[i].VolumeErrorPct, tr.ErrLimLo, tr.ErrLimHi); + PaintOne(graphics, rects[i], tr.Meters[i].VolumeErrorPct, tr.ErrLimLo + tr.Uncertainty, tr.ErrLimHi - tr.Uncertainty); } } } diff --git a/TestBenchFramework/BenchControl/TestMethods/Adjustment/WMErrorsForm12.cs b/TestBenchFramework/BenchControl/TestMethods/Adjustment/WMErrorsForm12.cs index 56eb9b66a..c67e66786 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Adjustment/WMErrorsForm12.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Adjustment/WMErrorsForm12.cs @@ -179,7 +179,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment { if (!disabled[i]) { - PaintOne(graphics, rects[i], tr.Meters[i].VolumeErrorPct, tr.ErrLimLo, tr.ErrLimHi); + PaintOne(graphics, rects[i], tr.Meters[i].VolumeErrorPct, tr.ErrLimLo + tr.Uncertainty, tr.ErrLimHi - tr.Uncertainty); } } } diff --git a/TestBenchFramework/BenchControl/TestMethods/Adjustment/WMErrorsForm24.cs b/TestBenchFramework/BenchControl/TestMethods/Adjustment/WMErrorsForm24.cs index 9b2088d8a..1cdee016e 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Adjustment/WMErrorsForm24.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Adjustment/WMErrorsForm24.cs @@ -183,7 +183,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment { if (!disabled[i]) { - PaintOne(graphics, rects[i], tr.Meters[i].VolumeErrorPct, tr.ErrLimLo, tr.ErrLimHi); + PaintOne(graphics, rects[i], tr.Meters[i].VolumeErrorPct, tr.ErrLimLo + tr.Uncertainty, tr.ErrLimHi - tr.Uncertainty); } } } diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs index 61b67df84..41570c963 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs @@ -461,7 +461,8 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters tstRslt.CombinedMeters[iCmbnd].PulsesMaster = cBrd.EtPulses(0); tstRslt.CombinedMeters[iCmbnd].Time = cBrd.TTime; tstRslt.CombinedMeters[iCmbnd].VolumeErrorPct = Formulas.ErrorFromVolumes(tstRslt.CombinedMeters[iCmbnd].VolumeMeter, tstRslt.CombinedMeters[iCmbnd].VolumeRef); - tstRslt.CombinedMeters[iCmbnd].Passed = (tstRslt.ErrLimLo <= tstRslt.CombinedMeters[iCmbnd].VolumeErrorPct) && (tstRslt.CombinedMeters[iCmbnd].VolumeErrorPct <= tstRslt.ErrLimHi); + tstRslt.CombinedMeters[iCmbnd].Passed = (tstRslt.CombinedMeters[iCmbnd].VolumeErrorPct >= tstRslt.ErrLimLo + tstRslt.Uncertainty) + && (tstRslt.CombinedMeters[iCmbnd].VolumeErrorPct <= tstRslt.ErrLimHi - tstRslt.Uncertainty); } /// Add data - end diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs index 934cac3da..fe809743b 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs @@ -639,7 +639,8 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection tstRslt.CombinedMeters[iCmbnd].PulsesMaster = cBrd.EtPulses(0); tstRslt.CombinedMeters[iCmbnd].Time = cBrd.TTime; tstRslt.CombinedMeters[iCmbnd].VolumeErrorPct = Formulas.ErrorFromVolumes(tstRslt.CombinedMeters[iCmbnd].VolumeMeter, tstRslt.CombinedMeters[iCmbnd].VolumeRef); - tstRslt.CombinedMeters[iCmbnd].Passed = (tstRslt.ErrLimLo <= tstRslt.CombinedMeters[iCmbnd].VolumeErrorPct) && (tstRslt.CombinedMeters[iCmbnd].VolumeErrorPct <= tstRslt.ErrLimHi); + tstRslt.CombinedMeters[iCmbnd].Passed = (tstRslt.CombinedMeters[iCmbnd].VolumeErrorPct >= tstRslt.ErrLimLo + tstRslt.Uncertainty) + && (tstRslt.CombinedMeters[iCmbnd].VolumeErrorPct <= tstRslt.ErrLimHi - tstRslt.Uncertainty); } /// Add data - end diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs index 51190d722..4516d0e63 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs @@ -471,7 +471,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced { Bridge.OnActivity(this, "Enter the water meter data"); State.Create("FixedStartAdvanced : Enter end-state") - .AddOperation(dataEntryCmpnt.ShowTestEndFormOp(tstRslt.VolumeCTV, tstRslt.ErrLimLo, tstRslt.ErrLimHi)) + .AddOperation(dataEntryCmpnt.ShowTestEndFormOp(tstRslt.VolumeCTV, tstRslt.ErrLimLo + tstRslt.Uncertainty, + tstRslt.ErrLimHi - tstRslt.Uncertainty)) .AddOperation(checkUiOp) .EnterState(); do @@ -563,7 +564,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced { tstRslt.Meters[i].VolumeErrorPct = -100; } - tstRslt.Meters[i].Passed = (tstRslt.ErrLimLo <= tstRslt.Meters[i].VolumeErrorPct) && (tstRslt.Meters[i].VolumeErrorPct <= tstRslt.ErrLimHi); + tstRslt.Meters[i].Passed = (tstRslt.Meters[i].VolumeErrorPct >= tstRslt.ErrLimLo + tstRslt.Uncertainty) + && (tstRslt.Meters[i].VolumeErrorPct <= tstRslt.ErrLimHi - tstRslt.Uncertainty); tstRslt.Meters[i].Disabled = false; } diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs index 4b4dd4084..3eb4dc9ae 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs @@ -482,8 +482,9 @@ namespace TBF.BenchControl.TestMethods.FixedStartCombinedMeters { Bridge.OnActivity(this, "Enter the water meter data"); State.Create("FixedStartCombinedMeters : Enter end-state") - .AddOperation(dataEntryCmpnt.ShowTestEndFormOp(tstRslt.VolumeCTV, tstRslt.ErrLimLo, tstRslt.ErrLimHi)) - .AddOperation(checkUiOp) + .AddOperation(dataEntryCmpnt.ShowTestEndFormOp(tstRslt.VolumeCTV, tstRslt.ErrLimLo + tstRslt.Uncertainty, + tstRslt.ErrLimHi - tstRslt.Uncertainty)) + .AddOperation(checkUiOp) .EnterState(); do { @@ -581,7 +582,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartCombinedMeters tstRslt.CombinedMeters[iCmbnd].Time = cBrd.TTime; tstRslt.CombinedMeters[iCmbnd].VolumeErrorPct = Formulas.ErrorFromVolumes(tstRslt.CombinedMeters[iCmbnd].VolumeMeter, tstRslt.CombinedMeters[iCmbnd].VolumeRef); - tstRslt.CombinedMeters[iCmbnd].Passed = (tstRslt.ErrLimLo <= tstRslt.CombinedMeters[iCmbnd].VolumeErrorPct) && (tstRslt.CombinedMeters[iCmbnd].VolumeErrorPct <= tstRslt.ErrLimHi); + tstRslt.CombinedMeters[iCmbnd].Passed = (tstRslt.CombinedMeters[iCmbnd].VolumeErrorPct >= tstRslt.ErrLimLo + tstRslt.Uncertainty) + && (tstRslt.CombinedMeters[iCmbnd].VolumeErrorPct <= tstRslt.ErrLimHi - tstRslt.Uncertainty); } /// Add data - end diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs index 2a8761f5f..1028c7123 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs @@ -471,8 +471,9 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection { Bridge.OnActivity(this, "Enter the water meter data"); State.Create("FixedStartMassCollection : Enter end-state") - .AddOperation(dataEntryCmpnt.ShowTestEndFormOp(tstRslt.VolumeCTV, tstRslt.ErrLimLo, tstRslt.ErrLimHi)) - .AddOperation(checkUiOp) + .AddOperation(dataEntryCmpnt.ShowTestEndFormOp(tstRslt.VolumeCTV, tstRslt.ErrLimLo + tstRslt.Uncertainty, + tstRslt.ErrLimHi - tstRslt.Uncertainty)) + .AddOperation(checkUiOp) .EnterState(); do { @@ -563,7 +564,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection { tstRslt.Meters[i].VolumeErrorPct = -100; } - tstRslt.Meters[i].Passed = (tstRslt.ErrLimLo <= tstRslt.Meters[i].VolumeErrorPct) && (tstRslt.Meters[i].VolumeErrorPct <= tstRslt.ErrLimHi); + tstRslt.Meters[i].Passed = (tstRslt.Meters[i].VolumeErrorPct >= tstRslt.ErrLimLo + tstRslt.Uncertainty) + && (tstRslt.Meters[i].VolumeErrorPct <= tstRslt.ErrLimHi - tstRslt.Uncertainty); tstRslt.Meters[i].Disabled = false; } diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs index 855f14f0e..74509397f 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs @@ -311,7 +311,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStart { tstRslt.Meters[i].VolumeErrorPct = -100; } - tstRslt.Meters[i].Passed = (tstRslt.ErrLimLo <= tstRslt.Meters[i].VolumeErrorPct) && (tstRslt.Meters[i].VolumeErrorPct <= tstRslt.ErrLimHi); + tstRslt.Meters[i].Passed = (tstRslt.Meters[i].VolumeErrorPct >= tstRslt.ErrLimLo + tstRslt.Uncertainty) + && (tstRslt.Meters[i].VolumeErrorPct <= tstRslt.ErrLimHi - tstRslt.Uncertainty); } else { diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartCollectionMethod/FlyingStartCollectionMethodSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartCollectionMethod/FlyingStartCollectionMethodSeq.cs index cad9d416f..501014384 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartCollectionMethod/FlyingStartCollectionMethodSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStartCollectionMethod/FlyingStartCollectionMethodSeq.cs @@ -508,7 +508,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod { tstRslt.Meters[i].VolumeErrorPct = -100; } - tstRslt.Meters[i].Passed = (tstRslt.ErrLimLo <= tstRslt.Meters[i].VolumeErrorPct) && (tstRslt.Meters[i].VolumeErrorPct <= tstRslt.ErrLimHi); + tstRslt.Meters[i].Passed = (tstRslt.Meters[i].VolumeErrorPct >= tstRslt.ErrLimLo + tstRslt.Uncertainty) + && (tstRslt.Meters[i].VolumeErrorPct <= tstRslt.ErrLimHi - tstRslt.Uncertainty); } else { diff --git a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs index 2fede401d..cd5e092d9 100644 --- a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs @@ -218,60 +218,60 @@ namespace TBF.BenchControl.TestMethods.PMaxTest if (StateMachine.Procedure.MetersKind == Config.Entities.MetersKind.Single) { - for (int i = 0; i < Config.Data.WMsCount; i++) - { - if (sensPath.RegisterReaders[i] != null) + for (int i = 0; i < Config.Data.WMsCount; i++) { - 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].VolumeMeter = 0; - tstRslt.Meters[i].VolumeRef = 0; - tstRslt.Meters[i].PulsesMeter = 0; - tstRslt.Meters[i].PulsesMaster = 0; - tstRslt.Meters[i].Time = testParams.DurationPMax; - tstRslt.Meters[i].VolumeErrorPct = 0; - tstRslt.Meters[i].Passed = true; - } - } - } - else - { - for (int iCmbnd = 0; iCmbnd < Config.Data.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; + if (sensPath.RegisterReaders[i] != null) + { + 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].VolumeMeter = 0; + tstRslt.Meters[i].VolumeRef = 0; + tstRslt.Meters[i].PulsesMeter = 0; + tstRslt.Meters[i].PulsesMaster = 0; + tstRslt.Meters[i].Time = testParams.DurationPMax; + tstRslt.Meters[i].VolumeErrorPct = 0; + tstRslt.Meters[i].Passed = true; + } } + } + else + { + for (int iCmbnd = 0; iCmbnd < Config.Data.CompoundWMsCount; iCmbnd++) + { + tstRslt.CombinedMeters[iCmbnd].VolumeRef = 0; - 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; - } + 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 diff --git a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs index 806aa56fa..3ee10bd1d 100644 --- a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs @@ -398,7 +398,8 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration // { // tstRslt.Meters[i].VolumeErrorPct = -100; // } - // tstRslt.Meters[i].Passed = (tstRslt.ErrLimLo <= tstRslt.Meters[i].VolumeErrorPct) && (tstRslt.Meters[i].VolumeErrorPct <= tstRslt.ErrLimHi); + // tstRslt.Meters[i].Passed = (tstRslt.Meters[i].VolumeErrorPct >= tstRslt.ErrLimLo + tstRslt.Uncertainty) + // && (tstRslt.Meters[i].VolumeErrorPct <= tstRslt.ErrLimHi - tstRslt.Uncertainty); // } //} /// Add data - end diff --git a/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs b/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs index 882c1b2fe..66d17bddc 100644 --- a/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs @@ -251,8 +251,8 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication if (iPerl == null || Math.Abs(oriTestRslt.Meters[i].VolumeErrorPct) <= 0.5f || - oriTestRslt.Meters[i].VolumeErrorPct < oriTestRslt.ErrLimLo || - oriTestRslt.Meters[i].VolumeErrorPct > oriTestRslt.ErrLimHi) + oriTestRslt.Meters[i].VolumeErrorPct < oriTestRslt.ErrLimLo + oriTestRslt.Uncertainty || + oriTestRslt.Meters[i].VolumeErrorPct > oriTestRslt.ErrLimHi - oriTestRslt.Uncertainty) { /// Normal meter or iPerl without correction tstRslt.Meters[i].VolumeStart = oriTestRslt.Meters[i].VolumeStart; diff --git a/TestBenchFramework/BenchControl/WaterMeters/iPerl/WaterMeter.cs b/TestBenchFramework/BenchControl/WaterMeters/iPerl/WaterMeter.cs index 2b5448c65..e26dff292 100644 --- a/TestBenchFramework/BenchControl/WaterMeters/iPerl/WaterMeter.cs +++ b/TestBenchFramework/BenchControl/WaterMeters/iPerl/WaterMeter.cs @@ -176,8 +176,8 @@ namespace TBF.BenchControl.WaterMeters.iPerl double F = D / (NominalTestFlow * 10.0); /// Error corrected with 8 Raw Units per minute [%] double G = F / B; /// Error corrected with 1 Raw Unit per minute [%] - float errLimitLo = LastTestResult.TestResult.ErrLimLo; - float errLimitHi = LastTestResult.TestResult.ErrLimHi; + float errLimitLo = LastTestResult.TestResult.ErrLimLo + LastTestResult.TestResult.Uncertainty; + float errLimitHi = LastTestResult.TestResult.ErrLimHi - LastTestResult.TestResult.Uncertainty; if (LastTestResult.VolumeErrorPct < errLimitLo) return 0; /// No Q2 correction if error too large -> WM failed if (LastTestResult.VolumeErrorPct > errLimitHi) return 0; /// No Q2 correction if error too large -> WM failed diff --git a/TestBenchFramework/Properties/AssemblyInfo.cs b/TestBenchFramework/Properties/AssemblyInfo.cs index bff6f0f01..05c167f85 100644 --- a/TestBenchFramework/Properties/AssemblyInfo.cs +++ b/TestBenchFramework/Properties/AssemblyInfo.cs @@ -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("2.0.170.1")] -[assembly: AssemblyFileVersion("2.0.170.1")] +[assembly: AssemblyVersion("2.1.171.1")] +[assembly: AssemblyFileVersion("2.1.171.1")] diff --git a/TestBenchFramework/TestWizard/VolumeAndErrorSelection.Designer.cs b/TestBenchFramework/TestWizard/VolumeAndErrorSelection.Designer.cs index c4342724e..cdc4663a4 100644 --- a/TestBenchFramework/TestWizard/VolumeAndErrorSelection.Designer.cs +++ b/TestBenchFramework/TestWizard/VolumeAndErrorSelection.Designer.cs @@ -43,6 +43,8 @@ namespace TBF.TestWizard this.cancelButton = new System.Windows.Forms.Button(); this.nextButton = new System.Windows.Forms.Button(); this.backButton = new System.Windows.Forms.Button(); + this.uncertaintyTextBox = new System.Windows.Forms.TextBox(); + this.uncertaintyLabel = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.horizSplitContainer)).BeginInit(); this.horizSplitContainer.Panel1.SuspendLayout(); this.horizSplitContainer.Panel2.SuspendLayout(); @@ -59,6 +61,8 @@ namespace TBF.TestWizard // // horizSplitContainer.Panel1 // + this.horizSplitContainer.Panel1.Controls.Add(this.uncertaintyTextBox); + this.horizSplitContainer.Panel1.Controls.Add(this.uncertaintyLabel); this.horizSplitContainer.Panel1.Controls.Add(this.errLoPctTextBox); this.horizSplitContainer.Panel1.Controls.Add(this.errHiPctTextBox); this.horizSplitContainer.Panel1.Controls.Add(this.durationTextBox); @@ -79,7 +83,7 @@ namespace TBF.TestWizard // // errLoPctTextBox // - this.errLoPctTextBox.Location = new System.Drawing.Point(150, 85); + this.errLoPctTextBox.Location = new System.Drawing.Point(150, 76); this.errLoPctTextBox.Name = "errLoPctTextBox"; this.errLoPctTextBox.Size = new System.Drawing.Size(86, 20); this.errLoPctTextBox.TabIndex = 7; @@ -87,7 +91,7 @@ namespace TBF.TestWizard // // errHiPctTextBox // - this.errHiPctTextBox.Location = new System.Drawing.Point(150, 117); + this.errHiPctTextBox.Location = new System.Drawing.Point(150, 102); this.errHiPctTextBox.Name = "errHiPctTextBox"; this.errHiPctTextBox.Size = new System.Drawing.Size(86, 20); this.errHiPctTextBox.TabIndex = 6; @@ -95,7 +99,7 @@ namespace TBF.TestWizard // // durationTextBox // - this.durationTextBox.Location = new System.Drawing.Point(150, 53); + this.durationTextBox.Location = new System.Drawing.Point(150, 50); this.durationTextBox.Name = "durationTextBox"; this.durationTextBox.Size = new System.Drawing.Size(86, 20); this.durationTextBox.TabIndex = 5; @@ -112,7 +116,7 @@ namespace TBF.TestWizard // errHiPctLabel // this.errHiPctLabel.AutoSize = true; - this.errHiPctLabel.Location = new System.Drawing.Point(35, 117); + this.errHiPctLabel.Location = new System.Drawing.Point(35, 105); this.errHiPctLabel.Name = "errHiPctLabel"; this.errHiPctLabel.Size = new System.Drawing.Size(89, 13); this.errHiPctLabel.TabIndex = 3; @@ -121,17 +125,17 @@ namespace TBF.TestWizard // errLoPctLabel // this.errLoPctLabel.AutoSize = true; - this.errLoPctLabel.Location = new System.Drawing.Point(35, 88); + this.errLoPctLabel.Location = new System.Drawing.Point(35, 79); this.errLoPctLabel.Name = "errLoPctLabel"; this.errLoPctLabel.Size = new System.Drawing.Size(85, 13); this.errLoPctLabel.TabIndex = 2; this.errLoPctLabel.Text = "Error low limit [%]"; // - // timeLabel + // durationLabel // this.durationLabel.AutoSize = true; - this.durationLabel.Location = new System.Drawing.Point(35, 56); - this.durationLabel.Name = "timeLabel"; + this.durationLabel.Location = new System.Drawing.Point(35, 53); + this.durationLabel.Name = "durationLabel"; this.durationLabel.Size = new System.Drawing.Size(83, 13); this.durationLabel.TabIndex = 1; this.durationLabel.Text = "Test duration [s]"; @@ -180,6 +184,22 @@ namespace TBF.TestWizard this.backButton.UseVisualStyleBackColor = true; this.backButton.Click += new System.EventHandler(this.backButton_Click); // + // uncertaintyTextBox + // + this.uncertaintyTextBox.Location = new System.Drawing.Point(150, 128); + this.uncertaintyTextBox.Name = "uncertaintyTextBox"; + this.uncertaintyTextBox.Size = new System.Drawing.Size(86, 20); + this.uncertaintyTextBox.TabIndex = 9; + // + // uncertaintyLabel + // + this.uncertaintyLabel.AutoSize = true; + this.uncertaintyLabel.Location = new System.Drawing.Point(35, 131); + this.uncertaintyLabel.Name = "uncertaintyLabel"; + this.uncertaintyLabel.Size = new System.Drawing.Size(78, 13); + this.uncertaintyLabel.TabIndex = 8; + this.uncertaintyLabel.Text = "Uncertainty [%]"; + // // VolumeAndErrorSelection // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -213,5 +233,7 @@ namespace TBF.TestWizard private System.Windows.Forms.Label errLoPctLabel; private System.Windows.Forms.Label durationLabel; private System.Windows.Forms.Label volumeLabel; + private System.Windows.Forms.TextBox uncertaintyTextBox; + private System.Windows.Forms.Label uncertaintyLabel; } } \ No newline at end of file diff --git a/TestBenchFramework/TestWizard/VolumeAndErrorSelection.cs b/TestBenchFramework/TestWizard/VolumeAndErrorSelection.cs index ce1a59f5a..f064323dd 100644 --- a/TestBenchFramework/TestWizard/VolumeAndErrorSelection.cs +++ b/TestBenchFramework/TestWizard/VolumeAndErrorSelection.cs @@ -1,13 +1,7 @@ /// -/// Copyright (c) 2013-2015 Sensus Metering Systems +/// Copyright (c) 2013-2016 Sensus Metering Systems /// using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; using System.Windows.Forms; using Config.Entities; using TBF.Resources; @@ -33,6 +27,7 @@ namespace TBF.TestWizard durationLabel.Text = Strings.Duration_s; errLoPctLabel.Text = Strings.Err_limit_neg_pct_chdr; errHiPctLabel.Text = Strings.Err_limit_pos_pct_chdr; + uncertaintyLabel.Text = Strings.Uncertainty_pct_chdr; backButton.Text = Strings.BackBtnText; nextButton.Text = Strings.FinishBtnText; cancelButton.Text = Strings.CancelBtnText; @@ -54,6 +49,7 @@ namespace TBF.TestWizard durationTextBox.Text = test.TstTime.ToString(); errLoPctTextBox.Text = test.ErrLimLo.ToString(); errHiPctTextBox.Text = test.ErrLimHi.ToString(); + uncertaintyTextBox.Text = test.Uncertainty.ToString(); nextButton.Enabled = IsFormValid(); } @@ -64,7 +60,8 @@ namespace TBF.TestWizard return Utils.TryParseUFloat(volumeTextBox.Text, out dummy) && Utils.TryParseUFloat(durationTextBox.Text, out dummy) && Utils.TryParseSFloat(errLoPctTextBox.Text, out dummy) && - Utils.TryParseSFloat(errHiPctTextBox.Text, out dummy); + Utils.TryParseSFloat(errHiPctTextBox.Text, out dummy) && + Utils.TryParseUFloat(uncertaintyTextBox.Text, out dummy); } void UpdateTest() @@ -73,6 +70,7 @@ namespace TBF.TestWizard test.TstTime = Utils.ParseUFloat(durationTextBox.Text); test.ErrLimLo = Utils.ParseSFloat(errLoPctTextBox.Text); test.ErrLimHi = Utils.ParseSFloat(errHiPctTextBox.Text); + test.Uncertainty = Utils.ParseUFloat(uncertaintyTextBox.Text); } private void backButton_Click(object sender, EventArgs e)