Bladeren bron

1.调整wafer更新在wafermanager中使用独立线程
2.autotranfer在waferrobotfimstask中非空wafer增加是否是选中wafer的判断

huangping 3 weken geleden
bovenliggende
commit
f3cab9a06c

+ 14 - 11
FrameworkLocal/Common/SubstrateTrackings/WaferManager.cs

@@ -78,16 +78,6 @@ namespace MECF.Framework.Common.SubstrateTrackings
 
         public bool Serialize()
         {
-            if (_enableUpdateWafersNotify)
-            {
-                if (NeedUpdateModule.Any(r => r.Value))
-                {
-                    var modules = NeedUpdateModule.Where(r => r.Value).Select(r => r.Key).ToList();
-                    Singleton<EventManager>.Instance.UpdateWafers(modules);
-                    NeedUpdateModule.Clear();
-                }
-            }
-
             if (!_needSerialize) return true;
             _needSerialize = false;
             try
@@ -154,7 +144,20 @@ namespace MECF.Framework.Common.SubstrateTrackings
             //EV.Subscribe(new EventItem("Event", Event_STS_Unoccupied, "Substrate location state is Unoccupied."));
             //EV.Subscribe(new EventItem("Event", Event_STS_Occupied, "Substrate location state is occupied."));
             Deserialize();
-            _thread = new PeriodicJob(500, Serialize, $"SerializeMonitorHandler", true);
+            _thread = new PeriodicJob(1000, Serialize, $"SerializeMonitorHandler", true);
+            if (_enableUpdateWafersNotify)
+            {
+                var updatewafer = new PeriodicJob(500, () =>
+                {
+                    if (NeedUpdateModule.Any(r => r.Value))
+                    {
+                        var modules = NeedUpdateModule.Where(r => r.Value).Select(r => r.Key).ToList();
+                        Singleton<EventManager>.Instance.UpdateWafers(modules);
+                        foreach (var module in modules) NeedUpdateModule[module] = false;
+                    }
+                    return true;
+                }, "WaferUpDateNotifyHander", true);
+            }
         }
 
         public void SubscribeLocation(string module, int slotNumber)

+ 3 - 4
FrameworkLocal/Common/Utilities/BinarySerializer.cs

@@ -69,13 +69,12 @@ namespace MECF.Framework.Common.Utilities
                 }
 
                 IFormatter formatter = new BinaryFormatter();
-                Stream stream = new FileStream(pathName + @"\" + fileName + @".obj", FileMode.Create);
+             
                 try
                 {
-                    using (stream)
+                    using (Stream stream = new FileStream(pathName + @"\" + fileName + @".obj", FileMode.Create))
                     {
-                        formatter.Serialize(stream, stuff);
-                        stream.Close();
+                        formatter.Serialize(stream, stuff);     
                     }
                 }
                 catch (SerializationException e)

+ 2 - 2
FrameworkLocal/UIClient/ClientBase/ModuleDataMonitor.cs

@@ -109,7 +109,7 @@ namespace MECF.Framework.UI.Client.ClientBase
             }
             catch (Exception ex)
             {
-                LOG.Error(ex.Message);
+                LOG.Error("ModuleDataMonitor.OnTimer():"+ex.Message);
             }
 
             return true;
@@ -181,7 +181,7 @@ namespace MECF.Framework.UI.Client.ClientBase
             }
             catch (Exception ex)
             {
-                LOG.Error(ex.Message);    
+                LOG.Error("ModuleDataMonitor.OnTimer(modules):" + ex.Message);    
             }
         }
 

+ 2 - 0
Furnace/FurnaceRT/Equipments/Jobs/AutoTransfer.cs

@@ -2049,6 +2049,8 @@ namespace FurnaceRT.Equipments.Jobs
 
 
                                 pickSlot = wafers[i].OriginSlot;
+                                if (stockerInfo.Item3.Any() && !stockerInfo.Item3.Any(x => x == pickSlot))//非dummy类型要根据传入的slot按顺序取
+                                    continue;
                                 if (pickBlade == Hand.Both)
                                 {
                                     if (i < SC.GetValue<int>("System.CassetteSlotCount") - 4)