Entry form related improvements / bugfixes (Fixed start collection method related).

This commit is contained in:
Milan Hanajik 2015-04-28 15:27:47 +02:00
parent 221669283d
commit 39eb2cfd57
12 changed files with 46 additions and 100 deletions

View File

@ -1,6 +1,6 @@
- historia ordrov (cez settingy)
- dokoncenie process obrazovky
- dokoncenie process obrazovky + rozsirenie pre 12 a 24 meracov
- stranka pre analyzy
------------
- brat desatinnu bodku aj ciarku
- dat zapamatanie polohy RV do Parametrov
- moznost prepinania klapky to Transition sekvencii (aby sa dala kontrolovat tesnost ventilov)

View File

@ -163,7 +163,6 @@ namespace TBF.BenchControl.Sequences
/// Make sure the CycleBeginForm is closed (aftrer an abnormal procedure/test end, etc.)
CloseBeginForm();
cycleBeginFormOpened = false;
selection = MakeSelection(MKSelContext.ProcedureNotSelected);
@ -178,7 +177,6 @@ namespace TBF.BenchControl.Sequences
/// Display 'Cycle Begin Form'
if (OpenCycleBeginForm()) goto stop;
cycleBeginFormOpened = true;
/// Find purge suquences
Entities.TransitionSequence purgeBegin = null;
@ -231,6 +229,7 @@ namespace TBF.BenchControl.Sequences
}
select_cycle_or_test:
//----------------------------------------------------------
selection = MakeSelection(MKSelContext.InsideProcedure);
///
@ -240,6 +239,8 @@ namespace TBF.BenchControl.Sequences
cycle_or_test_selected:
if (WaitBeginFormClosed()) goto stop; /// Make sure the entry form is closed
Bridge.Bench2UI(ButtonsEtc.StopBtnEn); /// Hide buttons
if (selection == Selection.Cycle)
@ -284,15 +285,8 @@ namespace TBF.BenchControl.Sequences
{
StateMachine.LoadTestParams(test);
//--------------------------------------------------------------
e = testMethodSequence.Execute(test);
if (cycleBeginFormOpened)
{
cycleBeginFormOpened = false;
if (WaitBeginFormClosed()) goto stop;
}
if (e.Contains(Event.ConfigurationError)) goto select_cycle_or_test;
if (e.Contains(Event.Error)) goto error;
if (e.Contains(Event.OpArgumentError)) goto config_error;
@ -334,15 +328,8 @@ namespace TBF.BenchControl.Sequences
{
StateMachine.LoadTestParams(test);
//--------------------------------------------------------------
e = testMethodSequence.Execute(test);
if (cycleBeginFormOpened)
{
cycleBeginFormOpened = false;
if (WaitBeginFormClosed()) goto stop;
}
if (e.Contains(Event.Error)) goto error;
if (e.Contains(Event.OpArgumentError)) goto config_error;
if (e.Contains(Event.UiCmdStop)) goto stop;
@ -378,7 +365,6 @@ namespace TBF.BenchControl.Sequences
{
CloseBeginForm();
}
cycleBeginFormOpened = false;
Bridge.OnActivity(this, "Enter protocol data");

View File

@ -103,8 +103,6 @@ namespace TBF.BenchControl.Sequences
protected static float TimeEstimateBeginRpts; /// Time estimate at the beginning of all repetitions of the current tests
protected static float TimeEstimateOneTest; /// Time estimate of the current test (one repetition)
protected static bool cycleBeginFormOpened;
static SequenceBase()
{
results = new List<Entities.TestResult>();
@ -116,8 +114,6 @@ namespace TBF.BenchControl.Sequences
WMVolumes[i] = new FloatBox() { Name = string.Format("Volume{0}", i), Format = "F2" };
WMErrors[i] = new FloatBox() { Name = string.Format("Error{0}", i), Format = "F2" };
}
cycleBeginFormOpened = false;
}
///------------------------------------------------------------

View File

@ -240,11 +240,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment
//------------------------------------------------
/// Make sure the CycleBeginForm is closed so that water meter data (s/n) can be copied into results
if (cycleBeginFormOpened)
{
cycleBeginFormOpened = false;
if (WaitBeginFormClosed()) goto stopTest;
}
///
/// Populate TestResult data entity with data

View File

@ -338,11 +338,7 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters
//------------------------------------------------
/// Make sure the CycleBeginForm is closed so that water meter data (s/n) can be copied into results
if (cycleBeginFormOpened)
{
cycleBeginFormOpened = false;
if (WaitBeginFormClosed()) goto stopTest;
}
/// Optionally supress pulses from the large water meter
if (testParams.SupressTrills)

View File

@ -38,14 +38,14 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
//--------------------------------
State.Create("CombinedWithDetection : stop diverter gate etc")
State.Create("CombinedWithDetection : stopTest diverter gate etc")
.AddOperation(checkUiOp)
.AddOperation(cBrd.StopPreviousOp())
.EnterState();
do
{
e = StateMachine.WaitRunDevsRunOps();
if (e.Contains(Event.UiCmdStop)) goto stop;
if (e.Contains(Event.UiCmdStop)) goto stopTest;
}
while (!e.Contains(Event.PreviousStopped));
@ -72,7 +72,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
switch (Transition(transitionStart, TransitionContext.TestStart))
{
case Event.Error: goto error;
case Event.UiCmdStop: goto stop;
case Event.UiCmdStop: goto stopTest;
}
//====================================
@ -93,7 +93,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
{
e = StateMachine.WaitRunDevsRunOps();
if (e.Contains(Event.Error)) goto error;
if (e.Contains(Event.UiCmdStop)) goto stop;
if (e.Contains(Event.UiCmdStop)) goto stopTest;
}
while (!e.Contains(Event.BalanceDone));
@ -108,7 +108,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
switch (EmptyTheTank(outPath.EmptyTankValve, outPath.Balance))
{
case Event.Error: goto error;
case Event.UiCmdStop: goto stop;
case Event.UiCmdStop: goto stopTest;
}
switching_flow_detection:
@ -141,7 +141,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
if (e.Contains(Event.UiCmdStop)) goto stop;
if (e.Contains(Event.UiCmdStop)) goto stopTest;
}
while (!e.Contains(Event.ValvesSet));
@ -159,7 +159,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
if (e.Contains(Event.UiCmdStop)) goto stop;
if (e.Contains(Event.UiCmdStop)) goto stopTest;
if (e.Contains(Event.RegulValveTimeOut))
{
Bridge.OnError(this, Strings.Timeout);
@ -172,7 +172,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
switch (ReadRegistersTempPressAmbient(measureOperations, false))
{
case Event.Error: goto error;
case Event.UiCmdStop: goto stop;
case Event.UiCmdStop: goto stopTest;
}
//====================================
@ -215,7 +215,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
if (e.Contains(Event.UiCmdStop)) goto stop;
if (e.Contains(Event.UiCmdStop)) goto stopTest;
}
while (!e.Contains(Event.PositionReached));
@ -232,7 +232,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
switch (ReadRegistersTempPressAmbient(measureOperations, false))
{
case Event.Error: goto error;
case Event.UiCmdStop: goto stop;
case Event.UiCmdStop: goto stopTest;
}
int time = StateMachine.Time;
@ -350,7 +350,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
if (e.Contains(Event.UiCmdStop)) goto stop;
if (e.Contains(Event.UiCmdStop)) goto stopTest;
if (e.Contains(Event.RegulValveTimeOut))
{
Bridge.OnError(this, Strings.Timeout);
@ -376,7 +376,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
if (e.Contains(Event.UiCmdStop)) goto stop;
if (e.Contains(Event.UiCmdStop)) goto stopTest;
//if (e.Contains(Event.FlowTimeOut)) goto do_detection;
}
while (!e.Contains(Event.FlowReached));
@ -396,7 +396,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
{
e = StateMachine.WaitRunDevsRunOps();
if (e.Contains(Event.Error)) goto error;
if (e.Contains(Event.UiCmdStop)) goto stop;
if (e.Contains(Event.UiCmdStop)) goto stopTest;
}
while (!e.Contains(Event.BalanceDone));
@ -416,7 +416,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
{
e = StateMachine.WaitRunDevsRunOps();
if (e.Contains(Event.Error)) goto error;
if (e.Contains(Event.UiCmdStop)) goto stop;
if (e.Contains(Event.UiCmdStop)) goto stopTest;
}
while (!e.Contains(Event.MeasurementStarted));
@ -437,7 +437,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
switch (ReadRegistersTempPressAmbient(measureOperations, true))
{
case Event.Error: goto error;
case Event.UiCmdStop: goto stop;
case Event.UiCmdStop: goto stopTest;
case Event.MeasurementCompleted: goto measurement_completed;
}
@ -503,7 +503,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
{
e = StateMachine.WaitRunDevsRunOps();
if (e.Contains(Event.Error)) goto error;
if (e.Contains(Event.UiCmdStop)) goto stop;
if (e.Contains(Event.UiCmdStop)) goto stopTest;
}
while (!e.Contains(Event.BalanceDone));
///
@ -522,7 +522,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
do
{
e = StateMachine.WaitRunDevsRunOps();
if (e.Contains(Event.UiCmdStop)) goto stop;
if (e.Contains(Event.UiCmdStop)) goto stopTest;
}
while (!e.Contains(Event.ValvesSet));
@ -535,17 +535,13 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
do
{
e = StateMachine.WaitRunDevsRunOps();
if (e.Contains(Event.UiCmdStop)) goto stop;
if (e.Contains(Event.UiCmdStop)) goto stopTest;
}
while (!e.Contains(Event.PreviousStopped));
/// Make sure the CycleBeginForm is closed so that water meter data (s/n) can be copied into results
if (cycleBeginFormOpened)
{
cycleBeginFormOpened = false;
if (WaitBeginFormClosed()) goto stop;
}
if (WaitBeginFormClosed()) goto stopTest;
/// Optionally supress pulses from the large water meter
if (testParams.SupressTrills)
@ -671,7 +667,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
switch (Transition(transitionStop, TransitionContext.TestEnd))
{
case Event.Error: goto error;
case Event.UiCmdStop: goto stop;
case Event.UiCmdStop: goto stopTest;
}
/// Create the return value - a list with one event Event.Done - and return
@ -680,7 +676,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
return retval1;
//====================================
stop:
stopTest:
State.Create("CombinedWithDetection : User selected STOP -> Closing the valves")
.AddOperation(checkUiOp)

