Sic08/Modules/Mainframe/LLs/LoadSeparateRoutine.cs

91 lines
2.4 KiB
C#
Raw Normal View History

2023-03-03 15:42:13 +08:00
using Aitex.Core.RT.Device.Unit;
using Aitex.Core.RT.Routine;
using Aitex.Core.RT.SCCore;
using MECF.Framework.Common.Equipment;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Mainframe.LLs
{
public class LoadSeparateRoutine : LoadLockBaseRoutine
{
/*
* 1Load伺服到传盘压力
2
3
4
5
*
*/
enum RoutineStep
{
ClawOpen,
LiftUp,
Clawing,
LiftDown,
TimeDelay1,
LoadRotationHome,
WaitMoveDone,
}
private int _clawMoveTimeOut = 30;
private int _liftMoveTimeOut = 30;
private int _loadRatationMoveTimeout = 30;
public LoadSeparateRoutine(ModuleName module)
{
Name = "Separate";
Module = module.ToString();
}
public override Result Start(params object[] objs)
{
Reset();
_liftMoveTimeOut = SC.GetValue<int>("LoadLock.LiftMoveTimeOut");
_clawMoveTimeOut = SC.GetValue<int>("LoadLock.ClawMoveTimeOut");
_loadRatationMoveTimeout = SC.GetValue<int>("LoadLock.LoadRotation.RotationTimeOut");
Notify("Start");
return Result.RUN;
}
public override Result Monitor()
{
try
{
2023-03-28 16:40:33 +08:00
////LoadRotation先回原点位置
//MoveHomePos((int)RoutineStep.LoadRotationHome);
//TimeDelay((int)RoutineStep.TimeDelay1, 1);
//WaitLoadRotationDone((int)RoutineStep.WaitMoveDone, _loadRatationMoveTimeout);
2023-03-03 15:42:13 +08:00
LiftMove((int)RoutineStep.LiftUp, true, _liftMoveTimeOut);
ClawMove((int)RoutineStep.ClawOpen, WaferClaw, false, _clawMoveTimeOut);
ClawMove((int)RoutineStep.Clawing, WaferClaw, true, _clawMoveTimeOut);
LiftMove((int)RoutineStep.LiftDown, false, _liftMoveTimeOut);
}
catch (RoutineBreakException)
{
return Result.RUN;
}
catch (RoutineFaildException)
{
return Result.FAIL;
}
Notify("Finished");
return Result.DONE;
}
public override void Abort()
{
}
}
}