diff --git a/TestBenchFramework/BenchControl/Elde/ControlComSim.cs b/TestBenchFramework/BenchControl/Elde/ControlComSim.cs index bdd993bd2..e7fdf277c 100644 --- a/TestBenchFramework/BenchControl/Elde/ControlComSim.cs +++ b/TestBenchFramework/BenchControl/Elde/ControlComSim.cs @@ -297,7 +297,7 @@ namespace TBF.BenchControl.Elde float pwFactor = 1.0f; /// Increment reference flow meters - for (int i = 0; i < Config.Data.WMsCount; i++) + for (int i = 0; i <= Config.Data.WMsCount; i++) { etPulses[i] += (int)referenceFreq; if (etPulses[i] > totalRefPulses) @@ -309,9 +309,15 @@ namespace TBF.BenchControl.Elde } /// Increment water meters - for (int i = 1; i < Config.Data.WMsCount; i++) + for (int i = 1; i <= Config.Data.WMsCount; i++) { - const float wmPulsesPerLiter = 10.0f; + float wmPulsesPerLiter = 0; + if ((BenchControl.Sequences.ProcessData.RegisterReaders[i - 1] != null) && + (BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters.Length >= i) && + (BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters[i - 1] != null)) + { + wmPulsesPerLiter = (float)BenchControl.Sequences.ProcessData.RegisterReaders[i-1].PulsesPerLtr; + } wMeterPulsesF[i] += errFactor[i] * pwFactor * ((float)rand.Next(100) + 450.0f) * wmPulsesPerLiter * TestBenchSim.GetSimFlow() / 1800.0f; wMeterPulses[i] = (UInt16)wMeterPulsesF[i]; } diff --git a/TestBenchFramework/BenchControl/Elde/FixedStartRegisterReader/RegisterReader.cs b/TestBenchFramework/BenchControl/Elde/FixedStartRegisterReader/RegisterReader.cs index 7bfea1663..90d9e1395 100644 --- a/TestBenchFramework/BenchControl/Elde/FixedStartRegisterReader/RegisterReader.cs +++ b/TestBenchFramework/BenchControl/Elde/FixedStartRegisterReader/RegisterReader.cs @@ -41,7 +41,7 @@ namespace TBF.BenchControl.Elde.FixedStartRegisterReader : base(cfg) { registerReaderCfg = cfg; - ltrsPerPulse = (cfg.ProcParams.PulsesPerLtr <= float.Epsilon) ? 0 : (1 / cfg.ProcParams.PulsesPerLtr); + ltrsPerPulse = (cfg.ProcParams.PulsesPerLtr <= float.Epsilon) ? 1.0 : (1 / cfg.ProcParams.PulsesPerLtr); controlBoard = (ControlBoardDev)TbfComponents.FindComponent(cfg.ParentName, components); if (controlBoard == null) throw new Exception("Cannot find " + Name + " parent"); diff --git a/TestBenchFramework/BenchControl/Elde/RegisterReader/RegisterReader.cs b/TestBenchFramework/BenchControl/Elde/RegisterReader/RegisterReader.cs index ed2d60ea6..8eac08cc4 100644 --- a/TestBenchFramework/BenchControl/Elde/RegisterReader/RegisterReader.cs +++ b/TestBenchFramework/BenchControl/Elde/RegisterReader/RegisterReader.cs @@ -44,7 +44,7 @@ namespace TBF.BenchControl.Elde.RegisterReader : base(cfg) { registerReaderCfg = cfg; - ltrsPerPulse = (cfg.ProcParams.PulsesPerLtr <= float.Epsilon) ? 0 : (1 / cfg.ProcParams.PulsesPerLtr); + ltrsPerPulse = (cfg.ProcParams.PulsesPerLtr <= float.Epsilon) ? 1.0 : (1 / cfg.ProcParams.PulsesPerLtr); controlBoard = (ControlBoardDev)TbfComponents.FindComponent(cfg.ParentName, components); if (controlBoard == null) throw new Exception("Cannot find " + Name + " parent"); diff --git a/TestBenchFramework/BenchControl/Operations/ReadMoreRegistersOp.cs b/TestBenchFramework/BenchControl/Operations/ReadMoreRegistersOp.cs index 1f9496f37..06d7e92d2 100644 --- a/TestBenchFramework/BenchControl/Operations/ReadMoreRegistersOp.cs +++ b/TestBenchFramework/BenchControl/Operations/ReadMoreRegistersOp.cs @@ -41,6 +41,8 @@ namespace TBF.BenchControl.Operations /// Start this operation public void Start() { + Sequences.ProcessData.RefPulses = StateMachine.ControlBoard.EtPulses(0); + for (int i = 0; i < readersCount; i++) { if (readRegOps[i] != null) readRegOps[i].Start(); @@ -53,6 +55,8 @@ namespace TBF.BenchControl.Operations bool allDone = true; bool anyError = false; + Sequences.ProcessData.RefPulses = StateMachine.ControlBoard.EtPulses(0); + for (int i = 0; i < readersCount; i++) { if (readRegOps[i] != null) diff --git a/TestBenchFramework/BenchControl/Sequences/MainSeq.cs b/TestBenchFramework/BenchControl/Sequences/MainSeq.cs index d3651aff9..b33a2f936 100644 --- a/TestBenchFramework/BenchControl/Sequences/MainSeq.cs +++ b/TestBenchFramework/BenchControl/Sequences/MainSeq.cs @@ -260,7 +260,8 @@ namespace TBF.BenchControl.Sequences } /// Prepare empty results - BatchRslts = Results.BatchResults.NewFromProcedure(Program.LocalSettings.BatchNr, BenchInfo.TestBenchId, + BatchRslts = Results.BatchResults.NewFromProcedure(Program.LocalSettings.BatchNr, + (BenchInfo != null) ? BenchInfo.TestBenchId : 1, User.CurrentUser.Name, Program.Version, StateMachine.Procedure, waterMeterData, waterMeterParts); diff --git a/TestBenchFramework/BenchControl/Sequences/ProcessData.cs b/TestBenchFramework/BenchControl/Sequences/ProcessData.cs index b7fe624fa..7896c60bb 100644 --- a/TestBenchFramework/BenchControl/Sequences/ProcessData.cs +++ b/TestBenchFramework/BenchControl/Sequences/ProcessData.cs @@ -17,8 +17,8 @@ namespace TBF.BenchControl.Sequences public static FloatBox PressureUp = new FloatBox() { Name = "Pressure In", Format = "F3", Factor = 0.01f }; public static FloatBox PressureDown = new FloatBox() { Name = "Pressure Out", Format = "F3", Factor = 0.01f }; - public static float LtrPerRefPulse; /// to calculate the ref.volume - public static IntBox RefCount = new IntBox() { Name = "RefCount" }; + public static float LtrPerRefPulse; /// to calculate the ref.volume + public static int RefPulses; public static FloatBox RefFreq = new FloatBox() { Name = "RefFreq", Format = "F2" }; public static FloatBox RefFlow = new FloatBox() { Name = "RefFlow", Format = "F2" }; /// [m3/h] @@ -54,7 +54,7 @@ namespace TBF.BenchControl.Sequences if (RegisterReaders[i] != null) RegisterReaders[i].Clear(); } - RefCount.Clear(); + RefPulses = 0; RefFreq.Clear(); RefFlow.Clear(); Mass.Clear(); diff --git a/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs b/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs index 481ab3a39..1d5ea2d80 100644 --- a/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs +++ b/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs @@ -865,8 +865,8 @@ namespace TBF.BenchControl.Sequences tstRslt.Components = Results.Entities.Components .UpdateList(BatchRslts.ComponentsList, - new Results.Entities.Components(BenchInfo.TestBenchId, - BenchInfo.TestBenchName, + new Results.Entities.Components((BenchInfo != null) ? BenchInfo.TestBenchId : 1, + (BenchInfo != null) ? BenchInfo.TestBenchName : "testbench", inPath.Pump != null ? inPath.Pump.Name : string.Empty, outPath.FlowMeter != null ? outPath.FlowMeter.Name : string.Empty, outPath.Balance != null ? outPath.Balance.Name : string.Empty, @@ -989,8 +989,8 @@ namespace TBF.BenchControl.Sequences tstRslt.Components = Results.Entities.Components .UpdateList(BatchRslts.ComponentsList, - new Results.Entities.Components(BenchInfo.TestBenchId, - BenchInfo.TestBenchName, + new Results.Entities.Components((BenchInfo != null) ? BenchInfo.TestBenchId : 1, + (BenchInfo != null) ? BenchInfo.TestBenchName : "testbench", inPath.Pump != null ? inPath.Pump.Name : string.Empty, outPath.FlowMeter != null ? outPath.FlowMeter.Name : string.Empty, outPath.Balance != null ? outPath.Balance.Name : string.Empty, diff --git a/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs b/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs index d22590a83..aae4faabd 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs @@ -322,8 +322,8 @@ namespace TBF.BenchControl.TestMethods.Adjustment tstRslt.Components = Results.Entities.Components .UpdateList(BatchRslts.ComponentsList, - new Results.Entities.Components(BenchInfo.TestBenchId, - BenchInfo.TestBenchName, + new Results.Entities.Components((BenchInfo != null) ? BenchInfo.TestBenchId : 1, + (BenchInfo != null) ? BenchInfo.TestBenchName : "testbench", inPath.Pump != null ? inPath.Pump.Name : string.Empty, outPath.FlowMeter != null ? outPath.FlowMeter.Name : string.Empty, outPath.Balance != null ? outPath.Balance.Name : string.Empty, diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs index ae071f98b..bad3a9644 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs @@ -445,8 +445,8 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters tstRslt.Components = Results.Entities.Components .UpdateList(BatchRslts.ComponentsList, - new Results.Entities.Components(BenchInfo.TestBenchId, - BenchInfo.TestBenchName, + new Results.Entities.Components((BenchInfo != null) ? BenchInfo.TestBenchId : 1, + (BenchInfo != null) ? BenchInfo.TestBenchName : "testbench", inPath.Pump != null ? inPath.Pump.Name : string.Empty, outPath.FlowMeter != null ? outPath.FlowMeter.Name : string.Empty, outPath.Balance != null ? outPath.Balance.Name : string.Empty, diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs index ac2846c7c..dc6ea9d68 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs @@ -624,8 +624,8 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection tstRslt.Components = Results.Entities.Components .UpdateList(BatchRslts.ComponentsList, - new Results.Entities.Components(BenchInfo.TestBenchId, - BenchInfo.TestBenchName, + new Results.Entities.Components((BenchInfo != null) ? BenchInfo.TestBenchId : 1, + (BenchInfo != null) ? BenchInfo.TestBenchName : "testbench", inPath.Pump != null ? inPath.Pump.Name : string.Empty, outPath.FlowMeter != null ? outPath.FlowMeter.Name : string.Empty, outPath.Balance != null ? outPath.Balance.Name : string.Empty, diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs index cb6a8939d..7a6c7a25c 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs @@ -544,8 +544,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced tstRslt.Components = Results.Entities.Components .UpdateList(BatchRslts.ComponentsList, - new Results.Entities.Components(BenchInfo.TestBenchId, - BenchInfo.TestBenchName, + new Results.Entities.Components((BenchInfo != null) ? BenchInfo.TestBenchId : 1, + (BenchInfo != null) ? BenchInfo.TestBenchName : "testbench", inPath.Pump != null ? inPath.Pump.Name : string.Empty, outPath.FlowMeter != null ? outPath.FlowMeter.Name : string.Empty, outPath.Balance != null ? outPath.Balance.Name : string.Empty, diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs index a45547fff..698f02603 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs @@ -572,8 +572,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartCombinedMeters tstRslt.Components = Results.Entities.Components .UpdateList(BatchRslts.ComponentsList, - new Results.Entities.Components(BenchInfo.TestBenchId, - BenchInfo.TestBenchName, + new Results.Entities.Components((BenchInfo != null) ? BenchInfo.TestBenchId : 1, + (BenchInfo != null) ? BenchInfo.TestBenchName : "testbench", inPath.Pump != null ? inPath.Pump.Name : string.Empty, outPath.FlowMeter != null ? outPath.FlowMeter.Name : string.Empty, outPath.Balance != null ? outPath.Balance.Name : string.Empty, diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs index 3bc3e437e..1c35539d4 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs @@ -543,8 +543,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection tstRslt.Components = Results.Entities.Components .UpdateList(BatchRslts.ComponentsList, - new Results.Entities.Components(BenchInfo.TestBenchId, - BenchInfo.TestBenchName, + new Results.Entities.Components((BenchInfo != null) ? BenchInfo.TestBenchId : 1, + (BenchInfo != null) ? BenchInfo.TestBenchName : "testbench", inPath.Pump != null ? inPath.Pump.Name : string.Empty, outPath.FlowMeter != null ? outPath.FlowMeter.Name : string.Empty, outPath.Balance != null ? outPath.Balance.Name : string.Empty, diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs index 8915d90f7..e447f2d99 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs @@ -298,8 +298,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStart tstRslt.Components = Results.Entities.Components .UpdateList(BatchRslts.ComponentsList, - new Results.Entities.Components(BenchInfo.TestBenchId, - BenchInfo.TestBenchName, + new Results.Entities.Components((BenchInfo != null) ? BenchInfo.TestBenchId : 1, + (BenchInfo != null) ? BenchInfo.TestBenchName : "testbench", inPath.Pump != null ? inPath.Pump.Name : string.Empty, outPath.FlowMeter != null ? outPath.FlowMeter.Name : string.Empty, outPath.Balance != null ? outPath.Balance.Name : string.Empty, diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs index 8971c8f88..e1511e33b 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs @@ -178,6 +178,9 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection if (cameraRoi != null) measureOperations.Add(cameraRoi.MeasureOp()); } + //------------------------------------------------ + Bridge.OnActivity(this, Strings.Measuring_the_weight); + //------------------------------------------------ State.Create("FlyingStartMassCollection : Waiting before 1st mass measurement") .AddOperation(checkUiOp) .AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn)) @@ -203,9 +206,6 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection LogProcessHeader(processDataLogger, "Start mass"); - //------------------------------------------------ - Bridge.OnActivity(this, Strings.Measuring_the_weight); - //------------------------------------------------ State.Create("FlyingStartMassCollection : Measuring the start mass") .AddOperation(checkUiOp) .AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn)) @@ -321,7 +321,10 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection /// Measurement loop - end test_completed: - State.Create("FlyingStartMassCollection : Waiting before 2nd mass measurement") + //------------------------------------------------ + Bridge.OnActivity(this, Strings.Measuring_the_weight); + //------------------------------------------------ + State.Create("FlyingStartMassCollection : Waiting before 2nd mass measurement") .AddOperation(checkUiOp) .AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn)) .AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut)) @@ -346,9 +349,6 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection LogProcessHeader(processDataLogger, "End mass"); - //------------------------------------------------ - Bridge.OnActivity(this, Strings.Measuring_the_weight); - //------------------------------------------------ State.Create("FlyingStartMassCollection : Measuring the end mass") .AddOperation(checkUiOp) .AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn)) @@ -485,8 +485,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection tstRslt.Components = Results.Entities.Components .UpdateList(BatchRslts.ComponentsList, - new Results.Entities.Components(BenchInfo.TestBenchId, - BenchInfo.TestBenchName, + new Results.Entities.Components((BenchInfo != null) ? BenchInfo.TestBenchId : 1, + (BenchInfo != null) ? BenchInfo.TestBenchName : "testbench", inPath.Pump != null ? inPath.Pump.Name : string.Empty, outPath.FlowMeter != null ? outPath.FlowMeter.Name : string.Empty, outPath.Balance != null ? outPath.Balance.Name : string.Empty, diff --git a/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs b/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs index e3d8d84ea..e716d8a6f 100644 --- a/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs @@ -363,8 +363,8 @@ namespace TBF.BenchControl.TestMethods.LeakTest tstRslt.Components = Results.Entities.Components .UpdateList(BatchRslts.ComponentsList, - new Results.Entities.Components(BenchInfo.TestBenchId, - BenchInfo.TestBenchName, + new Results.Entities.Components((BenchInfo != null) ? BenchInfo.TestBenchId : 1, + (BenchInfo != null) ? BenchInfo.TestBenchName : "testbench", inPath.Pump != null ? inPath.Pump.Name : string.Empty, outPath.FlowMeter != null ? outPath.FlowMeter.Name : string.Empty, outPath.Balance != null ? outPath.Balance.Name : string.Empty, diff --git a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs index 8f6f5d9cb..fa6d7231a 100644 --- a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs @@ -277,8 +277,8 @@ namespace TBF.BenchControl.TestMethods.PMaxTest tstRslt.Components = Results.Entities.Components .UpdateList(BatchRslts.ComponentsList, - new Results.Entities.Components(BenchInfo.TestBenchId, - BenchInfo.TestBenchName, + new Results.Entities.Components((BenchInfo != null) ? BenchInfo.TestBenchId : 1, + (BenchInfo != null) ? BenchInfo.TestBenchName : "testbench", inPath.Pump != null ? inPath.Pump.Name : string.Empty, outPath.FlowMeter != null ? outPath.FlowMeter.Name : string.Empty, outPath.Balance != null ? outPath.Balance.Name : string.Empty, diff --git a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs index 9cbcd6f62..ac5c225ab 100644 --- a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs @@ -362,8 +362,8 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration tstRslt.Components = Results.Entities.Components .UpdateList(BatchRslts.ComponentsList, - new Results.Entities.Components(BenchInfo.TestBenchId, - BenchInfo.TestBenchName, + new Results.Entities.Components((BenchInfo != null) ? BenchInfo.TestBenchId : 1, + (BenchInfo != null) ? BenchInfo.TestBenchName : "testbench", inPath.Pump != null ? inPath.Pump.Name : string.Empty, outPath.FlowMeter != null ? outPath.FlowMeter.Name : string.Empty, outPath.Balance != null ? outPath.Balance.Name : string.Empty, diff --git a/TestBenchFramework/Screens/ProcessTabPageCtrl24.cs b/TestBenchFramework/Screens/ProcessTabPageCtrl24.cs index 779353a8d..80c357c7d 100644 --- a/TestBenchFramework/Screens/ProcessTabPageCtrl24.cs +++ b/TestBenchFramework/Screens/ProcessTabPageCtrl24.cs @@ -415,8 +415,9 @@ namespace TBF.Screens /// /// Available only during a test /// - refPulsesLabel.Text = ProcessData.RefCount.ToString(); - double refVolume = ProcessData.LtrPerRefPulse * (double)ProcessData.RefCount.Val; + refPulsesLabel.Text = ProcessData.RefPulses.ToString(); + double refVolume = ProcessData.LtrPerRefPulse * (double)ProcessData.RefPulses; + refVolumeLabel.Text = refVolume.ToString("F2"); float massDiff = ProcessData.Mass.Val - ProcessData.StartMass.Val; massDiffLabel.Text = massDiff.ToString("F3"); @@ -435,7 +436,7 @@ namespace TBF.Screens pulses[i].Text = rr.WMPulses.ToString(); refPulses[i].Text = rr.WMRefPulses.ToString(); volume[i].Text = rr.WMVolume.ToString("F1"); - error[i].Text = BenchControl.Formulas.ErrorFromVolumes(rr.WMVolume, refVolume).ToString("F1"); + error[i].Text = BenchControl.Formulas.ErrorFromVolumes(rr.WMVolume, rr.WMRefPulses * ProcessData.LtrPerRefPulse).ToString("F1"); } } } @@ -454,7 +455,7 @@ namespace TBF.Screens pulses[i].Text = rr.WMPulses.ToString(); refPulses[i].Text = rr.WMRefPulses.ToString(); volume[i].Text = rr.WMVolume.ToString("F1"); - error[i].Text = BenchControl.Formulas.ErrorFromVolumes(rr.WMVolume, refVolume).ToString("F1"); + error[i].Text = BenchControl.Formulas.ErrorFromVolumes(rr.WMVolume, rr.WMRefPulses * ProcessData.LtrPerRefPulse).ToString("F1"); compoundVolume += rr.WMVolume; } } diff --git a/TestBenchFramework/Screens/ProcessTabPageCtrl48.cs b/TestBenchFramework/Screens/ProcessTabPageCtrl48.cs index 7317e8c95..be7560fb3 100644 --- a/TestBenchFramework/Screens/ProcessTabPageCtrl48.cs +++ b/TestBenchFramework/Screens/ProcessTabPageCtrl48.cs @@ -444,8 +444,9 @@ namespace TBF.Screens /// /// Available only during a test /// - refPulsesLabel.Text = ProcessData.RefCount.ToString(); - double refVolume = ProcessData.LtrPerRefPulse * (double)ProcessData.RefCount.Val; + refPulsesLabel.Text = ProcessData.RefPulses.ToString(); + double refVolume = ProcessData.LtrPerRefPulse * (double)ProcessData.RefPulses; + refVolumeLabel.Text = refVolume.ToString("F2"); float massDiff = ProcessData.Mass.Val - ProcessData.StartMass.Val; massDiffLabel.Text = massDiff.ToString("F3"); @@ -464,7 +465,7 @@ namespace TBF.Screens pulses[i].Text = rr.WMPulses.ToString(); refPulses[i].Text = rr.WMRefPulses.ToString(); volume[i].Text = rr.WMVolume.ToString("F1"); - error[i].Text = BenchControl.Formulas.ErrorFromVolumes(rr.WMVolume, refVolume).ToString("F1"); + error[i].Text = BenchControl.Formulas.ErrorFromVolumes(rr.WMVolume, rr.WMRefPulses * ProcessData.LtrPerRefPulse).ToString("F1"); } } } @@ -483,7 +484,7 @@ namespace TBF.Screens pulses[i].Text = rr.WMPulses.ToString(); refPulses[i].Text = rr.WMRefPulses.ToString(); volume[i].Text = rr.WMVolume.ToString("F1"); - error[i].Text = BenchControl.Formulas.ErrorFromVolumes(rr.WMVolume, refVolume).ToString("F1"); + error[i].Text = BenchControl.Formulas.ErrorFromVolumes(rr.WMVolume, rr.WMRefPulses * ProcessData.LtrPerRefPulse).ToString("F1"); compoundVolume += rr.WMVolume; } } diff --git a/TestBenchFramework/Screens/ProcessTabPageCtrl6.cs b/TestBenchFramework/Screens/ProcessTabPageCtrl6.cs index 27154adad..682cf7a9f 100644 --- a/TestBenchFramework/Screens/ProcessTabPageCtrl6.cs +++ b/TestBenchFramework/Screens/ProcessTabPageCtrl6.cs @@ -402,8 +402,9 @@ namespace TBF.Screens /// /// Available only during a test /// - refPulsesLabel.Text = ProcessData.RefCount.ToString(); - double refVolume = ProcessData.LtrPerRefPulse * (double)ProcessData.RefCount.Val; + refPulsesLabel.Text = ProcessData.RefPulses.ToString(); + double refVolume = ProcessData.LtrPerRefPulse * (double)ProcessData.RefPulses; + refVolumeLabel.Text = refVolume.ToString("F2"); float massDiff = ProcessData.Mass.Val - ProcessData.StartMass.Val; massDiffLabel.Text = massDiff.ToString("F3"); @@ -422,7 +423,7 @@ namespace TBF.Screens pulses[i].Text = rr.WMPulses.ToString(); refPulses[i].Text = rr.WMRefPulses.ToString(); volume[i].Text = rr.WMVolume.ToString("F1"); - error[i].Text = BenchControl.Formulas.ErrorFromVolumes(rr.WMVolume, refVolume).ToString("F1"); + error[i].Text = BenchControl.Formulas.ErrorFromVolumes(rr.WMVolume, rr.WMRefPulses * ProcessData.LtrPerRefPulse).ToString("F1"); } } } @@ -441,7 +442,7 @@ namespace TBF.Screens pulses[i].Text = rr.WMPulses.ToString(); refPulses[i].Text = rr.WMRefPulses.ToString(); volume[i].Text = rr.WMVolume.ToString("F1"); - error[i].Text = BenchControl.Formulas.ErrorFromVolumes(rr.WMVolume, refVolume).ToString("F1"); + error[i].Text = BenchControl.Formulas.ErrorFromVolumes(rr.WMVolume, rr.WMRefPulses * ProcessData.LtrPerRefPulse).ToString("F1"); compoundVolume += rr.WMVolume; } }