Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 9be2ce71
由
LN
编写于
2020-06-28 15:43:51 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
上料横移优化
1 个父辈
1e6f294f
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
138 行增加
和
85 行删除
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
source/DeviceLibrary/assemblyLine/LineBean.cs
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
查看文件 @
9be2ce7
...
@@ -204,7 +204,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -204,7 +204,7 @@ namespace OnlineStore.DeviceLibrary
if
(
Config
.
SidesWayNum
<=
0
)
if
(
Config
.
SidesWayNum
<=
0
)
{
{
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_03_Stop2Down
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_03_Stop2Down
);
CheckLog
(
"托盘检测:"
+
SecondMoveInfo
.
SLog
+
"阻挡1上升,等待FL_TrayCheck=1 "
);
CheckLog
(
"托盘检测:"
+
SecondMoveInfo
.
SLog
+
"阻挡1上升,等待FL_TrayCheck=1 "
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
FL_TrayCheck
,
IO_VALUE
.
HIGH
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
FL_TrayCheck
,
IO_VALUE
.
HIGH
));
}
}
else
else
...
@@ -212,7 +212,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -212,7 +212,7 @@ namespace OnlineStore.DeviceLibrary
TimeSpan
span
=
DateTime
.
Now
-
SecondMoveInfo
.
LastSetpTime
;
TimeSpan
span
=
DateTime
.
Now
-
SecondMoveInfo
.
LastSetpTime
;
//去掉延迟
//去掉延迟
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_03_Stop2Down
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_03_Stop2Down
);
LogUtil
.
debug
(
Name
+
"托盘阻挡:"
+
SecondMoveInfo
.
SLog
+
"阻挡气缸上升,下降耗时("
+
FormUtil
.
GetSpanStr
(
span
)
+
"),等待SW_TrayCheck=1)"
);
LogUtil
.
debug
(
Name
+
"托盘阻挡:"
+
SecondMoveInfo
.
SLog
+
"阻挡气缸上升,下降耗时("
+
FormUtil
.
GetSpanStr
(
span
)
+
"),等待SW_TrayCheck=1)"
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW_TrayCheck
,
IO_VALUE
.
HIGH
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW_TrayCheck
,
IO_VALUE
.
HIGH
));
}
}
}
}
...
@@ -230,7 +230,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -230,7 +230,7 @@ namespace OnlineStore.DeviceLibrary
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW_TrayCheck, IO_VALUE.HIGH));
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW_TrayCheck, IO_VALUE.HIGH));
//}
//}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MIO_03_Stop2Down
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MIO_03_Stop2Down
))
{
{
UpdateTrayNum
();
UpdateTrayNum
();
//出料中,需要拦盘
//出料中,需要拦盘
if
(
CurrTrayIsNeed
(
currTrayNum
,
true
))
if
(
CurrTrayIsNeed
(
currTrayNum
,
true
))
...
@@ -343,32 +343,28 @@ namespace OnlineStore.DeviceLibrary
...
@@ -343,32 +343,28 @@ namespace OnlineStore.DeviceLibrary
}
}
else
else
{
{
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_14_TopDown
);
if
(
CylinderIsOk
(
IO_Type
.
SW_TopCylinder_Up
,
IO_Type
.
SW_TopCylinder_Down
))
CheckLog
(
"托盘放行, "
+
SecondMoveInfo
.
SLog
+
" ,环形线顶升气缸下降)"
);
{
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
SW_TopCylinder_Up
,
IO_Type
.
SW_TopCylinder_Down
);
MO_15_WaitCanGo
();
}
else
{
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_14_TopDown
);
CheckLog
(
"托盘放行, "
+
SecondMoveInfo
.
SLog
+
" ,环形线顶升气缸下降)"
);
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
SW_TopCylinder_Up
,
IO_Type
.
SW_TopCylinder_Down
);
}
}
}
}
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_14_TopDown
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_14_TopDown
))
{
{
MO_15_WaitCanGo
();
MO_15_WaitCanGo
();
//SecondMoveInfo.NextMoveStep(LineMoveStep.MO_15_WaitCanGo);
//if (Config.SidesWayNum > 0)
//{
// CheckLog("托盘放行 " + SecondMoveInfo.SLog + " ,等待托盘离开");
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW_TrayCheck, IO_VALUE.LOW));
//}
//else
//{
// CheckLog("托盘放行 " + SecondMoveInfo.SLog + " ,等待 NextStopCheck=0");
// // SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.NextStopCheck, IO_VALUE.LOW));
//}
}
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_15_WaitCanGo
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_15_WaitCanGo
))
{
{
if
(
Config
.
SidesWayNum
>
0
)
if
(
Config
.
SidesWayNum
>
0
)
{
{
if
(
Config
.
SidesWayNum
.
Equals
(
3
)
||
Config
.
SidesWayNum
.
Equals
(
1
))
if
(
Config
.
SidesWayNum
.
Equals
(
3
)
||
Config
.
SidesWayNum
.
Equals
(
1
))
{
{
CylinderMove
(
null
,
IO_Type
.
SW_TopCylinder_Down
,
IO_Type
.
SW_TopCylinder_Up
);
CylinderMove
(
null
,
IO_Type
.
SW_TopCylinder_Down
,
IO_Type
.
SW_TopCylinder_Up
);
}
}
CheckLog
(
"托盘放行 SecondStoreMove:(托盘放行结束)横移顶升先上升 "
);
CheckLog
(
"托盘放行 SecondStoreMove:(托盘放行结束)横移顶升先上升 "
);
...
@@ -377,10 +373,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -377,10 +373,10 @@ namespace OnlineStore.DeviceLibrary
else
else
{
{
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_16_Stop2Down
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_16_Stop2Down
);
CheckLog
(
"托盘放行 "
+
SecondMoveInfo
.
SLog
+
" ,阻挡气缸1-2下降,等待"
);
CheckLog
(
"托盘放行 "
+
SecondMoveInfo
.
SLog
+
" ,阻挡气缸1-2下降,等待"
);
IOMove
(
IO_Type
.
FL_StopCylinder_Down2
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
FL_StopCylinder_Down2
,
IO_VALUE
.
HIGH
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
FL_StopCylinder_Down2
,
IO_VALUE
.
HIGH
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
FL_StopCylinder_Down2
,
IO_VALUE
.
HIGH
));
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime));
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime));
}
}
// SecondMoveInfo.EndStepWait();
// SecondMoveInfo.EndStepWait();
}
}
...
@@ -398,7 +394,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -398,7 +394,7 @@ namespace OnlineStore.DeviceLibrary
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
}
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_18_WaitTime
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_18_WaitTime
))
{
{
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_19_StopCylinder_Back
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_19_StopCylinder_Back
);
CheckLog
(
"托盘放行 "
+
SecondMoveInfo
.
SLog
+
" ,等待托盘离开 )"
);
CheckLog
(
"托盘放行 "
+
SecondMoveInfo
.
SLog
+
" ,等待托盘离开 )"
);
IOMove
(
IO_Type
.
FL_StopCylinder_Down2
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
FL_StopCylinder_Down2
,
IO_VALUE
.
LOW
);
...
@@ -451,14 +447,20 @@ namespace OnlineStore.DeviceLibrary
...
@@ -451,14 +447,20 @@ namespace OnlineStore.DeviceLibrary
{
{
//preTrayNum = currTrayNum;
//preTrayNum = currTrayNum;
CheckLog
(
"托盘放行: 此处为环形线横移2,顶升气缸不需要下降, (托盘放行结束) "
);
CheckLog
(
"托盘放行: 此处为环形线横移2,顶升气缸不需要下降, (托盘放行结束) "
);
SMoveEnd
();
SMoveEnd
();
}
}
else
else
{
{
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_14_TopDown
);
if
(
CylinderIsOk
(
IO_Type
.
SW_TopCylinder_Up
,
IO_Type
.
SW_TopCylinder_Down
))
CheckLog
(
"托盘放行, "
+
SecondMoveInfo
.
SLog
+
" ,环形线顶升气缸下降)"
);
{
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
SW_TopCylinder_Up
,
IO_Type
.
SW_TopCylinder_Down
);
MO_15_WaitCanGo
();
}
else
{
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_14_TopDown
);
CheckLog
(
"托盘放行, "
+
SecondMoveInfo
.
SLog
+
" ,环形线顶升气缸下降)"
);
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
SW_TopCylinder_Up
,
IO_Type
.
SW_TopCylinder_Down
);
}
}
}
}
}
else
else
...
@@ -922,23 +924,23 @@ namespace OnlineStore.DeviceLibrary
...
@@ -922,23 +924,23 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_26_CylinderRelax
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_26_CylinderRelax
))
{
{
if
(
Config
.
SidesWayNum
.
Equals
(
1
))
//
if (Config.SidesWayNum.Equals(1))
{
//
{
FI_28_CylinderUp
();
//
FI_28_CylinderUp();
}
//
}
else
//
else
{
//
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_27_WaitCylinderUp
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_27_WaitCylinderUp
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
100
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
100
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SL_MoveCylinder_Down
,
IO_VALUE
.
LOW
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SL_MoveCylinder_Down
,
IO_VALUE
.
LOW
));
CylinderMove
(
null
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
CylinderMove
(
null
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
}
//
}
TrayPreMove
();
TrayPreMove
();
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_27_WaitCylinderUp
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_27_WaitCylinderUp
))
{
{
FI_28_CylinderUp
();
TrayMoveOk
();
TrayMoveOk
();
FI_28_CylinderUp
();
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_28_CylinderUp
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_28_CylinderUp
))
{
{
...
...
source/DeviceLibrary/assemblyLine/LineBean.cs
查看文件 @
9be2ce7
...
@@ -30,6 +30,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -30,6 +30,8 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
private
System
.
Timers
.
Timer
IoCheckTimer
=
null
;
private
System
.
Timers
.
Timer
IoCheckTimer
=
null
;
private
System
.
Timers
.
Timer
serverConTimer
=
null
;
/// <summary>
/// <summary>
/// 流水线下所有的移载装置
/// 流水线下所有的移载装置
/// </summary>
/// </summary>
...
@@ -207,8 +209,15 @@ namespace OnlineStore.DeviceLibrary
...
@@ -207,8 +209,15 @@ namespace OnlineStore.DeviceLibrary
IoCheckTimer
.
Elapsed
+=
IoCheckTimerProcess
;
IoCheckTimer
.
Elapsed
+=
IoCheckTimerProcess
;
IoCheckTimer
.
AutoReset
=
true
;
IoCheckTimer
.
AutoReset
=
true
;
IoCheckTimer
.
Enabled
=
false
;
IoCheckTimer
.
Enabled
=
false
;
serverConTimer
=
new
System
.
Timers
.
Timer
();
serverConTimer
.
Interval
=
2000
;
serverConTimer
.
AutoReset
=
true
;
serverConTimer
.
Elapsed
+=
ServerConTimer_Elapsed
;
serverConTimer
.
Enabled
=
false
;
}
}
#
endregion
#
endregion
public
string
CanStart
()
public
string
CanStart
()
...
@@ -290,6 +299,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -290,6 +299,7 @@ namespace OnlineStore.DeviceLibrary
// WriteDrivetMotorRun(IO_VALUE.LOW);
// WriteDrivetMotorRun(IO_VALUE.LOW);
IoCheckTimer
.
Enabled
=
true
;
IoCheckTimer
.
Enabled
=
true
;
mainTimer
.
Enabled
=
true
;
mainTimer
.
Enabled
=
true
;
serverConTimer
.
Enabled
=
true
;
return
true
;
return
true
;
}
}
}
}
...
@@ -312,7 +322,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -312,7 +322,7 @@ namespace OnlineStore.DeviceLibrary
// TrayManager.SidesWayStateMap = new System.Collections.Concurrent.ConcurrentDictionary<int, int>() ;
// TrayManager.SidesWayStateMap = new System.Collections.Concurrent.ConcurrentDictionary<int, int>() ;
alarmType
=
LineAlarmType
.
None
;
alarmType
=
LineAlarmType
.
None
;
mainTimer
.
Enabled
=
false
;
mainTimer
.
Enabled
=
false
;
IoCheckTimer
.
Enabled
=
false
;
IoCheckTimer
.
Enabled
=
false
;
isInSuddenDown
=
false
;
isInSuddenDown
=
false
;
isNoAirCheck
=
false
;
isNoAirCheck
=
false
;
TrayManager
.
TrayErrorMsg
=
""
;
TrayManager
.
TrayErrorMsg
=
""
;
...
@@ -353,8 +363,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -353,8 +363,9 @@ namespace OnlineStore.DeviceLibrary
public
override
bool
Reset
()
public
override
bool
Reset
()
{
{
mainTimer
.
Enabled
=
false
;
mainTimer
.
Enabled
=
false
;
IoCheckTimer
.
Enabled
=
false
;
IoCheckTimer
.
Enabled
=
false
;
bool
isNeedAllReset
=
false
;
bool
isNeedAllReset
=
false
;
if
(
isInSuddenDown
||
isNoAirCheck
)
if
(
isInSuddenDown
||
isNoAirCheck
)
{
{
//TrayManager.LineNeedEmptyTrayNum = 0;
//TrayManager.LineNeedEmptyTrayNum = 0;
...
@@ -390,6 +401,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -390,6 +401,7 @@ namespace OnlineStore.DeviceLibrary
{
return
false
;
}
{
return
false
;
}
IoCheckTimer
.
Enabled
=
true
;
IoCheckTimer
.
Enabled
=
true
;
mainTimer
.
Enabled
=
true
;
mainTimer
.
Enabled
=
true
;
serverConTimer
.
Enabled
=
true
;
return
true
;
return
true
;
}
}
private
void
EquipReset
(
EquipBase
equip
,
bool
isNeedAllReset
)
private
void
EquipReset
(
EquipBase
equip
,
bool
isNeedAllReset
)
...
@@ -420,6 +432,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -420,6 +432,7 @@ namespace OnlineStore.DeviceLibrary
{
{
IoCheckTimer
.
Enabled
=
false
;
IoCheckTimer
.
Enabled
=
false
;
mainTimer
.
Enabled
=
false
;
mainTimer
.
Enabled
=
false
;
serverConTimer
.
Enabled
=
false
;
AgvClient
.
SetCancelState
(
true
);
AgvClient
.
SetCancelState
(
true
);
RFIDManager
.
Close
();
RFIDManager
.
Close
();
//停止运行时,把阻挡气缸上升
//停止运行时,把阻挡气缸上升
...
@@ -995,5 +1008,28 @@ namespace OnlineStore.DeviceLibrary
...
@@ -995,5 +1008,28 @@ namespace OnlineStore.DeviceLibrary
msg
+=
"SW23: "
+
SW23_MoveInfo
.
MoveType
+
" "
+
SW23_MoveInfo
.
MoveStep
+
"\n"
;
msg
+=
"SW23: "
+
SW23_MoveInfo
.
MoveType
+
" "
+
SW23_MoveInfo
.
MoveStep
+
"\n"
;
return
msg
;
return
msg
;
}
}
private
void
ServerConTimer_Elapsed
(
object
sender
,
ElapsedEventArgs
e
)
{
//14.异常看板
// > 地址:
//>>/ rest / api / qisda / device / updateDeviceAlarmMsg
// >
// > 参数:
//>> deviceAlarmList : 异常列表Json字符串 `[{"name":"移栽5", "msgKey":"line.move5.timeOut", "msgValue":"运动超时"},{"name":"移栽4", "msgKey":"line.move4.timeOut", "msgValue":"误差过大"}]`
//>>>name : 异常位置名称
//>>>msgKey : 异常信息唯一标识
//>>>msgValue : 异常信息
//>
//> 返回:
//>>` {"code":0,"msg":"ok","data":""}`
//>>
//>> - code: 0为正常,其他为异常,
// >> - msg:消息,
// >> - data:
}
}
}
}
}
\ No newline at end of file
\ No newline at end of file
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
查看文件 @
9be2ce7
...
@@ -257,9 +257,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -257,9 +257,6 @@ namespace OnlineStore.DeviceLibrary
SW23_MoveInfo
.
NewMove
(
LineMoveType
.
InStore
);
SW23_MoveInfo
.
NewMove
(
LineMoveType
.
InStore
);
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW03_WaitTime
);
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW03_WaitTime
);
SW23WaitTrayNum
=
-
1
;
SW23WaitTrayNum
=
-
1
;
//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));
SW23_SW04_WaitCanUp
();
SW23_SW04_WaitCanUp
();
}
}
else
else
...
@@ -276,9 +273,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -276,9 +273,6 @@ namespace OnlineStore.DeviceLibrary
SW41_MoveInfo
.
NewMove
(
LineMoveType
.
InStore
);
SW41_MoveInfo
.
NewMove
(
LineMoveType
.
InStore
);
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW03_WaitTime
);
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW03_WaitTime
);
SW41WaitTrayNum
=
-
1
;
SW41WaitTrayNum
=
-
1
;
//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));
SW41_SW04_WaitCanUp
();
SW41_SW04_WaitCanUp
();
}
}
else
else
...
@@ -610,9 +604,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -610,9 +604,7 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
IOValue
(
IO_Type
.
SW4_TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
SW4_TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
SW41_SW04_WaitCanUp
();
SW41_SW04_WaitCanUp
();
// SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.SwTrayWaitTime));
}
}
else
else
{
{
...
@@ -625,18 +617,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -625,18 +617,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
SW41_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW04_WaitCanUp
))
else
if
(
SW41_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW04_WaitCanUp
))
{
{
if
(
CylinderIsOk
(
IO_Type
.
SW4_LocationCylinder_Up
,
IO_Type
.
SW4_LocationCylinder_Down
)
&&
SW41_SW05_LocationDown
();
CylinderIsOk
(
IO_Type
.
SW1_LocationCylinder_Up
,
IO_Type
.
SW1_LocationCylinder_Down
))
{
SW41_SW06_TopCylinderUp
();
}
else
{
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW05_LocationDown
);
SWLog
(
"横移轨道41:定位气缸下降 "
);
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
);
}
}
}
else
if
(
SW41_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW05_LocationDown
))
else
if
(
SW41_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW05_LocationDown
))
{
{
...
@@ -775,14 +756,38 @@ namespace OnlineStore.DeviceLibrary
...
@@ -775,14 +756,38 @@ namespace OnlineStore.DeviceLibrary
CylinderMove
(
SW41_MoveInfo
,
IO_Type
.
SW1_TopCylinder_Down
,
IO_Type
.
SW1_TopCylinder_Up
);
CylinderMove
(
SW41_MoveInfo
,
IO_Type
.
SW1_TopCylinder_Down
,
IO_Type
.
SW1_TopCylinder_Up
);
}
}
}
}
private
void
SW41_SW05_LocationDown
()
{
if
(
CylinderIsOk
(
IO_Type
.
SW4_LocationCylinder_Up
,
IO_Type
.
SW4_LocationCylinder_Down
)
&&
CylinderIsOk
(
IO_Type
.
SW1_LocationCylinder_Up
,
IO_Type
.
SW1_LocationCylinder_Down
))
{
SW41_SW06_TopCylinderUp
();
}
else
{
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW05_LocationDown
);
SWLog
(
"横移轨道41:定位气缸下降 "
);
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
);
}
}
private
void
SW41_SW04_WaitCanUp
()
private
void
SW41_SW04_WaitCanUp
()
{
{
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW04_WaitCanUp
);
if
(
IOValue
(
IO_Type
.
SW4_TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOValue
(
IO_Type
.
SW1_TrayCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
SwCanUpMove
(
1
))
SWLog
(
"横移轨道41: 等待横移4托盘检测信号 ,SW4_StopDown上升 ,等待横移1(上料1)无托盘处理 "
);
{
CheckAndMove
(
IO_Type
.
SW4_StopDown
,
IO_VALUE
.
LOW
);
SW41_SW05_LocationDown
();
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
));
else
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitSWCanTopUp
(
1
));
{
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW04_WaitCanUp
);
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
));
}
}
}
private
bool
CheckTrayIsNeed
(
int
deviceId
,
int
trayNum
)
private
bool
CheckTrayIsNeed
(
int
deviceId
,
int
trayNum
)
...
@@ -853,18 +858,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -853,18 +858,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
SW23_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW04_WaitCanUp
))
else
if
(
SW23_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW04_WaitCanUp
))
{
{
if
(
CylinderIsOk
(
IO_Type
.
SW2_LocationCylinder_Up
,
IO_Type
.
SW2_LocationCylinder_Down
)
&&
SW23_SW05_LocationDown
();
CylinderIsOk
(
IO_Type
.
SW3_LocationCylinder_Up
,
IO_Type
.
SW3_LocationCylinder_Down
))
{
SW23_SW06_TopCylinderUp
();
}
else
{
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW05_LocationDown
);
SWLog
(
"横移轨道23:定位气缸下降 "
);
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
))
{
{
...
@@ -1000,16 +994,37 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1000,16 +994,37 @@ namespace OnlineStore.DeviceLibrary
CylinderMove
(
SW23_MoveInfo
,
IO_Type
.
SW3_TopCylinder_Down
,
IO_Type
.
SW3_TopCylinder_Up
);
CylinderMove
(
SW23_MoveInfo
,
IO_Type
.
SW3_TopCylinder_Down
,
IO_Type
.
SW3_TopCylinder_Up
);
}
}
}
}
private
void
SW23_SW05_LocationDown
()
{
if
(
CylinderIsOk
(
IO_Type
.
SW2_LocationCylinder_Up
,
IO_Type
.
SW2_LocationCylinder_Down
)
&&
CylinderIsOk
(
IO_Type
.
SW3_LocationCylinder_Up
,
IO_Type
.
SW3_LocationCylinder_Down
))
{
SW23_SW06_TopCylinderUp
();
}
else
{
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW05_LocationDown
);
SWLog
(
"横移轨道23:定位气缸下降 "
);
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
);
}
}
private
void
SW23_SW04_WaitCanUp
()
private
void
SW23_SW04_WaitCanUp
()
{
{
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW04_WaitCanUp
);
if
(
IOValue
(
IO_Type
.
SW2_TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOValue
(
IO_Type
.
SW3_TrayCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
SwCanUpMove
(
3
))
SWLog
(
"横移轨道23: 等待横移4托盘检测信号 ,SW2_StopDown上升 ,等待横移3(上料4)处无托盘 "
);
{
CheckAndMove
(
IO_Type
.
SW2_StopDown
,
IO_VALUE
.
LOW
);
SW23_SW05_LocationDown
();
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
));
else
{
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW04_WaitCanUp
);
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
.
WaitSWCanTopUp
(
3
));
}
}
}
private
void
SWLog
(
string
msg
)
private
void
SWLog
(
string
msg
)
{
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论