From 205df83c1c0ac973b16f2e5f0f1466357d76049c Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Wed, 17 Oct 2018 09:52:08 +0200 Subject: [PATCH] Test sequences modified, Q2CorrRFlow and Q2CorrLFlow set in iPerlCommunicationForm only, ver. 2.18.1030 --- .../TestMethods/FlyingStart/FlyingStartSeq.cs | 5 +---- .../FlyingStartFirstRepetWithMassCollSeq.cs | 5 +---- .../FlyingStartMassCollProlongedSeq.cs | 5 +---- .../FlyingStartMassCollectionSeq.cs | 5 +---- .../iPerlCommunication/iPerlCommunicationForm.cs | 2 +- .../iPerlCommunication/iPerlHead/IperlHead.cs | 13 ++++++++++++- TBF/Properties/AssemblyInfo.cs | 4 ++-- 7 files changed, 19 insertions(+), 20 deletions(-) diff --git a/TBF/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs b/TBF/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs index ee52d3332..ef0cd4b43 100644 --- a/TBF/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs +++ b/TBF/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs @@ -659,10 +659,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart meterRslt.WaterMeter.ResultCode |= iPerl.ResultCode; } #if IPERL - meterRslt.WaterMeter.CalibFactor = (iPerl.CalibrationStruct != null) ? iPerl.CalibrationStruct.Calibration : 0; - meterRslt.WaterMeter.Q2Correction = iPerl.Q2Correction; - meterRslt.WaterMeter.Q2CorrRFlow = iPerl.Q2CorrRFlow; - meterRslt.WaterMeter.Q2CorrLFlow = iPerl.Q2CorrLFlow; + meterRslt.WaterMeter.CalibFactor = iPerl.CalibFactor; #endif iPerl.LastTestResult2 = iPerl.LastTestResult; /// Save shift previous test result iPerl.LastTestResult = meterRslt; /// Save this test result diff --git a/TBF/BenchControl/TestMethods/FlyingStartFirstRepetWithMassColl/FlyingStartFirstRepetWithMassCollSeq.cs b/TBF/BenchControl/TestMethods/FlyingStartFirstRepetWithMassColl/FlyingStartFirstRepetWithMassCollSeq.cs index 9eca0fc60..cf7424cfd 100644 --- a/TBF/BenchControl/TestMethods/FlyingStartFirstRepetWithMassColl/FlyingStartFirstRepetWithMassCollSeq.cs +++ b/TBF/BenchControl/TestMethods/FlyingStartFirstRepetWithMassColl/FlyingStartFirstRepetWithMassCollSeq.cs @@ -1035,10 +1035,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl meterRslt.WaterMeter.ResultCode |= iPerl.ResultCode; } #if IPERL - meterRslt.WaterMeter.CalibFactor = (iPerl.CalibrationStruct != null) ? iPerl.CalibrationStruct.Calibration : 0; - meterRslt.WaterMeter.Q2Correction = iPerl.Q2Correction; - meterRslt.WaterMeter.Q2CorrRFlow = iPerl.Q2CorrRFlow; - meterRslt.WaterMeter.Q2CorrLFlow = iPerl.Q2CorrLFlow; + meterRslt.WaterMeter.CalibFactor = iPerl.CalibFactor; #endif iPerl.LastTestResult2 = iPerl.LastTestResult; /// Save shift previous test result iPerl.LastTestResult = meterRslt; /// Save this test result diff --git a/TBF/BenchControl/TestMethods/FlyingStartMassCollProlonged/FlyingStartMassCollProlongedSeq.cs b/TBF/BenchControl/TestMethods/FlyingStartMassCollProlonged/FlyingStartMassCollProlongedSeq.cs index 71c21eafe..0b5227dcc 100644 --- a/TBF/BenchControl/TestMethods/FlyingStartMassCollProlonged/FlyingStartMassCollProlongedSeq.cs +++ b/TBF/BenchControl/TestMethods/FlyingStartMassCollProlonged/FlyingStartMassCollProlongedSeq.cs @@ -1007,10 +1007,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged meterRslt.WaterMeter.ResultCode |= iPerl.ResultCode; } #if IPERL - meterRslt.WaterMeter.CalibFactor = (iPerl.CalibrationStruct != null) ? iPerl.CalibrationStruct.Calibration : 0; - meterRslt.WaterMeter.Q2Correction = iPerl.Q2Correction; - meterRslt.WaterMeter.Q2CorrRFlow = iPerl.Q2CorrRFlow; - meterRslt.WaterMeter.Q2CorrLFlow = iPerl.Q2CorrLFlow; + meterRslt.WaterMeter.CalibFactor = iPerl.CalibFactor; #endif iPerl.LastTestResult2 = iPerl.LastTestResult; /// Save shift previous test result iPerl.LastTestResult = meterRslt; /// Save this test result diff --git a/TBF/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs b/TBF/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs index 38cdd09fb..adc55481d 100644 --- a/TBF/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs +++ b/TBF/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs @@ -1054,10 +1054,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection meterRslt.WaterMeter.ResultCode |= iPerl.ResultCode; } #if IPERL - meterRslt.WaterMeter.CalibFactor = (iPerl.CalibrationStruct != null) ? iPerl.CalibrationStruct.Calibration : 0; - meterRslt.WaterMeter.Q2Correction = iPerl.Q2Correction; - meterRslt.WaterMeter.Q2CorrRFlow = iPerl.Q2CorrRFlow; - meterRslt.WaterMeter.Q2CorrLFlow = iPerl.Q2CorrLFlow; + meterRslt.WaterMeter.CalibFactor = iPerl.CalibFactor; #endif iPerl.LastTestResult2 = iPerl.LastTestResult; /// Save shift previous test result iPerl.LastTestResult = meterRslt; /// Save this test result diff --git a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs index 89c6698d2..1797af265 100644 --- a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs +++ b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs @@ -1974,7 +1974,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication resultStr = string.Format("Q2 correction: R-flow={0}, L-flow={1}", (SByte)q2CorrRFlow, (SByte)q2CorrLFlow); } - rfidDataLogger.Warn(ihead.Name + ": " + resultStr); + rfidDataLogger.WarnFormat("{0}: {1}", ihead.Name, resultStr); ihead.Q2CorrectionDone = true; ihead.Q2Correction = q2Correction; if (q2CorrType != Q2CorrType.LR) ihead.Q2CorrRFlow = (int)(sbyte)q2CorrRFlow; diff --git a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlHead/IperlHead.cs b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlHead/IperlHead.cs index c3932be9e..15ab8e286 100644 --- a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlHead/IperlHead.cs +++ b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlHead/IperlHead.cs @@ -251,7 +251,18 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication.iPerlHead if ((q2adjErrorShiftedToTarget < errLimitLo) || (q2adjErrorShiftedToTarget > errLimitHi)) { - return false; /// Q2 error too large ==> water meter failed + + log.WarnFormat("Q2 correction: Pos={0}, PCB#={1}, ***corrFactor={2}***, Q2adjError={3}%, CalTarget={4}%, ***shftdError={5}%***, [Lo={6}%, Hi={7}%]", + Name, + SerialNr, + q2CorrectionFactor.ToString("F1"), + q2adjResult.Error.ToString("F2"), + CalibTarget.ToString("F1"), + q2adjErrorShiftedToTarget.ToString("F2"), + errLimitLo.ToString("F1"), + errLimitHi.ToString("F1")); + + return false; /// Q2 error too large ==> water meter failed } double A = 16.0 / ScalingFactor(); /// Raw units per ml: DN15=16, DN20=8, DN25=4, DN32=2, DN40=1 diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index d905b0b35..a5ab45c7c 100644 --- a/TBF/Properties/AssemblyInfo.cs +++ b/TBF/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.18.1029.0")] -[assembly: AssemblyFileVersion("2.18.1029.0")] +[assembly: AssemblyVersion("2.18.1030.0")] +[assembly: AssemblyFileVersion("2.18.1030.0")]