|
@@ -1,7 +1,7 @@
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
-
|
|
|
+using System.Diagnostics;
|
|
|
using Aitex.Core.Common;
|
|
|
using Aitex.Core.RT.Routine;
|
|
|
using Aitex.Core.RT.SCCore;
|
|
@@ -113,6 +113,7 @@ namespace Venus_RT.Modules
|
|
|
private int _cycleSetPoint = 0;
|
|
|
private int _cycledCount = 0;
|
|
|
private int _cycledWafer = 0;
|
|
|
+
|
|
|
public bool HasJobRunning => _lstControlJobs.Count > 0;
|
|
|
|
|
|
#region public interface
|
|
@@ -1205,44 +1206,48 @@ namespace Venus_RT.Modules
|
|
|
|
|
|
private int CanPushInWaferNumber()
|
|
|
{
|
|
|
+ if (_tmRobot.RobotStatus == RState.Running)
|
|
|
+ return 0;
|
|
|
+
|
|
|
var llaWaferStatus = GetLLProcessStatusCount(ModuleName.LLA);
|
|
|
var llbWaferStatus = GetLLProcessStatusCount(ModuleName.LLB);
|
|
|
var pmWaferStatus = GetPMWaferExistence();
|
|
|
|
|
|
if(_LLInOutPath == SequenceLLInOutPath.AInBOut)
|
|
|
{
|
|
|
- return _LLASlotNumber - llaWaferStatus.Item1 - llaWaferStatus.Item2 - GetAtmInerWaferCount() - GetEfemRoborWaferCount();
|
|
|
+ return _LLASlotNumber + pmWaferStatus.Item2 - llaWaferStatus.Item1 - llaWaferStatus.Item2
|
|
|
+ - GetTMRobotWaferCount() - GetAtmInerWaferCount() - GetEfemRoborWaferCount();
|
|
|
}
|
|
|
else if(_LLInOutPath == SequenceLLInOutPath.BInAOut)
|
|
|
{
|
|
|
- return _LLBSlotNumber - llbWaferStatus.Item1 - llbWaferStatus.Item2 - GetAtmInerWaferCount() - GetEfemRoborWaferCount();
|
|
|
+ return _LLBSlotNumber + pmWaferStatus.Item2 - llbWaferStatus.Item1 - llbWaferStatus.Item2
|
|
|
+ - GetTMRobotWaferCount() - GetAtmInerWaferCount() - GetEfemRoborWaferCount();
|
|
|
}
|
|
|
- else
|
|
|
+ else if(_LLInOutPath == SequenceLLInOutPath.AInAOut || (_LLInOutPath == SequenceLLInOutPath.DInDOut && _vacSchedulers[ModuleName.LLA].IsOnline && !_vacSchedulers[ModuleName.LLB].IsOnline))
|
|
|
{
|
|
|
- if(_vacSchedulers[ModuleName.LLA].IsOnline && !_vacSchedulers[ModuleName.LLB].IsOnline)
|
|
|
- {
|
|
|
- return _LLASlotNumber - llaWaferStatus.Item1 - llaWaferStatus.Item2
|
|
|
- - pmWaferStatus.Item1 - GetTMRobotWaferCount()
|
|
|
- - GetEfemRoborWaferCount() - GetAtmInerWaferCount();
|
|
|
- }
|
|
|
- else if(!_vacSchedulers[ModuleName.LLA].IsOnline && _vacSchedulers[ModuleName.LLB].IsOnline)
|
|
|
- {
|
|
|
- return _LLBSlotNumber - llbWaferStatus.Item1 - llbWaferStatus.Item2
|
|
|
- - pmWaferStatus.Item1 - GetTMRobotWaferCount()
|
|
|
- - GetEfemRoborWaferCount() - GetAtmInerWaferCount();
|
|
|
- }
|
|
|
- else if(_vacSchedulers[ModuleName.LLA].IsOnline && _vacSchedulers[ModuleName.LLB].IsOnline)
|
|
|
- {
|
|
|
- return (_LLASlotNumber + _LLBSlotNumber) / 2 + pmWaferStatus.Item2
|
|
|
+ return llaWaferStatus.Item1 > 0 ? 0 :
|
|
|
+ (_LLASlotNumber) / 2 + pmWaferStatus.Item2 - llaWaferStatus.Item2
|
|
|
+ - GetTMRobotWaferCount() - GetEfemRoborWaferCount() - GetAtmInerWaferCount();
|
|
|
+
|
|
|
+ }
|
|
|
+ else if (_LLInOutPath == SequenceLLInOutPath.BInBOut || (_LLInOutPath == SequenceLLInOutPath.DInDOut && !_vacSchedulers[ModuleName.LLA].IsOnline && _vacSchedulers[ModuleName.LLB].IsOnline))
|
|
|
+ {
|
|
|
+ return llbWaferStatus.Item1 > 0 ? 0 :
|
|
|
+ (_LLBSlotNumber) / 2 + pmWaferStatus.Item2 - llbWaferStatus.Item2
|
|
|
+ -GetTMRobotWaferCount() - GetEfemRoborWaferCount() - GetAtmInerWaferCount();
|
|
|
+ }
|
|
|
+ else if(_LLInOutPath == SequenceLLInOutPath.DInDOut && _vacSchedulers[ModuleName.LLA].IsOnline && _vacSchedulers[ModuleName.LLB].IsOnline)
|
|
|
+ {
|
|
|
+ return llaWaferStatus.Item1 + llbWaferStatus.Item1 > 1 ? 0 :
|
|
|
+ (_LLASlotNumber + _LLBSlotNumber) / 2 + pmWaferStatus.Item2
|
|
|
- llaWaferStatus.Item1 - llaWaferStatus.Item2 - llbWaferStatus.Item1 - llbWaferStatus.Item2
|
|
|
- GetTMRobotWaferCount() - GetEfemRoborWaferCount() - GetAtmInerWaferCount();
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- _cycleState = RState.Failed;
|
|
|
- LOG.Write(eEvent.ERR_ROUTER, ModuleName.System, "Both LLA/LLB offline, stop runing.");
|
|
|
- return 0;
|
|
|
- }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _cycleState = RState.Failed;
|
|
|
+ LOG.Write(eEvent.ERR_ROUTER, ModuleName.System, "Both LLA/LLB offline, stop runing.");
|
|
|
+ return 0;
|
|
|
}
|
|
|
}
|
|
|
|