From 38973e0030c2b2f1cf3ca22b8a90c3c0deb88dec Mon Sep 17 00:00:00 2001 From: Marek Frniak Date: Wed, 15 Jul 2026 11:35:32 +0200 Subject: [PATCH] Add - Store and log default PumpPower for dynamic test repetitions - Read PumpPower from the current pump before starting dynamic tests. - Store the value as the default PumpPower for subsequent test instances in the cycle. - Add logging when PumpPower is initialized from the pump. - Add logging at test start including test name, repetition number, last repetition flag, and PumpPower to improve diagnostics. --- .../FlyingStartMassCollectionSeq.cs | 26 ++++++++++++++++--- .../StandingStartMassCollectionSeq.cs | 21 +++++++++++++++ 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/TBF/Rig/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs b/TBF/Rig/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs index 24670b440..a5e6054df 100644 --- a/TBF/Rig/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs +++ b/TBF/Rig/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs @@ -153,8 +153,16 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollection int totalPulses = Convert.ToInt32(test.Volume / outPath.FlowMeter.LtrPerPulse); + log.InfoFormat( + "{0}({1}) : Test starting... (Repetition {2}, LastRepetition={3}, PumpPower={4})", + test.Method, + test.Name, + repetitionNr, + isLastRepetition, + test.PumpPower); + ///============================================================================================ - + /// Read pressure and temperature once before calling Bridge.OnTestSelected(...) State.Create(string.Format("{0}({1}) : Measuring process data", test.Method, test.Name)) .AddOperation(checkUiOp) @@ -453,7 +461,19 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollection } } } - + + /// + /// reading pump power for dynamic using as default test.PumpPower for next test instances in cycle + /// + if (inPath.Pump is IPump) + { + test.PumpPower = (float)(inPath.Pump as IPump).Power; + + log.InfoFormat( + "PumpPower initialized from operator to '{0}'%", + test.PumpPower); + } + // if (atleastOneGenesis) // { // log.Info($"Genesis - Starting... Test Name:{test.Name.ToLower()}."); @@ -472,7 +492,7 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollection // } // } - if (drainTheTank) + if (drainTheTank) { //------------------------------------------------ Bridge.OnActivity(this, Strings.Closing_the_tank); diff --git a/TBF/Rig/TestMethods/StandingStartMassCollection/StandingStartMassCollectionSeq.cs b/TBF/Rig/TestMethods/StandingStartMassCollection/StandingStartMassCollectionSeq.cs index ce48efa18..2948a4fcc 100644 --- a/TBF/Rig/TestMethods/StandingStartMassCollection/StandingStartMassCollectionSeq.cs +++ b/TBF/Rig/TestMethods/StandingStartMassCollection/StandingStartMassCollectionSeq.cs @@ -149,6 +149,14 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection int totalPulses = Convert.ToInt32(test.Volume / outPath.FlowMeter.LtrPerPulse); + log.InfoFormat( + "{0}({1}) : Test starting (Repetition {2}, LastRepetition={3}, PumpPower={4})", + test.Method, + test.Name, + repetitionNr, + isLastRepetition, + test.PumpPower); + ///============================================================================================ /// Read pressure and temperature once before calling Bridge.OnTestSelected(...) @@ -435,6 +443,19 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection /// Temperature is withing required range at this point /// + + /// + /// reading pump power for dynamic using as default test.PumpPower for next test instances in cycle + /// + if (inPath.Pump is IPump) + { + test.PumpPower = (float)(inPath.Pump as IPump).Power; + + log.InfoFormat( + "PumpPower initialized from operator to '{0}'%", + test.PumpPower); + } + //----------------------------------------------------------------- Bridge.OnActivity(this, Strings.Stopping_flow_for_the_fixed_start); //-----------------------------------------------------------------