Browse Source

1.提交cycle功能

lixiang 9 months ago
parent
commit
df2593530e

+ 12 - 0
Venus/Venus_MainPages/Unity/WaferAssociationInfo.cs

@@ -91,5 +91,17 @@ namespace Venus_MainPages.Unity
             set { _PostCleanRecipeName = value; RaisePropertyChanged("PostCleanRecipeName"); }
         }
 
+        private bool _IsEnableCycle;
+        public bool IsEnableCycle
+        {
+            get { return _IsEnableCycle; }
+            set { _IsEnableCycle = value; RaisePropertyChanged("IsEnableCycle"); }
+        }
+        private int _CycleNumber=1 ;
+        public int CycleNumber
+        {
+            get { return _CycleNumber; }
+            set { _CycleNumber = value; RaisePropertyChanged("CycleNumber"); }
+        }
     }
 }

+ 78 - 24
Venus/Venus_MainPages/ViewModels/OperationOverViewModel.cs

@@ -112,15 +112,45 @@ namespace Venus_MainPages.ViewModels
         private string m_RouteState;
         private PressureType m_PressureType;
         DispatcherTimer timer;
+
+        private string m_PMAChamberType;
+        private string m_PMBChamberType;
+        private string m_PMCChamberType;
+        private string m_PMDChamberType;
+
         #endregion
 
         #region  属性
+
+        public string PMAChamberType
+        {
+            get { return m_PMAChamberType; }
+            set { SetProperty(ref m_PMAChamberType, value); }
+        }
+
+        public string PMBChamberType
+        {
+            get { return m_PMBChamberType; }
+            set { SetProperty(ref m_PMBChamberType, value); }
+        }
+
+        public string PMCChamberType
+        {
+            get { return m_PMCChamberType; }
+            set { SetProperty(ref m_PMCChamberType, value); }
+        }
         public PressureType PressureType
         {
             get { return m_PressureType; }
             set { SetProperty(ref m_PressureType, value); }
         }
 
+        public string PMDChamberType
+        {
+            get { return m_PMDChamberType; }
+            set { SetProperty(ref m_PMDChamberType, value); }
+        }
+
         public bool TabIsChecked
         {
             get { return m_TabIsChecked; }
@@ -608,9 +638,22 @@ namespace Venus_MainPages.ViewModels
             EFEMIsInstalled = allModules.Contains("EFEM");
             TMIsInstalled = allModules.Contains("TM");
 
-
-
-
+            if (PMAIsInstalled)
+            {
+                PMAChamberType = ((JetChamber)QueryDataClient.Instance.Service.GetConfig($"PMA.ChamberType")).ToString();
+            }
+            if (PMBIsInstalled)
+            {
+                PMBChamberType = ((JetChamber)QueryDataClient.Instance.Service.GetConfig($"PMB.ChamberType")).ToString();
+            }
+            if (PMCIsInstalled)
+            {
+                PMCChamberType = ((JetChamber)QueryDataClient.Instance.Service.GetConfig($"PMC.ChamberType")).ToString();
+            }
+            if (PMDIsInstalled)
+            {
+                PMDChamberType = ((JetChamber)QueryDataClient.Instance.Service.GetConfig($"PMD.ChamberType")).ToString();
+            }
             SwitchFlag = false;
 
             ATMModeIsOn = Convert.ToBoolean(QueryDataClient.Instance.Service.GetConfig("System.IsATMMode"));
@@ -640,18 +683,18 @@ namespace Venus_MainPages.ViewModels
 
         }
 
-        private void T_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
-        {
-            if (timer.IsEnabled)
-            {
-                timer.Stop();
+        //private void T_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
+        //{
+        //    if (timer.IsEnabled)
+        //    {
+        //        timer.Stop();
 
-            }
-            else
-            {
-                timer.Start();
-            }
-        }
+        //    }
+        //    else
+        //    {
+        //        timer.Start();
+        //    }
+        //}
 
         private void OnLoadWafer(object obj)
         {
@@ -799,11 +842,7 @@ namespace Venus_MainPages.ViewModels
             info.ModuleData.WaferManager.Wafers.ForEach(key => { slotSequence.Insert(0, key.SequenceName); });
 
             string jobId = info.LotId.Trim();
-            //if (string.IsNullOrEmpty(jobId))
-            //    jobId = "CJ_Local_" + info.ModuleData.ModuleID;
-            //info.LotId = jobId;
-            //info.JobID = jobId;
-            //info.JobStatus = "WaitingForStart";
+
             info.LotIdSaved = true;
 
             Dictionary<string, object> param = new Dictionary<string, object>()
@@ -813,7 +852,8 @@ namespace Venus_MainPages.ViewModels
                 {"SlotSequence", slotSequence.ToArray()},
                 {"AutoStart", true},
                 { "PreCleanRecipeName",info.PreCleanRecipeName},
-                { "PostCleanRecipeName",info.PostCleanRecipeName}
+                { "PostCleanRecipeName",info.PostCleanRecipeName},
+                { "CycleNumber",info.CycleNumber}
             };
             InvokeClient.Instance.Service.DoOperation("System.CreateJob", param);
         }
