Uni.XyzStartStopTest[WithDiv]Op, etc., AdjustmentSeq and all FlyingStartXyzSeq completed, ver. 3.1.1630
This commit is contained in:
@@ -115,23 +115,21 @@ namespace TBF.Rig.TestMethods.DiverterTest
|
||||
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
|
||||
processDataLoggingOp = new TBF.Rig.Operations.ProcessDataLoggingOp(processDataLogger, this);
|
||||
|
||||
|
||||
if (cBrd is ControlBoard.Legacy.CBoard)
|
||||
if (cBrd is ControlBoard.Uni.UniCB)
|
||||
{
|
||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
if (sensPath != null && sensPath.RegisterReaders != null)
|
||||
{
|
||||
foreach (var rr in sensPath.RegisterReaders)
|
||||
{
|
||||
IRegReaderPulses eldeRR = rr as IRegReaderPulses;
|
||||
if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8))
|
||||
IRegReaderPulses rrPls = rr as IRegReaderPulses;
|
||||
if (rrPls != null && rrPls.Position >= 1 && rrPls.Position <= 8)
|
||||
{
|
||||
filters[eldeRR.Position - 1] = eldeRR.Filter;
|
||||
filters[rrPls.Position - 1] = rrPls.Filter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
(cBrd as ControlBoard.Legacy.CBoard).SetFiltersPidShortPulses(filters, outPath.PidCoef, test.ShortPulses);
|
||||
(cBrd as ControlBoard.Uni.UniCB).SetFiltersPidShortPulses(filters, outPath.PidCoef, test.ShortPulses);
|
||||
}
|
||||
|
||||
IList<IOperation> readTempPressOps = new List<IOperation>();
|
||||
@@ -164,6 +162,17 @@ namespace TBF.Rig.TestMethods.DiverterTest
|
||||
string testName = Results.Utils.GetTestName(test.Name, test.Repeats, repetitionNr);
|
||||
TestStartTime = DateTime.Now;
|
||||
|
||||
foreach (var rr in sensPath.RegisterReaders)
|
||||
{
|
||||
GenericDevices.IHasTestName readerWithTstName = rr as GenericDevices.IHasTestName;
|
||||
if (readerWithTstName != null)
|
||||
{
|
||||
readerWithTstName.TestName = test.Name;
|
||||
readerWithTstName.TestRepeats = test.Repeats;
|
||||
readerWithTstName.RepetitionNr = repetitionNr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Checking_tank_capacity);
|
||||
@@ -491,9 +500,14 @@ namespace TBF.Rig.TestMethods.DiverterTest
|
||||
///
|
||||
/// Diverter test loop
|
||||
///
|
||||
int remainingPulses = totalPulses;
|
||||
for (int divRepetNr = 1; divRepetNr <= testParams.DivRepetitions; divRepetNr++)
|
||||
{
|
||||
LogProcessDataHeader(processDataLogger, string.Format("Measurement {0}", divRepetNr + 1));
|
||||
LogProcessDataHeader(processDataLogger, string.Format("Measurement {0}", divRepetNr));
|
||||
|
||||
int remainingRepetitions = testParams.DivRepetitions - divRepetNr + 1;
|
||||
int pulsesNow = (remainingPulses + remainingRepetitions - 1) / remainingRepetitions;
|
||||
remainingPulses -= pulsesNow;
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Test_in_progress);
|
||||
@@ -503,26 +517,14 @@ namespace TBF.Rig.TestMethods.DiverterTest
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.AddOperation(cBrd.StartTestOp(test, testParams.DivRepetitions))
|
||||
.AddOperation(cBrd.StartTestOp(test, true, true, false, test.Qfrom, test.Qto, pulsesNow, 0))
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
}
|
||||
while (!e.Contains(Event.MeasurementStarted));
|
||||
|
||||
|
||||
foreach (var rr in sensPath.RegisterReaders)
|
||||
{
|
||||
GenericDevices.IHasTestName readerWithTstName = rr as GenericDevices.IHasTestName;
|
||||
if (readerWithTstName != null)
|
||||
{
|
||||
readerWithTstName.TestName = test.Name;
|
||||
readerWithTstName.TestRepeats = test.Repeats;
|
||||
readerWithTstName.RepetitionNr = repetitionNr;
|
||||
}
|
||||
}
|
||||
while (!e.Contains(Event.TestInProgress));
|
||||
|
||||
|
||||
/// Measurement loop - preparation
|
||||
@@ -566,7 +568,7 @@ namespace TBF.Rig.TestMethods.DiverterTest
|
||||
Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.Test));
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Test));
|
||||
|
||||
if (e.Contains(Event.MeasurementCompleted)) break;
|
||||
if (e.Contains(Event.TestCompleted)) break;
|
||||
}
|
||||
while (!e.Contains(Event.Next)); /// 'Next' button can be used in Debug version
|
||||
|
||||
|
||||
Reference in New Issue
Block a user