ProcessData base class with 'public static' process data introduced.
This commit is contained in:
+60
-60
@@ -113,7 +113,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
|
||||
///
|
||||
State.Create("FlyingStartCollectionMethod : Measuring the mass of water in the tank")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(outPath.Balance.ReadMassOp(ref mass))
|
||||
.AddOperation(outPath.Balance.ReadMassOp(ref Mass))
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
@@ -123,7 +123,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
|
||||
}
|
||||
while (!e.Contains(Event.BalanceDone));
|
||||
|
||||
float estimatedEndMass = mass.Val + test.Volume;
|
||||
float estimatedEndMass = Mass.Val + test.Volume;
|
||||
if (estimatedEndMass < outPath.Balance.Capacity * Constants.TankFullFactor)
|
||||
{
|
||||
goto set_flow; /// Enough room in the tank -> skip emptying
|
||||
@@ -146,7 +146,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
|
||||
//------------------------------------------------
|
||||
State.Create("FlyingStartCollectionMethod : Setting the flow")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, refFlow, 600)) /// timeout = 10 min.
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, 600)) /// timeout = 10 min.
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
@@ -170,7 +170,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
|
||||
|
||||
flow_set:
|
||||
int time = StateMachine.Time;
|
||||
float currentFlow = refFlow.Val;
|
||||
float currentFlow = RefFlow.Val;
|
||||
|
||||
/// Extract cameras from the current sensors path, add operations to the detection state
|
||||
IList<IOperation> measureOperations = new List<IOperation>();
|
||||
@@ -182,14 +182,14 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
|
||||
|
||||
State.Create("FlyingStartCollectionMethod : Waiting before 1st mass measurement")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(benchPath.TempIn.ReadTempOp(ref tempIn))
|
||||
.AddOperation(benchPath.TempOut.ReadTempOp(ref tempOut))
|
||||
.AddOperation(outPath.TempDiv.ReadTempOp(ref tempDiv))
|
||||
.AddOperation(benchPath.PressIn.ReadPressureOp(ref pressIn))
|
||||
.AddOperation(benchPath.PressOut.ReadPressureOp(ref pressOut))
|
||||
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
|
||||
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
|
||||
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
|
||||
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
|
||||
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
|
||||
.AddOperation((StateMachine.Ambient != null)
|
||||
? StateMachine.Ambient.ReadAmbientOp(airTemperature, airPressure, airHumidity) : null)
|
||||
.AddOperation(outPath.Balance.ReadMassOp(ref mass))
|
||||
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
|
||||
.AddOperation(outPath.Balance.ReadMassOp(ref Mass))
|
||||
.AddOperation(cBrd.UpdateTankWeightOp())
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.AddOperation(new Operations.TimerOp(test.TimeFlow2Mass))
|
||||
@@ -210,13 +210,13 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
|
||||
//------------------------------------------------
|
||||
State.Create("FlyingStartCollectionMethod : Measuring the start mass")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(benchPath.TempIn.ReadTempOp(ref tempIn))
|
||||
.AddOperation(benchPath.TempOut.ReadTempOp(ref tempOut))
|
||||
.AddOperation(outPath.TempDiv.ReadTempOp(ref tempDiv))
|
||||
.AddOperation(benchPath.PressIn.ReadPressureOp(ref pressIn))
|
||||
.AddOperation(benchPath.PressOut.ReadPressureOp(ref pressOut))
|
||||
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
|
||||
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
|
||||
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
|
||||
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
|
||||
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
|
||||
.AddOperation((StateMachine.Ambient != null)
|
||||
? StateMachine.Ambient.ReadAmbientOp(airTemperature, airPressure, airHumidity) : null)
|
||||
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(outPath.Balance.ReadStableMassOp(ref startMass, 5))
|
||||
.AddOperation(cBrd.UpdateTankWeightOp())
|
||||
@@ -235,20 +235,20 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
|
||||
tstRslt.TimeStart = DateTime.Now;
|
||||
tstRslt.MassStartRaw = startMass.Val;
|
||||
log.WarnFormat("Start mass = {0}kg", startMass);
|
||||
mass.Val = startMass.Val;
|
||||
Mass.Val = startMass.Val;
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Test_in_progress);
|
||||
//------------------------------------------------
|
||||
State.Create("FlyingStartCollectionMethod : Starting the test")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(benchPath.TempIn.ReadTempOp(ref tempIn))
|
||||
.AddOperation(benchPath.TempOut.ReadTempOp(ref tempOut))
|
||||
.AddOperation(outPath.TempDiv.ReadTempOp(ref tempDiv))
|
||||
.AddOperation(benchPath.PressIn.ReadPressureOp(ref pressIn))
|
||||
.AddOperation(benchPath.PressOut.ReadPressureOp(ref pressOut))
|
||||
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
|
||||
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
|
||||
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
|
||||
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
|
||||
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
|
||||
.AddOperation((StateMachine.Ambient != null)
|
||||
? StateMachine.Ambient.ReadAmbientOp(airTemperature, airPressure, airHumidity) : null)
|
||||
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(cBrd.UpdateTankWeightOp())
|
||||
.AddOperation(processDataLoggingOp)
|
||||
@@ -283,15 +283,15 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(readRegistersOp)
|
||||
.AddOperation(benchPath.TempIn.ReadTempOp(ref tempIn))
|
||||
.AddOperation(benchPath.TempOut.ReadTempOp(ref tempOut))
|
||||
.AddOperation(outPath.TempDiv.ReadTempOp(ref tempDiv))
|
||||
.AddOperation(benchPath.PressIn.ReadPressureOp(ref pressIn))
|
||||
.AddOperation(benchPath.PressOut.ReadPressureOp(ref pressOut))
|
||||
.AddOperation(outPath.Balance.ReadMassOp(ref mass))
|
||||
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
|
||||
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
|
||||
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
|
||||
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
|
||||
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
|
||||
.AddOperation(outPath.Balance.ReadMassOp(ref Mass))
|
||||
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
|
||||
.AddOperation((StateMachine.Ambient != null)
|
||||
? StateMachine.Ambient.ReadAmbientOp(airTemperature, airPressure, airHumidity)
|
||||
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity)
|
||||
: null)
|
||||
.AddOperation(queryEnd1)
|
||||
.AddOperation(processDataLoggingOp)
|
||||
@@ -318,27 +318,27 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
|
||||
if (firstTime)
|
||||
{
|
||||
firstTime = false; /// Do the following only once
|
||||
tstRslt.TempInStart = tempIn.Val;
|
||||
tstRslt.TempOutStart = tempOut.Val;
|
||||
tstRslt.TempDivStart = tempDiv.Val;
|
||||
tstRslt.PressInStart = pressIn.Val;
|
||||
tstRslt.PressOutStart = pressOut.Val;
|
||||
tstRslt.TempInStart = TempIn.Val;
|
||||
tstRslt.TempOutStart = TempOut.Val;
|
||||
tstRslt.TempDivStart = TempDiv.Val;
|
||||
tstRslt.PressInStart = PressureUp.Val;
|
||||
tstRslt.PressOutStart = PressureDown.Val;
|
||||
}
|
||||
|
||||
tstRslt.TempInEnd = tempIn.Val;
|
||||
tstRslt.TempOutEnd = tempOut.Val;
|
||||
tstRslt.TempDivEnd = tempDiv.Val;
|
||||
tstRslt.PressInEnd = pressIn.Val;
|
||||
tstRslt.PressOutEnd = pressOut.Val;
|
||||
tstRslt.MassEndRaw = mass.Val;
|
||||
tstRslt.TempInEnd = TempIn.Val;
|
||||
tstRslt.TempOutEnd = TempOut.Val;
|
||||
tstRslt.TempDivEnd = TempDiv.Val;
|
||||
tstRslt.PressInEnd = PressureUp.Val;
|
||||
tstRslt.PressOutEnd = PressureDown.Val;
|
||||
tstRslt.MassEndRaw = Mass.Val;
|
||||
|
||||
AccumulateAveragedData();
|
||||
|
||||
refFreq.Val = cBrd.ReferenceFreq;
|
||||
refFlow.Val = cBrd.ReferenceFlow;
|
||||
tstRslt.AmbientTempAve = airTemperature.Val;
|
||||
tstRslt.AmbientPressAve = airPressure.Val;
|
||||
tstRslt.AmbientHumiAve = airHumidity.Val;
|
||||
RefFreq.Val = cBrd.ReferenceFreq;
|
||||
RefFlow.Val = cBrd.ReferenceFlow;
|
||||
tstRslt.AmbientTempAve = AmbientTemp.Val;
|
||||
tstRslt.AmbientPressAve = AmbientPressure.Val;
|
||||
tstRslt.AmbientHumiAve = AmbientHumidity.Val;
|
||||
|
||||
string logstr = string.Format("E={0} f={1} q={2}", cBrd.EtPulses(0), cBrd.ReferenceFreq,
|
||||
cBrd.ReferenceFlow * outPath.FlowMeter.NominalFlow);
|
||||
@@ -358,15 +358,15 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
|
||||
test_completed:
|
||||
State.Create("FlyingStartCollectionMethod : Waiting before 2nd mass measurement")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(benchPath.TempIn.ReadTempOp(ref tempIn))
|
||||
.AddOperation(benchPath.TempOut.ReadTempOp(ref tempOut))
|
||||
.AddOperation(outPath.TempDiv.ReadTempOp(ref tempDiv))
|
||||
.AddOperation(benchPath.PressIn.ReadPressureOp(ref pressIn))
|
||||
.AddOperation(benchPath.PressOut.ReadPressureOp(ref pressOut))
|
||||
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
|
||||
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
|
||||
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
|
||||
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
|
||||
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
|
||||
.AddOperation(readRegistersOp)
|
||||
.AddOperation((StateMachine.Ambient != null)
|
||||
? StateMachine.Ambient.ReadAmbientOp(airTemperature, airPressure, airHumidity) : null)
|
||||
.AddOperation(outPath.Balance.ReadMassOp(ref mass))
|
||||
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
|
||||
.AddOperation(outPath.Balance.ReadMassOp(ref Mass))
|
||||
.AddOperation(cBrd.UpdateTankWeightOp())
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.AddOperation(new Operations.TimerOp(test.TimeStop2Mass))
|
||||
@@ -386,14 +386,14 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
|
||||
//------------------------------------------------
|
||||
State.Create("FlyingStartCollectionMethod : Measuring the end mass")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(benchPath.TempIn.ReadTempOp(ref tempIn))
|
||||
.AddOperation(benchPath.TempOut.ReadTempOp(ref tempOut))
|
||||
.AddOperation(outPath.TempDiv.ReadTempOp(ref tempDiv))
|
||||
.AddOperation(benchPath.PressIn.ReadPressureOp(ref pressIn))
|
||||
.AddOperation(benchPath.PressOut.ReadPressureOp(ref pressOut))
|
||||
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
|
||||
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
|
||||
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
|
||||
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
|
||||
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
|
||||
.AddOperation(readRegistersOp)
|
||||
.AddOperation((StateMachine.Ambient != null)
|
||||
? StateMachine.Ambient.ReadAmbientOp(airTemperature, airPressure, airHumidity) : null)
|
||||
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
|
||||
.AddOperation(outPath.Balance.ReadStableMassOp(ref endMass, 5))
|
||||
.AddOperation(cBrd.UpdateTankWeightOp())
|
||||
.AddOperation(processDataLoggingOp)
|
||||
|
||||
Reference in New Issue
Block a user