|
@@ -1,4 +1,5 @@
|
|
|
-using Aitex.Core.RT.Device;
|
|
|
+using Aitex.Core.Common;
|
|
|
+using Aitex.Core.RT.Device;
|
|
|
using Aitex.Core.RT.Log;
|
|
|
using Aitex.Core.RT.Routine;
|
|
|
using Aitex.Core.RT.SCCore;
|
|
@@ -6,7 +7,12 @@ using CyberX8_Core;
|
|
|
using CyberX8_RT.Devices.AXIS;
|
|
|
using CyberX8_RT.Devices.Facilities;
|
|
|
using CyberX8_RT.Devices.SRD;
|
|
|
+using MECF.Framework.Common.Equipment;
|
|
|
+using MECF.Framework.Common.RecipeCenter;
|
|
|
using MECF.Framework.Common.Routine;
|
|
|
+using MECF.Framework.Common.SubstrateTrackings;
|
|
|
+using System;
|
|
|
+using System.Windows.Input;
|
|
|
|
|
|
namespace CyberX8_RT.Modules.SRD
|
|
|
{
|
|
@@ -14,6 +20,7 @@ namespace CyberX8_RT.Modules.SRD
|
|
|
{
|
|
|
private enum SRDUnloaderStep
|
|
|
{
|
|
|
+ Unloader_FlippersOut,
|
|
|
Unloader_ChuckVacuumOff,
|
|
|
Unloader_ChuckATMOn,
|
|
|
Unloader_CheckVacuum,
|
|
@@ -55,6 +62,10 @@ namespace CyberX8_RT.Modules.SRD
|
|
|
|
|
|
|
|
|
private int _vacuumOffLimit = 0;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ private bool _isProcessError = false;
|
|
|
#endregion
|
|
|
|
|
|
#region 属性
|
|
@@ -80,7 +91,8 @@ namespace CyberX8_RT.Modules.SRD
|
|
|
|
|
|
public RState Monitor()
|
|
|
{
|
|
|
- Runner.Run(SRDUnloaderStep.Unloader_ChuckVacuumOff, ChuckVacuumOff, CheckChuckVacuumOffEndStatus, CheckChuckVacuumOffStopStatus)
|
|
|
+ Runner.RunIf(SRDUnloaderStep.Unloader_FlippersOut, _isProcessError, FlippersOut, CheckFlippersOutEndStatus, CheckFlippersOutStopStatus)
|
|
|
+ .Run(SRDUnloaderStep.Unloader_ChuckVacuumOff, ChuckVacuumOff, CheckChuckVacuumOffEndStatus, CheckChuckVacuumOffStopStatus)
|
|
|
.Run(SRDUnloaderStep.Unloader_ChuckATMOn, ChuckATMOn, CheckChuckATMEndStatus, CheckChuckATMStopStatus)
|
|
|
.WaitWithStopCondition(SRDUnloaderStep.Unloader_CheckVacuum, CheckVacuumEndStatus, CheckVacuumStopStatus)
|
|
|
.Run(SRDUnloaderStep.Unloader_LiftUpOn, LiftUpOn, CheckLiftUpOnEndStatus, CheckLiftUpOnStopStatus)
|
|
@@ -101,10 +113,19 @@ namespace CyberX8_RT.Modules.SRD
|
|
|
_rotationAxis = DEVICE.GetDevice<JetAxisBase>($"{Module}.Rotation");
|
|
|
_systemFacilities = DEVICE.GetDevice<SystemFacilities>("System.Facilities");
|
|
|
_vacuumOffLimit = SC.GetValue<int>("SRD.ChuckVacuumOffLimit");
|
|
|
- if (!CheckPreCondition())
|
|
|
+ if (objs.Length >= 1)
|
|
|
+ {
|
|
|
+ _isProcessError = (bool)objs[0];
|
|
|
+ }
|
|
|
+ if (!_isProcessError && !CheckPreCondition())
|
|
|
{
|
|
|
return RState.Failed;
|
|
|
}
|
|
|
+ if (!GetWaferSize())
|
|
|
+ {
|
|
|
+ NotifyError(eEvent.ERR_SRD, "Wafer Size is invalid", 0);
|
|
|
+ return RState.Failed;
|
|
|
+ }
|
|
|
return Runner.Start(Module, "SRD Unloader Start");
|
|
|
}
|
|
|
|
|
@@ -395,5 +416,110 @@ namespace CyberX8_RT.Modules.SRD
|
|
|
{
|
|
|
return _srdCommon.Status == RState.Failed || _srdCommon.Status == RState.Timeout;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ private bool FlippersOut()
|
|
|
+ {
|
|
|
+ bool result = false;
|
|
|
+ object[] objects = new object[1];
|
|
|
+ objects[0] = _waferSize;
|
|
|
+ result = _srdCommon.FlipperOutAction("", objects);
|
|
|
+ if (!result)
|
|
|
+ {
|
|
|
+ NotifyError(eEvent.ERR_SRD, $"FlipperOut{_waferSize} Action is failed", 0);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ private bool CheckFlippersOutEndStatus()
|
|
|
+ {
|
|
|
+ return _srdCommon.Status == RState.End;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ private bool CheckFlippersOutStopStatus()
|
|
|
+ {
|
|
|
+ if (_srdCommon.Status == RState.Failed || _srdCommon.Status == RState.Timeout)
|
|
|
+ {
|
|
|
+ NotifyError(eEvent.ERR_SRD, $"Check FlipperOut{_waferSize} Action is failed", 0);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ private bool GetWaferSize()
|
|
|
+ {
|
|
|
+ WaferInfo waferInfo = WaferManager.Instance.GetWafer(ModuleNameString.ToEnum(Module), 0);
|
|
|
+ if (waferInfo == null)
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ switch (waferInfo.Size)
|
|
|
+ {
|
|
|
+
|
|
|
+ case WaferSize.WS4:
|
|
|
+ _waferSize = 100;
|
|
|
+ break;
|
|
|
+ case WaferSize.WS6:
|
|
|
+ case WaferSize.WS150:
|
|
|
+ case WaferSize.WS159:
|
|
|
+ _waferSize = 150;
|
|
|
+ break;
|
|
|
+ case WaferSize.WS0:
|
|
|
+ case WaferSize.WS8:
|
|
|
+ _waferSize = 200;
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ private bool N2Off()
|
|
|
+ {
|
|
|
+ if(!_srdCommon.CommonData.N2On) return true;
|
|
|
+ bool result = _srdCommon.N2OffAction("", null);
|
|
|
+ if (!result)
|
|
|
+ {
|
|
|
+ NotifyError(eEvent.ERR_SRD, $"N2 Off Action is failed", 0);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ private bool WaterOff()
|
|
|
+ {
|
|
|
+ if (_srdCommon.CommonData.WaterOn)
|
|
|
+ {
|
|
|
+ bool result = _srdCommon.WaterOff();
|
|
|
+ if (!result)
|
|
|
+ {
|
|
|
+ NotifyError(eEvent.ERR_SRD, "Water On is failed", 0);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|
|
|
}
|