LoaderTransPorterElevatorAxisInterLock.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. using Aitex.Core.RT.DataCenter;
  2. using Aitex.Core.RT.Device;
  3. using Aitex.Core.RT.Log;
  4. using CyberX8_Core;
  5. using CyberX8_RT.Devices.AXIS;
  6. using CyberX8_RT.Devices.AXIS.Yaskawa;
  7. using MECF.Framework.Common.Utilities;
  8. using MECF.Framework.Common.WaferHolder;
  9. using System;
  10. using System.Collections.Generic;
  11. using System.Linq;
  12. using System.Text;
  13. using System.Threading.Tasks;
  14. namespace CyberX8_RT.Devices.TransPorter
  15. {
  16. public class LoaderTransPorterElevatorAxisInterLock : IAxisInterLock
  17. {
  18. #region 内部变量
  19. private JetAxisBase _axis;
  20. #endregion
  21. #region 属性
  22. /// <summary>
  23. /// 模块名称
  24. /// </summary>
  25. public string Module { get { return _axis.Module; } }
  26. /// <summary>
  27. /// 子模块名称
  28. /// </summary>
  29. public string Name { get { return _axis.Name; } }
  30. #endregion
  31. /// <summary>
  32. /// 栣函数
  33. /// </summary>
  34. /// <param name="moduleName"></param>
  35. /// <param name="name"></param>
  36. public LoaderTransPorterElevatorAxisInterLock(JetAxisBase axis)
  37. {
  38. _axis = axis;
  39. }
  40. /// <summary>
  41. /// GotoPosition条件检验
  42. /// </summary>
  43. /// <param name="station"></param>
  44. /// <returns></returns>
  45. /// <exception cref="NotImplementedException"></exception>
  46. public bool CheckGotoPosition(string station)
  47. {
  48. if (!AxisManager.Instance.CheckModuleAxisSwitchOn(Module, Name))
  49. {
  50. return false;
  51. }
  52. JetAxisBase gantryAxis = DEVICE.GetDevice<JetAxisBase>($"{Module}.Gantry");
  53. if (gantryAxis != null)
  54. {
  55. if (gantryAxis.IsRun)
  56. {
  57. LOG.WriteLog(eEvent.ERR_AXIS, Module, "Gantry Axis is Run");
  58. return false;
  59. }
  60. }
  61. return true;
  62. }
  63. }
  64. }