DeviceManager.cs 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528
  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. AddChiller(ChillerType.WallChiller, mod);
  203. AddMatch(mod);
  204. AddBiasMatch(mod);
  205. //AddRF(mod);
  206. AddBiasRF(mod);
  207. AddDryPump(mod);
  208. AddCustomDevice(new JetVenusDEPM(mod));
  209. break;
  210. }
  211. }
  212. private void AddEPD(ModuleName mod)
  213. {
  214. if (SC.GetValue<bool>($"{mod}.EPD.IsEnabled") == true)
  215. {
  216. if (SC.GetValue<int>($"{mod}.EPD.EPDType") == 0)
  217. {
  218. AddCustomModuleDevice(new EPDClient(mod));
  219. }
  220. else
  221. {
  222. AddCustomModuleDevice(new EPDDevice(mod));
  223. }
  224. }
  225. }
  226. private void AddAdixenTurboPump(ModuleName mod)
  227. {
  228. AddCustomModuleDevice(new AdixenTurboPump(mod));
  229. }
  230. private void AddPendulumValve(ModuleName mod,PressureType pressureType=PressureType.mTorr)
  231. {
  232. AddCustomModuleDevice(new PendulumValve(mod,pressureType));
  233. }
  234. private void AddChiller(ChillerType chillerType, ModuleName mod)
  235. {
  236. if (SC.GetValue<bool>($"{mod}.{chillerType}.EnableChiller") &&
  237. SC.GetValue<int>($"{mod}.{chillerType}.CommunicationType") == (int)CommunicationType.RS232)
  238. {
  239. if (SC.GetValue<int>($"{mod}.{chillerType}.MFG") == (int)ChillerMFG.SMC)
  240. {
  241. AddCustomModuleDevice(new SMCChiller(mod, chillerType.ToString()));
  242. }
  243. else if (SC.GetValue<int>($"{mod}.{chillerType}.MFG") == (int)ChillerMFG.AIRSYS)
  244. {
  245. AddCustomModuleDevice(new AIRSYSChiller(mod, chillerType.ToString()));
  246. }
  247. }
  248. else if (SC.GetValue<bool>($"{mod}.{chillerType}.EnableChiller") &&
  249. SC.GetValue<int>($"{mod}.{chillerType}.CommunicationType") == (int)CommunicationType.RS485 &&
  250. SC.GetValue<bool>($"{mod}.{chillerType}.ShareCOM"))
  251. {
  252. if (SC.GetValue<int>($"{mod}.{chillerType}.MFG") == (int)ChillerMFG.SMC)
  253. {
  254. AddCustomModuleDevice(new SMCShareChiller(mod, chillerType.ToString()));
  255. }
  256. //else if (SC.GetValue<int>($"{mod}.{chillerType}.MFG") == (int)ChillerMFG.AIRSYS)
  257. //{
  258. // AddCustomModuleDevice(new AIRSYSChiller(mod, chillerType.ToString()));
  259. //}
  260. }
  261. }
  262. private void AddMatch(ModuleName mod)
  263. {
  264. if (SC.GetValue<bool>($"{mod}.Match.EnableMatch") &&
  265. SC.GetValue<int>($"{mod}.Match.CommunicationType") == (int)CommunicationType.RS232 &&
  266. SC.GetValue<int>($"{mod}.Match.MFG") == (int)MatchMFG.AdTec)
  267. {
  268. AddCustomModuleDevice(new AdTecMatch(mod, Venus_Core.VenusDevice.Match));
  269. }
  270. else if (SC.GetValue<bool>($"{mod}.Match.EnableMatch") &&
  271. SC.GetValue<int>($"{mod}.Match.CommunicationType") == (int)CommunicationType.RS232 &&
  272. SC.GetValue<int>($"{mod}.Match.MFG") == (int)MatchMFG.Revtech)
  273. {
  274. AddCustomModuleDevice(new RevtechMatch(mod, Venus_Core.VenusDevice.Match, MatchCommunicationType.RS232));
  275. }
  276. else if (SC.GetValue<bool>($"{mod}.Match.EnableMatch") &&
  277. SC.GetValue<int>($"{mod}.Match.CommunicationType") == (int)CommunicationType.Ethernet &&
  278. SC.GetValue<int>($"{mod}.Match.MFG") == (int)MatchMFG.Revtech)
  279. {
  280. AddCustomModuleDevice(new RevtechMatch(mod, Venus_Core.VenusDevice.Match, MatchCommunicationType.Ethernet));
  281. }
  282. }
  283. private void AddRFBox(ModuleName mod)
  284. {
  285. if (SC.GetValue<bool>($"{mod}.RFBox.EnableMatch") &&
  286. SC.GetValue<int>($"{mod}.RFBox.CommunicationType") == (int)CommunicationType.RS232 &&
  287. SC.GetValue<int>($"{mod}.RFBox.MFG") == (int)MatchMFG.AdTec)
  288. {
  289. AddCustomModuleDevice(new AdTecMatch(mod, Venus_Core.VenusDevice.RFBox));
  290. }
  291. else if (SC.GetValue<bool>($"{mod}.RFBox.EnableMatch") &&
  292. SC.GetValue<int>($"{mod}.RFBox.CommunicationType") == (int)CommunicationType.RS232 &&
  293. SC.GetValue<int>($"{mod}.RFBox.MFG") == (int)MatchMFG.Revtech)
  294. {
  295. AddCustomModuleDevice(new RevtechMatch(mod, Venus_Core.VenusDevice.RFBox, MatchCommunicationType.RS232));
  296. }
  297. else if (SC.GetValue<bool>($"{mod}.RFBox.EnableMatch") &&
  298. SC.GetValue<int>($"{mod}.RFBox.CommunicationType") == (int)CommunicationType.Ethernet &&
  299. SC.GetValue<int>($"{mod}.RFBox.MFG") == (int)MatchMFG.Revtech)
  300. {
  301. AddCustomModuleDevice(new RevtechMatch(mod, Venus_Core.VenusDevice.RFBox, MatchCommunicationType.Ethernet));
  302. }
  303. else if (SC.GetValue<bool>($"{mod}.RFBox.EnableMatch") &&
  304. SC.GetValue<int>($"{mod}.RFBox.MFG") == (int)MatchMFG.Lz_Ethercat && startEthercatOK)
  305. {
  306. AddCustomModuleDevice(new LzMatch_Ethercat(mod, Venus_Core.VenusDevice.RFBox, v_board_id));
  307. }
  308. }
  309. private void AddBiasMatch(ModuleName mod)
  310. {
  311. if (SC.GetValue<bool>($"{mod}.BiasMatch.EnableBiasMatch") &&
  312. SC.GetValue<int>($"{mod}.BiasMatch.CommunicationType") == (int)CommunicationType.RS232 &&
  313. SC.GetValue<int>($"{mod}.BiasMatch.MFG") == (int)MatchMFG.AdTec)
  314. {
  315. AddCustomModuleDevice(new AdTecMatch(mod, Venus_Core.VenusDevice.BiasMatch));
  316. }
  317. else if (SC.GetValue<bool>($"{mod}.BiasMatch.EnableBiasMatch") &&
  318. SC.GetValue<int>($"{mod}.BiasMatch.CommunicationType") == (int)CommunicationType.RS232 &&
  319. SC.GetValue<int>($"{mod}.BiasMatch.MFG") == (int)MatchMFG.Revtech)
  320. {
  321. AddCustomModuleDevice(new RevtechMatch(mod, Venus_Core.VenusDevice.BiasMatch, MatchCommunicationType.RS232));
  322. }
  323. else if (SC.GetValue<bool>($"{mod}.BiasMatch.EnableBiasMatch") &&
  324. SC.GetValue<int>($"{mod}.BiasMatch.CommunicationType") == (int)CommunicationType.Ethernet &&
  325. SC.GetValue<int>($"{mod}.BiasMatch.MFG") == (int)MatchMFG.Revtech)
  326. {
  327. AddCustomModuleDevice(new RevtechMatch(mod, Venus_Core.VenusDevice.BiasMatch, MatchCommunicationType.Ethernet));
  328. }
  329. else if (SC.GetValue<bool>($"{mod}.BiasMatch.EnableBiasMatch") &&
  330. SC.GetValue<int>($"{mod}.BiasMatch.MFG") == (int)MatchMFG.Lz_Ethercat && startEthercatOK)
  331. {
  332. AddCustomModuleDevice(new LzMatch_Ethercat(mod, Venus_Core.VenusDevice.BiasMatch, v_board_id));
  333. }
  334. else if (SC.GetValue<bool>($"{mod}.BiasMatch.EnableBiasMatch") &&
  335. SC.GetValue<int>($"{mod}.BiasMatch.CommunicationType") == (int)CommunicationType.RS232 &&
  336. SC.GetValue<int>($"{mod}.BiasMatch.MFG") == (int)MatchMFG.Tru)
  337. {
  338. AddCustomModuleDevice(new TruPlasmaMatch(mod, Venus_Core.VenusDevice.BiasMatch));
  339. }
  340. }
  341. private void AddRF(ModuleName mod)
  342. {
  343. if (SC.GetValue<int>($"{mod}.Rf.CommunicationType") == (int)CommunicationType.RS232 &&
  344. SC.GetValue<int>($"{mod}.Rf.MFG") == (int)GeneratorMFG.AdTec)
  345. {
  346. AddCustomModuleDevice(new AdTecGenerator(mod, Venus_Core.VenusDevice.Rf));
  347. }
  348. }
  349. private void AddBiasRF(ModuleName mod)
  350. {
  351. if (SC.GetValue<bool>($"{mod}.BiasRf.EnableBiasRF"))
  352. {
  353. if (SC.GetValue<int>($"{mod}.BiasRf.CommunicationType") == (int)CommunicationType.Ethernet &&
  354. SC.GetValue<int>($"{mod}.BiasRf.MFG") == (int)GeneratorMFG.Comet)
  355. {
  356. AddCustomModuleDevice(new CometRF(mod, SC.GetStringValue($"{mod}.BiasRf.IPAddress")));
  357. }
  358. else if (SC.GetValue<int>($"{mod}.BiasRf.MFG") == (int)GeneratorMFG.AdTec)
  359. {
  360. AddCustomModuleDevice(new AdTecGenerator(mod, Venus_Core.VenusDevice.BiasRf));
  361. }
  362. else if (SC.GetValue<int>($"{mod}.BiasRf.MFG") == (int)GeneratorMFG.Truplasma)
  363. {
  364. AddCustomModuleDevice(new TruPlasmaRF(mod, Venus_Core.VenusDevice.BiasRf));
  365. }
  366. else if (SC.GetValue<int>($"{mod}.BiasRf.MFG") == (int)GeneratorMFG.Truplasma_Ethercat && startEthercatOK)
  367. {
  368. AddCustomModuleDevice(new TruPlasmaRF_Ethercat(mod, Venus_Core.VenusDevice.BiasRf, v_board_id));
  369. }
  370. }
  371. }
  372. private void AddDryPump(ModuleName mod)
  373. {
  374. if (SC.GetValue<int>($"{mod}.DryPump.CommunicationType") == (int)CommunicationType.RS232)
  375. {
  376. if (SC.GetValue<int>($"{mod}.DryPump.MFG") == (int)DryPumpMFG.SKY)
  377. {
  378. AddCustomModuleDevice(new SkyPump(mod));
  379. }
  380. else if (SC.GetValue<int>($"{mod}.DryPump.MFG") == (int)DryPumpMFG.Edwards)
  381. {
  382. AddCustomModuleDevice(new EdwardsPump(mod));
  383. }
  384. }
  385. }
  386. private void AddEscHighVoltage(ModuleName mod)
  387. {
  388. AddCustomModuleDevice(new ESC5HighVoltage(mod));
  389. }
  390. private void InitTM(ModuleName mod)
  391. {
  392. Initialize(device_model_file_MF, mod.ToString(), mod, mod.ToString());
  393. if (SC.GetValue<int>($"LLA.DryPump.CommunicationType") == (int)CommunicationType.RS232)
  394. {
  395. if (SC.GetValue<int>($"LLA.DryPump.MFG") == (int)DryPumpMFG.SKY)
  396. {
  397. AddCustomModuleDevice(new SkyPump(ModuleName.LLA));
  398. }
  399. else if (SC.GetValue<int>($"LLA.DryPump.MFG") == (int)DryPumpMFG.Edwards)
  400. {
  401. AddCustomModuleDevice(new EdwardsPump(ModuleName.LLA));
  402. }
  403. }
  404. if (SC.GetValue<int>($"LLB.DryPump.CommunicationType") == (int)CommunicationType.RS232)
  405. {
  406. if (SC.GetValue<int>($"LLB.DryPump.MFG") == (int)DryPumpMFG.SKY)
  407. {
  408. AddCustomModuleDevice(new SkyPump(ModuleName.LLB));
  409. }
  410. else if (SC.GetValue<int>($"LLB.DryPump.MFG") == (int)DryPumpMFG.Edwards)
  411. {
  412. AddCustomModuleDevice(new EdwardsPump(ModuleName.LLB));
  413. }
  414. }
  415. if (SC.GetValue<int>($"{mod}.DryPump.CommunicationType") == (int)CommunicationType.RS232)
  416. {
  417. if (SC.GetValue<int>($"{mod}.DryPump.MFG") == (int)DryPumpMFG.SKY)
  418. {
  419. AddCustomModuleDevice(new SkyPump(mod));
  420. }
  421. else if (SC.GetValue<int>($"{mod}.DryPump.MFG") == (int)DryPumpMFG.Edwards)
  422. {
  423. AddCustomModuleDevice(new EdwardsPump(mod));
  424. }
  425. }
  426. //AddCustomModuleDevice(new SkyPump(mod));
  427. //AddCustomModuleDevice(new SkyPump(ModuleName.LLA));
  428. AddCustomDevice(new JetTM());
  429. }
  430. private void InitSETM(ModuleName mod)
  431. {
  432. Initialize(device_model_file_SEMF, mod.ToString(), mod, mod.ToString());
  433. if (SC.GetValue<int>($"{mod}.DryPump.CommunicationType") == (int)CommunicationType.RS232)
  434. {
  435. if (SC.GetValue<int>($"{mod}.DryPump.MFG") == (int)DryPumpMFG.SKY)
  436. {
  437. AddCustomModuleDevice(new SkyPump(mod));
  438. }
  439. else if (SC.GetValue<int>($"{mod}.DryPump.MFG") == (int)DryPumpMFG.Edwards)
  440. {
  441. AddCustomModuleDevice(new EdwardsPump(mod));
  442. }
  443. }
  444. AddCustomDevice(new HongHuTM());
  445. }
  446. private WaferSize MapWaferSize(int value)
  447. {
  448. switch (value)
  449. {
  450. case 3: return WaferSize.WS3;
  451. case 4: return WaferSize.WS4;
  452. case 6: return WaferSize.WS6;
  453. case 8: return WaferSize.WS8;
  454. }
  455. return WaferSize.WS0;
  456. }
  457. private bool Invoke(string arg1, object[] args)
  458. {
  459. string name = (string)args[0];
  460. string func = (string)args[1];
  461. object[] param = new object[args.Length - 2];
  462. for (int i = 2; i < args.Length; i++)
  463. param[i - 2] = args[i].ToString();
  464. DEVICE.Do(string.Format("{0}.{1}", name, func), 0, true, param);
  465. return true;
  466. }
  467. public void RTExitPMEvent()
  468. {
  469. if (ModuleHelper.IsInstalled(ModuleName.PMA))
  470. {
  471. DEVICE.GetDevice<JetPMBase>("PMA")?.RTCloseEvent();
  472. }
  473. if (ModuleHelper.IsInstalled(ModuleName.PMB))
  474. {
  475. DEVICE.GetDevice<JetPMBase>("PMB")?.RTCloseEvent();
  476. }
  477. if (ModuleHelper.IsInstalled(ModuleName.PMC))
  478. {
  479. DEVICE.GetDevice<JetPMBase>("PMC")?.RTCloseEvent();
  480. }
  481. if (ModuleHelper.IsInstalled(ModuleName.PMD))
  482. {
  483. DEVICE.GetDevice<JetPMBase>("PMD")?.RTCloseEvent();
  484. }
  485. }
  486. }
  487. }