Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 130d6f3e
由
LN
编写于
2020-04-14 11:17:06 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
NeedLeave和NeedEnter级别修改
1 个父辈
53002f69
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
36 行增加
和
17 行删除
source/DeviceLibrary/agvClient/AgvClient.cs
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
source/DeviceLibrary/agvClient/AgvClient.cs
查看文件 @
130d6f3
...
@@ -146,22 +146,22 @@ namespace OnlineStore.DeviceLibrary
...
@@ -146,22 +146,22 @@ namespace OnlineStore.DeviceLibrary
}
}
return
false
;
return
false
;
}
}
public
static
bool
NeedEnter
(
string
id
,
string
shelfId
=
""
)
public
static
bool
NeedEnter
(
string
id
,
string
shelfId
=
""
,
ClientLevel
level
=
ClientLevel
.
Low
)
{
{
ClientAction
currA
=
GetAction
(
id
);
ClientAction
currA
=
GetAction
(
id
);
if
(
currA
.
Equals
(
ClientAction
.
None
)
||
currA
.
Equals
(
ClientAction
.
NeedLeave
)
||
currA
.
Equals
(
ClientAction
.
NeedEnter
))
if
(
currA
.
Equals
(
ClientAction
.
None
)
||
currA
.
Equals
(
ClientAction
.
NeedLeave
)
||
currA
.
Equals
(
ClientAction
.
NeedEnter
))
{
{
SetStatus
(
id
,
shelfId
,
ClientAction
.
NeedEnter
,
ClientLevel
.
Low
);
SetStatus
(
id
,
shelfId
,
ClientAction
.
NeedEnter
,
level
);
return
true
;
return
true
;
}
}
return
false
;
return
false
;
}
}
public
static
bool
NeedLeave
(
string
id
,
string
shelfId
=
""
)
public
static
bool
NeedLeave
(
string
id
,
string
shelfId
=
""
,
ClientLevel
level
=
ClientLevel
.
Low
)
{
{
ClientAction
currA
=
GetAction
(
id
);
ClientAction
currA
=
GetAction
(
id
);
if
(
currA
.
Equals
(
ClientAction
.
None
)
||
currA
.
Equals
(
ClientAction
.
NeedLeave
)
||
currA
.
Equals
(
ClientAction
.
NeedEnter
))
if
(
currA
.
Equals
(
ClientAction
.
None
)
||
currA
.
Equals
(
ClientAction
.
NeedLeave
)
||
currA
.
Equals
(
ClientAction
.
NeedEnter
))
{
{
SetStatus
(
id
,
shelfId
,
ClientAction
.
NeedLeave
,
ClientLevel
.
High
);
SetStatus
(
id
,
shelfId
,
ClientAction
.
NeedLeave
,
level
);
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
查看文件 @
130d6f3
...
@@ -272,8 +272,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -272,8 +272,13 @@ namespace OnlineStore.DeviceLibrary
LogInfo
(
"重置完成!"
);
LogInfo
(
"重置完成!"
);
if
(
IOValue
(
IO_Type
.
SL_Out_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
SL_Out_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
ClientLevel
level
=
ClientLevel
.
Low
;
if
(
IOValue
(
IO_Type
.
SL_Location_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
level
=
ClientLevel
.
High
;
}
LogInfo
(
"重置完成,出口检测到有料架,调用 "
+
Config
.
AgvOutName
+
" AgvClient.NeedLeave"
);
LogInfo
(
"重置完成,出口检测到有料架,调用 "
+
Config
.
AgvOutName
+
" AgvClient.NeedLeave"
);
AgvClient
.
NeedLeave
(
Config
.
AgvOutName
,
LastOutShelfId
);
AgvClient
.
NeedLeave
(
Config
.
AgvOutName
,
LastOutShelfId
,
level
);
}
}
MoveEndS
();
MoveEndS
();
break
;
break
;
...
@@ -399,8 +404,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -399,8 +404,13 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
IOValue
(
IO_Type
.
SL_Out_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
SL_Out_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
ClientLevel
level
=
ClientLevel
.
Low
;
if
(
IOValue
(
IO_Type
.
SL_Location_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
level
=
ClientLevel
.
High
;
}
//线体出口检测到料架,需要通知AGV小车
//线体出口检测到料架,需要通知AGV小车
AgvClient
.
NeedLeave
(
Config
.
AgvOutName
,
LastOutShelfId
);
AgvClient
.
NeedLeave
(
Config
.
AgvOutName
,
LastOutShelfId
,
level
);
// SendShelfToAGV();
// SendShelfToAGV();
}
}
else
else
...
@@ -410,7 +420,16 @@ namespace OnlineStore.DeviceLibrary
...
@@ -410,7 +420,16 @@ namespace OnlineStore.DeviceLibrary
//入口无料架,mayEnter
//入口无料架,mayEnter
if
(
IOValue
(
IO_Type
.
SL_Entry_Check
).
Equals
(
IO_VALUE
.
LOW
))
if
(
IOValue
(
IO_Type
.
SL_Entry_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
{
AgvClient
.
NeedEnter
(
Config
.
AgvInName
);
ClientLevel
level
=
ClientLevel
.
Low
;
if
(
Config
.
IsCanOut
.
Equals
(
1
))
{
//如果是出料模块且当前无料架
if
(
IOValue
(
IO_Type
.
SL_Location_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
level
=
ClientLevel
.
High
;
}
}
AgvClient
.
NeedEnter
(
Config
.
AgvInName
,
""
,
level
);
}
}
else
else
{
{
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
查看文件 @
130d6f3
...
@@ -648,7 +648,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -648,7 +648,7 @@ namespace OnlineStore.DeviceLibrary
{
{
UpdateShelfId
();
UpdateShelfId
();
if
(
CurrShelfId
.
EndsWith
(
"00"
))
if
(
CurrShelfId
.
EndsWith
(
"00"
))
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_33_BatchAxisToP1
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_33_BatchAxisToP1
);
InLog
(
"料架号【"
+
CurrShelfId
+
"】无效,送出料架,"
+
MoveInfo
.
SLog
+
":提升伺服到P1点,定位气缸下降"
);
InLog
(
"料架号【"
+
CurrShelfId
+
"】无效,送出料架,"
+
MoveInfo
.
SLog
+
":提升伺服到P1点,定位气缸下降"
);
BatchAxis
.
AbsMove
(
MoveInfo
,
Config
.
BatchAxisP1
,
Config
.
BatchAxis_P1Speed
);
BatchAxis
.
AbsMove
(
MoveInfo
,
Config
.
BatchAxisP1
,
Config
.
BatchAxis_P1Speed
);
...
@@ -757,10 +757,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -757,10 +757,10 @@ namespace OnlineStore.DeviceLibrary
CylinderMove
(
null
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
CylinderMove
(
null
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
}
}
else
else
{
{
CylinderMove
(
null
,
IO_Type
.
SL_MoveCylinder_Take
,
IO_Type
.
SL_MoveCylinder_Give
);
CylinderMove
(
null
,
IO_Type
.
SL_MoveCylinder_Take
,
IO_Type
.
SL_MoveCylinder_Give
);
}
}
BatchAxisToP3
(
false
);
BatchAxisToP3
(
false
);
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_19_BatchAxisToP3
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_19_BatchAxisToP3
))
{
{
...
@@ -789,7 +789,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -789,7 +789,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
else
{
{
if
(
LastHeight
<
12
)
if
(
LastHeight
<
12
)
{
{
LogUtil
.
error
(
Name
+
"计算后高度"
+
LastWidth
+
"X"
+
LastHeight
+
",非七寸盘默认盘高最低=12,修改高度为12"
);
LogUtil
.
error
(
Name
+
"计算后高度"
+
LastWidth
+
"X"
+
LastHeight
+
",非七寸盘默认盘高最低=12,修改高度为12"
);
LastHeight
=
12
;
LastHeight
=
12
;
...
@@ -820,7 +820,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -820,7 +820,7 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_20_SaveSize
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_20_SaveSize
))
{
{
if
(
MoveCylineIsUp
())
if
(
MoveCylineIsUp
())
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_22_CylinderGive
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_22_CylinderGive
);
...
@@ -863,7 +863,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -863,7 +863,7 @@ namespace OnlineStore.DeviceLibrary
FI_21_BatchAxisDown
();
FI_21_BatchAxisDown
();
}
}
else
else
{
{
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料机构下降, 托盘号【"
+
currTrayNum
+
"】,获取库位号,更新托盘信息 ,"
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料机构下降, 托盘号【"
+
currTrayNum
+
"】,获取库位号,更新托盘信息 ,"
);
}
}
Task
.
Factory
.
StartNew
(
delegate
Task
.
Factory
.
StartNew
(
delegate
...
@@ -917,8 +917,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -917,8 +917,8 @@ namespace OnlineStore.DeviceLibrary
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
if
(
IOValue
(
IO_Type
.
SL_AxisLocationCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
MoveInfo
.
ShelfNoTray
.
Equals
(
false
))
if
(
IOValue
(
IO_Type
.
SL_AxisLocationCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
MoveInfo
.
ShelfNoTray
.
Equals
(
false
))
{
{
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料横移机构上升,上料轴开始慢速上升到P3点,等待检测到料盘"
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料横移机构上升,上料轴开始慢速上升到P3点,等待检测到料盘"
);
BatchAxisToP3
(
false
);
BatchAxisToP3
(
false
);
}
}
else
else
{
{
...
@@ -1032,7 +1032,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1032,7 +1032,7 @@ namespace OnlineStore.DeviceLibrary
// MoveInfo.NextMoveStep(LineMoveStep.FI_39_OutLineRun);
// MoveInfo.NextMoveStep(LineMoveStep.FI_39_OutLineRun);
LastOutShelfId
=
CurrShelfId
;
LastOutShelfId
=
CurrShelfId
;
InLog
(
"上料完成,料架到达出口处, 通知AGV取空料架, 入料流程结束,更新LastOutShelfId="
+
LastOutShelfId
);
InLog
(
"上料完成,料架到达出口处, 通知AGV取空料架, 入料流程结束,更新LastOutShelfId="
+
LastOutShelfId
);
AgvClient
.
NeedLeave
(
Config
.
AgvOutName
,
LastOutShelfId
);
AgvClient
.
NeedLeave
(
Config
.
AgvOutName
,
LastOutShelfId
,
ClientLevel
.
Low
);
}
}
#
endregion
#
endregion
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
查看文件 @
130d6f3
...
@@ -452,7 +452,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -452,7 +452,7 @@ namespace OnlineStore.DeviceLibrary
MoveEndS
();
MoveEndS
();
// MoveInfo.NextMoveStep(LineMoveStep.FO_39_OutLineRun);
// MoveInfo.NextMoveStep(LineMoveStep.FO_39_OutLineRun);
OutLog
(
"送出料串: "
+
MoveInfo
.
SLog
+
", 出口线体运转,料架到达出口处, 通知AGV取空料架, 出料结束"
);
OutLog
(
"送出料串: "
+
MoveInfo
.
SLog
+
", 出口线体运转,料架到达出口处, 通知AGV取空料架, 出料结束"
);
AgvClient
.
NeedLeave
(
Config
.
AgvOutName
,
LastOutShelfId
);
AgvClient
.
NeedLeave
(
Config
.
AgvOutName
,
LastOutShelfId
,
Asa
.
ClientLevel
.
Low
);
}
}
else
if
(
MoveInfo
.
MoveStep
>=
LineMoveStep
.
FO_211_AxisDownMove
&&
MoveInfo
.
MoveStep
<
LineMoveStep
.
FO_30_BatchAxisToP2
)
else
if
(
MoveInfo
.
MoveStep
>=
LineMoveStep
.
FO_211_AxisDownMove
&&
MoveInfo
.
MoveStep
<
LineMoveStep
.
FO_30_BatchAxisToP2
)
{
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论