Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
顾剑亮
/
AGVControl-Qisda-ProductionLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit f03add52
由
张东亮
编写于
2021-06-24 10:06:04 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
step时间分别计时
1 个父辈
ec01efbe
显示空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
108 行增加
和
63 行删除
.vs/AGVControl-ProductionLine/v16/.suo
AGVControl-ProductionLine/BLL/LineWebService.cs
AGVControl-ProductionLine/bean/Job.cs
AGVControl-ProductionLine/bean/JobStep.cs
AGVControl-ProductionLine/bean/job/ChargeJob.cs
AGVControl-ProductionLine/bean/job/EmptyAGVBackJob.cs
AGVControl-ProductionLine/bean/job/EmptyShelfBackJob.cs
AGVControl-ProductionLine/bean/job/EnterLeaveShelfJob.cs
AGVControl-ProductionLine/bean/job/GoEmptyShelfLineJob.cs
AGVControl-ProductionLine/bean/job/GoFullShelfStationJob.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
查看文件 @
f03add5
此文件类型无法预览
AGVControl-ProductionLine/BLL/LineWebService.cs
查看文件 @
f03add5
...
@@ -75,7 +75,7 @@ namespace BLL
...
@@ -75,7 +75,7 @@ namespace BLL
res
=
new
Result
()
{
Succeed
=
false
,
ResultData
=
null
,
ErrorMessage
=
"rfid=null"
};
res
=
new
Result
()
{
Succeed
=
false
,
ResultData
=
null
,
ErrorMessage
=
"rfid=null"
};
Log
.
Error
(
string
.
Format
(
"Unlock Request(POST) Failed [emptyStation={0},rfid=null]"
,
emptyStation
));
Log
.
Error
(
string
.
Format
(
"Unlock Request(POST) Failed [emptyStation={0},rfid=null]"
,
emptyStation
));
}
}
else
if
(
rfid
.
StartsWith
(
"A"
))
else
if
(
rfid
.
ToUpper
().
StartsWith
(
"A"
))
{
{
res
=
new
Result
()
{
Succeed
=
false
,
ResultData
=
null
,
ErrorMessage
=
$
"rfid={rfid} can not be unlock"
};
res
=
new
Result
()
{
Succeed
=
false
,
ResultData
=
null
,
ErrorMessage
=
$
"rfid={rfid} can not be unlock"
};
Log
.
Error
(
string
.
Format
(
"Unlock Request(POST) Failed [emptyStation={0},rfid=null]"
,
emptyStation
));
Log
.
Error
(
string
.
Format
(
"Unlock Request(POST) Failed [emptyStation={0},rfid=null]"
,
emptyStation
));
...
@@ -115,10 +115,10 @@ namespace BLL
...
@@ -115,10 +115,10 @@ namespace BLL
}
}
if
(
Common
.
GetNodeNameByLineName
(
line
,
out
string
value
))
if
(
Common
.
GetNodeNameByLineName
(
line
,
out
string
value
))
{
{
if
(
RFID
.
StartsWith
(
"A"
))
if
(
RFID
.
ToUpper
().
StartsWith
(
"A"
))
{
{
res
=
new
Result
()
{
Succeed
=
false
,
ResultData
=
null
,
ErrorMessage
=
$
"rfid={RFID} can not be unlock"
};
res
=
new
Result
()
{
Succeed
=
false
,
ResultData
=
null
,
ErrorMessage
=
$
"rfid={RFID} can not be unlock"
};
Log
.
Error
(
string
.
Format
(
"Unlock Request(
POS
T) Failed [emptyStation={0},rfid={1}]"
,
line
,
RFID
));
Log
.
Error
(
string
.
Format
(
"Unlock Request(
GE
T) Failed [emptyStation={0},rfid={1}]"
,
line
,
RFID
));
}
}
else
if
(!
Common
.
missionManager
.
AddMission
(
value
,
RFID
.
ToUpper
()))
else
if
(!
Common
.
missionManager
.
AddMission
(
value
,
RFID
.
ToUpper
()))
{
{
...
...
AGVControl-ProductionLine/bean/Job.cs
查看文件 @
f03add5
...
@@ -31,18 +31,12 @@ namespace AGVControl
...
@@ -31,18 +31,12 @@ namespace AGVControl
/// 当前任务的执行状态
/// 当前任务的执行状态
/// </summary>
/// </summary>
public
string
CurTaskState
{
get
;
set
;
}
=
"Wait"
;
public
string
CurTaskState
{
get
;
set
;
}
=
"Wait"
;
/// <summary>
/// Job开始时间
/// </summary>
public
DateTime
StartJobTime
{
get
;
set
;
}
=
DateTime
.
Now
;
/// <summary>
/// <summary>
/// Job名称
/// Job名称
/// </summary>
/// </summary>
public
string
JobName
{
get
;
set
;
}
=
""
;
public
string
JobName
{
get
;
set
;
}
=
""
;
protected
void
RecordRunLog
(
Agv_Info
agv
,
string
JobStep
,
string
runInfo
,
string
targetPlace
)
{
Common
.
RunLogInfo
(
new
RunInfo
(
agv
.
Name
.
PadLeft
(
4
,
'0'
),
JobName
,
targetPlace
,
JobStep
,
runInfo
,
StartJobTime
));
}
/// <summary>
/// <summary>
/// 更新任务信息
/// 更新任务信息
/// </summary>
/// </summary>
...
...
AGVControl-ProductionLine/bean/JobStep.cs
查看文件 @
f03add5
...
@@ -80,6 +80,9 @@ namespace AGVControl
...
@@ -80,6 +80,9 @@ namespace AGVControl
}
}
public
void
RecordRunLog
(
Agv_Info
agv
,
string
JobName
,
string
runInfo
,
string
targetPlace
)
{
Common
.
RunLogInfo
(
new
RunInfo
(
agv
.
Name
.
PadLeft
(
4
,
'0'
),
JobName
,
targetPlace
,
CurStep
(),
runInfo
,
startTime
));
}
}
}
}
}
AGVControl-ProductionLine/bean/job/ChargeJob.cs
查看文件 @
f03add5
...
@@ -22,7 +22,6 @@ namespace AGVControl
...
@@ -22,7 +22,6 @@ namespace AGVControl
public
ChargeJob
(
string
agvPlae
)
public
ChargeJob
(
string
agvPlae
)
{
{
this
.
agvPlace
=
agvPlae
;
this
.
agvPlace
=
agvPlae
;
JobName
=
"充电任务"
;
}
}
...
@@ -50,6 +49,7 @@ namespace AGVControl
...
@@ -50,6 +49,7 @@ namespace AGVControl
string
msg
=
agv
.
Name
+
" "
;
string
msg
=
agv
.
Name
+
" "
;
bool
rtn
=
false
;
bool
rtn
=
false
;
agv
.
Msg
=
""
;
agv
.
Msg
=
""
;
JobName
=
"充电任务"
;
//runInfo = "充电任务:";
//runInfo = "充电任务:";
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
curJobStep
.
IsStep
(
CHARGE_STEP
.
NONE
))
if
(
curJobStep
.
IsStep
(
CHARGE_STEP
.
NONE
))
...
@@ -145,6 +145,8 @@ namespace AGVControl
...
@@ -145,6 +145,8 @@ namespace AGVControl
{
{
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorAirOut
,
CurTaskState
))
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorAirOut
,
CurTaskState
))
{
{
JobName
=
"待机任务"
;
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
Standby
);
curJobStep
.
ToNextStep
(
CHARGE_STEP
.
WAIT_AGV_REACH_4D_DOOR
);
curJobStep
.
ToNextStep
(
CHARGE_STEP
.
WAIT_AGV_REACH_4D_DOOR
);
runInfo
=
"电量充足["
+
agv
.
Battery
+
"%],从当前位置"
+
agvPlace
+
"回到待机位,先到4D门"
;
runInfo
=
"电量充足["
+
agv
.
Battery
+
"%],从当前位置"
+
agvPlace
+
"回到待机位,先到4D门"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -159,6 +161,8 @@ namespace AGVControl
...
@@ -159,6 +161,8 @@ namespace AGVControl
{
{
if
(
agv
.
Battery
>
Common
.
chargeStatus
.
chargeMax
)
if
(
agv
.
Battery
>
Common
.
chargeStatus
.
chargeMax
)
{
{
JobName
=
"待机任务"
;
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
Standby
);
curJobStep
.
ToNextStep
(
CHARGE_STEP
.
WAIT_REACH_STANDBY
);
curJobStep
.
ToNextStep
(
CHARGE_STEP
.
WAIT_REACH_STANDBY
);
runInfo
=
"电量充足["
+
agv
.
Battery
+
"%],从当前位置"
+
agvPlace
+
"回到待机位"
;
runInfo
=
"电量充足["
+
agv
.
Battery
+
"%],从当前位置"
+
agvPlace
+
"回到待机位"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -170,6 +174,8 @@ namespace AGVControl
...
@@ -170,6 +174,8 @@ namespace AGVControl
{
{
if
(!
Common
.
StatusCharge
(
agv
))
if
(!
Common
.
StatusCharge
(
agv
))
{
{
JobName
=
"待机任务"
;
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
Standby
);
curJobStep
.
ToNextStep
(
CHARGE_STEP
.
WAIT_REACH_STANDBY
);
curJobStep
.
ToNextStep
(
CHARGE_STEP
.
WAIT_REACH_STANDBY
);
runInfo
=
"电量["
+
agv
.
Battery
+
"%]小于最大电量["
+
Common
.
chargeStatus
.
chargeMax
+
"%],充电桩有小车,从当前位置"
+
agvPlace
+
"回到待机位"
;
runInfo
=
"电量["
+
agv
.
Battery
+
"%]小于最大电量["
+
Common
.
chargeStatus
.
chargeMax
+
"%],充电桩有小车,从当前位置"
+
agvPlace
+
"回到待机位"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -180,6 +186,7 @@ namespace AGVControl
...
@@ -180,6 +186,7 @@ namespace AGVControl
}
}
else
else
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
AutoCharge
);
curJobStep
.
ToNextStep
(
CHARGE_STEP
.
WAIT_REACH_CHARGE_STATION
);
curJobStep
.
ToNextStep
(
CHARGE_STEP
.
WAIT_REACH_CHARGE_STATION
);
runInfo
=
"电量["
+
agv
.
Battery
+
"%]小于最大电量["
+
Common
.
chargeStatus
.
chargeMax
+
"%],从当前位置"
+
agvPlace
+
"回到充电位"
;
runInfo
=
"电量["
+
agv
.
Battery
+
"%]小于最大电量["
+
Common
.
chargeStatus
.
chargeMax
+
"%],从当前位置"
+
agvPlace
+
"回到充电位"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -194,6 +201,7 @@ namespace AGVControl
...
@@ -194,6 +201,7 @@ namespace AGVControl
{
{
if
(
Common
.
CheckTaskFinished
(
agv
,
CurTaskName
))
if
(
Common
.
CheckTaskFinished
(
agv
,
CurTaskName
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
AutoCharge
);
curJobStep
.
ToNextStep
(
CHARGE_STEP
.
WAIT_REACH_CHARGE_OK
);
curJobStep
.
ToNextStep
(
CHARGE_STEP
.
WAIT_REACH_CHARGE_OK
);
runInfo
=
"充电任务分配完成,去充电并等待任务"
;
runInfo
=
"充电任务分配完成,去充电并等待任务"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -206,6 +214,8 @@ namespace AGVControl
...
@@ -206,6 +214,8 @@ namespace AGVControl
{
{
if
(
agv
.
Battery
>=
Common
.
chargeStatus
.
chargeMax
)
if
(
agv
.
Battery
>=
Common
.
chargeStatus
.
chargeMax
)
{
{
JobName
=
"待机任务"
;
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
AutoCharge
);
curJobStep
.
ToNextStep
(
CHARGE_STEP
.
WAIT_REACH_STANDBY
);
curJobStep
.
ToNextStep
(
CHARGE_STEP
.
WAIT_REACH_STANDBY
);
runInfo
=
"电量充足,回待机位"
;
runInfo
=
"电量充足,回待机位"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -216,6 +226,7 @@ namespace AGVControl
...
@@ -216,6 +226,7 @@ namespace AGVControl
}
}
else
if
(
agv
.
Battery
>=
Common
.
chargeStatus
.
chargeMin
)
else
if
(
agv
.
Battery
>=
Common
.
chargeStatus
.
chargeMin
)
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
AutoCharge
);
Job
job
=
Common
.
control
.
GetJob
(
agv
);
Job
job
=
Common
.
control
.
GetJob
(
agv
);
if
(
job
!=
null
&&
!(
job
is
ChargeJob
))
if
(
job
!=
null
&&
!(
job
is
ChargeJob
))
{
{
...
@@ -223,7 +234,7 @@ namespace AGVControl
...
@@ -223,7 +234,7 @@ namespace AGVControl
runInfo
=
"充电过程检测到任务,电量["
+
agv
.
Battery
+
"%]大于最小电量["
+
Common
.
chargeStatus
.
chargeMin
+
"%],中断充电执行任务"
;
runInfo
=
"充电过程检测到任务,电量["
+
agv
.
Battery
+
"%]大于最小电量["
+
Common
.
chargeStatus
.
chargeMin
+
"%],中断充电执行任务"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
curJobStep
.
Msg
=
msg
;
curJobStep
.
Msg
=
msg
;
RecordRunLog
(
agv
,
curJobStep
.
CurStep
(),
runInfo
,
agv
.
Plac
e
);
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
AutoCharg
e
);
return
job
;
return
job
;
}
}
...
@@ -233,6 +244,7 @@ namespace AGVControl
...
@@ -233,6 +244,7 @@ namespace AGVControl
{
{
if
(
agv
.
Battery
>=
Common
.
chargeStatus
.
chargeMax
)
if
(
agv
.
Battery
>=
Common
.
chargeStatus
.
chargeMax
)
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
AutoCharge
);
curJobStep
.
ToNextStep
(
CHARGE_STEP
.
END
);
curJobStep
.
ToNextStep
(
CHARGE_STEP
.
END
);
runInfo
=
"充电完成"
;
runInfo
=
"充电完成"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -240,6 +252,7 @@ namespace AGVControl
...
@@ -240,6 +252,7 @@ namespace AGVControl
}
}
else
if
(
agv
.
Battery
>=
Common
.
chargeStatus
.
chargeMin
)
else
if
(
agv
.
Battery
>=
Common
.
chargeStatus
.
chargeMin
)
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
AutoCharge
);
Job
job
=
Common
.
control
.
GetJob
(
agv
);
Job
job
=
Common
.
control
.
GetJob
(
agv
);
if
(
job
!=
null
&&
!(
job
is
ChargeJob
))
if
(
job
!=
null
&&
!(
job
is
ChargeJob
))
{
{
...
@@ -247,7 +260,7 @@ namespace AGVControl
...
@@ -247,7 +260,7 @@ namespace AGVControl
msg
+=
runInfo
;
msg
+=
runInfo
;
curJobStep
.
Msg
=
msg
;
curJobStep
.
Msg
=
msg
;
Common
.
chargeStatus
.
ClearRandomChargeInfo
(
agv
);
Common
.
chargeStatus
.
ClearRandomChargeInfo
(
agv
);
RecordRunLog
(
agv
,
curJobStep
.
CurStep
(),
runInfo
,
agv
.
Plac
e
);
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
AutoCharg
e
);
return
job
;
return
job
;
}
}
}
}
...
@@ -259,6 +272,8 @@ namespace AGVControl
...
@@ -259,6 +272,8 @@ namespace AGVControl
{
{
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
Standby
,
CurTaskState
))
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
Standby
,
CurTaskState
))
{
{
JobName
=
"待机任务"
;
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
Standby
);
curJobStep
.
ToNextStep
(
CHARGE_STEP
.
END
);
curJobStep
.
ToNextStep
(
CHARGE_STEP
.
END
);
runInfo
=
"充电完成,到达待机位"
;
runInfo
=
"充电完成,到达待机位"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -271,15 +286,17 @@ namespace AGVControl
...
@@ -271,15 +286,17 @@ namespace AGVControl
Job
job
=
Common
.
control
.
GetJob
(
agv
);
Job
job
=
Common
.
control
.
GetJob
(
agv
);
if
(
job
!=
null
&&
!(
job
is
ChargeJob
))
if
(
job
!=
null
&&
!(
job
is
ChargeJob
))
{
{
JobName
=
"待机任务"
;
runInfo
=
"在待机位检测到任务,执行任务"
;
runInfo
=
"在待机位检测到任务,执行任务"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
curJobStep
.
Msg
=
msg
;
curJobStep
.
Msg
=
msg
;
Common
.
chargeStatus
.
ClearRandomChargeInfo
(
agv
);
Common
.
chargeStatus
.
ClearRandomChargeInfo
(
agv
);
RecordRunLog
(
agv
,
curJobStep
.
CurStep
(),
runInfo
,
agv
.
Place
);
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
Standby
);
return
job
;
return
job
;
}
}
else
if
(
job
==
null
&&
agv
.
Battery
<
Common
.
chargeStatus
.
chargeMax
/
2
)
else
if
(
job
==
null
&&
agv
.
Battery
<
Common
.
chargeStatus
.
chargeMax
/
2
)
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
Standby
);
curJobStep
.
ToNextStep
(
CHARGE_STEP
.
NONE
);
curJobStep
.
ToNextStep
(
CHARGE_STEP
.
NONE
);
runInfo
=
"在待机位暂无任务,且当前电量小于"
+
Common
.
chargeStatus
.
chargeMax
/
2
+
"%,去充电位"
;
runInfo
=
"在待机位暂无任务,且当前电量小于"
+
Common
.
chargeStatus
.
chargeMax
/
2
+
"%,去充电位"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -287,7 +304,7 @@ namespace AGVControl
...
@@ -287,7 +304,7 @@ namespace AGVControl
Common
.
chargeStatus
.
ClearRandomChargeInfo
(
agv
);
Common
.
chargeStatus
.
ClearRandomChargeInfo
(
agv
);
}
}
}
}
RecordRunLog
(
agv
,
curJobStep
.
CurStep
(),
runInfo
,
agv
.
Place
);
return
this
;
return
this
;
}
}
...
...
AGVControl-ProductionLine/bean/job/EmptyAGVBackJob.cs
查看文件 @
f03add5
...
@@ -67,7 +67,7 @@ namespace AGVControl
...
@@ -67,7 +67,7 @@ namespace AGVControl
runInfo
=
"小车在产线 "
+
agvPlace
+
" 准备返回时检测到 "
+
nodeName
+
" 有空料架"
;
runInfo
=
"小车在产线 "
+
agvPlace
+
" 准备返回时检测到 "
+
nodeName
+
" 有空料架"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
curJobStep
.
Msg
=
msg
;
curJobStep
.
Msg
=
msg
;
RecordRunLog
(
agv
,
curJobStep
.
CurStep
(),
runInfo
,
agv
.
Plac
e
);
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
nodeNam
e
);
return
new
GoEmptyShelfLineJob
(
agvPlace
,
nodeName
,
rfid
);
return
new
GoEmptyShelfLineJob
(
agvPlace
,
nodeName
,
rfid
);
}
}
else
else
...
@@ -169,13 +169,14 @@ namespace AGVControl
...
@@ -169,13 +169,14 @@ namespace AGVControl
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
Standby
,
CurTaskState
))
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
Standby
,
CurTaskState
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
Standby
);
Job
job
=
Common
.
control
.
GetJob
(
agv
);
Job
job
=
Common
.
control
.
GetJob
(
agv
);
if
(
job
==
null
&&
agv
.
Battery
<
Common
.
chargeStatus
.
chargeMax
)
if
(
job
==
null
&&
agv
.
Battery
<
Common
.
chargeStatus
.
chargeMax
)
{
{
runInfo
=
"到达待机位,电量["
+
agv
.
Battery
+
"]小于最大电量["
+
Common
.
chargeStatus
.
chargeMax
+
"],暂无任务,去充电"
;
runInfo
=
"到达待机位,电量["
+
agv
.
Battery
+
"]小于最大电量["
+
Common
.
chargeStatus
.
chargeMax
+
"],暂无任务,去充电"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
curJobStep
.
Msg
=
msg
;
curJobStep
.
Msg
=
msg
;
RecordRunLog
(
agv
,
curJobStep
.
CurStep
(),
runInfo
,
agv
.
Plac
e
);
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
AutoCharg
e
);
return
new
ChargeJob
(
""
);
return
new
ChargeJob
(
""
);
}
}
else
else
...
@@ -183,13 +184,14 @@ namespace AGVControl
...
@@ -183,13 +184,14 @@ namespace AGVControl
runInfo
=
"到达待机位,检测到新任务,执行任务"
;
runInfo
=
"到达待机位,检测到新任务,执行任务"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
curJobStep
.
Msg
=
msg
;
curJobStep
.
Msg
=
msg
;
RecordRunLog
(
agv
,
curJobStep
.
CurStep
(),
runInfo
,
agv
.
Place
);
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
Standby
);
return
job
;
return
job
;
}
}
}
}
else
else
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
Standby
);
if
(
Common
.
FindEmptyShelfNode
(
agv
,
out
string
nodeName
,
true
))
if
(
Common
.
FindEmptyShelfNode
(
agv
,
out
string
nodeName
,
true
))
{
{
int
i
=
Common
.
agvInfo
.
FindIndex
(
s
=>
s
.
CurJob
is
GoEmptyShelfLineJob
&&
((
GoEmptyShelfLineJob
)
s
.
CurJob
).
EmptyShelfPlace
.
Equals
(
nodeName
));
int
i
=
Common
.
agvInfo
.
FindIndex
(
s
=>
s
.
CurJob
is
GoEmptyShelfLineJob
&&
((
GoEmptyShelfLineJob
)
s
.
CurJob
).
EmptyShelfPlace
.
Equals
(
nodeName
));
...
@@ -201,7 +203,7 @@ namespace AGVControl
...
@@ -201,7 +203,7 @@ namespace AGVControl
runInfo
=
"小车在产线 "
+
agvPlace
+
" 准备返回时检测到 "
+
nodeName
+
" 有空料架"
;
runInfo
=
"小车在产线 "
+
agvPlace
+
" 准备返回时检测到 "
+
nodeName
+
" 有空料架"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
curJobStep
.
Msg
=
msg
;
curJobStep
.
Msg
=
msg
;
RecordRunLog
(
agv
,
curJobStep
.
CurStep
(),
runInfo
,
agv
.
Plac
e
);
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
nodeNam
e
);
return
new
GoEmptyShelfLineJob
(
agvPlace
,
nodeName
,
rfid
);
return
new
GoEmptyShelfLineJob
(
agvPlace
,
nodeName
,
rfid
);
}
}
}
}
...
@@ -212,7 +214,7 @@ namespace AGVControl
...
@@ -212,7 +214,7 @@ namespace AGVControl
runInfo
=
"从产线"
+
agvPlace
+
"回待机位过程中,检测到A6出满料,去A6"
;
runInfo
=
"从产线"
+
agvPlace
+
"回待机位过程中,检测到A6出满料,去A6"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
curJobStep
.
Msg
=
msg
;
curJobStep
.
Msg
=
msg
;
RecordRunLog
(
agv
,
curJobStep
.
CurStep
(),
runInfo
,
agv
.
Place
);
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
A6
);
return
new
GoFullShelfStationJob
(
SettingString
.
Standby
);
return
new
GoFullShelfStationJob
(
SettingString
.
Standby
);
}
}
}
}
...
@@ -223,6 +225,7 @@ namespace AGVControl
...
@@ -223,6 +225,7 @@ namespace AGVControl
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorAirOut
,
CurTaskState
))
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorAirOut
,
CurTaskState
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
DoorAirOut
);
curJobStep
.
ToNextStep
(
EMPTY_AGV_BACK_STEP
.
WAIT_AGV_REACH_4D_DOOR
);
curJobStep
.
ToNextStep
(
EMPTY_AGV_BACK_STEP
.
WAIT_AGV_REACH_4D_DOOR
);
runInfo
=
"从产线"
+
agvPlace
+
"回待机位,先到4D门"
;
runInfo
=
"从产线"
+
agvPlace
+
"回待机位,先到4D门"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -236,6 +239,7 @@ namespace AGVControl
...
@@ -236,6 +239,7 @@ namespace AGVControl
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorCToD
,
CurTaskState
))
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorCToD
,
CurTaskState
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
DoorCToD
);
if
(
Common
.
FindEmptyShelfNode
(
agv
,
out
string
nodeName
,
true
))
if
(
Common
.
FindEmptyShelfNode
(
agv
,
out
string
nodeName
,
true
))
{
{
int
i
=
Common
.
agvInfo
.
FindIndex
(
s
=>
s
.
CurJob
is
GoEmptyShelfLineJob
&&
((
GoEmptyShelfLineJob
)
s
.
CurJob
).
EmptyShelfPlace
.
Equals
(
nodeName
));
int
i
=
Common
.
agvInfo
.
FindIndex
(
s
=>
s
.
CurJob
is
GoEmptyShelfLineJob
&&
((
GoEmptyShelfLineJob
)
s
.
CurJob
).
EmptyShelfPlace
.
Equals
(
nodeName
));
...
@@ -247,7 +251,7 @@ namespace AGVControl
...
@@ -247,7 +251,7 @@ namespace AGVControl
runInfo
=
"小车在产线 "
+
agvPlace
+
" 准备返回时检测到 "
+
nodeName
+
" 有空料架"
;
runInfo
=
"小车在产线 "
+
agvPlace
+
" 准备返回时检测到 "
+
nodeName
+
" 有空料架"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
curJobStep
.
Msg
=
msg
;
curJobStep
.
Msg
=
msg
;
RecordRunLog
(
agv
,
curJobStep
.
CurStep
(),
runInfo
,
agv
.
Plac
e
);
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
nodeNam
e
);
return
new
GoEmptyShelfLineJob
(
agvPlace
,
nodeName
,
rfid
);
return
new
GoEmptyShelfLineJob
(
agvPlace
,
nodeName
,
rfid
);
}
}
}
}
...
@@ -258,7 +262,7 @@ namespace AGVControl
...
@@ -258,7 +262,7 @@ namespace AGVControl
runInfo
=
"从产线"
+
agvPlace
+
"到达4D门,检测到A6出满料,去A6"
;
runInfo
=
"从产线"
+
agvPlace
+
"到达4D门,检测到A6出满料,去A6"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
curJobStep
.
Msg
=
msg
;
curJobStep
.
Msg
=
msg
;
RecordRunLog
(
agv
,
curJobStep
.
CurStep
(),
runInfo
,
agv
.
Place
);
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
A6
);
return
new
GoFullShelfStationJob
(
SettingString
.
DoorCToD
);
return
new
GoFullShelfStationJob
(
SettingString
.
DoorCToD
);
}
}
...
@@ -266,12 +270,11 @@ namespace AGVControl
...
@@ -266,12 +270,11 @@ namespace AGVControl
runInfo
=
"从产线"
+
agvPlace
+
"到达4D门,暂无任务,去充电位"
;
runInfo
=
"从产线"
+
agvPlace
+
"到达4D门,暂无任务,去充电位"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
curJobStep
.
Msg
=
msg
;
curJobStep
.
Msg
=
msg
;
RecordRunLog
(
agv
,
curJobStep
.
CurStep
(),
runInfo
,
agv
.
Plac
e
);
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
AutoCharg
e
);
return
new
ChargeJob
(
SettingString
.
DoorCToD
);
return
new
ChargeJob
(
SettingString
.
DoorCToD
);
}
}
}
}
RecordRunLog
(
agv
,
curJobStep
.
CurStep
(),
runInfo
,
agv
.
Place
);
return
this
;
return
this
;
}
}
/// <summary>
/// <summary>
...
...
AGVControl-ProductionLine/bean/job/EmptyShelfBackJob.cs
查看文件 @
f03add5
...
@@ -116,6 +116,7 @@ namespace AGVControl
...
@@ -116,6 +116,7 @@ namespace AGVControl
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorAirOut
,
CurTaskState
))
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorAirOut
,
CurTaskState
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
DoorAirOut
);
curJobStep
.
ToNextStep
(
EMPTY_SHELF_BACK_STEP
.
WAIT_AGV_REACH_DOOR
);
curJobStep
.
ToNextStep
(
EMPTY_SHELF_BACK_STEP
.
WAIT_AGV_REACH_DOOR
);
runInfo
=
"出风淋门,前往4D门"
;
runInfo
=
"出风淋门,前往4D门"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -129,6 +130,7 @@ namespace AGVControl
...
@@ -129,6 +130,7 @@ namespace AGVControl
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorCToD
,
CurTaskState
))
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorCToD
,
CurTaskState
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
DoorCToD
);
if
(
Common
.
CheckA5A6State
(
agv
,
shelfType
,
out
string
nodeName
))
if
(
Common
.
CheckA5A6State
(
agv
,
shelfType
,
out
string
nodeName
))
{
{
EmptyShelfTargetPlace
=
nodeName
;
EmptyShelfTargetPlace
=
nodeName
;
...
@@ -153,8 +155,10 @@ namespace AGVControl
...
@@ -153,8 +155,10 @@ namespace AGVControl
else
if
(
curJobStep
.
IsStep
(
EMPTY_SHELF_BACK_STEP
.
WAIT_AGV_REACH_STANDBY
))
else
if
(
curJobStep
.
IsStep
(
EMPTY_SHELF_BACK_STEP
.
WAIT_AGV_REACH_STANDBY
))
{
{
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
Standby
);
if
(
Common
.
CheckA5A6State
(
agv
,
shelfType
,
out
string
nodeName
))
if
(
Common
.
CheckA5A6State
(
agv
,
shelfType
,
out
string
nodeName
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
EmptyShelfTargetPlace
);
EmptyShelfTargetPlace
=
nodeName
;
EmptyShelfTargetPlace
=
nodeName
;
curJobStep
.
ToNextStep
(
EMPTY_SHELF_BACK_STEP
.
WAIT_AGV_REACH_A5A6
);
curJobStep
.
ToNextStep
(
EMPTY_SHELF_BACK_STEP
.
WAIT_AGV_REACH_A5A6
);
runInfo
=
"待机位检测到双层线需要料架,送往双层线 "
+
EmptyShelfTargetPlace
;
runInfo
=
"待机位检测到双层线需要料架,送往双层线 "
+
EmptyShelfTargetPlace
;
...
@@ -169,6 +173,7 @@ namespace AGVControl
...
@@ -169,6 +173,7 @@ namespace AGVControl
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckTaskFinished
(
agv
,
EmptyShelfTargetPlace
,
CurTaskState
)
&&
EmptyShelfTargetPlace
.
StartsWith
(
"A"
))
if
(
Common
.
CheckTaskFinished
(
agv
,
EmptyShelfTargetPlace
,
CurTaskState
)
&&
EmptyShelfTargetPlace
.
StartsWith
(
"A"
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
EmptyShelfTargetPlace
);
curJobStep
.
ToNextStep
(
EMPTY_SHELF_BACK_STEP
.
WAIT_DOUBLE_LINE_RESPONSE
);
curJobStep
.
ToNextStep
(
EMPTY_SHELF_BACK_STEP
.
WAIT_DOUBLE_LINE_RESPONSE
);
runInfo
=
"AGV到达 "
+
EmptyShelfTargetPlace
+
",并发送入料架请求[ReadyEnter]"
;
runInfo
=
"AGV到达 "
+
EmptyShelfTargetPlace
+
",并发送入料架请求[ReadyEnter]"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -184,6 +189,7 @@ namespace AGVControl
...
@@ -184,6 +189,7 @@ namespace AGVControl
{
{
if
(!
agv
.
CurTaskName
.
Equals
(
"Leave"
))
if
(!
agv
.
CurTaskName
.
Equals
(
"Leave"
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
EmptyShelfTargetPlace
);
curJobStep
.
ToNextStep
(
EMPTY_SHELF_BACK_STEP
.
WAIT__EMPTY_SHELF_IN_DOUBLE_LINE
);
curJobStep
.
ToNextStep
(
EMPTY_SHELF_BACK_STEP
.
WAIT__EMPTY_SHELF_IN_DOUBLE_LINE
);
runInfo
=
"收到双层线入料架请求[ReadyEnter]的响应 "
+
EmptyShelfTargetPlace
+
"入料架,小车链条运行"
;
runInfo
=
"收到双层线入料架请求[ReadyEnter]的响应 "
+
EmptyShelfTargetPlace
+
"入料架,小车链条运行"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -199,6 +205,7 @@ namespace AGVControl
...
@@ -199,6 +205,7 @@ namespace AGVControl
if
(
tryTimes
<
3
)
if
(
tryTimes
<
3
)
return
this
;
return
this
;
tryTimes
=
0
;
tryTimes
=
0
;
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
Standby
);
curJobStep
.
ToNextStep
(
EMPTY_SHELF_BACK_STEP
.
WAIT_AGV_REACH_STANDBY
);
curJobStep
.
ToNextStep
(
EMPTY_SHELF_BACK_STEP
.
WAIT_AGV_REACH_STANDBY
);
runInfo
=
"双层线"
+
EmptyShelfTargetPlace
+
"暂不需要空料架,从["
+
EmptyShelfTargetPlace
+
"]到待机位"
;
runInfo
=
"双层线"
+
EmptyShelfTargetPlace
+
"暂不需要空料架,从["
+
EmptyShelfTargetPlace
+
"]到待机位"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -219,7 +226,7 @@ namespace AGVControl
...
@@ -219,7 +226,7 @@ namespace AGVControl
runInfo
=
"在双层线检测到任务,执行任务"
;
runInfo
=
"在双层线检测到任务,执行任务"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
curJobStep
.
Msg
=
msg
;
curJobStep
.
Msg
=
msg
;
RecordRunLog
(
agv
,
curJobStep
.
CurStep
()
,
runInfo
,
agv
.
Place
);
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
agv
.
Place
);
return
job
;
return
job
;
}
}
else
else
...
@@ -229,7 +236,7 @@ namespace AGVControl
...
@@ -229,7 +236,7 @@ namespace AGVControl
curJobStep
.
Msg
=
msg
;
curJobStep
.
Msg
=
msg
;
agv
.
RFID
=
""
;
agv
.
RFID
=
""
;
agv
.
BoxDestInfo
=
""
;
agv
.
BoxDestInfo
=
""
;
RecordRunLog
(
agv
,
curJobStep
.
CurStep
(),
runInfo
,
agv
.
Plac
e
);
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
AutoCharg
e
);
return
new
ChargeJob
(
SettingString
.
DoubleLine_Name_Prefix
);
return
new
ChargeJob
(
SettingString
.
DoubleLine_Name_Prefix
);
}
}
...
@@ -243,7 +250,6 @@ namespace AGVControl
...
@@ -243,7 +250,6 @@ namespace AGVControl
else
if
(
curJobStep
.
IsStep
(
EMPTY_SHELF_BACK_STEP
.
END
))
else
if
(
curJobStep
.
IsStep
(
EMPTY_SHELF_BACK_STEP
.
END
))
{
{
}
}
RecordRunLog
(
agv
,
curJobStep
.
CurStep
(),
runInfo
,
agv
.
Place
);
return
this
;
return
this
;
}
}
...
...
AGVControl-ProductionLine/bean/job/EnterLeaveShelfJob.cs
查看文件 @
f03add5
...
@@ -62,7 +62,7 @@ namespace AGVControl
...
@@ -62,7 +62,7 @@ namespace AGVControl
}
}
private
JobStep
<
ENTER_LEAVE_SHELF_STEP
>
EnterLeaveShelf
Step
=
new
JobStep
<
ENTER_LEAVE_SHELF_STEP
>(
ENTER_LEAVE_SHELF_STEP
.
NONE
);
private
JobStep
<
ENTER_LEAVE_SHELF_STEP
>
curJob
Step
=
new
JobStep
<
ENTER_LEAVE_SHELF_STEP
>(
ENTER_LEAVE_SHELF_STEP
.
NONE
);
public
override
Job
Execute
(
Agv_Info
agv
)
public
override
Job
Execute
(
Agv_Info
agv
)
{
{
...
@@ -71,7 +71,7 @@ namespace AGVControl
...
@@ -71,7 +71,7 @@ namespace AGVControl
agv
.
Msg
=
runInfo
;
agv
.
Msg
=
runInfo
;
//if (!CurTaskID.Equals(-1) && Common.mir.Get_Task_State(CurTaskID, out string st))
//if (!CurTaskID.Equals(-1) && Common.mir.Get_Task_State(CurTaskID, out string st))
// CurTaskState = st;
// CurTaskState = st;
if
(
EnterLeaveShelf
Step
.
IsStep
(
ENTER_LEAVE_SHELF_STEP
.
NONE
))
if
(
curJob
Step
.
IsStep
(
ENTER_LEAVE_SHELF_STEP
.
NONE
))
{
{
if
(
ActionType
.
Equals
(
eEnterLeaveType
.
Leave
))
if
(
ActionType
.
Equals
(
eEnterLeaveType
.
Leave
))
{
{
...
@@ -79,10 +79,10 @@ namespace AGVControl
...
@@ -79,10 +79,10 @@ namespace AGVControl
//msg = "AGV到达 " + LineName + ",并发送入料架请求[ReadyEnter]";
//msg = "AGV到达 " + LineName + ",并发送入料架请求[ReadyEnter]";
//EnterLeaveShelfStep.Msg = msg;
//EnterLeaveShelfStep.Msg = msg;
//Common.server.ReadyEnter(LineName);
//Common.server.ReadyEnter(LineName);
EnterLeaveShelf
Step
.
ToNextStep
(
ENTER_LEAVE_SHELF_STEP
.
WAIT__SHELF_IN_LINE
);
curJob
Step
.
ToNextStep
(
ENTER_LEAVE_SHELF_STEP
.
WAIT__SHELF_IN_LINE
);
runInfo
=
LineName
+
"入料架,小车链条运行"
;
runInfo
=
LineName
+
"入料架,小车链条运行"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
EnterLeaveShelf
Step
.
Msg
=
msg
;
curJob
Step
.
Msg
=
msg
;
rtn
=
Common
.
mir
.
Add_Mission_Fleet
(
agv
,
Common
.
agvMission
[
"Leave"
]);
rtn
=
Common
.
mir
.
Add_Mission_Fleet
(
agv
,
Common
.
agvMission
[
"Leave"
]);
UpdateJobTaskInfo
(
agv
.
CurTaskName
,
agv
.
CurTaskID
);
UpdateJobTaskInfo
(
agv
.
CurTaskName
,
agv
.
CurTaskID
);
}
}
...
@@ -92,57 +92,57 @@ namespace AGVControl
...
@@ -92,57 +92,57 @@ namespace AGVControl
//msg = "AGV到达 " + LineName + ",并发送出料架请求[ReadyLeave]";
//msg = "AGV到达 " + LineName + ",并发送出料架请求[ReadyLeave]";
//EnterLeaveShelfStep.Msg = msg;
//EnterLeaveShelfStep.Msg = msg;
//Common.server.ReadyLeave(LineName);
//Common.server.ReadyLeave(LineName);
EnterLeaveShelf
Step
.
ToNextStep
(
ENTER_LEAVE_SHELF_STEP
.
WAIT__SHELF_OUT_LINE
);
curJob
Step
.
ToNextStep
(
ENTER_LEAVE_SHELF_STEP
.
WAIT__SHELF_OUT_LINE
);
runInfo
=
LineName
+
"出料架,小车链条运行"
;
runInfo
=
LineName
+
"出料架,小车链条运行"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
EnterLeaveShelf
Step
.
Msg
=
msg
;
curJob
Step
.
Msg
=
msg
;
rtn
=
Common
.
mir
.
Add_Mission_Fleet
(
agv
,
Common
.
agvMission
[
"Enter"
]);
rtn
=
Common
.
mir
.
Add_Mission_Fleet
(
agv
,
Common
.
agvMission
[
"Enter"
]);
UpdateJobTaskInfo
(
agv
.
CurTaskName
,
agv
.
CurTaskID
);
UpdateJobTaskInfo
(
agv
.
CurTaskName
,
agv
.
CurTaskID
);
}
}
}
}
else
if
(
EnterLeaveShelf
Step
.
IsStep
(
ENTER_LEAVE_SHELF_STEP
.
WAIT_LINE_ReadyEnter_RESPONSE
))
else
if
(
curJob
Step
.
IsStep
(
ENTER_LEAVE_SHELF_STEP
.
WAIT_LINE_ReadyEnter_RESPONSE
))
{
{
int
id
=
Common
.
FindNode
(
LineName
);
int
id
=
Common
.
FindNode
(
LineName
);
ClientNode
node
=
Common
.
nodeInfo
[
id
];
ClientNode
node
=
Common
.
nodeInfo
[
id
];
if
(
node
.
StateEquals
(
eNodeStatus
.
MayEnter
))
if
(
node
.
StateEquals
(
eNodeStatus
.
MayEnter
))
{
{
EnterLeaveShelf
Step
.
ToNextStep
(
ENTER_LEAVE_SHELF_STEP
.
WAIT__SHELF_IN_LINE
);
curJob
Step
.
ToNextStep
(
ENTER_LEAVE_SHELF_STEP
.
WAIT__SHELF_IN_LINE
);
runInfo
=
"收到产线入料架请求[ReadyEnter]的响应, "
+
LineName
+
"入料架,小车链条运行"
;
runInfo
=
"收到产线入料架请求[ReadyEnter]的响应, "
+
LineName
+
"入料架,小车链条运行"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
EnterLeaveShelf
Step
.
Msg
=
msg
;
curJob
Step
.
Msg
=
msg
;
rtn
=
Common
.
mir
.
Add_Mission_Fleet
(
agv
,
Common
.
agvMission
[
"Leave"
]);
rtn
=
Common
.
mir
.
Add_Mission_Fleet
(
agv
,
Common
.
agvMission
[
"Leave"
]);
UpdateJobTaskInfo
(
agv
.
CurTaskName
,
agv
.
CurTaskID
);
UpdateJobTaskInfo
(
agv
.
CurTaskName
,
agv
.
CurTaskID
);
}
}
else
if
(
EnterLeaveShelf
Step
.
IsTimeOut
(
15000
,
out
TimeSpan
timeOutValue
))
else
if
(
curJob
Step
.
IsTimeOut
(
15000
,
out
TimeSpan
timeOutValue
))
{
{
EnterLeaveShelf
Step
.
ToNextStep
(
ENTER_LEAVE_SHELF_STEP
.
NONE
);
curJob
Step
.
ToNextStep
(
ENTER_LEAVE_SHELF_STEP
.
NONE
);
runInfo
=
"AGV到达 "
+
LineName
+
",15秒后重新向产线发送入料架请求[ReadyEnter]"
;
runInfo
=
"AGV到达 "
+
LineName
+
",15秒后重新向产线发送入料架请求[ReadyEnter]"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
EnterLeaveShelf
Step
.
Msg
=
msg
;
curJob
Step
.
Msg
=
msg
;
}
}
}
}
else
if
(
EnterLeaveShelf
Step
.
IsStep
(
ENTER_LEAVE_SHELF_STEP
.
WAIT_LINE_ReadyLeave_RESPONSE
))
else
if
(
curJob
Step
.
IsStep
(
ENTER_LEAVE_SHELF_STEP
.
WAIT_LINE_ReadyLeave_RESPONSE
))
{
{
int
id
=
Common
.
FindNode
(
LineName
);
int
id
=
Common
.
FindNode
(
LineName
);
ClientNode
node
=
Common
.
nodeInfo
[
id
];
ClientNode
node
=
Common
.
nodeInfo
[
id
];
if
(
node
.
StateEquals
(
eNodeStatus
.
MayLeave
))
if
(
node
.
StateEquals
(
eNodeStatus
.
MayLeave
))
{
{
EnterLeaveShelf
Step
.
ToNextStep
(
ENTER_LEAVE_SHELF_STEP
.
WAIT__SHELF_OUT_LINE
);
curJob
Step
.
ToNextStep
(
ENTER_LEAVE_SHELF_STEP
.
WAIT__SHELF_OUT_LINE
);
runInfo
=
"收到产线出料架请求[ReadyLeave]的响应, "
+
LineName
+
"出料架,小车链条运行"
;
runInfo
=
"收到产线出料架请求[ReadyLeave]的响应, "
+
LineName
+
"出料架,小车链条运行"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
EnterLeaveShelf
Step
.
Msg
=
msg
;
curJob
Step
.
Msg
=
msg
;
rtn
=
Common
.
mir
.
Add_Mission_Fleet
(
agv
,
Common
.
agvMission
[
"Enter"
]);
rtn
=
Common
.
mir
.
Add_Mission_Fleet
(
agv
,
Common
.
agvMission
[
"Enter"
]);
UpdateJobTaskInfo
(
agv
.
CurTaskName
,
agv
.
CurTaskID
);
UpdateJobTaskInfo
(
agv
.
CurTaskName
,
agv
.
CurTaskID
);
}
}
else
if
(
EnterLeaveShelf
Step
.
IsTimeOut
(
15000
,
out
TimeSpan
timeOutValue
))
else
if
(
curJob
Step
.
IsTimeOut
(
15000
,
out
TimeSpan
timeOutValue
))
{
{
EnterLeaveShelf
Step
.
ToNextStep
(
ENTER_LEAVE_SHELF_STEP
.
NONE
);
curJob
Step
.
ToNextStep
(
ENTER_LEAVE_SHELF_STEP
.
NONE
);
runInfo
=
"AGV到达 "
+
LineName
+
",15秒后重新向产线发送入料架请求[ReadyLeave]"
;
runInfo
=
"AGV到达 "
+
LineName
+
",15秒后重新向产线发送入料架请求[ReadyLeave]"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
EnterLeaveShelf
Step
.
Msg
=
msg
;
curJob
Step
.
Msg
=
msg
;
}
}
}
}
else
if
(
EnterLeaveShelf
Step
.
IsStep
(
ENTER_LEAVE_SHELF_STEP
.
WAIT__SHELF_IN_LINE
))
else
if
(
curJob
Step
.
IsStep
(
ENTER_LEAVE_SHELF_STEP
.
WAIT__SHELF_IN_LINE
))
{
{
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckEnterOrLeaveFinished
(
agv
,
"Leave"
,
CurTaskState
))
if
(
Common
.
CheckEnterOrLeaveFinished
(
agv
,
"Leave"
,
CurTaskState
))
...
@@ -151,12 +151,12 @@ namespace AGVControl
...
@@ -151,12 +151,12 @@ namespace AGVControl
//EnterLeaveShelfStep.ToNextStep(ENTER_LEAVE_SHELF_STEP.END);
//EnterLeaveShelfStep.ToNextStep(ENTER_LEAVE_SHELF_STEP.END);
runInfo
=
"料架进入"
+
LineName
+
"完成 ["
+
RFID
+
"]"
;
runInfo
=
"料架进入"
+
LineName
+
"完成 ["
+
RFID
+
"]"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
EnterLeaveShelf
Step
.
Msg
=
msg
;
curJob
Step
.
Msg
=
msg
;
agv
.
RFID
=
""
;
agv
.
RFID
=
""
;
return
new
EmptyAGVBackJob
(
LineName
);
return
new
EmptyAGVBackJob
(
LineName
);
}
}
else
if
(
EnterLeaveShelf
Step
.
IsTimeOut
(
60000
,
out
TimeSpan
timeOutValue
))
else
if
(
curJob
Step
.
IsTimeOut
(
60000
,
out
TimeSpan
timeOutValue
))
{
{
//链条停止
//链条停止
runInfo
=
"料架在["
+
LineName
+
"]离开小车超时["
+
timeOutValue
.
ToString
(
"f1"
)
+
"秒],请检查料架离开小车的情况"
;
runInfo
=
"料架在["
+
LineName
+
"]离开小车超时["
+
timeOutValue
.
ToString
(
"f1"
)
+
"秒],请检查料架离开小车的情况"
;
...
@@ -165,7 +165,7 @@ namespace AGVControl
...
@@ -165,7 +165,7 @@ namespace AGVControl
}
}
}
}
else
if
(
EnterLeaveShelf
Step
.
IsStep
(
ENTER_LEAVE_SHELF_STEP
.
WAIT__SHELF_OUT_LINE
))
else
if
(
curJob
Step
.
IsStep
(
ENTER_LEAVE_SHELF_STEP
.
WAIT__SHELF_OUT_LINE
))
{
{
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckEnterOrLeaveFinished
(
agv
,
"Enter"
,
CurTaskState
))
if
(
Common
.
CheckEnterOrLeaveFinished
(
agv
,
"Enter"
,
CurTaskState
))
...
@@ -174,11 +174,11 @@ namespace AGVControl
...
@@ -174,11 +174,11 @@ namespace AGVControl
//EnterLeaveShelfStep.ToNextStep(ENTER_LEAVE_SHELF_STEP.END);
//EnterLeaveShelfStep.ToNextStep(ENTER_LEAVE_SHELF_STEP.END);
runInfo
=
"料架在"
+
LineName
+
"出去完成 ["
+
RFID
+
"]"
;
runInfo
=
"料架在"
+
LineName
+
"出去完成 ["
+
RFID
+
"]"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
EnterLeaveShelf
Step
.
Msg
=
msg
;
curJob
Step
.
Msg
=
msg
;
Common
.
missionManager
.
DelMission
(
LineName
,
RFID
);
Common
.
missionManager
.
DelMission
(
LineName
,
RFID
);
return
new
EmptyShelfBackJob
(
LineName
,
eShelfType
.
BigShelf
);
return
new
EmptyShelfBackJob
(
LineName
,
eShelfType
.
BigShelf
);
}
}
else
if
(
EnterLeaveShelf
Step
.
IsTimeOut
(
60000
,
out
TimeSpan
timeOutValue
))
else
if
(
curJob
Step
.
IsTimeOut
(
60000
,
out
TimeSpan
timeOutValue
))
{
{
//链条停止
//链条停止
runInfo
=
"料架在["
+
LineName
+
"]进入小车超时["
+
timeOutValue
.
ToString
(
"f1"
)
+
"秒],请检查料架进入小车的情况"
;
runInfo
=
"料架在["
+
LineName
+
"]进入小车超时["
+
timeOutValue
.
ToString
(
"f1"
)
+
"秒],请检查料架进入小车的情况"
;
...
@@ -187,7 +187,7 @@ namespace AGVControl
...
@@ -187,7 +187,7 @@ namespace AGVControl
}
}
}
}
else
if
(
EnterLeaveShelf
Step
.
IsStep
(
ENTER_LEAVE_SHELF_STEP
.
END
))
else
if
(
curJob
Step
.
IsStep
(
ENTER_LEAVE_SHELF_STEP
.
END
))
{
{
}
}
...
...
AGVControl-ProductionLine/bean/job/GoEmptyShelfLineJob.cs
查看文件 @
f03add5
...
@@ -57,6 +57,7 @@ namespace AGVControl
...
@@ -57,6 +57,7 @@ namespace AGVControl
string
msg
=
agv
.
Name
+
" "
;
string
msg
=
agv
.
Name
+
" "
;
bool
rtn
=
false
;
bool
rtn
=
false
;
agv
.
Msg
=
runInfo
;
agv
.
Msg
=
runInfo
;
//runInfo = "回收空料架任务:";
//runInfo = "回收空料架任务:";
int
nodeIdx
=
Common
.
FindNode
(
EmptyShelfPlace
);
int
nodeIdx
=
Common
.
FindNode
(
EmptyShelfPlace
);
if
(
curJobStep
.
IsStep
(
TAKE_EMPTY_STEP
.
NONE
))
if
(
curJobStep
.
IsStep
(
TAKE_EMPTY_STEP
.
NONE
))
...
@@ -185,6 +186,7 @@ namespace AGVControl
...
@@ -185,6 +186,7 @@ namespace AGVControl
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorAirOut
,
CurTaskState
))
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorAirOut
,
CurTaskState
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
DoorAirOut
);
//4C风淋门内->风淋门外,到达风淋门外
//4C风淋门内->风淋门外,到达风淋门外
if
(
agvPlae
.
StartsWith
(
SettingString
.
C4_Name_Prefix
)
&&
EmptyShelfPlace
.
StartsWith
(
SettingString
.
C4_Name_Prefix
))
//4C->4C
if
(
agvPlae
.
StartsWith
(
SettingString
.
C4_Name_Prefix
)
&&
EmptyShelfPlace
.
StartsWith
(
SettingString
.
C4_Name_Prefix
))
//4C->4C
{
{
...
@@ -231,6 +233,7 @@ namespace AGVControl
...
@@ -231,6 +233,7 @@ namespace AGVControl
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorAirIn
,
CurTaskState
))
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorAirIn
,
CurTaskState
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
DoorAirIn
);
//4C风淋门外->风淋门内
//4C风淋门外->风淋门内
curJobStep
.
ToNextStep
(
TAKE_EMPTY_STEP
.
ASSIGN_AGV_TASK
);
curJobStep
.
ToNextStep
(
TAKE_EMPTY_STEP
.
ASSIGN_AGV_TASK
);
runInfo
=
"到达风淋门内,开始任务["
+
agvPlae
+
"->"
+
EmptyShelfPlace
+
"]"
+
"[RFID="
+
RFID
+
"]"
;
runInfo
=
"到达风淋门内,开始任务["
+
agvPlae
+
"->"
+
EmptyShelfPlace
+
"]"
+
"[RFID="
+
RFID
+
"]"
;
...
@@ -243,6 +246,7 @@ namespace AGVControl
...
@@ -243,6 +246,7 @@ namespace AGVControl
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorDToC
,
CurTaskState
))
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorDToC
,
CurTaskState
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
DoorDToC
);
if
(
Common
.
Check4CTarget
(
agv
,
EmptyShelfPlace
))
//被占用
if
(
Common
.
Check4CTarget
(
agv
,
EmptyShelfPlace
))
//被占用
{
{
curJobStep
.
ToNextStep
(
TAKE_EMPTY_STEP
.
WAIT_REACH_TEMP_PLACE
);
curJobStep
.
ToNextStep
(
TAKE_EMPTY_STEP
.
WAIT_REACH_TEMP_PLACE
);
...
@@ -278,6 +282,7 @@ namespace AGVControl
...
@@ -278,6 +282,7 @@ namespace AGVControl
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
C4_STANDBY1
,
CurTaskState
)
||
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
C4_STANDBY2
,
CurTaskState
))
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
C4_STANDBY1
,
CurTaskState
)
||
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
C4_STANDBY2
,
CurTaskState
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
agv
.
Place
);
if
(!
Common
.
Check4CTarget
(
agv
,
EmptyShelfPlace
))
//未占用
if
(!
Common
.
Check4CTarget
(
agv
,
EmptyShelfPlace
))
//未占用
{
{
curJobStep
.
ToNextStep
(
TAKE_EMPTY_STEP
.
ASSIGN_AGV_TASK
);
curJobStep
.
ToNextStep
(
TAKE_EMPTY_STEP
.
ASSIGN_AGV_TASK
);
...
@@ -293,6 +298,7 @@ namespace AGVControl
...
@@ -293,6 +298,7 @@ namespace AGVControl
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorCToD
,
CurTaskState
))
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorCToD
,
CurTaskState
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
EmptyShelfPlace
);
curJobStep
.
ToNextStep
(
TAKE_EMPTY_STEP
.
ASSIGN_AGV_TASK
);
curJobStep
.
ToNextStep
(
TAKE_EMPTY_STEP
.
ASSIGN_AGV_TASK
);
runInfo
=
"开始执行回收空料架任务["
+
agvPlae
+
"->"
+
EmptyShelfPlace
+
"]"
+
"[RFID="
+
RFID
+
"]"
;
runInfo
=
"开始执行回收空料架任务["
+
agvPlae
+
"->"
+
EmptyShelfPlace
+
"]"
+
"[RFID="
+
RFID
+
"]"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -301,7 +307,7 @@ namespace AGVControl
...
@@ -301,7 +307,7 @@ namespace AGVControl
}
}
else
if
(
curJobStep
.
IsStep
(
TAKE_EMPTY_STEP
.
ASSIGN_AGV_TASK
))
else
if
(
curJobStep
.
IsStep
(
TAKE_EMPTY_STEP
.
ASSIGN_AGV_TASK
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
EmptyShelfPlace
);
if
(
nodeIdx
>
-
1
)
if
(
nodeIdx
>
-
1
)
{
{
curJobStep
.
ToNextStep
(
TAKE_EMPTY_STEP
.
WAIT_AGV_START_TASK
);
curJobStep
.
ToNextStep
(
TAKE_EMPTY_STEP
.
WAIT_AGV_START_TASK
);
...
@@ -323,6 +329,7 @@ namespace AGVControl
...
@@ -323,6 +329,7 @@ namespace AGVControl
{
{
if
(
agv
.
CurTaskState
.
Equals
(
SettingString
.
Executing
))
if
(
agv
.
CurTaskState
.
Equals
(
SettingString
.
Executing
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
EmptyShelfPlace
);
curJobStep
.
ToNextStep
(
TAKE_EMPTY_STEP
.
WAIT_REACH_PLACE
);
curJobStep
.
ToNextStep
(
TAKE_EMPTY_STEP
.
WAIT_REACH_PLACE
);
runInfo
=
"AGV开始向目的地["
+
EmptyShelfPlace
+
"]移动"
+
"[RFID="
+
RFID
+
"]"
;
runInfo
=
"AGV开始向目的地["
+
EmptyShelfPlace
+
"]移动"
+
"[RFID="
+
RFID
+
"]"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -343,6 +350,7 @@ namespace AGVControl
...
@@ -343,6 +350,7 @@ namespace AGVControl
//}
//}
//else
//else
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
EmptyShelfPlace
);
curJobStep
.
ToNextStep
(
TAKE_EMPTY_STEP
.
WAIT_LINE_RESPONSE
);
curJobStep
.
ToNextStep
(
TAKE_EMPTY_STEP
.
WAIT_LINE_RESPONSE
);
runInfo
=
"AGV到达 "
+
EmptyShelfPlace
+
" 向产线发送出料架请求[ReadyLeave]"
+
"[RFID="
+
RFID
+
"]"
;
runInfo
=
"AGV到达 "
+
EmptyShelfPlace
+
" 向产线发送出料架请求[ReadyLeave]"
+
"[RFID="
+
RFID
+
"]"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -377,6 +385,7 @@ namespace AGVControl
...
@@ -377,6 +385,7 @@ namespace AGVControl
agv
.
HasError
=
false
;
agv
.
HasError
=
false
;
if
(!
agv
.
CurTaskName
.
Equals
(
"Enter"
))
if
(!
agv
.
CurTaskName
.
Equals
(
"Enter"
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
EmptyShelfPlace
);
curJobStep
.
ToNextStep
(
TAKE_EMPTY_STEP
.
WAIT_TAKE_EMPTY_SHELF
);
curJobStep
.
ToNextStep
(
TAKE_EMPTY_STEP
.
WAIT_TAKE_EMPTY_SHELF
);
runInfo
=
"收到产线出料请求[ReadyLeave]的响应 "
+
EmptyShelfPlace
+
"出料架,小车链条运行"
+
"[RFID="
+
RFID
+
"]"
;
runInfo
=
"收到产线出料请求[ReadyLeave]的响应 "
+
EmptyShelfPlace
+
"出料架,小车链条运行"
+
"[RFID="
+
RFID
+
"]"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -399,6 +408,7 @@ namespace AGVControl
...
@@ -399,6 +408,7 @@ namespace AGVControl
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckEnterOrLeaveFinished
(
agv
,
"Enter"
,
CurTaskState
))
if
(
Common
.
CheckEnterOrLeaveFinished
(
agv
,
"Enter"
,
CurTaskState
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
EmptyShelfPlace
);
agv
.
HasError
=
false
;
agv
.
HasError
=
false
;
ClientNode
node
=
Common
.
nodeInfo
[
nodeIdx
];
ClientNode
node
=
Common
.
nodeInfo
[
nodeIdx
];
//回收空料架数量减少1
//回收空料架数量减少1
...
@@ -408,7 +418,6 @@ namespace AGVControl
...
@@ -408,7 +418,6 @@ namespace AGVControl
runInfo
=
"空料架在["
+
EmptyShelfPlace
+
"]进入小车完成"
+
"[RFID="
+
RFID
+
"]"
;
runInfo
=
"空料架在["
+
EmptyShelfPlace
+
"]进入小车完成"
+
"[RFID="
+
RFID
+
"]"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
curJobStep
.
Msg
=
msg
;
curJobStep
.
Msg
=
msg
;
RecordRunLog
(
agv
,
curJobStep
.
CurStep
(),
runInfo
,
agv
.
Place
);
//4DfeederOut默认大料架
//4DfeederOut默认大料架
//if (agv.Place.Equals(SettingString.D4FeederOut))
//if (agv.Place.Equals(SettingString.D4FeederOut))
//return new EmptyShelfBackJob(EmptyShelfPlace, eShelfType.BigShelf);
//return new EmptyShelfBackJob(EmptyShelfPlace, eShelfType.BigShelf);
...
@@ -436,7 +445,6 @@ namespace AGVControl
...
@@ -436,7 +445,6 @@ namespace AGVControl
{
{
}
}
RecordRunLog
(
agv
,
curJobStep
.
CurStep
(),
runInfo
,
agv
.
Place
);
return
this
;
return
this
;
}
}
...
...
AGVControl-ProductionLine/bean/job/GoFullShelfStationJob.cs
查看文件 @
f03add5
...
@@ -75,6 +75,7 @@ namespace AGVControl
...
@@ -75,6 +75,7 @@ namespace AGVControl
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
agvMission
[
"CheckShelf"
].
Equals
(
agv
.
CurTaskGUID
)
&&
agv
.
CurTaskState
.
Equals
(
SettingString
.
Done
))
if
(
Common
.
agvMission
[
"CheckShelf"
].
Equals
(
agv
.
CurTaskGUID
)
&&
agv
.
CurTaskState
.
Equals
(
SettingString
.
Done
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
FullShelfStationPlace
);
rtn
=
Common
.
mir
.
Get_IO_Status
(
agv
,
out
bool
[]
input
,
out
bool
[]
output
);
rtn
=
Common
.
mir
.
Get_IO_Status
(
agv
,
out
bool
[]
input
,
out
bool
[]
output
);
if
(
rtn
)
if
(
rtn
)
{
{
...
@@ -171,6 +172,7 @@ namespace AGVControl
...
@@ -171,6 +172,7 @@ namespace AGVControl
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorAirOut
,
CurTaskState
))
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorAirOut
,
CurTaskState
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
FullShelfStationPlace
);
curJobStep
.
ToNextStep
(
GO_FULL_SHELF_STATION_STEP
.
WAIT_AGV_REACH_DOOR
);
curJobStep
.
ToNextStep
(
GO_FULL_SHELF_STATION_STEP
.
WAIT_AGV_REACH_DOOR
);
runInfo
=
"过风淋门,向4D门运行,再到双层线入料口"
+
FullShelfStationPlace
;
runInfo
=
"过风淋门,向4D门运行,再到双层线入料口"
+
FullShelfStationPlace
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -185,6 +187,7 @@ namespace AGVControl
...
@@ -185,6 +187,7 @@ namespace AGVControl
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorCToD
,
CurTaskState
))
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorCToD
,
CurTaskState
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
FullShelfStationPlace
);
curJobStep
.
ToNextStep
(
GO_FULL_SHELF_STATION_STEP
.
WAIT_AGV_REACH_A6
);
curJobStep
.
ToNextStep
(
GO_FULL_SHELF_STATION_STEP
.
WAIT_AGV_REACH_A6
);
runInfo
=
"到达4D门,准备运动到双层线入料口"
+
FullShelfStationPlace
;
runInfo
=
"到达4D门,准备运动到双层线入料口"
+
FullShelfStationPlace
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -199,6 +202,7 @@ namespace AGVControl
...
@@ -199,6 +202,7 @@ namespace AGVControl
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckTaskFinished
(
agv
,
FullShelfStationPlace
,
CurTaskState
))
if
(
Common
.
CheckTaskFinished
(
agv
,
FullShelfStationPlace
,
CurTaskState
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
FullShelfStationPlace
);
ClientNode
node
=
Common
.
nodeInfo
.
Find
(
s
=>
s
.
Name
.
Equals
(
SettingString
.
A6
)
ClientNode
node
=
Common
.
nodeInfo
.
Find
(
s
=>
s
.
Name
.
Equals
(
SettingString
.
A6
)
&&
(
s
.
StateEquals
(
eNodeStatus
.
NeedLeave
)
||
s
.
StateEquals
(
eNodeStatus
.
NeedEnterLeave
))
&&
!
s
.
RFID
.
Equals
(
"00"
));
&&
(
s
.
StateEquals
(
eNodeStatus
.
NeedLeave
)
||
s
.
StateEquals
(
eNodeStatus
.
NeedEnterLeave
))
&&
!
s
.
RFID
.
Equals
(
"00"
));
if
(
node
!=
null
&&
node
.
Name
.
Equals
(
SettingString
.
A6
))
if
(
node
!=
null
&&
node
.
Name
.
Equals
(
SettingString
.
A6
))
...
@@ -251,6 +255,7 @@ namespace AGVControl
...
@@ -251,6 +255,7 @@ namespace AGVControl
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
Standby
,
CurTaskState
))
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
Standby
,
CurTaskState
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
SettingString
.
Standby
);
curJobStep
.
ToNextStep
(
GO_FULL_SHELF_STATION_STEP
.
END
);
curJobStep
.
ToNextStep
(
GO_FULL_SHELF_STATION_STEP
.
END
);
runInfo
=
"到达待机位"
;
runInfo
=
"到达待机位"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -272,6 +277,7 @@ namespace AGVControl
...
@@ -272,6 +277,7 @@ namespace AGVControl
{
{
if
(!
agv
.
CurTaskName
.
Equals
(
"Enter"
))
if
(!
agv
.
CurTaskName
.
Equals
(
"Enter"
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
FullShelfStationPlace
);
curJobStep
.
ToNextStep
(
GO_FULL_SHELF_STATION_STEP
.
WAIT__FULL_SHELF_IN_AGV
);
curJobStep
.
ToNextStep
(
GO_FULL_SHELF_STATION_STEP
.
WAIT__FULL_SHELF_IN_AGV
);
runInfo
=
"收到双层线出料架请求[ReadyLeave]的响应 "
+
FullShelfStationPlace
+
"出料架,小车链条运行"
;
runInfo
=
"收到双层线出料架请求[ReadyLeave]的响应 "
+
FullShelfStationPlace
+
"出料架,小车链条运行"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -294,6 +300,7 @@ namespace AGVControl
...
@@ -294,6 +300,7 @@ namespace AGVControl
else
if
(
curJobStep
.
IsStep
(
GO_FULL_SHELF_STATION_STEP
.
WAIT__FULL_SHELF_IN_AGV
))
else
if
(
curJobStep
.
IsStep
(
GO_FULL_SHELF_STATION_STEP
.
WAIT__FULL_SHELF_IN_AGV
))
{
{
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
FullShelfStationPlace
);
if
(
Common
.
CheckEnterOrLeaveFinished
(
agv
,
"Enter"
,
CurTaskState
))
if
(
Common
.
CheckEnterOrLeaveFinished
(
agv
,
"Enter"
,
CurTaskState
))
{
{
agv
.
HasError
=
false
;
agv
.
HasError
=
false
;
...
@@ -301,7 +308,7 @@ namespace AGVControl
...
@@ -301,7 +308,7 @@ namespace AGVControl
runInfo
=
FullShelfStationPlace
+
"满料架进入小车完成"
;
runInfo
=
FullShelfStationPlace
+
"满料架进入小车完成"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
curJobStep
.
Msg
=
msg
;
curJobStep
.
Msg
=
msg
;
RecordRunLog
(
agv
,
curJobStep
.
CurStep
(),
runInfo
,
agv
.
Place
);
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
FullShelfStation
Place
);
return
new
SendFullShelfToLineJob
(
FullShelfDestInfo
);
return
new
SendFullShelfToLineJob
(
FullShelfDestInfo
);
}
}
else
if
(
curJobStep
.
IsTimeOut
(
60000
,
out
TimeSpan
timeOutValue
))
else
if
(
curJobStep
.
IsTimeOut
(
60000
,
out
TimeSpan
timeOutValue
))
...
@@ -315,7 +322,6 @@ namespace AGVControl
...
@@ -315,7 +322,6 @@ namespace AGVControl
}
}
}
}
RecordRunLog
(
agv
,
curJobStep
.
CurStep
(),
runInfo
,
agv
.
Place
);
return
this
;
return
this
;
}
}
...
...
AGVControl-ProductionLine/bean/job/SendFullShelfToLineJob.cs
查看文件 @
f03add5
...
@@ -65,6 +65,7 @@ namespace AGVControl
...
@@ -65,6 +65,7 @@ namespace AGVControl
// CurTaskState = st;
// CurTaskState = st;
if
(
curJobStep
.
IsStep
(
SEND_FULL_SHELF_STEP
.
NONE
))
if
(
curJobStep
.
IsStep
(
SEND_FULL_SHELF_STEP
.
NONE
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
FullShelfPlace
);
AGVManager
.
AgvRemoveRfid
(
RFID
);
AGVManager
.
AgvRemoveRfid
(
RFID
);
if
(
FullShelfPlace
.
StartsWith
(
SettingString
.
C4_Name_Prefix
))
if
(
FullShelfPlace
.
StartsWith
(
SettingString
.
C4_Name_Prefix
))
{
{
...
@@ -91,6 +92,7 @@ namespace AGVControl
...
@@ -91,6 +92,7 @@ namespace AGVControl
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorDToC
,
CurTaskState
))
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorDToC
,
CurTaskState
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
FullShelfPlace
);
if
(
Common
.
Check4CTarget
(
agv
,
FullShelfPlace
))
//被占用
if
(
Common
.
Check4CTarget
(
agv
,
FullShelfPlace
))
//被占用
{
{
curJobStep
.
ToNextStep
(
SEND_FULL_SHELF_STEP
.
WAIT_REACH_TEMP_PLACE
);
curJobStep
.
ToNextStep
(
SEND_FULL_SHELF_STEP
.
WAIT_REACH_TEMP_PLACE
);
...
@@ -129,6 +131,7 @@ namespace AGVControl
...
@@ -129,6 +131,7 @@ namespace AGVControl
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorAirIn
,
CurTaskState
))
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
DoorAirIn
,
CurTaskState
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
FullShelfPlace
);
curJobStep
.
ToNextStep
(
SEND_FULL_SHELF_STEP
.
WAIT_AGV_REACH_LINE
);
curJobStep
.
ToNextStep
(
SEND_FULL_SHELF_STEP
.
WAIT_AGV_REACH_LINE
);
runInfo
=
"送往["
+
FullShelfPlace
+
"][RFID="
+
RFID
+
"]"
;
runInfo
=
"送往["
+
FullShelfPlace
+
"][RFID="
+
RFID
+
"]"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -142,6 +145,7 @@ namespace AGVControl
...
@@ -142,6 +145,7 @@ namespace AGVControl
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
C4_STANDBY1
,
CurTaskState
)
||
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
C4_STANDBY2
,
CurTaskState
))
if
(
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
C4_STANDBY1
,
CurTaskState
)
||
Common
.
CheckTaskFinished
(
agv
,
SettingString
.
C4_STANDBY2
,
CurTaskState
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
FullShelfPlace
);
if
(!
Common
.
Check4CTarget
(
agv
,
FullShelfPlace
))
//未占用
if
(!
Common
.
Check4CTarget
(
agv
,
FullShelfPlace
))
//未占用
{
{
if
(
Common
.
CheckIsInAirDoor
(
FullShelfPlace
))
if
(
Common
.
CheckIsInAirDoor
(
FullShelfPlace
))
...
@@ -172,6 +176,7 @@ namespace AGVControl
...
@@ -172,6 +176,7 @@ namespace AGVControl
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
if
(
Common
.
CheckTaskFinished
(
agv
,
FullShelfPlace
,
CurTaskState
))
if
(
Common
.
CheckTaskFinished
(
agv
,
FullShelfPlace
,
CurTaskState
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
FullShelfPlace
);
//if (FullShelfPlace.Equals(SettingString.C4FeederIn))
//if (FullShelfPlace.Equals(SettingString.C4FeederIn))
//{
//{
// runInfo = "AGV到达 " + FullShelfPlace + "完成";
// runInfo = "AGV到达 " + FullShelfPlace + "完成";
...
@@ -195,6 +200,7 @@ namespace AGVControl
...
@@ -195,6 +200,7 @@ namespace AGVControl
runInfo
=
"AGV到达 "
+
FullShelfPlace
+
",并等待大料架["
+
RFID
+
"]库位转移"
;
runInfo
=
"AGV到达 "
+
FullShelfPlace
+
",并等待大料架["
+
RFID
+
"]库位转移"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
curJobStep
.
Msg
=
msg
;
curJobStep
.
Msg
=
msg
;
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
FullShelfPlace
);
}
}
else
else
{
{
...
@@ -218,7 +224,7 @@ namespace AGVControl
...
@@ -218,7 +224,7 @@ namespace AGVControl
agv
.
BoxDestInfo
=
""
;
agv
.
BoxDestInfo
=
""
;
msg
+=
runInfo
;
msg
+=
runInfo
;
curJobStep
.
Msg
=
msg
;
curJobStep
.
Msg
=
msg
;
RecordRunLog
(
agv
,
curJobStep
.
CurStep
(),
runInfo
,
agv
.
Place
);
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
FullShelf
Place
);
return
new
EmptyShelfBackJob
(
FullShelfPlace
,
eShelfType
.
BigShelf
);
return
new
EmptyShelfBackJob
(
FullShelfPlace
,
eShelfType
.
BigShelf
);
}
}
}
}
...
@@ -233,6 +239,7 @@ namespace AGVControl
...
@@ -233,6 +239,7 @@ namespace AGVControl
agv
.
HasError
=
false
;
agv
.
HasError
=
false
;
if
(!
agv
.
CurTaskName
.
Equals
(
"Leave"
))
if
(!
agv
.
CurTaskName
.
Equals
(
"Leave"
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
FullShelfPlace
);
curJobStep
.
ToNextStep
(
SEND_FULL_SHELF_STEP
.
WAIT__SHELF_IN_LINE
);
curJobStep
.
ToNextStep
(
SEND_FULL_SHELF_STEP
.
WAIT__SHELF_IN_LINE
);
runInfo
=
"收到产线入料架请求[ReadyEnter]的响应 "
+
FullShelfPlace
+
"入料架,小车链条运行"
;
runInfo
=
"收到产线入料架请求[ReadyEnter]的响应 "
+
FullShelfPlace
+
"入料架,小车链条运行"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -251,11 +258,12 @@ namespace AGVControl
...
@@ -251,11 +258,12 @@ namespace AGVControl
agv
.
RFID
=
""
;
agv
.
RFID
=
""
;
agv
.
BoxDestInfo
=
""
;
agv
.
BoxDestInfo
=
""
;
AGVManager
.
UpdateStatus
(
RFID
,
FullShelfPlace
);
AGVManager
.
UpdateStatus
(
RFID
,
FullShelfPlace
);
RecordRunLog
(
agv
,
curJobStep
.
CurStep
(),
runInfo
,
agv
.
Place
);
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
FullShelf
Place
);
return
new
EmptyAGVBackJob
(
FullShelfPlace
);
return
new
EmptyAGVBackJob
(
FullShelfPlace
);
}
}
else
if
(
curJobStep
.
IsTimeOut
(
15000
,
out
TimeSpan
timeOutValue
))
else
if
(
curJobStep
.
IsTimeOut
(
15000
,
out
TimeSpan
timeOutValue
))
{
{
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
FullShelfPlace
);
curJobStep
.
ToNextStep
(
SEND_FULL_SHELF_STEP
.
WAIT_AGV_REACH_LINE
);
curJobStep
.
ToNextStep
(
SEND_FULL_SHELF_STEP
.
WAIT_AGV_REACH_LINE
);
runInfo
=
"AGV到达 "
+
FullShelfPlace
+
",15秒后重新向产线发送入料架请求[ReadyEnter]"
;
runInfo
=
"AGV到达 "
+
FullShelfPlace
+
",15秒后重新向产线发送入料架请求[ReadyEnter]"
;
msg
+=
runInfo
;
msg
+=
runInfo
;
...
@@ -267,6 +275,7 @@ namespace AGVControl
...
@@ -267,6 +275,7 @@ namespace AGVControl
else
if
(
curJobStep
.
IsStep
(
SEND_FULL_SHELF_STEP
.
WAIT__SHELF_IN_LINE
))
else
if
(
curJobStep
.
IsStep
(
SEND_FULL_SHELF_STEP
.
WAIT__SHELF_IN_LINE
))
{
{
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
CurTaskState
=
Common
.
GetTakJobState
(
CurTaskID
);
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
FullShelfPlace
);
if
(
Common
.
CheckEnterOrLeaveFinished
(
agv
,
"Leave"
,
CurTaskState
))
if
(
Common
.
CheckEnterOrLeaveFinished
(
agv
,
"Leave"
,
CurTaskState
))
{
{
agv
.
HasError
=
false
;
agv
.
HasError
=
false
;
...
@@ -276,7 +285,7 @@ namespace AGVControl
...
@@ -276,7 +285,7 @@ namespace AGVControl
agv
.
RFID
=
""
;
agv
.
RFID
=
""
;
agv
.
BoxDestInfo
=
""
;
agv
.
BoxDestInfo
=
""
;
AGVManager
.
UpdateStatus
(
RFID
,
FullShelfPlace
);
AGVManager
.
UpdateStatus
(
RFID
,
FullShelfPlace
);
RecordRunLog
(
agv
,
curJobStep
.
CurStep
(),
runInfo
,
agv
.
Place
);
curJobStep
.
RecordRunLog
(
agv
,
JobName
,
runInfo
,
FullShelf
Place
);
return
new
EmptyAGVBackJob
(
FullShelfPlace
);
return
new
EmptyAGVBackJob
(
FullShelfPlace
);
}
}
else
if
(
curJobStep
.
IsTimeOut
(
60000
,
out
TimeSpan
timeOutValue
))
else
if
(
curJobStep
.
IsTimeOut
(
60000
,
out
TimeSpan
timeOutValue
))
...
@@ -292,7 +301,6 @@ namespace AGVControl
...
@@ -292,7 +301,6 @@ namespace AGVControl
//{
//{
//}
//}
RecordRunLog
(
agv
,
curJobStep
.
CurStep
(),
runInfo
,
agv
.
Place
);
return
this
;
return
this
;
}
}
...
...
AGVControl-ProductionLine/bin/Debug/AGVControl-ProductionLine.exe
查看文件 @
f03add5
此文件类型无法预览
AGVControl-ProductionLine/bin/Debug/AGVControl-ProductionLine.pdb
查看文件 @
f03add5
此文件类型无法预览
AGVControl-ProductionLine/obj/Debug/AGVControl-ProductionLine.exe
查看文件 @
f03add5
此文件类型无法预览
AGVControl-ProductionLine/obj/Debug/AGVControl-ProductionLine.pdb
查看文件 @
f03add5
此文件类型无法预览
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论