123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- using Aitex.Core.RT.Routine;
- using Aitex.Core.RT.SCCore;
- using Venus_RT.Devices;
- using MECF.Framework.Common.Routine;
- using System.Diagnostics;
- using System.Collections.Generic;
- using Venus_Core;
- namespace Venus_RT.Modules.PMs
- {
- class LLPlaceRoutine : PMRoutineBase, IRoutine
- {
- private enum LLPlaceStep
- {
- kPrepareTransfer,
- kExtend,
- kPinUp,
- kRetract,
- kPostTransfer,
- kOpenFastPump,
- }
- private int _prepareTransferTimeout = 120;
- private int _transferWaferTimeout = 120;
- private bool _isATMMode = false;
- public LLPlaceRoutine(JetPM chamber) : base(chamber)
- {
- Name = "PlaceWafer";
- }
- public RState Start(params object[] objs)
- {
- _prepareTransferTimeout = SC.GetValue<int>($"{Module}.PrepareTransferTimeout");
- _transferWaferTimeout = SC.GetValue<int>($"{Module}.TransferWaferTimeout");
- _isATMMode = SC.GetValue<bool>("System.IsATMMode");
- if(_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((int)LLPlaceStep.kPrepareTransfer, PrepareTransfer, IsPrepareReady, _prepareTransferTimeout * 1000)
- .Run((int)LLPlaceStep.kExtend, _chamber.ExtendWafer, () => { return _chamber.IsLoadlockArmExtend; }, _transferWaferTimeout * 1000)
- .Run((int)LLPlaceStep.kPinUp, SetLiftPinUp, () => { return _chamber.CheckLiftUp(); })
- .Run((int)LLPlaceStep.kRetract, _chamber.RetractWafer, () => { return _chamber.IsLoadlockArmRetract; }, _transferWaferTimeout * 1000)
- .Run((int)LLPlaceStep.kPostTransfer, PostTransfer, IsPostTransferReady, _prepareTransferTimeout * 1000)
- .End((int)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()
- {
- _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 (!_isATMMode)
- _chamber.OpenValve(ValveType.FastPump, true);
- return true;
- }
- public void Abort()
- {
- }
- }
- }
|