From 454827a3db5f435b81eca239f5cf38b0c9188e25 Mon Sep 17 00:00:00 2001 From: HCL <1625932291@qq.com> Date: Thu, 7 Dec 2023 10:26:38 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=AE=8C=E5=96=84SunwayRobot=20Pick?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HardwareUnits/Robots/RobotBase/RobotBase.cs | 8 +++++--- .../HardwareUnits/Robots/Sunway/SunwayRobot.cs | 14 ++++++++++++-- .../Robots/Sunway/SunwayRobotHandler.cs | 9 ++++++--- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/MECF.Framework.RT.EquipmentLibrary/HardwareUnits/Robots/RobotBase/RobotBase.cs b/MECF.Framework.RT.EquipmentLibrary/HardwareUnits/Robots/RobotBase/RobotBase.cs index bf1e5db..3255e35 100644 --- a/MECF.Framework.RT.EquipmentLibrary/HardwareUnits/Robots/RobotBase/RobotBase.cs +++ b/MECF.Framework.RT.EquipmentLibrary/HardwareUnits/Robots/RobotBase/RobotBase.cs @@ -1224,6 +1224,10 @@ namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Robots.RobotBase Transition(RobotStateEnum.ReadingData, RobotMsg.ReadDataComplete, null, RobotStateEnum.Idle); Transition(RobotStateEnum.ReadingData, FSM_MSG.TIMER, fMonitorReadData, RobotStateEnum.Idle); + Transition(RobotStateEnum.Idle, RobotMsg.ExtendForPick, fStartExtendForPick, RobotStateEnum.ExtendingForPick); + Transition(RobotStateEnum.ExtendingForPick, RobotMsg.ExtendComplete, fExtendForPickComplete, RobotStateEnum.Idle); + Transition(RobotStateEnum.ExtendingForPick, RobotMsg.ActionDone, fExtendForPickComplete, RobotStateEnum.Idle); + Transition(RobotStateEnum.Idle, RobotMsg.PickWafer, fStartPickWafer, RobotStateEnum.Picking); Transition(RobotStateEnum.Picking, RobotMsg.PickComplete, fPickComplete, RobotStateEnum.Idle); Transition(RobotStateEnum.Picking, RobotMsg.ActionDone, fPickComplete, RobotStateEnum.Idle); @@ -1275,9 +1279,7 @@ namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Robots.RobotBase Transition(RobotStateEnum.UnGripping, FSM_MSG.TIMER, fMonitorUnGrip, RobotStateEnum.Idle); - Transition(RobotStateEnum.Idle, RobotMsg.ExtendForPick, fStartExtendForPick, RobotStateEnum.ExtendingForPick); - Transition(RobotStateEnum.ExtendingForPick, RobotMsg.ExtendComplete, fExtendForPickComplete, RobotStateEnum.Idle); - Transition(RobotStateEnum.ExtendingForPick, RobotMsg.ActionDone, fExtendForPickComplete, RobotStateEnum.Idle); + Transition(RobotStateEnum.Idle, RobotMsg.ExtendForPlace, fStartExtendForPlace, RobotStateEnum.ExtendingForPlace); diff --git a/MECF.Framework.RT.EquipmentLibrary/HardwareUnits/Robots/Sunway/SunwayRobot.cs b/MECF.Framework.RT.EquipmentLibrary/HardwareUnits/Robots/Sunway/SunwayRobot.cs index 68f82aa..f29a042 100644 --- a/MECF.Framework.RT.EquipmentLibrary/HardwareUnits/Robots/Sunway/SunwayRobot.cs +++ b/MECF.Framework.RT.EquipmentLibrary/HardwareUnits/Robots/Sunway/SunwayRobot.cs @@ -1118,9 +1118,19 @@ namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Robots.Sunway return false; } - if (WaferManager.Instance.CheckHasWafer(sourceModule, sourceSlot)) + if (RobotModuleName == ModuleName.WaferRobot) { - WaferManager.Instance.WaferMoved(sourceModule, sourceSlot, RobotModuleName, 0); + if (WaferManager.Instance.CheckHasWafer(sourceModule, sourceSlot)) + { + WaferManager.Instance.WaferMoved(sourceModule, sourceSlot, RobotModuleName, 0); + } + } + else + { + if (WaferManager.Instance.CheckHasTray(sourceModule, sourceSlot)) + { + WaferManager.Instance.TrayMoved(sourceModule, sourceSlot, RobotModuleName, 0); + } } //lock (_locker) diff --git a/MECF.Framework.RT.EquipmentLibrary/HardwareUnits/Robots/Sunway/SunwayRobotHandler.cs b/MECF.Framework.RT.EquipmentLibrary/HardwareUnits/Robots/Sunway/SunwayRobotHandler.cs index fdc8286..b43c79b 100644 --- a/MECF.Framework.RT.EquipmentLibrary/HardwareUnits/Robots/Sunway/SunwayRobotHandler.cs +++ b/MECF.Framework.RT.EquipmentLibrary/HardwareUnits/Robots/Sunway/SunwayRobotHandler.cs @@ -397,6 +397,9 @@ namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Robots.Sunway { if (!isRetract) { + //将Robot的状态从ExtendingForPick转到Idle + Device.NoteActionCompleted(); + //伸出 Device.MoveInfo = new RobotMoveInfo() { @@ -404,13 +407,13 @@ namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Robots.Sunway ArmTarget = _blade == RobotArmEnum.Blade1 ? RobotArm.ArmA : RobotArm.ArmB, BladeTarget = cModule, }; - - Device.NoteActionCompleted(); } else { - //缩回 + //将Robot的状态从Picking转到Idle Device.NoteActionCompleted(); + + //缩回 Device.MoveInfo = new RobotMoveInfo() { Action = RobotAction.Moving,