|
@@ -2808,6 +2808,7 @@ namespace Venus_RT.Modules
|
|
|
return;
|
|
|
|
|
|
bool allControlJobComplete = true;
|
|
|
+ bool bRefreshTroughput = false;
|
|
|
List<ControlJobInfo> cjRemoveList = new List<ControlJobInfo>();
|
|
|
foreach (var cj in _lstControlJobs)
|
|
|
{
|
|
@@ -2907,6 +2908,7 @@ namespace Venus_RT.Modules
|
|
|
(Singleton<TransferModule>.Instance.GetScheduler(ModuleHelper.Converter(cj.Module)) as SchedulerLoadPort).NoteJobComplete();
|
|
|
|
|
|
_lpCycleCount[ModuleHelper.Converter(cj.Module)]++;
|
|
|
+ bRefreshTroughput = true;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -2929,29 +2931,15 @@ namespace Venus_RT.Modules
|
|
|
if (!wafer.IsEmpty && wafer.ProcessState == EnumWaferProcessStatus.Completed)
|
|
|
countProcessed++;
|
|
|
}
|
|
|
-
|
|
|
- int lpCycleWafer = _lpCycleCount[ModuleHelper.Converter(cj.Module)] * cj.LotWafers.Count + countProcessed;
|
|
|
- if (_lpCycleCount[ModuleHelper.Converter(cj.Module)] != _cycledCount || lpCycleWafer != _lpCycleWafer[ModuleHelper.Converter(cj.Module)])
|
|
|
- {
|
|
|
- _lpCycleWafer[ModuleHelper.Converter(cj.Module)] = lpCycleWafer;
|
|
|
- int totolCycleWafer = _lpCycleWafer.Sum(item => item.Value);
|
|
|
- _cycledCount = _lpCycleCount.Sum(item => item.Value);
|
|
|
- if (totolCycleWafer != _cycledWafer)
|
|
|
- {
|
|
|
- _cycledWafer = totolCycleWafer;
|
|
|
- if (_cycledWafer >= 25)
|
|
|
- {
|
|
|
- _throughput = (float)(_cycledWafer / _cycleWatch.Elapsed.TotalHours);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- _throughput = 0;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ int lpCycleWafer = _lpCycleCount[ModuleHelper.Converter(cj.Module)] * cj.LotWafers.Count + (cj.JetState == EnumJetCtrlJobState.Completed && cj.LotWafers.Count == countProcessed ? 0 : countProcessed);
|
|
|
+ if (_lpCycleCount[ModuleHelper.Converter(cj.Module)] != _cycledCount || lpCycleWafer != _lpCycleWafer[ModuleHelper.Converter(cj.Module)])
|
|
|
+ {
|
|
|
+ _lpCycleWafer[ModuleHelper.Converter(cj.Module)] = lpCycleWafer;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
LoadportCassetteState state = (LoadportCassetteState)DATA.Poll($"{cj.Module}.CassetteState");
|
|
@@ -2965,9 +2953,23 @@ namespace Venus_RT.Modules
|
|
|
|
|
|
if (_isCycleMode && _cycledCount < (_isCycleMode ? _cycleSetPoint : 0))
|
|
|
{
|
|
|
+ int totolCycleWafer = _lpCycleWafer.Sum(item => item.Value);
|
|
|
+ if (totolCycleWafer != _cycledWafer || bRefreshTroughput) // refresh _throughput in time
|
|
|
+ {
|
|
|
+ _cycledWafer = totolCycleWafer;
|
|
|
+ if (_cycledCount > 0)
|
|
|
+ {
|
|
|
+ _throughput = (float)(_cycledWafer / _cycleWatch.Elapsed.TotalHours);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _throughput = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (allControlJobComplete)
|
|
|
{
|
|
|
- // _cycledCount++;
|
|
|
+ _cycledCount++;
|
|
|
|
|
|
if (_cycledCount < _cycleSetPoint)
|
|
|
{
|
|
@@ -3028,7 +3030,6 @@ namespace Venus_RT.Modules
|
|
|
{
|
|
|
if (cj.State == EnumControlJobState.Executing)
|
|
|
{
|
|
|
- bool allPjCompleted = true;
|
|
|
foreach (var pjName in cj.ProcessJobNameList)
|
|
|
{
|
|
|
var pj = _lstProcessJobs.Find(x => x.Name == pjName);
|
|
@@ -3053,24 +3054,19 @@ namespace Venus_RT.Modules
|
|
|
allModules.Add(ModuleName.EfemRobot);
|
|
|
allModules.Add(ModuleName.TMRobot);
|
|
|
int original = (int)ModuleHelper.Converter(cj.Module);
|
|
|
- foreach(var mod in allModules)
|
|
|
+ foreach (var mod in allModules)
|
|
|
{
|
|
|
if (ModuleHelper.IsLoadPort(mod) && (int)mod != original)
|
|
|
continue;
|
|
|
|
|
|
var wafers = WaferManager.Instance.GetWafers(mod);
|
|
|
- foreach(var wafer in wafers)
|
|
|
+ foreach (var wafer in wafers)
|
|
|
{
|
|
|
- if (wafer.IsEmpty || wafer.ProcessJob == null || wafer.ProcessJob.Sequence == null || wafer.OriginStation != original)
|
|
|
+ if (wafer.IsEmpty || wafer.ProcessJob == null || wafer.ProcessJob.Sequence == null || wafer.ProcessJob.ControlJobName != cj.Name)
|
|
|
continue;
|
|
|
|
|
|
- if (IsWaferNeedGotoModule(wafer, ModuleName.PMA) ||
|
|
|
- IsWaferNeedGotoModule(wafer, ModuleName.PMB) ||
|
|
|
- IsWaferNeedGotoModule(wafer, ModuleName.PMC) ||
|
|
|
- IsWaferNeedGotoModule(wafer, ModuleName.PMD))
|
|
|
- {
|
|
|
- return false;
|
|
|
- }
|
|
|
+ if (wafer.ProcessState != EnumWaferProcessStatus.Completed && wafer.ProcessState != EnumWaferProcessStatus.InProcess)
|
|
|
+ return false; ;
|
|
|
}
|
|
|
}
|
|
|
|