diff --git a/Results/Entities/Batch.cs b/Results/Entities/Batch.cs index 33f66ee10..e817e34a1 100644 --- a/Results/Entities/Batch.cs +++ b/Results/Entities/Batch.cs @@ -48,9 +48,12 @@ namespace Results.Entities foreach (var tr in TestRslts) { - double time = (tr.EndTime - tr.StartTime).TotalSeconds; - timeSum += time; - sum += (tr.AmbTempMean * time); + if (tr.TestDone) + { + double duration = (tr.EndTime - tr.StartTime).TotalSeconds; + timeSum += duration; + sum += (tr.AmbTempMean * duration); + } } return (timeSum == 0) ? 0 : (sum / timeSum); @@ -63,9 +66,12 @@ namespace Results.Entities foreach (var tr in TestRslts) { - double time = (tr.EndTime - tr.StartTime).TotalSeconds; - timeSum += time; - sum += (tr.AmbPressMean * time); + if (tr.TestDone) + { + double duration = (tr.EndTime - tr.StartTime).TotalSeconds; + timeSum += duration; + sum += (tr.AmbPressMean * duration); + } } return (timeSum == 0) ? 0 : (sum / timeSum); @@ -78,9 +84,12 @@ namespace Results.Entities foreach (var tr in TestRslts) { - double time = (tr.EndTime - tr.StartTime).TotalSeconds; - timeSum += time; - sum += (tr.AmbHumiMean * time); + if (tr.TestDone) + { + double duration = (tr.EndTime - tr.StartTime).TotalSeconds; + timeSum += duration; + sum += (tr.AmbHumiMean * duration); + } } return (timeSum == 0) ? 0 : (sum / timeSum); @@ -93,9 +102,12 @@ namespace Results.Entities foreach (var tr in TestRslts) { - double time = (tr.EndTime - tr.StartTime).TotalSeconds; - timeSum += time; - sum += (tr.Buoyancy * time); + if (tr.TestDone) + { + double duration = (tr.EndTime - tr.StartTime).TotalSeconds; + timeSum += duration; + sum += (tr.Buoyancy * duration); + } } return (timeSum == 0) ? 0 : (sum / timeSum); diff --git a/Results/Properties/AssemblyInfo.cs b/Results/Properties/AssemblyInfo.cs index 9de368b76..88fc58967 100644 --- a/Results/Properties/AssemblyInfo.cs +++ b/Results/Properties/AssemblyInfo.cs @@ -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.14.598.0")] -[assembly: AssemblyFileVersion("2.14.598.0")] +[assembly: AssemblyVersion("2.14.599.0")] +[assembly: AssemblyFileVersion("2.14.599.0")] diff --git a/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs b/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs index 65986039a..821fcae86 100644 --- a/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs +++ b/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs @@ -1066,7 +1066,7 @@ namespace TBF.BenchControl.Sequences if (tstRslt == null) return; /// Prevent program crash in certain cases tstRslt.StartTime = DateTime.Now; - tstRslt.EndTime = DateTime.Now; + tstRslt.EndTime = DateTime.Now + new TimeSpan(0,0,1); tstRslt.FlowSetTime = 10; tstRslt.TestTime = tstRslt.TargetTime(); /// TODO: Verify whether 'ltrPerRefPulse' is up to date @@ -1143,7 +1143,8 @@ namespace TBF.BenchControl.Sequences meterRslt.Passed = (errorPct >= tstRslt.ErrLimLo() + tstRslt.Uncertainty()) && (errorPct <= tstRslt.ErrLimHi() - tstRslt.Uncertainty()); meterRslt.TestDone = true; - } + tstRslt.TestDone = true; + } } tstRslt.Components = Results.Entities.Components @@ -1170,8 +1171,8 @@ namespace TBF.BenchControl.Sequences Results.Entities.TestRslt tstRslt = ProcessData.BatchRslts.GetTestRslt(fullTestName, part); tstRslt.StartTime = DateTime.Now; - tstRslt.EndTime = DateTime.Now; - tstRslt.FlowSetTime = 10; + tstRslt.EndTime = DateTime.Now + new TimeSpan(0, 0, 1); + tstRslt.FlowSetTime = 10; tstRslt.TestTime = tstRslt.TargetTime(); /// TODO: Verify whether 'ltrPerRefPulse' is up to date tstRslt.PulsesMaster = (LtrPerRefPulse > 1E-6) ? (tstRslt.TargetVolume() / LtrPerRefPulse) : 1; @@ -1256,7 +1257,7 @@ namespace TBF.BenchControl.Sequences meterRslt.Passed = (errorPct >= tstRslt.ErrLimLo() + tstRslt.Uncertainty()) && (errorPct <= tstRslt.ErrLimHi() - tstRslt.Uncertainty()); meterRslt.TestDone = true; - } + } } compoundRslt.VolumeRef = tstRslt.VolumeCTV; /// [l] must be calculated before main & aux. meter error @@ -1268,7 +1269,8 @@ namespace TBF.BenchControl.Sequences compoundRslt.Passed = (compoundRslt.Error >= tstRslt.ErrLimLo() + tstRslt.Uncertainty()) && (compoundRslt.Error <= tstRslt.ErrLimHi() - tstRslt.Uncertainty()); compoundRslt.TestDone = true; - } + tstRslt.TestDone = true; + } tstRslt.Components = Results.Entities.Components .UpdateList(BatchRslts.ComponentsList, @@ -1294,7 +1296,7 @@ namespace TBF.BenchControl.Sequences Results.Entities.TestRslt tstRslt = ProcessData.BatchRslts.GetTestRslt(fullTestName, part); tstRslt.StartTime = DateTime.Now; - tstRslt.EndTime = DateTime.Now; + tstRslt.EndTime = DateTime.Now + new TimeSpan(0, 0, 1); tstRslt.FlowSetTime = 10; tstRslt.TestTime = tstRslt.TargetTime(); /// TODO: Verify whether 'ltrPerRefPulse' is up to date @@ -1376,6 +1378,7 @@ namespace TBF.BenchControl.Sequences ((errorPct >= tstRslt.ErrLimLo() + tstRslt.Uncertainty()) && (errorPct <= tstRslt.ErrLimHi() - tstRslt.Uncertainty())); volumeRslt.TestDone = true; + tstRslt.TestDone = true; } if (energyRslt != null && energyRegReader != null) @@ -1394,6 +1397,7 @@ namespace TBF.BenchControl.Sequences energyRslt.Error = Formulas.ErrorFromVolumes(energyMeter, energy); energyRslt.Passed = (errorPct >= energyErrLimLo) && (errorPct <= energyErrLimHi); energyRslt.TestDone = true; + tstRslt.TestDone = true; } } diff --git a/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs b/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs index 90c7ce11b..cb3dc0194 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs @@ -360,8 +360,9 @@ namespace TBF.BenchControl.TestMethods.Adjustment meterRslt.Error = Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, meterRslt.VolumeRef); meterRslt.Passed = (meterRslt.Error >= test.ErrLimLo + test.Uncertainty) && (meterRslt.Error <= test.ErrLimHi - test.Uncertainty); - meterRslt.TestDone = meterRslt.Passed; - } + meterRslt.TestDone = true; + tstRslt.TestDone = true; + } } tstRslt.Components = Results.Entities.Components diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs index 2ad281afe..854756fa4 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs @@ -675,6 +675,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection && (compoundMeterRslt.Error <= test.ErrLimHi - test.Uncertainty); mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed; mainMeterRslt.TestDone = auxMeterRslt.TestDone = compoundMeterRslt.TestDone = true; + tstRslt.TestDone = true; if (Qrise != 0) BatchRslts.WaterMeters[i].QRise = Qrise; if (Qfall != 0) BatchRslts.WaterMeters[i].QFall = Qfall; diff --git a/TestBenchFramework/BenchControl/TestMethods/Endurance/EnduranceSeq.cs b/TestBenchFramework/BenchControl/TestMethods/Endurance/EnduranceSeq.cs index ddfcf8475..fb248303b 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Endurance/EnduranceSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Endurance/EnduranceSeq.cs @@ -399,6 +399,7 @@ namespace TBF.BenchControl.TestMethods.Endurance meterRslt.Passed = (meterRslt.Error >= test.ErrLimLo + test.Uncertainty) && (meterRslt.Error <= test.ErrLimHi - test.Uncertainty); meterRslt.TestDone = true; + tstRslt.TestDone = true; if (iPerl != null) { diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs index a850a2e26..f0d1f1d4a 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs @@ -547,7 +547,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced meterRslt.Passed = (meterRslt.Error >= test.ErrLimLo + test.Uncertainty) && (meterRslt.Error <= test.ErrLimHi - test.Uncertainty); meterRslt.TestDone = true; - } + tstRslt.TestDone = true; + } } tstRslt.Components = Results.Entities.Components diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs index a53bbfb4b..e4173aeb6 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs @@ -848,6 +848,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection && (compoundMeterRslt.Error <= test.ErrLimHi - test.Uncertainty); mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed; mainMeterRslt.TestDone = auxMeterRslt.TestDone = compoundMeterRslt.TestDone = true; + tstRslt.TestDone = true; } } } @@ -898,7 +899,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection ((volumeRslt.Error >= test.ErrLimLo + test.Uncertainty) && (volumeRslt.Error <= test.ErrLimHi - test.Uncertainty)); volumeRslt.TestDone = true; - } + tstRslt.TestDone = true; + } if (energyRslt != null && energyRegReader != null && dataEntryCmpnt is GenericDevices.IHasHeatMtrStatesForm) { @@ -914,6 +916,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection energyRslt.Passed = (energyRslt.Error >= heatMetersTestParams.ErrorLimitLo) && (energyRslt.Error <= heatMetersTestParams.ErrorLimitHi); energyRslt.TestDone = true; + tstRslt.TestDone = true; } } } @@ -943,6 +946,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection meterRslt.Passed = (meterRslt.Error >= test.ErrLimLo + test.Uncertainty) && (meterRslt.Error <= test.ErrLimHi - test.Uncertainty); meterRslt.TestDone = true; + tstRslt.TestDone = true; } } } diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs index 7fa075537..3053bf36a 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs @@ -519,6 +519,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart ((volumeRslt.Error >= test.ErrLimLo + test.Uncertainty) && (volumeRslt.Error <= test.ErrLimHi - test.Uncertainty)); volumeRslt.TestDone = true; + tstRslt.TestDone = true; } if (energyRslt != null && energyRegReader != null) @@ -536,6 +537,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart energyRslt.Passed = (energyRslt.Error >= heatMetersTestParams.ErrorLimitLo) && (energyRslt.Error <= heatMetersTestParams.ErrorLimitHi); energyRslt.TestDone = true; + tstRslt.TestDone = true; } } } @@ -595,6 +597,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart meterRslt.Passed = (meterRslt.Error >= test.ErrLimLo + test.Uncertainty) && (meterRslt.Error <= test.ErrLimHi - test.Uncertainty); meterRslt.TestDone = true; + tstRslt.TestDone = true; if (iPerl != null) { diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs index 94906ee5f..235577027 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs @@ -824,6 +824,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection && (compoundMeterRslt.Error <= test.ErrLimHi - test.Uncertainty); mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed; mainMeterRslt.TestDone = auxMeterRslt.TestDone = compoundMeterRslt.TestDone = true; + tstRslt.TestDone = true; } } } @@ -874,6 +875,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection ((volumeRslt.Error >= test.ErrLimLo + test.Uncertainty) && (volumeRslt.Error <= test.ErrLimHi - test.Uncertainty)); volumeRslt.TestDone = true; + tstRslt.TestDone = true; } if (energyRslt != null && energyRegReader != null) @@ -891,6 +893,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection energyRslt.Passed = (energyRslt.Error >= heatMetersTestParams.ErrorLimitLo) && (energyRslt.Error <= heatMetersTestParams.ErrorLimitHi); energyRslt.TestDone = true; + tstRslt.TestDone = true; } } } @@ -951,6 +954,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection meterRslt.Passed = (meterRslt.Error >= test.ErrLimLo + test.Uncertainty) && (meterRslt.Error <= test.ErrLimHi - test.Uncertainty); meterRslt.TestDone = true; + tstRslt.TestDone = true; if (iPerl != null) { diff --git a/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs b/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs index c17373873..cf0505542 100644 --- a/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs @@ -317,7 +317,8 @@ namespace TBF.BenchControl.TestMethods.LeakTest meterRslt.Error = 0; meterRslt.Passed = true; meterRslt.TestDone = true; - } + tstRslt.TestDone = true; + } } else { @@ -344,7 +345,8 @@ namespace TBF.BenchControl.TestMethods.LeakTest compoundMeterRslt.Error = 0; compoundMeterRslt.Passed = true; mainMeterRslt.TestDone = auxMeterRslt.TestDone = compoundMeterRslt.TestDone = true; - } + tstRslt.TestDone = true; + } } } diff --git a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs index 63b03ef93..2ee04d3fb 100644 --- a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs @@ -228,7 +228,8 @@ namespace TBF.BenchControl.TestMethods.PMaxTest meterRslt.Error = 0; meterRslt.Passed = true; meterRslt.TestDone = true; - } + tstRslt.TestDone = true; + } } else { @@ -255,7 +256,8 @@ namespace TBF.BenchControl.TestMethods.PMaxTest compoundMeterRslt.Error = 0; compoundMeterRslt.Passed = true; mainMeterRslt.TestDone = auxMeterRslt.TestDone = compoundMeterRslt.TestDone = true; - } + tstRslt.TestDone = true; + } } } diff --git a/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs b/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs index 865978e16..59860f008 100644 --- a/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs @@ -318,7 +318,8 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication meterRslt.Error = oriMeterRslt.Error; meterRslt.Passed = oriMeterRslt.Passed; meterRslt.TestDone = true; - } + tstRslt.TestDone = true; + } else { /// corrected iPerl @@ -328,7 +329,8 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication meterRslt.Error = 0; meterRslt.Passed = true; meterRslt.TestDone = true; - } + tstRslt.TestDone = true; + } } } } diff --git a/TestBenchFramework/Properties/AssemblyInfo.cs b/TestBenchFramework/Properties/AssemblyInfo.cs index 12a4bc0bc..9d3a86554 100644 --- a/TestBenchFramework/Properties/AssemblyInfo.cs +++ b/TestBenchFramework/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.14.598.1")] -[assembly: AssemblyFileVersion("2.14.598.1")] +[assembly: AssemblyVersion("2.14.599.1")] +[assembly: AssemblyFileVersion("2.14.599.1")]