Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit ac07da79
由
LN
编写于
2020-07-22 16:39:11 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
a1d7de27
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
36 行增加
和
32 行删除
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
source/DeviceLibrary/assemblyLine/LineBean_Shunt.cs
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
查看文件 @
ac07da7
...
@@ -23,7 +23,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -23,7 +23,7 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
runStatus
<=
LineRunStatus
.
Wait
)
if
(
runStatus
<=
LineRunStatus
.
Wait
)
{
{
return
true
;
return
false
;
}
}
if
(
LineCanRun
()
&&
if
(
LineCanRun
()
&&
IOManager
.
IOValue
(
IO_Type
.
DriveMotor_Run1
,
0
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOManager
.
IOValue
(
IO_Type
.
DriveMotor_Run1
,
0
).
Equals
(
IO_VALUE
.
HIGH
)
&&
...
...
source/DeviceLibrary/assemblyLine/LineBean_Shunt.cs
查看文件 @
ac07da7
...
@@ -66,7 +66,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -66,7 +66,7 @@ namespace OnlineStore.DeviceLibrary
{
{
return
true
;
return
true
;
}
}
if
(
IOValue
(
IO_Type
.
Shunt_Check3_Back
).
Equals
(
IO_VALUE
.
LOW
))
if
(
IOValue
(
IO_Type
.
Shunt_Check3_Back
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
Shunt_StopDown2_Back
).
Equals
(
IO_VALUE
.
LOW
)
)
{
{
if
((
Shunt_MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
)
||
if
((
Shunt_MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
)
||
Shunt_MoveInfo
.
MoveStep
<=
LineMoveStep
.
Shunt03_WaitCheck1Low
))
Shunt_MoveInfo
.
MoveStep
<=
LineMoveStep
.
Shunt03_WaitCheck1Low
))
...
@@ -141,7 +141,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -141,7 +141,6 @@ namespace OnlineStore.DeviceLibrary
shuntProTime
=
DateTime
.
Now
;
shuntProTime
=
DateTime
.
Now
;
if
(!
CanProcessLine
())
if
(!
CanProcessLine
())
{
{
ShuntCheck1Watch
.
Stop
();
shuntPro
=
false
;
shuntPro
=
false
;
return
;
return
;
}
}
...
@@ -150,15 +149,16 @@ namespace OnlineStore.DeviceLibrary
...
@@ -150,15 +149,16 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
IOValue
(
IO_Type
.
Shunt_Check1_Front
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
Shunt_Check1_Front
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
if
(
TrayManager
.
checkWatch
(
ShuntCheck1Watch
,
TrayManager
.
SwTrayWaitTime
,
true
))
if
(
TrayManager
.
checkWatch
(
ShuntCheck1Watch
,
500
,
true
))
{
{
Shunt_MoveInfo
.
NewMove
(
LineMoveType
.
InStore
);
Shunt_MoveInfo
.
NewMove
(
LineMoveType
.
InStore
);
Shunt_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
Shunt01_WaitTime
);
Shunt_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
Shunt01_WaitTime
);
UpateShuntTrayNum
();
UpateShuntTrayNum
();
ShuntLog
(
"分流横移:等待
Shunt_Check1_Front
亮,阻挡1上升,升降1下降 "
);
ShuntLog
(
"分流横移:等待
阻挡1亮,阻挡2
亮,阻挡1上升,升降1下降 "
);
Shunt_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Shunt_Check1_Front
,
IO_VALUE
.
HIGH
));
Shunt_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Shunt_Check1_Front
,
IO_VALUE
.
HIGH
));
CylinderMove
(
Shunt_MoveInfo
,
IO_Type
.
Shunt_TopCylinder_Up1
,
IO_Type
.
Shunt_TopCylinder_Down1
);
Shunt_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Shunt_Check2_Middle
,
IO_VALUE
.
HIGH
));
IOMove
(
IO_Type
.
Shunt_StopDown1_Front
,
IO_VALUE
.
LOW
);
CylinderMove
(
Shunt_MoveInfo
,
IO_Type
.
Shunt_TopCylinder_Up1
,
IO_Type
.
Shunt_TopCylinder_Down1
,
true
);
CheckAndMove
(
IO_Type
.
Shunt_StopDown1_Front
,
IO_VALUE
.
LOW
);
}
}
}
}
else
else
...
@@ -174,10 +174,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -174,10 +174,9 @@ namespace OnlineStore.DeviceLibrary
}
}
//升降2处过托盘
//升降2处过托盘
if
(
IOValue
(
IO_Type
.
Shunt_Check4_BStop
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOValue
(
IO_Type
.
Shunt_StopDown2_Back
).
Equals
(
IO_VALUE
.
LOW
)
)
if
(
IOValue
(
IO_Type
.
Shunt_Check4_BStop
).
Equals
(
IO_VALUE
.
HIGH
)
)
{
{
if
(
TrayManager
.
checkWatch
(
shuntCheck4Watch
,
300
,
false
))
if
(
TrayManager
.
checkWatch
(
shuntCheck4Watch
,
TrayManager
.
SwTrayWaitTime
,
false
))
{
{
if
(
ShuntStop2CanDown
())
if
(
ShuntStop2CanDown
())
{
{
...
@@ -218,12 +217,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -218,12 +217,13 @@ namespace OnlineStore.DeviceLibrary
if
(
TrayNeedShunt
(
ShuntTrayNum
,
out
msg
))
if
(
TrayNeedShunt
(
ShuntTrayNum
,
out
msg
))
{
{
Shunt_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
Shunt05_Top1Up
);
Shunt_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
Shunt05_Top1Up
);
LogUtil
.
info
(
Name
+
"["
+
ShuntTrayNum
+
"]"
+
"分流横移:"
+
msg
+
" 需要分流,阻挡1上升,升降1上升 ,等待升降2是否可上升 "
);
LogUtil
.
info
(
Name
+
"["
+
ShuntTrayNum
+
"]"
+
"分流横移:"
+
msg
+
" 需要分流,阻挡1上升,升降1上升 ,等待升降2是否可上升 "
);
CylinderMove
(
Shunt_MoveInfo
,
IO_Type
.
Shunt_TopCylinder_Down1
,
IO_Type
.
Shunt_TopCylinder_Up1
);
CylinderMove
(
Shunt_MoveInfo
,
IO_Type
.
Shunt_TopCylinder_Down1
,
IO_Type
.
Shunt_TopCylinder_Up1
);
if
(
Shunt_Updown2CanUp
())
if
(
Shunt_Updown2CanUp
())
{
{
CylinderMove
(
Shunt_MoveInfo
,
IO_Type
.
Shunt_TopCylinder_Down2
,
IO_Type
.
Shunt_TopCylinder_Up2
);
CylinderMove
(
null
,
IO_Type
.
Shunt_TopCylinder_Down2
,
IO_Type
.
Shunt_TopCylinder_Up2
);
Shunt_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Shunt_TopCylinder_Down2
,
IO_VALUE
.
LOW
));
}
}
}
}
else
else
...
@@ -236,11 +236,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -236,11 +236,10 @@ namespace OnlineStore.DeviceLibrary
else
else
{
{
Shunt_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
Shunt01_WaitTime
);
Shunt_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
Shunt01_WaitTime
);
UpateShuntTrayNum
();
ShuntLog
(
"分流横移:等待Shunt_Check1_Front亮,阻挡1上升,升降1下降 "
);
Shunt_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Shunt_Check1_Front
,
IO_VALUE
.
HIGH
));
Shunt_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Shunt_Check1_Front
,
IO_VALUE
.
HIGH
));
CylinderMove
(
Shunt_MoveInfo
,
IO_Type
.
Shunt_TopCylinder_Up1
,
IO_Type
.
Shunt_TopCylinder_Down1
);
Shunt_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Shunt_Check2_Middle
,
IO_VALUE
.
HIGH
));
IOMove
(
IO_Type
.
Shunt_StopDown1_Front
,
IO_VALUE
.
LOW
);
CylinderMove
(
Shunt_MoveInfo
,
IO_Type
.
Shunt_TopCylinder_Up1
,
IO_Type
.
Shunt_TopCylinder_Down1
,
true
);
CheckAndMove
(
IO_Type
.
Shunt_StopDown1_Front
,
IO_VALUE
.
LOW
);
}
}
}
}
else
if
(
Shunt_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
Shunt02_Stop1Down
))
else
if
(
Shunt_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
Shunt02_Stop1Down
))
...
@@ -257,8 +256,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -257,8 +256,8 @@ namespace OnlineStore.DeviceLibrary
else
if
(
Shunt_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
Shunt05_Top1Up
))
else
if
(
Shunt_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
Shunt05_Top1Up
))
{
{
if
(
CylinderIsOk
(
IO_Type
.
Shunt_TopCylinder_Down
2
,
IO_Type
.
Shunt_TopCylinder_Up2
)
&&
if
(
CylinderIsOk
(
IO_Type
.
Shunt_TopCylinder_Down
1
,
IO_Type
.
Shunt_TopCylinder_Up1
)
&&
CylinderIsOk
(
IO_Type
.
Shunt_TopCylinder_Down1
,
IO_Type
.
Shunt_TopCylinder_Up1
))
IOValue
(
IO_Type
.
Shunt_TopCylinder_Down2
).
Equals
(
IO_VALUE
.
LOW
))
{
{
Shunt08_DriveMotorMove
();
Shunt08_DriveMotorMove
();
}
}
...
@@ -266,7 +265,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -266,7 +265,8 @@ namespace OnlineStore.DeviceLibrary
{
{
Shunt_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
Shunt07_Top2Up
);
Shunt_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
Shunt07_Top2Up
);
ShuntLog
(
"分流横移:升降2开始上升 "
);
ShuntLog
(
"分流横移:升降2开始上升 "
);
CylinderMove
(
Shunt_MoveInfo
,
IO_Type
.
Shunt_TopCylinder_Down2
,
IO_Type
.
Shunt_TopCylinder_Up2
);
CylinderMove
(
null
,
IO_Type
.
Shunt_TopCylinder_Down2
,
IO_Type
.
Shunt_TopCylinder_Up2
);
Shunt_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Shunt_TopCylinder_Down2
,
IO_VALUE
.
LOW
));
}
}
else
if
(
Shunt_MoveInfo
.
IsTimeOut
(
120
))
else
if
(
Shunt_MoveInfo
.
IsTimeOut
(
120
))
{
{
...
@@ -274,24 +274,24 @@ namespace OnlineStore.DeviceLibrary
...
@@ -274,24 +274,24 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
WarnMsg
,
DeviceID
*
1000
+
12
);
LogUtil
.
error
(
WarnMsg
,
DeviceID
*
1000
+
12
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
}
}
}
}
else
if
(
Shunt_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
Shunt07_Top2Up
))
else
if
(
Shunt_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
Shunt07_Top2Up
))
{
{
Shunt08_DriveMotorMove
();
Shunt08_DriveMotorMove
();
}
}
else
if
(
Shunt_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
Shunt08_DriveMotorMove
))
else
if
(
Shunt_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
Shunt08_DriveMotorMove
))
{
{
if
(
IOValue
(
IO_Type
.
Shunt_Check2_Middle
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
Shunt_Check
3_Back
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
Shunt_Check2_Middle
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
Shunt_Check
1_Front
).
Equals
(
IO_VALUE
.
LOW
))
{
{
Shunt_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
Shunt09_Top1Down
);
Shunt_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
Shunt09_Top1Down
);
ShuntLog
(
"分流横移:升降1先下降
,皮带1停止,等待检测4信号亮
"
);
ShuntLog
(
"分流横移:升降1先下降 "
);
Shunt_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
100
));
Shunt_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
100
));
CylinderMove
(
null
,
IO_Type
.
Shunt_TopCylinder_Up1
,
IO_Type
.
Shunt_TopCylinder_Down1
);
CylinderMove
(
null
,
IO_Type
.
Shunt_TopCylinder_Up1
,
IO_Type
.
Shunt_TopCylinder_Down1
);
Shunt_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
Shunt10_WaitCheck
);
Shunt_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
Shunt10_WaitCheck
);
ShuntLog
(
"分流横移:再次等待检测2low,检测3high,停止皮带线1 "
);
ShuntLog
(
"分流横移:再次等待检测2low,检测3high,停止皮带线1 "
);
IOMove
(
IO_Type
.
Shunt_MotorRun1
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
Shunt_MotorRun1
,
IO_VALUE
.
LOW
);
Shunt_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Shunt_Check3_Back
,
IO_VALUE
.
HIGH
));
Shunt_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Shunt_Check3_Back
,
IO_VALUE
.
HIGH
));
Shunt_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Shunt_Check2_Middle
,
IO_VALUE
.
LOW
));
Shunt_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Shunt_Check2_Middle
,
IO_VALUE
.
LOW
));
}
}
}
}
...
@@ -305,17 +305,20 @@ namespace OnlineStore.DeviceLibrary
...
@@ -305,17 +305,20 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
Shunt_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
Shunt10_WaitCheck
))
else
if
(
Shunt_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
Shunt10_WaitCheck
))
{
{
Shunt_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
Shunt11_TopDown
);
if
(
IOValue
(
IO_Type
.
Shunt_Check3_Back
).
Equals
(
IO_VALUE
.
HIGH
))
ShuntLog
(
"分流横移:升降2下降 ,皮带线2停止 "
);
{
CylinderMove
(
Shunt_MoveInfo
,
IO_Type
.
Shunt_TopCylinder_Up1
,
IO_Type
.
Shunt_TopCylinder_Down1
);
Shunt_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
Shunt11_TopDown
);
CylinderMove
(
Shunt_MoveInfo
,
IO_Type
.
Shunt_TopCylinder_Up2
,
IO_Type
.
Shunt_TopCylinder_Down2
);
ShuntLog
(
"分流横移:升降2下降 ,皮带线2停止 "
);
IOMove
(
IO_Type
.
Shunt_MotorRun2
,
IO_VALUE
.
LOW
);
CylinderMove
(
Shunt_MoveInfo
,
IO_Type
.
Shunt_TopCylinder_Up1
,
IO_Type
.
Shunt_TopCylinder_Down1
);
CylinderMove
(
Shunt_MoveInfo
,
IO_Type
.
Shunt_TopCylinder_Up2
,
IO_Type
.
Shunt_TopCylinder_Down2
);
IOMove
(
IO_Type
.
Shunt_MotorRun2
,
IO_VALUE
.
LOW
);
}
}
}
else
if
(
Shunt_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
Shunt11_TopDown
))
else
if
(
Shunt_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
Shunt11_TopDown
))
{
{
Shunt_MoveInfo
.
EndMove
();
Shunt_MoveInfo
.
EndMove
();
ShuntLog
(
"分流横移: 已离开 "
);
ShuntLog
(
"分流横移: 已离开 "
);
}
}
}
}
private
void
Shunt08_DriveMotorMove
()
private
void
Shunt08_DriveMotorMove
()
...
@@ -325,8 +328,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -325,8 +328,9 @@ namespace OnlineStore.DeviceLibrary
ShuntLog
(
"分流横移:两边皮带线开始转动,等待检测2low,检测3high "
);
ShuntLog
(
"分流横移:两边皮带线开始转动,等待检测2low,检测3high "
);
IOMove
(
IO_Type
.
Shunt_MotorRun1
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
Shunt_MotorRun1
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
Shunt_MotorRun2
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
Shunt_MotorRun2
,
IO_VALUE
.
HIGH
);
CylinderMove
(
Shunt_MoveInfo
,
IO_Type
.
Shunt_TopCylinder_Down2
,
IO_Type
.
Shunt_TopCylinder_Up2
);
Shunt_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Shunt_Check1_Front
,
IO_VALUE
.
LOW
));
Shunt_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Shunt_Check2_Middle
,
IO_VALUE
.
LOW
));
Shunt_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Shunt_Check2_Middle
,
IO_VALUE
.
LOW
));
Shunt_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Shunt_Check3_Back
,
IO_VALUE
.
HIGH
));
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论