All changes done for Badger-velka-trat merged into this branch, version 2.1.210.
This commit is contained in:
@@ -39,7 +39,6 @@ namespace TBF.BenchControl.MettlerToledo.Multi
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
started = false;
|
||||
done = false;
|
||||
started = BalanceDev.GetImmediateMassMeasurement(balanceDev.IdNr, balanceDev.Name);
|
||||
}
|
||||
@@ -55,19 +54,21 @@ namespace TBF.BenchControl.MettlerToledo.Multi
|
||||
if (!started)
|
||||
{
|
||||
started = BalanceDev.GetImmediateMassMeasurement(balanceDev.IdNr, balanceDev.Name);
|
||||
return Event.Busy;
|
||||
if (!done) return Event.Busy;
|
||||
else return Event.BalanceDone;
|
||||
}
|
||||
else if (started && balanceDev.MsrmntState == MsrmntState.Valid)
|
||||
{
|
||||
result.Val = balanceDev.Mass;
|
||||
log.InfoFormat("ReadMassOp.Run() ... mass={0} ... returning Event.BalanceDone", balanceDev.Mass);
|
||||
done = true;
|
||||
started = false;
|
||||
return Event.BalanceDone; /// Mass read OK
|
||||
}
|
||||
else if (done)
|
||||
{
|
||||
return Event.BalanceDone; /// Mass has already been read (at least once)
|
||||
}
|
||||
else if (balanceDev.MsrmntState == MsrmntState.Valid)
|
||||
{
|
||||
result.Val = balanceDev.Mass;
|
||||
log.InfoFormat("ReadMassOp.Run() ... mass={0} ... returning Event.BalanceDone", balanceDev.Mass);
|
||||
done = true;
|
||||
return Event.BalanceDone; /// Mass read OK
|
||||
}
|
||||
else
|
||||
{
|
||||
return Event.Busy;
|
||||
|
||||
Reference in New Issue
Block a user