Koncim 8.8.14

This commit is contained in:
Milan Hanajik
2014-08-08 16:25:51 +02:00
parent ae09afef59
commit ffb4d5afb6
8 changed files with 19 additions and 15 deletions
@@ -139,7 +139,7 @@ namespace TBF.BenchControl.DataEntry.Munich
resultSaved = true;
}
return Event.ModelessFormDone; /// Form closed
return Event.ModelessFormClosed; /// Form closed
}
/// <summary>Stop this operation</summary>
@@ -131,7 +131,7 @@ namespace TBF.BenchControl.DataEntry.Munich3
resultSaved = true;
}
return Event.ModelessFormDone; /// Form closed
return Event.ModelessFormClosed; /// Form closed
}
/// <summary>Stop this operation</summary>
@@ -165,7 +165,7 @@ namespace TBF.BenchControl.Elde.RegulValve
/// <summary>Run this operation</summary>
/// <returns>
/// Event.None, Event.FlowReached, Event.RegulValveTimeOut, Event.Error
/// Event.None, Event.FlowReached, Event.RegulValveTimeOut, Event.OpArgumentError
/// </returns>
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}",
@@ -73,7 +73,9 @@ namespace TBF.BenchControl.Elde.RegulValve
/// <summary>Run this operation</summary>
/// <returns>
/// Event.SetFlowDone
/// Event.None . . . . . . . busy adjusting position
/// Event.PositionReached . . position reached
/// Event.OpArgumentError . . invalid required position
/// </returns>
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)
{
+2 -1
View File
@@ -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,
@@ -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)
{
+2 -2
View File
@@ -27,7 +27,7 @@ namespace TBF.BenchControl
/// <summary>
/// Events returned by the last RunOperations()
/// </summary>
public static IList<Event> Events;
public static IList<Event> LastEvents;
/// <summary>State with an empty list of operations</summary>
@@ -205,7 +205,7 @@ namespace TBF.BenchControl
}
}
Events = events;
LastEvents = events;
return events;
}
@@ -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;
}