Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
URSolderingRobot
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 76f9c750
由
几米阳光
编写于
2018-07-31 17:20:31 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
调试修改
1 个父辈
dbf9a7a6
显示空白字符变更
内嵌
并排
正在显示
23 个修改的文件
包含
225 行增加
和
399 行删除
Common/util/URTcpClient.cs
DeviceLibrary/DeviceLibrary.csproj
DeviceLibrary/Robot/LineSolderingRobot.cs
DeviceLibrary/Robot/LineSolderingRobot_Partial.cs
DeviceLibrary/Robot/MoveType.cs
DeviceLibrary/Robot/soldering/WeldRobotBean.cs
DeviceLibrary/Robot/soldering/WeldRobotBean_Partial.cs
DeviceLibrary/Robot/soldering/WeldStepBean.cs
DeviceLibrary/RobotConfig/solderingConfig/SolderingRobotConfig.csv
DeviceLibrary/bean/BoardInfo.cs
DeviceLibrary/deviceLibrary/jbc/SolderingManager.cs
DeviceLibrary/deviceLibrary/urRobot/URRobotControl.cs
URSolderingClient/FrmBoardInfo.Designer.cs
URSolderingClient/FrmBoardInfo.cs
URSolderingClient/FrmMenu.cs
URSolderingClient/FrmBoardSelect.Designer.cs → URSolderingClient/FrmProgramSelect.Designer.cs
URSolderingClient/FrmBoardSelect.cs → URSolderingClient/FrmProgramSelect.cs
URSolderingClient/FrmBoardSelect.resx → URSolderingClient/FrmProgramSelect.resx
URSolderingClient/FrmWeldPointInfo.cs
URSolderingClient/FrmWork.Designer.cs
URSolderingClient/FrmWork.cs
URSolderingClient/FrmWork.resx
URSolderingClient/URSolderingClient.csproj
Common/util/URTcpClient.cs
查看文件 @
76f9c75
...
@@ -193,6 +193,8 @@ namespace URSoldering.Common
...
@@ -193,6 +193,8 @@ namespace URSoldering.Common
/// </summary>
/// </summary>
public
void
sendLine
(
string
strSendData
)
public
void
sendLine
(
string
strSendData
)
{
{
try
{
LogUtil
.
info
(
LOGGER
,
LogName
+
"发送数据:"
+
strSendData
);
LogUtil
.
info
(
LOGGER
,
LogName
+
"发送数据:"
+
strSendData
);
LogUtil
.
URLInfo
(
LogName
+
"发送数据:"
+
strSendData
);
LogUtil
.
URLInfo
(
LogName
+
"发送数据:"
+
strSendData
);
strSendData
=
strSendData
+
"\r\n"
;
strSendData
=
strSendData
+
"\r\n"
;
...
@@ -203,6 +205,11 @@ namespace URSoldering.Common
...
@@ -203,6 +205,11 @@ namespace URSoldering.Common
m_clientSocket
.
Send
(
sendBuffer
);
m_clientSocket
.
Send
(
sendBuffer
);
LogUtil
.
debug
(
LOGGER
,
"Send >> "
+
strSendData
);
LogUtil
.
debug
(
LOGGER
,
"Send >> "
+
strSendData
);
}
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
LogName
+
"发送数据【"
+
strSendData
+
"】出错"
);
LogUtil
.
URLError
(
LogName
+
"发送数据【"
+
strSendData
+
"】出错:"
+
ex
.
ToString
());
}
}
}
int
headSize
=
4
;
//包头长度 固定4
int
headSize
=
4
;
//包头长度 固定4
byte
[]
surplusBuffer
=
null
;
//不完整的数据包,即用户自定义缓冲区
byte
[]
surplusBuffer
=
null
;
//不完整的数据包,即用户自定义缓冲区
...
...
DeviceLibrary/DeviceLibrary.csproj
查看文件 @
76f9c75
...
@@ -103,7 +103,6 @@
...
@@ -103,7 +103,6 @@
<Compile Include="bean\BoardManager.cs" />
<Compile Include="bean\BoardManager.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Robot\LineSolderingRobot.cs" />
<Compile Include="Robot\LineSolderingRobot.cs" />
<Compile Include="Robot\LineSolderingRobot_Partial.cs" />
<Compile Include="Robot\soldering\WeldRobotBean.cs" />
<Compile Include="Robot\soldering\WeldRobotBean.cs" />
<Compile Include="Robot\soldering\WeldRobotBean_Partial.cs" />
<Compile Include="Robot\soldering\WeldRobotBean_Partial.cs" />
<Compile Include="Robot\soldering\WeldStepBean.cs" />
<Compile Include="Robot\soldering\WeldStepBean.cs" />
...
...
DeviceLibrary/Robot/LineSolderingRobot.cs
查看文件 @
76f9c75
...
@@ -40,12 +40,6 @@ namespace URSoldering.DeviceLibrary
...
@@ -40,12 +40,6 @@ namespace URSoldering.DeviceLibrary
WarnMsg
=
"急停未开"
;
WarnMsg
=
"急停未开"
;
return
false
;
return
false
;
}
}
//if (KNDIOValue(IO_Type.AirCheck_Single).Equals(IO_VALUE.LOW))
//{
// WarnMsg = "没有气压信号";
// return false;
//}
//焊接机器人复位
//焊接机器人复位
string
solderingStr
=
""
;
string
solderingStr
=
""
;
if
(
Status
>
RobotStatus
.
Wait
)
if
(
Status
>
RobotStatus
.
Wait
)
...
@@ -64,11 +58,7 @@ namespace URSoldering.DeviceLibrary
...
@@ -64,11 +58,7 @@ namespace URSoldering.DeviceLibrary
}
}
Status
=
RobotStatus
.
Reset
;
Status
=
RobotStatus
.
Reset
;
//KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.HIGH);
WeldRobotBean
.
IsInWeld
=
false
;
//KNDIOMove(IO_Type.AlarmSingle, IO_VALUE.LOW);
//KNDIOMove(IO_Type.WaitSingle, IO_VALUE.LOW);
//KNDIOMove(IO_Type.DeviceRunON, IO_VALUE.LOW);
IsInProcess
=
false
;
IsInProcess
=
false
;
ledTimer
.
Enabled
=
true
;
ledTimer
.
Enabled
=
true
;
mainTimer
.
Enabled
=
true
;
mainTimer
.
Enabled
=
true
;
...
@@ -85,6 +75,26 @@ namespace URSoldering.DeviceLibrary
...
@@ -85,6 +75,26 @@ namespace URSoldering.DeviceLibrary
IsInSuddendown
=
true
;
IsInSuddendown
=
true
;
Alarm
(
AlarmType
.
SuddenStop
);
Alarm
(
AlarmType
.
SuddenStop
);
}
}
public
string
StartWeld
()
{
string
msg
=
""
;
//如果开始焊接,开始焊接
if
(
Status
.
Equals
(
RobotStatus
.
Runing
)
&&
WeldRobotBean
.
WeldMoveStep
.
moveType
.
Equals
(
MoveType
.
None
))
{
msg
=
WeldRobotBean
.
StartWeld
();
if
(
msg
.
Equals
(
""
))
{
Status
=
RobotStatus
.
Busy
;
}
}
else
{
msg
=
"无法开始焊接"
;
}
return
msg
;
}
private
bool
IsInProcess
=
false
;
private
bool
IsInProcess
=
false
;
protected
override
void
mainTimer_Elapsed
(
object
sender
,
ElapsedEventArgs
e
)
protected
override
void
mainTimer_Elapsed
(
object
sender
,
ElapsedEventArgs
e
)
{
{
...
@@ -117,10 +127,6 @@ namespace URSoldering.DeviceLibrary
...
@@ -117,10 +127,6 @@ namespace URSoldering.DeviceLibrary
{
{
LogUtil
.
info
(
RobotName
+
"复位完成"
);
LogUtil
.
info
(
RobotName
+
"复位完成"
);
Status
=
RobotStatus
.
Runing
;
Status
=
RobotStatus
.
Runing
;
//KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.HIGH);
//KNDIOMove(IO_Type.AlarmSingle, IO_VALUE.LOW);
//KNDIOMove(IO_Type.WaitSingle, IO_VALUE.LOW);
//KNDIOMove(IO_Type.DeviceRunON, IO_VALUE.HIGH);
}
}
}
}
else
if
(
Status
.
Equals
(
RobotStatus
.
Runing
))
else
if
(
Status
.
Equals
(
RobotStatus
.
Runing
))
...
@@ -176,7 +182,6 @@ namespace URSoldering.DeviceLibrary
...
@@ -176,7 +182,6 @@ namespace URSoldering.DeviceLibrary
private
void
StopMove
()
private
void
StopMove
()
{
{
//KNDIOMove(IO_Type.DeviceRunON, IO_VALUE.LOW);
WeldRobotBean
.
StopMove
();
WeldRobotBean
.
StopMove
();
this
.
Status
=
RobotStatus
.
Runing
;
this
.
Status
=
RobotStatus
.
Runing
;
}
}
...
@@ -186,13 +191,67 @@ namespace URSoldering.DeviceLibrary
...
@@ -186,13 +191,67 @@ namespace URSoldering.DeviceLibrary
mainTimer
.
Enabled
=
false
;
mainTimer
.
Enabled
=
false
;
StopMove
();
StopMove
();
WeldRobotBean
.
StopRun
();
WeldRobotBean
.
StopRun
();
//KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.LOW);
//KNDIOMove(IO_Type.AlarmSingle, IO_VALUE.LOW);
//KNDIOMove(IO_Type.WaitSingle, IO_VALUE.LOW);
//KNDIOMove(IO_Type.DeviceRunON, IO_VALUE.LOW);
this
.
Status
=
RobotStatus
.
Wait
;
this
.
Status
=
RobotStatus
.
Wait
;
LogUtil
.
info
(
RobotName
+
"停止运行"
);
LogUtil
.
info
(
RobotName
+
"停止运行"
);
}
}
public
DateTime
LastStartWeldTime
=
DateTime
.
Now
;
public
DateTime
LastEndWeldTime
=
DateTime
.
Now
;
public
bool
IsWeld
=
false
;
public
delegate
void
GetCode
();
public
event
GetCode
GetCodeFun
;
public
bool
IsAutoRun
=
false
;
private
void
BusyProcess
()
{
if
(
LineStep
.
moveStep
.
Equals
(
MoveStep
.
Wait
))
{
if
(
WeldRobotBean
.
IsInWeld
.
Equals
(
false
))
{
LastEndWeldTime
=
DateTime
.
Now
;
TimeSpan
span
=
LastEndWeldTime
-
LastStartWeldTime
;
if
(
BoardManager
.
CurrBoard
.
WeldTime
.
TotalSeconds
<=
0
)
{
BoardManager
.
CurrBoard
.
WeldTime
=
span
;
}
else
{
BoardManager
.
CurrBoard
.
WeldTime
=
new
TimeSpan
(
0
,
0
,
(
int
)(
BoardManager
.
CurrBoard
.
WeldTime
.
TotalSeconds
+
span
.
TotalSeconds
)
/
2
);
}
BoardManager
.
Update
(
BoardManager
.
CurrBoard
);
LogUtil
.
info
(
"Busy处理:"
+
"焊接结束,焊接耗时"
+
FormUtil
.
GetSpanStr
(
span
)
+
",累积平均耗时"
+
FormUtil
.
GetSpanStr
(
BoardManager
.
CurrBoard
.
WeldTime
)
+
""
);
LineStep
.
EndMove
();
Status
=
RobotStatus
.
Runing
;
}
}
}
/// <summary>
/// 判断是否还有未完成的工作
/// </summary>
public
bool
NeedWork
()
{
if
(
Status
>
RobotStatus
.
Wait
)
{
if
(
WeldRobotBean
.
WeldMoveStep
.
moveType
.
Equals
(
MoveType
.
Weld
))
{
return
true
;
}
}
return
false
;
}
private
void
Alarm
(
AlarmType
alarmType
)
{
this
.
alarmType
=
alarmType
;
if
(
AlarmType
.
SuddenStop
.
Equals
(
alarmType
))
{
WarnMsg
=
"收到急停信号"
;
WeldRobotBean
.
Alarm
(
AlarmType
.
SuddenStop
);
SendWireManager
.
Release
();
StopMove
();
}
}
}
}
}
}
DeviceLibrary/Robot/LineSolderingRobot_Partial.cs
deleted
100644 → 0
查看文件 @
dbf9a7a
using
URSoldering.Common
;
using
URSoldering.LoadCSVLibrary
;
using
System
;
namespace
URSoldering.DeviceLibrary
{
public
partial
class
URSolderingRobot
{
public
DateTime
LastStartWeldTime
=
DateTime
.
Now
;
public
DateTime
LastEndWeldTime
=
DateTime
.
Now
;
public
bool
IsWeld
=
false
;
public
delegate
void
GetCode
();
public
event
GetCode
GetCodeFun
;
public
bool
IsAutoRun
=
false
;
private
void
BusyProcess
()
{
if
(
LineStep
.
moveStep
.
Equals
(
MoveStep
.
BUSY01_Weld
))
{
if
(
WeldRobotBean
.
IsInWeld
.
Equals
(
false
))
{
LastEndWeldTime
=
DateTime
.
Now
;
TimeSpan
span
=
LastEndWeldTime
-
LastStartWeldTime
;
if
(
BoardManager
.
CurrBoard
.
WeldTime
.
TotalSeconds
<=
0
)
{
BoardManager
.
CurrBoard
.
WeldTime
=
span
;
}
else
{
BoardManager
.
CurrBoard
.
WeldTime
=
new
TimeSpan
(
0
,
0
,
(
int
)(
BoardManager
.
CurrBoard
.
WeldTime
.
TotalSeconds
+
span
.
TotalSeconds
)
/
2
);
}
BoardManager
.
Update
(
BoardManager
.
CurrBoard
);
LogUtil
.
info
(
"Busy处理:"
+
"焊接结束,焊接耗时"
+
FormUtil
.
GetSpanStr
(
span
)
+
",累积平均耗时"
+
FormUtil
.
GetSpanStr
(
BoardManager
.
CurrBoard
.
WeldTime
)
+
",阻挡气缸下降"
);
LineStep
.
EndMove
();
Status
=
RobotStatus
.
Runing
;
}
}
}
/// <summary>
/// 判断是否还有未完成的工作
/// </summary>
public
bool
NeedWork
()
{
if
(
Status
>
RobotStatus
.
Wait
)
{
if
(
WeldRobotBean
.
WeldMoveStep
.
moveType
.
Equals
(
MoveType
.
Weld
))
{
return
true
;
}
}
return
false
;
}
private
void
Alarm
(
AlarmType
alarmType
)
{
this
.
alarmType
=
alarmType
;
if
(
AlarmType
.
SuddenStop
.
Equals
(
alarmType
))
{
//KNDIOMove(IO_Type.AlarmSingle, IO_VALUE.HIGH);
WarnMsg
=
"收到急停信号"
;
WeldRobotBean
.
Alarm
(
AlarmType
.
SuddenStop
);
SendWireManager
.
Release
();
StopMove
();
}
}
}
}
DeviceLibrary/Robot/MoveType.cs
查看文件 @
76f9c75
...
@@ -73,7 +73,7 @@ namespace URSoldering.DeviceLibrary
...
@@ -73,7 +73,7 @@ namespace URSoldering.DeviceLibrary
}
}
else
if
(
WaitType
==
3
)
else
if
(
WaitType
==
3
)
{
{
return
"等待机器人运动结束"
;
return
"等待机器人运动结束"
+
UrPoint
.
ToShowStr
()
;
}
}
else
if
(
WaitType
==
4
)
else
if
(
WaitType
==
4
)
{
{
...
@@ -82,6 +82,9 @@ namespace URSoldering.DeviceLibrary
...
@@ -82,6 +82,9 @@ namespace URSoldering.DeviceLibrary
else
if
(
WaitType
==
5
)
else
if
(
WaitType
==
5
)
{
{
return
"等待送丝"
;
return
"等待送丝"
;
}
else
if
(
WaitType
==
6
)
{
return
"等待机器人连接完成"
;
}
}
else
else
{
{
...
...
DeviceLibrary/Robot/soldering/WeldRobotBean.cs
查看文件 @
76f9c75
...
@@ -73,7 +73,7 @@ namespace URSoldering.DeviceLibrary
...
@@ -73,7 +73,7 @@ namespace URSoldering.DeviceLibrary
RobotMax
=
LoadPoint
(
Setting_Init
.
Soldering_RobotMax
);
RobotMax
=
LoadPoint
(
Setting_Init
.
Soldering_RobotMax
);
}
}
private
static
URPointValue
LoadPoint
(
string
configStr
)
private
static
URPointValue
LoadPoint
(
string
configStr
)
{
{
URPointValue
p
=
new
URPointValue
();
URPointValue
p
=
new
URPointValue
();
string
configP
=
ConfigAppSettings
.
GetValue
(
configStr
);
string
configP
=
ConfigAppSettings
.
GetValue
(
configStr
);
...
@@ -118,12 +118,11 @@ namespace URSoldering.DeviceLibrary
...
@@ -118,12 +118,11 @@ namespace URSoldering.DeviceLibrary
{
{
if
(!
URRobotControl
.
IsRun
)
if
(!
URRobotControl
.
IsRun
)
{
{
//URRobotControl.InitEpson();
Task
.
Factory
.
StartNew
(
delegate
()
Task
.
Factory
.
StartNew
(
delegate
()
{
{
bool
result
=
URRobotControl
.
StartRobot
();
bool
result
=
URRobotControl
.
StartRobot
();
if
(!
result
)
if
(!
result
)
{
{
WarnMsg
=
"连接UR机器人失败"
;
WarnMsg
=
"连接UR机器人失败"
;
}
}
...
@@ -155,12 +154,22 @@ namespace URSoldering.DeviceLibrary
...
@@ -155,12 +154,22 @@ namespace URSoldering.DeviceLibrary
{
{
ResetInit
();
ResetInit
();
}
}
Thread
.
Sleep
(
1000
);
//Thread.Sleep(1000);
if
(!
URRobotControl
.
IsRun
)
//if (!URRobotControl.IsRun)
//{
// Thread.Sleep(2000);
//}
if
(!
URRobotControl
.
PointIsValid
(
HomePoint
))
{
{
Thread
.
Sleep
(
2000
);
LogUtil
.
info
(
RobotName
+
"开始启动失败:原点坐标无效"
);
return
"原点坐标无效"
;
}
if
((!
URRobotControl
.
PointIsValid
(
Clear1Point
))
||
(!
URRobotControl
.
PointIsValid
(
Clear2Point
)))
{
LogUtil
.
info
(
RobotName
+
"开始启动失败:清洗点坐标无效"
);
return
"清洗点坐标无效"
;
}
}
if
(
HasSoldering
)
if
(
HasSoldering
)
{
{
if
(!
SolderingManager
.
IsRun
)
if
(!
SolderingManager
.
IsRun
)
...
@@ -168,12 +177,13 @@ namespace URSoldering.DeviceLibrary
...
@@ -168,12 +177,13 @@ namespace URSoldering.DeviceLibrary
LogUtil
.
info
(
RobotName
+
"开始启动:烙铁没有连接上"
);
LogUtil
.
info
(
RobotName
+
"开始启动:烙铁没有连接上"
);
return
"烙铁没有连接上!"
;
return
"烙铁没有连接上!"
;
}
}
}
if
(!
SendWireManager
.
IsRun
)
if
(!
SendWireManager
.
IsRun
)
{
{
LogUtil
.
info
(
RobotName
+
"开始启动:JBC送丝器没有连接上"
);
LogUtil
.
info
(
RobotName
+
"开始启动:JBC送丝器没有连接上"
);
return
"JBC送丝器没有连接上!"
;
return
"JBC送丝器没有连接上!"
;
}
}
}
IsInSudden
=
false
;
IsInSudden
=
false
;
IsNoAir
=
false
;
IsNoAir
=
false
;
...
@@ -419,7 +429,7 @@ namespace URSoldering.DeviceLibrary
...
@@ -419,7 +429,7 @@ namespace URSoldering.DeviceLibrary
//添加验证,需要连续两次都是同一个值才算有效,跳过不稳定的错误
//添加验证,需要连续两次都是同一个值才算有效,跳过不稳定的错误
if
(!
ErrorCode
.
Equals
(
preSolderingRet
))
if
(!
ErrorCode
.
Equals
(
preSolderingRet
))
{
{
LOGGER
.
Info
(
RobotName
+
"烙铁PortError更改,本次读取的值:"
+
ErrorCode
+
",上次的值:"
+
preSolderingRet
+
""
);
LOGGER
.
Info
(
RobotName
+
"烙铁PortError更改,本次读取的值:"
+
ErrorCode
+
",上次的值:"
+
preSolderingRet
+
""
);
preSolderingRet
=
ErrorCode
;
preSolderingRet
=
ErrorCode
;
}
}
if
(
ErrorCode
>
0
)
if
(
ErrorCode
>
0
)
...
@@ -437,7 +447,7 @@ namespace URSoldering.DeviceLibrary
...
@@ -437,7 +447,7 @@ namespace URSoldering.DeviceLibrary
alarmType
=
AlarmType
.
None
;
alarmType
=
AlarmType
.
None
;
WarnMsg
=
""
;
WarnMsg
=
""
;
LogUtil
.
error
(
RobotName
+
"消除烙铁报警!"
);
LogUtil
.
error
(
RobotName
+
"消除烙铁报警!"
);
}
}
}
}
}
}
...
@@ -485,7 +495,7 @@ namespace URSoldering.DeviceLibrary
...
@@ -485,7 +495,7 @@ namespace URSoldering.DeviceLibrary
if
(
alarmType
.
Equals
(
AlarmType
.
IoSingleTimeOut
))
if
(
alarmType
.
Equals
(
AlarmType
.
IoSingleTimeOut
))
{
{
}
}
else
if
(
alarmType
.
Equals
(
AlarmType
.
SuddenStop
)
||
alarmType
.
Equals
(
AlarmType
.
NoAirCheck
)
||
alarm
.
Equals
(
AlarmType
.
RobotError
))
else
if
(
alarmType
.
Equals
(
AlarmType
.
SuddenStop
)
||
alarmType
.
Equals
(
AlarmType
.
NoAirCheck
)
||
alarm
.
Equals
(
AlarmType
.
RobotError
))
{
{
if
(
alarmType
.
Equals
(
AlarmType
.
SuddenStop
))
if
(
alarmType
.
Equals
(
AlarmType
.
SuddenStop
))
{
{
...
@@ -531,17 +541,7 @@ namespace URSoldering.DeviceLibrary
...
@@ -531,17 +541,7 @@ namespace URSoldering.DeviceLibrary
if
(
WeldMoveStep
.
moveStep
.
Equals
(
MoveStep
.
Home_Reset
))
if
(
WeldMoveStep
.
moveStep
.
Equals
(
MoveStep
.
Home_Reset
))
{
{
WeldMoveStep
.
NextMoveStep
(
MoveStep
.
Home_1_RobotMove
);
WeldMoveStep
.
NextMoveStep
(
MoveStep
.
Home_1_RobotMove
);
//验证位置
TimeSpan
span
=
URRobotControl
.
GetLastPosition
().
UpdateTime
-
DateTime
.
Now
;
;
if
(
span
.
TotalSeconds
<=
60
&&
(
URRobotControl
.
GetLastPosition
().
Y
!=
0
)
&&
(
URRobotControl
.
GetLastPosition
().
X
!=
0
))
{
string
msg
=
CheckEpsonPoint
(
URRobotControl
.
GetLastPosition
());
if
(!
msg
.
Equals
(
""
))
{
WarnMsg
=
msg
;
return
;
}
}
if
(
IsFirstStart
)
if
(
IsFirstStart
)
{
{
if
(
BoardManager
.
CurrBoard
!=
null
&&
BoardManager
.
CurrBoard
.
pointList
.
Count
>
0
)
if
(
BoardManager
.
CurrBoard
!=
null
&&
BoardManager
.
CurrBoard
.
pointList
.
Count
>
0
)
...
@@ -551,10 +551,8 @@ namespace URSoldering.DeviceLibrary
...
@@ -551,10 +551,8 @@ namespace URSoldering.DeviceLibrary
int
maxTemp
=
BoardManager
.
CurrBoard
.
pointList
[
0
].
preheatTemperatureMax
;
int
maxTemp
=
BoardManager
.
CurrBoard
.
pointList
[
0
].
preheatTemperatureMax
;
int
minTemp
=
BoardManager
.
CurrBoard
.
pointList
[
0
].
preheatTemperatureMin
;
int
minTemp
=
BoardManager
.
CurrBoard
.
pointList
[
0
].
preheatTemperatureMin
;
SolderingManager
.
setTemp
(
temp
.
ToString
());
SolderingManager
.
setTemp
(
temp
.
ToString
());
//等待温度到达,并达到指定时间
WeldLog
(
"设置烙铁温度"
+
temp
+
""
);
WeldLog
(
"设置烙铁温度"
+
temp
+
""
);
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTemperature
(
temp
,
maxTemp
,
minTemp
));
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTemperature
(
temp
,
maxTemp
,
minTemp
));
//WeldMoveStep.WaitList.Add(WaitResultInfo.WaitTime(time));
}
}
}
}
MoveToOrg
();
MoveToOrg
();
...
@@ -596,7 +594,7 @@ namespace URSoldering.DeviceLibrary
...
@@ -596,7 +594,7 @@ namespace URSoldering.DeviceLibrary
{
{
SendWireWork
(
true
);
SendWireWork
(
true
);
SolderingDown
(
true
);
SolderingDown
(
true
);
URPointValue
point
=
new
URPointValue
(
p
.
RobotX
,
p
.
RoobtY
,
p
.
RobotZ
,
p
.
RobotRX
,
p
.
RobotRY
,
p
.
RobotRZ
);
URPointValue
point
=
p
.
GetURPoint
(
);
WeldLog
(
"移动到焊点【"
+
WeldMoveStep
.
CurrPoint
.
pointName
+
"】:"
+
point
.
ToShowStr
());
WeldLog
(
"移动到焊点【"
+
WeldMoveStep
.
CurrPoint
.
pointName
+
"】:"
+
point
.
ToShowStr
());
URRobotControl
.
MoveTo
(
point
,
isHighSpeed
);
URRobotControl
.
MoveTo
(
point
,
isHighSpeed
);
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitRobotPoint
(
point
));
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitRobotPoint
(
point
));
...
@@ -605,35 +603,27 @@ namespace URSoldering.DeviceLibrary
...
@@ -605,35 +603,27 @@ namespace URSoldering.DeviceLibrary
{
{
SolderingUp
(
true
);
SolderingUp
(
true
);
SendWireWork
(
true
);
SendWireWork
(
true
);
if
(
HomePoint
.
X
!=
0
&&
HomePoint
.
Y
!=
0
&&
HomePoint
.
Z
!=
0
)
{
WeldLog
(
"送丝上升,机械臂走到待机点 "
);
WeldLog
(
"送丝上升,机械臂走到待机点 "
);
URRobotControl
.
MoveTo
(
HomePoint
,
isHighSpeed
);
URRobotControl
.
MoveTo
(
HomePoint
,
isHighSpeed
);
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitRobotPoint
(
HomePoint
));
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitRobotPoint
(
HomePoint
));
}
}
}
private
static
void
SendWireUpToClear1
()
private
static
void
SendWireUpToClear1
()
{
{
SolderingUp
(
true
);
SolderingUp
(
true
);
SendWireClear
(
true
);
SendWireClear
(
true
);
Thread
.
Sleep
(
100
);
Thread
.
Sleep
(
100
);
WeldCount
=
0
;
WeldCount
=
0
;
if
(
Clear1Point
.
X
!=
0
&&
Clear1Point
.
Y
!=
0
&&
Clear1Point
.
Z
!=
0
)
{
WeldLog
(
"送丝上升,打开清洗装置,机械臂走到清洗点1 "
);
WeldLog
(
"送丝上升,打开清洗装置,机械臂走到清洗点1 "
);
URRobotControl
.
MoveTo
(
Clear1Point
,
isHighSpeed
);
URRobotControl
.
MoveTo
(
Clear1Point
,
isHighSpeed
);
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitRobotPoint
(
Clear1Point
));
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitRobotPoint
(
Clear1Point
));
}
}
}
private
static
void
MoveToClear2
(
int
mSenconds
)
private
static
void
MoveToClear2
(
int
mSenconds
)
{
{
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
mSenconds
));
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
mSenconds
));
if
(
Clear2Point
.
X
!=
0
&&
Clear2Point
.
Y
!=
0
&&
Clear2Point
.
Z
!=
0
)
{
WeldLog
(
"机械臂走到清洗点2 ,打开清洗装置,清洗时间:"
+
mSenconds
+
" "
);
WeldLog
(
"机械臂走到清洗点2 ,打开清洗装置,清洗时间:"
+
mSenconds
+
" "
);
URRobotControl
.
MoveTo
(
Clear2Point
,
isHighSpeed
);
URRobotControl
.
MoveTo
(
Clear2Point
,
isHighSpeed
);
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitRobotPoint
(
Clear1Point
));
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitRobotPoint
(
Clear2Point
));
}
}
}
//更新原点
//更新原点
public
static
void
UpdateOrgPoint
(
URPointValue
point
)
public
static
void
UpdateOrgPoint
(
URPointValue
point
)
...
@@ -642,21 +632,18 @@ namespace URSoldering.DeviceLibrary
...
@@ -642,21 +632,18 @@ namespace URSoldering.DeviceLibrary
string
str
=
point
.
ToJosonStr
();
string
str
=
point
.
ToJosonStr
();
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
Soldering_HomePoint
,
str
);
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
Soldering_HomePoint
,
str
);
}
}
public
static
void
UpdateClear1Point
(
URPointValue
point
)
public
static
void
UpdateClear1Point
(
URPointValue
point
)
{
{
WeldRobotBean
.
Clear1Point
=
point
;
WeldRobotBean
.
Clear1Point
=
point
;
string
str
=
point
.
ToJosonStr
();
string
str
=
point
.
ToJosonStr
();
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
Soldering_Clear1Point
,
str
);
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
Soldering_Clear1Point
,
str
);
}
}
public
static
void
UpdateClear2Point
(
URPointValue
point
)
public
static
void
UpdateClear2Point
(
URPointValue
point
)
{
{
WeldRobotBean
.
Clear2Point
=
point
;
WeldRobotBean
.
Clear2Point
=
point
;
string
str
=
point
.
ToJosonStr
();
string
str
=
point
.
ToJosonStr
();
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
Soldering_Clear2Point
,
str
);
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
Soldering_Clear2Point
,
str
);
}
}
/// <summary>
/// <summary>
/// 验证机器人是否超出活动范围
/// 验证机器人是否超出活动范围
/// </summary>
/// </summary>
...
@@ -664,34 +651,6 @@ namespace URSoldering.DeviceLibrary
...
@@ -664,34 +651,6 @@ namespace URSoldering.DeviceLibrary
/// <returns></returns>
/// <returns></returns>
public
static
string
CheckEpsonPoint
(
URPointValue
point
)
public
static
string
CheckEpsonPoint
(
URPointValue
point
)
{
{
//if (EpsonXMin < EpsonXMax)
//{
// if (point.X < EpsonXMin || point.X > EpsonXMax)
// {
// return "机械臂X轴超出活动范围";
// }
//}
//if (EpsonYMin < EpsonYMax)
//{
// if (point.Y < EpsonYMin || point.Y > EpsonYMax)
// {
// return "机械臂Y轴超出活动范围";
// }
//}
//if (EpsonZMin < EpsonZMax)
//{
// if (point.Z < EpsonZMin || point.Z > EpsonZMax)
// {
// return "机械臂Z轴超出活动范围";
// }
//}
//if (EpsonUMin < EpsonUMax)
//{
// if (point.U < EpsonUMin || point.U > EpsonUMax)
// {
// return "机械臂U轴超出活动范围";
// }
//}
return
""
;
return
""
;
}
}
}
}
...
...
DeviceLibrary/Robot/soldering/WeldRobotBean_Partial.cs
查看文件 @
76f9c75
...
@@ -39,6 +39,7 @@ namespace URSoldering.DeviceLibrary
...
@@ -39,6 +39,7 @@ namespace URSoldering.DeviceLibrary
{
{
return
"没有找到电路板信息,无法开始焊接"
;
return
"没有找到电路板信息,无法开始焊接"
;
}
}
//记录焊接板子数量
//记录焊接板子数量
WeldCount
++;
WeldCount
++;
...
@@ -68,19 +69,7 @@ namespace URSoldering.DeviceLibrary
...
@@ -68,19 +69,7 @@ namespace URSoldering.DeviceLibrary
}
}
else
if
(
WeldMoveStep
.
moveStep
.
Equals
(
MoveStep
.
W01_RobotMoveToPoint
))
else
if
(
WeldMoveStep
.
moveStep
.
Equals
(
MoveStep
.
W01_RobotMoveToPoint
))
{
{
if
(
WeldMoveStep
.
IsFirstPoint
())
{
for
(
int
i
=
0
;
i
<
5
;
i
++)
{
GetCodeFun
?.
Invoke
();
if
(
RobotManager
.
SolderingRobot
.
WareCode
.
Equals
(
""
))
{
Thread
.
Sleep
(
100
);
}
else
{
break
;
}
}
}
if
(
WeldMoveStep
.
IsSlowSendWire
)
if
(
WeldMoveStep
.
IsSlowSendWire
)
{
{
//已经慢速送丝
//已经慢速送丝
...
@@ -172,8 +161,8 @@ namespace URSoldering.DeviceLibrary
...
@@ -172,8 +161,8 @@ namespace URSoldering.DeviceLibrary
}
}
else
if
(
WeldMoveStep
.
moveStep
.
Equals
(
MoveStep
.
W14_AOICheck
))
else
if
(
WeldMoveStep
.
moveStep
.
Equals
(
MoveStep
.
W14_AOICheck
))
{
{
AOICheckFun
.
Invoke
();
//
AOICheckFun.Invoke();
Thread
.
Sleep
(
300
);
//
Thread.Sleep(300);
IsInWeld
=
false
;
IsInWeld
=
false
;
if
(
WeldCount
>=
RobotConfig
.
ClearCount
)
if
(
WeldCount
>=
RobotConfig
.
ClearCount
)
{
{
...
@@ -342,6 +331,11 @@ namespace URSoldering.DeviceLibrary
...
@@ -342,6 +331,11 @@ namespace URSoldering.DeviceLibrary
}
}
public
static
void
SolderingUp
(
bool
isWait
)
public
static
void
SolderingUp
(
bool
isWait
)
{
{
if
(
RobotBean
.
KNDIOValue
(
IO_Type
.
Soldering_Down
).
Equals
(
IO_VALUE
.
LOW
)
&&
RobotBean
.
KNDIOValue
(
IO_Type
.
Soldering_Up
).
Equals
(
IO_VALUE
.
HIGH
))
{
return
;
}
RobotBean
.
KNDIOMove
(
IO_Type
.
Soldering_Down
,
IO_VALUE
.
LOW
);
RobotBean
.
KNDIOMove
(
IO_Type
.
Soldering_Down
,
IO_VALUE
.
LOW
);
RobotBean
.
KNDIOMove
(
IO_Type
.
Soldering_Up
,
IO_VALUE
.
HIGH
);
RobotBean
.
KNDIOMove
(
IO_Type
.
Soldering_Up
,
IO_VALUE
.
HIGH
);
if
(
isWait
)
if
(
isWait
)
...
@@ -353,6 +347,11 @@ namespace URSoldering.DeviceLibrary
...
@@ -353,6 +347,11 @@ namespace URSoldering.DeviceLibrary
public
static
void
SendWireWork
(
bool
isWait
)
public
static
void
SendWireWork
(
bool
isWait
)
{
{
if
(
RobotBean
.
KNDIOValue
(
IO_Type
.
SendWire_Clear
).
Equals
(
IO_VALUE
.
LOW
)
&&
RobotBean
.
KNDIOValue
(
IO_Type
.
SendWire_Work
).
Equals
(
IO_VALUE
.
HIGH
))
{
return
;
}
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Clear
,
IO_VALUE
.
LOW
);
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Clear
,
IO_VALUE
.
LOW
);
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Work
,
IO_VALUE
.
HIGH
);
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Work
,
IO_VALUE
.
HIGH
);
if
(
isWait
)
if
(
isWait
)
...
@@ -363,12 +362,17 @@ namespace URSoldering.DeviceLibrary
...
@@ -363,12 +362,17 @@ namespace URSoldering.DeviceLibrary
}
}
public
static
void
SendWireClear
(
bool
isWait
)
public
static
void
SendWireClear
(
bool
isWait
)
{
{
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Clear
,
IO_VALUE
.
LOW
);
if
(
RobotBean
.
KNDIOValue
(
IO_Type
.
SendWire_Work
).
Equals
(
IO_VALUE
.
LOW
)
&&
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Work
,
IO_VALUE
.
HIGH
);
RobotBean
.
KNDIOValue
(
IO_Type
.
SendWire_Clear
).
Equals
(
IO_VALUE
.
HIGH
))
{
return
;
}
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Clear
,
IO_VALUE
.
HIGH
);
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Work
,
IO_VALUE
.
LOW
);
if
(
isWait
)
if
(
isWait
)
{
{
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SendWire_Clear
,
IO_VALUE
.
LOW
));
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SendWire_Clear
,
IO_VALUE
.
HIGH
));
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SendWire_Work
,
IO_VALUE
.
HIGH
));
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SendWire_Work
,
IO_VALUE
.
LOW
));
}
}
}
}
private
static
DateTime
preGetStatusTime
=
DateTime
.
Now
;
private
static
DateTime
preGetStatusTime
=
DateTime
.
Now
;
...
...
DeviceLibrary/Robot/soldering/WeldStepBean.cs
查看文件 @
76f9c75
...
@@ -113,6 +113,13 @@ namespace URSoldering.DeviceLibrary
...
@@ -113,6 +113,13 @@ namespace URSoldering.DeviceLibrary
{
{
return
false
;
return
false
;
}
}
foreach
(
WeldPointInfo
p
in
weldPointList
)
{
if
(!
URRobotControl
.
PointIsValid
(
p
.
GetURPoint
()))
{
return
false
;
}
}
CurrPoint
=
weldPointList
[
CurrPointIndex
];
CurrPoint
=
weldPointList
[
CurrPointIndex
];
PointTime
=
new
PointWeldTime
();
PointTime
=
new
PointWeldTime
();
ResetCount
=
0
;
ResetCount
=
0
;
...
...
DeviceLibrary/RobotConfig/solderingConfig/SolderingRobotConfig.csv
查看文件 @
76f9c75
...
@@ -33,7 +33,7 @@ DO,送丝电机启动,SendWireStart,106,192.168.10.11,0,送丝电机启动,Y07,DO-07,0
...
@@ -33,7 +33,7 @@ DO,送丝电机启动,SendWireStart,106,192.168.10.11,0,送丝电机启动,Y07,DO-07,0
,故障指示灯(红色),AlarmSingle,115,192.168.10.11,0,故障指示灯(红色),Y16,DO-16,0
,故障指示灯(红色),AlarmSingle,115,192.168.10.11,0,故障指示灯(红色),Y16,DO-16,0
,,,,,,,,,
,,,,,,,,,
PRO,尤傲机器人IP,UR_IP,192.168.10.13,,,,,,
PRO,尤傲机器人IP,UR_IP,192.168.10.13,,,,,,
PRO,焊接多少块板子后,清洗烙铁,ClearCount,1,,,,,,
PRO,焊接多少块板子后,清洗烙铁,ClearCount,1
0
,,,,,,
PRO,清洗IO的毫秒数,ClearMSenconds,3000,,,,,,
PRO,清洗IO的毫秒数,ClearMSenconds,3000,,,,,,
PRO,JBC烙铁端口号,JBC_Soldering_Port,COM2,,,,,,
PRO,JBC烙铁端口号,JBC_Soldering_Port,COM2,,,,,,
PRO,JBC烙铁编号,JBC_Soldering_Num,1,,,,,,
PRO,JBC烙铁编号,JBC_Soldering_Num,1,,,,,,
...
...
DeviceLibrary/bean/BoardInfo.cs
查看文件 @
76f9c75
...
@@ -255,5 +255,11 @@ namespace URSoldering.DeviceLibrary
...
@@ -255,5 +255,11 @@ namespace URSoldering.DeviceLibrary
/// </summary>
/// </summary>
public
int
ClearTime
{
get
;
set
;
}
public
int
ClearTime
{
get
;
set
;
}
public
URPointValue
GetURPoint
()
{
URPointValue
p
=
new
URPointValue
(
RobotX
,
RoobtY
,
RobotZ
,
RobotRX
,
RobotRY
,
RobotRZ
);
return
p
;
}
}
}
}
}
DeviceLibrary/deviceLibrary/jbc/SolderingManager.cs
查看文件 @
76f9c75
...
@@ -178,7 +178,7 @@ namespace URSoldering.DeviceLibrary
...
@@ -178,7 +178,7 @@ namespace URSoldering.DeviceLibrary
}
}
else
else
{
{
LogUtil
.
info
(
"烙铁未初始化,调用了setTemp直接返回false"
);
LogUtil
.
debug
(
"烙铁未初始化,调用了setTemp直接返回false"
);
return
false
;
return
false
;
}
}
}
}
...
...
DeviceLibrary/deviceLibrary/urRobot/URRobotControl.cs
查看文件 @
76f9c75
...
@@ -18,7 +18,7 @@ namespace URSoldering.DeviceLibrary
...
@@ -18,7 +18,7 @@ namespace URSoldering.DeviceLibrary
public
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
MethodBase
.
GetCurrentMethod
().
DeclaringType
);
public
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
MethodBase
.
GetCurrentMethod
().
DeclaringType
);
public
static
TcpClient
controlTcp
=
new
TcpClient
();
public
static
TcpClient
controlTcp
=
new
TcpClient
();
public
static
URPointValue
LastPoint
=
new
URPointValue
();
public
static
URPointValue
LastPoint
=
new
URPointValue
();
public
static
URPointValue
LastSendPoint
=
new
URPointValue
();
public
static
string
RobotIp
=
""
;
public
static
string
RobotIp
=
""
;
public
static
int
ControlPort
=
29999
;
public
static
int
ControlPort
=
29999
;
...
@@ -54,7 +54,7 @@ namespace URSoldering.DeviceLibrary
...
@@ -54,7 +54,7 @@ namespace URSoldering.DeviceLibrary
/// 上一次启动的时间,UR机械臂启动需要时间,默认需要3分钟,若三分钟后还没有链接,需要重新启动
/// 上一次启动的时间,UR机械臂启动需要时间,默认需要3分钟,若三分钟后还没有链接,需要重新启动
/// </summary>
/// </summary>
private
static
DateTime
PreStartTime
=
DateTime
.
Now
;
private
static
DateTime
PreStartTime
=
DateTime
.
Now
;
private
static
int
StartTimeOutSeconds
=
1
0000
;
private
static
int
StartTimeOutSeconds
=
2
0000
;
public
static
string
WarnMsg
=
""
;
public
static
string
WarnMsg
=
""
;
private
static
System
.
Timers
.
Timer
reconnectTimer
=
null
;
private
static
System
.
Timers
.
Timer
reconnectTimer
=
null
;
...
@@ -452,8 +452,22 @@ namespace URSoldering.DeviceLibrary
...
@@ -452,8 +452,22 @@ namespace URSoldering.DeviceLibrary
public
static
void
LockAxis
()
public
static
void
LockAxis
()
{
{
}
}
public
static
bool
PointIsValid
(
URPointValue
point
)
{
if
(
point
.
X
!=
0
&&
point
.
Y
!=
0
&&
point
.
Z
!=
0
)
{
return
true
;
}
return
false
;
}
public
static
void
MoveTo
(
URPointValue
point
,
bool
isHigh
)
public
static
void
MoveTo
(
URPointValue
point
,
bool
isHigh
)
{
{
if
(!
PointIsValid
(
point
))
{
LogUtil
.
info
(
LogName
+
"试图移动到:"
+
point
.
ToShowStr
()+
",此坐标无效,直接返回"
);
return
;
}
//movep(p[0.062, -0.030, 0.325, 0.0299, 2.2263, 2.2171], a = 1.2, v = 0.25, r = 0)
//movep(p[0.062, -0.030, 0.325, 0.0299, 2.2263, 2.2171], a = 1.2, v = 0.25, r = 0)
//movej([0, 1.57, -1.57, 3.14, -1.57, 1.57],a = 1.4, v = 1.05, t = 0, r = 0)
//movej([0, 1.57, -1.57, 3.14, -1.57, 1.57],a = 1.4, v = 1.05, t = 0, r = 0)
...
@@ -476,6 +490,7 @@ namespace URSoldering.DeviceLibrary
...
@@ -476,6 +490,7 @@ namespace URSoldering.DeviceLibrary
//LogUtil.info(LogName + "试图移动到:" + point.ToShowStr());
//LogUtil.info(LogName + "试图移动到:" + point.ToShowStr());
}
}
URRobotClient
.
LastMoveCMD
=
moveCmd
;
URRobotClient
.
LastMoveCMD
=
moveCmd
;
LastSendPoint
=
point
;
}
}
public
static
void
MoveTo
(
URPointValue
point
)
public
static
void
MoveTo
(
URPointValue
point
)
{
{
...
...
URSolderingClient/FrmBoardInfo.Designer.cs
查看文件 @
76f9c75
...
@@ -51,8 +51,6 @@
...
@@ -51,8 +51,6 @@
this
.
dataGridViewImageColumn2
=
new
System
.
Windows
.
Forms
.
DataGridViewImageColumn
();
this
.
dataGridViewImageColumn2
=
new
System
.
Windows
.
Forms
.
DataGridViewImageColumn
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
panPoint
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
panPoint
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
panVideo
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
hWVideo
=
new
HalconDotNet
.
HWindowControl
();
this
.
panBoard
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
panBoard
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
picBoard
=
new
System
.
Windows
.
Forms
.
PictureBox
();
this
.
picBoard
=
new
System
.
Windows
.
Forms
.
PictureBox
();
this
.
gbOriginInfo
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
gbOriginInfo
=
new
System
.
Windows
.
Forms
.
GroupBox
();
...
@@ -154,7 +152,6 @@
...
@@ -154,7 +152,6 @@
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
picZAdd
)).
BeginInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
picZAdd
)).
BeginInit
();
this
.
contextMenuStrip2
.
SuspendLayout
();
this
.
contextMenuStrip2
.
SuspendLayout
();
this
.
panel1
.
SuspendLayout
();
this
.
panel1
.
SuspendLayout
();
this
.
panVideo
.
SuspendLayout
();
this
.
panBoard
.
SuspendLayout
();
this
.
panBoard
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
picBoard
)).
BeginInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
picBoard
)).
BeginInit
();
this
.
gbOriginInfo
.
SuspendLayout
();
this
.
gbOriginInfo
.
SuspendLayout
();
...
@@ -335,7 +332,6 @@
...
@@ -335,7 +332,6 @@
//
//
this
.
panel1
.
AutoScroll
=
true
;
this
.
panel1
.
AutoScroll
=
true
;
this
.
panel1
.
Controls
.
Add
(
this
.
panPoint
);
this
.
panel1
.
Controls
.
Add
(
this
.
panPoint
);
this
.
panel1
.
Controls
.
Add
(
this
.
panVideo
);
this
.
panel1
.
Controls
.
Add
(
this
.
panBoard
);
this
.
panel1
.
Controls
.
Add
(
this
.
panBoard
);
this
.
panel1
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
panel1
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
panel1
.
Controls
.
Add
(
this
.
label25
);
this
.
panel1
.
Controls
.
Add
(
this
.
label25
);
...
@@ -362,31 +358,6 @@
...
@@ -362,31 +358,6 @@
this
.
panPoint
.
Size
=
new
System
.
Drawing
.
Size
(
869
,
267
);
this
.
panPoint
.
Size
=
new
System
.
Drawing
.
Size
(
869
,
267
);
this
.
panPoint
.
TabIndex
=
321
;
this
.
panPoint
.
TabIndex
=
321
;
//
//
// panVideo
//
this
.
panVideo
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
panVideo
.
Controls
.
Add
(
this
.
hWVideo
);
this
.
panVideo
.
Location
=
new
System
.
Drawing
.
Point
(
898
,
202
);
this
.
panVideo
.
Name
=
"panVideo"
;
this
.
panVideo
.
Size
=
new
System
.
Drawing
.
Size
(
485
,
424
);
this
.
panVideo
.
TabIndex
=
320
;
//
// hWVideo
//
this
.
hWVideo
.
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
.
hWVideo
.
BackColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
hWVideo
.
BorderColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
hWVideo
.
ImagePart
=
new
System
.
Drawing
.
Rectangle
(
0
,
0
,
640
,
480
);
this
.
hWVideo
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
hWVideo
.
MaximumSize
=
new
System
.
Drawing
.
Size
(
800
,
500
);
this
.
hWVideo
.
Name
=
"hWVideo"
;
this
.
hWVideo
.
Size
=
new
System
.
Drawing
.
Size
(
479
,
418
);
this
.
hWVideo
.
TabIndex
=
319
;
this
.
hWVideo
.
WindowSize
=
new
System
.
Drawing
.
Size
(
479
,
418
);
//
// panBoard
// panBoard
//
//
this
.
panBoard
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
this
.
panBoard
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
...
@@ -394,9 +365,9 @@
...
@@ -394,9 +365,9 @@
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
panBoard
.
Controls
.
Add
(
this
.
picBoard
);
this
.
panBoard
.
Controls
.
Add
(
this
.
picBoard
);
this
.
panBoard
.
Controls
.
Add
(
this
.
gbOriginInfo
);
this
.
panBoard
.
Controls
.
Add
(
this
.
gbOriginInfo
);
this
.
panBoard
.
Location
=
new
System
.
Drawing
.
Point
(
89
9
,
19
);
this
.
panBoard
.
Location
=
new
System
.
Drawing
.
Point
(
89
8
,
78
);
this
.
panBoard
.
Name
=
"panBoard"
;
this
.
panBoard
.
Name
=
"panBoard"
;
this
.
panBoard
.
Size
=
new
System
.
Drawing
.
Size
(
482
,
136
);
this
.
panBoard
.
Size
=
new
System
.
Drawing
.
Size
(
482
,
553
);
this
.
panBoard
.
TabIndex
=
261
;
this
.
panBoard
.
TabIndex
=
261
;
//
//
// picBoard
// picBoard
...
@@ -407,7 +378,7 @@
...
@@ -407,7 +378,7 @@
this
.
picBoard
.
Cursor
=
System
.
Windows
.
Forms
.
Cursors
.
Cross
;
this
.
picBoard
.
Cursor
=
System
.
Windows
.
Forms
.
Cursors
.
Cross
;
this
.
picBoard
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
picBoard
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
picBoard
.
Name
=
"picBoard"
;
this
.
picBoard
.
Name
=
"picBoard"
;
this
.
picBoard
.
Size
=
new
System
.
Drawing
.
Size
(
463
,
76
);
this
.
picBoard
.
Size
=
new
System
.
Drawing
.
Size
(
463
,
493
);
this
.
picBoard
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
StretchImage
;
this
.
picBoard
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
StretchImage
;
this
.
picBoard
.
TabIndex
=
259
;
this
.
picBoard
.
TabIndex
=
259
;
this
.
picBoard
.
TabStop
=
false
;
this
.
picBoard
.
TabStop
=
false
;
...
@@ -904,7 +875,7 @@
...
@@ -904,7 +875,7 @@
//
//
this
.
label25
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
label25
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
label25
.
AutoSize
=
true
;
this
.
label25
.
AutoSize
=
true
;
this
.
label25
.
Location
=
new
System
.
Drawing
.
Point
(
11
31
,
17
0
);
this
.
label25
.
Location
=
new
System
.
Drawing
.
Point
(
11
45
,
4
0
);
this
.
label25
.
Name
=
"label25"
;
this
.
label25
.
Name
=
"label25"
;
this
.
label25
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
17
);
this
.
label25
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
17
);
this
.
label25
.
TabIndex
=
37
;
this
.
label25
.
TabIndex
=
37
;
...
@@ -914,7 +885,7 @@
...
@@ -914,7 +885,7 @@
//
//
this
.
label24
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
label24
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
label24
.
AutoSize
=
true
;
this
.
label24
.
AutoSize
=
true
;
this
.
label24
.
Location
=
new
System
.
Drawing
.
Point
(
10
01
,
17
0
);
this
.
label24
.
Location
=
new
System
.
Drawing
.
Point
(
10
15
,
4
0
);
this
.
label24
.
Name
=
"label24"
;
this
.
label24
.
Name
=
"label24"
;
this
.
label24
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
17
);
this
.
label24
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
17
);
this
.
label24
.
TabIndex
=
36
;
this
.
label24
.
TabIndex
=
36
;
...
@@ -1237,7 +1208,7 @@
...
@@ -1237,7 +1208,7 @@
// txtBoardLength
// txtBoardLength
//
//
this
.
txtBoardLength
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
txtBoardLength
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
txtBoardLength
.
Location
=
new
System
.
Drawing
.
Point
(
9
43
,
16
7
);
this
.
txtBoardLength
.
Location
=
new
System
.
Drawing
.
Point
(
9
57
,
3
7
);
this
.
txtBoardLength
.
MaxLength
=
8
;
this
.
txtBoardLength
.
MaxLength
=
8
;
this
.
txtBoardLength
.
Name
=
"txtBoardLength"
;
this
.
txtBoardLength
.
Name
=
"txtBoardLength"
;
this
.
txtBoardLength
.
Size
=
new
System
.
Drawing
.
Size
(
53
,
23
);
this
.
txtBoardLength
.
Size
=
new
System
.
Drawing
.
Size
(
53
,
23
);
...
@@ -1327,7 +1298,7 @@
...
@@ -1327,7 +1298,7 @@
// txtBoardWidth
// txtBoardWidth
//
//
this
.
txtBoardWidth
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
txtBoardWidth
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
txtBoardWidth
.
Location
=
new
System
.
Drawing
.
Point
(
10
73
,
16
7
);
this
.
txtBoardWidth
.
Location
=
new
System
.
Drawing
.
Point
(
10
87
,
3
7
);
this
.
txtBoardWidth
.
MaxLength
=
8
;
this
.
txtBoardWidth
.
MaxLength
=
8
;
this
.
txtBoardWidth
.
Name
=
"txtBoardWidth"
;
this
.
txtBoardWidth
.
Name
=
"txtBoardWidth"
;
this
.
txtBoardWidth
.
Size
=
new
System
.
Drawing
.
Size
(
53
,
23
);
this
.
txtBoardWidth
.
Size
=
new
System
.
Drawing
.
Size
(
53
,
23
);
...
@@ -1338,7 +1309,7 @@
...
@@ -1338,7 +1309,7 @@
//
//
this
.
label3
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
label3
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
label3
.
AutoSize
=
true
;
this
.
label3
.
AutoSize
=
true
;
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
9
17
,
17
0
);
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
9
31
,
4
0
);
this
.
label3
.
Name
=
"label3"
;
this
.
label3
.
Name
=
"label3"
;
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
20
,
17
);
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
20
,
17
);
this
.
label3
.
TabIndex
=
3
;
this
.
label3
.
TabIndex
=
3
;
...
@@ -1348,7 +1319,7 @@
...
@@ -1348,7 +1319,7 @@
//
//
this
.
label4
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
label4
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
label4
.
AutoSize
=
true
;
this
.
label4
.
AutoSize
=
true
;
this
.
label4
.
Location
=
new
System
.
Drawing
.
Point
(
10
51
,
17
0
);
this
.
label4
.
Location
=
new
System
.
Drawing
.
Point
(
10
65
,
4
0
);
this
.
label4
.
Name
=
"label4"
;
this
.
label4
.
Name
=
"label4"
;
this
.
label4
.
Size
=
new
System
.
Drawing
.
Size
(
20
,
17
);
this
.
label4
.
Size
=
new
System
.
Drawing
.
Size
(
20
,
17
);
this
.
label4
.
TabIndex
=
5
;
this
.
label4
.
TabIndex
=
5
;
...
@@ -1359,7 +1330,7 @@
...
@@ -1359,7 +1330,7 @@
this
.
btnOpenFile
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
btnOpenFile
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
btnOpenFile
.
FlatAppearance
.
BorderSize
=
0
;
this
.
btnOpenFile
.
FlatAppearance
.
BorderSize
=
0
;
this
.
btnOpenFile
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnOpenFile
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnOpenFile
.
Location
=
new
System
.
Drawing
.
Point
(
11
82
,
16
1
);
this
.
btnOpenFile
.
Location
=
new
System
.
Drawing
.
Point
(
11
96
,
3
1
);
this
.
btnOpenFile
.
Name
=
"btnOpenFile"
;
this
.
btnOpenFile
.
Name
=
"btnOpenFile"
;
this
.
btnOpenFile
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
35
);
this
.
btnOpenFile
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
35
);
this
.
btnOpenFile
.
TabIndex
=
260
;
this
.
btnOpenFile
.
TabIndex
=
260
;
...
@@ -1426,7 +1397,6 @@
...
@@ -1426,7 +1397,6 @@
this
.
contextMenuStrip2
.
ResumeLayout
(
false
);
this
.
contextMenuStrip2
.
ResumeLayout
(
false
);
this
.
panel1
.
ResumeLayout
(
false
);
this
.
panel1
.
ResumeLayout
(
false
);
this
.
panel1
.
PerformLayout
();
this
.
panel1
.
PerformLayout
();
this
.
panVideo
.
ResumeLayout
(
false
);
this
.
panBoard
.
ResumeLayout
(
false
);
this
.
panBoard
.
ResumeLayout
(
false
);
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
picBoard
)).
EndInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
picBoard
)).
EndInit
();
this
.
gbOriginInfo
.
ResumeLayout
(
false
);
this
.
gbOriginInfo
.
ResumeLayout
(
false
);
...
@@ -1503,8 +1473,6 @@
...
@@ -1503,8 +1473,6 @@
private
System
.
Windows
.
Forms
.
Label
lblSpeed
;
private
System
.
Windows
.
Forms
.
Label
lblSpeed
;
private
System
.
Windows
.
Forms
.
Label
lblEpsonError
;
private
System
.
Windows
.
Forms
.
Label
lblEpsonError
;
private
System
.
Windows
.
Forms
.
Button
btnStopDown
;
private
System
.
Windows
.
Forms
.
Button
btnStopDown
;
private
HalconDotNet
.
HWindowControl
hWVideo
;
private
System
.
Windows
.
Forms
.
Panel
panVideo
;
private
System
.
Windows
.
Forms
.
TextBox
txtCode
;
private
System
.
Windows
.
Forms
.
TextBox
txtCode
;
private
System
.
Windows
.
Forms
.
Label
label10
;
private
System
.
Windows
.
Forms
.
Label
label10
;
private
System
.
Windows
.
Forms
.
Button
btnPositionTest
;
private
System
.
Windows
.
Forms
.
Button
btnPositionTest
;
...
...
URSolderingClient/FrmBoardInfo.cs
查看文件 @
76f9c75
...
@@ -47,15 +47,10 @@ namespace URSoldering.Client
...
@@ -47,15 +47,10 @@ namespace URSoldering.Client
}
}
}
}
private
System
.
Timers
.
Timer
timer1
=
new
System
.
Timers
.
Timer
();
private
System
.
Timers
.
Timer
timer1
=
new
System
.
Timers
.
Timer
();
private
System
.
Timers
.
Timer
usbTimer
=
new
System
.
Timers
.
Timer
();
private
void
FrmBoardInfo_Load
(
object
sender
,
EventArgs
e
)
private
void
FrmBoardInfo_Load
(
object
sender
,
EventArgs
e
)
{
{
CheckForIllegalCrossThreadCalls
=
false
;
CheckForIllegalCrossThreadCalls
=
false
;
usbTimer
=
new
System
.
Timers
.
Timer
();
usbTimer
.
AutoReset
=
true
;
usbTimer
.
Enabled
=
false
;
usbTimer
.
Interval
=
300
;
usbTimer
.
Elapsed
+=
UsbTimer_Elapsed
;
StepValue
=
0.5
;
StepValue
=
0.5
;
tckSpeed
.
Value
=
3
;
tckSpeed
.
Value
=
3
;
isFinishLoad
=
false
;
isFinishLoad
=
false
;
...
@@ -121,11 +116,7 @@ namespace URSoldering.Client
...
@@ -121,11 +116,7 @@ namespace URSoldering.Client
btnSendWire
.
Enabled
=
false
;
btnSendWire
.
Enabled
=
false
;
btnStopSend
.
Enabled
=
false
;
btnStopSend
.
Enabled
=
false
;
}
}
if
(!
ConfigAppSettings
.
GetBoolValue
(
Setting_Init
.
ISDebug
))
{
UsbCameraHDevelop
.
OpenCamera
(
VideoCameraName
);
}
usbTimer
.
Enabled
=
true
;
isFinishLoad
=
true
;
isFinishLoad
=
true
;
}
}
...
@@ -152,39 +143,7 @@ namespace URSoldering.Client
...
@@ -152,39 +143,7 @@ namespace URSoldering.Client
}
}
return
false
;
return
false
;
}
}
private
int
dWidth
=
0
;
private
int
dHeight
=
0
;
private
string
VideoCameraName
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
VideoCameraName
);
private
void
UsbTimer_Elapsed
(
object
sender
,
ElapsedEventArgs
e
)
{
try
{
if
(
panVideo
.
Visible
)
{
if
(
UsbCameraHDevelop
.
IsOpen
(
VideoCameraName
))
{
HObject
ho_Image
=
UsbCameraHDevelop
.
GrabImage
(
VideoCameraName
);
if
(
ho_Image
!=
null
)
{
if
(
dWidth
<=
0
)
{
HTuple
width
,
height
;
HOperatorSet
.
GetImageSize
(
ho_Image
,
out
width
,
out
height
);
dWidth
=
(
int
)
width
.
D
;
dHeight
=
(
int
)
height
.
D
;
hWVideo
.
HalconWindow
.
SetPart
(
0
,
0
,
dHeight
,
dWidth
);
}
HOperatorSet
.
DispObj
(
ho_Image
,
hWVideo
.
HalconWindow
);
}
}
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"获取实时出错:"
+
ex
.
ToString
());
}
}
private
void
RobotStatus
(
bool
isConnect
)
private
void
RobotStatus
(
bool
isConnect
)
...
...
URSolderingClient/FrmMenu.cs
查看文件 @
76f9c75
...
@@ -32,20 +32,20 @@ namespace URSoldering.Client
...
@@ -32,20 +32,20 @@ namespace URSoldering.Client
private
void
btnWelding_Click
(
object
sender
,
EventArgs
e
)
private
void
btnWelding_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(
BoardManager
.
CurrBoard
==
null
)
//
if (BoardManager.CurrBoard == null)
{
//
{
if
(
BoardManager
.
boardList
.
Count
>
0
)
//
if (BoardManager.boardList.Count > 0)
{
//
{
BoardManager
.
UpdateCurrBoard
(
BoardManager
.
boardList
[
0
].
boardId
);
//
BoardManager.UpdateCurrBoard(BoardManager.boardList[0].boardId);
}
//
}
else
//
else
{
//
{
MessageBox
.
Show
(
"请先配置程序"
);
//
MessageBox.Show("请先配置程序");
return
;
//
return;
}
//
}
}
//
}
isClick
=
true
;
isClick
=
true
;
Frm
Work
fw
=
new
FrmWork
();
Frm
ProgramSelect
fw
=
new
FrmProgramSelect
();
this
.
Visible
=
false
;
;
this
.
Visible
=
false
;
;
fw
.
ShowDialog
();
fw
.
ShowDialog
();
this
.
Visible
=
true
;
this
.
Visible
=
true
;
...
...
URSolderingClient/Frm
Board
Select.Designer.cs
→
URSolderingClient/Frm
Program
Select.Designer.cs
查看文件 @
76f9c75
文件被删除
URSolderingClient/Frm
Board
Select.cs
→
URSolderingClient/Frm
Program
Select.cs
查看文件 @
76f9c75
...
@@ -58,9 +58,9 @@ namespace URSoldering.Client
...
@@ -58,9 +58,9 @@ namespace URSoldering.Client
BoardManager
.
UpdateCurrBoard
(
board
.
boardId
);
BoardManager
.
UpdateCurrBoard
(
board
.
boardId
);
//判断程序是否配置完成
//判断程序是否配置完成
//
FrmWork fw = new FrmWork();
FrmWork
fw
=
new
FrmWork
();
//
this.Hide();
this
.
Hide
();
//
fw.ShowDialog();
fw
.
ShowDialog
();
}
}
this
.
Close
();
this
.
Close
();
}
}
...
...
URSolderingClient/Frm
Board
Select.resx
→
URSolderingClient/Frm
Program
Select.resx
查看文件 @
76f9c75
文件被删除
URSolderingClient/FrmWeldPointInfo.cs
查看文件 @
76f9c75
...
@@ -64,7 +64,7 @@ namespace URSoldering.Client
...
@@ -64,7 +64,7 @@ namespace URSoldering.Client
{
{
this
.
txtClearTime
.
Text
=
weldPointInfo
.
ClearTime
.
ToString
();
this
.
txtClearTime
.
Text
=
weldPointInfo
.
ClearTime
.
ToString
();
}
}
ShowPoint
(
new
URPointValue
(
weldPointInfo
.
RobotX
,
weldPointInfo
.
RoobtY
,
weldPointInfo
.
RobotZ
,
weldPointInfo
.
RobotRX
,
weldPointInfo
.
RobotRY
,
weldPointInfo
.
RobotRZ
));
ShowPoint
(
weldPointInfo
.
GetURPoint
(
));
}
}
private
void
btnSave_Click
(
object
sender
,
EventArgs
e
)
private
void
btnSave_Click
(
object
sender
,
EventArgs
e
)
...
...
URSolderingClient/FrmWork.Designer.cs
查看文件 @
76f9c75
...
@@ -42,9 +42,6 @@
...
@@ -42,9 +42,6 @@
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Legend
legend3
=
new
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Legend
();
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Legend
legend3
=
new
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Legend
();
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Series
series3
=
new
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Series
();
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Series
series3
=
new
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Series
();
this
.
timer
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
timer
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
groupBox5
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
hWVideo
=
new
HalconDotNet
.
HWindowControl
();
this
.
label4
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox3
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox3
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
logBox
=
new
System
.
Windows
.
Forms
.
RichTextBox
();
this
.
logBox
=
new
System
.
Windows
.
Forms
.
RichTextBox
();
...
@@ -95,7 +92,6 @@
...
@@ -95,7 +92,6 @@
this
.
chartSolder
=
new
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Chart
();
this
.
chartSolder
=
new
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Chart
();
this
.
chartLine
=
new
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Chart
();
this
.
chartLine
=
new
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Chart
();
this
.
label7
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label7
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox5
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
axCKVisionCtrl1
)).
BeginInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
axCKVisionCtrl1
)).
BeginInit
();
...
@@ -115,46 +111,6 @@
...
@@ -115,46 +111,6 @@
this
.
timer
.
Interval
=
300
;
this
.
timer
.
Interval
=
300
;
this
.
timer
.
Tick
+=
new
System
.
EventHandler
(
this
.
timer_Tick
);
this
.
timer
.
Tick
+=
new
System
.
EventHandler
(
this
.
timer_Tick
);
//
//
// groupBox5
//
this
.
groupBox5
.
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
.
groupBox5
.
Controls
.
Add
(
this
.
hWVideo
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label4
);
this
.
groupBox5
.
Location
=
new
System
.
Drawing
.
Point
(
1155
,
499
);
this
.
groupBox5
.
MaximumSize
=
new
System
.
Drawing
.
Size
(
800
,
500
);
this
.
groupBox5
.
Name
=
"groupBox5"
;
this
.
groupBox5
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
157
);
this
.
groupBox5
.
TabIndex
=
316
;
this
.
groupBox5
.
TabStop
=
false
;
//
// hWVideo
//
this
.
hWVideo
.
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
.
hWVideo
.
BackColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
hWVideo
.
BorderColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
hWVideo
.
ImagePart
=
new
System
.
Drawing
.
Rectangle
(
0
,
0
,
640
,
480
);
this
.
hWVideo
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
44
);
this
.
hWVideo
.
Name
=
"hWVideo"
;
this
.
hWVideo
.
Size
=
new
System
.
Drawing
.
Size
(
94
,
108
);
this
.
hWVideo
.
TabIndex
=
301
;
this
.
hWVideo
.
WindowSize
=
new
System
.
Drawing
.
Size
(
94
,
108
);
//
// label4
//
this
.
label4
.
BackColor
=
System
.
Drawing
.
Color
.
MediumBlue
;
this
.
label4
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
15.75F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label4
.
ForeColor
=
System
.
Drawing
.
Color
.
White
;
this
.
label4
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
11
);
this
.
label4
.
Name
=
"label4"
;
this
.
label4
.
Size
=
new
System
.
Drawing
.
Size
(
134
,
31
);
this
.
label4
.
TabIndex
=
300
;
this
.
label4
.
Text
=
"实时视频"
;
this
.
label4
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
//
// groupBox3
// groupBox3
//
//
this
.
groupBox3
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
this
.
groupBox3
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
...
@@ -209,7 +165,8 @@
...
@@ -209,7 +165,8 @@
//
//
// groupBox2
// groupBox2
//
//
this
.
groupBox2
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
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
)));
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
groupBox2
.
Controls
.
Add
(
this
.
button2
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
button2
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
button1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
button1
);
...
@@ -219,9 +176,9 @@
...
@@ -219,9 +176,9 @@
this
.
groupBox2
.
Controls
.
Add
(
this
.
label1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
lblAOIResult
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
lblAOIResult
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
1155
,
62
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
1155
,
62
);
this
.
groupBox2
.
MaximumSize
=
new
System
.
Drawing
.
Size
(
800
,
5
00
);
this
.
groupBox2
.
MaximumSize
=
new
System
.
Drawing
.
Size
(
1000
,
10
00
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
99
,
436
);
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
99
,
595
);
this
.
groupBox2
.
TabIndex
=
269
;
this
.
groupBox2
.
TabIndex
=
269
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
TabStop
=
false
;
//
//
...
@@ -256,7 +213,7 @@
...
@@ -256,7 +213,7 @@
this
.
axCKVisionCtrl1
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
43
);
this
.
axCKVisionCtrl1
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
43
);
this
.
axCKVisionCtrl1
.
Name
=
"axCKVisionCtrl1"
;
this
.
axCKVisionCtrl1
.
Name
=
"axCKVisionCtrl1"
;
this
.
axCKVisionCtrl1
.
OcxState
=
((
System
.
Windows
.
Forms
.
AxHost
.
State
)(
resources
.
GetObject
(
"axCKVisionCtrl1.OcxState"
)));
this
.
axCKVisionCtrl1
.
OcxState
=
((
System
.
Windows
.
Forms
.
AxHost
.
State
)(
resources
.
GetObject
(
"axCKVisionCtrl1.OcxState"
)));
this
.
axCKVisionCtrl1
.
Size
=
new
System
.
Drawing
.
Size
(
91
,
389
);
this
.
axCKVisionCtrl1
.
Size
=
new
System
.
Drawing
.
Size
(
91
,
548
);
this
.
axCKVisionCtrl1
.
TabIndex
=
306
;
this
.
axCKVisionCtrl1
.
TabIndex
=
306
;
//
//
// lblCodeResult
// lblCodeResult
...
@@ -265,7 +222,7 @@
...
@@ -265,7 +222,7 @@
this
.
lblCodeResult
.
AutoSize
=
true
;
this
.
lblCodeResult
.
AutoSize
=
true
;
this
.
lblCodeResult
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
14.25F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblCodeResult
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
14.25F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblCodeResult
.
ForeColor
=
System
.
Drawing
.
Color
.
Blue
;
this
.
lblCodeResult
.
ForeColor
=
System
.
Drawing
.
Color
.
Blue
;
this
.
lblCodeResult
.
Location
=
new
System
.
Drawing
.
Point
(
183
,
1
3
);
this
.
lblCodeResult
.
Location
=
new
System
.
Drawing
.
Point
(
183
,
1
72
);
this
.
lblCodeResult
.
Name
=
"lblCodeResult"
;
this
.
lblCodeResult
.
Name
=
"lblCodeResult"
;
this
.
lblCodeResult
.
Size
=
new
System
.
Drawing
.
Size
(
107
,
25
);
this
.
lblCodeResult
.
Size
=
new
System
.
Drawing
.
Size
(
107
,
25
);
this
.
lblCodeResult
.
TabIndex
=
305
;
this
.
lblCodeResult
.
TabIndex
=
305
;
...
@@ -301,7 +258,7 @@
...
@@ -301,7 +258,7 @@
this
.
lblAOIResult
.
AutoSize
=
true
;
this
.
lblAOIResult
.
AutoSize
=
true
;
this
.
lblAOIResult
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
14.25F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblAOIResult
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
14.25F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblAOIResult
.
ForeColor
=
System
.
Drawing
.
Color
.
Blue
;
this
.
lblAOIResult
.
ForeColor
=
System
.
Drawing
.
Color
.
Blue
;
this
.
lblAOIResult
.
Location
=
new
System
.
Drawing
.
Point
(
183
,
1
4
);
this
.
lblAOIResult
.
Location
=
new
System
.
Drawing
.
Point
(
183
,
1
73
);
this
.
lblAOIResult
.
Name
=
"lblAOIResult"
;
this
.
lblAOIResult
.
Name
=
"lblAOIResult"
;
this
.
lblAOIResult
.
Size
=
new
System
.
Drawing
.
Size
(
77
,
25
);
this
.
lblAOIResult
.
Size
=
new
System
.
Drawing
.
Size
(
77
,
25
);
this
.
lblAOIResult
.
TabIndex
=
301
;
this
.
lblAOIResult
.
TabIndex
=
301
;
...
@@ -802,7 +759,6 @@
...
@@ -802,7 +759,6 @@
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1276
,
741
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1276
,
741
);
this
.
Controls
.
Add
(
this
.
gbBoardInfo
);
this
.
Controls
.
Add
(
this
.
gbBoardInfo
);
this
.
Controls
.
Add
(
this
.
groupBox4
);
this
.
Controls
.
Add
(
this
.
groupBox4
);
this
.
Controls
.
Add
(
this
.
groupBox5
);
this
.
Controls
.
Add
(
this
.
groupBox3
);
this
.
Controls
.
Add
(
this
.
groupBox3
);
this
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
...
@@ -812,7 +768,6 @@
...
@@ -812,7 +768,6 @@
this
.
FormClosing
+=
new
System
.
Windows
.
Forms
.
FormClosingEventHandler
(
this
.
FrmWelding_FormClosing
);
this
.
FormClosing
+=
new
System
.
Windows
.
Forms
.
FormClosingEventHandler
(
this
.
FrmWelding_FormClosing
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
FrmWelding_Load
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
FrmWelding_Load
);
this
.
Shown
+=
new
System
.
EventHandler
(
this
.
FrmWork_Shown
);
this
.
Shown
+=
new
System
.
EventHandler
(
this
.
FrmWork_Shown
);
this
.
groupBox5
.
ResumeLayout
(
false
);
this
.
groupBox3
.
ResumeLayout
(
false
);
this
.
groupBox3
.
ResumeLayout
(
false
);
this
.
groupBox3
.
PerformLayout
();
this
.
groupBox3
.
PerformLayout
();
this
.
groupBox2
.
ResumeLayout
(
false
);
this
.
groupBox2
.
ResumeLayout
(
false
);
...
@@ -863,9 +818,6 @@
...
@@ -863,9 +818,6 @@
private
System
.
Windows
.
Forms
.
ListView
listPoint
;
private
System
.
Windows
.
Forms
.
ListView
listPoint
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox3
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox3
;
private
System
.
Windows
.
Forms
.
CheckBox
chbXunHuan
;
private
System
.
Windows
.
Forms
.
CheckBox
chbXunHuan
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox5
;
private
System
.
Windows
.
Forms
.
Label
label4
;
private
HalconDotNet
.
HWindowControl
hWVideo
;
private
System
.
Windows
.
Forms
.
Button
btnBlow
;
private
System
.
Windows
.
Forms
.
Button
btnBlow
;
private
System
.
Windows
.
Forms
.
Label
lblCodeResult
;
private
System
.
Windows
.
Forms
.
Label
lblCodeResult
;
private
AxCKVisionCtrlLib
.
AxCKVisionCtrl
axCKVisionCtrl1
;
private
AxCKVisionCtrlLib
.
AxCKVisionCtrl
axCKVisionCtrl1
;
...
...
URSolderingClient/FrmWork.cs
查看文件 @
76f9c75
...
@@ -28,15 +28,14 @@ namespace URSoldering.Client
...
@@ -28,15 +28,14 @@ namespace URSoldering.Client
Dictionary
<
string
,
IOTextControl
>
DIControlList
=
new
Dictionary
<
string
,
IOTextControl
>();
Dictionary
<
string
,
IOTextControl
>
DIControlList
=
new
Dictionary
<
string
,
IOTextControl
>();
Dictionary
<
string
,
IOTextControl
>
DOControlList
=
new
Dictionary
<
string
,
IOTextControl
>();
Dictionary
<
string
,
IOTextControl
>
DOControlList
=
new
Dictionary
<
string
,
IOTextControl
>();
private
bool
isInitOk
=
false
;
private
bool
isInitOk
=
false
;
private
System
.
Timers
.
Timer
usbTimer
=
new
System
.
Timers
.
Timer
();
private
void
FrmWelding_Load
(
object
sender
,
EventArgs
e
)
private
void
FrmWelding_Load
(
object
sender
,
EventArgs
e
)
{
{
lblCodeResult
.
Visible
=
false
;
lblCodeResult
.
Visible
=
false
;
lblAOIResult
.
Visible
=
false
;
lblAOIResult
.
Visible
=
false
;
LoadListPoint
();
LoadListPoint
();
//LoadIOList();
ClearMsg
();
Robot
=
RobotManager
.
SolderingRobot
;
Robot
=
RobotManager
.
SolderingRobot
;
WeldRobotBean
.
AOICheckFun
+=
AOICheck
;
WeldRobotBean
.
AOICheckFun
+=
AOICheck
;
//WeldRobotBean.GetCodeFun += GetCode;
//WeldRobotBean.GetCodeFun += GetCode;
...
@@ -48,11 +47,6 @@ namespace URSoldering.Client
...
@@ -48,11 +47,6 @@ namespace URSoldering.Client
this
.
chbHigh
.
Checked
=
WeldRobotBean
.
isHighSpeed
;
this
.
chbHigh
.
Checked
=
WeldRobotBean
.
isHighSpeed
;
usbTimer
=
new
System
.
Timers
.
Timer
();
usbTimer
.
AutoReset
=
true
;
usbTimer
.
Enabled
=
false
;
usbTimer
.
Interval
=
300
;
usbTimer
.
Elapsed
+=
UsbTimer_Elapsed
;
Robot
=
RobotManager
.
SolderingRobot
;
Robot
=
RobotManager
.
SolderingRobot
;
//StartRun();
//StartRun();
isInitOk
=
true
;
isInitOk
=
true
;
...
@@ -63,7 +57,7 @@ namespace URSoldering.Client
...
@@ -63,7 +57,7 @@ namespace URSoldering.Client
this
.
Close
();
this
.
Close
();
}
}
this
.
Text
=
"程序【"
+
BoardManager
.
CurrBoard
.
boardName
+
"】工作"
;
this
.
Text
=
"程序【"
+
BoardManager
.
CurrBoard
.
boardName
+
"】工作"
;
//
LoadPoint(BoardManager.CurrBoard, -1);
LoadPoint
(
BoardManager
.
CurrBoard
,
-
1
);
this
.
btnChange
.
Focus
();
this
.
btnChange
.
Focus
();
...
@@ -266,7 +260,7 @@ namespace URSoldering.Client
...
@@ -266,7 +260,7 @@ namespace URSoldering.Client
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
}
}
if
(
id
!=
board
.
boardId
||
currWeldIndex
==
-
3
||
currWeldIndex
>=
-
1
)
if
(
id
!=
board
.
boardId
||
currWeldIndex
==
-
3
||
currWeldIndex
.
Equals
(
-
1
)
)
{
{
this
.
lblPointCount
.
Text
=
board
.
pointList
.
Count
.
ToString
();
this
.
lblPointCount
.
Text
=
board
.
pointList
.
Count
.
ToString
();
this
.
lblProName
.
Text
=
board
.
boardName
;
this
.
lblProName
.
Text
=
board
.
boardName
;
...
@@ -386,44 +380,6 @@ namespace URSoldering.Client
...
@@ -386,44 +380,6 @@ namespace URSoldering.Client
}
}
}
}
private
int
dWidth
=
0
;
private
int
dHeight
=
0
;
private
void
UsbTimer_Elapsed
(
object
sender
,
ElapsedEventArgs
e
)
{
//try
//{
// if (WeldRobotBean.ISRun &&
// (WeldRobotBean.WeldMoveStep.moveType.Equals(MoveType.Weld)||
// WeldRobotBean.WeldMoveStep.moveType.Equals(MoveType.GoHome)))
// {
// if (UsbCameraHDevelop.IsOpen(VideoCameraName))
// {
// HObject ho_Image = UsbCameraHDevelop.GrabImage(VideoCameraName);
// if (ho_Image != null)
// {
// if (dWidth <= 0)
// {
// HTuple width, height;
// HOperatorSet.GetImageSize(ho_Image, out width, out height);
// dWidth = (int)width.D;
// dHeight = (int)height.D;
// hWVideo.HalconWindow.SetPart(0, 0, dHeight, dWidth);
// }
// HOperatorSet.DispObj(ho_Image, hWVideo.HalconWindow);
// }
// }
// }
//}
//catch (Exception ex)
//{
// LogUtil.error("获取实时出错:" + ex.ToString());
//}
}
private
void
ClearMsg
()
{
}
private
void
timer_Tick
(
object
sender
,
EventArgs
e
)
private
void
timer_Tick
(
object
sender
,
EventArgs
e
)
{
{
ActualTime
(
null
,
null
);
ActualTime
(
null
,
null
);
...
@@ -508,7 +464,7 @@ namespace URSoldering.Client
...
@@ -508,7 +464,7 @@ namespace URSoldering.Client
this
.
listPoint
.
Items
.
Clear
();
this
.
listPoint
.
Items
.
Clear
();
//LoadPoint(WeldRobotBean.WeldMoveStep.currBoard, -1);
//LoadPoint(WeldRobotBean.WeldMoveStep.currBoard, -1);
}
}
else
if
(
WeldRobotBean
.
IsInWeld
)
else
if
(
WeldRobotBean
.
WeldMoveStep
.
moveType
.
Equals
(
MoveType
.
Weld
)
)
{
{
lblMsg
.
ForeColor
=
Color
.
Green
;
lblMsg
.
ForeColor
=
Color
.
Green
;
lblMsg
.
Text
=
"程序【"
+
WeldRobotBean
.
WeldMoveStep
.
currBoard
.
boardName
+
"】焊接中"
;
lblMsg
.
Text
=
"程序【"
+
WeldRobotBean
.
WeldMoveStep
.
currBoard
.
boardName
+
"】焊接中"
;
...
@@ -929,8 +885,11 @@ namespace URSoldering.Client
...
@@ -929,8 +885,11 @@ namespace URSoldering.Client
private
void
btnWeld_Click
(
object
sender
,
EventArgs
e
)
private
void
btnWeld_Click
(
object
sender
,
EventArgs
e
)
{
{
//如果开始焊接,开始焊接
string
msg
=
Robot
.
StartWeld
();
if
(!
msg
.
Equals
(
""
))
{
MessageBox
.
Show
(
"焊接失败:"
+
msg
);
}
}
}
}
}
}
}
URSolderingClient/FrmWork.resx
查看文件 @
76f9c75
...
@@ -125,7 +125,7 @@
...
@@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAJQAAAAIB
ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAJQAAAAIB
AAAAAQAAAAAAAAAAAAAAABAAAAAAAAEAaAkAA
DQo
AAAAAAAACw==
AAAAAQAAAAAAAAAAAAAAABAAAAAAAAEAaAkAA
KM4
AAAAAAAACw==
</value>
</value>
</data>
</data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
...
...
URSolderingClient/URSolderingClient.csproj
查看文件 @
76f9c75
...
@@ -103,11 +103,11 @@
...
@@ -103,11 +103,11 @@
<Compile Include="FrmBoardList.Designer.cs">
<Compile Include="FrmBoardList.Designer.cs">
<DependentUpon>FrmBoardList.cs</DependentUpon>
<DependentUpon>FrmBoardList.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="Frm
Board
Select.cs">
<Compile Include="Frm
Program
Select.cs">
<SubType>Form</SubType>
<SubType>Form</SubType>
</Compile>
</Compile>
<Compile Include="Frm
Board
Select.Designer.cs">
<Compile Include="Frm
Program
Select.Designer.cs">
<DependentUpon>Frm
Board
Select.cs</DependentUpon>
<DependentUpon>Frm
Program
Select.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="FrmCodeLearn.cs">
<Compile Include="FrmCodeLearn.cs">
<SubType>Form</SubType>
<SubType>Form</SubType>
...
@@ -204,8 +204,8 @@
...
@@ -204,8 +204,8 @@
<EmbeddedResource Include="FrmBoardList.resx">
<EmbeddedResource Include="FrmBoardList.resx">
<DependentUpon>FrmBoardList.cs</DependentUpon>
<DependentUpon>FrmBoardList.cs</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
<EmbeddedResource Include="Frm
Board
Select.resx">
<EmbeddedResource Include="Frm
Program
Select.resx">
<DependentUpon>Frm
Board
Select.cs</DependentUpon>
<DependentUpon>Frm
Program
Select.cs</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
<EmbeddedResource Include="FrmCodeLearn.resx">
<EmbeddedResource Include="FrmCodeLearn.resx">
<DependentUpon>FrmCodeLearn.cs</DependentUpon>
<DependentUpon>FrmCodeLearn.cs</DependentUpon>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论