Переглянути джерело

出站后清空进站申请

WIN-GH9CEESPLTB\Administrator 1 місяць тому
батько
коміт
b3958bc90f
1 змінених файлів з 18 додано та 7 видалено
  1. 18 7
      MainForm/FaForm/Form_Home.cs

+ 18 - 7
MainForm/FaForm/Form_Home.cs

@@ -1762,6 +1762,7 @@ namespace MainForm
                                     {
                                         ProgressState = true;
                                         Task.Run(() => S1出站(plcNo, stationNameStr, stPLC_MesData, tagBaseName + "." + tagMesCommName, stationCode, stationName, out ProgressState));
+                                        stPLC_MesData.mesCommFrmPLC.cmd = 0;//清除入站申请
                                     }
                                 }
                             }
@@ -1772,7 +1773,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
@@ -2054,6 +2055,7 @@ namespace MainForm
                                     {
                                         ProgressState = true;
                                         Task.Run(() => S2出站(plcNo, stationNameStr, stPLC_MesData, tagBaseName + "." + tagMesCommName, stationCode, stationName, out ProgressState));
+                                        stPLC_MesData.mesCommFrmPLC.cmd = 0;//清除入站申请
                                     }
                                 }
                             }
@@ -2064,7 +2066,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
@@ -2389,6 +2391,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;
                                     }
                                 }
                             }
@@ -2435,6 +2438,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;
                                     }
                                 }
                             }
@@ -2754,6 +2758,7 @@ namespace MainForm
                                     {
                                         ProgressState = true;
                                         Task.Run(() => S4出站(plcNo, stationNameStr, stPLC_MesData, tagBaseName + "." + tagMesCommName, stationCode, stationName, out ProgressState));
+                                        stPLC_MesData.mesCommFrmPLC.cmd = 0;
                                     }
                                 }
                             }
@@ -2763,7 +2768,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
@@ -3035,6 +3040,7 @@ namespace MainForm
                                     {
                                         ProgressState = true;
                                         Task.Run(() => S5出站(plcNo, stationNameStr, stPLC_MesData, tagBaseName + "." + tagMesCommName, stationCode, stationName, out ProgressState));
+                                        stPLC_MesData.mesCommFrmPLC.cmd = 0;
                                     }
                                 }
                             }
@@ -3045,7 +3051,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
@@ -3330,6 +3336,7 @@ namespace MainForm
                                     {
                                         ProgressState = true; ;
                                         Task.Run(() => S6出站(plcNo, stationNameStr, stPLC_MesData, tagBaseName + "." + tagMesCommName, stationCode, stationName, out ProgressState));
+                                        stPLC_MesData.mesCommFrmPLC.cmd = 0;
                                     }
                                 }
                             }
@@ -3340,7 +3347,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
@@ -3615,6 +3622,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;
                                     }
                                 }
                             }
@@ -3661,6 +3669,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;
                                     }
                                 }
                             }
@@ -4024,6 +4033,7 @@ namespace MainForm
                                     {
                                         ProgressState = true;
                                         Task.Run(() => S8出站(plcNo, stationNameStr, stPLC_MesData, tagBaseName + "." + tagMesCommName, stationCode, stationName, out ProgressState));
+                                        stPLC_MesData.mesCommFrmPLC.cmd = 0;
                                     }
                                 }
                             }
@@ -4034,7 +4044,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
@@ -4301,6 +4311,7 @@ namespace MainForm
                                     {
                                         ProgressState = true;
                                         Task.Run(() => S9出站(plcNo, stationNameStr, stPLC_MesData, tagBaseName + "." + tagMesCommName, stationCode, stationName, out ProgressState));
+                                        stPLC_MesData.mesCommFrmPLC.cmd = 0;
                                     }
                                 }
                             }
@@ -4311,7 +4322,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