HongHuTM.cs 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  1. using Aitex.Core.Common.DeviceData;
  2. using Aitex.Core.RT.DataCenter;
  3. using Aitex.Core.RT.Device;
  4. using Aitex.Core.RT.Device.Unit;
  5. using Aitex.Core.RT.Log;
  6. using Aitex.Core.RT.OperationCenter;
  7. using Aitex.Core.RT.SCCore;
  8. using Aitex.Core.Util;
  9. using MECF.Framework.Common.Device.Bases;
  10. using MECF.Framework.Common.Equipment;
  11. using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.TMs;
  12. using System;
  13. using IoMfc = Venus_RT.Devices.IODevices.IoMfc;
  14. using IoPressureMeter = Venus_RT.Devices.IODevices.IoPressureMeter;
  15. using Venus_Core;
  16. using Venus_RT.Modules;
  17. namespace Venus_RT.Devices
  18. {
  19. public class HongHuTM : TM
  20. {
  21. /// <summary>
  22. /// 针对VenusSE设计
  23. /// </summary>
  24. #region io 信号抽象
  25. //控制阀信号
  26. private readonly IoValve _TMFastPumpValve;
  27. private readonly IoValve _TMSoftPumpValve;
  28. private readonly IoValve _VCESoftPumpValve;
  29. private readonly IoValve _VCEFastPumpValve;
  30. private readonly IoValve _TMFastVentValve;
  31. private readonly IoValve _TMSoftVentValve;
  32. private readonly IoValve _VCESoftVentValve;
  33. private readonly IoValve _VCEFastVentValve;
  34. //判断信号
  35. private readonly IoSensor _VCESlitDoorOpenEnable;
  36. private readonly IoSensor _PMASlitDoorOpenEnable;
  37. private readonly IoSensor _PMBSlitDoorOpenEnable;
  38. private readonly IoSensor _PMCSlitDoorOpenEnable;
  39. private readonly IoSensor _VCESlitDoorCloseEnable;
  40. private readonly IoSensor _PMASlitDoorCloseEnable;
  41. private readonly IoSensor _PMBSlitDoorCloseEnable;
  42. private readonly IoSensor _PMCSlitDoorCloseEnable;
  43. private readonly IoSensor _TMExtendVCEEnable;
  44. private readonly IoSensor _TMExtendPMAEnable;
  45. private readonly IoSensor _TMExtendPMBEnable;
  46. private readonly IoSensor _TMExtendPMCEnable;
  47. private readonly IoSensor _TMVACSensor;
  48. private readonly IoSensor _VCEVACSensor;
  49. //private readonly IoSensor _VCEATMSensor;
  50. //private readonly IoSensor _TMATMSensor;
  51. //控制门信号
  52. private readonly IoCylinder _VCESlitDoor;
  53. private readonly IoCylinder _PMASlitDoor;
  54. private readonly IoCylinder _PMBSlitDoor;
  55. private readonly IoCylinder _PMCSlitDoor;
  56. private readonly IoMfc _TMMfc;
  57. private readonly IoPressureMeter _TMPressure;
  58. //private readonly IoPressureMeter _TMPiplinePressure;
  59. private readonly IoPressureMeter _VCEPressure;
  60. //private readonly IoPressureMeter _VCEPiplinePressure;
  61. private readonly PumpBase _TMPump;
  62. //控压
  63. //安装的module
  64. private string _allInstalledModules { get { return SC.GetStringValue("System.InstalledModules").ToString(); } }
  65. #endregion
  66. #region 暴露变量
  67. //ATM VAC信号
  68. public bool IsTMATM => _TMPressure.Value >= SC.GetValue<double>($"{Module}.ATMTargetPressure");
  69. public bool IsVCEATM => _VCEPressure.Value >= SC.GetValue<double>("VCE1.ATMTargetPressure");
  70. public bool IsTMVAC => _TMVACSensor.Value;
  71. public bool IsVCEVAC => _VCEVACSensor.Value;
  72. public bool? IsTMPumpRunning => _TMPump?.IsRunning;
  73. //valve开关状态
  74. public bool IsTMFastPumpOpen => _TMFastPumpValve.Status;
  75. public bool IsTMSoftPumpOpen => _TMSoftPumpValve.Status;
  76. public bool IsTMFastVentOpen => _TMFastVentValve.Status;
  77. public bool IsTMSoftVentOpen => _TMSoftVentValve.Status;
  78. public bool IsVCEFastPumpOpen => _VCEFastPumpValve.Status;
  79. public bool IsVCESoftPumpOpen => _VCESoftPumpValve.Status;
  80. public bool IsVCEFastVentOpen => _VCEFastVentValve.Status;
  81. public bool IsVCESoftVentOpen => _VCESoftVentValve.Status;
  82. public bool IsTMVentValveOpen => IsTMFastVentOpen && IsTMSoftVentOpen;
  83. public bool IsVCEVentValveOpen => IsVCEFastVentOpen && IsVCESoftVentOpen;
  84. //SlitDoor
  85. public bool VCESlitDoorClosed => _VCESlitDoor.State == CylinderState.Close;
  86. public bool PMASlitDoorClosed
  87. {
  88. get
  89. {
  90. if (_allInstalledModules.Contains("PMA"))
  91. return _PMASlitDoor.State == CylinderState.Close;
  92. else
  93. return true;
  94. }
  95. }
  96. public bool PMBSlitDoorClosed
  97. {
  98. get
  99. {
  100. if (_allInstalledModules.Contains("PMB"))
  101. return _PMBSlitDoor.State == CylinderState.Close;
  102. else
  103. return true;
  104. }
  105. }
  106. public bool PMCSlitDoorClosed
  107. {
  108. get
  109. {
  110. if (_allInstalledModules.Contains("PMC"))
  111. return _PMCSlitDoor.State == CylinderState.Close;
  112. else
  113. return true;
  114. }
  115. }
  116. public bool VCESlitDoorOpen => _VCESlitDoor.State == CylinderState.Open;
  117. public bool PMASlitDoorOpen
  118. {
  119. get
  120. {
  121. if (_allInstalledModules.Contains("PMA"))
  122. return _PMASlitDoor.State == CylinderState.Open;
  123. else
  124. return true;
  125. }
  126. }
  127. public bool PMBSlitDoorOpen
  128. {
  129. get
  130. {
  131. if (_allInstalledModules.Contains("PMB"))
  132. return _PMBSlitDoor.State == CylinderState.Open;
  133. else
  134. return true;
  135. }
  136. }
  137. public bool PMCSlitDoorOpen
  138. {
  139. get
  140. {
  141. if (_allInstalledModules.Contains("PMC"))
  142. return _PMCSlitDoor.State == CylinderState.Open;
  143. else
  144. return true;
  145. }
  146. }
  147. public bool AllPMSlitDoorClosed
  148. {
  149. get
  150. {
  151. if (PMASlitDoorClosed && PMBSlitDoorClosed && PMCSlitDoorClosed)
  152. return true;
  153. else
  154. return false;
  155. }
  156. }
  157. public bool VCESlitDoorOpenEnable => _VCESlitDoorOpenEnable.Value;
  158. public bool PMASlitDoorOpenEnable => _PMASlitDoorOpenEnable.Value;
  159. public bool PMBSlitDoorOpenEnable => _PMBSlitDoorOpenEnable.Value;
  160. public bool PMCSlitDoorOpenEnable => _PMCSlitDoorOpenEnable.Value;
  161. public bool VCESlitDoorCloseEnable => _VCESlitDoorCloseEnable.Value;
  162. public bool PMASlitDoorCloseEnable => _PMASlitDoorCloseEnable.Value;
  163. public bool PMBSlitDoorCloseEnable => _PMBSlitDoorCloseEnable.Value;
  164. public bool PMCSlitDoorCloseEnable => _PMCSlitDoorCloseEnable.Value;
  165. //Robot动作
  166. public bool TMExtendVCEEnable => _TMExtendVCEEnable.Value;
  167. public bool TMExtendPMAEnable => _TMExtendPMAEnable.Value;
  168. public bool TMExtendPMBEnable => _TMExtendPMBEnable.Value;
  169. public bool TMExtendPMCEnable => _TMExtendPMCEnable.Value;
  170. public double TMPressure => _TMPressure.Value;
  171. public double VCEPressure => _VCEPressure.Value;
  172. enum PumpState
  173. {
  174. Idle,
  175. TMUsing,
  176. VCEUsing,
  177. }
  178. PumpState _PumpingState = PumpState.Idle;
  179. #endregion
  180. public HongHuTM() : base(ModuleName.SETM.ToString())
  181. {
  182. Module = ModuleName.SETM.ToString();
  183. _TMFastPumpValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.TMFastPumpValve}");
  184. _TMSoftPumpValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.TMSoftPumpValve}");
  185. _VCESoftPumpValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.VCESoftPumpValve}");
  186. _VCEFastPumpValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.VCEFastPumpValve}");
  187. _TMFastVentValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.TMFastVentValve}");
  188. _TMSoftVentValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.TMSoftVentValve}");
  189. _VCESoftVentValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.VCESoftVentValve}");
  190. _VCEFastVentValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.VCEFastVentValve}");
  191. _VCESlitDoorOpenEnable = DEVICE.GetDevice<IoSensor>($"{Module}.{VenusDevice.VCESlitDoorOpenEnable}");
  192. _PMASlitDoorOpenEnable = DEVICE.GetDevice<IoSensor>($"{Module}.{VenusDevice.PMASlitDoorOpenEnable}");
  193. _PMBSlitDoorOpenEnable = DEVICE.GetDevice<IoSensor>($"{Module}.{VenusDevice.PMBSlitDoorOpenEnable}");
  194. _VCESlitDoorCloseEnable = DEVICE.GetDevice<IoSensor>($"{Module}.{VenusDevice.VCESlitDoorCloseEnable}");
  195. _PMASlitDoorCloseEnable = DEVICE.GetDevice<IoSensor>($"{Module}.{VenusDevice.PMASlitDoorCloseEnable}");
  196. _PMBSlitDoorCloseEnable = DEVICE.GetDevice<IoSensor>($"{Module}.{VenusDevice.PMBSlitDoorCloseEnable}");
  197. _TMVACSensor = DEVICE.GetDevice<IoSensor>($"{Module}.{VenusDevice.TMVACSensor}");
  198. _VCEVACSensor = DEVICE.GetDevice<IoSensor>($"{Module}.{VenusDevice.VCEVACSensor}");
  199. //_TMATMSensor = DEVICE.GetDevice<IoSensor>($"{Module}.{VenusDevice.TMATMSensor}");
  200. //_VCEATMSensor = DEVICE.GetDevice<IoSensor>($"{Module}.{VenusDevice.VCEATMSensor}");
  201. _VCESlitDoor = DEVICE.GetDevice<IoCylinder>($"{Module}.{VenusDevice.VCESlitDoor}");
  202. _PMASlitDoor = DEVICE.GetDevice<IoCylinder>($"{Module}.{VenusDevice.PMASlitDoor}");
  203. _PMBSlitDoor = DEVICE.GetDevice<IoCylinder>($"{Module}.{VenusDevice.PMBSlitDoor}");
  204. if (_allInstalledModules.Contains("PMC"))
  205. {
  206. _PMCSlitDoorOpenEnable = DEVICE.GetDevice<IoSensor>($"{Module}.{VenusDevice.PMCSlitDoorOpenEnable}");
  207. _PMCSlitDoor = DEVICE.GetDevice<IoCylinder>($"{Module}.{VenusDevice.PMCSlitDoor}");
  208. _PMCSlitDoorCloseEnable = DEVICE.GetDevice<IoSensor>($"{Module}.{VenusDevice.PMCSlitDoorCloseEnable}");
  209. }
  210. _TMMfc = DEVICE.GetDevice<IoMfc>($"{Module}.TM_MFC1");
  211. _TMPressure = DEVICE.GetDevice<IoPressureMeter>($"{Module}.TMPressure");
  212. //_TMPiplinePressure = DEVICE.GetDevice<IoPressureMeter>($"{Module}.TMPipelinePressure");
  213. _VCEPressure = DEVICE.GetDevice<IoPressureMeter>($"{Module}.VCEPressure");
  214. if (SC.GetValue<int>($"{Module}.DryPump.CommunicationType") == (int)CommunicationType.RS232)
  215. {
  216. if (SC.GetValue<int>($"{Module}.DryPump.MFG") == (int)DryPumpMFG.SKY)
  217. {
  218. _TMPump = DEVICE.GetDevice<SkyPump>($"{Module}.{VenusDevice.MainPump}");
  219. }
  220. else if (SC.GetValue<int>($"{Module}.DryPump.MFG") == (int)DryPumpMFG.Edwards)
  221. {
  222. _TMPump = DEVICE.GetDevice<EdwardsPump>($"{Module}.{VenusDevice.MainPump}");
  223. }
  224. }
  225. DATA.Subscribe($"{Module}.VCESlitDoorClosed", () => VCESlitDoorClosed);
  226. DATA.Subscribe($"{Module}.PMASlitDoorClosed", () => PMASlitDoorClosed);
  227. DATA.Subscribe($"{Module}.PMBSlitDoorClosed", () => PMBSlitDoorClosed);
  228. DATA.Subscribe($"{Module}.PMCSlitDoorClosed", () => PMCSlitDoorClosed);
  229. DATA.Subscribe($"{Module}.PumpIsRunning", () => IsTMPumpRunning, SubscriptionAttribute.FLAG.IgnoreSaveDB);
  230. DATA.Subscribe($"{Module}.TMIsATM", ()=> IsTMATM);
  231. DATA.Subscribe($"{Module}.VCEIsATM", ()=> IsVCEATM);
  232. OP.Subscribe($"{Module}.ControlPump", (cmd, args) =>
  233. {
  234. _TMPump.SetPumpOnOff((bool)args[0]);
  235. return true;
  236. });
  237. OP.Subscribe($"{Module}.SetSlitDoor", (cmd, args) =>
  238. {
  239. var module = (ModuleName)Enum.Parse(typeof(ModuleName), args[0].ToString());
  240. return TurnSlitDoor(module, (bool)args[1]);
  241. });
  242. }
  243. #region IO控制方法
  244. //slitdoor
  245. //2023/11/1 增加两边压差比较
  246. public bool TurnSlitDoor(ModuleName mod, bool bOn)
  247. {
  248. double MaxPressureDifference = SC.GetValue<double>("System.PMTMMaxPressureDifference");
  249. switch (mod)
  250. {
  251. case ModuleName.VCE1:
  252. if (bOn && Math.Abs(_TMPressure.Value - _VCEPressure.Value)> MaxPressureDifference && !VCESlitDoorOpenEnable)
  253. {
  254. LOG.Write(eEvent.ERR_TM, ModuleName.SETM, $"cannot open door cause pressure, TM Pressure:{_TMPressure.Value} and VCE Pressure:{_VCEPressure.Value}");
  255. return false;
  256. }
  257. if (!bOn && !VCESlitDoorCloseEnable)
  258. {
  259. LOG.Write(eEvent.ERR_TM, ModuleName.SETM, $"cannot close door cause tmrobot extend to vce!");
  260. return false;
  261. }
  262. return _VCESlitDoor.SetCylinder(bOn, out _);
  263. case ModuleName.PMA:
  264. if (bOn && !CanOpenSlitDoor(mod, MaxPressureDifference) && !PMASlitDoorOpenEnable)
  265. return false;
  266. if (!bOn && !PMASlitDoorCloseEnable)
  267. {
  268. LOG.Write(eEvent.ERR_TM, ModuleName.SETM, $"cannot close door cause tmrobot extend to {mod}!");
  269. return false;
  270. }
  271. return _PMASlitDoor.SetCylinder(bOn, out _);
  272. case ModuleName.PMB:
  273. if (bOn && !CanOpenSlitDoor(mod, MaxPressureDifference) && !PMBSlitDoorOpenEnable)
  274. return false;
  275. if (!bOn && !PMBSlitDoorCloseEnable)
  276. {
  277. LOG.Write(eEvent.ERR_TM, ModuleName.SETM, $"cannot close door cause tmrobot extend to {mod}!");
  278. return false;
  279. }
  280. return _PMBSlitDoor.SetCylinder(bOn, out _);
  281. case ModuleName.PMC:
  282. if (bOn && !CanOpenSlitDoor(mod, MaxPressureDifference) && !PMCSlitDoorOpenEnable)
  283. return false;
  284. if (!bOn && !PMCSlitDoorCloseEnable)
  285. {
  286. LOG.Write(eEvent.ERR_TM, ModuleName.SETM, $"cannot close door cause tmrobot extend to {mod}!");
  287. return false;
  288. }
  289. return _PMCSlitDoor.SetCylinder(bOn, out _);
  290. }
  291. return false;
  292. }
  293. //valve
  294. public void TurnFastPumpValve(ModuleName mod, bool bOn)
  295. {
  296. switch (mod)
  297. {
  298. case ModuleName.SETM:
  299. _TMFastPumpValve.TurnValve(bOn, out string _);
  300. break;
  301. case ModuleName.VCE1:
  302. _VCEFastPumpValve.TurnValve(bOn, out string _);
  303. break;
  304. }
  305. }
  306. public void TurnSoftPumpValve(ModuleName mod, bool bOn)
  307. {
  308. switch (mod)
  309. {
  310. case ModuleName.SETM:
  311. _TMSoftPumpValve.TurnValve(bOn, out string _);
  312. break;
  313. case ModuleName.VCE1:
  314. _VCESoftPumpValve.TurnValve(bOn, out string _);
  315. break;
  316. }
  317. }
  318. public void TurnFastVentValve(ModuleName mod, bool bOn)
  319. {
  320. switch (mod)
  321. {
  322. case ModuleName.SETM:
  323. _TMFastVentValve.TurnValve(bOn, out string _);
  324. break;
  325. case ModuleName.VCE1:
  326. _VCEFastVentValve.TurnValve(bOn, out string _);
  327. break;
  328. }
  329. }
  330. public void TurnSoftVentValve(ModuleName mod, bool bOn)
  331. {
  332. switch (mod)
  333. {
  334. case ModuleName.SETM:
  335. _TMSoftVentValve.TurnValve(bOn, out string _);
  336. break;
  337. case ModuleName.VCE1:
  338. _VCESoftVentValve.TurnValve(bOn, out string _);
  339. break;
  340. }
  341. }
  342. public bool CloseAllSlitDoor()
  343. {
  344. TurnSlitDoor(ModuleName.VCE1, false);
  345. if (_allInstalledModules.Contains("PMA"))
  346. TurnSlitDoor(ModuleName.PMA,false);
  347. if (_allInstalledModules.Contains("PMB"))
  348. TurnSlitDoor(ModuleName.PMB, false);
  349. if (_allInstalledModules.Contains("PMC"))
  350. TurnSlitDoor(ModuleName.PMC, false);
  351. return true;
  352. }
  353. public void HomeVceSlitDoor()
  354. {
  355. //由SlitDoor的状态对其下发同样的指令
  356. if (VCESlitDoorClosed == true)
  357. TurnSlitDoor(ModuleName.VCE1, false);
  358. else
  359. TurnSlitDoor(ModuleName.VCE1, true);
  360. }
  361. public void CloseVentValve()
  362. {
  363. _TMSoftVentValve.TurnValve(false, out _);
  364. _TMFastVentValve.TurnValve(false, out _);
  365. _VCESoftVentValve.TurnValve(false, out _);
  366. _VCEFastVentValve.TurnValve(false, out _);
  367. }
  368. public override bool CheckSlitValveOpen(ModuleName mod)
  369. {
  370. switch (mod)
  371. {
  372. case ModuleName.VCE1:
  373. return VCESlitDoorOpen;
  374. case ModuleName.PMA:
  375. return PMASlitDoorOpen;
  376. case ModuleName.PMB:
  377. return PMBSlitDoorOpen;
  378. case ModuleName.PMC:
  379. return PMCSlitDoorOpen;
  380. }
  381. return false;
  382. }
  383. public bool CheckPumpValveClosed(ModuleName mod)
  384. {
  385. switch (mod)
  386. {
  387. case ModuleName.SETM:
  388. return !IsTMFastPumpOpen && !IsTMSoftPumpOpen;
  389. case ModuleName.VCE1:
  390. return !IsVCEFastPumpOpen && !IsVCESoftPumpOpen;
  391. }
  392. return true;
  393. }
  394. public bool CheckVentValveClosed(ModuleName mod)
  395. {
  396. switch (mod)
  397. {
  398. case ModuleName.SETM:
  399. if (IsTMVentValveOpen)
  400. {
  401. LOG.Write(eEvent.ERR_TM, ModuleName.SETM, "TM Vent Valve not closed");
  402. return false;
  403. }
  404. break;
  405. case ModuleName.VCE1:
  406. if (IsVCEVentValveOpen)
  407. {
  408. LOG.Write(eEvent.ERR_TM, ModuleName.VCE1, "VCE1 Vent Valve not closed");
  409. return false;
  410. }
  411. break;
  412. }
  413. return true;
  414. }
  415. public void SetTMFlow(int flowValue)
  416. {
  417. _TMMfc.SetPoint = (flowValue);
  418. }
  419. public double GetModulePressure(ModuleName mod)
  420. {
  421. switch (mod)
  422. {
  423. case ModuleName.SETM:
  424. return TMPressure;
  425. case ModuleName.VCE1:
  426. return VCEPressure;
  427. }
  428. return 0.0;
  429. }
  430. public bool TryGetPump(ModuleName mod)
  431. {
  432. //Self
  433. if ((mod == ModuleName.VCE1 && _PumpingState == PumpState.VCEUsing) || (mod == ModuleName.SETM && _PumpingState == PumpState.TMUsing))
  434. return true;
  435. //Idle
  436. if (mod == ModuleName.SETM && !IsTMFastPumpOpen && !IsTMSoftPumpOpen && _PumpingState == PumpState.Idle)
  437. {
  438. _PumpingState = PumpState.TMUsing;
  439. return true;
  440. }
  441. if (mod == ModuleName.VCE1 && !IsVCEFastPumpOpen && !IsVCESoftPumpOpen && _PumpingState == PumpState.Idle)
  442. {
  443. _PumpingState = PumpState.VCEUsing;
  444. return true;
  445. }
  446. LOG.Write(eEvent.WARN_DEFAULT_WARN, mod, "无法打开,另一个泵正在用!");
  447. //locked
  448. return false;
  449. }
  450. public void ReleasePump(ModuleName Module)
  451. {
  452. //release pump (must do it by user)
  453. if ((Module == ModuleName.SETM && _PumpingState == PumpState.TMUsing) || (Module == ModuleName.VCE1 && _PumpingState == PumpState.VCEUsing))
  454. _PumpingState = PumpState.Idle;
  455. }
  456. #endregion
  457. #region 工具方法
  458. private bool CanOpenSlitDoor(ModuleName mod,double MaxPressureDifference)
  459. {
  460. if (Singleton<RouteManager>.Instance.GetPM(mod) == null || RouteManager.IsATMMode)
  461. return true;
  462. else
  463. {
  464. double PMPressure = Singleton<RouteManager>.Instance.GetPM(mod).ChamberPressure;
  465. if (Math.Abs(_TMPressure.Value - PMPressure) > MaxPressureDifference)
  466. {
  467. LOG.Write(eEvent.ERR_TM, ModuleName.SETM, $"cannot open door cause pressure, TM Pressure:{_TMPressure.Value} and {mod} pressure:{PMPressure}");
  468. return false;
  469. }
  470. else
  471. return true;
  472. }
  473. }
  474. #endregion
  475. }
  476. }