diff --git a/TBF/Rig/Scales/MettlerToledo/ReadStableMassOp.cs b/TBF/Rig/Scales/MettlerToledo/ReadStableMassOp.cs index fc50a26fe..b8882b83c 100644 --- a/TBF/Rig/Scales/MettlerToledo/ReadStableMassOp.cs +++ b/TBF/Rig/Scales/MettlerToledo/ReadStableMassOp.cs @@ -119,10 +119,23 @@ namespace TBF.Rig.Scales.MettlerToledo opState = OpState.MassMeasurement; } + if (scale.DebugLevel == DebugMode.Simulate) + { + scale.Activity = Activity.RunningOperation; + opState = OpState.MassMeasurement; + } + return Event.None; } scale.MsrmntTime++; + + if (scale.DebugLevel == DebugMode.Simulate && + scale.Activity == Activity.RunningOperation && + opState == OpState.MassMeasurement) + { + return Event.ScaleDone; + } if (measurementCompleted) { diff --git a/TBF/Rig/TestMethods/StandingStartMassCollection/StandingStartMassCollectionSeq.cs b/TBF/Rig/TestMethods/StandingStartMassCollection/StandingStartMassCollectionSeq.cs index 07e715fe7..742e39037 100644 --- a/TBF/Rig/TestMethods/StandingStartMassCollection/StandingStartMassCollectionSeq.cs +++ b/TBF/Rig/TestMethods/StandingStartMassCollection/StandingStartMassCollectionSeq.cs @@ -731,7 +731,8 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.Test)); } - while (cBrd.RefPulses < initialPulsesCount + totalPulses && !e.Contains(Event.TestCompleted) && !e.Contains(Event.Next)); + while ((cBrd.DebugLevel==DebugMode.Simulate && !e.Contains(Event.FlowReached)) || + (cBrd.DebugLevel!=DebugMode.Simulate && cBrd.RefPulses < initialPulsesCount + totalPulses && !e.Contains(Event.TestCompleted) && !e.Contains(Event.Next))); /// Measurement loop end log.WarnFormat("Start valve switch time on test start = {0} ms", cBrd.ValveOpenCloseTime); diff --git a/TBF/Rig/TestMethods/StandingStartMassCollectionAdvance/StandingStartMassCollectionAdvanceSeq.cs b/TBF/Rig/TestMethods/StandingStartMassCollectionAdvance/StandingStartMassCollectionAdvanceSeq.cs index 347dfd3c5..40a3dd627 100644 --- a/TBF/Rig/TestMethods/StandingStartMassCollectionAdvance/StandingStartMassCollectionAdvanceSeq.cs +++ b/TBF/Rig/TestMethods/StandingStartMassCollectionAdvance/StandingStartMassCollectionAdvanceSeq.cs @@ -731,7 +731,8 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollectionAdvance Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.Test)); } - while (cBrd.RefPulses < initialPulsesCount + totalPulses && !e.Contains(Event.TestCompleted) && !e.Contains(Event.Next)); + while ((cBrd.DebugLevel==DebugMode.Simulate && !e.Contains(Event.FlowReached)) || + (cBrd.DebugLevel!=DebugMode.Simulate && cBrd.RefPulses < initialPulsesCount + totalPulses && !e.Contains(Event.TestCompleted) && !e.Contains(Event.Next))); /// Measurement loop end log.WarnFormat("Start valve switch time on test start = {0} ms", cBrd.ValveOpenCloseTime); diff --git a/TBF/Rig/Uni/RegValve/SetFlowOp.cs b/TBF/Rig/Uni/RegValve/SetFlowOp.cs index da241045b..f69caab35 100644 --- a/TBF/Rig/Uni/RegValve/SetFlowOp.cs +++ b/TBF/Rig/Uni/RegValve/SetFlowOp.cs @@ -3,6 +3,7 @@ /// using System; using System.Collections.Generic; +using Common; using log4net; using Config.Entities; using TBF.Rig.ControlBoard.Uni; @@ -205,6 +206,8 @@ namespace TBF.Rig.Uni.RegValve if (opState == OpState.Wait4FlowMsrmntAndSendRVMove) { + if (flowMeter.DebugLevel == DebugMode.Simulate) return Event.FlowReached; + if (!flowMeter.MsrmntAvailable) return Event.Starting; double flow1 = flowMeter.ReadFlow();