FixedStartMassCollelction in progress.
This commit is contained in:
@@ -27,6 +27,7 @@ namespace TBF.Rig.Dummy.Balance
|
||||
public float BuoyancyPress { get { return 1.013f; } }
|
||||
public float BuoyancyHumi { get { return 50.0f; } }
|
||||
|
||||
|
||||
public double Mass { get { return 0; } }
|
||||
|
||||
|
||||
@@ -45,12 +46,6 @@ namespace TBF.Rig.Dummy.Balance
|
||||
return this;
|
||||
}
|
||||
|
||||
public IOperation ReadMassOp(ref Boxes.DoubleBox mass)
|
||||
{
|
||||
mass.Val = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IOperation ReadStableMassOp(ref Boxes.DoubleBox mass, int delayBefore, Config.Entities.MassMethod method, int readingsCount, double maxSpread)
|
||||
{
|
||||
mass.Val = 0;
|
||||
|
||||
@@ -527,16 +527,6 @@ namespace TBF.Rig.MettlerToledo.Standard
|
||||
return new TaringOp(this, ref tara);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Events: BalanceDone, Error
|
||||
/// </summary>
|
||||
/// <param name="result">Reference to a variable for the measured mass in kg</param>
|
||||
/// <returns>ReadMassOp instance reference casted to IOperaton</returns>
|
||||
public IOperation ReadMassOp(ref DoubleBox mass)
|
||||
{
|
||||
return new ReadMassOp(this, ref mass);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Events: BalanceDone, Error
|
||||
/// </summary>
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using log4net;
|
||||
using TBF.Boxes;
|
||||
|
||||
namespace TBF.Rig.MettlerToledo.Standard
|
||||
{
|
||||
public class ReadMassOp : IOperation
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(ReadMassOp));
|
||||
public override string ToString() { return string.Format("ReadMassOp(.,.)"); }
|
||||
|
||||
/// Set by the constructor
|
||||
BalanceDev scale;
|
||||
DoubleBox result;
|
||||
|
||||
/// <summary>
|
||||
/// Events: BalanceDone (always)
|
||||
/// </summary>
|
||||
/// <param name="scale">Balance device instance</param>
|
||||
/// <param name="result">Reference to the measured mass in kg</param>
|
||||
public ReadMassOp(BalanceDev scale, ref DoubleBox result)
|
||||
{
|
||||
if (scale == null) throw new ArgumentNullException("balanceDev");
|
||||
this.scale = scale;
|
||||
this.result = result;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
result.Val = scale.Mass;
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>
|
||||
/// Event.BalanceDone
|
||||
/// </returns>
|
||||
public Event Run()
|
||||
{
|
||||
result.Val = scale.Mass;
|
||||
return Event.ScaleDone;
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
public void Stop()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -278,7 +278,7 @@ namespace TBF.Rig.Sequences
|
||||
if (e.Contains(Event.Error)) return Event.Error;
|
||||
if (TestAndLogUiCmdStop(e)) return Event.UiCmdStop;
|
||||
}
|
||||
while (!e.Contains(Event.ValvesSet) || ((tank is IScale) && !e.Contains(Event.ScaleDone)));
|
||||
while (!e.Contains(Event.ValvesSet));
|
||||
|
||||
if (tank.DrainValve2 != null)
|
||||
{
|
||||
@@ -950,8 +950,7 @@ namespace TBF.Rig.Sequences
|
||||
if (TestAndLogUiCmdStop(e)) return Event.UiCmdStop;
|
||||
if (e.Contains(Event.TestCompleted) || e.Contains(Event.Next)) return Event.TestCompleted;
|
||||
}
|
||||
while ( (realTest && (outPath.Scale is IScale) && !e.Contains(Event.ScaleDone)) ||
|
||||
!e.Contains(Event.ReadAllRegistersDone));
|
||||
while (!e.Contains(Event.ReadAllRegistersDone));
|
||||
|
||||
return Event.Done;
|
||||
}
|
||||
|
||||
@@ -247,8 +247,7 @@ namespace TBF.Rig.TestMethods.FixedStartMassCollAdvanced
|
||||
State.Create(string.Format("{0}({1}) : Measuring the start mass", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(scale.ReadStableMassOp(ref StartMass, 0, test.MassMethod, test.MassRepeats, test.MassSpread))
|
||||
.AddOperation(new Operations.TimerOp(StableMassMsrmntTimeoutSec))
|
||||
.AddOperation(scale.ReadStableMassOp(ref StartMass, test.TimeFlow2Mass, test.MassMethod, test.MassRepeats, test.MassSpread))
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.EnterState();
|
||||
do {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -252,7 +252,7 @@ namespace TBF.Rig.TestMethods.LeakTest
|
||||
State.Create(string.Format("{0}({1}) : Measuring the start mass", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(scale.ReadStableMassOp(ref StartMass, 0, test.MassMethod, test.MassRepeats, test.MassSpread))
|
||||
.AddOperation(scale.ReadStableMassOp(ref StartMass, test.TimeFlow2Mass, test.MassMethod, test.MassRepeats, test.MassSpread))
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
@@ -309,7 +309,7 @@ namespace TBF.Rig.TestMethods.LeakTest
|
||||
State.Create(string.Format("{0}({1}) : Measuring the end mass", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(scale.ReadStableMassOp(ref EndMass, 0, test.MassMethod, test.MassRepeats, test.MassSpread))
|
||||
.AddOperation(scale.ReadStableMassOp(ref EndMass, test.TimeStop2Mass, test.MassMethod, test.MassRepeats, test.MassSpread))
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
|
||||
@@ -628,7 +628,6 @@
|
||||
<Compile Include="Rig\MettlerToledo\Standard\BalanceOld.cs" />
|
||||
<Compile Include="Rig\MettlerToledo\Standard\BalanceOldFactory.cs" />
|
||||
<Compile Include="Rig\MettlerToledo\Standard\GetSerNumOp.cs" />
|
||||
<Compile Include="Rig\MettlerToledo\Standard\ReadMassOp.cs" />
|
||||
<Compile Include="Rig\MettlerToledo\Standard\ReadStableMassOp.cs" />
|
||||
<Compile Include="Rig\MettlerToledo\Standard\SetUnitsOp.cs" />
|
||||
<Compile Include="Rig\MettlerToledo\Standard\TaringOp.cs" />
|
||||
|
||||
Reference in New Issue
Block a user