From 26edf1783992947f441096b155107128910aed82 Mon Sep 17 00:00:00 2001
From: lss <2538410689@qq.com>
Date: 星期二, 01 七月 2025 17:23:26 +0800
Subject: [PATCH] 变更优化

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

diff --git a/HH.WCS.Mobox3/HH.WCS.Mobox3.JiaTong/device/ModbusHelper.cs b/HH.WCS.Mobox3/HH.WCS.Mobox3.JiaTong/device/ModbusHelper.cs
index 408f263..c3e42ce 100644
--- a/HH.WCS.Mobox3/HH.WCS.Mobox3.JiaTong/device/ModbusHelper.cs
+++ b/HH.WCS.Mobox3/HH.WCS.Mobox3.JiaTong/device/ModbusHelper.cs
@@ -5,7 +5,9 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
+using System.Threading;
 using System.Threading.Tasks;
+using System.Web.Services.Description;
 
 namespace HH.WCS.JiaTong.device
 {
@@ -171,7 +173,11 @@
                 catch (Exception ex)
                 {
                     Console.WriteLine(ex.Message);
-                    Console.WriteLine($"鍐欏瘎瀛樺櫒{ip},address={address},value={value},澶辫触");
+                    Console.WriteLine($"鍐欏瘎瀛樺櫒{ip},address={address},value={value},澶辫触锛岄噸鏂板啓鍏�);
+                    Task.Run(() =>
+                    {
+                        WriteSingleRegister(address, value, ip);
+                    });
                 }
             }
             return res;

--
Gitblit v1.9.1