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
@@ -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()