Browse Source

Merge branch 'master' of http://git.jetplasma-oa.com/JetPlasma/Venus

sangwq 1 year ago
parent
commit
d014b232e1

+ 18 - 0
Venus/Framework/Common/DBCore/ProcessDataRecorder.cs

@@ -49,6 +49,8 @@ namespace MECF.Framework.Common.DBCore
             DB.Insert(sql);
         }
 
+
+
         public static void UpdateStatus(string guid, string status)
         {
             string sql = string.Format(
@@ -137,6 +139,22 @@ namespace MECF.Framework.Common.DBCore
             }
         }
 
+        public static void RecordPrecess(string guid, DateTime startTime, DateTime endTime, string recipeName, string waferDataGuid, string processIn, string lotID, string slotID)
+        {
+            string sql = string.Format(
+                "INSERT INTO \"process_data\"(\"guid\", \"process_begin_time\",\"process_end_time\", \"recipe_name\" , \"wafer_data_guid\", \"process_in\", \"lot_id\", \"slot_id\" )VALUES ('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}','{7}' );",
+                guid,
+                startTime.ToString("yyyy/MM/dd HH:mm:ss.fff"),
+                endTime.ToString("yyyy/MM/dd HH:mm:ss.fff"),
+                recipeName,
+                waferDataGuid,
+                processIn,
+                lotID,
+                string.IsNullOrEmpty(slotID) ? "" : (int.Parse(slotID) + 1).ToString());
+
+            DB.Insert(sql);
+        }
+
         public List<string> GetHistoryRecipeList(DateTime begin, DateTime end)
         {
             List<string> result = new List<string>();

+ 291 - 3
Venus/Venus_MainPages/ViewModels/OperationOverViewModel.cs

@@ -1,4 +1,6 @@
-using OpenSEMI.ClientBase;
+using MECF.Framework.Common.CommonData;
+using MECF.Framework.Common.DataCenter;
+using OpenSEMI.ClientBase;
 using Prism.Mvvm;
 using System;
 using System.Collections.Generic;
@@ -7,6 +9,7 @@ using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Threading;
 using Venus_MainPages.Unity;
+using Venus_Themes.CustomControls;
 
 namespace Venus_MainPages.ViewModels
 {
@@ -16,7 +19,29 @@ namespace Venus_MainPages.ViewModels
         private bool m_TabIsChecked=true;
         private ModuleInfo m_LP1ModuleInfo;
         private ModuleInfo m_LP2ModuleInfo;
-
+        private WaferRobotTAction m_Robot1TAction;
+        private WaferRobotXAction m_Robot1XAction;
+        private WaferRobotTAction m_Robot2TAction;
+        private WaferRobotXAction m_Robot2XAction;
+        private RobotMoveInfo m_robotMoveInfo;
+        int arm1oldWaferStatus = 100;
+        int arm2oldWaferStatus = 100;
+        private WaferInfo m_PMAWafer;
+        private WaferInfo m_PMBWafer;
+        private WaferInfo m_PMCWafer;
+        private WaferInfo m_PMDWafer;
+        private WaferInfo m_LLAWafer;
+        private WaferInfo m_LLBWafer;
+        private WaferInfo m_BladeAWafer;
+        private WaferInfo m_BladeBWafer;
+        private List<string> m_RtDataKeys = new List<string>();
+        private Dictionary<string, object> m_RtDataValues;
+        private bool m_PMAIsInstalled;
+        private bool m_PMBIsInstalled;
+        private bool m_PMCIsInstalled;
+        private bool m_PMDIsInstalled;
+        private bool m_LLAIsInstalled;
+        private bool m_LLBIsInstalled;
         #endregion
 
         #region  属性
@@ -35,15 +60,130 @@ namespace Venus_MainPages.ViewModels
             get { return m_LP2ModuleInfo; }
             set { SetProperty(ref m_LP2ModuleInfo, 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); }
+        }
+        public RobotMoveInfo RobotMoveInfo
+        {
+            get { return m_robotMoveInfo; }
+            set
+            {
+                RobotMoveInfoChanged(m_robotMoveInfo, value);
+                m_robotMoveInfo = value;
+            }
+        }
+        public WaferInfo LLAWafer
+        {
+            get { return m_LLAWafer; }
+            set { SetProperty(ref m_LLAWafer, value); }
+        }
+        public WaferInfo LLBWafer
+        {
+            get { return m_LLBWafer; }
+            set { SetProperty(ref m_LLBWafer, value); }
+        }
+        public WaferInfo PMAWafer
+        {
+            get { return m_PMAWafer; }
+            set { SetProperty(ref m_PMAWafer, value); }
+        }
+        public WaferInfo PMBWafer
+        {
+            get { return m_PMBWafer; }
+            set { SetProperty(ref m_PMBWafer, value); }
+        }
+        public WaferInfo PMCWafer
+        {
+            get { return m_PMCWafer; }
+            set { SetProperty(ref m_PMCWafer, value); }
+        }
+        public WaferInfo PMDWafer
+        {
+            get { return m_PMDWafer; }
+            set { SetProperty(ref m_PMDWafer, 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 Dictionary<string, object> RtDataValues
+        {
+            get { return m_RtDataValues; }
+            set { SetProperty(ref m_RtDataValues, value); }
+        }
+        public bool PMAIsInstalled
+        {
+            get { return m_PMAIsInstalled; }
+            set { SetProperty(ref m_PMAIsInstalled, value); }
+        }
+        public bool PMBIsInstalled
+        {
+            get { return m_PMBIsInstalled; }
+            set { SetProperty(ref m_PMBIsInstalled, value); }
+        }
+        public bool PMCIsInstalled
+        {
+            get { return m_PMCIsInstalled; }
+            set { SetProperty(ref m_PMCIsInstalled, value); }
+        }
+        public bool PMDIsInstalled
+        {
+            get { return m_PMDIsInstalled; }
+            set { SetProperty(ref m_PMDIsInstalled, value); }
+        }
+        public bool LLAIsInstalled
+        {
+            get { return m_LLAIsInstalled; }
+            set { SetProperty(ref m_LLAIsInstalled, value); }
+        }
+        public bool LLBIsInstalled
+        {
+            get { return m_LLBIsInstalled; }
+            set { SetProperty(ref m_LLBIsInstalled, value); }
+        }
         #endregion
 
         #region 构造函数
-        public  OperationOverViewModel()
+        public OperationOverViewModel()
         {
             DispatcherTimer timer = new DispatcherTimer();
             timer.Interval = TimeSpan.FromSeconds(0.5);
             timer.Tick += Timer_Tick;
             timer.Start();
+
+            addDataKeys();
+            string[] allModules = QueryDataClient.Instance.Service.GetConfig($"System.InstalledModules").ToString().Split(',');
+            PMAIsInstalled = allModules.Contains("PMA");
+            PMBIsInstalled = allModules.Contains("PMB");
+            PMCIsInstalled = allModules.Contains("PMC");
+            PMDIsInstalled = allModules.Contains("PMD");
+            LLAIsInstalled = allModules.Contains("LLA");
+            LLBIsInstalled = allModules.Contains("LLB");
+
         }
         #endregion
 
@@ -52,6 +192,154 @@ namespace Venus_MainPages.ViewModels
         {
             LP1ModuleInfo = ModuleManager.ModuleInfos["LP1"];
             LP2ModuleInfo = ModuleManager.ModuleInfos["LP1"];
+
+
+            if (LLAIsInstalled == true)
+            {
+                LLAWafer = ModuleManager.ModuleInfos["LLA"].WaferManager.Wafers.FirstOrDefault(x => x.WaferStatus != 0);           
+            }
+            if (LLBIsInstalled == true)
+            {
+                LLBWafer = ModuleManager.ModuleInfos["LLB"].WaferManager.Wafers.FirstOrDefault(x => x.WaferStatus != 0);
+
+            }
+            if (PMAIsInstalled == true)
+            {
+                PMAWafer = ModuleManager.ModuleInfos["PMA"].WaferManager.Wafers[0];
+            }
+            if (PMBIsInstalled == true)
+            {
+                PMBWafer = ModuleManager.ModuleInfos["PMB"].WaferManager.Wafers[0];
+            }
+            if (PMCIsInstalled == true)
+            {
+                PMCWafer = ModuleManager.ModuleInfos["PMC"].WaferManager.Wafers[0];
+            }
+            if (PMDIsInstalled == true)
+            {
+                PMDWafer = ModuleManager.ModuleInfos["PMD"].WaferManager.Wafers[0];
+            }
+
+
+            BladeAWafer = ModuleManager.ModuleInfos["TM"].WaferManager.Wafers[0];
+            BladeBWafer = ModuleManager.ModuleInfos["TM"].WaferManager.Wafers[1];
+
+            RobotMoveInfo = (RobotMoveInfo)QueryDataClient.Instance.Service.GetData("TM.RobotMoveAction");
+
+            RtDataValues = QueryDataClient.Instance.Service.PollData(m_RtDataKeys);
+        }
+        private async void RobotMoveInfoChanged(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")
+                {
+                    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["TM"].WaferManager.Wafers[0].WaferStatus;
+            arm2oldWaferStatus = ModuleManager.ModuleInfos["TM"].WaferManager.Wafers[1].WaferStatus;
+
+        }
+
+        private void addDataKeys()
+        {
+            m_RtDataKeys.Add("PMA.IsSlitDoorClosed");
+            m_RtDataKeys.Add("PMB.IsSlitDoorClosed");
+            m_RtDataKeys.Add("PMC.IsSlitDoorClosed");
+            m_RtDataKeys.Add("PMD.IsSlitDoorClosed");
+
+            m_RtDataKeys.Add("TM.LLATSlitDoor.IsClosed");
+            m_RtDataKeys.Add("TM.LLBTSlitDoor.IsClosed");
+
+
         }
         #endregion
     }

+ 7 - 7
Venus/Venus_MainPages/ViewModels/PlatformViewModel.cs

@@ -47,13 +47,13 @@ namespace Venus_MainPages.ViewModels
             {
                 if (m_WaferInPosSensor != value)
                 {
-                    if (value == true && LLAWaferIsVisibility==Visibility.Collapsed && PMCurrentState!=PMState.LLPicking && PMCurrentState != PMState.LLPlacing)
+                    if (value == true && PMCurrentState!=PMState.LLPicking && PMCurrentState != PMState.LLPlacing)
                     {
-                        InvokeClient.Instance.Service.DoOperation("CreateWafer", "LLA", 0);
+                        InvokeClient.Instance.Service.DoOperation("CreateWafer", "LLA", 3);
                     }
-                    else if (value == false && LLAWaferIsVisibility == Visibility.Visible && PMCurrentState != PMState.LLPicking && PMCurrentState != PMState.LLPlacing)
+                    else if (value == false  && PMCurrentState != PMState.LLPicking && PMCurrentState != PMState.LLPlacing)
                     {
-                        InvokeClient.Instance.Service.DoOperation("DeleteWafer", "LLA", 0);
+                        InvokeClient.Instance.Service.DoOperation("DeleteWafer", "LLA", 3);
                     }
                 }
                 SetProperty(ref m_WaferInPosSensor, value);
@@ -321,12 +321,12 @@ namespace Venus_MainPages.ViewModels
             PumpIsOpen = (bool)RtDataValues[$"{ModuleName}.PumpIsRunning"];
             PurgeCounter=(int)RtDataValues[$"{ModuleName}.LoadLockPurge.PurgeCounter"];
 
-            LLAWafer = ModuleManager.ModuleInfos["LLA"].WaferManager.Wafers[0];
+            LLAWafer = ModuleManager.ModuleInfos["LLA"].WaferManager.Wafers[3];
             PMAWafer = ModuleManager.ModuleInfos["PMA"].WaferManager.Wafers[0];
             
 
-            PMAWaferIsVisibility = (bool)RtDataValues[$"PMA.HasWafer"] ==true ? Visibility.Visible : Visibility.Collapsed;
-            LLAWaferIsVisibility = (bool)RtDataValues[$"LLA.HasWafer"] == true ? Visibility.Visible : Visibility.Collapsed;
+            //PMAWaferIsVisibility = (bool)RtDataValues[$"PMA.HasWafer"] ==true ? Visibility.Visible : Visibility.Collapsed;
+            //LLAWaferIsVisibility = (bool)RtDataValues[$"LLA.HasWafer"] == true ? Visibility.Visible : Visibility.Collapsed;
 
             PMCurrentState= (PMState)Enum.Parse(typeof(PMState), RtDataValues[$"{ModuleName}.FsmState"].ToString());
 

+ 63 - 6
Venus/Venus_MainPages/ViewModels/ProcessHistoryViewModel.cs

@@ -21,6 +21,7 @@ using System.IO;
 using System.Diagnostics;
 using Aitex.Core.RT.Routine;
 using System.Xml.Linq;
+using System.Windows.Forms;
 
 namespace Venus_MainPages.ViewModels
 {
@@ -36,7 +37,10 @@ namespace Venus_MainPages.ViewModels
         public List<string> RecipesAdd=new List<string>();
         public List<SolidColorBrush> solidColorBrushes = new List<SolidColorBrush>();
         DateTime currentTime;
+        private RecipeItem selectedRecipeItem;
+
         #endregion
+
         #region 属性
         public List<HistoryDataItem> ProcessData { get; set; }
         public List<Recipeslist> CheboxRecipes { get; set; }
@@ -78,13 +82,28 @@ namespace Venus_MainPages.ViewModels
         private DelegateCommand<object> _PdParameterCheckCommand;
         public DelegateCommand<object> PdParameterCheckCommand=>
            _PdParameterCheckCommand??(_PdParameterCheckCommand=new DelegateCommand<object>(OnParameterCheck));
+
+
+        private DelegateCommand<object> _DataGridSelectionChangedCommand;
+        public DelegateCommand<object> DataGridSelectionChangedCommand =>
+           _DataGridSelectionChangedCommand ?? (_DataGridSelectionChangedCommand = new DelegateCommand<object>(OnDataGridSelectionChanged));
+
+
+        private DelegateCommand _SearchDataCommand;
+        public DelegateCommand SearchDataCommand =>
+        _SearchDataCommand ?? (_SearchDataCommand = new DelegateCommand(OnSearchData));
+
+
+        private DelegateCommand _ClearDataCommand;
+        public DelegateCommand ClearDataCommand =>
+        _ClearDataCommand ?? (_ClearDataCommand = new DelegateCommand(OnClearData));
         #endregion
 
         #region 构造函数
         public ProcessHistoryViewModel()
         {
             ProcessChartData = new ProcessDataChartDataItem(60000);
-            ParameterNodes = _provider.GetParameters();
+            
             Recipes = new ObservableCollection<RecipeItem>();
             timer.Interval = TimeSpan.FromSeconds(0.5);
             CheboxRecipes = new List<Recipeslist>();
@@ -100,6 +119,7 @@ namespace Venus_MainPages.ViewModels
             solidColorBrushes.Add(new SolidColorBrush(Colors.DarkGreen));
         }
         #endregion
+
         #region 命令方法
         private void OnLoadPd(Object eventView)
         {
@@ -128,8 +148,7 @@ namespace Venus_MainPages.ViewModels
         }
         public void SearchRecipe()
         {
-            //if (MenuPermission != 3) return;
-            Console.WriteLine("er");
+
             this.StartDateTime = this.view.wfTimeFrom.Value;
             this.EndDateTime = this.view.wfTimeTo.Value;
             Recipes.Clear();
@@ -161,7 +180,7 @@ namespace Venus_MainPages.ViewModels
                 DataTable dbData = QueryDataClient.Instance.Service.QueryData(sql);
 
 
-                Application.Current.Dispatcher.BeginInvoke(new Action(() =>
+                System.Windows.Application.Current.Dispatcher.BeginInvoke(new Action(() =>
                 {
                     if (dbData == null || dbData.Rows.Count == 0) return;
 
@@ -429,11 +448,49 @@ namespace Venus_MainPages.ViewModels
             }
             this.view.MyDrawGraphicsControl.PointCollections = cls;
             this.view.MyDrawGraphicsControl.FitControl();
-        }       
+        }
+
+        private void OnDataGridSelectionChanged(object obj)
+        {
+            selectedRecipeItem =  obj as RecipeItem;
+            ParameterNodes = new ObservableCollection<ParameterNode>(_provider.GetParameters().Where(x => x.Name == selectedRecipeItem?.Chamber));
+        }
+        private void OnSearchData()
+        {
+            this.view.MyDrawGraphicsControl.ClearPlotPoints();
+            var Keys = new List<string>();
+            PdKeyDataCollection.ToList().ForEach(key => 
+            {
+                Keys.Add(key.Key);
+            });
+            var result = GetData(Keys.Distinct().ToList(), Convert.ToDateTime(selectedRecipeItem.StartTime) , Convert.ToDateTime(selectedRecipeItem.EndTime) );
+            if (result == null)
+            {
+                return;
+            }
+            List<PointCollection> cls = new List<PointCollection>();
+            for (int i = 0; i < Keys.Count; i++)
+            {
+                PointCollection points = new PointCollection();
+                int k = 1;
+                result[Keys[i]].ForEach(point =>
+                {
+                    points.Add(new Point() { X = point.dateTime.ToOADate(), Y = point.value });
+                    k += 1;
+                });
+                cls.Add(points);
+            }
+            this.view.MyDrawGraphicsControl.PointCollections = cls;
+            this.view.MyDrawGraphicsControl.FitControl();
+        }
+        private void OnClearData()
+        { 
         
+        }
     }
     #endregion
-    #region 数据类
+
+        #region 数据类
     public class RecipeItem
     {
         public bool Selected { get; set; }

+ 5 - 5
Venus/Venus_MainPages/Views/OperationOverView.xaml

@@ -27,12 +27,12 @@
                 <Canvas Width="1000" Height="1000">
                     <userControls:MainTM Width="300" Height="250" Canvas.Left="380" Canvas.Top="90"/>
 
-                    <customControls:WaferRobotControl OriginT="PMA"    Canvas.Left="410" Canvas.Top="76"   Width="200" Height="300"   x:Name="robot"  RobotTAction="{Binding Robot1TAction}" RobotXAction="{Binding Robot1XAction}" RobotWafer="{Binding BladeAWafer}"/>
+                    <customControls:WaferRobotControl OriginT="PMA"    Canvas.Left="410" Canvas.Top="76"   Width="200" Height="300"   x:Name="robot"  RobotTAction="{Binding Robot1TAction}" RobotXAction="{Binding Robot1XAction}"  RobotWafer="{Binding BladeAWafer}"/>
                     <customControls:WaferRobotControl OriginT="PMD"    Canvas.Left="410" Canvas.Top="76"   Width="200" Height="300"   x:Name="robot2" RobotTAction="{Binding Robot2TAction}" RobotXAction="{Binding Robot2XAction}"  RobotWafer="{Binding BladeBWafer}"/>
 
 
-                    <userControls:LoadLockLeft  Width="150" Height="150" Canvas.Top="310" Canvas.Left="358"  DoorIsOpen="{Binding RtDataValues[TM.LLATSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}" Door2IsOpen="{Binding RtDataValues[TM.LLATSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}" Visibility="{Binding LLAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" RobotWafer="{Binding LLAWafer}"/>
-                    <userControls:LoadLockRight Width="150" Height="150" Canvas.Top="309" Canvas.Left="519"  DoorIsOpen="{Binding RtDataValues[TM.LLBTSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}" Door2IsOpen="{Binding RtDataValues[TM.LLATSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}" Visibility="{Binding LLBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" RobotWafer="{Binding LLBWafer}"/>
+                    <userControls:LoadLockLeft  Width="150" Height="150" Canvas.Top="310" Canvas.Left="358"  DoorIsOpen="{Binding RtDataValues[TM.LLATSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}"  Visibility="{Binding LLAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" RobotWafer="{Binding LLAWafer}"/>
+                    <userControls:LoadLockRight Width="150" Height="150" Canvas.Top="309" Canvas.Left="519"  DoorIsOpen="{Binding RtDataValues[TM.LLBTSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}"  Visibility="{Binding LLBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" RobotWafer="{Binding LLBWafer}"/>
 
 
                     <userControls:TMChamber x:Name="PMA" Canvas.Top="302"  Canvas.Left="233" Width="140" Height="140" RotateTransformValue="-90"  DoorIsOpen="{Binding RtDataValues[PMA.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMAWafer}"/>
@@ -42,8 +42,8 @@
 
                     <userControls:EFEM Width="600" Height="300" Canvas.Left="200" Canvas.Top="474"/>
 
-                    <customControls:WaferRobotControl OriginT="PMA"    Canvas.Left="400" Canvas.Top="460"   Width="200" Height="300"    RobotTAction="{Binding Robot1TAction}" RobotXAction="{Binding Robot1XAction}" RobotWafer="{Binding BladeAWafer}"/>
-                    <customControls:WaferRobotControl OriginT="PMD"    Canvas.Left="400" Canvas.Top="460"   Width="200" Height="300"    RobotTAction="{Binding Robot2TAction}" RobotXAction="{Binding Robot2XAction}"  RobotWafer="{Binding BladeBWafer}"/>
+                    <customControls:WaferRobotControl OriginT="PMA"    Canvas.Left="400" Canvas.Top="460"   Width="200" Height="300"    RobotTAction="{Binding Robot3TAction}" RobotXAction="{Binding Robot3XAction}"  RobotWafer="{Binding BladeCWafer}"/>
+                    <customControls:WaferRobotControl OriginT="PMD"    Canvas.Left="400" Canvas.Top="460"   Width="200" Height="300"    RobotTAction="{Binding Robot4TAction}" RobotXAction="{Binding Robot4XAction}"  RobotWafer="{Binding BladeDWafer}"/>
                 </Canvas>
 
             </Viewbox>

+ 2 - 2
Venus/Venus_MainPages/Views/OverView.xaml

@@ -876,7 +876,7 @@
                 </TextBlock>
                 <TextBlock Grid.Row="12"        Background="#E9EDF4"    Padding="10,5,0,0" >
                     <TextBlock.Text>
-                        <MultiBinding StringFormat="{}Gas13({0}:{1})">
+                        <MultiBinding StringFormat="{}Gas3({0}:{1})">
                             <Binding Path="MFC3Data.DisplayName"></Binding>
                             <Binding Path="MFC3Data.Scale"></Binding>
                         </MultiBinding>
@@ -923,7 +923,7 @@
                     </TextBlock.Text>
                 </TextBlock>
                 <TextBlock Grid.Row="18"   Text="ESC Clamp Voltage"          Background="#E9EDF4"  Padding="10,5,0,0"  />
-                <TextBlock Grid.Row="19"   Text="Esc Temperature"        Background="#D0D8E8"  Padding="10,5,0,0" />
+                <TextBlock Grid.Row="19"   Text="ESC Temperature"        Background="#D0D8E8"  Padding="10,5,0,0" />
                 <TextBlock Grid.Row="20"  Text="Helium Pressure"       Background="#E9EDF4"    Padding="10,5,0,0"/>
                 <TextBlock Grid.Row="21"   Text="Helium Flow"       Background="#D0D8E8"    Padding="10,5,0,0" />
 

File diff suppressed because it is too large
+ 29 - 78
Venus/Venus_MainPages/Views/ProcessHistoryView.xaml


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

@@ -456,8 +456,8 @@
                     <customControls:WaferRobotControl OriginT="PMD"    Canvas.Left="410" Canvas.Top="76"   Width="200" Height="300"   x:Name="robot2" RobotTAction="{Binding Robot2TAction}" RobotXAction="{Binding Robot2XAction}"  RobotWafer="{Binding BladeBWafer}"/>
 
 
-                    <userControls:LoadLockLeft Door2IsOpen="{Binding RtDataValues[TM.LLATSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}" Width="150" Height="150" Canvas.Top="310" Canvas.Left="358"  DoorIsOpen="{Binding RtDataValues[TM.LLATSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}" Visibility="{Binding LLAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" RobotWafer="{Binding LLAWafer}"/>
-                    <userControls:LoadLockRight Width="150" Height="150" Canvas.Top="309" Canvas.Left="519"  DoorIsOpen="{Binding RtDataValues[TM.LLBTSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}" Door2IsOpen="{Binding RtDataValues[TM.LLBTSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}" Visibility="{Binding LLBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" RobotWafer="{Binding LLBWafer}"/>
+                    <userControls:LoadLockLeft Door2IsVisibility="Collapsed" Width="150" Height="150"  Canvas.Top="310"  Canvas.Left="358"   DoorIsOpen="{Binding RtDataValues[TM.LLATSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}" Visibility="{Binding LLAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" RobotWafer="{Binding LLAWafer}"/>
+                    <userControls:LoadLockRight Door2IsVisibility="Collapsed" Width="150" Height="150" Canvas.Top="309"  Canvas.Left="519"  DoorIsOpen="{Binding RtDataValues[TM.LLBTSlitDoor.IsClosed],Converter={StaticResource BoolToBool}}"  Visibility="{Binding LLBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}" RobotWafer="{Binding LLBWafer}"/>
 
 
                     <userControls:TMChamber x:Name="PMA" Canvas.Top="302"  Canvas.Left="233" Width="140" Height="140" RotateTransformValue="-90"  DoorIsOpen="{Binding RtDataValues[PMA.IsSlitDoorClosed],Converter={StaticResource BoolToBool}}" RobotWafer="{Binding PMAWafer}" Visibility="{Binding PMAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>

+ 3 - 5
Venus/Venus_MainPages/Views/TopView.xaml

@@ -21,15 +21,13 @@
         <converters2:TMStateConverter x:Key="TMStateConverter"/>
         <converters2:LLStateConverter x:Key="LLStateConverter"/>
         <converters2:SystemStateConverter x:Key="SystemStateConverter"/>
-
-
-
     </UserControl.Resources>
+    
     <Canvas Background="{StaticResource Login_BG}">
         <TextBlock Style="{StaticResource textBlockStyle}" Text="{Binding Title}" FontSize="60"    FontStyle="Italic" Canvas.Left="5"/>
         <TextBlock Text="{Binding SoftwareVersion}" Foreground="White"    FontSize="20"  Canvas.Left="70" Canvas.Top="80" />
 
-        <Grid Canvas.Left="240" Width="1300" Height="110">
+        <Grid Canvas.Left="240" Width="1300" Height="104">
             <Grid.RowDefinitions>
                 <RowDefinition/>
                 <RowDefinition/>
@@ -101,7 +99,7 @@
 
 
        
-            <Viewbox  Height="100" Width="40" Canvas.Right="10" Canvas.Top="10"    >
+            <Viewbox  Height="100" Width="40" Canvas.Right="10" Canvas.Top="6"    >
                 <deviceControl:AITSignalTower  
                                               IsRedLightOn   ="{Binding SignalTowerData.IsRedLightOn}"
                                               IsYellowLightOn="{Binding SignalTowerData.IsYellowLightOn}"

+ 20 - 16
Venus/Venus_RT/Modules/PMs/LLPickRoutine.cs

@@ -13,6 +13,7 @@ namespace Venus_RT.Modules.PMs
         {
             kPrepareTransfer,
             kExtend,
+            KDelay2s,
             kPinUp,
             kRetract,
             kPostTransfer,
@@ -80,6 +81,7 @@ namespace Venus_RT.Modules.PMs
         {
             Runner.Run((int)LLPickStep.kPrepareTransfer,    PrepareTransfer,        IsPrepareReady,                                     _prepareTransferTimeout * 1000)
                 .Run((int)LLPickStep.kExtend,               _chamber.ExtendWafer,   () => { return _chamber.IsLoadlockArmExtend; },     _transferWaferTimeout * 1000)
+                .Delay((int)LLPickStep.KDelay2s,2000)
                 .Run((int)LLPickStep.kPinUp,                SetLiftPinDown,         () => { return _chamber.CheckLiftDown(); })
                 .Run((int)LLPickStep.kRetract,              _chamber.RetractWafer,  () => { return _chamber.IsLoadlockArmRetract; },    _transferWaferTimeout * 1000)
                 .Run((int)LLPickStep.kPostTransfer,         PostTransfer,           IsPostTransferReady,                                _prepareTransferTimeout * 1000)
@@ -120,27 +122,29 @@ namespace Venus_RT.Modules.PMs
 
         private bool VentLoadLock()
         {
-            if (!_isATMMode)
-            {
-                return _loadLockVentRoutine.Start() == RState.Running;
-            }
-            else
+            //2023/06/08朱让取消
+            //if (!_isATMMode)
+            //{
+            //    return _loadLockVentRoutine.Start() == RState.Running;
+            //}
+            //else
                 return true;
         }
       
         private bool IsVentDone()
         {
-            if(!_isATMMode)
-            {
-                RState ret = _loadLockVentRoutine.Monitor();
-                if (ret == RState.Failed || ret == RState.Timeout)
-                {
-                    Runner.Stop("Vent Failed");
-                    return false;
-                }
-
-                return ret == RState.End;
-            }
+            //2023/06/08朱让取消
+            //if(!_isATMMode)
+            //{
+            //    RState ret = _loadLockVentRoutine.Monitor();
+            //    if (ret == RState.Failed || ret == RState.Timeout)
+            //    {
+            //        Runner.Stop("Vent Failed");
+            //        return false;
+            //    }
+
+            //    return ret == RState.End;
+            //}
 
             return true;
         }

+ 2 - 0
Venus/Venus_RT/Modules/PMs/LLPlaceRoutine.cs

@@ -14,6 +14,7 @@ namespace Venus_RT.Modules.PMs
         {
             kPrepareTransfer,
             kExtend,
+            KDelay2s,
             kPinUp,
             kRetract,
             kPostTransfer,
@@ -73,6 +74,7 @@ namespace Venus_RT.Modules.PMs
         {
             Runner.Run((int)LLPlaceStep.kPrepareTransfer,   PrepareTransfer,        IsPrepareReady,                                     _prepareTransferTimeout * 1000)
                 .Run((int)LLPlaceStep.kExtend,              _chamber.ExtendWafer,   () => { return _chamber.IsLoadlockArmExtend; },     _transferWaferTimeout * 1000)
+                .Delay((int)LLPlaceStep.KDelay2s, 2000)
                 .Run((int)LLPlaceStep.kPinUp,               SetLiftPinUp,           () => { return _chamber.CheckLiftUp(); })
                 .Run((int)LLPlaceStep.kRetract,             _chamber.RetractWafer,  () => { return _chamber.IsLoadlockArmRetract; },    _transferWaferTimeout * 1000)
                 .Run((int)LLPlaceStep.kPostTransfer,        PostTransfer,           IsPostTransferReady,                                _prepareTransferTimeout * 1000)

+ 8 - 2
Venus/Venus_RT/Modules/PMs/LoadLockPumpRoutine.cs

@@ -11,6 +11,7 @@ namespace Venus_RT.Modules.PMs
         private enum PumpStep
         {
             kCloseValves,
+            KCloseISO,
             kPump,
             kClosePumpValves,
         }
@@ -18,7 +19,7 @@ namespace Venus_RT.Modules.PMs
         private int _basePressureLL = 100;
         private int _pumpTimeLimitLL = 120;
         
-
+        
         public LoadLockPumpRoutine(JetPMBase chamber) : base(chamber)
         {
             Name = "Loadlock Pump";
@@ -35,7 +36,11 @@ namespace Venus_RT.Modules.PMs
                 _chamber.CloseValves();
                 _basePressureLL = SC.GetValue<int>($"{Module}.Pump.LoadLockPumpBasePressure");
                 _pumpTimeLimitLL = SC.GetValue<int>($"{Module}.Pump.LoadLockPumpTimeLimit");
-
+                if (_chamber.PendulumValveIsOpen() == true)
+                {
+                    _chamber.TurnPendulumValve(false);
+                }
+                _chamber.OpenValve(ValveType.TurboPumpPurge, false);
                 return Runner.Start(Module, Name);
             }
             return RState.Failed;
@@ -44,6 +49,7 @@ namespace Venus_RT.Modules.PMs
         public RState Monitor()
         {
             Runner.Delay((int)PumpStep.kCloseValves,    _delay_1s)
+                .Run((int)PumpStep.KCloseISO, HOFs.WrapAction(_chamber.OpenValve, ValveType.TurboPumpPumping, false))
                 .Run((int)PumpStep.kPump,               HOFs.WrapAction(_chamber.OpenValve, ValveType.LoadlockPumping, true),   () => { return _chamber.LoadlockPressure <= _basePressureLL; }, _pumpTimeLimitLL * 1000)
                 .End((int)PumpStep.kClosePumpValves,    HOFs.WrapAction(_chamber.OpenValve, ValveType.LoadlockPumping, false),  _delay_1s);
 

+ 6 - 2
Venus/Venus_RT/Modules/PMs/PMProcessRoutine.cs

@@ -12,6 +12,7 @@ using MECF.Framework.Common.SubstrateTrackings;
 using Venus_Core;
 using System.ServiceModel.Security.Tokens;
 using System.Diagnostics;
+using MECF.Framework.Common.DBCore;
 
 namespace Venus_RT.Modules.PMs
 {
@@ -48,7 +49,6 @@ namespace Venus_RT.Modules.PMs
         private int _loopCounter = 0;
         private int _recipeRunningMode = 0;
         private Stopwatch _stepTime = new Stopwatch();
-
         public RecipeResult currentRecipeResult;
         public bool isMaualEndStep;
         
@@ -139,7 +139,7 @@ namespace Venus_RT.Modules.PMs
             {
                 return RState.Failed;
             }
-
+            RecipeStartTime = DateTime.Now;
             // Load/Validate Recipe
             _qeRecipes.Clear();
             string recipeName = (string)objs[0];
@@ -372,6 +372,10 @@ namespace Venus_RT.Modules.PMs
             _chamber.OpenValve(ValveType.Guage, true);
             _chamber.SetPVPostion(1000);
             WaferManager.Instance.UpdateWaferProcessStatus(Module, 0, EnumWaferProcessStatus.Completed);
+
+        
+
+            ProcessDataRecorder.RecordPrecess(Guid.NewGuid().ToString(), RecipeStartTime, DateTime.Now, CurrentRunningRecipe, "", _chamber.Name, "", "");
             return true;
         }
 

+ 5 - 3
Venus/Venus_Themes/UserControls/LoadLockLeft.xaml

@@ -4,11 +4,13 @@
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:local="clr-namespace:Venus_Themes.UserControls"
+             
              xmlns:ctrl="http://OpenSEMI.Ctrlib.com/presentation"
              
              mc:Ignorable="d" 
              d:DesignHeight="450" d:DesignWidth="800" Name="LeftLoadLock" Opacity="0.9">
     <UserControl.Resources>
+        
         <Style TargetType="Rectangle" x:Key="doorAnimation">
             <Setter Property="Width" Value="190"/>
             <Style.Triggers>
@@ -98,9 +100,9 @@
                        DataContext="{Binding ElementName=LeftLoadLock, Path=RobotWafer}"  HorizontalAlignment="Center" VerticalAlignment="Center">
                 </ctrl:Slot>
             </Viewbox>
-            
-            <Rectangle  Fill="Silver" Width="142"   VerticalAlignment="Top"    Height="20"  Canvas.Top="200" Canvas.Left="-1"/>
-            <Rectangle  Fill="DimGray" Style="{StaticResource door2Animation}"  VerticalAlignment="Top"    Height="20"  Canvas.Top="200" Canvas.Left="-1"/>
+
+            <Rectangle  Fill="Silver" Width="142"   VerticalAlignment="Top"    Height="20"  Canvas.Top="200" Canvas.Left="-1" Visibility="{Binding ElementName=LeftLoadLock,Path=Door2IsVisibility}"/>
+            <Rectangle  Fill="DimGray" Style="{StaticResource door2Animation}"  VerticalAlignment="Top"    Height="20"  Canvas.Top="200" Canvas.Left="-1" Visibility="{Binding ElementName=LeftLoadLock,Path=Door2IsVisibility}"/>
 
         </Canvas>
             

+ 14 - 0
Venus/Venus_Themes/UserControls/LoadLockLeft.xaml.cs

@@ -47,6 +47,20 @@ namespace Venus_Themes.UserControls
                 this.SetValue(Door2IsOpenProperty, value);
             }
         }
+
+        public static readonly DependencyProperty Door2IsVisibilityProperty = DependencyProperty.Register(
+      "Door2IsVisibility", typeof(Visibility), typeof(LoadLockLeft));
+
+        public Visibility Door2IsVisibility
+        {
+            get { return (Visibility)this.GetValue(Door2IsVisibilityProperty); }
+            set
+            {
+                this.SetValue(Door2IsVisibilityProperty, value);
+            }
+        }
+
+
         public static readonly DependencyProperty RobotWaferProperty = DependencyProperty.Register(
       "RobotWafer", typeof(WaferInfo), typeof(LoadLockLeft));
         public WaferInfo RobotWafer

+ 2 - 2
Venus/Venus_Themes/UserControls/LoadLockRight.xaml

@@ -98,8 +98,8 @@
                        DataContext="{Binding ElementName=RightLoadLock, Path=RobotWafer}"  HorizontalAlignment="Center" VerticalAlignment="Center">
                 </ctrl:Slot>
             </Viewbox>
-            <Rectangle  Fill="Silver" Width="142"  VerticalAlignment="Top"    Height="20"  Canvas.Top="200" Canvas.Left="59"/>
-            <Rectangle  Fill="DimGray" Style="{StaticResource door2Animation}"  VerticalAlignment="Top"    Height="20"  Canvas.Top="200" Canvas.Left="59"  >
+            <Rectangle  Fill="Silver" Width="142"  VerticalAlignment="Top"    Height="20"  Canvas.Top="200" Canvas.Left="59" Visibility="{Binding ElementName=RightLoadLock,Path=Door2IsVisibility}"/>
+            <Rectangle  Fill="DimGray" Style="{StaticResource door2Animation}"  VerticalAlignment="Top"    Height="20"  Canvas.Top="200" Canvas.Left="59"  Visibility="{Binding ElementName=RightLoadLock,Path=Door2IsVisibility}">
                 <Rectangle.RenderTransform>
                     <RotateTransform Angle="180" CenterX="71" CenterY="10"/>
                 </Rectangle.RenderTransform>

+ 12 - 0
Venus/Venus_Themes/UserControls/LoadLockRight.xaml.cs

@@ -47,6 +47,18 @@ namespace Venus_Themes.UserControls
                 this.SetValue(Door2IsOpenProperty, value);
             }
         }
+        public static readonly DependencyProperty Door2IsVisibilityProperty = DependencyProperty.Register(
+      "Door2IsVisibility", typeof(Visibility), typeof(LoadLockRight));
+
+        public Visibility Door2IsVisibility
+        {
+            get { return (Visibility)this.GetValue(Door2IsVisibilityProperty); }
+            set
+            {
+                this.SetValue(Door2IsVisibilityProperty, value);
+            }
+        }
+
         public static readonly DependencyProperty RobotWaferProperty = DependencyProperty.Register(
        "RobotWafer", typeof(WaferInfo), typeof(LoadLockRight));
         public WaferInfo RobotWafer

+ 1 - 1
Venus/Venus_UI/Views/ShellView.xaml

@@ -145,7 +145,7 @@
     <Grid>
         
         <Grid.RowDefinitions>
-            <RowDefinition Height="110"/>
+            <RowDefinition Height="104"/>
             <RowDefinition/>
             <RowDefinition Height="48"/>
         </Grid.RowDefinitions>