Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
AGV_3D_SMD
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit c0d9d8c6
由
张东亮
编写于
2023-03-30 11:33:21 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
当VMI线空料串放满后,AGV将云仓各入料口的空料串回收到分盘线
1 个父辈
43725118
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
28 行增加
和
48 行删除
DeviceLibrary/bean/job/GetShelfJob.cs
DeviceLibrary/bean/jobType/BoxReelStringJobType.cs
DeviceLibrary/bean/job/GetShelfJob.cs
查看文件 @
c0d9d8c
...
@@ -458,11 +458,6 @@ namespace DeviceLibrary
...
@@ -458,11 +458,6 @@ namespace DeviceLibrary
tarPlace
=
SettingString
.
T4_1
;
tarPlace
=
SettingString
.
T4_1
;
return
true
;
return
true
;
}
}
//if (ReelStringJobType.FindNeedEnterMission(currentAgv, SettingString.T4_1, ClientLevel.Middle, true))
//{
// tarPlace = SettingString.T4_1;
// return true;
//}
//检查点料机D1是否需要空料串
//检查点料机D1是否需要空料串
if
(
BoxReelStringJobType
.
FindNeedEnterMission
(
currentAgv
,
SettingString
.
D1
))
if
(
BoxReelStringJobType
.
FindNeedEnterMission
(
currentAgv
,
SettingString
.
D1
))
{
{
...
@@ -474,7 +469,11 @@ namespace DeviceLibrary
...
@@ -474,7 +469,11 @@ namespace DeviceLibrary
tarPlace
=
SettingString
.
A2
;
tarPlace
=
SettingString
.
A2
;
return
true
;
return
true
;
}
}
if
(
BoxReelStringJobType
.
FindNeedEnterMission
(
currentAgv
,
SettingString
.
A8
))
{
tarPlace
=
SettingString
.
A8
;
return
true
;
}
}
}
//退料线
//退料线
...
...
DeviceLibrary/bean/jobType/BoxReelStringJobType.cs
查看文件 @
c0d9d8c
using
Common
;
using
Common
;
using
System.Collections.Generic
;
using
System.Security.Policy
;
namespace
DeviceLibrary
namespace
DeviceLibrary
{
{
...
@@ -7,7 +9,13 @@ namespace DeviceLibrary
...
@@ -7,7 +9,13 @@ namespace DeviceLibrary
/// </summary>
/// </summary>
public
class
BoxReelStringJobType
:
JobType
public
class
BoxReelStringJobType
:
JobType
{
{
List
<
string
>
outStringNodes
=
new
List
<
string
>()
{
SettingString
.
T1_2
,
SettingString
.
T2_2
,
SettingString
.
T3_2
,
SettingString
.
T5_2
};
/// <summary>
/// <summary>
/// 料仓料串任务
/// 料仓料串任务
/// </summary>
/// </summary>
...
@@ -50,47 +58,20 @@ namespace DeviceLibrary
...
@@ -50,47 +58,20 @@ namespace DeviceLibrary
}
}
else
//其他小车
else
//其他小车
{
{
foreach
(
var
node
in
outStringNodes
)
//检查入料口1是否有空料串要出
if
(
FindNeedLeaveMission
(
currentAgv
,
SettingString
.
T1_2
,
out
rfid
))
{
if
(
FindNeedEnterMission
(
currentAgv
,
SettingString
.
D1
)
||
FindNeedEnterMission
(
currentAgv
,
SettingString
.
A2
))
{
LogUtil
.
info
(
string
.
Format
(
"{0} 任务生成:Place={1},rfid={2}"
,
currentAgv
.
Name
,
SettingString
.
T5_1
,
rfid
));
return
new
GetShelfJob
(
currentAgv
.
Place
,
SettingString
.
T1_2
,
rfid
);
}
}
//检查入料口2是否有空料串要出
if
(
FindNeedLeaveMission
(
currentAgv
,
SettingString
.
T2_2
,
out
rfid
))
{
if
(
FindNeedEnterMission
(
currentAgv
,
SettingString
.
D1
)
||
FindNeedEnterMission
(
currentAgv
,
SettingString
.
A2
))
{
LogUtil
.
info
(
string
.
Format
(
"{0} 任务生成:Place={1},rfid={2}"
,
currentAgv
.
Name
,
SettingString
.
T2_2
,
rfid
));
return
new
GetShelfJob
(
currentAgv
.
Place
,
SettingString
.
T2_2
,
rfid
);
}
}
//检查入料口3是否有空料串要出
if
(
FindNeedLeaveMission
(
currentAgv
,
SettingString
.
T3_2
,
out
rfid
))
{
if
(
FindNeedEnterMission
(
currentAgv
,
SettingString
.
D1
)
||
FindNeedEnterMission
(
currentAgv
,
SettingString
.
A2
))
{
LogUtil
.
info
(
string
.
Format
(
"{0} 任务生成:Place={1},rfid={2}"
,
currentAgv
.
Name
,
SettingString
.
T3_2
,
rfid
));
return
new
GetShelfJob
(
currentAgv
.
Place
,
SettingString
.
T3_2
,
rfid
);
}
}
//检查入料口5是否有空料串要出
if
(
FindNeedLeaveMission
(
currentAgv
,
SettingString
.
T5_2
,
out
rfid
))
{
{
if
(
FindNeed
EnterMission
(
currentAgv
,
SettingString
.
D1
)
||
FindNeedEnterMission
(
currentAgv
,
SettingString
.
A2
))
if
(
FindNeed
LeaveMission
(
currentAgv
,
node
,
out
rfid
))
{
{
LogUtil
.
info
(
string
.
Format
(
"{0} 任务生成:Place={1},rfid={2}"
,
currentAgv
.
Name
,
SettingString
.
T5_2
,
rfid
));
if
(
FindNeedEnterMission
(
currentAgv
,
SettingString
.
D1
)
return
new
GetShelfJob
(
currentAgv
.
Place
,
SettingString
.
T5_2
,
rfid
);
||
FindNeedEnterMission
(
currentAgv
,
SettingString
.
A2
)
||
FindNeedEnterMission
(
currentAgv
,
SettingString
.
A8
))
{
LogUtil
.
info
(
string
.
Format
(
"{0} 任务生成:Place={1},rfid={2}"
,
currentAgv
.
Name
,
node
,
rfid
));
return
new
GetShelfJob
(
currentAgv
.
Place
,
node
,
rfid
);
}
}
}
}
}
//FindNeedEnterMission(currentAgv, SettingString.T1_1, ClientLevel.Middle, false) || FindNeedEnterMission(currentAgv, SettingString.T2_1, ClientLevel.Middle, false) ||
// FindNeedEnterMission(currentAgv, SettingString.T3_1, ClientLevel.Middle, false) || FindNeedEnterMission(currentAgv, SettingString.T5_1, ClientLevel.Middle, false) ||
// FindNeedEnterMission(currentAgv, SettingString.T1_1, ClientLevel.High, false) || FindNeedEnterMission(currentAgv, SettingString.T2_1, ClientLevel.High, false) ||
// FindNeedEnterMission(currentAgv, SettingString.T3_1, ClientLevel.High, false) || FindNeedEnterMission(currentAgv, SettingString.T5_1, ClientLevel.High, false)
//检查入料口需要满料,且点料机D2/A1出满料串
//检查入料口需要满料,且点料机D2/A1出满料串
if
(
FindNeedEnterMission
(
currentAgv
,
SettingString
.
T1_1
)
||
FindNeedEnterMission
(
currentAgv
,
SettingString
.
T2_1
)
||
if
(
FindNeedEnterMission
(
currentAgv
,
SettingString
.
T1_1
)
||
FindNeedEnterMission
(
currentAgv
,
SettingString
.
T2_1
)
||
FindNeedEnterMission
(
currentAgv
,
SettingString
.
T3_1
)
||
FindNeedEnterMission
(
currentAgv
,
SettingString
.
T5_1
))
FindNeedEnterMission
(
currentAgv
,
SettingString
.
T3_1
)
||
FindNeedEnterMission
(
currentAgv
,
SettingString
.
T5_1
))
...
@@ -145,7 +126,7 @@ namespace DeviceLibrary
...
@@ -145,7 +126,7 @@ namespace DeviceLibrary
}
}
return
false
;
return
false
;
}
}
public
static
bool
FindNeedEnter
(
Agv_Info
agv
,
string
nodeName
,
ClientLevel
level
=
ClientLevel
.
Low
,
bool
ignoreLevel
=
true
)
public
static
bool
FindNeedEnter
(
Agv_Info
agv
,
string
nodeName
,
ClientLevel
level
=
ClientLevel
.
Low
,
bool
ignoreLevel
=
true
)
{
{
int
nodeIdx
=
NodeManager
.
FindNode
(
nodeName
);
int
nodeIdx
=
NodeManager
.
FindNode
(
nodeName
);
if
(
nodeIdx
>
-
1
)
if
(
nodeIdx
>
-
1
)
...
@@ -153,7 +134,7 @@ namespace DeviceLibrary
...
@@ -153,7 +134,7 @@ namespace DeviceLibrary
if
(
ignoreLevel
)
if
(
ignoreLevel
)
nodeIdx
=
NodeManager
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Name
.
Equals
(
nodeName
)
&&
s
.
StateEquals
(
eNodeStatus
.
NeedEnter
));
nodeIdx
=
NodeManager
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Name
.
Equals
(
nodeName
)
&&
s
.
StateEquals
(
eNodeStatus
.
NeedEnter
));
else
else
nodeIdx
=
NodeManager
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Name
.
Equals
(
nodeName
)
&&
s
.
StateEquals
(
eNodeStatus
.
NeedEnter
)&&
s
.
Level
.
Equals
(
level
));
nodeIdx
=
NodeManager
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Name
.
Equals
(
nodeName
)
&&
s
.
StateEquals
(
eNodeStatus
.
NeedEnter
)
&&
s
.
Level
.
Equals
(
level
));
if
(
nodeIdx
>
-
1
)
if
(
nodeIdx
>
-
1
)
return
true
;
return
true
;
}
}
...
@@ -170,9 +151,9 @@ namespace DeviceLibrary
...
@@ -170,9 +151,9 @@ namespace DeviceLibrary
/// <param name="agv">当前agv</param>
/// <param name="agv">当前agv</param>
/// <param name="nodeName">需要查询的节点</param>
/// <param name="nodeName">需要查询的节点</param>
/// <returns></returns>
/// <returns></returns>
public
static
bool
FindNeedEnterMission
(
Agv_Info
agv
,
string
nodeName
,
ClientLevel
level
=
ClientLevel
.
Low
,
bool
ignoreLevel
=
true
)
public
static
bool
FindNeedEnterMission
(
Agv_Info
agv
,
string
nodeName
,
ClientLevel
level
=
ClientLevel
.
Low
,
bool
ignoreLevel
=
true
)
{
{
if
(
FindNeedEnter
(
agv
,
nodeName
,
level
,
ignoreLevel
))
if
(
FindNeedEnter
(
agv
,
nodeName
,
level
,
ignoreLevel
))
{
{
int
idx
=
CommonVar
.
agvInfo
.
FindIndex
(
s
=>
!
s
.
IP
.
Equals
(
agv
.
IP
)
&&
s
.
CurJob
!=
null
&&
s
.
CurJob
is
SendShelfJob
&&
(((
SendShelfJob
)
s
.
CurJob
).
TargetPlace
.
Equals
(
nodeName
)));
int
idx
=
CommonVar
.
agvInfo
.
FindIndex
(
s
=>
!
s
.
IP
.
Equals
(
agv
.
IP
)
&&
s
.
CurJob
!=
null
&&
s
.
CurJob
is
SendShelfJob
&&
(((
SendShelfJob
)
s
.
CurJob
).
TargetPlace
.
Equals
(
nodeName
)));
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论