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",