From e1a97fc8b29f063e96e3ebbae2f07ee95b276069 Mon Sep 17 00:00:00 2001
From: lss <Lss@HanInfo>
Date: 星期四, 05 六月 2025 17:25:31 +0800
Subject: [PATCH] 合肥佳通优化

---
 HH.WCS.Mobox3/HH.WCS.Mobox3.JiaTong/device/S7Helper.cs |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/HH.WCS.Mobox3/HH.WCS.Mobox3.JiaTong/device/S7Helper.cs b/HH.WCS.Mobox3/HH.WCS.Mobox3.JiaTong/device/S7Helper.cs
index 7842918..97eaf35 100644
--- a/HH.WCS.Mobox3/HH.WCS.Mobox3.JiaTong/device/S7Helper.cs
+++ b/HH.WCS.Mobox3/HH.WCS.Mobox3.JiaTong/device/S7Helper.cs
@@ -95,9 +95,10 @@
         /// <param name="startByte">鍋忕Щ閲忓湴鍧�vb2001</param>
         ///  /// <param name="varType">鍊肩被鍨�/param>
         /// <returns></returns>
-        public static int ReadDpj(int startByte, S7.Net.VarType varType)
+        public static int ReadDpj(string ip,int startByte, S7.Net.VarType varType)
         {
-            string ip = "10.68.9.15"; short port = 102;
+           // string ip = "10.68.9.15"; 
+            short port = 102;
             lock (_lockdpj)
             {
                 try
@@ -125,7 +126,8 @@
                 }
                 catch (Exception ex)
                 {
-                    LogHelper.Error($"ReadDpj Error:{ex}", ex);
+                    LogHelper.Info($"鍙犵洏鏈�{ip}閾炬帴澶辫触");
+                    LogHelper.Error($"ReadDpj ip:{ip},startByte:{startByte} Error:{ex}", ex);
                     throw;
                 }
             }
@@ -139,10 +141,11 @@
         /// <param name="startByte">鍋忕Щ閲忓湴鍧�/param>
         /// <param name="value">鍐欏叆鍊�byte绫诲瀷鍙兘0 1</param>
         /// <returns></returns>
-        public static bool WriteDpj(int startByte, byte value)
+        public static bool WriteDpj(string ip,int startByte, byte value)
         {
             bool result = false;
-            string ip = "10.68.9.15"; short port = 102;
+           // string ip = "10.68.9.15"; 
+            short port = 102;
             lock (_lockdpj)
             {
                 try

--
Gitblit v1.9.1