Endurance : Bux fixes
This commit is contained in:
@@ -14,7 +14,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
|
||||
public CycleStep()
|
||||
{
|
||||
Duration = 1;
|
||||
Duration = 500;
|
||||
//Message = string.Empty;
|
||||
ValvesOpen = 0;
|
||||
ValvesClose = 0;
|
||||
@@ -42,7 +42,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
|| !uint.TryParse(strArr[1], out vOpen)
|
||||
|| !uint.TryParse(strArr[2], out vClose))
|
||||
{
|
||||
Duration = 1;
|
||||
Duration = 500;
|
||||
//Message = string.Empty;
|
||||
ValvesOpen = 0;
|
||||
ValvesClose = 0;
|
||||
|
||||
@@ -207,7 +207,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
/// Duration
|
||||
///
|
||||
uint duration;
|
||||
if (uint.TryParse(lvi.Text, out duration) && (duration % 10) != 0)
|
||||
if (uint.TryParse(lvi.Text, out duration) && (duration % 10) == 0)
|
||||
step.Duration = duration;
|
||||
else
|
||||
lvi.Text = step.Duration.ToString();
|
||||
|
||||
@@ -445,10 +445,11 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
}
|
||||
while (!e.Contains(Event.CommandCompleted));
|
||||
|
||||
bool stopInProgress = false;
|
||||
|
||||
State.Create("Endurance : Cycle execution")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(new Operations.TimerOp(1000, Event.TimerExpired))
|
||||
.AddOperation(new Operations.TimerOp((int)test.TstTime, Event.TimerExpired))
|
||||
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
|
||||
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
|
||||
@@ -463,12 +464,46 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
if (TestAndLogUiCmdStop(test, e))
|
||||
{
|
||||
stopInProgress = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (!e.Contains(Event.TimerExpired) && !e.Contains(Event.Next));
|
||||
}
|
||||
|
||||
|
||||
State.Create("Endurance : Extra delay to be sure the last endurance cycle completed")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(new Operations.TimerOp((int)(duration / 1000) + 1, Event.TimerExpired))
|
||||
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
|
||||
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
|
||||
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
|
||||
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
|
||||
.AddOperation(benchPath.PressMtrDelta == null ? null : benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
|
||||
.AddOperation((StateMachine.Ambient != null) ? StateMachine.Ambient.ReadAmbientOp(AmbTemp, AmbPress, AmbHumi) : null)
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
if (TestAndLogUiCmdStop(test, e))
|
||||
{
|
||||
stopInProgress = true;
|
||||
}
|
||||
}
|
||||
while (!e.Contains(Event.TimerExpired) && !e.Contains(Event.Next));
|
||||
|
||||
|
||||
if (stopInProgress)
|
||||
{
|
||||
retVal = Event.UiCmdStop;
|
||||
goto stopTest;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (++repetitionNr <= test.Repeats)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user