Stopping flow regulation after a test completes (in three test methods).
This commit is contained in:
@@ -669,6 +669,16 @@ namespace TBF.BenchControl.Elde
|
|||||||
return new QueryMeasurementEndOp(this);
|
return new QueryMeasurementEndOp(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Stop controls board flow regulation operation
|
||||||
|
/// Events: FlowRegulationStopped
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Created operation</returns>
|
||||||
|
public IOperation StopFlowRegulationOp()
|
||||||
|
{
|
||||||
|
return new StopFlowRegulationOp(this);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stop the previous control board operation (diverter, gate, etc.)
|
/// Stop the previous control board operation (diverter, gate, etc.)
|
||||||
/// Events: PreviousStopped
|
/// Events: PreviousStopped
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ namespace TBF.BenchControl.Elde.RegulValve
|
|||||||
public ValveCategory Category; /// Feeding, Output or All
|
public ValveCategory Category; /// Feeding, Output or All
|
||||||
public int AdcValueClosed; /// 0..1023
|
public int AdcValueClosed; /// 0..1023
|
||||||
public int AdcValueOpen; /// 0..1023
|
public int AdcValueOpen; /// 0..1023
|
||||||
public int StableTimeMs; /// 200..1500 ms
|
public int StableTimeMs; /// 200..1500 ms, step is 50 ms
|
||||||
public int FlowStableSec; /// 0..60 sec
|
public int FlowStableSec; /// 0..60 sec
|
||||||
public bool StoredPositionReuse; /// true = store and re-use previous regulation valve positions
|
public bool StoredPositionReuse; /// true = store and re-use previous regulation valve positions
|
||||||
public bool ReTryCommands;
|
public bool ReTryCommands;
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
///
|
||||||
|
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||||
|
///
|
||||||
|
using System;
|
||||||
|
using log4net;
|
||||||
|
|
||||||
|
namespace TBF.BenchControl.Elde
|
||||||
|
{
|
||||||
|
class StopFlowRegulationOp : IOperation
|
||||||
|
{
|
||||||
|
private static readonly ILog log = LogManager.GetLogger(typeof(StopFlowRegulationOp));
|
||||||
|
public override string ToString() { return string.Format("StopFlowRegulationOp(.)"); }
|
||||||
|
|
||||||
|
/// Set by the constructor
|
||||||
|
readonly ControlBoardDev controlBoard;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Stop the previous control board operation (diverter, gate, etc.)
|
||||||
|
/// Events: None or PreviousStopped
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="controlBoardDev">Control board component reference</param>
|
||||||
|
public StopFlowRegulationOp(ControlBoardDev controlBoardDev)
|
||||||
|
{
|
||||||
|
if (controlBoardDev == null) throw new ArgumentNullException("controlBoardDev");
|
||||||
|
this.controlBoard = controlBoardDev;
|
||||||
|
|
||||||
|
log.Debug(this.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SendStopFlowRegulationCommand()
|
||||||
|
{
|
||||||
|
controlBoard.SyncRoute();
|
||||||
|
controlBoard.SendCommand(Command.None,
|
||||||
|
0, /// ref. flowmeter number
|
||||||
|
controlBoard.Route, /// route
|
||||||
|
0, 0, /// ref. pulses
|
||||||
|
0,
|
||||||
|
new int[] { 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
|
20,
|
||||||
|
0,
|
||||||
|
StopDevs.RegValveRegulation);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>Start this operation</summary>
|
||||||
|
public void Start()
|
||||||
|
{
|
||||||
|
SendStopFlowRegulationCommand();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>Run this operation</summary>
|
||||||
|
/// <returns>Event.FlowRegulationStopped</returns>
|
||||||
|
public Event Run()
|
||||||
|
{
|
||||||
|
return Event.FlowRegulationStopped;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>Stop this operation</summary>
|
||||||
|
public void Stop()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -132,6 +132,7 @@ namespace TBF.BenchControl
|
|||||||
UiCmdB3,
|
UiCmdB3,
|
||||||
|
|
||||||
/// Process/Test oriented
|
/// Process/Test oriented
|
||||||
|
FlowRegulationStopped,
|
||||||
PreviousStopped,
|
PreviousStopped,
|
||||||
Wait,
|
Wait,
|
||||||
ProcedureLoaded,
|
ProcedureLoaded,
|
||||||
|
|||||||
@@ -728,6 +728,18 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
|||||||
|
|
||||||
StopRecordingStatistics();
|
StopRecordingStatistics();
|
||||||
|
|
||||||
|
State.Create(string.Format("{0}({1}) : Stopping flow regulation", test.Method, test.Name))
|
||||||
|
.AddOperation(checkUiOp)
|
||||||
|
.AddOperations(readTempPressOps)
|
||||||
|
.AddOperation(cBrd.StopFlowRegulationOp())
|
||||||
|
.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.FlowRegulationStopped));
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Quit this sequence
|
/// Quit this sequence
|
||||||
///
|
///
|
||||||
|
|||||||
+12
@@ -617,6 +617,18 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
|
|||||||
|
|
||||||
StopRecordingStatistics();
|
StopRecordingStatistics();
|
||||||
|
|
||||||
|
State.Create(string.Format("{0}({1}) : Stopping flow regulation", test.Method, test.Name))
|
||||||
|
.AddOperation(checkUiOp)
|
||||||
|
.AddOperations(readTempPressOps)
|
||||||
|
.AddOperation(cBrd.StopFlowRegulationOp())
|
||||||
|
.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.FlowRegulationStopped));
|
||||||
|
|
||||||
///
|
///
|
||||||
/// (Berlin:) Water is stopped immediately after the test and before the 2nd mass measurement in case:
|
/// (Berlin:) Water is stopped immediately after the test and before the 2nd mass measurement in case:
|
||||||
/// - no 'transition sequence after test' is used
|
/// - no 'transition sequence after test' is used
|
||||||
|
|||||||
+13
-1
@@ -602,6 +602,18 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
|||||||
|
|
||||||
StopRecordingStatistics();
|
StopRecordingStatistics();
|
||||||
|
|
||||||
|
State.Create(string.Format("{0}({1}) : Stopping flow regulation", test.Method, test.Name))
|
||||||
|
.AddOperation(checkUiOp)
|
||||||
|
.AddOperations(readTempPressOps)
|
||||||
|
.AddOperation(cBrd.StopFlowRegulationOp())
|
||||||
|
.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.FlowRegulationStopped));
|
||||||
|
|
||||||
///
|
///
|
||||||
/// (Berlin:) Water is stopped immediately after the test and before the 2nd mass measurement in case:
|
/// (Berlin:) Water is stopped immediately after the test and before the 2nd mass measurement in case:
|
||||||
/// - no 'transition sequence after test' is used
|
/// - no 'transition sequence after test' is used
|
||||||
@@ -610,7 +622,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
|||||||
#if !CEVAK_200
|
#if !CEVAK_200
|
||||||
if (isLastRepetition && transitionAfter == null)
|
if (isLastRepetition && transitionAfter == null)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOff();
|
if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOff();
|
||||||
|
|
||||||
State.Create("SequenceBase : Transition : TestEnd - Default action")
|
State.Create("SequenceBase : Transition : TestEnd - Default action")
|
||||||
|
|||||||
@@ -554,6 +554,7 @@
|
|||||||
<Compile Include="BenchControl\Elde\RegulValveCoax\SetFlowOp.cs" />
|
<Compile Include="BenchControl\Elde\RegulValveCoax\SetFlowOp.cs" />
|
||||||
<Compile Include="BenchControl\Elde\RegulValveCoax\SetRegulValvePositionOp.cs" />
|
<Compile Include="BenchControl\Elde\RegulValveCoax\SetRegulValvePositionOp.cs" />
|
||||||
<Compile Include="BenchControl\Elde\SetValvesOp.cs" />
|
<Compile Include="BenchControl\Elde\SetValvesOp.cs" />
|
||||||
|
<Compile Include="BenchControl\Elde\StopFlowRegulationOp.cs" />
|
||||||
<Compile Include="BenchControl\Elde\TempMeterInternal\ReadTempOp.cs" />
|
<Compile Include="BenchControl\Elde\TempMeterInternal\ReadTempOp.cs" />
|
||||||
<Compile Include="BenchControl\Elde\TempMeterInternal\TempMeter.cs" />
|
<Compile Include="BenchControl\Elde\TempMeterInternal\TempMeter.cs" />
|
||||||
<Compile Include="BenchControl\Elde\TempMeterInternal\TempMeterCfg.cs" />
|
<Compile Include="BenchControl\Elde\TempMeterInternal\TempMeterCfg.cs" />
|
||||||
|
|||||||
Reference in New Issue
Block a user