Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
URSolderingRobot
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 637e6ef8
由
几米阳光
编写于
2018-07-18 16:09:47 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
去掉不需要的IO
1 个父辈
ecb4c995
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
25 个修改的文件
包含
449 行增加
和
630 行删除
Common/util/SerialBean.cs
DeviceLibrary/Robot/LineSolderingRobot.cs
DeviceLibrary/Robot/LineSolderingRobot_Partial.cs
DeviceLibrary/Robot/soldering/WeldRobotBean.cs
DeviceLibrary/Robot/soldering/WeldRobotBean_Partial.cs
DeviceLibrary/Robot/soldering/WeldStepBean.cs
DeviceLibrary/RobotConfig/solderingConfig/SolderingRobotConfig.csv
DeviceLibrary/bean/RobotBean.cs
DeviceLibrary/deviceLibrary/jbc/SendWireManager.cs
LoadCVSLibrary/robotConfig/config/IO_Type.cs
URSolderingClient/FrmBoardCopy.Designer.cs
URSolderingClient/FrmBoardCopy.resx
URSolderingClient/FrmBoardInfo.cs
URSolderingClient/FrmIoManager.Designer.cs
URSolderingClient/FrmIoManager.cs
URSolderingClient/FrmIoManager.resx
URSolderingClient/FrmOrgConfig.cs
URSolderingClient/FrmSendWire.Designer.cs
URSolderingClient/FrmSendWire.cs
URSolderingClient/FrmSoldDebug.Designer.cs
URSolderingClient/FrmSoldDebug.resx
URSolderingClient/FrmSolderingSetting.Designer.cs
URSolderingClient/FrmWeldPointInfo.Designer.cs
URSolderingClient/FrmWork.Designer.cs
URSolderingClient/FrmWork.cs
Common/util/SerialBean.cs
查看文件 @
637e6ef
...
...
@@ -341,13 +341,18 @@ namespace URSoldering.Common
}
if
(
_serialPort
.
BytesToRead
>=
ReceiveData
.
Length
)
{
ret
=
_serialPort
.
Read
(
ReceiveData
,
0
,
ReceiveData
.
Length
);
ReceiveData
=
new
byte
[
_serialPort
.
BytesToRead
];
ret
=
_serialPort
.
Read
(
ReceiveData
,
0
,
_serialPort
.
BytesToRead
);
}
else
else
if
(
_serialPort
.
BytesToRead
>
0
)
{
ret
=
_serialPort
.
Read
(
ReceiveData
,
0
,
_serialPort
.
BytesToRead
);
}
else
{
ReceiveData
=
new
byte
[
0
];
LogUtil
.
info
(
""
);
}
isOk
=
true
;
ReceiveEventFlag
=
false
;
//打开事件
return
ret
;
...
...
DeviceLibrary/Robot/LineSolderingRobot.cs
查看文件 @
637e6ef
using
URSoldering.Common
;
using
URSoldering.LoadCSVLibrary
;
using
log4net
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading
;
using
URSoldering.LoadCSVLibrary
;
using
System
;
using
System.Timers
;
namespace
URSoldering.DeviceLibrary
...
...
@@ -38,9 +33,7 @@ namespace URSoldering.DeviceLibrary
alarmType
=
AlarmType
.
None
;
mainTimer
.
Enabled
=
false
;
ledTimer
.
Enabled
=
false
;
IsInSuddendown
=
false
;
//WaitScanResult = false;
//CanScan = false;
IsInSuddendown
=
false
;
WarnMsg
=
""
;
if
(!
ShuddenOK
())
...
...
@@ -70,48 +63,20 @@ namespace URSoldering.DeviceLibrary
WarnMsg
=
solderingStr
;
return
false
;
}
//MesUtil.SolderInit(MesIp, MesPort);
Status
=
RobotStatus
.
Reset
;
//HDevelopExport.OpenAllCamera();
Status
=
RobotStatus
.
Reset
;
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
.
LOW
);
//InitLineSpeed();
//阻挡气缸上升
StopCylinderUp
();
IsInProcess
=
false
;
ledTimer
.
Enabled
=
true
;
mainTimer
.
Enabled
=
true
;
return
true
;
}
public
void
StopCylinderUpAndWait
()
{
KNDIOMove
(
IO_Type
.
StopCylinder_Up
,
IO_VALUE
.
HIGH
);
KNDIOMove
(
IO_Type
.
StopCylinder_Down
,
IO_VALUE
.
LOW
);
LineStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down
,
IO_VALUE
.
LOW
));
LineStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Up
,
IO_VALUE
.
HIGH
));
}
public
void
StopCylinderDownAndWait
()
{
KNDIOMove
(
IO_Type
.
StopCylinder_Up
,
IO_VALUE
.
LOW
);
KNDIOMove
(
IO_Type
.
StopCylinder_Down
,
IO_VALUE
.
HIGH
);
LineStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down
,
IO_VALUE
.
HIGH
));
LineStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Up
,
IO_VALUE
.
LOW
));
}
public
void
StopCylinderUp
()
{
KNDIOMove
(
IO_Type
.
StopCylinder_Up
,
IO_VALUE
.
HIGH
);
KNDIOMove
(
IO_Type
.
StopCylinder_Down
,
IO_VALUE
.
LOW
);
}
public
void
StopCylinderDown
()
{
KNDIOMove
(
IO_Type
.
StopCylinder_Up
,
IO_VALUE
.
LOW
);
KNDIOMove
(
IO_Type
.
StopCylinder_Down
,
IO_VALUE
.
HIGH
);
}
/// <summary>
/// 急停 处理
/// </summary>
...
...
@@ -151,7 +116,7 @@ namespace URSoldering.DeviceLibrary
else
if
(
Status
.
Equals
(
RobotStatus
.
Reset
))
{
if
(
WeldRobotBean
.
WeldMoveStep
.
moveType
.
Equals
(
MoveType
.
None
)
&&
KNDIOValue
(
IO_Type
.
SendWire_
Up
).
Equals
(
IO_VALUE
.
HIGH
))
&&
KNDIOValue
(
IO_Type
.
SendWire_
Work
).
Equals
(
IO_VALUE
.
HIGH
))
{
LogUtil
.
info
(
RobotName
+
"复位完成"
);
Status
=
RobotStatus
.
Runing
;
...
...
@@ -163,8 +128,7 @@ namespace URSoldering.DeviceLibrary
}
else
if
(
Status
.
Equals
(
RobotStatus
.
Runing
))
{
IOTimeOutProcess
();
StartLineCheck
();
IOTimeOutProcess
();
}
else
if
(
Status
.
Equals
(
RobotStatus
.
Busy
))
{
...
...
@@ -172,7 +136,7 @@ namespace URSoldering.DeviceLibrary
}
else
if
(
Status
.
Equals
(
RobotStatus
.
LineMove
))
{
LineMoveProcess
();
}
}
}
catch
(
Exception
ex
)
...
...
@@ -203,8 +167,7 @@ namespace URSoldering.DeviceLibrary
{
LogUtil
.
info
(
RobotName
+
"之前有IO超时异常,清理信号超时异常!"
);
WarnMsg
=
""
;
alarmType
=
AlarmType
.
None
;
//RobotBean.KNDIOMove(IO_Type.Device_NG, IO_VALUE.HIGH);
alarmType
=
AlarmType
.
None
;
}
}
}
...
...
@@ -214,114 +177,12 @@ namespace URSoldering.DeviceLibrary
LogUtil
.
error
(
LOGGER
,
"IOTimeOutProcess出错:"
+
ex
.
ToString
());
}
}
private
void
LineMoveProcess
()
{
if
(
LineStep
.
IsInWait
)
{
CheckWait
();
}
if
(
LineStep
.
IsInWait
)
{
return
;
}
if
(
LineStep
.
moveStep
.
Equals
(
MoveStep
.
L00_CylinderUp
))
{
LineLog
(
"流水线转动:阻挡气缸上升到位,转动流水线"
);
LineStep
.
NextMoveStep
(
MoveStep
.
L01_StartLineMove
);
LineStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
LineWeldCheck
,
IO_VALUE
.
HIGH
));
//LineStartMove();
}
else
if
(
LineStep
.
moveStep
.
Equals
(
MoveStep
.
L01_StartLineMove
))
{
LineLog
(
"流水线转动:收到焊接信号,等待1秒钟"
);
LineStep
.
NextMoveStep
(
MoveStep
.
L02_GetWeldSingle
);
LineStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
}
else
if
(
LineStep
.
moveStep
.
Equals
(
MoveStep
.
L02_GetWeldSingle
))
{
//LineStopMove();
LineStep
.
NextMoveStep
(
MoveStep
.
L03_GetCode
);
LineStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
}
else
if
(
LineStep
.
moveStep
.
Equals
(
MoveStep
.
L03_GetCode
))
{
LineStep
.
NextMoveStep
(
MoveStep
.
L04_BeginWeld
);
GetCodeFun
?.
Invoke
();
Thread
.
Sleep
(
100
);
}
else
if
(
LineStep
.
moveStep
.
Equals
(
MoveStep
.
L04_BeginWeld
))
{
TimeSpan
span
=
DateTime
.
Now
-
LineStep
.
LastSetpTime
;
if
(
WareCode
.
Equals
(
""
).
Equals
(
false
)
||
span
.
TotalSeconds
>
15
)
{
string
str
=
WeldRobotBean
.
StartWeld
();
if
(
str
.
Equals
(
""
))
{
WeldRobotBean
.
IsInWeld
=
true
;
LineLog
(
"流水线转动:检测到焊接信号,停止流水线,启动焊接成功"
);
}
else
{
WeldRobotBean
.
IsInWeld
=
false
;
LineLog
(
"流水线转动:启动焊接失败:"
+
str
);
}
LastStartWeldTime
=
DateTime
.
Now
;
IsWeld
=
true
;
LineStep
.
NewMove
(
MoveType
.
WeldEndMove
);
LineStep
.
NextMoveStep
(
MoveStep
.
BUSY01_Weld
);
Status
=
RobotStatus
.
Busy
;
}
}
}
private
void
StartLineCheck
()
{
//开始转动
if
(
KNDIOValue
(
IO_Type
.
LineInCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
KNDIOValue
(
IO_Type
.
LineOutCheck
).
Equals
(
IO_VALUE
.
LOW
))
{
if
(
WeldRobotBean
.
WeldMoveStep
.
moveType
.
Equals
(
MoveType
.
None
))
{
KNDIOMove
(
IO_Type
.
AlarmSingle
,
IO_VALUE
.
LOW
);
LogUtil
.
info
(
"检测到入料口信号,阻挡气缸上升"
);
Status
=
RobotStatus
.
LineMove
;
LineStep
.
NewMove
(
MoveType
.
LineMove
);
LineStep
.
NextMoveStep
(
MoveStep
.
L00_CylinderUp
);
StopCylinderUpAndWait
();
}
}
}
/// <summary>
/// 收到启动信号,开始转动转台
/// </summary>
private
void
StartTurn
()
{
if
(
WareCode
.
Equals
(
""
))
{
WarnMsg
=
"还未扫描OK"
;
return
;
}
//TODO 开始转动
KNDIOMove
(
IO_Type
.
WaitSingle
,
IO_VALUE
.
LOW
);
Status
=
RobotStatus
.
LineMove
;
}
private
void
StopMove
()
{
//IsWaitCode = false;
//IsWaitCheck = false;
//WaitScanResult = false;
//CanScan = false;
//LineStopMove();
KNDIOMove
(
IO_Type
.
DeviceRunON
,
IO_VALUE
.
LOW
);
//HDevelopExport.CloseAllCamera();
WeldRobotBean
.
StopMove
();
{
KNDIOMove
(
IO_Type
.
DeviceRunON
,
IO_VALUE
.
LOW
);
WeldRobotBean
.
StopMove
();
this
.
Status
=
RobotStatus
.
Runing
;
}
public
void
StopRun
()
...
...
@@ -334,8 +195,7 @@ namespace URSoldering.DeviceLibrary
KNDIOMove
(
IO_Type
.
AlarmSingle
,
IO_VALUE
.
LOW
);
KNDIOMove
(
IO_Type
.
WaitSingle
,
IO_VALUE
.
LOW
);
KNDIOMove
(
IO_Type
.
DeviceRunON
,
IO_VALUE
.
LOW
);
//KNDIOMove(IO_Type.DoorStatus, IO_VALUE.HIGH);
//MesUtil.Close();
this
.
Status
=
RobotStatus
.
Wait
;
LogUtil
.
info
(
RobotName
+
"停止运行"
);
}
...
...
DeviceLibrary/Robot/LineSolderingRobot_Partial.cs
查看文件 @
637e6ef
using
URSoldering.Common
;
using
URSoldering.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading
;
using
System
;
namespace
URSoldering.DeviceLibrary
{
...
...
@@ -15,99 +11,36 @@ namespace URSoldering.DeviceLibrary
public
bool
IsWeld
=
false
;
public
delegate
void
GetCode
();
public
event
GetCode
GetCodeFun
;
public
delegate
void
AOICheck
();
public
event
AOICheck
AOICheckFun
;
public
bool
IsAutoRun
=
false
;
private
void
LineLog
(
string
msg
)
{
LogUtil
.
debug
(
RobotName
+
msg
);
}
private
void
BusyProcess
()
{
//if (LineStep.IsInWait)
//{
// CheckWait();
//}
//if(LineStep.IsInWait)
//{
// return;
//}
//if (LineStep.moveStep.Equals(MoveStep.BUSY01_Weld))
//{
// //if (WeldRobotBean.WeldMoveStep.moveType.Equals(MoveType.None))
// 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.NextMoveStep(MoveStep.BUSY03_CylinderDown);
// StopCylinderDownAndWait();
// }
//}
////焊接完成,流水线继续转动,直到出料口检测到信号
//else if (LineStep.moveStep.Equals(MoveStep.BUSY03_CylinderDown))
//{
// LineLog("Busy处理:" + "流水线转动,等待出料口信号");
// LineStep.NextMoveStep(MoveStep.BUSY04_LineMove);
// LineStartMove();
// LineStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LineOutCheck, IO_VALUE.HIGH));
//}
//else if (LineStep.moveStep.Equals(MoveStep.BUSY04_LineMove))
//{
// LineStopMove();
// if (IsAutoRun)
// {
// LineLog("Busy处理:" + "等待3秒钟后流水线倒转");
// LineStep.NextMoveStep(MoveStep.BUSY05_Wait);
// LineStep.WaitList.Add(WaitResultInfo.WaitTime(2000));
// }
// else
// {
// LineLog("Busy处理:" + "停止转动");
// StopCylinderUp();
// Status = RobotStatus.Runing;
// }
//}
//else if (LineStep.moveStep.Equals(MoveStep.BUSY05_Wait))
//{
// LineLog("Busy处理:" + "流水线转动,等待出料口信号");
// LineStep.NextMoveStep(MoveStep.BUSY06_WaitInSingle);
// LineBackMove();
// LineStep.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LineInCheck, IO_VALUE.HIGH));
//}
//else if (LineStep.moveStep.Equals(MoveStep.BUSY06_WaitInSingle))
//{
// LineLog("Busy处理:" + "板子到达入料口,停止转动");
// LineStopMove();
// StopCylinderUp();
// Status = RobotStatus.Runing;
//}
{
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
;
}
}
}
//private void LineBackMove()
//{
// ShuoKeControls.VolMove(Config.Line_Slv, Config.Line_EndSpeed);
// KNDIOMove(IO_Type.LineStart, IO_VALUE.HIGH);
//}
//private void LineStartMove()
//{
// ShuoKeControls.VolMove(Config.Line_Slv, 0- Config.Line_EndSpeed);
// KNDIOMove(IO_Type.LineStart, IO_VALUE.HIGH);
//}
//private void LineStopMove()
//{
// ShuoKeControls.SuddownStop(Config.Line_Slv);
// KNDIOMove(IO_Type.LineStart, IO_VALUE.LOW);
//}
/// <summary>
/// 判断是否还有未完成的工作
...
...
@@ -123,87 +56,7 @@ namespace URSoldering.DeviceLibrary
}
return
false
;
}
private
void
CheckWait
()
{
int
ioSingleTimeOutSeconds
=
30000
;
List
<
WaitResultInfo
>
list
=
new
List
<
WaitResultInfo
>(
LineStep
.
WaitList
);
//当等待超过一分钟时,需要打印提示
TimeSpan
span
=
DateTime
.
Now
-
LineStep
.
LastSetpTime
;
string
NotOkMsg
=
""
;
if
(
list
.
Count
>
0
)
{
bool
isOk
=
true
;
foreach
(
WaitResultInfo
wait
in
list
)
{
if
(
wait
.
WaitType
==
1
)
{
if
(!
RobotBean
.
KNDIOValue
(
wait
.
IoType
).
Equals
(
wait
.
IoValue
))
{
//一分钟还未检测到
if
(
span
.
TotalMilliseconds
>
ioSingleTimeOutSeconds
)
{
ConfigIO
io
=
RobotBean
.
getWaitIO
(
wait
.
IoType
);
NotOkMsg
=
"信号("
+
io
.
Explain
+
"="
+
wait
.
IoValue
+
")"
;
WarnMsg
=
RobotName
+
" 等待信号("
+
io
.
Explain
+
"="
+
wait
.
IoValue
+
") 超时!"
;
Alarm
(
AlarmType
.
IoSingleTimeOut
);
LogUtil
.
error
(
LOGGER
,
WarnMsg
,
13
);
}
isOk
=
false
;
break
;
}
else
if
(
LineStep
.
OneWaitOk
)
{
isOk
=
true
;
break
;
}
}
else
if
(
wait
.
WaitType
==
2
)
{
if
(
span
.
TotalMilliseconds
<
wait
.
TimeMSeconds
)
{
NotOkMsg
=
"时间["
+
wait
.
TimeMSeconds
+
"]毫秒"
;
isOk
=
false
;
break
;
}
else
if
(
LineStep
.
OneWaitOk
)
{
isOk
=
true
;
break
;
}
}
}
if
(
isOk
)
{
LineStep
.
EndStepWait
();
}
if
(
LineStep
.
IsInWait
)
{
if
(
span
.
TotalMinutes
>
1
)
{
if
(
NotOkMsg
.
Equals
(
""
))
{
WarnMsg
=
"等待超时["
+
LineStep
.
moveType
+
"]["
+
LineStep
.
moveStep
+
"]["
+
NotOkMsg
+
"]已等待["
+
Math
.
Round
(
span
.
TotalMinutes
,
1
)
+
"]分钟"
;
}
else
{
WarnMsg
=
"等待超时["
+
LineStep
.
moveType
+
"]["
+
LineStep
.
moveStep
+
"]已等待["
+
Math
.
Round
(
span
.
TotalMinutes
,
1
)
+
"]分钟,"
;
foreach
(
WaitResultInfo
wait
in
list
)
{
WarnMsg
=
WarnMsg
+
"\r\n"
+
wait
.
ToStr
();
}
}
Alarm
(
AlarmType
.
StepTimeOut
);
LogUtil
.
error
(
LOGGER
,
WarnMsg
,
12
);
}
}
}
else
{
LineStep
.
EndStepWait
();
}
}
private
void
Alarm
(
AlarmType
alarmType
)
{
this
.
alarmType
=
alarmType
;
...
...
DeviceLibrary/Robot/soldering/WeldRobotBean.cs
查看文件 @
637e6ef
...
...
@@ -191,12 +191,10 @@ namespace URSoldering.DeviceLibrary
alarmType
=
AlarmType
.
None
;
//锁定轴
URRobotControl
.
LockAxis
();
//InitSendWireSpeed();
//烙铁温度=0, 送丝上升,机器复位
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Up
,
IO_VALUE
.
HIGH
);
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Down
,
IO_VALUE
.
LOW
);
SolderingUp
(
false
);
SendWireWork
(
false
);
ISRun
=
true
;
mainTimer
.
Enabled
=
true
;
...
...
@@ -217,9 +215,9 @@ namespace URSoldering.DeviceLibrary
LogUtil
.
info
(
RobotName
+
"停止所有运动"
);
//烙铁温度=0,烙铁上升,送丝上升,机器复位
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Up
,
IO_VALUE
.
HIGH
);
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Down
,
IO_VALUE
.
LOW
);
RobotBean
.
KNDIOMove
(
IO_Type
.
ClearWeldingSQL
,
IO_VALUE
.
LOW
);
SolderingUp
(
false
);
SendWireWork
(
false
);
//硕科 停止
SendWireManager
.
StopSend
();
SolderingManager
.
Release
();
...
...
@@ -234,8 +232,7 @@ namespace URSoldering.DeviceLibrary
StopMove
();
mainTimer
.
Enabled
=
false
;
ISRun
=
false
;
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Down
,
IO_VALUE
.
LOW
);
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Up
,
IO_VALUE
.
LOW
);
LogUtil
.
info
(
LOGGER
,
RobotName
+
"停止运行"
);
}
private
static
bool
IsTimerProcess
=
false
;
...
...
@@ -361,28 +358,28 @@ namespace URSoldering.DeviceLibrary
/// <returns></returns>
public
static
bool
SendWireRecover
(
bool
isNext
)
{
if
(
RobotBean
.
KNDIOValue
(
IO_Type
.
SendWireLock
).
Equals
(
IO_VALUE
.
HIGH
))
{
LogUtil
.
info
(
RobotName
+
"卡丝恢复失败:仍在卡丝中!"
);
}
else
if
(
RobotBean
.
KNDIOValue
(
IO_Type
.
SendWireNoWire
).
Equals
(
IO_VALUE
.
HIGH
))
{
LogUtil
.
info
(
RobotName
+
"卡丝恢复失败:仍在无丝中!"
);
}
else
{
if
(
alarmType
.
Equals
(
AlarmType
.
SendWireAlarm
)
&&
IsInSudden
.
Equals
(
false
)
&&
IsNoAir
.
Equals
(
false
))
{
if
(
WeldMoveStep
.
moveType
.
Equals
(
MoveType
.
Weld
)
&&
(
isNext
.
Equals
(
false
)))
{
LogUtil
.
info
(
RobotName
+
"开始卡丝恢复,重新此焊点的焊接 !"
);
WeldMoveStep
.
NextMoveStep
(
MoveStep
.
Wait
);
}
lastSendWireOkTime
=
DateTime
.
Now
;
LogUtil
.
info
(
RobotName
+
"开始卡丝恢复!"
);
return
true
;
}
}
//
if (RobotBean.KNDIOValue(IO_Type.SendWireLock).Equals(IO_VALUE.HIGH))
//
{
//
LogUtil.info(RobotName + "卡丝恢复失败:仍在卡丝中!");
//
}
//
else if (RobotBean.KNDIOValue(IO_Type.SendWireNoWire).Equals(IO_VALUE.HIGH))
//
{
//
LogUtil.info(RobotName + "卡丝恢复失败:仍在无丝中!");
//
}
//
else
//
{
//
if (alarmType.Equals(AlarmType.SendWireAlarm) && IsInSudden.Equals(false) && IsNoAir.Equals(false))
//
{
//
if (WeldMoveStep.moveType.Equals(MoveType.Weld) && (isNext.Equals(false)))
//
{
//
LogUtil.info(RobotName + "开始卡丝恢复,重新此焊点的焊接 !");
//
WeldMoveStep.NextMoveStep(MoveStep.Wait);
//
}
//
lastSendWireOkTime = DateTime.Now;
//
LogUtil.info(RobotName + "开始卡丝恢复!");
//
return true;
//
}
//
}
return
false
;
}
/// <summary>IsNeedMsg
...
...
@@ -501,10 +498,10 @@ namespace URSoldering.DeviceLibrary
StopMove
();
}
}
public
static
string
GoHome
()
{
string
msg
=
Reset
();
string
msg
=
Reset
();
if
(!
msg
.
Equals
(
""
))
{
WarnMsg
=
msg
;
...
...
@@ -512,8 +509,8 @@ namespace URSoldering.DeviceLibrary
}
WeldMoveStep
.
NewWeld
(
MoveType
.
GoHome
);
WeldMoveStep
.
NextMoveStep
(
MoveStep
.
Home_Reset
);
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SendWire_Down
,
IO_VALUE
.
LOW
)
);
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SendWire_Up
,
IO_VALUE
.
HIGH
)
);
SolderingUp
(
true
);
SendWireWork
(
true
);
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitEpsonRun
());
return
""
;
}
...
...
@@ -609,8 +606,8 @@ namespace URSoldering.DeviceLibrary
private
static
void
MoveToOrg
()
{
S
endWireUp
(
);
RobotBean
.
KNDIOMove
(
IO_Type
.
ClearWeldingSQL
,
IO_VALUE
.
LOW
);
S
olderingUp
(
true
);
SendWireWork
(
true
);
if
(
HomePoint
.
X
!=
0
&&
HomePoint
.
Y
!=
0
&&
HomePoint
.
Z
!=
0
)
{
WeldLog
(
"送丝上升,机械臂走到待机点 "
);
...
...
@@ -620,9 +617,9 @@ namespace URSoldering.DeviceLibrary
}
private
static
void
SendWireUpToClear1
()
{
S
endWireUp
(
);
Thread
.
Sleep
(
100
);
RobotBean
.
KNDIOMove
(
IO_Type
.
ClearWeldingSQL
,
IO_VALUE
.
HIGH
);
S
olderingUp
(
true
);
SendWireClear
(
true
);
Thread
.
Sleep
(
100
);
WeldCount
=
0
;
if
(
Clear1Point
.
X
!=
0
&&
Clear1Point
.
Y
!=
0
&&
Clear1Point
.
Z
!=
0
)
{
...
...
@@ -633,7 +630,7 @@ namespace URSoldering.DeviceLibrary
}
private
static
void
MoveToClear2
(
int
mSenconds
)
{
RobotBean
.
KNDIOMove
(
IO_Type
.
ClearWeldingSQL
,
IO_VALUE
.
HIGH
,
mSenconds
);
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
mSenconds
));
if
(
Clear2Point
.
X
!=
0
&&
Clear2Point
.
Y
!=
0
&&
Clear2Point
.
Z
!=
0
)
{
...
...
DeviceLibrary/Robot/soldering/WeldRobotBean_Partial.cs
查看文件 @
637e6ef
...
...
@@ -16,12 +16,7 @@ namespace URSoldering.DeviceLibrary
public
delegate
void
AOICheck
(
);
public
static
event
AOICheck
AOICheckFun
;
private
static
void
AfterMove
(
string
result
)
{
}
private
static
void
AfterGet
(
double
x
,
double
y
,
double
z
,
double
u
,
int
hand
)
{
}
public
static
string
StartWeld
()
{
return
StartWeld
(
0
);
...
...
@@ -210,7 +205,8 @@ namespace URSoldering.DeviceLibrary
MoveToPoint
(
WeldMoveStep
.
CurrPoint
,
false
);
WorkCountManager
.
AddWeldPint
();
//第一个点并且送丝下降到位时,可以预送丝
if
(
WeldMoveStep
.
IsFirstPoint
().
Equals
(
false
)
&&
RobotBean
.
KNDIOValue
(
IO_Type
.
SendWire_Down
).
Equals
(
IO_VALUE
.
HIGH
))
//if (WeldMoveStep.IsFirstPoint().Equals(false) && RobotBean.KNDIOValue(IO_Type.SendWire_Down).Equals(IO_VALUE.HIGH))
if
(
WeldMoveStep
.
IsFirstPoint
().
Equals
(
false
)
)
{
WeldMoveStep
.
IsSlowSendWire
=
true
;
SlowSendWire
();
...
...
@@ -335,26 +331,51 @@ namespace URSoldering.DeviceLibrary
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
ms
));
}
}
p
rivate
static
void
SendWireDown
(
)
p
ublic
static
void
SolderingDown
(
bool
isWait
)
{
if
(
RobotBean
.
KNDIOValue
(
IO_Type
.
S
endWire
_Down
).
Equals
(
IO_VALUE
.
HIGH
)&&
RobotBean
.
KNDIOValue
(
IO_Type
.
S
endWire
_Up
).
Equals
(
IO_VALUE
.
LOW
))
if
(
RobotBean
.
KNDIOValue
(
IO_Type
.
S
oldering
_Down
).
Equals
(
IO_VALUE
.
HIGH
)&&
RobotBean
.
KNDIOValue
(
IO_Type
.
S
oldering
_Up
).
Equals
(
IO_VALUE
.
LOW
))
{
return
;
}
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Down
,
IO_VALUE
.
HIGH
);
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Up
,
IO_VALUE
.
LOW
);
RobotBean
.
KNDIOMove
(
IO_Type
.
Soldering_Down
,
IO_VALUE
.
HIGH
);
RobotBean
.
KNDIOMove
(
IO_Type
.
Soldering_Up
,
IO_VALUE
.
LOW
);
if
(
isWait
)
{
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Soldering_Down
,
IO_VALUE
.
HIGH
));
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Soldering_Up
,
IO_VALUE
.
LOW
));
}
}
public
static
void
SolderingUp
(
bool
isWait
)
{
RobotBean
.
KNDIOMove
(
IO_Type
.
Soldering_Down
,
IO_VALUE
.
LOW
);
RobotBean
.
KNDIOMove
(
IO_Type
.
Soldering_Up
,
IO_VALUE
.
HIGH
);
if
(
isWait
)
{
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Soldering_Down
,
IO_VALUE
.
LOW
));
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Soldering_Up
,
IO_VALUE
.
HIGH
));
}
}
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SendWire_Down
,
IO_VALUE
.
HIGH
));
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SendWire_Up
,
IO_VALUE
.
LOW
));
public
static
void
SendWireWork
(
bool
isWait
)
{
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Clear
,
IO_VALUE
.
LOW
);
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Work
,
IO_VALUE
.
HIGH
);
if
(
isWait
)
{
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SendWire_Clear
,
IO_VALUE
.
LOW
));
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SendWire_Work
,
IO_VALUE
.
HIGH
));
}
}
p
rivate
static
void
SendWireUp
(
)
p
ublic
static
void
SendWireClear
(
bool
isWait
)
{
//WeldLog(" 送丝上升" );
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Down
,
IO_VALUE
.
LOW
);
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Up
,
IO_VALUE
.
HIGH
);
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SendWire_Down
,
IO_VALUE
.
LOW
));
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SendWire_Up
,
IO_VALUE
.
HIGH
));
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Clear
,
IO_VALUE
.
LOW
);
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Work
,
IO_VALUE
.
HIGH
);
if
(
isWait
)
{
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SendWire_Clear
,
IO_VALUE
.
LOW
));
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SendWire_Work
,
IO_VALUE
.
HIGH
));
}
}
private
static
DateTime
preGetStatusTime
=
DateTime
.
Now
;
private
static
void
CheckWait
()
...
...
@@ -459,20 +480,20 @@ namespace URSoldering.DeviceLibrary
preCheckSendWireTime
=
DateTime
.
Now
;
//如果休眠了不需要处理
string
msg
=
""
;
if
(
RobotBean
.
KNDIOValue
(
IO_Type
.
SendWireLock
).
Equals
(
IO_VALUE
.
HIGH
))
{
//停止送丝器
SendWireManager
.
StopSend
();
msg
=
" 卡丝"
;
isAlarm
=
true
;
}
else
if
(
RobotBean
.
KNDIOValue
(
IO_Type
.
SendWireNoWire
).
Equals
(
IO_VALUE
.
HIGH
))
{
//停止送丝器
SendWireManager
.
StopSend
();
msg
=
"没有锡丝"
;
isAlarm
=
true
;
}
//
if (RobotBean.KNDIOValue(IO_Type.SendWireLock).Equals(IO_VALUE.HIGH))
//
{
//
//停止送丝器
//
SendWireManager.StopSend();
//
msg = " 卡丝";
//
isAlarm = true;
//
}
//
else if (RobotBean.KNDIOValue(IO_Type.SendWireNoWire).Equals(IO_VALUE.HIGH))
//
{
//
//停止送丝器
//
SendWireManager.StopSend();
//
msg = "没有锡丝";
//
isAlarm = true;
//
}
if
(
isAlarm
)
{
...
...
DeviceLibrary/Robot/soldering/WeldStepBean.cs
查看文件 @
637e6ef
...
...
@@ -107,7 +107,7 @@ namespace URSoldering.DeviceLibrary
}
else
{
weldPointList
=
(
from
m
in
weldP
ointList
where
m
.
pointType
.
Equals
(
pointType
)
&&
m
.
pointType
.
Equals
(
0
)
select
m
).
ToList
<
WeldPointInfo
>();
weldPointList
=
(
from
m
in
board
.
p
ointList
where
m
.
pointType
.
Equals
(
pointType
)
&&
m
.
pointType
.
Equals
(
0
)
select
m
).
ToList
<
WeldPointInfo
>();
}
if
(
weldPointList
.
Count
<=
0
)
{
...
...
DeviceLibrary/RobotConfig/solderingConfig/SolderingRobotConfig.csv
查看文件 @
637e6ef
...
...
@@ -39,4 +39,4 @@ PRO,焊接多少块板子后,清洗烙铁,ClearCount,1,,,,,,
PRO,清洗IO的毫秒数,ClearMSenconds,3000,,,,,,
PRO,JBC烙铁端口号,JBC_Soldering_Port,COM4,,,,,,
PRO,JBC烙铁编号,JBC_Soldering_Num,1,,,,,,
PRO,JBC送丝端口号,JBC_SendWire_Port,COM
1
,,,,,,
PRO,JBC送丝端口号,JBC_SendWire_Port,COM
6
,,,,,,
DeviceLibrary/bean/RobotBean.cs
查看文件 @
637e6ef
...
...
@@ -124,10 +124,10 @@ namespace URSoldering.DeviceLibrary
return
null
;
}
#
region
KNDIO
public
static
void
ConnectionIO
()
{
{
foreach
(
string
deviceName
in
baseConfig
.
DIODeviceNameList
)
{
if
(!
KNDManager
.
IsConnection
(
deviceName
))
...
...
@@ -136,8 +136,9 @@ namespace URSoldering.DeviceLibrary
System
.
Threading
.
Thread
.
Sleep
(
100
);
}
}
//连接上IO模块后就输出DO8
//KNDIOMove(IO_Type.DoorStatus, IO_VALUE.HIGH);
//连接上IO模块后,夹具夹紧
KNDIOMove
(
IO_Type
.
Fixture_Clamp
,
IO_VALUE
.
HIGH
);
KNDIOMove
(
IO_Type
.
Fixture_Relax
,
IO_VALUE
.
LOW
);
}
public
static
bool
ShuddenOK
()
...
...
DeviceLibrary/deviceLibrary/jbc/SendWireManager.cs
查看文件 @
637e6ef
...
...
@@ -54,13 +54,14 @@ namespace URSoldering.DeviceLibrary
if
(
sb
==
null
)
{
serialPort
=
port
;
new
SerialBean
(
serialPort
,
bautRate
,
parity
,
dataBits
,
stopBits
);
sb
=
new
SerialBean
(
serialPort
,
bautRate
,
parity
,
dataBits
,
stopBits
);
}
try
{
if
(
sb
.
openPort
())
{
bool
isOk
=
true
;
//parseCommand("WRSP", out isOk);
parseCommand
(
CMD_WriteMode
,
out
isOk
);
if
(
isOk
)
{
...
...
@@ -120,7 +121,7 @@ namespace URSoldering.DeviceLibrary
}
public
static
int
getReviceData
(
byte
[]
dataArray
)
{
string
temp
=
""
;
string
strData
=
""
;
try
{
if
(
dataArray
==
null
)
...
...
@@ -130,23 +131,24 @@ namespace URSoldering.DeviceLibrary
for
(
int
i
=
5
;
i
<=
9
;
i
++)
{
temp
+=
(
char
)
dataArray
[
i
]
+
""
;
strData
+=
dataArray
[
i
]
+
""
;
}
}
catch
(
Exception
ex
)
{
LOGGER
.
Info
(
"转换出错:"
+
ex
.
ToString
());
}
int
tem
=
0
;
///string rawMsg = Encoding.Default.GetString(dataArray, 0, dataArray.Length);
int
data
=
0
;
try
{
tem
=
Convert
.
ToInt32
(
temp
);
data
=
Convert
.
ToInt32
(
strData
);
}
catch
(
Exception
ex
)
{
LogUtil
.
debug
(
LOGGER
,
"转换
温度出错:"
+
temp
);
LogUtil
.
debug
(
LOGGER
,
"转换
出错:"
+
strData
);
}
return
tem
;
return
data
;
}
public
static
void
SendWire
(
double
time
,
int
speed
)
{
...
...
@@ -184,7 +186,7 @@ namespace URSoldering.DeviceLibrary
public
static
int
ReadPortError
()
{
bool
isOk
=
false
;
byte
[]
reviceData
=
parseCommand
(
"RECV"
,
out
isOk
);
byte
[]
reviceData
=
parseCommand
(
CMD_GetStatus
,
out
isOk
);
return
getReviceData
(
reviceData
);
}
...
...
@@ -202,7 +204,7 @@ namespace URSoldering.DeviceLibrary
int
value
=
getReviceData
(
reviceData
);
return
value
;
}
p
rivate
static
byte
[]
parseCommand
(
string
commandText
,
out
bool
isOk
)
p
ublic
static
byte
[]
parseCommand
(
string
commandText
,
out
bool
isOk
)
{
if
(
sb
==
null
)
{
...
...
@@ -210,12 +212,12 @@ namespace URSoldering.DeviceLibrary
return
null
;
}
byte
[]
message
=
new
byte
[
commandText
.
Length
+
2
];
message
[
0
]
=
(
byte
)
2
;
message
[
0
]
=
(
byte
)
0x0
2
;
for
(
int
i
=
1
;
i
<
commandText
.
Length
+
1
;
i
++)
{
message
[
i
]
=
(
byte
)
commandText
[
i
-
1
];
}
message
[
message
.
Length
-
1
]
=
(
byte
)
3
;
message
[
message
.
Length
-
1
]
=
(
byte
)
0x0
3
;
ushort
bcc
=
0
;
SerialBean
.
CalculateBCC
(
message
,
message
.
Length
,
out
bcc
);
...
...
@@ -235,10 +237,51 @@ namespace URSoldering.DeviceLibrary
{
data
=
new
byte
[
messageAll
.
Length
-
5
];
}
//data = new byte[messageAll.Length];
sb
.
SendCommand
(
messageAll
,
ref
data
,
2
,
out
isOk
);
string
rawMsg
=
Encoding
.
ASCII
.
GetString
(
data
,
0
,
data
.
Length
);
return
data
;
}
//private static byte[] parseCommand(string commandText, out bool isOk)
//{
// if (sb == null)
// {
// isOk = false;
// return null;
// }
// byte[] message = new byte[commandText.Length + 2];
// message[0] = (byte)2;
// for (int i = 1; i < commandText.Length + 1; i++)
// {
// message[i] = (byte)commandText[i - 1];
// }
// message[message.Length - 1] = (byte)3;
// ushort bcc = 0;
// SerialBean.CalculateBCC(message, message.Length, out bcc);
// /**
// * 读命令返回值包含数据域
// * 写命令返回值不包含数据域
// */
// byte[] data = null;
// byte[] messageAll = new byte[message.Length + 1];
// message.CopyTo(messageAll, 0);
// messageAll[messageAll.Length - 1] = (byte)bcc;
// if ("R".Equals(commandText.Substring(0, 1)))
// {
// data = new byte[messageAll.Length + 5];
// }
// else
// {
// data = new byte[messageAll.Length - 5];
// }
// sb.SendCommand(messageAll, ref data, 2, out isOk);
// string rawMsg = Encoding.ASCII.GetString(data, 0, data.Length);
// return data;
//}
public
static
string
GetErrorStr
(
int
error
)
{
...
...
LoadCVSLibrary/robotConfig/config/IO_Type.cs
查看文件 @
637e6ef
...
...
@@ -105,81 +105,77 @@ namespace URSoldering.LoadCSVLibrary
/// <summary>
/// DI DO 焊接阻挡下降端 StopCylinder_Down 焊接阻挡下降端 X03 DI-03
/// </summary>
public
static
string
StopCylinder_Down
=
"StopCylinder_Down"
;
/// <summary>
/// DI DO 焊接阻挡上升端 StopCylinder_Up 焊接阻挡上升端 X04 DI-04
/// </summary>
public
static
string
StopCylinder_Up
=
"StopCylinder_Up"
;
/// <summary>
/// DI DO 送丝气缸下降端 SendWire_Down 送丝气缸下降端 X05 DI-05
/// </summary>
public
static
string
SendWire_Down
=
"SendWire_Down"
;
/// <summary>
/// DI DO 送丝气缸上升端 SendWire_Up 送丝气缸上升端 X06 DI-06
/// </summary>
public
static
string
SendWire_Up
=
"SendWire_Up"
;
/// <summary>
/// DI 焊丝堵 SendWireNoWire 焊丝堵 X07 DI-07
/// </summary>
public
static
string
SendWireNoWire
=
"SendWireNoWire"
;
/// <summary>
/// DI 焊丝缺 SendWireLock 焊丝缺 X08 DI-08
/// </summary>
public
static
string
SendWireLock
=
"SendWireLock"
;
/// <summary>
/// DI 流水线入口检测 LineInCheck 流水线入口检测 X09 DI-09
/// </summary>
public
static
string
LineInCheck
=
"LineInCheck"
;
/// <summary>
/// DI 流水线焊接检测 LineWeldCheck 流水线焊接检测 X10 DI-10
/// </summary>
public
static
string
LineWeldCheck
=
"LineWeldCheck"
;
/// <summary>
/// DI 流水线出口检测 LineOutCheck 流水线出口检测 X11 DI-11
/// </summary>
public
static
string
LineOutCheck
=
"LineOutCheck"
;
/// <summary>
/// DI EpsonReady X14 DI-14
/// </summary>
public
static
string
EpsonReady
=
"EpsonReady"
;
/// <summary>
/// DI EpsonRunning X15 DI-15
/// </summary>
public
static
string
EpsonRunning
=
"EpsonRunning"
;
/// <summary>
/// DI EpsonAlarm X16 DI-16
/// </summary>
public
static
string
EpsonAlarm
=
"EpsonAlarm"
;
/// <summary>
/// DO 洗焊吹气启动SOL ClearWeldingSQL 洗焊吹气启动SOL Y05 DO-05
/// </summary>
public
static
string
ClearWeldingSQL
=
"ClearWeldingSQL"
;
/// <summary>
/// DO 流水线启动 LineStart 流水线启动 Y06 DO-06
/// </summary>
public
static
string
LineStart
=
"LineStart"
;
///// <summary>
///// DI DO 焊接阻挡下降端 StopCylinder_Down 焊接阻挡下降端 X03 DI-03
///// </summary>
//public static string StopCylinder_Down = "StopCylinder_Down";
///// <summary>
///// DI DO 焊接阻挡上升端 StopCylinder_Up 焊接阻挡上升端 X04 DI-04
///// </summary>
//public static string StopCylinder_Up = "StopCylinder_Up";
///// <summary>
///// DI DO 送丝气缸下降端 SendWire_Down 送丝气缸下降端 X05 DI-05
///// </summary>
//public static string SendWire_Down = "SendWire_Down";
///// <summary>
///// DI DO 送丝气缸上升端 SendWire_Up 送丝气缸上升端 X06 DI-06
///// </summary>
//public static string SendWire_Up = "SendWire_Up";
///// <summary>
///// DI 焊丝堵 SendWireNoWire 焊丝堵 X07 DI-07
///// </summary>
//public static string SendWireNoWire = "SendWireNoWire";
///// <summary>
///// DI 焊丝缺 SendWireLock 焊丝缺 X08 DI-08
///// </summary>
//public static string SendWireLock = "SendWireLock";
///// <summary>
///// DI 流水线入口检测 LineInCheck 流水线入口检测 X09 DI-09
///// </summary>
//public static string LineInCheck = "LineInCheck";
///// <summary>
///// DI 流水线焊接检测 LineWeldCheck 流水线焊接检测 X10 DI-10
///// </summary>
//public static string LineWeldCheck = "LineWeldCheck";
///// <summary>
///// DI 流水线出口检测 LineOutCheck 流水线出口检测 X11 DI-11
///// </summary>
//public static string LineOutCheck = "LineOutCheck";
/// <summary>
/// DO EpsonStart Y09 DO-09
/// </summary>
public
static
string
EpsonStart
=
"EpsonStart"
;
/// <summary>
/// DO EpsonStop Y10 DO-10
/// </summary>
public
static
string
EpsonStop
=
"EpsonStop"
;
/// <summary>
/// DO EpsonReset Y11 DO-11
/// </summary>
public
static
string
EpsonReset
=
"EpsonReset"
;
///// <summary>
///// DI EpsonReady X14 DI-14
///// </summary>
//public static string EpsonReady = "EpsonReady";
///// <summary>
///// DI EpsonRunning X15 DI-15
///// </summary>
//public static string EpsonRunning = "EpsonRunning";
///// <summary>
///// DI EpsonAlarm X16 DI-16
///// </summary>
//public static string EpsonAlarm = "EpsonAlarm";
///// <summary>
///// DO 洗焊吹气启动SOL ClearWeldingSQL 洗焊吹气启动SOL Y05 DO-05
///// </summary>
//public static string ClearWeldingSQL = "ClearWeldingSQL";
///// <summary>
///// DO 流水线启动 LineStart 流水线启动 Y06 DO-06
///// </summary>
//public static string LineStart = "LineStart";
///// <summary>
///// DO EpsonStart Y09 DO-09
///// </summary>
//public static string EpsonStart = "EpsonStart";
///// <summary>
///// DO EpsonStop Y10 DO-10
///// </summary>
//public static string EpsonStop = "EpsonStop";
///// <summary>
///// DO EpsonReset Y11 DO-11
///// </summary>
//public static string EpsonReset = "EpsonReset";
#
endregion
}
...
...
URSolderingClient/FrmBoardCopy.Designer.cs
查看文件 @
637e6ef
...
...
@@ -106,7 +106,7 @@
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
73
,
100
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
44
,
17
);
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
17
);
this
.
label1
.
TabIndex
=
269
;
this
.
label1
.
Text
=
"条码"
;
//
...
...
@@ -185,7 +185,6 @@
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
463
,
293
);
this
.
Controls
.
Add
(
this
.
panel1
);
this
.
Controls
.
Add
(
this
.
label14
);
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Name
=
"FrmBoardCopy"
;
this
.
Text
=
"新增程序"
;
this
.
Load
+=
new
System
.
EventHandler
(
this
.
FrmBoardInfo_Load
);
...
...
URSolderingClient/FrmBoardCopy.resx
查看文件 @
637e6ef
此文件的差异被折叠,
点击展开。
URSolderingClient/FrmBoardInfo.cs
查看文件 @
637e6ef
...
...
@@ -1031,10 +1031,9 @@ namespace URSoldering.Client
{
MessageBox
.
Show
(
"请先切换到自动模式!"
);
return
;
}
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Down
,
IO_VALUE
.
LOW
);
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Up
,
IO_VALUE
.
HIGH
);
}
WeldRobotBean
.
SendWireWork
(
false
);
WeldRobotBean
.
SolderingUp
(
false
);
URPointValue
point
=
WeldRobotBean
.
HomePoint
;
if
(
point
.
X
!=
0
&&
point
.
Y
!=
0
&&
point
.
Z
!=
0
)
{
...
...
@@ -1500,15 +1499,14 @@ namespace URSoldering.Client
private
void
btnWUp_Click
(
object
sender
,
EventArgs
e
)
{
if
(
btnWUp
.
Text
.
Equals
(
"送丝上升"
))
{
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Up
,
IO_VALUE
.
HIGH
);
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Down
,
IO_VALUE
.
LOW
);
{
WeldRobotBean
.
SolderingUp
(
false
);
btnWUp
.
Text
=
"送丝下降"
;
}
else
{
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Up
,
IO_VALUE
.
LOW
);
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Down
,
IO_VALUE
.
HIGH
);
WeldRobotBean
.
SolderingDown
(
false
);
btnWUp
.
Text
=
"送丝上升"
;
}
}
...
...
@@ -1516,8 +1514,8 @@ namespace URSoldering.Client
private
void
btnWDown_Click
(
object
sender
,
EventArgs
e
)
{
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Up
,
IO_VALUE
.
LOW
);
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Down
,
IO_VALUE
.
HIGH
);
//
RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.LOW);
//
RobotBean.KNDIOMove(IO_Type.SendWire_Down, IO_VALUE.HIGH);
}
private
void
btnSetClear1_Click
(
object
sender
,
EventArgs
e
)
...
...
@@ -1579,24 +1577,24 @@ namespace URSoldering.Client
private
void
btnStopDown_Click
(
object
sender
,
EventArgs
e
)
{
if
(
btnStopDown
.
Text
.
Equals
(
"阻挡气缸下降"
))
{
RobotBean
.
KNDIOMove
(
IO_Type
.
StopCylinder_Down
,
IO_VALUE
.
HIGH
);
RobotBean
.
KNDIOMove
(
IO_Type
.
StopCylinder_Up
,
IO_VALUE
.
LOW
);
btnStopDown
.
Text
=
"阻挡气缸上升"
;
}
else
{
RobotBean
.
KNDIOMove
(
IO_Type
.
StopCylinder_Down
,
IO_VALUE
.
LOW
);
RobotBean
.
KNDIOMove
(
IO_Type
.
StopCylinder_Up
,
IO_VALUE
.
HIGH
);
btnStopDown
.
Text
=
"阻挡气缸下降"
;
}
//
if (btnStopDown.Text.Equals("阻挡气缸下降"))
//
{
//
RobotBean.KNDIOMove(IO_Type.StopCylinder_Down, IO_VALUE.HIGH);
//
RobotBean.KNDIOMove(IO_Type.StopCylinder_Up, IO_VALUE.LOW);
//
btnStopDown.Text = "阻挡气缸上升";
//
}
//
else
//
{
//
RobotBean.KNDIOMove(IO_Type.StopCylinder_Down, IO_VALUE.LOW);
//
RobotBean.KNDIOMove(IO_Type.StopCylinder_Up, IO_VALUE.HIGH);
//
btnStopDown.Text = "阻挡气缸下降";
//
}
}
private
void
btnStopUp_Click
(
object
sender
,
EventArgs
e
)
{
RobotBean
.
KNDIOMove
(
IO_Type
.
StopCylinder_Down
,
IO_VALUE
.
LOW
);
RobotBean
.
KNDIOMove
(
IO_Type
.
StopCylinder_Up
,
IO_VALUE
.
HIGH
);
//
RobotBean.KNDIOMove(IO_Type.StopCylinder_Down, IO_VALUE.LOW);
//
RobotBean.KNDIOMove(IO_Type.StopCylinder_Up, IO_VALUE.HIGH);
}
private
void
btnPositionTest_Click
(
object
sender
,
EventArgs
e
)
...
...
URSolderingClient/FrmIoManager.Designer.cs
查看文件 @
637e6ef
此文件的差异被折叠,
点击展开。
URSolderingClient/FrmIoManager.cs
查看文件 @
637e6ef
...
...
@@ -82,9 +82,7 @@ namespace URSoldering.Client
cmbWriteIO
.
DataSource
=
new
List
<
ConfigIO
>(
RobotManager
.
robotConfig
.
RobotDOList
.
Values
);
cmbWriteIO
.
ValueMember
=
"ProName"
;
cmbWriteIO
.
DisplayMember
=
"DisplayStr"
;
cmbWriteValue
.
SelectedIndex
=
0
;
cmbWriteIO
.
SelectedIndex
=
0
;
cmbWriteIO_SelectedIndexChanged
(
null
,
null
);
}
private
void
btnReadIO_Click
(
object
sender
,
EventArgs
e
)
{
...
...
@@ -117,7 +115,11 @@ namespace URSoldering.Client
{
string
deviceName
=
txtDoName
.
Text
;
int
index
=
FormUtil
.
GetIntValue
(
txtDOIndex
);
IO_VALUE
value
=
(
IO_VALUE
)
cmbWriteValue
.
SelectedIndex
;
IO_VALUE
value
=
IO_VALUE
.
LOW
;
if
(
rdoHigh
.
Checked
)
{
value
=
IO_VALUE
.
HIGH
;
}
int
time
=
FormUtil
.
GetIntValue
(
txtWriteTime
);
int
slaveId
=
FormUtil
.
GetIntValue
(
txtSlaveId
);
if
(
time
>
0
)
...
...
@@ -165,19 +167,14 @@ namespace URSoldering.Client
private
void
btnReadAllDi_Click
(
object
sender
,
EventArgs
e
)
{
string
deviceName
=
txtDoName
.
Text
;
IO_VALUE
value
=
(
IO_VALUE
)
cmbWriteValue
.
SelectedIndex
;
int
time
=
FormUtil
.
GetIntValue
(
txtWriteTime
);
string
deviceName
=
txtDoName
.
Text
;
int
slaveId
=
FormUtil
.
GetIntValue
(
txtSlaveId
);
KNDManager
.
ReadMultipleDI
(
deviceName
,
(
byte
)
slaveId
,
(
ushort
)
KNDManager
.
DIStartAddress
,
16
);
}
private
void
btnReadAllDo_Click
(
object
sender
,
EventArgs
e
)
{
string
deviceName
=
txtDoName
.
Text
;
IO_VALUE
value
=
(
IO_VALUE
)
cmbWriteValue
.
SelectedIndex
;
int
time
=
FormUtil
.
GetIntValue
(
txtWriteTime
);
string
deviceName
=
txtDoName
.
Text
;
int
slaveId
=
FormUtil
.
GetIntValue
(
txtSlaveId
);
KNDManager
.
ReadMultipleDO
(
deviceName
,
(
byte
)
slaveId
,
(
ushort
)
KNDManager
.
DoStartAddress
,
16
);
}
...
...
@@ -187,7 +184,7 @@ namespace URSoldering.Client
if
(
RobotBean
.
ShuddenOK
().
Equals
(
false
))
{
lblMsg
.
Text
=
"急停未开"
;
if
(
this
.
btn
Clean
.
Enabled
)
if
(
this
.
btn
SendWireStop
.
Enabled
)
{
FormStatus
(
false
);
...
...
@@ -196,7 +193,7 @@ namespace URSoldering.Client
else
{
lblMsg
.
Text
=
""
;
if
(
this
.
btn
Clean
.
Enabled
==
false
)
if
(
this
.
btn
SendWireStop
.
Enabled
==
false
)
{
FormStatus
(
true
);
}
...
...
@@ -209,7 +206,7 @@ namespace URSoldering.Client
private
void
FormStatus
(
bool
isOpen
)
{
this
.
btn
Clean
.
Enabled
=
isOpen
;
this
.
btn
SendWireStop
.
Enabled
=
isOpen
;
this
.
btnWDown
.
Enabled
=
isOpen
;
this
.
btnWUp
.
Enabled
=
isOpen
;
...
...
@@ -218,15 +215,17 @@ namespace URSoldering.Client
this
.
btnStopSend
.
Enabled
=
isOpen
;
this
.
btnWStop
.
Enabled
=
isOpen
;
groupBox4
.
Enabled
=
isOpen
;
btn
Stop
Stop
.
Enabled
=
isOpen
;
btn
LineMove
.
Enabled
=
isOpen
;
btn
Fixture
Stop
.
Enabled
=
isOpen
;
btn
WireWork
.
Enabled
=
isOpen
;
}
private
void
btnSendWire_Click
(
object
sender
,
EventArgs
e
)
{
//匀速运动
int
speed
=
FormUtil
.
GetIntValue
(
txtSpeed
)
*
WeldRobotBean
.
SendWireXiShu
;
//SendWireManager.VolMove(WeldRobotBean.RobotConfig.SendWire_Slv, speed);
{
int
speed
=
FormUtil
.
GetIntValue
(
txtSpeed
);
int
length
=
FormUtil
.
GetIntValue
(
txtSendWireLength
);
SendWireManager
.
setLength
(
length
);
SendWireManager
.
setSpeed
(
speed
);
SendWireManager
.
StartFSend
();
}
private
void
btnStopSend_Click
(
object
sender
,
EventArgs
e
)
...
...
@@ -243,8 +242,11 @@ namespace URSoldering.Client
}
private
void
btnTestSend_Click
(
object
sender
,
EventArgs
e
)
{
int
position
=
FormUtil
.
GetIntValue
(
txtSendWirePosition
)
*
WeldRobotBean
.
SendWireXiShu
;
//SendWireManager.RelativeMove(WeldRobotBean.RobotConfig.SendWire_Slv, position);
int
speed
=
FormUtil
.
GetIntValue
(
txtSpeed
);
int
length
=
FormUtil
.
GetIntValue
(
txtSendWireLength
);
SendWireManager
.
setLength
(
length
);
SendWireManager
.
setSpeed
(
speed
);
SendWireManager
.
StartBSend
();
}
...
...
@@ -255,50 +257,62 @@ namespace URSoldering.Client
private
void
btnClean_Click
(
object
sender
,
EventArgs
e
)
{
this
.
btnClean
.
Enabled
=
false
;
RobotBean
.
KNDIOMove
(
IO_Type
.
ClearWeldingSQL
,
IO_VALUE
.
HIGH
);
Thread
.
Sleep
(
WeldRobotBean
.
RobotConfig
.
ClearMSenconds
);
RobotBean
.
KNDIOMove
(
IO_Type
.
ClearWeldingSQL
,
IO_VALUE
.
LOW
);
this
.
btnClean
.
Enabled
=
true
;
SendWireCylinderMove
(
IO_VALUE
.
LOW
,
IO_VALUE
.
LOW
);
}
private
void
SolderingCylinderMove
(
IO_VALUE
down
,
IO_VALUE
up
)
{
RobotBean
.
KNDIOMove
(
IO_Type
.
Soldering_Down
,
down
);
RobotBean
.
KNDIOMove
(
IO_Type
.
Soldering_Up
,
up
);
}
private
void
FixtureCylinderMove
(
IO_VALUE
clamp
,
IO_VALUE
relax
)
{
RobotBean
.
KNDIOMove
(
IO_Type
.
Fixture_Clamp
,
clamp
);
RobotBean
.
KNDIOMove
(
IO_Type
.
Fixture_Relax
,
relax
);
}
private
void
SendWireCylinderMove
(
IO_VALUE
work
,
IO_VALUE
clear
)
{
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Work
,
work
);
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Clear
,
clear
);
}
private
void
btnWDown_Click
(
object
sender
,
EventArgs
e
)
{
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Down
,
IO_VALUE
.
HIGH
);
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Up
,
IO_VALUE
.
LOW
);
{
SolderingCylinderMove
(
IO_VALUE
.
HIGH
,
IO_VALUE
.
LOW
);
}
private
void
btnWUp_Click
(
object
sender
,
EventArgs
e
)
{
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Down
,
IO_VALUE
.
LOW
);
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Up
,
IO_VALUE
.
HIGH
);
{
SolderingCylinderMove
(
IO_VALUE
.
LOW
,
IO_VALUE
.
HIGH
);
}
private
void
btnWStop_Click
(
object
sender
,
EventArgs
e
)
{
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Down
,
IO_VALUE
.
LOW
);
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Up
,
IO_VALUE
.
LOW
);
{
SolderingCylinderMove
(
IO_VALUE
.
LOW
,
IO_VALUE
.
LOW
);
}
private
void
btn
StopDown
_Click
(
object
sender
,
EventArgs
e
)
private
void
btn
FixtureClamp
_Click
(
object
sender
,
EventArgs
e
)
{
RobotBean
.
KNDIOMove
(
IO_Type
.
StopCylinder_Down
,
IO_VALUE
.
HIGH
);
RobotBean
.
KNDIOMove
(
IO_Type
.
StopCylinder_Up
,
IO_VALUE
.
LOW
);
FixtureCylinderMove
(
IO_VALUE
.
HIGH
,
IO_VALUE
.
LOW
);
}
private
void
btn
StopUp
_Click
(
object
sender
,
EventArgs
e
)
private
void
btn
FixtureReleax
_Click
(
object
sender
,
EventArgs
e
)
{
FixtureCylinderMove
(
IO_VALUE
.
LOW
,
IO_VALUE
.
HIGH
);
}
RobotBean
.
KNDIOMove
(
IO_Type
.
StopCylinder_Down
,
IO_VALUE
.
LOW
);
RobotBean
.
KNDIOMove
(
IO_Type
.
StopCylinder_Up
,
IO_VALUE
.
HIGH
);
private
void
btnFixtureStop_Click
(
object
sender
,
EventArgs
e
)
{
FixtureCylinderMove
(
IO_VALUE
.
LOW
,
IO_VALUE
.
LOW
);
}
private
void
btn
StopStop
_Click
(
object
sender
,
EventArgs
e
)
private
void
btn
WireWork
_Click
(
object
sender
,
EventArgs
e
)
{
RobotBean
.
KNDIOMove
(
IO_Type
.
StopCylinder_Down
,
IO_VALUE
.
LOW
);
RobotBean
.
KNDIOMove
(
IO_Type
.
StopCylinder_Up
,
IO_VALUE
.
LOW
);
SendWireCylinderMove
(
IO_VALUE
.
HIGH
,
IO_VALUE
.
LOW
);
}
private
void
btnWireClear_Click
(
object
sender
,
EventArgs
e
)
{
SendWireCylinderMove
(
IO_VALUE
.
HIGH
,
IO_VALUE
.
LOW
);
}
}
}
URSolderingClient/FrmIoManager.resx
查看文件 @
637e6ef
此文件的差异被折叠,
点击展开。
URSolderingClient/FrmOrgConfig.cs
查看文件 @
637e6ef
...
...
@@ -67,29 +67,29 @@ namespace URSoldering.Client
private
bool
isRun
=
false
;
private
void
timer_Elapsed
(
object
sender
,
EventArgs
e
)
{
if
(!
URRobotControl
.
IsRun
&&
isRun
.
Equals
(
false
))
{
Task
.
Factory
.
StartNew
(
delegate
()
{
bool
result
=
URRobotControl
.
StartRobot
();
if
(!
result
)
{
LogUtil
.
info
(
"连接失败:"
+
result
);
}
else
{
URRobotControl
.
FreeAxis
();
isAuto
=
false
;
}
});
isRun
=
true
;
}
else
{
URPointValue
lastP
=
URRobotControl
.
GetLastPosition
();
urRobotSControl1
.
ShowPoint
(
lastP
);
}
//
if (!URRobotControl.IsRun && isRun.Equals(false))
//
{
//
Task.Factory.StartNew(delegate ()
//
{
//
bool result = URRobotControl.StartRobot();
//
if (!result)
//
{
//
LogUtil.info("连接失败:" + result);
//
}
//
else
//
{
//
URRobotControl.FreeAxis();
//
isAuto = false;
//
}
//
});
//
isRun = true;
//
}
//
else
//
{
//
URPointValue lastP = URRobotControl.GetLastPosition();
//
urRobotSControl1.ShowPoint(lastP);
//
}
}
private
void
FrmBoardInfo_FormClosing
(
object
sender
,
FormClosingEventArgs
e
)
...
...
@@ -135,8 +135,8 @@ namespace URSoldering.Client
MessageBox
.
Show
(
"请先切换到自动模式!"
);
return
;
}
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Down
,
IO_VALUE
.
LOW
);
RobotBean
.
KNDIOMove
(
IO_Type
.
SendWire_Up
,
IO_VALUE
.
HIGH
);
//
RobotBean.KNDIOMove(IO_Type.SendWire_Down, IO_VALUE.LOW);
//
RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.HIGH);
URPointValue
point
=
WeldRobotBean
.
HomePoint
;
URRobotControl
.
MoveTo
(
point
);
...
...
URSolderingClient/FrmSendWire.Designer.cs
查看文件 @
637e6ef
此文件的差异被折叠,
点击展开。
URSolderingClient/FrmSendWire.cs
查看文件 @
637e6ef
using
log4net
;
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Linq
;
using
System
;
using
System.Reflection
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
using
URSoldering.Common
;
using
URSoldering.DeviceLibrary
;
...
...
@@ -131,15 +125,33 @@ namespace URSoldering.Client
private
void
btnReadError_Click_1
(
object
sender
,
EventArgs
e
)
{
int
speed
=
SendWireManager
.
querySpeed
();
int
length
=
SendWireManager
.
queryLength
();
int
value
=
SendWireManager
.
ReadPortError
();
txtPortError
.
Text
=
value
.
ToString
();
txtLength
.
Text
=
length
.
ToString
();
txtSpeed
.
Text
=
speed
.
ToString
();
}
private
void
btnReset_Click
(
object
sender
,
EventArgs
e
)
{
SendWireManager
.
Reset
();
}
private
void
btnSend_Click
(
object
sender
,
EventArgs
e
)
{
txtRevice
.
Text
=
""
;
string
text
=
txtSend
.
Text
;
bool
isOk
=
false
;
byte
[]
reviceData
=
SendWireManager
.
parseCommand
(
text
,
out
isOk
);
int
length
=
reviceData
.
Length
-
3
;
if
(
length
<=
0
)
{
length
=
reviceData
.
Length
;
}
string
rawMsg
=
Encoding
.
ASCII
.
GetString
(
reviceData
,
1
,
length
);
txtRevice
.
Text
=
rawMsg
;
}
}
}
URSolderingClient/FrmSoldDebug.Designer.cs
查看文件 @
637e6ef
...
...
@@ -230,7 +230,7 @@ namespace URSoldering.Client
//
// btnCloseSold
//
this
.
btnCloseSold
.
Location
=
new
System
.
Drawing
.
Point
(
439
,
40
);
this
.
btnCloseSold
.
Location
=
new
System
.
Drawing
.
Point
(
439
,
39
);
this
.
btnCloseSold
.
Name
=
"btnCloseSold"
;
this
.
btnCloseSold
.
Size
=
new
System
.
Drawing
.
Size
(
117
,
35
);
this
.
btnCloseSold
.
TabIndex
=
266
;
...
...
@@ -240,7 +240,7 @@ namespace URSoldering.Client
//
// txtSoldingCom
//
this
.
txtSoldingCom
.
Location
=
new
System
.
Drawing
.
Point
(
125
,
4
1
);
this
.
txtSoldingCom
.
Location
=
new
System
.
Drawing
.
Point
(
125
,
4
5
);
this
.
txtSoldingCom
.
Name
=
"txtSoldingCom"
;
this
.
txtSoldingCom
.
Size
=
new
System
.
Drawing
.
Size
(
101
,
23
);
this
.
txtSoldingCom
.
TabIndex
=
265
;
...
...
@@ -248,7 +248,7 @@ namespace URSoldering.Client
// label8
//
this
.
label8
.
AutoSize
=
true
;
this
.
label8
.
Location
=
new
System
.
Drawing
.
Point
(
64
,
4
6
);
this
.
label8
.
Location
=
new
System
.
Drawing
.
Point
(
64
,
4
8
);
this
.
label8
.
Name
=
"label8"
;
this
.
label8
.
Size
=
new
System
.
Drawing
.
Size
(
56
,
17
);
this
.
label8
.
TabIndex
=
264
;
...
...
URSolderingClient/FrmSoldDebug.resx
查看文件 @
637e6ef
...
...
@@ -112,21 +112,21 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=
2
.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=
4
.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=
2
.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=
4
.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=
2
.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=
4
.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=
2
.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=
4
.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>107, 17</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=
2
.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=
4
.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=
2
.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=
4
.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>78</value>
</metadata>
</root>
\ No newline at end of file
URSolderingClient/FrmSolderingSetting.Designer.cs
查看文件 @
637e6ef
...
...
@@ -313,7 +313,7 @@
this
.
groupBox5
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox5
.
Location
=
new
System
.
Drawing
.
Point
(
305
,
270
);
this
.
groupBox5
.
Name
=
"groupBox5"
;
this
.
groupBox5
.
Size
=
new
System
.
Drawing
.
Size
(
4
1
4
,
260
);
this
.
groupBox5
.
Size
=
new
System
.
Drawing
.
Size
(
4
0
4
,
260
);
this
.
groupBox5
.
TabIndex
=
42
;
this
.
groupBox5
.
TabStop
=
false
;
this
.
groupBox5
.
Text
=
"机械臂活动范围"
;
...
...
URSolderingClient/FrmWeldPointInfo.Designer.cs
查看文件 @
637e6ef
...
...
@@ -120,7 +120,7 @@
this
.
groupBox1
.
Controls
.
Add
(
this
.
label1
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
21
,
19
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
47
5
,
119
);
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
47
0
,
119
);
this
.
groupBox1
.
TabIndex
=
59
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"焊点基本信息"
;
...
...
@@ -213,23 +213,23 @@
//
this
.
groupBox2
.
Controls
.
Add
(
this
.
urRobot
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnUpdate
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
502
,
135
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
499
,
139
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
202
,
3
10
);
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
202
,
3
06
);
this
.
groupBox2
.
TabIndex
=
60
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"坐标"
;
//
// urRobot
//
this
.
urRobot
.
Location
=
new
System
.
Drawing
.
Point
(
18
,
30
);
this
.
urRobot
.
Location
=
new
System
.
Drawing
.
Point
(
18
,
27
);
this
.
urRobot
.
Name
=
"urRobot"
;
this
.
urRobot
.
Size
=
new
System
.
Drawing
.
Size
(
156
,
212
);
this
.
urRobot
.
TabIndex
=
70
;
//
// btnUpdate
//
this
.
btnUpdate
.
Location
=
new
System
.
Drawing
.
Point
(
54
,
2
64
);
this
.
btnUpdate
.
Location
=
new
System
.
Drawing
.
Point
(
54
,
2
58
);
this
.
btnUpdate
.
Name
=
"btnUpdate"
;
this
.
btnUpdate
.
Size
=
new
System
.
Drawing
.
Size
(
120
,
35
);
this
.
btnUpdate
.
TabIndex
=
69
;
...
...
@@ -275,7 +275,7 @@
this
.
gbIron
.
Controls
.
Add
(
this
.
txtDweldTime
);
this
.
gbIron
.
Location
=
new
System
.
Drawing
.
Point
(
21
,
139
);
this
.
gbIron
.
Name
=
"gbIron"
;
this
.
gbIron
.
Size
=
new
System
.
Drawing
.
Size
(
47
5
,
188
);
this
.
gbIron
.
Size
=
new
System
.
Drawing
.
Size
(
47
0
,
188
);
this
.
gbIron
.
TabIndex
=
55
;
this
.
gbIron
.
TabStop
=
false
;
this
.
gbIron
.
Text
=
"烙铁温度"
;
...
...
@@ -522,7 +522,7 @@
this
.
gbWireFeeding
.
Controls
.
Add
(
this
.
txtDsendWireTime
);
this
.
gbWireFeeding
.
Location
=
new
System
.
Drawing
.
Point
(
21
,
329
);
this
.
gbWireFeeding
.
Name
=
"gbWireFeeding"
;
this
.
gbWireFeeding
.
Size
=
new
System
.
Drawing
.
Size
(
47
5
,
116
);
this
.
gbWireFeeding
.
Size
=
new
System
.
Drawing
.
Size
(
47
0
,
116
);
this
.
gbWireFeeding
.
TabIndex
=
56
;
this
.
gbWireFeeding
.
TabStop
=
false
;
this
.
gbWireFeeding
.
Text
=
"送丝"
;
...
...
URSolderingClient/FrmWork.Designer.cs
查看文件 @
637e6ef
...
...
@@ -58,6 +58,7 @@
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblAOIResult
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
btnWeld
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
panel2
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
lblRobotWarnMsg
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnStart
=
new
System
.
Windows
.
Forms
.
Button
();
...
...
@@ -310,6 +311,7 @@
//
this
.
groupBox1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnWeld
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
panel2
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnStart
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnBack
);
...
...
@@ -321,15 +323,26 @@
this
.
groupBox1
.
TabIndex
=
268
;
this
.
groupBox1
.
TabStop
=
false
;
//
// btnWeld
//
this
.
btnWeld
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnWeld
.
Location
=
new
System
.
Drawing
.
Point
(
145
,
16
);
this
.
btnWeld
.
Name
=
"btnWeld"
;
this
.
btnWeld
.
Size
=
new
System
.
Drawing
.
Size
(
133
,
52
);
this
.
btnWeld
.
TabIndex
=
271
;
this
.
btnWeld
.
Text
=
"开始焊接"
;
this
.
btnWeld
.
UseVisualStyleBackColor
=
true
;
this
.
btnWeld
.
Click
+=
new
System
.
EventHandler
(
this
.
btnWeld_Click
);
//
// panel2
//
this
.
panel2
.
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
.
panel2
.
Controls
.
Add
(
this
.
lblRobotWarnMsg
);
this
.
panel2
.
Location
=
new
System
.
Drawing
.
Point
(
435
,
11
);
this
.
panel2
.
Location
=
new
System
.
Drawing
.
Point
(
518
,
11
);
this
.
panel2
.
Name
=
"panel2"
;
this
.
panel2
.
Size
=
new
System
.
Drawing
.
Size
(
1
149
,
59
);
this
.
panel2
.
Size
=
new
System
.
Drawing
.
Size
(
1
066
,
59
);
this
.
panel2
.
TabIndex
=
270
;
//
// lblRobotWarnMsg
...
...
@@ -340,7 +353,7 @@
this
.
lblRobotWarnMsg
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblRobotWarnMsg
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
3
);
this
.
lblRobotWarnMsg
.
Name
=
"lblRobotWarnMsg"
;
this
.
lblRobotWarnMsg
.
Size
=
new
System
.
Drawing
.
Size
(
1
139
,
51
);
this
.
lblRobotWarnMsg
.
Size
=
new
System
.
Drawing
.
Size
(
1
056
,
51
);
this
.
lblRobotWarnMsg
.
TabIndex
=
4
;
//
// btnStart
...
...
@@ -348,7 +361,7 @@
this
.
btnStart
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnStart
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
16
);
this
.
btnStart
.
Name
=
"btnStart"
;
this
.
btnStart
.
Size
=
new
System
.
Drawing
.
Size
(
1
50
,
52
);
this
.
btnStart
.
Size
=
new
System
.
Drawing
.
Size
(
1
33
,
52
);
this
.
btnStart
.
TabIndex
=
266
;
this
.
btnStart
.
Text
=
"启动"
;
this
.
btnStart
.
UseVisualStyleBackColor
=
true
;
...
...
@@ -369,9 +382,9 @@
// btnStop
//
this
.
btnStop
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnStop
.
Location
=
new
System
.
Drawing
.
Point
(
162
,
16
);
this
.
btnStop
.
Location
=
new
System
.
Drawing
.
Point
(
284
,
17
);
this
.
btnStop
.
Name
=
"btnStop"
;
this
.
btnStop
.
Size
=
new
System
.
Drawing
.
Size
(
1
50
,
52
);
this
.
btnStop
.
Size
=
new
System
.
Drawing
.
Size
(
1
33
,
52
);
this
.
btnStop
.
TabIndex
=
265
;
this
.
btnStop
.
Text
=
"停止"
;
this
.
btnStop
.
UseVisualStyleBackColor
=
true
;
...
...
@@ -381,7 +394,7 @@
//
this
.
chbHigh
.
AutoSize
=
true
;
this
.
chbHigh
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbHigh
.
Location
=
new
System
.
Drawing
.
Point
(
330
,
30
);
this
.
chbHigh
.
Location
=
new
System
.
Drawing
.
Point
(
424
,
31
);
this
.
chbHigh
.
Name
=
"chbHigh"
;
this
.
chbHigh
.
Size
=
new
System
.
Drawing
.
Size
(
93
,
25
);
this
.
chbHigh
.
TabIndex
=
267
;
...
...
@@ -878,5 +891,6 @@
private
System
.
Windows
.
Forms
.
Label
lblCode
;
private
System
.
Windows
.
Forms
.
Label
lblProName
;
private
System
.
Windows
.
Forms
.
Label
label2
;
private
System
.
Windows
.
Forms
.
Button
btnWeld
;
}
}
\ No newline at end of file
URSolderingClient/FrmWork.cs
查看文件 @
637e6ef
...
...
@@ -932,6 +932,12 @@ namespace URSoldering.Client
private
void
FrmWork_Shown
(
object
sender
,
EventArgs
e
)
{
LoadCountPoint
(
true
);
}
}
private
void
btnWeld_Click
(
object
sender
,
EventArgs
e
)
{
//如果开始焊接,开始焊接
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论