From ab14e98b724c897cfb00b282511750c40efdcdf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=94=84=E5=A4=B4?= Date: Fri, 19 Apr 2024 17:28:03 +0800 Subject: [PATCH] =?UTF-8?q?code=20=E8=8E=B7=E5=8F=96=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProductionSystem/Untils/Tool/StepTool.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ProductionSystem/Untils/Tool/StepTool.cs b/ProductionSystem/Untils/Tool/StepTool.cs index 85b3c43..143c71f 100644 --- a/ProductionSystem/Untils/Tool/StepTool.cs +++ b/ProductionSystem/Untils/Tool/StepTool.cs @@ -16,7 +16,7 @@ namespace ProductionSystem.Untils.Tool ProductStepService stepService = new ProductStepService(); private CurveTool _curveTool = new CurveTool(); - private PointKeyValue M248 = Program.CommandPointKeyValues.FirstOrDefault(m => m.Key == "D670"); + ParaConfigService paraConfigService=new ParaConfigService(); DataProductService dataProductService = new DataProductService(); private readonly ProductStepService productStepService = new ProductStepService(); @@ -35,6 +35,7 @@ namespace ProductionSystem.Untils.Tool private string GetCode() { + PointKeyValue M248 = Program.CommandPointKeyValues.FirstOrDefault(m => m.Key == "D670"); var readM248 = OmronHelper.GetPlcVal(M248.DataType, M248.Address); string plcTiaoMa = readM248.val.ToString().Replace("\r", "").Replace("\n", ""); return plcTiaoMa;