Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-ACPackingStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit c0aa7e41
由
LN
编写于
2020-04-10 14:44:37 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
AGV到达时需要判断rfid是否正确。
1 个父辈
eddd82d2
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
75 行增加
和
34 行删除
source/ACPackingStore/记录.txt
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
source/DeviceLibrary/ACPackingStore/PackingStoreBean.cs
source/DeviceLibrary/agvClient/AgvClient.cs
source/DeviceLibrary/store/StoreStep.cs
source/ACPackingStore/记录.txt
查看文件 @
c0aa7e4
...
...
@@ -115,7 +115,7 @@ PRO,压紧轴(轴4)七寸盘压紧前点相对压紧点的位置,CompAxis7_P
出库时发现料架对不上,送出料架时发的mark应该用原来的
agv到达时,根据rfid判断是否有料架
...
...
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
查看文件 @
c0aa7e4
...
...
@@ -116,9 +116,12 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
wait
.
WaitType
.
Equals
(
WaitEnum
.
W010_AgvStatus
))
{
ClientAction
agvA
=
AgvClient
.
GetAction
(
Config
.
AgvNodeName
);
wait
.
IsEnd
=
((
int
)
agvA
).
Equals
(
wait
.
AgvAction
);
if
(
wait
.
AgvAction
.
Equals
((
int
)
ClientAction
.
Ready
))
{
//Ready时使用状态判断,arrive时需要判断料架号是否正确
ClientAction
agvA
=
AgvClient
.
GetAction
(
Config
.
AgvNodeName
);
wait
.
IsEnd
=
((
int
)
agvA
).
Equals
(
wait
.
AgvAction
);
}
if
(!
wait
.
IsEnd
&&
span
.
TotalSeconds
>
10
)
{
//如果是等待AGV到达,等待有料架信号也算结束
...
...
@@ -135,7 +138,7 @@ namespace OnlineStore.DeviceLibrary
wait
.
IsEnd
=
true
;
}
}
else
if
(
wait
.
AgvAction
.
Equals
((
int
)
ClientAction
.
Arrive
)&&
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_03_Wait
Arrive
))
else
if
(
wait
.
AgvAction
.
Equals
((
int
)
ClientAction
.
Arrive
)&&
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_03_Wait
EmptyAgv
))
{
if
(
IOValue
(
IO_Type
.
LineTake_Check
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
LineIn_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
...
...
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
查看文件 @
c0aa7e4
...
...
@@ -249,7 +249,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_02_LocatinDown
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_03_Wait
Arrive
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_03_Wait
EmptyAgv
);
MoveInfo
.
TimeOutSeconds
=
600
;
//MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(30000));
//等待agv到达
...
...
@@ -257,7 +257,7 @@ namespace OnlineStore.DeviceLibrary
InOutStoreLog
(
moveName
+
MoveInfo
.
SLog
+
":再次调用 NeedLeave["
+
mark
+
"]["
+
CurrShelfID
+
"],等待Agv "
+
Config
.
AgvNodeName
+
" Arrive ,最多等待1200秒"
);
AgvClient
.
SetStatus
(
Config
.
AgvNodeName
,
mark
,
CurrShelfID
,
ClientAction
.
NeedLeave
,
ClientLevel
.
High
,
true
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_03_Wait
Arrive
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_03_Wait
EmptyAgv
))
{
//agv到达
...
...
@@ -273,10 +273,11 @@ namespace OnlineStore.DeviceLibrary
if
(
IOValue
(
IO_Type
.
LineIn_Check
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
LineTake_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_06_LineBackRun
);
AgvClient
.
SetToNone
(
Config
.
AgvNodeName
);
//如果agv未到达,直接结束
MoveEndToRuningStatus
();
//EmprtShelfList = new ConcurrentQueue<string>();
InOutStoreLog
(
moveName
+
MoveInfo
.
SLog
+
":等待Agv "
+
Config
.
AgvNodeName
+
" Arrive超时,检测不到料架信号,认为料架已
手动离开,出库结束
"
);
InOutStoreLog
(
moveName
+
MoveInfo
.
SLog
+
":等待Agv "
+
Config
.
AgvNodeName
+
" Arrive超时,检测不到料架信号,认为料架已
离开,出库结束,设置"
+
Config
.
AgvNodeName
+
"=None
"
);
}
else
{
...
...
@@ -349,12 +350,12 @@ namespace OnlineStore.DeviceLibrary
{
//结束
MoveEndToRuningStatus
();
AgvClient
.
SetStatus
(
Config
.
AgvNodeName
);
//EmprtShelfList = new ConcurrentQueue<string>();
InOutStoreLog
(
moveName
+
MoveInfo
.
SLog
+
":料架"
+
CurrShelfID
+
"已离开 ,"
+
Config
.
AgvNodeName
+
"=None"
);
InOutStoreLog
(
moveName
+
MoveInfo
.
SLog
+
":料架"
+
CurrShelfID
+
"已离开 ,
设置
"
+
Config
.
AgvNodeName
+
"=None"
);
CurrShelfID
=
""
;
LastOutParam
=
new
InOutParam
();
//LastRfidID = "";
AgvClient
.
SetStatus
(
Config
.
AgvNodeName
);
}
}
...
...
@@ -362,32 +363,68 @@ namespace OnlineStore.DeviceLibrary
#
region
AGV
internal
bool
ProcessAGVAction
(
string
name
,
ClientAction
action
)
internal
bool
ProcessAGVAction
(
string
name
,
string
rfid
,
ClientAction
action
)
{
string
logN
=
name
+
"收到调度
【"
+
name
+
"】=【"
+
action
+
"】
"
;
string
logN
=
name
+
"收到调度
"
+
name
+
"="
+
action
+
",RFID["
+
rfid
+
"]
"
;
//Arrive收到后打开门
if
(
action
.
Equals
(
ClientAction
.
Arrive
))
{
//出库处理中不处理
if
(
MoveInfo
.
MoveType
.
Equals
(
StoreMoveType
.
OutStore
))
if
(!
action
.
Equals
(
ClientAction
.
Arrive
))
{
LogUtil
.
info
(
Name
+
logN
+
" ,未找到相关处理"
);
return
false
;
}
//出库处理中不处理
if
(
MoveInfo
.
MoveType
.
Equals
(
StoreMoveType
.
OutStore
))
{
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_00_ReadyShelf
))
{
if
(
rfid
.
Equals
(
""
))
{
string
mark
=
GetMarkInfo
();
LogUtil
.
error
(
Name
+
logN
+
" 当前出库中 BI_00_ReadyShelf,RFID无效,不处理agv,重发 NeedEnter ["
+
mark
+
"]["
+
MoveInfo
.
MoveParam
.
rfid
+
"]"
);
AgvClient
.
SetStatus
(
Config
.
AgvNodeName
,
mark
,
MoveInfo
.
MoveParam
.
rfid
,
ClientAction
.
NeedEnter
,
ClientLevel
.
High
,
true
);
return
false
;
}
//出库等待料架到达
LogUtil
.
info
(
Name
+
logN
+
",当前出库中 BI_00_ReadyShelf,正在等待料架到达"
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_01_DoorOpen
);
InOutStoreLog
(
"出库等待料架"
+
MoveInfo
.
SLog
+
" agv已到达,打开入料口移门"
);
DoorBean
.
StartOpen
(
MoveInfo
);
return
true
;
}
//agv到达,开始处理
if
(
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
)
&&
MoveInfo
.
MoveType
.
Equals
(
StoreMoveType
.
None
)
&&
IOValue
(
IO_Type
.
LineTake_Check
).
Equals
(
IO_VALUE
.
LOW
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_03_WaitEmptyAgv
))
{
LogUtil
.
info
(
Name
+
logN
+
" ,检测到料架,开始料架入库"
);
StartShelfInStore
();
if
(!
rfid
.
Equals
(
""
))
{
string
mark
=
GetMarkInfo
();
LogUtil
.
error
(
Name
+
logN
+
" 当前出库中 BS_03_WaitEmptyAgv,RFID["
+
rfid
+
"]不是空车,不处理agv,重发 NeedLeave ["
+
mark
+
"]["
+
CurrShelfID
+
"]"
);
AgvClient
.
SetStatus
(
Config
.
AgvNodeName
,
mark
,
CurrShelfID
,
ClientAction
.
NeedLeave
,
ClientLevel
.
High
,
true
);
return
false
;
}
//等待空车到达
LogUtil
.
info
(
Name
+
logN
+
",当前出库中 BS_03_WaitEmptyAgv,正在等待料架到达"
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_04_DoorOpen
);
InOutStoreLog
(
"送出料架等待空车"
+
MoveInfo
.
SLog
+
":agv到达,打开入料口移门"
);
DoorBean
.
StartOpen
(
MoveInfo
);
return
true
;
}
}
else
{
LogUtil
.
info
(
Name
+
logN
+
" ,未找到相关处理"
);
else
if
(
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
)
&&
MoveInfo
.
MoveType
.
Equals
(
StoreMoveType
.
None
)
&&
IOValue
(
IO_Type
.
LineTake_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
//agv到达,开始处理
if
(
rfid
.
Equals
(
""
))
{
LogUtil
.
error
(
Name
+
logN
+
" ,RFID无效,不需要入库处理"
);
return
false
;
}
LogUtil
.
info
(
Name
+
logN
+
" ,检测到料架,开始料架入库"
);
StartShelfInStore
();
return
true
;
}
return
false
;
...
...
source/DeviceLibrary/ACPackingStore/PackingStoreBean.cs
查看文件 @
c0aa7e4
...
...
@@ -387,13 +387,13 @@ namespace OnlineStore.DeviceLibrary
WarnMsg
=
msg
;
}
internal
bool
AGVProcess
(
string
name
,
ClientAction
action
)
internal
bool
AGVProcess
(
string
name
,
string
rfid
,
ClientAction
action
)
{
foreach
(
AC_BOX_Bean
box
in
this
.
BoxMap
.
Values
)
{
if
(
box
.
Config
.
AgvNodeName
.
Equals
(
name
))
{
return
box
.
ProcessAGVAction
(
name
,
action
);
return
box
.
ProcessAGVAction
(
name
,
rfid
,
action
);
}
}
return
false
;
...
...
source/DeviceLibrary/agvClient/AgvClient.cs
查看文件 @
c0aa7e4
...
...
@@ -58,7 +58,7 @@ namespace OnlineStore.DeviceLibrary
{
// RFIDData data = new RFIDData(content);
LogUtil
.
info
(
"收到 AgvClient_EnterShelf ["
+
id
+
"] ["
+
rfid
+
"] "
);
StoreManager
.
Store
.
AGVProcess
(
id
,
ClientAction
.
Arrive
);
StoreManager
.
Store
.
AGVProcess
(
id
,
rfid
,
ClientAction
.
Arrive
);
foreach
(
AC_BOX_Bean
box
in
StoreManager
.
Store
.
BoxMap
.
Values
)
{
if
(
box
.
Config
.
AgvNodeName
.
Equals
(
id
))
...
...
@@ -114,7 +114,7 @@ namespace OnlineStore.DeviceLibrary
UpdateAction
(
id
,
ClientAction
.
Ready
);
// RFIDData data = new RFIDData(content);
LogUtil
.
info
(
"收到 AgvClient_Ready ["
+
id
+
"] ["
+
rfid
+
"] "
);
StoreManager
.
Store
.
AGVProcess
(
id
,
ClientAction
.
Ready
);
StoreManager
.
Store
.
AGVProcess
(
id
,
rfid
,
ClientAction
.
Ready
);
}
...
...
@@ -124,7 +124,7 @@ namespace OnlineStore.DeviceLibrary
// RFIDData data = new RFIDData(content);
LogUtil
.
info
(
"收到 AgvClient_Arrive ["
+
id
+
"] ["
+
rfid
+
"] "
);
StoreManager
.
Store
.
AGVProcess
(
id
,
ClientAction
.
Arrive
);
StoreManager
.
Store
.
AGVProcess
(
id
,
rfid
,
ClientAction
.
Arrive
);
}
...
...
@@ -222,7 +222,8 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
"释放 agvClient "
+
ServerIp
+
" 出错:"
+
ex
.
ToString
());
}
}
}
}
//public class AGVAction
//{
// public static string None = "None";
...
...
source/DeviceLibrary/store/StoreStep.cs
查看文件 @
c0aa7e4
...
...
@@ -429,7 +429,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 通知AGV准备空车
/// </summary>
BS_03_Wait
Arrive
=
4003
,
BS_03_Wait
EmptyAgv
=
4003
,
/// <summary>
/// 送出空料架:打开仓门
/// </summary>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论