From 4eed64e84f427013cc4800e644f3bfadbd1674ba Mon Sep 17 00:00:00 2001 From: yangw Date: Sun, 14 Apr 2024 18:55:40 +0800 Subject: [PATCH] Deni --- ProductionSystem/Forms/HomeFormInfo.cs | 5 +++-- ProductionSystem/Untils/EquipmentCacheManager.cs | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ProductionSystem/Forms/HomeFormInfo.cs b/ProductionSystem/Forms/HomeFormInfo.cs index bf3139c..300c438 100644 --- a/ProductionSystem/Forms/HomeFormInfo.cs +++ b/ProductionSystem/Forms/HomeFormInfo.cs @@ -921,10 +921,11 @@ namespace ProductionSystem.Forms { XTrace.WriteLine("开始水泵2"); - TmTool.SbUx(ModeTypeEnum.BZ1_DB,true); + TmTool.WritePlc(TmTool.ShuiBeng1, 1); + TmTool.WritePlc(TmTool.ShuiBeng2, 1); - TmTool.CleanStatus(); + // TmTool.CleanStatus(); // 上位机将四通阀运行到模式1,停止水泵1;启动水泵2运行致设定转速,反馈PLC=1或2(可以/不可以测试) // TmTool.SiTong(ModeTypeEnum.BZ2_DB, 1); // TmTool.SiTong(ModeTypeEnum.BZ2_DB, 2); diff --git a/ProductionSystem/Untils/EquipmentCacheManager.cs b/ProductionSystem/Untils/EquipmentCacheManager.cs index 4f70b48..98ccade 100644 --- a/ProductionSystem/Untils/EquipmentCacheManager.cs +++ b/ProductionSystem/Untils/EquipmentCacheManager.cs @@ -40,6 +40,7 @@ namespace ProductionSystem.Untils public static string GetCode(string code, EquipmentEnum equipmentEnum) { var dic = cache[code] as Dictionary; + if (null == dic) return "-1"; if (dic.TryGetValue(equipmentEnum.ToString(), out var value)) { return value;