更新
This commit is contained in:
@@ -187,6 +187,12 @@ namespace COFTester.Models
|
||||
public ushort ForceCoefficientRegister { get; set; } = 1320; // D1320 拉力系數 (N/V),Float,2個寄存器
|
||||
public ushort ForceProtectionRegister { get; set; } = 1322; // D1322 拉力保護 (N),Float,2個寄存器
|
||||
|
||||
// === 基本測試參數寄存器(新增)===
|
||||
public ushort HorizontalTestSpeedRegister { get; set; } = 370; // D370 水平測試速度 (mm/min),Float,2個寄存器
|
||||
public ushort HorizontalTestDisplacementRegister { get; set; } = 380; // D380 水平測試位移 (mm),Float,2個寄存器
|
||||
public ushort VerticalTestSpeedRegister { get; set; } = 330; // D330 升降測試速度 (mm/min),Float,2個寄存器
|
||||
public ushort VerticalTestDisplacementRegister { get; set; } = 340; // D340 升降測試位移 (mm),Float,2個寄存器
|
||||
|
||||
// === 校準寄存器(寫入)===
|
||||
public ushort CalibrationRegister { get; set; } = 1300; // 校準命令寄存器 M1300
|
||||
|
||||
@@ -237,6 +243,12 @@ namespace COFTester.Models
|
||||
public ushort ForceCoefficientRegister { get; set; } = 1320; // D1320 拉力系數 (N/V),Float,2個寄存器
|
||||
public ushort ForceProtectionRegister { get; set; } = 1322; // D1322 拉力保護 (N),Float,2個寄存器
|
||||
|
||||
// === 基本測試參數寄存器(新增)===
|
||||
public ushort HorizontalTestSpeedRegister { get; set; } = 370; // D370 水平測試速度 (mm/min),Float,2個寄存器
|
||||
public ushort HorizontalTestDisplacementRegister { get; set; } = 380; // D380 水平測試位移 (mm),Float,2個寄存器
|
||||
public ushort VerticalTestSpeedRegister { get; set; } = 330; // D330 升降測試速度 (mm/min),Float,2個寄存器
|
||||
public ushort VerticalTestDisplacementRegister { get; set; } = 340; // D340 升降測試位移 (mm),Float,2個寄存器
|
||||
|
||||
// === 校準寄存器(寫入)===
|
||||
public ushort CalibrationRegister { get; set; } = 1300; // 校準命令寄存器 M1300
|
||||
|
||||
|
||||
@@ -53,6 +53,12 @@ namespace COFTester.Models
|
||||
private double _forceCoefficient = 0.0;
|
||||
private double _forceProtection = 0.0;
|
||||
|
||||
// 基本测试参数(新增)- 不设置默认值,从寄存器读取
|
||||
private double _horizontalTestSpeed = 0.0;
|
||||
private double _horizontalTestDisplacement = 0.0;
|
||||
private double _verticalTestSpeed = 0.0;
|
||||
private double _verticalTestDisplacement = 0.0;
|
||||
|
||||
// 方向控制
|
||||
private bool _directionUp = true;
|
||||
private bool _directionDown = false;
|
||||
@@ -181,6 +187,31 @@ namespace COFTester.Models
|
||||
set { _forceProtection = value; OnPropertyChanged(); }
|
||||
}
|
||||
|
||||
// 基本测试参数属性(新增)
|
||||
public double HorizontalTestSpeed
|
||||
{
|
||||
get => _horizontalTestSpeed;
|
||||
set { _horizontalTestSpeed = value; OnPropertyChanged(); }
|
||||
}
|
||||
|
||||
public double HorizontalTestDisplacement
|
||||
{
|
||||
get => _horizontalTestDisplacement;
|
||||
set { _horizontalTestDisplacement = value; OnPropertyChanged(); }
|
||||
}
|
||||
|
||||
public double VerticalTestSpeed
|
||||
{
|
||||
get => _verticalTestSpeed;
|
||||
set { _verticalTestSpeed = value; OnPropertyChanged(); }
|
||||
}
|
||||
|
||||
public double VerticalTestDisplacement
|
||||
{
|
||||
get => _verticalTestDisplacement;
|
||||
set { _verticalTestDisplacement = value; OnPropertyChanged(); }
|
||||
}
|
||||
|
||||
// 方向控制属性
|
||||
public bool DirectionUp
|
||||
{
|
||||
|
||||
@@ -151,6 +151,13 @@ namespace COFTester.Resources
|
||||
["HorizontalLimit"] = "水平极限",
|
||||
["ForceCoefficient"] = "拉力系数",
|
||||
["ForceProtection"] = "拉力保护",
|
||||
|
||||
// 基本测试参数(新增)
|
||||
["HorizontalTestSpeed"] = "水平测试速度",
|
||||
["HorizontalTestDisplacement"] = "水平测试位移",
|
||||
["VerticalTestSpeed"] = "升降测试速度",
|
||||
["VerticalTestDisplacement"] = "升降测试位移",
|
||||
|
||||
["DirectionControl"] = "方向控制",
|
||||
["VerticalControl"] = "升降控制",
|
||||
["HorizontalControl"] = "水平控制",
|
||||
@@ -302,6 +309,13 @@ namespace COFTester.Resources
|
||||
["HorizontalLimit"] = "Horizontal Limit",
|
||||
["ForceCoefficient"] = "Force Coefficient",
|
||||
["ForceProtection"] = "Force Protection",
|
||||
|
||||
// Basic Test Parameters (New)
|
||||
["HorizontalTestSpeed"] = "Horizontal Test Speed",
|
||||
["HorizontalTestDisplacement"] = "Horizontal Test Displacement",
|
||||
["VerticalTestSpeed"] = "Vertical Test Speed",
|
||||
["VerticalTestDisplacement"] = "Vertical Test Displacement",
|
||||
|
||||
["DirectionControl"] = "Direction Control",
|
||||
["VerticalControl"] = "Vertical Control",
|
||||
["HorizontalControl"] = "Horizontal Control",
|
||||
@@ -447,6 +461,13 @@ namespace COFTester.Resources
|
||||
public string HorizontalLimit => GetString("HorizontalLimit");
|
||||
public string ForceCoefficient => GetString("ForceCoefficient");
|
||||
public string ForceProtection => GetString("ForceProtection");
|
||||
|
||||
// Basic Test Parameters (New)
|
||||
public string HorizontalTestSpeed => GetString("HorizontalTestSpeed");
|
||||
public string HorizontalTestDisplacement => GetString("HorizontalTestDisplacement");
|
||||
public string VerticalTestSpeed => GetString("VerticalTestSpeed");
|
||||
public string VerticalTestDisplacement => GetString("VerticalTestDisplacement");
|
||||
|
||||
public string DirectionControl => GetString("DirectionControl");
|
||||
public string VerticalControl => GetString("VerticalControl");
|
||||
public string HorizontalControl => GetString("HorizontalControl");
|
||||
@@ -591,6 +612,13 @@ namespace COFTester.Resources
|
||||
OnPropertyChanged(nameof(HorizontalLimit));
|
||||
OnPropertyChanged(nameof(ForceCoefficient));
|
||||
OnPropertyChanged(nameof(ForceProtection));
|
||||
|
||||
// Basic Test Parameters (New)
|
||||
OnPropertyChanged(nameof(HorizontalTestSpeed));
|
||||
OnPropertyChanged(nameof(HorizontalTestDisplacement));
|
||||
OnPropertyChanged(nameof(VerticalTestSpeed));
|
||||
OnPropertyChanged(nameof(VerticalTestDisplacement));
|
||||
|
||||
OnPropertyChanged(nameof(DirectionControl));
|
||||
OnPropertyChanged(nameof(VerticalControl));
|
||||
OnPropertyChanged(nameof(HorizontalControl));
|
||||
|
||||
@@ -196,6 +196,8 @@
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- 第一行:水平手动速度 | 水平手动位移 -->
|
||||
@@ -281,6 +283,48 @@
|
||||
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,8,0" IsHitTestVisible="False"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
<!-- 第五行:水平测试速度 | 水平测试位移 -->
|
||||
<StackPanel Grid.Row="4" Grid.Column="0" Margin="0,12,0,12">
|
||||
<TextBlock Text="{Binding Lang.HorizontalTestSpeed}" FontSize="12" Foreground="{StaticResource GrayBrush}" Margin="0,0,0,4"/>
|
||||
<Grid>
|
||||
<TextBox Text="{Binding ConfigParams.HorizontalTestSpeed, UpdateSourceTrigger=PropertyChanged}"
|
||||
Height="36" FontSize="13" Padding="8,0,65,0" VerticalContentAlignment="Center"/>
|
||||
<TextBlock Text="mm/min" FontSize="11" Foreground="{StaticResource GrayBrush}"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,8,0" IsHitTestVisible="False"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="4" Grid.Column="2" Margin="0,12,0,12">
|
||||
<TextBlock Text="{Binding Lang.HorizontalTestDisplacement}" FontSize="12" Foreground="{StaticResource GrayBrush}" Margin="0,0,0,4"/>
|
||||
<Grid>
|
||||
<TextBox Text="{Binding ConfigParams.HorizontalTestDisplacement, UpdateSourceTrigger=PropertyChanged}"
|
||||
Height="36" FontSize="13" Padding="8,0,40,0" VerticalContentAlignment="Center"/>
|
||||
<TextBlock Text="mm" FontSize="11" Foreground="{StaticResource GrayBrush}"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,8,0" IsHitTestVisible="False"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
<!-- 第六行:升降测试速度 | 升降测试位移 -->
|
||||
<StackPanel Grid.Row="5" Grid.Column="0" Margin="0,0,0,0">
|
||||
<TextBlock Text="{Binding Lang.VerticalTestSpeed}" FontSize="12" Foreground="{StaticResource GrayBrush}" Margin="0,0,0,4"/>
|
||||
<Grid>
|
||||
<TextBox Text="{Binding ConfigParams.VerticalTestSpeed, UpdateSourceTrigger=PropertyChanged}"
|
||||
Height="36" FontSize="13" Padding="8,0,65,0" VerticalContentAlignment="Center"/>
|
||||
<TextBlock Text="mm/min" FontSize="11" Foreground="{StaticResource GrayBrush}"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,8,0" IsHitTestVisible="False"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="5" Grid.Column="2" Margin="0,0,0,0">
|
||||
<TextBlock Text="{Binding Lang.VerticalTestDisplacement}" FontSize="12" Foreground="{StaticResource GrayBrush}" Margin="0,0,0,4"/>
|
||||
<Grid>
|
||||
<TextBox Text="{Binding ConfigParams.VerticalTestDisplacement, UpdateSourceTrigger=PropertyChanged}"
|
||||
Height="36" FontSize="13" Padding="8,0,40,0" VerticalContentAlignment="Center"/>
|
||||
<TextBlock Text="mm" FontSize="11" Foreground="{StaticResource GrayBrush}"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,8,0" IsHitTestVisible="False"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
"HorizontalLimitRegister": 292,
|
||||
"ForceCoefficientRegister": 1320,
|
||||
"ForceProtectionRegister": 1322,
|
||||
"HorizontalTestSpeedRegister": 370,
|
||||
"HorizontalTestDisplacementRegister": 380,
|
||||
"VerticalTestSpeedRegister": 330,
|
||||
"VerticalTestDisplacementRegister": 340,
|
||||
"CalibrationRegister": 1300,
|
||||
"RetryCount": 3,
|
||||
"RetryDelay": 500
|
||||
@@ -54,6 +58,10 @@
|
||||
"HorizontalLimitRegister": 292,
|
||||
"ForceCoefficientRegister": 1320,
|
||||
"ForceProtectionRegister": 1322,
|
||||
"HorizontalTestSpeedRegister": 370,
|
||||
"HorizontalTestDisplacementRegister": 380,
|
||||
"VerticalTestSpeedRegister": 330,
|
||||
"VerticalTestDisplacementRegister": 340,
|
||||
"CalibrationRegister": 1300,
|
||||
"RetryCount": 3,
|
||||
"RetryDelay": 500
|
||||
@@ -92,6 +100,10 @@
|
||||
"HorizontalLimit": 200,
|
||||
"ForceCoefficient": 1,
|
||||
"ForceProtection": 500,
|
||||
"HorizontalTestSpeed": 0,
|
||||
"HorizontalTestDisplacement": 0,
|
||||
"VerticalTestSpeed": 0,
|
||||
"VerticalTestDisplacement": 0,
|
||||
"DirectionUp": true,
|
||||
"DirectionDown": false,
|
||||
"DirectionRight": true,
|
||||
|
||||
Reference in New Issue
Block a user