Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
URSolderingRobot
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 434f7f92
由
几米阳光
编写于
2018-08-01 10:00:29 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
005d9f15
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
23 行增加
和
54 行删除
DeviceLibrary/Robot/soldering/WeldRobotBean.cs
DeviceLibrary/deviceLibrary/urRobot/URRobotControl.cs
URSolderingClient/FrmBoardInfo.cs
URSolderingClient/FrmOrgConfig.cs
DeviceLibrary/Robot/soldering/WeldRobotBean.cs
查看文件 @
434f7f9
...
...
@@ -98,23 +98,14 @@ namespace URSoldering.DeviceLibrary
/// 初始化
/// </summary>
public
static
void
Init
()
{
//URRobotControl.InitEpson();
Task
.
Factory
.
StartNew
(
delegate
()
{
bool
result
=
URRobotControl
.
StartRobot
();
if
(!
result
)
{
WarnMsg
=
"连接UR机器人失败"
;
}
});
{
StartURRobot
();
SolderingManager
.
Init
(
RobotConfig
.
JBC_Soldering_Port
,
RobotConfig
.
JBC_Soldering_Num
);
SendWireManager
.
Init
(
RobotConfig
.
JBC_SendWire_Port
);
isInit
=
true
;
}
public
static
void
ResetInit
()
private
static
void
StartURRobot
()
{
if
(!
URRobotControl
.
IsRun
)
{
...
...
@@ -128,6 +119,10 @@ namespace URSoldering.DeviceLibrary
}
});
}
}
public
static
void
ResetInit
()
{
StartURRobot
();
SendWireManager
.
Init
(
RobotConfig
.
JBC_SendWire_Port
);
SolderingManager
.
Init
(
RobotConfig
.
JBC_Soldering_Port
,
RobotConfig
.
JBC_Soldering_Num
);
}
...
...
DeviceLibrary/deviceLibrary/urRobot/URRobotControl.cs
查看文件 @
434f7f9
...
...
@@ -116,6 +116,10 @@ namespace URSoldering.DeviceLibrary
/// <returns></returns>
public
static
bool
StartRobot
()
{
if
(
IsRun
)
{
return
true
;
}
if
(
reconnectTimer
==
null
)
{
reconnectTimer
=
new
System
.
Timers
.
Timer
();
...
...
@@ -125,10 +129,6 @@ namespace URSoldering.DeviceLibrary
reconnectTimer
.
Enabled
=
false
;
}
IsStartConnect
=
true
;
if
(
IsRun
)
{
return
true
;
}
return
StartConnect
();
}
...
...
@@ -160,9 +160,10 @@ namespace URSoldering.DeviceLibrary
PreStartTime
=
DateTime
.
Now
;
startCount
++;
//Reset(
);
LogUtil
.
info
(
""
+
LogName
+
"开始连接"
);
Reset
();
controlTcp
=
new
TcpClient
();
controlTcp
.
TimeOutTime
=
2000
;
bool
result
=
controlTcp
.
connect
(
RobotIp
,
ControlPort
,
new
TcpClient
.
HandleMessage
(
OnControlRevice
));
if
(!
result
)
{
...
...
URSolderingClient/FrmBoardInfo.cs
查看文件 @
434f7f9
...
...
@@ -235,6 +235,7 @@ namespace URSoldering.Client
}
if
(!
URRobotControl
.
IsRun
&&
isRun
.
Equals
(
false
))
{
isRun
=
true
;
Task
.
Factory
.
StartNew
(
delegate
()
{
bool
result
=
URRobotControl
.
StartRobot
();
...
...
@@ -248,13 +249,10 @@ namespace URSoldering.Client
}
});
isRun
=
true
;
}
else
{
RobotStatus
(
true
);
URRobotControl
.
FreeAxis
();
RobotStatus
(
true
);
UpdateRobotPosition
();
}
}
...
...
@@ -272,8 +270,7 @@ namespace URSoldering.Client
}
URRobotControl
.
LockAxis
();
//timer2.Stop();
timer1
.
Stop
();
UsbCameraHDevelop
.
CloseAllCamera
();
timer1
.
Stop
();
}
private
void
btnSavePoint_Click
(
object
sender
,
EventArgs
e
)
...
...
URSolderingClient/FrmOrgConfig.cs
查看文件 @
434f7f9
...
...
@@ -22,25 +22,12 @@ namespace URSoldering.Client
private
void
FrmBoardInfo_Load
(
object
sender
,
EventArgs
e
)
{
CheckForIllegalCrossThreadCalls
=
false
;
//此界面打开时,不能打开自动焊接
//CheckForIllegalCrossThreadCalls = false;
if
(
WeldRobotBean
.
ISRun
)
{
LogUtil
.
error
(
"进入焊接界面,发现WeldRobotBean自动运行中,关闭自动运行"
);
WeldRobotBean
.
StopRun
();
}
if
(
URRobotControl
.
IsRun
)
{
URRobotControl
.
FreeAxis
();
URPointValue
lastP
=
URRobotControl
.
GetLastPosition
();
urRobotSControl1
.
ShowPoint
(
lastP
);
}
else
{
}
}
isAuto
=
false
;
timer1
.
Interval
=
1000
;
...
...
@@ -53,21 +40,11 @@ namespace URSoldering.Client
{
if
(!
URRobotControl
.
IsRun
&&
isRun
.
Equals
(
false
))
{
isRun
=
true
;
Task
.
Factory
.
StartNew
(
delegate
()
{
bool
result
=
URRobotControl
.
StartRobot
();
if
(!
result
)
{
LogUtil
.
info
(
"连接失败:"
+
result
);
}
else
{
URRobotControl
.
FreeAxis
();
isAuto
=
false
;
}
});
isRun
=
true
;
bool
result
=
URRobotControl
.
StartRobot
();
});
}
else
{
...
...
@@ -81,8 +58,7 @@ namespace URSoldering.Client
private
void
FrmBoardInfo_FormClosing
(
object
sender
,
FormClosingEventArgs
e
)
{
URRobotControl
.
LockAxis
();
timer1
.
Stop
();
UsbCameraHDevelop
.
CloseAllCamera
();
timer1
.
Stop
();
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论