Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-ACPackingStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit c4fb65b7
由
LN
编写于
2020-01-02 16:40:10 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
压紧步骤修改
1 个父辈
d5c25d0e
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
18 行增加
和
11 行删除
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
查看文件 @
c4fb65b
...
@@ -80,19 +80,22 @@ namespace OnlineStore.DeviceLibrary
...
@@ -80,19 +80,22 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
wait
.
WaitType
.
Equals
(
WaitEnum
.
W008_Compress
))
else
if
(
wait
.
WaitType
.
Equals
(
WaitEnum
.
W008_Compress
))
{
{
string
msg
=
""
;
//等待信号亮或者走到绝对位置才停止
if
(
IOValue
(
TargetIoType
).
Equals
(
TargetIoValue
))
if
(
IOValue
(
TargetIoType
).
Equals
(
TargetIoValue
))
{
{
LogUtil
.
info
(
"CheckWait 检测到"
+
TargetIoType
+
"="
+
TargetIoValue
+
",停止压紧轴运行"
);
wait
.
IsEnd
=
true
;
wait
.
IsEnd
=
true
;
ComAxisStopCheck
();
}
}
else
else
{
{
bool
result
=
ACAxisMoveIsEnd
(
wait
.
AxisInfo
,
wait
.
TargetPosition
,
wait
.
TargetSpeed
,
out
msg
);
bool
moveOk
=
ACServerManager
.
GetBusyStatus
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
()).
Equals
(
0
);
if
(
!
result
&&
(!
msg
.
Equals
(
""
))
)
if
(
moveOk
)
{
{
LogUtil
.
error
(
msg
);
//TODO 判断是否达到高度,如果未达到,继续上升
wait
.
IsEnd
=
true
;
ComAxisStopCheck
();
}
}
wait
.
IsEnd
=
result
;
}
}
}
}
else
if
(
wait
.
WaitType
.
Equals
(
WaitEnum
.
W009_ScanCode
))
else
if
(
wait
.
WaitType
.
Equals
(
WaitEnum
.
W009_ScanCode
))
...
@@ -354,8 +357,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -354,8 +357,11 @@ namespace OnlineStore.DeviceLibrary
ComTargetPosition
=
currPosition
;
ComTargetPosition
=
currPosition
;
int
targetP
=
currPosition
+
Config
.
CompAxis_Down_Position
;
int
targetP
=
currPosition
+
Config
.
CompAxis_Down_Position
;
LastHeight
=
Config
.
GetComP2PlateH
(
targetP
);
LastHeight
=
Config
.
GetComP2PlateH
(
targetP
);
InOutStoreLog
(
"料架取料 "
+
MoveInfo
.
SLog
+
":检测到料叉压紧确认信号,向下压紧【"
+
ComTargetPosition
+
"】目标【"
+
targetP
+
"】,记录料盘高度【"
+
LastHeight
+
"】"
);
MoveInfo
.
MoveParam
.
MoveP
.
ComPress_P2
=
targetP
;
MoveInfo
.
MoveParam
.
MoveP
.
ComPress_P2
=
ComTargetPosition
;
MoveInfo
.
MoveParam
.
MoveP
.
ComPress_P3
=
targetP
+
Config
.
CompAxis_P3_P2_Value
;
InOutStoreLog
(
"料架取料 "
+
MoveInfo
.
SLog
+
":检测到料叉压紧确认信号,向下压紧【"
+
ComTargetPosition
+
"】目标【"
+
targetP
+
"】,记录料盘高度【"
+
LastHeight
+
"】,ComP2【"
+
targetP
+
"】ComP3【"
+
MoveInfo
.
MoveParam
.
MoveP
.
ComPress_P3
+
"】"
);
ACAxisMove
(
Config
.
Comp_Axis
,
targetP
,
Config
.
CompAxis_P1_Speed
);
ACAxisMove
(
Config
.
Comp_Axis
,
targetP
,
Config
.
CompAxis_P1_Speed
);
}
}
...
@@ -390,7 +396,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -390,7 +396,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_22_InOutToP2
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_22_InOutToP2
))
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_23_PutTrayDown
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_23_PutTrayDown
);
InOutStoreLog
(
"扫码 "
+
MoveInfo
.
SLog
+
":升降轴
缓慢下降到P1,压紧轴返回
压紧前点P3"
);
InOutStoreLog
(
"扫码 "
+
MoveInfo
.
SLog
+
":升降轴
到扫码低点P1,压紧轴到
压紧前点P3"
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P1
,
Config
.
UpDownAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P1
,
Config
.
UpDownAxis_P1_Speed
);
ACAxisMove
(
Config
.
Comp_Axis
,
moveP
.
ComPress_P3
,
Config
.
CompAxis_P3_Speed
);
ACAxisMove
(
Config
.
Comp_Axis
,
moveP
.
ComPress_P3
,
Config
.
CompAxis_P3_Speed
);
}
}
...
@@ -436,8 +442,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -436,8 +442,8 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_27_InoutToP2
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_27_InoutToP2
))
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_28_GetScanPTray
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_28_GetScanPTray
);
InOutStoreLog
(
"扫码 "
+
MoveInfo
.
SLog
+
":升降轴到
P1,压紧轴压紧
"
);
InOutStoreLog
(
"扫码 "
+
MoveInfo
.
SLog
+
":升降轴到
扫码高P2,压紧轴到压紧点P2
"
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P
1
,
Config
.
UpDownAxis_P1
_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P
2
,
Config
.
UpDownAxis_P2
_Speed
);
ACAxisMove
(
Config
.
Comp_Axis
,
moveP
.
ComPress_P2
,
Config
.
CompAxis_P2_Speed
);
ACAxisMove
(
Config
.
Comp_Axis
,
moveP
.
ComPress_P2
,
Config
.
CompAxis_P2_Speed
);
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_28_GetScanPTray
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_28_GetScanPTray
))
...
@@ -949,7 +955,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -949,7 +955,7 @@ namespace OnlineStore.DeviceLibrary
{
{
axisCheckTimer
=
new
System
.
Timers
.
Timer
();
axisCheckTimer
=
new
System
.
Timers
.
Timer
();
axisCheckTimer
.
AutoReset
=
true
;
axisCheckTimer
.
AutoReset
=
true
;
axisCheckTimer
.
Interval
+=
3
0
;
axisCheckTimer
.
Interval
+=
5
0
;
axisCheckTimer
.
Elapsed
+=
CheckTimer_Elapsed
;
axisCheckTimer
.
Elapsed
+=
CheckTimer_Elapsed
;
axisCheckTimer
.
Enabled
=
false
;
axisCheckTimer
.
Enabled
=
false
;
}
}
...
@@ -963,6 +969,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -963,6 +969,7 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(!(
axisCheckTimer
==
null
))
if
(!(
axisCheckTimer
==
null
))
{
{
ACServerManager
.
SuddenStop
(
Config
.
Comp_Axis
);
axisCheckTimer
.
Stop
();
axisCheckTimer
.
Stop
();
}
}
return
true
;
return
true
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论