DeviceManager.cs 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using Aitex.Core.Common;
  5. using Aitex.Core.RT.Device;
  6. using Aitex.Core.RT.OperationCenter;
  7. using Aitex.Core.RT.SCCore;
  8. using Aitex.RT.Device.Custom;
  9. using MECF.Framework.Common.Equipment;
  10. using Venus_RT.Modules;
  11. using Venus_RT.Devices;
  12. using Venus_RT.Devices.EPD;
  13. using Venus_Core;
  14. using Aitex.Common.Util;
  15. using System.Reflection;
  16. using Venus_RT.Devices.AdLinkEthercat;
  17. using System.Windows;
  18. using Aitex.Core.RT.Log;
  19. namespace Venus_RT.Instances
  20. {
  21. public class DeviceEntity : DeviceEntityT<DeviceManager>
  22. {
  23. public DeviceEntity()
  24. {
  25. }
  26. }
  27. public class DeviceManager : DeviceManagerBase
  28. {
  29. private string device_model_file;
  30. private readonly string device_model_file_MF;
  31. private readonly string device_model_file_SEMF;
  32. Int32 v_board_id = -1;
  33. Int32 v_StartAxisID = 0;
  34. Int32 BUS_No = 0;
  35. private bool startEthercatOK;
  36. public DeviceManager()
  37. {
  38. device_model_file_MF = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config\\", "TM", RtInstance.DeviceModelFileName_MF);
  39. device_model_file_SEMF = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config\\", "TM", RtInstance.DeviceModelFileName_SE);
  40. }
  41. public bool InitEthercat()
  42. {
  43. Int32 boardID_InBits = 0;
  44. Int32 mode = 0;
  45. Int32 ret = 0;
  46. Int32 card_name = 0;
  47. Int32 tamp = 0;
  48. Int32 StartAxisID = 0;
  49. Int32 TotalAxisNum = 0;
  50. // Card(Board) initial
  51. ret = APS168.APS_initial(ref boardID_InBits, mode);
  52. if (ret == 0)
  53. {
  54. for (int i = 0; i < 16; i++)
  55. {
  56. tamp = (boardID_InBits >> i) & 1;
  57. if (tamp == 1)
  58. {
  59. ret = APS168.APS_get_card_name(i, ref card_name);
  60. if ((card_name >= (Int32)APS_Define.DEVICE_NAME_EM_2P00)
  61. && (card_name <= (Int32)APS_Define.DEVICE_NAME_EM_FA00))
  62. {
  63. ret = APS168.APS_get_first_axisId(i, ref StartAxisID, ref TotalAxisNum);
  64. //v_card_name = card_name;
  65. v_board_id = i;
  66. v_StartAxisID = StartAxisID;
  67. LOG.Write(eEvent.EV_DEVICE_INFO, ModuleName.System, "Ethercat Initial Success!");
  68. break;
  69. }
  70. }
  71. }
  72. if (v_board_id == -1)
  73. {
  74. LOG.Write(eEvent.ERR_DEVICE_INFO, ModuleName.System, $"Ethercat Board Id search Fail!");
  75. }
  76. else
  77. {
  78. LOG.Write(eEvent.EV_DEVICE_INFO, ModuleName.System, "Ethercat Board Id search Success!");
  79. return true;
  80. }
  81. }
  82. else
  83. {
  84. LOG.Write(eEvent.ERR_DEVICE_INFO, ModuleName.System, $"Ethercat Initial Fail!");
  85. }
  86. return false;
  87. }
  88. public bool StarteEthercat()
  89. {
  90. Int32 ret = 0;
  91. Int32 Board_ID = v_board_id;
  92. ret = APS168.APS_start_field_bus(Board_ID, BUS_No, v_StartAxisID);
  93. if (ret != 0)
  94. {
  95. LOG.Write(eEvent.ERR_DEVICE_INFO, ModuleName.System, $"Ethercat Start field bus Fail");
  96. return false;
  97. }
  98. else
  99. {
  100. LOG.Write(eEvent.EV_DEVICE_INFO, ModuleName.System, $"Ethercat Start field bus Success");
  101. return true;
  102. }
  103. }
  104. public override bool Initialize()
  105. {
  106. if (SC.GetValue<bool>("System.IsEnableEthercat"))
  107. {
  108. if (InitEthercat())
  109. {
  110. if (StarteEthercat())
  111. {
  112. startEthercatOK = true;
  113. }
  114. }
  115. }
  116. if (ModuleHelper.IsInstalled(ModuleName.PMA))
  117. {
  118. JetChamber jetChamber = (JetChamber)SC.GetValue<int>("PMA.ChamberType");
  119. InitPM(ModuleName.PMA, jetChamber);
  120. }
  121. if (ModuleHelper.IsInstalled(ModuleName.PMB))
  122. {
  123. JetChamber jetChamber = (JetChamber)SC.GetValue<int>("PMB.ChamberType");
  124. InitPM(ModuleName.PMB, jetChamber);
  125. }
  126. if (ModuleHelper.IsInstalled(ModuleName.PMC))
  127. {
  128. JetChamber jetChamber = (JetChamber)SC.GetValue<int>("PMC.ChamberType");
  129. InitPM(ModuleName.PMC, jetChamber);
  130. }
  131. if (ModuleHelper.IsInstalled(ModuleName.PMD))
  132. {
  133. JetChamber jetChamber = (JetChamber)SC.GetValue<int>("PMD.ChamberType");
  134. InitPM(ModuleName.PMD, jetChamber);
  135. }
  136. if (ModuleHelper.IsInstalled(ModuleName.TM))
  137. InitTM(ModuleName.TM);
  138. if (ModuleHelper.IsInstalled(ModuleName.SETM))
  139. {
  140. InitSETM(ModuleName.SETM);
  141. }
  142. AddCustomModuleDevice(new KeplerSignalTower("System", "SignalTower"));
  143. OP.Subscribe("DeviceOperation", this.Invoke);
  144. return true;
  145. }
  146. private void InitPM(ModuleName mod, JetChamber jetChamber)
  147. {
  148. device_model_file = PathManager.GetCfgDir() + "PM" + "\\" + jetChamber.ToString() + "\\" + $"{jetChamber.ToString()}DeviceModel.xml";
  149. Initialize(device_model_file, jetChamber.ToString(), mod, mod.ToString());
  150. switch (jetChamber)
  151. {
  152. case JetChamber.Kepler2300:
  153. AddAdixenTurboPump(mod);
  154. AddEPD(mod);
  155. AddPendulumValve(mod);
  156. AddChiller(ChillerType.InnerChiller, mod);
  157. AddChiller(ChillerType.OuterChiller, mod);
  158. AddChiller(ChillerType.TopChiller, mod);
  159. AddMatch(mod);
  160. AddBiasMatch(mod);
  161. AddRF(mod);
  162. AddBiasRF(mod);
  163. AddDryPump(mod);
  164. AddCustomDevice(new JetKepler2300PM(mod));
  165. break;
  166. case JetChamber.Kepler2200A:
  167. AddAdixenTurboPump(mod);
  168. AddPendulumValve(mod,PressureType.Pa);
  169. AddMatch(mod);
  170. AddRF(mod);
  171. AddDryPump(mod);
  172. AddCustomDevice(new JetKepler2200APM(mod));
  173. break;
  174. case JetChamber.Kepler2200B:
  175. AddAdixenTurboPump(mod);
  176. AddPendulumValve(mod, PressureType.Pa);
  177. AddMatch(mod);
  178. AddRF(mod);
  179. AddDryPump(mod);
  180. AddRFBox(mod);
  181. AddCustomDevice(new JetKepler2200BPM(mod));
  182. break;
  183. case JetChamber.VenusSE:
  184. AddEscHighVoltage(mod);
  185. AddAdixenTurboPump(mod);
  186. AddEPD(mod);
  187. AddPendulumValve(mod);
  188. AddChiller(ChillerType.Chiller, mod);
  189. AddMatch(mod);
  190. AddBiasMatch(mod);
  191. AddRF(mod);
  192. AddBiasRF(mod);
  193. AddDryPump(mod);
  194. AddCustomDevice(new JetVenusSEPM(mod));
  195. break;
  196. case JetChamber.VenusDE:
  197. AddEscHighVoltage(mod);
  198. AddAdixenTurboPump(mod);
  199. AddEPD(mod);
  200. AddPendulumValve(mod);
  201. AddChiller(ChillerType.Chiller, mod);
  202. AddMatch(mod);
  203. AddBiasMatch(mod);
  204. //AddRF(mod);
  205. AddBiasRF(mod);
  206. AddDryPump(mod);
  207. AddCustomDevice(new JetVenusDEPM(mod));
  208. break;
  209. }
  210. }
  211. private void AddEPD(ModuleName mod)
  212. {
  213. if (SC.GetValue<bool>($"{mod}.EPD.IsEnabled") == true)
  214. {
  215. if (SC.GetValue<int>($"{mod}.EPD.EPDType") == 0)
  216. {
  217. AddCustomModuleDevice(new EPDClient(mod));
  218. }
  219. else
  220. {
  221. AddCustomModuleDevice(new EPDDevice(mod));
  222. }
  223. }
  224. }
  225. private void AddAdixenTurboPump(ModuleName mod)
  226. {
  227. AddCustomModuleDevice(new AdixenTurboPump(mod));
  228. }
  229. private void AddPendulumValve(ModuleName mod,PressureType pressureType=PressureType.mTorr)
  230. {
  231. AddCustomModuleDevice(new PendulumValve(mod,pressureType));
  232. }
  233. private void AddChiller(ChillerType chillerType, ModuleName mod)
  234. {
  235. if (SC.GetValue<bool>($"{mod}.{chillerType}.EnableChiller") &&
  236. SC.GetValue<int>($"{mod}.{chillerType}.CommunicationType") == (int)CommunicationType.RS232)
  237. {
  238. if (SC.GetValue<int>($"{mod}.{chillerType}.MFG") == (int)ChillerMFG.SMC)
  239. {
  240. AddCustomModuleDevice(new SMCChiller(mod, chillerType.ToString()));
  241. }
  242. else if (SC.GetValue<int>($"{mod}.{chillerType}.MFG") == (int)ChillerMFG.AIRSYS)
  243. {
  244. AddCustomModuleDevice(new AIRSYSChiller(mod, chillerType.ToString()));
  245. }
  246. }
  247. else if (SC.GetValue<bool>($"{mod}.{chillerType}.EnableChiller") &&
  248. SC.GetValue<int>($"{mod}.{chillerType}.CommunicationType") == (int)CommunicationType.RS485 &&
  249. SC.GetValue<bool>($"{mod}.{chillerType}.ShareCOM"))
  250. {
  251. if (SC.GetValue<int>($"{mod}.{chillerType}.MFG") == (int)ChillerMFG.SMC)
  252. {
  253. AddCustomModuleDevice(new SMCShareChiller(mod, chillerType.ToString()));
  254. }
  255. //else if (SC.GetValue<int>($"{mod}.{chillerType}.MFG") == (int)ChillerMFG.AIRSYS)
  256. //{
  257. // AddCustomModuleDevice(new AIRSYSChiller(mod, chillerType.ToString()));
  258. //}
  259. }
  260. }
  261. private void AddMatch(ModuleName mod)
  262. {
  263. if (SC.GetValue<bool>($"{mod}.Match.EnableMatch") &&
  264. SC.GetValue<int>($"{mod}.Match.CommunicationType") == (int)CommunicationType.RS232 &&
  265. SC.GetValue<int>($"{mod}.Match.MFG") == (int)MatchMFG.AdTec)
  266. {
  267. AddCustomModuleDevice(new AdTecMatch(mod, Venus_Core.VenusDevice.Match));
  268. }
  269. else if (SC.GetValue<bool>($"{mod}.Match.EnableMatch") &&
  270. SC.GetValue<int>($"{mod}.Match.CommunicationType") == (int)CommunicationType.RS232 &&
  271. SC.GetValue<int>($"{mod}.Match.MFG") == (int)MatchMFG.Revtech)
  272. {
  273. AddCustomModuleDevice(new RevtechMatch(mod, Venus_Core.VenusDevice.Match, MatchCommunicationType.RS232));
  274. }
  275. else if (SC.GetValue<bool>($"{mod}.Match.EnableMatch") &&
  276. SC.GetValue<int>($"{mod}.Match.CommunicationType") == (int)CommunicationType.Ethernet &&
  277. SC.GetValue<int>($"{mod}.Match.MFG") == (int)MatchMFG.Revtech)
  278. {
  279. AddCustomModuleDevice(new RevtechMatch(mod, Venus_Core.VenusDevice.Match, MatchCommunicationType.Ethernet));
  280. }
  281. }
  282. private void AddRFBox(ModuleName mod)
  283. {
  284. if (SC.GetValue<bool>($"{mod}.RFBox.EnableMatch") &&
  285. SC.GetValue<int>($"{mod}.RFBox.CommunicationType") == (int)CommunicationType.RS232 &&
  286. SC.GetValue<int>($"{mod}.RFBox.MFG") == (int)MatchMFG.AdTec)
  287. {
  288. AddCustomModuleDevice(new AdTecMatch(mod, Venus_Core.VenusDevice.RFBox));
  289. }
  290. else if (SC.GetValue<bool>($"{mod}.RFBox.EnableMatch") &&
  291. SC.GetValue<int>($"{mod}.RFBox.CommunicationType") == (int)CommunicationType.RS232 &&
  292. SC.GetValue<int>($"{mod}.RFBox.MFG") == (int)MatchMFG.Revtech)
  293. {
  294. AddCustomModuleDevice(new RevtechMatch(mod, Venus_Core.VenusDevice.RFBox, MatchCommunicationType.RS232));
  295. }
  296. else if (SC.GetValue<bool>($"{mod}.RFBox.EnableMatch") &&
  297. SC.GetValue<int>($"{mod}.RFBox.CommunicationType") == (int)CommunicationType.Ethernet &&
  298. SC.GetValue<int>($"{mod}.RFBox.MFG") == (int)MatchMFG.Revtech)
  299. {
  300. AddCustomModuleDevice(new RevtechMatch(mod, Venus_Core.VenusDevice.RFBox, MatchCommunicationType.Ethernet));
  301. }
  302. else if (SC.GetValue<bool>($"{mod}.RFBox.EnableMatch") &&
  303. SC.GetValue<int>($"{mod}.RFBox.MFG") == (int)MatchMFG.Lz_Ethercat && startEthercatOK)
  304. {
  305. AddCustomModuleDevice(new LzMatch_Ethercat(mod, Venus_Core.VenusDevice.RFBox, v_board_id));
  306. }
  307. }
  308. private void AddBiasMatch(ModuleName mod)
  309. {
  310. if (SC.GetValue<bool>($"{mod}.BiasMatch.EnableBiasMatch") &&
  311. SC.GetValue<int>($"{mod}.BiasMatch.CommunicationType") == (int)CommunicationType.RS232 &&
  312. SC.GetValue<int>($"{mod}.BiasMatch.MFG") == (int)MatchMFG.AdTec)
  313. {
  314. AddCustomModuleDevice(new AdTecMatch(mod, Venus_Core.VenusDevice.BiasMatch));
  315. }
  316. else if (SC.GetValue<bool>($"{mod}.BiasMatch.EnableBiasMatch") &&
  317. SC.GetValue<int>($"{mod}.BiasMatch.CommunicationType") == (int)CommunicationType.RS232 &&
  318. SC.GetValue<int>($"{mod}.BiasMatch.MFG") == (int)MatchMFG.Revtech)
  319. {
  320. AddCustomModuleDevice(new RevtechMatch(mod, Venus_Core.VenusDevice.BiasMatch, MatchCommunicationType.RS232));
  321. }
  322. else if (SC.GetValue<bool>($"{mod}.BiasMatch.EnableBiasMatch") &&
  323. SC.GetValue<int>($"{mod}.BiasMatch.CommunicationType") == (int)CommunicationType.Ethernet &&
  324. SC.GetValue<int>($"{mod}.BiasMatch.MFG") == (int)MatchMFG.Revtech)
  325. {
  326. AddCustomModuleDevice(new RevtechMatch(mod, Venus_Core.VenusDevice.BiasMatch, MatchCommunicationType.Ethernet));
  327. }
  328. else if (SC.GetValue<bool>($"{mod}.BiasMatch.EnableBiasMatch") &&
  329. SC.GetValue<int>($"{mod}.BiasMatch.MFG") == (int)MatchMFG.Lz_Ethercat && startEthercatOK)
  330. {
  331. AddCustomModuleDevice(new LzMatch_Ethercat(mod, Venus_Core.VenusDevice.BiasMatch, v_board_id));
  332. }
  333. else if (SC.GetValue<bool>($"{mod}.BiasMatch.EnableBiasMatch") &&
  334. SC.GetValue<int>($"{mod}.BiasMatch.CommunicationType") == (int)CommunicationType.RS232 &&
  335. SC.GetValue<int>($"{mod}.BiasMatch.MFG") == (int)MatchMFG.Tru)
  336. {
  337. AddCustomModuleDevice(new TruPlasmaMatch(mod, Venus_Core.VenusDevice.BiasMatch));
  338. }
  339. }
  340. private void AddRF(ModuleName mod)
  341. {
  342. if (SC.GetValue<int>($"{mod}.Rf.CommunicationType") == (int)CommunicationType.RS232 &&
  343. SC.GetValue<int>($"{mod}.Rf.MFG") == (int)GeneratorMFG.AdTec)
  344. {
  345. AddCustomModuleDevice(new AdTecGenerator(mod, Venus_Core.VenusDevice.Rf));
  346. }
  347. }
  348. private void AddBiasRF(ModuleName mod)
  349. {
  350. if (SC.GetValue<bool>($"{mod}.BiasRf.EnableBiasRF"))
  351. {
  352. if (SC.GetValue<int>($"{mod}.BiasRf.CommunicationType") == (int)CommunicationType.Ethernet &&
  353. SC.GetValue<int>($"{mod}.BiasRf.MFG") == (int)GeneratorMFG.Comet)
  354. {
  355. AddCustomModuleDevice(new CometRF(mod, SC.GetStringValue($"{mod}.BiasRf.IPAddress")));
  356. }
  357. else if (SC.GetValue<int>($"{mod}.BiasRf.MFG") == (int)GeneratorMFG.AdTec)
  358. {
  359. AddCustomModuleDevice(new AdTecGenerator(mod, Venus_Core.VenusDevice.BiasRf));
  360. }
  361. else if (SC.GetValue<int>($"{mod}.BiasRf.MFG") == (int)GeneratorMFG.Truplasma)
  362. {
  363. AddCustomModuleDevice(new TruPlasmaRF(mod, Venus_Core.VenusDevice.BiasRf));
  364. }
  365. else if (SC.GetValue<int>($"{mod}.BiasRf.MFG") == (int)GeneratorMFG.Truplasma_Ethercat && startEthercatOK)
  366. {
  367. AddCustomModuleDevice(new TruPlasmaRF_Ethercat(mod, Venus_Core.VenusDevice.BiasRf, v_board_id));
  368. }
  369. }
  370. }
  371. private void AddDryPump(ModuleName mod)
  372. {
  373. if (SC.GetValue<int>($"{mod}.DryPump.CommunicationType") == (int)CommunicationType.RS232)
  374. {
  375. if (SC.GetValue<int>($"{mod}.DryPump.MFG") == (int)DryPumpMFG.SKY)
  376. {
  377. AddCustomModuleDevice(new SkyPump(mod));
  378. }
  379. else if (SC.GetValue<int>($"{mod}.DryPump.MFG") == (int)DryPumpMFG.Edwards)
  380. {
  381. AddCustomModuleDevice(new EdwardsPump(mod));
  382. }
  383. }
  384. }
  385. private void AddEscHighVoltage(ModuleName mod)
  386. {
  387. AddCustomModuleDevice(new ESC5HighVoltage(mod));
  388. }
  389. private void InitTM(ModuleName mod)
  390. {
  391. Initialize(device_model_file_MF, mod.ToString(), mod, mod.ToString());
  392. if (SC.GetValue<int>($"LLA.DryPump.CommunicationType") == (int)CommunicationType.RS232)
  393. {
  394. if (SC.GetValue<int>($"LLA.DryPump.MFG") == (int)DryPumpMFG.SKY)
  395. {
  396. AddCustomModuleDevice(new SkyPump(ModuleName.LLA));
  397. }
  398. else if (SC.GetValue<int>($"LLA.DryPump.MFG") == (int)DryPumpMFG.Edwards)
  399. {
  400. AddCustomModuleDevice(new EdwardsPump(ModuleName.LLA));
  401. }
  402. }
  403. if (SC.GetValue<int>($"LLB.DryPump.CommunicationType") == (int)CommunicationType.RS232)
  404. {
  405. if (SC.GetValue<int>($"LLB.DryPump.MFG") == (int)DryPumpMFG.SKY)
  406. {
  407. AddCustomModuleDevice(new SkyPump(ModuleName.LLB));
  408. }
  409. else if (SC.GetValue<int>($"LLB.DryPump.MFG") == (int)DryPumpMFG.Edwards)
  410. {
  411. AddCustomModuleDevice(new EdwardsPump(ModuleName.LLB));
  412. }
  413. }
  414. if (SC.GetValue<int>($"{mod}.DryPump.CommunicationType") == (int)CommunicationType.RS232)
  415. {
  416. if (SC.GetValue<int>($"{mod}.DryPump.MFG") == (int)DryPumpMFG.SKY)
  417. {
  418. AddCustomModuleDevice(new SkyPump(mod));
  419. }
  420. else if (SC.GetValue<int>($"{mod}.DryPump.MFG") == (int)DryPumpMFG.Edwards)
  421. {
  422. AddCustomModuleDevice(new EdwardsPump(mod));
  423. }
  424. }
  425. //AddCustomModuleDevice(new SkyPump(mod));
  426. //AddCustomModuleDevice(new SkyPump(ModuleName.LLA));
  427. AddCustomDevice(new JetTM());
  428. }
  429. private void InitSETM(ModuleName mod)
  430. {
  431. Initialize(device_model_file_SEMF, mod.ToString(), mod, mod.ToString());
  432. if (SC.GetValue<int>($"{mod}.DryPump.CommunicationType") == (int)CommunicationType.RS232)
  433. {
  434. if (SC.GetValue<int>($"{mod}.DryPump.MFG") == (int)DryPumpMFG.SKY)
  435. {
  436. AddCustomModuleDevice(new SkyPump(mod));
  437. }
  438. else if (SC.GetValue<int>($"{mod}.DryPump.MFG") == (int)DryPumpMFG.Edwards)
  439. {
  440. AddCustomModuleDevice(new EdwardsPump(mod));
  441. }
  442. }
  443. AddCustomDevice(new HongHuTM());
  444. }
  445. private WaferSize MapWaferSize(int value)
  446. {
  447. switch (value)
  448. {
  449. case 3: return WaferSize.WS3;
  450. case 4: return WaferSize.WS4;
  451. case 6: return WaferSize.WS6;
  452. case 8: return WaferSize.WS8;
  453. }
  454. return WaferSize.WS0;
  455. }
  456. private bool Invoke(string arg1, object[] args)
  457. {
  458. string name = (string)args[0];
  459. string func = (string)args[1];
  460. object[] param = new object[args.Length - 2];
  461. for (int i = 2; i < args.Length; i++)
  462. param[i - 2] = args[i].ToString();
  463. DEVICE.Do(string.Format("{0}.{1}", name, func), 0, true, param);
  464. return true;
  465. }
  466. public void RTExitPMEvent()
  467. {
  468. if (ModuleHelper.IsInstalled(ModuleName.PMA))
  469. {
  470. DEVICE.GetDevice<JetPMBase>("PMA")?.RTCloseEvent();
  471. }
  472. if (ModuleHelper.IsInstalled(ModuleName.PMB))
  473. {
  474. DEVICE.GetDevice<JetPMBase>("PMB")?.RTCloseEvent();
  475. }
  476. if (ModuleHelper.IsInstalled(ModuleName.PMC))
  477. {
  478. DEVICE.GetDevice<JetPMBase>("PMC")?.RTCloseEvent();
  479. }
  480. if (ModuleHelper.IsInstalled(ModuleName.PMD))
  481. {
  482. DEVICE.GetDevice<JetPMBase>("PMD")?.RTCloseEvent();
  483. }
  484. }
  485. }
  486. }