Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO664-HCSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 447c419f
由
LN
编写于
2021-03-08 15:22:41 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
原点返回时,如果原点信号持续亮5秒以上,伺服报警。
1 个父辈
4042e400
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
31 行增加
和
37 行删除
source/DeviceLibrary/acSingleStore/BoxBean_Partial.cs
source/DeviceLibrary/bean/KTK_Store.cs
source/DeviceLibrary/bean/model/StoreMoveInfo.cs
source/DeviceLibrary/acSingleStore/BoxBean_Partial.cs
查看文件 @
447c419
...
...
@@ -160,6 +160,26 @@ namespace OnlineStore.DeviceLibrary
if
(
wait
.
IsHomeMove
)
{
wait
.
IsEnd
=
ACHomeMoveIsEnd
(
wait
.
AxisInfo
,
out
msg
);
if
(!
wait
.
IsEnd
&&
(
String
.
IsNullOrEmpty
(
msg
)))
{
//如果原点没完成,且原点亮超过5秒,需要报警
int
org
=
AxisManager
.
instance
.
GetHomeSingle
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
());
if
(
org
.
Equals
(
1
)
&&
wait
.
AxisOrgValue
.
Equals
(
1
))
{
TimeSpan
orgSpan
=
DateTime
.
Now
-
wait
.
LastHasOrgTime
;
if
(
orgSpan
.
TotalSeconds
>
5
)
{
msg
=
Name
+
" "
+
MoveInfo
.
MoveStep
+
" "
+
wait
.
AxisInfo
.
DisplayStr
+
"原点返回,原点信号已持续亮"
+
orgSpan
.
ToString
()
+
"秒,需要报警"
;
LogUtil
.
error
(
msg
);
}
}
else
{
wait
.
AxisOrgValue
=
org
;
wait
.
LastHasOrgTime
=
DateTime
.
Now
;
}
}
}
else
{
...
...
source/DeviceLibrary/bean/KTK_Store.cs
查看文件 @
447c419
...
...
@@ -214,8 +214,9 @@ namespace OnlineStore.DeviceLibrary
protected
void
ACAxisHomeMove
(
ConfigMoveAxis
moveAxis
)
{
moveAxis
.
TargetPosition
=
0
;
LogUtil
.
debug
(
moveAxis
.
DisplayStr
+
"speed["
+
moveAxis
.
HomeHighSpeed
+
"]开始原点返回"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxis
(
moveAxis
,
true
));
LogUtil
.
debug
(
moveAxis
.
DisplayStr
+
"speed["
+
moveAxis
.
HomeHighSpeed
+
"]开始原点返回"
);
int
org
=
ACServerManager
.
instance
.
GetHomeSingle
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
());
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxisHome
(
moveAxis
,
org
));
AxisManager
.
instance
.
HomeMove
(
moveAxis
.
DeviceName
,
(
short
)
moveAxis
.
GetAxisValue
(),
moveAxis
.
HomeHighSpeed
,
moveAxis
.
HomeLowSpeed
,
moveAxis
.
HomeAddSpeed
);
}
...
...
source/DeviceLibrary/bean/model/StoreMoveInfo.cs
查看文件 @
447c419
...
...
@@ -183,7 +183,7 @@ namespace OnlineStore.DeviceLibrary
wait
.
IsEnd
=
false
;
return
wait
;
}
public
static
WaitResultInfo
WaitAxis
(
ConfigMoveAxis
axis
,
bool
isHomeMov
e
)
public
static
WaitResultInfo
WaitAxis
Home
(
ConfigMoveAxis
axis
,
int
AxisOrgValu
e
)
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
0
;
...
...
@@ -191,40 +191,8 @@ namespace OnlineStore.DeviceLibrary
wait
.
AxisInfo
=
axis
;
wait
.
IsHomeMove
=
true
;
wait
.
IsEnd
=
false
;
return
wait
;
}
public
static
WaitResultInfo
WaitStell
(
byte
slvAddr
,
int
targetPosition
,
int
speed
)
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
10
;
wait
.
WaitType
=
4
;
wait
.
SlvAddr
=
slvAddr
;
wait
.
IsHomeMove
=
false
;
wait
.
TargetPosition
=
targetPosition
;
wait
.
TargetSpeed
=
speed
;
wait
.
IsEnd
=
false
;
return
wait
;
}
public
static
WaitResultInfo
WaitStellHome
(
byte
slvAddr
,
int
targetPosition
,
int
speed
)
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
10
;
wait
.
WaitType
=
4
;
wait
.
SlvAddr
=
slvAddr
;
wait
.
IsHomeMove
=
true
;
wait
.
TargetPosition
=
0
;
wait
.
TargetSpeed
=
speed
;
wait
.
IsEnd
=
false
;
return
wait
;
}
public
static
WaitResultInfo
WaitShuoKe
(
int
slvAddr
,
int
targetPosition
,
bool
isHome
)
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
0
;
wait
.
WaitType
=
5
;
wait
.
SlvAddr
=(
byte
)
slvAddr
;
wait
.
TargetPosition
=
targetPosition
;
wait
.
IsHomeMove
=
isHome
;
wait
.
AxisOrgValue
=
AxisOrgValue
;
wait
.
LastHasOrgTime
=
DateTime
.
Now
;
return
wait
;
}
public
static
WaitResultInfo
WaitTime
(
int
MScends
)
...
...
@@ -346,6 +314,11 @@ namespace OnlineStore.DeviceLibrary
/// 高度
/// </summary>
public
int
HeightValue
{
get
;
set
;
}
public
int
AxisOrgValue
=
0
;
public
DateTime
LastHasOrgTime
=
DateTime
.
Now
;
}
public
enum
StoreMoveType
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论