Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
顾剑亮
/
AGVControl-Qisda-ProductionLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 17bd5b24
由
张东亮
编写于
2021-01-21 16:25:29 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
双层线回收料架逻辑修改
1 个父辈
aeef65a1
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
90 行增加
和
65 行删除
.vs/AGVControl-ProductionLine/v16/.suo
AGVControl-ProductionLine/BLL/Common.cs
AGVControl-ProductionLine/FrmMain.cs
AGVControl-ProductionLine/Program.cs
AGVControl-ProductionLine/bin/Debug/AGVControl-ProductionLine.exe
AGVControl-ProductionLine/bin/Debug/AGVControl-ProductionLine.pdb
AGVControl-ProductionLine/bin/Debug/Config/UnlockInfo.json
AGVControl-ProductionLine/bin/Debug/Config/tempData.ini
AGVControl-ProductionLine/bin/Debug/logs/AgvServer.log
AGVControl-ProductionLine/bin/Debug/logs/AgvServer.log2020-12-25
AGVControl-ProductionLine/bin/Debug/logs/UnlockInfo.log
AGVControl-ProductionLine/obj/Debug/AGVControl-ProductionLine.exe
AGVControl-ProductionLine/obj/Debug/AGVControl-ProductionLine.pdb
.vs/AGVControl-ProductionLine/v16/.suo
查看文件 @
17bd5b2
此文件类型无法预览
AGVControl-ProductionLine/BLL/Common.cs
查看文件 @
17bd5b2
...
...
@@ -640,13 +640,6 @@ namespace AGVControl
//4C车间寻找
if
(
SettingString
.
C4_AGV_IPs
.
Contains
(
agv
.
IP
))
{
string
nearNodeName
=
CalculateNearNode
(
agv
,
SettingString
.
C4_Name_Prefix
);
if
(!
nearNodeName
.
Equals
(
""
))
{
nodeName
=
nearNodeName
;
Common
.
log
.
Debug
(
agv
.
Name
+
" 双层线需要小料架,准备去4C-"
+
nearNodeName
);
return
true
;
}
idx
=
nodeInfo
.
FindIndex
(
s
=>
s
.
EmptyShelfCnt
>
0
&&
s
.
Name
.
Equals
(
SettingString
.
C4FeederOut
)
&&
s
.
RFID
.
StartsWith
(
"D"
)
&&
s
.
IsUse
);
if
(
idx
>
-
1
)
{
...
...
@@ -659,18 +652,18 @@ namespace AGVControl
}
}
}
//4D车间寻找
if
(!
SettingString
.
C4_AGV_IPs
.
Contains
(
agv
.
IP
))
{
string
nearNodeName
=
CalculateNearNode
(
agv
,
SettingString
.
D4_Name_Prefix
);
string
nearNodeName
=
CalculateNearNode
(
agv
,
SettingString
.
C4_Name_Prefix
);
if
(!
nearNodeName
.
Equals
(
""
))
{
nodeName
=
nearNodeName
;
Common
.
log
.
Debug
(
agv
.
Name
+
" 双层线需要小料架,准备去4
D
-"
+
nearNodeName
);
Common
.
log
.
Debug
(
agv
.
Name
+
" 双层线需要小料架,准备去4
C
-"
+
nearNodeName
);
return
true
;
}
}
//4D车间寻找
if
(!
SettingString
.
C4_AGV_IPs
.
Contains
(
agv
.
IP
))
{
idx
=
nodeInfo
.
FindIndex
(
s
=>
s
.
EmptyShelfCnt
>
0
&&
s
.
Name
.
Equals
(
SettingString
.
D4FeederOut
)
&&
s
.
RFID
.
StartsWith
(
"D"
)
&&
s
.
IsUse
);
if
(
idx
>
-
1
)
{
...
...
@@ -678,6 +671,15 @@ namespace AGVControl
Common
.
log
.
Debug
(
agv
.
Name
+
" 双层线左侧需要小料架,准备去4D-"
+
nodeName
);
return
true
;
}
string
nearNodeName
=
CalculateNearNode
(
agv
,
SettingString
.
D4_Name_Prefix
);
if
(!
nearNodeName
.
Equals
(
""
))
{
nodeName
=
nearNodeName
;
Common
.
log
.
Debug
(
agv
.
Name
+
" 双层线需要小料架,准备去4D-"
+
nearNodeName
);
return
true
;
}
}
}
else
if
(
CheckA5State
(
agv
,
eShelfType
.
BigShelf
,
out
string
lineNodeName3
))
...
...
@@ -692,7 +694,7 @@ namespace AGVControl
if
(
idx1
==
-
1
)
{
nodeName
=
nodeInfo
[
idx
].
Name
;
Common
.
log
.
Debug
(
agv
.
Name
+
" 双层线左侧需要
小
料架,准备去4C-"
+
nodeName
);
Common
.
log
.
Debug
(
agv
.
Name
+
" 双层线左侧需要
大
料架,准备去4C-"
+
nodeName
);
return
true
;
}
...
...
@@ -711,7 +713,8 @@ namespace AGVControl
}
}
}
else
if
(
CheckA6State
(
agv
,
eShelfType
.
BigShelf
,
out
string
lineNodeName1
))
if
(
CheckA6State
(
agv
,
eShelfType
.
BigShelf
,
out
string
lineNodeName1
))
{
//4C车间备料区寻找
if
(
SettingString
.
C4_AGV_IPs
.
Contains
(
agv
.
IP
))
...
...
@@ -726,10 +729,16 @@ namespace AGVControl
Common
.
log
.
Debug
(
agv
.
Name
+
" 双层线右侧需要料架,准备去4C-"
+
nodeName
);
return
true
;
}
}
string
nearNodeName
=
CalculateNearNode
(
agv
,
SettingString
.
C4_Name_Prefix
);
if
(!
nearNodeName
.
Equals
(
""
))
{
nodeName
=
nearNodeName
;
Common
.
log
.
Debug
(
agv
.
Name
+
" 双层线右侧需要料架,准备去4C-"
+
nearNodeName
);
return
true
;
}
}
//4D车间
备料区
寻找
//4D车间寻找
if
(!
SettingString
.
C4_AGV_IPs
.
Contains
(
agv
.
IP
))
{
idx
=
nodeInfo
.
FindIndex
(
s
=>
s
.
EmptyShelfCnt
>
0
&&
s
.
Name
.
Equals
(
SettingString
.
D4FeederOut
)
&&
!
s
.
RFID
.
StartsWith
(
"0"
)
&&
s
.
IsUse
);
...
...
@@ -739,7 +748,13 @@ namespace AGVControl
Common
.
log
.
Debug
(
agv
.
Name
+
" 双层线右侧需要料架,准备去4D-"
+
nodeName
);
return
true
;
}
string
nearNodeName
=
CalculateNearNode
(
agv
,
SettingString
.
D4_Name_Prefix
);
if
(!
nearNodeName
.
Equals
(
""
))
{
nodeName
=
nearNodeName
;
Common
.
log
.
Debug
(
agv
.
Name
+
" 双层线右侧需要料架,准备去4D-"
+
nearNodeName
);
return
true
;
}
}
}
}
...
...
AGVControl-ProductionLine/FrmMain.cs
查看文件 @
17bd5b2
...
...
@@ -252,54 +252,58 @@ namespace AGVControl
{
DgvAgv
.
Refresh
();
if
(
e
.
RowIndex
==
-
1
)
return
;
if
(
e
.
ColumnIndex
==
10
)
//调用
{
if
(
Common
.
agvInfo
[
e
.
RowIndex
].
IsUse
.
Equals
(
true
))
{
Common
.
chargeStatus
.
ClearRandomChargeInfo
(
Common
.
agvInfo
[
e
.
RowIndex
]);
Common
.
agvInfo
[
e
.
RowIndex
].
IsUse
=
false
;
Common
.
agvInfo
[
e
.
RowIndex
].
CurJob
=
null
;
//添加Init任务
Common
.
mir
.
Add_Mission_Fleet
(
Common
.
agvInfo
[
e
.
RowIndex
],
Common
.
agvMission
[
"Init"
]);
Common
.
mir
.
State_Ready
(
Common
.
agvInfo
[
e
.
RowIndex
]);
}
else
this
.
Invoke
(
new
Action
(()=>
{
try
{
if
(
Common
.
agvInfo
[
e
.
RowIndex
].
IsExistShelf
)
{
MessageBox
.
Show
(
"小车上有料架,不允许开自动模式"
);
return
;
}
//清除4c临时待机位的占用
if
(
Common
.
agvInfo
[
e
.
RowIndex
].
Name
.
Equals
(
Common
.
StandbyStation
.
C4_Station1
))
if
(
e
.
ColumnIndex
==
10
)
//调用
{
Common
.
StandbyStation
.
C4_Station1
=
""
;
}
else
if
(
Common
.
agvInfo
[
e
.
RowIndex
].
Name
.
Equals
(
Common
.
StandbyStation
.
C4_Station2
))
{
Common
.
StandbyStation
.
C4_Station2
=
""
;
if
(
Common
.
agvInfo
[
e
.
RowIndex
].
IsUse
.
Equals
(
true
))
{
Common
.
chargeStatus
.
ClearRandomChargeInfo
(
Common
.
agvInfo
[
e
.
RowIndex
]);
Common
.
agvInfo
[
e
.
RowIndex
].
IsUse
=
false
;
Common
.
agvInfo
[
e
.
RowIndex
].
CurJob
=
null
;
if
(
Common
.
agvInfo
[
e
.
RowIndex
].
IsCon
)
{
//添加Init任务
Common
.
mir
.
Add_Mission_Fleet
(
Common
.
agvInfo
[
e
.
RowIndex
],
Common
.
agvMission
[
"Init"
]);
Common
.
mir
.
State_Ready
(
Common
.
agvInfo
[
e
.
RowIndex
]);
}
}
else
{
if
(
Common
.
agvInfo
[
e
.
RowIndex
].
IsExistShelf
)
{
MessageBox
.
Show
(
"小车上有料架,不允许开自动模式"
);
return
;
}
//清除4c临时待机位的占用
if
(
Common
.
agvInfo
[
e
.
RowIndex
].
Name
.
Equals
(
Common
.
StandbyStation
.
C4_Station1
))
{
Common
.
StandbyStation
.
C4_Station1
=
""
;
}
else
if
(
Common
.
agvInfo
[
e
.
RowIndex
].
Name
.
Equals
(
Common
.
StandbyStation
.
C4_Station2
))
{
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
].
RFID
=
""
;
if
(
Common
.
agvInfo
[
e
.
RowIndex
].
Place
.
Equals
(
SettingString
.
AutoCharge
)
||
Common
.
agvInfo
[
e
.
RowIndex
].
Place
.
Equals
(
SettingString
.
Standby
))
Common
.
agvInfo
[
e
.
RowIndex
].
Place
=
""
;
Common
.
agvInfo
[
e
.
RowIndex
].
IsUse
=
true
;
}
DgvAgv
.
Rows
[
e
.
RowIndex
].
Cells
[
e
.
ColumnIndex
].
Value
=
Common
.
agvInfo
[
e
.
RowIndex
].
IsUse
.
ToString
();
Common
.
WriteIni
(
Common
.
agvInfo
[
e
.
RowIndex
].
Name
,
SettingString
.
IsUse
,
Common
.
agvInfo
[
e
.
RowIndex
].
IsUse
.
ToString
());
Common
.
appConfig
.
Save
();
DgvAgv
.
Rows
[
e
.
RowIndex
].
SetValues
(
Common
.
agvInfo
[
e
.
RowIndex
].
ToRow
());
}
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
].
RFID
=
""
;
if
(
Common
.
agvInfo
[
e
.
RowIndex
].
Place
.
Equals
(
SettingString
.
AutoCharge
)
||
Common
.
agvInfo
[
e
.
RowIndex
].
Place
.
Equals
(
SettingString
.
Standby
))
Common
.
agvInfo
[
e
.
RowIndex
].
Place
=
""
;
Common
.
agvInfo
[
e
.
RowIndex
].
IsUse
=
true
;
// }
//else
//{
// Common.agvInfo[e.RowIndex].IsUse = true;
// Common.LogInfo(string.Format("手动开启小车自动模式,并继续上一次的自动模式的运行信息{0} {1}", Common.agvInfo[e.RowIndex].Name, Common.agvInfo[e.RowIndex].RunInfo()));
//}
}
DgvAgv
.
Rows
[
e
.
RowIndex
].
Cells
[
e
.
ColumnIndex
].
Value
=
Common
.
agvInfo
[
e
.
RowIndex
].
IsUse
.
ToString
();
Common
.
WriteIni
(
Common
.
agvInfo
[
e
.
RowIndex
].
Name
,
SettingString
.
IsUse
,
Common
.
agvInfo
[
e
.
RowIndex
].
IsUse
.
ToString
());
Common
.
appConfig
.
Save
();
DgvAgv
.
Rows
[
e
.
RowIndex
].
SetValues
(
Common
.
agvInfo
[
e
.
RowIndex
].
ToRow
());
}
catch
(
Exception
ex
)
{
Common
.
log
.
Error
(
"手动切换运行模式"
,
ex
);
}
}));
}
private
void
DgvNode_CellClick
(
object
sender
,
DataGridViewCellEventArgs
e
)
...
...
AGVControl-ProductionLine/Program.cs
查看文件 @
17bd5b2
...
...
@@ -45,7 +45,7 @@ namespace AGVControl
Common
.
log
=
log4net
.
LogManager
.
GetLogger
(
"AgvServer"
);
Common
.
log
.
Info
(
"=====程序开始====="
);
ReadConfig
();
//
Common.ReadUnlockLineInfo();
Common
.
ReadUnlockLineInfo
();
Common
.
mir
=
new
MiR_API
();
Common
.
control
=
new
BLL
.
Control
();
...
...
AGVControl-ProductionLine/bin/Debug/AGVControl-ProductionLine.exe
查看文件 @
17bd5b2
此文件类型无法预览
AGVControl-ProductionLine/bin/Debug/AGVControl-ProductionLine.pdb
查看文件 @
17bd5b2
此文件类型无法预览
AGVControl-ProductionLine/bin/Debug/Config/UnlockInfo.json
查看文件 @
17bd5b2
{
"NodeUnlockMissions"
:{
"D1"
:{
"NodeName"
:
"D1"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D2"
:{
"NodeName"
:
"D2"
,
"EmptyCnt"
:
1
,
"Rfids"
:{
"D4"
:
"2020/12/06/11:51:42,731"
}},
"D3"
:{
"NodeName"
:
"D3"
,
"EmptyCnt"
:
1
,
"Rfids"
:{
"D3"
:
"2020/12/05/22:50:48,047"
}},
"D4"
:{
"NodeName"
:
"D4"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D5"
:{
"NodeName"
:
"D5"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D6"
:{
"NodeName"
:
"D6"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D8"
:{
"NodeName"
:
"D8"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D9"
:{
"NodeName"
:
"D9"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D10"
:{
"NodeName"
:
"D10"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D11"
:{
"NodeName"
:
"D11"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D12"
:{
"NodeName"
:
"D12"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D14"
:{
"NodeName"
:
"D14"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D15"
:{
"NodeName"
:
"D15"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D16"
:{
"NodeName"
:
"D16"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D22"
:{
"NodeName"
:
"D22"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C1"
:{
"NodeName"
:
"C1"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C2"
:{
"NodeName"
:
"C2"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C3"
:{
"NodeName"
:
"C3"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C4"
:{
"NodeName"
:
"C4"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C5"
:{
"NodeName"
:
"C5"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C6"
:{
"NodeName"
:
"C6"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C7"
:{
"NodeName"
:
"C7"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C8"
:{
"NodeName"
:
"C8"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C9"
:{
"NodeName"
:
"C9"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C10"
:{
"NodeName"
:
"C10"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C14"
:{
"NodeName"
:
"C14"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C15"
:{
"NodeName"
:
"C15"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C22"
:{
"NodeName"
:
"C22"
,
"EmptyCnt"
:
0
,
"Rfids"
:{}}}}
{
"NodeUnlockMissions"
:{
"D1"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D2"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D3"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D4"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
1
,
"Rfids"
:{
"C2"
:
"2021/01/21/09:18:50,014"
}},
"D5"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D6"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D8"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D9"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D10"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D11"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D12"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D14"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D15"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D16"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"D22"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C1"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C2"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C3"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C4"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C5"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C6"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C7"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C8"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C9"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C10"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C14"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C15"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}},
"C22"
:{
"NodeName"
:
null
,
"EmptyCnt"
:
0
,
"Rfids"
:{}}}}
AGVControl-ProductionLine/bin/Debug/Config/tempData.ini
查看文件 @
17bd5b2
...
...
@@ -2,8 +2,10 @@
EmptyShelfCnt
=
1
[MiR_R1763]
RFID
=
IsUse
=
False
[MiR_R1764]
RFID
=
IsUse
=
False
[MiR_R1767]
RFID
=
[MiR_R1768]
...
...
@@ -14,3 +16,5 @@ RFID=
RFID
=
[D2]
EmptyShelfCnt
=
1
[D4]
EmptyShelfCnt
=
1
AGVControl-ProductionLine/bin/Debug/logs/AgvServer.log
查看文件 @
17bd5b2
此文件的差异被折叠,
点击展开。
AGVControl-ProductionLine/bin/Debug/logs/AgvServer.log2020-12-25
0 → 100644
查看文件 @
17bd5b2
[2020-12-25 15:20:52,821][1][AgvServer:46]INFO =====程序开始=====
AGVControl-ProductionLine/bin/Debug/logs/UnlockInfo.log
查看文件 @
17bd5b2
\ No newline at end of file
AGVControl-ProductionLine/obj/Debug/AGVControl-ProductionLine.exe
查看文件 @
17bd5b2
此文件类型无法预览
AGVControl-ProductionLine/obj/Debug/AGVControl-ProductionLine.pdb
查看文件 @
17bd5b2
此文件类型无法预览
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论