From 3865194441f1e1da34c0be9034d86c8d0d68706c Mon Sep 17 00:00:00 2001 From: lss <2538410689@qq.com> Date: 星期五, 04 七月 2025 17:26:23 +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