|
@@ -11,6 +11,7 @@ using Aitex.Core.RT.Log;
|
|
|
using MECF.Framework.Common.CommonData.Loader;
|
|
|
using Aitex.Core.RT.SCCore;
|
|
|
using Aitex.Core.Util;
|
|
|
+using MECF.Framework.Common.WaferHolder;
|
|
|
|
|
|
namespace CyberX8_RT.Modules.Loader
|
|
|
{
|
|
@@ -18,6 +19,7 @@ namespace CyberX8_RT.Modules.Loader
|
|
|
{
|
|
|
private enum UnloadStep
|
|
|
{
|
|
|
+ CheckRotationLocation,
|
|
|
RotationGoToLOADA,
|
|
|
RotationGoToLOADAWait,
|
|
|
SideUnload,
|
|
@@ -61,6 +63,10 @@ namespace CyberX8_RT.Modules.Loader
|
|
|
/// Wafer尺寸
|
|
|
/// </summary>
|
|
|
private int _waferSize;
|
|
|
+ /// <summary>
|
|
|
+ /// 是否相反
|
|
|
+ /// </summary>
|
|
|
+ private bool _isReverse;
|
|
|
#endregion
|
|
|
|
|
|
#region 属性
|
|
@@ -98,14 +104,28 @@ namespace CyberX8_RT.Modules.Loader
|
|
|
public RState Monitor()
|
|
|
{
|
|
|
LottrackRecord();
|
|
|
- Runner.Run(UnloadStep.RotationGoToLOADA,RotationGotoLOAD,_delay_1ms)
|
|
|
+ Runner.Run(UnloadStep.CheckRotationLocation,CheckRotationLocation)
|
|
|
+ .Run(UnloadStep.RotationGoToLOADA,RotationGotoLOAD,_delay_1ms)
|
|
|
.WaitWithStopCondition(UnloadStep.RotationGoToLOADAWait,CheckRotationPositionStatus,CheckRotationPositionRunStop)
|
|
|
.Run(UnloadStep.SideUnload, () => StartUnloadRoutine(_sideUnloadRoutine,_isSideUnloaded), _delay_1ms)
|
|
|
.WaitWithStopCondition(UnloadStep.UnloadAllWait, CheckUnloadAllRoutineEndStatus,CheckUnloadAllRoutineStopStatus)
|
|
|
- .End(UnloadStep.End, NullFun, _delay_1ms);
|
|
|
+ .End(UnloadStep.End, UpdateWaferHolderLipCRSUsed, _delay_1ms);
|
|
|
return Runner.Status;
|
|
|
}
|
|
|
/// <summary>
|
|
|
+ /// 检验Rotation位置
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ private bool CheckRotationLocation()
|
|
|
+ {
|
|
|
+ double rotationPosition = _rotationAxis.MotionData.MotorPosition;
|
|
|
+ if (_rotationAxis.CheckPositionIsInStation(rotationPosition, "TRNPB"))
|
|
|
+ {
|
|
|
+ _isReverse = true;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
/// Rotation Goto LOADA
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
@@ -214,6 +234,46 @@ namespace CyberX8_RT.Modules.Loader
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 更新WaferHolder LipCRS用量
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ private bool UpdateWaferHolderLipCRSUsed()
|
|
|
+ {
|
|
|
+ WaferHolderInfo waferHolderInfo = WaferHolderManager.Instance.GetWaferHolder("Loader");
|
|
|
+
|
|
|
+
|
|
|
+ if (waferHolderInfo != null)
|
|
|
+ {
|
|
|
+ if (_side==SIDE_A)
|
|
|
+ {
|
|
|
+ if (_isReverse)
|
|
|
+ {
|
|
|
+ waferHolderInfo.CrsBTotalUses++;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ waferHolderInfo.CrsATotalUses++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (_isReverse)
|
|
|
+ {
|
|
|
+ waferHolderInfo.CrsATotalUses++;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ waferHolderInfo.CrsBTotalUses++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ waferHolderInfo.TotalUses++;
|
|
|
+ WaferHolderManager.Instance.UpdateWaferHolderInfo(waferHolderInfo);
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
/// <summary>
|
|
|
/// 启动
|
|
|
/// </summary>
|
|
@@ -252,6 +312,7 @@ namespace CyberX8_RT.Modules.Loader
|
|
|
_sideUnloadRoutine = new LoaderUnloadRoutine(ModuleName.Loader1.ToString(), _side);
|
|
|
_isSideUnloaded = false;
|
|
|
_isSideStop = false;
|
|
|
+ _isReverse = false;
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 重试
|