From 248201a7262e952f7e4a88b37d937cf1a7237644 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周二, 03 12月 2024 14:44:51 +0800
Subject: [PATCH] 2

---
 CC/iWareCC_ASRS/ThreadService/03_BZ12(机器人码包工位)/1、DataProcess_BZ12.cs |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git "a/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/1\343\200\201DataProcess_BZ12.cs" "b/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/1\343\200\201DataProcess_BZ12.cs"
index ef00399..40d6bf9 100644
--- "a/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/1\343\200\201DataProcess_BZ12.cs"
+++ "b/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/1\343\200\201DataProcess_BZ12.cs"
@@ -33,6 +33,11 @@
                          * 1銆佷粠鏁版嵁搴撲腑鍒ゆ柇鏄惁榻愬
                          * 2銆佹牴鎹綈濂楃粨鏋滐紝鎺ㄩ�佺粰PLC
                          */
+                        if (FormCC.stationView == null)
+                        {
+                            SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()}-鑾峰彇PLC瀵硅薄涓簄ull";
+                            continue;
+                        }
                         var obj = FormCC.stationView.R_StationForReadCommList.Where(x => x.StationCode == rgvLocation.ToString()).FirstOrDefault();
                         if (obj.R_PalletizingAck)
                         {
@@ -42,7 +47,7 @@
                                 var res = client.WriteStation_ACK((int)EDevice.Station, false, rgvLocation);
                                 if (!res.result)
                                 {
-                                    SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTask = $"{rgvLocation.ToString()}-涓嬪彂鐮佹澘浠诲姟 澶辫触,SetPalletizingTaskFinishAck 杩斿洖:{res.resMsg}";
+                                    SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()}-涓嬪彂鐮佹澘浠诲姟 澶辫触,SetPalletizingTaskFinishAck 杩斿洖:{res.resMsg}";
                                     continue;
                                 }
                                 else
@@ -192,7 +197,7 @@
                 }
                 catch (Exception ex)
                 {
-                    SystemWarningMsg._lbl_alert_DataProcess_BZ39 += " 鍑虹幇寮傚父:" + ex.Message + SysGloble.SPLIT_STR;
+                    SystemWarningMsg._lbl_alert_DataProcess_BZ12 += " 鍑虹幇寮傚父:" + ex.Message + SysGloble.SPLIT_STR;
                     Log4NetHelper.WriteErrorLog(logType, " 鍑虹幇寮傚父锛�" + ex.Message, ex);
                 }
             }

--
Gitblit v1.9.3