|
@@ -56,27 +56,27 @@ namespace Venus_RT.Modules.TM
|
|
_targetSlot = placeItem.Peek().DestinationSlot;
|
|
_targetSlot = placeItem.Peek().DestinationSlot;
|
|
_hand = placeItem.Peek().RobotHand;
|
|
_hand = placeItem.Peek().RobotHand;
|
|
|
|
|
|
- //if (ModuleHelper.IsPm(_targetModule) && ModuleHelper.IsInstalled(_targetModule))
|
|
|
|
- //{
|
|
|
|
- // _pmModule = Singleton<RouteManager>.Instance.GetPM(_targetModule);
|
|
|
|
- //}
|
|
|
|
- //else
|
|
|
|
- //{
|
|
|
|
- // LOG.Write(eEvent.ERR_TM, Module, $"Invalid target module : {_targetModule} for placing 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.IsPm(_targetModule) && ModuleHelper.IsInstalled(_targetModule))
|
|
|
|
+ {
|
|
|
|
+ _pmModule = Singleton<RouteManager>.Instance.GetPM(_targetModule);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ LOG.Write(eEvent.ERR_TM, Module, $"Invalid target module : {_targetModule} for placing 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;
|
|
|
|
+ }
|
|
|
|
|
|
var wafer = WaferManager.Instance.GetWafer(ModuleName.TMRobot, (int)_hand);
|
|
var wafer = WaferManager.Instance.GetWafer(ModuleName.TMRobot, (int)_hand);
|
|
LOG.Write(eEvent.INFO_TM_ROBOT, ModuleName.TMRobot, $"{wafer.WaferOrigin} will be move from TM Robot {_hand} to {_targetModule} {_targetSlot + 1}");
|
|
LOG.Write(eEvent.INFO_TM_ROBOT, ModuleName.TMRobot, $"{wafer.WaferOrigin} will be move from TM Robot {_hand} to {_targetModule} {_targetSlot + 1}");
|
|
@@ -90,21 +90,13 @@ namespace Venus_RT.Modules.TM
|
|
|
|
|
|
public RState Monitor()
|
|
public RState Monitor()
|
|
{
|
|
{
|
|
- //Runner.Wait((int)PlaceStep.WaitPMReady, () => _pmModule.IsIdle, _delay_60s)
|
|
|
|
- // .Run((int)PlaceStep.PMPrepare, ModulePrepare, IsModulePrepareReady)
|
|
|
|
- // .Run((int)PlaceStep.ArmExtend, ArmExtend, WaitRobotExtendDone)
|
|
|
|
- // .Run((int)PlaceStep.LiftUpWafer, NotifyPMPlaceWafer, WaitPMWaferLiftUp)
|
|
|
|
- // .Delay((int)PlaceStep.PlaceDelay, _placeDelayTime)
|
|
|
|
- // .Run((int)PlaceStep.ArmRetract, ArmRetract, WaitRobotRetractDone)
|
|
|
|
- // .End((int)PlaceStep.NotifyDone, NotifyPMDone, _delay_50ms);
|
|
|
|
- Runner.Wait((int)PlaceStep.WaitPMReady, () => { return true; }, _delay_60s)
|
|
|
|
- .Run((int)PlaceStep.PMPrepare, () => { return true; }, () => { return true; })
|
|
|
|
|
|
+ Runner.Wait((int)PlaceStep.WaitPMReady, () => _pmModule.IsIdle, _delay_60s)
|
|
|
|
+ .Run((int)PlaceStep.PMPrepare, ModulePrepare, IsModulePrepareReady)
|
|
.Run((int)PlaceStep.ArmExtend, ArmExtend, WaitRobotExtendDone)
|
|
.Run((int)PlaceStep.ArmExtend, ArmExtend, WaitRobotExtendDone)
|
|
- .Run((int)PlaceStep.LiftUpWafer, () => { return true; }, () => { return true; })
|
|
|
|
|
|
+ .Run((int)PlaceStep.LiftUpWafer, NotifyPMPlaceWafer, WaitPMWaferLiftUp)
|
|
.Delay((int)PlaceStep.PlaceDelay, _placeDelayTime)
|
|
.Delay((int)PlaceStep.PlaceDelay, _placeDelayTime)
|
|
.Run((int)PlaceStep.ArmRetract, ArmRetract, WaitRobotRetractDone)
|
|
.Run((int)PlaceStep.ArmRetract, ArmRetract, WaitRobotRetractDone)
|
|
- .End((int)PlaceStep.NotifyDone, () => { return true; }, _delay_50ms);
|
|
|
|
-
|
|
|
|
|
|
+ .End((int)PlaceStep.NotifyDone, NotifyPMDone, _delay_50ms);
|
|
return Runner.Status;
|
|
return Runner.Status;
|
|
}
|
|
}
|
|
|
|
|