VpwCellDevice.cs 23 KB

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