添加load腔顶升和闸板阀代码
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Aitex.Core.RT.DataCenter;
|
||||
using Aitex.Core.RT.DataCenter;
|
||||
using Aitex.Core.RT.Device;
|
||||
using Aitex.Core.RT.Event;
|
||||
using Aitex.Core.RT.Fsm;
|
||||
@@ -13,7 +10,12 @@ using Aitex.Core.Utilities;
|
||||
using Aitex.Sorter.Common;
|
||||
using MECF.Framework.Common.Equipment;
|
||||
using MECF.Framework.Common.Schedulers;
|
||||
using SicModules.EFEMs.Routines;
|
||||
using SicModules.LLs.Routines;
|
||||
using SicModules.TMs.Routines;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SicModules.LLs
|
||||
{
|
||||
@@ -39,6 +41,8 @@ namespace SicModules.LLs
|
||||
Separating,
|
||||
Grouping,
|
||||
RotationHomeOffset,
|
||||
OpenSlitValve,
|
||||
CloseSlitValve,
|
||||
}
|
||||
|
||||
public enum MSG
|
||||
@@ -63,6 +67,8 @@ namespace SicModules.LLs
|
||||
Separate,
|
||||
Group,
|
||||
RelativeHomeOffset,
|
||||
OpenSlitValve,
|
||||
CloseSlitValve,
|
||||
}
|
||||
|
||||
|
||||
@@ -167,6 +173,7 @@ namespace SicModules.LLs
|
||||
private LoadSeparateRoutine _loadSeparateRoutine;
|
||||
|
||||
private LoadRotationHomeOffsetRoutine _loadRotationHomeOffsetRoutine;
|
||||
private LoadLockSlitValveRoutine _slitValveRoutine;
|
||||
|
||||
|
||||
public LoadLockModule(ModuleName module) : base(1)
|
||||
@@ -217,6 +224,7 @@ namespace SicModules.LLs
|
||||
_loadLockGroupRoutine = new LoadLockGroupRoutine(module);
|
||||
_loadSeparateRoutine = new LoadSeparateRoutine(module);
|
||||
_loadRotationHomeOffsetRoutine = new LoadRotationHomeOffsetRoutine();
|
||||
_slitValveRoutine = new LoadLockSlitValveRoutine();
|
||||
}
|
||||
|
||||
private void InitDevice()
|
||||
@@ -243,7 +251,6 @@ namespace SicModules.LLs
|
||||
|
||||
Transition(STATE.Error, MSG.Reset, FsmReset, STATE.Idle);
|
||||
|
||||
|
||||
//PrepareTransfer
|
||||
Transition(STATE.Idle, MSG.PrepareTransfer, FsmStartPrepareTransfer, STATE.PrepareTransfer);
|
||||
Transition(STATE.PrepareTransfer, FSM_MSG.TIMER, FsmMonitorTask, STATE.Idle);
|
||||
@@ -273,6 +280,15 @@ namespace SicModules.LLs
|
||||
Transition(STATE.LeakCheck, FSM_MSG.TIMER, FsmMonitorTask, STATE.Idle);
|
||||
Transition(STATE.LeakCheck, MSG.Abort, FsmAbortTask, STATE.Idle);
|
||||
|
||||
//open SlitValve
|
||||
Transition(STATE.Idle, MSG.OpenSlitValve, FsmStartOpenSlitValve, STATE.OpenSlitValve);
|
||||
Transition(STATE.OpenSlitValve, FSM_MSG.TIMER, FsmMonitorTask, STATE.Idle);
|
||||
Transition(STATE.OpenSlitValve, MSG.Abort, FsmAbortTask, STATE.Idle);
|
||||
|
||||
//close SlitValve
|
||||
Transition(STATE.Idle, MSG.CloseSlitValve, FsmStartCloseSlitValve, STATE.CloseSlitValve);
|
||||
Transition(STATE.CloseSlitValve, FSM_MSG.TIMER, FsmMonitorTask, STATE.Idle);
|
||||
Transition(STATE.CloseSlitValve, MSG.Abort, FsmAbortTask, STATE.Idle);
|
||||
|
||||
//Separate
|
||||
Transition(STATE.Idle, MSG.Separate, FsmStartSeparate, STATE.Separating);
|
||||
@@ -331,6 +347,16 @@ namespace SicModules.LLs
|
||||
return CheckToPostMessage((int)MSG.CloseDoor);
|
||||
});
|
||||
|
||||
OP.Subscribe($"{Name}.OpenSlitValve", (string cmd, object[] args) =>
|
||||
{
|
||||
return CheckToPostMessage((int)MSG.OpenSlitValve);
|
||||
});
|
||||
|
||||
OP.Subscribe($"{Name}.CloseSlitValve", (string cmd, object[] args) =>
|
||||
{
|
||||
return CheckToPostMessage((int)MSG.CloseSlitValve);
|
||||
});
|
||||
|
||||
OP.Subscribe($"{Name}.Reset", (string cmd, object[] args) =>
|
||||
{
|
||||
return CheckToPostMessage((int)MSG.Reset);
|
||||
@@ -693,6 +719,26 @@ namespace SicModules.LLs
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool FsmStartOpenSlitValve(object[] param)
|
||||
{
|
||||
_slitValveRoutine.Init(true);
|
||||
|
||||
Result ret = StartRoutine(_slitValveRoutine);
|
||||
if (ret == Result.FAIL || ret == Result.DONE)
|
||||
return false;
|
||||
return ret == Result.RUN;
|
||||
}
|
||||
|
||||
private bool FsmStartCloseSlitValve(object[] param)
|
||||
{
|
||||
_slitValveRoutine.Init(false);
|
||||
|
||||
Result ret = StartRoutine(_slitValveRoutine);
|
||||
if (ret == Result.FAIL || ret == Result.DONE)
|
||||
return false;
|
||||
return ret == Result.RUN;
|
||||
}
|
||||
|
||||
public override bool TransferHandoff(ModuleName robot, Hand blade, int targetSlot, EnumTransferType transferType, out string reason)
|
||||
{
|
||||
reason = string.Empty;
|
||||
|
||||
Reference in New Issue
Block a user