diff --git a/DentistryHandpieces/MainWindow.xaml b/DentistryHandpieces/MainWindow.xaml
index f44a4c2..63a02c9 100644
--- a/DentistryHandpieces/MainWindow.xaml
+++ b/DentistryHandpieces/MainWindow.xaml
@@ -875,6 +875,7 @@
+
+
-
-
diff --git a/DentistryHandpieces/MainWindowViewModel.cs b/DentistryHandpieces/MainWindowViewModel.cs
index 4628d9c..16f6bb6 100644
--- a/DentistryHandpieces/MainWindowViewModel.cs
+++ b/DentistryHandpieces/MainWindowViewModel.cs
@@ -28,6 +28,7 @@ public sealed class MainWindowViewModel : ObservableObject
private const ushort SpeedTorqueForwardCoil = 1;
private const ushort AxialBackwardCoil = 2;
private const ushort AxialForwardCoil = 3;
+ private const ushort VentValveCoil = 6;
private const ushort AxialForceModeCoil = 30;
private const ushort AxialStartCoil = 70;
private const ushort AxialStopCoil = 73;
@@ -253,6 +254,7 @@ public sealed class MainWindowViewModel : ObservableObject
SelectAxialJumpForceSetpointModeCommand = new AsyncRelayCommand(SelectAxialJumpForceSetpointModeAsync);
ForwardSpeedTorqueCommand = new AsyncRelayCommand(ForwardSpeedTorqueAsync);
BackwardSpeedTorqueCommand = new AsyncRelayCommand(BackwardSpeedTorqueAsync);
+ VentValveCommand = new AsyncRelayCommand(TriggerVentValveAsync);
StartSpeedTorqueCommand = new AsyncRelayCommand(StartSpeedTorqueAsync);
StopSpeedTorqueCommand = new AsyncRelayCommand(StopSpeedTorqueAsync);
ResetSpeedTorqueCommand = new AsyncRelayCommand(ResetSpeedTorqueAsync);
@@ -309,6 +311,8 @@ public sealed class MainWindowViewModel : ObservableObject
public IAsyncRelayCommand BackwardSpeedTorqueCommand { get; }
+ public IAsyncRelayCommand VentValveCommand { get; }
+
public IAsyncRelayCommand StartSpeedTorqueCommand { get; }
public IAsyncRelayCommand StopSpeedTorqueCommand { get; }
@@ -2011,6 +2015,14 @@ public sealed class MainWindowViewModel : ObservableObject
await MoveSpeedTorqueDisplacementAsync("状态:后退");
}
+ private async Task TriggerVentValveAsync()
+ {
+ if (await PulsePlcAsync(VentValveCoil, "通气阀"))
+ {
+ StatusText = $"通气阀已触发,M{VentValveCoil}脉冲完成。";
+ }
+ }
+
private async Task SaveNoLoadSpeedSettingAsync()
{
if (!TryReadNonNegative(NoLoadSpeedSettingInput, "空载转速设置", out double setting, out string error))