From fe73b55b18cadab4109fc11ab3635762bb05334f 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 17:17:52 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=8F=90=E9=AA=84=E5=82=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProductionSystem/Forms/HomeFormInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProductionSystem/Forms/HomeFormInfo.cs b/ProductionSystem/Forms/HomeFormInfo.cs index c3e7519..01d467c 100644 --- a/ProductionSystem/Forms/HomeFormInfo.cs +++ b/ProductionSystem/Forms/HomeFormInfo.cs @@ -1575,7 +1575,7 @@ namespace ProductionSystem.Forms string plcTiaoMa=readM248.val.ToString().Replace("\r", "").Replace("\n", ""); string tiaoma = txtProductCode.Text.Replace("\r", "").Replace("\n", ""); //彻底解决页面闪烁的问题 - if (string.IsNullOrEmpty(plcTiaoMa) || tiaoma.Contains("暂无条码") || tiaoma == "" || tiaoma.Contains("暂")) + if (string.IsNullOrEmpty(plcTiaoMa) || tiaoma.Contains("暂无条码") || tiaoma.Contains("暂")) { for (int i = 1; i < 9; i++) { From 60649f5c20ac16b5fd1987bc06c8be7c7d0b7f2f 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 17:22:43 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=90=9C=E9=9B=86=E7=94=B5=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProductionSystem/Forms/HomeFormInfo.cs | 39 ++++++++++++++++++++------ 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/ProductionSystem/Forms/HomeFormInfo.cs b/ProductionSystem/Forms/HomeFormInfo.cs index 01d467c..b81af1f 100644 --- a/ProductionSystem/Forms/HomeFormInfo.cs +++ b/ProductionSystem/Forms/HomeFormInfo.cs @@ -1639,7 +1639,7 @@ namespace ProductionSystem.Forms var value = OmronHelper.GetPlcVal(entity.DataType, entity.Address); - if (value.Item2.ToDouble().ToInt()==1) + if (value.Item2.ToDouble().ToInt() == 1) { T_Result2 t = new T_Result2 { @@ -1658,28 +1658,42 @@ namespace ProductionSystem.Forms { t.Electricity = GetPlcValue("D1202"); t.Voltage = GetPlcValue("D1200"); - _result2Service.AddTResult2(t); + if (t.Electricity != "0.000" || t.Voltage != "0.0000") + { + _result2Service.AddTResult2(t); + } + } if (par == "BZ2") { t.Electricity = GetPlcValue("D1206"); t.Voltage = GetPlcValue("D1204"); - _result2Service.AddTResult2(t); + if (t.Electricity != "0.000" || t.Voltage != "0.0000") + { + _result2Service.AddTResult2(t); + } } if (par == "BZ3") { t.Electricity = GetPlcValue("D1210"); t.Voltage = GetPlcValue("D1208"); - _result2Service.AddTResult2(t); + if (t.Electricity != "0.000" || t.Voltage != "0.0000") + { + _result2Service.AddTResult2(t); + } } //高压 if (par == "BZ4") { t.Xll = GetPlcValue("D1224"); t.Xllzt = GetPlcValue("D1226"); - _result2Service.AddTResult2(t); + if (t.Xll != "0.000" || t.Xllzt != "0.0000") + { + _result2Service.AddTResult2(t); + } + } //内1 @@ -1687,21 +1701,30 @@ namespace ProductionSystem.Forms { t.Xll = GetPlcValue("D1212"); t.Xllzt = GetPlcValue("D1112"); - _result2Service.AddTResult2(t); + if (t.Xll != "0.000" || t.Xllzt != "0.0000") + { + _result2Service.AddTResult2(t); + } } //内2 if (par == "BZ6") { t.Xll = GetPlcValue("D1214"); t.Xllzt = GetPlcValue("D1114"); - _result2Service.AddTResult2(t); + if (t.Xll != "0.000" || t.Xllzt != "0.0000") + { + _result2Service.AddTResult2(t); + } } //外漏 if (par == "BZ7") { t.Xll = GetPlcValue("D1216"); t.Xllzt = GetPlcValue("D1116"); - _result2Service.AddTResult2(t); + if (t.Xll != "0.000" || t.Xllzt != "0.0000") + { + _result2Service.AddTResult2(t); + } } From 1654fcc933eed506058c371bca3dc66baacb0ed9 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 17:25:42 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E9=87=87=E9=9B=86=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProductionSystem/Forms/HomeFormInfo.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/ProductionSystem/Forms/HomeFormInfo.cs b/ProductionSystem/Forms/HomeFormInfo.cs index b81af1f..b45d0cc 100644 --- a/ProductionSystem/Forms/HomeFormInfo.cs +++ b/ProductionSystem/Forms/HomeFormInfo.cs @@ -1699,18 +1699,21 @@ namespace ProductionSystem.Forms //内1 if (par == "BZ5") { - t.Xll = GetPlcValue("D1212"); - t.Xllzt = GetPlcValue("D1112"); + + t.Xll = GetPlcValue("D1214"); + t.Xllzt = GetPlcValue("D1114"); if (t.Xll != "0.000" || t.Xllzt != "0.0000") { _result2Service.AddTResult2(t); } + + } //内2 if (par == "BZ6") { - t.Xll = GetPlcValue("D1214"); - t.Xllzt = GetPlcValue("D1114"); + t.Xll = GetPlcValue("D1216"); + t.Xllzt = GetPlcValue("D1116"); if (t.Xll != "0.000" || t.Xllzt != "0.0000") { _result2Service.AddTResult2(t); @@ -1719,8 +1722,8 @@ namespace ProductionSystem.Forms //外漏 if (par == "BZ7") { - t.Xll = GetPlcValue("D1216"); - t.Xllzt = GetPlcValue("D1116"); + t.Xll = GetPlcValue("D1212"); + t.Xllzt = GetPlcValue("D1112"); if (t.Xll != "0.000" || t.Xllzt != "0.0000") { _result2Service.AddTResult2(t); From 17019b3d553d9d24597f432e6f57386fad549246 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 17:26:54 +0800 Subject: [PATCH 4/4] Home --- ProductionSystem/Forms/HomeFormInfo.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ProductionSystem/Forms/HomeFormInfo.cs b/ProductionSystem/Forms/HomeFormInfo.cs index b45d0cc..266d434 100644 --- a/ProductionSystem/Forms/HomeFormInfo.cs +++ b/ProductionSystem/Forms/HomeFormInfo.cs @@ -1635,9 +1635,7 @@ namespace ProductionSystem.Forms if (entity != null) { string productBarCode = GetCode(); - - - + var value = OmronHelper.GetPlcVal(entity.DataType, entity.Address); if (value.Item2.ToDouble().ToInt() == 1) {