更新
This commit is contained in:
@@ -1642,8 +1642,11 @@ namespace TabletTester2025.ViewModels
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await App.Current.Dispatcher.InvokeAsync(() =>
|
||||
MessageBox.Show($"硬度测试出错: {ex.Message}"));
|
||||
if (!IsHardnessCompleteResetTimeout(ex))
|
||||
{
|
||||
await App.Current.Dispatcher.InvokeAsync(() =>
|
||||
MessageBox.Show($"硬度测试出错: {ex.Message}"));
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -1668,6 +1671,12 @@ namespace TabletTester2025.ViewModels
|
||||
: (ushort)70;
|
||||
}
|
||||
|
||||
private static bool IsHardnessCompleteResetTimeout(Exception ex)
|
||||
{
|
||||
return ex is TimeoutException
|
||||
&& string.Equals(ex.Message, "硬度完成信号未复位", StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
private ushort ResolveHardnessLiveForceRegister()
|
||||
{
|
||||
return _plcConfig.HardnessShishilizhi != 0
|
||||
@@ -2151,7 +2160,7 @@ namespace TabletTester2025.ViewModels
|
||||
|
||||
try
|
||||
{
|
||||
await PulseCoilAsync(_plcConfig.DisintegrationResetCoil);
|
||||
await PulseCoilAsync(ResolveDisintegrationResetCoil());
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -2171,6 +2180,13 @@ namespace TabletTester2025.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
private ushort ResolveDisintegrationResetCoil()
|
||||
{
|
||||
return _plcConfig.DisintegrationResetCoil != 0
|
||||
? _plcConfig.DisintegrationResetCoil
|
||||
: (ushort)100;
|
||||
}
|
||||
|
||||
private async Task StartDissolution1Async()
|
||||
{
|
||||
if (_isDissolution1Running)
|
||||
|
||||
Reference in New Issue
Block a user