2023-04-13 15:35:13 +08:00
|
|
|
|
using Aitex.Core.RT.Routine;
|
2023-03-03 15:42:13 +08:00
|
|
|
|
using Aitex.Core.RT.SCCore;
|
2023-04-13 15:35:13 +08:00
|
|
|
|
using SicModules.Aligners.Routines.Base;
|
2023-03-03 15:42:13 +08:00
|
|
|
|
|
2023-04-13 15:35:13 +08:00
|
|
|
|
namespace SicModules.Aligners.Routines
|
2023-03-03 15:42:13 +08:00
|
|
|
|
{
|
|
|
|
|
public class AlignerHomeRoutine : AlignerBaseRoutine
|
|
|
|
|
{
|
|
|
|
|
enum RoutineStep
|
|
|
|
|
{
|
|
|
|
|
ClearAlignerAlarm,
|
|
|
|
|
ResetVar,
|
|
|
|
|
Home,
|
|
|
|
|
MoveToMeasure,
|
|
|
|
|
CheckWafer,
|
|
|
|
|
TimeDelay1,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public AlignerHomeRoutine()
|
|
|
|
|
{
|
|
|
|
|
Name = "Home";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override Result Start(params object[] objs)
|
|
|
|
|
{
|
|
|
|
|
Reset();
|
|
|
|
|
|
|
|
|
|
Notify("Start");
|
|
|
|
|
return Result.RUN;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override Result Monitor()
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (SC.GetValue<bool>($"System.IsSimulatorMode"))
|
|
|
|
|
{
|
|
|
|
|
TimeDelay((int)RoutineStep.TimeDelay1, 3);
|
|
|
|
|
return Result.DONE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//清除Aligner报警
|
|
|
|
|
AlignerERS((int)RoutineStep.ClearAlignerAlarm, 3);
|
|
|
|
|
|
|
|
|
|
//初始化变量值Reset
|
|
|
|
|
ResetVar((int)RoutineStep.ClearAlignerAlarm);
|
|
|
|
|
|
|
|
|
|
//三轴回原点
|
|
|
|
|
Home((int)RoutineStep.Home, 20);
|
|
|
|
|
|
|
|
|
|
//移动到测量中心
|
|
|
|
|
AlignerMoveToMeasure((int)RoutineStep.MoveToMeasure, 20);
|
|
|
|
|
|
|
|
|
|
//检查是否有Wafer
|
|
|
|
|
CheckHaveWafer((int)RoutineStep.CheckWafer, 10);
|
|
|
|
|
}
|
|
|
|
|
catch (RoutineBreakException)
|
|
|
|
|
{
|
|
|
|
|
return Result.RUN;
|
|
|
|
|
}
|
|
|
|
|
catch (RoutineFaildException)
|
|
|
|
|
{
|
|
|
|
|
return Result.FAIL;
|
|
|
|
|
}
|
|
|
|
|
return Result.DONE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|