diff --git a/TestBenchFramework/BenchControl/DataEntry/Munich/EntryForm.cs b/TestBenchFramework/BenchControl/DataEntry/Munich/EntryForm.cs
index 98333e89d..4d86649ad 100644
--- a/TestBenchFramework/BenchControl/DataEntry/Munich/EntryForm.cs
+++ b/TestBenchFramework/BenchControl/DataEntry/Munich/EntryForm.cs
@@ -139,7 +139,7 @@ namespace TBF.BenchControl.DataEntry.Munich
resultSaved = true;
}
- return Event.ModelessFormDone; /// Form closed
+ return Event.ModelessFormClosed; /// Form closed
}
/// Stop this operation
diff --git a/TestBenchFramework/BenchControl/DataEntry/Munich3/EntryForm.cs b/TestBenchFramework/BenchControl/DataEntry/Munich3/EntryForm.cs
index aa2dae071..6d40e118e 100644
--- a/TestBenchFramework/BenchControl/DataEntry/Munich3/EntryForm.cs
+++ b/TestBenchFramework/BenchControl/DataEntry/Munich3/EntryForm.cs
@@ -131,7 +131,7 @@ namespace TBF.BenchControl.DataEntry.Munich3
resultSaved = true;
}
- return Event.ModelessFormDone; /// Form closed
+ return Event.ModelessFormClosed; /// Form closed
}
/// Stop this operation
diff --git a/TestBenchFramework/BenchControl/Elde/RegulValve/SetFlowOp.cs b/TestBenchFramework/BenchControl/Elde/RegulValve/SetFlowOp.cs
index 2b612ac8a..dd7be0ddc 100644
--- a/TestBenchFramework/BenchControl/Elde/RegulValve/SetFlowOp.cs
+++ b/TestBenchFramework/BenchControl/Elde/RegulValve/SetFlowOp.cs
@@ -165,7 +165,7 @@ namespace TBF.BenchControl.Elde.RegulValve
/// Run this operation
///
- /// Event.None, Event.FlowReached, Event.RegulValveTimeOut, Event.Error
+ /// Event.None, Event.FlowReached, Event.RegulValveTimeOut, Event.OpArgumentError
///
public Event Run()
{
@@ -198,7 +198,7 @@ namespace TBF.BenchControl.Elde.RegulValve
{
if (reqFlowLo >= reqFlowHi || reqFlowLo > flowMeter.NominalFlow || reqFlowHi <= 0)
{
- return Event.Error;
+ return Event.OpArgumentError;
}
log.InfoFormat("Run(): rv#={0} flowMtr#={1} TARGET: flowLo={2} flowHi={3}",
diff --git a/TestBenchFramework/BenchControl/Elde/RegulValve/SetRegulValvePositionOp.cs b/TestBenchFramework/BenchControl/Elde/RegulValve/SetRegulValvePositionOp.cs
index dc4b99f49..6d1121ddf 100644
--- a/TestBenchFramework/BenchControl/Elde/RegulValve/SetRegulValvePositionOp.cs
+++ b/TestBenchFramework/BenchControl/Elde/RegulValve/SetRegulValvePositionOp.cs
@@ -73,7 +73,9 @@ namespace TBF.BenchControl.Elde.RegulValve
/// Run this operation
///
- /// Event.SetFlowDone
+ /// Event.None . . . . . . . busy adjusting position
+ /// Event.PositionReached . . position reached
+ /// Event.OpArgumentError . . invalid required position
///
public Event Run()
{
@@ -81,7 +83,7 @@ namespace TBF.BenchControl.Elde.RegulValve
{
if (posLoPct >= posHiPct || posLoPct >= 100.0f || posHiPct <= 0)
{
- return Event.Error;
+ return Event.OpArgumentError;
}
firstRun = false;
@@ -99,7 +101,7 @@ namespace TBF.BenchControl.Elde.RegulValve
if (posLoPct >= posHiPct || posLoPct >= 100.0f || posHiPct <= 0)
{
- return Event.Error;
+ return Event.OpArgumentError;
}
else if (posLoPct <= positionPct && positionPct <= posHiPct)
{
diff --git a/TestBenchFramework/BenchControl/Events.cs b/TestBenchFramework/BenchControl/Events.cs
index 717aee66c..689d08f9a 100644
--- a/TestBenchFramework/BenchControl/Events.cs
+++ b/TestBenchFramework/BenchControl/Events.cs
@@ -28,7 +28,7 @@
{
None = 0,
Done,
- ModelessFormDone,
+ ModelessFormClosed,
ValvesSet,
AmbientDone,
BalanceDone,
@@ -90,6 +90,7 @@
/// Generic
Error, /// Many ops.: Fatal error occurred
+ OpArgumentError,
ConfigurationError,
Yes,
No,
diff --git a/TestBenchFramework/BenchControl/Sequences/MainSeq.cs b/TestBenchFramework/BenchControl/Sequences/MainSeq.cs
index 1fc7b0bec..bf0f6530f 100644
--- a/TestBenchFramework/BenchControl/Sequences/MainSeq.cs
+++ b/TestBenchFramework/BenchControl/Sequences/MainSeq.cs
@@ -53,14 +53,14 @@ namespace TBF.BenchControl.Sequences
Entities.TransitionSequence purgeBegin;
Entities.TransitionSequence purgeEnd;
- StateMachine.LoadProcedure(true);
+ StateMachine.LoadProcedure(true); // TODO: Implement as an operation so that the worker thread is not blocked
Bridge.Bench2UI(ButtonsEtc.StopBtnEn);
//------------------------------------------------
Bridge.OnActivity(this, Strings.Measuring_the_weight);
//------------------------------------------------
- State.Create(Strings.Set_route)
+ State.Create("MainSeq : Setting valves to the default state")
.AddOperation(new MettlerToledo.ReadMassesOp())
.AddOperation(cBrd.SetValvesOp(StateMachine.DefaultValvesOpen, StateMachine.DefaultValvesClose))
.EnterState();
@@ -478,7 +478,7 @@ namespace TBF.BenchControl.Sequences
{
Bridge.OnActivity(this, "Enter the protocol data");
- if (!State.Events.Contains(Event.ModelessFormDone))
+ if (!State.LastEvents.Contains(Event.ModelessFormClosed))
{
/// Wait until modeless dialg is closed
State.Create("MainSeq : Check whether the entry form is closed")
@@ -489,7 +489,7 @@ namespace TBF.BenchControl.Sequences
e = StateMachine.WaitRunDevsRunOps();
if (e.Contains(Event.UiCmdStop)) goto stop;
}
- while (!e.Contains(Event.ModelessFormDone));
+ while (!e.Contains(Event.ModelessFormClosed));
}
/// A state without any dataEntryCmpnt operation so that Stop() when entering
@@ -511,7 +511,7 @@ namespace TBF.BenchControl.Sequences
e = StateMachine.WaitRunDevsRunOps();
if (e.Contains(Event.UiCmdStop)) goto stop;
}
- while (!e.Contains(Event.ModelessFormDone));
+ while (!e.Contains(Event.ModelessFormClosed));
if (dataEntryCmpnt is IHasProtocolTitle)
{
diff --git a/TestBenchFramework/BenchControl/State.cs b/TestBenchFramework/BenchControl/State.cs
index f1a0000e0..481e0e6c8 100644
--- a/TestBenchFramework/BenchControl/State.cs
+++ b/TestBenchFramework/BenchControl/State.cs
@@ -27,7 +27,7 @@ namespace TBF.BenchControl
///
/// Events returned by the last RunOperations()
///
- public static IList Events;
+ public static IList LastEvents;
/// State with an empty list of operations
@@ -205,7 +205,7 @@ namespace TBF.BenchControl
}
}
- Events = events;
+ LastEvents = events;
return events;
}
diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartCollectionMethod/FlyingStartCollectionMethodSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartCollectionMethod/FlyingStartCollectionMethodSeq.cs
index 19a41b81b..5354dc798 100644
--- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartCollectionMethod/FlyingStartCollectionMethodSeq.cs
+++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStartCollectionMethod/FlyingStartCollectionMethodSeq.cs
@@ -152,6 +152,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, cBrd, flowSetTime, progress));
if (e.Contains(Event.UiCmdStop)) goto stop;
+ if (e.Contains(Event.OpArgumentError))
if (e.Contains(Event.RegulValveTimeOut)) goto error;
if (e.Contains(Event.Next)) goto flow_set;
}