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;