Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
URSolderingRobot
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 5b8bfa55
由
几米阳光
编写于
2018-09-27 15:04:17 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加Z轴最低点配置和验证
1 个父辈
5233cad6
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
90 行增加
和
58 行删除
DeviceLibrary/deviceLibrary/urRobot/URRobotControl.cs
URSolderingClient/FrmBoardInfo.Designer.cs
URSolderingClient/FrmBoardInfo.cs
URSolderingClient/FrmOrgConfig.cs
URSolderingClient/FrmPointInfo.cs
URSolderingClient/FrmSetting.Designer.cs
URSolderingClient/FrmSetting.cs
DeviceLibrary/deviceLibrary/urRobot/URRobotControl.cs
查看文件 @
5b8bfa5
...
...
@@ -561,7 +561,20 @@ namespace URSoldering.DeviceLibrary
{
return
LastPoint
;
}
/// <summary>
/// 是否是有效的z轴
/// </summary>
/// <param name="z"></param>
/// <returns></returns>
public
static
bool
IsValidZ
(
double
z
)
{
return
true
;
if
(
z
>=
Robot_LIM_Z
)
{
return
true
;
}
return
false
;
}
}
public
class
URPointValue
{
...
...
URSolderingClient/FrmBoardInfo.Designer.cs
查看文件 @
5b8bfa5
...
...
@@ -55,6 +55,8 @@
this
.
panBoard
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
picBoard
=
new
System
.
Windows
.
Forms
.
PictureBox
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
label17
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label15
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtCode
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label10
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
chbIsSafe
=
new
System
.
Windows
.
Forms
.
CheckBox
();
...
...
@@ -133,8 +135,6 @@
this
.
btnSStop
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnWStop
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
label14
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label15
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label17
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
contextMenuStrip1
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
picRight
)).
BeginInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
picLeft
)).
BeginInit
();
...
...
@@ -426,9 +426,27 @@
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"机器人实时坐标"
;
//
// label17
//
this
.
label17
.
AutoSize
=
true
;
this
.
label17
.
Location
=
new
System
.
Drawing
.
Point
(
834
,
66
);
this
.
label17
.
Name
=
"label17"
;
this
.
label17
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
17
);
this
.
label17
.
TabIndex
=
330
;
this
.
label17
.
Text
=
"mm"
;
//
// label15
//
this
.
label15
.
AutoSize
=
true
;
this
.
label15
.
Location
=
new
System
.
Drawing
.
Point
(
833
,
35
);
this
.
label15
.
Name
=
"label15"
;
this
.
label15
.
Size
=
new
System
.
Drawing
.
Size
(
41
,
17
);
this
.
label15
.
TabIndex
=
329
;
this
.
label15
.
Text
=
"mm/s"
;
//
// txtCode
//
this
.
txtCode
.
Location
=
new
System
.
Drawing
.
Point
(
39
,
1
9
);
this
.
txtCode
.
Location
=
new
System
.
Drawing
.
Point
(
39
,
1
55
);
this
.
txtCode
.
Name
=
"txtCode"
;
this
.
txtCode
.
Size
=
new
System
.
Drawing
.
Size
(
155
,
23
);
this
.
txtCode
.
TabIndex
=
268
;
...
...
@@ -437,7 +455,7 @@
// label10
//
this
.
label10
.
AutoSize
=
true
;
this
.
label10
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
22
);
this
.
label10
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
158
);
this
.
label10
.
Name
=
"label10"
;
this
.
label10
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
17
);
this
.
label10
.
TabIndex
=
267
;
...
...
@@ -1253,24 +1271,6 @@
this
.
label14
.
Text
=
"条形码"
;
this
.
label14
.
Visible
=
false
;
//
// label15
//
this
.
label15
.
AutoSize
=
true
;
this
.
label15
.
Location
=
new
System
.
Drawing
.
Point
(
833
,
35
);
this
.
label15
.
Name
=
"label15"
;
this
.
label15
.
Size
=
new
System
.
Drawing
.
Size
(
41
,
17
);
this
.
label15
.
TabIndex
=
329
;
this
.
label15
.
Text
=
"mm/s"
;
//
// label17
//
this
.
label17
.
AutoSize
=
true
;
this
.
label17
.
Location
=
new
System
.
Drawing
.
Point
(
834
,
66
);
this
.
label17
.
Name
=
"label17"
;
this
.
label17
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
17
);
this
.
label17
.
TabIndex
=
330
;
this
.
label17
.
Text
=
"mm"
;
//
// FrmBoardInfo
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
17F
);
...
...
URSolderingClient/FrmBoardInfo.cs
查看文件 @
5b8bfa5
...
...
@@ -172,6 +172,10 @@ namespace URSoldering.Client
lblRobotRX
.
Text
=
point
.
RX
.
ToString
();
lblRobotRY
.
Text
=
point
.
RY
.
ToString
();
lblRobotRZ
.
Text
=
point
.
RZ
.
ToString
();
if
(!
URRobotControl
.
IsValidZ
(
point
.
Z
))
{
label11
.
Text
=
label11
.
Text
+
" "
+
"机器人低于最低Z点"
;
}
}
private
bool
SureMoveRobot
()
{
...
...
@@ -274,6 +278,7 @@ namespace URSoldering.Client
private
void
timer_Elapsed
(
object
sender
,
EventArgs
e
)
{
label11
.
Text
=
URRobotControl
.
GetStatus
();
//判断是否开急停
if
(
RobotBean
.
ShuddenOK
().
Equals
(
false
))
{
...
...
@@ -335,9 +340,10 @@ namespace URSoldering.Client
{
URPointValue
point
=
GetCurrRobotPoint
();
//判断原点的Z轴
if
(
point
.
Z
>
URRobotControl
.
Robot_LIM_Z
)
//if (point.Z > URRobotControl.Robot_LIM_Z)
if
(!
URRobotControl
.
IsValidZ
(
point
.
Z
))
{
MessageBox
.
Show
(
"保存失败,焊点Z坐标("
+
point
.
Z
+
")不能
高于最高
Z点("
+
URRobotControl
.
Robot_LIM_Z
+
")"
);
MessageBox
.
Show
(
"保存失败,焊点Z坐标("
+
point
.
Z
+
")不能
低于最低
Z点("
+
URRobotControl
.
Robot_LIM_Z
+
")"
);
return
;
}
AddNewPoint
(
point
);
...
...
@@ -926,11 +932,16 @@ namespace URSoldering.Client
{
URPointValue
point
=
GetCurrRobotPoint
();
//判断原点的Z轴
if
(
point
.
Z
>
URRobotControl
.
Robot_LIM_Z
)
//if (point.Z > URRobotControl.Robot_LIM_Z)
//{
// MessageBox.Show("保存失败,原点Z坐标(" + point.Z + ")不能高于最高Z点(" + URRobotControl.Robot_LIM_Z + ")");
// return;
//}
if
(!
URRobotControl
.
IsValidZ
(
point
.
Z
))
{
MessageBox
.
Show
(
"保存失败,原点Z坐标("
+
point
.
Z
+
")不能
高于最高
Z点("
+
URRobotControl
.
Robot_LIM_Z
+
")"
);
MessageBox
.
Show
(
"保存失败,原点Z坐标("
+
point
.
Z
+
")不能
低于最低
Z点("
+
URRobotControl
.
Robot_LIM_Z
+
")"
);
return
;
}
}
DialogResult
result
=
MessageBox
.
Show
(
"是否将当前位置"
+
point
.
ToShowStr
()
+
"保存为原点?"
,
"提示"
,
MessageBoxButtons
.
YesNo
);
if
(
result
.
Equals
(
DialogResult
.
Yes
))
{
...
...
@@ -1058,6 +1069,11 @@ namespace URSoldering.Client
{
URPointValue
point
=
GetCurrRobotPoint
();
point
.
Z
-=
StepValue
;
if
(!
URRobotControl
.
IsValidZ
(
point
.
Z
))
{
MessageBox
.
Show
(
"已达到最低Z轴,无法向下移动"
,
"提示"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Error
);
}
RovotMove
(
point
);
}
...
...
@@ -1256,11 +1272,16 @@ namespace URSoldering.Client
{
URPointValue
point
=
GetCurrRobotPoint
();
//判断原点的Z轴
if
(
point
.
Z
>
URRobotControl
.
Robot_LIM_Z
)
//if (point.Z > URRobotControl.Robot_LIM_Z)
//{
// MessageBox.Show("保存失败,清洗点1的Z坐标(" + point.Z + ")不能高于最高Z点(" + URRobotControl.Robot_LIM_Z + ")");
// return;
//}
if
(!
URRobotControl
.
IsValidZ
(
point
.
Z
))
{
MessageBox
.
Show
(
"保存失败,清洗点1的Z坐标("
+
point
.
Z
+
")不能
高于最高
Z点("
+
URRobotControl
.
Robot_LIM_Z
+
")"
);
MessageBox
.
Show
(
"保存失败,清洗点1的Z坐标("
+
point
.
Z
+
")不能
低于最低
Z点("
+
URRobotControl
.
Robot_LIM_Z
+
")"
);
return
;
}
}
DialogResult
result
=
MessageBox
.
Show
(
"是否将当前位置"
+
point
.
ToShowStr
()+
"保存为清洗点1?"
,
"提示"
,
MessageBoxButtons
.
YesNo
);
if
(
result
.
Equals
(
DialogResult
.
Yes
))
{
...
...
@@ -1273,12 +1294,16 @@ namespace URSoldering.Client
{
URPointValue
point
=
GetCurrRobotPoint
();
//判断原点的Z轴
if
(
point
.
Z
>
URRobotControl
.
Robot_LIM_Z
)
//if (point.Z > URRobotControl.Robot_LIM_Z)
//{
// MessageBox.Show("保存失败,清洗点2的Z坐标(" + point.Z + ")不能高于最高Z点(" + URRobotControl.Robot_LIM_Z + ")");
// return;
//}
if
(!
URRobotControl
.
IsValidZ
(
point
.
Z
))
{
MessageBox
.
Show
(
"保存失败,清洗点2的Z坐标("
+
point
.
Z
+
")不能
高于最高
Z点("
+
URRobotControl
.
Robot_LIM_Z
+
")"
);
MessageBox
.
Show
(
"保存失败,清洗点2的Z坐标("
+
point
.
Z
+
")不能
低于最低
Z点("
+
URRobotControl
.
Robot_LIM_Z
+
")"
);
return
;
}
DialogResult
result
=
MessageBox
.
Show
(
"是否将当前位置"
+
point
.
ToShowStr
()
+
"保存为清洗点2?"
,
"提示"
,
MessageBoxButtons
.
YesNo
);
if
(
result
.
Equals
(
DialogResult
.
Yes
))
{
...
...
URSolderingClient/FrmOrgConfig.cs
查看文件 @
5b8bfa5
...
...
@@ -108,9 +108,14 @@ namespace URSoldering.Client
private
DialogResult
ShowConfire
(
URPointValue
point
,
string
strMsg
)
{
//判断原点的Z轴
if
(
point
.
Z
>
URRobotControl
.
Robot_LIM_Z
)
//if (point.Z > URRobotControl.Robot_LIM_Z)
//{
// MessageBox.Show("保存失败,"+ strMsg + "的Z坐标(" + point.Z + ")不能高于最高Z点(" + URRobotControl.Robot_LIM_Z + ")");
// return DialogResult.Cancel;
//}
if
(!
URRobotControl
.
IsValidZ
(
point
.
Z
))
{
MessageBox
.
Show
(
"保存失败,
"
+
strMsg
+
"的Z坐标("
+
point
.
Z
+
")不能高于最高
Z点("
+
URRobotControl
.
Robot_LIM_Z
+
")"
);
MessageBox
.
Show
(
"保存失败,
焊点Z坐标("
+
point
.
Z
+
")不能低于最低
Z点("
+
URRobotControl
.
Robot_LIM_Z
+
")"
);
return
DialogResult
.
Cancel
;
}
...
...
URSolderingClient/FrmPointInfo.cs
查看文件 @
5b8bfa5
...
...
@@ -257,9 +257,14 @@ namespace URSoldering.Client
URPointValue
point
=
URRobotControl
.
GetLastPosition
();
//判断原点的Z轴
if
(
point
.
Z
>
URRobotControl
.
Robot_LIM_Z
)
//if (point.Z > URRobotControl.Robot_LIM_Z)
//{
// MessageBox.Show("保存失败,焊点Z坐标(" + point.Z + ")不能高于最高Z点(" + URRobotControl.Robot_LIM_Z + ")");
// return;
//}
if
(!
URRobotControl
.
IsValidZ
(
point
.
Z
))
{
MessageBox
.
Show
(
"保存失败,焊点Z坐标("
+
point
.
Z
+
")不能
高于最高
Z点("
+
URRobotControl
.
Robot_LIM_Z
+
")"
);
MessageBox
.
Show
(
"保存失败,焊点Z坐标("
+
point
.
Z
+
")不能
低于最低
Z点("
+
URRobotControl
.
Robot_LIM_Z
+
")"
);
return
;
}
DialogResult
result
=
MessageBox
.
Show
(
"当前坐标:"
+
point
.
ToShowStr
()+
",是否确定更新?"
,
"提示"
,
MessageBoxButtons
.
YesNo
);
...
...
URSolderingClient/FrmSetting.Designer.cs
查看文件 @
5b8bfa5
...
...
@@ -230,7 +230,7 @@
this
.
label8
.
Name
=
"label8"
;
this
.
label8
.
Size
=
new
System
.
Drawing
.
Size
(
63
,
17
);
this
.
label8
.
TabIndex
=
6
;
this
.
label8
.
Text
=
"最
高
Z点:"
;
this
.
label8
.
Text
=
"最
低
Z点:"
;
//
// groupBox5
//
...
...
@@ -260,7 +260,7 @@
this
.
minControl
.
Size
=
new
System
.
Drawing
.
Size
(
168
,
226
);
this
.
minControl
.
TabIndex
=
2
;
//
// FrmS
olderingS
etting
// FrmSetting
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
17F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
...
...
@@ -273,7 +273,7 @@
this
.
Controls
.
Add
(
this
.
btnClose
);
this
.
Controls
.
Add
(
this
.
btnSaveSetting
);
this
.
Controls
.
Add
(
this
.
gbEpsonSetting
);
this
.
Name
=
"FrmS
olderingS
etting"
;
this
.
Name
=
"FrmSetting"
;
this
.
Text
=
"设备配置"
;
this
.
Load
+=
new
System
.
EventHandler
(
this
.
FrmRobotSetting_Load
);
this
.
groupBox3
.
ResumeLayout
(
false
);
...
...
URSolderingClient/FrmSetting.cs
查看文件 @
5b8bfa5
...
...
@@ -26,23 +26,7 @@ namespace URSoldering.Client
}
private
void
getValue
()
{
//int index = -1;
//foreach (BoardInfo obj in BoardManager.boardList)
//{
// index++;
// if (obj.boardId.Equals(BoardManager.CurrBoardId))
// {
// break;
// }
//}
//if (index >= 0)
//{
// cmbBoardList.SelectedIndex = index;
//}
//this.txtOriginX.Text = ConfigAppSettings.GetValue(Setting_Init.BOARD_ORIGIN_X);
//this.txtOriginY.Text = ConfigAppSettings.GetValue(Setting_Init.BOARD_ORIGIN_Y);
//int ch = WeldRobotBean.SendWireXiShu;
txtLimZ
.
Text
=
((
double
)
ConfigAppSettings
.
GetNumValue
(
Setting_Init
.
Soldering_LIM_Z
)).
ToString
();
txtsendWireSpeed
.
Text
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
ReverseSendWireSpeed
);
txtsendWireTime
.
Text
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
ReverseSendWireTime
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论