Browse Source

refresh throughput on real time with sequential mode.

sangwq 8 months ago
parent
commit
af4c050881
1 changed files with 16 additions and 4 deletions
  1. 16 4
      Venus/Venus_RT/Modules/SystemDispatcher.cs

+ 16 - 4
Venus/Venus_RT/Modules/SystemDispatcher.cs

@@ -1937,15 +1937,27 @@ namespace Venus_RT.Modules
             if (lpCycleWafer != _lpCycleWafer[lp])
             {
                 _lpCycleWafer[lp] = lpCycleWafer;
-                if(_lpCycleCount[lp] > 0)
-                {
-                    _lpThroughput[lp] = (float)(lpCycleWafer /(DateTime.Now - cj.StartTime).TotalHours);
-                }
+                RefreshThroughput();
             }
 
             return cj.State == EnumControlJobState.Completed;
         }
 
+        void RefreshThroughput()
+        {
+            foreach(var cj in _lstControlJobs)
+            {
+                if(cj.State == EnumControlJobState.Executing)
+                {
+                    var lp = ModuleHelper.Converter(cj.Module);
+                    if (_lpCycleCount[lp] > 0)
+                    {
+                        _lpThroughput[lp] = (float)(_lpCycleWafer[lp] / (DateTime.Now - cj.StartTime).TotalHours);
+                    }
+                }
+            }
+        }
+
         private bool IsAllJobWaferProcessedOrProcessing(ControlJobInfo cj)
         {
             List<ModuleName> allModules = _dictModuleTask.Keys.ToList();