Browse Source

1.recipe报错后,工艺步数会停留在报错的步数
2.DataLog的倒序改成正序
3.wafer history修改根据lot id检索
4.Config的role配置read的时候,operation/overview页面的按钮页面置灰
5.LP error的时候,在不影响正常工艺的条件下,红灯变亮,蜂鸣器变响
6.buzzer off按钮只生效一下。蜂鸣器响,Buzzer off后,在不关闭软件的前提下,下次报错蜂鸣器会正常响
7.sequence 只勾PMA2出现wafer不进腔的bug,修改改bug
8.由offline切到online的时候判断气体和射频的状态,如果为on,则置位off
9.修改117错误给到开关门信号的问题,修改vent逻辑
10.更改原来打开CPU配置的时候,RT资源太大问题,使用WMI来监控CPU占用率以及Working set

JET-YDB\JET-YANGDB 1 month ago
parent
commit
fa35e26745

+ 31 - 0
FrameworkLocal/Common/Device/Bases/SignalTowerBase.cs

@@ -161,6 +161,7 @@ namespace MECF.Framework.Common.Device.Bases
         protected Dictionary<LightType, SignalLightBase> _lights = new Dictionary<LightType, SignalLightBase>();
 
         private bool _isBuzzerOff;
+        private Dictionary<string, bool> _buzzerOffByModule = new Dictionary<string, bool>();
 
         public SignalTowerBase( ) : base( )
         {
@@ -188,6 +189,26 @@ namespace MECF.Framework.Common.Device.Bases
         private bool SwitchOffBuzzer(string arg1, object[] arg2)
         {
             _isBuzzerOff = true;
+            if (_buzzerOffByModule == null) _buzzerOffByModule = new Dictionary<string, bool>();
+            _buzzerOffByModule.Clear();
+            foreach (var trigCondition in _config)
+            {
+                var conditionValue = DATA.Poll(trigCondition.Key);
+                if (conditionValue == null || !(conditionValue is bool))
+                    continue;
+
+                bool isTrig = (bool)conditionValue;
+                if (isTrig)
+                {
+                    foreach (LightType lightType in trigCondition.Value.Keys)
+                    {
+                        if (IsBuzzer(lightType) && trigCondition.Value[lightType] == TowerLightStatus.On)
+                        {
+                            _buzzerOffByModule[trigCondition.Key] = isTrig;
+                        }
+                    }
+                }
+            }
             return true;
         }
 
@@ -333,6 +354,16 @@ namespace MECF.Framework.Common.Device.Bases
                     continue;
 
                 bool isTrig = (bool)conditionValue;
+                foreach (var lightType in trigCondition.Value.Keys)
+                {
+                    if (isTrig)
+                    {
+                        _isBuzzerOff = (_isBuzzerOff && IsBuzzer(lightType) && trigCondition.Value[lightType] == TowerLightStatus.On &&
+                            _buzzerOffByModule != null && !_buzzerOffByModule.ContainsKey(trigCondition.Key)) ? false : _isBuzzerOff;
+                    }
+                    else if (_buzzerOffByModule.ContainsKey(trigCondition.Key) && IsBuzzer(lightType))
+                        _buzzerOffByModule.Remove(trigCondition.Key);
+                }
                 if (isTrig)
                 {
                     foreach (LightType lightType in trigCondition.Value.Keys)

+ 3 - 0
FrameworkLocal/UIClient/ClientBase/BaseModel.cs

@@ -18,6 +18,8 @@ namespace MECF.Framework.UI.Client.ClientBase
         private int permission = 0;
         private int token = 0;
 
+        public bool PageEnabled { get; set; } = true;
+
         public int Permission
         {
             get { return this.permission; }
@@ -51,6 +53,7 @@ namespace MECF.Framework.UI.Client.ClientBase
 
         protected override void OnActivate()
         {
+            PageEnabled = Permission == 3;
             base.OnActivate();
          }
 

+ 7 - 1
FrameworkLocal/UIClient/ClientViews/DataLogs/Event/EventViewModel.cs

@@ -586,7 +586,13 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.Event
 
                 if (!string.IsNullOrWhiteSpace(SearchKeyWords)) sqlEvent += string.Format(" and lower(\"description\") like '%{0}%' ", SearchKeyWords.ToLower());
 
-                sqlEvent += $" order by \"occur_time\" DESC limit {_countPerPage} offset {(_currentPage - 1) * _countPerPage};";
+                if (_currentPage < 1)
+                    _currentPage = 1;
+
+                if (_currentPage > _totalPage)
+                    _currentPage = _totalPage;
+
+                sqlEvent += $" order by \"occur_time\" ASC limit {_countPerPage} offset {(_currentPage - 1) * _countPerPage};";
 
                 _resultEvent.AddRange(QueryDBEventFunc(sqlEvent));
             }

+ 16 - 0
JetVirgoPM/Devices/JetDualPM.cs

@@ -1489,6 +1489,22 @@ namespace JetVirgoPM.Devices
             _trigBasePressure.RST = true;
             _trigBaseTemperature1.RST = true;
         }
+        public bool CloseAllGenerator()
+        {
+            if (IsGenerator1ON) Generator1PowerOn(false);
+            if (IsGenerator2ON) Generator2PowerOn(false);
+            if (IsGeneratorONBias1) GeneratorBias1PowerOn(false);
+            if (IsGeneratorONBias2) GeneratorBias2PowerOn(false);
+            return true;
+        }
+        public bool CloseAllGasValve()
+        {
+            var iovalves = new IoValve[] {
+                _N2Valve,_ProcessValve,_PurgeValve,_FastVentValve,_Mfc1Valve,_Mfc2Valve,_Mfc3Valve,_Mfc4Valve,_Mfc5Valve,_Mfc6Valve
+            }.Where(p=>p.Status);
+            Array.ForEach(iovalves.ToArray(), p => p.TurnValve(false, out _));
+            return true;
+        }
     }
 
     /// <summary>

