|
@@ -945,31 +945,32 @@ namespace Venus_RT.Modules
|
|
|
UpdateModuleMovingStatus(slot.Key.Module);
|
|
|
UpdateModuleMovingStatus(destSlot.Module);
|
|
|
|
|
|
- // check whether match swap pattern
|
|
|
- int swapCount = 0;
|
|
|
- var in_slots = SearchWaitInSlots(slot.Key.Module);
|
|
|
- foreach (var swap_slot in in_slots)
|
|
|
+
|
|
|
+ // check whether match double move pattern
|
|
|
+ int inCount = 0;
|
|
|
+ var same_dest = SearchWaitInSlots(destSlot.Module);
|
|
|
+ foreach (var in_slot in same_dest)
|
|
|
{
|
|
|
- if (_vacModules[swap_slot.SourceModule].MovingStatus == MovingStatus.Idle && swapCount < 1)
|
|
|
+ if (_vacModules[in_slot.SourceModule].MovingStatus == MovingStatus.Idle && inCount < 1)
|
|
|
{
|
|
|
- _movingItems.Add(swap_slot);
|
|
|
- UpdateItemMovingStatus(swap_slot);
|
|
|
- swapCount++;
|
|
|
+ _movingItems.Add(in_slot);
|
|
|
+ UpdateItemMovingStatus(in_slot);
|
|
|
+ inCount++;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (swapCount == 0)
|
|
|
+ // check whether match swap pattern
|
|
|
+ if (inCount == 0 && !IsPMNeedWTWClean(slot.Key.Module))
|
|
|
{
|
|
|
- // check whether match double move pattern
|
|
|
- int inCount = 0;
|
|
|
- var same_dest = SearchWaitInSlots(destSlot.Module);
|
|
|
- foreach (var in_slot in same_dest)
|
|
|
+ int swapCount = 0;
|
|
|
+ var in_slots = SearchWaitInSlots(slot.Key.Module);
|
|
|
+ foreach (var swap_slot in in_slots)
|
|
|
{
|
|
|
- if (_vacModules[in_slot.SourceModule].MovingStatus == MovingStatus.Idle && inCount < 1)
|
|
|
+ if (_vacModules[swap_slot.SourceModule].MovingStatus == MovingStatus.Idle && swapCount < 1)
|
|
|
{
|
|
|
- _movingItems.Add(in_slot);
|
|
|
- UpdateItemMovingStatus(in_slot);
|
|
|
- inCount++;
|
|
|
+ _movingItems.Add(swap_slot);
|
|
|
+ UpdateItemMovingStatus(swap_slot);
|
|
|
+ swapCount++;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1053,6 +1054,10 @@ namespace Venus_RT.Modules
|
|
|
{
|
|
|
mod.Value.MovingStatus = MovingStatus.WaitPreJobClean;
|
|
|
}
|
|
|
+ else if(_lstControlJobs.FindIndex(cj => cj.JetState == EnumJetCtrlJobState.PostJobClean) != -1 && _waitPostCleanPMs.Contains(mod.Key))
|
|
|
+ {
|
|
|
+ mod.Value.MovingStatus = MovingStatus.WaitPostJobClean;
|
|
|
+ }
|
|
|
else if(pmScheduler.RunIdleCleanTask()) // Check Idle Clean
|
|
|
{
|
|
|
mod.Value.MovingStatus = MovingStatus.StartIdleClean;
|
|
@@ -1444,9 +1449,9 @@ namespace Venus_RT.Modules
|
|
|
postCleanRecipe = string.Empty;
|
|
|
foreach (var cj in _lstControlJobs)
|
|
|
{
|
|
|
- if (cj.JetState == EnumJetCtrlJobState.PostJobClean && _waitPreCleanPMs.Contains(pm))
|
|
|
+ if (cj.JetState == EnumJetCtrlJobState.PostJobClean && _waitPostCleanPMs.Contains(pm))
|
|
|
{
|
|
|
- postCleanRecipe = GetFirstProcessJob(cj).Sequence.PreCleanRecipe;
|
|
|
+ postCleanRecipe = GetFirstProcessJob(cj).Sequence.PostCleanRecipe;
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
@@ -2557,19 +2562,29 @@ namespace Venus_RT.Modules
|
|
|
|
|
|
private bool IsAllJobWaferProcessedOrProcessing(ControlJobInfo cj)
|
|
|
{
|
|
|
- foreach(var wafer in cj.LotWafers)
|
|
|
+ List<ModuleName> allModules = _vacModules.Keys.ToList().Union(_atmModules.Keys.ToList()).ToList();
|
|
|
+ allModules.Add(ModuleName.EfemRobot);
|
|
|
+ allModules.Add(ModuleName.TMRobot);
|
|
|
+ int original = (int)ModuleHelper.Converter(cj.Module);
|
|
|
+ foreach(var mod in allModules)
|
|
|
{
|
|
|
- if (wafer.IsEmpty || wafer.ProcessJob == null || wafer.ProcessJob.Sequence == null)
|
|
|
+ if (ModuleHelper.IsLoadPort(mod) && (int)mod != original)
|
|
|
continue;
|
|
|
|
|
|
- if (IsWaferNeedGotoModule(wafer, ModuleName.PMA) ||
|
|
|
- IsWaferNeedGotoModule(wafer, ModuleName.PMB) ||
|
|
|
- IsWaferNeedGotoModule(wafer, ModuleName.PMC) ||
|
|
|
- IsWaferNeedGotoModule(wafer, ModuleName.PMD))
|
|
|
+ var wafers = WaferManager.Instance.GetWafers(mod);
|
|
|
+ foreach(var wafer in wafers)
|
|
|
{
|
|
|
- return false;
|
|
|
+ if (wafer.IsEmpty || wafer.ProcessJob == null || wafer.ProcessJob.Sequence == null || wafer.OriginStation != original)
|
|
|
+ continue;
|
|
|
+
|
|
|
+ if (IsWaferNeedGotoModule(wafer, ModuleName.PMA) ||
|
|
|
+ IsWaferNeedGotoModule(wafer, ModuleName.PMB) ||
|
|
|
+ IsWaferNeedGotoModule(wafer, ModuleName.PMC) ||
|
|
|
+ IsWaferNeedGotoModule(wafer, ModuleName.PMD))
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
return true;
|
|
@@ -2627,6 +2642,19 @@ namespace Venus_RT.Modules
|
|
|
return processJob.Sequence.PostCleanRecipe.Trim().Length > 0;
|
|
|
}
|
|
|
|
|
|
+ private bool IsPMNeedWTWClean(ModuleName pm)
|
|
|
+ {
|
|
|
+ foreach(var cj in _lstControlJobs)
|
|
|
+ {
|
|
|
+ if(IsCtrlJobNeedWTWClean(cj, pm, out string wtwClean))
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
private bool IsCtrlJobNeedWTWClean(ControlJobInfo cj, ModuleName pm, out string WTWCleanRecipe)
|
|
|
{
|
|
|
WTWCleanRecipe = string.Empty;
|