Upgrade - improved StandingStart method by SLM requirements, added fixed delays for meters stabilization
This commit is contained in:
parent
0ce130f0ef
commit
be0525a319
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("3.9.3134.0")]
|
||||
[assembly: AssemblyFileVersion("3.9.3134.0")]
|
||||
[assembly: AssemblyVersion("3.9.3134.101")]
|
||||
[assembly: AssemblyFileVersion("3.9.3134.101")]
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
///
|
||||
using Common;
|
||||
using log4net;
|
||||
///
|
||||
/// Copyright (c) 2018-2022 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using log4net;
|
||||
using Common;
|
||||
using System.Windows.Forms;
|
||||
using TBF.Boxes;
|
||||
using TBF.Resources;
|
||||
using TBF.Rig.GenericDevices;
|
||||
@ -84,6 +85,8 @@ namespace TBF.Rig.TestMethods.StandingStart
|
||||
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
|
||||
processDataLoggingOp = new TBF.Rig.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null);
|
||||
|
||||
int delay;
|
||||
|
||||
if (cBrd is ControlBoard.Uni.UniCB)
|
||||
{
|
||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
@ -421,10 +424,40 @@ namespace TBF.Rig.TestMethods.StandingStart
|
||||
LogProcessDataTestInfo(processDataLogger, test.Procedure.Name, test.Name);
|
||||
int startPulses = 0;
|
||||
|
||||
///
|
||||
/// Enter watermeter begin states here
|
||||
///
|
||||
GenericDevices.IHasWMStatesForm dataEntryCmpnt = TbfComponents.FindComponent(StateMachine.Procedure.DataEntry) as GenericDevices.IHasWMStatesForm;
|
||||
///...MF
|
||||
///-----------------
|
||||
delay = test.TimeFlow2Mass;
|
||||
|
||||
if (delay > 0)
|
||||
{
|
||||
State.Create(string.Format("{0}({1}) : Delay for meters stabilization <T flow stab. - start = {2}s> ", test.Method, test.Name, delay))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(testInProgress)
|
||||
.AddOperation(new Operations.TimerOp(delay)) //...develop: step 5
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
|
||||
/// Show remaining time
|
||||
if ((delay = Math.Max(delay, 0)) > 60)
|
||||
Bridge.OnActivity(this, string.Format("{0} ... {1} {2} {3} {4}", "Delay", delay / 60, "min", delay % 60, Strings.sec));
|
||||
else
|
||||
Bridge.OnActivity(this, string.Format("{0} ... {1} s", "Delay", delay));
|
||||
|
||||
if (delay > 0)
|
||||
delay--;
|
||||
}
|
||||
while (!e.Contains(Event.TimerExpired));
|
||||
}
|
||||
|
||||
///
|
||||
/// Enter watermeter begin states here
|
||||
///
|
||||
GenericDevices.IHasWMStatesForm dataEntryCmpnt = TbfComponents.FindComponent(StateMachine.Procedure.DataEntry) as GenericDevices.IHasWMStatesForm;
|
||||
|
||||
if (dataEntryCmpnt != null)
|
||||
{
|
||||
@ -668,6 +701,35 @@ namespace TBF.Rig.TestMethods.StandingStart
|
||||
double volumeCTV = constMasterCorr * Convert.ToDouble(endPulses - startPulses);
|
||||
double refEnergy = Energy.Sum * volumeCTV / VolumeForEnergy.Sum; /// [J]=[J]*[l]/[l]
|
||||
|
||||
///...MF
|
||||
///-----------------
|
||||
delay = test.TimeFlow2Mass;
|
||||
|
||||
if (delay > 0)
|
||||
{
|
||||
State.Create(string.Format("{0}({1}) : Delay for meters stabilization <T flow stab. - start = {2}s> ", test.Method, test.Name, delay))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(testInProgress)
|
||||
.AddOperation(new Operations.TimerOp(delay)) //...develop: step 5
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
|
||||
/// Show remaining time
|
||||
if ((delay = Math.Max(delay, 0)) > 60)
|
||||
Bridge.OnActivity(this, string.Format("{0} ... {1} {2} {3} {4}", "Delay", delay / 60, "min", delay % 60, Strings.sec));
|
||||
else
|
||||
Bridge.OnActivity(this, string.Format("{0} ... {1} s", "Delay", delay));
|
||||
|
||||
if (delay > 0)
|
||||
delay--;
|
||||
}
|
||||
while (!e.Contains(Event.TimerExpired));
|
||||
}
|
||||
|
||||
///
|
||||
/// Enter watermeter end states here
|
||||
|
||||
Loading…
Reference in New Issue
Block a user