Compare commits
2 Commits
d97616fc92
...
4aeb7eb1ee
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4aeb7eb1ee | ||
|
|
03d13120f9 |
@@ -231,21 +231,12 @@
|
|||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
CornerRadius="7"
|
CornerRadius="7"
|
||||||
SnapsToDevicePixels="True">
|
SnapsToDevicePixels="True">
|
||||||
<Grid>
|
<ContentPresenter HorizontalAlignment="Center"
|
||||||
<ContentPresenter HorizontalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
Margin="{TemplateBinding Padding}"
|
||||||
Margin="{TemplateBinding Padding}"
|
ContentSource="Header"
|
||||||
ContentSource="Header"
|
RecognizesAccessKey="True"
|
||||||
RecognizesAccessKey="True"
|
TextElement.Foreground="{TemplateBinding Foreground}" />
|
||||||
TextElement.Foreground="{TemplateBinding Foreground}" />
|
|
||||||
<Border x:Name="Accent"
|
|
||||||
Height="3"
|
|
||||||
Margin="14,0"
|
|
||||||
VerticalAlignment="Bottom"
|
|
||||||
Background="#0F766E"
|
|
||||||
CornerRadius="2"
|
|
||||||
Opacity="0" />
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
</Border>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<Trigger Property="IsMouseOver" Value="True">
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
@@ -254,11 +245,10 @@
|
|||||||
<Setter Property="Foreground" Value="#0F2F45" />
|
<Setter Property="Foreground" Value="#0F2F45" />
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="IsSelected" Value="True">
|
<Trigger Property="IsSelected" Value="True">
|
||||||
<Setter TargetName="Chrome" Property="Background" Value="#FFFFFF" />
|
<Setter TargetName="Chrome" Property="Background" Value="#0F766E" />
|
||||||
<Setter TargetName="Chrome" Property="BorderBrush" Value="#AFC1CF" />
|
<Setter TargetName="Chrome" Property="BorderBrush" Value="#0A5D56" />
|
||||||
<Setter Property="Foreground" Value="#0F4A66" />
|
<Setter Property="Foreground" Value="#FFFFFF" />
|
||||||
<Setter Property="FontWeight" Value="Bold" />
|
<Setter Property="FontWeight" Value="Bold" />
|
||||||
<Setter TargetName="Accent" Property="Opacity" Value="1" />
|
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="IsEnabled" Value="False">
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
<Setter TargetName="Chrome" Property="Opacity" Value="0.5" />
|
<Setter TargetName="Chrome" Property="Opacity" Value="0.5" />
|
||||||
@@ -1064,11 +1054,15 @@
|
|||||||
<Grid Grid.Row="1" Margin="0,14,0,0">
|
<Grid Grid.Row="1" Margin="0,14,0,0">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button Grid.Column="1"
|
<Button Content="{Binding NoLoadSpeedTestButtonText}"
|
||||||
Content="{Binding NoLoadSpeedTestButtonText}"
|
|
||||||
Command="{Binding RecordNoLoadSpeedCommand}"
|
Command="{Binding RecordNoLoadSpeedCommand}"
|
||||||
Style="{StaticResource StartButtonStyle}"
|
Style="{StaticResource StartButtonStyle}"
|
||||||
|
Margin="0,0,8,0" />
|
||||||
|
<Button Grid.Column="1"
|
||||||
|
Content="{Binding VentValveButtonText}"
|
||||||
|
Command="{Binding ToggleVentValveCommand}"
|
||||||
Margin="8,0,0,0" />
|
Margin="8,0,0,0" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ public sealed class MainWindowViewModel : ObservableObject
|
|||||||
private string _finalAxialForceText = "--";
|
private string _finalAxialForceText = "--";
|
||||||
private string _realtimeSpeedText = "0 r/min";
|
private string _realtimeSpeedText = "0 r/min";
|
||||||
private string _realtimeTorqueText = $"0.00 {TorqueUnit}";
|
private string _realtimeTorqueText = $"0.00 {TorqueUnit}";
|
||||||
private string _realtimePressureText = "0.000 MPa";
|
private string _realtimePressureText = "0.000 kPa";
|
||||||
private string _noLoadSpeedRecordText = "0 r/min";
|
private string _noLoadSpeedRecordText = "0 r/min";
|
||||||
private string _noLoadSpeedErrorRateText = "0.00 %";
|
private string _noLoadSpeedErrorRateText = "0.00 %";
|
||||||
private string _loadSpeedSettingInput = "0";
|
private string _loadSpeedSettingInput = "0";
|
||||||
@@ -1359,7 +1359,7 @@ public sealed class MainWindowViewModel : ObservableObject
|
|||||||
CreateRecordPoint("转速/扭矩实时测试", "压力系数", FormatConfigNumber(parameters.PressureCoefficient), string.Empty),
|
CreateRecordPoint("转速/扭矩实时测试", "压力系数", FormatConfigNumber(parameters.PressureCoefficient), string.Empty),
|
||||||
CreateRecordPoint("转速/扭矩实时测试", "末次采样转速", $"{FormatSpeed(lastSample?.RealtimeSpeedRpm ?? _realtimeSpeed)} r/min", "r/min"),
|
CreateRecordPoint("转速/扭矩实时测试", "末次采样转速", $"{FormatSpeed(lastSample?.RealtimeSpeedRpm ?? _realtimeSpeed)} r/min", "r/min"),
|
||||||
CreateRecordPoint("转速/扭矩实时测试", "末次采样扭矩", $"{FormatTorque(lastSample?.RealtimeTorqueMilliNewtonMeters ?? GetScaledTorque())} {TorqueUnit}", TorqueUnit),
|
CreateRecordPoint("转速/扭矩实时测试", "末次采样扭矩", $"{FormatTorque(lastSample?.RealtimeTorqueMilliNewtonMeters ?? GetScaledTorque())} {TorqueUnit}", TorqueUnit),
|
||||||
CreateRecordPoint("转速/扭矩实时测试", "末次采样压力", $"{FormatPressure(lastSample?.RealtimePressureMpa ?? _realtimePressure)} MPa", "MPa"),
|
CreateRecordPoint("转速/扭矩实时测试", "末次采样压力", $"{FormatPressure(lastSample?.RealtimePressureKpa ?? _realtimePressure)} kPa", "kPa"),
|
||||||
CreateRecordPoint("转速/扭矩实时测试", "最大扭矩采集", $"{FormatTorque(peakTorque)} {TorqueUnit}", TorqueUnit),
|
CreateRecordPoint("转速/扭矩实时测试", "最大扭矩采集", $"{FormatTorque(peakTorque)} {TorqueUnit}", TorqueUnit),
|
||||||
CreateRecordPoint("转速/扭矩实时测试", "最大位移", $"{FormatDisplacement(maxDisplacement)} mm", "mm"),
|
CreateRecordPoint("转速/扭矩实时测试", "最大位移", $"{FormatDisplacement(maxDisplacement)} mm", "mm"),
|
||||||
CreateRecordPoint("转速/扭矩实时测试", "最终位移", finalDisplacement.HasValue ? $"{FormatDisplacement(finalDisplacement.Value)} mm" : "--", "mm", finalDisplacement.HasValue ? "记录" : "待停止"),
|
CreateRecordPoint("转速/扭矩实时测试", "最终位移", finalDisplacement.HasValue ? $"{FormatDisplacement(finalDisplacement.Value)} mm" : "--", "mm", finalDisplacement.HasValue ? "记录" : "待停止"),
|
||||||
@@ -1600,7 +1600,7 @@ public sealed class MainWindowViewModel : ObservableObject
|
|||||||
"采集数据1-1(mm)", "采集数据1-2(mm)", "数据差值1(mm)",
|
"采集数据1-1(mm)", "采集数据1-2(mm)", "数据差值1(mm)",
|
||||||
"轴向力显示(N)", "1号当前位置(mm)", "1号相对位移(mm)",
|
"轴向力显示(N)", "1号当前位置(mm)", "1号相对位移(mm)",
|
||||||
$"最大扭矩采集({TorqueUnit})", $"扭矩显示({TorqueUnit})",
|
$"最大扭矩采集({TorqueUnit})", $"扭矩显示({TorqueUnit})",
|
||||||
"转速显示(r/min)", "压力显示(MPa)", "空载转速记录(r/min)",
|
"转速显示(r/min)", "压力显示(kPa)", "空载转速记录(r/min)",
|
||||||
"转速误差率(%)", "扭矩完成", "复位使能1号", "复位完成1号",
|
"转速误差率(%)", "扭矩完成", "复位使能1号", "复位完成1号",
|
||||||
"复位使能2号", "复位完成2号", "参数快照"
|
"复位使能2号", "复位完成2号", "参数快照"
|
||||||
];
|
];
|
||||||
@@ -1627,7 +1627,7 @@ public sealed class MainWindowViewModel : ObservableObject
|
|||||||
sheet.Cell(row, 14).Value = sample.SpeedTorquePeakTorqueMilliNewtonMeters;
|
sheet.Cell(row, 14).Value = sample.SpeedTorquePeakTorqueMilliNewtonMeters;
|
||||||
sheet.Cell(row, 15).Value = sample.RealtimeTorqueMilliNewtonMeters;
|
sheet.Cell(row, 15).Value = sample.RealtimeTorqueMilliNewtonMeters;
|
||||||
sheet.Cell(row, 16).Value = sample.RealtimeSpeedRpm;
|
sheet.Cell(row, 16).Value = sample.RealtimeSpeedRpm;
|
||||||
sheet.Cell(row, 17).Value = sample.RealtimePressureMpa;
|
sheet.Cell(row, 17).Value = sample.RealtimePressureKpa;
|
||||||
sheet.Cell(row, 18).Value = sample.NoLoadSpeedRpm;
|
sheet.Cell(row, 18).Value = sample.NoLoadSpeedRpm;
|
||||||
sheet.Cell(row, 19).Value = sample.NoLoadSpeedErrorRatePercent;
|
sheet.Cell(row, 19).Value = sample.NoLoadSpeedErrorRatePercent;
|
||||||
sheet.Cell(row, 20).Value = sample.SpeedTorqueDone ? 1 : 0;
|
sheet.Cell(row, 20).Value = sample.SpeedTorqueDone ? 1 : 0;
|
||||||
@@ -3398,7 +3398,7 @@ public sealed class MainWindowViewModel : ObservableObject
|
|||||||
{
|
{
|
||||||
RealtimeSpeedText = $"{FormatSpeed(_realtimeSpeed)} r/min";
|
RealtimeSpeedText = $"{FormatSpeed(_realtimeSpeed)} r/min";
|
||||||
RealtimeTorqueText = $"{FormatTorque(GetScaledTorque())} {TorqueUnit}";
|
RealtimeTorqueText = $"{FormatTorque(GetScaledTorque())} {TorqueUnit}";
|
||||||
RealtimePressureText = $"{FormatPressure(_realtimePressure)} MPa";
|
RealtimePressureText = $"{FormatPressure(_realtimePressure)} kPa";
|
||||||
string finalSpeed = _finalSpeed.HasValue ? $"{FormatSpeed(_finalSpeed.Value)} r/min" : "--";
|
string finalSpeed = _finalSpeed.HasValue ? $"{FormatSpeed(_finalSpeed.Value)} r/min" : "--";
|
||||||
string finalTorque = _finalTorque.HasValue ? $"{FormatTorque(_finalTorque.Value)} {TorqueUnit}" : "--";
|
string finalTorque = _finalTorque.HasValue ? $"{FormatTorque(_finalTorque.Value)} {TorqueUnit}" : "--";
|
||||||
FinalSpeedTorqueText = $"最终:{finalSpeed} / {finalTorque}";
|
FinalSpeedTorqueText = $"最终:{finalSpeed} / {finalTorque}";
|
||||||
@@ -3630,7 +3630,7 @@ public sealed class MainWindowViewModel : ObservableObject
|
|||||||
SpeedTorquePeakTorqueMilliNewtonMeters = _speedTorquePeakTorque,
|
SpeedTorquePeakTorqueMilliNewtonMeters = _speedTorquePeakTorque,
|
||||||
RealtimeTorqueMilliNewtonMeters = GetScaledTorque(),
|
RealtimeTorqueMilliNewtonMeters = GetScaledTorque(),
|
||||||
RealtimeSpeedRpm = _realtimeSpeed,
|
RealtimeSpeedRpm = _realtimeSpeed,
|
||||||
RealtimePressureMpa = _realtimePressure,
|
RealtimePressureKpa = _realtimePressure,
|
||||||
NoLoadSpeedRpm = _noLoadSpeedRecord,
|
NoLoadSpeedRpm = _noLoadSpeedRecord,
|
||||||
NoLoadSpeedErrorRatePercent = _noLoadSpeedErrorRate,
|
NoLoadSpeedErrorRatePercent = _noLoadSpeedErrorRate,
|
||||||
SpeedTorqueDone = ReadCoilValue(coilValues, SpeedTorqueDoneCoil),
|
SpeedTorqueDone = ReadCoilValue(coilValues, SpeedTorqueDoneCoil),
|
||||||
|
|||||||
@@ -296,7 +296,7 @@ public sealed class RealtimeSamplePayload
|
|||||||
|
|
||||||
public double RealtimeSpeedRpm { get; init; }
|
public double RealtimeSpeedRpm { get; init; }
|
||||||
|
|
||||||
public double RealtimePressureMpa { get; init; }
|
public double RealtimePressureKpa { get; init; }
|
||||||
|
|
||||||
public double NoLoadSpeedRpm { get; init; }
|
public double NoLoadSpeedRpm { get; init; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user