ControlBoard Activity added, updated in operations, values are defined in Enums.

This commit is contained in:
Milan Hanajik
2022-05-06 17:18:45 +02:00
parent 1b402566ed
commit e428897822
7 changed files with 51 additions and 5 deletions
@@ -96,6 +96,7 @@ namespace TBF.Rig.ControlBoard.Uni
regV.Idx1, flowMeter.Idx1, (diverter != null) ? diverter.DiverterNr : 0, qFrom, qTo);
/// Start the test (and the flow measurement)
uniCB.SetActivity((diverter != null) ? Activity.FlyingStartStopTestWithDiverter : Activity.FlyingStartStopTest);
uniCB.StartTest(false, flowMeter.Idx1, (diverter != null) ? diverter.DiverterNr : 0, (diverter != null) ? diverter.StartThreshold : 0,
true, withDiverter, false, isProlonged, pulsesCount, massPulsesCount);
@@ -212,6 +213,7 @@ namespace TBF.Rig.ControlBoard.Uni
public void Stop()
{
log.Info("Op.Stop()");
uniCB.SetActivity((opState == OpState.TestCompleted) ? Activity.TestCompleted : Activity.Idle);
uniCB.StopAll(false);
}
}
@@ -74,6 +74,7 @@ namespace TBF.Rig.ControlBoard.Uni
log.InfoFormat("Start() Et#={0} pulses={1} withDiverter={2}", flowMeter.Idx1, pulsesCount, withDiverter);
/// Start the test (and the flow measurement)
uniCB.SetActivity(Activity.StandingStartStopTest);
uniCB.StartTest(false, flowMeter.Idx1, (withDiverter ? diverter.DiverterNr : 0), 0,
false, withDiverter, true, false, pulsesCount);
@@ -122,6 +123,7 @@ namespace TBF.Rig.ControlBoard.Uni
public void Stop()
{
log.Info("Stop()");
uniCB.SetActivity((opState == OpState.TestCompleted) ? Activity.TestCompleted : Activity.Idle);
uniCB.StopAll(false);
}
}
+11 -3
View File
@@ -82,7 +82,11 @@ namespace TBF.Rig.ControlBoard.Uni
ScopeAnalyzerData scopeAnalyzerData;
SwitchCountersData switchCounterData;
public UInt64 State { get { return Data.State; } } /// Control board state
public UInt64 State { get { return Data.State; } } /// Control board state
public Activity Activity { get { return activity; } } /// Control board activity
Activity activity;
public void SetActivity(Activity a) { activity = a; }
/// Quido RS
TBF.Rig.Modbus.QuidoRS.QuidoRS quidoRS;
@@ -90,7 +94,7 @@ namespace TBF.Rig.ControlBoard.Uni
/// Current flow meter ID
public int FlowmeterId { get { return Convert.ToInt32(Data.State & (ulong)StatusP.FlowmtrNrMask); } }
public UInt64 DigitalInputs { get { return Data.Vstupy; } } /// Digital inputs
public UInt64 DigitalInputs { get { return Data.Vstupy; } } /// Digital inputs
public Int16 AnalogInput(int channel)
{
@@ -601,7 +605,11 @@ namespace TBF.Rig.ControlBoard.Uni
///
/// Interface functions
///
public void ClearProcessValues() { } /// Called from ProcessData.ClearProcessValues() at the beginning of each test
public void ClearProcessValues()
{
/// Called from ProcessData.ClearProcessValues() at the beginning of each test
SetActivity(Activity.Idle);
}
public double TestTimeWM(int wmNr1)
{