Bug fix : Purging sequence is executed after cycle selection after a STOP in the previous evacuation sequence, ver. 2.18.1207

This commit is contained in:
Milan Hanajik
2019-05-03 09:47:26 +02:00
parent d0bba74dff
commit 04547306d0
3 changed files with 19 additions and 22 deletions
+9 -8
View File
@@ -1243,7 +1243,7 @@ namespace TBF.BenchControl.Sequences
ProcessData.BatchRslts.Batch.RsltsSent = resultsSent; ProcessData.BatchRslts.Batch.RsltsSent = resultsSent;
/// ///
/// Save results to the built in 'Results' database /// Save results to 'Results' MySQL database
/// ///
Results.DB.SaveNewBatch(ProcessData.BatchRslts.Batch); Results.DB.SaveNewBatch(ProcessData.BatchRslts.Batch);
@@ -1268,18 +1268,16 @@ namespace TBF.BenchControl.Sequences
/// Evacuation is similar to 'Abort session' (no results are saved), but the evacuation is done as well. /// Evacuation is similar to 'Abort session' (no results are saved), but the evacuation is done as well.
StateMachine.ControlBoard.ManualUIAllowed = true; StateMachine.ControlBoard.ManualUIAllowed = true;
Event evacRetv = DoEvacuation(purgeEnd);
Bridge.OnProcedureCompleted(this, new ProcedureCompletedEventArgs(StateMachine.Procedure));
switch (DoEvacuation(purgeEnd)) switch (evacRetv)
{ {
case Event.Error: goto error; case Event.Error: goto error;
case Event.UiCmdStop: goto stop; case Event.UiCmdStop: goto stop;
default: break; default: goto select_procedure;
} }
Bridge.OnProcedureCompleted(this, new ProcedureCompletedEventArgs(StateMachine.Procedure));
goto select_procedure;
stop_within_cycle: stop_within_cycle:
//-------------------------------- //--------------------------------
@@ -1891,14 +1889,18 @@ namespace TBF.BenchControl.Sequences
} }
//-------------------------------------------------------- //--------------------------------------------------------
benchFilled = false; /// because evacuation sequence started
///
switch (Transition(purgeEnd, TransitionContext.PurgeEnd)) switch (Transition(purgeEnd, TransitionContext.PurgeEnd))
{ {
case Event.Error: case Event.Error:
if (simultWithEvacuationCount > 0) CloseIPerlCommForm(); if (simultWithEvacuationCount > 0) CloseIPerlCommForm();
return Event.Error; return Event.Error;
case Event.UiCmdStop: case Event.UiCmdStop:
if (simultWithEvacuationCount > 0) CloseIPerlCommForm(); if (simultWithEvacuationCount > 0) CloseIPerlCommForm();
return Event.UiCmdStop; return Event.UiCmdStop;
default: default:
break; break;
} }
@@ -1932,7 +1934,6 @@ namespace TBF.BenchControl.Sequences
modelessDlg = null; modelessDlg = null;
} }
benchFilled = false;
Bridge.Bench2UI(ButtonsEtc.ShowBenchEmpty); Bridge.Bench2UI(ButtonsEtc.ShowBenchEmpty);
return Event.Done; return Event.Done;
@@ -380,11 +380,10 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication.iPerlHead
public void Initialize() public void Initialize()
{ {
ClearData(); ClearData();
optoSerialPortParsingEnabled = false;
if (DebugLevel == DebugMode.Normal) if (DebugLevel == DebugMode.Normal)
{ {
optoSerialPortParsingEnabled = false;
/// Allocate memory for opto-data from iPerl /// Allocate memory for opto-data from iPerl
optoData = new OptoTelegramRaw[MaxOptoDataCount]; optoData = new OptoTelegramRaw[MaxOptoDataCount];
for (int i = 0; i < MaxOptoDataCount; i++) optoData[i] = new OptoTelegramRaw(); for (int i = 0; i < MaxOptoDataCount; i++) optoData[i] = new OptoTelegramRaw();
@@ -471,10 +470,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication.iPerlHead
{ {
try try
{ {
if (optoSerialPortParsingEnabled) ReadOptoData(optoSerialPortParsingEnabled ? OptoState.Read : OptoState.Flush);
ReadOptoData(OptoState.Read);
else
ReadOptoData(OptoState.Flush);
} }
catch (Exception e) catch (Exception e)
{ {
@@ -556,7 +552,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication.iPerlHead
TestEndTelegramIx = 0; TestEndTelegramIx = 0;
/// File name is: PCB_AA_BB_HH_MI_SS..txt /// File name is: PCB_AA_BB_HH_MI_SS..txt
string wmPosition = Name.Substring(5); string wmPosition = Name.Substring(5); /// WMPosition is extracted from a component name in form 'iPerl#'
if (wmPosition.Length == 1) wmPosition = "0" + wmPosition; if (wmPosition.Length == 1) wmPosition = "0" + wmPosition;
SensusTestInfo[] testInfos = Sequences.ProcessData.CompleteTestInfos; SensusTestInfo[] testInfos = Sequences.ProcessData.CompleteTestInfos;
+2 -2
View File
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number // Build Number
// Revision // Revision
// //
[assembly: AssemblyVersion("2.18.1206.0")] [assembly: AssemblyVersion("2.18.1207.0")]
[assembly: AssemblyFileVersion("2.18.1206.0")] [assembly: AssemblyFileVersion("2.18.1207.0")]