浏览代码

Add Abort while SE Cycle, ReturnWafer, manual transfer && fix bug in SETM simulator && update UI in SE Operation,TM View

zhouhr 1 年之前
父节点
当前提交
0728fdc25a

+ 25 - 1
Venus/Venus_MainPages/ViewModels/VenusSeOperationOverViewModel.cs

@@ -53,12 +53,30 @@ namespace Venus_MainPages.ViewModels
         private double m_PMBPercent;
         private double m_PMCPercent;
         private int m_PickNum;
+        private RecipeResult m_PMARecipeResult;
+        private RecipeResult m_PMBRecipeResult;
+        private RecipeResult m_PMCRecipeResult;
 
         private WaferAssociationInfo m_VCEwaferAssociation;
         private bool loadflag;
         #endregion
 
         #region 属性
+        public RecipeResult PMARecipeResult
+        {
+            get { return m_PMARecipeResult; }
+            set { SetProperty(ref m_PMARecipeResult, value); }
+        }
+        public RecipeResult PMBRecipeResult
+        {
+            get { return m_PMBRecipeResult; }
+            set { SetProperty(ref m_PMBRecipeResult, value); }
+        }
+        public RecipeResult PMCRecipeResult
+        {
+            get { return m_PMCRecipeResult; }
+            set { SetProperty(ref m_PMCRecipeResult, value); }
+        }
         public double PMAPercent
         {
             get { return m_PMAPercent; }
@@ -426,7 +444,7 @@ namespace Venus_MainPages.ViewModels
         }
         private void OnAbortAll()
         {
-            InvokeClient.Instance.Service.DoOperation("System.Abort");
+            InvokeClient.Instance.Service.DoOperation("System.SEAbort");
         }
 
         private void AssociateSequence(WaferAssociationInfo info, bool flag, int slot = -1)
@@ -482,16 +500,19 @@ namespace Venus_MainPages.ViewModels
 
                 m_RtDataKeys.Add($"PMA.ProcessHighPressure");
                 m_RtDataKeys.Add($"PMA.VentingFlag");
+                m_RtDataKeys.Add($"PMA.CurrentRecipeResult");
             }
             if (PMBIsInstalled)
             {
                 m_RtDataKeys.Add($"PMB.ProcessHighPressure");
                 m_RtDataKeys.Add($"PMB.VentingFlag");
+                m_RtDataKeys.Add($"PMB.CurrentRecipeResult");
             }
             if (PMCIsInstalled)
             {
                 m_RtDataKeys.Add($"PMC.ProcessHighPressure");
                 m_RtDataKeys.Add($"PMC.VentingFlag");
+                m_RtDataKeys.Add($"PMC.CurrentRecipeResult");
             }
 
         }
@@ -606,18 +627,21 @@ namespace Venus_MainPages.ViewModels
                     PMAModuleInfo = ModuleManager.ModuleInfos["PMA"];
                     PMAWafer = PMAModuleInfo.WaferManager.Wafers[0];
                     PMAPercent = CommonFunction.GetValue<double>(RtDataValues, "PMA.ProcessHighPressure") * 248 / 760000;
