diff --git a/Config/Entities/OutputPath.cs b/Config/Entities/OutputPath.cs index 3aa7c84f8..a55871677 100644 --- a/Config/Entities/OutputPath.cs +++ b/Config/Entities/OutputPath.cs @@ -11,16 +11,16 @@ namespace Config.Entities public virtual int Id { get; protected set; } public virtual int ItemNr { get; set; } public virtual string Name { get; set; } - public virtual float Qfrom { get; set; } /// Water flow in [m3/h] - public virtual float Qto { get; set; } /// Water flow in [m3/h] + public virtual float Qfrom { get; set; } /// Water flow in [m3/h] + public virtual float Qto { get; set; } /// Water flow in [m3/h] public virtual string RegulValve { get; set; } public virtual string FlowMeter { get; set; } - public virtual float PidCoef { get; set; } /// PID coefficient for the regulation path + public virtual float PidCoef { get; set; } /// PID coefficient for the regulation path public virtual string StartValve { get; set; } public virtual string Diverter { get; set; } public virtual string TempDiv { get; set; } public virtual string Scale { get; set; } - public virtual string EmptyTankValve { get; set; } + public virtual string EmptyTankValve { get; set; } /// Not used anywhere /// Valves public virtual string ValvesOpen { get; set; } diff --git a/TestBenchFramework/BenchControl/OutputPath.cs b/TestBenchFramework/BenchControl/OutputPath.cs index 1dfe201aa..1678a75dc 100644 --- a/TestBenchFramework/BenchControl/OutputPath.cs +++ b/TestBenchFramework/BenchControl/OutputPath.cs @@ -19,7 +19,6 @@ namespace TBF.BenchControl public IDiverter Diverter; public ITempMeter TempDiv; public IScale Scale; - public IValve DrainValve; public IList ValvesOpen; public IList ValvesClose; @@ -45,7 +44,6 @@ namespace TBF.BenchControl Diverter = (IDiverter)TbfComponents.FindComponent(entity.Diverter, components); TempDiv = (ITempMeter)TbfComponents.FindComponent(entity.TempDiv, components); Scale = (IScale)TbfComponents.FindComponent(entity.Scale, components); - DrainValve = (IValve)TbfComponents.FindComponent(entity.EmptyTankValve, components); string[] vOpen = entity.ValvesOpen.Split(new char[] { ';' }); ValvesOpen = new List(); diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs index 1c7105099..4082317a1 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs @@ -164,7 +164,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection } // Empty the water tank - switch (DrainTheTank(outPath.DrainValve, outPath.Scale)) + switch (DrainTheTank(outPath.Scale.DrainValve, outPath.Scale)) { case Event.Error: goto error; case Event.UiCmdStop: goto stopTest; diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs index 24f5a1216..03a9d3a2d 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs @@ -93,7 +93,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced /// /// Drain the water tank /// - switch (DrainTheTank(outPath.DrainValve, outPath.Scale)) + switch (DrainTheTank(outPath.Scale.DrainValve, outPath.Scale)) { case Event.Error: { retVal = Event.Error; goto stopTest; } case Event.UiCmdStop: { retVal = Event.UiCmdStop; goto stopTest; } diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs index 75a9ebe92..906842c0b 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs @@ -119,7 +119,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection /// /// Drain the water tank /// - switch (DrainTheTank(outPath.DrainValve, outPath.Scale, heatMetersPromptOp)) + switch (DrainTheTank(outPath.Scale.DrainValve, outPath.Scale, heatMetersPromptOp)) { case Event.Error: { retVal = Event.Error; goto stopTest; } case Event.UiCmdStop: { retVal = Event.UiCmdStop; goto stopTest; } @@ -133,7 +133,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection .AddOperation(outPath.Scale.ReadMassOp(ref Mass)) .AddOperation(heatMetersPromptOp) .AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp()) - .AddOperation(StateMachine.ControlBoard.SetValvesOp(null, outPath.DrainValve)) + .AddOperation(StateMachine.ControlBoard.SetValvesOp(null, outPath.Scale.DrainValve)) .EnterState(); do { diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs index 1317a5f75..a3a63fcc8 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs @@ -161,7 +161,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection if (drainTheTank) { #if BERLIN - switch (DrainTheTank(outPath.DrainValve, outPath.Scale)) + switch (DrainTheTank(outPath.Scale.DrainValve, outPath.Scale)) { case Event.Error: { retVal = Event.Error; goto stopTest; } case Event.UiCmdStop: { retVal = Event.UiCmdStop; goto stopTest; } @@ -171,7 +171,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection #else State.Create("FlyingStartMassCollection : Opening the emptying valve") .AddOperation(checkUiOp) - .AddOperation(StateMachine.ControlBoard.SetValvesOp(outPath.DrainValve, null)) + .AddOperation(StateMachine.ControlBoard.SetValvesOp(outPath.Scale.DrainValve, null)) .EnterState(); do { @@ -416,7 +416,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection extraOps.Add(heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1)); extraOps.Add(heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2)); } - switch (DrainTheTank(outPath.DrainValve, outPath.Scale, extraOps)) + switch (DrainTheTank(outPath.Scale.DrainValve, outPath.Scale, extraOps)) { case Event.Error: { retVal = Event.Error; goto stopTest; } case Event.UiCmdStop: { retVal = Event.UiCmdStop; goto stopTest; } @@ -651,7 +651,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; } } - while (!e.Contains(Event.TimerExpired)); + while (!e.Contains(Event.TimerExpired) || !e.Contains(Event.BalanceDone)); if (heatMetersPath == null) LogProcessHeader(processDataLogger, "End mass"); diff --git a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs index e2ed788ea..f9904ad75 100644 --- a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs @@ -133,7 +133,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration /// /// Empty the water tank /// - switch (DrainTheTank(outPath.DrainValve, outPath.Scale)) + switch (DrainTheTank(outPath.Scale.DrainValve, outPath.Scale)) { case Event.Error: { retVal = Event.Error; goto stopTest; } case Event.UiCmdStop: { retVal = Event.UiCmdStop; goto stopTest; } diff --git a/TestBenchFramework/Properties/AssemblyInfo.cs b/TestBenchFramework/Properties/AssemblyInfo.cs index 059239885..814705fed 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.12.518.1")] -[assembly: AssemblyFileVersion("2.12.518.1")] +[assembly: AssemblyVersion("2.12.519.1")] +[assembly: AssemblyFileVersion("2.12.519.1")] diff --git a/TestBenchFramework/Resources/Strings.Designer.cs b/TestBenchFramework/Resources/Strings.Designer.cs index 3da3ea667..7279f2508 100644 --- a/TestBenchFramework/Resources/Strings.Designer.cs +++ b/TestBenchFramework/Resources/Strings.Designer.cs @@ -376,7 +376,7 @@ namespace TBF.Resources { } /// - /// Looks up a localized string similar to Balance. + /// Looks up a localized string similar to Scale. /// internal static string Balance { get { diff --git a/TestBenchFramework/Resources/Strings.resx b/TestBenchFramework/Resources/Strings.resx index 2219268b3..450d37f1e 100644 --- a/TestBenchFramework/Resources/Strings.resx +++ b/TestBenchFramework/Resources/Strings.resx @@ -199,7 +199,7 @@ Reg. valve - Balance + Scale Sensor diff --git a/TestBenchFramework/UiControls/PathsOutputCtrl.cs b/TestBenchFramework/UiControls/PathsOutputCtrl.cs index 6d4110e22..560355eee 100644 --- a/TestBenchFramework/UiControls/PathsOutputCtrl.cs +++ b/TestBenchFramework/UiControls/PathsOutputCtrl.cs @@ -1,9 +1,7 @@ /// -/// Copyright (c) 2013-2015 Sensus Metering Systems +/// Copyright (c) 2013-2017 Sensus Metering Systems /// -using System.Collections.Generic; using System.Drawing; -using System.Globalization; using System.Windows.Forms; using log4net; using Config.Entities; @@ -32,7 +30,6 @@ namespace TBF.UiControls Div, Tdiv, Scale, - DrainValve, FixedColumnsCount, } readonly int fixedColumnsCount = (int)Column.FixedColumnsCount; @@ -73,7 +70,6 @@ namespace TBF.UiControls Columns.Add(Strings.Diverter, (ls.OutputColumnCount > 7) ? ls.OutputColumnWidths[7] : 60 * parent.Dpi / PathsDlg.Dpi100pct); Columns.Add(Strings.T_div, (ls.OutputColumnCount > 8) ? ls.OutputColumnWidths[8] : 70 * parent.Dpi / PathsDlg.Dpi100pct); Columns.Add(Strings.Balance, (ls.OutputColumnCount > 9) ? ls.OutputColumnWidths[9] : 50 * parent.Dpi / PathsDlg.Dpi100pct); - Columns.Add(Strings.Emptying_valve, (ls.OutputColumnCount > 10)? ls.OutputColumnWidths[10]: 80 * parent.Dpi / PathsDlg.Dpi100pct); int clmn = (int)Column.FixedColumnsCount; foreach (var vlv in parent.Valves) { @@ -89,27 +85,24 @@ namespace TBF.UiControls ComboBox flowMeterComboBox = new ComboBox(); ComboBox startValveComboBox = new ComboBox(); ComboBox diverterComboBox = new ComboBox(); - ComboBox balanceComboBox = new ComboBox(); ComboBox tempMeterDivComboBox = new ComboBox(); - ComboBox emptyValveComboBox = new ComboBox(); + ComboBox scaleComboBox = new ComboBox(); regulValveComboBox.Items.Add("---"); flowMeterComboBox.Items.Add("---"); startValveComboBox.Items.Add("---"); diverterComboBox.Items.Add("---"); - balanceComboBox.Items.Add("---"); - tempMeterDivComboBox.Items.Add("---"); - emptyValveComboBox.Items.Add("---"); + tempMeterDivComboBox.Items.Add("---"); + scaleComboBox.Items.Add("---"); foreach (var cmpnt in parent.TbfComponents) { if (cmpnt is IRegulValve) regulValveComboBox.Items.Add(cmpnt.Cfg.Name); if (cmpnt is IFlowMeter) flowMeterComboBox.Items.Add(cmpnt.Cfg.Name); if (cmpnt is IDiverter) diverterComboBox.Items.Add(cmpnt.Cfg.Name); - if (cmpnt is IScale) balanceComboBox.Items.Add(cmpnt.Cfg.Name); + if (cmpnt is IScale) scaleComboBox.Items.Add(cmpnt.Cfg.Name); if (cmpnt is ITempMeter) tempMeterDivComboBox.Items.Add(cmpnt.Cfg.Name); if (cmpnt is IValve && (cmpnt as IValve).CoupledTo == null) { startValveComboBox.Items.Add(cmpnt.Cfg.Name); - emptyValveComboBox.Items.Add(cmpnt.Cfg.Name); } } @@ -124,8 +117,7 @@ namespace TBF.UiControls editors[(int)Column.StartValve] = startValveComboBox; editors[(int)Column.Div] = diverterComboBox; editors[(int)Column.Tdiv] = tempMeterDivComboBox; - editors[(int)Column.Scale] = balanceComboBox; - editors[(int)Column.DrainValve] = emptyValveComboBox; + editors[(int)Column.Scale] = scaleComboBox; /// Prepare valve combo-boxes (max. 64 valves) for (int i = 0; i < 64; i++) { @@ -208,7 +200,6 @@ namespace TBF.UiControls lvi.SubItems.Add((path.Diverter != null) ? path.Diverter.Cfg.Name : "---"); lvi.SubItems.Add((path.TempDiv != null) ? path.TempDiv.Cfg.Name : "---"); lvi.SubItems.Add((path.Scale != null) ? path.Scale.Cfg.Name : "---"); - lvi.SubItems.Add((path.DrainValve != null) ? path.DrainValve.Cfg.Name : "---"); foreach (var valve in parent.Valves) { @@ -262,7 +253,6 @@ namespace TBF.UiControls entity.Diverter = lvi.SubItems[(int)Column.Div].Text.Equals("---") ? null : lvi.SubItems[(int)Column.Div].Text; entity.TempDiv = lvi.SubItems[(int)Column.Tdiv].Text.Equals("---") ? null : lvi.SubItems[(int)Column.Tdiv].Text; entity.Scale = lvi.SubItems[(int)Column.Scale].Text.Equals("---") ? null : lvi.SubItems[(int)Column.Scale].Text; - entity.EmptyTankValve = lvi.SubItems[(int)Column.DrainValve].Text.Equals("---") ? null : lvi.SubItems[(int)Column.DrainValve].Text; string valvesOpen = string.Empty; string valvesClose = string.Empty;