- Component update (temp.)
- Process data logging, first trial
This commit is contained in:
parent
4db4c6e905
commit
d0ebb62ab3
@ -17,6 +17,7 @@ namespace TBF.BenchControl.Sequences
|
||||
public class SequenceBase
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(SequenceBase));
|
||||
protected static readonly ILog processDataLogger = LogManager.GetLogger("ProcessData");
|
||||
|
||||
///------------------------------------------------------------
|
||||
/// Global static variables set only once.
|
||||
@ -193,6 +194,7 @@ namespace TBF.BenchControl.Sequences
|
||||
|
||||
#endregion
|
||||
|
||||
protected float ltrPerRefPulse;
|
||||
|
||||
protected IOperation readRegisters1;
|
||||
protected IOperation readRegisters2;
|
||||
@ -200,6 +202,7 @@ namespace TBF.BenchControl.Sequences
|
||||
protected IOperation queryEnd2;
|
||||
protected IOperation checkUiOp;
|
||||
|
||||
protected IOperation processDataLoggingOp;
|
||||
|
||||
protected bool ticTac = false;
|
||||
protected int[] WMPulses = new int[Program.WMsCount];
|
||||
@ -239,6 +242,43 @@ namespace TBF.BenchControl.Sequences
|
||||
endMass.Clear();
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Process data logging
|
||||
///
|
||||
public void LogProcessHeader(ILog logger)
|
||||
{
|
||||
LogProcessHeader(logger, null);
|
||||
}
|
||||
|
||||
public void LogProcessHeader(ILog logger, string sectionName)
|
||||
{
|
||||
logger.Info(Environment.NewLine);
|
||||
if (sectionName != null) logger.Info(sectionName);
|
||||
logger.Info("Time Flow Test time Et.vol T.in Tou Tdi Pin Pou Mass VolMM Tam Ham. Pam Rv");
|
||||
logger.Info(Environment.NewLine);
|
||||
}
|
||||
|
||||
public void LogProcessData(ILog logger)
|
||||
{
|
||||
logger.InfoFormat("{0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12} {13} {14}",
|
||||
DateTime.Now.ToShortTimeString(),
|
||||
refFlow,
|
||||
"Test time",
|
||||
Formulas.VolumeFromPulses(refCount.Val, 1.0f / ltrPerRefPulse),
|
||||
tempIn,
|
||||
tempOut,
|
||||
pressIn,
|
||||
pressOut,
|
||||
mass,
|
||||
"VolMM",
|
||||
airTemperature,
|
||||
airHumidity,
|
||||
airPressure,
|
||||
"Rv");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Empties the tank: opens the emptying valve and measures the weight.
|
||||
/// </summary>
|
||||
@ -522,6 +562,7 @@ namespace TBF.BenchControl.Sequences
|
||||
ticTac = !ticTac;
|
||||
State.Create("Read water meters")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(realTest ? processDataLoggingOp : null)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(ticTac ? readRegisters1 : readRegisters2)
|
||||
.AddOperation(benchPath.TempIn.ReadTempOp(ref tempIn, Event.TempInDone))
|
||||
|
||||
@ -14,6 +14,7 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(CombinedMetersSeq));
|
||||
private static readonly ILog allResults = LogManager.GetLogger("AllResults");
|
||||
private static readonly ILog summaryResults = LogManager.GetLogger("SummaryResults");
|
||||
private static readonly ILog processDataLog = LogManager.GetLogger("ProcessData");
|
||||
|
||||
/// <summary>
|
||||
/// Flying start mass collection method sequence for combined meter
|
||||
@ -41,9 +42,11 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters
|
||||
/// int refPulses = (int)(timeSec * (2000.0f * targetFlow / pOut.FlowMeter.NominalFlow));
|
||||
int totalPulses = (int)(7200.0f * test.Volume / outPath.FlowMeter.NominalFlow); /// Nominal flow in [m3/h]
|
||||
|
||||
float ltrPerRefPulse = outPath.FlowMeter.NominalFlow / 7200.0f; /// [ltr/pulse]
|
||||
ltrPerRefPulse = outPath.FlowMeter.NominalFlow / 7200.0f; /// [ltr/pulse]
|
||||
///
|
||||
int repetitionNr = 1; /// First test: repetitionNr=1
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
|
||||
|
||||
int repetitionNr = 1; /// First test: repetitionNr=1
|
||||
|
||||
//====================================
|
||||
// Transition or SetRoute - Start
|
||||
|
||||
@ -13,6 +13,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(CombinedWithDetectionSeq));
|
||||
private static readonly ILog allResults = LogManager.GetLogger("AllResults");
|
||||
private static readonly ILog summaryResults = LogManager.GetLogger("SummaryResults");
|
||||
private static readonly ILog processDataLog = LogManager.GetLogger("ProcessData");
|
||||
|
||||
const int DetectionBufferSize = 9;
|
||||
const int DetectionKernelSize = 5;
|
||||
@ -45,9 +46,11 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
||||
/// uint refPulses = (uint)(timeSec * (2000.0f * targetFlow / pOut.FlowMeter.NominalFlow));
|
||||
int totalPulses = (int)(7200.0f * test.Volume / outPath.FlowMeter.NominalFlow); /// Nominal flow in [m3/h]
|
||||
|
||||
float ltrPerRefPulse = outPath.FlowMeter.NominalFlow / 7200.0f; /// [ltr/pulse]
|
||||
ltrPerRefPulse = outPath.FlowMeter.NominalFlow / 7200.0f; /// [ltr/pulse]
|
||||
///
|
||||
/// Meters path is required for the following:
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
|
||||
|
||||
/// Meters path is required for the following:
|
||||
readRegisters1 = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders, ref WMPulses, ref WMRefPulses);
|
||||
readRegisters2 = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders, ref WMPulses, ref WMRefPulses);
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(FixedStartMassCollectionSeq));
|
||||
private static readonly ILog allResults = LogManager.GetLogger("AllResults");
|
||||
private static readonly ILog summaryResults = LogManager.GetLogger("SummaryResults");
|
||||
private static readonly ILog processDataLog = LogManager.GetLogger("ProcessData");
|
||||
|
||||
/// <summary>
|
||||
/// Flying start mass collection method sequence
|
||||
@ -41,9 +42,11 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
/// int refPulses = (int)(timeSec * (2000.0f * targetFlow / pOut.FlowMeter.NominalFlow));
|
||||
int totalPulses = (int)(7200.0f * test.Volume / outPath.FlowMeter.NominalFlow); /// Nominal flow in [m3/h]
|
||||
|
||||
float ltrPerRefPulse = outPath.FlowMeter.NominalFlow / 7200.0f; /// [ltr/pulse]
|
||||
ltrPerRefPulse = outPath.FlowMeter.NominalFlow / 7200.0f; /// [ltr/pulse]
|
||||
|
||||
int repetitionNr = 1; /// First test: repetitionNr=1
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
|
||||
|
||||
int repetitionNr = 1; /// First test: repetitionNr=1
|
||||
|
||||
//====================================
|
||||
// Transition or SetRoute - Start
|
||||
|
||||
@ -14,6 +14,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(FlyingStartSeq));
|
||||
private static readonly ILog allResults = LogManager.GetLogger("AllResults");
|
||||
private static readonly ILog summaryResults = LogManager.GetLogger("SummaryResults");
|
||||
private static readonly ILog processDataLog = LogManager.GetLogger("ProcessData");
|
||||
|
||||
/// <summary>
|
||||
/// Flying start mass collection method sequence
|
||||
@ -41,9 +42,11 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
/// int refPulses = (int)(timeSec * (2000.0f * targetFlow / pOut.FlowMeter.NominalFlow));
|
||||
int totalPulses = (int)(7200.0f * test.Volume / outPath.FlowMeter.NominalFlow); /// Nominal flow in [m3/h]
|
||||
|
||||
float ltrPerRefPulse = outPath.FlowMeter.NominalFlow / 7200.0f; /// [ltr/pulse]
|
||||
ltrPerRefPulse = outPath.FlowMeter.NominalFlow / 7200.0f; /// [ltr/pulse]
|
||||
|
||||
int repetitionNr = 1; /// First test: repetitionNr=1
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
|
||||
|
||||
int repetitionNr = 1; /// First test: repetitionNr=1
|
||||
|
||||
//====================================
|
||||
// Transition or SetRoute - Start
|
||||
|
||||
@ -41,7 +41,9 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
|
||||
/// int refPulses = (int)(timeSec * (2000.0f * targetFlow / pOut.FlowMeter.NominalFlow));
|
||||
int totalPulses = (int)(7200.0f * test.Volume / outPath.FlowMeter.NominalFlow); /// Nominal flow in [m3/h]
|
||||
|
||||
float ltrPerRefPulse = outPath.FlowMeter.NominalFlow / 7200.0f; /// [ltr/pulse]
|
||||
ltrPerRefPulse = outPath.FlowMeter.NominalFlow / 7200.0f; /// [ltr/pulse]
|
||||
///
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
|
||||
|
||||
int repetitionNr = 1; /// First test: repetitionNr=1
|
||||
|
||||
@ -151,11 +153,14 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
|
||||
if (cameraRoi != null) measureOperations.Add(cameraRoi.MeasureOp());
|
||||
}
|
||||
|
||||
LogProcessHeader(processDataLogger, "Start mass");
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Measuring_the_weight);
|
||||
//------------------------------------------------
|
||||
State.Create("FlyingStartCollectionMethod : Measuring the start mass")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(outPath.Balance.ReadStableMassOp(ref startMass, 5))
|
||||
.EnterState();
|
||||
@ -167,6 +172,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
|
||||
}
|
||||
while (!e.Contains(Event.BalanceDone));
|
||||
|
||||
LogProcessHeader(processDataLogger, "Measurement");
|
||||
|
||||
tstRslt.TimeStart = DateTime.Now;
|
||||
tstRslt.MassStartRaw = startMass.Val;
|
||||
mass.Val = startMass.Val;
|
||||
@ -248,11 +255,14 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
|
||||
|
||||
test_completed:
|
||||
|
||||
LogProcessHeader(processDataLogger, "End mass");
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Measuring_the_weight);
|
||||
//------------------------------------------------
|
||||
State.Create("FlyingStartCollectionMethod : Measuring the end mass")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.AddOperation(outPath.Balance.ReadStableMassOp(ref endMass, 5))
|
||||
.AddOperation(cBrd.UpdateTankWeightOp())
|
||||
.EnterState();
|
||||
|
||||
@ -14,6 +14,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(ReferenceFlowmeterCalibrationSeq));
|
||||
private static readonly ILog allResults = LogManager.GetLogger("AllResults");
|
||||
private static readonly ILog summaryResults = LogManager.GetLogger("SummaryResults");
|
||||
private static readonly ILog processDataLog = LogManager.GetLogger("ProcessData");
|
||||
|
||||
/// <summary>
|
||||
/// Flying start mass collection method sequence
|
||||
@ -41,9 +42,11 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
|
||||
/// int refPulses = (int)(timeSec * (2000.0f * targetFlow / pOut.FlowMeter.NominalFlow));
|
||||
int totalPulses = (int)(7200.0f * test.Volume / outPath.FlowMeter.NominalFlow); /// Nominal flow in [m3/h]
|
||||
|
||||
float ltrPerRefPulse = outPath.FlowMeter.NominalFlow / 7200.0f; /// [ltr/pulse]
|
||||
ltrPerRefPulse = outPath.FlowMeter.NominalFlow / 7200.0f; /// [ltr/pulse]
|
||||
|
||||
int repetitionNr = 1; /// First test: repetitionNr=1
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
|
||||
|
||||
int repetitionNr = 1; /// First test: repetitionNr=1
|
||||
|
||||
//====================================
|
||||
// Transition or SetRoute - Start
|
||||
|
||||
@ -328,6 +328,7 @@
|
||||
<DependentUpon>MessageBoxForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BenchControl\Operations\MessageBoxOp.cs" />
|
||||
<Compile Include="BenchControl\Operations\ProcessDataLoggingOp.cs" />
|
||||
<Compile Include="BenchControl\Operations\ReadMoreRegistersOp.cs" />
|
||||
<Compile Include="BenchControl\MetersPath.cs" />
|
||||
<Compile Include="BenchControl\BenchPath.cs" />
|
||||
|
||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user