1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- using Aitex.Core.RT.Log;
- using CyberX8_RT.Devices.AXIS;
- using CyberX8_RT.Devices.AXIS.Yaskawa;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace CyberX8_RT.Devices.Loader
- {
- public class LoaderCRSAxisInterLock : IAxisInterLock
- {
- #region 内部变量
- private JetAxisBase _axis;
- #endregion
- #region 属性
-
-
-
- public string Module { get { return _axis.Module; } }
-
-
-
- public string Name { get { return _axis.Name; } }
- #endregion
-
-
-
-
-
- public LoaderCRSAxisInterLock(JetAxisBase axis)
- {
- _axis = axis;
- }
-
-
-
-
-
- public bool CheckGotoPosition(string station)
- {
- if (!_axis.IsSwitchOn)
- {
- LOG.WriteLog(eEvent.ERR_LOADER, Module, $"{Name} is switch off, Cannot execute GotoSavedPosition");
- return false;
- }
- if (!_axis.IsHomed)
- {
- LOG.WriteLog(eEvent.ERR_LOADER, Module, $"{Name} is not home, Cannot execute GotoSavedPosition");
- return false;
- }
- if (_axis.Status==CyberX8_Core.RState.Running)
- {
- LOG.WriteLog(eEvent.ERR_LOADER, Module, $"{Name} status is running, Cannot execute GotoSavedPosition");
- return false;
- }
- return true;
- }
- }
- }
|