| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301 | 
							- using Aitex.Core.RT.Device;
 
- using Aitex.Core.RT.Device.Unit;
 
- using Aitex.Core.RT.Event;
 
- using Aitex.Core.RT.Log;
 
- using Aitex.Core.RT.OperationCenter;
 
- using Aitex.Core.RT.SCCore;
 
- using Aitex.Core.Util;
 
- using MECF.Framework.Common.Event;
 
- using MECF.Framework.Common.OperationCenter;
 
- using System;
 
- namespace FurnaceRT.Equipments.Boats
 
- {
 
-     public partial class BoatModule
 
-     {
 
-         #region AlarmDefine
 
-         public AlarmEventItem AutoShutterMoveFailedForInterlock { get; set; }
 
-         public AlarmEventItem AutoShutterOpenTimeOut { get; set; }
 
-         public AlarmEventItem AutoShutterCloseTimeOut { get; set; }
 
-         public AlarmEventItem BoatZAxisMoveFailedForInterlock { get; set; }
 
-         public AlarmEventItem BoatZAxisUpLimit { get; set; }
 
-         public AlarmEventItem BoatZAxisDownLimit { get; set; }
 
-         public AlarmEventItem BoatHumanInterlock { get; set; }
 
-         public AlarmEventItem BoatZAxisMoveFailedForAutoShutterNotOpen { get; set; }
 
-         public AlarmEventItem BoatZAxisMoveFailedForAutoShutterNotDown { get; set; }
 
-         public AlarmEventItem BoatZAxisMoveFailedForTiltStatus { get; set; }
 
-         public AlarmEventItem BoatZAxisMoveFailedForHumanInterlock { get; set; }
 
-         public AlarmEventItem BoatZAxisMoveFailedForWaferRobotArmExtend { get; set; }
 
-         public AlarmEventItem BoatZAxisMoveTimeOut { get; set; }
 
-         public AlarmEventItem BoatRAxisMoveTimeOut { get; set; }
 
-         public AlarmEventItem BoatRAxisMoveFailedForInterlock { get; set; }
 
-         public AlarmEventItem BoatZAxisHomeFailed { get; set; }
 
-         public AlarmEventItem BoatZAxisHomeTimeout { get; set; }
 
-         public AlarmEventItem BoatRAxisHomeFailed { get; set; }
 
-         public AlarmEventItem BoatRAxisHomeTimeout { get; set; }
 
-         public AlarmEventItem BoatStepperMotorAlarm { get; set; }
 
-         #endregion
 
-         private void InitAlarmEvent()
 
-         {
 
-             AutoShutterMoveFailedForInterlock = SubscribeAlarm(new AlarmEventItem()
 
-             {
 
-                 EventEnum = $"{Name}.AutoShutterMoveFailedForInterlock",
 
-                 Description = $"Auto shutter move failed for interlock ",
 
-                 Solution = "No information available. Press[Clear] to delete alarm message.",
 
-                 Explaination = "No information available.",
 
-                 AutoRecovery = false,
 
-                 Level = EventLevel.Alarm,
 
-                 Action = EventAction.Clear,
 
-                 Category = "BoatAlarm",
 
-             }, () => { return true; });
 
-             AutoShutterOpenTimeOut = SubscribeAlarm(new AlarmEventItem()
 
-             {
 
-                 EventEnum = $"{Name}.AutoShutterOpenTimeOut",
 
-                 Description = $"Auto shutter open timeout ",
 
-                 Solution = "No information available. Press[Clear] to delete alarm message.",
 
-                 Explaination = "No information available.",
 
-                 AutoRecovery = false,
 
-                 Level = EventLevel.Alarm,
 
-                 Action = EventAction.Clear,
 
-                 Category = "BoatAlarm",
 
-             }, () => { return true; });
 
-             AutoShutterCloseTimeOut = SubscribeAlarm(new AlarmEventItem()
 
-             {
 
-                 EventEnum = $"{Name}.AutoShutterCloseTimeOut",
 
-                 Description = $"Auto shutter close timeout ",
 
-                 Solution = "No information available. Press[Clear] to delete alarm message.",
 
-                 Explaination = "No information available.",
 
-                 AutoRecovery = false,
 
-                 Level = EventLevel.Alarm,
 
-                 Action = EventAction.Clear,
 
-                 Category = "BoatAlarm",
 
-             }, () => { return true; });
 
-             if (ShutterDevice != null)
 
-             {
 
-                 ShutterDevice.AutoShutterMoveFailedForInterlock = AutoShutterMoveFailedForInterlock;
 
-                 ShutterDevice.AutoShutterOpenTimeOut = AutoShutterOpenTimeOut;
 
-                 ShutterDevice.AutoShutterCloseTimeOut = AutoShutterCloseTimeOut;
 
-             }
 
-             BoatZAxisMoveFailedForInterlock = SubscribeAlarm(new AlarmEventItem()
 
-             {
 
-                 EventEnum = $"{Name}.BoatZAxisMoveFailedForInterlock",
 
-                 Description = $"{Name} boat z axis move failed for interlock ",
 
-                 Solution = "No information available. Press[Clear] to delete alarm message.",
 
-                 Explaination = "No information available.",
 
-                 AutoRecovery = false,
 
-                 Level = EventLevel.Warning,
 
-                 Action = EventAction.Clear,
 
-                 Category = "BoatAlarm",
 
-             }, () => { return true; });
 
-             BoatZAxisUpLimit = SubscribeAlarm(new AlarmEventItem()
 
-             {
 
-                 EventEnum = $"{Name}.BoatZAxisUpLimit",
 
-                 Description = $"{Name} boat z axis up limit ",
 
-                 Solution = "No information available. Press[Clear] to delete alarm message.",
 
-                 Explaination = "No information available.",
 
-                 AutoRecovery = false,
 
-                 Level = EventLevel.Alarm,
 
-                 Action = EventAction.Clear,
 
-                 Category = "BoatAlarm",
 
-             }, () => { return true; });
 
-             BoatZAxisDownLimit = SubscribeAlarm(new AlarmEventItem()
 
-             {
 
-                 EventEnum = $"{Name}.BoatZAxisDownLimit",
 
-                 Description = $"{Name} boat z axis down limit ",
 
-                 Solution = "No information available. Press[Clear] to delete alarm message.",
 
-                 Explaination = "No information available.",
 
-                 AutoRecovery = false,
 
-                 Level = EventLevel.Alarm,
 
-                 Action = EventAction.Clear,
 
-                 Category = "BoatAlarm",
 
-             }, () => { return true; });
 
-             BoatHumanInterlock = SubscribeAlarm(new AlarmEventItem()
 
-             {
 
-                 EventEnum = $"{Name}.BoatHumanInterlock",
 
-                 Description = $"{Name} boat human interlock ",
 
-                 Solution = "No information available. Press[Clear] to delete alarm message.",
 
-                 Explaination = "No information available.",
 
-                 AutoRecovery = false,
 
-                 Level = EventLevel.Alarm,
 
-                 Action = EventAction.Clear,
 
-                 Category = "BoatAlarm",
 
-             }, () => { return true; });
 
-             BoatZAxisMoveFailedForAutoShutterNotOpen = SubscribeAlarm(new AlarmEventItem()
 
-             {
 
-                 EventEnum = $"{Name}.BoatZAxisMoveFailedForAutoShutterNotOpen",
 
-                 Description = $"{Name} boat z axis move failed for auto shutter not open ",
 
-                 Solution = "No information available. Press[Clear] to delete alarm message.",
 
-                 Explaination = "No information available.",
 
-                 AutoRecovery = false,
 
-                 Level = EventLevel.Alarm,
 
-                 Action = EventAction.Clear,
 
-                 Category = "BoatAlarm",
 
-             }, () => { return true; });
 
-             BoatZAxisMoveFailedForAutoShutterNotDown = SubscribeAlarm(new AlarmEventItem()
 
-             {
 
-                 EventEnum = $"{Name}.BoatZAxisMoveFailedForAutoShutterNotDown",
 
-                 Description = $"{Name} boat z axis move failed for auto shutter not down ",
 
-                 Solution = "No information available. Press[Clear] to delete alarm message.",
 
-                 Explaination = "No information available.",
 
-                 AutoRecovery = false,
 
-                 Level = EventLevel.Alarm,
 
-                 Action = EventAction.Clear,
 
-                 Category = "BoatAlarm",
 
-             }, () => { return true; });
 
-             BoatZAxisMoveFailedForTiltStatus = SubscribeAlarm(new AlarmEventItem()
 
-             {
 
-                 EventEnum = $"{Name}.BoatZAxisMoveFailedForTiltStatus",
 
-                 Description = $"{Name} boat z axis move failed for tilt status ",
 
-                 Solution = "No information available. Press[Clear] to delete alarm message.",
 
-                 Explaination = "No information available.",
 
-                 AutoRecovery = false,
 
-                 Level = EventLevel.Alarm,
 
-                 Action = EventAction.Clear,
 
-                 Category = "BoatAlarm",
 
-             }, () => { return true; });
 
-             BoatZAxisMoveFailedForHumanInterlock = SubscribeAlarm(new AlarmEventItem()
 
-             {
 
-                 EventEnum = $"{Name}.BoatZAxisMoveFailedForHumanInterlock",
 
-                 Description = $"{Name} boat z axis move failed for human interlock ",
 
-                 Solution = "No information available. Press[Clear] to delete alarm message.",
 
-                 Explaination = "No information available.",
 
-                 AutoRecovery = false,
 
-                 Level = EventLevel.Alarm,
 
-                 Action = EventAction.Clear,
 
-                 Category = "BoatAlarm",
 
-             }, () => { return true; });
 
-             BoatZAxisMoveFailedForWaferRobotArmExtend = SubscribeAlarm(new AlarmEventItem()
 
-             {
 
-                 EventEnum = $"{Name}.BoatZAxisMoveFailedForWaferRobotArmExtend",
 
-                 Description = $"{Name} boat z axis move failed for wafer robot arm extend ",
 
-                 Solution = "No information available. Press[Clear] to delete alarm message.",
 
-                 Explaination = "No information available.",
 
-                 AutoRecovery = false,
 
-                 Level = EventLevel.Alarm,
 
-                 Action = EventAction.Clear,
 
-                 Category = "BoatAlarm",
 
-             }, () => { return true; });
 
-             BoatZAxisMoveTimeOut = SubscribeAlarm(new AlarmEventItem()
 
-             {
 
-                 EventEnum = $"{Name}.BoatZAxisMoveTimeOut",
 
-                 Description = $"{Name} boat z axis move timeout ",
 
-                 Solution = "No information available. Press[Clear] to delete alarm message.",
 
-                 Explaination = "No information available.",
 
-                 AutoRecovery = false,
 
-                 Level = EventLevel.Alarm,
 
-                 Action = EventAction.Clear,
 
-                 Category = "BoatAlarm",
 
-             }, () => { return true; });
 
-             BoatRAxisMoveTimeOut = SubscribeAlarm(new AlarmEventItem()
 
-             {
 
-                 EventEnum = $"{Name}.BoatRAxisMoveTimeOut",
 
-                 Description = $"{Name} boat r axis move timeout ",
 
-                 Solution = "No information available. Press[Clear] to delete alarm message.",
 
-                 Explaination = "No information available.",
 
-                 AutoRecovery = false,
 
-                 Level = EventLevel.Alarm,
 
-                 Action = EventAction.Clear,
 
-                 Category = "BoatAlarm",
 
-             }, () => { return true; });
 
-             BoatRAxisMoveFailedForInterlock = SubscribeAlarm(new AlarmEventItem()
 
-             {
 
-                 EventEnum = $"{Name}.BoatRAxisMoveFailedForInterlock",
 
-                 Description = $"{Name} boat r axis move failed for interlock ",
 
-                 Solution = "No information available. Press[Clear] to delete alarm message.",
 
-                 Explaination = "No information available.",
 
-                 AutoRecovery = false,
 
-                 Level = EventLevel.Alarm,
 
-                 Action = EventAction.Clear,
 
-                 Category = "BoatAlarm",
 
-             }, () => { return true; });
 
-             BoatZAxisHomeFailed = SubscribeAlarm(new AlarmEventItem()
 
-             {
 
-                 EventEnum = $"{Name}.BoatZAxisHomeFailed",
 
-                 Description = $"{Name} boat Z Axis home failed ",
 
-                 Solution = "No information available. Press[Clear] to delete alarm message.",
 
-                 Explaination = "No information available.",
 
-                 AutoRecovery = false,
 
-                 Level = EventLevel.Alarm,
 
-                 Action = EventAction.ClearAndRetry,
 
-                 Category = "BoatAlarm",
 
-             }, () => { return true; });
 
-             BoatZAxisHomeTimeout = SubscribeAlarm(new AlarmEventItem()
 
-             {
 
-                 EventEnum = $"{Name}.BoatZAxisHomeTimeout",
 
-                 Description = $"{Name} boat Z Axis home timeout ",
 
-                 Solution = "No information available. Press[Clear] to delete alarm message.",
 
-                 Explaination = "No information available.",
 
-                 AutoRecovery = false,
 
-                 Level = EventLevel.Alarm,
 
-                 Action = EventAction.ClearAndRetry,
 
-                 Category = "BoatAlarm",
 
-             }, () => { return true; });
 
-             BoatRAxisHomeFailed = SubscribeAlarm(new AlarmEventItem()
 
-             {
 
-                 EventEnum = $"{Name}.BoatRAxisHomeFailed",
 
-                 Description = $"{Name} boat R Axis home failed ",
 
-                 Solution = "No information available. Press[Clear] to delete alarm message.",
 
-                 Explaination = "No information available.",
 
-                 AutoRecovery = false,
 
-                 Level = EventLevel.Alarm,
 
-                 Action = EventAction.ClearAndRetry,
 
-                 Category = "BoatAlarm",
 
-             }, () => { return true; });
 
-             BoatRAxisHomeTimeout = SubscribeAlarm(new AlarmEventItem()
 
-             {
 
-                 EventEnum = $"{Name}.BoatRAxisHomeTimeout",
 
-                 Description = $"{Name} boat R Axis home timeout ",
 
-                 Solution = "No information available. Press[Clear] to delete alarm message.",
 
-                 Explaination = "No information available.",
 
-                 AutoRecovery = false,
 
-                 Level = EventLevel.Alarm,
 
-                 Action = EventAction.ClearAndRetry,
 
-                 Category = "BoatAlarm",
 
-             }, () => { return true; });
 
-             if (SensorStepperMotorAlarm != null)
 
-             {
 
-                 BoatStepperMotorAlarm = SubscribeAlarm(new AlarmEventItem()
 
-                 {
 
-                     EventEnum = $"{Name}.BoatStepperMotorAlarm",
 
-                     Description = $"{Name} Stepper Motor Alarm",
 
-                     Solution = "No information available. Press[Clear] to delete alarm message.",
 
-                     Explaination = "No information available.",
 
-                     AutoRecovery = false,
 
-                     Level = EventLevel.Alarm,
 
-                     Action = EventAction.Clear,
 
-                     Category = "BoatAlarm",
 
-                 }, () =>
 
-                 {
 
-                     IoTrigger trigger = DEVICE.GetDevice<IoTrigger>($"PM1.TrigBoatRAxisAlarmReset");
 
-                     trigger.DoTrigger.SetPulseValue(true, 1000);
 
-                     SensorStepperMotorAlarm.Reset();
 
-                     return true;
 
-                 });
 
-                 SensorStepperMotorAlarm.AlarmTriggered = BoatStepperMotorAlarm;
 
-             }
 
-         }
 
-     }
 
- }
 
 
  |