Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
顾剑亮
/
Camera
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 0658470f
由
张东亮
编写于
2020-08-06 12:54:20 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
更改在A4出料后停止不动情况
1 个父辈
34358720
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
86 行增加
和
40 行删除
.vs/AGVControl/v16/.suo
AGVControl/BLL/Control.cs
AGVControl/Common.cs
AGVControl/FrmMain.cs
AGVControl/bin/Debug/AGVControl.exe
AGVControl/bin/Debug/AGVControl.pdb
AGVControl/obj/Debug/AGVControl.csproj.FileListAbsolute.txt
AGVControl/obj/Debug/AGVControl.exe
AGVControl/obj/Debug/AGVControl.pdb
AGVControl/obj/Debug/Interop.IWshRuntimeLibrary.dll
.vs/AGVControl/v16/.suo
查看文件 @
0658470
此文件类型无法预览
AGVControl/BLL/Control.cs
查看文件 @
0658470
...
@@ -81,20 +81,12 @@ namespace BLL
...
@@ -81,20 +81,12 @@ namespace BLL
continue
;
continue
;
}
}
Common
.
log
.
OutInfo
(
Common
.
agvInfo
[
i
].
Name
+
" "
+
Common
.
agvInfo
[
i
].
MissionStatus
);
Common
.
log
.
OutInfo
(
"AgvCall "
+
Common
.
agvInfo
[
i
].
Name
+
" "
+
Common
.
agvInfo
[
i
].
MissionStatus
);
switch
(
Common
.
agvInfo
[
i
].
MissionStatus
)
switch
(
Common
.
agvInfo
[
i
].
MissionStatus
)
{
{
case
Mission_Status
.
None
:
//有空闲车辆
case
Mission_Status
.
None
:
//有空闲车辆
if
(!
Common
.
agvInfo
[
i
].
TaskSend
)
if
(!
Common
.
agvInfo
[
i
].
TaskSend
)
{
{
//if (Common.chargeStatus.AutoCharge && Common.agvInfo[i].Battery < 70 &&
// Common.agvInfo[i].WaitTime >= Common.chargeStatus.chargeWait * 60000)
//{
// Common.log.OutInfo(Common.agvInfo[i].Name + " 闲置时间超过" + Common.chargeStatus.chargeWait + "分钟");
// if (StatusCharge(Common.agvInfo[i]))
// break;
//}
if
(
Common
.
chargeStatus
.
AutoCharge
)
if
(
Common
.
chargeStatus
.
AutoCharge
)
{
{
if
(
Common
.
agvInfo
[
i
].
Battery
<=
Common
.
chargeStatus
.
chargeMin
)
if
(
Common
.
agvInfo
[
i
].
Battery
<=
Common
.
chargeStatus
.
chargeMin
)
...
@@ -112,7 +104,6 @@ namespace BLL
...
@@ -112,7 +104,6 @@ namespace BLL
}
}
StatusNone
(
i
);
StatusNone
(
i
);
}
}
break
;
break
;
...
@@ -206,6 +197,8 @@ namespace BLL
...
@@ -206,6 +197,8 @@ namespace BLL
for
(
int
i
=
0
;
i
<
Common
.
agvInfo
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
Common
.
agvInfo
.
Count
;
i
++)
{
{
try
{
if
(!
loop
)
break
;
if
(!
loop
)
break
;
change
=
false
;
change
=
false
;
...
@@ -215,7 +208,7 @@ namespace BLL
...
@@ -215,7 +208,7 @@ namespace BLL
//获取AGV状态
//获取AGV状态
log
=
Common
.
agvInfo
[
i
].
Name
;
log
=
Common
.
agvInfo
[
i
].
Name
;
Thread
.
Sleep
(
50
);
Thread
.
Sleep
(
50
);
rtn
=
Common
.
mir
.
Get_State
(
Common
.
agvInfo
[
i
],
out
int
stateID
,
out
string
stateText
,
out
int
battery
,
out
string
mission_text
);
rtn
=
Common
.
mir
.
Get_State
(
Common
.
agvInfo
[
i
],
out
int
stateID
,
out
string
stateText
,
out
int
battery
,
out
string
mission_text
);
if
(
rtn
)
if
(
rtn
)
{
{
if
(
Common
.
agvInfo
[
i
].
StateID
!=
stateID
)
if
(
Common
.
agvInfo
[
i
].
StateID
!=
stateID
)
...
@@ -255,10 +248,10 @@ namespace BLL
...
@@ -255,10 +248,10 @@ namespace BLL
isAlarm
=
true
;
isAlarm
=
true
;
msglist
.
Add
(
new
AlarmMsg
(
Common
.
agvInfo
[
i
].
Name
,
"agv."
+
Common
.
agvInfo
[
i
].
Name
+
".battery"
,
"电量 "
+
battery
.
ToString
()
+
"%"
));
msglist
.
Add
(
new
AlarmMsg
(
Common
.
agvInfo
[
i
].
Name
,
"agv."
+
Common
.
agvInfo
[
i
].
Name
+
".battery"
,
"电量 "
+
battery
.
ToString
()
+
"%"
));
}
}
if
(
stateText
.
Equals
(
"Error"
)
||
stateText
.
Equals
(
"EmergencyStop"
)
||
stateText
.
Equals
(
"Pause"
))
if
(
stateText
.
Equals
(
"Error"
)
||
stateText
.
Equals
(
"EmergencyStop"
)
||
stateText
.
Equals
(
"Pause"
))
{
{
isAlarm
=
true
;
isAlarm
=
true
;
msglist
.
Add
(
new
AlarmMsg
(
Common
.
agvInfo
[
i
].
Name
,
"agv."
+
Common
.
agvInfo
[
i
].
Name
+
".Error.EmergencyStop"
,
"agv状态 "
+
stateText
));
msglist
.
Add
(
new
AlarmMsg
(
Common
.
agvInfo
[
i
].
Name
,
"agv."
+
Common
.
agvInfo
[
i
].
Name
+
".Error.EmergencyStop"
,
"agv状态 "
+
stateText
));
}
}
if
(
isAlarm
)
if
(
isAlarm
)
BLL
.
AGVManager
.
updateDeviceAlarmMsg
(
msglist
);
BLL
.
AGVManager
.
updateDeviceAlarmMsg
(
msglist
);
...
@@ -292,11 +285,14 @@ namespace BLL
...
@@ -292,11 +285,14 @@ namespace BLL
log
+=
" Get_Register调用失败"
;
log
+=
" Get_Register调用失败"
;
}
}
if
(
change
)
if
(
change
)
AgvChanged
?.
Invoke
(
i
);
AgvChanged
?.
Invoke
(
i
);
Common
.
log
.
OutInfo
(
log
);
Common
.
log
.
OutInfo
(
log
);
}
catch
(
Exception
ex
)
{
Common
.
log
.
OutError
(
ex
);
}
...
@@ -331,9 +327,9 @@ namespace BLL
...
@@ -331,9 +327,9 @@ namespace BLL
string
log
;
string
log
;
double
sp
=
(
DateTime
.
Now
.
Ticks
-
Common
.
chargeStatus
.
chargeInterval
)
/
10000000.0
;
double
sp
=
(
DateTime
.
Now
.
Ticks
-
Common
.
chargeStatus
.
chargeInterval
)
/
10000000.0
;
//防止两车同时充电卡住的情况
//防止两车同时充电卡住的情况
if
(
sp
<
60
)
if
(
sp
<
60
)
{
{
Common
.
log
.
OutInfo
(
agv
.
Name
+
" 与上一辆车的充电时间间隔为"
+
sp
.
ToString
()
+
",小于60s,不能充电。"
);
Common
.
log
.
OutInfo
(
agv
.
Name
+
" 与上一辆车的充电时间间隔为"
+
sp
.
ToString
()
+
",小于60s,不能充电。"
);
return
false
;
return
false
;
}
}
...
@@ -401,7 +397,12 @@ namespace BLL
...
@@ -401,7 +397,12 @@ namespace BLL
Agv_Info
agv
=
Common
.
agvInfo
[
agvIdx
];
Agv_Info
agv
=
Common
.
agvInfo
[
agvIdx
];
int
high
=
0
,
middle
=
0
,
low
=
0
;
int
high
=
0
,
middle
=
0
,
low
=
0
;
List
<
int
>
node
=
new
List
<
int
>();
List
<
int
>
node
=
new
List
<
int
>();
//清除节点AGV的名称
foreach
(
var
item
in
Common
.
nodeInfo
)
{
if
(
item
.
AgvName
.
Equals
(
agv
.
Name
))
item
.
AgvName
=
""
;
}
//B区域,需要出料,先拿料架
//B区域,需要出料,先拿料架
//Mark.Length>1防止Mark为0的情况,Mark=0是VMI的进料
//Mark.Length>1防止Mark为0的情况,Mark=0是VMI的进料
nodeIdx
=
Common
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Action
==
ClientAction
.
NeedEnter
&&
s
.
AgvName
.
Equals
(
""
)
&&
s
.
Mark
.
Length
>
1
&&
s
.
IsUse
);
nodeIdx
=
Common
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Action
==
ClientAction
.
NeedEnter
&&
s
.
AgvName
.
Equals
(
""
)
&&
s
.
Mark
.
Length
>
1
&&
s
.
IsUse
);
...
@@ -532,10 +533,10 @@ namespace BLL
...
@@ -532,10 +533,10 @@ namespace BLL
//B区域出料架
//B区域出料架
if
(
Common
.
nodeInfo
[
node
[
i
]].
Name
.
StartsWith
(
"B"
))
if
(
Common
.
nodeInfo
[
node
[
i
]].
Name
.
StartsWith
(
"B"
))
{
{
if
(
Common
.
nodeInfo
[
node
[
i
]].
Mark
==
"0"
)
if
(
Common
.
nodeInfo
[
node
[
i
]].
Mark
==
"0"
&&
Common
.
nodeInfo
[
node
[
i
]].
RFID
.
StartsWith
(
"A"
))
//料仓读取到RFID的才获取锁定信息
{
{
//获取料架锁定信息
//获取料架锁定信息
AGVManager
.
GetShelfLockInfo
(
Common
.
nodeInfo
[
node
[
i
]].
Name
,
Common
.
nodeInfo
[
node
[
i
]].
RFID
,
shelfLockedNodeNames
);
AGVManager
.
GetShelfLockInfo
(
Common
.
nodeInfo
[
node
[
i
]].
Name
,
Common
.
nodeInfo
[
node
[
i
]].
RFID
,
shelfLockedNodeNames
);
nodeIdx
=
node
[
i
];
nodeIdx
=
node
[
i
];
break
;
break
;
}
}
...
@@ -557,7 +558,7 @@ namespace BLL
...
@@ -557,7 +558,7 @@ namespace BLL
}
}
}
}
}
}
else
if
(
Common
.
nodeInfo
[
node
[
i
]].
Name
==
"A1"
&&
Common
.
nodeInfo
[
node
[
i
]].
RFID
.
StartsWith
(
"B"
))
else
if
(
Common
.
nodeInfo
[
node
[
i
]].
Name
==
"A1"
&&
Common
.
nodeInfo
[
node
[
i
]].
RFID
.
StartsWith
(
"B"
))
//A1出料串,检查C1,3,5是否需要
{
{
int
n
=
Common
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Name
==
"C1"
&&
s
.
Action
==
ClientAction
.
NeedEnter
&&
s
.
AgvName
==
""
&&
s
.
IsUse
);
int
n
=
Common
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Name
==
"C1"
&&
s
.
Action
==
ClientAction
.
NeedEnter
&&
s
.
AgvName
==
""
&&
s
.
IsUse
);
if
(
n
==
-
1
)
n
=
Common
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Name
==
"C3"
&&
s
.
Action
==
ClientAction
.
NeedEnter
&&
s
.
AgvName
==
""
&&
s
.
IsUse
);
if
(
n
==
-
1
)
n
=
Common
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Name
==
"C3"
&&
s
.
Action
==
ClientAction
.
NeedEnter
&&
s
.
AgvName
==
""
&&
s
.
IsUse
);
...
@@ -569,7 +570,7 @@ namespace BLL
...
@@ -569,7 +570,7 @@ namespace BLL
break
;
break
;
}
}
}
}
else
if
(
Common
.
nodeInfo
[
node
[
i
]].
Name
==
"A1"
&&
Common
.
nodeInfo
[
node
[
i
]].
RFID
.
StartsWith
(
"A"
))
else
if
(
Common
.
nodeInfo
[
node
[
i
]].
Name
==
"A1"
&&
Common
.
nodeInfo
[
node
[
i
]].
RFID
.
StartsWith
(
"A"
))
//B区域入料
{
{
if
(
FindAreaBEnter
()
>
-
1
)
if
(
FindAreaBEnter
()
>
-
1
)
{
{
...
@@ -577,7 +578,7 @@ namespace BLL
...
@@ -577,7 +578,7 @@ namespace BLL
break
;
break
;
}
}
}
}
else
if
(
Common
.
nodeInfo
[
node
[
i
]].
Name
==
"C2"
||
Common
.
nodeInfo
[
node
[
i
]].
Name
==
"C4"
||
Common
.
nodeInfo
[
node
[
i
]].
Name
==
"C6"
)
else
if
(
Common
.
nodeInfo
[
node
[
i
]].
Name
==
"C2"
||
Common
.
nodeInfo
[
node
[
i
]].
Name
==
"C4"
||
Common
.
nodeInfo
[
node
[
i
]].
Name
==
"C6"
)
//C2,4,6准备出料,C7,A2需要料
{
{
int
n
=
Common
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Name
==
"C7"
&&
s
.
Action
==
ClientAction
.
NeedEnter
&&
s
.
AgvName
==
""
&&
s
.
IsUse
);
int
n
=
Common
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Name
==
"C7"
&&
s
.
Action
==
ClientAction
.
NeedEnter
&&
s
.
AgvName
==
""
&&
s
.
IsUse
);
if
(
n
==
-
1
)
n
=
Common
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Name
==
"A2"
&&
s
.
Action
==
ClientAction
.
NeedEnter
&&
s
.
AgvName
==
""
&&
s
.
IsUse
);
if
(
n
==
-
1
)
n
=
Common
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Name
==
"A2"
&&
s
.
Action
==
ClientAction
.
NeedEnter
&&
s
.
AgvName
==
""
&&
s
.
IsUse
);
...
@@ -588,7 +589,7 @@ namespace BLL
...
@@ -588,7 +589,7 @@ namespace BLL
break
;
break
;
}
}
}
}
else
if
(
Common
.
nodeInfo
[
node
[
i
]].
Name
==
"C8"
)
else
if
(
Common
.
nodeInfo
[
node
[
i
]].
Name
==
"C8"
)
//C8出往A2
{
{
int
n
=
Common
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Name
==
"A2"
&&
s
.
Action
==
ClientAction
.
NeedEnter
&&
s
.
AgvName
==
""
&&
s
.
IsUse
);
int
n
=
Common
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Name
==
"A2"
&&
s
.
Action
==
ClientAction
.
NeedEnter
&&
s
.
AgvName
==
""
&&
s
.
IsUse
);
//入料口没有占用
//入料口没有占用
...
@@ -617,14 +618,14 @@ namespace BLL
...
@@ -617,14 +618,14 @@ namespace BLL
}
}
else
else
{
{
Common
.
log
.
OutInfo
(
"
test1
"
+
agv
.
Name
+
" "
+
Common
.
nodeInfo
[
nodeIdx
].
Name
);
Common
.
log
.
OutInfo
(
"
[StatusNone Assign Mission A1]
"
+
agv
.
Name
+
" "
+
Common
.
nodeInfo
[
nodeIdx
].
Name
);
MoveNode
(
agv
,
nodeIdx
);
MoveNode
(
agv
,
nodeIdx
);
return
;
return
;
}
}
}
}
else
else
{
{
Common
.
log
.
OutInfo
(
"
test2
"
+
agv
.
Name
+
" "
+
Common
.
nodeInfo
[
nodeIdx
].
Name
);
Common
.
log
.
OutInfo
(
"
[StatusNone Assign Mission other]
"
+
agv
.
Name
+
" "
+
Common
.
nodeInfo
[
nodeIdx
].
Name
);
MoveNode
(
agv
,
nodeIdx
);
MoveNode
(
agv
,
nodeIdx
);
return
;
return
;
}
}
...
@@ -1308,7 +1309,7 @@ namespace BLL
...
@@ -1308,7 +1309,7 @@ namespace BLL
if
(
agv
.
Mark
.
Length
>
1
)
if
(
agv
.
Mark
.
Length
>
1
)
{
{
rtn
=
FindNeedEnterWithMark
(
agv
);
rtn
=
FindNeedEnterWithMark
(
agv
,
true
);
if
(!
rtn
)
if
(!
rtn
)
{
{
//这个料架可以送走了
//这个料架可以送走了
...
@@ -1345,11 +1346,11 @@ namespace BLL
...
@@ -1345,11 +1346,11 @@ namespace BLL
}
}
else
else
{
{
if
(
shelfLockedNodeNames
!=
null
&&
shelfLockedNodeNames
.
Count
>
0
)
if
(
shelfLockedNodeNames
!=
null
&&
shelfLockedNodeNames
.
Count
>
0
)
{
{
foreach
(
string
item
in
shelfLockedNodeNames
)
foreach
(
string
item
in
shelfLockedNodeNames
)
{
{
nodeIdx
=
Common
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Name
==
item
&&
s
.
Action
==
ClientAction
.
NeedEnter
&&
(
s
.
AgvName
==
""
||
s
.
AgvName
==
agv
.
Name
)
&&
s
.
IsUse
);
nodeIdx
=
Common
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Name
==
item
&&
s
.
Action
==
ClientAction
.
NeedEnter
&&
(
s
.
AgvName
==
""
||
s
.
AgvName
==
agv
.
Name
)
&&
s
.
IsUse
);
if
(
nodeIdx
>
-
1
)
if
(
nodeIdx
>
-
1
)
{
{
agv
.
NextMission
=
""
;
agv
.
NextMission
=
""
;
...
@@ -1360,7 +1361,7 @@ namespace BLL
...
@@ -1360,7 +1361,7 @@ namespace BLL
{
{
int
idx
=
Common
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Name
==
item
);
int
idx
=
Common
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Name
==
item
);
log
=
string
.
Format
(
"[{0}] [ClientAction={1}] [IsUse={2}],不能搬运锁定的料架,到待机位等待"
log
=
string
.
Format
(
"[{0}] [ClientAction={1}] [IsUse={2}],不能搬运锁定的料架,到待机位等待"
,
item
,
Common
.
nodeInfo
[
idx
].
Action
,
Common
.
nodeInfo
[
idx
].
IsUse
);
,
item
,
Common
.
nodeInfo
[
idx
].
Action
,
Common
.
nodeInfo
[
idx
].
IsUse
);
Common
.
log
.
OutInfo
(
log
);
Common
.
log
.
OutInfo
(
log
);
if
(!
agv
.
StandbyTemp
)
if
(!
agv
.
StandbyTemp
)
{
{
...
@@ -1796,7 +1797,7 @@ namespace BLL
...
@@ -1796,7 +1797,7 @@ namespace BLL
{
{
try
try
{
{
string
url
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
)
+
"rest/api/qisda/device/emptyStoragePosCount"
;
string
url
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
)
+
"rest/api/qisda/device/emptyStoragePosCount"
;
Common
.
log
.
OutInfo
(
"URL:"
+
url
);
Common
.
log
.
OutInfo
(
"URL:"
+
url
);
var
client
=
new
RestClient
(
url
)
{
Timeout
=
-
1
};
var
client
=
new
RestClient
(
url
)
{
Timeout
=
-
1
};
var
request
=
new
RestRequest
(
Method
.
GET
);
var
request
=
new
RestRequest
(
Method
.
GET
);
...
@@ -2014,7 +2015,7 @@ namespace BLL
...
@@ -2014,7 +2015,7 @@ namespace BLL
}
}
}
}
private
bool
FindNeedEnterWithMark
(
Agv_Info
agv
)
private
bool
FindNeedEnterWithMark
(
Agv_Info
agv
,
bool
BAreaLeaveCheck
=
false
)
{
{
//寻找下一个任务点
//寻找下一个任务点
int
nodeIdx
=
Common
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Action
==
ClientAction
.
NeedEnter
&&
s
.
Mark
==
agv
.
Mark
&&
s
.
AgvName
==
""
&&
s
.
IsUse
);
int
nodeIdx
=
Common
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Action
==
ClientAction
.
NeedEnter
&&
s
.
Mark
==
agv
.
Mark
&&
s
.
AgvName
==
""
&&
s
.
IsUse
);
...
@@ -2024,15 +2025,27 @@ namespace BLL
...
@@ -2024,15 +2025,27 @@ namespace BLL
}
}
else
else
{
{
bool
rtn
=
AGVManager
.
LeaveCheck
(
agv
,
out
int
taskCount
);
if
(!
BAreaLeaveCheck
)
{
string
log
=
agv
.
Name
+
" A4 FindNeedEnterWithMark [Mark="
+
agv
.
Mark
+
"]"
;
Common
.
log
.
OutInfo
(
log
);
return
true
;
}
bool
rtn
=
AGVManager
.
LeaveCheck
(
agv
,
out
int
taskCount
);
Thread
.
Sleep
(
3000
);
Thread
.
Sleep
(
3000
);
if
(!
rtn
)
//出库任务还未完成
if
(!
rtn
)
//出库任务还未完成
{
{
//MoveStandby(agv);
//MoveStandby(agv);
if
(!
agv
.
StandbyTemp
)
if
(!
agv
.
StandbyTemp
)
{
{
agv
.
StandbyTemp
=
true
;
agv
.
StandbyTemp
=
true
;
string
log
=
agv
.
Name
+
" [Mark="
+
agv
.
Mark
+
"] 出库任务未完成,[taskCount="
+
taskCount
.
ToString
()
+
"] 移动到StandBy"
;
foreach
(
var
item
in
Common
.
nodeInfo
)
{
if
(
item
.
AgvName
.
Equals
(
agv
.
Name
))
item
.
AgvName
=
""
;
}
string
log
=
agv
.
Name
+
" [Mark="
+
agv
.
Mark
+
"] 出库任务未完成,[taskCount="
+
taskCount
.
ToString
()
+
"] 移动到StandBy"
;
Common
.
log
.
OutInfo
(
log
);
Common
.
log
.
OutInfo
(
log
);
Common
.
mir
.
Add_Mission_Fleet
(
agv
,
Common
.
agvMission
[
"MoveStandbyTemp"
]);
Common
.
mir
.
Add_Mission_Fleet
(
agv
,
Common
.
agvMission
[
"MoveStandbyTemp"
]);
}
}
...
@@ -2040,7 +2053,7 @@ namespace BLL
...
@@ -2040,7 +2053,7 @@ namespace BLL
}
}
else
else
{
{
string
log
=
agv
.
Name
+
" [Mark="
+
agv
.
Mark
+
"] [taskCount = "
+
taskCount
.
ToString
()
+
"] 出库任务完成"
;
string
log
=
agv
.
Name
+
" [Mark="
+
agv
.
Mark
+
"] [taskCount = "
+
taskCount
.
ToString
()
+
"] 出库任务完成"
;
Common
.
log
.
OutInfo
(
log
);
Common
.
log
.
OutInfo
(
log
);
//Common.log.OutTextBox(log);
//Common.log.OutTextBox(log);
return
false
;
return
false
;
...
...
AGVControl/Common.cs
查看文件 @
0658470
...
@@ -345,6 +345,11 @@ namespace AGVControl
...
@@ -345,6 +345,11 @@ namespace AGVControl
/// </summary>
/// </summary>
public
bool
StandbyTemp
{
set
;
get
;
}
public
bool
StandbyTemp
{
set
;
get
;
}
/// <summary>
/// 是否清除任务缓存
/// </summary>
public
bool
IsClearRunInfo
=
false
;
public
struct
DockingStru
public
struct
DockingStru
{
{
public
DateTime
startTime
;
public
DateTime
startTime
;
...
...
AGVControl/FrmMain.cs
查看文件 @
0658470
...
@@ -44,7 +44,13 @@ namespace AGVControl
...
@@ -44,7 +44,13 @@ namespace AGVControl
}
}
LstAgvPlace
.
Items
.
Clear
();
LstAgvPlace
.
Items
.
Clear
();
LstAgvPlace
.
Items
.
AddRange
(
Common
.
agvMission
.
Keys
.
ToArray
());
foreach
(
var
item
in
Common
.
agvMission
.
Keys
.
ToArray
())
{
if
(
item
.
Length
.
Equals
(
6
))
continue
;
LstAgvPlace
.
Items
.
Add
(
item
);
}
LstAgvPlace
.
SelectedIndex
=
0
;
LstAgvPlace
.
SelectedIndex
=
0
;
}
}
...
@@ -175,6 +181,7 @@ namespace AGVControl
...
@@ -175,6 +181,7 @@ namespace AGVControl
Common
.
agvInfo
[
e
.
RowIndex
].
Place
=
""
;
Common
.
agvInfo
[
e
.
RowIndex
].
Place
=
""
;
Common
.
agvInfo
[
e
.
RowIndex
].
RFID
=
""
;
Common
.
agvInfo
[
e
.
RowIndex
].
RFID
=
""
;
Common
.
agvInfo
[
e
.
RowIndex
].
NextMission
=
""
;
Common
.
agvInfo
[
e
.
RowIndex
].
NextMission
=
""
;
Common
.
agvInfo
[
e
.
RowIndex
].
IsClearRunInfo
=
true
;
DgvAgv
.
Rows
[
e
.
RowIndex
].
SetValues
(
Common
.
agvInfo
[
e
.
RowIndex
].
ToRow
());
DgvAgv
.
Rows
[
e
.
RowIndex
].
SetValues
(
Common
.
agvInfo
[
e
.
RowIndex
].
ToRow
());
//清除节点缓存
//清除节点缓存
...
@@ -228,11 +235,32 @@ namespace AGVControl
...
@@ -228,11 +235,32 @@ namespace AGVControl
private
void
BtnMissionAdd_Click
(
object
sender
,
EventArgs
e
)
private
void
BtnMissionAdd_Click
(
object
sender
,
EventArgs
e
)
{
{
try
{
if
(
DgvAgv
.
SelectedCells
.
Count
==
0
)
return
;
if
(
DgvAgv
.
SelectedCells
.
Count
==
0
)
return
;
int
idx
=
DgvAgv
.
SelectedCells
[
0
].
RowIndex
;
int
idx
=
DgvAgv
.
SelectedCells
[
0
].
RowIndex
;
if
(
idx
<
0
)
return
;
if
(
idx
<
0
)
return
;
if
(
Common
.
agvInfo
[
idx
].
IsCon
)
if
(
Common
.
agvInfo
[
idx
].
IsCon
)
Common
.
mir
.
Add_Mission_Fleet
(
Common
.
agvInfo
[
idx
],
Common
.
agvMission
[
LstAgvPlace
.
Text
]);
{
if
(!
Common
.
agvInfo
[
idx
].
IsClearRunInfo
)
{
MessageBox
.
Show
(
"请先清除当前小车的任务缓存!"
);
return
;
}
bool
rtn
=
Common
.
mir
.
Add_Mission_Fleet
(
Common
.
agvInfo
[
idx
],
Common
.
agvMission
[
LstAgvPlace
.
Text
]);
if
(!
rtn
)
return
;
Common
.
agvInfo
[
idx
].
Place
=
""
;
Common
.
agvInfo
[
idx
].
IsClearRunInfo
=
false
;
//if (LstAgvPlace.Text.StartsWith("Move") && LstAgvPlace.Text.Length ==6)
//{
// Common.agvInfo[idx].Place = LstAgvPlace.Text.Substring(4);
//}
}
}
catch
(
Exception
ex
){
Common
.
log
.
OutInfo
(
"手动添加任务失败: "
+
ex
.
Message
+
ex
.
StackTrace
);
};
}
}
private
void
BtnClearError_Click
(
object
sender
,
EventArgs
e
)
private
void
BtnClearError_Click
(
object
sender
,
EventArgs
e
)
...
...
AGVControl/bin/Debug/AGVControl.exe
查看文件 @
0658470
此文件类型无法预览
AGVControl/bin/Debug/AGVControl.pdb
查看文件 @
0658470
此文件类型无法预览
AGVControl/obj/Debug/AGVControl.csproj.FileListAbsolute.txt
查看文件 @
0658470
...
@@ -90,5 +90,5 @@ C:\ZDL\Gitee\AGVControl\AGVControl\obj\Debug\AGVControl.csproj.GenerateResource.
...
@@ -90,5 +90,5 @@ C:\ZDL\Gitee\AGVControl\AGVControl\obj\Debug\AGVControl.csproj.GenerateResource.
C:\ZDL\Gitee\AGVControl\AGVControl\obj\Debug\AGVControl.csproj.CopyComplete
C:\ZDL\Gitee\AGVControl\AGVControl\obj\Debug\AGVControl.csproj.CopyComplete
C:\ZDL\Gitee\AGVControl\AGVControl\obj\Debug\AGVControl.exe
C:\ZDL\Gitee\AGVControl\AGVControl\obj\Debug\AGVControl.exe
C:\ZDL\Gitee\AGVControl\AGVControl\obj\Debug\AGVControl.pdb
C:\ZDL\Gitee\AGVControl\AGVControl\obj\Debug\AGVControl.pdb
C:\ZDL\Gitee\AGVControl\AGVControl\obj\Debug\AGVControl.csprojAssemblyReference.cache
C:\ZDL\Gitee\AGVControl\AGVControl\obj\Debug\AGVControl.csproj.CoreCompileInputs.cache
C:\ZDL\Gitee\AGVControl\AGVControl\obj\Debug\AGVControl.csproj.CoreCompileInputs.cache
C:\ZDL\Gitee\AGVControl\AGVControl\obj\Debug\AGVControl.csprojAssemblyReference.cache
AGVControl/obj/Debug/AGVControl.exe
查看文件 @
0658470
此文件类型无法预览
AGVControl/obj/Debug/AGVControl.pdb
查看文件 @
0658470
此文件类型无法预览
AGVControl/obj/Debug/Interop.IWshRuntimeLibrary.dll
查看文件 @
0658470
此文件类型无法预览
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论