Compare commits
2 Commits
db8d255fdd
...
9c7698e9cc
| Author | SHA1 | Date | |
|---|---|---|---|
| 9c7698e9cc | |||
| 75d9405770 |
BIN
L028需要采购给客户寄过去,不需要增加清单.xlsx
Normal file
BIN
L028需要采购给客户寄过去,不需要增加清单.xlsx
Normal file
Binary file not shown.
@@ -89,6 +89,6 @@ public class CalibrationCoefficients
|
|||||||
public ushort PressureProtection { get; set; }
|
public ushort PressureProtection { get; set; }
|
||||||
public ushort TemperatureCoefficient { get; set; }
|
public ushort TemperatureCoefficient { get; set; }
|
||||||
public ushort ResistanceCoefficient { get; set; }
|
public ushort ResistanceCoefficient { get; set; }
|
||||||
public double ThermalConductivityCorrection { get; set; } = 47.305349f;//蒸馏水 比热率修正
|
public double ThermalConductivityCorrection { get; set; } = 17.305349f;//蒸馏水 比热率修正
|
||||||
public double ThermalDiffusivityCorrection { get; set; } = 0.3469589023611997;//导热率修正
|
public double ThermalDiffusivityCorrection { get; set; } = 0.158682538;//导热率修正
|
||||||
}
|
}
|
||||||
@@ -283,7 +283,7 @@ public partial class D7896ViewModel : ObservableObject
|
|||||||
int requiredCount = _config.TestParameters.MeasurementCount; // 需要多少有效数据
|
int requiredCount = _config.TestParameters.MeasurementCount; // 需要多少有效数据
|
||||||
int validCount = 0;
|
int validCount = 0;
|
||||||
int attemptCount = 0;
|
int attemptCount = 0;
|
||||||
int maxAttempts = requiredCount * 2; // 最多尝试次数,防止死循环
|
int maxAttempts = requiredCount * 3; // 最多尝试次数,防止死循环
|
||||||
|
|
||||||
// 存储每次成功测量的结果(用于后续异常判断)
|
// 存储每次成功测量的结果(用于后续异常判断)
|
||||||
List<double> validLambdaList = new List<double>();
|
List<double> validLambdaList = new List<double>();
|
||||||
@@ -444,7 +444,7 @@ public partial class D7896ViewModel : ObservableObject
|
|||||||
// 测量间隔(即使舍弃也等待,让样品恢复)
|
// 测量间隔(即使舍弃也等待,让样品恢复)
|
||||||
if (validCount < requiredCount && !_stopRequested && attemptCount < maxAttempts)
|
if (validCount < requiredCount && !_stopRequested && attemptCount < maxAttempts)
|
||||||
{
|
{
|
||||||
try { await Task.Delay(_config.TestParameters.IntervalSeconds * 1000, _testCts.Token); } catch (OperationCanceledException) { break; }
|
try { await Task.Delay(_config.TestParameters.IntervalSeconds * 200, _testCts.Token); } catch (OperationCanceledException) { break; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<GroupBox Header="串口设置" Grid.Row="0" Margin="5">
|
<GroupBox Header="串口设置" Grid.Row="0" Margin="5">
|
||||||
<StackPanel Orientation="Horizontal" Margin="5">
|
<StackPanel Orientation="Horizontal" Margin="5">
|
||||||
<Label Content="端口:"/>
|
<Label Content="端口:"/>
|
||||||
<ComboBox x:Name="cmbPort" Width="80" IsEditable="True"/>
|
<ComboBox x:Name="cmbPort" Width="80" IsEditable="True" Text="COM2"/>
|
||||||
<Label Content="波特率:" Margin="10,0,0,0"/>
|
<Label Content="波特率:" Margin="10,0,0,0"/>
|
||||||
<ComboBox x:Name="cmbBaudrate" Width="80" SelectedIndex="1">
|
<ComboBox x:Name="cmbBaudrate" Width="80" SelectedIndex="1">
|
||||||
<ComboBoxItem>9600</ComboBoxItem>
|
<ComboBoxItem>9600</ComboBoxItem>
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
<RadioButton x:Name="rb50Hz" Content="50 Hz" GroupName="Freq" IsChecked="True" Margin="5,0,15,0"/>
|
<RadioButton x:Name="rb50Hz" Content="50 Hz" GroupName="Freq" IsChecked="True" Margin="5,0,15,0"/>
|
||||||
<RadioButton x:Name="rb60Hz" Content="60 Hz" GroupName="Freq"/>
|
<RadioButton x:Name="rb60Hz" Content="60 Hz" GroupName="Freq"/>
|
||||||
<Label Content="设定电流 (A):" Margin="20,0,0,0"/>
|
<Label Content="设定电流 (A):" Margin="20,0,0,0"/>
|
||||||
<TextBox x:Name="txtSetCurrent" Text="0.720" Width="80" TextAlignment="Center"/>
|
<TextBox x:Name="txtSetCurrent" Text="0.9" Width="80" TextAlignment="Center"/>
|
||||||
<Label Content="A"/>
|
<Label Content="A"/>
|
||||||
<Button x:Name="btnSet" Content="直接设定" Click="BtnSet_Click" Width="80" Margin="10,0,0,0"/>
|
<Button x:Name="btnSet" Content="直接设定" Click="BtnSet_Click" Width="80" Margin="10,0,0,0"/>
|
||||||
<Button x:Name="btnStop" Content="禁止输出" Click="BtnStop_Click" Width="80" Margin="5,0,0,0"/>
|
<Button x:Name="btnStop" Content="禁止输出" Click="BtnStop_Click" Width="80" Margin="5,0,0,0"/>
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ namespace ConstantCurrentControl
|
|||||||
_readTimer = new DispatcherTimer();
|
_readTimer = new DispatcherTimer();
|
||||||
_readTimer.Interval = TimeSpan.FromMilliseconds(50);
|
_readTimer.Interval = TimeSpan.FromMilliseconds(50);
|
||||||
_readTimer.Tick += ReadTimer_Tick;
|
_readTimer.Tick += ReadTimer_Tick;
|
||||||
|
cmbPort.Text = "COM2";
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 串口连接
|
#region 串口连接
|
||||||
|
|||||||
@@ -29,8 +29,8 @@
|
|||||||
//"PlatinumWireDiameter": 0.000032,
|
//"PlatinumWireDiameter": 0.000032,
|
||||||
//"PlatinumWireLength": 0.056, //铂丝长度(单位:米)
|
//"PlatinumWireLength": 0.056, //铂丝长度(单位:米)
|
||||||
//"PlatinumWireDiameter": 0.00006,
|
//"PlatinumWireDiameter": 0.00006,
|
||||||
"PlatinumWireLength": 0.04, //铂丝长度(单位:米)
|
"PlatinumWireLength": 0.035, //铂丝长度(单位:米)
|
||||||
"PlatinumWireDiameter": 0.00006,
|
"PlatinumWireDiameter": 0.00010,
|
||||||
"ReportOutputPath": "Reports\\",
|
"ReportOutputPath": "Reports\\",
|
||||||
"DefaultSampleVolume": 40.0,
|
"DefaultSampleVolume": 40.0,
|
||||||
"DefaultPressure": 0.0,
|
"DefaultPressure": 0.0,
|
||||||
|
|||||||
Reference in New Issue
Block a user