LeakTest modified : 1. close valve+pump off 2. delay 3. start mass 4. leak test 5. end mass, ver. 2.27.1875
This commit is contained in:
@@ -148,6 +148,45 @@ namespace TBF.Rig.TestMethods.LeakTest
|
||||
|
||||
pressure_set:
|
||||
|
||||
///------------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Closing_valve_Pump_off);
|
||||
///------------------------------------------------------
|
||||
State.Create(string.Format("{0}({1}) : Closing the valve", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(new TBF.Rig.Elde.SetValvesOp(cBrd, true, outPath))
|
||||
.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.ValvesBusy));
|
||||
|
||||
|
||||
if (!testParams.IsPumpRunning)
|
||||
{
|
||||
/// testParams.IsPumpRunning==false => Close the pump at the beginning of the leak part of the test
|
||||
|
||||
if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOff();
|
||||
|
||||
State.Create(string.Format("{0}({1}) : Stopping the pump", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(cBrd.SetValvesOp(null, inPath.Pump))
|
||||
.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.ValvesBusy));
|
||||
}
|
||||
|
||||
startTime = StateMachine.Time;
|
||||
int estimtdEndTime = startTime + testParams.DurationPMax;
|
||||
|
||||
@@ -169,62 +208,19 @@ namespace TBF.Rig.TestMethods.LeakTest
|
||||
int remainingTime = Math.Max(estimtdEndTime - StateMachine.Time, 0);
|
||||
if (remainingTime > 60)
|
||||
{
|
||||
Bridge.OnActivity(this, string.Format("{0} ... {1} {2} {3} {4}", Strings.Test_in_progress, remainingTime / 60, "min", remainingTime % 60, Strings.sec));
|
||||
Bridge.OnActivity(this, string.Format("{0} ... {1} {2} {3} {4}", Strings.Delay, remainingTime / 60, "min", remainingTime % 60, Strings.sec));
|
||||
}
|
||||
else
|
||||
{
|
||||
Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime));
|
||||
Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Delay, remainingTime));
|
||||
}
|
||||
}
|
||||
while (e.Contains(Event.TimerBusy));
|
||||
|
||||
|
||||
///------------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Closing_valve_Pump_off);
|
||||
///------------------------------------------------------
|
||||
State.Create(string.Format("{0}({1}) : Closing the valve", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(new TBF.Rig.Elde.SetValvesOp(cBrd, true, outPath))
|
||||
.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.ValvesBusy));
|
||||
|
||||
|
||||
if (!testParams.IsPumpRunning)
|
||||
{
|
||||
/// testParams.IsPumpRunning==false => Close the pump at the beginning of the leak part of the test
|
||||
|
||||
if (inPath.Pump is GenericDevices.IPumpFM) (inPath.Pump as GenericDevices.IPumpFM).TurnOff();
|
||||
|
||||
State.Create(string.Format("{0}({1}) : Stopping the pump", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(cBrd.SetValvesOp(null, inPath.Pump))
|
||||
.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.ValvesBusy));
|
||||
}
|
||||
|
||||
|
||||
TestStartTime = DateTime.Now;
|
||||
startTime = StateMachine.Time;
|
||||
estimtdEndTime = startTime + testParams.DurationLeak;
|
||||
|
||||
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr, 0);
|
||||
UpdateAllStatistics(StateMachine.Time);
|
||||
|
||||
|
||||
if (testParams.MaxMassIncrease > 0)
|
||||
{
|
||||
//-----------------------------------------------------
|
||||
@@ -252,6 +248,10 @@ namespace TBF.Rig.TestMethods.LeakTest
|
||||
while (!e.Contains(Event.BalanceDone));
|
||||
}
|
||||
|
||||
TestStartTime = DateTime.Now;
|
||||
startTime = StateMachine.Time;
|
||||
estimtdEndTime = startTime + testParams.DurationLeak;
|
||||
|
||||
///------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Test_in_progress);
|
||||
///------------------------------------------------
|
||||
@@ -280,9 +280,6 @@ namespace TBF.Rig.TestMethods.LeakTest
|
||||
}
|
||||
while (e.Contains(Event.TimerBusy));
|
||||
|
||||
///
|
||||
/// Measurement loop - end
|
||||
///
|
||||
if (testParams.MaxMassIncrease > 0)
|
||||
{
|
||||
//-----------------------------------------------------
|
||||
@@ -310,10 +307,13 @@ namespace TBF.Rig.TestMethods.LeakTest
|
||||
while (!e.Contains(Event.BalanceDone));
|
||||
}
|
||||
|
||||
///
|
||||
/// Test_completed
|
||||
///
|
||||
StopRecordingStatistics();
|
||||
TestEndTime = DateTime.Now;
|
||||
StopRecordingStatistics();
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Test_completed);
|
||||
//------------------------------------------------
|
||||
|
||||
|
||||
if (testParams.IsPumpRunning)
|
||||
{
|
||||
@@ -335,11 +335,6 @@ namespace TBF.Rig.TestMethods.LeakTest
|
||||
while (e.Contains(Event.ValvesBusy));
|
||||
}
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Test_completed);
|
||||
//------------------------------------------------
|
||||
|
||||
TestEndTime = DateTime.Now;
|
||||
|
||||
/// Make sure the CycleBeginForm is closed so that water meter data (s/n) can be copied into results
|
||||
if (UIFlowControl.Stop == WaitBeginFormClosed()) goto stopTest;
|
||||
|
||||
Reference in New Issue
Block a user