Browse Source

update VPW Home

chenkui 1 day ago
parent
commit
d2df24ff44

+ 0 - 4
Framework/Common/Routine/RoutineBase.cs

@@ -51,10 +51,6 @@ namespace MECF.Framework.Common.Routine
             get { return Runner.CurrentStep.ToString();  }
         }
 
-        public string RoutineName
-        {
-            get; set;
-        }
 
         public RoutineBase(string module)
         {

+ 1 - 1
PunkHPX8_RT/Modules/VpwCell/VpwCellEntity.cs

@@ -256,10 +256,10 @@ namespace PunkHPX8_RT.Modules.VpwMain
             fsm = new StateMachine<VpwCellEntity>(Module.ToString(), (int)VPWCellState.Init, 100);
             fsm.EnableRepeatedMsg(true);
             AnyStateTransition(VPWCellMsg.Error, NullFunc, VPWCellState.Error);
+            AnyStateTransition(VPWCellMsg.MainInitialize, NullFunc, VPWCellState.MainInitializing);
             //Initialized
             Transition(VPWCellState.Error, VPWCellMsg.Initialize, InitializeAll, VPWCellState.Initializing);
             Transition(VPWCellState.Aborting, VPWCellMsg.Initialize, InitializeAll, VPWCellState.Initializing);
-            Transition(VPWCellState.Init, VPWCellMsg.MainInitialize, NullFunc, VPWCellState.MainInitializing);
             Transition(VPWCellState.Init, VPWCellMsg.Initialize, InitializeAll, VPWCellState.Initializing);
             Transition(VPWCellState.Idle, VPWCellMsg.Initialize, InitializeAll, VPWCellState.Initializing);
             Transition(VPWCellState.Initializing, FSM_MSG.TIMER, InitializeAllMonitor, VPWCellState.Idle);

+ 0 - 1
PunkHPX8_RT/Modules/VpwCell/VpwPrepareRoutine.cs

@@ -69,7 +69,6 @@ namespace PunkHPX8_RT.Modules.VpwCell
         /// <param name="module"></param>
         public VpwPrepareRoutine(string module) : base(module)
         {
-            RoutineName = "VpwPrepare";
         }
         /// <summary>
         /// 中止

+ 65 - 5
PunkHPX8_RT/Modules/VpwCell/VpwRecipeRoutine.cs

@@ -25,6 +25,12 @@ namespace PunkHPX8_RT.Modules.VpwCell
             CheckLoopDO,
             VacuumPrewet,
             WaitVacuumPrewet,
+            VentPrewet,
+            WaitVentPrewet,
+            ExtendClean,
+            WaitExtendClean,
+            SpinOff,
+            WaitSpinOff,
             End
         }
         #region 内部变量
@@ -44,6 +50,18 @@ namespace PunkHPX8_RT.Modules.VpwCell
         /// Vacuum prewet routine
         /// </summary>
         private VpwVacuumPrewetRoutine _vacuumPrewetRoutine;
+        /// <summary>
+        /// Vent Prewet
+        /// </summary>
+        private VpwVentPrewetRoutine _ventPrewetRoutine;
+        /// <summary>
+        /// Extend clean
+        /// </summary>
+        private VpwExtendCleanRoutine _extendCleanRoutine;
+        /// <summary>
+        /// Spin Off Routine
+        /// </summary>
+        private VpwSpinOffRoutine _spinOffRoutine;
         #endregion
         /// <summary>
         /// 构造函数
@@ -52,6 +70,9 @@ namespace PunkHPX8_RT.Modules.VpwCell
         public VpwRecipeRoutine(string module) : base(module)
         {
             _vacuumPrewetRoutine = new VpwVacuumPrewetRoutine(Module);
+            _ventPrewetRoutine = new VpwVentPrewetRoutine(module);
+            _extendCleanRoutine = new VpwExtendCleanRoutine(module);
+            _spinOffRoutine = new VpwSpinOffRoutine(module);
         }
 
         /// <summary>
