Browse Source

fix bugs for WaferOffset

zhouhr 1 year ago
parent
commit
0ed42d17d1

+ 3 - 3
Venus/Framework/Common/DBCore/OffsetDataRecorder.cs

@@ -78,11 +78,11 @@ namespace MECF.Framework.Common.DBCore
         public static List<OffsetItem> QueryOffsetDataByTime(string moduleName, DateTime from_time, DateTime to_time)
         {
             List<OffsetItem> result = new List<OffsetItem>();
-            string sql = string.Format($"SELECT * FROM \"offset_data\" WHERE \"start_time\" >= '{from_time}' AND \"start_time\" <= '{to_time}' AND \"destination_module\" = '{moduleName}' ");
+            string sql = string.Format($"SELECT * FROM \"offset_data\" WHERE \"start_time\" >= '{from_time.ToString("yyyy/MM/dd HH:mm:ss.fff")}' AND \"start_time\" <= '{to_time.ToString("yyyy/MM/dd HH:mm:ss.fff")}' AND \"destination_module\" = '{moduleName}' ");
             DataSet ds = DB.ExecuteDataset(sql);
-            if (ds == null)
+            if (ds == null || ds.Tables.Count == 0)
                 return result;
-
+            
             for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
             {
                 result.Add(new OffsetItem()

+ 1 - 1
Venus/Venus_RT/Devices/TM/SIASUNRobot.cs

@@ -701,7 +701,6 @@ namespace Venus_RT.Devices
                         if (msg.Contains("_ERR"))
                             ErrorMessageHandler(_rex_error_code.Match(revMsg.Trim()).Value);
 
-                    _currentOP = OPStep.Idle;
                     _status = RState.Failed;
                 }
             }
@@ -730,6 +729,7 @@ namespace Venus_RT.Devices
             }
             else if(!_HasReceiveMsg)
             {
+                _status = RState.Failed;
                 LOG.Write(eEvent.ERR_TM_ROBOT, ModuleName.TMRobot, $"The awc parameter format returned by TM Robot is incorrect! Raw Data:{revMsg}");
             }
         }

+ 4 - 4
Venus/Venus_RT/Modules/ResourceMonitor.cs

@@ -143,8 +143,8 @@ namespace Venus_RT.Modules
         {
             try
             {
-                string rtmonoitor = process_use(processUIname);
-                string uimonoitor = process_use(processRTname);
+                string rtmonoitor = process_use(processRTname);
+                string uimonoitor = process_use(processUIname); 
 
                 string systemMonitor = $"PC => {drive_use()}" +
                     $"{cpu_use()}" +
@@ -152,8 +152,8 @@ namespace Venus_RT.Modules
 
                 LOG.Write(eEvent.INFO_WINRESOURCE, ModuleName.System,
                     rtmonoitor +
-                    ' ' * 56 + uimonoitor +
-                    ' ' * 56 + systemMonitor
+                    " ".PadLeft(56, ' ') + uimonoitor +
+                    " ".PadLeft(56, ' ') + systemMonitor
                 );
                 //没有就不做任何操作
 

+ 2 - 2
Venus/Venus_Simulator/Devices/TMSimulatorServer.cs

@@ -34,8 +34,8 @@ namespace Venus_Simulator.Devices
 
             if (str.Contains("RQ WAF_CEN DATA"))
             {
-                string t = new Random().Next(-50000, 50000).ToString().PadLeft(6, '0');
-                string r = new Random().Next(-50000, 50000).ToString().PadLeft(6, '0');
+                string t = new Random().Next(0,359).ToString().PadLeft(6, '0');
+                string r = new Random().Next(0, 50000).ToString().PadLeft(6, '0');
                 OnWriteMessage($"WAF_CEN RT 000000 000000 000000 000000 LFT 000000 000000 000000 000000 OFFSET {r} {t}");
                 OnWriteMessage("_RDY");
             }