Browse Source

1.efem 添加 foup load/unload动画
2.efem 添加robot动画(需要调试)
3.添加在控压状态下,开关slitdoor的压差check(压力问题需要询问tps,代码已注释)
4.Operation界面添加PM Result显示

# Conflicts:
# Venus/Venus_RT/Modules/Schedulers/SchedulerEfemRobot.cs

lixiang 2 years ago
parent
commit
5888197193
28 changed files with 947 additions and 124 deletions
  1. 5 5
      Venus/Framework/Common/Fsm/Entity.cs
  2. 1 1
      Venus/Framework/Common/Fsm/IStateMachine.cs
  3. 21 13
      Venus/Framework/Common/Fsm/StateMachine.cs
  4. 1 0
      Venus/Framework/Common/Jobs/ProcessJobInfo.cs
  5. 150 4
      Venus/Venus_MainPages/ViewModels/EfemViewModel.cs
  6. 217 2
      Venus/Venus_MainPages/ViewModels/OperationOverViewModel.cs
  7. 2 3
      Venus/Venus_MainPages/ViewModels/TMOperationViewModel.cs
  8. 34 4
      Venus/Venus_MainPages/Views/EfemView.xaml
  9. 38 1
      Venus/Venus_MainPages/Views/EfemView.xaml.cs
  10. 43 36
      Venus/Venus_MainPages/Views/OperationOverView.xaml
  11. 1 1
      Venus/Venus_MainPages/Views/OverVenusView.xaml
  12. 1 1
      Venus/Venus_MainPages/Views/TMView.xaml
  13. 4 1
      Venus/Venus_RT/Config/System.sccfg
  14. 10 3
      Venus/Venus_RT/Devices/EFEM/JetEfem.cs
  15. 47 1
      Venus/Venus_RT/Devices/IODevices/IoCylinder.cs
  16. 2 0
      Venus/Venus_RT/Devices/JetVenusPM.cs
  17. 0 1
      Venus/Venus_RT/Devices/TM/JetTM.cs
  18. 1 0
      Venus/Venus_RT/Modules/AutoCycle.cs
  19. 1 0
      Venus/Venus_RT/Modules/EFEM/EfemEntity.cs
  20. 4 2
      Venus/Venus_RT/Modules/Schedulers/SchedulerEfemRobot.cs
  21. 2 2
      Venus/Venus_RT/Modules/TM/MFControlPressureRoutine.cs
  22. 12 6
      Venus/Venus_RT/Modules/TM/MFHomeRoutine.cs
  23. 2 0
      Venus/Venus_RT/Modules/TM/MFVentRoutine.cs
  24. 25 4
      Venus/Venus_RT/Modules/TM/TMEntity.cs
  25. 7 0
      Venus/Venus_Themes/CustomControls/CustomRobot.cs
  26. 66 20
      Venus/Venus_Themes/Themes/Generic.xaml
  27. 151 13
      Venus/Venus_Themes/UserControls/EFEM.xaml
  28. 99 0
      Venus/Venus_Themes/UserControls/EFEM.xaml.cs

+ 5 - 5
Venus/Framework/Common/Fsm/Entity.cs

@@ -92,11 +92,11 @@ namespace Aitex.Core.RT.Fsm
                 fsm.AnyStateTransition(msg, func, next);
         }
 
