1.分开隔热罩Do复位Timer

2.复位时间由500ms改为1s
This commit is contained in:
HCL 2024-10-12 13:23:18 +08:00
parent ae579128c1
commit 50d953803f
1 changed files with 43 additions and 14 deletions

View File

@ -161,7 +161,12 @@ namespace Aitex.Core.RT.Device.Devices
/// </summary> /// </summary>
public bool RingInpDown => DoubleUtil.IsEqual(RingCurPos, RingDownPos); public bool RingInpDown => DoubleUtil.IsEqual(RingCurPos, RingDownPos);
private DeviceTimer _timer = new DeviceTimer(); private DeviceTimer _timerServoStop = new DeviceTimer();
private DeviceTimer _timerJogUp = new DeviceTimer();
private DeviceTimer _timerJogDown = new DeviceTimer();
private DeviceTimer _timerMoveUp = new DeviceTimer();
private DeviceTimer _timerMoveDown = new DeviceTimer();
private DeviceTimer _timerServoReset = new DeviceTimer();
private SCConfigItem _scUpPos; private SCConfigItem _scUpPos;
private SCConfigItem _scDownPos; private SCConfigItem _scDownPos;
@ -301,7 +306,7 @@ namespace Aitex.Core.RT.Device.Devices
if (!_doRingStop.SetValue(true, out reason)) if (!_doRingStop.SetValue(true, out reason))
return false; return false;
_timer.Start(500); _timerServoStop.Start(1000);
return true; return true;
} }
@ -339,7 +344,7 @@ namespace Aitex.Core.RT.Device.Devices
if (!_doRingJogUp.SetValue(true, out reason)) if (!_doRingJogUp.SetValue(true, out reason))
return false; return false;
_timer.Start(500); _timerJogUp.Start(1000);
return true; return true;
} }
@ -367,7 +372,7 @@ namespace Aitex.Core.RT.Device.Devices
if (!_doRingJogDown.SetValue(true, out reason)) if (!_doRingJogDown.SetValue(true, out reason))
return false; return false;
_timer.Start(500); _timerJogDown.Start(1000);
return true; return true;
} }
@ -422,7 +427,7 @@ namespace Aitex.Core.RT.Device.Devices
return false; return false;
} }
_timer.Start(500); _timerMoveUp.Start(1000);
return true; return true;
} }
@ -466,23 +471,47 @@ namespace Aitex.Core.RT.Device.Devices
return false; return false;
} }
_timer.Start(500); _timerMoveDown.Start(1000);
return true; return true;
} }
protected override void HandleMonitor() protected override void HandleMonitor()
{ {
if (_timer.IsTimeout()) if (_timerJogUp.IsTimeout())
{ {
_doRingJogUp.Value = false; _doRingJogUp.Value = false;
_doRingJogDown.Value = false; _timerJogUp.Stop();
_doRingMoveUp.Value = false; }
_doRingMoveDown.Value = false;
_doRingServoReset.Value = false;
_doRingStop.Value = false;
_timer.Stop(); if (_timerJogDown.IsTimeout())
{
_doRingJogDown.Value = false;
_timerJogDown.Stop();
}
if (_timerMoveUp.IsTimeout())
{
_doRingMoveUp.Value = false;
_timerMoveUp.Stop();
}
if (_timerMoveDown.IsTimeout())
{
_doRingMoveDown.Value = false;
_timerMoveDown.Stop();
}
if (_timerServoStop.IsTimeout())
{
_doRingStop.Value = false;
_timerServoStop.Stop();
}
if (_timerServoReset.IsTimeout())
{
_doRingServoReset.Value = false;
_timerServoReset.Stop();
} }
} }
@ -496,7 +525,7 @@ namespace Aitex.Core.RT.Device.Devices
if (!_doRingServoReset.SetValue(true, out reason)) if (!_doRingServoReset.SetValue(true, out reason))
return; return;
_timer.Start(500); _timerServoReset.Start(1000);
} }
} }
} }