Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
Line-Smart-Workstation
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit dc294e32
由
LN
编写于
2022-05-15 15:22:16 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加自动重新运动功能。
1 个父辈
0722175b
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
19 行增加
和
5 行删除
DeviceLibrary/manager/StockInfo.cs
DeviceLibrary/manager/TSAVStatus.cs
DeviceLibrary/manager/WorkInfo.cs
PUSICANLibrary/PUSICANControl.cs
TSA-V/FrmBoardPutCom.cs
TSA-V/FrmPutCom.cs
TSA-V/ResourceCulture.cs
DeviceLibrary/manager/StockInfo.cs
查看文件 @
dc294e3
...
@@ -69,6 +69,7 @@ namespace TSA_V.DeviceLibrary
...
@@ -69,6 +69,7 @@ namespace TSA_V.DeviceLibrary
{
{
//上一个节点返回原点
//上一个节点返回原点
PUSICANControl
.
AbsMove
(
PreNodeId
,
TSAVBean
.
RotateNode_DefaultPosition
);
PUSICANControl
.
AbsMove
(
PreNodeId
,
TSAVBean
.
RotateNode_DefaultPosition
);
Thread
.
Sleep
(
50
);
}
}
PUSICANControl
.
AbsMove
(
moveNode
.
NodeId
,
position
.
RotatePosition
);
PUSICANControl
.
AbsMove
(
moveNode
.
NodeId
,
position
.
RotatePosition
);
...
...
DeviceLibrary/manager/TSAVStatus.cs
查看文件 @
dc294e3
...
@@ -175,6 +175,8 @@ namespace TSA_V.DeviceLibrary
...
@@ -175,6 +175,8 @@ namespace TSA_V.DeviceLibrary
public
int
TemperatureMax
{
get
;
set
;
}
public
int
TemperatureMax
{
get
;
set
;
}
public
int
WhileMoveCount
=
0
;
public
static
bool
GetWaitResult
(
List
<
WaitResultInfo
>
waitList
,
TimeSpan
span
,
bool
oneOkCanEnd
,
out
string
waitMsg
)
public
static
bool
GetWaitResult
(
List
<
WaitResultInfo
>
waitList
,
TimeSpan
span
,
bool
oneOkCanEnd
,
out
string
waitMsg
)
{
{
waitMsg
=
""
;
waitMsg
=
""
;
...
@@ -199,8 +201,16 @@ namespace TSA_V.DeviceLibrary
...
@@ -199,8 +201,16 @@ namespace TSA_V.DeviceLibrary
if
(
wait
.
WaitType
.
Equals
(
WaitTypeEnum
.
NodeMove_1
))
if
(
wait
.
WaitType
.
Equals
(
WaitTypeEnum
.
NodeMove_1
))
{
{
string
msg
=
""
;
string
msg
=
""
;
wait
.
IsEnd
=
PUSICANControl
.
MoveIsEnd
(
wait
.
Node
.
NodeId
,
wait
.
TargetPosition
,
out
msg
);
wait
.
IsEnd
=
PUSICANControl
.
MoveIsEnd
(
wait
.
Node
.
NodeId
,
wait
.
TargetPosition
,
out
msg
,
out
bool
canWhileMove
);
waitMsg
=
waitMsg
+
msg
;
waitMsg
=
waitMsg
+
msg
;
if
(
span
.
TotalSeconds
>=
5
&&
canWhileMove
&&
wait
.
WhileMoveCount
.
Equals
(
0
))
{
wait
.
WhileMoveCount
++;
LogUtil
.
info
(
waitMsg
+
". 自动重新运动一次"
+
wait
.
WhileMoveCount
);
PUSICANControl
.
AbsMove
(
wait
.
Node
.
NodeId
,
wait
.
TargetPosition
);
}
}
}
else
if
(
wait
.
WaitType
.
Equals
(
WaitTypeEnum
.
NodeHome_2
))
else
if
(
wait
.
WaitType
.
Equals
(
WaitTypeEnum
.
NodeHome_2
))
{
{
...
...
DeviceLibrary/manager/WorkInfo.cs
查看文件 @
dc294e3
...
@@ -287,6 +287,7 @@ namespace TSA_V.DeviceLibrary
...
@@ -287,6 +287,7 @@ namespace TSA_V.DeviceLibrary
{
{
//上一个节点返回原点
//上一个节点返回原点
PUSICANControl
.
AbsMove
(
PreNodeId
,
TSAVBean
.
RotateNode_DefaultPosition
);
PUSICANControl
.
AbsMove
(
PreNodeId
,
TSAVBean
.
RotateNode_DefaultPosition
);
Thread
.
Sleep
(
50
);
}
}
PUSICANControl
.
AbsMove
(
moveNode
.
NodeId
,
position
.
RotatePosition
);
PUSICANControl
.
AbsMove
(
moveNode
.
NodeId
,
position
.
RotatePosition
);
waitList
.
Add
(
WaitResultInfo
.
WaitNode
(
moveNode
,
position
.
RotatePosition
));
waitList
.
Add
(
WaitResultInfo
.
WaitNode
(
moveNode
,
position
.
RotatePosition
));
...
...
PUSICANLibrary/PUSICANControl.cs
查看文件 @
dc294e3
...
@@ -926,12 +926,13 @@ namespace PUSICANLibrary
...
@@ -926,12 +926,13 @@ namespace PUSICANLibrary
/// <summary>
/// <summary>
/// 运动是否结束
/// 运动是否结束
/// </summary>
/// </summary>
public
static
bool
MoveIsEnd
(
uint
nodeId
,
int
targetPosition
,
out
string
waitMsg
)
public
static
bool
MoveIsEnd
(
uint
nodeId
,
int
targetPosition
,
out
string
waitMsg
,
out
bool
canWhileMove
)
{
{
//判断忙碌状态=0 当前坐标=targetPosition
//判断忙碌状态=0 当前坐标=targetPosition
int
currPosition
=
GetPosition
(
nodeId
);
int
currPosition
=
GetPosition
(
nodeId
);
int
cha
=
Math
.
Abs
(
targetPosition
-
currPosition
);
int
cha
=
Math
.
Abs
(
targetPosition
-
currPosition
);
waitMsg
=
"当前坐标["
+
currPosition
+
"]"
;
waitMsg
=
"当前坐标["
+
currPosition
+
"]"
;
canWhileMove
=
true
;
if
(
cha
<
10
)
if
(
cha
<
10
)
{
{
int
value
=
0
;
int
value
=
0
;
...
@@ -942,6 +943,7 @@ namespace PUSICANLibrary
...
@@ -942,6 +943,7 @@ namespace PUSICANLibrary
waitMsg
=
waitMsg
+
"忙碌状态["
+
busyStr
+
"]"
;
waitMsg
=
waitMsg
+
"忙碌状态["
+
busyStr
+
"]"
;
if
(
busyStr
.
Equals
(
"1"
))
if
(
busyStr
.
Equals
(
"1"
))
{
{
canWhileMove
=
false
;
return
false
;
return
false
;
}
}
else
else
...
...
TSA-V/FrmBoardPutCom.cs
查看文件 @
dc294e3
...
@@ -269,7 +269,7 @@ namespace TSA_V
...
@@ -269,7 +269,7 @@ namespace TSA_V
{
{
if
(
span
.
TotalMinutes
>
1
)
if
(
span
.
TotalMinutes
>
1
)
{
{
waitMsg
=
"等待【"
+
waitMsg
+
"】超时 已等待【"
+
span
.
TotalMinutes
.
ToString
()
+
"】分钟,"
;
waitMsg
=
"等待【"
+
waitMsg
+
"】超时 已等待【"
+
Math
.
Round
(
span
.
TotalMinutes
,
2
)
+
"】分钟,"
;
foreach
(
WaitResultInfo
wait
in
list
)
foreach
(
WaitResultInfo
wait
in
list
)
{
{
waitMsg
=
waitMsg
+
"\r\n"
+
wait
.
ToStr
();
waitMsg
=
waitMsg
+
"\r\n"
+
wait
.
ToStr
();
...
...
TSA-V/FrmPutCom.cs
查看文件 @
dc294e3
...
@@ -268,7 +268,7 @@ namespace TSA_V
...
@@ -268,7 +268,7 @@ namespace TSA_V
{
{
if
(
span
.
TotalMinutes
>
1
)
if
(
span
.
TotalMinutes
>
1
)
{
{
waitMsg
=
"等待【"
+
waitMsg
+
"】超时 已等待【"
+
span
.
TotalMinutes
.
ToString
(
)
+
"】分钟,"
;
waitMsg
=
"等待【"
+
waitMsg
+
"】超时 已等待【"
+
Math
.
Round
(
span
.
TotalMinutes
,
2
)
+
"】分钟,"
;
foreach
(
WaitResultInfo
wait
in
list
)
foreach
(
WaitResultInfo
wait
in
list
)
{
{
waitMsg
=
waitMsg
+
"\r\n"
+
wait
.
ToStr
();
waitMsg
=
waitMsg
+
"\r\n"
+
wait
.
ToStr
();
...
...
TSA-V/ResourceCulture.cs
查看文件 @
dc294e3
...
@@ -106,7 +106,7 @@ namespace TSA_V
...
@@ -106,7 +106,7 @@ namespace TSA_V
private
static
void
NoIdLog
(
string
id
,
string
defaultStr
)
private
static
void
NoIdLog
(
string
id
,
string
defaultStr
)
{
{
LogUtil
.
info
(
"No id:["
+
id
+
"], please add,use default string :"
+
defaultStr
);
LogUtil
.
debug
(
"No id:["
+
id
+
"], please add,use default string :"
+
defaultStr
);
if
(!
defaultMap
.
ContainsKey
(
id
))
if
(!
defaultMap
.
ContainsKey
(
id
))
{
{
defaultMap
.
Add
(
id
,
defaultStr
);
defaultMap
.
Add
(
id
,
defaultStr
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论