diff --git a/TestBenchFramework/BenchControl/Elde/ControlBoardDev.cs b/TestBenchFramework/BenchControl/Elde/ControlBoardDev.cs index 92dac72e9..1a0f43435 100644 --- a/TestBenchFramework/BenchControl/Elde/ControlBoardDev.cs +++ b/TestBenchFramework/BenchControl/Elde/ControlBoardDev.cs @@ -42,7 +42,8 @@ namespace TBF.BenchControl.Elde public StatusP StatusP { get { return controlCom.StatusP; } } public double ReferenceFreq { get { return controlCom.ReferenceFreq; } } /// In [Hz] 0..2500, nom.=2000 public int EtPulses(int wmNr0) { return (int)controlCom.EtPulses(wmNr0); } - public UInt16 WMeterPulses(int wmNr0) { return controlCom.WMeterPulses(wmNr0); } + public int EtPulses2 { get { return controlCom.EtPulses2; } } + public UInt16 WMeterPulses(int wmNr0) { return controlCom.WMeterPulses(wmNr0); } public int WMeterReference(int wmNr0) { return controlCom.WMeterReference(wmNr0); } public uint RegulValveDAC { get { return controlCom.RegulValveDAC; } } public float Pressure(int prsNr0) { return controlCom.Pressure(prsNr0); } diff --git a/TestBenchFramework/BenchControl/Elde/ControlComSim.cs b/TestBenchFramework/BenchControl/Elde/ControlComSim.cs index 21dbc3a9a..20ee64922 100644 --- a/TestBenchFramework/BenchControl/Elde/ControlComSim.cs +++ b/TestBenchFramework/BenchControl/Elde/ControlComSim.cs @@ -24,6 +24,7 @@ namespace TBF.BenchControl.Elde { return etPulses[wmNr1and0]; } + public int EtPulses2 { get { return 0; } } float[] errFactor = new float[Config.Data.WMsCount + 1]; /// Internal float[] wMeterPulsesF = new float[Config.Data.WMsCount + 1]; /// Internal diff --git a/TestBenchFramework/BenchControl/Elde/ControlComWrap.cs b/TestBenchFramework/BenchControl/Elde/ControlComWrap.cs index 3ffbe5fc8..4363866b0 100644 --- a/TestBenchFramework/BenchControl/Elde/ControlComWrap.cs +++ b/TestBenchFramework/BenchControl/Elde/ControlComWrap.cs @@ -31,7 +31,12 @@ namespace TBF.BenchControl.Elde public float ReferenceFreq { get { return 1000.0f * ctrlBrdComponent.referenceFreq[0]; } } /// In [Hz] 0..2500, nom.=2000 #endif public int EtPulses(int wmNr0) { return (int)ctrlBrdComponent.etPulses[wmNr0]; } - public UInt16 WMeterPulses(int wmNr0) { return (UInt16)ctrlBrdComponent.wMeterPuls[wmNr0]; } +#if FUZHOU300 || PT200IL || PUCHONG_PT200 || GENESIS + public int EtPulses2 { get { return (int)ctrlBrdComponent.EtPulses2; } } +#else + public int EtPulses2 { get { return 0; } } +#endif + public UInt16 WMeterPulses(int wmNr0) { return (UInt16)ctrlBrdComponent.wMeterPuls[wmNr0]; } public int WMeterReference(int wmNr0) { return (int)ctrlBrdComponent.wMeterReference[wmNr0]; } public uint RegulValveDAC { get { return ctrlBrdComponent.StavDA; } } public float Pressure(int prsNr0) { return ctrlBrdComponent.pressure[prsNr0]; } diff --git a/TestBenchFramework/BenchControl/Elde/IControlCom.cs b/TestBenchFramework/BenchControl/Elde/IControlCom.cs index 53aa835b4..d33668f56 100644 --- a/TestBenchFramework/BenchControl/Elde/IControlCom.cs +++ b/TestBenchFramework/BenchControl/Elde/IControlCom.cs @@ -1,5 +1,5 @@ /// -/// Copyright (c) 2013-2015 Sensus Metering Systems +/// Copyright (c) 2013-2016 Sensus Metering Systems /// using System; @@ -10,7 +10,8 @@ namespace TBF.BenchControl.Elde StatusP StatusP { get; } float ReferenceFreq { get; } int EtPulses(int wmNr0); - UInt16 WMeterPulses(int wmNr0); + int EtPulses2 { get; } + UInt16 WMeterPulses(int wmNr0); int WMeterReference(int wmNr0); uint RegulValveDAC { get; } float Pressure(int prsNr0); diff --git a/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs b/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs index 69e27c207..6bbef1dd7 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs @@ -316,8 +316,14 @@ namespace TBF.BenchControl.TestMethods.Adjustment tstRslt.EndTime = TestEndTime; tstRslt.FlowSetTime = flowSetTime; tstRslt.TestTime = cBrd.TTime; /// [s] measurement time - tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); /// Pulses of the master flow meter (test total) - tstRslt.MassStart = 0; + + /// Pulses of the master flow meter (test total) + if (outPath.FlowMeter is Elde.FlowMeterTwins.FlowMeter) + tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0) + cBrd.EtPulses2); + else + tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); + + tstRslt.MassStart = 0; tstRslt.MassEnd = 0; tstRslt.FlowMass = 0; /// [kg/h] tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * cBrd.EtPulses(0) / tstRslt.TestTime; /// [m3/h] diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs index 89b742ba7..99c9c85e4 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs @@ -630,8 +630,14 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection tstRslt.EndTime = TestEndTime; tstRslt.FlowSetTime = flowSetTime; tstRslt.TestTime = cBrd.TTime; /// [s] measurement time - tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); /// Pulses of the master flow meter (test total) - tstRslt.MassStartRaw = StartMass.Val; + + /// Pulses of the master flow meter (test total) + if (outPath.FlowMeter is Elde.FlowMeterTwins.FlowMeter) + tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0) + cBrd.EtPulses2); + else + tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); + + tstRslt.MassStartRaw = StartMass.Val; tstRslt.MassStart = Formulas.CorrectedValue(tstRslt.MassStartRaw, outPath.Balance.Corrections); tstRslt.MassEndRaw = EndMass.Val; tstRslt.MassEnd = Formulas.CorrectedValue(tstRslt.MassEndRaw, outPath.Balance.Corrections); diff --git a/TestBenchFramework/BenchControl/TestMethods/Endurance/EnduranceSeq.cs b/TestBenchFramework/BenchControl/TestMethods/Endurance/EnduranceSeq.cs index 8f894d42c..7bbd4bd44 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Endurance/EnduranceSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Endurance/EnduranceSeq.cs @@ -331,7 +331,13 @@ namespace TBF.BenchControl.TestMethods.Endurance tstRslt.EndTime = TestEndTime; tstRslt.FlowSetTime = flowSetTime; tstRslt.TestTime = cBrd.TTime; /// [s] measurement time - tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); /// Pulses of the master flow meter (test total) + + /// Pulses of the master flow meter (test total) + if (outPath.FlowMeter is Elde.FlowMeterTwins.FlowMeter) + tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0) + cBrd.EtPulses2); + else + tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); + tstRslt.MassStartRaw = 0; tstRslt.MassStart = 0; tstRslt.MassEndRaw = 0; diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs index b00db182f..fc54395fc 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs @@ -534,8 +534,14 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced tstRslt.EndTime = TestEndTime; tstRslt.FlowSetTime = flowSetTime; tstRslt.TestTime = cBrd.TTime; /// [s] measurement time - tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); /// Pulses of the master flow meter (test total) - tstRslt.MassStartRaw = StartMass.Val; + + /// Pulses of the master flow meter (test total) + if (outPath.FlowMeter is Elde.FlowMeterTwins.FlowMeter) + tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0) + cBrd.EtPulses2); + else + tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); + + tstRslt.MassStartRaw = StartMass.Val; tstRslt.MassStart = massStart; /// [kg] calculated before displaying 'End state' dialog tstRslt.MassEndRaw = EndMass.Val; tstRslt.MassEnd = massEnd; /// [kg] calculated before displaying 'End state' dialog diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs index cba70b998..b3e1a59ac 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs @@ -721,7 +721,13 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection tstRslt.EndTime = TestEndTime; tstRslt.FlowSetTime = flowSetTime; tstRslt.TestTime = cBrd.TTime; /// [s] measurement time - tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); /// Pulses of the master flow meter (test total) + + /// Pulses of the master flow meter (test total) + if (outPath.FlowMeter is Elde.FlowMeterTwins.FlowMeter) + tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0) + cBrd.EtPulses2); + else + tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); + tstRslt.MassStartRaw = StartMass.Val; tstRslt.MassStart = massStart; tstRslt.MassEndRaw = EndMass.Val; diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs index a6635c944..72046ac60 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs @@ -442,8 +442,14 @@ namespace TBF.BenchControl.TestMethods.FlyingStart tstRslt.EndTime = TestEndTime; tstRslt.FlowSetTime = flowSetTime; tstRslt.TestTime = cBrd.TTime; /// [s] measurement time - tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); /// Pulses of the master flow meter (test total) - tstRslt.MassStartRaw = 0; + + /// Pulses of the master flow meter (test total) + if (outPath.FlowMeter is Elde.FlowMeterTwins.FlowMeter) + tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0) + cBrd.EtPulses2); + else + tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); + + tstRslt.MassStartRaw = 0; tstRslt.MassStart = 0; tstRslt.MassEndRaw = 0; tstRslt.MassEnd = 0; diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs index c0aac3513..157ae6ff5 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs @@ -699,8 +699,14 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection tstRslt.EndTime = TestEndTime; tstRslt.FlowSetTime = flowSetTime; tstRslt.TestTime = cBrd.TTime; /// [s] measurement time - tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); /// Pulses of the master flow meter (test total) - tstRslt.MassStartRaw = StartMass.Val; + + /// Pulses of the master flow meter (test total) + if (outPath.FlowMeter is Elde.FlowMeterTwins.FlowMeter) + tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0) + cBrd.EtPulses2); + else + tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); + + tstRslt.MassStartRaw = StartMass.Val; tstRslt.MassStart = Formulas.CorrectedValue(tstRslt.MassStartRaw, outPath.Balance.Corrections); tstRslt.MassEndRaw = EndMass.Val; tstRslt.MassEnd = Formulas.CorrectedValue(tstRslt.MassEndRaw, outPath.Balance.Corrections); diff --git a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs index 3de99344c..f01a5a06c 100644 --- a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs @@ -360,8 +360,14 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration tstRslt.EndTime = TestEndTime; tstRslt.FlowSetTime = flowSetTime; tstRslt.TestTime = cBrd.TTime; /// [s] measurement time - tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); /// Pulses of the master flow meter (test total) - tstRslt.MassStartRaw = StartMass.Val; + + /// Pulses of the master flow meter (test total) + if (outPath.FlowMeter is Elde.FlowMeterTwins.FlowMeter) + tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0) + cBrd.EtPulses2); + else + tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); + + tstRslt.MassStartRaw = StartMass.Val; tstRslt.MassStart = Formulas.CorrectedValue(tstRslt.MassStartRaw, outPath.Balance.Corrections); tstRslt.MassEndRaw = EndMass.Val; tstRslt.MassEnd = Formulas.CorrectedValue(tstRslt.MassEndRaw, outPath.Balance.Corrections);