|
@@ -12,6 +12,7 @@ using Aitex.Core.Util;
|
|
|
using Venus_RT.Modules.PMs;
|
|
|
using MECF.Framework.Common.Schedulers;
|
|
|
using System.Collections.Generic;
|
|
|
+using System;
|
|
|
|
|
|
namespace Venus_RT.Modules.TM
|
|
|
{
|
|
@@ -39,6 +40,7 @@ namespace Venus_RT.Modules.TM
|
|
|
{
|
|
|
WaitPMReady,
|
|
|
PreRotation,
|
|
|
+ WaitPressreStable,
|
|
|
OpenSlitDoor,
|
|
|
PickPrepare,
|
|
|
Picking,
|
|
@@ -59,6 +61,7 @@ namespace Venus_RT.Modules.TM
|
|
|
private int _targetSlot;
|
|
|
private Hand _pickHand;
|
|
|
private Hand _placeHand;
|
|
|
+ double maxPressureDifference;
|
|
|
|
|
|
public MFPMSwapRoutine(JetTM tm, ITransferRobot robot) : base(ModuleName.TMRobot)
|
|
|
{
|
|
@@ -122,7 +125,7 @@ namespace Venus_RT.Modules.TM
|
|
|
_swapingTimeout = SC.GetValue<int>($"TM.SwapTimeout") * 1000;
|
|
|
_pickDelayTime = SC.GetValue<int>($"{_targetModule}.PickDelayTime");
|
|
|
_placeDelayTime = SC.GetValue<int>($"{_targetModule}.PlaceDelayTime");
|
|
|
-
|
|
|
+ maxPressureDifference = SC.GetValue<double>("System.PMTMMaxPressureDifference");
|
|
|
return Runner.Start(Module, $"Swap with {_targetModule}");
|
|
|
}
|
|
|
|
|
@@ -171,6 +174,7 @@ namespace Venus_RT.Modules.TM
|
|
|
|
|
|
Runner.Wait(SwapWithHeaterStep.WaitPMReady, () => _pmModule.IsIdle, _delay_60s)
|
|
|
.RunIf(SwapWithHeaterStep.PreRotation, _JetTM.PreRotateModules.ContainsKey(_targetModule), RotateArm, WaitRotateDone)
|
|
|
+ .Wait(SwapWithHeaterStep.WaitPressreStable, TMPMPressureIsOK, _delay_60s)
|
|
|
.Run(SwapWithHeaterStep.OpenSlitDoor, OpenPMSlitDoor, OpenPMSlitDoorIsOK)
|
|
|
.Run(SwapWithHeaterStep.PickPrepare, PickPrepare, IsModuleReadyForPick)
|
|
|
.Run(SwapWithHeaterStep.Picking, Picking, WaitPickDone)
|
|
@@ -188,6 +192,24 @@ namespace Venus_RT.Modules.TM
|
|
|
_pmModule.PostMsg(PMEntity.MSG.PreparePick);
|
|
|
return true;
|
|
|
}
|
|
|
+ private bool TMPMPressureIsOK()
|
|
|
+ {
|
|
|
+ if (RouteManager.IsATMMode)
|
|
|
+ {
|
|
|
+ return _JetTM.IsTMATM && _JetTM.IsModuleATM(_targetModule);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (Math.Abs((_pmModule.ChamberPressure - _JetTM.ChamberPressure)) < maxPressureDifference)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
private bool OpenPMSlitDoor()
|
|
|
{
|
|
|
return _JetTM.TurnMFSlitDoor(_targetModule, true, out _);
|