+ 9 - 1
JetVirgoPM/PMs/PMModule.cs

@@ -248,7 +248,8 @@ namespace JetVirgoPM.PMs
         {
             get
             {
-                if ((FsmState == (int)STATE.Processing) || (FsmState == (int)STATE.PostProcess))
+                if ((FsmState == (int)STATE.Processing) || (FsmState == (int)STATE.PostProcess) || 
+                    ((FsmPreviousState == (int)STATE.Processing || FsmPreviousState == (int)STATE.PostProcess) && FsmState == (int)STATE.Error))
                 {
                     return _processRoutine.CurStepNum + 1;
                 }
@@ -1128,6 +1129,13 @@ namespace JetVirgoPM.PMs
 
         private bool FnSetOnline(object[] param)
         {
+            if (FsmState != (int)STATE.Idle)
+            {
+                EV.PostWarningLog(Module.ToString(), $"{Module} is in {(STATE)FsmState},can not do SetOnline");
+                return false;
+            }
+            _chamber.CloseAllGenerator();
+            _chamber.CloseAllGasValve();
             IsOnline = true;
             return true;
         }

+ 14 - 18
JetVirgoPM/PMs/Routines/PMPrepareTransferRoutine.cs

@@ -186,31 +186,27 @@ namespace JetVirgoPM.PMs.Routines
 
         bool Vent()
         {
-            if(!SC.IsATMMode && _chamber.IsSlitDoor1Closed && _chamber.IsSlitDoor2Closed)
+            _isVented = SC.IsATMMode || _chamber.CheckSlitDoor1Open() || _chamber.CheckSlitDoor2Open();
+            if (!_isVented)
             {
-                _isVented = _ventRoutine.Start() == RState.End;
-                return _ventRoutine.Start() == RState.Running || _isVented;
+                var status = _ventRoutine.Start();
+                _isVented = status == RState.End;
+                if (!_isVented) return status == RState.Running;
             }
-            return true;
+            return _isVented;
         }
         bool CheckVent()
         {
-            if (!SC.IsATMMode && _chamber.IsSlitDoor1Closed && _chamber.IsSlitDoor2Closed && !_isVented)
+            if (_isVented) return true;
+            var status = _ventRoutine.Monitor();
+            if (status == RState.End)
+                return true;
+            else if (status == RState.Failed || status == RState.Timeout)
             {
-                var status = _ventRoutine.Monitor();
-                if (status == RState.End)
-                {
-                    return true;
-                }
-                else if (status == RState.Failed || status == RState.Timeout)
-                {
-                    Runner.Stop($"Vent failed.");
-                    return true;
-                }
-
-                return false;
+                Runner.Stop($"Vent failed.");
+                return true;
             }
-            return true;
+            return false;
         }
 
         bool SetCoolant1Temp()

+ 2 - 2
Mars/EfemDualRT/Properties/AssemblyInfo.cs

@@ -51,5 +51,5 @@ using System.Windows;
 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
 //通过使用 "*",如下所示:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.9")]
-[assembly: AssemblyFileVersion("1.0.0.9")]
+[assembly: AssemblyVersion("1.0.0.10")]
+[assembly: AssemblyFileVersion("1.0.0.10")]

+ 22 - 59
Mars/EfemDualRT/Resources/ResourceMonitor.cs

@@ -53,8 +53,6 @@ namespace EfemDualRT.Resources
         private PerformanceCounter _transferDisk;
         private PeriodicJob _thread;
         private bool _isTerminate;
-        private Queue<PerformanceCounter> _pcCounterPool;
-        private Dictionary<string, PerformanceCounter> _curMonitorPCCounter = new Dictionary<string, PerformanceCounter>();
         public ResourceMonitor()
         {
 
@@ -97,11 +95,6 @@ namespace EfemDualRT.Resources
                 _writeDisk = new PerformanceCounter("PhysicalDisk", "Avg. Disk sec/Write", "_Total");
                 _transferDisk = new PerformanceCounter("PhysicalDisk", "Avg. Disk sec/Transfer", "_Total");
                 CpuOccupied = new PerformanceCounter("Processor", "% Processor Time", "_Total");
-                _pcCounterPool = new Queue<PerformanceCounter>(Process.GetProcesses().Length * 3);
-                for(int i=0; i < Process.GetProcesses().Length * 3; i++)
-                {
-                    _pcCounterPool.Enqueue(new PerformanceCounter("Process", "% Processor Time"));
-                }
                 _thread = new PeriodicJob(checkInterval, GetProcessInfo, "ResourceMonitor", true);
             }
             return true;
@@ -120,7 +113,6 @@ namespace EfemDualRT.Resources
         public void InitNetAdapter()
         {
             _netAdapterNames.Clear();
-            _curMonitorPCCounter.Clear();
             NetworkInterface.GetAllNetworkInterfaces().ToList().ForEach(p => {
                 var name = p.Description.Replace('(', '[').Replace(')', ']');
                 var list = new PerformanceCounter[2];
@@ -143,7 +135,6 @@ namespace EfemDualRT.Resources
                 if (_isTerminate) return true;
                 string rtmonoitor = process_use(processRTname);
                 string uimonoitor = process_use(processUIname);
-                set_cpu_counter_byprocess();
 
                 string systemMonitor = $"PC => {drive_use()}" +
                     $"{cpu_use()}{cpu_use_byprocess()}" +
@@ -171,49 +162,6 @@ namespace EfemDualRT.Resources
             return true;
         }
 
-        private void set_cpu_counter_byprocess()
-        {
-            var curProccessList = Process.GetProcesses().Where(p => p.ProcessName.ToLower() != "Idle".ToLower()).Select(p => p.ProcessName + "_" + p.Id).ToList();
-            if (curProccessList != null && curProccessList.Count() > 0)
-            {
-                var delCounter = _curMonitorPCCounter.Keys.Where(p => !curProccessList.Contains(p)).ToList();
-                var newCounter = curProccessList.Where(p => !_curMonitorPCCounter.Keys.Contains(p));
-                if (delCounter != null && delCounter.Count() > 0)
-                {
-                    delCounter.ForEach(p =>
-                    {
-                        if (_curMonitorPCCounter.ContainsKey(p))
-                        {
-                            var idleCounter = _curMonitorPCCounter[p];
-                            if (idleCounter != null)
-                            {
-                                _pcCounterPool.Enqueue(idleCounter);
-                            }
-                            _curMonitorPCCounter.Remove(p);
-                        }
-                    });
-                }
-                if (_pcCounterPool.Count <= newCounter.Count())
-                {
-                    var pcCounter = _curMonitorPCCounter.Values;
-                    foreach (var item in _curMonitorPCCounter.Values)
-                    {
-                        _pcCounterPool.Enqueue(item);
-                    }
-                    _curMonitorPCCounter.Clear();
-                }
-                curProccessList.ForEach(p =>
-                {
-                    if (!_curMonitorPCCounter.ContainsKey(p) && _pcCounterPool.Count > 0)
-                    {
-                        var pcCounter = _pcCounterPool.Dequeue();
-                        var processName = p.Split('_')[0];
-                        _curMonitorPCCounter[p] = new PerformanceCounter("Process", "% Processor Time", processName);
-                    }
-                });
-            }
-        }
-
         //process
         private string process_use(string processname)
         {
@@ -285,18 +233,20 @@ namespace EfemDualRT.Resources
         private string cpu_use_byprocess()
         {
             StringBuilder sb = new StringBuilder();
-            foreach (var item in _curMonitorPCCounter)
+            ManagementObjectCollection moc1 = ExecSearch("SELECT * FROM Win32_PerfFormattedData_PerfProc_Process");
+            if (moc1 != null)
             {
-                try
+                foreach (ManagementObject mo1 in moc1)
                 {
-                    var cupUsage = item.Value.NextValue() / Environment.ProcessorCount;
-                    if (cupUsage > 1)
+                    var pid = Convert.ToInt64(mo1.Properties["IDProcess"].Value.ToString());
+                    var name = mo1.Properties["Name"].Value.ToString();
+                    var workingSet = Convert.ToSingle(mo1.Properties["WorkingSet"].Value.ToString()) / (1024 * 1024);
+                    var percentProcessorTime = Convert.ToSingle(mo1.Properties["PercentProcessorTime"].Value.ToString()) / Environment.ProcessorCount;
+                    if (percentProcessorTime > 1 || workingSet > 200)
                     {
-                        sb.Append($" {item.Key}:{cupUsage:F2}%\t");
+                        sb.Append($"{name}_{pid} CPU:{percentProcessorTime:F2} % WorkingSet:{workingSet:F2} MB ");
                     }
                 }
-                catch (Exception ex)
-                { }
             }
             return sb.Length > 0 ? $" detail:[{sb.ToString()}] " : string.Empty;
         }
@@ -372,6 +322,19 @@ namespace EfemDualRT.Resources
             return MemoryUsedRate.HasValue ? Convert.ToDouble(MemoryUsedRate * 100) : 0;
         }
 
+        private static ManagementObjectCollection ExecSearch(string command)
+        {
+            try
+            {
+                ObjectQuery objQuery = new ObjectQuery(command);
+                return new ManagementObjectSearcher(objQuery).Get();
+            }
+            catch (Exception ex)
+            {
+                LOG.Error($"ExecSearch exception:{ex}");
+            }
+            return null;
+        }
 
         #region 单位转换进制
 

+ 1 - 1
Mars/EfemDualSchedulerLib/AutoTransfer.cs

@@ -3570,7 +3570,7 @@ namespace EfemDualSchedulerLib
                             foreach(var targetSlot in targetSlots.Keys)
                             {
                                 if (WaferManager.Instance.CheckNoWafer(schedulerPm.Module, targetSlot) && 
-                                    CheckCanPlaceWaferToPM(schedulerPm.Module, 0, WaferManager.Instance.GetWafer(ModuleName.TMRobot, (int)placeBlade)) && 
+                                    CheckCanPlaceWaferToPM(schedulerPm.Module, targetSlot, WaferManager.Instance.GetWafer(ModuleName.TMRobot, (int)placeBlade)) && 
                                     !targetSlots[targetSlot])
                                 {
                                     if (GetWaferTemperatureSetInRecipe(ModuleName.TMRobot, (int)placeBlade, ModuleName.PMA, out double temp1, out double temp2))

+ 2 - 2
Mars/EfemDualUI/Properties/AssemblyInfo.cs

@@ -51,5 +51,5 @@ using System.Windows;
 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
 //通过使用 "*",如下所示:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.9")]
-[assembly: AssemblyFileVersion("1.0.0.9")]
+[assembly: AssemblyVersion("1.0.0.10")]
+[assembly: AssemblyFileVersion("1.0.0.10")]

+ 1 - 1
Mars/EfemDualUI/Views/History/WaferHistory/WaferHistoryDBViewModel.cs

@@ -262,7 +262,7 @@ namespace EfemDualUI.Views.History.WaferHistory
             string sql = $"SELECT ld.*,waferData.lot_id FROM lot_data ld INNER JOIN ({waferSql}) waferData ON ld.guid = waferData.guid WHERE ld.start_time>='{from:yyyy/MM/dd HH:mm:ss.fff}' AND ld.start_time<='{to:yyyy/MM/dd HH:mm:ss.fff}'  ";
 
             if (!string.IsNullOrWhiteSpace(key))
-                sql += $" and lower(ld.name) like '%{key.ToLower()}%'";
+                sql += $" and lower(waferData.lot_id) like '%{key.ToLower()}%'";
 
             sql += "order by \"start_time\" ASC;";
 

+ 1 - 1
Mars/EfemDualUI/Views/Operations/Overviews/EfemDualView.xaml

@@ -13,7 +13,7 @@
              xmlns:controls="clr-namespace:EfemDual.Client.Models.Controls"
              xmlns:unitControls="clr-namespace:MECF.Framework.UI.Client.Ctrlib.UnitControls;assembly=MECF.Framework.UI.Client"
              xmlns:singleArmRobot1="clr-namespace:MECF.Framework.UI.Client.ClientControls.RobotControls.SingleArmRobot1;assembly=MECF.Framework.UI.Client"
-             mc:Ignorable="d" 
+             mc:Ignorable="d" IsEnabled="{Binding PageEnabled}"
              d:DesignHeight="800" d:DesignWidth="1900">
     <UserControl.Resources>
         <converters:BoolAndMutiConverter x:Key="BoolAndMutiConverter"/>

+ 1 - 0
Mars/JetEfem/LPs/LoadPortModule.cs

@@ -223,6 +223,7 @@ namespace JetEfemLib.LPs
 
                 return _jobDone;
             });
+            DATA.Subscribe($"{Module}.IndicatorError", () => IsError, SubscriptionAttribute.FLAG.IgnoreSaveDB);
         }
 
         private void InitOp()