@@ -71,7 +92,17 @@ namespace PunkHPX8_RT.Modules.VpwCell
                 .Run(RecipeStep.CloseDrain, _vpwCellDevice.DrainValveOff, _delay_1ms)
                 .Run(RecipeStep.CheckLoopDO, CheckLoopDO, _delay_1ms)
                 .Run(RecipeStep.VacuumPrewet,VacuumPrewet,_delay_1ms)
-                .WaitWithStopCondition(RecipeStep.WaitVacuumPrewet,CheckVacuumPrewetEndStatus,CheckVacuumPrewetStopStatus)
+                .WaitWithStopCondition(RecipeStep.WaitVacuumPrewet, () => CommonFunction.CheckRoutineEndState(_vacuumPrewetRoutine),
+                    () => { return CheckSubRoutineError(_vacuumPrewetRoutine, _vacuumPrewetRoutine, 1); })
+                .Run(RecipeStep.VentPrewet, VentPrewet)
+                .WaitWithStopCondition(RecipeStep.WaitVentPrewet, () => CommonFunction.CheckRoutineEndState(_ventPrewetRoutine),
+                    () => { return CheckSubRoutineError(_ventPrewetRoutine, _ventPrewetRoutine, 2); })
+                .Run(RecipeStep.ExtendClean, ExtendClean)
+                .WaitWithStopCondition(RecipeStep.WaitExtendClean, () => CommonFunction.CheckRoutineEndState(_extendCleanRoutine),
+                    () => { return CheckSubRoutineError(_extendCleanRoutine, _extendCleanRoutine, 3); })
+                .Run(RecipeStep.SpinOff, SpinOff)
+                .WaitWithStopCondition(RecipeStep.WaitSpinOff, () => CommonFunction.CheckRoutineEndState(_spinOffRoutine),
+                    () => { return CheckSubRoutineError(_spinOffRoutine, _spinOffRoutine, 4); })
                 .End(RecipeStep.End, NullFun, _delay_1ms);
             return Runner.Status;
         }
@@ -142,15 +173,44 @@ namespace PunkHPX8_RT.Modules.VpwCell
             return result;
         }
         /// <summary>
-        /// 检验Vacuum Prewet异常
+        /// Vent Prewet
         /// </summary>
         /// <returns></returns>
-        private bool CheckVacuumPrewetStopStatus()
+        private bool VentPrewet()
         {
-            bool result=CommonFunction.CheckRoutineStopState(_vacuumPrewetRoutine);
+            return _ventPrewetRoutine.Start(_recipe) == RState.Running;
+        }
+
+        /// <summary>
+        /// Extend Clean
+        /// </summary>
+        /// <returns></returns>
+        private bool ExtendClean()
+        {
+            return _extendCleanRoutine.Start(_recipe) == RState.Running;
+        }
+
+        /// <summary>
+        /// Vacuum Prewet
+        /// </summary>
+        /// <returns></returns>
+        private bool SpinOff()
+        {
+            return _spinOffRoutine.Start(_recipe) == RState.Running;
+        }
+        /// <summary>
+        /// 检验子routine异常
+        /// </summary>
+        /// <param name="routine"></param>
+        /// <param name="routineBase"></param>
+        /// <param name="index"></param>
+        /// <returns></returns>
+        private bool CheckSubRoutineError(IRoutine routine, RoutineBase routineBase, int index)
+        {
+            bool result = CommonFunction.CheckRoutineStopState(routine);
             if (result)
             {
-                NotifyError(eEvent.ERR_VPW, _vacuumPrewetRoutine.ErrorMsg, 1);
+                NotifyError(eEvent.ERR_VPW, routineBase.ErrorMsg, index);
             }
             return result;
         }

+ 1 - 1
PunkHPX8_RT/Modules/VpwMain/VPWHomeRoutine.cs

