(1) MettlerToledo.Multi workaround for Badger-stredna-trat at the serial protocol level, (2) VB1 display fixed, ver. 2.18.835
This commit is contained in:
@@ -226,11 +226,7 @@ namespace TBF.BenchControl.Elde
|
||||
|
||||
for (int i = 0; i < MettlerToledo.Multi.BalanceDev.BalancesCount; i++)
|
||||
{
|
||||
#if BADGER_STREDNA_TRAT
|
||||
controlCom.SetWeight(i, MettlerToledo.Multi.BalanceDev.Masses[MettlerToledo.Multi.BalanceDev.BalancesCount - 1 - i]);
|
||||
#else
|
||||
controlCom.SetWeight(i, MettlerToledo.Multi.BalanceDev.Masses[i]);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2017 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2018 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -30,8 +30,8 @@ namespace TBF.BenchControl.MettlerToledo.Multi
|
||||
|
||||
protected readonly BalanceCfg balanceCfg;
|
||||
protected static BalanceCfg balance1Cfg;
|
||||
public int MultiIdNr { get { return balanceCfg.IdNr; } }
|
||||
/// <summary>
|
||||
|
||||
/// <summary>
|
||||
/// Enumeration of balances via static fields and methods
|
||||
/// </summary>
|
||||
static int nextBalanceIdx = 0;
|
||||
@@ -48,7 +48,7 @@ namespace TBF.BenchControl.MettlerToledo.Multi
|
||||
protected static SerialPort serialPort;
|
||||
protected static StringBuilder stringBuilder;
|
||||
|
||||
public int ScaleNr { get { return balanceNr; } }
|
||||
public int ScaleNr { get { return balanceNr; } }
|
||||
public int IdNr { get { return balanceCfg.IdNr; } }
|
||||
public double Capacity { get { return balanceCfg.Capacity; } }
|
||||
public double Resolution { get { return balanceCfg.Resolution; } }
|
||||
@@ -150,7 +150,11 @@ namespace TBF.BenchControl.MettlerToledo.Multi
|
||||
|
||||
msrmntState = (MsrmntState)((int)MsrmntState.Busy + scaleId);
|
||||
stringBuilder.Clear();
|
||||
#if BADGER_STREDNA_TRAT
|
||||
string serialData = string.Format("AR WT0{0}01\r\n", 3 - scaleId); /// 2->1 a 1->2
|
||||
#else
|
||||
string serialData = string.Format("AR WT0{0}01\r\n", scaleId);
|
||||
#endif
|
||||
serialPort.Write(serialData);
|
||||
log.InfoFormat("{0} - GetStableMassMeasurement() ... \"{1}\" sent", name, serialData);
|
||||
return true;
|
||||
@@ -174,8 +178,12 @@ namespace TBF.BenchControl.MettlerToledo.Multi
|
||||
|
||||
msrmntState = (MsrmntState)((int)MsrmntState.Busy + scaleId);
|
||||
stringBuilder.Clear();
|
||||
#if BADGER_STREDNA_TRAT
|
||||
string serialData = string.Format("AR WT0{0}01\r\n", 3 - scaleId); /// 2->1 a 1->2
|
||||
#else
|
||||
string serialData = string.Format("AR WT0{0}01\r\n", scaleId);
|
||||
serialPort.Write(serialData);
|
||||
#endif
|
||||
serialPort.Write(serialData);
|
||||
log.InfoFormat("{0} - GetImmediateMassMeasurement() ... \"{1}\" sent", name, serialData);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user