Bug fix in MettlerToledo.Standard.GetSerNumOp, ver. 2.14.602

This commit is contained in:
Milan Hanajik
2017-07-14 14:37:12 +02:00
parent 1a2c64db84
commit 803bea960d
2 changed files with 12 additions and 4 deletions
@@ -44,13 +44,21 @@ namespace TBF.BenchControl.MettlerToledo.Standard
/// </returns>
public Event Run()
{
log.DebugFormat("{0} - GetSerNumOp.Run() ... MsrmntState = {1}", scale.Name, scale.MsrmntState);
if (scale.MsrmntState == MsrmntState.Valid)
{
serialNumber = scale.SerialNumber;
return Event.BalanceDone; /// S/N read successful
}
if (scale.MsrmntState == MsrmntState.Failed) return Event.Error; /// S/N read failed
return Event.None; /// No result yet
else if (scale.MsrmntState == MsrmntState.Failed)
{
return Event.Error; /// S/N read failed
}
else
{
return Event.Busy; /// No result yet
}
}
/// <summary>Stop this operation</summary>