From 15f0047ec840c80ad0ba20ce6a49a5b0ba606586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=91=E5=8F=AB=E9=94=84=E5=A4=B4?= Date: Thu, 11 Apr 2024 10:33:15 +0800 Subject: [PATCH] firx --- ProductionSystem/Forms/HomeForm.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ProductionSystem/Forms/HomeForm.cs b/ProductionSystem/Forms/HomeForm.cs index 76bf986..2facb82 100644 --- a/ProductionSystem/Forms/HomeForm.cs +++ b/ProductionSystem/Forms/HomeForm.cs @@ -1422,8 +1422,18 @@ namespace ProductionSystem.Forms Program.CommandPointKeyValues.FirstOrDefault(m => m.Key == tagDict[par]); if (entity != null) { + string productBarCode = ""; + if (txtProductCode.Text == "暂无条码") + { + productBarCode = "8888"; + } + else + { + productBarCode=txtProductCode.Text; + } + var value = OmronHelper.GetPlcVal(entity.DataType, entity.Address); - if (value.Item2 == "0.000") + if (value.Item2.ToDouble().ToInt()==1) { T_Result2 t = new T_Result2 { @@ -1431,7 +1441,7 @@ namespace ProductionSystem.Forms ProductType = Program.ProductType, CreateTime = DateTime.Now, Step = par, - ProductBarcode = "8888", + ProductBarcode = productBarCode, Electricity = "0", Voltage = "0", Xll = "0",