Commit 7f428025 几米阳光

增加机器人负载设置

1 个父辈 471dbe78
......@@ -115,6 +115,10 @@ namespace URSoldering.Common
/// 坐标偏移的AOI节点名称
/// </summary>
public static string OffSetNodeName = "OffSetNodeName";
/// <summary>
/// 尤傲机器人的负载
/// </summary>
public static string RobotLoad = "RobotLoad";
}
}
......@@ -24,7 +24,14 @@ namespace URSoldering.DeviceLibrary
listenClient = new URTcpClient();
listenClient.DefaultDataLength = 1108;
listenClient.ReviceSleepMS = 5;
listenClient.connect(ip, Port, HandleMessage);
bool result = listenClient.connect(ip, Port, HandleMessage);
if (result)
{
double loadValue =(double) ConfigAppSettings.GetNumValue(Setting_Init.RobotLoad);
string setLoadCMD = "set_payload_mass("+loadValue+")";
listenClient.sendLine(setLoadCMD);
LogUtil.debug("【UR端口:" + Port + "】连接成功,设置机器人负载【"+setLoadCMD+"】");
}
}
public static void StopListen()
{
......
......@@ -62,6 +62,8 @@
<add key="PositionChangeValue" value="1" />
<!--坐标偏移AOI检测的分支名称-->
<add key="OffSetNodeName" value="坐标偏移"/>
<!--机器人负载-->
<add key ="RobotLoad" value ="3.16"/>
</appSettings>
<log4net>
<appender name="defaultAppender" type="log4net.Appender.RollingFileAppender">
......
......@@ -56,3 +56,19 @@ AOI检测NG时,红灯亮,等到下次开始焊接时清理红灯。
<add key="PositionChangeValue" value="1" />
<!--坐标偏移AOI检测的分支名称-->
<add key="OffSetNodeName" value="坐标偏移"/>
20190102
每次连接机器人后设置负载,
需要在URSolderingClient.exe.config增加配置:
<!--机器人负载-->
<add key ="RobotLoad" value ="3.16"/>
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!