Browse Source

添加控压结束,保持一秒流气功能

lixiang 1 year ago
parent
commit
967f6b6b9c

+ 2 - 25
Venus/Venus_MainPages/ViewModels/EventViewModel.cs

@@ -215,7 +215,6 @@ namespace Venus_MainPages.ViewModels
 
         private void PageControl_CurrentPageChanged(int currentPage)
         {
-            CurrentPage = currentPage;
             PageChanged(currentPage);
         }
 
@@ -337,7 +336,7 @@ namespace Venus_MainPages.ViewModels
 
                         SearchedResult = new ObservableCollection<Aitex.Core.UI.View.Common.SystemLogItem>();
 
-                        this.view.pageControl.OnApplyTemplate();
+                        //this.view.pageControl.CurrentPage = 1;
 
                         string sqlEvent = "";
                         string sqlOperationLog = "";
@@ -492,22 +491,6 @@ namespace Venus_MainPages.ViewModels
                         if (!string.IsNullOrWhiteSpace(SearchKeyWords)) sqlEvent += string.Format(" and lower(\"description\") like '%{0}%' or lower(\"type\") like '%{1}%'", SearchKeyWords.ToLower(), SearchKeyWords.ToLower());
                     }
 
-                    if (SearchOpeLog)
-                    {
-                        //sqlOperationLog = string.Format(" SELECT \"UserName\" as \"Initiator\", 'UserOperation' as \"LogType\", \"Time\", \"ChamberId\" as \"TargetChamber\", \"Content\" as \"Description\" FROM \"OperationLog\" where \"Time\" >='{0}' and \"Time\" <='{1}' ", SearchBeginTime.ToString("yyyy/MM/dd HH:mm:ss"), SearchEndTime.ToString("yyyy/MM/dd HH:mm:ss"));
-
-                        //if (!SearchPMA) sqlOperationLog += string.Format(" and \"ChamberId\"<>'{0}' ", ChamberSet.ReactorA);
-                        //if (!SearchPMB) sqlOperationLog += string.Format(" and \"ChamberId\"<>'{0}' ", ChamberSet.ReactorB);
-                        //if (!SearchPMC) sqlOperationLog += string.Format(" and \"ChamberId\"<>'{0}' ", ChamberSet.ReactorC);
-                        //if (!SearchPMD) sqlOperationLog += string.Format(" and \"ChamberId\"<>'{0}' ", ChamberSet.ReactorD);
-                        //if (!SearchSystem) sqlOperationLog += string.Format(" and \"ChamberId\"<>'{0}' ", ChamberSet.System);                      
-                        //if (!SearchLL) sqlOperationLog += string.Format(" and \"ChamberId\"<>'{0}' ", ChamberSet.Loadlock);
-                        //if (!SearchTM) sqlOperationLog += string.Format(" and \"ChamberId\"<>'{0}' and \"ChamberId\"<>'{1}' and \"ChamberId\"<>'{2}' ",
-                        //    ChamberSet.Loadlock, ChamberSet.Buffer1, ChamberSet.Cooldown);
-                        //if (!string.IsNullOrWhiteSpace(SelectedUser) && SelectedUser != "不限") sqlOperationLog += string.Format(" and lower(\"UserName\")='{0}' ", SelectedUser.ToLower());
-
-                        //if (!string.IsNullOrWhiteSpace(SearchKeyWords)) sqlOperationLog += string.Format(" and lower(\"Content\") like '%{0}%' ", SearchKeyWords.ToLower());
-                    }
 
                     sql = sqlEvent;
 
@@ -526,7 +509,7 @@ namespace Venus_MainPages.ViewModels
                     
                     if (!string.IsNullOrEmpty(sql) && QueryDBEventFunc != null)
                     {
-                        sql += $" order by \"occur_time\" DESC limit {m_onePageCounts} offset ({(CurrentPage-1) * m_onePageCounts});";
+                        sql += $" order by \"occur_time\" DESC limit {m_onePageCounts} offset {(CurrentPage-1) * m_onePageCounts};";
 
                         List<EventItem> lstEvent = QueryDBEventFunc(sql);
 
@@ -562,11 +545,6 @@ namespace Venus_MainPages.ViewModels
                             }
                             RaisePropertyChanged("SearchedResult");
 
-                            //if (SearchedResult.Count >= 2000)
-                            //{
-                            //    //MessageBox.Show("Only display max 2000 items,reset the query condition", "query too many result", MessageBoxButton.OK, MessageBoxImage.Warning);
-                            //}
-
                         }));
                     }
                     else
@@ -580,7 +558,6 @@ namespace Venus_MainPages.ViewModels
                 }
                 catch (Exception ex)
                 {
-                    //LOG.Write(ex);
                     LOG.WriteExeption(ex);
                 }
             });

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

@@ -125,7 +125,7 @@
                         <TextBlock Text="" FlowDirection="LeftToRight" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" VerticalAlignment="Center"/>
                     </Border>-->
 
-                    <customeControl:Pagination Grid.Row="2" PageCount="{Binding PageCount,UpdateSourceTrigger=PropertyChanged}" CurrentPage="{Binding CurrentPage,UpdateSourceTrigger=PropertyChanged}" Height="30" x:Name="pageControl"/>
+                    <customeControl:Pagination Grid.Row="2" PageCount="{Binding PageCount,UpdateSourceTrigger=PropertyChanged}"  Height="30" x:Name="pageControl"/>
                 </StackPanel>
 
                 <DataGrid Grid.Row="1" Margin="0,5,0,0"

