From 3ef3c534f30574b8bb2759ec38e1230c5cdf8243 Mon Sep 17 00:00:00 2001 From: Tyrone CT Date: Thu, 10 Jul 2025 23:17:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E4=BA=86=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E7=9A=84=E8=BF=9B=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/MachineRtDataService.cs | 3 +++ CapMachine.Wpf/TagConfig/SysTags.json | 26 +++++++++---------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/CapMachine.Wpf/Services/MachineRtDataService.cs b/CapMachine.Wpf/Services/MachineRtDataService.cs index 53e11ea..6c1bbbb 100644 --- a/CapMachine.Wpf/Services/MachineRtDataService.cs +++ b/CapMachine.Wpf/Services/MachineRtDataService.cs @@ -166,6 +166,9 @@ namespace CapMachine.Wpf.Services { // 处理异常,如记录日志 Debug.WriteLine($"加载标签配置文件失败: {ex.Message}"); + LogService.Error($"加载标签配置文件失败: {ex.Message}"); + MessageBox.Show($"加载标签配置文件失败,请检查标签配置是否正确: {ex.Message}", "错误", MessageBoxButton.OK, MessageBoxImage.Error); + // 可以在这里添加备用的手动添加标签的代码 } #endregion diff --git a/CapMachine.Wpf/TagConfig/SysTags.json b/CapMachine.Wpf/TagConfig/SysTags.json index b60af6c..607b7fb 100644 --- a/CapMachine.Wpf/TagConfig/SysTags.json +++ b/CapMachine.Wpf/TagConfig/SysTags.json @@ -296,7 +296,7 @@ "MaxValue": 10000, "IsMeter": false, "DecimalPoint": 1, - "Precision": 100, + "Precision": 10, "Unit": "℃", "DataType": "Short", "RWInfo": "PLCRead", @@ -318,7 +318,7 @@ "MaxValue": 10000, "IsMeter": false, "DecimalPoint": 1, - "Precision": 100, + "Precision": 10, "Unit": "%", "DataType": "Short", "RWInfo": "PLCRead", @@ -692,8 +692,8 @@ "MinValue": 0, "MaxValue": 10000, "IsMeter": false, - "DecimalPoint": 2, - "Precision": 100, + "DecimalPoint": 1, + "Precision": 1, "Unit": "V", "DataType": "Short", "RWInfo": "PLCRead", @@ -946,7 +946,7 @@ "MaxValue": 10000, "IsMeter": false, "DecimalPoint": 1, - "Precision": 1, + "Precision": 10, "Unit": "kg/h", "DataType": "Short", "RWInfo": "PLCRead", @@ -968,7 +968,7 @@ "MaxValue": 10000, "IsMeter": false, "DecimalPoint": 1, - "Precision": 1, + "Precision": 10, "Unit": "kg/h", "DataType": "Short", "RWInfo": "PLCRead", @@ -990,7 +990,7 @@ "MaxValue": 10000, "IsMeter": false, "DecimalPoint": 1, - "Precision": 100, + "Precision": 10, "Unit": "℃", "DataType": "Short", "RWInfo": "PLCRead", @@ -1012,7 +1012,7 @@ "MaxValue": 10000, "IsMeter": false, "DecimalPoint": 1, - "Precision": 100, + "Precision": 10, "Unit": "℃", "DataType": "Short", "RWInfo": "PLCRead", @@ -1034,7 +1034,7 @@ "MaxValue": 10000, "IsMeter": false, "DecimalPoint": 1, - "Precision": 100, + "Precision": 10, "Unit": "℃", "DataType": "Short", "RWInfo": "PLCRead", @@ -1056,7 +1056,7 @@ "MaxValue": 10000, "IsMeter": false, "DecimalPoint": 1, - "Precision": 100, + "Precision": 10, "Unit": "℃", "DataType": "Short", "RWInfo": "PLCRead", @@ -1078,7 +1078,7 @@ "MaxValue": 10000, "IsMeter": false, "DecimalPoint": 1, - "Precision": 100, + "Precision": 10, "Unit": "℃", "DataType": "Short", "RWInfo": "PLCRead", @@ -1100,7 +1100,7 @@ "MaxValue": 10000, "IsMeter": false, "DecimalPoint": 1, - "Precision": 100, + "Precision": 10, "Unit": "℃", "DataType": "Short", "RWInfo": "PLCRead", @@ -1122,7 +1122,7 @@ "MaxValue": 10000, "IsMeter": false, "DecimalPoint": 1, - "Precision": 100, + "Precision": 10, "Unit": "℃", "DataType": "Short", "RWInfo": "PLCRead",