Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit b42d2d18
由
LN
编写于
2020-02-28 20:02:26 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
托盘逻辑修改
1 个父辈
261a5797
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
76 行增加
和
33 行删除
source/DeviceLibrary/assemblyLine/EquipBase.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
source/DeviceLibrary/assemblyLine/EquipBase.cs
查看文件 @
b42d2d1
...
...
@@ -413,18 +413,18 @@ namespace OnlineStore.DeviceLibrary
if
(!
wait
.
IsEnd
)
{
if
(
wait
.
IoType
.
Equals
(
IO_Type
.
ClampCylinder_Slack
)
&&
wait
.
IoValue
.
Equals
(
IO_VALUE
.
HIGH
)
&&
span
.
TotalMilliseconds
>
6000
)
{
LogInfo
(
"未检测到:ClampCylinder_Slack=HIGH,超过6秒钟,默认下一步骤"
);
wait
.
IsEnd
=
true
;
}
else
if
(
wait
.
IoType
.
Equals
(
IO_Type
.
SL_MoveCylinder_Tighten
)
&&
wait
.
IoValue
.
Equals
(
IO_VALUE
.
HIGH
)
&&
span
.
TotalMilliseconds
>
6000
)
{
LogInfo
(
"未检测到:SL_MoveCylinder_Tighten=HIGH,超过6秒钟,默认下一步骤"
);
wait
.
IsEnd
=
true
;
}
else
{
//
if (wait.IoType.Equals(IO_Type.ClampCylinder_Slack) && wait.IoValue.Equals(IO_VALUE.HIGH) && span.TotalMilliseconds > 6000)
//
{
//
LogInfo("未检测到:ClampCylinder_Slack=HIGH,超过6秒钟,默认下一步骤");
//
wait.IsEnd = true;
//
}
//
else if (wait.IoType.Equals(IO_Type.SL_MoveCylinder_Tighten) && wait.IoValue.Equals(IO_VALUE.HIGH) && span.TotalMilliseconds > 6000)
//
{
//
LogInfo("未检测到:SL_MoveCylinder_Tighten=HIGH,超过6秒钟,默认下一步骤");
//
wait.IsEnd = true;
//
}
//
else
//
{
TimeSpan
rwSpan
=
DateTime
.
Now
-
preRWTime
;
//一分钟还未检测到
if
(
span
.
TotalSeconds
>
LineManager
.
Config
.
IOSingle_TimerOut
&&
NoAlarm
())
...
...
@@ -456,7 +456,7 @@ namespace OnlineStore.DeviceLibrary
isOk
=
false
;
break
;
}
}
//
}
}
else
if
(
wait
.
WaitType
.
Equals
(
WaitEnum
.
W003_Time
))
{
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
查看文件 @
b42d2d1
...
...
@@ -50,7 +50,7 @@ namespace OnlineStore.DeviceLibrary
private
InOutParam
CheckParam
=
new
InOutParam
();
private
DateTime
lastStopDown
=
DateTime
.
Now
;
internal
DateTime
lastStopDown
=
DateTime
.
Now
;
private
Stopwatch
swWaitWatch
=
new
Stopwatch
();
private
void
StartCheckFixture
()
...
...
@@ -84,7 +84,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
Config
.
SidesWayNum
.
Equals
(
2
)
&&
IOValue
(
IO_Type
.
SW_StopCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
canProcess
&&
(
DateTime
.
Now
-
lastStopDown
).
TotalSeconds
>
4
)
&&
(
DateTime
.
Now
-
lastStopDown
).
TotalSeconds
>
2.5
)
{
if
(
TrayManager
.
checkWatch
(
swWaitWatch
,
TrayManager
.
SwTrayWaitTime
,
true
))
{
...
...
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
查看文件 @
b42d2d1
...
...
@@ -244,8 +244,9 @@ namespace OnlineStore.DeviceLibrary
SW23_MoveInfo
.
NewMove
(
LineMoveType
.
InStore
);
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW03_WaitTime
);
SW23WaitTrayNum
=
-
1
;
SWLog
(
"横移轨道23:检测到SW2_TrayCheck,
再次检测
, 托盘号 ["
+
Sw23TrayNum
+
"] ,清空 SW23WaitTrayNum="
+
SW23WaitTrayNum
);
SWLog
(
"横移轨道23:检测到SW2_TrayCheck,
等待SW3_TrayCheck=0
, 托盘号 ["
+
Sw23TrayNum
+
"] ,清空 SW23WaitTrayNum="
+
SW23WaitTrayNum
);
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW2_TrayCheck
,
IO_VALUE
.
HIGH
));
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW3_TrayCheck
,
IO_VALUE
.
LOW
));
// CylinderMove(SW23_MoveInfo, IO_Type.SW2_LocationCylinder_Up, IO_Type.SW2_LocationCylinder_Down);
// CylinderMove(SW23_MoveInfo, IO_Type.SW3_LocationCylinder_Up, IO_Type.SW3_LocationCylinder_Down);
}
...
...
@@ -263,8 +264,9 @@ namespace OnlineStore.DeviceLibrary
SW41_MoveInfo
.
NewMove
(
LineMoveType
.
InStore
);
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW03_WaitTime
);
SW41WaitTrayNum
=
-
1
;
SWLog
(
"横移轨道41:检测到SW4_TrayCheck,
再次检测
,托盘号 ["
+
Sw41TrayNum
+
"] ,清空 SW41WaitTrayNum="
+
SW41WaitTrayNum
);
SWLog
(
"横移轨道41:检测到SW4_TrayCheck,
等待SW1_TrayCheck=0
,托盘号 ["
+
Sw41TrayNum
+
"] ,清空 SW41WaitTrayNum="
+
SW41WaitTrayNum
);
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW4_TrayCheck
,
IO_VALUE
.
HIGH
));
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW1_TrayCheck
,
IO_VALUE
.
LOW
));
//CylinderMove(SW41_MoveInfo, IO_Type.SW4_LocationCylinder_Up, IO_Type.SW4_LocationCylinder_Down);
// CylinderMove(SW41_MoveInfo, IO_Type.SW1_LocationCylinder_Up, IO_Type.SW1_LocationCylinder_Down);
}
...
...
@@ -290,7 +292,7 @@ namespace OnlineStore.DeviceLibrary
//20200228修改,横移机构可以同时存在两个托盘
try
{
if
(
LineManager
.
Line
.
runStatus
<=
LineRunStatus
.
Wait
||
sidesWayNum
<=
0
)
if
(
runStatus
<=
LineRunStatus
.
Wait
||
sidesWayNum
<=
0
)
{
return
true
;
}
...
...
@@ -321,9 +323,7 @@ namespace OnlineStore.DeviceLibrary
{
return
true
;
}
if
(
sidesWayNum
.
Equals
(
4
)
&&
SW41WaitTrayNum
<
0
)
else
if
(
sidesWayNum
.
Equals
(
4
)
&&
SW41WaitTrayNum
<
0
)
{
// LineMoveInfo moveInfo = FeedingEquipMap[101].SecondMoveInfo;
if
(
SW41_MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
...
...
@@ -346,7 +346,7 @@ namespace OnlineStore.DeviceLibrary
return
true
;
}
}
else
if
(
sidesWayNum
.
Equals
(
3
)
&&
SW41WaitTrayNum
<
0
&&
runStatus
<=
LineRunStatus
.
Wait
)
else
if
(
sidesWayNum
.
Equals
(
1
)
&&
SW41WaitTrayNum
<
0
&&
runStatus
<=
LineRunStatus
.
Wait
)
{
return
true
;
}
...
...
@@ -372,8 +372,9 @@ namespace OnlineStore.DeviceLibrary
}
if
(
sidesWayNum
.
Equals
(
3
))
{
TimeSpan
span
=
DateTime
.
Now
-
FeedingEquipMap
[
104
].
lastStopDown
;
LineMoveInfo
moveInfo
=
FeedingEquipMap
[
104
].
SecondMoveInfo
;
if
(
moveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
if
(
moveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
)
&&
span
.
TotalSeconds
>
3
)
{
return
true
;
}
...
...
@@ -382,7 +383,8 @@ namespace OnlineStore.DeviceLibrary
{
LineMoveInfo
moveInfo
=
FeedingEquipMap
[
101
].
SecondMoveInfo
;
if
(
moveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
TimeSpan
span
=
DateTime
.
Now
-
FeedingEquipMap
[
101
].
lastStopDown
;
if
(
moveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
)
&&
span
.
TotalSeconds
>
3
)
{
return
true
;
}
...
...
@@ -448,7 +450,8 @@ namespace OnlineStore.DeviceLibrary
{
if
(
IOValue
(
IO_Type
.
SW4_TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOValue
(
IO_Type
.
SW1_TrayCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
TrayManager
.
LineCanMoveSW
(
4
)
&&
TrayManager
.
LineCanMoveSW
(
1
))
TrayManager
.
LineCanMoveSW
(
4
)
)
//TrayManager.LineCanMoveSW(4) && TrayManager.LineCanMoveSW(1))
{
if
(
TrayManager
.
checkWatch
(
sw41WaitWatch
,
TrayManager
.
SwTrayWaitTime
,
true
))
{
...
...
@@ -466,7 +469,8 @@ namespace OnlineStore.DeviceLibrary
IOValue
(
IO_Type
.
SW4_TrayCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
SW1_TrayCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
(
DateTime
.
Now
-
lastSw4StopDownTime
).
TotalSeconds
>
2
&&
TrayManager
.
LineCanMoveSW
(
4
)
&&
TrayManager
.
LineCanMoveSW
(
1
))
TrayManager
.
LineCanMoveSW
(
4
))
//TrayManager.LineCanMoveSW(4) && TrayManager.LineCanMoveSW(1))
{
if
(
TrayManager
.
checkWatch
(
sw41WaitWatch
,
TrayManager
.
SwTrayWaitTime
,
true
))
{
...
...
@@ -496,7 +500,8 @@ namespace OnlineStore.DeviceLibrary
//检测到阻挡夹具信号后,阻挡气缸下降,等待有夹具信号,阻挡气缸上升,
//顶升气缸上升到位,开始流水线转动,检测到出口信号后,停止转动,顶升气缸下降,阻挡4下降,盘通过
if
(
IOValue
(
IO_Type
.
SW2_TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOValue
(
IO_Type
.
SW3_TrayCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
TrayManager
.
LineCanMoveSW
(
2
)
&&
TrayManager
.
LineCanMoveSW
(
3
))
TrayManager
.
LineCanMoveSW
(
2
)
)
//TrayManager.LineCanMoveSW(2) && TrayManager.LineCanMoveSW(3))
{
if
(
TrayManager
.
checkWatch
(
sw23WaitWatch
,
TrayManager
.
SwTrayWaitTime
,
true
))
{
...
...
@@ -514,7 +519,8 @@ namespace OnlineStore.DeviceLibrary
IOValue
(
IO_Type
.
SW2_TrayCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
SW3_TrayCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
(
DateTime
.
Now
-
lastSw2StopDownTime
).
TotalSeconds
>
2
&&
TrayManager
.
LineCanMoveSW
(
2
)
&&
TrayManager
.
LineCanMoveSW
(
3
))
TrayManager
.
LineCanMoveSW
(
2
)
)
//TrayManager.LineCanMoveSW(2) && TrayManager.LineCanMoveSW(3))
{
if
(
TrayManager
.
checkWatch
(
sw23WaitWatch
,
TrayManager
.
SwTrayWaitTime
,
true
))
{
...
...
@@ -622,6 +628,7 @@ namespace OnlineStore.DeviceLibrary
SWLog
(
"横移轨道41: 等待横移4托盘检测信号 ,SW4_StopDown上升 ,等待横移1(上料1)无托盘处理 "
);
CheckAndMove
(
IO_Type
.
SW4_StopDown
,
IO_VALUE
.
LOW
);
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW4_TrayCheck
,
IO_VALUE
.
HIGH
));
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW1_TrayCheck
,
IO_VALUE
.
LOW
));
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitSWCanTopUp
(
1
));
// SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.SwTrayWaitTime));
}
...
...
@@ -698,8 +705,15 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
SW41_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW11_TopDown
))
{
//开始入库
bool
result
=
FeedingEquipMap
[
101
].
CanStartCheckOut
(
Sw41TrayNum
);
bool
result
=
false
;
bool
topCylinderDown
=
true
;
//如果顶升1没有下降,才判断是否需要入库
if
(
IOValue
(
IO_Type
.
SW1_TopCylinder_Down
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
SW1_TopCylinder_Up
).
Equals
(
IO_VALUE
.
HIGH
))
{
topCylinderDown
=
false
;
result
=
FeedingEquipMap
[
101
].
CanStartCheckOut
(
Sw41TrayNum
);
}
if
(
result
)
{
...
...
@@ -712,6 +726,10 @@ namespace OnlineStore.DeviceLibrary
}
else
{
//启动入库失败,需要下降顶升气缸
if
(
topCylinderDown
)
{
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW12_WaitTrayGo
);
SWLog
(
"横移轨道41:关闭皮带电机,等待SW1_TrayCheck=0,最多等待5秒,关闭横移电机 "
);
IOMove
(
IO_Type
.
SW4_MotorRun
,
IO_VALUE
.
LOW
);
...
...
@@ -720,6 +738,13 @@ namespace OnlineStore.DeviceLibrary
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
5000
));
SW41_MoveInfo
.
OneWaitCanEndStep
=
true
;
}
else
{
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW11_TopDown
);
SWLog
(
"横移轨道41:托盘已到达出口,重新顶升气缸下降 "
);
CylinderMove
(
SW41_MoveInfo
,
IO_Type
.
SW1_TopCylinder_Up
,
IO_Type
.
SW1_TopCylinder_Down
);
}
}
}
//else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW11_StopDrive))
//{
...
...
@@ -790,6 +815,8 @@ namespace OnlineStore.DeviceLibrary
SWLog
(
"横移轨道23: 等待横移4托盘检测信号 ,SW2_StopDown上升 ,等待横移3(上料4)处无托盘 "
);
CheckAndMove
(
IO_Type
.
SW2_StopDown
,
IO_VALUE
.
LOW
);
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW2_TrayCheck
,
IO_VALUE
.
HIGH
));
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW3_TrayCheck
,
IO_VALUE
.
LOW
));
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitSWCanTopUp
(
3
));
// SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.SwTrayWaitTime));
}
...
...
@@ -809,7 +836,8 @@ namespace OnlineStore.DeviceLibrary
CylinderMove
(
SW23_MoveInfo
,
IO_Type
.
SW2_LocationCylinder_Up
,
IO_Type
.
SW2_LocationCylinder_Down
);
CylinderMove
(
SW23_MoveInfo
,
IO_Type
.
SW3_LocationCylinder_Up
,
IO_Type
.
SW3_LocationCylinder_Down
);
}
else
if
(
SW23_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW05_LocationDown
))
{
else
if
(
SW23_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW05_LocationDown
))
{
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW06_TopCylinderUp
);
SWLog
(
"横移轨道23:顶升气缸上升 ,至少等待1000 "
);
IOMove
(
IO_Type
.
SW2_StopDown
,
IO_VALUE
.
LOW
);
...
...
@@ -864,8 +892,14 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
SW23_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW11_TopDown
))
{
//开始入库
bool
result
=
FeedingEquipMap
[
104
].
CanStartCheckOut
(
Sw23TrayNum
);
bool
result
=
false
;
bool
topCylinderDown
=
true
;
//如果顶升1没有下降,才判断是否需要入库
if
(
IOValue
(
IO_Type
.
SW3_TopCylinder_Down
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
SW3_TopCylinder_Up
).
Equals
(
IO_VALUE
.
HIGH
))
{
topCylinderDown
=
false
;
result
=
FeedingEquipMap
[
104
].
CanStartCheckOut
(
Sw23TrayNum
);
}
if
(
result
)
{
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW12_WaitTrayGo
);
...
...
@@ -877,6 +911,8 @@ namespace OnlineStore.DeviceLibrary
}
else
{
if
(
topCylinderDown
)
{
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW12_WaitTrayGo
);
SWLog
(
"横移轨道23:关闭皮带电机,等待SW3_TrayCheck=0,最多等待5秒,关闭横移电机 "
);
IOMove
(
IO_Type
.
SW2_MotorRun
,
IO_VALUE
.
LOW
);
...
...
@@ -885,6 +921,13 @@ namespace OnlineStore.DeviceLibrary
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
5000
));
SW23_MoveInfo
.
OneWaitCanEndStep
=
true
;
}
else
{
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW11_TopDown
);
SWLog
(
"横移轨道23:托盘已到达出口,重新顶升气缸下降 "
);
CylinderMove
(
SW23_MoveInfo
,
IO_Type
.
SW3_TopCylinder_Up
,
IO_Type
.
SW3_TopCylinder_Down
);
}
}
}
//else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW11_StopDrive))
//{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论