+ 4 - 5
Venus/Venus_RT/Devices/JetKepler2200APM.cs

@@ -992,13 +992,12 @@ namespace Venus_RT.Devices
             SetPVPressure(pressureSetpoint);
             return true;
         }
-        public override bool AbortControlPressure()
-        {
-            OpenValve(ValveType.Purge, false);
+        public async override Task<bool> AbortControlPressure()
+        {           
             OpenValve(ValveType.N2, false);
             OpenValve(ValveType.PVN22, false);
-
-
+            await Task.Delay(1000);
+            OpenValve(ValveType.Purge, false);
             return true;
         }
         public override bool HighTemperatureHeaterGotoPosition(HighTemperatureHeaterPosition highTemperatureHeaterPosition)

+ 4 - 5
Venus/Venus_RT/Devices/JetKepler2200BPM.cs

@@ -992,13 +992,12 @@ namespace Venus_RT.Devices
             SetPVPressure(pressureSetpoint);
             return true;
         }
-        public override bool AbortControlPressure()
-        {
-            OpenValve(ValveType.Purge, false);
+        public async override Task<bool> AbortControlPressure()
+        {           
             OpenValve(ValveType.N2, false);
             OpenValve(ValveType.PVN22, false);
-
-
+            await Task.Delay(1000);
+            OpenValve(ValveType.Purge, false);
             return true;
         }
         public override bool HighTemperatureHeaterGotoPosition(HighTemperatureHeaterPosition highTemperatureHeaterPosition)

+ 9 - 2
Venus/Venus_RT/Devices/JetKepler2300PM.cs

@@ -1133,10 +1133,11 @@ namespace Venus_RT.Devices
             SetPVPressure(pressureSetpoint);
             return true;
         }
-        public override bool AbortControlPressure()
+        public async override Task<bool> AbortControlPressure()
         {
-            OpenValve(ValveType.GasFinal, false);
             FlowGas(5, 0);
+            await Task.Delay(1000);
+            OpenValve(ValveType.GasFinal, false);
             return true;
         }
         public override bool PreparePlace()
@@ -1208,5 +1209,11 @@ namespace Venus_RT.Devices
         {
             return CheckSlitDoorClose();
         }
+
+        public override bool ControlPressureSwitchToProcess()
+        {
+            OpenValve(ValveType.Mfc6, false);
+            return true;
+        }
     }
 }

+ 6 - 1
Venus/Venus_RT/Devices/JetPMBase.cs

@@ -9,6 +9,7 @@ using Aitex.Core.RT.Device.Unit;
 using Venus_RT.Modules;
 using System;
 using Aitex.Core.RT.SCCore;
+using System.Threading.Tasks;
 
 namespace Venus_RT.Devices
 {
@@ -548,7 +549,7 @@ namespace Venus_RT.Devices
         {
             return false;
         }
-        public virtual bool AbortControlPressure()
+        public virtual async Task<bool> AbortControlPressure()
         {
             return false;
         }
@@ -585,5 +586,9 @@ namespace Venus_RT.Devices
         {
             return false;
         }
+        public virtual bool ControlPressureSwitchToProcess()
+        {
+            return true;
+        }
     }
 }

+ 9 - 1
Venus/Venus_RT/Modules/PMs/PMProcessRoutine.cs

@@ -20,6 +20,8 @@ namespace Venus_RT.Modules.PMs
     {
         private enum ProcessStep
         {
+            kControlPressureSwitchProcess,
+            kDelay_1s,
             kPreparePressure,
             kPrepareTemperature,
             kRunRecipes,
@@ -268,7 +270,9 @@ namespace Venus_RT.Modules.PMs
         }
         public RState Monitor()
         {
-            Runner.Run(ProcessStep.kPreparePressure, PreparePressure, IsPressureReady)
+          Runner
+                
+                .Run(ProcessStep.kPreparePressure, PreparePressure, IsPressureReady)
                 .Run(ProcessStep.kPrepareTemperature, PrepareTemp, IsTempReady)
                 .Run(ProcessStep.kRunRecipes, StartNewRecipe, RunRecipes, 5 * 60 * 60 * 1000)
                 .End(ProcessStep.kEnd, ProcessDone, _delay_1s);
@@ -276,6 +280,10 @@ namespace Venus_RT.Modules.PMs
             return Runner.Status;
         }
 
+        private bool ControlPressureSwitchProcess()
+        {
+            return _chamber.ControlPressureSwitchToProcess();
+        }
         private bool PreparePressure()
         {
             //2023/09/02 tps remove

+ 8 - 0
Venus/Venus_Themes/CustomControls/Pagination.cs

@@ -157,6 +157,10 @@ namespace Venus_Themes.CustomControls
         }
         private void BindClick()
         {
+            if (_btnPrev == null)
+            {
+                return;
+            }
             _btnPrev.Click += (s, e) => SetIndex(-1);
             _btnOne.Click += (s, e) => SetIndex(1 - CurrentPage);
             _btnDotPrev.Click += (s, e) => SetIndex(-3);
@@ -189,6 +193,10 @@ namespace Venus_Themes.CustomControls
 
         private void UpdateControl()
         {
+            if (_btnPrev == null)
+            {
+                return;
+            }
             _btnPrev.IsEnabled = CurrentPage > 1;
             _btnOne.Visibility = CurrentPage < 4 ? Visibility.Collapsed : Visibility.Visible;
             _btnDotPrev.Visibility = CurrentPage < 4 ? Visibility.Collapsed : Visibility.Visible;