|
@@ -122,6 +122,8 @@ namespace Venus_RT.Modules.PMs
|
|
|
private readonly LLPlaceRoutine _llPlaceRoutine;
|
|
|
private readonly LLPickRoutine _llPickRoutine;
|
|
|
private readonly PMProcessRoutine _processRoutine;
|
|
|
+ private readonly GasFlowRoutine _gasFlowRoutine;
|
|
|
+ private readonly RFPowerSwitchRoutine _rfPowerRoutine;
|
|
|
|
|
|
public bool IsIdle
|
|
|
{
|
|
@@ -203,6 +205,8 @@ namespace Venus_RT.Modules.PMs
|
|
|
_llPlaceRoutine = new LLPlaceRoutine(_chamber);
|
|
|
_llPickRoutine = new LLPickRoutine(_chamber, _ventLoadLockRoutine);
|
|
|
_processRoutine = new PMProcessRoutine(_chamber, _pumpRoutine);
|
|
|
+ _gasFlowRoutine = new GasFlowRoutine(_chamber);
|
|
|
+ _rfPowerRoutine = new RFPowerSwitchRoutine(_chamber, true);
|
|
|
|
|
|
fsm = new StateMachine<PMEntity>(Module.ToString(), (int)PMState.Init, 50);
|
|
|
|
|
@@ -305,22 +309,25 @@ namespace Venus_RT.Modules.PMs
|
|
|
Transition(PMState.Processing, FSM_MSG.TIMER, FnProcessTimeout, PMState.Idle);
|
|
|
Transition(PMState.Processing, MSG.Abort, FnAbortProcess, PMState.Idle);
|
|
|
|
|
|
- //DATA.Subscribe("MyTest", () => { return "123"; });
|
|
|
+ // Gas Flow sequence
|
|
|
+ Transition(PMState.Idle, MSG.GasFlow, FnStartGasFlow, PMState.GasFlowing);
|
|
|
+ Transition(PMState.GasFlowing, MSG.GasFlow, FnStartGasFlow, PMState.GasFlowing);
|
|
|
+ Transition(PMState.GasFlowing, FSM_MSG.TIMER, FnGasFlowTimeout, PMState.Idle);
|
|
|
+ Transition(PMState.GasFlowing, MSG.StopGasFlow, FnStopGasFlow, PMState.Idle);
|
|
|
+ Transition(PMState.GasFlowing, MSG.Abort, FnAbortGasFlow, PMState.Idle);
|
|
|
+
|
|
|
+ //RF Power sequence
|
|
|
+ Transition(PMState.Idle, MSG.RfPower, FnStartRfPower, PMState.RfPowering);
|
|
|
+ Transition(PMState.GasFlowing, MSG.RfPower, FnStartRfPower, PMState.RfPowering);
|
|
|
+ Transition(PMState.RfPowering, FSM_MSG.TIMER, FnRfPowerTimeout, PMState.Idle);
|
|
|
+ Transition(PMState.RfPowering, MSG.Abort, FnAbortRfPower, PMState.Idle);
|
|
|
|
|
|
Running = true;
|
|
|
|
|
|
WaferManager.Instance.SubscribeLocation(ModuleName.PMA, 1);
|
|
|
WaferManager.Instance.SubscribeLocation(ModuleName.LLA, 1);
|
|
|
}
|
|
|
- protected override bool Init()
|
|
|
- {
|
|
|
- DATA.Subscribe($"{Module}.FsmState", () => ((PMState)fsm.State).ToString());
|
|
|
|
|
|
- OP.Subscribe($"{Module}.{RtOperation.LeakCheck}", (cmd, args) => CheckToPostMessage((int)MSG.LeakCheck, args));
|
|
|
- OP.Subscribe($"{Module}.Home", (cmd, args) => CheckToPostMessage((int)MSG.Home));
|
|
|
- OP.Subscribe($"{Module}.{RtOperation.StartPump}", (cmd, args) => CheckToPostMessage((int)MSG.LaunchPump));
|
|
|
- return true;
|
|
|
- }
|
|
|
private bool FnIdle(object[] objs)
|
|
|
{
|
|
|
Running = false;
|
|
@@ -335,6 +342,7 @@ namespace Venus_RT.Modules.PMs
|
|
|
private bool FnError(object[] objs)
|
|
|
{
|
|
|
Running = false;
|
|
|
+
|
|
|
if (((PMState)fsm.State == PMState.Processing) || ((PMState)fsm.State == PMState.PreProcess)
|
|
|
|| ((PMState)fsm.State == PMState.Homing) || ((PMState)fsm.State == PMState.LoadProcessRecipe))
|
|
|
return false;
|
|
@@ -343,6 +351,7 @@ namespace Venus_RT.Modules.PMs
|
|
|
{
|
|
|
WaferManager.Instance.UpdateWaferProcessStatus(Module, 0, EnumWaferProcessStatus.Failed);
|
|
|
}
|
|
|
+
|
|
|
return true;
|
|
|
}
|
|
|
|
|
@@ -745,6 +754,61 @@ namespace Venus_RT.Modules.PMs
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ private bool FnStartGasFlow(object[] param)
|
|
|
+ {
|
|
|
+ return _gasFlowRoutine.Start(param) == RState.Running;
|
|
|
+ }
|
|
|
+ private bool FnGasFlowTimeout(object[] param)
|
|
|
+ {
|
|
|
+ RState ret = _gasFlowRoutine.Monitor();
|
|
|
+ if (ret == RState.Failed || ret == RState.Timeout)
|
|
|
+ {
|
|
|
+ PostMsg(MSG.Error);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ return ret == RState.End;
|
|
|
+ }
|
|
|
+
|
|
|
+ private bool FnStopGasFlow(object[] param)
|
|
|
+ {
|
|
|
+ _gasFlowRoutine.Abort();
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ private bool FnAbortGasFlow(object[] param)
|
|
|
+ {
|
|
|
+ _gasFlowRoutine.Abort();
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ private bool FnStartRfPower(object[] param)
|
|
|
+ {
|
|
|
+ return _rfPowerRoutine.Start(param) == RState.Running;
|
|
|
+ }
|
|
|
+ private bool FnRfPowerTimeout(object[] param)
|
|
|
+ {
|
|
|
+ RState ret = _rfPowerRoutine.Monitor();
|
|
|
+ if (ret == RState.Failed || ret == RState.Timeout)
|
|
|
+ {
|
|
|
+ PostMsg(MSG.Error);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ return ret == RState.End;
|
|
|
+ }
|
|
|
+
|
|
|
+ private bool FnAbortRfPower(object[] param)
|
|
|
+ {
|
|
|
+ _rfPowerRoutine.Abort();
|
|
|
+ if(_gasFlowRoutine._gasStatus)
|
|
|
+ {
|
|
|
+ _gasFlowRoutine.StopFlow();
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
private void _debugRoutine()
|
|
|
{
|
|
|
int flag = 0;
|