Feeding regulation valves functionality implemented, ver. 2.11.367
This commit is contained in:
+18
-41
@@ -177,51 +177,28 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
heatMetersPromptOp = new Operations.MessageBoxOp(heatMetersTestParams.Prompt);
|
||||
}
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Starting_the_pump);
|
||||
//------------------------------------------------
|
||||
if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower);
|
||||
///
|
||||
/// Start the pump, set feeding regulation valves
|
||||
///
|
||||
IList<IOperation> startFeedingOperations = new List<IOperation>();
|
||||
if (inPath.Pump != null) startFeedingOperations.Add(cBrd.SetValvesOp(inPath.Pump, null));
|
||||
|
||||
//for (int i = 0; i < inPath.RegulValves.Count; i++)
|
||||
//{
|
||||
// GenericDevices.IRegulValve rv = inPath.RegulValves[i];
|
||||
// float position = inPath.RegulValvesPct[i];
|
||||
// if (rv.IsCoax)
|
||||
// {
|
||||
// startFeedingOperations.Add(rv.SetRegulValvePositionOp(position, position, 60));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// float lo = Math.Max(0, position - 2.0f);
|
||||
// float hi = Math.Min(100.0f, position + 2.0f);
|
||||
// startFeedingOperations.Add(rv.SetRegulValvePositionOp(lo, hi, 60));
|
||||
// }
|
||||
//}
|
||||
|
||||
if (startFeedingOperations.Count > 0)
|
||||
State.Create("FlyingStartMassCollection : Starting the pump")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
|
||||
.AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
|
||||
.AddOperation(heatMetersPromptOp)
|
||||
.AddOperation(inPath.Pump != null ? cBrd.SetValvesOp(inPath.Pump, null) : null)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Starting_the_pump);
|
||||
//------------------------------------------------
|
||||
if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOn(test.PumpPower);
|
||||
///
|
||||
State.Create("FlyingStartMassCollection : Starting the pump")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
|
||||
.AddOperation(heatMetersPromptOp)
|
||||
.AddOperations(startFeedingOperations)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
||||
|
||||
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
}
|
||||
while (!e.Contains(Event.ValvesSet));
|
||||
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
}
|
||||
while (e.Contains(Event.ValvesBusy) || !e.Contains(Event.AllPositionsReached));
|
||||
|
||||
|
||||
if (test.TimePump2StartV > 0)
|
||||
|
||||
Reference in New Issue
Block a user