From adaffdfa744cdd93128cf21a3dc0b814887c9191 Mon Sep 17 00:00:00 2001 From: xyy <544939200@qq.com> Date: Thu, 28 May 2026 09:55:56 +0800 Subject: [PATCH] --- Services/LanScpiSocket.cs | 2 +- ViewModels/D7896ViewModel.cs | 6 +++--- appsettings.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Services/LanScpiSocket.cs b/Services/LanScpiSocket.cs index a24132e..778333b 100644 --- a/Services/LanScpiSocket.cs +++ b/Services/LanScpiSocket.cs @@ -94,7 +94,7 @@ namespace ASTM_D7896_Tester.Services await SendCommandAsync($"VOLT:DC:RANG {DefaultVoltageRange}"); // 3. 设置积分时间 0.02PLC(最快速度) - await SendCommandAsync("VOLT:DC:NPLC 10"); + await SendCommandAsync("VOLT:DC:NPLC 0.02"); // 4. 关闭自动归零(提高速度) await SendCommandAsync("VOLT:DC:ZERO:AUTO OFF"); diff --git a/ViewModels/D7896ViewModel.cs b/ViewModels/D7896ViewModel.cs index ca055e2..dda5bd8 100644 --- a/ViewModels/D7896ViewModel.cs +++ b/ViewModels/D7896ViewModel.cs @@ -88,7 +88,7 @@ public partial class D7896ViewModel : ObservableObject [ObservableProperty] private double _sampleDensity = 1000.0; // 新增,密度默认值1000 kg/m³(水) - int samples = 100; // 1秒 * 1000点/秒 + int samples = 400; // 1秒 * 1000点/秒 double heatingDuration = 0.8; // 加热时间 0.8 秒(需与您的加热脉冲宽度一致) double totalDuration = 1.6; // 总采样时间(加热 + 冷却) public D7896ViewModel() @@ -321,7 +321,7 @@ public partial class D7896ViewModel : ObservableObject double[] ustd = await _th1963Ustd.FetchBatchAsync(); double[] upt = await _th1953Ustd.FetchBatchAsync(); - for (int j = 0; j < 20 && j < ustd.Length; j++) + for (int j = 0; j < ustd.Length; j++) { Logger.Log($"第{j}点: U_std={ustd[j]:F6} V, U_pt={upt[j]:F6} V"); } @@ -473,7 +473,7 @@ public partial class D7896ViewModel : ObservableObject // 计算热扩散率 α double eulerGamma = 0.5772156649; - double wireRadius = 0.00003; // 30 微米 (0.03mm) + double wireRadius = _config.TestParameters.PlatinumWireDiameter / 2.0; // 30 微米 (0.03mm) double alpha = (wireRadius * wireRadius / 4.0) * Math.Exp(eulerGamma) * Math.Exp(intercept / slope); diff --git a/appsettings.json b/appsettings.json index 8f0f064..3da26dd 100644 --- a/appsettings.json +++ b/appsettings.json @@ -25,8 +25,8 @@ "TestParameters": { "MeasurementCount": 10, "IntervalSeconds": 30, - "PlatinumWireLength": 0.056, //铂丝长度(单位:米) - "PlatinumWireDiameter": 0.00006, + "PlatinumWireLength": 0.06, //铂丝长度(单位:米) + "PlatinumWireDiameter": 0.00006,//铂丝直径(单位:米) "ReportOutputPath": "Reports\\", "DefaultSampleVolume": 40.0, "DefaultPressure": 0.0,