Quellcode durchsuchen

add X12 Update to X8

chenzk vor 1 Monat
Ursprung
Commit
8324f5d834

+ 45 - 7
CyberX8_MainPages/ViewModels/MaterialMovementViewModel.cs

@@ -509,7 +509,34 @@ namespace CyberX8_MainPages.ViewModels
                 _timer.Stop();
             }
         }
-        
+        /// <summary>
+        /// 判断转移wafershuttle信息时fromLoaction的模块是否处于error
+        /// </summary>
+        /// <param name="fromLocation"></param>
+        /// <returns></returns>
+        private bool IsTransferFromLoactionModuleError(string fromLocation)
+        {
+            if (fromLocation.StartsWith("Buffer"))
+            {
+                return false;
+            }
+            if (fromLocation == "Loader")
+            {
+                fromLocation = "Loader1";
+            }
+            List<string> DataKeys = new List<string>();
+            DataKeys.Add($"{fromLocation}.IsError");
+            Dictionary<string, object> tmpData = QueryDataClient.Instance.Service.PollData(DataKeys);
+            if (tmpData != null)
+            {
+                bool isModuleError = CommonFunction.GetValue<bool>(tmpData, $"{fromLocation}.IsError");
+                if (isModuleError)
+                {
+                    return true;
+                }
+            }
+            return false;
+        }
         #region 命令方法
         private void UpdateLocationAction(object param)
         {
@@ -517,13 +544,24 @@ namespace CyberX8_MainPages.ViewModels
             if (waferHolderInfo == null) return;
             if (!string.IsNullOrEmpty(FromLocation) && !string.IsNullOrEmpty(ToLocation))
             {
-                if (!_isLoaderTransBusy && !_isProcessTransBusy && !_isAutoMode)
-                {
-                    InvokeClient.Instance.Service.DoOperation($"WaferHolder.TransferWaferHolder", $"{FromLocation}", $"{ToLocation}");
-                }
-                else if (_isAutoMode)
+                if (!_isLoaderTransBusy && !_isProcessTransBusy)
                 {
-                    MessageBox.Show("Auto mode can't do this operation", "Update", MessageBoxButton.OK, MessageBoxImage.Error);
+                    if (!_isAutoMode) //不是自动模式可以直接转移wafershuttle信息
+                    {
+                        InvokeClient.Instance.Service.DoOperation($"WaferHolder.TransferWaferHolder", $"{FromLocation}", $"{ToLocation}");
+                    }
+                    if(_isAutoMode) 
+                    {
+                        if (IsTransferFromLoactionModuleError(FromLocation)) //自动模式并且源模块为error状态也能转移
+                        {
+                            InvokeClient.Instance.Service.DoOperation($"WaferHolder.TransferWaferHolder", $"{FromLocation}", $"{ToLocation}");
+                        }
+                        else 
+                        {
+                            MessageBox.Show("Auto mode can't do this operation when fromLoaction Moudule not in error", "Update", MessageBoxButton.OK, MessageBoxImage.Error);
+                        }
+
+                    }     
                 }
                 else
                 {

+ 1 - 1
CyberX8_RT/Modules/EFEM/EfemHomeRoutine.cs

@@ -111,7 +111,7 @@ namespace CyberX8_RT.Modules.EFEM
         private bool CheckVacuumIsValid()
         {
             EfemEntity efemEntity = Singleton<RouteManager>.Instance.EFEM;
-            double vacuumValue=efemEntity.VacuumValue;
+            double vacuumValue = efemEntity.VacuumValue;
             bool result = vacuumValue < _chuckVacuumIsValid;
             if (!result)
             {

+ 45 - 1
CyberX8_RT/Modules/Metal/MetalEntity.cs

@@ -120,6 +120,18 @@ namespace CyberX8_RT.Modules.Metal
         /// 当前完成recipe次数
         /// </summary>
         private int _currentCycleTimes;
+        /// <summary>
+        /// 当前recipe是否完成
+        /// </summary>
+        private bool _isCurrentReceipeComplete;
+        /// <summary>
+        ///  当前wafershuttle开始浸泡时间
+        /// </summary>
+        private DateTime _currentWaferShuttleStartSoakTime;
+        /// <summary>
+        /// Wafershuttle最大浸泡时间
+        /// </summary>
+        private int _waferShuttleSoakMaxTime;
         #endregion
 
         #region 属性
@@ -250,7 +262,10 @@ namespace CyberX8_RT.Modules.Metal
             _metalItem = MetalItemManager.Instance.GetMetalItem(Module.ToString());
 
             _reservoirName = ReservoirItemManager.Instance.GetReservoirByMetal(Module.ToString());
-            _reservoirDevice = DEVICE.GetDevice<StandardHotReservoirDevice>($"{_reservoirName}"); 
+            _reservoirDevice = DEVICE.GetDevice<StandardHotReservoirDevice>($"{_reservoirName}");
+
+            _isCurrentReceipeComplete = false;
+            _waferShuttleSoakMaxTime = SC.GetValue<int>($"Metal.WaferShuttleSoakMaxTime");
         }
         /// <summary>
         /// 初始化Routine
@@ -319,6 +334,7 @@ namespace CyberX8_RT.Modules.Metal
             Transition(MetalState.Idle, MetalMsg.RunRecipe, RunRecipe, MetalState.RunReciping);
             Transition(MetalState.WaitForRunRecipe, MetalMsg.RunRecipe, RunRecipe, MetalState.RunReciping);
             Transition(MetalState.RunReciping, FSM_MSG.TIMER, RunRecipeMonitor, MetalState.Idle);
+            Transition(MetalState.Idle, FSM_MSG.TIMER, MetalCompleteSoakTimeMonitor, MetalState.Idle);
             Transition(MetalState.RunReciping, MetalMsg.Abort, AbortRecipe, MetalState.Abort);
 
             //Current Short Test
@@ -395,6 +411,32 @@ namespace CyberX8_RT.Modules.Metal
             DATA.Subscribe($"{Module}.AnodeBWafers.WarningLimit", () => SC.GetValue<int>($"Metal.{Module}.AnodeBTotalWafersWarningLimit"), SubscriptionAttribute.FLAG.IgnoreSaveDB);
             DATA.Subscribe($"{Module}.AnodeBWafers.FaultLimit", () => SC.GetValue<int>($"Metal.{Module}.AnodeBTotalWafersFaultLimit"), SubscriptionAttribute.FLAG.IgnoreSaveDB);
         }
+
+        /// Metal完成recipe后监控wafershuttle浸泡时间
+        /// </summary>
+        /// <param name="param"></param>
+        /// <returns></returns>
+        private bool MetalCompleteSoakTimeMonitor(object[] param)
+        {
+            if (WaferHolderInfo != null)
+            {
+                double sockSeconds = (DateTime.Now - _currentWaferShuttleStartSoakTime).TotalSeconds;
+                if (_isCurrentReceipeComplete && sockSeconds > _waferShuttleSoakMaxTime * 60)
+                {
+                    if (!AlarmListManager.Instance.IsContainDataWarn(Module.ToString(), "MetalSockTime"))
+                    {
+                        AlarmListManager.Instance.AddWarn(Module.ToString(),
+                           $"MetalSockTime", $"Current waferShuttle:{WaferHolderInfo.Id} sock time is over waferShuttleSoakMaxTime:{_waferShuttleSoakMaxTime} minutes");
+                        LOG.WriteLog(eEvent.WARN_METAL, Module.ToString(), $"Current waferShuttle:{WaferHolderInfo.Id} sock time is over waferShuttleSoakMaxTime:{_waferShuttleSoakMaxTime} minutes");
+                    }
+                }
+            }
+            else
+            {
+                _isCurrentReceipeComplete = false;  //wafershuttle拿走后重置当前recipe是否完成变量
+            }
+            return true;
+        }
         /// <summary>
         /// 进入错误状态
         /// </summary>
@@ -645,6 +687,8 @@ namespace CyberX8_RT.Modules.Metal
                         resDevice.SetExportCMMUsage();
                     }
                     WaferHolderInfo.LastMetalRecipeCompleteTime = DateTime.Now;
+                    _isCurrentReceipeComplete = true;
+                    _currentWaferShuttleStartSoakTime = DateTime.Now;
                 }
                 _runrecipeElapsedTime = 0;
 

+ 4 - 0
CyberX8_Setup/CyberX8_RT.iss

@@ -38,6 +38,10 @@ Source: "..\CyberX8_RT\bin\Release\Config\*"; Excludes:"*.data,*.bak";DestDir: "
 Source: "..\CyberX8_RT\bin\Release\Config\DBModel.sql"; DestDir: "{app}\Config";
 Source: "..\CyberX8_RT\bin\Release\Config\System.sccfg"; DestDir: "{app}\Config";
 
+Source: "..\CyberX8_RT\bin\Release\{#MyAppName}.exe"; DestDir: "{app}"; Flags: ignoreversion overwritereadonly confirmoverwrite
+
+Source: "..\CyberX8_RT\bin\Release\*.dll"; DestDir: "{app}"; Flags: ignoreversion overwritereadonly
+
 
 [Icons]
 Name: "{userdesktop}\{#MyAppName}";Filename: "{app}\{#MyAppName}.exe"; WorkingDir: "{app}"

+ 3 - 0
CyberX8_Setup/CyberX8_UI.iss

@@ -36,6 +36,9 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
 Source: "..\CyberX8_UI\bin\Release\*";Excludes:"Config,{#MyAppName}.exe.config"; DestDir: "{app}"; Flags: recursesubdirs createallsubdirs
 Source: "..\CyberX8_UI\bin\Release\Config\*"; DestDir: "{app}\Config"; Flags: onlyifdoesntexist
 Source: "..\CyberX8_UI\bin\Release\{#MyAppName}.exe.config"; DestDir: "{app}"; Flags: onlyifdoesntexist
+Source: "..\CyberX8_UI\bin\Release\{#MyAppName}.exe"; DestDir: "{app}"; Flags: ignoreversion overwritereadonly confirmoverwrite
+Source: "..\CyberX8_UI\bin\Release\*.dll"; DestDir: "{app}"; Flags: ignoreversion overwritereadonly
+
 
 [Icons]
 Name: "{userdesktop}\{#MyAppName}";Filename: "{app}\{#MyAppName}.exe"; WorkingDir: "{app}"

+ 2 - 0
CyberX8_Simulator/Devices/WagoSocketSimulator.cs

@@ -404,6 +404,8 @@ namespace CyberX8_Simulator.Devices
             }
             
             //设置IO变量默认值