View File

@ -474,11 +474,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
//------------------------------------------------
/// Make sure the CycleBeginForm is closed so that water meter data (s/n) can be copied into results
if (cycleBeginFormOpened)
{
cycleBeginFormOpened = false;
if (WaitBeginFormClosed()) goto stopTest;
}
///
/// Populate TestResult data entity with data

View File

@ -209,11 +209,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
//------------------------------------------------
/// Make sure the CycleBeginForm is closed so that water meter data (s/n) can be copied into results
if (cycleBeginFormOpened)
{
cycleBeginFormOpened = false;
if (WaitBeginFormClosed()) goto stopTest;
}
///
/// Populate TestResult data entity with data

View File

@ -370,11 +370,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
//------------------------------------------------
/// Make sure the CycleBeginForm is closed so that water meter data (s/n) can be copied into results
if (cycleBeginFormOpened)
{
cycleBeginFormOpened = false;
if (WaitBeginFormClosed()) goto stopTest;
}
///
/// Populate TestResult data entity with data

View File

@ -253,11 +253,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest
//------------------------------------------------
/// Make sure the CycleBeginForm is closed so that water meter data (s/n) can be copied into results
if (cycleBeginFormOpened)
{
cycleBeginFormOpened = false;
if (WaitBeginFormClosed()) goto stopTest;
}
///
/// Populate TestResult data entity with data

View File

@ -172,11 +172,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
//------------------------------------------------
/// Make sure the CycleBeginForm is closed so that water meter data (s/n) can be copied into results
if (cycleBeginFormOpened)
{
cycleBeginFormOpened = false;
if (WaitBeginFormClosed()) goto stopTest;
}
///
/// Populate TestResult data entity with data

View File

@ -326,11 +326,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
//------------------------------------------------
/// Make sure the CycleBeginForm is closed so that water meter data (s/n) can be copied into results
if (cycleBeginFormOpened)
{
cycleBeginFormOpened = false;
if (WaitBeginFormClosed()) goto stopTest;
}
///
/// Populate TestResult data entity with data