FlyingStart measurement during test simplified similarly to FlyingStartMassCollection, version 2.1.215.
This commit is contained in:
parent
462ed568de
commit
a22b4de1b6
@ -126,8 +126,16 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
//------------------------------------------------
|
||||
State.Create("FlyingStart : Starting the test")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath, Elde.TestMethods.Synchro,
|
||||
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
|
||||
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
|
||||
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
|
||||
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
|
||||
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
|
||||
.AddOperation((StateMachine.Ambient != null)
|
||||
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity) : null)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath, Elde.TestMethods.Synchro,
|
||||
test.Qfrom, test.Qto, totalPulses, (float)test.TolerRed))
|
||||
.EnterState();
|
||||
do
|
||||
@ -148,22 +156,34 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
/// Measurement loop - preparation
|
||||
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
|
||||
queryEnd1 = cBrd.QueryMeasurementEndOp();
|
||||
queryEnd2 = cBrd.QueryMeasurementEndOp();
|
||||
|
||||
ClearAllStatistics();
|
||||
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
|
||||
ClearAllStatistics();
|
||||
|
||||
/// Measurement loop - begin
|
||||
while (true)
|
||||
State.Create("Read water meters")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(readRegistersOp)
|
||||
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
|
||||
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
|
||||
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
|
||||
.AddOperation(benchPath.PressIn.ReadPressureOp(ref PressureUp))
|
||||
.AddOperation(benchPath.PressOut.ReadPressureOp(ref PressureDown))
|
||||
.AddOperation((StateMachine.Ambient != null)
|
||||
? StateMachine.Ambient.ReadAmbientOp(AmbientTemp, AmbientPressure, AmbientHumidity)
|
||||
: null)
|
||||
.AddOperation(queryEnd1)
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
//--------------------------------
|
||||
switch (ReadRegistersTempPressAmbient(measureOperations, true))
|
||||
{
|
||||
case Event.Error: { retVal = Event.Error; goto stopTest; }
|
||||
case Event.UiCmdStop: { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
case Event.MeasurementCompleted: goto test_completed;
|
||||
}
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) goto stopTest;
|
||||
if (e.Contains(Event.UiCmdStop)) goto stopTest;
|
||||
if (e.Contains(Event.MeasurementCompleted)) goto test_completed;
|
||||
|
||||
//------------------------------------------------
|
||||
int remainingTime = Math.Max(estimtdEndTime - StateMachine.Time, 0);
|
||||
if (remainingTime > 60)
|
||||
{
|
||||
@ -173,15 +193,17 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
{
|
||||
Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime));
|
||||
}
|
||||
//------------------------------------------------
|
||||
|
||||
UpdateAllStatistics();
|
||||
RefFreq.Val = cBrd.ReferenceFreq;
|
||||
RefFlow.Val = cBrd.ReferenceFlow;
|
||||
RefFlow.Val = cBrd.ReferenceFlow;
|
||||
|
||||
Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.Test));
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Test));
|
||||
}
|
||||
/// Measurement loop - end
|
||||
while (true);
|
||||
/// Measurement loop - end
|
||||
|
||||
test_completed:
|
||||
|
||||
|
||||
@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.1.214.1")]
|
||||
[assembly: AssemblyFileVersion("2.1.214.1")]
|
||||
[assembly: AssemblyVersion("2.1.215.1")]
|
||||
[assembly: AssemblyFileVersion("2.1.215.1")]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user