更新
This commit is contained in:
@@ -1310,14 +1310,14 @@ namespace TabletTester2025.ViewModels
|
||||
await _plc.WriteFloatAsync(_plcConfig.HardnessSudu, (float)HardnessSudu);
|
||||
await _plc.WriteFloatAsync(_plcConfig.HardnessWeiyi, (float)HardnessWeiyi);
|
||||
|
||||
bool completeWasActiveBeforeStart = await _plc.ReadCoilAsync(completeCoil);
|
||||
await PulseCoilAsync(startCoil);
|
||||
|
||||
if (completeWasActiveBeforeStart)
|
||||
await WaitForCoilStateAsync(completeCoil, false, TimeSpan.FromSeconds(10), "硬度完成信号未复位");
|
||||
|
||||
while (Phase == TestPhase.Running && _hardnessResults.Count < count)
|
||||
{
|
||||
bool completeWasActiveBeforeStart = await _plc.ReadCoilAsync(completeCoil);
|
||||
await PulseCoilAsync(startCoil);
|
||||
|
||||
if (completeWasActiveBeforeStart)
|
||||
await WaitForCoilStateAsync(completeCoil, false, TimeSpan.FromSeconds(10), "硬度完成信号未复位");
|
||||
|
||||
await WaitForCoilStateAsync(completeCoil, true, TimeSpan.FromSeconds(120), "等待硬度完成信号超时");
|
||||
double value = await ReadHardnessResultAsync();
|
||||
_hardnessResults.Add(value);
|
||||
|
||||
Reference in New Issue
Block a user