refactor: 将Framework库和RT、UI放在同一个解决方案中。
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
using Aitex.Core.RT.Log;
|
||||
using Aitex.Core.RT.Routine;
|
||||
using Aitex.Core.RT.SCCore;
|
||||
|
||||
namespace SicModules.EFEMs.Routines
|
||||
{
|
||||
public class TrayRobotHomeRoutine : EfemBaseRoutine
|
||||
{
|
||||
enum RoutineStep
|
||||
{
|
||||
Home,
|
||||
TimeDelay,
|
||||
WaitReady,
|
||||
}
|
||||
private int _homeTimeout;
|
||||
|
||||
|
||||
public TrayRobotHomeRoutine()
|
||||
{
|
||||
Name = "TrayRobotHome";
|
||||
}
|
||||
|
||||
public override Result Start(params object[] objs)
|
||||
{
|
||||
Reset();
|
||||
_homeTimeout = SC.GetValue<int>("TrayRobot.HomeTimeout");
|
||||
return Result.RUN;
|
||||
}
|
||||
|
||||
public override Result Monitor()
|
||||
{
|
||||
try
|
||||
{
|
||||
RobotHomeExcute((int)RoutineStep.Home, TrayRobot, _homeTimeout);
|
||||
TimeDelay((int)RoutineStep.TimeDelay, 2);
|
||||
CheckRobotReady((int)RoutineStep.WaitReady, TrayRobot, _homeTimeout);
|
||||
}
|
||||
catch (RoutineBreakException)
|
||||
{
|
||||
return Result.RUN;
|
||||
}
|
||||
catch (RoutineFaildException ex)
|
||||
{
|
||||
LOG.Error(ex.ToString());
|
||||
return Result.FAIL;
|
||||
}
|
||||
|
||||
Notify($"Finish");
|
||||
|
||||
return Result.DONE;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user