Bladeren bron

Merge branch 'master' into dev20250219_MES开发

WIN-GH9CEESPLTB\Administrator 1 maand geleden
bovenliggende
commit
d6f7851033
1 gewijzigde bestanden met toevoegingen van 18 en 7 verwijderingen
  1. 18 7
      MainForm/FaForm/Form_Home.cs

+ 18 - 7
MainForm/FaForm/Form_Home.cs

@@ -1902,6 +1902,7 @@ namespace MainForm
                                     {
                                         ProgressState = true;
                                         Task.Run(() => S1出站(plcNo, stationNameStr, stPLC_MesData, tagBaseName + "." + tagMesCommName, stationCode, stationName, out ProgressState));
+                                        stPLC_MesData.mesCommFrmPLC.cmd = 0;//清除入站申请
                                     }
                                 }
                             }
@@ -1912,7 +1913,7 @@ namespace MainForm
                             string str = ex.StackTrace;
                             AddMessage_Station(stationNameStr, LogType.Error, $"PLC{plcNo}_{stationNameStr} 上料进站出错!错误信息:" + ex.Message + "异常位置:" + str.Substring(str.LastIndexOf("\\") + 1, str.Length - str.LastIndexOf("\\") - 1));
                         }
-                        #endregion 
+                        #endregion 
 
 
                         UpdatePLCMonitor(1, plcNo, 1);  // 更新PLC状态的UI  // 更新PLC状态的UI
@@ -2194,6 +2195,7 @@ namespace MainForm
                                     {
                                         ProgressState = true;
                                         Task.Run(() => S2出站(plcNo, stationNameStr, stPLC_MesData, tagBaseName + "." + tagMesCommName, stationCode, stationName, out ProgressState));
+                                        stPLC_MesData.mesCommFrmPLC.cmd = 0;//清除入站申请
                                     }
                                 }
                             }
@@ -2204,7 +2206,7 @@ namespace MainForm
                             string str = ex.StackTrace;
                             AddMessage_Station(stationNameStr, LogType.Error, $"PLC{plcNo}_{stationNameStr} 上料进站出错!错误信息:" + ex.Message + "异常位置:" + str.Substring(str.LastIndexOf("\\") + 1, str.Length - str.LastIndexOf("\\") - 1));
                         }
-                        #endregion 
+                        #endregion 
 
 
                         UpdatePLCMonitor(1, plcNo, 1);  // 更新PLC状态的UI  // 更新PLC状态的UI
@@ -2529,6 +2531,7 @@ namespace MainForm
                                     {
                                         ProgressState = true;
                                         Task.Run(() => S3出站(plcNo, stationNameStr, stPLC_MesData.Left, tagBaseName + ".Left." + tagMesCommName, stationCode, stationName, "Left", out ProgressState));
+                                        stPLC_MesData.Left.mesCommFrmPLC.cmd = 0;
                                     }
                                 }
                             }
@@ -2575,6 +2578,7 @@ namespace MainForm
                                     {
                                         ProgressState = true;
                                         Task.Run(() => S3出站(plcNo, stationNameStr, stPLC_MesData.Right, tagBaseName + ".Right." + tagMesCommName, stationCode, stationName, "Right", out ProgressState));
+                                        stPLC_MesData.Right.mesCommFrmPLC.cmd = 0;
                                     }
                                 }
                             }
@@ -2894,6 +2898,7 @@ namespace MainForm
                                     {
                                         ProgressState = true;
                                         Task.Run(() => S4出站(plcNo, stationNameStr, stPLC_MesData, tagBaseName + "." + tagMesCommName, stationCode, stationName, out ProgressState));
+                                        stPLC_MesData.mesCommFrmPLC.cmd = 0;
                                     }
                                 }
                             }
@@ -2903,7 +2908,7 @@ namespace MainForm
                             string str = ex.StackTrace;
                             AddMessage_Station(stationNameStr, LogType.Error, $"PLC{plcNo}_{stationNameStr} 上料进站出错!错误信息:" + ex.Message + "异常位置:" + str.Substring(str.LastIndexOf("\\") + 1, str.Length - str.LastIndexOf("\\") - 1));
                         }
-                        #endregion 
+                        #endregion 
 
 
                         UpdatePLCMonitor(1, plcNo, 1);  // 更新PLC状态的UI  // 更新PLC状态的UI
@@ -3175,6 +3180,7 @@ namespace MainForm
                                     {
                                         ProgressState = true;
                                         Task.Run(() => S5出站(plcNo, stationNameStr, stPLC_MesData, tagBaseName + "." + tagMesCommName, stationCode, stationName, out ProgressState));
+                                        stPLC_MesData.mesCommFrmPLC.cmd = 0;
                                     }
                                 }
                             }
