Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
URSolderingRobot
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit fa888d67
由
几米阳光
编写于
2018-07-20 15:56:33 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
代码修改
1 个父辈
c00f7091
全部展开
显示空白字符变更
内嵌
并排
正在显示
29 个修改的文件
包含
189 行增加
和
554 行删除
Common/util/AcSerialBean.cs
DeviceLibrary/Robot/LineSolderingRobot.cs
DeviceLibrary/Robot/LineStepBean.cs
DeviceLibrary/Robot/MoveType.cs
DeviceLibrary/Robot/soldering/WeldRobotBean.cs
DeviceLibrary/Robot/soldering/WeldRobotBean_Partial.cs
DeviceLibrary/bean/BoardInfo.cs
DeviceLibrary/bean/BoardManager.cs
DeviceLibrary/bean/RobotBean.cs
DeviceLibrary/bean/RobotManager.cs
DeviceLibrary/deviceLibrary/jbc/SendWireManager.cs
DeviceLibrary/deviceLibrary/jbc/SolderingManager.cs
URSolderingClient/FrmBoardInfo.Designer.cs
URSolderingClient/FrmBoardInfo.cs
URSolderingClient/FrmBoardList.cs
URSolderingClient/FrmBoardSelect.cs
URSolderingClient/FrmCamera.cs
URSolderingClient/FrmCodeLearn.cs
URSolderingClient/FrmDebugMenu.cs
URSolderingClient/FrmIoManager.Designer.cs
URSolderingClient/FrmIoManager.cs
URSolderingClient/FrmMenu.cs
URSolderingClient/FrmOrgConfig.cs
URSolderingClient/FrmSendWire.Designer.cs
URSolderingClient/FrmSendWire.cs
URSolderingClient/FrmSoldDebug.Designer.cs
URSolderingClient/FrmSoldDebug.cs
URSolderingClient/FrmWork.cs
URSolderingClient/FrmWorkCount.cs
Common/util/AcSerialBean.cs
查看文件 @
fa888d6
...
...
@@ -477,14 +477,14 @@ namespace URSoldering.Common
/// </summary>
/// <param name="bytes"></param>
/// <returns></returns>
public
static
string
byteToHexStr
(
byte
[]
bytes
)
public
static
string
byteToHexStr
(
byte
[]
bytes
,
string
spilt
)
{
string
returnStr
=
""
;
if
(
bytes
!=
null
)
{
for
(
int
i
=
0
;
i
<
bytes
.
Length
;
i
++)
{
returnStr
+=
bytes
[
i
].
ToString
(
"X2"
);
returnStr
+=
bytes
[
i
].
ToString
(
"X2"
)
+
spilt
;
}
}
return
returnStr
;
...
...
DeviceLibrary/Robot/LineSolderingRobot.cs
查看文件 @
fa888d6
...
...
@@ -29,7 +29,6 @@ namespace URSoldering.DeviceLibrary
public
bool
RobotReset
()
{
alarmType
=
AlarmType
.
None
;
mainTimer
.
Enabled
=
false
;
ledTimer
.
Enabled
=
false
;
...
...
@@ -70,7 +69,6 @@ namespace URSoldering.DeviceLibrary
KNDIOMove
(
IO_Type
.
WaitSingle
,
IO_VALUE
.
LOW
);
KNDIOMove
(
IO_Type
.
DeviceRunON
,
IO_VALUE
.
LOW
);
IsInProcess
=
false
;
ledTimer
.
Enabled
=
true
;
mainTimer
.
Enabled
=
true
;
...
...
@@ -86,7 +84,6 @@ namespace URSoldering.DeviceLibrary
LogUtil
.
error
(
RobotName
+
WarnMsg
);
IsInSuddendown
=
true
;
Alarm
(
AlarmType
.
SuddenStop
);
}
private
bool
IsInProcess
=
false
;
protected
override
void
mainTimer_Elapsed
(
object
sender
,
ElapsedEventArgs
e
)
...
...
@@ -136,7 +133,6 @@ namespace URSoldering.DeviceLibrary
}
else
if
(
Status
.
Equals
(
RobotStatus
.
LineMove
))
{
}
}
}
catch
(
Exception
ex
)
...
...
@@ -178,7 +174,6 @@ namespace URSoldering.DeviceLibrary
}
}
private
void
StopMove
()
{
KNDIOMove
(
IO_Type
.
DeviceRunON
,
IO_VALUE
.
LOW
);
...
...
DeviceLibrary/Robot/LineStepBean.cs
查看文件 @
fa888d6
...
...
@@ -73,9 +73,6 @@ namespace URSoldering.DeviceLibrary
IsInWait
=
false
;
WaitList
=
new
List
<
WaitResultInfo
>();
}
public
List
<
WaitResultInfo
>
WaitList
=
new
List
<
WaitResultInfo
>();
}
}
\ No newline at end of file
DeviceLibrary/Robot/MoveType.cs
查看文件 @
fa888d6
...
...
@@ -46,12 +46,12 @@ namespace URSoldering.DeviceLibrary
wait
.
IsEnd
=
false
;
return
wait
;
}
public
static
WaitResultInfo
WaitS
huoKe
(
int
slvAddr
,
bool
isR
)
public
static
WaitResultInfo
WaitS
endWire
(
int
MScends
,
bool
isR
)
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
ShuoKeISReverse
=
isR
;
wait
.
WaitType
=
5
;
wait
.
SlvAddr
=
(
byte
)
slvAddr
;
wait
.
TimeMSeconds
=
MScends
;
wait
.
IsEnd
=
false
;
return
wait
;
}
...
...
@@ -91,7 +91,7 @@ namespace URSoldering.DeviceLibrary
}
}
/// <summary>
/// 等待结果,1=IO运动,2=时间 ,3=机器人运动OK,4=温度设置结束,5=
硕科步进驱动器
,6=等待爱普生机器人连接。
/// 等待结果,1=IO运动,2=时间 ,3=机器人运动OK,4=温度设置结束,5=
送丝结束
,6=等待爱普生机器人连接。
/// 11=等待IAI压机伺服ON,12=等待IAI伺服到待机点,13=等待IAI伺服程序运行OK,14=等待IAI压机原点返回完成
/// </summary>
public
int
WaitType
{
get
;
set
;
}
...
...
@@ -237,7 +237,6 @@ namespace URSoldering.DeviceLibrary
Home_5_ToOrg
=
105
,
/// <summary>
/// 阻挡气缸上升
/// </summary>
...
...
@@ -285,7 +284,6 @@ namespace URSoldering.DeviceLibrary
///焊接结束处理: 流水线倒转,等待流水线入料口信号
/// </summary>
BUSY06_WaitInSingle
=
1106
,
}
/// <summary>
/// 焊接点的时间记录
...
...
DeviceLibrary/Robot/soldering/WeldRobotBean.cs
查看文件 @
fa888d6
...
...
@@ -105,7 +105,6 @@ namespace URSoldering.DeviceLibrary
WarnMsg
=
"连接UR机器人失败"
;
}
});
//SendWireManager.Init();
SolderingManager
.
Init
(
RobotConfig
.
JBC_Soldering_Port
,
RobotConfig
.
JBC_Soldering_Num
);
SendWireManager
.
Init
(
RobotConfig
.
JBC_SendWire_Port
);
...
...
@@ -312,44 +311,35 @@ namespace URSoldering.DeviceLibrary
/// </summary>
private
static
void
CheckSendWireAlarm
()
{
//preCheckSendWireTime = DateTime.Now;
////如果休眠了不需要处理
//if (RobotBean.KNDIOValue(IO_Type.SendWireLock).Equals(IO_VALUE.HIGH))
//{
// //停止送丝器
// SendWireManager.SuddownStop(RobotConfig.SendWire_Slv);
// WarnMsg = "送丝报警:卡丝";
// Alarm(AlarmType.SendWireAlarm);
// LogUtil.error(RobotName + WarnMsg);
// ISAlarmAndOk = false;
//}
//else if (RobotBean.KNDIOValue(IO_Type.SendWireNoWire).Equals(IO_VALUE.HIGH))
//{
// //停止送丝器
// SendWireManager.SuddownStop(RobotConfig.SendWire_Slv);
// WarnMsg = "送丝报警:没有锡丝";
// Alarm(AlarmType.SendWireAlarm);
// LogUtil.error(RobotName + WarnMsg);
// ISAlarmAndOk = false;
//}
//else
//{
// if (alarmType.Equals(AlarmType.SendWireAlarm) && IsInSudden.Equals(false) && IsNoAir.Equals(false))
// {
// if (ISAlarmAndOk)
// {
// TimeSpan span = DateTime.Now - lastSendWireOkTime;
// int needSeconds=ConfigAppSettings.GetIntValue(Setting_Init.SendWireRecoverSeconds);
// if (span.TotalSeconds > needSeconds)
// {
// WarnMsg = "";
// alarmType = AlarmType.None;
// WarnMsg = "";
// LogUtil.info(RobotName + "送丝器已恢复超过【" + needSeconds + "】秒,消除送丝器报警!");
// }
// }
// }
//}
preCheckSendWireTime
=
DateTime
.
Now
;
//如果休眠了不需要处理
if
(
SendWireManager
.
IsAlarm
())
{
SendWireManager
.
Reset
();
if
(
SendWireManager
.
IsAlarm
())
{
//停止送丝器
SendWireManager
.
StopSend
();
WarnMsg
=
"送丝器报警"
;
Alarm
(
AlarmType
.
SendWireAlarm
);
LogUtil
.
error
(
RobotName
+
WarnMsg
);
}
}
else
{
if
(
alarmType
.
Equals
(
AlarmType
.
SendWireAlarm
)
&&
IsInSudden
.
Equals
(
false
)
&&
IsNoAir
.
Equals
(
false
))
{
TimeSpan
span
=
DateTime
.
Now
-
lastSendWireOkTime
;
int
needSeconds
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
SendWireRecoverSeconds
);
if
(
span
.
TotalSeconds
>
needSeconds
)
{
WarnMsg
=
""
;
alarmType
=
AlarmType
.
None
;
WarnMsg
=
""
;
LogUtil
.
info
(
RobotName
+
"送丝器已恢复超过【"
+
needSeconds
+
"】秒,消除送丝器报警!"
);
}
}
}
}
/// <summary>
/// 卡丝恢复功能,只有手动点了才会继续
...
...
@@ -358,28 +348,24 @@ 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
(
SendWireManager
.
IsAlarm
())
{
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
...
...
DeviceLibrary/Robot/soldering/WeldRobotBean_Partial.cs
查看文件 @
fa888d6
...
...
@@ -2,8 +2,6 @@
using
URSoldering.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading
;
namespace
URSoldering.DeviceLibrary
...
...
@@ -310,8 +308,8 @@ namespace URSoldering.DeviceLibrary
int
speed
=
(
int
)
WeldMoveStep
.
CurrPoint
.
startSendWireSpeed
*
SendWireXiShu
;
WeldLog
(
" 慢速送丝,速度:"
+
speed
+
" :"
+
time
.
ToString
()
+
"秒"
);
SendWireManager
.
SendWire
(
time
,
speed
);
int
ms
=
(
int
)(
time
*
1000
);
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
Wait
Time
(
ms
));
int
ms
=
(
int
)(
time
*
1000
+
100
);
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
Wait
SendWire
(
ms
,
false
));
}
else
{
...
...
@@ -327,8 +325,8 @@ namespace URSoldering.DeviceLibrary
if
(
time
>
0
)
{
SendWireManager
.
SendWire
(
time
,
speed
);
int
ms
=
(
int
)(
time
*
1000
);
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
Wait
Time
(
ms
));
int
ms
=
(
int
)(
time
*
1000
+
100
);
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
Wait
SendWire
(
ms
,
false
));
}
}
public
static
void
SolderingDown
(
bool
isWait
)
...
...
@@ -416,7 +414,7 @@ namespace URSoldering.DeviceLibrary
{
if
(
span
.
TotalMilliseconds
<
wait
.
TimeMSeconds
)
{
NotOkMsg
=
"时间["
+
wait
.
TimeMSeconds
+
"]毫秒"
;
NotOkMsg
=
"时间["
+
wait
.
TimeMSeconds
+
"]毫秒"
;
isOk
=
false
;
break
;
}
...
...
@@ -476,55 +474,32 @@ namespace URSoldering.DeviceLibrary
{
if
(
WeldMoveStep
.
ResetCount
<
3
)
{
//判断是否报警
isAlarm
=
SendWireManager
.
IsAlarm
();
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
(
isAlarm
)
{
SendWireManager
.
StopSend
();
WeldMoveStep
.
ResetCount
++;
SendWireManager
.
Reset
();
//反向送丝
int
speed
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
ReverseSendWireSpeed
)
*
SendWireXiShu
;
double
time
s
=
(
double
)
ConfigAppSettings
.
GetNumValue
(
Setting_Init
.
ReverseSendWireTime
);
if
(
speed
.
Equals
(
0
)
||
time
s
<=
0
)
double
time
=
(
double
)
ConfigAppSettings
.
GetNumValue
(
Setting_Init
.
ReverseSendWireTime
);
if
(
speed
.
Equals
(
0
)
||
time
<=
0
)
{
isAlarm
=
false
;
LogUtil
.
error
(
"焊接中第【"
+
WeldMoveStep
.
ResetCount
+
"】次 检测到
"
+
msg
+
"
, 速度【"
+
speed
+
"】时间【"
+
times
+
"】配置不完整,不反转处理"
);
LogUtil
.
error
(
"焊接中第【"
+
WeldMoveStep
.
ResetCount
+
"】次 检测到
送丝器报警
, 速度【"
+
speed
+
"】时间【"
+
times
+
"】配置不完整,不反转处理"
);
}
else
{
LogUtil
.
error
(
"焊接中第【"
+
WeldMoveStep
.
ResetCount
+
"】次 检测到"
+
msg
+
", 开始反向送丝,速度【"
+
speed
+
"】时间【"
+
times
+
"】"
);
//WeldMoveStep.LastSetpTime = DateTime.Now;
//WeldMoveStep.WaitList.Clear();
////设置速度
//SendWireManager.SetMoveSpeed(RobotConfig.SendWire_Slv, speed);
LogUtil
.
error
(
"焊接中第【"
+
WeldMoveStep
.
ResetCount
+
"】次 检测到送丝器报警, 开始反向送丝,速度【"
+
speed
+
"】时间【"
+
times
+
"】"
);
WeldMoveStep
.
LastSetpTime
=
DateTime
.
Now
;
WeldMoveStep
.
WaitList
.
Clear
();
//int shuokeRel = (int)times * speed;
//if (shuokeRel < 0)
//{
// shuokeRel = 0 - shuokeRel;
//}
//SendWireManager.RelativeMove(RobotConfig.SendWire_Slv, shuokeRel);
////硕科步进驱动走对应的相对位置
//WeldMoveStep.WaitList.Add(WaitResultInfo.WaitShuoKe(RobotConfig.SendWire_Slv, true));
//Thread.Sleep(100);
//SendWireManager.GetStatus(RobotConfig.SendWire_Slv);
SendWireManager
.
SendWireBack
(
time
,
speed
);
int
ms
=
(
int
)((
time
*
1000
)
+
100
);
WeldMoveStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitSendWire
(
ms
,
false
));
isOk
=
false
;
}
}
...
...
@@ -533,15 +508,13 @@ namespace URSoldering.DeviceLibrary
if
(
wait
.
ShuoKeISReverse
.
Equals
(
false
)
&&
isAlarm
.
Equals
(
false
))
{
//if (!SendWireManager.IsMoveEnd(wait.SlvAddr, WeldMoveStep.LastSetpTime))
//{
// NotOkMsg = "送丝结束";
// isOk = false;
// SendWireManager.GetStatus(wait.SlvAddr);
// break;
//}
//else if (WeldMoveStep.OneWaitOk)
if
(
span
.
TotalMilliseconds
<
wait
.
TimeMSeconds
)
{
NotOkMsg
=
"送丝时间["
+
wait
.
TimeMSeconds
+
"]毫秒"
;
isOk
=
false
;
break
;
}
else
if
(
WeldMoveStep
.
OneWaitOk
)
{
isOk
=
true
;
break
;
...
...
@@ -549,25 +522,19 @@ namespace URSoldering.DeviceLibrary
}
else
if
(
wait
.
ShuoKeISReverse
.
Equals
(
true
)
&&
isAlarm
.
Equals
(
false
))
{
//if (!SendWireManager.IsMoveEnd(wait.SlvAddr, WeldMoveStep.LastSetpTime))
//{
// NotOkMsg = "送丝反转";
// isOk = false;
// //TimeSpan getStatusSpan = DateTime.Now - preGetStatusTime;
// //if (getStatusSpan.TotalSeconds >= 1)
// //{
// // preGetStatusTime = DateTime.Now;
// //SendWireManager.GetStatus(wait.SlvAddr);
// //}
// break;
//}
//else
//{
// //反转已经停止,直接重新运行次步骤
// //MoveStep step = (MoveStep)((int)WeldMoveStep.moveStep - 1);
// LogUtil.info(RobotName + " 送丝反转结束,重新开始当前焊点焊接");
// WeldMoveStep.NextMoveStep(MoveStep.Wait);
//}
if
(
span
.
TotalMilliseconds
<
wait
.
TimeMSeconds
)
{
NotOkMsg
=
"送丝时间["
+
wait
.
TimeMSeconds
+
"]毫秒"
;
isOk
=
false
;
break
;
}
else
{
//反转已经停止,直接重新运行次步骤
//MoveStep step = (MoveStep)((int)WeldMoveStep.moveStep - 1);
LogUtil
.
info
(
RobotName
+
" 送丝反转结束,重新开始当前焊点焊接"
);
WeldMoveStep
.
NextMoveStep
(
MoveStep
.
Wait
);
}
}
}
else
if
(
wait
.
WaitType
==
6
)
...
...
DeviceLibrary/bean/BoardInfo.cs
查看文件 @
fa888d6
...
...
@@ -16,10 +16,6 @@ namespace URSoldering.DeviceLibrary
/// 平均焊接时间
/// </summary>
public
TimeSpan
WeldTime
=
new
TimeSpan
(
0
);
//public SProgramInfo getProgram()
// {
// return SProgramManager.getByPartNum(PartNumber);
// }
/// <summary>
/// 电路板ID
/// </summary>
...
...
@@ -195,43 +191,18 @@ namespace URSoldering.DeviceLibrary
public
double
RobotRY
{
get
;
set
;
}
public
double
RobotRZ
{
get
;
set
;
}
///// <summary>
///// x坐标
///// </summary>
//public double PositionX { get; set; }
///// <summary>
///// y坐标
///// </summary>
//public double PositionY { get; set; }
///// <summary>
///// u坐标
///// </summary>
//public double PositionU { get; set; }
///// <summary>
///// z坐标
///// </summary>
//public double PositionZ { get; set; }
///// <summary>
///// 手臂方向,2=左臂L,1=右臂R
///// </summary>
//public int HandDirection { get; set; }
/// <summary>
/// 预热温度
/// </summary>
public
int
preheatTemperature
{
get
;
set
;
}
/// <summary>
/// 预热温度上限
/// </summary>
public
int
preheatTemperatureMax
{
get
;
set
;
}
/// <summary>
/// 预热温度下限
/// </summary>
public
int
preheatTemperatureMin
{
get
;
set
;
}
/// <summary>
/// 预热时间(秒)
/// </summary>
...
...
@@ -284,28 +255,5 @@ namespace URSoldering.DeviceLibrary
/// </summary>
public
int
ClearTime
{
get
;
set
;
}
//public string HandValue
//{
// get
// {
// if (HandDirection == 0)
// {
// return "自动";
// }
// else if (HandDirection == 1)
// {
// return "右臂";
// }
// else if (HandDirection == 2)
// {
// return "左臂";
// }
// return "";
// }
// set
// {
// }
//}
}
}
DeviceLibrary/bean/BoardManager.cs
查看文件 @
fa888d6
...
...
@@ -111,13 +111,6 @@ namespace URSoldering.DeviceLibrary
{
board
.
orgType
=
1
;
}
////如果未添加程序,自动添加
//if (board.getProgram() == null)
//{
// SProgramManager.addDefaultProgram(board.PartNumber,board.boardLength,board.boardWidth);
//}
boardList
.
Add
(
board
);
}
if
(
isUpdate
)
...
...
DeviceLibrary/bean/RobotBean.cs
查看文件 @
fa888d6
...
...
@@ -12,8 +12,6 @@ namespace URSoldering.DeviceLibrary
{
public
class
RobotBean
{
//public string MesIp = ConfigAppSettings.GetValue(Setting_Init.Mes_IP);
//public int MesPort = ConfigAppSettings.GetIntValue(Setting_Init.Mes_Port);
/// <summary>
/// 报警或者警告信息
/// </summary>
...
...
@@ -25,10 +23,6 @@ namespace URSoldering.DeviceLibrary
public
static
RobotConfig
baseConfig
=
null
;
public
bool
IsInSuddendown
=
false
;
/// <summary>
/// 是否是排料模式,排料模式不扫码,工位不绑定条码,后面工位判断没有条码不需要工作
/// </summary>
//public bool IsOutWareMode = false;
/// <summary>
/// 不扫码工作
/// </summary>
public
bool
NoCodeWork
=
false
;
...
...
DeviceLibrary/bean/RobotManager.cs
查看文件 @
fa888d6
...
...
@@ -38,14 +38,6 @@ namespace URSoldering.DeviceLibrary
SolderingRobot
=
new
URSolderingRobot
((
SolderingRobotConfig
)
robotConfig
);
}
//else if (robotType.Equals(RobotType.RivetingRobot))
//{
// RivetingRobot = new RivetingRobotBean((RivetingRobotConfig)robotConfig);
//}
//else if (robotType.Equals(RobotType.ScrewRobot))
//{
// ScrewRobot = new ScrewRobotBean((ScrewRobotConfig)robotConfig);
//}
LogUtil
.
info
(
LOGGER
,
"加载配置完成!"
);
return
robotConfig
;
...
...
@@ -68,7 +60,6 @@ namespace URSoldering.DeviceLibrary
{
//位置配置到文件中
string
appPath
=
Application
.
StartupPath
;
string
configFile
=
appPath
+
ConfigAppSettings
.
GetValue
(
Setting_Init
.
Robot_ConfigPath
);
bool
result
=
CSVConfigReader
.
SaveConfig
(
configFile
,
config
);
if
(!
result
)
...
...
@@ -81,7 +72,6 @@ namespace URSoldering.DeviceLibrary
LOGGER
.
Error
(
"出错:"
,
ex
);
}
}
}
}
DeviceLibrary/deviceLibrary/jbc/SendWireManager.cs
查看文件 @
fa888d6
...
...
@@ -2,12 +2,8 @@
using
log4net
;
using
URSoldering.Common
;
using
System
;
using
System.Collections.Generic
;
using
System.IO.Ports
;
using
System.Linq
;
using
System.Reflection
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
URSoldering.DeviceLibrary
{
...
...
@@ -36,20 +32,7 @@ namespace URSoldering.DeviceLibrary
private
static
string
CMD_StartBackSend
=
"0010WSFD00000"
;
private
static
string
CMD_StopSend
=
"0010WSSD00000"
;
private
static
string
CMD_Reset
=
"0010WECV00001"
;
//private static string CMD_Reset = "0010WCTP00000";
//private static string CMD_WriteMode = "02 57 4D 4F 44 30 30 30 30 32 03 22";
//private static string CMD_SetSpeed = "02 57 53 50 44 30 30 31 31 30 03 21";
//private static string CMD_SetSendLength = "02 57 4C 45 4E 30 31 31 30 30 03 21";
//private static string CMD_GetSpeed = "02 52 53 50 44 03 14";
//private static string CMD_GetSendLength = "02 52 4C 45 4E 03 14";
//private static string CMD_GetStatus = "02 52 54 45 53 03 11";
//private static string CMD_StartForwardSend = "02 57 53 46 44 30 30 30 30 31 03 36";
//private static string CMD_StartBackSend = "02 57 53 46 44 30 30 30 30 30 03 37";
/// <summary>
/// 初始化
/// </summary>
/// <returns></returns>
public
static
bool
Init
(
string
port
)
{
if
(
sb
==
null
)
...
...
@@ -155,6 +138,23 @@ namespace URSoldering.DeviceLibrary
}
return
data
;
}
public
static
bool
IsAlarm
()
{
int
error
=
ReadPortError
();
if
(
error
>
0
)
{
return
true
;
}
return
false
;
}
public
static
void
SendWireBack
(
double
time
,
int
speed
)
{
setSpeed
(
speed
);
double
length
=
(
time
*
speed
);
setLength
(
length
);
StartBSend
();
}
public
static
void
SendWire
(
double
time
,
int
speed
)
{
setSpeed
(
speed
);
...
...
@@ -225,7 +225,7 @@ namespace URSoldering.DeviceLibrary
}
message
[
message
.
Length
-
1
]
=
(
byte
)
0x03
;
ushort
bcc
=
0
;
SerialBean
.
CalculateBCC
(
message
,
message
.
Length
,
out
bcc
);
Ac
SerialBean
.
CalculateBCC
(
message
,
message
.
Length
,
out
bcc
);
/**
* 读命令返回值包含数据域
...
...
@@ -247,54 +247,11 @@ namespace URSoldering.DeviceLibrary
{
data
=
new
byte
[
messageAll
.
Length
-
5
];
}
string
str
=
SerialBean
.
byteToHexStr
(
messageAll
);
LogUtil
.
info
(
" 【"
+
commandText
+
"】 转换后【"
+
str
+
"】"
);
//data = new byte[messageAll.Length];
string
str
=
AcSerialBean
.
byteToHexStr
(
messageAll
,
" "
);
LogUtil
.
debug
(
" JBC送丝器【"
+
commandText
+
"】 转换后【"
+
str
+
"】"
);
sb
.
SendCommand
(
messageAll
,
ref
data
,
100
,
out
isOk
);
//string rawMsg = Encoding.ASCII.GetString(data, 100, 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
)
{
string
errMsg
=
""
;
...
...
DeviceLibrary/deviceLibrary/jbc/SolderingManager.cs
查看文件 @
fa888d6
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
URSoldering.Common
;
using
System.IO.Ports
;
using
log4net
;
...
...
URSolderingClient/FrmBoardInfo.Designer.cs
查看文件 @
fa888d6
此文件的差异被折叠,
点击展开。
URSolderingClient/FrmBoardInfo.cs
查看文件 @
fa888d6
...
...
@@ -3,16 +3,9 @@ using log4net;
using
URSoldering.Common
;
using
URSoldering.DeviceLibrary
;
using
System
;
using
System.Collections
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Linq
;
using
System.Reflection
;
using
System.Text
;
using
System.Threading
;
using
System.Windows.Forms
;
using
URSoldering.Common.util
;
using
System.IO
;
...
...
@@ -931,10 +924,6 @@ namespace URSoldering.Client
/// <param name="e"></param>
private
void
dgvList_CellValueChanged
(
object
sender
,
DataGridViewCellEventArgs
e
)
{
/**
* 当单元格数据改变时(XY值)
* 调用改变图片上的点方法
*/
if
(
this
.
txtBoardWidth
.
Text
.
Trim
()
!=
""
&&
this
.
txtBoardLength
.
Text
.
Trim
()
!=
""
)
{
loadPictureBoxSize
();
...
...
@@ -1216,110 +1205,64 @@ namespace URSoldering.Client
}
private
void
btnXAdd_Click
(
object
sender
,
EventArgs
e
)
private
void
RovotMove
(
URPointValue
point
)
{
if
(
isAuto
==
false
)
{
MessageBox
.
Show
(
"请先切换到自动模式!"
);
return
;
}
URRobotControl
.
MoveTo
(
point
);
}
private
void
btnXAdd_Click
(
object
sender
,
EventArgs
e
)
{
URPointValue
point
=
GetCurrRobotPoint
();
point
.
Y
+=
StepValue
;
URRobotControl
.
MoveTo
(
point
);
RovotMove
(
point
);
}
private
void
btnXDel_Click
(
object
sender
,
EventArgs
e
)
{
if
(
isAuto
==
false
)
{
MessageBox
.
Show
(
"请先切换到自动模式!"
);
return
;
}
URPointValue
point
=
GetCurrRobotPoint
();
point
.
Y
-=
StepValue
;
URRobotControl
.
MoveTo
(
point
);
RovotMove
(
point
);
}
private
void
btnYDel_Click
(
object
sender
,
EventArgs
e
)
{
if
(
isAuto
==
false
)
{
MessageBox
.
Show
(
"请先切换到自动模式!"
);
return
;
}
URPointValue
point
=
GetCurrRobotPoint
();
point
.
X
-=
StepValue
;
URRobotControl
.
MoveTo
(
point
);
RovotMove
(
point
);
}
private
void
btnYAdd_Click
(
object
sender
,
EventArgs
e
)
{
if
(
isAuto
==
false
)
{
MessageBox
.
Show
(
"请先切换到自动模式!"
);
return
;
}
URPointValue
point
=
GetCurrRobotPoint
();
point
.
X
+=
StepValue
;
URRobotControl
.
MoveTo
(
point
);
RovotMove
(
point
);
}
private
void
btnZAdd_Click
(
object
sender
,
EventArgs
e
)
{
if
(
isAuto
==
false
)
{
MessageBox
.
Show
(
"请先切换到自动模式!"
);
return
;
}
URPointValue
point
=
GetCurrRobotPoint
();
point
.
Z
+=
StepValue
;
URRobotControl
.
MoveTo
(
point
);
RovotMove
(
point
);
}
private
void
btnZDel_Click
(
object
sender
,
EventArgs
e
)
{
if
(
isAuto
==
false
)
{
MessageBox
.
Show
(
"请先切换到自动模式!"
);
return
;
}
URPointValue
point
=
GetCurrRobotPoint
();
point
.
Z
-=
StepValue
;
URRobotControl
.
MoveTo
(
point
);
RovotMove
(
point
);
}
private
void
btnUAdd_Click
(
object
sender
,
EventArgs
e
)
{
//if (isAuto == false)
//{
// MessageBox.Show("请先切换到自动模式!");
// return;
//}
//double x = FormUtil.getDoubleValue(txtRobotX);
//double y = FormUtil.getDoubleValue(txtRobotY);
//double u = FormUtil.getDoubleValue(txtRobotU);
//double z = FormUtil.getDoubleValue(txtRobotZ);
//int hand =GetHand();
//u+=StepValue;
//URRobotControl.MoveTo(x, y, z, u, isfast, hand,AfterMove);
}
private
void
btnUDel_Click
(
object
sender
,
EventArgs
e
)
{
//if (isAuto == false)
//{
// MessageBox.Show("请先切换到自动模式!");
// return;
//}
//double x = FormUtil.getDoubleValue(txtRobotX);
//double y = FormUtil.getDoubleValue(txtRobotY);
//double u = FormUtil.getDoubleValue(txtRobotU);
//double z = FormUtil.getDoubleValue(txtRobotZ);
//int hand =GetHand();
//u-=StepValue;
//URRobotControl.MoveTo(x, y, z, u, isfast, hand,AfterMove);
}
private
void
dgvList_DragEnter
(
object
sender
,
DragEventArgs
e
)
...
...
@@ -1486,9 +1429,11 @@ namespace URSoldering.Client
private
void
btnSendWire_Click
(
object
sender
,
EventArgs
e
)
{
//匀速运动
int
speed
=
FormUtil
.
GetIntValue
(
txtSpeed
)
*
WeldRobotBean
.
SendWireXiShu
;
//SendWireManager.VolMove(WeldRobotBean.RobotConfig.SendWire_Slv, speed);
double
speed
=
FormUtil
.
getDoubleValue
(
txtSpeed
);
double
length
=
FormUtil
.
getDoubleValue
(
txtSendWireLength
);
SendWireManager
.
setLength
(
length
);
SendWireManager
.
setSpeed
(
speed
);
SendWireManager
.
StartFSend
();
}
private
void
btnStopSend_Click
(
object
sender
,
EventArgs
e
)
...
...
@@ -1498,26 +1443,19 @@ namespace URSoldering.Client
private
void
btnWUp_Click
(
object
sender
,
EventArgs
e
)
{
if
(
btnWUp
.
Text
.
Equals
(
"
送丝
上升"
))
if
(
btnWUp
.
Text
.
Equals
(
"
烙铁
上升"
))
{
WeldRobotBean
.
SolderingUp
(
false
);
btnWUp
.
Text
=
"
送丝
下降"
;
btnWUp
.
Text
=
"
烙铁
下降"
;
}
else
{
WeldRobotBean
.
SolderingDown
(
false
);
btnWUp
.
Text
=
"
送丝
上升"
;
btnWUp
.
Text
=
"
烙铁
上升"
;
}
}
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);
}
private
void
btnSetClear1_Click
(
object
sender
,
EventArgs
e
)
{
URPointValue
point
=
GetCurrRobotPoint
();
...
...
@@ -1577,24 +1515,16 @@ 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
(
"送丝清洗端"
))
{
WeldRobotBean
.
SendWireClear
(
false
);
btnStopDown
.
Text
=
"送丝工作端"
;
}
private
void
btnStopUp_Click
(
object
sender
,
EventArgs
e
)
else
{
//RobotBean.KNDIOMove(IO_Type.StopCylinder_Down, IO_VALUE.LOW);
//RobotBean.KNDIOMove(IO_Type.StopCylinder_Up, IO_VALUE.HIGH);
WeldRobotBean
.
SendWireWork
(
false
);
btnStopDown
.
Text
=
"送丝清洗端"
;
}
}
private
void
btnPositionTest_Click
(
object
sender
,
EventArgs
e
)
...
...
URSolderingClient/FrmBoardList.cs
查看文件 @
fa888d6
using
log4net
;
using
URSoldering.Common
;
using
URSoldering.Common.util
;
using
URSoldering.DeviceLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.IO
;
using
System.Linq
;
using
System.Reflection
;
using
System.Text
;
using
System.Windows.Forms
;
namespace
URSoldering.Client
...
...
@@ -123,8 +116,6 @@ namespace URSoldering.Client
lvi
.
ImageIndex
=
i
;
lvi
.
Text
=
point
.
pointName
;
//lvi.SubItems.Add(name);
//lvi.SubItems.Add(point.preheatTemperature.ToString());
lvi
.
SubItems
.
Add
(
point
.
weldTemperature
.
ToString
());
lvi
.
SubItems
.
Add
((
point
.
startSendWireSpeed
*
point
.
startSendWireTime
).
ToString
());
lvi
.
SubItems
.
Add
((
point
.
sendWireTime
*
point
.
sendWireSpeed
).
ToString
());
...
...
URSolderingClient/FrmBoardSelect.cs
查看文件 @
fa888d6
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Linq
;
using
System.Text
;
using
System.Windows.Forms
;
using
URSoldering.Common
;
using
URSoldering.DeviceLibrary
;
namespace
URSoldering.Client
...
...
@@ -41,18 +35,9 @@ namespace URSoldering.Client
{
cmbBoardList
.
SelectedIndex
=
0
;
}
}
int
preIndex
=
-
1
;
private
void
cmbBoardList_SelectedIndexChanged
(
object
sender
,
EventArgs
e
)
{
//if (cmbBoardList.Text != "" && cmbBoardList.SelectedIndex >= 0 && (!cmbBoardList.SelectedIndex.Equals(preIndex)))
//{
// preIndex = cmbBoardList.SelectedIndex;
// string partNum = cmbBoardList.Text;
// Dictionary<int, BoardInfo> boardMap = BoardManager.GetBoardMapByPartNum(partNum);
//}
}
private
void
btnBack_Click
(
object
sender
,
EventArgs
e
)
...
...
@@ -80,7 +65,5 @@ namespace URSoldering.Client
this
.
Close
();
}
}
}
URSolderingClient/FrmCamera.cs
查看文件 @
fa888d6
using
HalconDotNet
;
using
URSoldering.DeviceLibrary
;
using
URSoldering.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Linq
;
using
System.Text
;
using
System.Windows.Forms
;
using
URSoldering.Common
;
...
...
URSolderingClient/FrmCodeLearn.cs
查看文件 @
fa888d6
using
HalconDotNet
;
using
URSoldering.Common
;
using
URSoldering.DeviceLibrary
;
using
URSoldering.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.IO
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
...
...
URSolderingClient/FrmDebugMenu.cs
查看文件 @
fa888d6
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Linq
;
using
System.Text
;
using
System.Windows.Forms
;
using
URSoldering.DeviceLibrary
;
using
URSoldering.Common
;
namespace
URSoldering.Client
{
public
partial
class
FrmDebugMenu
:
FrmBase
...
...
URSolderingClient/FrmIoManager.Designer.cs
查看文件 @
fa888d6
...
...
@@ -484,11 +484,11 @@ namespace URSoldering.Client
//
this
.
txtSendWireLength
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtSendWireLength
.
Location
=
new
System
.
Drawing
.
Point
(
608
,
440
);
this
.
txtSendWireLength
.
MaxLength
=
10
;
this
.
txtSendWireLength
.
MaxLength
=
6
;
this
.
txtSendWireLength
.
Name
=
"txtSendWireLength"
;
this
.
txtSendWireLength
.
Size
=
new
System
.
Drawing
.
Size
(
67
,
23
);
this
.
txtSendWireLength
.
TabIndex
=
260
;
this
.
txtSendWireLength
.
Text
=
"
3
"
;
this
.
txtSendWireLength
.
Text
=
"
10
"
;
//
// btnTestSend
//
...
...
@@ -517,11 +517,11 @@ namespace URSoldering.Client
//
this
.
txtSpeed
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtSpeed
.
Location
=
new
System
.
Drawing
.
Point
(
608
,
403
);
this
.
txtSpeed
.
MaxLength
=
10
;
this
.
txtSpeed
.
MaxLength
=
6
;
this
.
txtSpeed
.
Name
=
"txtSpeed"
;
this
.
txtSpeed
.
Size
=
new
System
.
Drawing
.
Size
(
67
,
23
);
this
.
txtSpeed
.
TabIndex
=
254
;
this
.
txtSpeed
.
Text
=
"
3
"
;
this
.
txtSpeed
.
Text
=
"
10
"
;
//
// btnStopSend
//
...
...
URSolderingClient/FrmIoManager.cs
查看文件 @
fa888d6
...
...
@@ -4,14 +4,7 @@ using URSoldering.Common;
using
URSoldering.DeviceLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Linq
;
using
System.Reflection
;
using
System.Text
;
using
System.Threading
;
using
System.Windows.Forms
;
using
UserFromControl
;
using
URSoldering.LoadCSVLibrary
;
...
...
@@ -221,8 +214,8 @@ namespace URSoldering.Client
private
void
btnSendWire_Click
(
object
sender
,
EventArgs
e
)
{
int
speed
=
FormUtil
.
GetInt
Value
(
txtSpeed
);
int
length
=
FormUtil
.
GetInt
Value
(
txtSendWireLength
);
double
speed
=
FormUtil
.
getDouble
Value
(
txtSpeed
);
double
length
=
FormUtil
.
getDouble
Value
(
txtSendWireLength
);
SendWireManager
.
setLength
(
length
);
SendWireManager
.
setSpeed
(
speed
);
SendWireManager
.
StartFSend
();
...
...
URSolderingClient/FrmMenu.cs
查看文件 @
fa888d6
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Linq
;
using
System.Text
;
using
System.Windows.Forms
;
using
System.Diagnostics
;
using
System.IO
;
using
URSoldering.Common
;
using
URSoldering.DeviceLibrary
;
...
...
URSolderingClient/FrmOrgConfig.cs
查看文件 @
fa888d6
...
...
@@ -3,24 +3,8 @@ using log4net;
using
URSoldering.Common
;
using
URSoldering.DeviceLibrary
;
using
System
;
using
System.Collections
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Linq
;
using
System.Reflection
;
using
System.Text
;
using
System.Threading
;
using
System.Windows.Forms
;
using
URSoldering.Common.util
;
using
System.IO
;
using
System.Drawing.Drawing2D
;
using
URSoldering.LoadCSVLibrary
;
using
System.Threading.Tasks
;
using
System.Timers
;
using
HalconDotNet
;
namespace
URSoldering.Client
{
...
...
@@ -135,9 +119,6 @@ namespace URSoldering.Client
MessageBox
.
Show
(
"请先切换到自动模式!"
);
return
;
}
//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
查看文件 @
fa888d6
...
...
@@ -29,12 +29,14 @@
private
void
InitializeComponent
()
{
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
txtRevice
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
btnSend
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
txtSend
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
btnReset
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnStop
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
txtPortError
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnReadError
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
lblMsg
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnCloseForm
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnStartBack
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
txtLength
=
new
System
.
Windows
.
Forms
.
TextBox
();
...
...
@@ -47,9 +49,7 @@
this
.
txtSoldingCom
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label8
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnOpenSold
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
txtSend
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
btnSend
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
txtRevice
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lblMsg
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox1
.
SuspendLayout
();
this
.
SuspendLayout
();
//
...
...
@@ -77,11 +77,42 @@
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnOpenSold
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
36
,
36
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
678
,
402
);
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
678
,
388
);
this
.
groupBox1
.
TabIndex
=
0
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"送丝测试"
;
//
// txtRevice
//
this
.
txtRevice
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtRevice
.
Location
=
new
System
.
Drawing
.
Point
(
37
,
347
);
this
.
txtRevice
.
Name
=
"txtRevice"
;
this
.
txtRevice
.
Size
=
new
System
.
Drawing
.
Size
(
376
,
23
);
this
.
txtRevice
.
TabIndex
=
302
;
this
.
txtRevice
.
Text
=
"0"
;
this
.
txtRevice
.
Visible
=
false
;
//
// btnSend
//
this
.
btnSend
.
Location
=
new
System
.
Drawing
.
Point
(
296
,
309
);
this
.
btnSend
.
Name
=
"btnSend"
;
this
.
btnSend
.
Size
=
new
System
.
Drawing
.
Size
(
117
,
35
);
this
.
btnSend
.
TabIndex
=
301
;
this
.
btnSend
.
Text
=
"发送"
;
this
.
btnSend
.
UseVisualStyleBackColor
=
true
;
this
.
btnSend
.
Visible
=
false
;
this
.
btnSend
.
Click
+=
new
System
.
EventHandler
(
this
.
btnSend_Click
);
//
// txtSend
//
this
.
txtSend
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtSend
.
Location
=
new
System
.
Drawing
.
Point
(
37
,
313
);
this
.
txtSend
.
Name
=
"txtSend"
;
this
.
txtSend
.
Size
=
new
System
.
Drawing
.
Size
(
210
,
23
);
this
.
txtSend
.
TabIndex
=
300
;
this
.
txtSend
.
Text
=
"WMOD00002"
;
this
.
txtSend
.
Visible
=
false
;
//
// btnReset
//
this
.
btnReset
.
Location
=
new
System
.
Drawing
.
Point
(
440
,
240
);
...
...
@@ -130,17 +161,6 @@
this
.
btnReadError
.
UseVisualStyleBackColor
=
true
;
this
.
btnReadError
.
Click
+=
new
System
.
EventHandler
(
this
.
btnReadError_Click_1
);
//
// lblMsg
//
this
.
lblMsg
.
AutoSize
=
true
;
this
.
lblMsg
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblMsg
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblMsg
.
Location
=
new
System
.
Drawing
.
Point
(
629
,
14
);
this
.
lblMsg
.
Name
=
"lblMsg"
;
this
.
lblMsg
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
19
);
this
.
lblMsg
.
TabIndex
=
283
;
this
.
lblMsg
.
Text
=
"急停未开"
;
//
// btnCloseForm
//
this
.
btnCloseForm
.
Location
=
new
System
.
Drawing
.
Point
(
541
,
315
);
...
...
@@ -254,33 +274,16 @@
this
.
btnOpenSold
.
UseVisualStyleBackColor
=
true
;
this
.
btnOpenSold
.
Click
+=
new
System
.
EventHandler
(
this
.
btnOpenSold_Click
);
//
// txtSend
//
this
.
txtSend
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtSend
.
Location
=
new
System
.
Drawing
.
Point
(
37
,
321
);
this
.
txtSend
.
Name
=
"txtSend"
;
this
.
txtSend
.
Size
=
new
System
.
Drawing
.
Size
(
210
,
23
);
this
.
txtSend
.
TabIndex
=
300
;
this
.
txtSend
.
Text
=
"WMOD00002"
;
//
// btnSend
//
this
.
btnSend
.
Location
=
new
System
.
Drawing
.
Point
(
296
,
309
);
this
.
btnSend
.
Name
=
"btnSend"
;
this
.
btnSend
.
Size
=
new
System
.
Drawing
.
Size
(
117
,
35
);
this
.
btnSend
.
TabIndex
=
301
;
this
.
btnSend
.
Text
=
"发送"
;
this
.
btnSend
.
UseVisualStyleBackColor
=
true
;
this
.
btnSend
.
Click
+=
new
System
.
EventHandler
(
this
.
btnSend_Click
);
//
// txtRevice
// lblMsg
//
this
.
txtRevice
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtRevice
.
Location
=
new
System
.
Drawing
.
Point
(
37
,
362
);
this
.
txtRevice
.
Name
=
"txtRevice"
;
this
.
txtRevice
.
Size
=
new
System
.
Drawing
.
Size
(
376
,
23
);
this
.
txtRevice
.
TabIndex
=
302
;
this
.
txtRevice
.
Text
=
"0"
;
this
.
lblMsg
.
AutoSize
=
true
;
this
.
lblMsg
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblMsg
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblMsg
.
Location
=
new
System
.
Drawing
.
Point
(
629
,
14
);
this
.
lblMsg
.
Name
=
"lblMsg"
;
this
.
lblMsg
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
19
);
this
.
lblMsg
.
TabIndex
=
283
;
this
.
lblMsg
.
Text
=
"急停未开"
;
//
// FrmSendWire
//
...
...
URSolderingClient/FrmSendWire.cs
查看文件 @
fa888d6
...
...
@@ -20,11 +20,6 @@ namespace URSoldering.Client
public
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
MethodBase
.
GetCurrentMethod
().
DeclaringType
);
private
void
FrmMain_FormClosing
(
object
sender
,
FormClosingEventArgs
e
)
{
}
private
void
btnStopSend_Click
(
object
sender
,
EventArgs
e
)
{
SendWireManager
.
StopSend
();
...
...
@@ -141,14 +136,6 @@ namespace URSoldering.Client
private
void
btnSend_Click
(
object
sender
,
EventArgs
e
)
{
string
msg
=
""
;
string
str
=
"02 30 30 31 30 57 53 46 44 30 30 30 30 31 03 37 "
;
byte
[]
data
=
SerialBean
.
StringToByte
(
str
);
if
(
data
!=
null
&&
data
.
Length
>
0
)
{
msg
=
Encoding
.
ASCII
.
GetString
(
data
,
1
,
data
.
Length
-
3
);
}
txtRevice
.
Text
=
""
;
string
text
=
txtSend
.
Text
;
bool
isOk
=
false
;
...
...
URSolderingClient/FrmSoldDebug.Designer.cs
查看文件 @
fa888d6
...
...
@@ -272,7 +272,6 @@ namespace URSoldering.Client
this
.
Controls
.
Add
(
this
.
groupBox6
);
this
.
Name
=
"FrmSoldDebug"
;
this
.
Text
=
"烙铁调试"
;
this
.
FormClosing
+=
new
System
.
Windows
.
Forms
.
FormClosingEventHandler
(
this
.
FrmMain_FormClosing
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
FrmMain_Load
);
this
.
groupBox6
.
ResumeLayout
(
false
);
this
.
groupBox6
.
PerformLayout
();
...
...
URSolderingClient/FrmSoldDebug.cs
查看文件 @
fa888d6
using
log4net
;
using
URSoldering.Common
;
using
URSoldering.DeviceLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Linq
;
using
System.Reflection
;
using
System.Text
;
using
System.Windows.Forms
;
using
UserFromControl
;
namespace
URSoldering.Client
{
...
...
@@ -37,9 +27,6 @@ namespace URSoldering.Client
SoldStatus
(
false
);
}
}
private
void
FrmMain_FormClosing
(
object
sender
,
FormClosingEventArgs
e
)
{
}
private
void
btnStopSend_Click
(
object
sender
,
EventArgs
e
)
{
...
...
URSolderingClient/FrmWork.cs
查看文件 @
fa888d6
...
...
@@ -20,7 +20,6 @@ namespace URSoldering.Client
public
partial
class
FrmWork
:
FrmBase
{
private
static
string
VideoCameraName
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
VideoCameraName
);
//private static string CodeCameraName = ConfigAppSettings.GetValue(Setting_Init.CodeCameraName);
private
URSolderingRobot
Robot
=
null
;
public
FrmWork
()
{
...
...
URSolderingClient/FrmWorkCount.cs
查看文件 @
fa888d6
using
URSoldering.DeviceLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Linq
;
using
System.Text
;
using
System.Windows.Forms
;
namespace
URSoldering.Client
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论