parent
ae579128c1
commit
50d953803f
|
@ -161,7 +161,12 @@ namespace Aitex.Core.RT.Device.Devices
|
|||
/// </summary>
|
||||
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 _scDownPos;
|
||||
|
@ -301,7 +306,7 @@ namespace Aitex.Core.RT.Device.Devices
|
|||
if (!_doRingStop.SetValue(true, out reason))
|
||||
return false;
|
||||
|
||||
_timer.Start(500);
|
||||
_timerServoStop.Start(1000);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -339,7 +344,7 @@ namespace Aitex.Core.RT.Device.Devices
|
|||
if (!_doRingJogUp.SetValue(true, out reason))
|
||||
return false;
|
||||
|
||||
_timer.Start(500);
|
||||
_timerJogUp.Start(1000);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -367,7 +372,7 @@ namespace Aitex.Core.RT.Device.Devices
|
|||
if (!_doRingJogDown.SetValue(true, out reason))
|
||||
return false;
|
||||
|
||||
_timer.Start(500);
|
||||
_timerJogDown.Start(1000);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -422,7 +427,7 @@ namespace Aitex.Core.RT.Device.Devices
|
|||
return false;
|
||||
}
|
||||
|
||||
_timer.Start(500);
|
||||
_timerMoveUp.Start(1000);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -466,23 +471,47 @@ namespace Aitex.Core.RT.Device.Devices
|
|||
return false;
|
||||
}
|
||||
|
||||
_timer.Start(500);
|
||||
_timerMoveDown.Start(1000);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void HandleMonitor()
|
||||
{
|
||||
if (_timer.IsTimeout())
|
||||
if (_timerJogUp.IsTimeout())
|
||||
{
|
||||
_doRingJogUp.Value = false;
|
||||
_doRingJogDown.Value = false;
|
||||
_doRingMoveUp.Value = false;
|
||||
_doRingMoveDown.Value = false;
|
||||
_doRingServoReset.Value = false;
|
||||
_doRingStop.Value = false;
|
||||
_timerJogUp.Stop();
|
||||
}
|
||||
|
||||
_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))
|
||||
return;
|
||||
|
||||
_timer.Start(500);
|
||||
_timerServoReset.Start(1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue