From 34ff16516772123a16aa4554bf23214936e4703f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=94=84=E5=A4=B4?= Date: Fri, 19 Apr 2024 16:36:22 +0800 Subject: [PATCH] uyTool --- ProductionSystem/Untils/Tool/StepTool.cs | 6 +++++- ProductionSystem/Untils/Tool/Uy.cs | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ProductionSystem/Untils/Tool/StepTool.cs b/ProductionSystem/Untils/Tool/StepTool.cs index fc33f06..85b3c43 100644 --- a/ProductionSystem/Untils/Tool/StepTool.cs +++ b/ProductionSystem/Untils/Tool/StepTool.cs @@ -142,7 +142,11 @@ namespace ProductionSystem.Untils.Tool XTrace.WriteLine("停止水泵1"); //停止水泵1 - uyTool.closeSend(); + if (uyTool != null) + { + uyTool.closeSend(); + } + TmTool.WritePlc(TmTool.ShuiBeng1, 0); if (_curveTool != null) { diff --git a/ProductionSystem/Untils/Tool/Uy.cs b/ProductionSystem/Untils/Tool/Uy.cs index 7a759ea..98a73a3 100644 --- a/ProductionSystem/Untils/Tool/Uy.cs +++ b/ProductionSystem/Untils/Tool/Uy.cs @@ -57,7 +57,7 @@ namespace ProductionSystem.Untils.Tool XTrace.WriteLine($"水泵Uy 第[{mo}-{com}]个 写入设备报文:{sendMes}"); - mfSerialInfo.MsgFunc = Fun; + mfSerialInfo.MsgFunc += Fun; mfSerialInfo.SendMsg(sendMes,50); return b;