(1) Flow selection in New Test Wizard extended, (2) MainSeq and BencControlPael modified, etc.

This commit is contained in:
Milan Hanajik
2017-05-03 22:24:25 +02:00
parent 54a6c1e402
commit 17c685148e
12 changed files with 1139 additions and 953 deletions
@@ -164,7 +164,7 @@ namespace TBF.BenchControl.Sequences
!e.Contains(Event.ValvesBusy) &&
!e.Contains(Event.CameraBusy))
{
goto stop_emptying;
goto stop_draining;
}
}
while (e.Contains(Event.TimerBusy) ||
@@ -175,9 +175,9 @@ namespace TBF.BenchControl.Sequences
Bridge.OnActivity(this, Strings.Emptying_tank);
stop_emptying:
stop_draining:
//--------------------------------------------------------------------------------------------
State stopEmptying = State.Create("MainSeq : Stop emptying of water tanks")
State stopDraining = State.Create("MainSeq : Stop draining water tanks")
.AddOperation(checkUiOp)
.AddOperation(StateMachine.ControlBoard.SetValvesOp(null, allDrainValves))
.EnterState();
@@ -779,18 +779,8 @@ namespace TBF.BenchControl.Sequences
}
}
if (BatchRslts.AllTestsDone())
{
Bridge.Bench2UI(ButtonsEtc.AcceptResultsBtnEn | ButtonsEtc.ResetResultsBtnEn);
}
else
{
Bridge.Bench2UI(ButtonsEtc.ResetResultsBtnEn);
}
goto select_cycle_or_test;
evacuation:
save_results:
UiBridge.Bridge.OnError(this, string.Empty); /// Clear an error message (if any)
@@ -905,6 +895,10 @@ namespace TBF.BenchControl.Sequences
ProcessData.BatchRslts.Batch.ProcedureName,
Program.LocalSettings.BatchNr);
evacuation:
/// Evacuation is similar to 'Abort session' (no results are saved), but the evacuation is done as well.
if (simultWithEvacuationCount > 0)
{
/// Open iPerlCommunicationForm
@@ -1105,14 +1099,13 @@ namespace TBF.BenchControl.Sequences
Bridge.Bench2UI(((context == MKSelContext.ProcedureNotSelected) ? ButtonsEtc.ProcedureCmbBoxEn : 0) |
ButtonsEtc.TestCmbBoxEn |
ButtonsEtc.StopBtnEn |
((context == MKSelContext.InsideProcedure) ? ButtonsEtc.Break : 0) |
((context == MKSelContext.InsideProcedure && BatchRslts.AllTestsDone()) ? ButtonsEtc.AcceptResultsBtnEn : 0) |
((draining1 || draining2 || draining3) ? 0 :
(ButtonsEtc.StartCycleBtnEn |
ButtonsEtc.StartTestBtnsEn |
ButtonsEtc.PurgeBeginBtnEn |
((context == MKSelContext.InsideProcedure) ? ButtonsEtc.PurgeEndBtnEn : 0) |
ButtonsEtc.SensitivityTestBtnEn |
((Cameras.Count > 0) ? ButtonsEtc.CalibrationBtnEn : 0) |
ButtonsEtc.Break)) |
((context == MKSelContext.InsideProcedure) ? ButtonsEtc.PurgeEndBtnEn : 0))) |
(((StateMachine.Scale1 != null) && (StateMachine.DrainValve1 != null) && !draining1) ? ButtonsEtc.DrainTankBtn1En : 0) |
(((StateMachine.Scale2 != null) && (StateMachine.DrainValve2 != null) && !draining2) ? ButtonsEtc.DrainTankBtn2En : 0) |
(((StateMachine.Scale3 != null) && (StateMachine.DrainValve3 != null) && !draining3) ? ButtonsEtc.DrainTankBtn3En : 0));
@@ -14,6 +14,7 @@ using TBF.BenchControl.Generic;
using TBF.BenchControl.GenericDevices;
using TBF.BenchControl.Sequences;
using Dirichlet.Numerics;
using TBF.Resources;
namespace TBF.BenchControl
{
@@ -481,9 +482,13 @@ namespace TBF.BenchControl
pmtrs = GetMetersPath(test);
if (pfeed == null) errorMsg = Strings.Cannot_load_feeding_path;
else if (pben == null) errorMsg = Strings.Cannot_load_bench_path;
else if (pout == null) errorMsg = Strings.Cannot_load_output_path;
else if (pmtrs == null) errorMsg = Strings.Cannot_load_sensor_path;
else errorMsg = string.Empty;
if ((pfeed == null) || (pben == null) || (pout == null) || (pmtrs == null))
{
errorMsg = "Cannot load paths";
return false;
}
@@ -105,7 +105,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
int repetitionNr = outerLoopMode ? outerLoopCounter : 1; /// First test: repetitionNr = 1
if (test.Volume >= outPath.Scale.Capacity * Constants.TankFullFactor)
if (test.Volume > outPath.Scale.Capacity * Constants.TankFullFactor)
{
Bridge.OnError(this, Strings.Test_volume_exceeds_the_scale_capacity);
retVal = Event.UiCmdStop;