+                    PMARecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, "PMA.CurrentRecipeResult");
                 }
                 if (PMBIsInstalled == true)
                 {
                     PMBModuleInfo = ModuleManager.ModuleInfos["PMB"];
                     PMBWafer = PMBModuleInfo.WaferManager.Wafers[0];
                     PMBPercent = CommonFunction.GetValue<double>(RtDataValues, "PMB.ProcessHighPressure") * 248 / 760000;
+                    PMBRecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, "PMB.CurrentRecipeResult");
                 }
                 if (PMCIsInstalled == true)
                 {
                     PMCModuleInfo = ModuleManager.ModuleInfos["PMC"];
                     PMCWafer = PMCModuleInfo.WaferManager.Wafers[0];
                     PMCPercent = CommonFunction.GetValue<double>(RtDataValues, "PMC.ProcessHighPressure") * 248 / 760000;
+                    PMCRecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, "PMC.CurrentRecipeResult");
                 }
                 if (VCEIsInstalled == true)
                 {

+ 1 - 1
Venus/Venus_MainPages/Views/SeTMView.xaml

@@ -127,7 +127,7 @@
 
                     <userControls:TMChamber Panel.ZIndex="1" ModuleName="PMA" x:Name="PMA" Canvas.Top="275"  Canvas.Left="277" Width="100" Height="100" RotateTransformValue="-90"  DoorIsOpen="{Binding RtDataValues[PMA.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMAWafer}" PMVisibility="{Binding PMAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" HorizontalAlignment="Center" VerticalAlignment="Top"/>
                     <userControls:TMChamber Panel.ZIndex="1" ModuleName="PMB" x:Name="PMB" Canvas.Top="45"   Canvas.Left="409" Width="100" Height="100"  DoorIsOpen="{Binding RtDataValues[PMB.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMBWafer}" PMVisibility="{Binding PMBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
-                    <userControls:TMChamber Panel.ZIndex="1" ModuleName="PMC" x:Name="PMC" Canvas.Top="174"   Canvas.Left="642" Width="102" Height="102" RotateTransformValue="90" DoorIsOpen="{Binding RtDataValues[PMC.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMBWafer}" PMVisibility="{Binding PMCIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
+                    <userControls:TMChamber Panel.ZIndex="1" ModuleName="PMC" x:Name="PMC" Canvas.Top="174"   Canvas.Left="642" Width="102" Height="102" RotateTransformValue="90" DoorIsOpen="{Binding RtDataValues[PMC.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMCWafer}" PMVisibility="{Binding PMCIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
                     <!--<userControls:TMChamber ModuleName="PMC" x:Name="PMC" Canvas.Top="155"  Canvas.Left="680" Width="140" Height="140" RotateTransformValue="90"  DoorIsOpen="{Binding RtDataValues[PMC.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMCWafer}" PMVisibility="{Binding PMCIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" HorizontalAlignment="Center" VerticalAlignment="Top"/>-->
                     <TextBlock Canvas.Top="535" Canvas.Left="435" Text="Vce" FontSize="25" FontWeight="Normal" HorizontalAlignment="Center" VerticalAlignment="Top"></TextBlock>
                     <userControls:Vce Canvas.Top="360" Canvas.Left="355" Width="200" Height="180" HorizontalAlignment="Center" VerticalAlignment="Top"></userControls:Vce>

文件差异内容过多而无法显示
+ 182 - 47
Venus/Venus_MainPages/Views/VenusSeOperationOverView.xaml


+ 4 - 4
Venus/Venus_RT/Config/TM/_ioDefineVenusSE_MF.xml

@@ -132,11 +132,11 @@
     <AO_ITEM Index="49" Name="" />
   </Ana_Out>
   <Ana_In>
-    <AI_ITEM Index="0" Name="AI_MFC_Flow"  BufferOffset="0" Device="" Addr="D100" />
-    <AI_ITEM Index="1" Name="AI_VCE_Vacuum_Gauge"  BufferOffset="1" Device="" Addr="D101" />
+	<AI_ITEM Index="0" Name="AI_MFC_Flow"  BufferOffset="2" Device="" Addr="D100" />
+    <AI_ITEM Index="1" Name="AI_VCE_Vacuum_Gauge"  BufferOffset="10" Device="" Addr="D101" />
     <AI_ITEM Index="2" Name="AI_TM_Vacuum_Gauge"  BufferOffset="2" Device="" Addr="D102"/>
-    <AI_ITEM Index="3" Name="AI_VCE_Pipeline_Vacuum_Gauge"  BufferOffset="3" Device="" Addr="D103"/>
-    <AI_ITEM Index="4" Name="AI_TM_Pipeline_Vacuum_Gauge"  BufferOffset="4" Device="" Addr="D104"/>
+    <AI_ITEM Index="3" Name="AI_VCE_Pipeline_Vacuum_Gauge"  BufferOffset="10" Device="" Addr="D103"/>
+    <AI_ITEM Index="4" Name="AI_TM_Pipeline_Vacuum_Gauge"  BufferOffset="22" Device="" Addr="D104"/>
     <AI_ITEM Index="5" Name=""/>
     <AI_ITEM Index="6" Name="" />
     <AI_ITEM Index="7" Name=""/>

+ 71 - 0
Venus/Venus_RT/Devices/JetVenusSEPM.cs

@@ -1032,6 +1032,77 @@ namespace Venus_RT.Devices
             _TurboPump?.SetPumpOnOff(on);
         }
 
