From 8f392cc88b0768b74efca3b68785cf5aa1c38e70 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期三, 06 十一月 2024 14:28:20 +0800
Subject: [PATCH] 代码更新

---
 wcs-server-hbf/WIDESEA_WCS/WCSClient/Melsec/MelsecPLCClient.cs |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/wcs-server-hbf/WIDESEA_WCS/WCSClient/Melsec/MelsecPLCClient.cs b/wcs-server-hbf/WIDESEA_WCS/WCSClient/Melsec/MelsecPLCClient.cs
index e0e8e1b..05b2cd1 100644
--- a/wcs-server-hbf/WIDESEA_WCS/WCSClient/Melsec/MelsecPLCClient.cs
+++ b/wcs-server-hbf/WIDESEA_WCS/WCSClient/Melsec/MelsecPLCClient.cs
@@ -64,6 +64,7 @@
         {
             MelsecMcNetClient.IpAddress = PLCIPAddress;
             MelsecMcNetClient.Port = Port;
+            this.MelsecMcNetClient.ReceiveTimeout = 2000;
 
             //MelsecMcNetClient.ConnectTimeOut = 2000;
             //MelsecMcNetClient?.ConnectClose();
@@ -72,7 +73,7 @@
             result.IsSuccess = true;
             if (!result.IsSuccess)
             {
-                WIDESEA_Common.Tools.WriteLog.GetLog().Write($"Error锛歿PLCName}杩炴帴澶辫触{Environment.NewLine}閿欒淇℃伅锛歿result.Message}", PLCName);
+                WIDESEA_Common.Tools.WriteLog.GetLog().Write($"Error锛歿PLCName}杩炴帴澶辫触---{DateTime.Now}{Environment.NewLine}閿欒淇℃伅锛歿result.Message}", PLCName);
                 IsConnected = false;
                 return $"杩炴帴澶辫触,閿欒淇℃伅锛歿result.Message}";
             }
@@ -80,7 +81,7 @@
             {
                 IsConnected = true;
                 readWriteNet = MelsecMcNetClient;
-                WIDESEA_Common.Tools.WriteLog.GetLog().Write($"Info锛歿PLCName}杩炴帴鎴愬姛锛�", PLCName);
+                WIDESEA_Common.Tools.WriteLog.GetLog().Write($"Info锛歿PLCName}杩炴帴鎴愬姛锛�---{DateTime.Now}", PLCName);
                 return $"杩炴帴鎴愬姛";
             }
         }

--
Gitblit v1.9.3