-        protected void AnyStateTransition(int msg, FsmFunc func, int next, FsmFunc monitorFunc)
-        {
-            if (fsm != null)
-                fsm.AnyStateTransition(msg, func, next,monitorFunc);
-        }
+        //protected void AnyStateTransition(int msg, FsmFunc func, int next, FsmFunc monitorFunc)
+        //{
+        //    if (fsm != null)
+        //        fsm.AnyStateTransition(msg, func, next,monitorFunc);
+        //}
 
         protected void AnyStateTransition<T, V>(V msg, FsmFunc func, T next)
         {

+ 1 - 1
Venus/Framework/Common/Fsm/IStateMachine.cs

@@ -26,7 +26,7 @@ namespace Aitex.Core.RT.Fsm
 
         void Transition(int state, int msg, FsmFunc func, int next);
         void AnyStateTransition(int msg, FsmFunc func, int next);
-        void AnyStateTransition(int msg, FsmFunc func, int next, FsmFunc monitorFunc);
+        //void AnyStateTransition(int msg, FsmFunc func, int next, FsmFunc monitorFunc);
 
         void EnterExitTransition(int state, FsmFunc enter, int msg, FsmFunc exit);
 

+ 21 - 13
Venus/Framework/Common/Fsm/StateMachine.cs

@@ -74,7 +74,7 @@ namespace Aitex.Core.RT.Fsm
         /// 状态进入/退出迁移表  状态,进入函数,进入消息,退出函数, 
         /// </summary>
         private Dictionary<int, Dictionary<int, Tuple<FsmFunc, int>>> transition;
-        private Dictionary<int, Tuple<FsmFunc, int,FsmFunc>> anyStateTransition;
+        private Dictionary<int, Tuple<FsmFunc, int>> anyStateTransition;
         private Dictionary<int, Tuple<FsmFunc, int, FsmFunc>> enterExitTransition;
 
         private Dictionary<int, string> _stringState = new Dictionary<int, string>();
@@ -83,7 +83,7 @@ namespace Aitex.Core.RT.Fsm
         private KeyValuePair<int, object[]> _msgInProcess = new KeyValuePair<int, object[]>((int)FSM_MSG.TIMER, null);
 
         private long _msgCounter = 0;
-        Dictionary<int, FsmFunc> fsmFuncs = new Dictionary<int, FsmFunc>();
+        List<FsmFunc> fsmFuncs = new List<FsmFunc>();
 
         public StateMachine(string name, int initState = (int)FSM_STATE.UNDEFINE, int interval = 100)
         {
@@ -97,7 +97,7 @@ namespace Aitex.Core.RT.Fsm
             _msgQueue = new BlockingCollection<KeyValuePair<int, object[]>>();
 
             transition = new Dictionary<int, Dictionary<int, Tuple<FsmFunc, int>>>();
-            anyStateTransition = new Dictionary<int, Tuple<FsmFunc, int,FsmFunc>>();
+            anyStateTransition = new Dictionary<int, Tuple<FsmFunc, int>>();
             enterExitTransition = new Dictionary<int, Tuple<FsmFunc, int, FsmFunc>>();
 
             EnumLoop<FSM_STATE>.ForEach((item) =>
@@ -147,10 +147,10 @@ namespace Aitex.Core.RT.Fsm
                     
                     if (anyStateTransition.ContainsKey(_msgInProcess.Key))
                     {
-                        if (anyStateTransition[_msgInProcess.Key].Item3 != null && !fsmFuncs.Keys.Contains(_msgInProcess.Key))
-                        {
-                            fsmFuncs.Add(_msgInProcess.Key,anyStateTransition[_msgInProcess.Key].Item3);
-                        }
+                        //if (anyStateTransition[_msgInProcess.Key].Item3 != null && !fsmFuncs.Keys.Contains(_msgInProcess.Key))
+                        //{
+                        //    fsmFuncs.Add(_msgInProcess.Key,anyStateTransition[_msgInProcess.Key].Item3);
+                        //}
                         if (anyStateTransition[_msgInProcess.Key].Item1 != null)
                         {
                             if (anyStateTransition[_msgInProcess.Key].Item1(_msgInProcess.Value))  //need ChangeState
@@ -187,7 +187,7 @@ namespace Aitex.Core.RT.Fsm
                         continue;
                     }
 
-                    foreach (var func in fsmFuncs.Values)
+                    foreach (var func in fsmFuncs)
                     {
                         func.Invoke(null);
                     }
@@ -329,12 +329,20 @@ namespace Aitex.Core.RT.Fsm
 
         public void AnyStateTransition(int msg, FsmFunc func, int next)
         {
-            anyStateTransition[msg] = new Tuple<FsmFunc, int,FsmFunc>(func, next,null);
-        }
-        public void AnyStateTransition(int msg, FsmFunc func, int next, FsmFunc monitorFunc)
-        {
-            anyStateTransition[msg] = new Tuple<FsmFunc, int,FsmFunc>(func, next,monitorFunc);
+            if (msg != timeoutMsg.Key)
+            {
+                anyStateTransition[msg] = new Tuple<FsmFunc, int>(func, next);
+
+            }
+            else
+            {
+                fsmFuncs.Add(func);
+            }
         }
+        //public void AnyStateTransition(int msg, FsmFunc func, int next, FsmFunc monitorFunc)
+        //{
+        //    anyStateTransition[msg] = new Tuple<FsmFunc, int,FsmFunc>(func, next,monitorFunc);
+        //}
         public void EnterExitTransition(int state, FsmFunc enter, int msg, FsmFunc exit)
         {
             enterExitTransition[state] = new Tuple<FsmFunc, int, FsmFunc>(enter, msg, exit);

+ 1 - 0
Venus/Framework/Common/Jobs/ProcessJobInfo.cs

@@ -43,5 +43,6 @@ namespace MECF.Framework.Common.Jobs
         {
             State = state;
         }
+
     }
 }

+ 150 - 4
Venus/Venus_MainPages/ViewModels/EfemViewModel.cs

@@ -13,9 +13,11 @@ using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
 using System.Linq;
+using System.Threading.Tasks;
 using System.Windows.Threading;
 using Venus_Core;
 using Venus_MainPages.Unity;
+using Venus_Themes.CustomControls;
 using Venus_Themes.Unity;
 
 namespace Venus_MainPages.ViewModels
@@ -75,8 +77,12 @@ namespace Venus_MainPages.ViewModels
         private Dictionary<string, object> m_RtDataValues;
 
         private int m_AlignValue;
-
-        
+        private WaferRobotTAction m_Robot1TAction;
+        private WaferRobotXAction m_Robot1XAction;
+        private WaferRobotTAction m_Robot2TAction;
+        private WaferRobotXAction m_Robot2XAction;
+        int arm1oldWaferStatus = 100;
+        int arm2oldWaferStatus = 100;
         #endregion
 
         #region 属性
@@ -255,7 +261,46 @@ namespace Venus_MainPages.ViewModels
             get { return m_AlignValue; }
             set { SetProperty(ref m_AlignValue, value); }
         }
-        
+        public WaferRobotTAction Robot1TAction
+        {
+            get { return m_Robot1TAction; }
+            set { SetProperty(ref m_Robot1TAction, value); }
+        }
+        public WaferRobotXAction Robot1XAction
+        {
+            get { return m_Robot1XAction; }
+            set { SetProperty(ref m_Robot1XAction, value); }
+        }
+        public WaferRobotTAction Robot2TAction
+        {
+            get { return m_Robot2TAction; }
+            set { SetProperty(ref m_Robot2TAction, value); }
+        }
+        public WaferRobotXAction Robot2XAction
+        {
+            get { return m_Robot2XAction; }
+            set { SetProperty(ref m_Robot2XAction, value); }
+        }
+        private string m_RobotTarget;
+
+        public string RobotTarget
+        {
+            get { return m_RobotTarget; }
+            set
+            {
+                SetProperty(ref m_RobotTarget, value);
+            }
+        }
+        public RobotMoveInfo m_robotMoveInfo;
+        public RobotMoveInfo RobotMoveInfo
+        {
+            get { return m_robotMoveInfo; }
+            set
+            {
+                RobotMoveInfoChanged(m_robotMoveInfo, value);
+                m_robotMoveInfo = value;
+            }
+        }
         #endregion
 
         #region 命令
@@ -686,6 +731,7 @@ namespace Venus_MainPages.ViewModels
             BladeBWafer = ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[1];
             Aligner1Wafer= ModuleManager.ModuleInfos["Aligner1"].WaferManager.Wafers[0];
             RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
+            RobotMoveInfo = (RobotMoveInfo)QueryDataClient.Instance.Service.GetData("EFEM.RobotMoveAction");
         }
         private void Init()
         {
@@ -715,6 +761,9 @@ namespace Venus_MainPages.ViewModels
             m_RtDataKeys.Add("TM.LLAESlitDoor.IsClosed");
             m_RtDataKeys.Add("TM.LLBESlitDoor.IsClosed");
 
+            m_RtDataKeys.Add("LP1.CassettePlaced");
+            m_RtDataKeys.Add("LP2.CassettePlaced");
+            m_RtDataKeys.Add("LP3.CassettePlaced");
         }
 
         private void UIEvents_PMDoorRaiseChangedEvent(DoorPara obj)
@@ -729,7 +778,104 @@ namespace Venus_MainPages.ViewModels
         {
             InvokeClient.Instance.Service.DoOperation($"TM.{obj.ModuleName}ESlitDoor.{obj?.IsOpen}");
         }
-       
+        private async void RobotMoveInfoChanged(RobotMoveInfo oldValue, RobotMoveInfo newValue)
+        {
+            if (oldValue == null || newValue == null)
+            {
+                return;
+            }
+            #region pick 和 place LL
+            if (oldValue.Action == RobotAction.None && (newValue.Action == RobotAction.Placing || newValue.Action == RobotAction.Picking))
+            {
+                var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
+                if (TMRobotMoveActionBladeTarget != null)
+                {
+                    RobotTarget = TMRobotMoveActionBladeTarget.ToString();
+                }
+                else
+                {
+                    return;
+                }
+                var values = RobotTarget.Split('.');
+                var arm = values[0];
+                var module = values[1];
+
+                if (arm == "ArmA")
+                {
+                    Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                    await Task.Delay(1500);
+                    Robot1XAction = WaferRobotXAction.Extend;
+                    await Task.Delay(3000);
+                    Robot1XAction = WaferRobotXAction.Retract;
+                }
+                else if (arm == "ArmB")
+                {
+                    Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                    await Task.Delay(1500);
+                    Robot2XAction = WaferRobotXAction.Extend;
+                    await Task.Delay(3000);
+                    Robot2XAction = WaferRobotXAction.Retract;
+                }
+            }
+
+            #endregion
+
+            #region pick 和 place pm
+            if (oldValue.Action == RobotAction.None && newValue.Action == RobotAction.Extending)
+            {
+                var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
+                if (TMRobotMoveActionBladeTarget != null)
+                {
+                    RobotTarget = TMRobotMoveActionBladeTarget.ToString();
+                }
+                else
+                {
+                    return;
+                }
+                var values = RobotTarget.Split('.');
+                var arm = values[0];
+                var module = values[1];
+                if (arm == "ArmA")
+                {
+                    Robot1TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                    await Task.Delay(1500);
+                    Robot1XAction = WaferRobotXAction.Extend;
+                }
+                else if (arm == "ArmB")
+                {
+                    Robot2TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                    await Task.Delay(1500);
+                    Robot2XAction = WaferRobotXAction.Extend;
+                }
+
+            }
+            if (oldValue.Action == RobotAction.None && newValue.Action == RobotAction.Retracting)
+            {
+                var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
+                if (TMRobotMoveActionBladeTarget != null)
+                {
+                    RobotTarget = TMRobotMoveActionBladeTarget.ToString();
+                }
+                else
+                {
+                    return;
+                }
+                var values = RobotTarget.Split('.');
+                var arm = values[0];
+                if (arm == "ArmA")
+                {
+                    Robot1XAction = WaferRobotXAction.Retract;
+                }
+                else if (arm == "ArmB")
+                {
+                    Robot2XAction = WaferRobotXAction.Retract;
+                }
+
+            }
+            #endregion
+            arm1oldWaferStatus = ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[0].WaferStatus;
+            arm2oldWaferStatus = ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[1].WaferStatus;
+        }
         #endregion
 
     }

+ 217 - 2
Venus/Venus_MainPages/ViewModels/OperationOverViewModel.cs

@@ -12,10 +12,12 @@ using System.Text;
 using System.Threading.Tasks;
 using System.Windows;
 using System.Windows.Threading;
+using Venus_Core;
 using Venus_MainPages.Unity;
 using Venus_MainPages.Views;
 using Venus_Themes.CustomControls;
 using Venus_Themes.Unity;
+using static Venus_Themes.UserControls.EFEM;
 
 namespace Venus_MainPages.ViewModels
 {
@@ -73,10 +75,20 @@ namespace Venus_MainPages.ViewModels
         private int m_CycledWafer;
         private int m_CycleCountDisplay;
 
+        private RobotPosition m_CurrentRobotPosition;
+
+        private WaferInfo m_BladeAWafer;
+        private WaferInfo m_BladeBWafer;
+
+        private RecipeResult m_PMARecipeResult;
+        private RecipeResult m_PMBRecipeResult;
+        private RecipeResult m_PMCRecipeResult;
+        private RecipeResult m_PMDRecipeResult;
 
         #endregion
 
         #region  属性
+
         public bool TabIsChecked
         { 
          get { return m_TabIsChecked; }
@@ -311,6 +323,51 @@ namespace Venus_MainPages.ViewModels
             get { return m_CycleCountDisplay; }
             set { SetProperty(ref m_CycleCountDisplay, value); }
         }
+        public RobotMoveInfo m_EfemRobotMoveInfo;
+        public RobotMoveInfo EfemRobotMoveInfo
+        {
+            get { return m_EfemRobotMoveInfo; }
+            set
+            {
+                EFEMRobotMoveInfoChanged(m_EfemRobotMoveInfo, value);
+                m_EfemRobotMoveInfo = value;
+            }
+        }
+        public RobotPosition CurrentRobotPosition
+        {
+            get { return m_CurrentRobotPosition; }
+            set { SetProperty(ref m_CurrentRobotPosition, value); }
+        }
+        public WaferInfo BladeAWafer
+        {
+            get { return m_BladeAWafer; }
+            set { SetProperty(ref m_BladeAWafer, value); }
+        }
+        public WaferInfo BladeBWafer
+        {
+            get { return m_BladeBWafer; }
+            set { SetProperty(ref m_BladeBWafer, value); }
+        }
+        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 RecipeResult PMDRecipeResult
+        {
+            get { return m_PMDRecipeResult; }
+            set { SetProperty(ref m_PMDRecipeResult, value); }
+        }
         #endregion
 
         #region 命令
@@ -553,6 +610,10 @@ namespace Venus_MainPages.ViewModels
             LP3ModuleInfo = ModuleManager.ModuleInfos["LP3"];
             EFEMModuleInfo = ModuleManager.ModuleInfos["EfemRobot"];
             TMModuleInfo = ModuleManager.ModuleInfos["TMRobot"];
+            BladeAWafer = ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[0];
+            BladeBWafer = ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[1];
+
+            RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
 
             if (LLAIsInstalled == true)
             {
@@ -567,18 +628,25 @@ namespace Venus_MainPages.ViewModels
             if (PMAIsInstalled == true)
             {
                 PMAWafer = ModuleManager.ModuleInfos["PMA"].WaferManager.Wafers[0];
+                PMARecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"PMA.CurrentRecipeResult");
             }
             if (PMBIsInstalled == true)
             {
                 PMBWafer = ModuleManager.ModuleInfos["PMB"].WaferManager.Wafers[0];
+                PMBRecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"PMB.CurrentRecipeResult");
+
             }
             if (PMCIsInstalled == true)
             {
                 PMCWafer = ModuleManager.ModuleInfos["PMC"].WaferManager.Wafers[0];
+                PMCRecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"PMC.CurrentRecipeResult");
+
             }
             if (PMDIsInstalled == true)
             {
                 PMDWafer = ModuleManager.ModuleInfos["PMD"].WaferManager.Wafers[0];
+                PMDRecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"PMD.CurrentRecipeResult");
+
             }
 
             if (TMIsInstalled == true)