+        public override bool PreparePlace()
+        {
+            if (!SetSlitDoor(true, out string reason))
+            {
+                LOG.Write(eEvent.ERR_PM, Module, $"Set Slit Door Open failed:{reason}");
+                return false;
+            }
+            if (!SetLiftPin(MovementPosition.Down, out reason))
+            {
+                LOG.Write(eEvent.ERR_PM, Module, $"Set Lift Pin down failed:{reason}");
+                return false;
+            }
+            return true;
+        }
+        public override bool PreparePick()
+        {
+            if (!SetSlitDoor(true, out string reason))
+            {
+                LOG.Write(eEvent.ERR_PM, Module, $"Set Slit Door Open failed:{reason}");
+                return false;
+            }
+            if (!SetLiftPin(MovementPosition.Up, out reason))
+            {
+                LOG.Write(eEvent.ERR_PM, Module, $"Set Lift Pin Up failed:{reason}");
+                return false;
+            }
+            return true;
+        }
+        public override bool PreparePlaceIsOK()
+        {
+            return CheckSlitDoorOpen() && LiftPinIsDown;
+        }
+        public override bool PreparePickIsOK()
+        {
+            return CheckSlitDoorOpen() && LiftPinIsUp;
+        }
+        public override bool EndPlace()
+        {
+            if (!SetLiftPin(MovementPosition.Down, out string reason))
+            {
+                LOG.Write(eEvent.ERR_PM, Module, $"Set Lift Pin Down failed:{reason}");
+                return false;
+            }
+
+            if (!SetSlitDoor(false, out reason))
+            {
+                LOG.Write(eEvent.ERR_PM, Module, $"Set Slit Door Close failed:{reason}");
+                return false;
+            }
+
+            return true;
+        }
+
+        public override bool EndPick()
+        {
+            if (!SetSlitDoor(false, out string reason))
+            {
+                LOG.Write(eEvent.ERR_PM, Module, $"Set Slit Door Close failed:{reason}");
+                return false;
+            }
+            return true;
+        }
+        public override bool EndPlaceIsOK()
+        {
+            return CheckSlitDoorClose() && LiftPinIsDown;
+        }
+        public override bool EndPickIsOK()
+        {
+            return CheckSlitDoorClose();
+        }
+
         #endregion
 
         protected override void CheckPermanentInterlock()

+ 1 - 1
Venus/Venus_RT/Devices/TM/HongHuTM.cs

@@ -438,7 +438,7 @@ namespace Venus_RT.Devices
                 double PMPressure = Singleton<RouteManager>.Instance.GetPM(mod).ChamberPressure;
                 if (Math.Abs(_TMPressure.Value - PMPressure) > MaxPressureDifference)
                 {
-                    LOG.Write(eEvent.ERR_TM, $"cannot open door cause pressure, TM Pressure:{_TMPressure.Value} and {mod} pressure:{PMPressure}");
+                    LOG.Write(eEvent.ERR_TM, ModuleName.SETM, $"cannot open door cause pressure, TM Pressure:{_TMPressure.Value} and {mod} pressure:{PMPressure}");
                     return false;
                 }
                 else

+ 1 - 0
Venus/Venus_RT/Devices/TM/HongHuVR.cs

@@ -263,6 +263,7 @@ namespace Venus_RT.Devices.VCE
             switch (_currentStep)
             {
                 case VRStep.Goto:
+                case VRStep.Halt:
                 case VRStep.Move:
                 case VRStep.Xfer:
                 case VRStep.Pick:

+ 12 - 6
Venus/Venus_RT/Modules/RouteManager.cs

@@ -73,7 +73,8 @@ namespace Venus_RT.Modules
             StartSEJob,
             AbortSEJob,
             SEMoveWafer,
-            SEReturnWafer
+            SEReturnWafer,
+            SEAbort,
         }
 
         public PMEntity PMA { get; private set; }
@@ -446,6 +447,7 @@ namespace Venus_RT.Modules
             OP.Subscribe("System.CreateSEJob", (cmd, args) => CheckToPostMessage((int)MSG.CreateSEJob, args));
             OP.Subscribe("System.StartSEJob",(cmd,args)=>CheckToPostMessage((int)MSG.StartSEJob,args));
             OP.Subscribe("System.ReturnAllSEWafer", (cmd, args) => CheckToPostMessage((int)MSG.SEReturnWafer, args));
