EquipmentManagerAlarmDefine.cs 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. using System;
  2. using System.Collections.Generic;
  3. using Aitex.Core.RT.Event;
  4. using MECF.Framework.Common.Event;
  5. namespace FurnaceRT.Equipments.Systems
  6. {
  7. public partial class EquipmentManager
  8. {
  9. private List<AlarmEventItem> _triggeredAlarmList = new List<AlarmEventItem>();
  10. public AlarmEventItem PLCDisconnectAlarm { get; set; }
  11. public AlarmEventItem PLCConnectRecoveryWarning { get; set; }
  12. public AlarmEventItem MoveWaferFailedWarning { get; set; }
  13. public AlarmEventItem ReturnWaferFailedWarning { get; set; }
  14. public AlarmEventItem DeleteWaferFailedWarning { get; set; }
  15. public AlarmEventItem CreateWaferFailedWarning { get; set; }
  16. public AlarmEventItem SetLotIDFailedWarning { get; set; }
  17. public AlarmEventItem ChargeProcessDischargeStartFailedWarning { get; set; }
  18. public AlarmEventItem LoadProcessStockerStartFailedWarning { get; set; }
  19. public AlarmEventItem LoadProcessUnloadStartFailedWarning { get; set; }
  20. public AlarmEventItem ExpertChargeProcessDischargeStartFailedWarning { get; set; }
  21. public AlarmEventItem ExpertChargeProcessStartFailedWarning { get; set; }
  22. public AlarmEventItem LoadCassetteJobStartFailedWarning { get; set; }
  23. public AlarmEventItem UnloadCassetteJobStartFailedWarning { get; set; }
  24. public AlarmEventItem ChargeWaferJobStartFailedWarning { get; set; }
  25. public AlarmEventItem ReturnAllWaferJobStartFailedWarning { get; set; }
  26. public AlarmEventItem ChargeWaferJobMonitorFailedAlarm { get; set; }
  27. public AlarmEventItem DischargeWaferJobMonitorFailedAlarm { get; set; }
  28. public AlarmEventItem SDWaferTypeUseCountWarning { get; set; }
  29. public AlarmEventItem SDWaferTypeUseCountAlarm { get; set; }
  30. public AlarmEventItem SDWaferTypeUseTimeWarning { get; set; }
  31. public AlarmEventItem SDWaferTypeUseTimeAlarm { get; set; }
  32. public AlarmEventItem SDWaferTypeThicknessWarning { get; set; }
  33. public AlarmEventItem SDWaferTypeThicknessAlarm { get; set; }
  34. public AlarmEventItem EDWaferTypeUseCountWarning { get; set; }
  35. public AlarmEventItem EDWaferTypeUseCountAlarm { get; set; }
  36. public AlarmEventItem EDWaferTypeUseTimeWarning { get; set; }
  37. public AlarmEventItem EDWaferTypeUseTimeAlarm { get; set; }
  38. public AlarmEventItem EDWaferTypeThicknessWarning { get; set; }
  39. public AlarmEventItem EDWaferTypeThicknessAlarm { get; set; }
  40. public AlarmEventItem EquipmentEmergencyStopAlarm { get; set; }
  41. public AlarmEventItem TransferJobStartFailedWarning { get; set; }
  42. private void InitAlarmDefine()
  43. {
  44. PLCDisconnectAlarm = SubscribeAlarm(new AlarmEventItem()
  45. {
  46. EventEnum = $"{Name}.PLCDisconnectAlarm",
  47. Description = $"PLC disconnect ",
  48. Solution = "No information available. Press[Clear] to delete alarm message.",
  49. Explaination = "No information available.",
  50. AutoRecovery = false,
  51. Level = EventLevel.Alarm,
  52. Action = EventAction.Clear,
  53. Category = "SystemAlarm",
  54. }, () => { return true; });
  55. PLCConnectRecoveryWarning = SubscribeAlarm(new AlarmEventItem()
  56. {
  57. EventEnum = $"{Name}.PLCConnectRecoveryWarning",
  58. Description = $"PLC connect recovery ",
  59. Solution = "No information available. Press[Clear] to delete alarm message.",
  60. Explaination = "No information available.",
  61. AutoRecovery = false,
  62. Level = EventLevel.Warning,
  63. Action = EventAction.Clear,
  64. Category = "SystemAlarm",
  65. }, () => { return true; });
  66. MoveWaferFailedWarning = SubscribeAlarm(new AlarmEventItem()
  67. {
  68. EventEnum = $"{Name}.MoveWaferFailedWarning",
  69. Description = $"{Name} move wafer failed ",
  70. Solution = "No information available. Press[Clear] to delete alarm message.",
  71. Explaination = "No information available.",
  72. AutoRecovery = false,
  73. Level = EventLevel.Warning,
  74. Action = EventAction.Clear,
  75. Category = "SystemAlarm",
  76. }, () => { return true; });
  77. ReturnWaferFailedWarning = SubscribeAlarm(new AlarmEventItem()
  78. {
  79. EventEnum = $"{Name}.ReturnWaferFailedWarning",
  80. Description = $"{Name} return wafer failed ",
  81. Solution = "No information available. Press[Clear] to delete alarm message.",
  82. Explaination = "No information available.",
  83. AutoRecovery = false,
  84. Level = EventLevel.Warning,
  85. Action = EventAction.Clear,
  86. Category = "SystemAlarm",
  87. }, () => { return true; });
  88. DeleteWaferFailedWarning = SubscribeAlarm(new AlarmEventItem()
  89. {
  90. EventEnum = $"{Name}.DeleteWaferFailedWarning",
  91. Description = $"{Name} delete wafer failed ",
  92. Solution = "No information available. Press[Clear] to delete alarm message.",
  93. Explaination = "No information available.",
  94. AutoRecovery = false,
  95. Level = EventLevel.Warning,
  96. Action = EventAction.Clear,
  97. Category = "SystemAlarm",
  98. }, () => { return true; });
  99. CreateWaferFailedWarning = SubscribeAlarm(new AlarmEventItem()
  100. {
  101. EventEnum = $"{Name}.CreateWaferFailedWarning",
  102. Description = $"{Name} create wafer failed ",
  103. Solution = "No information available. Press[Clear] to delete alarm message.",
  104. Explaination = "No information available.",
  105. AutoRecovery = false,
  106. Level = EventLevel.Warning,
  107. Action = EventAction.Clear,
  108. Category = "SystemAlarm",
  109. }, () => { return true; });
  110. SetLotIDFailedWarning = SubscribeAlarm(new AlarmEventItem()
  111. {
  112. EventEnum = $"{Name}.SetLotIDFailedWarning",
  113. Description = $"{Name} set lotID failed ",
  114. Solution = "No information available. Press[Clear] to delete alarm message.",
  115. Explaination = "No information available.",
  116. AutoRecovery = false,
  117. Level = EventLevel.Warning,
  118. Action = EventAction.Clear,
  119. Category = "SystemAlarm",
  120. }, () => { return true; });
  121. ChargeProcessDischargeStartFailedWarning = SubscribeAlarm(new AlarmEventItem()
  122. {
  123. EventEnum = $"{Name}.ChargeProcessDischargeStartFailedWarning",
  124. Description = $"{Name} ChargeProcessDischarge start failed ",
  125. Solution = "No information available. Press[Clear] to delete alarm message.",
  126. Explaination = "No information available.",
  127. AutoRecovery = false,
  128. Level = EventLevel.Warning,
  129. Action = EventAction.Clear,
  130. Category = "SystemAlarm",
  131. }, () => { return true; });
  132. LoadProcessStockerStartFailedWarning = SubscribeAlarm(new AlarmEventItem()
  133. {
  134. EventEnum = $"{Name}.LoadProcessStockerStartFailedWarning",
  135. Description = $"{Name} LoadProcessStocker start failed ",
  136. Solution = "No information available. Press[Clear] to delete alarm message.",
  137. Explaination = "No information available.",
  138. AutoRecovery = false,
  139. Level = EventLevel.Warning,
  140. Action = EventAction.Clear,
  141. Category = "SystemAlarm",
  142. }, () => { return true; });
  143. LoadProcessUnloadStartFailedWarning = SubscribeAlarm(new AlarmEventItem()
  144. {
  145. EventEnum = $"{Name}.LoadProcessUnloadStartFailedWarning",
  146. Description = $"{Name} LoadProcessUnload start failed ",
  147. Solution = "No information available. Press[Clear] to delete alarm message.",
  148. Explaination = "No information available.",
  149. AutoRecovery = false,
  150. Level = EventLevel.Warning,
  151. Action = EventAction.Clear,
  152. Category = "SystemAlarm",
  153. }, () => { return true; });
  154. ExpertChargeProcessDischargeStartFailedWarning = SubscribeAlarm(new AlarmEventItem()
  155. {
  156. EventEnum = $"{Name}.ExpertChargeProcessDischargeStartFailedWarning",
  157. Description = $"{Name} Expert ChargeProcessDischarge start failed ",
  158. Solution = "No information available. Press[Clear] to delete alarm message.",
  159. Explaination = "No information available.",
  160. AutoRecovery = false,
  161. Level = EventLevel.Warning,
  162. Action = EventAction.Clear,
  163. Category = "SystemAlarm",
  164. }, () => { return true; });
  165. ExpertChargeProcessStartFailedWarning = SubscribeAlarm(new AlarmEventItem()
  166. {
  167. EventEnum = $"{Name}.ExpertChargeProcessStartFailedWarning",
  168. Description = $"{Name} Expert ChargeProcess start failed ",
  169. Solution = "No information available. Press[Clear] to delete alarm message.",
  170. Explaination = "No information available.",
  171. AutoRecovery = false,
  172. Level = EventLevel.Warning,
  173. Action = EventAction.Clear,
  174. Category = "SystemAlarm",
  175. }, () => { return true; });
  176. LoadCassetteJobStartFailedWarning = SubscribeAlarm(new AlarmEventItem()
  177. {
  178. EventEnum = $"{Name}.LoadCassetteJobStartFailedWarning",
  179. Description = $"{Name} LoadCassette job start failed ",
  180. Solution = "No information available. Press[Clear] to delete alarm message.",
  181. Explaination = "No information available.",
  182. AutoRecovery = false,
  183. Level = EventLevel.Warning,
  184. Action = EventAction.Clear,
  185. Category = "SystemAlarm",
  186. }, () => { return true; });
  187. UnloadCassetteJobStartFailedWarning = SubscribeAlarm(new AlarmEventItem()
  188. {
  189. EventEnum = $"{Name}.UnloadCassetteJobStartFailedWarning",
  190. Description = $"{Name} UnloadCassette job start failed ",
  191. Solution = "No information available. Press[Clear] to delete alarm message.",
  192. Explaination = "No information available.",
  193. AutoRecovery = false,
  194. Level = EventLevel.Warning,
  195. Action = EventAction.Clear,
  196. Category = "SystemAlarm",
  197. }, () => { return true; });
  198. ChargeWaferJobStartFailedWarning = SubscribeAlarm(new AlarmEventItem()
  199. {
  200. EventEnum = $"{Name}.ChargeWaferJobStartFailedWarning",
  201. Description = $"{Name} ChargeWafer job start failed ",
  202. Solution = "No information available. Press[Clear] to delete alarm message.",
  203. Explaination = "No information available.",
  204. AutoRecovery = false,
  205. Level = EventLevel.Warning,
  206. Action = EventAction.Clear,
  207. Category = "SystemAlarm",
  208. }, () => { return true; });
  209. ReturnAllWaferJobStartFailedWarning = SubscribeAlarm(new AlarmEventItem()
  210. {
  211. EventEnum = $"{Name}.ReturnAllWaferJobStartFailedWarning",
  212. Description = $"{Name} ReturnAllWafer job start failed ",
  213. Solution = "No information available. Press[Clear] to delete alarm message.",
  214. Explaination = "No information available.",
  215. AutoRecovery = false,
  216. Level = EventLevel.Warning,
  217. Action = EventAction.Clear,
  218. Category = "SystemAlarm",
  219. }, () => { return true; });
  220. ChargeWaferJobMonitorFailedAlarm = SubscribeAlarm(new AlarmEventItem()
  221. {
  222. EventEnum = $"{Name}.ChargeWaferJobMonitorFailedAlarm",
  223. Description = $"{Name} ChargeWafer job monitor start failed ",
  224. Solution = "No information available. Press[Clear] to delete alarm message.",
  225. Explaination = "No information available.",
  226. AutoRecovery = false,
  227. Level = EventLevel.Alarm,
  228. Action = EventAction.Clear,
  229. Category = "SystemAlarm",
  230. }, () => { return true; });
  231. DischargeWaferJobMonitorFailedAlarm = SubscribeAlarm(new AlarmEventItem()
  232. {
  233. EventEnum = $"{Name}.DischargeWaferJobMonitorFailedAlarm",
  234. Description = $"{Name} DischargeWafer job monitor start failed ",
  235. Solution = "No information available. Press[Clear] to delete alarm message.",
  236. Explaination = "No information available.",
  237. AutoRecovery = false,
  238. Level = EventLevel.Alarm,
  239. Action = EventAction.Clear,
  240. Category = "SystemAlarm",
  241. }, () => { return true; });
  242. SDWaferTypeUseCountWarning = SubscribeAlarm(new AlarmEventItem()
  243. {
  244. EventEnum = $"{Name}.SDWaferTypeUseCountWarning",
  245. Description = $"SD wafer type use count warning ",
  246. Solution = "No information available. Press[Clear] to delete alarm message.",
  247. Explaination = "No information available.",
  248. AutoRecovery = false,
  249. Level = EventLevel.Warning,
  250. Action = EventAction.Clear,
  251. Category = "SystemAlarm",
  252. }, () => { return true; });
  253. SDWaferTypeUseCountAlarm = SubscribeAlarm(new AlarmEventItem()
  254. {
  255. EventEnum = $"{Name}.SDWaferTypeUseCountAlarm",
  256. Description = $"SD wafer type use count alarm ",
  257. Solution = "No information available. Press[Clear] to delete alarm message.",
  258. Explaination = "No information available.",
  259. AutoRecovery = false,
  260. Level = EventLevel.Alarm,
  261. Action = EventAction.Clear,
  262. Category = "SystemAlarm",
  263. }, () => { return true; });
  264. SDWaferTypeUseTimeWarning = SubscribeAlarm(new AlarmEventItem()
  265. {
  266. EventEnum = $"{Name}.SDWaferTypeUseTimeWarning",
  267. Description = $"SD wafer type use time warning ",
  268. Solution = "No information available. Press[Clear] to delete alarm message.",
  269. Explaination = "No information available.",
  270. AutoRecovery = false,
  271. Level = EventLevel.Warning,
  272. Action = EventAction.Clear,
  273. Category = "SystemAlarm",
  274. }, () => { return true; });
  275. SDWaferTypeUseTimeAlarm = SubscribeAlarm(new AlarmEventItem()
  276. {
  277. EventEnum = $"{Name}.SDWaferTypeUseTimeAlarm",
  278. Description = $"SD wafer type use time alarm ",
  279. Solution = "No information available. Press[Clear] to delete alarm message.",
  280. Explaination = "No information available.",
  281. AutoRecovery = false,
  282. Level = EventLevel.Alarm,
  283. Action = EventAction.Clear,
  284. Category = "SystemAlarm",
  285. }, () => { return true; });
  286. SDWaferTypeThicknessWarning = SubscribeAlarm(new AlarmEventItem()
  287. {
  288. EventEnum = $"{Name}.SDWaferTypeThicknessWarning",
  289. Description = $"SD wafer type thickness warning ",
  290. Solution = "No information available. Press[Clear] to delete alarm message.",
  291. Explaination = "No information available.",
  292. AutoRecovery = false,
  293. Level = EventLevel.Warning,
  294. Action = EventAction.Clear,
  295. Category = "SystemAlarm",
  296. }, () => { return true; });
  297. SDWaferTypeThicknessAlarm = SubscribeAlarm(new AlarmEventItem()
  298. {
  299. EventEnum = $"{Name}.SDWaferTypeThicknessAlarm",
  300. Description = $"SD wafer type thickness alarm ",
  301. Solution = "No information available. Press[Clear] to delete alarm message.",
  302. Explaination = "No information available.",
  303. AutoRecovery = false,
  304. Level = EventLevel.Alarm,
  305. Action = EventAction.Clear,
  306. Category = "SystemAlarm",
  307. }, () => { return true; });
  308. EDWaferTypeUseCountWarning = SubscribeAlarm(new AlarmEventItem()
  309. {
  310. EventEnum = $"{Name}.EDWaferTypeUseCountWarning",
  311. Description = $"ED wafer type use count warning ",
  312. Solution = "No information available. Press[Clear] to delete alarm message.",
  313. Explaination = "No information available.",
  314. AutoRecovery = false,
  315. Level = EventLevel.Warning,
  316. Action = EventAction.Clear,
  317. Category = "SystemAlarm",
  318. }, () => { return true; });
  319. EDWaferTypeUseCountAlarm = SubscribeAlarm(new AlarmEventItem()
  320. {
  321. EventEnum = $"{Name}.EDWaferTypeUseCountAlarm",
  322. Description = $"ED wafer type use count alarm ",
  323. Solution = "No information available. Press[Clear] to delete alarm message.",
  324. Explaination = "No information available.",
  325. AutoRecovery = false,
  326. Level = EventLevel.Alarm,
  327. Action = EventAction.Clear,
  328. Category = "SystemAlarm",
  329. }, () => { return true; });
  330. EDWaferTypeUseTimeWarning = SubscribeAlarm(new AlarmEventItem()
  331. {
  332. EventEnum = $"{Name}.EDWaferTypeUseTimeWarning",
  333. Description = $"ED wafer type use time warning ",
  334. Solution = "No information available. Press[Clear] to delete alarm message.",
  335. Explaination = "No information available.",
  336. AutoRecovery = false,
  337. Level = EventLevel.Warning,
  338. Action = EventAction.Clear,
  339. Category = "SystemAlarm",
  340. }, () => { return true; });
  341. EDWaferTypeUseTimeAlarm = SubscribeAlarm(new AlarmEventItem()
  342. {
  343. EventEnum = $"{Name}.EDWaferTypeUseTimeAlarm",
  344. Description = $"ED wafer type use time alarm ",
  345. Solution = "No information available. Press[Clear] to delete alarm message.",
  346. Explaination = "No information available.",
  347. AutoRecovery = false,
  348. Level = EventLevel.Alarm,
  349. Action = EventAction.Clear,
  350. Category = "SystemAlarm",
  351. }, () => { return true; });
  352. EDWaferTypeThicknessWarning = SubscribeAlarm(new AlarmEventItem()
  353. {
  354. EventEnum = $"{Name}.EDWaferTypeThicknessWarning",
  355. Description = $"ED wafer type thickness warning ",
  356. Solution = "No information available. Press[Clear] to delete alarm message.",
  357. Explaination = "No information available.",
  358. AutoRecovery = false,
  359. Level = EventLevel.Warning,
  360. Action = EventAction.Clear,
  361. Category = "SystemAlarm",
  362. }, () => { return true; });
  363. EDWaferTypeThicknessAlarm = SubscribeAlarm(new AlarmEventItem()
  364. {
  365. EventEnum = $"{Name}.EDWaferTypeThicknessAlarm",
  366. Description = $"ED wafer type thickness alarm ",
  367. Solution = "No information available. Press[Clear] to delete alarm message.",
  368. Explaination = "No information available.",
  369. AutoRecovery = false,
  370. Level = EventLevel.Warning,
  371. Action = EventAction.Clear,
  372. Category = "SystemAlarm",
  373. }, () => { return true; });
  374. EquipmentEmergencyStopAlarm = SubscribeAlarm(new AlarmEventItem()
  375. {
  376. EventEnum = $"{Name}.EquipmentEmergencyStopAlarm",
  377. Description = $"{Name} equipment emergency stop alarm ",
  378. Solution = "No information available. Press[Clear] to delete alarm message.",
  379. Explaination = "No information available.",
  380. AutoRecovery = false,
  381. Level = EventLevel.Alarm,
  382. Action = EventAction.Clear,
  383. Category = "SystemAlarm",
  384. }, () => { return true; });
  385. TransferJobStartFailedWarning = SubscribeAlarm(new AlarmEventItem()
  386. {
  387. EventEnum = $"{Name}.TransferJobStartFailedWarning",
  388. Description = $"Transfer job start failed ",
  389. Solution = "No information available. Press[Clear] to delete alarm message.",
  390. Explaination = "No information available.",
  391. AutoRecovery = false,
  392. Level = EventLevel.Warning,
  393. Action = EventAction.Clear,
  394. Category = "SystemAlarm",
  395. }, () => { return true; });
  396. }
  397. public void OnModuleDeviceAlarmStateChanged(string deviceId, AlarmEventItem alarmItem)
  398. {
  399. if (alarmItem.IsTriggered)
  400. {
  401. EventLevel level = alarmItem.Level;
  402. _triggeredAlarmList.Add(alarmItem);
  403. if (level == EventLevel.Alarm)
  404. {
  405. try
  406. {
  407. EV.PostAlarmLog(Module, alarmItem);
  408. }
  409. catch (Exception ex)
  410. {
  411. EV.WriteEvent(ex.Message.ToString());
  412. }
  413. }
  414. else
  415. {
  416. EV.PostWarningLog(Module, alarmItem);
  417. }
  418. }
  419. else
  420. {
  421. }
  422. }
  423. }
  424. }