@@ -594,8 +662,7 @@ namespace Venus_MainPages.ViewModels
             }
 
             RobotMoveInfo = (RobotMoveInfo)QueryDataClient.Instance.Service.GetData("TM.RobotMoveAction");
-
-            RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
+            EfemRobotMoveInfo=(RobotMoveInfo)QueryDataClient.Instance.Service.GetData("EFEM.RobotMoveAction");
             LP1WaferCount = LP1ModuleInfo.WaferManager.Wafers.Where(x=>x.WaferStatus!=0).Count();
             LP2WaferCount = LP2ModuleInfo.WaferManager.Wafers.Where(x => x.WaferStatus != 0).Count();
             LP3WaferCount = LP3ModuleInfo.WaferManager.Wafers.Where(x => x.WaferStatus != 0).Count();
@@ -701,7 +768,121 @@ namespace Venus_MainPages.ViewModels
             arm2oldWaferStatus = ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[1].WaferStatus;
 
         }
+        private async void EFEMRobotMoveInfoChanged(RobotMoveInfo oldValue, RobotMoveInfo newValue)
+        {
+            string RobotTarget;
+            if (oldValue == null || newValue == null)
+            {
+                return;
+            }
+            #region pick 和 place LL
+            if (oldValue.Action == RobotAction.None && (newValue.Action == RobotAction.Placing || newValue.Action == RobotAction.Picking))
+            {
+                var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
+                if (TMRobotMoveActionBladeTarget != null)
+                {
+                    RobotTarget = TMRobotMoveActionBladeTarget.ToString();
+                }
+                else
+                {
+                    return;
+                }
+                var values = RobotTarget.Split('.');
+                var arm = values[0];
+                var module = values[1];
+
+                if (arm == "ArmA")
+                {
+                    Robot3TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                    await Task.Delay(1500);
+
+                    //ChangePosition(Robot3TAction);
+                   // await Task.Delay(2000);
+
+                    Robot3XAction = WaferRobotXAction.Extend;
+                    await Task.Delay(3000);
+                    Robot3XAction = WaferRobotXAction.Retract;
+                }
+                else if (arm == "ArmB")
+                {
+                    Robot4TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                    await Task.Delay(1500);
+                    //ChangePosition(Robot4TAction);
+                    //await Task.Delay(2000);
+                    Robot4XAction = WaferRobotXAction.Extend;
+                    await Task.Delay(3000);
+                    Robot4XAction = WaferRobotXAction.Retract;
+                }
+            }
+
+            #endregion
 
+            #region pick 和 place pm
+            if (oldValue.Action == RobotAction.None && newValue.Action == RobotAction.Extending)
+            {
+                var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
+                if (TMRobotMoveActionBladeTarget != null)
+                {
+                    RobotTarget = TMRobotMoveActionBladeTarget.ToString();
+                }
+                else
+                {
+                    return;
+                }
+                var values = RobotTarget.Split('.');
+                var arm = values[0];
+                var module = values[1];
+                if (arm == "ArmA")
+                {
+                    Robot3TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                    await Task.Delay(1500);
+                    //ChangePosition(Robot3TAction);
+                    //await Task.Delay(2000);
+                    Robot3XAction = WaferRobotXAction.Extend;
+                }
+                else if (arm == "ArmB")
+                {
+                    Robot4TAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), module, true);
+                    await Task.Delay(1500);
+                    //ChangePosition(Robot4TAction);
+                    //await Task.Delay(2000);
+                    Robot4XAction = WaferRobotXAction.Extend;
+                }
+
+            }
+            if (oldValue.Action == RobotAction.None && newValue.Action == RobotAction.Retracting)
+            {
+                var TMRobotMoveActionBladeTarget = newValue.BladeTarget;
+                if (TMRobotMoveActionBladeTarget != null)
+                {
+                    RobotTarget = TMRobotMoveActionBladeTarget.ToString();
+                }
+                else
+                {
+                    return;
+                }
+                var values = RobotTarget.Split('.');
+                var arm = values[0];
+                if (arm == "ArmA")
+                {
+                    
+                    Robot3XAction = WaferRobotXAction.Retract;
+                    await Task.Delay(3000);
+                    //ChangePosition(Robot3TAction);
+                    //await Task.Delay(2000);
+                }
+                else if (arm == "ArmB")
+                {
+                    Robot4XAction = WaferRobotXAction.Retract;
+                    await Task.Delay(3000);
+                    //ChangePosition(Robot3TAction);
+                    //await Task.Delay(2000);
+                }
+
+            }
+            #endregion
+
+        }
         private void addDataKeys()
         {
             m_RtDataKeys.Add("PMA.IsSlitDoorClosed");
@@ -717,6 +898,25 @@ namespace Venus_MainPages.ViewModels
 
             m_RtDataKeys.Add("Scheduler.CycledCount");
             m_RtDataKeys.Add("Scheduler.CycledWafer");
+            m_RtDataKeys.Add("Scheduler.CycleSetPoint");
+
+            m_RtDataKeys.Add("LP1.IsLoaded");
+            m_RtDataKeys.Add("LP2.IsLoaded");
+            m_RtDataKeys.Add("LP3.IsLoaded");
+
+            m_RtDataKeys.Add("LP1.CassettePlaced");
+            m_RtDataKeys.Add("LP2.CassettePlaced");
+            m_RtDataKeys.Add("LP3.CassettePlaced");
+
+            m_RtDataKeys.Add("PMA.CurrentRecipeResult");
+            m_RtDataKeys.Add("PMB.CurrentRecipeResult");
+            m_RtDataKeys.Add("PMC.CurrentRecipeResult");
+            m_RtDataKeys.Add("PMD.CurrentRecipeResult");
+
+
+
+
+
 
 
 
@@ -785,6 +985,21 @@ namespace Venus_MainPages.ViewModels
         {
             InvokeClient.Instance.Service.DoOperation($"TM.{obj.ModuleName}ESlitDoor.{obj?.IsOpen}");
         }
+
+        private async void ChangePosition(WaferRobotTAction waferRobotTAction)
+        {
+            CurrentRobotPosition = RobotPosition.Origin;
+            await Task.Delay(1000);
+            if (waferRobotTAction == WaferRobotTAction.LP1)
+            {
+                
+                CurrentRobotPosition = RobotPosition.Left;
+            }
+            else if (Robot3TAction == WaferRobotTAction.LP3)
+            {
+                CurrentRobotPosition = RobotPosition.Right;
+            }
+        }
         #endregion
     }
 }

+ 2 - 3
Venus/Venus_MainPages/ViewModels/TMOperationViewModel.cs

@@ -170,13 +170,12 @@ namespace Venus_MainPages.ViewModels
             {
                 if (m_TMIsOFFline == true && value == false)
                 {
-                    InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.ControlPressure}");
+                    //InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.ControlPressure}");
 
                 }
                 if (m_TMIsOFFline == false && value == true)
                 {
-                    InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.AbortControlPressure}");
-
+                    //InvokeClient.Instance.Service.DoOperation($"TM.{RtOperation.AbortControlPressure}");
                 }
                 SetProperty(ref m_TMIsOFFline, value);
             }

File diff suppressed because it is too large
+ 34 - 4
Venus/Venus_MainPages/Views/EfemView.xaml


+ 38 - 1
Venus/Venus_MainPages/Views/EfemView.xaml.cs

@@ -1,4 +1,7 @@
-using System;
+using Aitex.Core.Common;
+using MECF.Framework.Common.CommonData;
+using MECF.Framework.Common.Equipment;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -9,9 +12,14 @@ using System.Windows.Data;
 using System.Windows.Documents;
 using System.Windows.Input;
 using System.Windows.Media;
+using System.Windows.Media.Animation;
 using System.Windows.Media.Imaging;
 using System.Windows.Navigation;
 using System.Windows.Shapes;