+            if (AINameIndexDic.ContainsKey("r_EFEM_VACUUM")) AIShorts[AINameIndexDic["r_EFEM_VACUUM"]] = 0x3A98;
+            
             if (AINameIndexDic.ContainsKey("r_LoaderA_LS_Vacuum_anlg")) AIShorts[AINameIndexDic["r_LoaderA_LS_Vacuum_anlg"]] = 0x32C8;
             if (AINameIndexDic.ContainsKey("r_LoaderB_LS_Vacuum_anlg")) AIShorts[AINameIndexDic["r_LoaderB_LS_Vacuum_anlg"]] = 0x32C8;
             if (AINameIndexDic.ContainsKey("r_DPUF_A_CHUCK_A_VAC")) AIShorts[AINameIndexDic["r_DPUF_A_CHUCK_A_VAC"]] = 0x32C8;

+ 11 - 0
Framework/Common/Alarm/AlarmListManager.cs

@@ -255,6 +255,17 @@ namespace MECF.Framework.Common.Alarm
             result = _moduleDataItemWarnDictionary.ContainsKey($"{module}.{dataItem}");
             return result;
         }
+        /// 判断是否存在Warning
+        /// </summary>
+        /// <param name="module"></param>
+        /// <param name="dataItem"></param>
+        /// <returns></returns>
+        public bool IsContainDataWarn(string module, string dataItem)
+        {
+            bool result = false;
+            result = _moduleDataItemWarnDictionary.ContainsKey($"{module}.{dataItem}");
+            return result;
+        }
         /// <summary>
         /// 清除所有报警
         /// </summary>