Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
顾剑亮
/
AGVControl-Qisda-ProductionLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 353c7efd
由
张东亮
编写于
2020-09-25 21:34:23 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
a569a195
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
114 行增加
和
196 行删除
.vs/AGVControl-ProductionLine/v16/.suo
AGVControl-ProductionLine/BLL/Common.cs
AGVControl-ProductionLine/FrmMain.cs
AGVControl-ProductionLine/bean/job/ChargeJob.cs
AGVControl-ProductionLine/bean/job/EmptyAGVBackJob.cs
AGVControl-ProductionLine/bean/job/EmptyShelfBackJob.cs
AGVControl-ProductionLine/bean/job/SendFullShelfToLineJob.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
查看文件 @
353c7ef
此文件类型无法预览
AGVControl-ProductionLine/BLL/Common.cs
查看文件 @
353c7ef
...
...
@@ -201,9 +201,15 @@ namespace AGVControl
}
else
{
nodeName
=
SettingString
.
A5
;
Common
.
log
.
Debug
(
string
.
Format
(
"{0} {1}需要小料架"
,
agv
.
Name
,
SettingString
.
A5
));
return
true
;
tarIdx
=
Common
.
agvInfo
.
FindIndex
(
s
=>
!
s
.
IP
.
Equals
(
agv
.
IP
)
&&
s
.
CurJob
!=
null
&&
s
.
CurJob
is
EmptyShelfBackJob
&&
((((
EmptyShelfBackJob
)
s
.
CurJob
).
EmptyShelfTargetPlace
)!=
null
)
&&
((
EmptyShelfBackJob
)
s
.
CurJob
).
EmptyShelfTargetPlace
.
Equals
(
SettingString
.
A5
));
if
(
tarIdx
==-
1
)
{
nodeName
=
SettingString
.
A5
;
Common
.
log
.
Debug
(
string
.
Format
(
"{0} {1}需要小料架"
,
agv
.
Name
,
SettingString
.
A5
));
return
true
;
}
}
tarIdx
=
Common
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Name
==
SettingString
.
A6
&&
...
...
@@ -223,9 +229,15 @@ namespace AGVControl
}
else
{
nodeName
=
SettingString
.
A6
;
Common
.
log
.
Debug
(
string
.
Format
(
"{0} {1}需要小料架"
,
agv
.
Name
,
SettingString
.
A6
));
return
true
;
tarIdx
=
Common
.
agvInfo
.
FindIndex
(
s
=>
!
s
.
IP
.
Equals
(
agv
.
IP
)
&&
s
.
CurJob
!=
null
&&
s
.
CurJob
is
EmptyShelfBackJob
&&
((((
EmptyShelfBackJob
)
s
.
CurJob
).
EmptyShelfTargetPlace
)
!=
null
)
&&
((
EmptyShelfBackJob
)
s
.
CurJob
).
EmptyShelfTargetPlace
.
Equals
(
SettingString
.
A6
));
if
(
tarIdx
==-
1
)
{
nodeName
=
SettingString
.
A6
;
Common
.
log
.
Debug
(
string
.
Format
(
"{0} {1}需要小料架"
,
agv
.
Name
,
SettingString
.
A6
));
return
true
;
}
//rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[SettingString.Move + SettingString.A6]);
//if (rtn)
//{
...
...
@@ -250,9 +262,15 @@ namespace AGVControl
}
else
{
nodeName
=
SettingString
.
A5
;
Common
.
log
.
Debug
(
string
.
Format
(
"{0} {1}需要大料架"
,
agv
.
Name
,
SettingString
.
A5
));
return
true
;
tarIdx
=
Common
.
agvInfo
.
FindIndex
(
s
=>
!
s
.
IP
.
Equals
(
agv
.
IP
)
&&
s
.
CurJob
!=
null
&&
s
.
CurJob
is
EmptyShelfBackJob
&&
((((
EmptyShelfBackJob
)
s
.
CurJob
).
EmptyShelfTargetPlace
)
!=
null
)
&&
((
EmptyShelfBackJob
)
s
.
CurJob
).
EmptyShelfTargetPlace
.
Equals
(
SettingString
.
A5
));
if
(
tarIdx
==-
1
)
{
nodeName
=
SettingString
.
A5
;
Common
.
log
.
Debug
(
string
.
Format
(
"{0} {1}需要大料架"
,
agv
.
Name
,
SettingString
.
A5
));
return
true
;
}
}
tarIdx
=
Common
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Name
==
SettingString
.
A6
&&
...
...
@@ -272,9 +290,15 @@ namespace AGVControl
}
else
{
nodeName
=
SettingString
.
A6
;
Common
.
log
.
Debug
(
string
.
Format
(
"{0} {1}需要大料架"
,
agv
.
Name
,
SettingString
.
A6
));
return
true
;
tarIdx
=
Common
.
agvInfo
.
FindIndex
(
s
=>
!
s
.
IP
.
Equals
(
agv
.
IP
)
&&
s
.
CurJob
!=
null
&&
s
.
CurJob
is
EmptyShelfBackJob
&&
((((
EmptyShelfBackJob
)
s
.
CurJob
).
EmptyShelfTargetPlace
)
!=
null
)
&&
((
EmptyShelfBackJob
)
s
.
CurJob
).
EmptyShelfTargetPlace
.
Equals
(
SettingString
.
A6
));
if
(
tarIdx
==-
1
)
{
nodeName
=
SettingString
.
A6
;
Common
.
log
.
Debug
(
string
.
Format
(
"{0} {1}需要大料架"
,
agv
.
Name
,
SettingString
.
A6
));
return
true
;
}
//rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[SettingString.Move + SettingString.A6]);
//if (rtn)
//{
...
...
@@ -868,101 +892,6 @@ namespace AGVControl
string
log
;
agv
.
Place
=
""
;
#
region
随机充电位置
//if (Common.chargeStatus.charge3 == "")
//{
// rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission["AutoCharge3"]);
// if (rtn)
// {
// agv.TaskSend = "AutoCharge3";
// Common.chargeStatus.charge3 = agv.Name;
// Common.chargeStatus.chargeInterval = DateTime.Now.Ticks;
// log = string.Format("{0} AutoCharge3", agv.Name);
// Common.LogInfo(log);
// Common.mir.State_Ready(agv);
// }
// else
// {
// agv.TaskSend = "";
// log = string.Format("{0} AutoCharge3 失败", agv.Name);
// //防止上一个任务已执行但返回失败时,删除任务
// //Common.mir.Del_Mission(agv);
// Common.LogInfo(log);
// }
// return rtn;
//}
//else if (Common.chargeStatus.charge4 == "")
//{
// rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission["AutoCharge4"]);
// if (rtn)
// {
// agv.TaskSend = "AutoCharge4";
// Common.chargeStatus.charge4 = agv.Name;
// Common.chargeStatus.chargeInterval = DateTime.Now.Ticks;
// log = string.Format("{0} AutoCharge4", agv.Name);
// Common.LogInfo(log);
// Common.mir.State_Ready(agv);
// }
// else
// {
// agv.TaskSend = "";
// log = string.Format("{0} AutoCharge4 失败", agv.Name);
// //防止上一个任务已执行但返回失败时,删除任务
// //Common.mir.Del_Mission(agv);
// Common.LogInfo(log);
// }
// return rtn;
//}
//else if (Common.chargeStatus.charge5 == "")
//{
// rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission["AutoCharge5"]);
// if (rtn)
// {
// agv.TaskSend = "AutoCharge5";
// Common.chargeStatus.charge5 = agv.Name;
// Common.chargeStatus.chargeInterval = DateTime.Now.Ticks;
// log = string.Format("{0} AutoCharge5", agv.Name);
// Common.LogInfo(log);
// Common.mir.State_Ready(agv);
// }
// else
// {
// agv.TaskSend = "";
// log = string.Format("{0} AutoCharge5 失败", agv.Name);
// //防止上一个任务已执行但返回失败时,删除任务
// //Common.mir.Del_Mission(agv);
// Common.LogInfo(log);
// }
// return rtn;
//}
//else if (Common.chargeStatus.charge6 == "")
//{
// rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission["AutoCharge6"]);
// if (rtn)
// {
// agv.TaskSend = "AutoCharge6";
// Common.chargeStatus.charge4 = agv.Name;
// Common.chargeStatus.chargeInterval = DateTime.Now.Ticks;
// log = string.Format("{0} AutoCharge6", agv.Name);
// Common.LogInfo(log);
// Common.mir.State_Ready(agv);
// }
// else
// {
// agv.TaskSend = "";
// log = string.Format("{0} AutoCharge6 失败", agv.Name);
// //防止上一个任务已执行但返回失败时,删除任务
// //Common.mir.Del_Mission(agv);
// Common.LogInfo(log);
// }
// return rtn;
//}
//else
//{
// return false;
//}
#
endregion
#
region
指定充电位置
if
(
agv
.
IP
==
"10.85.199.72"
)
//1764
{
...
...
@@ -1010,6 +939,7 @@ namespace AGVControl
}
return
rtn
;
}
//随机充电
if
(
Common
.
chargeStatus
.
charge3
==
""
)
//1763 agv.IP == "10.85.199.71"
{
rtn
=
Common
.
mir
.
Add_Mission_Fleet
(
agv
,
Common
.
agvMission
[
"AutoCharge3"
],
isRemovePreMission
);
...
...
@@ -1501,7 +1431,17 @@ namespace AGVControl
chargeInterval
=
0
;
}
public
void
ClearRandomChargeInfo
(
Agv_Info
agv
)
{
if
(
Common
.
chargeStatus
.
charge3
.
Equals
(
agv
.
Name
))
{
Common
.
chargeStatus
.
charge3
=
""
;
}
if
(
Common
.
chargeStatus
.
charge6
.
Equals
(
agv
.
Name
))
{
Common
.
chargeStatus
.
charge6
=
""
;
}
}
}
/// <summary>
...
...
AGVControl-ProductionLine/FrmMain.cs
查看文件 @
353c7ef
...
...
@@ -210,16 +210,9 @@ namespace AGVControl
{
if
(
Common
.
agvInfo
[
e
.
RowIndex
].
IsUse
.
Equals
(
true
))
{
if
(
Common
.
chargeStatus
.
charge3
.
Equals
(
Common
.
agvInfo
[
e
.
RowIndex
].
Name
))
{
Common
.
chargeStatus
.
charge3
=
""
;
}
if
(
Common
.
chargeStatus
.
charge6
.
Equals
(
Common
.
agvInfo
[
e
.
RowIndex
].
Name
))
{
Common
.
chargeStatus
.
charge6
=
""
;
}
Common
.
chargeStatus
.
ClearRandomChargeInfo
(
Common
.
agvInfo
[
e
.
RowIndex
]);
Common
.
agvInfo
[
e
.
RowIndex
].
IsUse
=
false
;
//
Common.agvInfo[e.RowIndex].CurJob = null;
Common
.
agvInfo
[
e
.
RowIndex
].
CurJob
=
null
;
//Common.agvInfo[e.RowIndex].RFID = "";
// }
}
...
...
@@ -236,7 +229,7 @@ namespace AGVControl
Common
.
StandbyStation
.
C4_Station2
=
""
;
}
Common
.
LogInfo
(
string
.
Format
(
"手动开启小车自动模式,并清除上一次的自动模式的运行信息{0} {1}"
,
Common
.
agvInfo
[
e
.
RowIndex
].
Name
,
Common
.
agvInfo
[
e
.
RowIndex
].
RunInfo
()));
Common
.
agvInfo
[
e
.
RowIndex
].
CurJob
=
null
;
//
Common.agvInfo[e.RowIndex].CurJob = null;
Common
.
agvInfo
[
e
.
RowIndex
].
RFID
=
""
;
// Common.agvInfo[e.RowIndex].Place = "";
Common
.
agvInfo
[
e
.
RowIndex
].
IsUse
=
true
;
...
...
AGVControl-ProductionLine/bean/job/ChargeJob.cs
查看文件 @
353c7ef
...
...
@@ -82,7 +82,7 @@ namespace AGVControl
msg
+=
runInfo
;
ChargeStep
.
Msg
=
msg
;
//Common.StatusCharge(agv);
Common
.
MoveToNode
(
agv
,
SettingString
.
Standby
);
UpdateJobTaskInfo
(
agv
.
CurTaskName
,
agv
.
CurTaskID
);
}
...
...
@@ -95,7 +95,7 @@ namespace AGVControl
runInfo
=
"电量["
+
agv
.
Battery
+
"%]小于最大电量["
+
Common
.
chargeStatus
.
chargeMax
+
"%],从当前位置"
+
agvPlace
+
"回到充电位,先到4D门"
;
msg
+=
runInfo
;
ChargeStep
.
Msg
=
msg
;
Common
.
DoorMission
(
agv
,
SettingString
.
DoorCToD
);
UpdateJobTaskInfo
(
agv
.
CurTaskName
,
agv
.
CurTaskID
);
}
...
...
@@ -126,7 +126,7 @@ namespace AGVControl
else
if
(
ChargeStep
.
IsStep
(
CHARGE_STEP
.
WAIT_AGV_REACH_4D_DOOR
))
{
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorCToD
,
CurTaskState
))
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorCToD
,
CurTaskState
))
{
if
(
agv
.
Battery
>
Common
.
chargeStatus
.
chargeMax
)
{
...
...
@@ -145,7 +145,7 @@ namespace AGVControl
runInfo
=
"电量["
+
agv
.
Battery
+
"%]小于最大电量["
+
Common
.
chargeStatus
.
chargeMax
+
"%],充电桩有小车,从当前位置"
+
agvPlace
+
"回到待机位"
;
msg
+=
runInfo
;
ChargeStep
.
Msg
=
msg
;
Common
.
MoveToNode
(
agv
,
SettingString
.
Standby
);
UpdateJobTaskInfo
(
agv
.
CurTaskName
,
agv
.
CurTaskID
);
}
...
...
@@ -163,7 +163,7 @@ namespace AGVControl
}
else
if
(
ChargeStep
.
IsStep
(
CHARGE_STEP
.
WAIT_REACH_CHARGE_STATION
))
{
if
(
Common
.
CheckTaskFinished
(
agv
,
CurTaskName
))
if
(
Common
.
CheckTaskFinished
(
agv
,
CurTaskName
))
{
ChargeStep
.
ToNextStep
(
CHARGE_STEP
.
WAIT_REACH_CHARGE_OK
);
runInfo
=
"充电任务分配完成,去充电且等待任务"
;
...
...
@@ -181,14 +181,7 @@ namespace AGVControl
runInfo
=
"电量充足,回待机位"
;
msg
+=
runInfo
;
ChargeStep
.
Msg
=
msg
;
if
(
Common
.
chargeStatus
.
charge3
.
Equals
(
agv
.
Name
))
{
Common
.
chargeStatus
.
charge3
=
""
;
}
if
(
Common
.
chargeStatus
.
charge6
.
Equals
(
agv
.
Name
))
{
Common
.
chargeStatus
.
charge6
=
""
;
}
Common
.
chargeStatus
.
ClearRandomChargeInfo
(
agv
);
Common
.
MoveToNode
(
agv
,
SettingString
.
Standby
);
UpdateJobTaskInfo
(
agv
.
CurTaskName
,
agv
.
CurTaskID
);
}
...
...
@@ -197,14 +190,7 @@ namespace AGVControl
Job
job
=
Common
.
control
.
GetJob
(
agv
);
if
(
job
!=
null
&&
!(
job
is
ChargeJob
))
{
if
(
Common
.
chargeStatus
.
charge3
.
Equals
(
agv
.
Name
))
{
Common
.
chargeStatus
.
charge3
=
""
;
}
if
(
Common
.
chargeStatus
.
charge6
.
Equals
(
agv
.
Name
))
{
Common
.
chargeStatus
.
charge6
=
""
;
}
Common
.
chargeStatus
.
ClearRandomChargeInfo
(
agv
);
runInfo
=
"充电过程检测到任务,电量["
+
agv
.
Battery
+
"%]大于最小电量["
+
Common
.
chargeStatus
.
chargeMin
+
"%],中断充电执行任务"
;
msg
+=
runInfo
;
ChargeStep
.
Msg
=
msg
;
...
...
@@ -230,14 +216,7 @@ namespace AGVControl
runInfo
=
"充电过程检测到任务,电量["
+
agv
.
Battery
+
"%]大于最小电量["
+
Common
.
chargeStatus
.
chargeMin
+
"%],中断充电执行任务"
;
msg
+=
runInfo
;
ChargeStep
.
Msg
=
msg
;
if
(
Common
.
chargeStatus
.
charge3
.
Equals
(
agv
.
Name
))
{
Common
.
chargeStatus
.
charge3
=
""
;
}
if
(
Common
.
chargeStatus
.
charge6
.
Equals
(
agv
.
Name
))
{
Common
.
chargeStatus
.
charge6
=
""
;
}
Common
.
chargeStatus
.
ClearRandomChargeInfo
(
agv
);
return
job
;
}
else
if
(
job
==
null
&&
agv
.
Battery
<
Common
.
chargeStatus
.
chargeMax
/
2
)
...
...
@@ -246,14 +225,7 @@ namespace AGVControl
runInfo
=
"在待机位暂无任务,且当前电量小于"
+
Common
.
chargeStatus
.
chargeMax
/
2
+
"%,去充电位"
;
msg
+=
runInfo
;
ChargeStep
.
Msg
=
msg
;
if
(
Common
.
chargeStatus
.
charge3
.
Equals
(
agv
.
Name
))
{
Common
.
chargeStatus
.
charge3
=
""
;
}
if
(
Common
.
chargeStatus
.
charge6
.
Equals
(
agv
.
Name
))
{
Common
.
chargeStatus
.
charge6
=
""
;
}
Common
.
chargeStatus
.
ClearRandomChargeInfo
(
agv
);
}
}
}
...
...
@@ -265,7 +237,7 @@ namespace AGVControl
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
Standby
,
CurTaskState
))
{
ChargeStep
.
ToNextStep
(
CHARGE_STEP
.
END
);
runInfo
=
"充电完成,到达待机位"
;
runInfo
=
"充电完成,到达待机位"
;
msg
+=
runInfo
;
ChargeStep
.
Msg
=
msg
;
}
...
...
@@ -276,33 +248,19 @@ namespace AGVControl
Job
job
=
Common
.
control
.
GetJob
(
agv
);
if
(
job
!=
null
&&
!(
job
is
ChargeJob
))
{
runInfo
=
"在待机位检测到任务,执行任务"
;
runInfo
=
"在待机位检测到任务,执行任务"
;
msg
+=
runInfo
;
ChargeStep
.
Msg
=
msg
;
if
(
Common
.
chargeStatus
.
charge3
.
Equals
(
agv
.
Name
))
{
Common
.
chargeStatus
.
charge3
=
""
;
}
if
(
Common
.
chargeStatus
.
charge6
.
Equals
(
agv
.
Name
))
{
Common
.
chargeStatus
.
charge6
=
""
;
}
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
+
"%,去充电位"
;
runInfo
=
"在待机位暂无任务,且当前电量小于"
+
Common
.
chargeStatus
.
chargeMax
/
2
+
"%,去充电位"
;
msg
+=
runInfo
;
ChargeStep
.
Msg
=
msg
;
if
(
Common
.
chargeStatus
.
charge3
.
Equals
(
agv
.
Name
))
{
Common
.
chargeStatus
.
charge3
=
""
;
}
if
(
Common
.
chargeStatus
.
charge6
.
Equals
(
agv
.
Name
))
{
Common
.
chargeStatus
.
charge6
=
""
;
}
Common
.
chargeStatus
.
ClearRandomChargeInfo
(
agv
);
}
}
return
this
;
...
...
AGVControl-ProductionLine/bean/job/EmptyAGVBackJob.cs
查看文件 @
353c7ef
...
...
@@ -155,6 +155,17 @@ namespace AGVControl
}
}
//else if (EmptyAGVBackStep.IsStep(EMPTY_AGV_BACK_STEP.WAIT_AGV_REACH_4D_DOOR))
//{
// CurTaskState = Common.GetTakJobState(CurTaskID);
// if (Common.CheckTaskFinished(agv, SettingString.DoorCToD, CurTaskState))
// {
// EmptyAGVBackStep.ToNextStep(EMPTY_AGV_BACK_STEP.WAIT_REACH_STANDBY);
// runInfo = "从产线" + agvPlace + "回待机位";
// msg += runInfo;
// EmptyAGVBackStep.Msg = msg;
// }
//}
else
if
(
EmptyAGVBackStep
.
IsStep
(
EMPTY_AGV_BACK_STEP
.
WAIT_AGV_REACH_4D_DOOR
))
{
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
...
...
@@ -162,14 +173,14 @@ namespace AGVControl
{
if
(
Common
.
FindFullShelfTask
(
agv
))
{
runInfo
=
"从产线"
+
agvPlace
+
"到达4D门,检测到A6出满料,去A6"
;
runInfo
=
"从产线"
+
agvPlace
+
"到达4D门,检测到A6出满料,去A6"
;
msg
+=
runInfo
;
EmptyAGVBackStep
.
Msg
=
msg
;
return
new
GoFullShelfStationJob
(
SettingString
.
DoorCToD
);
}
else
{
runInfo
=
"从产线"
+
agvPlace
+
"到达4D门,暂无任务,去充电位"
;
runInfo
=
"从产线"
+
agvPlace
+
"到达4D门,暂无任务,去充电位"
;
msg
+=
runInfo
;
EmptyAGVBackStep
.
Msg
=
msg
;
return
new
ChargeJob
(
SettingString
.
DoorCToD
);
...
...
@@ -195,6 +206,10 @@ namespace AGVControl
/// </summary>
WAIT_AGV_REACH_4D_DOOR
,
/// <summary>
/// 等待恒邑反馈
/// </summary>
WAIT_HY_RESPONSE
,
/// <summary>
/// 等待AGV到达待机位
/// </summary>
WAIT_REACH_STANDBY
,
...
...
AGVControl-ProductionLine/bean/job/EmptyShelfBackJob.cs
查看文件 @
353c7ef
...
...
@@ -38,7 +38,7 @@ namespace AGVControl
/// <summary>
/// 空料架目的地
/// </summary>
p
rivate
string
EmptyShelfTargetPlace
{
get
;
set
;
}
p
ublic
string
EmptyShelfTargetPlace
{
get
;
set
;
}
=
""
;
private
int
tryTimes
=
0
;
private
eShelfType
shelfType
;
...
...
AGVControl-ProductionLine/bean/job/SendFullShelfToLineJob.cs
查看文件 @
353c7ef
...
...
@@ -21,12 +21,12 @@ namespace AGVControl
/// <param name="palce">产线名</param>
/// <param name="rfid">料架RFID</param>
/// <param name="isIgNoreBigShelf">是否忽略大料架</param>
public
SendFullShelfToLineJob
(
AGVManager
.
BoxDestInfo
boxDestInfo
,
bool
isIgNoreBigShelf
=
false
)
public
SendFullShelfToLineJob
(
AGVManager
.
BoxDestInfo
boxDestInfo
,
bool
isIgNoreBigShelf
=
false
)
{
FullShelfPlace
=
boxDestInfo
.
location
;
RFID
=
boxDestInfo
.
id
;
BoxDestInfo
=
boxDestInfo
;
IsIgnoreBigShelf
=
isIgNoreBigShelf
;
IsIgnoreBigShelf
=
isIgNoreBigShelf
;
}
/// <summary>
...
...
@@ -57,7 +57,7 @@ namespace AGVControl
public
override
Job
Execute
(
Agv_Info
agv
)
{
string
msg
=
agv
.
Name
+
" "
;
string
msg
=
agv
.
Name
+
" "
;
bool
rtn
=
false
;
agv
.
RFID
=
RFID
;
agv
.
Msg
=
runInfo
;
...
...
@@ -66,7 +66,7 @@ namespace AGVControl
if
(
SendFullShelfStep
.
IsStep
(
SEND_FULL_SHELF_STEP
.
NONE
))
{
if
(
FullShelfPlace
.
StartsWith
(
SettingString
.
C4_Name_Prefix
))
if
(
FullShelfPlace
.
StartsWith
(
SettingString
.
C4_Name_Prefix
))
{
SendFullShelfStep
.
ToNextStep
(
SEND_FULL_SHELF_STEP
.
WAIT_AGV_REACH_DOOR
);
runInfo
=
"满料架前往4C门,从双层线A6送往["
+
FullShelfPlace
+
"][RFID="
+
RFID
+
"]"
;
...
...
@@ -78,7 +78,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
);
...
...
@@ -90,7 +90,7 @@ namespace AGVControl
else
if
(
SendFullShelfStep
.
IsStep
(
SEND_FULL_SHELF_STEP
.
WAIT_AGV_REACH_DOOR
))
{
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorDToC
,
CurTaskState
))
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorDToC
,
CurTaskState
))
{
if
(
Common
.
Check4CTarget
(
agv
,
FullShelfPlace
))
//被占用
{
...
...
@@ -133,11 +133,11 @@ namespace AGVControl
else
if
(
SendFullShelfStep
.
IsStep
(
SEND_FULL_SHELF_STEP
.
WAIT_AGV_REACH_LINE
))
{
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckTaskFinished
(
agv
,
FullShelfPlace
,
CurTaskState
))
if
(
Common
.
CheckTaskFinished
(
agv
,
FullShelfPlace
,
CurTaskState
))
{
if
(
FullShelfPlace
.
Equals
(
SettingString
.
C4FeederIn
))
if
(
FullShelfPlace
.
Equals
(
SettingString
.
C4FeederIn
))
{
runInfo
=
"AGV到达 "
+
FullShelfPlace
+
"完成"
;
runInfo
=
"AGV到达 "
+
FullShelfPlace
+
"完成"
;
msg
+=
runInfo
;
SendFullShelfStep
.
Msg
=
msg
;
return
new
EnterLeaveShelfJob
(
FullShelfPlace
,
eEnterLeaveType
.
Leave
);
...
...
@@ -155,14 +155,14 @@ namespace AGVControl
if
(
RFID
.
StartsWith
(
"C"
)
&&
!
agv
.
Place
.
Equals
(
SettingString
.
D4FeederIn
))
{
SendFullShelfStep
.
ToNextStep
(
SEND_FULL_SHELF_STEP
.
WAIT_BIG_SHELF_UNLOCK
);
runInfo
=
"AGV到达 "
+
FullShelfPlace
+
",并等待大料架["
+
RFID
+
"]解绑"
;
runInfo
=
"AGV到达 "
+
FullShelfPlace
+
",并等待大料架["
+
RFID
+
"]解绑"
;
msg
+=
runInfo
;
SendFullShelfStep
.
Msg
=
msg
;
}
else
{
SendFullShelfStep
.
ToNextStep
(
SEND_FULL_SHELF_STEP
.
WAIT_LINE_RESPONSE
);
runInfo
=
"AGV到达 "
+
FullShelfPlace
+
",并发送入料架请求[ReadyEnter]"
;
runInfo
=
"AGV到达 "
+
FullShelfPlace
+
",并发送入料架请求[ReadyEnter]"
;
msg
+=
runInfo
;
SendFullShelfStep
.
Msg
=
msg
;
Common
.
server
.
ReadyEnter
(
FullShelfPlace
);
...
...
@@ -175,25 +175,27 @@ namespace AGVControl
{
Common
.
mir
.
Get_IO_Status
(
agv
,
out
bool
[]
input
,
out
bool
[]
output
);
System
.
Threading
.
Thread
.
Sleep
(
50
);
if
(
AGVManager
.
GetRackBy
(
RFID
,
out
string
lineName
)
||
(
input
!=
null
&&
input
[
0
]))
if
(
AGVManager
.
GetRackBy
(
RFID
,
out
string
lineName
)
||
(
input
!=
null
&&
input
[
0
]))
{
runInfo
=
"大料架在"
+
FullShelfPlace
+
"解绑完成 ["
+
RFID
+
"] ["
+
agv
.
BoxDestInfo
+
"]"
;
runInfo
=
"大料架在"
+
FullShelfPlace
+
"解绑完成 ["
+
RFID
+
"] ["
+
agv
.
BoxDestInfo
+
"]"
;
agv
.
BoxDestInfo
=
""
;
msg
+=
runInfo
;
SendFullShelfStep
.
Msg
=
msg
;
return
new
EmptyShelfBackJob
(
FullShelfPlace
,
eShelfType
.
BigShelf
);
return
new
EmptyShelfBackJob
(
FullShelfPlace
,
eShelfType
.
BigShelf
);
}
}
else
if
(
SendFullShelfStep
.
IsStep
(
SEND_FULL_SHELF_STEP
.
WAIT_LINE_RESPONSE
))
{
int
id
=
Common
.
FindNode
(
FullShelfPlace
);
ClientNode
node
=
Common
.
nodeInfo
[
id
];
Common
.
mir
.
Get_IO_Status
(
agv
,
out
bool
[]
input
,
out
bool
[]
output
);
System
.
Threading
.
Thread
.
Sleep
(
50
);
if
(
node
.
StateEquals
(
eNodeStatus
.
MayEnter
))
{
if
(!
agv
.
CurTaskName
.
Equals
(
"Leave"
))
if
(!
agv
.
CurTaskName
.
Equals
(
"Leave"
))
{
SendFullShelfStep
.
ToNextStep
(
SEND_FULL_SHELF_STEP
.
WAIT__SHELF_IN_LINE
);
runInfo
=
"收到产线入料架请求[ReadyEnter]的响应 "
+
FullShelfPlace
+
"入料架,小车链条运行"
;
runInfo
=
"收到产线入料架请求[ReadyEnter]的响应 "
+
FullShelfPlace
+
"入料架,小车链条运行"
;
msg
+=
runInfo
;
SendFullShelfStep
.
Msg
=
msg
;
rtn
=
Common
.
mir
.
Add_Mission_Fleet
(
agv
,
Common
.
agvMission
[
"Leave"
]);
...
...
@@ -201,10 +203,20 @@ namespace AGVControl
}
}
else
if
(
input
!=
null
&&
!
input
[
3
]
&&
input
[
0
])
{
runInfo
=
"手动操作:满料架进入"
+
FullShelfPlace
+
"完成 [RFID="
+
RFID
+
"] ["
+
agv
.
BoxDestInfo
+
"]"
;
msg
+=
runInfo
;
SendFullShelfStep
.
Msg
=
msg
;
agv
.
RFID
=
""
;
agv
.
BoxDestInfo
=
""
;
AGVManager
.
UpdateStatus
(
RFID
,
FullShelfPlace
);
return
new
EmptyAGVBackJob
(
FullShelfPlace
);
}
else
if
(
SendFullShelfStep
.
IsTimeOut
(
15000
,
out
double
timeOutValue
))
{
SendFullShelfStep
.
ToNextStep
(
SEND_FULL_SHELF_STEP
.
WAIT_AGV_REACH_LINE
);
runInfo
=
"AGV到达 "
+
FullShelfPlace
+
",15秒后重新向产线发送入料架请求[ReadyEnter]"
;
runInfo
=
"AGV到达 "
+
FullShelfPlace
+
",15秒后重新向产线发送入料架请求[ReadyEnter]"
;
msg
+=
runInfo
;
SendFullShelfStep
.
Msg
=
msg
;
}
...
...
@@ -214,7 +226,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
=
""
;
...
...
@@ -225,7 +237,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;
}
...
...
AGVControl-ProductionLine/bin/Debug/AGVControl-ProductionLine.exe
查看文件 @
353c7ef
此文件类型无法预览
AGVControl-ProductionLine/bin/Debug/AGVControl-ProductionLine.pdb
查看文件 @
353c7ef
此文件类型无法预览
AGVControl-ProductionLine/obj/Debug/AGVControl-ProductionLine.exe
查看文件 @
353c7ef
此文件类型无法预览
AGVControl-ProductionLine/obj/Debug/AGVControl-ProductionLine.pdb
查看文件 @
353c7ef
此文件类型无法预览
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论