|
|
@@ -91,10 +91,6 @@ namespace PunkHPX8_RT.Modules.PlatingCell
|
|
|
/// 工艺当前执行小步骤
|
|
|
/// </summary>
|
|
|
private string _currentStepState = "Init";
|
|
|
- /// <summary>
|
|
|
- /// 当前是否在跑dummy recipe
|
|
|
- /// </summary>
|
|
|
- private bool _isCurrentRunDummyRecipe;
|
|
|
#endregion
|
|
|
|
|
|
#region 属性
|
|
|
@@ -205,16 +201,6 @@ namespace PunkHPX8_RT.Modules.PlatingCell
|
|
|
/// 当前工步
|
|
|
/// </summary>
|
|
|
public string CurrentStepState { get { return _currentStepState; } }
|
|
|
- /// <summary>
|
|
|
- /// 是否正在跑dummy recipe
|
|
|
- /// </summary>
|
|
|
- public bool IsCurrentRunDummyRecipe
|
|
|
- {
|
|
|
- get
|
|
|
- {
|
|
|
- return _isCurrentRunDummyRecipe;
|
|
|
- }
|
|
|
- }
|
|
|
#endregion
|
|
|
|
|
|
/// <summary>
|
|
|
@@ -344,8 +330,7 @@ namespace PunkHPX8_RT.Modules.PlatingCell
|
|
|
//Cycle Manual Process
|
|
|
Transition(PlatingCellState.Idle, PlatingCellMsg.RunRecipe, CycleManualProcess, PlatingCellState.RunReciping);
|
|
|
Transition(PlatingCellState.RunReciping, FSM_MSG.TIMER, CycleManualMonitor, PlatingCellState.Idle);
|
|
|
- Transition(PlatingCellState.RunReciping, PlatingCellMsg.Abort, RunRecipeAbort, PlatingCellState.Idle);
|
|
|
- Transition(PlatingCellState.RunReciping, PlatingCellMsg.Abort, AbortRecipe, PlatingCellState.Abort);
|
|
|
+ Transition(PlatingCellState.RunReciping, PlatingCellMsg.Abort, AbortRecipe, PlatingCellState.Idle);
|
|
|
//Unload
|
|
|
Transition(PlatingCellState.Idle, PlatingCellMsg.Unload, Unload, PlatingCellState.Unloading);
|
|
|
Transition(PlatingCellState.Unloading, FSM_MSG.TIMER, UnloadMonitor, PlatingCellState.Idle);
|
|
|
@@ -370,13 +355,21 @@ namespace PunkHPX8_RT.Modules.PlatingCell
|
|
|
return 0;
|
|
|
}
|
|
|
int remainTime = 0;
|
|
|
- if(_recipeTime != 0 && !_isCurrentRunDummyRecipe)
|
|
|
+ if (WaferInfo == null || WaferInfo.IsEmpty)
|
|
|
{
|
|
|
- remainTime = (int)(_recipeTime - Math.Round((double)_runRecipeRoutine.ElapsedMilliseconds / 1000));
|
|
|
+ return 0;
|
|
|
}
|
|
|
- if (_recipeTime != 0 && _isCurrentRunDummyRecipe)
|
|
|
+
|
|
|
+ if (_recipeTime != 0)
|
|
|
{
|
|
|
- remainTime = (int)(_recipeTime - Math.Round((double)_dummyRinseRunRecipeRoutine.ElapsedMilliseconds / 1000));
|
|
|
+ if (WaferInfo.WaferType == WaferType.Production)
|
|
|
+ {
|
|
|
+ remainTime = (int)(_recipeTime - Math.Round((double)_runRecipeRoutine.ElapsedMilliseconds / 1000));
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ remainTime = (int)(_recipeTime - Math.Round((double)_dummyRinseRunRecipeRoutine.ElapsedMilliseconds / 1000));
|
|
|
+ }
|
|
|
}
|
|
|
return remainTime;
|
|
|
|
|
|
@@ -388,8 +381,12 @@ namespace PunkHPX8_RT.Modules.PlatingCell
|
|
|
/// <returns></returns>
|
|
|
public bool AbortRecipe(object[] param)
|
|
|
{
|
|
|
+ if (WaferInfo == null || WaferInfo.IsEmpty)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
//后续还要增加lottrack相关
|
|
|
- if (!_isCurrentRunDummyRecipe)
|
|
|
+ if (WaferInfo.WaferType==WaferType.Production)
|
|
|
{
|
|
|
_runRecipeRoutine.Abort();
|
|
|
|
|
|
@@ -565,10 +562,21 @@ namespace PunkHPX8_RT.Modules.PlatingCell
|
|
|
/// <returns></returns>
|
|
|
private bool CycleManualProcess(object[] param)
|
|
|
{
|
|
|
+ if (WaferInfo == null || WaferInfo.IsEmpty)
|
|
|
+ {
|
|
|
+ LOG.WriteLog(eEvent.ERR_PLATINGCELL, Module.ToString(), "Wafer is empty");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
bool _isDummyLoad = (bool)param[1];
|
|
|
+
|
|
|
+ if (_isDummyLoad && WaferInfo.WaferType == WaferType.Production)
|
|
|
+ {
|
|
|
+ LOG.WriteLog(eEvent.ERR_PLATINGCELL, Module.ToString(), "production wafer cannot execute dummy recipe");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
if (!_isDummyLoad)
|
|
|
{
|
|
|
- _isCurrentRunDummyRecipe = false;
|
|
|
bool result = _runRecipeRoutine.Start(param) == RState.Running;
|
|
|
_currentStepState = "";
|
|
|
DepRecipe recipe = param[0] as DepRecipe;
|
|
|
@@ -583,7 +591,6 @@ namespace PunkHPX8_RT.Modules.PlatingCell
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- _isCurrentRunDummyRecipe = true;
|
|
|
bool result = _dummyRinseRunRecipeRoutine.Start(param) == RState.Running;
|
|
|
_currentStepState = "";
|
|
|
DqdrRecipe recipe = param[0] as DqdrRecipe;
|
|
|
@@ -603,7 +610,15 @@ namespace PunkHPX8_RT.Modules.PlatingCell
|
|
|
/// <returns></returns>
|
|
|
private bool CycleManualMonitor(object[] param)
|
|
|
{
|
|
|
- if (!_isCurrentRunDummyRecipe)
|
|
|
+ if (WaferInfo == null || WaferInfo.IsEmpty)
|
|
|
+ {
|
|
|
+ PostMsg(PlatingCellMsg.Error);
|
|
|
+ LOG.WriteLog(eEvent.ERR_PLATINGCELL, Module.ToString(), "Wafer is empty");
|
|
|
+ _currentStepState = "";
|
|
|
+ _currentRecipe = null;
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (WaferInfo.WaferType==WaferType.Production)
|
|
|
{
|
|
|
RState state = _runRecipeRoutine.Monitor();
|
|
|
_currentStepState = _runRecipeRoutine.CurrentStep;
|
|
|
@@ -644,8 +659,7 @@ namespace PunkHPX8_RT.Modules.PlatingCell
|
|
|
_currentRecipe = null;
|
|
|
}
|
|
|
return result;
|
|
|
- }
|
|
|
-
|
|
|
+ }
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 中止
|