| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 | using Aitex.Core.RT.Device;using Aitex.Core.RT.Log;using MECF.Framework.Common.Equipment;using PunkHPX8_RT.Devices.AXIS;using PunkHPX8_RT.Devices.Facilities;using PunkHPX8_RT.Devices.VpwMain;using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace PunkHPX8_RT.Devices.VpwCell{    public class VpwRotationAxisInterLock : IAxisInterLock    {        #region 内部变量        private JetAxisBase _axis;        #endregion        #region 属性        /// <summary>        /// 模块名称        /// </summary>        public string Module { get { return _axis.Module; } }        /// <summary>        /// 子模块名称        /// </summary>        public string Name { get { return _axis.Name; } }        #endregion        /// <summary>        /// 构造函数        /// </summary>        /// <param name="Module"></param>        /// <param name="name"></param>        public VpwRotationAxisInterLock(JetAxisBase axis)        {            _axis = axis;        }        /// <summary>        /// GotoPosition判定前置条件        /// </summary>        /// <param name="station"></param>        /// <returns></returns>        public bool CheckGotoPosition(string station)        {            if (!_axis.IsHomed)            {                LOG.WriteLog(eEvent.ERR_AXIS, $"{Module}.{Name}", "axis is not home, Cannot execute GotoSavedPosition");                return false;            }            if (!_axis.IsSwitchOn)            {                LOG.WriteLog(eEvent.ERR_AXIS, $"{Module}.{Name}", "axis is switch off, Cannot execute GotoSavedPosition");                return false;            }            VpwMainDevice vpwCellDevice = DEVICE.GetDevice<VpwMainDevice>(ModuleName.VPWMain1.ToString());            if (vpwCellDevice != null)            {                if (vpwCellDevice.CommonData.ChamberOpened||!vpwCellDevice.CommonData.ChamberClosed)                {                    LOG.WriteLog(eEvent.ERR_AXIS, $"{Module}.{Name}", "chamber is not closed, Cannot execute GotoSavedPosition");                    return false;                }            }            return true;        }    }}
 |