Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
URSolderingRobot
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 9156bbe9
由
几米阳光
编写于
2018-08-06 10:16:26 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加夹具夹紧处理
1 个父辈
19509c36
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
80 行增加
和
27 行删除
DeviceLibrary/Robot/LineSolderingRobot.cs
DeviceLibrary/bean/RobotBean.cs
URSolderingClient/FrmBoardInfo.cs
URSolderingClient/FrmIoManager.cs
URSolderingClient/FrmSoldDebug.cs
DeviceLibrary/Robot/LineSolderingRobot.cs
查看文件 @
9156bbe
...
@@ -39,7 +39,12 @@ namespace URSoldering.DeviceLibrary
...
@@ -39,7 +39,12 @@ namespace URSoldering.DeviceLibrary
{
{
WarnMsg
=
"急停未开"
;
WarnMsg
=
"急停未开"
;
return
false
;
return
false
;
}
}
if
(!
IsFixtureClamp
())
{
WarnMsg
=
"夹具未夹紧"
;
return
false
;
}
//焊接机器人复位
//焊接机器人复位
string
solderingStr
=
""
;
string
solderingStr
=
""
;
if
(
Status
>
RobotStatus
.
Wait
)
if
(
Status
>
RobotStatus
.
Wait
)
...
@@ -64,10 +69,7 @@ namespace URSoldering.DeviceLibrary
...
@@ -64,10 +69,7 @@ namespace URSoldering.DeviceLibrary
mainTimer
.
Enabled
=
true
;
mainTimer
.
Enabled
=
true
;
return
true
;
return
true
;
}
}
/// <summary>
/// 急停 处理
/// </summary>
private
void
SuddendownProcess
()
private
void
SuddendownProcess
()
{
{
WarnMsg
=
"收到急停信号,设备急停"
;
WarnMsg
=
"收到急停信号,设备急停"
;
...
@@ -75,8 +77,14 @@ namespace URSoldering.DeviceLibrary
...
@@ -75,8 +77,14 @@ namespace URSoldering.DeviceLibrary
IsInSuddendown
=
true
;
IsInSuddendown
=
true
;
Alarm
(
AlarmType
.
SuddenStop
);
Alarm
(
AlarmType
.
SuddenStop
);
}
}
private
void
FixtureRelaxProcess
()
public
string
StartWeld
()
{
WarnMsg
=
"夹具未夹紧,设备急停"
;
LogUtil
.
error
(
RobotName
+
WarnMsg
);
IsInSuddendown
=
true
;
Alarm
(
AlarmType
.
SuddenStop
);
}
public
string
StartWeld
()
{
{
string
msg
=
""
;
string
msg
=
""
;
...
@@ -111,9 +119,16 @@ namespace URSoldering.DeviceLibrary
...
@@ -111,9 +119,16 @@ namespace URSoldering.DeviceLibrary
{
{
SuddendownProcess
();
SuddendownProcess
();
}
}
}
}
else
if
(
IsInSuddendown
)
else
if
(
IsInSuddendown
)
{
{
}
else
if
(
IsFixtureClamp
().
Equals
(
false
))
{
if
(
alarmType
.
Equals
(
AlarmType
.
None
))
{
FixtureRelaxProcess
();
}
}
}
else
else
{
{
...
...
DeviceLibrary/bean/RobotBean.cs
查看文件 @
9156bbe
...
@@ -125,11 +125,26 @@ namespace URSoldering.DeviceLibrary
...
@@ -125,11 +125,26 @@ namespace URSoldering.DeviceLibrary
System
.
Threading
.
Thread
.
Sleep
(
100
);
System
.
Threading
.
Thread
.
Sleep
(
100
);
}
}
}
}
FixtureClamp
();
}
public
static
void
FixtureClamp
()
{
//连接上IO模块后,夹具夹紧
//连接上IO模块后,夹具夹紧
//KNDIOMove(IO_Type.Fixture_Clamp, IO_VALUE.HIGH);
KNDIOMove
(
IO_Type
.
Fixture_Clamp
,
IO_VALUE
.
HIGH
);
//KNDIOMove(IO_Type.Fixture_Relax, IO_VALUE.LOW);
KNDIOMove
(
IO_Type
.
Fixture_Relax
,
IO_VALUE
.
LOW
);
}
public
static
bool
IsFixtureClamp
()
{
if
(
KNDIOValue
(
IO_Type
.
Fixture_Clamp
).
Equals
(
IO_VALUE
.
HIGH
)
&&
KNDIOValue
(
IO_Type
.
Fixture_Relax
).
Equals
(
IO_VALUE
.
LOW
))
{
return
true
;
}
else
{
LogUtil
.
error
(
"夹具夹紧信号不到位"
);
return
false
;
}
}
}
public
static
bool
ShuddenOK
()
public
static
bool
ShuddenOK
()
{
{
if
(!
baseConfig
.
RobotDIList
.
ContainsKey
(
IO_Type
.
SuddenStop_Single
))
if
(!
baseConfig
.
RobotDIList
.
ContainsKey
(
IO_Type
.
SuddenStop_Single
))
...
...
URSolderingClient/FrmBoardInfo.cs
查看文件 @
9156bbe
...
@@ -262,38 +262,42 @@ namespace URSoldering.Client
...
@@ -262,38 +262,42 @@ namespace URSoldering.Client
//判断是否开急停
//判断是否开急停
if
(
RobotBean
.
ShuddenOK
().
Equals
(
false
))
if
(
RobotBean
.
ShuddenOK
().
Equals
(
false
))
{
{
lblMsg
.
Text
=
"急停未开"
;
lblMsg
.
Text
=
"急停未开"
;
}
else
if
(
RobotBean
.
IsFixtureClamp
().
Equals
(
false
))
{
lblMsg
.
Text
=
"夹具未夹紧"
;
}
}
else
else
{
{
lblMsg
.
Text
=
""
;
lblMsg
.
Text
=
""
;
if
(
this
.
btnWUp
.
Enabled
==
false
)
if
(
this
.
btnWUp
.
Enabled
==
false
)
{
{
//this.btnWDown.Enabled = true;
this
.
btnWUp
.
Enabled
=
true
;
this
.
btnWUp
.
Enabled
=
true
;
}
}
if
(!
URRobotControl
.
IsRun
&&
isRun
.
Equals
(
false
))
if
(!
URRobotControl
.
IsRun
&&
isRun
.
Equals
(
false
))
{
{
isRun
=
true
;
isRun
=
true
;
Task
.
Factory
.
StartNew
(
delegate
()
Task
.
Factory
.
StartNew
(
delegate
()
{
{
bool
result
=
URRobotControl
.
StartRobot
();
bool
result
=
URRobotControl
.
StartRobot
();
if
(!
result
)
if
(!
result
)
{
{
LogUtil
.
info
(
"连接失败:"
+
result
);
LogUtil
.
info
(
"连接失败:"
+
result
);
}
}
else
else
{
{
URRobotControl
.
FreeAxis
();
URRobotControl
.
FreeAxis
();
}
}
});
});
}
else
{
RobotStatus
(
true
);
UpdateRobotPosition
();
}
}
}
if
(
URRobotControl
.
IsRun
)
{
RobotStatus
(
true
);
UpdateRobotPosition
();
}
}
}
}
...
...
URSolderingClient/FrmIoManager.cs
查看文件 @
9156bbe
...
@@ -179,8 +179,16 @@ namespace URSoldering.Client
...
@@ -179,8 +179,16 @@ namespace URSoldering.Client
lblMsg
.
Text
=
"急停未开"
;
lblMsg
.
Text
=
"急停未开"
;
if
(
this
.
btnSendWireStop
.
Enabled
)
if
(
this
.
btnSendWireStop
.
Enabled
)
{
{
FormStatus
(
false
);
}
}
else
if
(
RobotBean
.
IsFixtureClamp
().
Equals
(
false
))
{
lblMsg
.
Text
=
"夹具未夹紧"
;
if
(
this
.
btnSendWireStop
.
Enabled
)
{
FormStatus
(
false
);
FormStatus
(
false
);
}
}
}
}
else
else
...
@@ -290,12 +298,19 @@ namespace URSoldering.Client
...
@@ -290,12 +298,19 @@ namespace URSoldering.Client
private
void
btnFixtureReleax_Click
(
object
sender
,
EventArgs
e
)
private
void
btnFixtureReleax_Click
(
object
sender
,
EventArgs
e
)
{
{
FixtureCylinderMove
(
IO_VALUE
.
LOW
,
IO_VALUE
.
HIGH
);
DialogResult
result
=
MessageBox
.
Show
(
"确定执行夹具放松操作?"
,
"提示"
,
MessageBoxButtons
.
OKCancel
);
if
(
result
.
Equals
(
DialogResult
.
OK
))
{
FixtureCylinderMove
(
IO_VALUE
.
LOW
,
IO_VALUE
.
HIGH
);
}
}
}
private
void
btnFixtureStop_Click
(
object
sender
,
EventArgs
e
)
private
void
btnFixtureStop_Click
(
object
sender
,
EventArgs
e
)
{
{
DialogResult
result
=
MessageBox
.
Show
(
"确定执行夹具停止输出操作?"
,
"提示"
,
MessageBoxButtons
.
OKCancel
);
FixtureCylinderMove
(
IO_VALUE
.
LOW
,
IO_VALUE
.
LOW
);
if
(
result
.
Equals
(
DialogResult
.
OK
))
{
FixtureCylinderMove
(
IO_VALUE
.
LOW
,
IO_VALUE
.
LOW
);
}
}
}
private
void
btnWireWork_Click
(
object
sender
,
EventArgs
e
)
private
void
btnWireWork_Click
(
object
sender
,
EventArgs
e
)
...
...
URSolderingClient/FrmSoldDebug.cs
查看文件 @
9156bbe
...
@@ -107,6 +107,10 @@ namespace URSoldering.Client
...
@@ -107,6 +107,10 @@ namespace URSoldering.Client
{
{
lblMsg
.
Text
=
"急停未开"
;
lblMsg
.
Text
=
"急停未开"
;
}
else
if
(
RobotBean
.
IsFixtureClamp
().
Equals
(
false
))
{
lblMsg
.
Text
=
"夹具未夹紧"
;
}
}
else
else
{
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论