Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
827-AGV
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit c519009b
由
张东亮
编写于
2021-04-27 11:31:27 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
出满料目的地异常时软件提示
1 个父辈
a44da5a2
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
172 行增加
和
64 行删除
Common/SettingString.cs
DeviceLibrary/AgvServer.cs
DeviceLibrary/bean/job/EmptyShelfBackJob.cs
DeviceLibrary/bean/job/GoFullShelfStationJob.cs
DeviceLibrary/bean/job/SendFullShelfToLineJob.cs
DeviceLibrary/bean/job/jobType/SendFullShelfJobType.cs
DeviceLibrary/manager/HttpManager.cs
SO827-AGV/FrmMain.Designer.cs
SO827-AGV/FrmMain.cs
SO827-AGV/Manual.cs
Common/SettingString.cs
查看文件 @
c519009
...
@@ -42,7 +42,7 @@ namespace Common
...
@@ -42,7 +42,7 @@ namespace Common
//存放料架口
//存放料架口
public
const
string
A1
=
"A1"
;
//出口
public
const
string
A1
=
"A1"
;
//出口
public
const
string
A2
=
"A2"
;
//入口
public
const
string
A2
=
"A2"
;
//入口
public
const
string
TEMPSTATION
=
"TEMPSTATION"
;
//临时点
#
region
配置名
#
region
配置名
public
const
string
Port_AGV_Server
=
"Port_AGV_Server"
;
public
const
string
Port_AGV_Server
=
"Port_AGV_Server"
;
public
const
string
httpServer
=
"http.server"
;
public
const
string
httpServer
=
"http.server"
;
...
...
DeviceLibrary/AgvServer.cs
查看文件 @
c519009
...
@@ -109,7 +109,7 @@ namespace DeviceLibrary
...
@@ -109,7 +109,7 @@ namespace DeviceLibrary
TimeSpan
timeSpan
=
DateTime
.
Now
-
readyEnterTime
[
nodeName
];
TimeSpan
timeSpan
=
DateTime
.
Now
-
readyEnterTime
[
nodeName
];
if
(
timeSpan
.
TotalSeconds
<
15
)
if
(
timeSpan
.
TotalSeconds
<
15
)
{
{
log
.
Debug
(
nodeName
+
" ReadyEnter 15秒内不重复发送"
);
log
.
Debug
(
nodeName
+
" ReadyEnter 15秒内不重复发送"
);
return
false
;
return
false
;
}
}
else
if
(
timeSpan
.
TotalMinutes
>
1
)
else
if
(
timeSpan
.
TotalMinutes
>
1
)
...
@@ -147,7 +147,7 @@ namespace DeviceLibrary
...
@@ -147,7 +147,7 @@ namespace DeviceLibrary
TimeSpan
timeSpan
=
DateTime
.
Now
-
readyLeaveTime
[
nodeName
];
TimeSpan
timeSpan
=
DateTime
.
Now
-
readyLeaveTime
[
nodeName
];
if
(
timeSpan
.
TotalSeconds
<
45
)
if
(
timeSpan
.
TotalSeconds
<
45
)
{
{
log
.
Debug
(
nodeName
+
" ReadyLeave 45秒内不重复发送"
);
log
.
Debug
(
nodeName
+
" ReadyLeave 45秒内不重复发送"
);
return
false
;
return
false
;
}
}
else
if
(
timeSpan
.
TotalMinutes
>
1
)
else
if
(
timeSpan
.
TotalMinutes
>
1
)
...
@@ -286,14 +286,14 @@ namespace DeviceLibrary
...
@@ -286,14 +286,14 @@ namespace DeviceLibrary
Socket
socket
=
_server
.
Accept
();
//这边会暂停,不需要sleep
Socket
socket
=
_server
.
Accept
();
//这边会暂停,不需要sleep
IPEndPoint
ep
=
(
IPEndPoint
)
socket
.
RemoteEndPoint
;
IPEndPoint
ep
=
(
IPEndPoint
)
socket
.
RemoteEndPoint
;
Thread
listen
=
new
Thread
(
new
ParameterizedThreadStart
(
ListenNet
));
Thread
listen
=
new
Thread
(
new
ParameterizedThreadStart
(
ListenNet
));
//
string ip = ep.Address.ToString();
string
ip
=
ep
.
Address
.
ToString
();
//if (ip == System.Configuration.ConfigurationManager.AppSettings["LocalIP"])
//if (ip == System.Configuration.ConfigurationManager.AppSettings["LocalIP"])
// ip += ":" + ep.Port;
// ip += ":" + ep.Port;
//新的客户端
//新的客户端
Client
client
=
new
Client
Client
client
=
new
Client
{
{
IP
=
ep
.
Address
.
ToString
()
+
":"
+
ep
.
Port
,
IP
=
ip
,
Loop
=
true
,
Loop
=
true
,
IsConn
=
true
,
IsConn
=
true
,
Socket
=
socket
,
Socket
=
socket
,
...
@@ -302,15 +302,15 @@ namespace DeviceLibrary
...
@@ -302,15 +302,15 @@ namespace DeviceLibrary
};
};
//重连后关闭旧连接
//重连后关闭旧连接
//
int idx = _client.FindIndex(s => s.IP.Equals(ip));
int
idx
=
_client
.
FindIndex
(
s
=>
s
.
IP
.
Equals
(
ip
));
//
if (idx > -1)
if
(
idx
>
-
1
)
//
{
{
//
_client[idx].IsConn = false;
_client
[
idx
].
IsConn
=
false
;
//
_client[idx].nodeName.Clear();
_client
[
idx
].
nodeName
.
Clear
();
//
_client[idx].Loop = false;
_client
[
idx
].
Loop
=
false
;
//
_client[idx].Socket.Close();
_client
[
idx
].
Socket
.
Close
();
//
_client.RemoveAt(idx);
_client
.
RemoveAt
(
idx
);
//
}
}
_client
.
Add
(
client
);
_client
.
Add
(
client
);
listen
.
Start
(
_client
.
Count
-
1
);
listen
.
Start
(
_client
.
Count
-
1
);
...
@@ -433,7 +433,7 @@ namespace DeviceLibrary
...
@@ -433,7 +433,7 @@ namespace DeviceLibrary
else
else
{
{
time
+=
sleep
;
time
+=
sleep
;
if
(
time
>
1000
*
60
*
60
*
1
)
if
(
time
>
1000
*
60
*
60
*
1
)
{
{
Offline
(
client
);
Offline
(
client
);
log
.
Info
(
"["
+
client
.
IP
+
"] 超过1H没有收到数据,关闭连接"
);
log
.
Info
(
"["
+
client
.
IP
+
"] 超过1H没有收到数据,关闭连接"
);
...
...
DeviceLibrary/bean/job/EmptyShelfBackJob.cs
查看文件 @
c519009
...
@@ -77,11 +77,12 @@ namespace DeviceLibrary
...
@@ -77,11 +77,12 @@ namespace DeviceLibrary
}
}
else
if
(
AGVManager
.
CheckShelfStorageInState
(
agv
))
else
if
(
AGVManager
.
CheckShelfStorageInState
(
agv
))
{
{
jobStep
.
ToNextStep
(
EMPTY_SHELF_BACK_STEP
.
WAIT_AGV_REACH_STANDBY
);
jobStep
.
ToNextStep
(
EMPTY_SHELF_BACK_STEP
.
WAIT_AGV_REACH_Target
);
EmptyShelfTargetPlace
=
SettingString
.
A2
;
runInfo
=
"云仓暂不需要空料架,从线体["
+
EmptyShelfPlace
+
"]到料架缓存处"
;
runInfo
=
"云仓暂不需要空料架,从线体["
+
EmptyShelfPlace
+
"]到料架缓存处"
;
msg
+=
string
.
Format
(
"[{0}] {1}"
,
jobStep
.
CurStep
(),
runInfo
);
msg
+=
string
.
Format
(
"[{0}] {1}"
,
jobStep
.
CurStep
(),
runInfo
);
jobStep
.
Msg
=
msg
;
jobStep
.
Msg
=
msg
;
MissionSys
.
AssignMission
(
agv
,
SettingString
.
A2
);
MissionSys
.
AssignMission
(
agv
,
EmptyShelfTargetPlace
);
UpdateJobTaskInfo
(
agv
);
UpdateJobTaskInfo
(
agv
);
}
}
else
else
...
...
DeviceLibrary/bean/job/GoFullShelfStationJob.cs
查看文件 @
c519009
...
@@ -105,7 +105,7 @@ namespace DeviceLibrary
...
@@ -105,7 +105,7 @@ namespace DeviceLibrary
else
else
{
{
jobStep
.
ToNextStep
(
GO_FULL_SHELF_STATION_STEP
.
WAIT_REACH_STANDBY
);
jobStep
.
ToNextStep
(
GO_FULL_SHELF_STATION_STEP
.
WAIT_REACH_STANDBY
);
runInfo
=
"从"
+
FullShelfStationPlace
+
"回到待机位,因不存在该
节点
"
+
FullShelfDestInfo
.
data
;
runInfo
=
"从"
+
FullShelfStationPlace
+
"回到待机位,因不存在该
线体名:
"
+
FullShelfDestInfo
.
data
;
msg
+=
string
.
Format
(
"[{0}] {1}"
,
jobStep
.
CurStep
(),
runInfo
);
msg
+=
string
.
Format
(
"[{0}] {1}"
,
jobStep
.
CurStep
(),
runInfo
);
jobStep
.
Msg
=
msg
;
jobStep
.
Msg
=
msg
;
MissionSys
.
AssignMission
(
agv
,
SettingString
.
Standby
);
MissionSys
.
AssignMission
(
agv
,
SettingString
.
Standby
);
...
@@ -182,7 +182,7 @@ namespace DeviceLibrary
...
@@ -182,7 +182,7 @@ namespace DeviceLibrary
msg
+=
string
.
Format
(
"[{0}] {1}"
,
jobStep
.
CurStep
(),
runInfo
);
msg
+=
string
.
Format
(
"[{0}] {1}"
,
jobStep
.
CurStep
(),
runInfo
);
jobStep
.
Msg
=
msg
;
jobStep
.
Msg
=
msg
;
//FullShelfStationPlace = SettingString.A2;
//FullShelfStationPlace = SettingString.A2;
MissionSys
.
AssignMission
(
agv
,
SettingString
.
A2
);
MissionSys
.
AssignMission
(
agv
,
SettingString
.
TEMPSTATION
);
UpdateJobTaskInfo
(
agv
);
UpdateJobTaskInfo
(
agv
);
}
}
else
else
...
@@ -206,7 +206,7 @@ namespace DeviceLibrary
...
@@ -206,7 +206,7 @@ namespace DeviceLibrary
else
if
(
jobStep
.
IsStep
(
GO_FULL_SHELF_STATION_STEP
.
WAIT_REACH_TEMP_PLACE
))
else
if
(
jobStep
.
IsStep
(
GO_FULL_SHELF_STATION_STEP
.
WAIT_REACH_TEMP_PLACE
))
{
{
CurTaskState
=
MissionSys
.
GetTakJobState
(
agv
);
CurTaskState
=
MissionSys
.
GetTakJobState
(
agv
);
if
(
MissionSys
.
CheckTaskFinished
(
agv
,
SettingString
.
A2
,
CurTaskState
))
if
(
MissionSys
.
CheckTaskFinished
(
agv
,
SettingString
.
TEMPSTATION
,
CurTaskState
))
{
{
MiR_API
.
Get_IO_Status
(
agv
,
out
bool
[]
input
,
out
bool
[]
output
);
MiR_API
.
Get_IO_Status
(
agv
,
out
bool
[]
input
,
out
bool
[]
output
);
System
.
Threading
.
Thread
.
Sleep
(
500
);
System
.
Threading
.
Thread
.
Sleep
(
500
);
...
@@ -216,7 +216,7 @@ namespace DeviceLibrary
...
@@ -216,7 +216,7 @@ namespace DeviceLibrary
msg
+=
string
.
Format
(
"[{0}] {1}"
,
jobStep
.
CurStep
(),
runInfo
);
msg
+=
string
.
Format
(
"[{0}] {1}"
,
jobStep
.
CurStep
(),
runInfo
);
jobStep
.
Msg
=
msg
;
jobStep
.
Msg
=
msg
;
AGVManager
.
CheckBoxNeedShelfState
(
agv
,
out
string
nodeName
);
AGVManager
.
CheckBoxNeedShelfState
(
agv
,
out
string
nodeName
);
return
new
EmptyShelfBackJob
(
SettingString
.
A2
,
eShelfType
.
SmallShelf
,
nodeName
);
return
new
EmptyShelfBackJob
(
SettingString
.
TEMPSTATION
,
eShelfType
.
SmallShelf
,
nodeName
);
}
}
}
}
...
...
DeviceLibrary/bean/job/SendFullShelfToLineJob.cs
查看文件 @
c519009
...
@@ -66,10 +66,15 @@ namespace DeviceLibrary
...
@@ -66,10 +66,15 @@ namespace DeviceLibrary
CurTaskState
=
MissionSys
.
GetTakJobState
(
agv
);
CurTaskState
=
MissionSys
.
GetTakJobState
(
agv
);
if
(
MissionSys
.
CheckTaskFinished
(
agv
,
FullShelfPlace
,
CurTaskState
))
if
(
MissionSys
.
CheckTaskFinished
(
agv
,
FullShelfPlace
,
CurTaskState
))
{
{
jobStep
.
ToNextStep
(
SEND_FULL_SHELF_STEP
.
WAIT_BIG_SHELF_UNLOCK
);
//jobStep.ToNextStep(SEND_FULL_SHELF_STEP.WAIT_BIG_SHELF_UNLOCK);
runInfo
=
"AGV到达 "
+
FullShelfPlace
+
",等待人员操作"
;
//runInfo = "AGV到达 " + FullShelfPlace + ",等待人员操作";
//msg += string.Format("[{0}] {1}", jobStep.CurStep(), runInfo);
//jobStep.Msg = msg;
runInfo
=
"人员在"
+
FullShelfPlace
+
"卸料完成"
;
msg
+=
string
.
Format
(
"[{0}] {1}"
,
jobStep
.
CurStep
(),
runInfo
);
msg
+=
string
.
Format
(
"[{0}] {1}"
,
jobStep
.
CurStep
(),
runInfo
);
jobStep
.
Msg
=
msg
;
jobStep
.
Msg
=
msg
;
AGVManager
.
CheckBoxNeedShelfState
(
agv
,
out
string
nodeName
);
return
new
EmptyShelfBackJob
(
FullShelfPlace
,
eShelfType
.
SmallShelf
,
nodeName
);
}
}
}
}
else
if
(
jobStep
.
IsStep
(
SEND_FULL_SHELF_STEP
.
WAIT_BIG_SHELF_UNLOCK
))
else
if
(
jobStep
.
IsStep
(
SEND_FULL_SHELF_STEP
.
WAIT_BIG_SHELF_UNLOCK
))
...
...
DeviceLibrary/bean/job/jobType/SendFullShelfJobType.cs
查看文件 @
c519009
...
@@ -30,9 +30,9 @@ namespace DeviceLibrary
...
@@ -30,9 +30,9 @@ namespace DeviceLibrary
if
(
FindNeedLeaveMission
(
currentAgv
,
checkPlace
,
out
rfid
))
if
(
FindNeedLeaveMission
(
currentAgv
,
checkPlace
,
out
rfid
))
{
{
LogUtil
.
info
(
string
.
Format
(
"{0} [{1}]需要出满料串{2}"
,
currentAgv
.
Name
,
checkPlace
,
rfid
));
LogUtil
.
info
(
string
.
Format
(
"{0} [{1}]需要出满料串{2}"
,
currentAgv
.
Name
,
checkPlace
,
rfid
));
return
new
GoFullShelfStationJob
(
checkPlace
,
currentAgv
.
Place
,
rfid
);
return
new
GoFullShelfStationJob
(
checkPlace
,
currentAgv
.
Place
,
rfid
);
}
}
checkPlace
=
SettingString
.
D2
;
checkPlace
=
SettingString
.
D2
;
//查找云仓出料的任务
//查找云仓出料的任务
if
(
FindNeedLeaveMission
(
currentAgv
,
checkPlace
,
out
rfid
))
if
(
FindNeedLeaveMission
(
currentAgv
,
checkPlace
,
out
rfid
))
{
{
...
@@ -44,7 +44,7 @@ namespace DeviceLibrary
...
@@ -44,7 +44,7 @@ namespace DeviceLibrary
if
(
FindNeedLeaveMission
(
currentAgv
,
checkPlace
,
out
rfid
))
if
(
FindNeedLeaveMission
(
currentAgv
,
checkPlace
,
out
rfid
))
{
{
LogUtil
.
info
(
string
.
Format
(
"{0} [{1}]需要出满料串{2}"
,
currentAgv
.
Name
,
checkPlace
,
rfid
));
LogUtil
.
info
(
string
.
Format
(
"{0} [{1}]需要出满料串{2}"
,
currentAgv
.
Name
,
checkPlace
,
rfid
));
return
new
GoFullShelfStationJob
(
checkPlace
,
currentAgv
.
Place
,
rfid
);
return
new
GoFullShelfStationJob
(
checkPlace
,
currentAgv
.
Place
,
rfid
);
}
}
return
null
;
return
null
;
}
}
...
@@ -66,7 +66,7 @@ namespace DeviceLibrary
...
@@ -66,7 +66,7 @@ namespace DeviceLibrary
/// <param name="RFID"></param>
/// <param name="RFID"></param>
/// <param name="empty">料架类型</param>
/// <param name="empty">料架类型</param>
/// <returns></returns>
/// <returns></returns>
public
static
bool
FindNeedLeaveMission
(
Agv_Info
agv
,
string
nodeName
,
out
string
RFID
,
bool
empty
=
false
)
public
static
bool
FindNeedLeaveMission
(
Agv_Info
agv
,
string
nodeName
,
out
string
RFID
,
bool
empty
=
false
)
{
{
RFID
=
""
;
RFID
=
""
;
if
(
FindNeedLeave
(
agv
,
nodeName
,
out
string
rfid
))
if
(
FindNeedLeave
(
agv
,
nodeName
,
out
string
rfid
))
...
@@ -76,7 +76,7 @@ namespace DeviceLibrary
...
@@ -76,7 +76,7 @@ namespace DeviceLibrary
(
s
.
CurJob
is
GoFullShelfStationJob
&&
(((
GoFullShelfStationJob
)
s
.
CurJob
).
FullShelfStationPlace
.
Equals
(
nodeName
)))
(
s
.
CurJob
is
GoFullShelfStationJob
&&
(((
GoFullShelfStationJob
)
s
.
CurJob
).
FullShelfStationPlace
.
Equals
(
nodeName
)))
);
);
HttpManager
.
FindFullShelfTarget
(
rfid
,
out
HttpManager
.
BoxDestInfo
boxDestInfo
);
HttpManager
.
FindFullShelfTarget
(
rfid
,
out
HttpManager
.
BoxDestInfo
boxDestInfo
);
if
(
idx
==
-
1
&&
boxDestInfo
!=
null
)
// && HttpManager.FindFullShelfTarget(rfid,out HttpManager.BoxDestInfo boxDestInfo)
if
(
idx
==
-
1
&&
boxDestInfo
!=
null
)
// && HttpManager.FindFullShelfTarget(rfid,out HttpManager.BoxDestInfo boxDestInfo)
{
{
RFID
=
rfid
;
RFID
=
rfid
;
LogUtil
.
debug
(
string
.
Format
(
"{0} FindNeedLeaveMission"
,
agv
.
Name
));
LogUtil
.
debug
(
string
.
Format
(
"{0} FindNeedLeaveMission"
,
agv
.
Name
));
...
@@ -100,13 +100,21 @@ namespace DeviceLibrary
...
@@ -100,13 +100,21 @@ namespace DeviceLibrary
List
<
AlarmMsg
>
msglist
=
new
List
<
AlarmMsg
>();
List
<
AlarmMsg
>
msglist
=
new
List
<
AlarmMsg
>();
if
(
nodeIdx
>
-
1
)
if
(
nodeIdx
>
-
1
)
{
{
nodeIdx
=
AGVManager
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Name
.
Equals
(
nodeName
)
&&
s
.
StateEquals
(
eNodeStatus
.
NeedLeave
));
nodeIdx
=
AGVManager
.
nodeInfo
.
FindIndex
(
s
=>
s
.
Name
.
Equals
(
nodeName
)
&&
s
.
StateEquals
(
eNodeStatus
.
NeedLeave
));
if
(
nodeIdx
>
-
1
)
if
(
nodeIdx
>
-
1
)
{
{
if
(
AGVManager
.
nodeInfo
[
nodeIdx
].
RFID
.
StartsWith
(
SettingString
.
ReelString_RFID_Prefix
))
if
(
AGVManager
.
nodeInfo
[
nodeIdx
].
RFID
.
StartsWith
(
SettingString
.
ReelString_RFID_Prefix
))
{
{
rfid
=
AGVManager
.
nodeInfo
[
nodeIdx
].
RFID
;
HttpManager
.
FindFullShelfTarget
(
AGVManager
.
nodeInfo
[
nodeIdx
].
RFID
,
out
HttpManager
.
BoxDestInfo
destInfo
);
return
true
;
if
(
destInfo
!=
null
)
{
if
(
destInfo
.
data
.
ToLower
().
Equals
(
"none"
)
||
AGVManager
.
GetLineNameByNodeName
(
destInfo
.
data
,
out
string
line
))
{
rfid
=
AGVManager
.
nodeInfo
[
nodeIdx
].
RFID
;
return
true
;
}
msglist
.
Add
(
new
AlarmMsg
(
nodeName
,
nodeName
+
".Warn"
,
"出口为出料任务,但目的地异常:"
+
destInfo
.
data
));
}
}
}
else
else
{
{
...
@@ -118,7 +126,7 @@ namespace DeviceLibrary
...
@@ -118,7 +126,7 @@ namespace DeviceLibrary
{
{
msglist
.
Add
(
new
AlarmMsg
(
nodeName
,
"Using."
+
nodeName
,
"调用关闭"
));
msglist
.
Add
(
new
AlarmMsg
(
nodeName
,
"Using."
+
nodeName
,
"调用关闭"
));
}
}
if
(
msglist
.
Count
>
0
)
if
(
msglist
.
Count
>
0
)
HttpManager
.
updateDeviceAlarmMsg
(
msglist
);
HttpManager
.
updateDeviceAlarmMsg
(
msglist
);
return
false
;
return
false
;
}
}
...
...
DeviceLibrary/manager/HttpManager.cs
查看文件 @
c519009
...
@@ -142,7 +142,7 @@ namespace DeviceLibrary
...
@@ -142,7 +142,7 @@ namespace DeviceLibrary
string
resultStr
=
HttpHelper
.
Get
(
server
);
string
resultStr
=
HttpHelper
.
Get
(
server
);
log
.
Info
(
"清理料架的缓存信息【"
+
server
+
"】【"
+
resultStr
+
"】"
);
log
.
Info
(
"清理料架的缓存信息【"
+
server
+
"】【"
+
resultStr
+
"】"
);
RfidData
rfidData
=
JsonHelper
.
DeserializeJsonToObject
<
Rfid
Data
>(
resultStr
);
rfidRemoveData
rfidData
=
JsonHelper
.
DeserializeJsonToObject
<
rfidRemove
Data
>(
resultStr
);
if
(
rfidData
==
null
)
if
(
rfidData
==
null
)
{
{
...
@@ -207,5 +207,13 @@ namespace DeviceLibrary
...
@@ -207,5 +207,13 @@ namespace DeviceLibrary
public
Dictionary
<
string
,
string
>
data
{
get
;
set
;
}
public
Dictionary
<
string
,
string
>
data
{
get
;
set
;
}
}
}
public
class
rfidRemoveData
{
//{"code":0,"msg":"ok","data":"7"}
public
int
code
{
get
;
set
;
}
public
string
msg
{
get
;
set
;
}
public
string
data
{
get
;
set
;
}
}
}
}
SO827-AGV/FrmMain.Designer.cs
查看文件 @
c519009
...
@@ -43,7 +43,6 @@
...
@@ -43,7 +43,6 @@
this
.
groupBox6
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox6
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
lblD3
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblD3
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
tableLayoutPanel6
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
tableLayoutPanel6
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
lblWarn
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
DgvNode
=
new
System
.
Windows
.
Forms
.
DataGridView
();
this
.
DgvNode
=
new
System
.
Windows
.
Forms
.
DataGridView
();
this
.
Column6
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column6
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column12
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column12
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
...
@@ -63,6 +62,10 @@
...
@@ -63,6 +62,10 @@
this
.
tabControlManual
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
tabControlManual
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
tableLayoutPanel4
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
tableLayoutPanel4
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
flowLayoutPanel1
=
new
System
.
Windows
.
Forms
.
FlowLayoutPanel
();
this
.
flowLayoutPanel1
=
new
System
.
Windows
.
Forms
.
FlowLayoutPanel
();
this
.
tableLayoutPanel1
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
lblD1Warn
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblD2Warn
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblD3Warn
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
tableLayoutPanel3
.
SuspendLayout
();
this
.
tableLayoutPanel3
.
SuspendLayout
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabPage1
.
SuspendLayout
();
this
.
tabPage1
.
SuspendLayout
();
...
@@ -78,6 +81,7 @@
...
@@ -78,6 +81,7 @@
this
.
groupBox4
.
SuspendLayout
();
this
.
groupBox4
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
tableLayoutPanel4
.
SuspendLayout
();
this
.
tableLayoutPanel4
.
SuspendLayout
();
this
.
tableLayoutPanel1
.
SuspendLayout
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
// tableLayoutPanel3
// tableLayoutPanel3
...
@@ -243,8 +247,8 @@
...
@@ -243,8 +247,8 @@
//
//
this
.
tableLayoutPanel6
.
ColumnCount
=
1
;
this
.
tableLayoutPanel6
.
ColumnCount
=
1
;
this
.
tableLayoutPanel6
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
50F
));
this
.
tableLayoutPanel6
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
50F
));
this
.
tableLayoutPanel6
.
Controls
.
Add
(
this
.
lblWarn
,
0
,
1
);
this
.
tableLayoutPanel6
.
Controls
.
Add
(
this
.
DgvNode
,
0
,
0
);
this
.
tableLayoutPanel6
.
Controls
.
Add
(
this
.
DgvNode
,
0
,
0
);
this
.
tableLayoutPanel6
.
Controls
.
Add
(
this
.
tableLayoutPanel1
,
0
,
1
);
this
.
tableLayoutPanel6
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
tableLayoutPanel6
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
tableLayoutPanel6
.
Name
=
"tableLayoutPanel6"
;
this
.
tableLayoutPanel6
.
Name
=
"tableLayoutPanel6"
;
this
.
tableLayoutPanel6
.
RowCount
=
2
;
this
.
tableLayoutPanel6
.
RowCount
=
2
;
...
@@ -253,18 +257,6 @@
...
@@ -253,18 +257,6 @@
this
.
tableLayoutPanel6
.
Size
=
new
System
.
Drawing
.
Size
(
699
,
335
);
this
.
tableLayoutPanel6
.
Size
=
new
System
.
Drawing
.
Size
(
699
,
335
);
this
.
tableLayoutPanel6
.
TabIndex
=
34
;
this
.
tableLayoutPanel6
.
TabIndex
=
34
;
//
//
// lblWarn
//
this
.
lblWarn
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
lblWarn
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblWarn
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblWarn
.
Location
=
new
System
.
Drawing
.
Point
(
2
,
174
);
this
.
lblWarn
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
2
,
0
,
2
,
0
);
this
.
lblWarn
.
Name
=
"lblWarn"
;
this
.
lblWarn
.
Size
=
new
System
.
Drawing
.
Size
(
695
,
161
);
this
.
lblWarn
.
TabIndex
=
42
;
this
.
lblWarn
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
//
// DgvNode
// DgvNode
//
//
this
.
DgvNode
.
AllowUserToAddRows
=
false
;
this
.
DgvNode
.
AllowUserToAddRows
=
false
;
...
@@ -482,6 +474,60 @@
...
@@ -482,6 +474,60 @@
this
.
flowLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
1430
,
346
);
this
.
flowLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
1430
,
346
);
this
.
flowLayoutPanel1
.
TabIndex
=
0
;
this
.
flowLayoutPanel1
.
TabIndex
=
0
;
//
//
// tableLayoutPanel1
//
this
.
tableLayoutPanel1
.
ColumnCount
=
1
;
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
100F
));
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
lblD1Warn
,
0
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
lblD2Warn
,
0
,
1
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
lblD3Warn
,
0
,
2
);
this
.
tableLayoutPanel1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
tableLayoutPanel1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
177
);
this
.
tableLayoutPanel1
.
Name
=
"tableLayoutPanel1"
;
this
.
tableLayoutPanel1
.
RowCount
=
3
;
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
33.33333F
));
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
33.33333F
));
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
33.33333F
));
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
20F
));
this
.
tableLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
693
,
155
);
this
.
tableLayoutPanel1
.
TabIndex
=
3
;
//
// lblD1Warn
//
this
.
lblD1Warn
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
lblD1Warn
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
15F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblD1Warn
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblD1Warn
.
Location
=
new
System
.
Drawing
.
Point
(
2
,
0
);
this
.
lblD1Warn
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
2
,
0
,
2
,
0
);
this
.
lblD1Warn
.
Name
=
"lblD1Warn"
;
this
.
lblD1Warn
.
Size
=
new
System
.
Drawing
.
Size
(
689
,
51
);
this
.
lblD1Warn
.
TabIndex
=
43
;
this
.
lblD1Warn
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
//
// lblD2Warn
//
this
.
lblD2Warn
.
AutoSize
=
true
;
this
.
lblD2Warn
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
lblD2Warn
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
15F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblD2Warn
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblD2Warn
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
51
);
this
.
lblD2Warn
.
Name
=
"lblD2Warn"
;
this
.
lblD2Warn
.
Size
=
new
System
.
Drawing
.
Size
(
687
,
51
);
this
.
lblD2Warn
.
TabIndex
=
44
;
this
.
lblD2Warn
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
//
// lblD3Warn
//
this
.
lblD3Warn
.
AutoSize
=
true
;
this
.
lblD3Warn
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
lblD3Warn
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
15F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblD3Warn
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblD3Warn
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
102
);
this
.
lblD3Warn
.
Name
=
"lblD3Warn"
;
this
.
lblD3Warn
.
Size
=
new
System
.
Drawing
.
Size
(
687
,
53
);
this
.
lblD3Warn
.
TabIndex
=
45
;
this
.
lblD3Warn
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
//
// FrmMain
// FrmMain
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
...
@@ -509,6 +555,8 @@
...
@@ -509,6 +555,8 @@
this
.
groupBox4
.
PerformLayout
();
this
.
groupBox4
.
PerformLayout
();
this
.
groupBox2
.
ResumeLayout
(
false
);
this
.
groupBox2
.
ResumeLayout
(
false
);
this
.
tableLayoutPanel4
.
ResumeLayout
(
false
);
this
.
tableLayoutPanel4
.
ResumeLayout
(
false
);
this
.
tableLayoutPanel1
.
ResumeLayout
(
false
);
this
.
tableLayoutPanel1
.
PerformLayout
();
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
}
}
...
@@ -542,11 +590,14 @@
...
@@ -542,11 +590,14 @@
private
System
.
Windows
.
Forms
.
DataGridViewButtonColumn
Column16
;
private
System
.
Windows
.
Forms
.
DataGridViewButtonColumn
Column16
;
private
System
.
Windows
.
Forms
.
Button
btnAgvRemoveRfid
;
private
System
.
Windows
.
Forms
.
Button
btnAgvRemoveRfid
;
private
System
.
Windows
.
Forms
.
Label
label1
;
private
System
.
Windows
.
Forms
.
Label
label1
;
private
System
.
Windows
.
Forms
.
Label
lblWarn
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox5
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox5
;
private
System
.
Windows
.
Forms
.
Label
lblD2
;
private
System
.
Windows
.
Forms
.
Label
lblD2
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox6
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox6
;
private
System
.
Windows
.
Forms
.
Label
lblD3
;
private
System
.
Windows
.
Forms
.
Label
lblD3
;
private
System
.
Windows
.
Forms
.
TableLayoutPanel
tableLayoutPanel1
;
private
System
.
Windows
.
Forms
.
Label
lblD1Warn
;
private
System
.
Windows
.
Forms
.
Label
lblD2Warn
;
private
System
.
Windows
.
Forms
.
Label
lblD3Warn
;
}
}
}
}
SO827-AGV/FrmMain.cs
查看文件 @
c519009
...
@@ -80,7 +80,7 @@ namespace AGVControl
...
@@ -80,7 +80,7 @@ namespace AGVControl
{
{
Invoke
(
new
Action
(()
=>
Invoke
(
new
Action
(()
=>
{
{
// for (int i = 0; i < AGVManager.nodeInfo.Count; i++)
// for (int i = 0; i < AGVManager.nodeInfo.Count; i++)
{
{
DgvNode
.
Rows
[
nodeIndex
].
DefaultCellStyle
.
ForeColor
=
AGVManager
.
nodeInfo
[
nodeIndex
].
Online
&&
AGVManager
.
nodeInfo
[
nodeIndex
].
IsUse
?
Color
.
Black
:
Color
.
Red
;
DgvNode
.
Rows
[
nodeIndex
].
DefaultCellStyle
.
ForeColor
=
AGVManager
.
nodeInfo
[
nodeIndex
].
Online
&&
AGVManager
.
nodeInfo
[
nodeIndex
].
IsUse
?
Color
.
Black
:
Color
.
Red
;
DgvNode
.
Rows
[
nodeIndex
].
SetValues
(
AGVManager
.
nodeInfo
[
nodeIndex
].
ToRow
());
DgvNode
.
Rows
[
nodeIndex
].
SetValues
(
AGVManager
.
nodeInfo
[
nodeIndex
].
ToRow
());
...
@@ -179,6 +179,7 @@ namespace AGVControl
...
@@ -179,6 +179,7 @@ namespace AGVControl
InShhow
=
true
;
InShhow
=
true
;
BoxDestInfo
destInfo
;
BoxDestInfo
destInfo
;
ClientNode
node
;
ClientNode
node
;
string
line
=
""
;
Invoke
(
new
Action
(()
=>
Invoke
(
new
Action
(()
=>
{
{
node
=
AGVManager
.
nodeInfo
.
Find
(
s
=>
s
.
Name
.
Equals
(
SettingString
.
D1
)
&&
s
.
RFID
.
StartsWith
(
SettingString
.
ReelString_RFID_Prefix
));
node
=
AGVManager
.
nodeInfo
.
Find
(
s
=>
s
.
Name
.
Equals
(
SettingString
.
D1
)
&&
s
.
RFID
.
StartsWith
(
SettingString
.
ReelString_RFID_Prefix
));
...
@@ -191,6 +192,11 @@ namespace AGVControl
...
@@ -191,6 +192,11 @@ namespace AGVControl
{
{
lblD1
.
Text
=
destInfo
.
ToString
();
lblD1
.
Text
=
destInfo
.
ToString
();
destInfoMap
.
Add
(
SettingString
.
D1
,
node
.
RFID
);
destInfoMap
.
Add
(
SettingString
.
D1
,
node
.
RFID
);
if
(!
destInfo
.
data
.
ToLower
().
Equals
(
"none"
)
&&
!
AGVManager
.
GetLineNameByNodeName
(
destInfo
.
data
,
out
line
))
{
lblD1Warn
.
Text
=
string
.
Format
(
"{0}的料架[{1}]目的地不存在:{2}\r\n"
,
node
.
LineName
,
node
.
RFID
,
destInfo
.
data
);
}
}
}
}
}
...
@@ -201,6 +207,10 @@ namespace AGVControl
...
@@ -201,6 +207,10 @@ namespace AGVControl
{
{
lblD1
.
Text
=
destInfo
.
ToString
();
lblD1
.
Text
=
destInfo
.
ToString
();
destInfoMap
[
SettingString
.
D1
]
=
node
.
RFID
;
destInfoMap
[
SettingString
.
D1
]
=
node
.
RFID
;
if
(!
destInfo
.
data
.
ToLower
().
Equals
(
"none"
)
&&
!
AGVManager
.
GetLineNameByNodeName
(
destInfo
.
data
,
out
line
))
{
lblD1Warn
.
Text
=
string
.
Format
(
"{0}的料架[{1}]目的地不存在:{2}\r\n"
,
node
.
LineName
,
destInfo
.
data
);
}
}
}
}
}
...
@@ -208,6 +218,7 @@ namespace AGVControl
...
@@ -208,6 +218,7 @@ namespace AGVControl
else
else
{
{
lblD1
.
Text
=
""
;
lblD1
.
Text
=
""
;
lblD1Warn
.
Text
=
""
;
if
(
destInfoMap
.
ContainsKey
(
SettingString
.
D1
))
if
(
destInfoMap
.
ContainsKey
(
SettingString
.
D1
))
destInfoMap
.
Remove
(
SettingString
.
D1
);
destInfoMap
.
Remove
(
SettingString
.
D1
);
}
}
...
@@ -222,6 +233,10 @@ namespace AGVControl
...
@@ -222,6 +233,10 @@ namespace AGVControl
{
{
lblD2
.
Text
=
destInfo
.
ToString
();
lblD2
.
Text
=
destInfo
.
ToString
();
destInfoMap
.
Add
(
SettingString
.
D2
,
node
.
RFID
);
destInfoMap
.
Add
(
SettingString
.
D2
,
node
.
RFID
);
if
(!
destInfo
.
data
.
ToLower
().
Equals
(
"none"
)
&&
!
AGVManager
.
GetLineNameByNodeName
(
destInfo
.
data
,
out
line
))
{
lblD2Warn
.
Text
=
string
.
Format
(
"{0}的料架[{1}]目的地不存在:{2}\r\n"
,
node
.
LineName
,
node
.
RFID
,
destInfo
.
data
);
}
}
}
}
}
...
@@ -232,6 +247,10 @@ namespace AGVControl
...
@@ -232,6 +247,10 @@ namespace AGVControl
{
{
lblD2
.
Text
=
destInfo
.
ToString
();
lblD2
.
Text
=
destInfo
.
ToString
();
destInfoMap
[
SettingString
.
D2
]
=
node
.
RFID
;
destInfoMap
[
SettingString
.
D2
]
=
node
.
RFID
;
if
(!
destInfo
.
data
.
ToLower
().
Equals
(
"none"
)
&&
!
AGVManager
.
GetLineNameByNodeName
(
destInfo
.
data
,
out
line
))
{
lblD2Warn
.
Text
=
string
.
Format
(
"{0}的料架[{1}]目的地不存在:{2}\r\n"
,
node
.
LineName
,
node
.
RFID
,
destInfo
.
data
);
}
}
}
}
}
...
@@ -239,6 +258,7 @@ namespace AGVControl
...
@@ -239,6 +258,7 @@ namespace AGVControl
else
else
{
{
lblD2
.
Text
=
""
;
lblD2
.
Text
=
""
;
lblD2Warn
.
Text
=
""
;
if
(
destInfoMap
.
ContainsKey
(
SettingString
.
D2
))
if
(
destInfoMap
.
ContainsKey
(
SettingString
.
D2
))
destInfoMap
.
Remove
(
SettingString
.
D2
);
destInfoMap
.
Remove
(
SettingString
.
D2
);
}
}
...
@@ -251,8 +271,12 @@ namespace AGVControl
...
@@ -251,8 +271,12 @@ namespace AGVControl
FindFullShelfTarget
(
node
.
RFID
,
out
destInfo
);
FindFullShelfTarget
(
node
.
RFID
,
out
destInfo
);
if
(
destInfo
!=
null
)
if
(
destInfo
!=
null
)
{
{
lblD3
.
Text
=
destInfo
.
ToString
();
lblD3
.
Text
=
destInfo
.
ToString
();
destInfoMap
.
Add
(
SettingString
.
D3
,
node
.
RFID
);
destInfoMap
.
Add
(
SettingString
.
D3
,
node
.
RFID
);
if
(!
destInfo
.
data
.
ToLower
().
Equals
(
"none"
)
&&
!
AGVManager
.
GetLineNameByNodeName
(
destInfo
.
data
,
out
line
))
{
lblD3Warn
.
Text
=
string
.
Format
(
"{0}的料架[{1}]目的地不存在:{2}\r\n"
,
node
.
LineName
,
node
.
RFID
,
destInfo
.
data
);
}
}
}
}
}
...
@@ -263,6 +287,10 @@ namespace AGVControl
...
@@ -263,6 +287,10 @@ namespace AGVControl
{
{
lblD3
.
Text
=
destInfo
.
ToString
();
lblD3
.
Text
=
destInfo
.
ToString
();
destInfoMap
[
SettingString
.
D3
]
=
node
.
RFID
;
destInfoMap
[
SettingString
.
D3
]
=
node
.
RFID
;
if
(!
destInfo
.
data
.
ToLower
().
Equals
(
"none"
)
&&
!
AGVManager
.
GetLineNameByNodeName
(
destInfo
.
data
,
out
line
))
{
lblD3Warn
.
Text
=
string
.
Format
(
"{0}的料架[{1}]目的地不存在:{2}\r\n"
,
node
.
LineName
,
node
.
RFID
,
destInfo
.
data
);
}
}
}
}
}
...
@@ -270,12 +298,12 @@ namespace AGVControl
...
@@ -270,12 +298,12 @@ namespace AGVControl
else
else
{
{
lblD3
.
Text
=
""
;
lblD3
.
Text
=
""
;
lblD3Warn
.
Text
=
""
;
if
(
destInfoMap
.
ContainsKey
(
SettingString
.
D3
))
if
(
destInfoMap
.
ContainsKey
(
SettingString
.
D3
))
destInfoMap
.
Remove
(
SettingString
.
D3
);
destInfoMap
.
Remove
(
SettingString
.
D3
);
}
}
Application
.
DoEvents
();
Application
.
DoEvents
();
lblWarn
.
Text
=
AGVManager
.
warnMsg
;
}));
}));
InShhow
=
false
;
InShhow
=
false
;
...
...
SO827-AGV/Manual.cs
查看文件 @
c519009
...
@@ -52,31 +52,38 @@ namespace AGVControl
...
@@ -52,31 +52,38 @@ namespace AGVControl
MiR_API
.
Del_Mission
(
Agv
);
MiR_API
.
Del_Mission
(
Agv
);
//添加Init任务
//添加Init任务
MissionSys
.
AssignMission
(
Agv
,
SettingString
.
Init
);
MissionSys
.
AssignMission
(
Agv
,
SettingString
.
Init
);
LogUtil
.
info
(
string
.
Format
(
"{0} 开启手动,取消当前自动任务:{1}"
,
Agv
.
Name
,
Agv
.
Msg
));
Agv
.
CurJob
=
null
;
if
(
Agv
.
Place
.
Equals
(
SettingString
.
Standby
)
||
Agv
.
Place
.
Equals
(
SettingString
.
AutoCharge
))
Agv
.
Place
=
""
;
//MiR_API.Del_Mission(Agv);
Agv
.
RFID
=
""
;
}
}
}
}
else
else
{
{
if
(
Agv
.
IsExistShelf
)
if
(
Agv
.
IsExistShelf
)
{
{
LogUtil
.
error
(
string
.
Format
(
"{0} 车上有
负载
,无法开启自动模式,请先清空小车负载!"
,
Agv
.
Name
));
LogUtil
.
error
(
string
.
Format
(
"{0} 车上有
料架
,无法开启自动模式,请先清空小车负载!"
,
Agv
.
Name
));
MessageBox
.
Show
(
this
,
string
.
Format
(
"{0} 车上有
负载
,无法开启自动模式,请先清空小车负载!"
,
Agv
.
Name
));
MessageBox
.
Show
(
this
,
string
.
Format
(
"{0} 车上有
料架
,无法开启自动模式,请先清空小车负载!"
,
Agv
.
Name
));
chkBxAuto
.
Checked
=
false
;
chkBxAuto
.
Checked
=
false
;
Agv
.
IsUse
=
false
;
return
;
return
;
}
}
if
(
MessageBox
.
Show
(
this
,
"是否继续上一次的任务?\r\n"
+
Agv
.
Msg
,
"提示"
,
MessageBoxButtons
.
YesNo
).
Equals
(
DialogResult
.
No
))
//
if (MessageBox.Show(this, "是否继续上一次的任务?\r\n" + Agv.Msg, "提示", MessageBoxButtons.YesNo).Equals(DialogResult.No))
{
{
LogUtil
.
info
(
string
.
Format
(
"{0} 中断上一次
任务:{1}"
,
Agv
.
Name
,
Agv
.
Msg
));
//LogUtil.info(string.Format("{0} 取消上一次自动
任务:{1}", Agv.Name, Agv.Msg));
Agv
.
CurJob
=
null
;
//
Agv.CurJob = null;
if
(
Agv
.
Place
.
Equals
(
SettingString
.
Standby
)
||
Agv
.
Place
.
Equals
(
SettingString
.
AutoCharge
))
//
if (Agv.Place.Equals(SettingString.Standby) || Agv.Place.Equals(SettingString.AutoCharge))
Agv
.
Place
=
""
;
//
Agv.Place = "";
MiR_API
.
Del_Mission
(
Agv
);
//
MiR_API.Del_Mission(Agv);
Agv
.
RFID
=
""
;
//
Agv.RFID = "";
}
}
else
//
else
{
//
{
Agv
.
Resend
(
tru
e
);
// Agv.Resend(fals
e);
}
//
}
}
}
Agv
.
IsUse
=
chkBxAuto
.
Checked
;
Agv
.
IsUse
=
chkBxAuto
.
Checked
;
}));
}));
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论