@@ -1296,10 +1336,24 @@ namespace Venus_MainPages.ViewModels
             m_RtDataKeys.Add("EFEM.IsOnline");
             m_RtDataKeys.Add("System.IsAutoMode");
             m_RtDataKeys.Add("System.IsBusy");
-            m_RtDataKeys.Add("Scheduler.CycledCount");
-            m_RtDataKeys.Add("Scheduler.CycledWafer");
-            m_RtDataKeys.Add("Scheduler.CycleSetPoint");
-            m_RtDataKeys.Add("Scheduler.Throughput");
+
+
+            m_RtDataKeys.Add("LP1.CycledCount");
+            m_RtDataKeys.Add("LP1.CycledWafer");
+            m_RtDataKeys.Add("LP1.CycleSetPoint");
+            m_RtDataKeys.Add("LP1.Throughput");
+
+            m_RtDataKeys.Add("LP2.CycledCount");
+            m_RtDataKeys.Add("LP2.CycledWafer");
+            m_RtDataKeys.Add("LP2.CycleSetPoint");
+            m_RtDataKeys.Add("LP2.Throughput");
+
+            m_RtDataKeys.Add("LP3.CycledCount");
+            m_RtDataKeys.Add("LP3.CycledWafer");
+            m_RtDataKeys.Add("LP3.CycleSetPoint");
+            m_RtDataKeys.Add("LP3.Throughput");
+
+
             m_RtDataKeys.Add("EquipmentStatus");
             m_RtDataKeys.Add("Scheduler.PjNameList");
         }

File diff suppressed because it is too large
+ 76 - 58
Venus/Venus_MainPages/Views/NewWaferAssociationUnit.xaml


+ 41 - 0
Venus/Venus_MainPages/Views/NewWaferAssociationUnit.xaml.cs

@@ -1,10 +1,14 @@
 using MECF.Framework.Common.DataCenter;
+using OpenSEMI.Ctrlib.Controls;
 using System;
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.IO;
 using System.Linq;
 using System.Windows;
 using System.Windows.Controls;
+using System.Windows.Input;
+using Venus_Core;
 using Venus_MainPages.Unity;
 
 namespace Venus_MainPages.Views
@@ -39,6 +43,16 @@ namespace Venus_MainPages.Views
         }
         public static readonly DependencyProperty SelectedIndexProperty = DependencyProperty.Register("SelectedIndex", typeof(int), typeof(NewWaferAssociationUnit),new PropertyMetadata(1));
 
+
+        public string CycleInfo
+        {
+            get { return (string)GetValue(CycleInfoProperty); }
+            set { SetValue(CycleInfoProperty, value); }
+        }
+        public static readonly DependencyProperty CycleInfoProperty = DependencyProperty.Register("CycleInfo", typeof(string), typeof(NewWaferAssociationUnit));
+
+
+
         public bool ButtonIsEnable
         {
             get { return (bool)GetValue(ButtonIsEnableProperty); }
@@ -134,5 +148,32 @@ namespace Venus_MainPages.Views
         {
             SelectedIndex = 1;
         }
+
+        private void IsEnableCycleCheckBox_Unchecked(object sender, RoutedEventArgs e)
+        {
+            CycleNumTextbox.IsEnabled = false;
+            CycleNumTextbox.Text = "1";
+        }
+
+        private void IsEnableCycleCheckBox_Checked(object sender, RoutedEventArgs e)
+        {
+            CycleNumTextbox.IsEnabled = true;
+        }
+        private void Slot_SlotMouseButtonDown(object sender, MouseButtonEventArgs e)
+        {
+            VenusGlobalEvents.OnSlotRightClickChanged(sender as Slot);
+        }
+
+        private void Slot_WaferTransferStarted(object sender, DragDropEventArgs e)
+        {
+            try
+            {
+                VenusGlobalEvents.OnSlotWaferTransfer(e);
+            }
+            catch (Exception ex)
+            {
+                Trace.WriteLine(ex);
+            }
+        }
     }
 }

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


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

