Enable -Simulate- for this method !!!

This commit is contained in:
Michal Buzik 2024-08-14 12:06:45 +02:00
parent 7409af70ac
commit 97e0a764b8
4 changed files with 20 additions and 2 deletions

View File

@ -119,11 +119,24 @@ 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)
{
return Event.ScaleDone;

View File

@ -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);

View File

@ -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);

View File

@ -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();