+using Venus_MainPages.ViewModels;
+using Venus_Themes.CustomControls;
+using Venus_Unity;
+using static Venus_Themes.UserControls.EFEM;
 
 namespace Venus_MainPages.Views
 {
@@ -20,9 +28,38 @@ namespace Venus_MainPages.Views
     /// </summary>
     public partial class EfemView : UserControl
     {
+       
         public EfemView()
         {
             InitializeComponent();
         }
+
+        private async void Button_Click(object sender, RoutedEventArgs e)
+        {
+            //DoubleAnimation doubleAnimation = new DoubleAnimation();
+            //efem1.CurrentRobotPosition = RobotPosition.Original;
+            efem1.RobotATAction = (WaferRobotTAction)Enum.Parse(typeof(WaferRobotTAction), cb1.Text);
+        }
+
+        private async void Button_Click_1(object sender, RoutedEventArgs e)
+        {
+            // robot1.RobotXAction = WaferRobotXAction.Extend;
+            //efem1.RobotAXAction = WaferRobotXAction.Extend;
+            (this.DataContext as EfemViewModel).Robot1TAction = WaferRobotTAction.LP1;
+            await Task.Delay(2000);
+            (this.DataContext as EfemViewModel).Robot2TAction = WaferRobotTAction.LP2;
+
+        }
+
+        private void Button_Click_2(object sender, RoutedEventArgs e)
+        {
+            efem1.RobotAXAction = WaferRobotXAction.Retract;
+
+        }
+
+        private void Button_Click_3(object sender, RoutedEventArgs e)
+        {
+            efem1.CurrentRobotPosition = (RobotPosition)Enum.Parse(typeof(RobotPosition), cb2.Text);
+        }
     }
 }

File diff suppressed because it is too large
+ 43 - 36
Venus/Venus_MainPages/Views/OperationOverView.xaml


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

@@ -1238,7 +1238,7 @@
 
         <Border BorderThickness="0,0,0,1" BorderBrush="Black" Canvas.Top="20" Canvas.Left="40">
             <StackPanel Orientation="Horizontal" Margin="0,0,0,5">
-                <customControls:PathButton PathData="{StaticResource Icon_Home}"  DefaultFillBrush="White"  Command="{Binding PMInitCommnad}"  Width="160" Height="30" Content="Initialize"    Margin="10,0,0,0"/>
+                <customControls:PathButton PathData="{StaticResource Icon_Home}"  DefaultFillBrush="White"  Command="{Binding PMInitCommnad}"  Width="120" Height="30" Content="Initialize"    Margin="10,0,0,0"/>
 
                 <customControls:PathButton PathData="{StaticResource Icon_Abort}" DefaultFillBrush="White"  Command="{Binding PMAbortCommnad}" Width="120" Height="30" Content="Abort"   Margin="50,0,30,0">
                     <customControls:PathButton.ContextMenu>

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

@@ -208,7 +208,7 @@
                             <CheckBox Content="PMD" Margin="0,10,10,10" Visibility="{Binding PMDIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" IsChecked="{Binding PMDIsCycle}"/>
                         </StackPanel>
                         <StackPanel Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Center">
-                            <Button Content="Home"  Margin="0,0,10,10"   Width="80" Height="25" Command="{Binding SystemHomeCommand}"/>
+                            <Button Content="Home"  Margin="0,0,10,10"   Width="80" Height="25" Command="{Binding HomeCommand}"/>
                             <Button Content="Start"  Margin="0,0,10,10"  Width="80" Height="25" Command="{Binding StartCycleCommand}"/>
                             <Button Content="Stop"   Margin="10,0,10,10" Width="80" Height="25" Command="{Binding StopCycleCommand}"/>
                             <Button Content="Pause"  Margin="10,0,10,10" Width="80" Height="25"/>

+ 4 - 1
Venus/Venus_RT/Config/System.sccfg

@@ -142,7 +142,10 @@
 		<config default="60" name="RetractTimeout" nameView="Retract Timeout" description="" max="300" min="0" paramter="" tag="" unit="s" type="Integer" />
 		<config default="180" name="SwapTimeout" nameView="Swap Timeout" description="" max="300" min="0" paramter="" tag="" unit="s" type="Integer" />
 		<config default="100" name="ControlPressureCheckPoint" nameView="Control Pressure CheckPoint" description="TM Chamber 控压 检测值" max="300" min="0" paramter="" tag="" unit="mTorr" type="Integer" />
-		<config default="90" name="ControlPressureSetPoint"   nameView="Control Pressure SetPoint"   description="TM Chamber 控压 设定值" max="200" min="0" paramter="" tag="" unit="mTorr" type="Integer" />
+		<config default="90"  name="ControlPressureSetPoint"   nameView="Control Pressure SetPoint"   description="TM Chamber 控压 设定值" max="200" min="0" paramter="" tag="" unit="mTorr" type="Integer" />
+		<config default="50"  name="WithLLPressureDifference"   nameView="TM LL Pressure Difference"   description="TM和LL压差" max="100" min="0" paramter="" tag="" unit="mTorr" type="Integer" />
+		<config default="50"  name="WithPMPressureDifference"   nameView="TM PM Pressure Difference"   description="TM和PM压差" max="100" min="0" paramter="" tag="" unit="mTorr" type="Integer" />
+
 		<configs name="TM_MFC1" nameView="MFC1" >
 			<config default="true" name="Enable" nameView="Enable" description="Enable gas 1 or not" tag="" unit="" type="Bool" />
 			<config default="O2" name="GasName" nameView="Gas Name" description="Name of NO.1 gas stick" tag="" unit="" type="String" />

+ 10 - 3
Venus/Venus_RT/Devices/EFEM/JetEfem.cs

@@ -244,7 +244,7 @@ namespace Venus_RT.Devices.EFEM
                     Constant.ArmString[hand],
                 }
             };
-
+            SetRobotMovingInfo(RobotAction.Extending, hand, chamber);
             _status = RState.Running;
             return _socket.Write(_currentMsg.ToString());
         }
@@ -266,6 +266,7 @@ namespace Venus_RT.Devices.EFEM
             };
 
             _status = RState.Running;
+            SetRobotMovingInfo(RobotAction.Retracting, hand, chamber);
             return _socket.Write(_currentMsg.ToString());
         }
         public override bool PlaceExtend(ModuleName chamber, int slot, Hand hand)
@@ -286,6 +287,7 @@ namespace Venus_RT.Devices.EFEM
             };
 
             _status = RState.Running;
+            SetRobotMovingInfo(RobotAction.Extending, hand, chamber);
             return _socket.Write(_currentMsg.ToString());
         }
         public override bool PlaceRetract(ModuleName chamber, int slot, Hand hand)
@@ -306,6 +308,7 @@ namespace Venus_RT.Devices.EFEM
             };
 
             _status = RState.Running;
+            SetRobotMovingInfo(RobotAction.Retracting, hand, chamber);
             return _socket.Write(_currentMsg.ToString());
         }
         public override bool Pick(ModuleName station, int slot, Hand hand)
@@ -327,6 +330,7 @@ namespace Venus_RT.Devices.EFEM
             };
 
             _status = RState.Running;
+            SetRobotMovingInfo(RobotAction.Picking, hand, station);
             return _socket.Write(_currentMsg.ToString());
         }
         public override bool Place(ModuleName station, int slot, Hand hand)
@@ -348,6 +352,7 @@ namespace Venus_RT.Devices.EFEM
             };
 
             _status = RState.Running;
+            SetRobotMovingInfo(RobotAction.Placing, hand, station);
             return _socket.Write(_currentMsg.ToString());
         }
         public override bool Goto(ModuleName station, Hand hand)
@@ -585,7 +590,9 @@ namespace Venus_RT.Devices.EFEM
         }
         public override void SetRobotMovingInfo(RobotAction action, Hand hand, ModuleName target)
         {
-
+            _robotMoveInfo.Action = action;
+            _robotMoveInfo.ArmTarget = hand == Hand.Blade1 ? RobotArm.ArmA : (hand == Hand.Both ? RobotArm.Both : RobotArm.ArmB);
+            _robotMoveInfo.BladeTarget = $"{_robotMoveInfo.ArmTarget}.{target}";
         }
 
         private void OnReceiveMessage(string RevMsg)
@@ -767,7 +774,7 @@ namespace Venus_RT.Devices.EFEM
 
         private void OnCommandUpdated(EfemMessage message)
         {
-            if(message.Operation != EfemOperation.ClearError && message.Operation != EfemOperation.Ready && _currentMsg.Operation != message.Operation && _backroundMsg.Operation != message.Operation)
+            if(message.Operation != EfemOperation.ClearError && message.Operation != EfemOperation.Ready && _currentMsg?.Operation != message.Operation && _backroundMsg.Operation != message.Operation)
             {
                 LOG.Write(eEvent.ERR_EFEM_COMMON_FAILED, ModuleName.EfemRobot, $"OnCommandUpdated() unexpected return: {message.Operation}, backround: {_backroundMsg.Operation}");
                 return;

+ 47 - 1
Venus/Venus_RT/Devices/IODevices/IoCylinder.cs

@@ -8,6 +8,7 @@ using Aitex.Core.RT.Event;
 using Aitex.Core.RT.IOCore;
 using Aitex.Core.RT.Log;
 using Aitex.Core.RT.OperationCenter;
+using Aitex.Core.RT.SCCore;
 using Aitex.Core.Util;
 
 namespace Venus_RT.Devices
@@ -211,7 +212,52 @@ namespace Venus_RT.Devices
                     return true;
                 }
             }
