diff --git a/TBF/BenchControl/Dummy/Balance/Component.cs b/TBF/BenchControl/Dummy/Balance/Component.cs index e883279c6..4aaa38379 100644 --- a/TBF/BenchControl/Dummy/Balance/Component.cs +++ b/TBF/BenchControl/Dummy/Balance/Component.cs @@ -31,7 +31,7 @@ namespace TBF.BenchControl.Dummy.Balance public double Capacity { get { return 10000.0; } } public IValve DrainValve { get { return null; } } public IValve DrainValve2 { get { return null; } } - public bool IsEmpty(double mass) { return true; } + public bool ContainsMoreThen(float thld) { return (thld == 0); } public bool IsEmpty() { return true; } public string Format { get { return "F3"; } } public int EmptyTimeSec { get { return 5; } } diff --git a/TBF/BenchControl/GenericDevices/IScaleOrTank.cs b/TBF/BenchControl/GenericDevices/IScaleOrTank.cs index af178eb14..6464a7a1e 100644 --- a/TBF/BenchControl/GenericDevices/IScaleOrTank.cs +++ b/TBF/BenchControl/GenericDevices/IScaleOrTank.cs @@ -29,10 +29,15 @@ namespace TBF.BenchControl.GenericDevices IValve DrainValve2 { get; } /// - /// Returns true if tank s empty, the last measured mass is less then some threshold + /// Returns true if tank is empty, the last measured mass is less then some threshold /// bool IsEmpty(); + /// + /// Returns true if tank contains more then 'thld' kg or l of water + /// + bool ContainsMoreThen(float thld); + /// /// Format string to be used as ToString() argument (e.g. "F3" to obtain resolution 1g) /// diff --git a/TBF/BenchControl/GenericDevices/ITankDraining.cs b/TBF/BenchControl/GenericDevices/ITankDraining.cs index 94ba57f89..e6c48506a 100644 --- a/TBF/BenchControl/GenericDevices/ITankDraining.cs +++ b/TBF/BenchControl/GenericDevices/ITankDraining.cs @@ -12,5 +12,6 @@ namespace TBF.BenchControl.GenericDevices { IValve DrainValve { get; } bool IsEmpty(); + bool ContainsMoreThen(float thld); } } diff --git a/TBF/BenchControl/MettlerToledo/Multi/BalanceDev.cs b/TBF/BenchControl/MettlerToledo/Multi/BalanceDev.cs index a6656730e..d78a7e144 100644 --- a/TBF/BenchControl/MettlerToledo/Multi/BalanceDev.cs +++ b/TBF/BenchControl/MettlerToledo/Multi/BalanceDev.cs @@ -124,11 +124,16 @@ namespace TBF.BenchControl.MettlerToledo.Multi log.FatalFormat("Successfully initialized device {0}", ToString()); } - public bool IsEmpty() + public override bool IsEmpty() { return (Mass <= balanceCfg.Empty); } + public override bool ContainsMoreThen(float thld) + { + return (Mass >= thld); + } + /// /// Get a stable mass measurement /// diff --git a/TBF/BenchControl/MettlerToledo/Standard/BalanceDev.cs b/TBF/BenchControl/MettlerToledo/Standard/BalanceDev.cs index e5acb0f4a..8183f0e7e 100644 --- a/TBF/BenchControl/MettlerToledo/Standard/BalanceDev.cs +++ b/TBF/BenchControl/MettlerToledo/Standard/BalanceDev.cs @@ -128,6 +128,11 @@ namespace TBF.BenchControl.MettlerToledo.Standard return DrainValve.State ? (mass <= balanceCfg.Empty) : (mass <= balanceCfg.EmptyUp); } + public override bool ContainsMoreThen(float thld) + { + return (mass >= thld); + } + public void ZeroWhenStable() { if (balanceCfg.DebugLevel == DebugMode.Simulate) return; diff --git a/TBF/BenchControl/MettlerToledo/TankDraining.cs b/TBF/BenchControl/MettlerToledo/TankDraining.cs index 9b7eb4b29..c87e5c5f2 100644 --- a/TBF/BenchControl/MettlerToledo/TankDraining.cs +++ b/TBF/BenchControl/MettlerToledo/TankDraining.cs @@ -1,5 +1,5 @@ /// -/// Copyright (c) 2017 Sensus Metering Systems +/// Copyright (c) 2017-2018 Sensus Metering Systems /// using System; using System.Collections.Generic; @@ -29,13 +29,18 @@ namespace TBF.BenchControl.MettlerToledo readonly GenericDevices.ITankDrainingCfg tankDrainingCfg; - private IValve drainValve; + bool hasDrainValve { get { return !string.IsNullOrEmpty(tankDrainingCfg.DrainValve); } } /// Available in UI (unlike 'drainValve') + + IValve drainValve; public GenericDevices.IValve DrainValve { get { return drainValve; } } - private IOperation openTheDrainValveOp; - private IOperation closeTheDrainValveOp; - private IOperation waitTankEmptyOp; - + IOperation openTheDrainValveOp; + IOperation closeTheDrainValveOp; + IOperation waitTankIsEmptyOp; + IOperation waitTankContainsMoreThenThld1Op; + IOperation waitTankContainsMoreThenThld2Op; + IOperation waitTankContainsMoreThenThld3Op; + IOperation waitTankContainsMoreThenThld4Op; DrainState drainState; @@ -45,8 +50,12 @@ namespace TBF.BenchControl.MettlerToledo { openTheDrainValveOp = null; closeTheDrainValveOp = null; - waitTankEmptyOp = null; - } + waitTankIsEmptyOp = null; + waitTankContainsMoreThenThld1Op = null; + waitTankContainsMoreThenThld2Op = null; + waitTankContainsMoreThenThld3Op = null; + waitTankContainsMoreThenThld4Op = null; + } public TankDraining(Generic.IComponentCfg cfg) : base(cfg) @@ -56,8 +65,12 @@ namespace TBF.BenchControl.MettlerToledo openTheDrainValveOp = null; closeTheDrainValveOp = null; - waitTankEmptyOp = null; - } + waitTankIsEmptyOp = null; + waitTankContainsMoreThenThld1Op = null; + waitTankContainsMoreThenThld2Op = null; + waitTankContainsMoreThenThld3Op = null; + waitTankContainsMoreThenThld4Op = null; + } protected void Initalize() { @@ -65,8 +78,17 @@ namespace TBF.BenchControl.MettlerToledo openTheDrainValveOp = new Elde.SetValvesOp(StateMachine.ControlBoard, drainValve, null); closeTheDrainValveOp = new Elde.SetValvesOp(StateMachine.ControlBoard, null, drainValve); - waitTankEmptyOp = new WaitTankEmptyOp(this); - } + waitTankIsEmptyOp = new WaitTankEmptyOp(this); + + Various.TankWithLevelMsrmnt.TankCfg tankCfg = tankDrainingCfg as Various.TankWithLevelMsrmnt.TankCfg; + if (tankCfg != null) + { + waitTankContainsMoreThenThld1Op = new WaitTankContainsMoreThenOp(this, tankCfg.ThldLevel1); + waitTankContainsMoreThenThld2Op = new WaitTankContainsMoreThenOp(this, tankCfg.ThldLevel2); + waitTankContainsMoreThenThld3Op = new WaitTankContainsMoreThenOp(this, tankCfg.ThldLevel3); + waitTankContainsMoreThenThld4Op = new WaitTankContainsMoreThenOp(this, tankCfg.ThldLevel4); + } + } protected void RunBefore() { @@ -112,33 +134,65 @@ namespace TBF.BenchControl.MettlerToledo public virtual string GetName() { return string.Empty; } public virtual bool IsEmpty() { return false; } + public virtual bool ContainsMoreThen(float thld) { return thld == 0; } - - public int ConditionsCount { get { return 3; } } + public int ConditionsCount + { + get { return hasDrainValve ? 3 : ((tankDrainingCfg is Various.TankWithLevelMsrmnt.TankCfg) ? 4 : 0); } + } /// Strings are added to the combo-box for transition sequence condition selection public string ConditionName(int i) { - switch (i) - { - case 0: return string.Format(Strings._0_open_the_drain_valve, Name); - case 1: return string.Format(Strings._0_close_the_drain_valve, Name); - case 2: return string.Format(Strings._0_wait_until_the_tank_is_empty, Name); - default: return string.Empty; - } + if (hasDrainValve) + { + switch (i) + { + case 0: return string.Format(Strings._0_open_the_drain_valve, Name); + case 1: return string.Format(Strings._0_close_the_drain_valve, Name); + case 2: return string.Format(Strings._0_wait_until_the_tank_is_empty, Name); + } + } + else if (tankDrainingCfg is Various.TankWithLevelMsrmnt.TankCfg) + { + var tankCfg = tankDrainingCfg as Various.TankWithLevelMsrmnt.TankCfg; + switch (i) + { + case 0: return string.Format(Strings._0_wait_until_tank_contains_more_then_1_l, Name, tankCfg.ThldLevel1); + case 1: return string.Format(Strings._0_wait_until_tank_contains_more_then_1_l, Name, tankCfg.ThldLevel2); + case 2: return string.Format(Strings._0_wait_until_tank_contains_more_then_1_l, Name, tankCfg.ThldLevel3); + case 3: return string.Format(Strings._0_wait_until_tank_contains_more_then_1_l, Name, tankCfg.ThldLevel4); + } + } + + return string.Empty; // Default } /// Operation to be executed as a part of a transition sequence public IOperation ConditionOp(int i) { - switch (i) - { - case 0: return openTheDrainValveOp; - case 1: return closeTheDrainValveOp; - case 2: return waitTankEmptyOp; - default: return null; - } + if (hasDrainValve) + { + switch (i) + { + case 0: return openTheDrainValveOp; + case 1: return closeTheDrainValveOp; + case 2: return waitTankIsEmptyOp; + } + } + else if (tankDrainingCfg is Various.TankWithLevelMsrmnt.TankCfg) + { + switch (i) + { + case 0: return waitTankContainsMoreThenThld1Op; + case 1: return waitTankContainsMoreThenThld2Op; + case 2: return waitTankContainsMoreThenThld3Op; + case 3: return waitTankContainsMoreThenThld4Op; + } + } + + return null; /// Default } } } diff --git a/TBF/BenchControl/MettlerToledo/WaitTankContainsMoreThenOp.cs b/TBF/BenchControl/MettlerToledo/WaitTankContainsMoreThenOp.cs new file mode 100644 index 000000000..760250495 --- /dev/null +++ b/TBF/BenchControl/MettlerToledo/WaitTankContainsMoreThenOp.cs @@ -0,0 +1,51 @@ +/// +/// Copyright (c) 2018 Sensus Metering Systems +/// +using log4net; + +namespace TBF.BenchControl.MettlerToledo +{ + public class WaitTankContainsMoreThenOp : IOperation + { + private static readonly ILog log = LogManager.GetLogger(typeof(WaitTankContainsMoreThenOp)); + public override string ToString() { return string.Format("WaitTankFullOp()"); } + + readonly GenericDevices.ITankDraining tankDraining; + float threshodLevel; + bool conditionMet; + + /// + /// Events: ConditionMet, ConditionNotMet + /// + /// Tank draining (Balance device) instance + public WaitTankContainsMoreThenOp(GenericDevices.ITankDraining tankDraining, float thresholdLevel) + { + this.tankDraining = tankDraining; + this.threshodLevel = thresholdLevel; + log.Debug(this.ToString()); + } + + /// Start this operation + public void Start() + { + conditionMet = tankDraining.ContainsMoreThen(threshodLevel); + } + + /// Run this operation + /// + /// Event.ConditionMet . . . tank is empty + /// Event.ConditionNotMet . tank is not empty + /// + public Event Run() + { + conditionMet = conditionMet || tankDraining.ContainsMoreThen(threshodLevel); + + return conditionMet ? Event.ConditionMet : Event.ConditionNotMet; + } + + /// Stop this operation + public void Stop() + { + } + } +} diff --git a/TBF/BenchControl/Various/TankWithLevelMsrmnt/Tank.cs b/TBF/BenchControl/Various/TankWithLevelMsrmnt/Tank.cs index c322ce023..70259cf70 100644 --- a/TBF/BenchControl/Various/TankWithLevelMsrmnt/Tank.cs +++ b/TBF/BenchControl/Various/TankWithLevelMsrmnt/Tank.cs @@ -127,6 +127,11 @@ namespace TBF.BenchControl.Various.TankWithLevelMsrmnt return false; } + public override bool ContainsMoreThen(float thld) + { + return (Volume >= thld); + } + /// /// Loads a calibration table in CSV format (column1 = height[mm], column2 = volume[l]). /// diff --git a/TBF/BenchControl/Various/TankWithLevelMsrmnt/TankCfg.cs b/TBF/BenchControl/Various/TankWithLevelMsrmnt/TankCfg.cs index 3666092b9..380594508 100644 --- a/TBF/BenchControl/Various/TankWithLevelMsrmnt/TankCfg.cs +++ b/TBF/BenchControl/Various/TankWithLevelMsrmnt/TankCfg.cs @@ -34,7 +34,11 @@ namespace TBF.BenchControl.Various.TankWithLevelMsrmnt public string DrainValve2; public string LevelMeasurement; /// Name of a level measurement component, 'Various.ManualLevelMsrmnt' is used when left empty. - public string CalibrationTable; /// Path name of a calibration table in CSV format (column1 = height[mm], column2 = volume[l]) + public float ThldLevel1; /// Threshold level 1 (used by WaitTankContainsMoreThenOp) in l or kg + public float ThldLevel2; /// Threshold level 2 - ' ' - + public float ThldLevel3; /// Threshold level 3 - ' ' - + public float ThldLevel4; /// Threshold level 4 - ' ' - + public string CalibrationTable; /// Path name of a calibration table in CSV format (column1 = height[mm], column2 = volume[l]) /// Volume calculation using formulas for std. tanks in Level2Volume() is used when left empty. /// Private parameterless constructor invoked by all other (public) constructors diff --git a/TBF/BenchControl/Various/TankWithLevelMsrmnt/TankCfgCtrl.cs b/TBF/BenchControl/Various/TankWithLevelMsrmnt/TankCfgCtrl.cs index 5e6892d83..b134f5175 100644 --- a/TBF/BenchControl/Various/TankWithLevelMsrmnt/TankCfgCtrl.cs +++ b/TBF/BenchControl/Various/TankWithLevelMsrmnt/TankCfgCtrl.cs @@ -81,7 +81,11 @@ namespace TBF.BenchControl.Various.TankWithLevelMsrmnt drainValve2ComboBox.Text = string.IsNullOrEmpty(config.DrainValve2) ? "---" : config.DrainValve2; drainTimeTextBox.Text = config.DrainTimeSec.ToString(); levelMeasurementComboBox.Text = string.IsNullOrEmpty(config.LevelMeasurement) ? "---" : config.LevelMeasurement; - calibrationTableTextBox.Text = config.CalibrationTable; + thresholdLevel1TextBox.Text = config.ThldLevel1.ToString(); + thresholdLevel2TextBox.Text = config.ThldLevel2.ToString(); + thresholdLevel3TextBox.Text = config.ThldLevel3.ToString(); + thresholdLevel4TextBox.Text = config.ThldLevel4.ToString(); + calibrationTableTextBox.Text = config.CalibrationTable; } public void Unlock() @@ -93,7 +97,11 @@ namespace TBF.BenchControl.Various.TankWithLevelMsrmnt drainValve2ComboBox.Enabled = true; drainTimeTextBox.Enabled = true; levelMeasurementComboBox.Enabled = true; - calibrationTableTextBox.Enabled = true; + thresholdLevel1TextBox.Enabled = true; + thresholdLevel2TextBox.Enabled = true; + thresholdLevel3TextBox.Enabled = true; + thresholdLevel4TextBox.Enabled = true; + calibrationTableTextBox.Enabled = true; } public CfgUpdateFlags VerifyCfg(ref string message) @@ -101,13 +109,13 @@ namespace TBF.BenchControl.Various.TankWithLevelMsrmnt CfgUpdateFlags flags = CfgUpdateFlags.None; int dummy; - float mass; - if (!Utils.TryParseUFloat(capacityTextBox.Text, out mass) || mass <= 0) + float ftmp; + if (!Utils.TryParseUFloat(capacityTextBox.Text, out ftmp) || ftmp <= 0) { flags |= CfgUpdateFlags.Error; message += Environment.NewLine + "'Tank Capacity' is not valid"; } - if (!Utils.TryParseUFloat(emptyTextBox.Text, out mass) || mass <= 0) + if (!Utils.TryParseUFloat(emptyTextBox.Text, out ftmp) || ftmp <= 0) { flags |= CfgUpdateFlags.Error; message += Environment.NewLine + "'Tank Empty' is not valid"; @@ -132,6 +140,26 @@ namespace TBF.BenchControl.Various.TankWithLevelMsrmnt flags |= CfgUpdateFlags.Error; message += Environment.NewLine + string.Format(Strings.Invalid_0, levelMeasurementLabel.Text); } + if (!Utils.TryParseUFloat(thresholdLevel1TextBox.Text, out ftmp) || ftmp <= 0) + { + flags |= CfgUpdateFlags.Error; + message += Environment.NewLine + "'Threshold level 1' is not valid"; + } + if (!Utils.TryParseUFloat(thresholdLevel2TextBox.Text, out ftmp) || ftmp <= 0) + { + flags |= CfgUpdateFlags.Error; + message += Environment.NewLine + "'Threshold level 2' is not valid"; + } + if (!Utils.TryParseUFloat(thresholdLevel3TextBox.Text, out ftmp) || ftmp <= 0) + { + flags |= CfgUpdateFlags.Error; + message += Environment.NewLine + "'Threshold level 3' is not valid"; + } + if (!Utils.TryParseUFloat(thresholdLevel4TextBox.Text, out ftmp) || ftmp <= 0) + { + flags |= CfgUpdateFlags.Error; + message += Environment.NewLine + "'Threshold level 4' is not valid"; + } return flags; } @@ -149,7 +177,11 @@ namespace TBF.BenchControl.Various.TankWithLevelMsrmnt config.DrainValve = drainValveComboBox.Text.Equals("---") ? string.Empty : drainValveComboBox.Text; config.DrainValve2 = drainValve2ComboBox.Text.Equals("---") ? string.Empty : drainValve2ComboBox.Text; config.LevelMeasurement = levelMeasurementComboBox.Text.Equals("---") ? string.Empty : levelMeasurementComboBox.Text; - config.CalibrationTable = calibrationTableTextBox.Text; + config.ThldLevel1 = Utils.ParseUFloat(thresholdLevel1TextBox.Text); + config.ThldLevel2 = Utils.ParseUFloat(thresholdLevel2TextBox.Text); + config.ThldLevel3 = Utils.ParseUFloat(thresholdLevel3TextBox.Text); + config.ThldLevel4 = Utils.ParseUFloat(thresholdLevel4TextBox.Text); + config.CalibrationTable = calibrationTableTextBox.Text; return flags; } diff --git a/TBF/BenchControl/Various/TankWithLevelMsrmnt/TankCfgCtrl.designer.cs b/TBF/BenchControl/Various/TankWithLevelMsrmnt/TankCfgCtrl.designer.cs index 3545c6ac6..f9b0592d7 100644 --- a/TBF/BenchControl/Various/TankWithLevelMsrmnt/TankCfgCtrl.designer.cs +++ b/TBF/BenchControl/Various/TankWithLevelMsrmnt/TankCfgCtrl.designer.cs @@ -31,232 +31,294 @@ namespace TBF.BenchControl.Various.TankWithLevelMsrmnt /// private void InitializeComponent() { - this.nameTextBox = new System.Windows.Forms.TextBox(); - this.nameLabel = new System.Windows.Forms.Label(); - this.classNameLabel = new System.Windows.Forms.Label(); - this.capacityLabel = new System.Windows.Forms.Label(); - this.capacityTextBox = new System.Windows.Forms.TextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.emptyTextBox = new System.Windows.Forms.TextBox(); - this.emptyLabel = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.drainTimeTextBox = new System.Windows.Forms.TextBox(); - this.label5 = new System.Windows.Forms.Label(); - this.drainValveComboBox = new System.Windows.Forms.ComboBox(); - this.drainValveLabel = new System.Windows.Forms.Label(); - this.levelMeasurementComboBox = new System.Windows.Forms.ComboBox(); - this.levelMeasurementLabel = new System.Windows.Forms.Label(); - this.calibrationTableTextBox = new System.Windows.Forms.TextBox(); - this.calibrationTableLabel = new System.Windows.Forms.Label(); - this.drainValve2ComboBox = new System.Windows.Forms.ComboBox(); - this.drainValve2Label = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // nameTextBox - // - this.nameTextBox.Enabled = false; - this.nameTextBox.Location = new System.Drawing.Point(127, 31); - this.nameTextBox.Name = "nameTextBox"; - this.nameTextBox.Size = new System.Drawing.Size(142, 20); - this.nameTextBox.TabIndex = 2; - // - // nameLabel - // - this.nameLabel.AutoSize = true; - this.nameLabel.Location = new System.Drawing.Point(16, 34); - this.nameLabel.Name = "nameLabel"; - this.nameLabel.Size = new System.Drawing.Size(35, 13); - this.nameLabel.TabIndex = 1; - this.nameLabel.Text = "Name"; - // - // classNameLabel - // - this.classNameLabel.AutoSize = true; - this.classNameLabel.Location = new System.Drawing.Point(124, 12); - this.classNameLabel.Name = "classNameLabel"; - this.classNameLabel.Size = new System.Drawing.Size(89, 13); - this.classNameLabel.TabIndex = 0; - this.classNameLabel.Text = "ComponentName"; - // - // capacityLabel - // - this.capacityLabel.AutoSize = true; - this.capacityLabel.Location = new System.Drawing.Point(16, 63); - this.capacityLabel.Name = "capacityLabel"; - this.capacityLabel.Size = new System.Drawing.Size(75, 13); - this.capacityLabel.TabIndex = 5; - this.capacityLabel.Text = "Tank capacity"; - // - // capacityTextBox - // - this.capacityTextBox.Enabled = false; - this.capacityTextBox.Location = new System.Drawing.Point(127, 60); - this.capacityTextBox.Name = "capacityTextBox"; - this.capacityTextBox.Size = new System.Drawing.Size(43, 20); - this.capacityTextBox.TabIndex = 6; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(173, 63); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(23, 13); - this.label2.TabIndex = 7; - this.label2.Text = "liter"; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(173, 85); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(23, 13); - this.label3.TabIndex = 10; - this.label3.Text = "liter"; - // - // emptyTextBox - // - this.emptyTextBox.Enabled = false; - this.emptyTextBox.Location = new System.Drawing.Point(127, 82); - this.emptyTextBox.Name = "emptyTextBox"; - this.emptyTextBox.Size = new System.Drawing.Size(43, 20); - this.emptyTextBox.TabIndex = 9; - // - // emptyLabel - // - this.emptyLabel.AutoSize = true; - this.emptyLabel.Location = new System.Drawing.Point(16, 85); - this.emptyLabel.Name = "emptyLabel"; - this.emptyLabel.Size = new System.Drawing.Size(109, 13); - this.emptyLabel.TabIndex = 8; - this.emptyLabel.Text = "Tank empty threshold"; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(176, 153); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(24, 13); - this.label4.TabIndex = 17; - this.label4.Text = "sec"; - // - // drainTimeTextBox - // - this.drainTimeTextBox.Enabled = false; - this.drainTimeTextBox.Location = new System.Drawing.Point(127, 150); - this.drainTimeTextBox.Name = "drainTimeTextBox"; - this.drainTimeTextBox.Size = new System.Drawing.Size(43, 20); - this.drainTimeTextBox.TabIndex = 16; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(16, 153); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(54, 13); - this.label5.TabIndex = 15; - this.label5.Text = "Drain time"; - // - // drainValveComboBox - // - this.drainValveComboBox.Enabled = false; - this.drainValveComboBox.FormattingEnabled = true; - this.drainValveComboBox.Location = new System.Drawing.Point(127, 104); - this.drainValveComboBox.Name = "drainValveComboBox"; - this.drainValveComboBox.Size = new System.Drawing.Size(143, 21); - this.drainValveComboBox.TabIndex = 14; - // - // drainValveLabel - // - this.drainValveLabel.AutoSize = true; - this.drainValveLabel.Location = new System.Drawing.Point(16, 107); - this.drainValveLabel.Name = "drainValveLabel"; - this.drainValveLabel.Size = new System.Drawing.Size(61, 13); - this.drainValveLabel.TabIndex = 13; - this.drainValveLabel.Text = "Drain valve"; - // - // levelMeasurementComboBox - // - this.levelMeasurementComboBox.Enabled = false; - this.levelMeasurementComboBox.FormattingEnabled = true; - this.levelMeasurementComboBox.Location = new System.Drawing.Point(127, 180); - this.levelMeasurementComboBox.Name = "levelMeasurementComboBox"; - this.levelMeasurementComboBox.Size = new System.Drawing.Size(143, 21); - this.levelMeasurementComboBox.TabIndex = 32; - // - // levelMeasurementLabel - // - this.levelMeasurementLabel.AutoSize = true; - this.levelMeasurementLabel.Location = new System.Drawing.Point(16, 183); - this.levelMeasurementLabel.Name = "levelMeasurementLabel"; - this.levelMeasurementLabel.Size = new System.Drawing.Size(99, 13); - this.levelMeasurementLabel.TabIndex = 31; - this.levelMeasurementLabel.Text = "Level measurement"; - // - // calibrationTableTextBox - // - this.calibrationTableTextBox.Enabled = false; - this.calibrationTableTextBox.Location = new System.Drawing.Point(127, 210); - this.calibrationTableTextBox.Name = "calibrationTableTextBox"; - this.calibrationTableTextBox.Size = new System.Drawing.Size(244, 20); - this.calibrationTableTextBox.TabIndex = 34; - // - // calibrationTableLabel - // - this.calibrationTableLabel.AutoSize = true; - this.calibrationTableLabel.Location = new System.Drawing.Point(16, 213); - this.calibrationTableLabel.Name = "calibrationTableLabel"; - this.calibrationTableLabel.Size = new System.Drawing.Size(82, 13); - this.calibrationTableLabel.TabIndex = 33; - this.calibrationTableLabel.Text = "Calibration table"; - // - // drainValve2ComboBox - // - this.drainValve2ComboBox.Enabled = false; - this.drainValve2ComboBox.FormattingEnabled = true; - this.drainValve2ComboBox.Location = new System.Drawing.Point(127, 127); - this.drainValve2ComboBox.Name = "drainValve2ComboBox"; - this.drainValve2ComboBox.Size = new System.Drawing.Size(143, 21); - this.drainValve2ComboBox.TabIndex = 36; - // - // drainValve2Label - // - this.drainValve2Label.AutoSize = true; - this.drainValve2Label.Location = new System.Drawing.Point(16, 130); - this.drainValve2Label.Name = "drainValve2Label"; - this.drainValve2Label.Size = new System.Drawing.Size(70, 13); - this.drainValve2Label.TabIndex = 35; - this.drainValve2Label.Text = "Drain valve 2"; - // - // TankCfgCtrl - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.drainValve2ComboBox); - this.Controls.Add(this.drainValve2Label); - this.Controls.Add(this.calibrationTableTextBox); - this.Controls.Add(this.calibrationTableLabel); - this.Controls.Add(this.levelMeasurementComboBox); - this.Controls.Add(this.levelMeasurementLabel); - this.Controls.Add(this.drainValveComboBox); - this.Controls.Add(this.drainValveLabel); - this.Controls.Add(this.label4); - this.Controls.Add(this.drainTimeTextBox); - this.Controls.Add(this.label5); - this.Controls.Add(this.label3); - this.Controls.Add(this.emptyTextBox); - this.Controls.Add(this.emptyLabel); - this.Controls.Add(this.label2); - this.Controls.Add(this.capacityTextBox); - this.Controls.Add(this.capacityLabel); - this.Controls.Add(this.nameTextBox); - this.Controls.Add(this.nameLabel); - this.Controls.Add(this.classNameLabel); - this.Name = "TankCfgCtrl"; - this.Size = new System.Drawing.Size(415, 250); - this.Load += new System.EventHandler(this.BalanceCfgCtrl_Load); - this.ResumeLayout(false); - this.PerformLayout(); + this.nameTextBox = new System.Windows.Forms.TextBox(); + this.nameLabel = new System.Windows.Forms.Label(); + this.classNameLabel = new System.Windows.Forms.Label(); + this.capacityLabel = new System.Windows.Forms.Label(); + this.capacityTextBox = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.emptyTextBox = new System.Windows.Forms.TextBox(); + this.emptyLabel = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.drainTimeTextBox = new System.Windows.Forms.TextBox(); + this.label5 = new System.Windows.Forms.Label(); + this.drainValveComboBox = new System.Windows.Forms.ComboBox(); + this.drainValveLabel = new System.Windows.Forms.Label(); + this.levelMeasurementComboBox = new System.Windows.Forms.ComboBox(); + this.levelMeasurementLabel = new System.Windows.Forms.Label(); + this.calibrationTableTextBox = new System.Windows.Forms.TextBox(); + this.calibrationTableLabel = new System.Windows.Forms.Label(); + this.drainValve2ComboBox = new System.Windows.Forms.ComboBox(); + this.drainValve2Label = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.thresholdLevel1TextBox = new System.Windows.Forms.TextBox(); + this.thresholdLevelsLabel = new System.Windows.Forms.Label(); + this.thresholdLevel2TextBox = new System.Windows.Forms.TextBox(); + this.thresholdLevel3TextBox = new System.Windows.Forms.TextBox(); + this.thresholdLevel4TextBox = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // nameTextBox + // + this.nameTextBox.Enabled = false; + this.nameTextBox.Location = new System.Drawing.Point(127, 33); + this.nameTextBox.Name = "nameTextBox"; + this.nameTextBox.Size = new System.Drawing.Size(142, 20); + this.nameTextBox.TabIndex = 2; + // + // nameLabel + // + this.nameLabel.AutoSize = true; + this.nameLabel.Location = new System.Drawing.Point(16, 36); + this.nameLabel.Name = "nameLabel"; + this.nameLabel.Size = new System.Drawing.Size(35, 13); + this.nameLabel.TabIndex = 1; + this.nameLabel.Text = "Name"; + // + // classNameLabel + // + this.classNameLabel.AutoSize = true; + this.classNameLabel.Location = new System.Drawing.Point(124, 14); + this.classNameLabel.Name = "classNameLabel"; + this.classNameLabel.Size = new System.Drawing.Size(89, 13); + this.classNameLabel.TabIndex = 0; + this.classNameLabel.Text = "ComponentName"; + // + // capacityLabel + // + this.capacityLabel.AutoSize = true; + this.capacityLabel.Location = new System.Drawing.Point(16, 58); + this.capacityLabel.Name = "capacityLabel"; + this.capacityLabel.Size = new System.Drawing.Size(75, 13); + this.capacityLabel.TabIndex = 3; + this.capacityLabel.Text = "Tank capacity"; + // + // capacityTextBox + // + this.capacityTextBox.Enabled = false; + this.capacityTextBox.Location = new System.Drawing.Point(127, 55); + this.capacityTextBox.Name = "capacityTextBox"; + this.capacityTextBox.Size = new System.Drawing.Size(43, 20); + this.capacityTextBox.TabIndex = 4; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(173, 58); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(23, 13); + this.label2.TabIndex = 5; + this.label2.Text = "liter"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(173, 80); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(23, 13); + this.label3.TabIndex = 8; + this.label3.Text = "liter"; + // + // emptyTextBox + // + this.emptyTextBox.Enabled = false; + this.emptyTextBox.Location = new System.Drawing.Point(127, 77); + this.emptyTextBox.Name = "emptyTextBox"; + this.emptyTextBox.Size = new System.Drawing.Size(43, 20); + this.emptyTextBox.TabIndex = 7; + // + // emptyLabel + // + this.emptyLabel.AutoSize = true; + this.emptyLabel.Location = new System.Drawing.Point(16, 80); + this.emptyLabel.Name = "emptyLabel"; + this.emptyLabel.Size = new System.Drawing.Size(109, 13); + this.emptyLabel.TabIndex = 6; + this.emptyLabel.Text = "Tank empty threshold"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(176, 148); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(24, 13); + this.label4.TabIndex = 15; + this.label4.Text = "sec"; + // + // drainTimeTextBox + // + this.drainTimeTextBox.Enabled = false; + this.drainTimeTextBox.Location = new System.Drawing.Point(127, 145); + this.drainTimeTextBox.Name = "drainTimeTextBox"; + this.drainTimeTextBox.Size = new System.Drawing.Size(43, 20); + this.drainTimeTextBox.TabIndex = 14; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(16, 148); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(54, 13); + this.label5.TabIndex = 13; + this.label5.Text = "Drain time"; + // + // drainValveComboBox + // + this.drainValveComboBox.Enabled = false; + this.drainValveComboBox.FormattingEnabled = true; + this.drainValveComboBox.Location = new System.Drawing.Point(127, 99); + this.drainValveComboBox.Name = "drainValveComboBox"; + this.drainValveComboBox.Size = new System.Drawing.Size(143, 21); + this.drainValveComboBox.TabIndex = 10; + // + // drainValveLabel + // + this.drainValveLabel.AutoSize = true; + this.drainValveLabel.Location = new System.Drawing.Point(16, 102); + this.drainValveLabel.Name = "drainValveLabel"; + this.drainValveLabel.Size = new System.Drawing.Size(61, 13); + this.drainValveLabel.TabIndex = 9; + this.drainValveLabel.Text = "Drain valve"; + // + // levelMeasurementComboBox + // + this.levelMeasurementComboBox.Enabled = false; + this.levelMeasurementComboBox.FormattingEnabled = true; + this.levelMeasurementComboBox.Location = new System.Drawing.Point(127, 167); + this.levelMeasurementComboBox.Name = "levelMeasurementComboBox"; + this.levelMeasurementComboBox.Size = new System.Drawing.Size(143, 21); + this.levelMeasurementComboBox.TabIndex = 17; + // + // levelMeasurementLabel + // + this.levelMeasurementLabel.AutoSize = true; + this.levelMeasurementLabel.Location = new System.Drawing.Point(16, 170); + this.levelMeasurementLabel.Name = "levelMeasurementLabel"; + this.levelMeasurementLabel.Size = new System.Drawing.Size(99, 13); + this.levelMeasurementLabel.TabIndex = 16; + this.levelMeasurementLabel.Text = "Level measurement"; + // + // calibrationTableTextBox + // + this.calibrationTableTextBox.Enabled = false; + this.calibrationTableTextBox.Location = new System.Drawing.Point(127, 212); + this.calibrationTableTextBox.Name = "calibrationTableTextBox"; + this.calibrationTableTextBox.Size = new System.Drawing.Size(244, 20); + this.calibrationTableTextBox.TabIndex = 25; + // + // calibrationTableLabel + // + this.calibrationTableLabel.AutoSize = true; + this.calibrationTableLabel.Location = new System.Drawing.Point(16, 215); + this.calibrationTableLabel.Name = "calibrationTableLabel"; + this.calibrationTableLabel.Size = new System.Drawing.Size(82, 13); + this.calibrationTableLabel.TabIndex = 24; + this.calibrationTableLabel.Text = "Calibration table"; + // + // drainValve2ComboBox + // + this.drainValve2ComboBox.Enabled = false; + this.drainValve2ComboBox.FormattingEnabled = true; + this.drainValve2ComboBox.Location = new System.Drawing.Point(127, 122); + this.drainValve2ComboBox.Name = "drainValve2ComboBox"; + this.drainValve2ComboBox.Size = new System.Drawing.Size(143, 21); + this.drainValve2ComboBox.TabIndex = 12; + // + // drainValve2Label + // + this.drainValve2Label.AutoSize = true; + this.drainValve2Label.Location = new System.Drawing.Point(16, 125); + this.drainValve2Label.Name = "drainValve2Label"; + this.drainValve2Label.Size = new System.Drawing.Size(70, 13); + this.drainValve2Label.TabIndex = 11; + this.drainValve2Label.Text = "Drain valve 2"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(324, 193); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(23, 13); + this.label1.TabIndex = 23; + this.label1.Text = "liter"; + // + // thresholdLevel1TextBox + // + this.thresholdLevel1TextBox.Enabled = false; + this.thresholdLevel1TextBox.Location = new System.Drawing.Point(127, 190); + this.thresholdLevel1TextBox.Name = "thresholdLevel1TextBox"; + this.thresholdLevel1TextBox.Size = new System.Drawing.Size(43, 20); + this.thresholdLevel1TextBox.TabIndex = 19; + // + // thresholdLevelsLabel + // + this.thresholdLevelsLabel.AutoSize = true; + this.thresholdLevelsLabel.Location = new System.Drawing.Point(16, 193); + this.thresholdLevelsLabel.Name = "thresholdLevelsLabel"; + this.thresholdLevelsLabel.Size = new System.Drawing.Size(84, 13); + this.thresholdLevelsLabel.TabIndex = 18; + this.thresholdLevelsLabel.Text = "Threshold levels"; + // + // thresholdLevel2TextBox + // + this.thresholdLevel2TextBox.Enabled = false; + this.thresholdLevel2TextBox.Location = new System.Drawing.Point(177, 190); + this.thresholdLevel2TextBox.Name = "thresholdLevel2TextBox"; + this.thresholdLevel2TextBox.Size = new System.Drawing.Size(43, 20); + this.thresholdLevel2TextBox.TabIndex = 20; + // + // thresholdLevel3TextBox + // + this.thresholdLevel3TextBox.Enabled = false; + this.thresholdLevel3TextBox.Location = new System.Drawing.Point(226, 190); + this.thresholdLevel3TextBox.Name = "thresholdLevel3TextBox"; + this.thresholdLevel3TextBox.Size = new System.Drawing.Size(43, 20); + this.thresholdLevel3TextBox.TabIndex = 21; + // + // thresholdLevel4TextBox + // + this.thresholdLevel4TextBox.Enabled = false; + this.thresholdLevel4TextBox.Location = new System.Drawing.Point(275, 190); + this.thresholdLevel4TextBox.Name = "thresholdLevel4TextBox"; + this.thresholdLevel4TextBox.Size = new System.Drawing.Size(43, 20); + this.thresholdLevel4TextBox.TabIndex = 22; + // + // TankCfgCtrl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.thresholdLevel4TextBox); + this.Controls.Add(this.thresholdLevel3TextBox); + this.Controls.Add(this.thresholdLevel2TextBox); + this.Controls.Add(this.label1); + this.Controls.Add(this.thresholdLevel1TextBox); + this.Controls.Add(this.thresholdLevelsLabel); + this.Controls.Add(this.drainValve2ComboBox); + this.Controls.Add(this.drainValve2Label); + this.Controls.Add(this.calibrationTableTextBox); + this.Controls.Add(this.calibrationTableLabel); + this.Controls.Add(this.levelMeasurementComboBox); + this.Controls.Add(this.levelMeasurementLabel); + this.Controls.Add(this.drainValveComboBox); + this.Controls.Add(this.drainValveLabel); + this.Controls.Add(this.label4); + this.Controls.Add(this.drainTimeTextBox); + this.Controls.Add(this.label5); + this.Controls.Add(this.label3); + this.Controls.Add(this.emptyTextBox); + this.Controls.Add(this.emptyLabel); + this.Controls.Add(this.label2); + this.Controls.Add(this.capacityTextBox); + this.Controls.Add(this.capacityLabel); + this.Controls.Add(this.nameTextBox); + this.Controls.Add(this.nameLabel); + this.Controls.Add(this.classNameLabel); + this.Name = "TankCfgCtrl"; + this.Size = new System.Drawing.Size(415, 250); + this.Load += new System.EventHandler(this.BalanceCfgCtrl_Load); + this.ResumeLayout(false); + this.PerformLayout(); } @@ -282,5 +344,11 @@ namespace TBF.BenchControl.Various.TankWithLevelMsrmnt private System.Windows.Forms.Label calibrationTableLabel; private System.Windows.Forms.ComboBox drainValve2ComboBox; private System.Windows.Forms.Label drainValve2Label; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox thresholdLevel1TextBox; + private System.Windows.Forms.Label thresholdLevelsLabel; + private System.Windows.Forms.TextBox thresholdLevel2TextBox; + private System.Windows.Forms.TextBox thresholdLevel3TextBox; + private System.Windows.Forms.TextBox thresholdLevel4TextBox; } } diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index 97118af7c..f4cc0eee7 100644 --- a/TBF/Properties/AssemblyInfo.cs +++ b/TBF/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.18.1063.0")] -[assembly: AssemblyFileVersion("2.18.1063.0")] +[assembly: AssemblyVersion("2.18.1064.0")] +[assembly: AssemblyFileVersion("2.18.1064.0")] diff --git a/TBF/Resources/Strings.Designer.cs b/TBF/Resources/Strings.Designer.cs index 181c30941..9d249470d 100644 --- a/TBF/Resources/Strings.Designer.cs +++ b/TBF/Resources/Strings.Designer.cs @@ -96,6 +96,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to {0} - wait until the tank contains more then {1} ltr.. + /// + internal static string _0_wait_until_tank_contains_more_then_1_l { + get { + return ResourceManager.GetString("_0_wait_until_tank_contains_more_then_1_l", resourceCulture); + } + } + /// /// Looks up a localized string similar to {0} - wait until the tank is empty. /// diff --git a/TBF/Resources/Strings.resx b/TBF/Resources/Strings.resx index 9485398f2..ea11e8a2b 100644 --- a/TBF/Resources/Strings.resx +++ b/TBF/Resources/Strings.resx @@ -1882,4 +1882,7 @@ Between rep. - transition + + {0} - wait until the tank contains more then {1} ltr. + \ No newline at end of file diff --git a/TBF/TBF.csproj b/TBF/TBF.csproj index 5b53911e4..2e574ad4e 100644 --- a/TBF/TBF.csproj +++ b/TBF/TBF.csproj @@ -599,6 +599,7 @@ + diff --git a/TODO.txt b/TODO.txt index deab60840..07bd21835 100644 --- a/TODO.txt +++ b/TODO.txt @@ -6,6 +6,7 @@ Igor - stabilne meranie hladiny - niekedy neprepne diverter - sekvencia medzi opakovanymi skuskami +- podmienka pre minimalny objem vody vo vezi - testovanie citlivosti vodomera - zivotnostne: menit prietok 15 min.