Buoyancy parameters added to the UI: Metrology tabs, BalanceCfg, BalanceDev.

This commit is contained in:
Milan Hanajik
2016-04-25 12:28:21 +02:00
parent ca2705421b
commit df58d05b84
12 changed files with 377 additions and 157 deletions
@@ -42,6 +42,9 @@ namespace TBF.BenchControl.GenericDevices
/// </summary>
int EmptyTimeSec { get; }
float BuoyancyTemp { get; } ///
float BuoyancyPress { get; } /// Displayed in Metrology tab page
float BuoyancyHumi { get; } ///
/// <summary>
/// Measurement correction table
@@ -0,0 +1,16 @@
///
/// Copyright (c) 2013-2016 Sensus Metering Systems
///
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.GenericDevices
{
public interface IBalanceCfg : IComponentCfg
{
/// Parameters displayed in Metrology tab page
float BuoyancyTemp { get; set; }
float BuoyancyPress { get; set; }
float BuoyancyHumi { get; set; }
}
}
@@ -10,7 +10,7 @@ using TBF.BenchControl.Generic;
namespace TBF.BenchControl.MettlerToledo.Multi
{
public class BalanceCfg : ComponentCfgBase, Generic.IComponentCfg
public class BalanceCfg : ComponentCfgBase, GenericDevices.IBalanceCfg
{
public IComponent GetComponent(IList<IComponent> components) { return new BalanceDev(this); }
public IComponentCfgCtrl GetControl() { return new BalanceCfgCtrl(); }
@@ -18,12 +18,12 @@ namespace TBF.BenchControl.MettlerToledo.Multi
///
/// Serialized parameters
///
public int IdNr; /// Identification number 1..3
public float Capacity; /// Max. water mass in 'kg' or volume in 'l'
public float Resolution; /// Resolution of the integer value in the serial protocol in 'kg'
public float Empty; /// 'Empty' water mass in 'kg' or volume in 'l'
public int IdNr; /// Identification number 1..3
public float Capacity; /// Max. water mass in 'kg' or volume in 'l'
public float Resolution; /// Resolution of the integer value in the serial protocol in 'kg'
public float Empty; /// 'Empty' water mass in 'kg' or volume in 'l'
public string Format;
public int EmptyTimeSec; /// s
public int EmptyTimeSec; /// s
public int ComPortNr;
public int BaudRate;
@@ -32,6 +32,27 @@ namespace TBF.BenchControl.MettlerToledo.Multi
public StopBits StopBits;
public Handshake Handshake;
/// Buoyancy - Displayed in Metrology tab page
private float buoyancyTemp;
private float buoyancyPress;
private float buoyancyHumi;
///
public float BuoyancyTemp
{
get { return buoyancyTemp; }
set { buoyancyTemp = value; }
}
public float BuoyancyPress
{
get { return buoyancyPress; }
set { buoyancyPress = value; }
}
public float BuoyancyHumi
{
get { return buoyancyHumi; }
set { buoyancyHumi = value; }
}
/// Private parameterless constructor invoked by all other (public) constructors
BalanceCfg()
{
@@ -51,7 +72,11 @@ namespace TBF.BenchControl.MettlerToledo.Multi
DataBits = 7;
StopBits = System.IO.Ports.StopBits.One;
Handshake = System.IO.Ports.Handshake.XOnXOff;
}
BuoyancyTemp = 20.0f;
BuoyancyPress = 1.0f;
BuoyancyHumi = 40.0f;
}
public BalanceCfg(IComponentFactory factory)
: this()
@@ -54,6 +54,11 @@ namespace TBF.BenchControl.MettlerToledo.Multi
public float Capacity { get { return balanceCfg.Capacity; } }
public float Resolution { get { return balanceCfg.Resolution; } }
public int EmptyTimeSec { get { return balanceCfg.EmptyTimeSec; } }
/// Buoyancy
public float BuoyancyTemp { get { return balanceCfg.BuoyancyTemp; } }
public float BuoyancyPress { get { return balanceCfg.BuoyancyPress; } }
public float BuoyancyHumi { get { return balanceCfg.BuoyancyHumi; } }
/// <summary>The state of the mass measurement</summary>
public MsrmntState MsrmntState { get { return msrmntState; } }
@@ -10,7 +10,7 @@ using TBF.BenchControl.Generic;
namespace TBF.BenchControl.MettlerToledo.Standard
{
public class BalanceCfg : ComponentCfgBase, Generic.IComponentCfg
public class BalanceCfg : ComponentCfgBase, GenericDevices.IBalanceCfg
{
public IComponent GetComponent(IList<IComponent> components)
{
@@ -29,10 +29,32 @@ namespace TBF.BenchControl.MettlerToledo.Standard
public int DataBits;
public StopBits StopBits;
public Handshake Handshake;
public float Capacity; /// Max. water mass in 'kg' or volume in 'l'
public float Empty; /// 'Empty' water mass in 'kg' or volume in 'l'
public float Capacity; /// Max. water mass in 'kg' or volume in 'l'
public float Empty; /// 'Empty' water mass in 'kg' or volume in 'l'
public string Format;
public int EmptyTimeSec; /// s
public int EmptyTimeSec; /// s
/// Buoyancy - Displayed in Metrology tab page
private float buoyancyTemp;
private float buoyancyPress;
private float buoyancyHumi;
///
public float BuoyancyTemp
{
get { return buoyancyTemp; }
set { buoyancyTemp = value; }
}
public float BuoyancyPress
{
get { return buoyancyPress; }
set { buoyancyPress = value; }
}
public float BuoyancyHumi
{
get { return buoyancyHumi; }
set { buoyancyHumi = value; }
}
/// Private parameterless constructor invoked by all other (public) constructors
BalanceCfg()
@@ -49,7 +71,10 @@ namespace TBF.BenchControl.MettlerToledo.Standard
Empty = 20.0f;
Format = "F3";
EmptyTimeSec = 180;
}
BuoyancyTemp = 20.0f;
BuoyancyPress = 1.0f;
BuoyancyHumi = 40.0f;
}
public BalanceCfg(IComponentFactory factory)
: this()
@@ -51,7 +51,12 @@ namespace TBF.BenchControl.MettlerToledo.Standard
public int BalanceNr { get { return balanceNr; } }
public float Capacity { get { return balanceCfg.Capacity; } }
public int EmptyTimeSec { get { return balanceCfg.EmptyTimeSec; } }
/// Buoyancy
public float BuoyancyTemp { get { return balanceCfg.BuoyancyTemp; } }
public float BuoyancyPress { get { return balanceCfg.BuoyancyPress; } }
public float BuoyancyHumi { get { return balanceCfg.BuoyancyHumi; } }
/// <summary>The state of the mass measurement</summary>
public MsrmntState MsrmntState { get { return msrmntState; } }
protected MsrmntState msrmntState;