diff --git a/TBF/Rig/MettlerToledo/Multi/BalanceDev.cs b/TBF/Rig/MettlerToledo/Multi/BalanceDev.cs index ca9c3822e..590578d3d 100644 --- a/TBF/Rig/MettlerToledo/Multi/BalanceDev.cs +++ b/TBF/Rig/MettlerToledo/Multi/BalanceDev.cs @@ -76,9 +76,8 @@ namespace TBF.Rig.MettlerToledo.Multi public string Format { get { return balanceCfg.Format; } } - public BalanceDev() - { - } + + public BalanceDev() { } /// /// Constructor @@ -281,9 +280,7 @@ namespace TBF.Rig.MettlerToledo.Multi } /// Run this device - public void RunDeviceAfter() - { - } + public void RunDeviceAfter() { } /// Stop this device public void StopDevice() diff --git a/TBF/Rig/MettlerToledo/ReadMassesOp.cs b/TBF/Rig/MettlerToledo/ReadMassesOp.cs deleted file mode 100644 index 6706a400b..000000000 --- a/TBF/Rig/MettlerToledo/ReadMassesOp.cs +++ /dev/null @@ -1,71 +0,0 @@ -/// -/// Copyright (c) 2013-2020 Sensus Slovensko a.s. -/// -using System; -using log4net; - -namespace TBF.Rig.MettlerToledo -{ - public class ReadMassesOp : IOperation - { - private static readonly ILog log = LogManager.GetLogger(typeof(ReadMassesOp)); - public override string ToString() { return string.Format("ReadMassesOp()"); } - - bool done; - - /// - /// Events: BalanceDone, Error - /// - /// Balance device instance - /// Required mass readings count (>= 3) - /// Reference to the measured mass in kg - public ReadMassesOp() - { - log.Debug(this.ToString()); - } - - /// Start this operation - public void Start() - { - done = false; - - for (int i = 0; i < Standard.BalanceDev.BalancesCount; i++) - { - Standard.BalanceDev.Balances[i].SendImmediateMeasurementCmd(); - } - } - - /// Run this operation - /// - /// Event.None - /// Event.BalanceDone - /// Event.Error . . . . . Current.Tick == null - /// - public Event Run() - { - if (done) return Event.ScaleDone; /// Mass has already been read - - for (int i = 0; i < Standard.BalanceDev.BalancesCount; i++) - { - if (Standard.BalanceDev.Balances[i].MsrmntState == MsrmntState.Busy) - { - return Event.None; - } - } - for (int i = 0; i < Multi.BalanceDev.BalancesCount; i++) - { - if (Multi.BalanceDev.Balances[i].MsrmntState == MsrmntState.Busy) - { - return Event.None; - } - } - done = true; - return Event.ScaleDone; - } - - /// Stop this operation - public void Stop() - { - } - } -} diff --git a/TBF/Rig/Sequences/MainSeq.cs b/TBF/Rig/Sequences/MainSeq.cs index b821c57d8..1255e8aa9 100644 --- a/TBF/Rig/Sequences/MainSeq.cs +++ b/TBF/Rig/Sequences/MainSeq.cs @@ -144,21 +144,6 @@ namespace TBF.Rig.Sequences } while (e.Contains(Event.Busy)); - - //-------------------------------------------------------------------------------------------- - Bridge.OnActivity(this, Strings.Measuring_the_weight); - State.Create("MainSeq : Mesuring the weight for the 1st time") - .AddOperation(checkUiOp) - .AddOperation(new MettlerToledo.ReadMassesOp()) - .EnterState(); - do - { - e = StateMachine.WaitRunDevsRunOps(); - if (e.Contains(Event.Error)) goto error; - if (e.Contains(Event.UiCmdStop)) goto stop; - } - while (!e.Contains(Event.ScaleDone)); - select_procedure: CloseBeginForm(); /// Make sure the CycleBeginForm is closed (after an abnormal end, etc.) diff --git a/TBF/TBF.csproj b/TBF/TBF.csproj index 1e8a91847..face634ad 100644 --- a/TBF/TBF.csproj +++ b/TBF/TBF.csproj @@ -633,7 +633,6 @@ - UserControl