Sfoglia il codice sorgente

Merge branch 'master' into dev20250218_IOT开发

WIN-GH9CEESPLTB\Administrator 1 mese fa
parent
commit
4575df8385
1 ha cambiato i file con 18 aggiunte e 7 eliminazioni
  1. 18 7
      MainForm/FaForm/Form_Home.cs

+ 18 - 7
MainForm/FaForm/Form_Home.cs

@@ -1926,6 +1926,7 @@ namespace MainForm
                                     {
                                         ProgressState = true;
                                         Task.Run(() => S1出站(plcNo, stationNameStr, stPLC_MesData, tagBaseName + "." + tagMesCommName, stationCode, stationName, out ProgressState));
+                                        stPLC_MesData.mesCommFrmPLC.cmd = 0;//清除入站申请
                                     }
                                 }
                             }
@@ -1936,7 +1937,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 
 
 
                         #region 节拍接口
@@ -2239,6 +2240,7 @@ namespace MainForm
                                     {
                                         ProgressState = true;
                                         Task.Run(() => S2出站(plcNo, stationNameStr, stPLC_MesData, tagBaseName + "." + tagMesCommName, stationCode, stationName, out ProgressState));
+                                        stPLC_MesData.mesCommFrmPLC.cmd = 0;//清除入站申请
                                     }
                                 }
                             }
@@ -2249,7 +2251,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
@@ -2574,6 +2576,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;
                                     }
                                 }
                             }
@@ -2620,6 +2623,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;
                                     }
                                 }
                             }
@@ -2939,6 +2943,7 @@ namespace MainForm
                                     {
                                         ProgressState = true;
                                         Task.Run(() => S4出站(plcNo, stationNameStr, stPLC_MesData, tagBaseName + "." + tagMesCommName, stationCode, stationName, out ProgressState));
+                                        stPLC_MesData.mesCommFrmPLC.cmd = 0;
                                     }
                                 }
                             }
@@ -2948,7 +2953,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
@@ -3220,6 +3225,7 @@ namespace MainForm
                                     {
                                         ProgressState = true;
                                         Task.Run(() => S5出站(plcNo, stationNameStr, stPLC_MesData, tagBaseName + "." + tagMesCommName, stationCode, stationName, out ProgressState));
+                                        stPLC_MesData.mesCommFrmPLC.cmd = 0;
                                     }
                                 }
                             }
@@ -3230,7 +3236,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
@@ -3515,6 +3521,7 @@ namespace MainForm
                                     {
                                         ProgressState = true; ;
                                         Task.Run(() => S6出站(plcNo, stationNameStr, stPLC_MesData, tagBaseName + "." + tagMesCommName, stationCode, stationName, out ProgressState));
+                                        stPLC_MesData.mesCommFrmPLC.cmd = 0;
                                     }
                                 }
                             }
@@ -3525,7 +3532,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
@@ -3800,6 +3807,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;
                                     }
                                 }
                             }
@@ -3846,6 +3854,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;
                                     }
                                 }
                             }
@@ -4209,6 +4218,7 @@ namespace MainForm
                                     {
                                         ProgressState = true;
                                         Task.Run(() => S8出站(plcNo, stationNameStr, stPLC_MesData, tagBaseName + "." + tagMesCommName, stationCode, stationName, out ProgressState));
+                                        stPLC_MesData.mesCommFrmPLC.cmd = 0;
                                     }
                                 }
                             }
@@ -4219,7 +4229,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
@@ -4486,6 +4496,7 @@ namespace MainForm
                                     {
                                         ProgressState = true;
                                         Task.Run(() => S9出站(plcNo, stationNameStr, stPLC_MesData, tagBaseName + "." + tagMesCommName, stationCode, stationName, out ProgressState));
+                                        stPLC_MesData.mesCommFrmPLC.cmd = 0;
                                     }
                                 }
                             }
@@ -4496,7 +4507,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