BoatModuleAlarmDefine.cs 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. using Aitex.Core.RT.Device;
  2. using Aitex.Core.RT.Device.Unit;
  3. using Aitex.Core.RT.Event;
  4. using Aitex.Core.RT.Log;
  5. using Aitex.Core.RT.OperationCenter;
  6. using Aitex.Core.RT.SCCore;
  7. using Aitex.Core.Util;
  8. using MECF.Framework.Common.Event;
  9. using MECF.Framework.Common.OperationCenter;
  10. using System;
  11. namespace FurnaceRT.Equipments.Boats
  12. {
  13. public partial class BoatModule
  14. {
  15. #region AlarmDefine
  16. public AlarmEventItem AutoShutterMoveFailedForInterlock { get; set; }
  17. public AlarmEventItem AutoShutterOpenTimeOut { get; set; }
  18. public AlarmEventItem AutoShutterCloseTimeOut { get; set; }
  19. public AlarmEventItem BoatZAxisMoveFailedForInterlock { get; set; }
  20. public AlarmEventItem BoatZAxisUpLimit { get; set; }
  21. public AlarmEventItem BoatZAxisDownLimit { get; set; }
  22. public AlarmEventItem BoatHumanInterlock { get; set; }
  23. public AlarmEventItem BoatZAxisMoveFailedForAutoShutterNotOpen { get; set; }
  24. public AlarmEventItem BoatZAxisMoveFailedForAutoShutterNotDown { get; set; }
  25. public AlarmEventItem BoatZAxisMoveFailedForTiltStatus { get; set; }
  26. public AlarmEventItem BoatZAxisMoveFailedForHumanInterlock { get; set; }
  27. public AlarmEventItem BoatZAxisMoveFailedForWaferRobotArmExtend { get; set; }
  28. public AlarmEventItem BoatZAxisMoveTimeOut { get; set; }
  29. public AlarmEventItem BoatRAxisMoveTimeOut { get; set; }
  30. public AlarmEventItem BoatRAxisMoveFailedForInterlock { get; set; }
  31. public AlarmEventItem BoatZAxisHomeFailed { get; set; }
  32. public AlarmEventItem BoatZAxisHomeTimeout { get; set; }
  33. public AlarmEventItem BoatRAxisHomeFailed { get; set; }
  34. public AlarmEventItem BoatRAxisHomeTimeout { get; set; }
  35. public AlarmEventItem BoatStepperMotorAlarm { get; set; }
  36. #endregion
  37. private void InitAlarmEvent()
  38. {
  39. AutoShutterMoveFailedForInterlock = SubscribeAlarm(new AlarmEventItem()
  40. {
  41. EventEnum = $"{Name}.AutoShutterMoveFailedForInterlock",
  42. Description = $"Auto shutter move failed for interlock ",
  43. Solution = "No information available. Press[Clear] to delete alarm message.",
  44. Explaination = "No information available.",
  45. AutoRecovery = false,
  46. Level = EventLevel.Alarm,
  47. Action = EventAction.Clear,
  48. Category = "BoatAlarm",
  49. }, () => { return true; });
  50. AutoShutterOpenTimeOut = SubscribeAlarm(new AlarmEventItem()
  51. {
  52. EventEnum = $"{Name}.AutoShutterOpenTimeOut",
  53. Description = $"Auto shutter open timeout ",
  54. Solution = "No information available. Press[Clear] to delete alarm message.",
  55. Explaination = "No information available.",
  56. AutoRecovery = false,
  57. Level = EventLevel.Alarm,
  58. Action = EventAction.Clear,
  59. Category = "BoatAlarm",
  60. }, () => { return true; });
  61. AutoShutterCloseTimeOut = SubscribeAlarm(new AlarmEventItem()
  62. {
  63. EventEnum = $"{Name}.AutoShutterCloseTimeOut",
  64. Description = $"Auto shutter close timeout ",
  65. Solution = "No information available. Press[Clear] to delete alarm message.",
  66. Explaination = "No information available.",
  67. AutoRecovery = false,
  68. Level = EventLevel.Alarm,
  69. Action = EventAction.Clear,
  70. Category = "BoatAlarm",
  71. }, () => { return true; });
  72. if (ShutterDevice != null)
  73. {
  74. ShutterDevice.AutoShutterMoveFailedForInterlock = AutoShutterMoveFailedForInterlock;
  75. ShutterDevice.AutoShutterOpenTimeOut = AutoShutterOpenTimeOut;
  76. ShutterDevice.AutoShutterCloseTimeOut = AutoShutterCloseTimeOut;
  77. }
  78. BoatZAxisMoveFailedForInterlock = SubscribeAlarm(new AlarmEventItem()
  79. {
  80. EventEnum = $"{Name}.BoatZAxisMoveFailedForInterlock",
  81. Description = $"{Name} boat z axis move failed for interlock ",
  82. Solution = "No information available. Press[Clear] to delete alarm message.",
  83. Explaination = "No information available.",
  84. AutoRecovery = false,
  85. Level = EventLevel.Warning,
  86. Action = EventAction.Clear,
  87. Category = "BoatAlarm",
  88. }, () => { return true; });
  89. BoatZAxisUpLimit = SubscribeAlarm(new AlarmEventItem()
  90. {
  91. EventEnum = $"{Name}.BoatZAxisUpLimit",
  92. Description = $"{Name} boat z axis up limit ",
  93. Solution = "No information available. Press[Clear] to delete alarm message.",
  94. Explaination = "No information available.",
  95. AutoRecovery = false,
  96. Level = EventLevel.Alarm,
  97. Action = EventAction.Clear,
  98. Category = "BoatAlarm",
  99. }, () => { return true; });
  100. BoatZAxisDownLimit = SubscribeAlarm(new AlarmEventItem()
  101. {
  102. EventEnum = $"{Name}.BoatZAxisDownLimit",
  103. Description = $"{Name} boat z axis down limit ",
  104. Solution = "No information available. Press[Clear] to delete alarm message.",
  105. Explaination = "No information available.",
  106. AutoRecovery = false,
  107. Level = EventLevel.Alarm,
  108. Action = EventAction.Clear,
  109. Category = "BoatAlarm",
  110. }, () => { return true; });
  111. BoatHumanInterlock = SubscribeAlarm(new AlarmEventItem()
  112. {
  113. EventEnum = $"{Name}.BoatHumanInterlock",
  114. Description = $"{Name} boat human interlock ",
  115. Solution = "No information available. Press[Clear] to delete alarm message.",
  116. Explaination = "No information available.",
  117. AutoRecovery = false,
  118. Level = EventLevel.Alarm,
  119. Action = EventAction.Clear,
  120. Category = "BoatAlarm",
  121. }, () => { return true; });
  122. BoatZAxisMoveFailedForAutoShutterNotOpen = SubscribeAlarm(new AlarmEventItem()
  123. {
  124. EventEnum = $"{Name}.BoatZAxisMoveFailedForAutoShutterNotOpen",
  125. Description = $"{Name} boat z axis move failed for auto shutter not open ",
  126. Solution = "No information available. Press[Clear] to delete alarm message.",
  127. Explaination = "No information available.",
  128. AutoRecovery = false,
  129. Level = EventLevel.Alarm,
  130. Action = EventAction.Clear,
  131. Category = "BoatAlarm",
  132. }, () => { return true; });
  133. BoatZAxisMoveFailedForAutoShutterNotDown = SubscribeAlarm(new AlarmEventItem()
  134. {
  135. EventEnum = $"{Name}.BoatZAxisMoveFailedForAutoShutterNotDown",
  136. Description = $"{Name} boat z axis move failed for auto shutter not down ",
  137. Solution = "No information available. Press[Clear] to delete alarm message.",
  138. Explaination = "No information available.",
  139. AutoRecovery = false,
  140. Level = EventLevel.Alarm,
  141. Action = EventAction.Clear,
  142. Category = "BoatAlarm",
  143. }, () => { return true; });
  144. BoatZAxisMoveFailedForTiltStatus = SubscribeAlarm(new AlarmEventItem()
  145. {
  146. EventEnum = $"{Name}.BoatZAxisMoveFailedForTiltStatus",
  147. Description = $"{Name} boat z axis move failed for tilt status ",
  148. Solution = "No information available. Press[Clear] to delete alarm message.",
  149. Explaination = "No information available.",
  150. AutoRecovery = false,
  151. Level = EventLevel.Alarm,
  152. Action = EventAction.Clear,
  153. Category = "BoatAlarm",
  154. }, () => { return true; });
  155. BoatZAxisMoveFailedForHumanInterlock = SubscribeAlarm(new AlarmEventItem()
  156. {
  157. EventEnum = $"{Name}.BoatZAxisMoveFailedForHumanInterlock",
  158. Description = $"{Name} boat z axis move failed for human interlock ",
  159. Solution = "No information available. Press[Clear] to delete alarm message.",
  160. Explaination = "No information available.",
  161. AutoRecovery = false,
  162. Level = EventLevel.Alarm,
  163. Action = EventAction.Clear,
  164. Category = "BoatAlarm",
  165. }, () => { return true; });
  166. BoatZAxisMoveFailedForWaferRobotArmExtend = SubscribeAlarm(new AlarmEventItem()
  167. {
  168. EventEnum = $"{Name}.BoatZAxisMoveFailedForWaferRobotArmExtend",
  169. Description = $"{Name} boat z axis move failed for wafer robot arm extend ",
  170. Solution = "No information available. Press[Clear] to delete alarm message.",
  171. Explaination = "No information available.",
  172. AutoRecovery = false,
  173. Level = EventLevel.Alarm,
  174. Action = EventAction.Clear,
  175. Category = "BoatAlarm",
  176. }, () => { return true; });
  177. BoatZAxisMoveTimeOut = SubscribeAlarm(new AlarmEventItem()
  178. {
  179. EventEnum = $"{Name}.BoatZAxisMoveTimeOut",
  180. Description = $"{Name} boat z axis move timeout ",
  181. Solution = "No information available. Press[Clear] to delete alarm message.",
  182. Explaination = "No information available.",
  183. AutoRecovery = false,
  184. Level = EventLevel.Alarm,
  185. Action = EventAction.Clear,
  186. Category = "BoatAlarm",
  187. }, () => { return true; });
  188. BoatRAxisMoveTimeOut = SubscribeAlarm(new AlarmEventItem()
  189. {
  190. EventEnum = $"{Name}.BoatRAxisMoveTimeOut",
  191. Description = $"{Name} boat r axis move timeout ",
  192. Solution = "No information available. Press[Clear] to delete alarm message.",
  193. Explaination = "No information available.",
  194. AutoRecovery = false,
  195. Level = EventLevel.Alarm,
  196. Action = EventAction.Clear,
  197. Category = "BoatAlarm",
  198. }, () => { return true; });
  199. BoatRAxisMoveFailedForInterlock = SubscribeAlarm(new AlarmEventItem()
  200. {
  201. EventEnum = $"{Name}.BoatRAxisMoveFailedForInterlock",
  202. Description = $"{Name} boat r axis move failed for interlock ",
  203. Solution = "No information available. Press[Clear] to delete alarm message.",
  204. Explaination = "No information available.",
  205. AutoRecovery = false,
  206. Level = EventLevel.Alarm,
  207. Action = EventAction.Clear,
  208. Category = "BoatAlarm",
  209. }, () => { return true; });
  210. BoatZAxisHomeFailed = SubscribeAlarm(new AlarmEventItem()
  211. {
  212. EventEnum = $"{Name}.BoatZAxisHomeFailed",
  213. Description = $"{Name} boat Z Axis home failed ",
  214. Solution = "No information available. Press[Clear] to delete alarm message.",
  215. Explaination = "No information available.",
  216. AutoRecovery = false,
  217. Level = EventLevel.Alarm,
  218. Action = EventAction.ClearAndRetry,
  219. Category = "BoatAlarm",
  220. }, () => { return true; });
  221. BoatZAxisHomeTimeout = SubscribeAlarm(new AlarmEventItem()
  222. {
  223. EventEnum = $"{Name}.BoatZAxisHomeTimeout",
  224. Description = $"{Name} boat Z Axis home timeout ",
  225. Solution = "No information available. Press[Clear] to delete alarm message.",
  226. Explaination = "No information available.",
  227. AutoRecovery = false,
  228. Level = EventLevel.Alarm,
  229. Action = EventAction.ClearAndRetry,
  230. Category = "BoatAlarm",
  231. }, () => { return true; });
  232. BoatRAxisHomeFailed = SubscribeAlarm(new AlarmEventItem()
  233. {
  234. EventEnum = $"{Name}.BoatRAxisHomeFailed",
  235. Description = $"{Name} boat R Axis home failed ",
  236. Solution = "No information available. Press[Clear] to delete alarm message.",
  237. Explaination = "No information available.",
  238. AutoRecovery = false,
  239. Level = EventLevel.Alarm,
  240. Action = EventAction.ClearAndRetry,
  241. Category = "BoatAlarm",
  242. }, () => { return true; });
  243. BoatRAxisHomeTimeout = SubscribeAlarm(new AlarmEventItem()
  244. {
  245. EventEnum = $"{Name}.BoatRAxisHomeTimeout",
  246. Description = $"{Name} boat R Axis home timeout ",
  247. Solution = "No information available. Press[Clear] to delete alarm message.",
  248. Explaination = "No information available.",
  249. AutoRecovery = false,
  250. Level = EventLevel.Alarm,
  251. Action = EventAction.ClearAndRetry,
  252. Category = "BoatAlarm",
  253. }, () => { return true; });
  254. if (SensorStepperMotorAlarm != null)
  255. {
  256. BoatStepperMotorAlarm = SubscribeAlarm(new AlarmEventItem()
  257. {
  258. EventEnum = $"{Name}.BoatStepperMotorAlarm",
  259. Description = $"{Name} Stepper Motor Alarm",
  260. Solution = "No information available. Press[Clear] to delete alarm message.",
  261. Explaination = "No information available.",
  262. AutoRecovery = false,
  263. Level = EventLevel.Alarm,
  264. Action = EventAction.Clear,
  265. Category = "BoatAlarm",
  266. }, () =>
  267. {
  268. IoTrigger trigger = DEVICE.GetDevice<IoTrigger>($"PM1.TrigBoatRAxisAlarmReset");
  269. trigger.DoTrigger.SetPulseValue(true, 1000);
  270. SensorStepperMotorAlarm.Reset();
  271. return true;
  272. });
  273. SensorStepperMotorAlarm.AlarmTriggered = BoatStepperMotorAlarm;
  274. }
  275. }
  276. }
  277. }