| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426 | using System;using System.Diagnostics;using Aitex.Core.RT.DataCenter;using Aitex.Core.RT.Device;using Aitex.Core.RT.Event;using Aitex.Core.RT.Fsm;using Aitex.Core.RT.OperationCenter;using Aitex.Core.RT.Routine;using Aitex.Core.RT.SCCore;using Aitex.Core.Utilities;using Aitex.Sorter.Common;using MECF.Framework.Common.Alarms;using MECF.Framework.Common.Equipment;using MECF.Framework.Common.Event;using MECF.Framework.Common.Schedulers;using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.LoadPorts;using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Robot;namespace FurnaceRT.Equipments.WaferRobots{    public partial class WaferRobotModule    {        #region AlarmDefine        public AlarmEventItem TargetWaferPresentWarning { get; set; }        public AlarmEventItem TargetWaferNotPresentWarning { get; set; }        public AlarmEventItem BladeWaferPresentWarning { get; set; }        public AlarmEventItem BladeWaferNotPresentWarning { get; set; }        public AlarmEventItem PickWaferTimeoutAlarm { get; set; }        public AlarmEventItem MapTimeoutAlarm { get; set; }        public AlarmEventItem MapFailAlarm { get; set; }        public AlarmEventItem PickWaferFailAlarm { get; set; }        public AlarmEventItem PlaceWaferTimeoutAlarm { get; set; }        public AlarmEventItem PlaceWaferFailAlarm { get; set; }        public AlarmEventItem RequestWaferPresentTimeoutAlarm { get; set; }        public AlarmEventItem RequestWaferPresentFailAlarm { get; set; }        public AlarmEventItem RobotSensorFoundWaferOnBladeAfterPlaceAlarm { get; set; }        public AlarmEventItem RobotSensorNotFoundWaferOnBladeAfterPickAlarm { get; set; }        public AlarmEventItem CheckWaferInformationFailAlarm { get; set; }        public AlarmEventItem RobotHasError { get; set; }        public AlarmEventItem SetServoOnTimeoutAlarm { get; set; }        public AlarmEventItem SetServoOnFailAlarm { get; set; }        public AlarmEventItem RobotHomeTimeoutAlarm { get; set; }        public AlarmEventItem RobotHomeFailAlarm { get; set; }        public AlarmEventItem CheckLoadTimeoutAlarm { get; set; }        public AlarmEventItem CheckLoadFailAlarm { get; set; }        public AlarmEventItem SetSpeedTimeoutAlarm { get; set; }        public AlarmEventItem SetSpeedFailAlarm { get; set; }        public AlarmEventItem RobotDIAlarm { get; set; }        public AlarmEventItem PickWaferPauseWarning { get; set; }        public AlarmEventItem PickWaferResumeWarning { get; set; }        public AlarmEventItem PlaceWaferPauseWarning { get; set; }        public AlarmEventItem PlaceWaferResumeWarning { get; set; }        #endregion        private void InitAlarmDefine()        {            TargetWaferPresentWarning = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.TargetWaferPresentWarning",                Description = $"Target wafer present ",                Solution = "No information available. Press[Clear] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Warning,                Action = EventAction.Clear,                Category = "WaferRobotAlarm",            }, () => { return true; });            TargetWaferNotPresentWarning = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.TargetWaferNotPresentWarning",                Description = $"Target wafer not present ",                Solution = "No information available. Press[Clear] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Warning,                Action = EventAction.Clear,                Category = "WaferRobotAlarm",            }, () => { return true; });            BladeWaferPresentWarning = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.BladeWaferPresentWarning",                Description = $"Blade wafer present ",                Solution = "No information available. Press[Clear] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Warning,                Action = EventAction.Clear,                Category = "WaferRobotAlarm",            }, () => { return true; });            BladeWaferNotPresentWarning = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.BladeWaferNotPresentWarning",                Description = $"Blade wafer not present ",                Solution = "No information available. Press[Clear] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Warning,                Action = EventAction.Clear,                Category = "WaferRobotAlarm",            }, () => { return true; });            MapTimeoutAlarm = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.MapTimeoutAlarm",                Description = $"Map timeout ",                Solution = "No information available. Press[Retry] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Alarm,                Action = EventAction.ClearAndRetry,                Category = "WaferRobotAlarm",            }, () => { return true; });            MapFailAlarm = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.MapFailAlarm",                Description = $"Map fail reason ",                Solution = "No information available. Press[Retry] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Alarm,                Action = EventAction.ClearAndRetry,                Category = "WaferRobotAlarm",            }, () => { return true; });            PickWaferTimeoutAlarm = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.PickWaferTimeoutAlarm",                Description = $"Pick wafer timeout ",                Solution = "No information available. Press[Retry] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Alarm,                Action = EventAction.ClearAndRetry,                Category = "WaferRobotAlarm",            }, () => { return true; });            PickWaferFailAlarm = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.PickWaferFailAlarm",                Description = $"Pick wafer fail reason ",                Solution = "No information available. Press[Retry] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Alarm,                Action = EventAction.ClearAndRetry,                Category = "WaferRobotAlarm",            }, () => { return true; });            PlaceWaferTimeoutAlarm = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.PlaceWaferTimeoutAlarm",                Description = $"Place wafer timeout ",                Solution = "No information available. Press[Retry] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Alarm,                Action = EventAction.ClearAndRetry,                Category = "WaferRobotAlarm",            }, () => { return true; });            PlaceWaferFailAlarm = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.PlaceWaferFailAlarm",                Description = $"Place wafer fail reason ",                Solution = "No information available. Press[Retry] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Alarm,                Action = EventAction.ClearAndRetry,                Category = "WaferRobotAlarm",            }, () => { return true; });            RequestWaferPresentTimeoutAlarm = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.RequestWaferPresentTimeoutAlarm",                Description = $"Request wafer present timeout ",                Solution = "No information available. Press[Retry] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Alarm,                Action = EventAction.ClearAndRetry,                Category = "WaferRobotAlarm",            }, () => { return true; });            RequestWaferPresentFailAlarm = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.RequestWaferPresentFailAlarm",                Description = $"Request wafer present fail ",                Solution = "No information available. Press[Retry] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Alarm,                Action = EventAction.ClearAndRetry,                Category = "WaferRobotAlarm",            }, () => { return true; });            RobotSensorFoundWaferOnBladeAfterPlaceAlarm = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.RobotSensorFoundWaferOnBladeAfterPlaceAlarm",                Description = $"Robot sensor found wafer on blade after place ",                Solution = "No information available. Press[Retry] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Alarm,                Action = EventAction.ClearAndRetry,                Category = "WaferRobotAlarm",            }, () => { return true; });            RobotSensorNotFoundWaferOnBladeAfterPickAlarm = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.RobotSensorNotFoundWaferOnBladeAfterPickAlarm",                Description = $"Robot sensor found wafer on blade after pick ",                Solution = "No information available. Press[Retry] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Alarm,                Action = EventAction.ClearAndRetry,                Category = "WaferRobotAlarm",            }, () => { return true; });            CheckWaferInformationFailAlarm = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.CheckWaferInformationFailAlarm",                Description = $"Check wafer information fail ",                Solution = "No information available. Press[Retry] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Alarm,                Action = EventAction.ClearAndRetry,                Category = "WaferRobotAlarm",            }, () => { return true; });            RobotHasError = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.RobotHasError",                Description = $"Robot has error ",                Solution = "No information available. Press[Retry] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Alarm,                Action = EventAction.ClearAndRetry,                Category = "WaferRobotAlarm",            }, () => { return true; });            SetServoOnTimeoutAlarm = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.SetServoOnTimeoutAlarm",                Description = $"Set servo on timeout ",                Solution = "No information available. Press[Retry] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Alarm,                Action = EventAction.ClearAndRetry,                Category = "WaferRobotAlarm",            }, () => { return true; });            SetServoOnFailAlarm = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.SetServoOnFailAlarm",                Description = $"Set servo on fail reason ",                Solution = "No information available. Press[Retry] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Alarm,                Action = EventAction.ClearAndRetry,                Category = "WaferRobotAlarm",            }, () => { return true; });            RobotHomeTimeoutAlarm = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.RobotHomeTimeoutAlarm",                Description = $"Robot home timeout ",                Solution = "No information available. Press[Retry] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Alarm,                Action = EventAction.ClearAndRetry,                Category = "WaferRobotAlarm",            }, () => { return true; });            RobotHomeFailAlarm = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.RobotHomeFailAlarm",                Description = $"Robot home fail reason ",                Solution = "No information available. Press[Retry] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Alarm,                Action = EventAction.ClearAndRetry,                Category = "WaferRobotAlarm",            }, () => { return true; });            CheckLoadTimeoutAlarm = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.CheckLoadTimeoutAlarm",                Description = $"Check load timeout ",                Solution = "No information available. Press[Retry] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Alarm,                Action = EventAction.ClearAndRetry,                Category = "WaferRobotAlarm",            }, () => { return true; });            CheckLoadFailAlarm = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.CheckLoadFailAlarm",                Description = $"Check load fail reason ",                Solution = "No information available. Press[Retry] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Alarm,                Action = EventAction.ClearAndRetry,                Category = "WaferRobotAlarm",            }, () => { return true; });            SetSpeedTimeoutAlarm = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.SetSpeedTimeoutAlarm",                Description = $"Set speed timeout ",                Solution = "No information available. Press[Retry] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Alarm,                Action = EventAction.ClearAndRetry,                Category = "WaferRobotAlarm",            }, () => { return true; });            SetSpeedFailAlarm = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.SetSpeedFailAlarm",                Description = $"Set speed fail ",                Solution = "No information available. Press[Retry] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Alarm,                Action = EventAction.ClearAndRetry,                Category = "WaferRobotAlarm",            }, () => { return true; });            RobotDIAlarm = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.RobotDIAlarm",                Description = $"Wafer Robot DI Alarm Trigger ",                Solution = "No information available. Press[Retry] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Alarm,                Action = EventAction.ClearAndRetry,                Category = "WaferRobotAlarm",            }, () => { return true; });            PickWaferPauseWarning = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.PickWaferPauseWarning",                Description = $"Pick wafer pause ",                Solution = "No information available. Press[Clear] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Warning,                Action = EventAction.Clear,                Category = "WaferRobotAlarm",            }, () => { return true; });            PickWaferResumeWarning = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.PickWaferResumeWarning",                Description = $"Pick wafer resume ",                Solution = "No information available. Press[Clear] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Warning,                Action = EventAction.Clear,                Category = "WaferRobotAlarm",            }, () => { return true; });            PlaceWaferPauseWarning = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.PlaceWaferPauseWarning",                Description = $"Place wafer pause ",                Solution = "No information available. Press[Clear] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Warning,                Action = EventAction.Clear,                Category = "WaferRobotAlarm",            }, () => { return true; });            PlaceWaferResumeWarning = SubscribeAlarm(new AlarmEventItem()            {                EventEnum = $"{Name}.PlaceWaferResumeWarning",                Description = $"Place wafer resume ",                Solution = "No information available. Press[Clear] to delete alarm message.",                Explaination = "No information available.",                AutoRecovery = false,                Level = EventLevel.Warning,                Action = EventAction.Clear,                Category = "WaferRobotAlarm",            }, () => { return true; });            if (AlarmSignaRobotTPStatusWarning != null)            {                var alarm = SubscribeAlarm(new AlarmEventItem()                {                    EventEnum = $"{Name}.AlarmSignaWaferRobotTPStatusWarning",                    Description = $"Wafer Robot TP Status Warning Trigger ",                    Solution = "No information available. Press[Clear] to delete alarm message.",                    Explaination = "No information available.",                    AutoRecovery = false,                    Level = EventLevel.Warning,                    Action = EventAction.Clear,                    Category = "CassetteRobotAlarm",                }, () => { AlarmSignaRobotTPStatusWarning.Reset(); return true; });                AlarmSignaRobotTPStatusWarning.AlarmTriggered = alarm;            }            WaferRobotDevice.RobotHasError = RobotHasError;        }    }}
 |