LogProcessDataHeatMeters, ver. 2.11.371
This commit is contained in:
parent
14de767c52
commit
03c027ab33
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -13,22 +13,30 @@ namespace TBF.BenchControl.Operations
|
||||
{
|
||||
ILog logger;
|
||||
SequenceBase sequenceBase;
|
||||
bool heatMeters;
|
||||
|
||||
public ProcessDataLoggingOp(ILog logger, SequenceBase sequenceBase)
|
||||
public ProcessDataLoggingOp(ILog logger, SequenceBase sequenceBase, bool heatMeters)
|
||||
{
|
||||
this.logger = logger;
|
||||
this.sequenceBase = sequenceBase;
|
||||
this.heatMeters = heatMeters;
|
||||
}
|
||||
|
||||
public void Start()
|
||||
{
|
||||
sequenceBase.LogProcessData(logger);
|
||||
if (heatMeters)
|
||||
sequenceBase.LogProcessDataHeatMeters(logger);
|
||||
else
|
||||
sequenceBase.LogProcessData(logger);
|
||||
}
|
||||
|
||||
public Event Run()
|
||||
{
|
||||
sequenceBase.LogProcessData(logger);
|
||||
return Event.None;
|
||||
if (heatMeters)
|
||||
sequenceBase.LogProcessDataHeatMeters(logger);
|
||||
else
|
||||
sequenceBase.LogProcessData(logger);
|
||||
return Event.None;
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
|
||||
@ -106,6 +106,39 @@ namespace TBF.BenchControl.Sequences
|
||||
outPath.RegulValve.Position.ToString("F1"));
|
||||
}
|
||||
|
||||
public void LogProcessHeaderHeatMeters(ILog logger, string sectionName)
|
||||
{
|
||||
logger.Info(Environment.NewLine);
|
||||
if (sectionName != null) logger.Info(sectionName);
|
||||
logger.Info("Time Flow TstTime Ref.cnt Ref.vol Tin Tout Tdiv Pin Pout Mass VolMM Tamb Hamb Pamb Rv Thiac1 Thiac2 Tloac1 Tloac2");
|
||||
logger.Info(Environment.NewLine);
|
||||
}
|
||||
|
||||
public void LogProcessDataHeatMeters(ILog logger)
|
||||
{
|
||||
logger.InfoFormat("{0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12} {13} {14} {15} {16} {17} {18} {19}",
|
||||
DateTime.Now.ToLongTimeString(),
|
||||
Utils.DoubleToStr(RefFlow.Val, 4),
|
||||
StateMachine.ControlBoard.TTime.ToString("F3"),
|
||||
StateMachine.ControlBoard.EtPulses(0),
|
||||
Formulas.VolumeFromPulses(StateMachine.ControlBoard.EtPulses(0), 1.0f / LtrPerRefPulse).ToString("F3"),
|
||||
TempIn,
|
||||
TempOut,
|
||||
TempDiv,
|
||||
PressureUp,
|
||||
PressureDown,
|
||||
Mass,
|
||||
"VolMM",
|
||||
AmbientTemp,
|
||||
AmbientHumidity,
|
||||
AmbientPressure,
|
||||
outPath.RegulValve.Position.ToString("F1"),
|
||||
TempRefWarm1,
|
||||
TempRefWarm2,
|
||||
TempRefCold1,
|
||||
TempRefCold2);
|
||||
}
|
||||
|
||||
|
||||
protected Event EmptyTheTank(IValve emptyTankValve, IBalance balance)
|
||||
{
|
||||
|
||||
@ -71,7 +71,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
/// int refPulses = (int)(timeSec * (2000.0f * targetFlow / pOut.FlowMeter.NominalFlow));
|
||||
int totalPulses = (int)(test.Volume / LtrPerRefPulse + 0.5f);
|
||||
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
||||
|
||||
int repetitionNr = 1; /// First test: repetitionNr=1
|
||||
|
||||
|
||||
@ -113,7 +113,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
||||
/// int refPulses = (int)(timeSec * (2000.0f * targetFlow / pOut.FlowMeter.NominalFlow));
|
||||
int totalPulses = (int)(test.Volume / LtrPerRefPulse + 0.5f);
|
||||
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
||||
|
||||
/// Meters path is required for the following:
|
||||
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
|
||||
|
||||
@ -42,7 +42,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
|
||||
/// int refPulses = (int)(timeSec * (2000.0f * targetFlow / pOut.FlowMeter.NominalFlow));
|
||||
int totalPulses = (int)(test.Volume / LtrPerRefPulse + 0.5f);
|
||||
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
||||
|
||||
float[] wmBeginStates = new float[Config.Data.WMsCount];
|
||||
float[] wmEndStates = new float[Config.Data.WMsCount];
|
||||
|
||||
@ -44,7 +44,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
/// int refPulses = (int)(timeSec * (2000.0f * targetFlow / pOut.FlowMeter.NominalFlow));
|
||||
int totalPulses = (int)(test.Volume / LtrPerRefPulse + 0.5f);
|
||||
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null);
|
||||
|
||||
float[] wmBeginStates = new float[Config.Data.WMsCount];
|
||||
float[] wmEndStates = new float[Config.Data.WMsCount];
|
||||
|
||||
@ -94,7 +94,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
|
||||
|
||||
Elde.ControlBoardDev cBrd = StateMachine.ControlBoard;
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null);
|
||||
|
||||
LtrPerRefPulse = outPath.FlowMeter.LtrPerPulse; /// [ltr/pulse], nominal flow in [m3/h]
|
||||
|
||||
|
||||
@ -94,7 +94,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
|
||||
|
||||
Elde.ControlBoardDev cBrd = StateMachine.ControlBoard;
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null);
|
||||
|
||||
LtrPerRefPulse = outPath.FlowMeter.LtrPerPulse;
|
||||
int totalPulses = (int)(test.Volume / LtrPerRefPulse + 0.5f);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -35,7 +35,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest
|
||||
Event retVal = Event.Done;
|
||||
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
|
||||
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
||||
|
||||
TestProgressEventArgs.SetEstimatedTimes(new int[] { 1, 1, 1, 30, Convert.ToInt32(test.TstTime) + 15, 0, 0 });
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.JustStarted));
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -35,7 +35,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
|
||||
Event retVal = Event.Done;
|
||||
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
|
||||
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
||||
|
||||
TestProgressEventArgs.SetEstimatedTimes(new int[] { 1, 1, 1, 30, Convert.ToInt32(test.TstTime) + 15, 0, 0 });
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.JustStarted));
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -42,7 +42,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
|
||||
/// int refPulses = (int)(timeSec * (2000.0f * targetFlow / pOut.FlowMeter.NominalFlow));
|
||||
int totalPulses = (int)(test.Volume / LtrPerRefPulse + 0.5f);
|
||||
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
||||
|
||||
int repetitionNr = 1; /// First test: repetitionNr=1
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -54,7 +54,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
|
||||
modelessDlg = null;
|
||||
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
||||
|
||||
const string Q2correctedFromCmd = "q2 corrected from ";
|
||||
const string Hz2correctedFromCmd = "2Hz corrected from ";
|
||||
|
||||
@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.11.370.1")]
|
||||
[assembly: AssemblyFileVersion("2.11.370.1")]
|
||||
[assembly: AssemblyVersion("2.11.371.1")]
|
||||
[assembly: AssemblyFileVersion("2.11.371.1")]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user