using Aitex.Core.RT.Device; using Aitex.Core.RT.Log; using CyberX8_RT.Devices.AXIS; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CyberX8_RT.Devices.SRD { public class SrdRotationAxisInterLock : IAxisInterLock { #region 内部变量 private JetAxisBase _axis; #endregion #region 属性 /// /// 模块名称 /// public string Module { get { return _axis.Module; } } /// /// 子模块名称 /// public string Name { get { return _axis.Name; } } #endregion /// /// 构造函数 /// /// /// public SrdRotationAxisInterLock(JetAxisBase axis) { _axis = axis; } public bool CheckGotoPosition(string station) { if (!_axis.IsHomed) { LOG.WriteLog(eEvent.ERR_PUF, Module, "axis is not home, Cannot execute GotoSavedPosition"); return false; } if (!_axis.IsSwitchOn) { LOG.WriteLog(eEvent.ERR_PUF, Module, "axis is switch off, Cannot execute GotoSavedPosition"); return false; } SrdCommonDevice common = DEVICE.GetDevice($"{Module}.Common"); if(!common.CommonData.DoorClosed) { LOG.WriteLog(eEvent.ERR_SRD, Module, "Door is not closed,Rotation can not position"); return false; } return true; } } }