From 70b4bdc6f999c55b75138e013abf436100e9987b Mon Sep 17 00:00:00 2001
From: liudl <673013083@qq.com>
Date: 星期一, 23 六月 2025 15:33:16 +0800
Subject: [PATCH] 修改手自动

---
 Admin.NET/WCS.Application/PLC/PLCUtil.cs |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/Admin.NET/WCS.Application/PLC/PLCUtil.cs b/Admin.NET/WCS.Application/PLC/PLCUtil.cs
index 794a66c..d441f6b 100644
--- a/Admin.NET/WCS.Application/PLC/PLCUtil.cs
+++ b/Admin.NET/WCS.Application/PLC/PLCUtil.cs
@@ -17,6 +17,7 @@
     public readonly string PlcIP;
     private SiemensClient _client;
     private WcsPlc _modPlc;
+    private Task<WcsPlc> modPlc;
     private readonly object OLock = new object();
     public PLCUtil(WcsPlc modPlc)
     {
@@ -26,6 +27,7 @@
         _client = new SiemensClient((SiemensVersion)modPlc.PLCType, modPlc.IP, modPlc.Port);
         _client.Open();
     }
+
     public bool Connected
     {
         get { return _client.Connected; }
@@ -223,8 +225,21 @@
             address = DbNumber + "." + Pos;
         else
             address = DbNumber + Pos;
-        return this.SetPlcDBValue(PosType, address, Pos, Value);
+        return this.SetPlcDBValue(PosType, address, Value);
     }
+
+    /// <summary>
+    /// 鍐欏叆PLC鍊�
+    /// </summary>
+    //public IoTClient.Result SetPlcDBValue(PLCDataTypeEnum PosType, string DbNumber, string Pos, byte Value)
+    //{
+    //    string address;
+    //    if (DbNumber.StartsWith("DB"))
+    //        address = DbNumber + "." + Pos;
+    //    else
+    //        address = DbNumber + Pos;
+    //    return this.SetPlcDBValue(PosType, address, Value);
+    //}
     /// <summary>
     /// 鍐欏叆PLC鍊�
     /// </summary>

--
Gitblit v1.8.0