Bug-fixes in FlyingStart and FlyingStartMassCollection heat meters, T ref warm and T ref cold statistics, ver. 2.10.362

This commit is contained in:
Milan Hanajik
2016-10-12 01:23:38 +02:00
parent 2057cc6b73
commit dddfc4bed5
8 changed files with 209 additions and 49 deletions
@@ -364,7 +364,15 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
///
/// Make sure tank emptying completed
///
switch (EmptyTheTank(outPath.EmptyTankValve, outPath.Balance))
IList<IOperation> extraOps = new List<IOperation>();
if (heatMetersPath != null)
{
extraOps.Add(heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1));
extraOps.Add(heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2));
extraOps.Add(heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1));
extraOps.Add(heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2));
}
switch (EmptyTheTank(outPath.EmptyTankValve, outPath.Balance, extraOps))
{
case Event.Error: { retVal = Event.Error; goto stopTest; }
case Event.UiCmdStop: { retVal = Event.UiCmdStop; goto stopTest; }
@@ -377,10 +385,15 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
{
State.Create("FlyingStartMassCollection : Waiting before 1st mass measurement")
.AddOperation(checkUiOp)
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation(cBrd.UpdateTankWeightOp())
.AddOperation(new Operations.TimerOp(test.TimeFlow2Mass))
.EnterState();
do{
do
{
e = StateMachine.WaitRunDevsRunOps();
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; }
@@ -402,7 +415,11 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation((StateMachine.Ambient != null)
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
.AddOperations(measureOperations)
.AddOperation(outPath.Balance.ReadStableMassOp(ref StartMass, test.MassRepeats, test.MassSpread, test.MassMethod))
@@ -432,6 +449,10 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
.AddOperations(measureOperations)
@@ -471,6 +492,10 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation(outPath.Balance.ReadMassOp(ref Mass))
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
.AddOperation((StateMachine.Ambient != null)
@@ -539,7 +564,11 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(readRegistersOp)
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation(readRegistersOp)
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
.AddOperation(outPath.Balance.ReadMassOp(ref Mass))
@@ -564,7 +593,11 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(readRegistersOp)
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefWarm1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefWarm2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefCold1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefCold2))
.AddOperation(readRegistersOp)
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
.AddOperation(outPath.Balance.ReadStableMassOp(ref EndMass, test.MassRepeats, test.MassSpread, test.MassMethod))
@@ -727,6 +760,17 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
///
tstRslt.RefEnergy = Energy.Sum * tstRslt.VolumeCTV / VolumeForEnergy.Sum; /// [J] = [J] * [l] / [l]
tstRslt.Custom1 = (float)TempRefWarmStat.Average;
tstRslt.Custom2 = (float)TempRefWarmStat.First;
tstRslt.Custom3 = (float)TempRefWarmStat.Last;
tstRslt.Custom4 = (float)TempRefWarmStat.Min;
tstRslt.Custom5 = (float)TempRefWarmStat.Max;
tstRslt.Custom6 = (float)TempRefColdStat.Average;
tstRslt.Custom7 = (float)TempRefColdStat.First;
tstRslt.Custom8 = (float)TempRefColdStat.Last;
tstRslt.Custom9 = (float)TempRefColdStat.Min;
tstRslt.Custom10 = (float)TempRefColdStat.Max;
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
{
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;