@@ -3185,7 +3191,7 @@ namespace MainForm
                             string str = ex.StackTrace;
                             AddMessage_Station(stationNameStr, LogType.Error, $"PLC{plcNo}_{stationNameStr} 上料进站出错!错误信息:" + ex.Message + "异常位置:" + str.Substring(str.LastIndexOf("\\") + 1, str.Length - str.LastIndexOf("\\") - 1));
                         }
-                        #endregion 
+                        #endregion 
 
 
                         UpdatePLCMonitor(1, plcNo, 1);  // 更新PLC状态的UI  // 更新PLC状态的UI
@@ -3470,6 +3476,7 @@ namespace MainForm
                                     {
                                         ProgressState = true; ;
                                         Task.Run(() => S6出站(plcNo, stationNameStr, stPLC_MesData, tagBaseName + "." + tagMesCommName, stationCode, stationName, out ProgressState));
+                                        stPLC_MesData.mesCommFrmPLC.cmd = 0;
                                     }
                                 }
                             }
@@ -3480,7 +3487,7 @@ namespace MainForm
                             string str = ex.StackTrace;
                             AddMessage_Station(stationNameStr, LogType.Error, $"PLC{plcNo}_{stationNameStr} 上料进站出错!错误信息:" + ex.Message + "异常位置:" + str.Substring(str.LastIndexOf("\\") + 1, str.Length - str.LastIndexOf("\\") - 1));
                         }
-                        #endregion 
+                        #endregion 
 
 
                         UpdatePLCMonitor(1, plcNo, 1);  // 更新PLC状态的UI  // 更新PLC状态的UI
@@ -3755,6 +3762,7 @@ namespace MainForm
                                     {
                                         ProgressState = true;
                                         Task.Run(() => S7出站(plcNo, stationNameStr, stPLC_MesData.Left, tagBaseName + ".Left." + tagMesCommName, stationCode, stationName, "Left", out ProgressState));
+                                        stPLC_MesData.Left.mesCommFrmPLC.cmd = 0;
                                     }
                                 }
                             }
@@ -3801,6 +3809,7 @@ namespace MainForm
                                     {
                                         ProgressState = true;
                                         Task.Run(() => S7出站(plcNo, stationNameStr, stPLC_MesData.Right, tagBaseName + ".Right." + tagMesCommName, stationCode, stationName, "Right", out ProgressState));
+                                        stPLC_MesData.Right.mesCommFrmPLC.cmd = 0;
                                     }
                                 }
                             }
@@ -4164,6 +4173,7 @@ namespace MainForm
                                     {
                                         ProgressState = true;
                                         Task.Run(() => S8出站(plcNo, stationNameStr, stPLC_MesData, tagBaseName + "." + tagMesCommName, stationCode, stationName, out ProgressState));
+                                        stPLC_MesData.mesCommFrmPLC.cmd = 0;
                                     }
                                 }
                             }
@@ -4174,7 +4184,7 @@ namespace MainForm
                             string str = ex.StackTrace;
                             AddMessage_Station(stationNameStr, LogType.Error, $"PLC{plcNo}_{stationNameStr} 上料进站出错!错误信息:" + ex.Message + "异常位置:" + str.Substring(str.LastIndexOf("\\") + 1, str.Length - str.LastIndexOf("\\") - 1));
                         }
-                        #endregion 
+                        #endregion 
 
 
                         UpdatePLCMonitor(1, plcNo, 1);  // 更新PLC状态的UI  // 更新PLC状态的UI
@@ -4441,6 +4451,7 @@ namespace MainForm
                                     {
                                         ProgressState = true;
                                         Task.Run(() => S9出站(plcNo, stationNameStr, stPLC_MesData, tagBaseName + "." + tagMesCommName, stationCode, stationName, out ProgressState));
+                                        stPLC_MesData.mesCommFrmPLC.cmd = 0;
                                     }
                                 }
                             }
@@ -4451,7 +4462,7 @@ namespace MainForm
                             string str = ex.StackTrace;
                             AddMessage_Station(stationNameStr, LogType.Error, $"PLC{plcNo}_{stationNameStr} 上料进站出错!错误信息:" + ex.Message + "异常位置:" + str.Substring(str.LastIndexOf("\\") + 1, str.Length - str.LastIndexOf("\\") - 1));
                         }
-                        #endregion 
+                        #endregion 
 
 
                         UpdatePLCMonitor(1, plcNo, 1);  // 更新PLC状态的UI  // 更新PLC状态的UI