SicMultiplate/Modules/Mainframe/Aligners/Routines/AlignerHomeRoutine.cs

73 lines
1.8 KiB
C#
Raw Normal View History

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") && SC.GetValue<bool>("HiWinAligner.UseDelayToSimulate"))
{
TimeDelay((int)RoutineStep.TimeDelay1, 3);
return Result.DONE;
}
2023-03-03 15:42:13 +08:00
//清除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;
}
}
}