CtrlBrd.UpdateWeights() updates also tanks, is used in CtrlBrd.RunDeviceAfter(), UpdteTankWeightOp becomes obsolete, ver. 2.18.1060
This commit is contained in:
parent
2a98c485ef
commit
76a08324b4
@ -221,19 +221,38 @@ namespace TBF.BenchControl.Elde
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static bool doMassesVolumesLog = true;
|
||||
///
|
||||
public void UpdateWeights()
|
||||
{
|
||||
for (int i = 0; i < MettlerToledo.Standard.BalanceDev.BalancesCount; i++)
|
||||
{
|
||||
controlCom.SetWeight(i, MettlerToledo.Standard.BalanceDev.Masses[i]);
|
||||
double mass = MettlerToledo.Standard.BalanceDev.Masses[i];
|
||||
controlCom.SetWeight(i, mass);
|
||||
if (doMassesVolumesLog) log.DebugFormat("UpdateWeights() : ix={0} mass={1}", i, mass);
|
||||
}
|
||||
|
||||
for (int i = 0; i < MettlerToledo.Multi.BalanceDev.BalancesCount; i++)
|
||||
{
|
||||
controlCom.SetWeight(i, MettlerToledo.Multi.BalanceDev.Masses[i]);
|
||||
}
|
||||
double mass = MettlerToledo.Multi.BalanceDev.Masses[i];
|
||||
controlCom.SetWeight(i, mass);
|
||||
if (doMassesVolumesLog) log.DebugFormat("UpdateWeights() : ix={0} mass={1}", i, mass);
|
||||
}
|
||||
|
||||
int firstTankIx = Math.Max(MettlerToledo.Standard.BalanceDev.BalancesCount, MettlerToledo.Multi.BalanceDev.BalancesCount);
|
||||
|
||||
for (int i = 0; i < Various.TankWithLevelMsrmnt.Tank.TanksCount; i++)
|
||||
{
|
||||
double volume = Various.TankWithLevelMsrmnt.Tank.Tanks[i].Volume;
|
||||
controlCom.SetWeight(firstTankIx + i, volume);
|
||||
if (doMassesVolumesLog) log.DebugFormat("UpdateWeights() : ix={0}, volume={1}", firstTankIx + i, volume);
|
||||
}
|
||||
|
||||
//doMassesVolumesLog = false; /// When this line is uncommented logging is done only once on startup
|
||||
}
|
||||
|
||||
|
||||
public void SetReservoirTemp(int nr, float temp)
|
||||
{
|
||||
controlCom.SetReservoirTemp(nr, temp);
|
||||
@ -434,6 +453,8 @@ namespace TBF.BenchControl.Elde
|
||||
{
|
||||
if (DebugLevel == DebugMode.Simulate) return;
|
||||
|
||||
UpdateWeights();
|
||||
|
||||
uint[] uintFilters = new uint[8];
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
|
||||
@ -30,7 +30,7 @@ namespace TBF.BenchControl.Elde
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
controlBoard.UpdateWeights();
|
||||
//controlBoard.UpdateWeights();
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
@ -39,7 +39,7 @@ namespace TBF.BenchControl.Elde
|
||||
/// </returns>
|
||||
public Event Run()
|
||||
{
|
||||
controlBoard.UpdateWeights();
|
||||
//controlBoard.UpdateWeights();
|
||||
return Event.None;
|
||||
}
|
||||
|
||||
|
||||
@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.18.1056.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1056.0")]
|
||||
[assembly: AssemblyVersion("2.18.1060.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1060.0")]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user