Drain valve removed from Output path, outPath.Scale.DrainValve used instead of outPath.DrainValve, wait for Event. BalanceDone before 2nd mass measurement in FlyingStartMassCollection, ver. 2.12.519
This commit is contained in:
@@ -20,7 +20,7 @@ namespace Config.Entities
|
||||
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; }
|
||||
|
||||
@@ -19,7 +19,6 @@ namespace TBF.BenchControl
|
||||
public IDiverter Diverter;
|
||||
public ITempMeter TempDiv;
|
||||
public IScale Scale;
|
||||
public IValve DrainValve;
|
||||
public IList<IValve> ValvesOpen;
|
||||
public IList<IValve> 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<IValve>();
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
+1
-1
@@ -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; }
|
||||
|
||||
+2
-2
@@ -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
|
||||
{
|
||||
|
||||
+4
-4
@@ -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");
|
||||
|
||||
+1
-1
@@ -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; }
|
||||
|
||||
@@ -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")]
|
||||
|
||||
+1
-1
@@ -376,7 +376,7 @@ namespace TBF.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Balance.
|
||||
/// Looks up a localized string similar to Scale.
|
||||
/// </summary>
|
||||
internal static string Balance {
|
||||
get {
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
<value>Reg. valve</value>
|
||||
</data>
|
||||
<data name="Balance" xml:space="preserve">
|
||||
<value>Balance</value>
|
||||
<value>Scale</value>
|
||||
</data>
|
||||
<data name="Sensor_" xml:space="preserve">
|
||||
<value>Sensor </value>
|
||||
|
||||
@@ -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("---");
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user