| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 | 
							- using Aitex.Core.RT.Routine;
 
- using Aitex.Core.RT.SCCore;
 
- using Venus_RT.Devices;
 
- using Aitex.Core.Util;
 
- using MECF.Framework.Common.Equipment;
 
- using MECF.Framework.Common.SubstrateTrackings;
 
- using System.Diagnostics;
 
- using System.Collections.Generic;
 
- using Venus_Core;
 
- using Venus_RT.Modules;
 
- namespace Venus_RT.Modules.PMs
 
- {
 
-     class LLPlaceRoutine : PMRoutineBase, IRoutine
 
-     {
 
-         private enum LLPlaceStep
 
-         {
 
-             kPrepareTransfer,
 
-             kExtend,
 
-             KDelay2s,
 
-             kPinUp,
 
-             kRetract,
 
-             kPostTransfer,
 
-             kOpenFastPump,
 
-         }
 
-         private int _prepareTransferTimeout = 120;
 
-         private int _transferWaferTimeout = 120;
 
-         public LLPlaceRoutine(JetPMBase chamber) : base(chamber)
 
-         {
 
-             Name = "PlaceWafer";
 
-         }
 
-         public RState Start(params object[] objs)
 
-         {
 
-             _prepareTransferTimeout = SC.GetValue<int>($"{Module}.PrepareTransferTimeout");
 
-             _transferWaferTimeout = SC.GetValue<int>($"{Module}.TransferWaferTimeout");
 
-             if (WaferManager.Instance.CheckHasWafer(ModuleName.PMA, 0))
 
-             {
 
-                 Stop("腔体里面有 Wafer,不能执行放片动作");
 
-                 return RState.Failed;
 
-             }
 
-             if (WaferManager.Instance.CheckNoWafer(ModuleName.LLA, 0))
 
-             {
 
-                 Stop("Loadlock 里面没有 Wafer,不能执行放片动作");
 
-                 return RState.Failed;
 
-             }
 
-             if (RouteManager.IsATMMode)
 
-             {
 
-                 if (!_chamber.IsATM || !_chamber.IsATMLoadlock)
 
-                 {
 
-                     Stop("腔体非大气状态,请先执行充气动作");
 
-                     return RState.Failed;
 
-                 }
 
-             }
 
-             else
 
-             {
 
-                 if (!_chamber.IsVAC || !_chamber.IsVACLoadLock)
 
-                 {
 
-                     Stop("腔体非真空状态,请先执行抽真空动作");
 
-                     return RState.Failed;
 
-                 }
 
-             }
 
-             _chamber.OpenValve(ValveType.FastPump, false);
 
-             _chamber.OpenValve(ValveType.LoadlockPumping, false);
 
-             Reset();
 
-             return Runner.Start(Module, Name);
 
-         }
 
-         public RState Monitor()
 
-         {
 
-             Runner.Run(LLPlaceStep.kPrepareTransfer,   PrepareTransfer,        IsPrepareReady,                                     _prepareTransferTimeout * 1000)
 
-                 .Run(LLPlaceStep.kExtend,              _chamber.ExtendWafer,   () => { return _chamber.IsLoadlockArmExtend; },     _transferWaferTimeout * 1000)
 
-                 .Delay(LLPlaceStep.KDelay2s, 2000)
 
-                 .Run(LLPlaceStep.kPinUp,               SetLiftPinUp,           () => { return _chamber.CheckLiftUp(); })
 
-                 .Run(LLPlaceStep.kRetract,             _chamber.RetractWafer,  () => { return _chamber.IsLoadlockArmRetract; },    _transferWaferTimeout * 1000)
 
-                 .Run(LLPlaceStep.kPostTransfer,        PostTransfer,           IsPostTransferReady,                                _prepareTransferTimeout * 1000)
 
-                 .End(LLPlaceStep.kOpenFastPump,        OpenFastPump,           _delay_50ms);
 
-             return Runner.Status;
 
-         }
 
-         private bool PrepareTransfer()
 
-         {
 
-             _chamber.SetLiftPin(MovementPosition.Down, out _);
 
-             _chamber.SetSlitDoor(true, out _);
 
-             return true;
 
-         }
 
-         private bool IsPrepareReady()
 
-         {
 
-             return _chamber.CheckLiftDown() && _chamber.CheckSlitDoorOpen();
 
-         }
 
-         private bool PostTransfer()
 
-         {
 
-             WaferManager.Instance.WaferMoved(ModuleName.LLA, 0, ModuleName.PMA, 0);
 
-             _chamber.SetLiftPin(MovementPosition.Down, out _);
 
-             _chamber.SetSlitDoor(false, out _);
 
-             return true;
 
-         }
 
-         private bool IsPostTransferReady()
 
-         {
 
-             return _chamber.CheckLiftDown() && _chamber.CheckSlitDoorClose();
 
-         }
 
-         private bool SetLiftPinUp()
 
-         {
 
-             return _chamber.SetLiftPin(MovementPosition.Up, out _);
 
-         }
 
-         private bool OpenFastPump()
 
-         {
 
-             if (!RouteManager.IsATMMode)
 
-                 _chamber.OpenValve(ValveType.FastPump, true);
 
-             return true;
 
-         }
 
-         public void Abort()
 
-         {
 
-         }
 
-     }
 
- }
 
 
  |