FixedStartDeferredEvalSeq : Delay time before grabbing images introduced.
This commit is contained in:
@@ -386,18 +386,33 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEval
|
|||||||
while (!e.Contains(Event.ValvesSet));
|
while (!e.Contains(Event.ValvesSet));
|
||||||
|
|
||||||
|
|
||||||
int time = StateMachine.Time;
|
if (test.TimeFlow2Mass > 0)
|
||||||
double currentFlow = RefFlow.Val;
|
{
|
||||||
|
State.Create(string.Format("{0}({1}) : Waiting before grabbing images", test.Method, test.Name))
|
||||||
|
.AddOperation(checkUiOp)
|
||||||
|
.AddOperations(readTempPressOps)
|
||||||
|
.AddOperation(new Operations.TimerOp(test.TimeFlow2Mass))
|
||||||
|
.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.TimerExpired));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
TestStartTime = DateTime.Now;
|
TestStartTime = DateTime.Now;
|
||||||
LogProcessDataTestInfo(processDataLogger, test.Procedure.Name, test.Name);
|
LogProcessDataTestInfo(processDataLogger, test.Procedure.Name, test.Name);
|
||||||
|
int startTime = StateMachine.Time;
|
||||||
int startPulses = 0;
|
int startPulses = 0;
|
||||||
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Grab start images
|
/// Take start images
|
||||||
///
|
///
|
||||||
|
//-----------------------------------------------------------------
|
||||||
|
Bridge.OnActivity(this, Strings.Grabbing_images);
|
||||||
|
//-----------------------------------------------------------------
|
||||||
string fileName = string.Format("{0}-start.bmp", test.Name);
|
string fileName = string.Format("{0}-start.bmp", test.Name);
|
||||||
string[] startImages = new string[sensPath.RegisterReaders.Length];
|
string[] startImages = new string[sensPath.RegisterReaders.Length];
|
||||||
///
|
///
|
||||||
@@ -632,8 +647,26 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEval
|
|||||||
|
|
||||||
EndTime = (double)StateMachine.Time;
|
EndTime = (double)StateMachine.Time;
|
||||||
TestEndTime = DateTime.Now;
|
TestEndTime = DateTime.Now;
|
||||||
int endPulses = cBrd.EtPulses(0);
|
|
||||||
|
|
||||||
|
|
||||||
|
if (test.TimeStop2Mass > 0)
|
||||||
|
{
|
||||||
|
State.Create(string.Format("{0}({1}) : Waiting before grabbing images", test.Method, test.Name))
|
||||||
|
.AddOperation(checkUiOp)
|
||||||
|
.AddOperations(readTempPressOps)
|
||||||
|
.AddOperation(processDataLoggingOp)
|
||||||
|
.AddOperation(new Operations.TimerOp(test.TimeStop2Mass))
|
||||||
|
.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.TimerExpired));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int endPulses = cBrd.EtPulses(0);
|
||||||
switchTimeEnd = 0.001f * cBrd.ValveOpenCloseTime;
|
switchTimeEnd = 0.001f * cBrd.ValveOpenCloseTime;
|
||||||
log.WarnFormat("Start valve switch time on test end = {0} ms", cBrd.ValveOpenCloseTime);
|
log.WarnFormat("Start valve switch time on test end = {0} ms", cBrd.ValveOpenCloseTime);
|
||||||
|
|
||||||
@@ -659,6 +692,9 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEval
|
|||||||
///
|
///
|
||||||
/// Grab END images
|
/// Grab END images
|
||||||
///
|
///
|
||||||
|
//-----------------------------------------------------------------
|
||||||
|
Bridge.OnActivity(this, Strings.Grabbing_images);
|
||||||
|
//-----------------------------------------------------------------
|
||||||
fileName = string.Format("{0}-end.bmp", test.Name);
|
fileName = string.Format("{0}-end.bmp", test.Name);
|
||||||
string[] endImages = new string[sensPath.RegisterReaders.Length];
|
string[] endImages = new string[sensPath.RegisterReaders.Length];
|
||||||
///
|
///
|
||||||
|
|||||||
+16
-13
@@ -650,20 +650,23 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
|||||||
//------------------------------------------------
|
//------------------------------------------------
|
||||||
Bridge.OnActivity(this, Strings.Measuring_the_weight);
|
Bridge.OnActivity(this, Strings.Measuring_the_weight);
|
||||||
//------------------------------------------------
|
//------------------------------------------------
|
||||||
State.Create(string.Format("{0}({1}) : Waiting before the 2nd mass measurement", test.Method, test.Name))
|
if (test.TimeStop2Mass > 0)
|
||||||
.AddOperation(checkUiOp)
|
{
|
||||||
.AddOperations(readTempPressOps)
|
State.Create(string.Format("{0}({1}) : Waiting before the 2nd mass measurement", test.Method, test.Name))
|
||||||
.AddOperation(scale.ReadMassOp(ref Mass))
|
.AddOperation(checkUiOp)
|
||||||
.AddOperation(cBrd.ReadDiverterTransitionOp(outPath.Diverter, CountWhenSendingRdDivCmd, CountWhenReadingDiv, false, DiverterEnd, BatchRslts.Batch.BatchNr, test.Name, repetitionNr))
|
.AddOperations(readTempPressOps)
|
||||||
.AddOperation(processDataLoggingOp)
|
.AddOperation(scale.ReadMassOp(ref Mass))
|
||||||
.AddOperation(new Operations.TimerOp(test.TimeStop2Mass))
|
.AddOperation(cBrd.ReadDiverterTransitionOp(outPath.Diverter, CountWhenSendingRdDivCmd, CountWhenReadingDiv, false, DiverterEnd, BatchRslts.Batch.BatchNr, test.Name, repetitionNr))
|
||||||
.EnterState();
|
.AddOperation(processDataLoggingOp)
|
||||||
do {
|
.AddOperation(new Operations.TimerOp(test.TimeStop2Mass))
|
||||||
e = StateMachine.WaitRunDevsRunOps();
|
.EnterState();
|
||||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
do {
|
||||||
if (TestAndLogUiCmdStop(test,e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
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.TimerExpired) || !e.Contains(Event.BalanceDone));
|
||||||
}
|
}
|
||||||
while (!e.Contains(Event.TimerExpired) || !e.Contains(Event.BalanceDone));
|
|
||||||
|
|
||||||
|
|
||||||
if (heatMetersPath == null) LogProcessDataHeader(processDataLogger, "End mass");
|
if (heatMetersPath == null) LogProcessDataHeader(processDataLogger, "End mass");
|
||||||
|
|||||||
Generated
+9
@@ -2013,6 +2013,15 @@ namespace TBF.Resources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Grabbing images.
|
||||||
|
/// </summary>
|
||||||
|
internal static string Grabbing_images {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Grabbing_images", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Graphs.
|
/// Looks up a localized string similar to Graphs.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -2128,4 +2128,7 @@
|
|||||||
<data name="calculated" xml:space="preserve">
|
<data name="calculated" xml:space="preserve">
|
||||||
<value>calculated</value>
|
<value>calculated</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Grabbing_images" xml:space="preserve">
|
||||||
|
<value>Grabbing images</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
Reference in New Issue
Block a user