|
@@ -54,27 +54,27 @@ namespace Venus_RT.Modules.TM
|
|
|
_targetSlot = placeItem.Peek().DestinationSlot;
|
|
|
_hand = placeItem.Peek().RobotHand;
|
|
|
|
|
|
- //if (ModuleHelper.IsLoadLock(_targetModule) && ModuleHelper.IsInstalled(_targetModule))
|
|
|
- //{
|
|
|
- // _llModule = Singleton<RouteManager>.Instance.GetLL(_targetModule);
|
|
|
- //}
|
|
|
- //else
|
|
|
- //{
|
|
|
- // LOG.Write(eEvent.ERR_TM, Module, $"Invalid target module : {_targetModule} for place action");
|
|
|
- // return RState.Failed;
|
|
|
- //}
|
|
|
-
|
|
|
- //if (WaferManager.Instance.CheckNoWafer(ModuleName.TMRobot, (int)_hand))
|
|
|
- //{
|
|
|
- // LOG.Write(eEvent.ERR_TM, Module, $"Cannot place as TM Robot Arm: {_hand} has no wafer");
|
|
|
- // return RState.Failed;
|
|
|
- //}
|
|
|
-
|
|
|
- //if (WaferManager.Instance.CheckHasWafer(_targetModule, _targetSlot))
|
|
|
- //{
|
|
|
- // LOG.Write(eEvent.ERR_TM, Module, $"Cannot place as {_targetModule} Slot {_targetSlot} already has a wafer");
|
|
|
- // return RState.Failed;
|
|
|
- //}
|
|
|
+ if (ModuleHelper.IsLoadLock(_targetModule) && ModuleHelper.IsInstalled(_targetModule))
|
|
|
+ {
|
|
|
+ _llModule = Singleton<RouteManager>.Instance.GetLL(_targetModule);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ LOG.Write(eEvent.ERR_TM, Module, $"Invalid target module : {_targetModule} for place action");
|
|
|
+ return RState.Failed;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (WaferManager.Instance.CheckNoWafer(ModuleName.TMRobot, (int)_hand))
|
|
|
+ {
|
|
|
+ LOG.Write(eEvent.ERR_TM, Module, $"Cannot place as TM Robot Arm: {_hand} has no wafer");
|
|
|
+ return RState.Failed;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (WaferManager.Instance.CheckHasWafer(_targetModule, _targetSlot))
|
|
|
+ {
|
|
|
+ LOG.Write(eEvent.ERR_TM, Module, $"Cannot place as {_targetModule} Slot {_targetSlot} already has a wafer");
|
|
|
+ return RState.Failed;
|
|
|
+ }
|
|
|
|
|
|
Reset();
|
|
|
_placingTimeout = SC.GetValue<int>($"TM.PlaceTimeout") * 1000;
|
|
@@ -84,25 +84,18 @@ namespace Venus_RT.Modules.TM
|
|
|
|
|
|
public RState Monitor()
|
|
|
{
|
|
|
- //Runner.Wait((int)PlaceStep.WaitModuleReady, () => _llModule.IsIdle, _delay_60s)
|
|
|
- // .Run((int)PlaceStep.ModulePrepare, ModulePrepare, IsModulePrepareReady)
|
|
|
- // .Run((int)PlaceStep.OpenSlitDoor, OpenSlitDoor, IsSlitDoorOpen)
|
|
|
- // .Run((int)PlaceStep.Placing, Placing, WaitPlaceDone)
|
|
|
- // .Run((int)PlaceStep.CloseSlitDoor, CloseSlitDoor, IsSlitDoorClosed)
|
|
|
- // .End((int)PlaceStep.NotifyDone, NotifyLLDone, _delay_50ms);
|
|
|
- Runner.Wait((int)PlaceStep.WaitModuleReady, () => true, _delay_60s)
|
|
|
- .Run((int)PlaceStep.ModulePrepare, () => { return true; }, () => { return true; })
|
|
|
- .Run((int)PlaceStep.OpenSlitDoor, () => { return true; }, () => { return true; })
|
|
|
- .Run((int)PlaceStep.Placing, Placing, WaitPlaceDone)
|
|
|
- .Run((int)PlaceStep.CloseSlitDoor, () => { return true; }, () => { return true; })
|
|
|
- .End((int)PlaceStep.NotifyDone, () => { return true; },() => { return true; }, _delay_50ms);
|
|
|
-
|
|
|
+ Runner.Wait((int)PlaceStep.WaitModuleReady, () => _llModule.IsIdle, _delay_60s)
|
|
|
+ .Run((int)PlaceStep.ModulePrepare, ModulePrepare, IsModulePrepareReady)
|
|
|
+ .Run((int)PlaceStep.OpenSlitDoor, OpenSlitDoor, IsSlitDoorOpen)
|
|
|
+ .Run((int)PlaceStep.Placing, Placing, WaitPlaceDone)
|
|
|
+ .Run((int)PlaceStep.CloseSlitDoor, CloseSlitDoor, IsSlitDoorClosed)
|
|
|
+ .End((int)PlaceStep.NotifyDone, NotifyLLDone, _delay_50ms);
|
|
|
return Runner.Status;
|
|
|
}
|
|
|
|
|
|
private bool ModulePrepare()
|
|
|
{
|
|
|
- // _llModule.PostMsg(LLEntity.MSG.Prepare_TM);
|
|
|
+ _llModule.PostMsg(LLEntity.MSG.Prepare_TM);
|
|
|
return true;
|
|
|
}
|
|
|
|