+            OP.Subscribe("System.SEAbort", (cmd, args) => CheckToPostMessage((int)MSG.SEAbort, args));
         }
         public bool CheckToPostMessage(int msg, params object[] args)
         {
@@ -716,21 +718,21 @@ namespace Venus_RT.Modules
             // SETM  Cycle
             Transition(RtState.Idle,            MSG.SETMCycle,          FsmStartSETMCycle,          RtState.SETMCycle);
             Transition(RtState.SETMCycle,       FSM_MSG.TIMER,          FsmMonitorSETMCycle,        RtState.Idle);
-            Transition(RtState.SETMCycle,       MSG.StopSECycle,        FsmStopSETMCycle,           RtState.Idle);
+            Transition(RtState.SETMCycle,       MSG.SEAbort,            SEAbort,                    RtState.Idle);
             // SETM CreateCycle                                                                     
             Transition(RtState.Idle,            MSG.CreateSEJob,        FsmStartCreateSEJob,        RtState.Idle);
             // SETM StartCycle                                                                      
             Transition(RtState.Idle,            MSG.StartSEJob,         FsmStartSEJob,              RtState.SERunning);
             Transition(RtState.SERunning,       FSM_MSG.TIMER,          FsmSEJobMonitor,            RtState.Idle);
-            Transition(RtState.SERunning,       MSG.StopSECycle,        FsmStopSETMCycle,           RtState.Idle);
+            Transition(RtState.SERunning,       MSG.SEAbort,            SEAbort,                    RtState.Idle);
             // SE Transfer
             Transition(RtState.Idle,            MSG.SEMoveWafer,        FsmStartSEMoveWafer,        RtState.SETransfer);
             Transition(RtState.SETransfer,      FSM_MSG.TIMER,          FsmMonitorSEMoveWafer,      RtState.Idle);
-            Transition(RtState.SETransfer,      MSG.StopSECycle,        FsmSEAbort,                 RtState.Idle);
+            Transition(RtState.SETransfer,      MSG.SEAbort,            SEAbort,                    RtState.Idle);
             // SE ReturnWafer
             Transition(RtState.Idle,            MSG.SEReturnWafer,      FsmStartSEReturnWafer,      RtState.SEReturnWafer);
             Transition(RtState.SEReturnWafer,   FSM_MSG.TIMER,          FsmMonitorSEReturnWafer,    RtState.Idle);
-            Transition(RtState.SEReturnWafer,   MSG.StopSECycle,        FsmSEAbort,                 RtState.Idle);
+            Transition(RtState.SEReturnWafer,   MSG.SEAbort,            SEAbort,                    RtState.Idle);
         }
 
         private bool FsmMonitor(object[] objs)
@@ -822,6 +824,7 @@ namespace Venus_RT.Modules
             return true;
         }
 
+
         private bool FsmStartTMCycle(object[] objs)
         {
             return _TMCycle.Start(objs) == RState.Running;
@@ -1100,9 +1103,12 @@ namespace Venus_RT.Modules
             return ret == RState.End;
         }
 
-        private bool FsmSEAbort(object[] objs)
+        private bool SEAbort(object[] objs)
         {
+            _seTMCycle.Abort();
             _setransfer.Abort();
+            _sereturnWafer.Abort();
+            seTM.CheckToPostMessage((int)SETMEntity.MSG.Abort);
             return true;
         }
     }

+ 7 - 2
Venus/Venus_RT/Modules/SEManualTransfer.cs

@@ -1,5 +1,6 @@
 using Aitex.Core.Common;
 using Aitex.Core.RT.Device.Unit;
+using Aitex.Core.RT.Fsm;
 using Aitex.Core.RT.Log;
 using Aitex.Core.RT.Routine;
 using Aitex.Core.RT.SCCore;
@@ -180,7 +181,10 @@ namespace Venus_RT.Modules
 
         public void Abort()
         {
-
+            _transferstate = RState.End;
+            _tmrobot._entityTaskToken = (int)FSM_MSG.NONE;
+            _moveQueue.Clear();
+            _moving_status = MovingStatus.Idle;
         }
     }
 
