diff --git a/TBF/BenchControl/Elde/ControlBoardDev.cs b/TBF/BenchControl/Elde/ControlBoardDev.cs
index 48a14fbac..b3d5cfc6f 100644
--- a/TBF/BenchControl/Elde/ControlBoardDev.cs
+++ b/TBF/BenchControl/Elde/ControlBoardDev.cs
@@ -288,7 +288,7 @@ namespace TBF.BenchControl.Elde
/// Specific pre-initialization for control board only
///
///
- public void InitializeComponent(
+ public void InitializeEldeComponent(
#if DN100
ControlCom2VB.ControlCom2panel ctrlBrdComponent,
#elif FUZHOU_150 || MUNICH
diff --git a/TBF/BenchControl/MettlerToledo/Standard/BalanceNewDev.cs b/TBF/BenchControl/MettlerToledo/Standard/BalanceNewDev.cs
index 33ffedc21..5a639ac89 100644
--- a/TBF/BenchControl/MettlerToledo/Standard/BalanceNewDev.cs
+++ b/TBF/BenchControl/MettlerToledo/Standard/BalanceNewDev.cs
@@ -28,14 +28,11 @@ namespace TBF.BenchControl.MettlerToledo.Standard
public string SerialNumber { get { return serialNumber; } }
string serialNumber;
- public BalanceNewDev()
- {
- }
+ public BalanceNewDev() { }
public BalanceNewDev(Generic.IComponentCfg cfg)
: base(cfg)
{
- log.Warn(this.ToString());
}
///
diff --git a/TBF/BenchControl/MettlerToledo/Standard/BalanceOld.cs b/TBF/BenchControl/MettlerToledo/Standard/BalanceOld.cs
index f232463a6..1943269e0 100644
--- a/TBF/BenchControl/MettlerToledo/Standard/BalanceOld.cs
+++ b/TBF/BenchControl/MettlerToledo/Standard/BalanceOld.cs
@@ -32,7 +32,6 @@ namespace TBF.BenchControl.MettlerToledo.Standard
public BalanceOld(Generic.IComponentCfg cfg)
: base(cfg)
{
- log.Warn(this.ToString());
}
diff --git a/TBF/BenchControl/StateMachine.cs b/TBF/BenchControl/StateMachine.cs
index 4bcfb1662..5a50cc63f 100644
--- a/TBF/BenchControl/StateMachine.cs
+++ b/TBF/BenchControl/StateMachine.cs
@@ -277,26 +277,23 @@ namespace TBF.BenchControl
{
IScaleOrTank tank = cmpnt as IScaleOrTank;
tanks.Add(tank);
-
- if ((tank.ScaleNr == 0) && (Tank1 == null)) Tank1 = tank;
- else if ((tank.ScaleNr == 1) && (Tank2 == null)) Tank2 = tank;
- else if ((tank.ScaleNr == 2) && (Tank3 == null)) Tank3 = tank;
+ if (Tank1 == null) Tank1 = tank;
+ else if (Tank2 == null) Tank2 = tank;
+ else if (Tank3 == null) Tank3 = tank;
}
Elde.Valve.Valve eldeValve = (cmpnt as Elde.Valve.Valve);
if ((eldeValve != null) && eldeValve.Inverted) valvesToInvert |= eldeValve.Mask;
-
- cmpnt.StartChangeHandler(); /// Start handling parameter change events
}
- /// Create an array with tank capacities
- double[] tankCapacities = new double[tanks.Count];
- for (int i = 0; i < tankCapacities.Length; i++) tankCapacities[i] = tanks[i].Capacity;
-
/// Pre-initialize the control board (= buffer the arguments ctrlBrdComponent, tankCapacities)
- if (ControlBoard != null)
+ if (ControlBoard != null)
{
- ControlBoard.InitializeComponent(ctrlBrdComponent, valvesToInvert, tankCapacities);
+ /// Create an array with tank capacities from 'tanks' list
+ double[] tankCapacities = new double[tanks.Count];
+ for (int i = 0; i < tankCapacities.Length; i++) tankCapacities[i] = tanks[i].Capacity;
+
+ ControlBoard.InitializeEldeComponent(ctrlBrdComponent, valvesToInvert, tankCapacities);
}
else
{
@@ -307,7 +304,7 @@ namespace TBF.BenchControl
public static string CurrentlyInitializedComponentName;
///
- public static string InitializeDevices()
+ public static string InitializeComponents()
{
CurrentlyInitializedComponentName = "-";
@@ -331,7 +328,8 @@ namespace TBF.BenchControl
CurrentlyInitializedComponentName = cmpnt.Name;
cmpnt.Initialize();
- }
+ cmpnt.StartChangeHandler(); /// Start handling parameter change events
+ }
CurrentlyInitializedComponentName = "---";
@@ -354,22 +352,22 @@ namespace TBF.BenchControl
{
IScaleOrTank tank = cmpnt as IScaleOrTank;
- if ((tank.ScaleNr == 0) && (DrainValve1 == null))
+ if (tank == Tank1 && DrainValve1 == null)
{
DrainValve1 = tank.DrainValve;
- log.WarnFormat("InitializeBoardEtc() ... Scale1={0} Draining valve1={1}",
+ log.WarnFormat("InitializeComponents() ... Scale1={0} DrainValve1={1}",
tank.Name, (DrainValve1 != null) ? DrainValve1.Name : "---");
}
- else if ((tank.ScaleNr == 1) && (DrainValve2 == null))
+ else if (tank == Tank2 && DrainValve2 == null)
{
DrainValve2 = tank.DrainValve;
- log.WarnFormat("InitializeBoardEtc() ... Scale2={0} Draining valve2={1}",
+ log.WarnFormat("InitializeComponents() ... Scale2={0} DrainValve2={1}",
tank.Name, (DrainValve2 != null) ? DrainValve2.Name : "---");
}
- else if ((tank.ScaleNr == 2) && (DrainValve3 == null))
+ else if (tank == Tank3 && DrainValve3 == null)
{
DrainValve3 = tank.DrainValve;
- log.WarnFormat("InitializeBoardEtc() ... Scale3={0} Draining valve3={1}",
+ log.WarnFormat("InitializeComponents() ... Scale3={0} DrainValve3={1}",
tank.Name, (DrainValve3 != null) ? DrainValve3.Name : "---");
}
}
diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs
index b346d11ea..83c7629bc 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.26.1599.0")]
-[assembly: AssemblyFileVersion("2.26.1599.0")]
+[assembly: AssemblyVersion("2.26.1607.0")]
+[assembly: AssemblyFileVersion("2.26.1607.0")]
diff --git a/TBF/UI/MainWnd.cs b/TBF/UI/MainWnd.cs
index 020912c38..3026f21c2 100644
--- a/TBF/UI/MainWnd.cs
+++ b/TBF/UI/MainWnd.cs
@@ -219,7 +219,7 @@ namespace TBF.UI
try
{
- string message = BenchControl.StateMachine.InitializeDevices();
+ string message = BenchControl.StateMachine.InitializeComponents();
form.CloseForm(null, new EventArgs());
formThread.Join();