Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
顾剑亮
/
AGVControl-Qisda-ProductionLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 85238ee5
由
张东亮
编写于
2020-12-05 13:26:59 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
添加风淋门
1 个父辈
54be25c3
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
166 行增加
和
61 行删除
.vs/AGVControl-ProductionLine/v16/.suo
AGVControl-ProductionLine/BLL/Common.cs
AGVControl-ProductionLine/bean/job/ChargeJob.cs
AGVControl-ProductionLine/bean/job/EmptyAGVBackJob.cs
AGVControl-ProductionLine/bean/job/EmptyShelfBackJob.cs
AGVControl-ProductionLine/bean/job/GoEmptyShelfLineJob.cs
AGVControl-ProductionLine/bean/job/GoFullShelfStationJob.cs
AGVControl-ProductionLine/bean/job/SendFullShelfToLineJob.cs
AGVControl-ProductionLine/bean/node/DoubleLineNodeFor4C.cs
AGVControl-ProductionLine/bean/node/DoubleLineNodeFor4D.cs
AGVControl-ProductionLine/bin/Debug/AGVControl-ProductionLine.exe
AGVControl-ProductionLine/bin/Debug/AGVControl-ProductionLine.pdb
AGVControl-ProductionLine/obj/Debug/AGVControl-ProductionLine.exe
AGVControl-ProductionLine/obj/Debug/AGVControl-ProductionLine.pdb
.vs/AGVControl-ProductionLine/v16/.suo
查看文件 @
85238ee
此文件类型无法预览
AGVControl-ProductionLine/BLL/Common.cs
查看文件 @
85238ee
此文件的差异被折叠,
点击展开。
AGVControl-ProductionLine/bean/job/ChargeJob.cs
查看文件 @
85238ee
...
...
@@ -49,23 +49,29 @@ namespace AGVControl
{
string
msg
=
agv
.
Name
+
" "
;
bool
rtn
=
false
;
runInfo
=
""
;
agv
.
Msg
=
runInfo
;
//if (!CurTaskID.Equals(-1) && Common.mir.Get_Task_State(CurTaskID, out string st))
// CurTaskState = st;
agv
.
Msg
=
"充电任务:"
+
runInfo
;
//runInfo = "充电任务:";
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
ChargeStep
.
IsStep
(
CHARGE_STEP
.
NONE
))
{
if
(
agv
.
Battery
>
Common
.
chargeStatus
.
chargeMax
)
{
if
(
agv
.
Place
.
Equals
(
SettingString
.
Standby
))
//在待机位不操作
if
(
agv
Place
.
Equals
(
SettingString
.
Standby
)
||
agvPlace
.
Equals
(
""
))
//在待机位不操作
{
ChargeStep
.
ToNextStep
(
CHARGE_STEP
.
END
);
runInfo
=
"在待机位,电量充足["
+
agv
.
Battery
+
"%],等待任务"
;
msg
+=
runInfo
;
ChargeStep
.
Msg
=
msg
;
}
else
if
(
agvPlace
.
StartsWith
(
SettingString
.
C4_Name_Prefix
)
&&
Common
.
CheckIsInAirDoor
(
agvPlace
))
{
ChargeStep
.
ToNextStep
(
CHARGE_STEP
.
WAIT_AGV_REACH_AIR_DOOR
);
runInfo
=
"电量充足["
+
agv
.
Battery
+
"%],从当前位置"
+
agvPlace
+
"回到待机位,先过4C风淋门"
;
msg
+=
runInfo
;
ChargeStep
.
Msg
=
msg
;
Common
.
DoorMission
(
agv
,
SettingString
.
DoorAirOut
);
UpdateJobTaskInfo
(
agv
.
CurTaskName
,
agv
.
CurTaskID
);
}
else
if
(
agvPlace
.
StartsWith
(
SettingString
.
C4_Name_Prefix
))
{
ChargeStep
.
ToNextStep
(
CHARGE_STEP
.
WAIT_AGV_REACH_4D_DOOR
);
...
...
@@ -89,7 +95,17 @@ namespace AGVControl
}
else
{
if
(
agvPlace
.
StartsWith
(
SettingString
.
C4_Name_Prefix
))
if
(
agvPlace
.
StartsWith
(
SettingString
.
C4_Name_Prefix
)
&&
Common
.
CheckIsInAirDoor
(
agvPlace
))
{
ChargeStep
.
ToNextStep
(
CHARGE_STEP
.
WAIT_AGV_REACH_AIR_DOOR
);
runInfo
=
"电量["
+
agv
.
Battery
+
"%]小于最大电量["
+
Common
.
chargeStatus
.
chargeMax
+
"%],从当前位置"
+
agvPlace
+
"回到充电位,先过4C风淋门"
;
msg
+=
runInfo
;
ChargeStep
.
Msg
=
msg
;
Common
.
DoorMission
(
agv
,
SettingString
.
DoorAirOut
);
UpdateJobTaskInfo
(
agv
.
CurTaskName
,
agv
.
CurTaskID
);
}
else
if
(
agvPlace
.
StartsWith
(
SettingString
.
C4_Name_Prefix
))
{
ChargeStep
.
ToNextStep
(
CHARGE_STEP
.
WAIT_AGV_REACH_4D_DOOR
);
runInfo
=
"电量["
+
agv
.
Battery
+
"%]小于最大电量["
+
Common
.
chargeStatus
.
chargeMax
+
"%],从当前位置"
+
agvPlace
+
"回到充电位,先到4D门"
;
...
...
@@ -123,7 +139,18 @@ namespace AGVControl
}
}
else
if
(
ChargeStep
.
IsStep
(
CHARGE_STEP
.
WAIT_AGV_REACH_AIR_DOOR
))
{
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorAirOut
,
CurTaskState
))
{
ChargeStep
.
ToNextStep
(
CHARGE_STEP
.
WAIT_AGV_REACH_4D_DOOR
);
runInfo
=
"电量充足["
+
agv
.
Battery
+
"%],从当前位置"
+
agvPlace
+
"回到待机位,先到4D门"
;
msg
+=
runInfo
;
ChargeStep
.
Msg
=
msg
;
Common
.
DoorMission
(
agv
,
SettingString
.
DoorCToD
);
UpdateJobTaskInfo
(
agv
.
CurTaskName
,
agv
.
CurTaskID
);
}
}
else
if
(
ChargeStep
.
IsStep
(
CHARGE_STEP
.
WAIT_AGV_REACH_4D_DOOR
))
{
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorCToD
,
CurTaskState
))
...
...
@@ -166,7 +193,7 @@ namespace AGVControl
if
(
Common
.
CheckTaskFinished
(
agv
,
CurTaskName
))
{
ChargeStep
.
ToNextStep
(
CHARGE_STEP
.
WAIT_REACH_CHARGE_OK
);
runInfo
=
"充电任务分配完成,去充电
且
等待任务"
;
runInfo
=
"充电任务分配完成,去充电
并
等待任务"
;
msg
+=
runInfo
;
ChargeStep
.
Msg
=
msg
;
}
...
...
@@ -213,20 +240,12 @@ namespace AGVControl
Job
job
=
Common
.
control
.
GetJob
(
agv
);
if
(
job
!=
null
&&
!(
job
is
ChargeJob
))
{
runInfo
=
"充电过程检测到任务,电量["
+
agv
.
Battery
+
"%]大于最小电量["
+
Common
.
chargeStatus
.
chargeMin
+
"%],中断充电执行任务"
;
runInfo
=
"充电过程
中
检测到任务,电量["
+
agv
.
Battery
+
"%]大于最小电量["
+
Common
.
chargeStatus
.
chargeMin
+
"%],中断充电执行任务"
;
msg
+=
runInfo
;
ChargeStep
.
Msg
=
msg
;
Common
.
chargeStatus
.
ClearRandomChargeInfo
(
agv
);
return
job
;
}
//else if (job == null && agv.Battery < Common.chargeStatus.chargeMax / 2)
//{
// ChargeStep.ToNextStep(CHARGE_STEP.NONE);
// runInfo = "在待机位暂无任务,且当前电量小于" + Common.chargeStatus.chargeMax / 2 + "%,去充电位";
// msg += runInfo;
// ChargeStep.Msg = msg;
// Common.chargeStatus.ClearRandomChargeInfo(agv);
//}
}
}
...
...
@@ -291,7 +310,10 @@ namespace AGVControl
///
/// </summary>
NONE
,
/// <summary>
/// 等待到达风淋门
/// </summary>
WAIT_AGV_REACH_AIR_DOOR
,
/// <summary>
/// 等待到达4D门
/// </summary>
...
...
AGVControl-ProductionLine/bean/job/EmptyAGVBackJob.cs
查看文件 @
85238ee
此文件的差异被折叠,
点击展开。
AGVControl-ProductionLine/bean/job/EmptyShelfBackJob.cs
查看文件 @
85238ee
此文件的差异被折叠,
点击展开。
AGVControl-ProductionLine/bean/job/GoEmptyShelfLineJob.cs
查看文件 @
85238ee
此文件的差异被折叠,
点击展开。
AGVControl-ProductionLine/bean/job/GoFullShelfStationJob.cs
查看文件 @
85238ee
...
...
@@ -56,7 +56,8 @@ namespace AGVControl
{
string
msg
=
agv
.
Name
+
" "
;
bool
rtn
=
false
;
agv
.
Msg
=
runInfo
;
agv
.
Msg
=
"去云仓接满料任务:"
+
runInfo
;
//runInfo = "去云仓接满料任务:";
//if (!CurTaskID.Equals(-1) && Common.mir.Get_Task_State(CurTaskID, out string st))
// CurTaskState = st;
if
(
GoFullShelfStationStep
.
IsStep
(
GO_FULL_SHELF_STATION_STEP
.
NONE
))
...
...
@@ -89,7 +90,7 @@ namespace AGVControl
}
else
if
(
input
!=
null
&&
!
input
[
3
])
{
if
(
agvPlace
.
Equals
(
SettingString
.
Standby
)
||
agvPlace
.
StartsWith
(
SettingString
.
AutoCharge
))
//待机位/充电位接到任务
if
(
agvPlace
.
Equals
(
""
)
||
agvPlace
.
Equals
(
SettingString
.
Standby
)
||
agvPlace
.
StartsWith
(
SettingString
.
AutoCharge
))
//待机位/充电位接到任务
{
GoFullShelfStationStep
.
ToNextStep
(
GO_FULL_SHELF_STATION_STEP
.
WAIT_AGV_REACH_A6
);
runInfo
=
"无负载,准备运动到入料口"
+
FullShelfStationPlace
;
...
...
@@ -98,6 +99,15 @@ namespace AGVControl
Common
.
MoveToNode
(
agv
,
FullShelfStationPlace
);
UpdateJobTaskInfo
(
agv
.
CurTaskName
,
agv
.
CurTaskID
);
}
else
if
(
Common
.
CheckIsInAirDoor
(
agvPlace
))
{
GoFullShelfStationStep
.
ToNextStep
(
GO_FULL_SHELF_STATION_STEP
.
WAIT_AGV_REACH_AIR_DOOR
);
runInfo
=
"在4C风淋门内,先过风淋门"
;
msg
+=
runInfo
;
GoFullShelfStationStep
.
Msg
=
msg
;
Common
.
DoorMission
(
agv
,
SettingString
.
DoorAirOut
);
UpdateJobTaskInfo
(
agv
.
CurTaskName
,
agv
.
CurTaskID
);
}
else
if
(
agvPlace
.
StartsWith
(
SettingString
.
C4_Name_Prefix
))
//4C车间
{
GoFullShelfStationStep
.
ToNextStep
(
GO_FULL_SHELF_STATION_STEP
.
WAIT_AGV_REACH_DOOR
);
...
...
@@ -132,6 +142,15 @@ namespace AGVControl
Common
.
MoveToNode
(
agv
,
FullShelfStationPlace
);
UpdateJobTaskInfo
(
agv
.
CurTaskName
,
agv
.
CurTaskID
);
}
else
if
(
Common
.
CheckIsInAirDoor
(
agvPlace
))
{
GoFullShelfStationStep
.
ToNextStep
(
GO_FULL_SHELF_STATION_STEP
.
WAIT_AGV_REACH_AIR_DOOR
);
runInfo
=
"在4C风淋门内,先过风淋门"
;
msg
+=
runInfo
;
GoFullShelfStationStep
.
Msg
=
msg
;
Common
.
DoorMission
(
agv
,
SettingString
.
DoorAirOut
);
UpdateJobTaskInfo
(
agv
.
CurTaskName
,
agv
.
CurTaskID
);
}
else
if
(
agvPlace
.
StartsWith
(
SettingString
.
C4_Name_Prefix
))
//4C车间
{
GoFullShelfStationStep
.
ToNextStep
(
GO_FULL_SHELF_STATION_STEP
.
WAIT_AGV_REACH_DOOR
);
...
...
@@ -147,6 +166,20 @@ namespace AGVControl
}
}
else
if
(
GoFullShelfStationStep
.
IsStep
(
GO_FULL_SHELF_STATION_STEP
.
WAIT_AGV_REACH_AIR_DOOR
))
{
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorAirOut
,
CurTaskState
))
{
GoFullShelfStationStep
.
ToNextStep
(
GO_FULL_SHELF_STATION_STEP
.
WAIT_AGV_REACH_DOOR
);
runInfo
=
"过风淋门,向4D门运行,再到双层线入料口"
+
FullShelfStationPlace
;
msg
+=
runInfo
;
GoFullShelfStationStep
.
Msg
=
msg
;
Common
.
MoveToNode
(
agv
,
SettingString
.
DoorCToD
);
UpdateJobTaskInfo
(
agv
.
CurTaskName
,
agv
.
CurTaskID
);
}
}
else
if
(
GoFullShelfStationStep
.
IsStep
(
GO_FULL_SHELF_STATION_STEP
.
WAIT_AGV_REACH_DOOR
))
{
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
...
...
@@ -278,7 +311,7 @@ namespace AGVControl
else
if
(
GoFullShelfStationStep
.
IsTimeOut
(
60000
,
out
double
timeOutValue
))
{
//链条停止
runInfo
=
"满料架在["
+
FullShelfStationPlace
+
"]进入小车超时["
+
timeOutValue
.
ToString
(
"f1"
)
+
"秒],请检查料架进入小车的情况"
;
runInfo
=
"满料架在["
+
FullShelfStationPlace
+
"]进入小车超时["
+
timeOutValue
.
ToString
(
"f1"
)
+
"秒],请检查料架进入小车的情况"
;
//msg +=runInfo;
//GoFullShelfStationStep.Msg = msg;
}
...
...
@@ -303,6 +336,10 @@ namespace AGVControl
/// </summary>
WAIT_CHECK_RESULT
,
/// <summary>
/// 等待到达4C风淋门
/// </summary>
WAIT_AGV_REACH_AIR_DOOR
,
/// <summary>
/// 等待AGV到达门
/// </summary>
WAIT_AGV_REACH_DOOR
,
...
...
AGVControl-ProductionLine/bean/job/SendFullShelfToLineJob.cs
查看文件 @
85238ee
...
...
@@ -60,7 +60,8 @@ namespace AGVControl
string
msg
=
agv
.
Name
+
" "
;
bool
rtn
=
false
;
agv
.
RFID
=
RFID
;
agv
.
Msg
=
runInfo
;
agv
.
Msg
=
"送满料任务:"
+
runInfo
;
//runInfo = "送满料任务:";
//if (!CurTaskID.Equals(-1) && Common.mir.Get_Task_State(CurTaskID, out string st))
// CurTaskState = st;
if
(
SendFullShelfStep
.
IsStep
(
SEND_FULL_SHELF_STEP
.
NONE
))
...
...
@@ -69,7 +70,7 @@ namespace AGVControl
if
(
FullShelfPlace
.
StartsWith
(
SettingString
.
C4_Name_Prefix
))
{
SendFullShelfStep
.
ToNextStep
(
SEND_FULL_SHELF_STEP
.
WAIT_AGV_REACH_DOOR
);
runInfo
=
"
满料架
前往4C门,从双层线A6送往["
+
FullShelfPlace
+
"][RFID="
+
RFID
+
"]"
;
runInfo
=
"前往4C门,从双层线A6送往["
+
FullShelfPlace
+
"][RFID="
+
RFID
+
"]"
;
msg
+=
runInfo
;
SendFullShelfStep
.
Msg
=
msg
;
Common
.
DoorMission
(
agv
,
SettingString
.
DoorDToC
);
...
...
@@ -78,7 +79,7 @@ namespace AGVControl
else
{
SendFullShelfStep
.
ToNextStep
(
SEND_FULL_SHELF_STEP
.
WAIT_AGV_REACH_LINE
);
runInfo
=
"
满料架
从双层线A6送往["
+
FullShelfPlace
+
"][RFID="
+
RFID
+
"]"
;
runInfo
=
"从双层线A6送往["
+
FullShelfPlace
+
"][RFID="
+
RFID
+
"]"
;
msg
+=
runInfo
;
SendFullShelfStep
.
Msg
=
msg
;
Common
.
MoveToNode
(
agv
,
FullShelfPlace
);
...
...
@@ -86,7 +87,6 @@ namespace AGVControl
}
}
else
if
(
SendFullShelfStep
.
IsStep
(
SEND_FULL_SHELF_STEP
.
WAIT_AGV_REACH_DOOR
))
{
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
...
...
@@ -103,14 +103,39 @@ namespace AGVControl
}
else
{
if
(
Common
.
CheckIsInAirDoor
(
FullShelfPlace
))
{
SendFullShelfStep
.
ToNextStep
(
SEND_FULL_SHELF_STEP
.
WAIT_AGV_REACH_AIR_DOOR
);
runInfo
=
"到达4C门,过风淋门["
+
FullShelfPlace
+
"][RFID="
+
RFID
+
"]"
;
msg
+=
runInfo
;
SendFullShelfStep
.
Msg
=
msg
;
Common
.
DoorMission
(
agv
,
SettingString
.
DoorAirIn
);
UpdateJobTaskInfo
(
agv
.
CurTaskName
,
agv
.
CurTaskID
);
}
else
{
SendFullShelfStep
.
ToNextStep
(
SEND_FULL_SHELF_STEP
.
WAIT_AGV_REACH_LINE
);
runInfo
=
"从双层线A6送往["
+
FullShelfPlace
+
"][RFID="
+
RFID
+
"]"
;
msg
+=
runInfo
;
SendFullShelfStep
.
Msg
=
msg
;
Common
.
MoveToNode
(
agv
,
FullShelfPlace
);
UpdateJobTaskInfo
(
agv
.
CurTaskName
,
agv
.
CurTaskID
);
}
}
}
}
else
if
(
SendFullShelfStep
.
IsStep
(
SEND_FULL_SHELF_STEP
.
WAIT_AGV_REACH_AIR_DOOR
))
{
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorAirIn
,
CurTaskState
))
{
SendFullShelfStep
.
ToNextStep
(
SEND_FULL_SHELF_STEP
.
WAIT_AGV_REACH_LINE
);
runInfo
=
"
满料架从双层线A6
送往["
+
FullShelfPlace
+
"][RFID="
+
RFID
+
"]"
;
runInfo
=
"送往["
+
FullShelfPlace
+
"][RFID="
+
RFID
+
"]"
;
msg
+=
runInfo
;
SendFullShelfStep
.
Msg
=
msg
;
Common
.
MoveToNode
(
agv
,
FullShelfPlace
);
UpdateJobTaskInfo
(
agv
.
CurTaskName
,
agv
.
CurTaskID
);
}
UpdateJobTaskInfo
(
agv
.
CurTaskName
,
agv
.
CurTaskID
);
}
}
else
if
(
SendFullShelfStep
.
IsStep
(
SEND_FULL_SHELF_STEP
.
WAIT_REACH_TEMP_PLACE
))
...
...
@@ -121,7 +146,7 @@ namespace AGVControl
if
(!
Common
.
Check4CTarget
(
agv
,
FullShelfPlace
))
//未占用
{
SendFullShelfStep
.
ToNextStep
(
SEND_FULL_SHELF_STEP
.
WAIT_AGV_REACH_LINE
);
runInfo
=
"
满料架
从临时待机位送往["
+
FullShelfPlace
+
"][RFID="
+
RFID
+
"]"
;
runInfo
=
"从临时待机位送往["
+
FullShelfPlace
+
"][RFID="
+
RFID
+
"]"
;
msg
+=
runInfo
;
SendFullShelfStep
.
Msg
=
msg
;
Common
.
DeleteStandyInfo
(
agv
);
...
...
@@ -226,7 +251,7 @@ namespace AGVControl
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckEnterOrLeaveFinished
(
agv
,
"Leave"
,
CurTaskState
))
{
runInfo
=
"满料
架
进入"
+
FullShelfPlace
+
"完成 [RFID="
+
RFID
+
"] ["
+
agv
.
BoxDestInfo
+
"]"
;
runInfo
=
"满料进入"
+
FullShelfPlace
+
"完成 [RFID="
+
RFID
+
"] ["
+
agv
.
BoxDestInfo
+
"]"
;
msg
+=
runInfo
;
SendFullShelfStep
.
Msg
=
msg
;
agv
.
RFID
=
""
;
...
...
@@ -237,7 +262,7 @@ namespace AGVControl
else
if
(
SendFullShelfStep
.
IsTimeOut
(
60000
,
out
double
timeOutValue
))
{
//链条停止
runInfo
=
"满料
架
在["
+
FullShelfPlace
+
"]离开小车超时["
+
timeOutValue
.
ToString
(
"f1"
)
+
"秒],请检查料架离开小车的情况"
;
runInfo
=
"满料在["
+
FullShelfPlace
+
"]离开小车超时["
+
timeOutValue
.
ToString
(
"f1"
)
+
"秒],请检查料架离开小车的情况"
;
//msg += runInfo;
//SendFullShelfStep.Msg = msg;
}
...
...
@@ -270,6 +295,10 @@ namespace AGVControl
/// </summary>
WAIT_REACH_TEMP_PLACE
,
/// <summary>
/// 等待到达4C风淋门
/// </summary>
WAIT_AGV_REACH_AIR_DOOR
,
/// <summary>
/// 等待小车到达目的地
/// </summary>
WAIT_AGV_REACH_LINE
,
...
...
AGVControl-ProductionLine/bean/node/DoubleLineNodeFor4C.cs
查看文件 @
85238ee
...
...
@@ -35,14 +35,14 @@ namespace AGVControl
{
if
(!
SettingString
.
C4_AGV_IPs
.
Contains
(
agv
.
IP
))
continue
;
if
(
agv
.
CurJob
is
GoEmptyShelfLineJob
)
//|| agv.CurJob is EmptyShelfBackJob
if
(
agv
.
CurJob
is
GoEmptyShelfLineJob
||
(
agv
.
CurJob
is
EmptyShelfBackJob
))
{
emptyJobCnt
++;
}
}
//出工单料的目的地是否有空料架
if
(
Common
.
FindEmptyShelfBeforeSendFullShelf
(
out
string
nodeName
,
out
rfid
))
if
(
Common
.
FindEmptyShelfBeforeSendFullShelf
(
out
string
nodeName
))
{
if
(
nodeName
.
StartsWith
(
SettingString
.
C4_Name_Prefix
)
&&
SettingString
.
C4_AGV_IPs
.
Contains
(
currentAgv
.
IP
))
{
...
...
@@ -58,29 +58,24 @@ namespace AGVControl
}
if
(
cnt
<
clientNode
.
EmptyShelfCnt
)
{
if
((
SettingString
.
AGVCNT
/
2
-
emptyJobCnt
).
Equals
(
2
))
//保留1辆小车出满料架
{
return
null
;
}
return
new
GoEmptyShelfLineJob
(
currentAgv
.
Place
,
nodeName
,
rfid
);
if
(
Common
.
CheckStationState
(
clientNode
,
out
rfid
)
&&
CanEmptyTask
(
emptyJobCnt
))
return
new
GoEmptyShelfLineJob
(
currentAgv
.
Place
,
nodeName
,
rfid
);
}
}
}
//回收空料架
if
(
Common
.
FindEmptyShelfNode
(
currentAgv
,
out
string
emptyNodeName
,
out
rfid
))
if
(
Common
.
FindEmptyShelfNode
(
currentAgv
,
out
string
emptyNodeName
))
{
if
(
SettingString
.
C4_AGV_IPs
.
Contains
(
currentAgv
.
IP
))
{
int
i
=
Common
.
agvInfo
.
FindIndex
(
s
=>
s
.
CurJob
is
GoEmptyShelfLineJob
&&
((
GoEmptyShelfLineJob
)
s
.
CurJob
).
EmptyShelfPlace
.
Equals
(
emptyNodeName
));
if
(
i
==
-
1
)
{
if
((
SettingString
.
AGVCNT
/
2
-
emptyJobCnt
).
Equals
(
2
))
//保留1辆小车出满料架
{
return
null
;
}
return
new
GoEmptyShelfLineJob
(
currentAgv
.
Place
,
emptyNodeName
,
rfid
);
ClientNode
clientNode
=
Common
.
nodeInfo
.
Find
(
s
=>
s
.
Name
.
Equals
(
emptyNodeName
));
if
(
Common
.
CheckStationState
(
clientNode
,
out
rfid
)
&&
CanEmptyTask
(
emptyJobCnt
))
return
new
GoEmptyShelfLineJob
(
currentAgv
.
Place
,
emptyNodeName
,
rfid
);
}
}
}
...
...
@@ -92,12 +87,25 @@ namespace AGVControl
if
(
SettingString
.
C4_AGV_IPs
.
Contains
(
currentAgv
.
IP
))
{
int
i
=
Common
.
agvInfo
.
FindIndex
(
s
=>
s
.
CurJob
is
GoFullShelfStationJob
&&
!
s
.
IP
.
Equals
(
currentAgv
.
IP
));
if
(
i
==
-
1
)
return
new
GoFullShelfStationJob
(
currentAgv
.
Place
);
if
(
i
==
-
1
)
return
new
GoFullShelfStationJob
(
currentAgv
.
Place
);
}
}
return
null
;
}
/// <summary>
/// 控制出空架小车数量
/// </summary>
/// <param name="emptytASKAGV"></param>
/// <returns></returns>
private
bool
CanEmptyTask
(
int
emptytASKAGV
)
{
if
((
SettingString
.
AGVCNT
/
2
-
emptytASKAGV
).
Equals
(
2
))
//保留1辆小车出满料架
{
return
false
;
}
return
true
;
}
}
}
AGVControl-ProductionLine/bean/node/DoubleLineNodeFor4D.cs
查看文件 @
85238ee
...
...
@@ -38,13 +38,13 @@ namespace AGVControl
{
if
(
SettingString
.
C4_AGV_IPs
.
Contains
(
agv
.
IP
))
continue
;
if
(
agv
.
CurJob
is
GoEmptyShelfLineJob
)
//|| agv.CurJob is EmptyShelfBackJob
if
(
agv
.
CurJob
is
GoEmptyShelfLineJob
||
agv
.
CurJob
is
EmptyShelfBackJob
)
//
{
emptyJobCnt
++;
}
}
//出工单料的目的地是否有空料架
if
(
Common
.
FindEmptyShelfBeforeSendFullShelf
(
out
string
nodeName
,
out
rfid
))
if
(
Common
.
FindEmptyShelfBeforeSendFullShelf
(
out
string
nodeName
))
{
if
(
nodeName
.
StartsWith
(
SettingString
.
D4_Name_Prefix
)
&&
!
SettingString
.
C4_AGV_IPs
.
Contains
(
currentAgv
.
IP
))
{
...
...
@@ -62,28 +62,24 @@ namespace AGVControl
}
if
(
cnt
<
clientNode
.
EmptyShelfCnt
)
{
if
((
SettingString
.
AGVCNT
/
2
-
emptyJobCnt
).
Equals
(
1
))
//保留1辆小车出满料架
{
return
null
;
}
return
new
GoEmptyShelfLineJob
(
currentAgv
.
Place
,
nodeName
,
rfid
);
if
(
Common
.
CheckStationState
(
clientNode
,
out
rfid
)
&&
CanEmptyTask
(
emptyJobCnt
))
return
new
GoEmptyShelfLineJob
(
currentAgv
.
Place
,
nodeName
,
rfid
);
}
}
}
//回收空料架
if
(
Common
.
FindEmptyShelfNode
(
currentAgv
,
out
string
emptyNodeName
,
out
rfid
))
if
(
Common
.
FindEmptyShelfNode
(
currentAgv
,
out
string
emptyNodeName
))
{
if
(!
SettingString
.
C4_AGV_IPs
.
Contains
(
currentAgv
.
IP
))
{
int
i
=
Common
.
agvInfo
.
FindIndex
(
s
=>
s
.
CurJob
is
GoEmptyShelfLineJob
&&
((
GoEmptyShelfLineJob
)
s
.
CurJob
).
EmptyShelfPlace
.
Equals
(
emptyNodeName
));
if
(
i
==
-
1
)
{
if
((
SettingString
.
AGVCNT
/
2
-
emptyJobCnt
).
Equals
(
1
))
//保留1辆小车出满料架
{
return
null
;
}
return
new
GoEmptyShelfLineJob
(
currentAgv
.
Place
,
emptyNodeName
,
rfid
);
ClientNode
clientNode
=
Common
.
nodeInfo
.
Find
(
s
=>
s
.
Name
.
Equals
(
emptyNodeName
));
if
(
Common
.
CheckStationState
(
clientNode
,
out
rfid
)
&&
CanEmptyTask
(
emptyJobCnt
))
return
new
GoEmptyShelfLineJob
(
currentAgv
.
Place
,
emptyNodeName
,
rfid
);
}
}
}
...
...
@@ -121,5 +117,18 @@ namespace AGVControl
return
null
;
}
/// <summary>
/// 控制出空架小车数量
/// </summary>
/// <param name="emptytASKAGV"></param>
/// <returns></returns>
private
bool
CanEmptyTask
(
int
emptytASKAGV
)
{
if
((
SettingString
.
AGVCNT
/
2
-
emptytASKAGV
).
Equals
(
1
))
//保留1辆小车出满料架
{
return
false
;
}
return
true
;
}
}
}
AGVControl-ProductionLine/bin/Debug/AGVControl-ProductionLine.exe
查看文件 @
85238ee
此文件类型无法预览
AGVControl-ProductionLine/bin/Debug/AGVControl-ProductionLine.pdb
查看文件 @
85238ee
此文件类型无法预览
AGVControl-ProductionLine/obj/Debug/AGVControl-ProductionLine.exe
查看文件 @
85238ee
此文件类型无法预览
AGVControl-ProductionLine/obj/Debug/AGVControl-ProductionLine.pdb
查看文件 @
85238ee
此文件类型无法预览
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论