@@ -536,7 +536,7 @@ namespace PunkHPX8_RT.Modules.VpwMain
                 VpwMainEntity vpwMainEntity = Singleton<RouteManager>.Instance.GetModule<VpwMainEntity>(ModuleName.VPWMain1.ToString());
                 if (_totalFlowOk)
                 {
-                    vpwMainEntity.CheckToPostMessage<VPWMainState, VPWMainMsg>(eEvent.INFO_VPWMAIN, ModuleName.VPWMain1.ToString(), (int)VPWCellMsg.EnterIdle);
+                    vpwMainEntity.CheckToPostMessage<VPWMainState, VPWMainMsg>(eEvent.INFO_VPWMAIN, ModuleName.VPWMain1.ToString(), (int)VPWMainMsg.EnterIdle);
                 }
                 else
                 {

+ 1 - 1
PunkHPX8_RT/Schedulers/EfemRobot/SchedulerRobot.cs

@@ -152,7 +152,7 @@ namespace PunkHPX8_RT.Schedulers.EfemRobot
             }
             if (WaferManager.Instance.CheckHasWafer(moveItem.DestinationModule, moveItem.DestinationSlot))
             {
-                reason = $"{moveItem.DestinationSlot} slot {moveItem.SourceSlot} has wafer";
+                reason = $"{moveItem.DestinationModule} slot {moveItem.DestinationSlot} has wafer";
                 return false;
             }
 

+ 26 - 0
PunkHPX8_RT/Schedulers/SchedulerSequenceManager.cs

@@ -571,6 +571,32 @@ namespace PunkHPX8_RT.Schedulers
             }
             return vpws;
         }
+        /// <summary>
+        /// 检验VPW是否相同尺寸
+        /// </summary>
+        /// <returns></returns>
+        public bool CheckSystemHasTheSameSizeVpw()
+        {
+            VpwCellEntity vpwCellEntity1 = Singleton<RouteManager>.Instance.GetModule<VpwCellEntity>(ModuleName.VPW1.ToString());
+            VpwCellEntity vpwCellEntity2 = Singleton<RouteManager>.Instance.GetModule<VpwCellEntity>(ModuleName.VPW2.ToString());
+            if (vpwCellEntity1 == null || vpwCellEntity2 == null)
+            {
+                return false;
+            }
+            if (!vpwCellEntity1.IsAuto || !vpwCellEntity2.IsAuto)
+            {
+                return false;
+            }
+            if(vpwCellEntity1.IsDisable || vpwCellEntity2.IsDisable)
+            {
+                return false; 
+            }
+            if (vpwCellEntity1.VpwWaferSize != vpwCellEntity2.VpwWaferSize)
+            {
+                return false;
+            }
+            return true;
+        }
     }
 
 

+ 27 - 0
PunkHPX8_RT/Schedulers/VPW/SchedulerVPW.cs

@@ -112,6 +112,33 @@ namespace PunkHPX8_RT.Schedulers.Srd
                 reason = $"{_vpwEntity.Module} has no wafer";
                 return false;
             }
+
+            if (!SchedulerSequenceManager.Instance.CheckSystemHasTheSameSizeVpw())
+            {
+                return true;
+            }
+
+            VpwCellEntity vpwCellEntity1 = Singleton<RouteManager>.Instance.GetModule<VpwCellEntity>(ModuleName.VPW1.ToString());
+            VpwCellEntity vpwCellEntity2 = Singleton<RouteManager>.Instance.GetModule<VpwCellEntity>(ModuleName.VPW2.ToString());
+
+            if (vpwCellEntity1.State != (int)VPWCellState.WaitForRunRecipe && vpwCellEntity1.State != (int)VPWCellState.RunReciping)
+            {
+                return false;
+            }
+            if (WaferManager.Instance.CheckNoWafer(ModuleName.VPW1, 0))
+            {
+                reason = $"{ModuleName.VPW1} has no wafer";
+                return false;
+            }
+            if (vpwCellEntity2.State != (int)VPWCellState.WaitForRunRecipe&&vpwCellEntity2.State!=(int)VPWCellState.RunReciping)
+            {
+                return false;
+            }
+            if (WaferManager.Instance.CheckNoWafer(ModuleName.VPW2, 0))
+            {
+                reason = $"{ModuleName.VPW2} has no wafer";
+                return false;
+            }
             return true;
         }
     }