Browse Source

add CheckLoad in HongHuVR a&& add TMRobot Home for SE

zhouhr 1 year ago
parent
commit
a84b9b9f89

+ 3 - 1
Venus/Venus_RT/Devices/TM/HongHuVR.cs

@@ -206,7 +206,9 @@ namespace Venus_RT.Devices.VCE
 
             _currentStep = hand == Hand.Blade2 ? VRStep.CheckLoad_ArmB : VRStep.CheckLoad_ArmA;
             _status = RState.Running;
-            return _SendCommand($"CHECK LOAD {Hand2Arm(hand)}");
+            string arm = hand == Hand.Blade2 ? "B" : "A";
+
+            return _SendCommand($"CHECK LOAD 1 {arm}");
         }
 
 

+ 22 - 10
Venus/Venus_RT/Modules/TM/VenusEntity/SEMFHomeRoutine.cs

@@ -1,5 +1,6 @@
 using Aitex.Core.RT.Routine;
 using Aitex.Core.RT.SCCore;
+using Aitex.Sorter.Common;
 using MECF.Framework.Common.Equipment;
 using System;
 using System.Collections.Generic;
@@ -17,7 +18,8 @@ namespace Venus_RT.Modules.TM.VenusEntity
         private enum HomeStep
         {
             seRobotHome,
-            seRobotCheckLoad,
+            seRobotBlade1CheckLoad,
+            seRobotBlade2CheckLoad,
             seRobotDelay,
             seSlitDoor,
             seSlitDoorDelay,
@@ -60,13 +62,18 @@ namespace Venus_RT.Modules.TM.VenusEntity
         //模式 指令名称 执行命令 检查结束命令 超时时长
         public RState Monitor()
         {
-            Runner.Run(HomeStep.seRobotHome,        HomeRobot,          CheckRobotReady,            _robotHomingTimeout)
-                .Run(HomeStep.seRobotCheckLoad,     CheckLoad,          CheckRobotReady,            _robotHomingTimeout)
-                  .Delay(HomeStep.seRobotDelay,     500)
-                  .Run(HomeStep.seSlitDoor,         HomeSlitDoor,       CheckSlitDoorReady,         _slitDoorHomingTimeout)
-                  .Delay(HomeStep.seSlitDoorDelay,  500)
-                  .Run(HomeStep.seVPAHome,          HomeVPA,            CheckVPAReady,              _vpaHomingTimeout)
-                  .End(HomeStep.seEnd,              NullFun,            _delay_50ms);
+            if(!_TMHomeRBFlag)
+                Runner.Run(HomeStep.seRobotHome, HomeRobot, CheckRobotReady, _robotHomingTimeout)
+                      .Run(HomeStep.seRobotBlade1CheckLoad, Blade1CheckLoad, CheckRobotReady, _robotHomingTimeout)
+                      .Run(HomeStep.seRobotBlade2CheckLoad, Blade2CheckLoad, CheckRobotReady, _robotHomingTimeout)
+                      .Delay(HomeStep.seRobotDelay, 500)
+                      .Run(HomeStep.seSlitDoor, HomeSlitDoor, CheckSlitDoorReady, _slitDoorHomingTimeout)
+                      .Delay(HomeStep.seSlitDoorDelay, 500)
+                      .Run(HomeStep.seVPAHome, HomeVPA, CheckVPAReady, _vpaHomingTimeout)
+                      .End(HomeStep.seEnd, NullFun, _delay_50ms);
+            else
+                Runner.Run(HomeStep.seRobotHome, HomeRobot, CheckRobotReady, _robotHomingTimeout)
+                      .End(HomeStep.seEnd, NullFun, _delay_50ms);
             return Runner.Status;
         }
 
@@ -106,9 +113,14 @@ namespace Venus_RT.Modules.TM.VenusEntity
             //robot状态结束
             return _robot.Status == RState.End;
         }
-        private bool CheckLoad()
+        private bool Blade1CheckLoad()
+        {
+            return _robot.CheckLoad(Hand.Blade1);
+        }
+
+        private bool Blade2CheckLoad()
         {
-            return _robot.CheckLoad();
+            return _robot.CheckLoad(Hand.Blade2);
         }
         private bool HomeRobot()
         {

+ 7 - 2
Venus/Venus_RT/Modules/TM/VenusEntity/SEMFVentRoutine.cs

@@ -1,4 +1,5 @@
-using Aitex.Core.RT.Routine;
+using Aitex.Core.RT.Log;
+using Aitex.Core.RT.Routine;
 using Aitex.Core.RT.SCCore;
 using MECF.Framework.Common.Equipment;
 using System;
@@ -41,7 +42,11 @@ namespace Venus_RT.Modules.TM.VenusEntity
                 _ventcrosspressure = SC.GetValue<int>($"{Module}.SoftVentEndPressure");
                 return Runner.Start(Module, Name);
             }
-            return Runner.Status;
+            else
+            {
+                LOG.Write(eEvent.ERR_DEVICE_INFO,Module, "Pump Valve not all Close! Cannot Vent!");
+                return RState.Failed;
+            }
         }
 
         public RState Monitor()

+ 1 - 1
Venus/Venus_Simulator/Devices/SETMSimulatorServer.cs

@@ -13,7 +13,7 @@ namespace Venus_Simulator.Devices
     public class SETMSimulatorServer : SocketDeviceSimulator
     {
 
-        private readonly Regex _check_load = new Regex(@"CHECK LOAD\s+(A|B)\s*");
+        private readonly Regex _check_load = new Regex(@"CHECK LOAD\s+(\d)+\s+(A|B)\s*");
         private readonly Regex _move_arm = new Regex(@"(PLACE|PICK)\s+(\d+)\s+ARM\s+(A|B)\s+(\w{4})\s*");
         private readonly Regex _move_wafer = new Regex(@"(PLACE|PICK)\s+(\d+)\s+ARM\s+(A|B)\s*");