- FlyingStart with corrections
- FlowMeterCouple -> FlowMeterTwins
This commit is contained in:
@@ -36,8 +36,9 @@ namespace TBF.BenchControl.Elde.FlowMeter
|
|||||||
|
|
||||||
public float LtrPerPulseCorrected(float flow)
|
public float LtrPerPulseCorrected(float flow)
|
||||||
{
|
{
|
||||||
return LtrPerPulse; /// TODO: apply correction
|
//return LtrPerPulse; /// TODO: apply correction
|
||||||
//float corrected = BenchControl.Formulas.CorrectedValue(flow, meterEntity.Corrections);
|
float correctedFlow = BenchControl.Formulas.CorrectedValue(flow, Corrections);
|
||||||
|
return LtrPerPulse * correctedFlow / flow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+14
-4
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||||||
using log4net;
|
using log4net;
|
||||||
using TBF.Boxes;
|
using TBF.Boxes;
|
||||||
|
|
||||||
namespace TBF.BenchControl.Elde.FlowMeterCouple
|
namespace TBF.BenchControl.Elde.FlowMeterTwins
|
||||||
{
|
{
|
||||||
public class FlowMeter : Generic.IComponent, GenericDevices.IFlowMeter
|
public class FlowMeter : Generic.IComponent, GenericDevices.IFlowMeter
|
||||||
{
|
{
|
||||||
@@ -27,16 +27,20 @@ namespace TBF.BenchControl.Elde.FlowMeterCouple
|
|||||||
public IList<Entities.MeasurementCorrection> Corrections { get { return flowMeterCfg.Corrections; } }
|
public IList<Entities.MeasurementCorrection> Corrections { get { return flowMeterCfg.Corrections; } }
|
||||||
|
|
||||||
public readonly ControlBoardDev ControlBoard;
|
public readonly ControlBoardDev ControlBoard;
|
||||||
|
public readonly TBF.BenchControl.Elde.FlowMeter.FlowMeter FlowMeter1;
|
||||||
|
public readonly TBF.BenchControl.Elde.FlowMeter.FlowMeter FlowMeter2;
|
||||||
|
|
||||||
readonly float nominalFlow;
|
readonly float nominalFlow;
|
||||||
public float NominalFlow { get { return nominalFlow; } }
|
public float NominalFlow { get { return nominalFlow; } }
|
||||||
|
|
||||||
public float LtrPerPulse { get { return nominalFlow / 14400.0f; } } /// Assuming the nominal flowed is reached at 4000Hz
|
/// The nominal flowed of a pair of flow meters is reached at 4000Hz
|
||||||
|
public float LtrPerPulse { get { return nominalFlow / 14400.0f; } }
|
||||||
|
|
||||||
|
/// Calculates the average of values of two flowmeters. Assumes the flow is divided evenly.
|
||||||
public float LtrPerPulseCorrected(float flow)
|
public float LtrPerPulseCorrected(float flow)
|
||||||
{
|
{
|
||||||
return LtrPerPulse; /// TODO: apply correction
|
float flow2 = flow / 2;
|
||||||
|
return (FlowMeter1.LtrPerPulseCorrected(flow2) + FlowMeter2.LtrPerPulseCorrected(flow2)) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -48,6 +52,12 @@ namespace TBF.BenchControl.Elde.FlowMeterCouple
|
|||||||
ControlBoard = (ControlBoardDev)TbfComponents.FindComponent(cfg.ParentName, components);
|
ControlBoard = (ControlBoardDev)TbfComponents.FindComponent(cfg.ParentName, components);
|
||||||
if (ControlBoard == null) throw new Exception("Cannot find " + Name + " parent");
|
if (ControlBoard == null) throw new Exception("Cannot find " + Name + " parent");
|
||||||
|
|
||||||
|
FlowMeter1 = (TBF.BenchControl.Elde.FlowMeter.FlowMeter)TbfComponents.FindComponent(flowMeterCfg.FlowMeter1, components);
|
||||||
|
if (FlowMeter1 == null) throw new Exception("Cannot find FlowMeter1 component");
|
||||||
|
|
||||||
|
FlowMeter2 = (TBF.BenchControl.Elde.FlowMeter.FlowMeter)TbfComponents.FindComponent(flowMeterCfg.FlowMeter2, components);
|
||||||
|
if (FlowMeter2 == null) throw new Exception("Cannot find FlowMeter2 component");
|
||||||
|
|
||||||
nominalFlow = cfg.NominalFlow;
|
nominalFlow = cfg.NominalFlow;
|
||||||
ControlBoard.EtCalib[Idx1] = NominalFlow;
|
ControlBoard.EtCalib[Idx1] = NominalFlow;
|
||||||
|
|
||||||
+8
-4
@@ -3,11 +3,13 @@ using System.IO;
|
|||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
using TBF.BenchControl.Generic;
|
using TBF.BenchControl.Generic;
|
||||||
|
|
||||||
namespace TBF.BenchControl.Elde.FlowMeterCouple
|
namespace TBF.BenchControl.Elde.FlowMeterTwins
|
||||||
{
|
{
|
||||||
public class FlowMeterCfg : ComponentCfgBase, Generic.IChildComponentCfg
|
public class FlowMeterCfg : ComponentCfgBase, Generic.IChildComponentCfg
|
||||||
{
|
{
|
||||||
public float NominalFlow; /// Nominal flow in m3/h at output frequency 2000 Hz
|
public float NominalFlow; /// Nominal flow in m3/h at output frequency 2000 Hz
|
||||||
|
public string FlowMeter1; /// Name of the flow meter 1 component
|
||||||
|
public string FlowMeter2; /// Name of the flow meter 2 component
|
||||||
|
|
||||||
/// Parameterless constructor
|
/// Parameterless constructor
|
||||||
public FlowMeterCfg()
|
public FlowMeterCfg()
|
||||||
@@ -20,20 +22,22 @@ namespace TBF.BenchControl.Elde.FlowMeterCouple
|
|||||||
/// <param name="name">Flow meter name</param>
|
/// <param name="name">Flow meter name</param>
|
||||||
/// <param name="parentName">Parent component name</param>
|
/// <param name="parentName">Parent component name</param>
|
||||||
/// <param name="nominalFlow">Nominal flow/param>
|
/// <param name="nominalFlow">Nominal flow/param>
|
||||||
public FlowMeterCfg(IComponentFactory factory, string name, string parentName, float nominalFlow)
|
public FlowMeterCfg(IComponentFactory factory, string name, string parentName, float nominalFlow, string flowMeter1, string flowMeter2)
|
||||||
: base(factory, name, parentName)
|
: base(factory, name, parentName)
|
||||||
{
|
{
|
||||||
this.NominalFlow = nominalFlow;
|
this.NominalFlow = nominalFlow;
|
||||||
|
this.FlowMeter1 = flowMeter1;
|
||||||
|
this.FlowMeter2 = flowMeter2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IComponentCfg Clone()
|
public IComponentCfg Clone()
|
||||||
{
|
{
|
||||||
return new FlowMeterCfg(Factory, Name, ParentName, NominalFlow);
|
return new FlowMeterCfg(Factory, Name, ParentName, NominalFlow, FlowMeter1, FlowMeter2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string ToString(int i)
|
public string ToString(int i)
|
||||||
{
|
{
|
||||||
return string.Format("nominalFlow={0}", NominalFlow);
|
return string.Format("nominalFlow={0}, flowmeter#1={1}, flowmeter#2={2}", NominalFlow, FlowMeter1, FlowMeter2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TBF.Entities.Component CreateDbEntity()
|
public TBF.Entities.Component CreateDbEntity()
|
||||||
+60
-12
@@ -1,4 +1,4 @@
|
|||||||
namespace TBF.BenchControl.Elde.FlowMeterCouple
|
namespace TBF.BenchControl.Elde.FlowMeterTwins
|
||||||
{
|
{
|
||||||
partial class FlowMeterCfgCtrl
|
partial class FlowMeterCfgCtrl
|
||||||
{
|
{
|
||||||
@@ -35,12 +35,16 @@
|
|||||||
this.nominalFlowTextBox = new System.Windows.Forms.TextBox();
|
this.nominalFlowTextBox = new System.Windows.Forms.TextBox();
|
||||||
this.nominalFlowLabel = new System.Windows.Forms.Label();
|
this.nominalFlowLabel = new System.Windows.Forms.Label();
|
||||||
this.parentNameComboBox = new System.Windows.Forms.ComboBox();
|
this.parentNameComboBox = new System.Windows.Forms.ComboBox();
|
||||||
|
this.flowMeter1ComboBox = new System.Windows.Forms.ComboBox();
|
||||||
|
this.flowMeter1Label = new System.Windows.Forms.Label();
|
||||||
|
this.flowMeter2ComboBox = new System.Windows.Forms.ComboBox();
|
||||||
|
this.flowMeter2Label = new System.Windows.Forms.Label();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// parentNameLabel
|
// parentNameLabel
|
||||||
//
|
//
|
||||||
this.parentNameLabel.AutoSize = true;
|
this.parentNameLabel.AutoSize = true;
|
||||||
this.parentNameLabel.Location = new System.Drawing.Point(30, 90);
|
this.parentNameLabel.Location = new System.Drawing.Point(30, 72);
|
||||||
this.parentNameLabel.Name = "parentNameLabel";
|
this.parentNameLabel.Name = "parentNameLabel";
|
||||||
this.parentNameLabel.Size = new System.Drawing.Size(69, 13);
|
this.parentNameLabel.Size = new System.Drawing.Size(69, 13);
|
||||||
this.parentNameLabel.TabIndex = 3;
|
this.parentNameLabel.TabIndex = 3;
|
||||||
@@ -49,7 +53,7 @@
|
|||||||
// nameTextBox
|
// nameTextBox
|
||||||
//
|
//
|
||||||
this.nameTextBox.Enabled = false;
|
this.nameTextBox.Enabled = false;
|
||||||
this.nameTextBox.Location = new System.Drawing.Point(140, 61);
|
this.nameTextBox.Location = new System.Drawing.Point(140, 43);
|
||||||
this.nameTextBox.Name = "nameTextBox";
|
this.nameTextBox.Name = "nameTextBox";
|
||||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||||
this.nameTextBox.TabIndex = 2;
|
this.nameTextBox.TabIndex = 2;
|
||||||
@@ -57,7 +61,7 @@
|
|||||||
// nameLabel
|
// nameLabel
|
||||||
//
|
//
|
||||||
this.nameLabel.AutoSize = true;
|
this.nameLabel.AutoSize = true;
|
||||||
this.nameLabel.Location = new System.Drawing.Point(30, 64);
|
this.nameLabel.Location = new System.Drawing.Point(30, 46);
|
||||||
this.nameLabel.Name = "nameLabel";
|
this.nameLabel.Name = "nameLabel";
|
||||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||||
this.nameLabel.TabIndex = 1;
|
this.nameLabel.TabIndex = 1;
|
||||||
@@ -66,7 +70,7 @@
|
|||||||
// classNameLabel
|
// classNameLabel
|
||||||
//
|
//
|
||||||
this.classNameLabel.AutoSize = true;
|
this.classNameLabel.AutoSize = true;
|
||||||
this.classNameLabel.Location = new System.Drawing.Point(137, 37);
|
this.classNameLabel.Location = new System.Drawing.Point(137, 19);
|
||||||
this.classNameLabel.Name = "classNameLabel";
|
this.classNameLabel.Name = "classNameLabel";
|
||||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||||
this.classNameLabel.TabIndex = 0;
|
this.classNameLabel.TabIndex = 0;
|
||||||
@@ -75,33 +79,73 @@
|
|||||||
// nominalFlowTextBox
|
// nominalFlowTextBox
|
||||||
//
|
//
|
||||||
this.nominalFlowTextBox.Enabled = false;
|
this.nominalFlowTextBox.Enabled = false;
|
||||||
this.nominalFlowTextBox.Location = new System.Drawing.Point(224, 138);
|
this.nominalFlowTextBox.Location = new System.Drawing.Point(224, 150);
|
||||||
this.nominalFlowTextBox.Name = "nominalFlowTextBox";
|
this.nominalFlowTextBox.Name = "nominalFlowTextBox";
|
||||||
this.nominalFlowTextBox.Size = new System.Drawing.Size(46, 20);
|
this.nominalFlowTextBox.Size = new System.Drawing.Size(46, 20);
|
||||||
this.nominalFlowTextBox.TabIndex = 8;
|
this.nominalFlowTextBox.TabIndex = 10;
|
||||||
//
|
//
|
||||||
// nominalFlowLabel
|
// nominalFlowLabel
|
||||||
//
|
//
|
||||||
this.nominalFlowLabel.AutoSize = true;
|
this.nominalFlowLabel.AutoSize = true;
|
||||||
this.nominalFlowLabel.Location = new System.Drawing.Point(30, 141);
|
this.nominalFlowLabel.Location = new System.Drawing.Point(30, 153);
|
||||||
this.nominalFlowLabel.Name = "nominalFlowLabel";
|
this.nominalFlowLabel.Name = "nominalFlowLabel";
|
||||||
this.nominalFlowLabel.Size = new System.Drawing.Size(140, 13);
|
this.nominalFlowLabel.Size = new System.Drawing.Size(179, 13);
|
||||||
this.nominalFlowLabel.TabIndex = 7;
|
this.nominalFlowLabel.TabIndex = 9;
|
||||||
this.nominalFlowLabel.Text = "Nominal flow [m3/h @2kHz]";
|
this.nominalFlowLabel.Text = "Sum of nominal flows [m3/h @4kHz]";
|
||||||
//
|
//
|
||||||
// parentNameComboBox
|
// parentNameComboBox
|
||||||
//
|
//
|
||||||
this.parentNameComboBox.Enabled = false;
|
this.parentNameComboBox.Enabled = false;
|
||||||
this.parentNameComboBox.FormattingEnabled = true;
|
this.parentNameComboBox.FormattingEnabled = true;
|
||||||
this.parentNameComboBox.Location = new System.Drawing.Point(140, 87);
|
this.parentNameComboBox.Location = new System.Drawing.Point(140, 69);
|
||||||
this.parentNameComboBox.Name = "parentNameComboBox";
|
this.parentNameComboBox.Name = "parentNameComboBox";
|
||||||
this.parentNameComboBox.Size = new System.Drawing.Size(130, 21);
|
this.parentNameComboBox.Size = new System.Drawing.Size(130, 21);
|
||||||
this.parentNameComboBox.TabIndex = 4;
|
this.parentNameComboBox.TabIndex = 4;
|
||||||
//
|
//
|
||||||
|
// flowMeter1ComboBox
|
||||||
|
//
|
||||||
|
this.flowMeter1ComboBox.Enabled = false;
|
||||||
|
this.flowMeter1ComboBox.FormattingEnabled = true;
|
||||||
|
this.flowMeter1ComboBox.Location = new System.Drawing.Point(140, 96);
|
||||||
|
this.flowMeter1ComboBox.Name = "flowMeter1ComboBox";
|
||||||
|
this.flowMeter1ComboBox.Size = new System.Drawing.Size(130, 21);
|
||||||
|
this.flowMeter1ComboBox.TabIndex = 6;
|
||||||
|
//
|
||||||
|
// flowMeter1Label
|
||||||
|
//
|
||||||
|
this.flowMeter1Label.AutoSize = true;
|
||||||
|
this.flowMeter1Label.Location = new System.Drawing.Point(30, 99);
|
||||||
|
this.flowMeter1Label.Name = "flowMeter1Label";
|
||||||
|
this.flowMeter1Label.Size = new System.Drawing.Size(68, 13);
|
||||||
|
this.flowMeter1Label.TabIndex = 5;
|
||||||
|
this.flowMeter1Label.Text = "Flow Meter 1";
|
||||||
|
//
|
||||||
|
// flowMeter2ComboBox
|
||||||
|
//
|
||||||
|
this.flowMeter2ComboBox.Enabled = false;
|
||||||
|
this.flowMeter2ComboBox.FormattingEnabled = true;
|
||||||
|
this.flowMeter2ComboBox.Location = new System.Drawing.Point(140, 123);
|
||||||
|
this.flowMeter2ComboBox.Name = "flowMeter2ComboBox";
|
||||||
|
this.flowMeter2ComboBox.Size = new System.Drawing.Size(130, 21);
|
||||||
|
this.flowMeter2ComboBox.TabIndex = 8;
|
||||||
|
//
|
||||||
|
// flowMeter2Label
|
||||||
|
//
|
||||||
|
this.flowMeter2Label.AutoSize = true;
|
||||||
|
this.flowMeter2Label.Location = new System.Drawing.Point(30, 126);
|
||||||
|
this.flowMeter2Label.Name = "flowMeter2Label";
|
||||||
|
this.flowMeter2Label.Size = new System.Drawing.Size(68, 13);
|
||||||
|
this.flowMeter2Label.TabIndex = 7;
|
||||||
|
this.flowMeter2Label.Text = "Flow Meter 2";
|
||||||
|
//
|
||||||
// FlowMeterCfgCtrl
|
// FlowMeterCfgCtrl
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.Controls.Add(this.flowMeter2ComboBox);
|
||||||
|
this.Controls.Add(this.flowMeter2Label);
|
||||||
|
this.Controls.Add(this.flowMeter1ComboBox);
|
||||||
|
this.Controls.Add(this.flowMeter1Label);
|
||||||
this.Controls.Add(this.parentNameComboBox);
|
this.Controls.Add(this.parentNameComboBox);
|
||||||
this.Controls.Add(this.nominalFlowTextBox);
|
this.Controls.Add(this.nominalFlowTextBox);
|
||||||
this.Controls.Add(this.nominalFlowLabel);
|
this.Controls.Add(this.nominalFlowLabel);
|
||||||
@@ -126,5 +170,9 @@
|
|||||||
private System.Windows.Forms.TextBox nominalFlowTextBox;
|
private System.Windows.Forms.TextBox nominalFlowTextBox;
|
||||||
private System.Windows.Forms.Label nominalFlowLabel;
|
private System.Windows.Forms.Label nominalFlowLabel;
|
||||||
private System.Windows.Forms.ComboBox parentNameComboBox;
|
private System.Windows.Forms.ComboBox parentNameComboBox;
|
||||||
|
private System.Windows.Forms.ComboBox flowMeter1ComboBox;
|
||||||
|
private System.Windows.Forms.Label flowMeter1Label;
|
||||||
|
private System.Windows.Forms.ComboBox flowMeter2ComboBox;
|
||||||
|
private System.Windows.Forms.Label flowMeter2Label;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+25
-4
@@ -4,7 +4,7 @@ using System.Windows.Forms;
|
|||||||
using log4net;
|
using log4net;
|
||||||
using TBF.BenchControl.Generic;
|
using TBF.BenchControl.Generic;
|
||||||
|
|
||||||
namespace TBF.BenchControl.Elde.FlowMeterCouple
|
namespace TBF.BenchControl.Elde.FlowMeterTwins
|
||||||
{
|
{
|
||||||
public partial class FlowMeterCfgCtrl : UserControl, IComponentCfgCtrl
|
public partial class FlowMeterCfgCtrl : UserControl, IComponentCfgCtrl
|
||||||
{
|
{
|
||||||
@@ -40,7 +40,12 @@ namespace TBF.BenchControl.Elde.FlowMeterCouple
|
|||||||
{
|
{
|
||||||
parentNameComboBox.Items.Add(cmpnt.Name);
|
parentNameComboBox.Items.Add(cmpnt.Name);
|
||||||
}
|
}
|
||||||
}
|
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Elde.FlowMeter.FlowMeterFactory)
|
||||||
|
{
|
||||||
|
flowMeter1ComboBox.Items.Add(cmpnt.Name);
|
||||||
|
flowMeter2ComboBox.Items.Add(cmpnt.Name);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Redraw();
|
Redraw();
|
||||||
@@ -53,6 +58,8 @@ namespace TBF.BenchControl.Elde.FlowMeterCouple
|
|||||||
classNameLabel.Text = config.Factory.ClassName;
|
classNameLabel.Text = config.Factory.ClassName;
|
||||||
nameTextBox.Text = config.Name;
|
nameTextBox.Text = config.Name;
|
||||||
parentNameComboBox.Text = string.IsNullOrEmpty(config.ParentName) ? "---" : config.ParentName;
|
parentNameComboBox.Text = string.IsNullOrEmpty(config.ParentName) ? "---" : config.ParentName;
|
||||||
|
flowMeter1ComboBox.Text = string.IsNullOrEmpty(config.FlowMeter1) ? "---" : config.FlowMeter1;
|
||||||
|
flowMeter2ComboBox.Text = string.IsNullOrEmpty(config.FlowMeter2) ? "---" : config.FlowMeter2;
|
||||||
nominalFlowTextBox.Text = config.NominalFlow.ToString();
|
nominalFlowTextBox.Text = config.NominalFlow.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,7 +67,9 @@ namespace TBF.BenchControl.Elde.FlowMeterCouple
|
|||||||
{
|
{
|
||||||
nameTextBox.Enabled = true;
|
nameTextBox.Enabled = true;
|
||||||
parentNameComboBox.Enabled = true;
|
parentNameComboBox.Enabled = true;
|
||||||
nominalFlowTextBox.Enabled = true;
|
flowMeter1ComboBox.Enabled = true;
|
||||||
|
flowMeter2ComboBox.Enabled = true;
|
||||||
|
nominalFlowTextBox.Enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CfgVerifyFlags VerifyCfg(ref string message)
|
public CfgVerifyFlags VerifyCfg(ref string message)
|
||||||
@@ -72,6 +81,16 @@ namespace TBF.BenchControl.Elde.FlowMeterCouple
|
|||||||
flags |= CfgVerifyFlags.Error;
|
flags |= CfgVerifyFlags.Error;
|
||||||
message += Environment.NewLine + "Invalid 'Parent Name'";
|
message += Environment.NewLine + "Invalid 'Parent Name'";
|
||||||
}
|
}
|
||||||
|
if (!flowMeter1ComboBox.Items.Contains(flowMeter1ComboBox.Text))
|
||||||
|
{
|
||||||
|
flags |= CfgVerifyFlags.Error;
|
||||||
|
message += Environment.NewLine + "Invalid 'Flow Meter 1'";
|
||||||
|
}
|
||||||
|
if (!flowMeter2ComboBox.Items.Contains(flowMeter2ComboBox.Text))
|
||||||
|
{
|
||||||
|
flags |= CfgVerifyFlags.Error;
|
||||||
|
message += Environment.NewLine + "Invalid 'Flow Meter 2'";
|
||||||
|
}
|
||||||
float fdummy;
|
float fdummy;
|
||||||
if (!Utils.TryParseUFloat(nominalFlowTextBox.Text, out fdummy) || fdummy < 0.2 || fdummy > 1600)
|
if (!Utils.TryParseUFloat(nominalFlowTextBox.Text, out fdummy) || fdummy < 0.2 || fdummy > 1600)
|
||||||
{
|
{
|
||||||
@@ -87,7 +106,9 @@ namespace TBF.BenchControl.Elde.FlowMeterCouple
|
|||||||
|
|
||||||
config.Name = nameTextBox.Text;
|
config.Name = nameTextBox.Text;
|
||||||
config.ParentName = parentNameComboBox.Text.Equals("---") ? string.Empty : parentNameComboBox.Text;
|
config.ParentName = parentNameComboBox.Text.Equals("---") ? string.Empty : parentNameComboBox.Text;
|
||||||
Utils.TryParseUFloat(nominalFlowTextBox.Text, out config.NominalFlow);
|
config.FlowMeter1 = flowMeter1ComboBox.Text.Equals("---") ? string.Empty : flowMeter1ComboBox.Text;
|
||||||
|
config.FlowMeter2 = flowMeter2ComboBox.Text.Equals("---") ? string.Empty : flowMeter2ComboBox.Text;
|
||||||
|
Utils.TryParseUFloat(nominalFlowTextBox.Text, out config.NominalFlow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+3
-3
@@ -4,11 +4,11 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using TBF.BenchControl.Generic;
|
using TBF.BenchControl.Generic;
|
||||||
|
|
||||||
namespace TBF.BenchControl.Elde.FlowMeterCouple
|
namespace TBF.BenchControl.Elde.FlowMeterTwins
|
||||||
{
|
{
|
||||||
public class FlowMeterFactory : IComponentFactory
|
public class FlowMeterFactory : IComponentFactory
|
||||||
{
|
{
|
||||||
public string ClassName { get { return "FlowMeterCouple"; } }
|
public string ClassName { get { return "FlowMeterTwins"; } }
|
||||||
public bool HasProcedureParams { get { return false; } }
|
public bool HasProcedureParams { get { return false; } }
|
||||||
public bool HasTestParams { get { return false; } }
|
public bool HasTestParams { get { return false; } }
|
||||||
public IParamsProvider GetTestParams(Entities.ComponentTest testParams) { return null; }
|
public IParamsProvider GetTestParams(Entities.ComponentTest testParams) { return null; }
|
||||||
@@ -20,7 +20,7 @@ namespace TBF.BenchControl.Elde.FlowMeterCouple
|
|||||||
|
|
||||||
public IComponentCfg DefaultConfig(IList<Entities.Component> components)
|
public IComponentCfg DefaultConfig(IList<Entities.Component> components)
|
||||||
{
|
{
|
||||||
return new FlowMeterCfg(this, "FlowMeterCouple", "CB", 1600);
|
return new FlowMeterCfg(this, "FlowMeterTwins", "CB", 1600, "---", "---");
|
||||||
}
|
}
|
||||||
|
|
||||||
public IComponentCfgCtrl CreateCfgCtrl()
|
public IComponentCfgCtrl CreateCfgCtrl()
|
||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
using log4net;
|
using log4net;
|
||||||
using TBF.Boxes;
|
using TBF.Boxes;
|
||||||
|
|
||||||
namespace TBF.BenchControl.Elde.FlowMeterCouple
|
namespace TBF.BenchControl.Elde.FlowMeterTwins
|
||||||
{
|
{
|
||||||
public class ReadFlowOp : IOperation
|
public class ReadFlowOp : IOperation
|
||||||
{
|
{
|
||||||
@@ -73,7 +73,7 @@ namespace TBF.BenchControl.Elde.RegulValve
|
|||||||
{
|
{
|
||||||
this.flowMeterNr = (flowMeter as Elde.FlowMeter.FlowMeter).Idx1;
|
this.flowMeterNr = (flowMeter as Elde.FlowMeter.FlowMeter).Idx1;
|
||||||
}
|
}
|
||||||
else if (flowMeter is Elde.FlowMeterCouple.FlowMeter)
|
else if (flowMeter is Elde.FlowMeterTwins.FlowMeter)
|
||||||
{
|
{
|
||||||
this.flowMeterNr = 0;
|
this.flowMeterNr = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace TBF.BenchControl.Elde
|
|||||||
{
|
{
|
||||||
flowMeterIdx = (flowMeter as Elde.FlowMeter.FlowMeter).Idx1;
|
flowMeterIdx = (flowMeter as Elde.FlowMeter.FlowMeter).Idx1;
|
||||||
}
|
}
|
||||||
else if (flowMeter is Elde.FlowMeterCouple.FlowMeter)
|
else if (flowMeter is Elde.FlowMeterTwins.FlowMeter)
|
||||||
{
|
{
|
||||||
flowMeterIdx = 0;
|
flowMeterIdx = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace TBF.BenchControl
|
|||||||
Factories.Add(new Elde.ControlBoardFactory());
|
Factories.Add(new Elde.ControlBoardFactory());
|
||||||
Factories.Add(new Elde.Diverter.DiverterFactory());
|
Factories.Add(new Elde.Diverter.DiverterFactory());
|
||||||
Factories.Add(new Elde.FlowMeter.FlowMeterFactory());
|
Factories.Add(new Elde.FlowMeter.FlowMeterFactory());
|
||||||
Factories.Add(new Elde.FlowMeterCouple.FlowMeterFactory());
|
Factories.Add(new Elde.FlowMeterTwins.FlowMeterFactory());
|
||||||
Factories.Add(new Elde.PressureMeter.PressureMeterFactory());
|
Factories.Add(new Elde.PressureMeter.PressureMeterFactory());
|
||||||
Factories.Add(new Elde.Pump.PumpFactory());
|
Factories.Add(new Elde.Pump.PumpFactory());
|
||||||
Factories.Add(new Elde.PumpWithFM.PumpFactory());
|
Factories.Add(new Elde.PumpWithFM.PumpFactory());
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
|||||||
tstRslt.Meters[i].VolumeEnd = 0; /// liter
|
tstRslt.Meters[i].VolumeEnd = 0; /// liter
|
||||||
if (sensPath.RegisterReaders[i].PulsesPerLtr <= float.Epsilon) tstRslt.Meters[i].VolumeMeter = 0;
|
if (sensPath.RegisterReaders[i].PulsesPerLtr <= float.Epsilon) tstRslt.Meters[i].VolumeMeter = 0;
|
||||||
else tstRslt.Meters[i].VolumeMeter = Convert.ToSingle(WMPulses[i]) / sensPath.RegisterReaders[i].PulsesPerLtr;
|
else tstRslt.Meters[i].VolumeMeter = Convert.ToSingle(WMPulses[i]) / sensPath.RegisterReaders[i].PulsesPerLtr;
|
||||||
tstRslt.Meters[i].VolumeRef = tstRslt.ConstMaster * WMRefPulses[i]; /// liter
|
tstRslt.Meters[i].VolumeRef = tstRslt.ConstMaster * WMRefPulses[i]; /// liter
|
||||||
tstRslt.Meters[i].PulsesMeter = WMPulses[i];
|
tstRslt.Meters[i].PulsesMeter = WMPulses[i];
|
||||||
tstRslt.Meters[i].PulsesMaster = WMRefPulses[i];
|
tstRslt.Meters[i].PulsesMaster = WMRefPulses[i];
|
||||||
tstRslt.Meters[i].Time = cBrd.TTime;
|
tstRslt.Meters[i].Time = cBrd.TTime;
|
||||||
|
|||||||
@@ -383,7 +383,7 @@ namespace TBF
|
|||||||
private void MainWnd_FormClosing(object sender, FormClosingEventArgs e)
|
private void MainWnd_FormClosing(object sender, FormClosingEventArgs e)
|
||||||
{
|
{
|
||||||
Program.LocalSettings.ManiWndMaximized = (WindowState == FormWindowState.Maximized);
|
Program.LocalSettings.ManiWndMaximized = (WindowState == FormWindowState.Maximized);
|
||||||
if (WindowState != FormWindowState.Normal)
|
if (WindowState == FormWindowState.Normal)
|
||||||
{
|
{
|
||||||
Program.LocalSettings.MainWndLeft = Location.X;
|
Program.LocalSettings.MainWndLeft = Location.X;
|
||||||
Program.LocalSettings.MainWndTop = Location.Y;
|
Program.LocalSettings.MainWndTop = Location.Y;
|
||||||
@@ -392,6 +392,7 @@ namespace TBF
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/// Maximized or minimized (when restarted, minimized window is restored as normal)
|
||||||
Program.LocalSettings.MainWndLeft = RestoreBounds.Left;
|
Program.LocalSettings.MainWndLeft = RestoreBounds.Left;
|
||||||
Program.LocalSettings.MainWndTop = RestoreBounds.Top;
|
Program.LocalSettings.MainWndTop = RestoreBounds.Top;
|
||||||
Program.LocalSettings.MainWndWidth = RestoreBounds.Width;
|
Program.LocalSettings.MainWndWidth = RestoreBounds.Width;
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ namespace TBF
|
|||||||
factory is BenchControl.MettlerToledo.BalanceNewFactory)
|
factory is BenchControl.MettlerToledo.BalanceNewFactory)
|
||||||
{
|
{
|
||||||
balancesCount++;
|
balancesCount++;
|
||||||
TabPage tabPage = new TabPage(" " + Strings.Balance + " " + balancesCount.ToString() + " ");
|
TabPage tabPage = new TabPage(" " + cmpnt.Name + " ");
|
||||||
MetrologyDlgBalanceTab uiControl = new MetrologyDlgBalanceTab();
|
MetrologyDlgBalanceTab uiControl = new MetrologyDlgBalanceTab();
|
||||||
uiControl.MeterEntity = cmpnt;
|
uiControl.MeterEntity = cmpnt;
|
||||||
uiControl.Dock = DockStyle.Fill;
|
uiControl.Dock = DockStyle.Fill;
|
||||||
@@ -68,8 +68,8 @@ namespace TBF
|
|||||||
if (factory is BenchControl.Elde.FlowMeter.FlowMeterFactory)
|
if (factory is BenchControl.Elde.FlowMeter.FlowMeterFactory)
|
||||||
{
|
{
|
||||||
flowMetersCount++;
|
flowMetersCount++;
|
||||||
TabPage tabPage = new TabPage(" " + Strings.Reference + " " + flowMetersCount.ToString() + " ");
|
TabPage tabPage = new TabPage(" " + cmpnt.Name + " ");
|
||||||
MetrologyDlgFlowMeterTab uiControl = new MetrologyDlgFlowMeterTab();
|
MetrologyDlgFlowMeterTab uiControl = new MetrologyDlgFlowMeterTab();
|
||||||
uiControl.MeterEntity = cmpnt;
|
uiControl.MeterEntity = cmpnt;
|
||||||
uiControl.Dock = DockStyle.Fill;
|
uiControl.Dock = DockStyle.Fill;
|
||||||
tabPage.Tag = uiControl;
|
tabPage.Tag = uiControl;
|
||||||
@@ -79,8 +79,8 @@ namespace TBF
|
|||||||
if (factory is BenchControl.Elde.PressureMeter.PressureMeterFactory)
|
if (factory is BenchControl.Elde.PressureMeter.PressureMeterFactory)
|
||||||
{
|
{
|
||||||
pressMetersCount++;
|
pressMetersCount++;
|
||||||
TabPage tabPage = new TabPage(" " + Strings.Pressure_meter + pressMetersCount.ToString() + " ");
|
TabPage tabPage = new TabPage(" " + cmpnt.Name + " ");
|
||||||
MetrologyDlgPressMeterTab uiControl = new MetrologyDlgPressMeterTab();
|
MetrologyDlgPressMeterTab uiControl = new MetrologyDlgPressMeterTab();
|
||||||
uiControl.MeterEntity = cmpnt;
|
uiControl.MeterEntity = cmpnt;
|
||||||
uiControl.Dock = DockStyle.Fill;
|
uiControl.Dock = DockStyle.Fill;
|
||||||
tabPage.Tag = uiControl;
|
tabPage.Tag = uiControl;
|
||||||
|
|||||||
@@ -203,16 +203,16 @@
|
|||||||
<DependentUpon>EntryFormCfgCtrl.cs</DependentUpon>
|
<DependentUpon>EntryFormCfgCtrl.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="BenchControl\DataEntry\Munich\EntryFormFactory.cs" />
|
<Compile Include="BenchControl\DataEntry\Munich\EntryFormFactory.cs" />
|
||||||
<Compile Include="BenchControl\Elde\FlowMeterCouple\FlowMeter.cs" />
|
<Compile Include="BenchControl\Elde\FlowMeterTwins\FlowMeter.cs" />
|
||||||
<Compile Include="BenchControl\Elde\FlowMeterCouple\FlowMeterCfg.cs" />
|
<Compile Include="BenchControl\Elde\FlowMeterTwins\FlowMeterCfg.cs" />
|
||||||
<Compile Include="BenchControl\Elde\FlowMeterCouple\FlowMeterCfgCtrl.cs">
|
<Compile Include="BenchControl\Elde\FlowMeterTwins\FlowMeterCfgCtrl.cs">
|
||||||
<SubType>UserControl</SubType>
|
<SubType>UserControl</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="BenchControl\Elde\FlowMeterCouple\FlowMeterCfgCtrl.designer.cs">
|
<Compile Include="BenchControl\Elde\FlowMeterTwins\FlowMeterCfgCtrl.designer.cs">
|
||||||
<DependentUpon>FlowMeterCfgCtrl.cs</DependentUpon>
|
<DependentUpon>FlowMeterCfgCtrl.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="BenchControl\Elde\FlowMeterCouple\FlowMeterFactory.cs" />
|
<Compile Include="BenchControl\Elde\FlowMeterTwins\FlowMeterFactory.cs" />
|
||||||
<Compile Include="BenchControl\Elde\FlowMeterCouple\ReadFlowOp.cs" />
|
<Compile Include="BenchControl\Elde\FlowMeterTwins\ReadFlowOp.cs" />
|
||||||
<Compile Include="BenchControl\Elde\PumpWithFM\FMPumpTestParams.cs" />
|
<Compile Include="BenchControl\Elde\PumpWithFM\FMPumpTestParams.cs" />
|
||||||
<Compile Include="BenchControl\Elde\PumpWithFM\Pump.cs" />
|
<Compile Include="BenchControl\Elde\PumpWithFM\Pump.cs" />
|
||||||
<Compile Include="BenchControl\Elde\PumpWithFM\PumpCfg.cs" />
|
<Compile Include="BenchControl\Elde\PumpWithFM\PumpCfg.cs" />
|
||||||
@@ -925,7 +925,7 @@
|
|||||||
<EmbeddedResource Include="BenchControl\Elde\Diverter\DiverterCfgCtrl.resx">
|
<EmbeddedResource Include="BenchControl\Elde\Diverter\DiverterCfgCtrl.resx">
|
||||||
<DependentUpon>DiverterCfgCtrl.cs</DependentUpon>
|
<DependentUpon>DiverterCfgCtrl.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="BenchControl\Elde\FlowMeterCouple\FlowMeterCfgCtrl.resx">
|
<EmbeddedResource Include="BenchControl\Elde\FlowMeterTwins\FlowMeterCfgCtrl.resx">
|
||||||
<DependentUpon>FlowMeterCfgCtrl.cs</DependentUpon>
|
<DependentUpon>FlowMeterCfgCtrl.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="BenchControl\Elde\FlowMeter\FlowMeterCfgCtrl.resx">
|
<EmbeddedResource Include="BenchControl\Elde\FlowMeter\FlowMeterCfgCtrl.resx">
|
||||||
|
|||||||
Reference in New Issue
Block a user