Bug fix in CalculateDivTransitionTime( ), div. transition time stored in results, DiverterTestSeq calculates average transition time.
This commit is contained in:
@@ -479,6 +479,11 @@ namespace TBF.Rig.TestMethods.DiverterTest
|
||||
///
|
||||
int remainingPulses = totalPulses;
|
||||
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr, 0);
|
||||
DiverterStart.Start(BatchRslts.Batch.BatchNr, test.Name, repetitionNr);
|
||||
DiverterEnd.Start(BatchRslts.Batch.BatchNr, test.Name, repetitionNr);
|
||||
|
||||
float[] divStartTimes = new float[testParams.DivRepetitions];
|
||||
float[] divEndTimes = new float[testParams.DivRepetitions];
|
||||
|
||||
for (int divRepetNr = 1; divRepetNr <= testParams.DivRepetitions; divRepetNr++)
|
||||
{
|
||||
@@ -500,7 +505,7 @@ namespace TBF.Rig.TestMethods.DiverterTest
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperations(cameraMeasurementOps)
|
||||
.AddOperation(cBrd.FlyingStartStopTestOp(test, test.Qfrom, test.Qto, pulsesNow, true, false, 0, false))
|
||||
.AddOperation(cBrd.FlyingStartStopTestOp(test, test.Qfrom, test.Qto, pulsesNow, true, false, 0, true, DiverterStart, DiverterEnd))
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.EnterState();
|
||||
do {
|
||||
@@ -554,6 +559,9 @@ namespace TBF.Rig.TestMethods.DiverterTest
|
||||
cumulativeWMPulses[i] += cBrd.PulsesWM(i);
|
||||
cumulativeTestTime[i] += cBrd.TestTimeWM(i);
|
||||
}
|
||||
|
||||
divStartTimes[divRepetNr - 1] = outPath.Diverter.SwitchTimeStart.Val;
|
||||
divEndTimes[divRepetNr - 1] = outPath.Diverter.SwitchTimeEnd.Val;
|
||||
}
|
||||
} /// end for ... diverter test loop
|
||||
|
||||
@@ -613,6 +621,17 @@ namespace TBF.Rig.TestMethods.DiverterTest
|
||||
log.WarnFormat("End mass = {0}kg", EndMass);
|
||||
TestEndTime = DateTime.Now;
|
||||
|
||||
/// Calculate average diverter start/end times
|
||||
divStartTimes[testParams.DivRepetitions - 1] = outPath.Diverter.SwitchTimeStart.Val;
|
||||
divEndTimes[testParams.DivRepetitions - 1] = outPath.Diverter.SwitchTimeEnd.Val;
|
||||
for (int i = 0; i < testParams.DivRepetitions - 1; i++)
|
||||
{
|
||||
outPath.Diverter.SwitchTimeStart.Val = outPath.Diverter.SwitchTimeStart.Val + divStartTimes[i];
|
||||
outPath.Diverter.SwitchTimeEnd.Val = outPath.Diverter.SwitchTimeEnd.Val + divEndTimes[i];
|
||||
}
|
||||
outPath.Diverter.SwitchTimeStart.Val = outPath.Diverter.SwitchTimeStart.Val / Convert.ToSingle(testParams.DivRepetitions);
|
||||
outPath.Diverter.SwitchTimeEnd.Val = outPath.Diverter.SwitchTimeEnd.Val / Convert.ToSingle(testParams.DivRepetitions);
|
||||
|
||||
if (test.DoDrainingAfter)
|
||||
{
|
||||
State.Create(string.Format("{0}({1}) : Open the drain valve", test.Method, test.Name))
|
||||
|
||||
Reference in New Issue
Block a user