From a0ab0f8217fb3d26f2c52692b665de95f9f549ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=91=E5=8F=AB=E9=94=84=E5=A4=B4?= Date: Fri, 12 Apr 2024 16:14:50 +0800 Subject: [PATCH] GetStep --- ProductionSystem/Forms/HomeFormInfo.cs | 34 ++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/ProductionSystem/Forms/HomeFormInfo.cs b/ProductionSystem/Forms/HomeFormInfo.cs index 050916c..c7cc3bf 100644 --- a/ProductionSystem/Forms/HomeFormInfo.cs +++ b/ProductionSystem/Forms/HomeFormInfo.cs @@ -1910,16 +1910,46 @@ namespace ProductionSystem.Forms { "BZ3", "D1304" }, //高压 { "BZ4", "D1312" }, - + { "BZ5", "D1308" }, { "BZ6", "D1310" }, //外露 { "BZ7", "D1306" }, - + { "BZ8", "D1314" }, }; return tagDict; } + + private string GetStep() + { + var dic = GetTagDict(); + string str = ""; + foreach (var item in dic) + { + string key = item.Key; + string value = item.Value; + + var entity = + Program.CommandPointKeyValues.FirstOrDefault(m => m.Key == value); + if (entity != null) + { + var va = OmronHelper.GetPlcVal(entity.DataType, entity.Address); + if (va.Item2.ToDouble().ToInt() == 1) + { + str = key; + break; + } + + } + + + + } + return str; + } + +