-
+            //if (Name == "SlitDoor")
+            //{
+
+            //    bool tmIsOnline = (bool)DATA.Poll("TM.IsOnline");
+            //    if (tmIsOnline == true)
+            //    {
+            //        int difference = SC.GetValue<int>($"TM.WithPMPressureDifference");
+            //        int tmPressure = Convert.ToInt32( DATA.Poll("TM.TMProcessGauge.Value"));
+            //        int pmPressure= Convert.ToInt32( DATA.Poll($"{Module}.ProcessLowPressure"));
+            //        if (Math.Abs(tmPressure - pmPressure) > difference)
+            //        {
+            //            LOG.Write(eEvent.ERR_TM, Module, $"{Module}与TM压差过大,不可以开{Module}腔体SlitDoor");
+            //            return true;
+            //        }
+            //    }
+            //}
+            //if (Name == "LLATSlitDoor")
+            //{
+            //    bool tmIsOnline = (bool)DATA.Poll("TM.IsOnline");
+            //    if (tmIsOnline == true)
+            //    {
+            //        int difference = SC.GetValue<int>($"TM.WithPMPressureDifference");
+            //        int tmPressure = Convert.ToInt32(DATA.Poll("TM.TMProcessGauge.Value"));
+            //        int llPressure = Convert.ToInt32(DATA.Poll("TM.LLAPressureGauge.Value"));
+            //        if (Math.Abs(tmPressure - llPressure) > difference)
+            //        {
+            //            LOG.Write(eEvent.ERR_TM, Module, $"TM正在控压,LLA与TM压差过大,不可以开LLATSlitDoor");
+            //            return true;
+            //        }
+            //    }
+            //}
+            //if ( Name == "LLBTSlitDoor")
+            //{
+            //    bool tmIsOnline = (bool)DATA.Poll("TM.IsOnline");
+            //    if (tmIsOnline == true)
+            //    {
+            //        int difference = SC.GetValue<int>($"TM.WithPMPressureDifference");
+            //        int tmPressure = Convert.ToInt32(DATA.Poll("TM.TMProcessGauge.Value"));
+            //        int llPressure = Convert.ToInt32(DATA.Poll("TM.LLBPressureGauge.Value"));
+            //        if (Math.Abs(tmPressure - llPressure) > difference)
+            //        {
+            //            LOG.Write(eEvent.ERR_TM, Module, $"TM正在控压LLB与TM压差过大,不可以开腔LLBTSlitDoor");
+            //            return true;
+            //        }
+            //    }
+            //}
             ONSetPoint = isOpen;
             reason += _error;
             reason += " ";

+ 2 - 0
Venus/Venus_RT/Devices/JetVenusPM.cs

@@ -13,6 +13,7 @@ using Venus_RT.Devices.EPD;
 using MECF.Framework.Common.SubstrateTrackings;
 using IoMfc = Venus_RT.Devices.IODevices.IoMfc;
 using System.Threading.Tasks;
