PressMtrDelta added to BenchPath, PressDeltaXyz added to TestRslt, test methods modified, ver. 2.12.373

This commit is contained in:
Milan Hanajik
2016-10-18 19:14:01 +02:00
parent d1fb0e0f0a
commit bab677c5c2
35 changed files with 1159 additions and 1016 deletions
@@ -174,13 +174,14 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
//------------------------------------------------
State.Create("ReferenceFlowmeterCalibration : Measuring the start mass")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
? StateMachine.Ambient.ReadAmbientOp(AmbTemp, AmbPress, AmbHumi) : null)
.AddOperation(outPath.Balance.ReadStableMassOp(ref StartMass, test.MassRepeats, test.MassSpread, test.MassMethod))
.AddOperation(cBrd.UpdateTankWeightOp())
.AddOperation(processDataLoggingOp)
@@ -241,14 +242,15 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
test_completed:
State.Create("ReferenceFlowmeterCalibration : Waiting before mass measurement")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation(readRegistersOp)
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
? StateMachine.Ambient.ReadAmbientOp(AmbTemp, AmbPress, AmbHumi) : null)
.AddOperation(outPath.Balance.ReadMassOp(ref Mass))
.AddOperation(cBrd.UpdateTankWeightOp())
.AddOperation(processDataLoggingOp)
@@ -267,13 +269,14 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
//------------------------------------------------
State.Create("ReferenceFlowmeterCalibration : Measuring the end mass")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation((StateMachine.Ambient != null)
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
? StateMachine.Ambient.ReadAmbientOp(AmbTemp, AmbPress, AmbHumi) : null)
.AddOperation(outPath.Balance.ReadStableMassOp(ref EndMass, test.MassRepeats, test.MassSpread, test.MassMethod))
.AddOperation(cBrd.UpdateTankWeightOp())
.AddOperation(processDataLoggingOp)
@@ -303,49 +306,54 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
if (tstRslt != null)
{
/// Auxiliary results
tstRslt.AmbientTempAve = (float)AmbientTempStat.Average;
tstRslt.AmbTempStart = (float)AmbientTempStat.First;
tstRslt.AmbTempEnd = (float)AmbientTempStat.Last;
tstRslt.AmbTempMin = (float)AmbientTempStat.Min;
tstRslt.AmbTempMax = (float)AmbientTempStat.Max;
tstRslt.AmbientPressAve = (float)AmbientPressureStat.Average;
tstRslt.AmbPressStart = (float)AmbientPressureStat.First;
tstRslt.AmbPressEnd = (float)AmbientPressureStat.Last;
tstRslt.AmbPressMin = (float)AmbientPressureStat.Min;
tstRslt.AmbPressMax = (float)AmbientPressureStat.Max;
tstRslt.AmbientHumiAve = (float)AmbientHumidityStat.Average;
tstRslt.AmbHumiStart = (float)AmbientHumidityStat.First;
tstRslt.AmbHumiEnd = (float)AmbientHumidityStat.Last;
tstRslt.AmbHumiMin = (float)AmbientHumidityStat.Min;
tstRslt.AmbHumiMax = (float)AmbientHumidityStat.Max;
tstRslt.PressUpAvrg = (float)PressureUpStat.Average;
tstRslt.PressUpStart = (float)PressureUpStat.First;
tstRslt.PressUpEnd = (float)PressureUpStat.Last;
tstRslt.PressUpMin = (float)PressureUpStat.Min;
tstRslt.PressUpMax = (float)PressureUpStat.Max;
tstRslt.PressDownAvrg = (float)PressureDownStat.Average;
tstRslt.PressDownStart = (float)PressureDownStat.First;
tstRslt.PressDownEnd = (float)PressureDownStat.Last;
tstRslt.PressDownMin = (float)PressureDownStat.Min;
tstRslt.PressDownMax = (float)PressureDownStat.Max;
tstRslt.TempInAvrg = (float)TempInStat.Average;
tstRslt.TempInStart = (float)TempInStat.First;
tstRslt.TempInEnd = (float)TempInStat.Last;
tstRslt.TempInMin = (float)TempInStat.Min;
tstRslt.TempInMax = (float)TempInStat.Max;
tstRslt.TempOutAvrg = (float)TempOutStat.Average;
tstRslt.TempOutStart = (float)TempOutStat.First;
tstRslt.TempOutEnd = (float)TempOutStat.Last;
tstRslt.TempOutMin = (float)TempOutStat.Min;
tstRslt.TempOutMax = (float)TempOutStat.Max;
tstRslt.TempDivAvrg = (float)TempDivStat.Average;
tstRslt.AmbTempMean = (float)AmbTempStat.Average;
tstRslt.AmbTempStart = (float)AmbTempStat.First;
tstRslt.AmbTempEnd = (float)AmbTempStat.Last;
tstRslt.AmbTempMin = (float)AmbTempStat.Min;
tstRslt.AmbTempMax = (float)AmbTempStat.Max;
tstRslt.AmbPressMean = (float)AmbPressStat.Average;
tstRslt.AmbPressStart = (float)AmbPressStat.First;
tstRslt.AmbPressEnd = (float)AmbPressStat.Last;
tstRslt.AmbPressMin = (float)AmbPressStat.Min;
tstRslt.AmbPressMax = (float)AmbPressStat.Max;
tstRslt.AmbHumiMean = (float)AmbHumiStat.Average;
tstRslt.AmbHumiStart = (float)AmbHumiStat.First;
tstRslt.AmbHumiEnd = (float)AmbHumiStat.Last;
tstRslt.AmbHumiMin = (float)AmbHumiStat.Min;
tstRslt.AmbHumiMax = (float)AmbHumiStat.Max;
tstRslt.PressUpMean = (float)PressUpStat.Average;
tstRslt.PressUpStart = (float)PressUpStat.First;
tstRslt.PressUpEnd = (float)PressUpStat.Last;
tstRslt.PressUpMin = (float)PressUpStat.Min;
tstRslt.PressUpMax = (float)PressUpStat.Max;
tstRslt.PressDownMean = (float)PressDownStat.Average;
tstRslt.PressDownStart = (float)PressDownStat.First;
tstRslt.PressDownEnd = (float)PressDownStat.Last;
tstRslt.PressDownMin = (float)PressDownStat.Min;
tstRslt.PressDownMax = (float)PressDownStat.Max;
tstRslt.PressDeltaMean = (float)PressDeltaStat.Average;
tstRslt.PressDeltaStart = (float)PressDeltaStat.First;
tstRslt.PressDeltaEnd = (float)PressDeltaStat.Last;
tstRslt.PressDeltaMin = (float)PressDeltaStat.Min;
tstRslt.PressDeltaMax = (float)PressDeltaStat.Max;
tstRslt.TempUpMean = (float)TempUpStat.Average;
tstRslt.TempUpStart = (float)TempUpStat.First;
tstRslt.TempUpEnd = (float)TempUpStat.Last;
tstRslt.TempUpMin = (float)TempUpStat.Min;
tstRslt.TempUpMax = (float)TempUpStat.Max;
tstRslt.TempDownMean = (float)TempDownStat.Average;
tstRslt.TempDownStart = (float)TempDownStat.First;
tstRslt.TempDownEnd = (float)TempDownStat.Last;
tstRslt.TempDownMin = (float)TempDownStat.Min;
tstRslt.TempDownMax = (float)TempDownStat.Max;
tstRslt.TempDivMean = (float)TempDivStat.Average;
tstRslt.TempDivStart = (float)TempDivStat.First;
tstRslt.TempDivEnd = (float)TempDivStat.Last;
tstRslt.TempDivMin = (float)TempDivStat.Min;
tstRslt.TempDivMax = (float)TempDivStat.Max;
tstRslt.DensityIn = Formulas.WaterDensityFromTemp(tstRslt.TempInAvrg); /// [kg/m3]
tstRslt.DensityOut = Formulas.WaterDensityFromTemp(tstRslt.TempOutAvrg); /// [kg/m3]
tstRslt.DensityDiv = Formulas.WaterDensityFromTemp(tstRslt.TempDivAvrg); /// [kg/m3]
tstRslt.DensityIn = Formulas.WaterDensityFromTemp(tstRslt.TempUpMean); /// [kg/m3]
tstRslt.DensityOut = Formulas.WaterDensityFromTemp(tstRslt.TempDownMean); /// [kg/m3]
tstRslt.DensityDiv = Formulas.WaterDensityFromTemp(tstRslt.TempDivMean); /// [kg/m3]
/// Main results
tstRslt.StartTime = TestStartTime;