EfemDualEquipment.cs 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. using Aitex.Core.RT.DataCenter;
  2. using Aitex.Core.RT.Device;
  3. using Aitex.Core.RT.Event;
  4. using Aitex.Core.RT.Fsm;
  5. using Aitex.Core.RT.OperationCenter;
  6. using Aitex.Core.Util;
  7. using Aitex.Core.Utilities;
  8. using Aitex.Sorter.Common;
  9. using EfemDualRT.Equipments.Devices;
  10. using EfemDualSchedulerLib;
  11. using FutureEfemLib;
  12. using JetMainframe;
  13. using JetMainframe.LLs;
  14. using JetMainframe.TMs;
  15. using JetVirgoPM;
  16. using JetVirgoPM.PMs;
  17. using MECF.Framework.Common.Equipment;
  18. using MECF.Framework.Common.Schedulers;
  19. using MECF.Framework.Common.SubstrateTrackings;
  20. using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Robots.JEL;
  21. using MECF.Framework.RT.ModuleLibrary.LLModules;
  22. using MECF.Framework.RT.ModuleLibrary.PMModules;
  23. using MECF.Framework.RT.ModuleLibrary.SystemModules;
  24. namespace EfemDualRT.Equipments.Systems
  25. {
  26. public class EfemDualEquipment : EquipmentManager
  27. {
  28. private DeviceManagerBase _device;
  29. private DeviceController _controller;
  30. public EfemDualEquipment()
  31. {
  32. _controller = new DeviceController();
  33. _device = new DeviceManagerBase(true);
  34. }
  35. public override bool Initialize()
  36. {
  37. base.Initialize();
  38. Singleton<EventManager>.Instance.OnAlarmEvent += Instance_OnAlarmEvent;
  39. _device.AddCustomDevice(new IOMonitorDevice());
  40. _controller.Start(_device);
  41. return true;
  42. }
  43. private void Instance_OnAlarmEvent(EventItem obj)
  44. {
  45. FSM_MSG msg = FSM_MSG.NONE;
  46. if (obj.Level == EventLevel.Warning)
  47. msg = FSM_MSG.WARNING;
  48. else if (obj.Level == EventLevel.Alarm)
  49. msg = FSM_MSG.ALARM;
  50. if (obj.Description.Contains("WaterLeak"))
  51. {
  52. Modules[ModuleName.PMA]?.PostMsg(msg, obj.Id, obj.Description);
  53. Modules[ModuleName.PMB]?.PostMsg(msg, obj.Id, obj.Description);
  54. Modules[ModuleName.TM]?.PostMsg(msg, obj.Id, obj.Description);
  55. return;
  56. }
  57. switch (obj.Source)
  58. {
  59. case "PMA":
  60. case "PMB":
  61. case "EFEM":
  62. case "TM":
  63. Modules[ModuleHelper.Converter(obj.Source)]?.PostMsg(msg, obj.Id, obj.Description);
  64. break;
  65. case "System":
  66. Modules[ModuleName.TM]?.PostMsg(msg, obj.Id, obj.Description);
  67. break;
  68. }
  69. }
  70. protected override void InitRoutine()
  71. {
  72. _auto = new AutoTransfer(this);
  73. _manualTransfer = new ManualTransfer(this);
  74. _homeAll = new HomeAll();
  75. _returnAll = new ReturnAllWafer(this);
  76. _tmCycle = new TMCycle(this);
  77. }
  78. protected override void InitDevices()
  79. {
  80. base.InitDevices();
  81. FutureEfemDeviceManager.Instance.Initialize();
  82. JetMainframeDeviceManager.Instance.Initialize();
  83. JetVirgoPMDeviceManager.Instance.Initialize(ModuleName.PMA);
  84. JetVirgoPMDeviceManager.Instance.Initialize(ModuleName.PMB);
  85. }
  86. protected override void InitModules()
  87. {
  88. BuildModules(
  89. new FutureEfemLib.Efems.EfemModule(ModuleName.EFEM),
  90. new FutureEfemLib.LPs.LoadPortModule(ModuleName.LP1),
  91. new FutureEfemLib.LPs.LoadPortModule(ModuleName.LP2),
  92. new FutureEfemLib.LPs.LoadPortModule(ModuleName.LP3),
  93. new FutureEfemLib.Aligners.AlignerModule(ModuleName.Aligner),
  94. new TMModule(ModuleName.TM){ RobotDevice = DEVICE.GetDevice<JelRobot>($"TMRobot")},
  95. new LoadLockModule(ModuleName.LLA, 8),
  96. new LoadLockModule(ModuleName.LLB, 8),
  97. new PMModule(ModuleName.PMA, 2),
  98. new PMModule(ModuleName.PMB, 2)
  99. //new PMModule(ModuleName.PMC, 2)
  100. );
  101. }
  102. }
  103. }