From a47e45d04ca5beadcf815d852cae52ef56f669e5 Mon Sep 17 00:00:00 2001
From: czw <selecti@yeah.net>
Date: 星期三, 23 七月 2025 16:39:33 +0800
Subject: [PATCH] 1

---
 2025年6月12日/AuxAllWCS/Build/Project/代码/VS自定义类/AutoThread.cs |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git "a/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/VS\350\207\252\345\256\232\344\271\211\347\261\273/AutoThread.cs" "b/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/VS\350\207\252\345\256\232\344\271\211\347\261\273/AutoThread.cs"
index 6a2d2b8..9e25737 100644
--- "a/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/VS\350\207\252\345\256\232\344\271\211\347\261\273/AutoThread.cs"
+++ "b/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/VS\350\207\252\345\256\232\344\271\211\347\261\273/AutoThread.cs"
@@ -30,6 +30,7 @@
 using System.Net.NetworkInformation;
 using System.Windows.Documents;
 using System.Text.RegularExpressions;
+using GZ.Device.PLC;
 
 namespace GZ.Projects.AuxAllWCS
 {
@@ -113,7 +114,7 @@
             }
             catch (Exception ex)
             {
-                LogHelper.Error($"InvokeMethod > cacheKey-{ex.Message}", ex);
+                LogHelper.Error($"InvokeMethod > cacheKey:{cacheKey}-{ex.Message}", ex);
                 throw ex;
             }
         }
@@ -149,6 +150,7 @@
         //        return _repository;
         //    }
         //}
+
         /// <summary>
         /// 閰嶇疆鍒濆鍖栥�
         /// </summary>
@@ -173,6 +175,7 @@
                 Console.Clear();
             }
         }
+
 
 
         public void ThreaTotal(Tag tag, Device device)
@@ -240,11 +243,26 @@
 
             tasks.Add(GetTask(ThreadMXC5, tag, 3000));
             tasks.Add(GetTask(ThreadMXC6, tag, 3000));
+            tasks.Add(GetTask(ThreadS7helper, tag, 3000));
 
             LogHelper.Info("ThreaTotal 绾跨▼鎬荤嚎runing");
             Task.WaitAll(tasks.ToArray());
             LogHelper.Info("ThreaTotal 绾跨▼鎬荤嚎over");
         }
+
+
+        private void ThreadS7helper(Tag tag)
+        {
+            //var plc = new Plc(CpuType.S71500,);
+
+            //foreach (var item in collection)
+            //{
+            //    S7.Net.Plc plc = new Plc(CpuType.S71500, item.address, 0, 1);
+            //    Link(plc);
+            //    PLCS.Add(item.deviceName, plc);
+            //}
+        }
+
         void taskssss1(Tag tag)
         {
             sa1025(tag);
@@ -264,7 +282,7 @@
             sa3010(tag);
         }
 
-        public static ConcurrentDictionary<string, bool> Iponlines = new ConcurrentDictionary<string, bool>();
+        //public static ConcurrentDictionary<string, bool> Iponlines = new ConcurrentDictionary<string, bool>();
         public bool IsMachineOnline(string hostNameOrIp, int timeout = 1000)
         {
             //device.p鍙戦偅绉�涓嬬嚎.Config.IP

--
Gitblit v1.9.1