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; } } }