Waiting before stable mass measurement joined with the mass measurement into one operation.
This commit is contained in:
+6
-72
@@ -555,22 +555,6 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollComparative
|
||||
}
|
||||
while (e.Contains(Event.ValvesBusy));
|
||||
|
||||
///
|
||||
/// Delay
|
||||
///
|
||||
State.Create(string.Format("{0}({1}) : Waiting before the reference mass measurement", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(scale.ReadMassOp(ref Mass))
|
||||
.AddOperation(new Operations.TimerOp(stabTime))
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
}
|
||||
while (!e.Contains(Event.TimerExpired));
|
||||
|
||||
///
|
||||
/// Measure the reference mass
|
||||
///
|
||||
@@ -581,15 +565,14 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollComparative
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperations(cameraMeasurementOps)
|
||||
.AddOperation(scale.ReadStableMassOp(ref StartMass, 0, test.MassMethod, test.MassRepeats, test.MassSpread))
|
||||
.AddOperation(new Operations.TimerOp(StableMassMsrmntTimeoutSec))
|
||||
.AddOperation(scale.ReadStableMassOp(ref StartMass, stabTime, test.MassMethod, test.MassRepeats, test.MassSpread))
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
if (e.Contains(Event.TimerExpired))
|
||||
if (e.Contains(Event.ScaleTimeout))
|
||||
{
|
||||
Bridge.OnError(this, Strings.Mass_measurement_timeout);
|
||||
retVal = Event.RecoverableError;
|
||||
@@ -621,22 +604,6 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollComparative
|
||||
}
|
||||
while (e.Contains(Event.ValvesBusy));
|
||||
|
||||
///
|
||||
/// Delay
|
||||
///
|
||||
State.Create(string.Format("{0}({1}) : Waiting before 1st mass measurement", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(scale.ReadMassOp(ref Mass))
|
||||
.AddOperation(new Operations.TimerOp(stabTime))
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
}
|
||||
while (!e.Contains(Event.TimerExpired));
|
||||
|
||||
///
|
||||
/// Measure the start mass
|
||||
///
|
||||
@@ -649,15 +616,14 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollComparative
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperations(cameraMeasurementOps)
|
||||
.AddOperation(scale.ReadStableMassOp(ref StartMass, 0, test.MassMethod, test.MassRepeats, test.MassSpread))
|
||||
.AddOperation(new Operations.TimerOp(StableMassMsrmntTimeoutSec))
|
||||
.AddOperation(scale.ReadStableMassOp(ref StartMass, stabTime, test.MassMethod, test.MassRepeats, test.MassSpread))
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
if (e.Contains(Event.TimerExpired))
|
||||
if (e.Contains(Event.ScaleTimeout))
|
||||
{
|
||||
Bridge.OnError(this, Strings.Mass_measurement_timeout);
|
||||
retVal = Event.RecoverableError;
|
||||
@@ -775,37 +741,20 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollComparative
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Measuring_the_weight);
|
||||
//------------------------------------------------
|
||||
State.Create(string.Format("{0}({1}) : Waiting before the 2nd mass measurement", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(scale.ReadMassOp(ref Mass))
|
||||
.AddOperation(cBrd.ReadDiverterTransitionOp(false, DiverterEnd, BatchRslts.Batch.BatchNr, test.Name, repetitionNr))
|
||||
.AddOperation(new Operations.TimerOp(test.TimeStop2Mass))
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
}
|
||||
while (!e.Contains(Event.TimerExpired) || !e.Contains(Event.BalanceDone));
|
||||
|
||||
|
||||
if (heatMetersPath == null) LogProcessDataHeader(processDataLogger, "End mass");
|
||||
else LogProcessDataHeaderHeatMeters(processDataLogger, "End mass");
|
||||
|
||||
State.Create(string.Format("{0}({1}) : Measuring the end mass", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(scale.ReadStableMassOp(ref EndMass, 0, test.MassMethod, test.MassRepeats, test.MassSpread))
|
||||
.AddOperation(new Operations.TimerOp(StableMassMsrmntTimeoutSec))
|
||||
.AddOperation(scale.ReadStableMassOp(ref EndMass, test.TimeStop2Mass, test.MassMethod, test.MassRepeats, test.MassSpread))
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
if (e.Contains(Event.TimerExpired))
|
||||
if (e.Contains(Event.ScaleTimeout))
|
||||
{
|
||||
Bridge.OnError(this, Strings.Mass_measurement_timeout);
|
||||
retVal = Event.RecoverableError;
|
||||
@@ -818,21 +767,6 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollComparative
|
||||
log.WarnFormat("End mass = {0}kg", EndMass);
|
||||
TestEndTime = DateTime.Now;
|
||||
|
||||
if (test.DoDrainingAfter)
|
||||
{
|
||||
State.Create(string.Format("{0}({1}) : Open the drain valve", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(StateMachine.ControlBoard.SetValvesOp(scale.DrainValve, null))
|
||||
.AddOperations(readTempPressOps)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
}
|
||||
while (e.Contains(Event.ValvesBusy));
|
||||
}
|
||||
|
||||
if (test.DoDrainingAfter)
|
||||
{
|
||||
State.Create(string.Format("{0}({1}) : Open the drain valve", test.Method, test.Name))
|
||||
|
||||
Reference in New Issue
Block a user