@@ -46,11 +46,11 @@
                 </StackPanel>
                 <StackPanel Grid.Row="2" Orientation="Horizontal">
                     <TextBlock Text="Pre Clean:"  TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="15" FontFamily="Arial" VerticalAlignment="Center" Width="80"></TextBlock>
-                    <customControls:CustomComBobox Width="300" x:Name="preComboBox"  DropDownOpened="preComboBox_DropDownOpened"  SelectionChanged="preComboBox_SelectionChanged" Margin="0 2 0 2"/>
+                    <customControls:CustomComBobox Width="300" x:Name="preComboBox"  DropDownOpened="preComboBox_DropDownOpened"  SelectionChanged="preComboBox_SelectionChanged" Margin="0 2 0 2" SelectedValue="{Binding ElementName=WaferUnit,Path=WAInfo.PreCleanRecipeName}"/>
                 </StackPanel>
                 <StackPanel Grid.Row="3" Orientation="Horizontal">
                     <TextBlock Text="Post Clean:"  TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="15" FontFamily="Arial" VerticalAlignment="Center" Width="80"></TextBlock>
-                    <customControls:CustomComBobox Width="300" x:Name="postComboBox" DropDownOpened="postComboBox_DropDownOpened"  SelectionChanged="postComboBox_SelectionChanged" Margin="0 3 0 3"/>
+                    <customControls:CustomComBobox Width="300" x:Name="postComboBox" DropDownOpened="postComboBox_DropDownOpened"  SelectionChanged="postComboBox_SelectionChanged" Margin="0 3 0 3" SelectedValue="{Binding ElementName=WaferUnit,Path=WAInfo.PostCleanRecipeName}"/>
                 </StackPanel>
 
                 <StackPanel Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">

+ 12 - 9
Venus/Venus_RT/Modules/SystemDispatcher.cs

@@ -780,10 +780,10 @@ namespace Venus_RT.Modules
         private int _efemRobotSingleArmOption = 0;
         private int _tmRobotSingleArmOption = 0;
         private LLSlotInOutOpt _LLSlotInOutOption = 0;
-        private Dictionary<ModuleName, int> _lpCycleWafer = new Dictionary<ModuleName, int>();
-        private Dictionary<ModuleName, int> _lpCycleCount = new Dictionary<ModuleName, int>();
-        private Dictionary<ModuleName, int> _lpCycleSP = new Dictionary<ModuleName, int>();
-        private Dictionary<ModuleName, float> _lpThroughput = new Dictionary<ModuleName, float>();
+        private Dictionary<ModuleName, int> _lpCycleWafer = new Dictionary<ModuleName, int> { { ModuleName.LP1, 0},  { ModuleName.LP2, 0 },{ ModuleName.LP3, 0 } };
+        private Dictionary<ModuleName, int> _lpCycleCount = new Dictionary<ModuleName, int> { { ModuleName.LP1, 0 }, { ModuleName.LP2, 0 }, { ModuleName.LP3, 0 } };
+        private Dictionary<ModuleName, int> _lpCycleSP    = new Dictionary<ModuleName, int> { { ModuleName.LP1, 1 }, { ModuleName.LP2, 1 }, { ModuleName.LP3, 1 } };
+        private Dictionary<ModuleName, float> _lpThroughput = new Dictionary<ModuleName, float> { { ModuleName.LP1, 0 }, { ModuleName.LP2, 0 }, { ModuleName.LP3, 0 } };
         private Stopwatch _cycleWatch = new Stopwatch();
 
         private SequenceLLInOutPath _LLInOutPath = SequenceLLInOutPath.DInDOut;
@@ -820,10 +820,10 @@ namespace Venus_RT.Modules
                 _loadportControlJobDic[lp.ToString()] = null;
                 DATA.Subscribe($"{lp}.CurrentControlJob", () => _loadportControlJobDic[lp.ToString()], SubscriptionAttribute.FLAG.IgnoreSaveDB);
 
