VpwCellDevice.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650
  1. using Aitex.Core.RT.DataCenter;
  2. using Aitex.Core.RT.Device;
  3. using Aitex.Core.RT.Log;
  4. using Aitex.Core.RT.OperationCenter;
  5. using Aitex.Core.Util;
  6. using MECF.Framework.Common.Beckhoff.ModuleIO;
  7. using MECF.Framework.Common.CommonData.Prewet;
  8. using MECF.Framework.Common.CommonData.Vpw;
  9. using MECF.Framework.Common.Equipment;
  10. using MECF.Framework.Common.IOCore;
  11. using MECF.Framework.Common.Persistent.SRD;
  12. using MECF.Framework.Common.Persistent.Temperature;
  13. using MECF.Framework.Common.Persistent.VpwCell;
  14. using MECF.Framework.Common.Persistent.VpwMain;
  15. using MECF.Framework.Common.ToolLayout;
  16. using MECF.Framework.Common.Utilities;
  17. using PunkHPX8_RT.Devices.AXIS;
  18. using PunkHPX8_RT.Devices.Resistivity;
  19. using PunkHPX8_RT.Devices.VpwMain;
  20. using PunkHPX8_RT.Modules;
  21. using PunkHPX8_RT.Modules.VpwMain;
  22. using System;
  23. using System.Collections.Generic;
  24. using System.Linq;
  25. using System.Reflection;
  26. using System.Text;
  27. using System.Threading.Tasks;
  28. namespace PunkHPX8_RT.Devices.VpwCell
  29. {
  30. public class VpwCellDevice : BaseDevice, IDevice
  31. {
  32. #region 常量
  33. private const string COMMON_DATA = "CommonData";
  34. private const string DIW_FLOW = "DiwFlow";
  35. private const string VACUUM_PRESSURE = "VacuumPressure";
  36. private const string FLOW_DRIP = "FlowDrip";
  37. private const string FLOW_SMALL = "FlowSmall";
  38. private const string FLOW_LARGE = "FlowLarge";
  39. private const string VACUUM_VALVE = "VacuumValve";
  40. private const string VENT_VALVE = "VentValve";
  41. private const string DRAIN_VALVE = "DrainValve";
  42. private const string PERSISTENT_VALUE = "PersistentValue";
  43. private const string LOOPDO_VALUE = "LoopDoValue";
  44. #endregion
  45. #region 内部变量
  46. /// <summary>
  47. /// 变量是否初始化字典
  48. /// </summary>
  49. private Dictionary<string, bool> _variableInitializeDic = new Dictionary<string, bool>();
  50. /// <summary>
  51. /// 数据
  52. /// </summary>
  53. private VpwCellCommonData _commonData=new VpwCellCommonData();
  54. /// Vpw main数据
  55. /// </summary>
  56. private VpwMainCommonData _mainCommonData = new VpwMainCommonData();
  57. /// <summary>
  58. /// 持久性数值
  59. /// </summary>
  60. private VpwCellPersistentValue _vpwCellPersistentValue;
  61. /// <summary>
  62. /// 水平电机
  63. /// </summary>
  64. private JetAxisBase _rotationAxis;
  65. /// <summary>
  66. /// 水阻计控制器
  67. /// </summary>
  68. private ResistivityController _resistivityController;
  69. /// <summary>
  70. /// 水阻值
  71. /// </summary>
  72. private double _resistivityValue;
  73. /// <summary>
  74. /// main device
  75. /// </summary>
  76. private VpwMainDevice _vpwMainDevice;
  77. #endregion
  78. #region 属性
  79. /// <summary>
  80. /// 数据
  81. /// </summary>
  82. public VpwCellCommonData CommonData { get { return _commonData; } }
  83. /// <summary>
  84. /// vpw main数据
  85. /// </summary>
  86. public VpwMainCommonData MainCommonData { get { return _mainCommonData; } }
  87. /// <summary>
  88. /// 操作模式
  89. /// </summary>
  90. public string OperationMode { get { return _vpwCellPersistentValue.OperatingMode; } }
  91. /// <summary>
  92. /// 工程模式
  93. /// </summary>
  94. public string EngineerMode { get { return _vpwCellPersistentValue.RecipeOperatingMode; } }
  95. /// <summary>
  96. /// LoopDO数值
  97. /// </summary>
  98. public double LoopDOValue { get { return GetLoopDOValue(); } }
  99. #endregion
  100. /// <summary>
  101. /// 构造函数
  102. /// </summary>
  103. /// <param name="moduleName"></param>
  104. public VpwCellDevice(string moduleName) : base(moduleName, moduleName, moduleName, moduleName)
  105. {
  106. }
  107. #region 初始化
  108. /// <summary>
  109. /// 初始化
  110. /// </summary>
  111. /// <returns></returns>
  112. public bool Initialize()
  113. {
  114. InitializeParameter();
  115. InitializeRoutine();
  116. SubscribeData();
  117. SubscribeValueAction();
  118. InitializeOperation();
  119. return true;
  120. }
  121. /// <summary>
  122. /// 初始化参数
  123. /// </summary>
  124. private void InitializeParameter()
  125. {
  126. _rotationAxis = DEVICE.GetDevice<JetAxisBase>($"{Module}.Rotation");
  127. _vpwCellPersistentValue = VpwCellPersistentManager.Instance.GetPersistentValue(Module);
  128. VpwCellItem vpwCellItem=VpwCellItemManager.Instance.GetVpwItem(Module);
  129. if (vpwCellItem != null)
  130. {
  131. _resistivityController = DEVICE.GetDevice<ResistivityController>(vpwCellItem.ResistivityID);
  132. }
  133. _vpwMainDevice = DEVICE.GetDevice<VpwMainDevice>($"VPWMain1");
  134. if(_vpwMainDevice != null)
  135. {
  136. _mainCommonData = _vpwMainDevice.CommonData;
  137. }
  138. }
  139. /// <summary>
  140. /// 初始化Routine
  141. /// </summary>
  142. private void InitializeRoutine()
  143. {
  144. }
  145. /// <summary>
  146. /// 订阅
  147. /// </summary>
  148. private void SubscribeData()
  149. {
  150. DATA.Subscribe($"{Module}.{COMMON_DATA}", () => CommonData, SubscriptionAttribute.FLAG.IgnoreSaveDB);
  151. DATA.Subscribe($"{Module}.{PERSISTENT_VALUE}", () => _vpwCellPersistentValue, SubscriptionAttribute.FLAG.IgnoreSaveDB);
  152. DATA.Subscribe($"{Module}.DiwCellFlow", () => CommonData.DiwFlow, SubscriptionAttribute.FLAG.IgnoreSaveDB);
  153. DATA.Subscribe($"{Module}.VacuumValve", () => CommonData.VacuumValve, SubscriptionAttribute.FLAG.IgnoreSaveDB);
  154. DATA.Subscribe($"{Module}.{LOOPDO_VALUE}", ()=> { return GetLoopDOValue(); }, SubscriptionAttribute.FLAG.IgnoreSaveDB);
  155. }
  156. /// <summary>
  157. /// 获取Loop do数值
  158. /// </summary>
  159. /// <returns></returns>
  160. private double GetLoopDOValue()
  161. {
  162. if (_resistivityController != null)
  163. {
  164. string value = _resistivityController.ResisitivityValue;
  165. if (double.TryParse(value, out _resistivityValue))
  166. {
  167. return _resistivityValue;
  168. }
  169. else
  170. {
  171. _resistivityValue = 0;
  172. return 0;
  173. }
  174. }
  175. else
  176. {
  177. return 0;
  178. }
  179. }
  180. /// <summary>
  181. /// 订阅数据
  182. /// </summary>
  183. private void SubscribeValueAction()
  184. {
  185. IoSubscribeUpdateVariable(DIW_FLOW);
  186. IoSubscribeUpdateVariable(DRAIN_VALVE);
  187. IoSubscribeUpdateVariable(VACUUM_PRESSURE);
  188. IoSubscribeUpdateVariable(VACUUM_VALVE);
  189. IoSubscribeUpdateVariable(VENT_VALVE);
  190. IoSubscribeUpdateVariable(FLOW_DRIP);
  191. IoSubscribeUpdateVariable(FLOW_LARGE);
  192. IoSubscribeUpdateVariable(FLOW_SMALL);
  193. }
  194. /// <summary>
  195. /// 初始化变量
  196. /// </summary>
  197. /// <param name="variable"></param>
  198. private void IoSubscribeUpdateVariable(string variable)
  199. {
  200. _variableInitializeDic[variable] = false;
  201. IOModuleManager.Instance.SubscribeModuleVariable(Module, variable, UpdateVariableValue);
  202. }
  203. /// <summary>
  204. /// 更新变量数值
  205. /// </summary>
  206. /// <param name="variable"></param>
  207. /// <param name="value"></param>
  208. private void UpdateVariableValue(string variable, object value)
  209. {
  210. PropertyInfo property = _commonData.GetType().GetProperty(variable);
  211. if (property != null)
  212. {
  213. property.SetValue(_commonData, value);
  214. if (variable == VACUUM_PRESSURE)
  215. {
  216. double torr = UnitUtil.ConvertToTorr((double)value);
  217. property.SetValue(_commonData, torr);
  218. }
  219. }
  220. if (_variableInitializeDic.ContainsKey(variable) && !_variableInitializeDic[variable])
  221. {
  222. _variableInitializeDic[variable] = true;
  223. }
  224. }
  225. /// <summary>
  226. /// 初始化OP
  227. /// </summary>
  228. private void InitializeOperation()
  229. {
  230. OP.Subscribe($"{Module}.FlowDripOn", (cmd,para)=> { return FlowDripOn(); });
  231. OP.Subscribe($"{Module}.FlowDripOff", (cmd, para) => { return FlowDripOff(); });
  232. OP.Subscribe($"{Module}.FlowSmallOn", (cmd, para) => { return FlowSmallOn(); });
  233. OP.Subscribe($"{Module}.FlowSmallOff", (cmd, para) => { return FlowSmallOff(); });
  234. OP.Subscribe($"{Module}.FlowLargeOn", (cmd, para) => { return FlowLargeOn(); });
  235. OP.Subscribe($"{Module}.FlowLargeOff", (cmd, para) => { return FlowLargeOff(); });
  236. OP.Subscribe($"{Module}.VentValveOn", (cmd, para) => { return VentValveOn(); });
  237. OP.Subscribe($"{Module}.VentValveOff", (cmd, para) => { return VentValveOff(); });
  238. OP.Subscribe($"{Module}.DrainValveOn", (cmd, para) => { return DrainValveOn(); });
  239. OP.Subscribe($"{Module}.DrainValveOff", (cmd, para) => { return DrainValveOff(); });
  240. OP.Subscribe($"{Module}.VacuumValveOn", (cmd, para) => { return VacuumValveOn(); });
  241. OP.Subscribe($"{Module}.VacuumValveOff", (cmd, para) => { return VacuumValveOff(); });
  242. OP.Subscribe($"{Module}.DisabledAction", DisabledOperation);
  243. OP.Subscribe($"{Module}.ManualAction", ManualOperation);
  244. OP.Subscribe($"{Module}.AutoAction", AutoOperation);
  245. OP.Subscribe($"{Module}.EngineeringModeAction", EngineeringModeOperation);
  246. OP.Subscribe($"{Module}.ProductionModeAction", ProductionModeOperation);
  247. OP.Subscribe($"{Module}.StartRotation", StartRotationAction);
  248. OP.Subscribe($"{Module}.StopRotation", StopRotationAction);
  249. }
  250. #endregion
  251. #region Action
  252. private bool StartRotationAction(string cmd, object[] args)
  253. {
  254. if (args.Length < 2 && (int)args[0] < 0 && (int)args[1] < 0)
  255. {
  256. LOG.WriteLog(eEvent.ERR_VPW, Module, $"Start rotation paramater is wrong");
  257. return false;
  258. }
  259. <<<<<<< Updated upstream
  260. double targetPostion = (int)args[0] * 6 * (int)args[1];
  261. object[] param = new object[] { "",targetPostion };
  262. int degSpeed = (int)args[0] * 6;
  263. SetRotationSpeed(degSpeed);
  264. return _rotationAxis.JogUpPosition("", param);
  265. =======
  266. double targetPostion = (int)args[0] * 6 * (int)args[1];
  267. return RotationProfilePosition(targetPostion);
  268. >>>>>>> Stashed changes
  269. }
  270. private bool StopRotationAction(string cmd, object[] args)
  271. {
  272. return _rotationAxis.StopPositionOperation();
  273. }
  274. #region Flow
  275. /// <summary>
  276. /// Flow Drip on
  277. /// </summary>
  278. /// <returns></returns>
  279. public bool FlowDripOn()
  280. {
  281. return WriteVariableValue(FLOW_DRIP, true);
  282. }
  283. /// <summary>
  284. /// Flow Drip Off
  285. /// </summary>
  286. /// <returns></returns>
  287. public bool FlowDripOff()
  288. {
  289. return WriteVariableValue(FLOW_DRIP, false);
  290. }
  291. /// <summary>
  292. /// Flow Small On
  293. /// </summary>
  294. /// <returns></returns>
  295. public bool FlowSmallOn()
  296. {
  297. return WriteVariableValue(FLOW_SMALL, true);
  298. }
  299. /// <summary>
  300. /// Flow Small Off
  301. /// </summary>
  302. /// <returns></returns>
  303. public bool FlowSmallOff()
  304. {
  305. return WriteVariableValue(FLOW_SMALL, false);
  306. }
  307. /// <summary>
  308. /// Flow Large On
  309. /// </summary>
  310. /// <returns></returns>
  311. public bool FlowLargeOn()
  312. {
  313. return WriteVariableValue(FLOW_LARGE, true);
  314. }
  315. /// <summary>
  316. /// Flow Large Off
  317. /// </summary>
  318. /// <returns></returns>
  319. public bool FlowLargeOff()
  320. {
  321. return WriteVariableValue(FLOW_LARGE, false);
  322. }
  323. #endregion
  324. #region Mode Switch
  325. /// <summary>
  326. /// DisabledAction
  327. /// </summary>
  328. /// <param name="cmd"></param>
  329. /// <param name="param"></param>
  330. /// <returns></returns>
  331. private bool DisabledOperation(string cmd, object[] args)
  332. {
  333. string currentOperation = "Disabled";
  334. VpwCellEntity vpwCellEntity = Singleton<RouteManager>.Instance.GetModule<VpwCellEntity>(Module);
  335. if (vpwCellEntity != null && _vpwCellPersistentValue != null && _vpwCellPersistentValue.OperatingMode != currentOperation)
  336. {
  337. string preOperation = _vpwCellPersistentValue.OperatingMode;
  338. if (vpwCellEntity.IsBusy)
  339. {
  340. LOG.WriteLog(eEvent.ERR_VPWMAIN, Module, $"{Module} is Busy, can't switch to Disabled mode");
  341. return false;
  342. }
  343. vpwCellEntity.EnterInit();
  344. _vpwCellPersistentValue.OperatingMode = currentOperation;
  345. LOG.WriteLog(eEvent.INFO_VPWMAIN, Module, $"Operating mode is switched from {preOperation} to {currentOperation}");
  346. }
  347. VpwCellPersistentManager.Instance.UpdatePersistentValue(Module);
  348. return true;
  349. }
  350. /// <summary>
  351. /// ManualAction
  352. /// </summary>
  353. /// <param name="cmd"></param>
  354. /// <param name="param"></param>
  355. /// <returns></returns>
  356. private bool ManualOperation(string cmd, object[] args)
  357. {
  358. string currentOperation = "Manual";
  359. VpwCellEntity vpwCellEntity = Singleton<RouteManager>.Instance.GetModule<VpwCellEntity>(Module);
  360. if (vpwCellEntity != null && _vpwCellPersistentValue != null && _vpwCellPersistentValue.OperatingMode != currentOperation)
  361. {
  362. string preOperation = _vpwCellPersistentValue.OperatingMode;
  363. if (vpwCellEntity.IsBusy)
  364. {
  365. LOG.WriteLog(eEvent.ERR_VPWMAIN, Module, $"{Module} is Busy, can't switch to Manual mode");
  366. return false;
  367. }
  368. vpwCellEntity.EnterInit();
  369. _vpwCellPersistentValue.OperatingMode = currentOperation;
  370. LOG.WriteLog(eEvent.INFO_VPWMAIN, Module, $"Operating mode is switched from {preOperation} to {currentOperation}");
  371. }
  372. VpwCellPersistentManager.Instance.UpdatePersistentValue(Module);
  373. return true;
  374. }
  375. /// <summary>
  376. /// AutoAction
  377. /// </summary>
  378. /// <param name="cmd"></param>
  379. /// <param name="param"></param>
  380. /// <returns></returns>
  381. private bool AutoOperation(string cmd, object[] args)
  382. {
  383. string currentOperation = "Auto";
  384. VpwCellEntity vpwCellEntity = Singleton<RouteManager>.Instance.GetModule<VpwCellEntity>(Module);
  385. if (vpwCellEntity != null && _vpwCellPersistentValue != null && _vpwCellPersistentValue.OperatingMode != currentOperation)
  386. {
  387. string preOperation = _vpwCellPersistentValue.OperatingMode;
  388. if (vpwCellEntity.IsBusy)
  389. {
  390. LOG.WriteLog(eEvent.ERR_VPWMAIN, Module, $"{Module} is Busy, can't switch to Auto mode");
  391. return false;
  392. }
  393. vpwCellEntity.EnterInit();
  394. _vpwCellPersistentValue.OperatingMode = currentOperation;
  395. LOG.WriteLog(eEvent.INFO_VPWMAIN, Module, $"Operating mode is switched from {preOperation} to {currentOperation}");
  396. }
  397. VpwCellPersistentManager.Instance.UpdatePersistentValue(Module);
  398. return true;
  399. }
  400. /// <summary>
  401. /// EngineeringModeAction
  402. /// </summary>
  403. /// <param name="cmd"></param>
  404. /// <param name="param"></param>
  405. /// <returns></returns>
  406. private bool EngineeringModeOperation(string cmd, object[] args)
  407. {
  408. string currentRecipeOperation = "Engineering";
  409. if (_vpwCellPersistentValue != null)
  410. {
  411. _vpwCellPersistentValue.RecipeOperatingMode = currentRecipeOperation;
  412. }
  413. VpwCellPersistentManager.Instance.UpdatePersistentValue(Module);
  414. return true;
  415. }
  416. /// <summary>
  417. /// ProductionAction
  418. /// </summary>
  419. /// <param name="cmd"></param>
  420. /// <param name="param"></param>
  421. /// <returns></returns>
  422. private bool ProductionModeOperation(string cmd, object[] args)
  423. {
  424. string currentRecipeOperation = "Production";
  425. if (_vpwCellPersistentValue != null)
  426. {
  427. _vpwCellPersistentValue.RecipeOperatingMode = currentRecipeOperation;
  428. }
  429. VpwCellPersistentManager.Instance.UpdatePersistentValue(Module);
  430. return true;
  431. }
  432. #endregion
  433. #region Vent Valve
  434. /// <summary>
  435. /// Vent Valve On
  436. /// </summary>
  437. /// <returns></returns>
  438. public bool VentValveOn()
  439. {
  440. return WriteVariableValue(VENT_VALVE, true);
  441. }
  442. /// <summary>
  443. /// Vent Valve Off
  444. /// </summary>
  445. /// <returns></returns>
  446. public bool VentValveOff()
  447. {
  448. return WriteVariableValue(VENT_VALVE, false);
  449. }
  450. #endregion
  451. #region Drain Valve
  452. /// <summary>
  453. /// Drain Valve On
  454. /// </summary>
  455. /// <returns></returns>
  456. public bool DrainValveOn()
  457. {
  458. return WriteVariableValue(DRAIN_VALVE, true);
  459. }
  460. /// <summary>
  461. /// Drain Valve Off
  462. /// </summary>
  463. /// <returns></returns>
  464. public bool DrainValveOff()
  465. {
  466. return WriteVariableValue(DRAIN_VALVE, false);
  467. }
  468. #endregion
  469. #region Vacuum
  470. /// <summary>
  471. /// Vacuum valve on
  472. /// </summary>
  473. /// <returns></returns>
  474. public bool VacuumValveOn()
  475. {
  476. return WriteVariableValue(VACUUM_VALVE, true);
  477. }
  478. /// <summary>
  479. /// Vacuum valve off
  480. /// </summary>
  481. /// <returns></returns>
  482. public bool VacuumValveOff()
  483. {
  484. return WriteVariableValue(VACUUM_VALVE, false);
  485. }
  486. #endregion
  487. /// <summary>
  488. /// 写变量
  489. /// </summary>
  490. /// <param name="variable"></param>
  491. /// <param name="value"></param>
  492. /// <returns></returns>
  493. private bool WriteVariableValue(string variable, object value)
  494. {
  495. string ioName = BeckhoffModuleIOManager.Instance.GetIoNameByInnerModuleName($"{Module}.{variable}");
  496. return IOModuleManager.Instance.WriteIoValue(ioName, value);
  497. }
  498. #endregion
  499. #region Axis
  500. /// <summary>
  501. /// 电机是否上电
  502. /// </summary>
  503. /// <returns></returns>
  504. public bool CheckRotationSwitchOn()
  505. {
  506. return _rotationAxis.IsSwitchOn;
  507. }
  508. /// <summary>
  509. /// Home rotation
  510. /// </summary>
  511. /// <returns></returns>
  512. public bool HomeRotation()
  513. {
  514. return _rotationAxis.Home();
  515. }
  516. /// <summary>
  517. /// 检验Rotation Home结果
  518. /// </summary>
  519. /// <returns></returns>
  520. public bool CheckHomeEndStatus()
  521. {
  522. return CheckRotationEndStatus() && _rotationAxis.IsHomed;
  523. }
  524. /// <summary>
  525. /// 检验Rotation结束状态
  526. /// </summary>
  527. /// <returns></returns>
  528. public bool CheckRotationEndStatus()
  529. {
  530. return _rotationAxis.Status == PunkHPX8_Core.RState.End;
  531. }
  532. /// <summary>
  533. /// 检验Rotation失败状态
  534. /// </summary>
  535. /// <returns></returns>
  536. public bool CheckRotationStopStatus()
  537. {
  538. return _rotationAxis.Status == PunkHPX8_Core.RState.Failed;
  539. }
  540. /// <summary>
  541. /// 设置速度
  542. /// </summary>
  543. /// <param name="speed"></param>
  544. /// <returns></returns>
  545. public bool SetRotationSpeed(int speed)
  546. {
  547. _rotationAxis.SetProfileSpeed(speed);
  548. return true;
  549. }
  550. /// <summary>
  551. /// 改变速度
  552. /// </summary>
  553. /// <param name="speed"></param>
  554. /// <returns></returns>
  555. public bool ChangeRotationSpeed(int speed)
  556. {
  557. return _rotationAxis.ChangeSpeed(speed);
  558. }
  559. /// <summary>
  560. /// 电机运动
  561. /// </summary>
  562. /// <param name="position"></param>
  563. /// <returns></returns>
  564. public bool RotationProfilePosition(double position)
  565. {
  566. VpwMainDevice vpwCellDevice = DEVICE.GetDevice<VpwMainDevice>(ModuleName.VPWMain1.ToString());
  567. if (vpwCellDevice != null)
  568. {
  569. if (!vpwCellDevice.CommonData.ChamberOpened && vpwCellDevice.CommonData.ChamberClosed)
  570. {
  571. LOG.WriteLog(eEvent.ERR_AXIS, $"{Module}.{Name}", "chamber is not closed, Cannot execute GotoSavedPosition");
  572. return false;
  573. }
  574. }
  575. return _rotationAxis.ProfilePositionOperation(position);
  576. }
  577. /// <summary>
  578. /// 停止运动
  579. /// </summary>
  580. /// <returns></returns>
  581. public bool StopProfilePosition()
  582. {
  583. return _rotationAxis.StopPositionOperation();
  584. }
  585. /// <summary>
  586. /// 是否Rotation运动
  587. /// </summary>
  588. /// <returns></returns>
  589. public bool CheckRotationRunning()
  590. {
  591. return _rotationAxis.IsRun;
  592. }
  593. #endregion
  594. /// <summary>
  595. /// 定时器
  596. /// </summary>
  597. /// <returns></returns>
  598. public bool OnTimer()
  599. {
  600. if (_rotationAxis != null)
  601. {
  602. _rotationAxis.OnTimer();
  603. }
  604. return true;
  605. }
  606. /// <summary>
  607. /// 监控
  608. /// </summary>
  609. public void Monitor()
  610. {
  611. }
  612. public void Reset()
  613. {
  614. }
  615. public void Terminate()
  616. {
  617. }
  618. }
  619. }