@@ -284,7 +288,8 @@ namespace Venus_RT.Modules
 
         public void Abort()
         {
-
+            _transfer.Abort();
+            _ReturnQueue.Clear();
         }
     }
 }

+ 8 - 1
Venus/Venus_RT/Modules/SETMCycle.cs

@@ -386,7 +386,7 @@ namespace Venus_RT.Modules
                 else
                 {
                     Cycling();
-                    PMProcess();
+                    //PMProcess();
                 }
 
             }
@@ -897,7 +897,14 @@ namespace Venus_RT.Modules
         public void Abort()
         {
             CycleIndex = null;
+            _runningItems.Clear(); 
+            _CycleWafers.Clear();
+            _moveQueue.Clear();
+            movingStatus.Clear();
+            foreach(var cj in _lstControlJobs.FindAll(x => x.State == EnumControlJobState.Executing))
+                cj.SetState(EnumControlJobState.WaitingForStart);
             _TMRobot._entityTaskToken = (int)FSM_MSG.NONE;
+            _cycleState = RState.End;
         }
         #endregion
 

+ 1 - 0
Venus/Venus_RT/Modules/VCE/LoadPrepareRoutine.cs

@@ -43,6 +43,7 @@ namespace Venus_RT.Modules.VCE
                 LOG.Write(eEvent.ERR_VCE_COMMON_Failed, Module, $"VCE is not atm cannot load prepare! Please Vent it First!");
                 return RState.Failed;
             }
+            
             _vcetimeout = SC.GetValue<int>($"{Module}.MotionTimeout") * 1000;
             Reset();
             return Runner.Start(Module, $"Load Prepare");

+ 7 - 1
Venus/Venus_RT/Modules/VCE/LoadRoutine.cs

@@ -1,4 +1,5 @@
 using Aitex.Core.RT.Device;
+using Aitex.Core.RT.Log;
 using Aitex.Core.RT.Routine;
 using Aitex.Core.RT.SCCore;
 using Aitex.Core.Util;
@@ -46,7 +47,12 @@ namespace Venus_RT.Modules.VCE
 
             _tm = DEVICE.GetDevice<HongHuTM>("SETM");
             _timeout = SC.GetValue<int>($"{Module}.MotionTimeout") *1000;
-            
+            //if vce inner door not close cannot do it as it will pump
+            if (!Singleton<RouteManager>.Instance.seTM.IsVCESlitDoorClosed)
+            {
+                LOG.Write(eEvent.ERR_VCE_COMMON_Failed, Module, $"VCE Inner Door is open! Please close it First!");
+                return RState.Failed;
+            }
             Reset();
             return Runner.Start(Module,"Vce Load Routine");
         }

+ 7 - 0
Venus/Venus_RT/Modules/VCE/UnloadRoutine.cs

@@ -1,4 +1,5 @@
 using Aitex.Core.RT.Device;
+using Aitex.Core.RT.Log;
 using Aitex.Core.RT.Routine;
 using Aitex.Core.RT.SCCore;
 using Aitex.Core.Util;
@@ -40,6 +41,12 @@ namespace Venus_RT.Modules.VCE
         public RState Start(params object[] objs)
         {
             _timeout = SC.GetValue<int>($"{Module}.MotionTimeout") * 1000;
+            //if vce inner door not close cannot dot it as it will vent
+            if (!Singleton<RouteManager>.Instance.seTM.IsVCESlitDoorClosed)
+            {
+                LOG.Write(eEvent.ERR_VCE_COMMON_Failed, Module, $"VCE Inner Door is open! Please close it First!");
+                return RState.Failed;
+            }
             Reset();
             return Runner.Start(Module,"VCE Unload Routine");
         }

+ 1 - 1
Venus/Venus_Simulator/Devices/SETMSimulatorServer.cs

@@ -30,7 +30,7 @@ namespace Venus_Simulator.Devices
 
         protected override void ProcessUnsplitMessage(string str)
         {
-            if (str.Contains("HOME") || str.Contains("GOTO") || str.Contains("XFER"))
+            if (str.Contains("HOME") || str.Contains("GOTO") || str.Contains("XFER") || str.Contains("HALT"))
             {
                 OnWriteMessage("_RDY");
             }