-                DATA.Subscribe($"{lp}.CycledCount", () => _lpCycleCount[lp], SubscriptionAttribute.FLAG.IgnoreSaveDB);
-                DATA.Subscribe($"{lp}.CycledWafer", () => _lpCycleWafer[lp], SubscriptionAttribute.FLAG.IgnoreSaveDB);
-                DATA.Subscribe($"{lp}.CycleSetPoint", () => _lpCycleSP[lp], SubscriptionAttribute.FLAG.IgnoreSaveDB);
-                DATA.Subscribe($"{lp}.Throughput", () => _lpThroughput[lp], SubscriptionAttribute.FLAG.IgnoreSaveDB);
+                DATA.Subscribe($"{lp}.CycledCount",   () => _lpCycleCount.Keys.Contains(lp) ?_lpCycleCount[lp]:0, SubscriptionAttribute.FLAG.IgnoreSaveDB);
+                DATA.Subscribe($"{lp}.CycledWafer",   () => _lpCycleCount.Keys.Contains(lp) ? _lpCycleWafer[lp]:0, SubscriptionAttribute.FLAG.IgnoreSaveDB);
+                DATA.Subscribe($"{lp}.CycleSetPoint", () => _lpCycleCount.Keys.Contains(lp) ? _lpCycleSP[lp]:0, SubscriptionAttribute.FLAG.IgnoreSaveDB);
+                DATA.Subscribe($"{lp}.Throughput",    () => _lpCycleCount.Keys.Contains(lp) ? _lpThroughput[lp]:0, SubscriptionAttribute.FLAG.IgnoreSaveDB);
             }
         }
 
@@ -907,6 +907,7 @@ namespace Venus_RT.Modules
             string preCleanRecipe = param.ContainsKey("PreCleanRecipeName") ? (string)param["PreCleanRecipeName"] : string.Empty;
             string postCleanRecipe = param.ContainsKey("PostCleanRecipeName") ? (string)param["PostCleanRecipeName"] : string.Empty;
 
