diff --git a/TBF/BenchControl/Output/FileWriters/IperlLogger/Writer.cs b/TBF/BenchControl/Output/FileWriters/IperlLogger/Writer.cs index 7b2f529f8..4024993f3 100644 --- a/TBF/BenchControl/Output/FileWriters/IperlLogger/Writer.cs +++ b/TBF/BenchControl/Output/FileWriters/IperlLogger/Writer.cs @@ -291,7 +291,7 @@ namespace TBF.BenchControl.Output.FileWriters.IperlLogger } logger.WriteLine(); - logger.WriteLine(string.Format("[Zählerdaten_{0}]", i + 1)); + logger.WriteLine(string.Format("[Zählerdaten_{0}]", wMtr.WMPosition)); if (testRsltIsMissing) { @@ -353,8 +353,8 @@ namespace TBF.BenchControl.Output.FileWriters.IperlLogger logger.WriteLine(string.Format("JustierWert=0,2")); /// 0,2 logger.WriteLine(string.Format("Corrected2Hz={0}", wMtr.Hz2CorrectionDone ? 1 : 0)); logger.WriteLine(string.Format("Q2Corrected={0}", wMtr.Q2CorrectionDone ? 1 : 0)); - logger.WriteLine(string.Format("Q2CorrectionRight={0}", wMtr.Q2CorrRL)); - logger.WriteLine(string.Format("Q2CorrectionLeft={0}", wMtr.Q2CorrLR)); + logger.WriteLine(string.Format("Q2CorrectionRight={0}", wMtr.Q2CorrLR)); + logger.WriteLine(string.Format("Q2CorrectionLeft={0}", wMtr.Q2CorrRL)); logger.WriteLine(string.Format("Q2CorrectionFlowRight={0}", wMtr.Q2CorrFlowRight)); logger.WriteLine(string.Format("FlowDirectionRight={0}", wMtr.Q2CorrFlowRight)); logger.WriteLine(string.Format("Position={0}", wMtr.WMPosition)); diff --git a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs index 946f2eec5..efc4c631c 100644 --- a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs +++ b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs @@ -49,8 +49,8 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication { const int Hz2CorrFactorsAddr = 0x1875; /// Used by Reset2HzCorrection(...) and Write2HzCorrection(...) const int Q2CorrFactorsAddr = 0x1878; /// Used by ResetQ2Correction(...) and WriteQ2Correction(...) - const int Q2CorrFactorsAddrRL = 0x1879; const int Q2CorrFactorsAddrLR = 0x1878; + const int Q2CorrFactorsAddrRL = 0x1879; public static Color DisabledColor = Color.DarkGray; public static Color OptoAndDirOKColor = Color.Green; @@ -1890,8 +1890,8 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication return CommErr.None; } - q2CorrRL = (byte)((int)Math.Round(0.5 * q2Correction) & 0x000000FF); - q2CorrLR = (byte)((int)Math.Round(q2Correction) & 0x000000FF); + q2CorrRL = (byte)((int)Math.Round(1.1 * q2Correction) & 0x000000FF); + q2CorrLR = (byte)((int)Math.Round(0.5 * q2Correction) & 0x000000FF); } else if (q2CorrType == Q2CorrType.Dewa) { @@ -1974,7 +1974,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication else { /// Write both Q2 correction factors - byte[] wrData = new byte[2] { q2CorrRL, q2CorrLR }; + byte[] wrData = new byte[2] { q2CorrLR, q2CorrRL }; for (int j = 0; j < cfg.MaxCommRetries; j++) { if (0 == WriteRequestPort(threadId, ihead, MessageID.MetrologyMemory, Q2CorrFactorsAddr, wrData.Length, wrData, cfg.CommTimeout)) @@ -2027,15 +2027,15 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication { if (q2CorrType == Q2CorrType.RL) { - resultStr = string.Format("Q2 correction: R-flow={0}", (SByte)q2CorrRL); + resultStr = string.Format("Q2 correction: RL={0}", (SByte)q2CorrRL); } else if (q2CorrType == Q2CorrType.LR) { - resultStr = string.Format("Q2 correction: L-flow={0}", (SByte)q2CorrLR); + resultStr = string.Format("Q2 correction: LR={0}", (SByte)q2CorrLR); } else { - resultStr = string.Format("Q2 correction: R-flow={0}, L-flow={1}", (SByte)q2CorrRL, (SByte)q2CorrLR); + resultStr = string.Format("Q2 correction: RL={0}, LR={1}", (SByte)q2CorrRL, (SByte)q2CorrLR); } rfidDataLogger.WarnFormat("{0}: {1}", ihead.Name, resultStr); diff --git a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlEnums.cs b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlEnums.cs index 435c0d31a..9a0f3835f 100644 --- a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlEnums.cs +++ b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlEnums.cs @@ -1,5 +1,5 @@ /// -/// Copyright (c) 2017 Sensus Metering Systems +/// Copyright (c) 2017-2018 Sensus Slovensko a.s. /// using System; using System.Collections.Generic; diff --git a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlHead/OptoTelegramRaw.cs b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlHead/OptoTelegramRaw.cs index 93606f87a..3c6be7692 100644 --- a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlHead/OptoTelegramRaw.cs +++ b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlHead/OptoTelegramRaw.cs @@ -53,8 +53,8 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication.iPerlHead public decimal TimeDelta() { return TimestampDec() - TestStartTimestampDec; } public string Label() { - if (Flags == OptoTelegramFlags.OK_TestStart) return "#### start test ####"; - else if (Flags == OptoTelegramFlags.OK_TestEnd) return "#### end of test ####"; + if (Flags == OptoTelegramFlags.OK_TestStart) return "#### start test ####"; + else if (Flags == OptoTelegramFlags.OK_TestEnd) return "#### end of test ####"; else return string.Empty; }