(1) Writing both Q2 corr. factors fixed, (2) Q2 corr. factors for std. R800 meters calculated differently, (3) Writing WMPosition to iPerlLog, (4) OptoTelegram start/end label.
This commit is contained in:
parent
f6aa6ba2d6
commit
d2df1a678f
@ -291,7 +291,7 @@ namespace TBF.BenchControl.Output.FileWriters.IperlLogger
|
|||||||
}
|
}
|
||||||
|
|
||||||
logger.WriteLine();
|
logger.WriteLine();
|
||||||
logger.WriteLine(string.Format("[Zählerdaten_{0}]", i + 1));
|
logger.WriteLine(string.Format("[Zählerdaten_{0}]", wMtr.WMPosition));
|
||||||
|
|
||||||
if (testRsltIsMissing)
|
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("JustierWert=0,2")); /// 0,2
|
||||||
logger.WriteLine(string.Format("Corrected2Hz={0}", wMtr.Hz2CorrectionDone ? 1 : 0));
|
logger.WriteLine(string.Format("Corrected2Hz={0}", wMtr.Hz2CorrectionDone ? 1 : 0));
|
||||||
logger.WriteLine(string.Format("Q2Corrected={0}", wMtr.Q2CorrectionDone ? 1 : 0));
|
logger.WriteLine(string.Format("Q2Corrected={0}", wMtr.Q2CorrectionDone ? 1 : 0));
|
||||||
logger.WriteLine(string.Format("Q2CorrectionRight={0}", wMtr.Q2CorrRL));
|
logger.WriteLine(string.Format("Q2CorrectionRight={0}", wMtr.Q2CorrLR));
|
||||||
logger.WriteLine(string.Format("Q2CorrectionLeft={0}", wMtr.Q2CorrLR));
|
logger.WriteLine(string.Format("Q2CorrectionLeft={0}", wMtr.Q2CorrRL));
|
||||||
logger.WriteLine(string.Format("Q2CorrectionFlowRight={0}", wMtr.Q2CorrFlowRight));
|
logger.WriteLine(string.Format("Q2CorrectionFlowRight={0}", wMtr.Q2CorrFlowRight));
|
||||||
logger.WriteLine(string.Format("FlowDirectionRight={0}", wMtr.Q2CorrFlowRight));
|
logger.WriteLine(string.Format("FlowDirectionRight={0}", wMtr.Q2CorrFlowRight));
|
||||||
logger.WriteLine(string.Format("Position={0}", wMtr.WMPosition));
|
logger.WriteLine(string.Format("Position={0}", wMtr.WMPosition));
|
||||||
|
|||||||
@ -49,8 +49,8 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
|||||||
{
|
{
|
||||||
const int Hz2CorrFactorsAddr = 0x1875; /// Used by Reset2HzCorrection(...) and Write2HzCorrection(...)
|
const int Hz2CorrFactorsAddr = 0x1875; /// Used by Reset2HzCorrection(...) and Write2HzCorrection(...)
|
||||||
const int Q2CorrFactorsAddr = 0x1878; /// Used by ResetQ2Correction(...) and WriteQ2Correction(...)
|
const int Q2CorrFactorsAddr = 0x1878; /// Used by ResetQ2Correction(...) and WriteQ2Correction(...)
|
||||||
const int Q2CorrFactorsAddrRL = 0x1879;
|
|
||||||
const int Q2CorrFactorsAddrLR = 0x1878;
|
const int Q2CorrFactorsAddrLR = 0x1878;
|
||||||
|
const int Q2CorrFactorsAddrRL = 0x1879;
|
||||||
|
|
||||||
public static Color DisabledColor = Color.DarkGray;
|
public static Color DisabledColor = Color.DarkGray;
|
||||||
public static Color OptoAndDirOKColor = Color.Green;
|
public static Color OptoAndDirOKColor = Color.Green;
|
||||||
@ -1890,8 +1890,8 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
|||||||
return CommErr.None;
|
return CommErr.None;
|
||||||
}
|
}
|
||||||
|
|
||||||
q2CorrRL = (byte)((int)Math.Round(0.5 * q2Correction) & 0x000000FF);
|
q2CorrRL = (byte)((int)Math.Round(1.1 * q2Correction) & 0x000000FF);
|
||||||
q2CorrLR = (byte)((int)Math.Round(q2Correction) & 0x000000FF);
|
q2CorrLR = (byte)((int)Math.Round(0.5 * q2Correction) & 0x000000FF);
|
||||||
}
|
}
|
||||||
else if (q2CorrType == Q2CorrType.Dewa)
|
else if (q2CorrType == Q2CorrType.Dewa)
|
||||||
{
|
{
|
||||||
@ -1974,7 +1974,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/// Write both Q2 correction factors
|
/// 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++)
|
for (int j = 0; j < cfg.MaxCommRetries; j++)
|
||||||
{
|
{
|
||||||
if (0 == WriteRequestPort(threadId, ihead, MessageID.MetrologyMemory, Q2CorrFactorsAddr, wrData.Length, wrData, cfg.CommTimeout))
|
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)
|
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)
|
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
|
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);
|
rfidDataLogger.WarnFormat("{0}: {1}", ihead.Name, resultStr);
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
///
|
///
|
||||||
/// Copyright (c) 2017 Sensus Metering Systems
|
/// Copyright (c) 2017-2018 Sensus Slovensko a.s.
|
||||||
///
|
///
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|||||||
@ -53,8 +53,8 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication.iPerlHead
|
|||||||
public decimal TimeDelta() { return TimestampDec() - TestStartTimestampDec; }
|
public decimal TimeDelta() { return TimestampDec() - TestStartTimestampDec; }
|
||||||
public string Label()
|
public string Label()
|
||||||
{
|
{
|
||||||
if (Flags == OptoTelegramFlags.OK_TestStart) return "#### start test ####";
|
if (Flags == OptoTelegramFlags.OK_TestStart) return "#### start test ####";
|
||||||
else if (Flags == OptoTelegramFlags.OK_TestEnd) return "#### end of test ####";
|
else if (Flags == OptoTelegramFlags.OK_TestEnd) return "#### end of test ####";
|
||||||
else return string.Empty;
|
else return string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user