+using Aitex.Core.RT.DataCenter;
 
 namespace Venus_RT.Devices
 {
@@ -652,6 +653,7 @@ namespace Venus_RT.Devices
 
         public override bool SetSlitDoor(bool open, out string reason)
         {
+          
             reason = string.Empty;
 
             return _slitDoor.SetCylinder(open, out reason);

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

@@ -407,7 +407,6 @@ namespace Venus_RT.Devices
 
         public void TurnVentValve(ModuleName mod, bool bOn)
         {
-            _TMN2Valve.TurnValve(bOn, out string _);
             switch (mod)
             {
                 case ModuleName.TM:

+ 1 - 0
Venus/Venus_RT/Modules/AutoCycle.cs

@@ -616,6 +616,7 @@ namespace Venus_RT.Modules
         {
             destSlot = new SlotItem(ModuleName.System, -1);
             var wafer = WaferManager.Instance.GetWafer(outSlot.Module, outSlot.Slot);
+
             if (wafer.IsEmpty || wafer.ProcessJob == null || wafer.ProcessJob.Sequence == null || wafer.NextSequenceStep >= wafer.ProcessJob.Sequence.Steps.Count)
                 return false;
 

+ 1 - 0
Venus/Venus_RT/Modules/EFEM/EfemEntity.cs

@@ -213,6 +213,7 @@ namespace Venus_RT.Modules
             DATA.Subscribe($"{Name}.FsmState", () => ((STATE)fsm.State).ToString());
             DATA.Subscribe($"{Name}.FsmPrevState", () => ((STATE)fsm.PrevState).ToString());
             DATA.Subscribe($"{Name}.FsmLastMessage", GetFsmLastMessage);
+            DATA.Subscribe($"{Name}.RobotMoveAction", () => (_efem.TMRobotMoveInfo));
 
             return true;
         }

+ 4 - 2
Venus/Venus_RT/Modules/Schedulers/SchedulerEfemRobot.cs

@@ -188,8 +188,10 @@ namespace Venus_RT.Scheduler
             base.ResetTask();
 
             _entityTaskToken = (int)FSM_MSG.NONE;
-            if(_currentScheduler != null)
-                _currentScheduler.Status = RState.End;
+            if (_currentScheduler != null)
+            { 
+            _currentScheduler.Status = RState.End;
+            }
 
         }
     }

+ 2 - 2
Venus/Venus_RT/Modules/TM/MFControlPressureRoutine.cs

@@ -61,7 +61,8 @@ namespace Venus_RT.Modules.TM
 
         private bool StopPumpDone()
         {
-            if (_JetTM.TMPressure <= _controlPressureCheckPoint)
+            var status = _pumpDownRoutine.Monitor();
+            if (_JetTM.TMPressure <= _controlPressureCheckPoint && status == RState.End)
             {
                 _JetTM.TurnSoftPumpValve(ModuleName.TM, false);
                 _JetTM.TurnFastPumpValve(ModuleName.TM, false);
@@ -70,7 +71,6 @@ namespace Venus_RT.Modules.TM
             }
             else
             {
-                _pumpDownRoutine.Monitor();
                 return false;
             }
         }

+ 12 - 6
Venus/Venus_RT/Modules/TM/MFHomeRoutine.cs

@@ -13,10 +13,13 @@ namespace Venus_RT.Modules.TM
     {
         private enum HomeStep
         {
-            kHoming,
+            kLidDelay,
             kRobot,
+            kRobotDelay,
             kSlitDoor,
+            kSlitDoorDelay,
             kPump,
+            kPumpDelay,
             kATMSwitch,
             kEnd,
         }
@@ -57,12 +60,14 @@ namespace Venus_RT.Modules.TM
 
         public RState Monitor()
         {
-            Runner.Run((int)HomeStep.kRobot,      HomeRobot,     CheckRobotReady,       _robotHomingTimeout)
+            Runner.Delay((int)HomeStep.kLidDelay,500)
+                  .Run((int)HomeStep.kRobot,      HomeRobot,     CheckRobotReady,       _robotHomingTimeout)
+                  .Delay((int)HomeStep.kRobotDelay,500)
                   .Run((int)HomeStep.kSlitDoor,   HomeSlitDoor,  CheckSlitDoorReady,    _slitDoorHomingTimeout)
+                  .Delay((int)HomeStep.kSlitDoorDelay,500)
                   .Run((int)HomeStep.kPump,       HomePump,      CheckPumpReady,        _pumpHomingTimeout)
+                  .Delay((int)HomeStep.kPumpDelay,500)
                   .Run((int)HomeStep.kATMSwitch,  HomePumpDown,  CheckATMSwitchReady,   _pumpDownHomingTimeout)
-
-
                   .End((int)HomeStep.kEnd,      NullFun,    _delay_50ms);
 
             return Runner.Status;
@@ -128,7 +133,8 @@ namespace Venus_RT.Modules.TM
 
         private bool CheckATMSwitchReady()
         {
-            if (_JetTM.IsTMVac)
+            var status = _pumpDownRoutine.Monitor();
+            if (_JetTM.IsTMVac && status == RState.End)
             {
                 _JetTM.TurnSoftPumpValve(ModuleName.TM, false);
                 _JetTM.TurnFastPumpValve(ModuleName.TM, false);
@@ -136,7 +142,7 @@ namespace Venus_RT.Modules.TM
             }
             else
             {
-                _pumpDownRoutine.Monitor();
+                //_pumpDownRoutine.Monitor();
                 return false;
             }
         }

+ 2 - 0
Venus/Venus_RT/Modules/TM/MFVentRoutine.cs

@@ -59,6 +59,7 @@ namespace Venus_RT.Modules.TM
         {
             _JetTM.TurnN2Valve(true);
             _JetTM.TurnPurgeValve(Module, true);
+            _JetTM.TurnSoftPumpValve(Module, true);
             return true;
         }
         private bool IsSoftVentEnd()
@@ -68,6 +69,7 @@ namespace Venus_RT.Modules.TM
         private bool SwitchFastVentValve()
         {
             _JetTM.TurnPurgeValve(Module, false);
+            _JetTM.TurnSoftPumpValve(Module, false);
 
             _JetTM.TurnVentValve(Module, true);
             return true;

+ 25 - 4
Venus/Venus_RT/Modules/TM/TMEntity.cs

@@ -131,6 +131,9 @@ namespace Venus_RT.Modules
         private readonly MFPMExtendRoutine  _pmExtendRoutine;
 
         private readonly MFControlPressureRoutine _tmControlPressureRoutine;
+        private bool startControlPressureFlag=true;
+        private bool stopControlPressureFlag = true;
+
         //private readonly Timer controlPressureTimer;
         public TMEntity()
         {
@@ -227,6 +230,7 @@ namespace Venus_RT.Modules
 
             // Home
             Transition(STATE.Initializing,      FSM_MSG.TIMER,      fnHoming,           STATE.Idle);
+            Transition(STATE.Initializing,      MSG.Abort,          FnAbortExtend,      STATE.Idle);
 
             Transition(STATE.Idle,              FSM_MSG.TIMER,      fnMonitor,          STATE.Idle);
             Transition(STATE.Init,              FSM_MSG.TIMER,      fnMonitor,          STATE.Init);
@@ -297,9 +301,9 @@ namespace Venus_RT.Modules
             //Extend
 
             //Control Pressure
-            AnyStateTransition(MSG.ControlPressure,      FnStartControlPressure, FSM_STATE.SAME, ControlPressureTimer_Elapsed);
+            AnyStateTransition(FSM_MSG.TIMER, ControlPressureTimer_Elapsed, FSM_STATE.SAME);
             //Transition(STATE.ControllingPressure,        FSM_MSG.TIMER,               FnControlPressure,          STATE.Idle);
-            AnyStateTransition(MSG.AbortControlPressure, FnAbortControlPressure, FSM_STATE.SAME);
+            //AnyStateTransition(MSG.AbortControlPressure, FnAbortControlPressure, FSM_STATE.SAME);
 
 
             Running = true;
@@ -635,8 +639,15 @@ namespace Venus_RT.Modules
         {
             if (IsOnline == true)
             {
+                if (startControlPressureFlag==true)
+                {
+                    _tmControlPressureRoutine.Start(param);
+                    startControlPressureFlag = false;
+                    stopControlPressureFlag = true;
+                }
+
                 RState ret = _tmControlPressureRoutine.Monitor();
-                
+
                 if (ret == RState.End)
                 {
                     if (_tm.PMASlitDoorClosed == false || _tm.PMBSlitDoorClosed == false || _tm.PMCSlitDoorClosed == false || _tm.PMDSlitDoorClosed == false)
@@ -644,11 +655,21 @@ namespace Venus_RT.Modules
                         _tm.SwitchTMPressureMode(true);
                     }
                     else
-                    { 
+                    {
                         _tm.SwitchTMPressureMode(false);
                     }
                 }
             }
+            else
+            {
+                if (stopControlPressureFlag == true)
+                {
+                    _tmControlPressureRoutine.Abort();
+                    startControlPressureFlag = true;
+                    stopControlPressureFlag = false;
+                }
+               
+            }
             
             return true;
         }

+ 7 - 0
Venus/Venus_Themes/CustomControls/CustomRobot.cs

@@ -53,6 +53,13 @@ namespace Venus_Themes.CustomControls
         PMD,
         LLA,
         LLB,
+        LP1,
+        LP2, 
+        LP3,
+        Aligner1,
+        RightLocation,
+        LeftLocation
+
     }
 
     public class WaferRobotControl : Control

+ 66 - 20
Venus/Venus_Themes/Themes/Generic.xaml

@@ -509,45 +509,66 @@
                                         </Storyboard>
                                     </VisualTransition>
 
-                                    <VisualTransition To="PMA">
+                                    <VisualTransition To="Aligner1">
                                         <Storyboard FillBehavior="HoldEnd">
                                             <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
                                                 <LinearDoubleKeyFrame Value="0" KeyTime="0:0:1"/>
                                             </DoubleAnimationUsingKeyFrames>
                                         </Storyboard>
                                     </VisualTransition>
-                                    <VisualTransition To="PMB">
+                                    <VisualTransition To="LP1">
                                         <Storyboard FillBehavior="HoldEnd">
                                             <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
-                                                <LinearDoubleKeyFrame Value="60" KeyTime="0:0:1"/>
+                                                <LinearDoubleKeyFrame Value="-45" KeyTime="0:0:1"/>
                                             </DoubleAnimationUsingKeyFrames>
                                         </Storyboard>
                                     </VisualTransition>
-                                    <VisualTransition To="PMC">
+                                    <VisualTransition To="LP2">
                                         <Storyboard FillBehavior="HoldEnd">
                                             <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
-                                                <LinearDoubleKeyFrame Value="120" KeyTime="0:0:1"/>
+                                                <LinearDoubleKeyFrame Value="-90" KeyTime="0:0:1"/>
                                             </DoubleAnimationUsingKeyFrames>
                                         </Storyboard>
                                     </VisualTransition>
-                                    <VisualTransition To="PMD">
+                                    <VisualTransition To="LP3">
                                         <Storyboard FillBehavior="HoldEnd">
                                             <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
-                                                <LinearDoubleKeyFrame Value="180" KeyTime="0:0:1"/>
+                                                <LinearDoubleKeyFrame Value="-135" KeyTime="0:0:1"/>
                                             </DoubleAnimationUsingKeyFrames>
                                         </Storyboard>
                                     </VisualTransition>
                                     <VisualTransition To="LLA">
                                         <Storyboard FillBehavior="HoldEnd">
                                             <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
-                                                <LinearDoubleKeyFrame Value="-65" KeyTime="0:0:1"/>
+                                                <LinearDoubleKeyFrame Value="60" KeyTime="0:0:1"/>
                                             </DoubleAnimationUsingKeyFrames>
                                         </Storyboard>
                                     </VisualTransition>
                                     <VisualTransition To="LLB">
                                         <Storyboard FillBehavior="HoldEnd">
                                             <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
-                                                <LinearDoubleKeyFrame Value="-115" KeyTime="0:0:1"/>
+                                                <LinearDoubleKeyFrame Value="125" KeyTime="0:0:1"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                        </Storyboard>
+                                    </VisualTransition>
+                                    <VisualTransition To="RightLocation">
+                                        <Storyboard FillBehavior="HoldEnd">
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRightLeftAct" Storyboard.TargetProperty="X">
+                                                <LinearDoubleKeyFrame Value="80" KeyTime="0:0:1"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                        </Storyboard>
+                                    </VisualTransition>
+                                    <VisualTransition To="LeftLocation">
+                                        <Storyboard FillBehavior="HoldEnd">
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRightLeftAct" Storyboard.TargetProperty="X">
+                                                <LinearDoubleKeyFrame Value="-80" KeyTime="0:0:1"/>
+                                            </DoubleAnimationUsingKeyFrames>
+                                        </Storyboard>
+                                    </VisualTransition>
+                                    <VisualTransition To="PMD">
+                                        <Storyboard FillBehavior="HoldEnd">
+                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                                <LinearDoubleKeyFrame Value="180" KeyTime="0:0:1"/>
                                             </DoubleAnimationUsingKeyFrames>
                                         </Storyboard>
                                     </VisualTransition>
@@ -560,58 +581,83 @@
                                         </DoubleAnimationUsingKeyFrames>
                                     </Storyboard>
                                 </VisualState>
-                                <VisualState Name="PMA">
+                                <VisualState Name="Aligner1">
                                     <Storyboard FillBehavior="HoldEnd">
                                         <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
                                             <LinearDoubleKeyFrame Value="0" KeyTime="0:0:0"/>
                                         </DoubleAnimationUsingKeyFrames>
                                     </Storyboard>
                                 </VisualState>
-                                <VisualState Name="PMB">
+                                <VisualState Name="LP1">
                                     <Storyboard FillBehavior="HoldEnd">
                                         <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
-                                            <LinearDoubleKeyFrame Value="60" KeyTime="0:0:0"/>
+                                            <LinearDoubleKeyFrame Value="-45" KeyTime="0:0:0"/>
                                         </DoubleAnimationUsingKeyFrames>
                                     </Storyboard>
                                 </VisualState>
-                                <VisualState Name="PMC">
+                                <VisualState Name="LP2">
                                     <Storyboard FillBehavior="HoldEnd">
                                         <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
-                                            <LinearDoubleKeyFrame Value="120" KeyTime="0:0:0"/>
+                                            <LinearDoubleKeyFrame Value="-90" KeyTime="0:0:0"/>
                                         </DoubleAnimationUsingKeyFrames>
                                     </Storyboard>
                                 </VisualState>
-                                <VisualState Name="PMD">
+                                <VisualState Name="LP3">
                                     <Storyboard FillBehavior="HoldEnd">
                                         <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
-                                            <LinearDoubleKeyFrame Value="180" KeyTime="0:0:0"/>
+                                            <LinearDoubleKeyFrame Value="-135" KeyTime="0:0:0"/>
                                         </DoubleAnimationUsingKeyFrames>
                                     </Storyboard>
                                 </VisualState>
                                 <VisualState Name="LLA">
                                     <Storyboard FillBehavior="HoldEnd">
                                         <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
-                                            <LinearDoubleKeyFrame Value="-65" KeyTime="0:0:0"/>
+                                            <LinearDoubleKeyFrame Value="60" KeyTime="0:0:0"/>
                                         </DoubleAnimationUsingKeyFrames>
                                     </Storyboard>
                                 </VisualState>
                                 <VisualState Name="LLB">
                                     <Storyboard FillBehavior="HoldEnd">
                                         <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
-                                            <LinearDoubleKeyFrame Value="-115" KeyTime="0:0:0"/>
+                                            <LinearDoubleKeyFrame Value="125" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                    </Storyboard>
+                                </VisualState>
+                                <VisualState Name="RightLocation">
+                                    <Storyboard FillBehavior="HoldEnd">
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRightLeftAct" Storyboard.TargetProperty="X">
+                                            <LinearDoubleKeyFrame Value="80" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                    </Storyboard>
+                                </VisualState>
+                                <VisualState Name="LeftLocation">
+                                    <Storyboard FillBehavior="HoldEnd">
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRightLeftAct" Storyboard.TargetProperty="X">
+                                            <LinearDoubleKeyFrame Value="-80" KeyTime="0:0:0"/>
+                                        </DoubleAnimationUsingKeyFrames>
+                                    </Storyboard>
+                                </VisualState>
+                                <VisualState Name="PMD">
+                                    <Storyboard FillBehavior="HoldEnd">
+                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="robotRotateAct" Storyboard.TargetProperty="Angle">
+                                            <LinearDoubleKeyFrame Value="180" KeyTime="0:0:0"/>
                                         </DoubleAnimationUsingKeyFrames>
                                     </Storyboard>
                                 </VisualState>
                             </VisualStateGroup>
 
                         </VisualStateManager.VisualStateGroups>
+                        
                         <Canvas Width="200" Height="300" >
-
+                            <Canvas.RenderTransform>
+                                <TransformGroup>
+                                    <TranslateTransform  x:Name="robotRightLeftAct"></TranslateTransform>
+                                </TransformGroup>
+                            </Canvas.RenderTransform>
                             <Canvas x:Name="robot" Width="100" Height="150" RenderTransformOrigin="1 1" >
                                 <Canvas.RenderTransform>
                                     <TransformGroup>
                                         <RotateTransform  x:Name="robotRotateAct"/>
-                                        <!--<TranslateTransform  x:Name="robotUpDownAct"></TranslateTransform>-->
                                     </TransformGroup>
                                 </Canvas.RenderTransform>
                                 <Canvas x:Name="armXT1" Width="200" Height="100"  Canvas.Top="100" RenderTransformOrigin="0.5 0.5">

+ 151 - 13
Venus/Venus_Themes/UserControls/EFEM.xaml

@@ -6,11 +6,117 @@
              xmlns:local="clr-namespace:Venus_Themes.UserControls"
              xmlns:converters="clr-namespace:Venus_Themes.Converters"
              xmlns:ctrl="http://OpenSEMI.Ctrlib.com/presentation"
+             xmlns:customControls="clr-namespace:Venus_Themes.CustomControls"
              mc:Ignorable="d" 
              d:DesignHeight="450" d:DesignWidth="800" Name="efem">
     <UserControl.Resources>
         <converters:BoolToVisibility2 x:Key="BoolToVisibility2"/>
+        <Style x:Key="LP1Style">
+            <Style.Triggers>
+                <DataTrigger Binding="{Binding ElementName=efem,Path=LP1Loaded}" Value="True">
+                    <DataTrigger.EnterActions>
+                        <BeginStoryboard>
+                            <Storyboard>
+                                <DoubleAnimation  Storyboard.TargetProperty="RenderTransform.Children[0].Y" To="-30" Duration="0:0:1"/>
+                            </Storyboard>
+                        </BeginStoryboard>
+                    </DataTrigger.EnterActions>
+                    <DataTrigger.ExitActions>
+                        <BeginStoryboard>
+                            <Storyboard>
+                                <DoubleAnimation  Storyboard.TargetProperty="RenderTransform.Children[0].Y" To="0" Duration="0:0:1"/>
+                            </Storyboard>
+                        </BeginStoryboard>
+                    </DataTrigger.ExitActions>
+                </DataTrigger>
+            </Style.Triggers>
+        </Style>
+        <Style x:Key="LP2Style">
+            <Style.Triggers>
+                <DataTrigger Binding="{Binding ElementName=efem,Path=LP2Loaded}" Value="True">
+                    <DataTrigger.EnterActions>
+                        <BeginStoryboard>
+                            <Storyboard>
+                                <DoubleAnimation  Storyboard.TargetProperty="RenderTransform.Children[0].Y" To="-30" Duration="0:0:1"/>
+                            </Storyboard>
+                        </BeginStoryboard>
+                    </DataTrigger.EnterActions>
+                    <DataTrigger.ExitActions>
+                        <BeginStoryboard>
+                            <Storyboard>
+                                <DoubleAnimation  Storyboard.TargetProperty="RenderTransform.Children[0].Y" To="0" Duration="0:0:1"/>
+                            </Storyboard>
+                        </BeginStoryboard>
+                    </DataTrigger.ExitActions>
+                </DataTrigger>
+            </Style.Triggers>
+        </Style>
+        <Style x:Key="LP3Style">
+            <Style.Triggers>
+                <DataTrigger Binding="{Binding ElementName=efem,Path=LP3Loaded}" Value="True">
+                    <DataTrigger.EnterActions>
+                        <BeginStoryboard>
+                            <Storyboard>
+                                <DoubleAnimation  Storyboard.TargetProperty="RenderTransform.Children[0].Y" To="-30" Duration="0:0:1"/>
+                            </Storyboard>
+                        </BeginStoryboard>
+                    </DataTrigger.EnterActions>
+                    <DataTrigger.ExitActions>
+                        <BeginStoryboard>
+                            <Storyboard>
+                                <DoubleAnimation  Storyboard.TargetProperty="RenderTransform.Children[0].Y" To="0" Duration="0:0:1"/>
+                            </Storyboard>
+                        </BeginStoryboard>
+                    </DataTrigger.ExitActions>
+                </DataTrigger>
+            </Style.Triggers>
+        </Style>
+        <Style x:Key="PlatformStyle">
+            <Style.Triggers>
+               
+                <DataTrigger Binding="{Binding ElementName=efem,Path=CurrentRobotPosition}" Value="Left">
+                    <DataTrigger.EnterActions>
+                        <BeginStoryboard x:Name="toLeft">
+                            <Storyboard>
+                                <DoubleAnimation  Storyboard.TargetProperty="RenderTransform.Children[0].X"  To="-200" Duration="0:0:1"/>
+                            </Storyboard>
+                        </BeginStoryboard>
+                    </DataTrigger.EnterActions>
+                    <DataTrigger.ExitActions>
+                        <RemoveStoryboard BeginStoryboardName="toLeft"/>
+                    </DataTrigger.ExitActions>
+                </DataTrigger>
+                <DataTrigger Binding="{Binding ElementName=efem,Path=CurrentRobotPosition}" Value="Right">
+                    <DataTrigger.EnterActions>
+                        <BeginStoryboard x:Name="toRight">
+                            <Storyboard>
+                                <DoubleAnimation  Storyboard.TargetProperty="RenderTransform.Children[0].X"  To="200" Duration="0:0:1"/>
+                            </Storyboard>
+                        </BeginStoryboard>
+                    </DataTrigger.EnterActions>
+                    <DataTrigger.ExitActions>
+                        <RemoveStoryboard BeginStoryboardName="toRight"/>
+                    </DataTrigger.ExitActions>
+                </DataTrigger>
+                <DataTrigger Binding="{Binding ElementName=efem,Path=CurrentRobotPosition}" Value="Origin">
+                    <DataTrigger.EnterActions>
+                        <BeginStoryboard x:Name="toOrigin">
+                            <Storyboard>
+                                <DoubleAnimation  Storyboard.TargetProperty="RenderTransform.Children[0].X"  To="0" Duration="0:0:1"/>
+                            </Storyboard>
+                        </BeginStoryboard>
+                    </DataTrigger.EnterActions>
+                    <DataTrigger.ExitActions>
+                        <RemoveStoryboard BeginStoryboardName="toOrigin"/>
+                    </DataTrigger.ExitActions>
+                </DataTrigger>
+            </Style.Triggers>
+        </Style>
+
     </UserControl.Resources>
+    
+    
+
     <Viewbox Stretch="Fill">
    
         <Border BorderThickness="0" BorderBrush="Gray">
@@ -24,16 +130,24 @@
                         </LinearGradientBrush>
                     </Polygon.Fill>
                 </Polygon>
-                <Ellipse  Width="500" Height="500" Canvas.Left="510" Canvas.Top="50">
-                    <Ellipse.Fill>
-                        <RadialGradientBrush >
-                         
-                            <GradientStop Color="#FFFFFFFF" Offset="0" />
+                <Canvas Width="500" Height="500" Canvas.Left="510" Canvas.Top="50" Style="{StaticResource PlatformStyle}">
+                    <Canvas.RenderTransform>
+                        <TransformGroup>
+                            <TranslateTransform/>
+                        </TransformGroup>
+                    </Canvas.RenderTransform>
+                    <Ellipse  Width="500" Height="500"  x:Name="ep1" >
+                        <Ellipse.Fill>
+                            <RadialGradientBrush >
+                                <GradientStop Color="#FFFFFFFF" Offset="0" />
+                                <GradientStop Color="Silver" Offset="1" />
+                            </RadialGradientBrush>
+                        </Ellipse.Fill>
+                    </Ellipse>
 
-                            <GradientStop Color="Silver" Offset="1" />
-                        </RadialGradientBrush>
-                    </Ellipse.Fill>
-                </Ellipse>
+                    <customControls:GuangChuanRobotControl  OriginT="Aligner1"  Canvas.Left="-30" Canvas.Top="-140"   Width="540" Height="810"     RobotTAction="{Binding ElementName=efem,Path=RobotATAction}"  RobotXAction="{Binding ElementName=efem,Path=RobotAXAction}" RobotWafer="{Binding ElementName=efem,Path=RobotAWaferInfo}"/>
+                    <customControls:GuangChuanRobotControl  OriginT="PMD"  Canvas.Left="-30" Canvas.Top="-140"   Width="540" Height="810"     RobotTAction="{Binding ElementName=efem,Path=RobotBTAction}"  RobotXAction="{Binding ElementName=efem,Path=RobotBXAction}" RobotWafer="{Binding ElementName=efem,Path=RobotBWaferInfo}"/>
+                </Canvas>
 
 
                 <Viewbox Stretch="Uniform" Width="370" Height="370" Canvas.Left="-10"  Canvas.Top="100">
@@ -70,7 +184,13 @@
 
 
 
-                <local:Loadport Canvas.Left="10"  Canvas.Top="610" Width="300" Height="300"/>
+                <local:Loadport Canvas.Left="10"  Canvas.Top="610" Width="300" Height="300">
+                    <local:Loadport.RenderTransform>
+                        <TransformGroup>
+                            <TranslateTransform/>
+                        </TransformGroup>
+                    </local:Loadport.RenderTransform>
+                </local:Loadport>
                 <local:Loadport Canvas.Left="610" Canvas.Top="610" Width="300" Height="300"/>
                 <local:Loadport Canvas.Left="1200" Canvas.Top="610" Width="300" Height="300"/>
 
@@ -80,9 +200,27 @@
                 <TextBlock Text="Cooling1" FontSize="40" Canvas.Left="66"    Canvas.Top="310"/>
                 <TextBlock Text="Aligner1" FontSize="40" Canvas.Left="990"  Canvas.Top="310"/>-->
 
-                <local:Foup Width="230" Height="450" Canvas.Left="44"  Canvas.Top="625"   Visibility="{Binding ElementName=efem,Path=LP1Loaded,Converter={StaticResource BoolToVisibility2}}"/>
-                <local:Foup Width="230" Height="450" Canvas.Left="646" Canvas.Top="625"   Visibility="{Binding ElementName=efem,Path=LP2Loaded,Converter={StaticResource BoolToVisibility2}}"/>
-                    <local:Foup Width="230" Height="450" Canvas.Left="1236" Canvas.Top="625"  Visibility="{Binding ElementName=efem,Path=LP3Loaded,Converter={StaticResource BoolToVisibility2}}"/>
+                <local:Foup Width="230" Height="450" Canvas.Left="44"  Canvas.Top="655"   Visibility="{Binding ElementName=efem,Path=LP1Presented,Converter={StaticResource BoolToVisibility2}}" Style="{StaticResource LP1Style}">
+                    <local:Foup.RenderTransform>
+                        <TransformGroup>
+                            <TranslateTransform/>
+                        </TransformGroup>
+                    </local:Foup.RenderTransform>
+                </local:Foup>
+                <local:Foup Width="230" Height="450" Canvas.Left="646"  Canvas.Top="655"   Visibility="{Binding ElementName=efem,Path=LP2Presented,Converter={StaticResource BoolToVisibility2}}" Style="{StaticResource LP2Style}">
+                    <local:Foup.RenderTransform>
+                        <TransformGroup>
+                            <TranslateTransform/>
+                        </TransformGroup>
+                    </local:Foup.RenderTransform>
+                </local:Foup>
+                <local:Foup Width="230" Height="450" Canvas.Left="1236" Canvas.Top="655"  Visibility="{Binding ElementName=efem,Path=LP3Presented,Converter={StaticResource BoolToVisibility2}}" Style="{StaticResource LP3Style}">
+                    <local:Foup.RenderTransform>
+                        <TransformGroup>
+                            <TranslateTransform/>
+                        </TransformGroup>
+                    </local:Foup.RenderTransform>
+                </local:Foup>
 
                 <TextBlock Text="LP1" Canvas.Left="120"  Canvas.Top="920" FontSize="55"/>
                 <TextBlock Text="LP2" Canvas.Left="700"  Canvas.Top="920" FontSize="55"/>

+ 99 - 0
Venus/Venus_Themes/UserControls/EFEM.xaml.cs

@@ -6,6 +6,7 @@ using System.Threading.Tasks;
 using System.Windows;
 using System.Windows.Controls;
 using OpenSEMI.ClientBase;
+using Venus_Themes.CustomControls;
 
 namespace Venus_Themes.UserControls
 {
@@ -14,6 +15,13 @@ namespace Venus_Themes.UserControls
     /// </summary>
     public partial class EFEM : UserControl
     {
+        public enum RobotPosition
+        {
+            None,
+            Origin,
+            Right,
+            Left,
+        }
         public EFEM()
         {
             InitializeComponent();
@@ -26,6 +34,32 @@ namespace Venus_Themes.UserControls
             set => SetValue(Aligner1WaferProperty, value);
         }
 
+        public static readonly DependencyProperty LP1PresentedProperty = DependencyProperty.Register(
+       "LP1Presented", typeof(bool), typeof(EFEM),
+       new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        public bool LP1Presented
+        {
+            get { return (bool)this.GetValue(LP1PresentedProperty); }
+            set { this.SetValue(LP1PresentedProperty, value); }
+        }
+        public static readonly DependencyProperty LP2PresentedProperty = DependencyProperty.Register(
+      "LP2Presented", typeof(bool), typeof(EFEM),
+      new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        public bool LP2Presented
+        {
+            get { return (bool)this.GetValue(LP2PresentedProperty); }
+            set { this.SetValue(LP2PresentedProperty, value); }
+        }
+
+        public static readonly DependencyProperty LP3PresentedProperty = DependencyProperty.Register(
+      "LP3Presented", typeof(bool), typeof(EFEM),
+      new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        public bool LP3Presented
+        {
+            get { return (bool)this.GetValue(LP3PresentedProperty); }
+            set { this.SetValue(LP3PresentedProperty, value); }
+        }
+
         public static readonly DependencyProperty LP1LoadedProperty = DependencyProperty.Register(
         "LP1Loaded", typeof(bool), typeof(EFEM),
         new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
@@ -52,5 +86,70 @@ namespace Venus_Themes.UserControls
             get { return (bool)this.GetValue(LP3LoadedProperty); }
             set { this.SetValue(LP3LoadedProperty, value); }
         }
+
+        public static readonly DependencyProperty CurrentRobotPositionProperty = DependencyProperty.Register(
+      "CurrentRobotPosition", typeof(RobotPosition), typeof(EFEM),
+      new FrameworkPropertyMetadata(RobotPosition.None, FrameworkPropertyMetadataOptions.AffectsRender));
+        public RobotPosition CurrentRobotPosition
+        {
+            get { return (RobotPosition)this.GetValue(CurrentRobotPositionProperty); }
+            set { this.SetValue(CurrentRobotPositionProperty, value); }
+        }
+
+        public static readonly DependencyProperty RobotATActionProperty = DependencyProperty.Register(
+     "RobotATAction", typeof(WaferRobotTAction), typeof(EFEM),
+     new FrameworkPropertyMetadata(WaferRobotTAction.T_Origin, FrameworkPropertyMetadataOptions.AffectsRender));
+        public WaferRobotTAction RobotATAction
+        {
+            get { return (WaferRobotTAction)this.GetValue(RobotATActionProperty); }
+            set { this.SetValue(RobotATActionProperty, value); }
+        }
+
+        public static readonly DependencyProperty RobotAXActionProperty = DependencyProperty.Register(
+     "RobotAXAction", typeof(WaferRobotXAction), typeof(EFEM),
+     new FrameworkPropertyMetadata(WaferRobotXAction.X_Origin, FrameworkPropertyMetadataOptions.AffectsRender));
+        public WaferRobotXAction RobotAXAction
+        {
+            get { return (WaferRobotXAction)this.GetValue(RobotAXActionProperty); }
+            set { this.SetValue(RobotAXActionProperty, value); }
+        }
+
+
+
+
+
+        public static readonly DependencyProperty RobotBTActionProperty = DependencyProperty.Register(
+   "RobotBTAction", typeof(WaferRobotTAction), typeof(EFEM),
+   new FrameworkPropertyMetadata(WaferRobotTAction.T_Origin, FrameworkPropertyMetadataOptions.AffectsRender));
+        public WaferRobotTAction RobotBTAction
+        {
+            get { return (WaferRobotTAction)this.GetValue(RobotBTActionProperty); }
+            set { this.SetValue(RobotBTActionProperty, value); }
+        }
+
+        public static readonly DependencyProperty RobotBXActionProperty = DependencyProperty.Register(
+     "RobotBXAction", typeof(WaferRobotXAction), typeof(EFEM),
+     new FrameworkPropertyMetadata(WaferRobotXAction.X_Origin, FrameworkPropertyMetadataOptions.AffectsRender));
+        public WaferRobotXAction RobotBXAction
+        {
+            get { return (WaferRobotXAction)this.GetValue(RobotBXActionProperty); }
+            set { this.SetValue(RobotBXActionProperty, value); }
+        }
+
+
+        public static readonly DependencyProperty RobotAWaferInfoProperty = DependencyProperty.Register(
+    "RobotAWaferInfo", typeof(WaferInfo), typeof(EFEM));
+        public WaferInfo RobotAWaferInfo
+        {
+            get { return (WaferInfo)this.GetValue(RobotAWaferInfoProperty); }
+            set { this.SetValue(RobotAWaferInfoProperty, value); }
+        }
+        public static readonly DependencyProperty RobotBWaferInfoProperty = DependencyProperty.Register(
+    "RobotBWaferInfo", typeof(WaferInfo), typeof(EFEM));
+        public WaferInfo RobotBWaferInfo
+        {
+            get { return (WaferInfo)this.GetValue(RobotAWaferInfoProperty); }
+            set { this.SetValue(RobotAWaferInfoProperty, value); }
+        }
     }
 }