lss
2025-06-05 e1a97fc8b29f063e96e3ebbae2f07ee95b276069
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