From eec0af139f8558074fafa66516f5885aaf151093 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 10:11:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=97=E9=A6=96=E9=A1=B5=E9=97=AA?= =?UTF-8?q?=E7=83=81=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProductionSystem/Forms/HomeFormInfo.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ProductionSystem/Forms/HomeFormInfo.cs b/ProductionSystem/Forms/HomeFormInfo.cs index ec90d33..8db67f4 100644 --- a/ProductionSystem/Forms/HomeFormInfo.cs +++ b/ProductionSystem/Forms/HomeFormInfo.cs @@ -1571,8 +1571,11 @@ namespace ProductionSystem.Forms while (!cancellationTokenSource.IsCancellationRequested) { + var readM248 = OmronHelper.GetPlcVal(M248.DataType, M248.Address); + string plcTiaoMa=readM248.val.ToString().Replace("\r", "").Replace("\n", ""); string tiaoma = txtProductCode.Text.Replace("\r", "").Replace("\n", ""); - if (tiaoma.Contains("暂无条码") || tiaoma == "" || tiaoma.Contains("暂")) + //彻底解决页面闪烁的问题 + if (string.IsNullOrEmpty(plcTiaoMa) || tiaoma.Contains("暂无条码") || tiaoma == "" || tiaoma.Contains("暂")) { for (int i = 1; i < 9; i++) {