+            int cycleNumber= param.ContainsKey("CycleNumber") ? (int)param["CycleNumber"] : 1;
             if (slotSequence.Length != SC.GetValue<int>("EFEM.LoadPort.SlotNumber"))
             {
                 reason = $"slot sequence parameter not valid, length is {slotSequence.Length}, should be {SC.GetValue<int>("EFEM.LoadPort.SlotNumber")}";
@@ -942,7 +943,9 @@ namespace Venus_RT.Modules
             cj.PreJobClean = preCleanRecipe;
             cj.PostJobClean = postCleanRecipe;
             cj.SequenceNameList = slotSequence;
-            cj.CycleNumber = SC.GetValue<int>("System.CycleCount");  // only for temperary debug
+            cj.CycleNumber = cycleNumber; // only for temperary debug
+
+            _lpCycleSP[ModuleHelper.Converter(module)] = cj.CycleNumber;
 
             Dictionary<string, bool[]> seqSlot = new Dictionary<string, bool[]>();
             Dictionary<string, List<Tuple<ModuleName, int>>> seqSlotWafers = new Dictionary<string, List<Tuple<ModuleName, int>>>();

+ 15 - 12
Venus/Venus_RT/Modules/TM/TMEntity.cs

@@ -260,11 +260,14 @@ namespace Venus_RT.Modules
             //AnyStateTransition(FSM_MSG.TIMER,   fnMonitor,      FSM_STATE.SAME); 
 
 
-            AnyStateTransition(MSG.Error, fnError, STATE.Error);
-            AnyStateTransition(MSG.Online, fnOnline, FSM_STATE.SAME);
-            AnyStateTransition(MSG.Offline, fnOffline, FSM_STATE.SAME);
-            AnyStateTransition(MSG.Home, fnHome, STATE.Initializing);
+            AnyStateTransition(MSG.Error,  fnError,   STATE.Error);
+            AnyStateTransition(MSG.Online, fnOnline,  FSM_STATE.SAME);
+            AnyStateTransition(MSG.Offline,fnOffline, FSM_STATE.SAME);
+            //AnyStateTransition(MSG.Home, fnHome, STATE.Initializing);
 
+            Transition(STATE.Init,  MSG.Home, fnHome,  STATE.Initializing);
+            Transition(STATE.Error, MSG.Home, fnHome,  STATE.Initializing);
+            Transition(STATE.Idle,  MSG.Home, fnHome,  STATE.Initializing);
 
             // Home
             Transition(STATE.Initializing, FSM_MSG.TIMER, fnHoming, STATE.Idle);
@@ -278,27 +281,27 @@ namespace Venus_RT.Modules
             //Transition(STATE.Init,              FSM_MSG.TIMER,      fnMonitor,          STATE.Init);
 
             // Vent sequence
-            Transition(STATE.Idle, MSG.Vent, FnStartVent, STATE.Venting);
+            Transition(STATE.Idle,    MSG.Vent,      FnStartVent, STATE.Venting);
             Transition(STATE.Venting, FSM_MSG.TIMER, FnVentTimeout, STATE.Idle);
-            Transition(STATE.Venting, MSG.Abort, FnAbortVent, STATE.Idle);
+            Transition(STATE.Venting, MSG.Abort,     FnAbortVent, STATE.Idle);
 
             // Pump sequence
-            Transition(STATE.Idle, MSG.Pump, FnStartPump, STATE.Pumping);
+            Transition(STATE.Idle,    MSG.Pump,      FnStartPump,   STATE.Pumping);
             Transition(STATE.Pumping, FSM_MSG.TIMER, FnPumpTimeout, STATE.Idle);
-            Transition(STATE.Pumping, MSG.Abort, FnAbortPump, STATE.Idle);
+            Transition(STATE.Pumping, MSG.Abort,     FnAbortPump,   STATE.Idle);
 
             // Purge sequence
-            Transition(STATE.Idle, MSG.Purge, FnStartPurge, STATE.Purging);
+            Transition(STATE.Idle,    MSG.Purge, FnStartPurge, STATE.Purging);
             Transition(STATE.Purging, FSM_MSG.TIMER, FnPurgeTimeout, STATE.Idle);
             Transition(STATE.Purging, MSG.Abort, FnAbortPurge, STATE.Idle);
 
             // Leak check sequence
-            Transition(STATE.Idle, MSG.LeakCheck, FnStartLeakCheck, STATE.Leakchecking);
+            Transition(STATE.Idle,         MSG.LeakCheck, FnStartLeakCheck, STATE.Leakchecking);
             Transition(STATE.Leakchecking, FSM_MSG.TIMER, FnLeakCheckTimeout, STATE.Idle);
             Transition(STATE.Leakchecking, MSG.Abort, FnAbortLeakCheck, STATE.Idle);
 
             // Pick wafer from LL sequence
-            Transition(STATE.Idle, MSG.Pick, FnStartPick, STATE.Picking);
+            Transition(STATE.Idle,    MSG.Pick, FnStartPick, STATE.Picking);
             Transition(STATE.Picking, FSM_MSG.TIMER, FnPickTimeout, STATE.Idle);
             Transition(STATE.Picking, MSG.Abort, FnAbortPick, STATE.Idle);
 
@@ -308,7 +311,7 @@ namespace Venus_RT.Modules
             Transition(STATE.Placing, MSG.Abort, FnAbortPlace, STATE.Idle);
 
             // Swap wafer with LL sequence
-            Transition(STATE.Idle, MSG.Swap, FnStartSwap, STATE.Swaping);
+            Transition(STATE.Idle,    MSG.Swap, FnStartSwap, STATE.Swaping);
             Transition(STATE.Swaping, FSM_MSG.TIMER, FnSwapTimeout, STATE.Idle);
             Transition(STATE.Swaping, MSG.Abort, FnAbortSwap, STATE.Idle);
 

+ 5 - 1
Venus/Venus_Themes/UserControls/NiceUIControls/NiceTMChamber.xaml

@@ -13,6 +13,8 @@
             </TransformGroup>
         </Viewbox.RenderTransform>
         <Canvas Width="200" Height="200">
+            
+
             <TextBlock Width="300" TextBlock.TextAlignment="Center" Canvas.Left="-50" Canvas.Top="-35" FontSize="26"  Background="Transparent">
                 <TextBlock.Text>
                     <MultiBinding StringFormat="{}{0}({1:F1}{2})">
@@ -58,7 +60,9 @@
 
                 </local:WaferCtrl>
             </Viewbox>
-           
+            <TextBlock Width="300" TextBlock.TextAlignment="Center" Canvas.Left="-51" Canvas.Top="0" FontSize="26"  Background="Transparent" Text="{Binding ElementName=tmChamber,Path=ChamberType}">
+
+            </TextBlock>
         </Canvas>
         
     </Viewbox>

+ 13 - 0
Venus/Venus_Themes/UserControls/NiceUIControls/NiceTMChamber.xaml.cs

@@ -70,5 +70,18 @@ namespace Venus_Themes.UserControls
                 this.SetValue(UnitProperty, value);
             }
         }
+
+
+        public static readonly DependencyProperty ChamberTypeProperty = DependencyProperty.Register(
+     "ChamberType", typeof(string), typeof(NiceTMChamber));
+
+        public string ChamberType
+        {
+            get { return (string)this.GetValue(ChamberTypeProperty); }
+            set
+            {
+                this.SetValue(ChamberTypeProperty, value);
+            }
+        }
     }
 }