From dddfc4bed56caee7df5a0c4b4914d72226c797bb Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Wed, 12 Oct 2016 01:23:38 +0200 Subject: [PATCH] Bug-fixes in FlyingStart and FlyingStartMassCollection heat meters, T ref warm and T ref cold statistics, ver. 2.10.362 --- Results/Entities/TestRslt.cs | 18 ++- .../BenchControl/Sequences/ProcessData.cs | 10 ++ .../BenchControl/Sequences/SequenceBase.cs | 138 ++++++++++++++---- .../BenchControl/Sequences/Statistics.cs | 4 +- .../FixedStartMassCollectionSeq.cs | 11 ++ .../TestMethods/FlyingStart/FlyingStartSeq.cs | 19 +++ .../FlyingStartMassCollectionSeq.cs | 54 ++++++- TestBenchFramework/Properties/AssemblyInfo.cs | 4 +- 8 files changed, 209 insertions(+), 49 deletions(-) diff --git a/Results/Entities/TestRslt.cs b/Results/Entities/TestRslt.cs index 23890c083..f55273fea 100644 --- a/Results/Entities/TestRslt.cs +++ b/Results/Entities/TestRslt.cs @@ -84,14 +84,16 @@ namespace Results.Entities public virtual float FlowMin { get; set; } /// [m3/h] minimum flow public virtual float FlowMax { get; set; } /// [m3/h] maximum flow - public virtual float Custom1 { get; set; } - public virtual float Custom2 { get; set; } - public virtual float Custom3 { get; set; } - public virtual float Custom4 { get; set; } - public virtual float Custom5 { get; set; } - public virtual float Custom6 { get; set; } - public virtual float Custom7 { get; set; } - public virtual float Custom8 { get; set; } + public virtual float Custom1 { get; set; } /// [°C] T ref warm average + public virtual float Custom2 { get; set; } /// [°C] T ref warm start + public virtual float Custom3 { get; set; } /// [°C] T ref warm end + public virtual float Custom4 { get; set; } /// [°C] T ref warm min + public virtual float Custom5 { get; set; } /// [°C] T ref warm max + public virtual float Custom6 { get; set; } /// [°C] T ref cold average + public virtual float Custom7 { get; set; } /// [°C] T ref cold start + public virtual float Custom8 { get; set; } /// [°C] T ref cold end + public virtual float Custom9 { get; set; } /// [°C] T ref cold min + public virtual float Custom10 { get; set; } /// [°C] T ref cold max /// Wrappers public virtual string Name() { return Utils.GetTestName(TestData.Name, TestData.Repeats, RepetitionNr); } diff --git a/TestBenchFramework/BenchControl/Sequences/ProcessData.cs b/TestBenchFramework/BenchControl/Sequences/ProcessData.cs index bd7373eb7..2e21c3400 100644 --- a/TestBenchFramework/BenchControl/Sequences/ProcessData.cs +++ b/TestBenchFramework/BenchControl/Sequences/ProcessData.cs @@ -82,6 +82,8 @@ namespace TBF.BenchControl.Sequences public static Statistics PressureDownStat = new Statistics(); public static Statistics RefFlowStat = new Statistics(); + public static Statistics TempRefWarmStat = new Statistics(); + public static Statistics TempRefColdStat = new Statistics(); public static Statistics Energy = new Statistics(); public static Statistics VolumeForEnergy = new Statistics(); public static int lastEnergyUpdateTime; @@ -98,6 +100,8 @@ namespace TBF.BenchControl.Sequences PressureDownStat.Clear(); RefFlowStat.Clear(); + TempRefWarmStat.Clear(); + TempRefColdStat.Clear(); Energy.Clear(); VolumeForEnergy.Clear(); lastEnergyUpdateTime = 0; @@ -114,6 +118,12 @@ namespace TBF.BenchControl.Sequences PressureUpStat.Update(PressureUp); PressureDownStat.Update(PressureDown); RefFlowStat.Update(RefFlow); + + if (BatchRslts.Batch.HeatMeter) + { + TempRefWarmStat.Update((TempRefWarm1.Val + TempRefWarm2.Val) / 2); + TempRefColdStat.Update((TempRefCold1.Val + TempRefCold2.Val) / 2); + } } } } diff --git a/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs b/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs index cac529991..469d2ff86 100644 --- a/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs +++ b/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs @@ -109,7 +109,14 @@ namespace TBF.BenchControl.Sequences protected Event EmptyTheTank(IValve emptyTankValve, IBalance balance) { - return EmptyTheTank(emptyTankValve, balance, null); + return EmptyTheTank(emptyTankValve, balance, new List()); + } + + protected Event EmptyTheTank(IValve emptyTankValve, IBalance balance, IOperation extraOperation) + { + IList extraOperations = new List(); + extraOperations.Add(extraOperation); + return EmptyTheTank(emptyTankValve, balance, extraOperations); } /// @@ -118,7 +125,7 @@ namespace TBF.BenchControl.Sequences /// Valve to empty the tank /// Balance underneath the tank /// Event.Done or Event.Error - protected Event EmptyTheTank(IValve emptyTankValve, IBalance balance, IOperation extraOperation) + protected Event EmptyTheTank(IValve emptyTankValve, IBalance balance, IList extraOperations) { bool stopped = false; @@ -129,23 +136,26 @@ namespace TBF.BenchControl.Sequences IList e; Bridge.Bench2UI(ButtonsEtc.StopBtnEn); - State.Create("SequenceBase : Opening the emptying valve") - .AddOperation(checkUiOp) - .AddOperation(StateMachine.ControlBoard.SetValvesOp(emptyTankValve, null)) - .AddOperation(extraOperation) - .EnterState(); - do { e = StateMachine.WaitRunDevsRunOps(); } + + State state = State.Create("SequenceBase : Opening the emptying valve") + .AddOperation(checkUiOp) + .AddOperation(StateMachine.ControlBoard.SetValvesOp(emptyTankValve, null)); + foreach (var op in extraOperations) state.AddOperation(op); + state.EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + } while (!e.Contains(Event.ValvesSet)); do { - //-------------------------------- - State.Create("SequenceBase : Emptying the tank") - .AddOperation(checkUiOp) - .AddOperation(balance.ReadMassOp(ref Mass)) - .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) - .AddOperation(extraOperation) - .EnterState(); + state = State.Create("SequenceBase : Emptying the tank") + .AddOperation(checkUiOp) + .AddOperation(balance.ReadMassOp(ref Mass)) + .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()); + foreach (var op in extraOperations) state.AddOperation(op); + state.EnterState(); do { e = StateMachine.WaitRunDevsRunOps(); @@ -159,6 +169,7 @@ namespace TBF.BenchControl.Sequences } while (!e.Contains(Event.BalanceDone)); + if (stopped) break; } while (!balance.IsEmpty(Mass.Val)); @@ -166,13 +177,13 @@ namespace TBF.BenchControl.Sequences // // Quit emptying // - State.Create("SequenceBase : Closing the emptying valve") - .AddOperation(checkUiOp) - .AddOperation(balance.ReadMassOp(ref Mass)) - .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) - .AddOperation(StateMachine.ControlBoard.SetValvesOp(null, emptyTankValve)) - .AddOperation(extraOperation) - .EnterState(); + state = State.Create("SequenceBase : Closing the emptying valve") + .AddOperation(checkUiOp) + .AddOperation(balance.ReadMassOp(ref Mass)) + .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) + .AddOperation(StateMachine.ControlBoard.SetValvesOp(null, emptyTankValve)); + foreach (var op in extraOperations) state.AddOperation(op); + state.EnterState(); do { e = StateMachine.WaitRunDevsRunOps(); @@ -181,13 +192,14 @@ namespace TBF.BenchControl.Sequences } while (!e.Contains(Event.ValvesSet) || !e.Contains(Event.BalanceDone)); - State.Create("SequenceBase : Updating the weight") - .AddOperation(checkUiOp) - .AddOperation(balance.ReadMassOp(ref Mass)) - .AddOperation(new Operations.TimerOp(5)) - .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) - .AddOperation(extraOperation) - .EnterState(); + + state = State.Create("SequenceBase : Updating the weight") + .AddOperation(checkUiOp) + .AddOperation(balance.ReadMassOp(ref Mass)) + .AddOperation(new Operations.TimerOp(5)) + .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()); + foreach (var op in extraOperations) state.AddOperation(op); + state.EnterState(); do { e = StateMachine.WaitRunDevsRunOps(); @@ -196,6 +208,7 @@ namespace TBF.BenchControl.Sequences } while (!e.Contains(Event.BalanceDone) || !e.Contains(Event.TimerExpired)); + if (stopped) return Event.UiCmdStop; else @@ -735,7 +748,7 @@ namespace TBF.BenchControl.Sequences { if (ProcessData.BatchRslts.WaterMeters[i] != null) { - if (!ProcessData.BatchRslts.WaterMeters[i].Compound()) + if (!ProcessData.BatchRslts.WaterMeters[i].Compound() && !ProcessData.BatchRslts.WaterMeters[i].HeatMeter()) { Results.Entities.MeterTestRslt mtrRslt = ProcessData.BatchRslts.GetMeterTestRslt(tstRslt.Name(), i, CompoundMeterId.Single); @@ -767,7 +780,7 @@ namespace TBF.BenchControl.Sequences sb.Append(";"); sb.Append(mtrRslt.TimestampEnd); /// WM Time_end - ' ' - } } - else + else if (ProcessData.BatchRslts.WaterMeters[i].Compound()) { for (byte b = (byte)CompoundMeterId.CompoundMain; b <= (byte)CompoundMeterId.Compound; b++) { @@ -775,7 +788,7 @@ namespace TBF.BenchControl.Sequences if (mtrRslt != null) { - sb.Append(";"); + sb.Append(";"); switch ((CompoundMeterId)b) { case CompoundMeterId.CompoundMain: @@ -806,6 +819,67 @@ namespace TBF.BenchControl.Sequences } } } + else /// if (ProcessData.BatchRslts.WaterMeters[i].HeatMeter()) + { + Results.Entities.MeterTestRslt volumeMtr = ProcessData.BatchRslts.GetMeterTestRslt(tstRslt.Name(), i, CompoundMeterId.HeatMeterVolume); + Results.Entities.MeterTestRslt energyMtr = ProcessData.BatchRslts.GetMeterTestRslt(tstRslt.Name(), i, CompoundMeterId.HeatMeterEnergy); + + if (volumeMtr != null) + { + sb.Append(";"); sb.Append(ProcessData.BatchRslts.WaterMeters[i].SerialNr); /// WM Ser.No. + sb.Append(";"); sb.Append(volumeMtr.VolumeStart); /// WM Vstart - pociatocny stav pri pevnom starte alebo zachyteny pri data streame + sb.Append(";"); sb.Append(volumeMtr.VolumeEnd); /// WM Vend - konecny stav pri pevnom starte alebo zachyteny pri data streame + sb.Append(";"); sb.Append(volumeMtr.VolumeMeter); /// WM Vmer - objem namerany vodomerom + sb.Append(";"); sb.Append(volumeMtr.VolumeRef); /// WM Vref - objem namerany stanicou + sb.Append(";"); sb.Append(volumeMtr.Error); /// WM Emt - chyba vodomerom nameraneho objemu +#if IPERLST || IPERLST_SPECIAL + sb.Append(";"); sb.Append(ProcessData.BatchRslts.WaterMeters[i].CalibFactor); /// iPerl calibration factor used during the test / ... +#else + sb.Append(";"); sb.Append(" "); /// nechat prazdne +#endif + sb.Append(";"); sb.Append(volumeMtr.PulsesMeter); /// WM Np met - pocet impulzov zo skusaneho meradla + sb.Append(";"); sb.Append(volumeMtr.PulsesMaster); /// WM Np elm - pocet impulzov etalonu pocas merania pre prislusny vodomer + sb.Append(";"); sb.Append(volumeMtr.TestTime); /// WM Tmet - cas merania (obmedzany pri synchro skuske) + sb.Append(";"); sb.Append(volumeMtr.Passed ? "OK" : "NOK"); /// WM Vysledok (t.j. ci je v hraniciach chyb) - OK/NOK +#if IPERLST || IPERLST_SPECIAL + sb.Append(";"); sb.Append(mtrRslt.WaterMeter.Q2Correction.ToString("F1")); /// iPerl Q2 correction factor used during the test / AN value - hodnota z analogoveho prevodnika +#else + sb.Append(";"); sb.Append(" "); /// nechat prazdne +#endif + sb.Append(";"); sb.Append(volumeMtr.VolumeStart); /// WM Volume_start - pri datastreamovych hodnotach (alebo kamera) + sb.Append(";"); sb.Append(volumeMtr.TimestampStart); /// WM Time_start - ' ' - + sb.Append(";"); sb.Append(volumeMtr.VolumeEnd); /// WM Volume_end - ' ' - + sb.Append(";"); sb.Append(volumeMtr.TimestampEnd); /// WM Time_end - ' ' - + } + + if (energyMtr != null) + { + sb.Append(";"); sb.Append(ProcessData.BatchRslts.WaterMeters[i].SerialNr); /// WM Ser.No. + sb.Append(";"); sb.Append(energyMtr.VolumeStart); /// WM Vstart - pociatocny stav pri pevnom starte alebo zachyteny pri data streame + sb.Append(";"); sb.Append(energyMtr.VolumeEnd); /// WM Vend - konecny stav pri pevnom starte alebo zachyteny pri data streame + sb.Append(";"); sb.Append(energyMtr.VolumeMeter); /// WM Vmer - objem namerany vodomerom + sb.Append(";"); sb.Append(energyMtr.VolumeRef); /// WM Vref - objem namerany stanicou + sb.Append(";"); sb.Append(energyMtr.Error); /// WM Emt - chyba vodomerom nameraneho objemu +#if IPERLST || IPERLST_SPECIAL + sb.Append(";"); sb.Append(ProcessData.BatchRslts.WaterMeters[i].CalibFactor); /// iPerl calibration factor used during the test / ... +#else + sb.Append(";"); sb.Append(" "); /// nechat prazdne +#endif + sb.Append(";"); sb.Append(energyMtr.PulsesMeter); /// WM Np met - pocet impulzov zo skusaneho meradla + sb.Append(";"); sb.Append(energyMtr.PulsesMaster); /// WM Np elm - pocet impulzov etalonu pocas merania pre prislusny vodomer + sb.Append(";"); sb.Append(energyMtr.TestTime); /// WM Tmet - cas merania (obmedzany pri synchro skuske) + sb.Append(";"); sb.Append(energyMtr.Passed ? "OK" : "NOK"); /// WM Vysledok (t.j. ci je v hraniciach chyb) - OK/NOK +#if IPERLST || IPERLST_SPECIAL + sb.Append(";"); sb.Append(mtrRslt.WaterMeter.Q2Correction.ToString("F1")); /// iPerl Q2 correction factor used during the test / AN value - hodnota z analogoveho prevodnika +#else + sb.Append(";"); sb.Append(" "); /// nechat prazdne +#endif + sb.Append(";"); sb.Append(energyMtr.VolumeStart); /// WM Volume_start - pri datastreamovych hodnotach (alebo kamera) + sb.Append(";"); sb.Append(energyMtr.TimestampStart); /// WM Time_start - ' ' - + sb.Append(";"); sb.Append(energyMtr.VolumeEnd); /// WM Volume_end - ' ' - + sb.Append(";"); sb.Append(energyMtr.TimestampEnd); /// WM Time_end - ' ' - + } + } } } sb.Append(";"); diff --git a/TestBenchFramework/BenchControl/Sequences/Statistics.cs b/TestBenchFramework/BenchControl/Sequences/Statistics.cs index 1a2214fbb..9ae611858 100644 --- a/TestBenchFramework/BenchControl/Sequences/Statistics.cs +++ b/TestBenchFramework/BenchControl/Sequences/Statistics.cs @@ -32,8 +32,8 @@ namespace TBF.BenchControl.Sequences public void Clear() { sum = 0; - min = float.MaxValue; - max = float.MinValue; + min = double.MaxValue; + max = double.MinValue; first = 0; last = 0; count = 0; diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs index 9dbda39da..b3475a056 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs @@ -738,6 +738,17 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection /// 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; diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs index 286a1e43f..ce75b9bad 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs @@ -259,6 +259,10 @@ namespace TBF.BenchControl.TestMethods.FlyingStart .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) @@ -298,6 +302,10 @@ namespace TBF.BenchControl.TestMethods.FlyingStart .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) @@ -453,6 +461,17 @@ namespace TBF.BenchControl.TestMethods.FlyingStart /// 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; diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs index 67338fad7..c5a6766a9 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs @@ -364,7 +364,15 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection /// /// Make sure tank emptying completed /// - switch (EmptyTheTank(outPath.EmptyTankValve, outPath.Balance)) + IList extraOps = new List(); + 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; diff --git a/TestBenchFramework/Properties/AssemblyInfo.cs b/TestBenchFramework/Properties/AssemblyInfo.cs index 8dfc78df7..32f7c702b 100644 --- a/TestBenchFramework/Properties/AssemblyInfo.cs +++ b/TestBenchFramework/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.10.361.1")] -[assembly: AssemblyFileVersion("2.10.361.1")] +[assembly: AssemblyVersion("2.10.362.1")] +[assembly: AssemblyFileVersion("2.10.362.1")]