Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
URSolderingRobot
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 8eccf70f
由
几米阳光
编写于
2018-08-01 15:14:18 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
85436596
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
55 行增加
和
87 行删除
Common/Setting_Init.cs
DeviceLibrary/Robot/soldering/WeldRobotBean.cs
DeviceLibrary/Robot/soldering/WeldRobotBean_Partial.cs
DeviceLibrary/deviceLibrary/jbc/SendWireManager.cs
URSolderingClient/App.config
URSolderingClient/FrmCamera.cs
URSolderingClient/FrmSolderingSetting.Designer.cs
URSolderingClient/FrmSolderingSetting.cs
URSolderingClient/FrmWork.Designer.cs
URSolderingClient/FrmWork.cs
Common/Setting_Init.cs
查看文件 @
8eccf70
...
...
@@ -21,18 +21,13 @@ namespace URSoldering.Common
public
static
string
Robot_Type
=
"Robot_Type"
;
public
static
string
AOIFileConfig
=
"AOIFileConfig"
;
/// <summary>
/// 检测焊点文件
/// </summary>
public
static
string
AOICheckPointFile
=
"AOICheckPointFile"
;
public
static
string
AOIFileConfig
=
"AOIFileConfig"
;
public
static
string
ISDebug
=
"ISDebug"
;
public
static
string
WorkCount_ConfigPath
=
"WorkCount_ConfigPath"
;
#
region
焊接机器人配置
public
static
string
ScanCodeConfig
=
"ScanCodeConfig"
;
#
region
焊接机器人配置
/// <summary>
/// 元器件库目录
/// </summary>
...
...
@@ -70,10 +65,9 @@ namespace URSoldering.Common
/// <summary>
/// 机械臂最小范围
/// </summary>
public
static
string
Soldering_RobotMax
=
"Soldering_RobotMax"
;
public
static
string
Soldering_RobotMax
=
"Soldering_RobotMax"
;
public
static
string
Soldering_LIM_Z
=
"Soldering_LIM_Z"
;
public
static
string
SendWire_Change
=
"SendWire_Change"
;
public
static
string
Slave_ID
=
"Slave_ID"
;
/// <summary>
...
...
@@ -89,22 +83,11 @@ namespace URSoldering.Common
/// 送丝器恢复后需要持续的时间
/// </summary>
public
static
string
SendWireRecoverSeconds
=
"SendWireRecoverSeconds"
;
public
static
string
ReverseSendWireSpeed
=
"ReverseSendWireSpeed"
;
public
static
string
ReverseSendWireSpeed
=
"ReverseSendWireSpeed"
;
public
static
string
ReverseSendWireTime
=
"ReverseSendWireTime"
;
/// <summary>
/// 摄像机名称,多个中间使用#分割
/// </summary>
public
static
string
CameraName
=
"CameraName"
;
/// <summary>
/// 需要识别的条码类型,多个中间使用#分割
/// </summary>
public
static
string
CodeType
=
"CodeType"
;
/// <summary>
/// 配置文件路径 Data Matrix ECC 200.dcm
/// </summary>
public
static
string
CameraName
=
"CameraName"
;
public
static
string
CodeType
=
"CodeType"
;
public
static
string
CodeParamPath
=
"CodeParamPath"
;
public
static
string
VideoCameraName
=
"VideoCameraName"
;
...
...
@@ -114,7 +97,6 @@ namespace URSoldering.Common
public
static
string
HasSoldering
=
"HasSoldering"
;
public
static
string
Config_Pwd
=
"Config_Pwd"
;
public
static
object
ShuoKe_Control_SerialPort
{
get
;
set
;
}
}
}
DeviceLibrary/Robot/soldering/WeldRobotBean.cs
查看文件 @
8eccf70
...
...
@@ -24,8 +24,7 @@ namespace URSoldering.DeviceLibrary
public
static
URPointValue
RobotMin
=
new
URPointValue
();
public
static
URPointValue
RobotMax
=
new
URPointValue
();
public
static
int
SendWireXiShu
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
SendWire_Change
);
//休眠的秒数,<=0不需要休眠
public
static
int
SleepSeconds
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
SleepSeconds
);
public
static
bool
isHighSpeed
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
Robot_IsHigh
)
==
1
;
...
...
DeviceLibrary/Robot/soldering/WeldRobotBean_Partial.cs
查看文件 @
8eccf70
...
...
@@ -285,8 +285,8 @@ namespace URSoldering.DeviceLibrary
SetTemp
(
false
,
false
);
double
time
=
WeldMoveStep
.
CurrPoint
.
startSendWireTime
;
if
(
time
>
0
)
{
int
speed
=
(
int
)
WeldMoveStep
.
CurrPoint
.
startSendWireSpeed
*
SendWireXiShu
;
{
double
speed
=
WeldMoveStep
.
CurrPoint
.
startSendWireSpeed
;
WeldLog
(
" 慢速送丝,速度:"
+
speed
+
" :"
+
time
.
ToString
()
+
"秒"
);
SendWireManager
.
SendWire
(
time
,
speed
);
int
ms
=
(
int
)(
time
*
1000
+
100
);
...
...
@@ -301,7 +301,7 @@ namespace URSoldering.DeviceLibrary
{
SetTemp
(
false
,
false
);
double
time
=
WeldMoveStep
.
CurrPoint
.
sendWireTime
;
int
speed
=
(
int
)
WeldMoveStep
.
CurrPoint
.
sendWireSpeed
*
SendWireXiShu
;
double
speed
=
WeldMoveStep
.
CurrPoint
.
sendWireSpeed
;
WeldLog
(
" 送丝,速度:"
+
speed
+
" :"
+
time
.
ToString
()
+
"秒"
);
if
(
time
>
0
)
{
...
...
@@ -480,7 +480,7 @@ namespace URSoldering.DeviceLibrary
WeldMoveStep
.
ResetCount
++;
SendWireManager
.
Reset
();
//反向送丝
int
speed
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
ReverseSendWireSpeed
)
*
SendWireXiShu
;
int
speed
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
ReverseSendWireSpeed
)
;
double
time
=
(
double
)
ConfigAppSettings
.
GetNumValue
(
Setting_Init
.
ReverseSendWireTime
);
if
(
speed
.
Equals
(
0
)
||
time
<=
0
)
{
...
...
@@ -495,7 +495,7 @@ namespace URSoldering.DeviceLibrary
SendWireManager
.
SendWireBack
(
time
,
speed
);
int
ms
=
(
int
)((
time
*
1000
)
+
100
);
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitSendWire
(
ms
,
fals
e
));
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitSendWire
(
ms
,
tru
e
));
isOk
=
false
;
}
}
...
...
DeviceLibrary/deviceLibrary/jbc/SendWireManager.cs
查看文件 @
8eccf70
...
...
@@ -148,14 +148,14 @@ namespace URSoldering.DeviceLibrary
}
return
false
;
}
public
static
void
SendWireBack
(
double
time
,
int
speed
)
public
static
void
SendWireBack
(
double
time
,
double
speed
)
{
setSpeed
(
speed
);
double
length
=
(
time
*
speed
);
setLength
(
length
);
StartBSend
();
}
public
static
void
SendWire
(
double
time
,
int
speed
)
public
static
void
SendWire
(
double
time
,
double
speed
)
{
setSpeed
(
speed
);
double
length
=
(
time
*
speed
);
...
...
URSolderingClient/App.config
查看文件 @
8eccf70
...
...
@@ -12,8 +12,7 @@
<
add
key
=
"HasSoldering"
value
=
"0"
/>
<!--
AOI
检测文件-->
<
add
key
=
"VideoCameraName"
value
=
"[0] Integrated Camera"
/>
<
add
key
=
"AOIFileConfig"
value
=
"\RobotConfig\AOIConfig\AOIProgram.vscf"
/>
<
add
key
=
"AOICheckPointFile"
value
=
"\RobotConfig\AOIConfig\AOIPointProgram.vscf"
/>
<
add
key
=
"AOIFileConfig"
value
=
"\RobotConfig\AOIConfig\AOIProgram.vscf"
/>
<
add
key
=
"AOIWaitSeconds"
value
=
"1000"
/>
<!--送丝器消除报警需要持续的秒数-->
<
add
key
=
"SendWireRecoverSeconds"
value
=
"5"
/>
...
...
@@ -39,10 +38,9 @@
<
add
key
=
"Board_Image_Path"
value
=
"\RobotConfig\config"
/>
<!--程序默认图片-->
<
add
key
=
"BOARD_IMAGE_DEFAULT"
value
=
"defaultBoard.jpg"
/>
<!--送丝
1
mm
对应的脉冲数-->
<
add
key
=
"SendWire_Change"
value
=
"-305"
/>
<!--报警时反转送丝速度-->
<
add
key
=
"ReverseSendWireSpeed"
value
=
"
-
10"
/>
<
add
key
=
"ReverseSendWireSpeed"
value
=
"10"
/>
<!--报警时反转送丝时间-->
<
add
key
=
"ReverseSendWireTime"
value
=
"3"
/>
<
add
key
=
"ISDebug"
value
=
"1"
/>
...
...
URSolderingClient/FrmCamera.cs
查看文件 @
8eccf70
...
...
@@ -12,8 +12,8 @@ namespace URSoldering.Client
{
InitializeComponent
();
}
private
static
string
VideoCameraName
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
VideoCameraName
);
//private static string CodeCameraName = ConfigAppSettings.GetValue(Setting_Init.CodeCameraName);
//
private static string VideoCameraName = ConfigAppSettings.GetValue(Setting_Init.VideoCameraName);
private
void
btnOpen_Click
(
object
sender
,
EventArgs
e
)
{
string
name
=
cmbCamera
.
Text
;
...
...
@@ -38,7 +38,7 @@ namespace URSoldering.Client
private
void
FrmCamera_Load
(
object
sender
,
EventArgs
e
)
{
cmbCamera
.
Items
.
Add
(
VideoCameraName
);
//
cmbCamera.Items.Add(VideoCameraName);
//cmbCamera.Items.Add(CodeCameraName);
cmbCamera
.
SelectedIndex
=
0
;
FormStatus
(
false
);
...
...
URSolderingClient/FrmSolderingSetting.Designer.cs
查看文件 @
8eccf70
此文件的差异被折叠,
点击展开。
URSolderingClient/FrmSolderingSetting.cs
查看文件 @
8eccf70
...
...
@@ -26,22 +26,22 @@ 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
;
//
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
);
...
...
@@ -59,8 +59,8 @@ namespace URSoldering.Client
{
try
{
int
boardId
=
((
BoardInfo
)
cmbBoardList
.
SelectedItem
).
boardId
;
BoardManager
.
UpdateCurrBoard
(
boardId
);
//
int boardId = ((BoardInfo)cmbBoardList.SelectedItem).boardId;
//
BoardManager.UpdateCurrBoard(boardId);
int
limz
=
FormUtil
.
GetIntValue
(
txtLimZ
);
...
...
@@ -154,8 +154,8 @@ namespace URSoldering.Client
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
Soldering_LIM_Z
,
limz
.
ToString
());
URRobotControl
.
Robot_LIM_Z
=
limz
;
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
Default_BoardID
,
boardId
);
BoardManager
.
UpdateCurrBoard
(
boardId
);
//
ConfigAppSettings.SaveValue(Setting_Init.Default_BoardID, boardId);
//
BoardManager.UpdateCurrBoard(boardId);
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
ReverseSendWireSpeed
,
sendWireSpeed
);
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
ReverseSendWireTime
,
sendWireTime
);
...
...
@@ -175,16 +175,16 @@ namespace URSoldering.Client
private
void
FrmRobotSetting_Load
(
object
sender
,
EventArgs
e
)
{
LoadCom
();
//
LoadCom();
getValue
();
}
private
void
LoadCom
()
{
cmbBoardList
.
DataSource
=
null
;
cmbBoardList
.
DataSource
=
BoardManager
.
boardList
;
cmbBoardList
.
DisplayMember
=
"boardName"
;
cmbBoardList
.
ValueMember
=
"boardId"
;
}
//
private void LoadCom()
//
{
//
cmbBoardList.DataSource = null;
//
cmbBoardList.DataSource = BoardManager.boardList;
//
cmbBoardList.DisplayMember = "boardName";
//
cmbBoardList.ValueMember = "boardId";
//
}
private
void
btnClose_Click
(
object
sender
,
EventArgs
e
)
{
...
...
URSolderingClient/FrmWork.Designer.cs
查看文件 @
8eccf70
...
...
@@ -46,8 +46,7 @@
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
logBox
=
new
System
.
Windows
.
Forms
.
RichTextBox
();
this
.
lblRobot
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
button2
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
axCKVisionCtrl1
=
new
AxCKVisionCtrlLib
.
AxCKVisionCtrl
();
this
.
lblCodeResult
=
new
System
.
Windows
.
Forms
.
Label
();
...
...
@@ -168,7 +167,7 @@
this
.
groupBox2
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
groupBox2
.
Controls
.
Add
(
this
.
button2
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
button1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
axCKVisionCtrl1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
lblCodeResult
);
...
...
@@ -181,17 +180,7 @@
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
99
,
595
);
this
.
groupBox2
.
TabIndex
=
269
;
this
.
groupBox2
.
TabStop
=
false
;
//
// button2
//
this
.
button2
.
Location
=
new
System
.
Drawing
.
Point
(
486
,
14
);
this
.
button2
.
Name
=
"button2"
;
this
.
button2
.
Size
=
new
System
.
Drawing
.
Size
(
79
,
26
);
this
.
button2
.
TabIndex
=
308
;
this
.
button2
.
Text
=
"扫码测试"
;
this
.
button2
.
UseVisualStyleBackColor
=
true
;
this
.
button2
.
Visible
=
false
;
this
.
button2
.
Click
+=
new
System
.
EventHandler
(
this
.
button2_Click
);
//
// button1
//
...
...
@@ -821,7 +810,7 @@
private
System
.
Windows
.
Forms
.
Button
btnBlow
;
private
System
.
Windows
.
Forms
.
Label
lblCodeResult
;
private
AxCKVisionCtrlLib
.
AxCKVisionCtrl
axCKVisionCtrl1
;
private
System
.
Windows
.
Forms
.
Button
button2
;
private
System
.
Windows
.
Forms
.
Button
button1
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox4
;
private
System
.
Windows
.
Forms
.
Label
label3
;
...
...
URSolderingClient/FrmWork.cs
查看文件 @
8eccf70
此文件的差异被折叠,
点击展开。
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论