diff --git a/ProductionSystem/Forms/HomeFormInfo.cs b/ProductionSystem/Forms/HomeFormInfo.cs index 7be1ca4..19bb573 100644 --- a/ProductionSystem/Forms/HomeFormInfo.cs +++ b/ProductionSystem/Forms/HomeFormInfo.cs @@ -1567,8 +1567,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++) {