Browse Source

添加安全指令配置

jiangjy 3 weeks ago
parent
commit
8fa4ccd9d5

+ 8 - 5
FrameworkLocal/RTEquipmentLibrary/HardwareUnits/Robots/HRC100Robots/GM201LVPRobot/GM201LVPRobot.cs

@@ -1268,10 +1268,12 @@ namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Robots.HRC100Robots.G
                 }
 
                 string strpara = "1,1,G";
-                if (RobotModuleName == ModuleName.CarrierRobot)
+
+                if (SC.GetValue<bool>($"{Name}.SafeHome") && RobotModuleName == ModuleName.CarrierRobot)
                 {
                     strpara = "1,1,S";
                 }
+
                 _lstHandlers.AddLast(new GM201LVPRobotMotionHandler(this, "INIT", strpara));
                 if (SpeedLevelSetting >= 1 && SpeedLevelSetting <= 100)
                     _lstHandlers.AddLast(new GM201LVPRobotSetHandler(this, "SSLV", $"1,{SpeedLevelSetting.ToString("D3")}"));
@@ -1333,10 +1335,11 @@ namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Robots.HRC100Robots.G
                 }
 
                 string strpara = "1,1,G";
-                //if (RobotModuleName == ModuleName.CarrierRobot)
-                //{
-                //    strpara = "1,1,S";
-                //}
+                if (SC.GetValue<bool>($"{Name}.SafeHome") && RobotModuleName == ModuleName.CarrierRobot)
+                {
+                    strpara = "1,1,S";
+                }
+
                 _lstHandlers.AddLast(new GM201LVPRobotMotionHandler(this, "INIT", strpara, _timeLimitHome));
                 if (SpeedLevelSetting >= 1 && SpeedLevelSetting <= 100)
                     _lstHandlers.AddLast(new GM201LVPRobotSetHandler(this, "SSLV", $"1,{SpeedLevelSetting.ToString("D3")}"));

+ 1 - 0
Furnace/FurnaceRT/Config/System.sccfg

@@ -2313,6 +2313,7 @@
 		<config default="10" name="RetractTimeout" description="Retract Time Out" max="60" min="1" paramter="" tag="" unit="s" type="Integer"  visible="false"/>
 		<config default="10" name="ConnectTimeout" description="Connect Time Out" max="60" min="1" paramter="" tag="" unit="s" type="Integer" />
 
+		<config default="true" name="SafeHome" description="SafeHome" max="0" min="0" paramter="" tag="" unit="" type="Bool" visible="false"/>
 		<config default="true" name="Blade1Enable" description="Blade1 Enable" max="0" min="0" paramter="" tag="" unit="" type="Bool" visible="false"/>
 		<config default="true" name="Blade2Enable" description="Blade2 Enable" max="0" min="0" paramter="" tag="" unit="" type="Bool" visible="false"/>
 		<config default="1" name="Blade2Slots" description="Slot数目" max="5" min="1" paramter="" tag="" unit="" type="Integer" visible="false"/>