Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
SO940-AGV
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 2e45d045
由
张东亮
编写于
2021-08-04 11:31:05 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
添加回收入库等待超时时间
1 个父辈
fd896a82
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
18 个修改的文件
包含
182 行增加
和
86 行删除
Common/SettingString.cs
DeviceLibrary/Config/chargeinfos.xml
DeviceLibrary/bean/Agv_Info.cs
DeviceLibrary/bean/ChargePiles.cs
DeviceLibrary/bean/JobParam.cs
DeviceLibrary/bean/JobStep.cs
DeviceLibrary/bean/job/EmptyAGVBackJob.cs
DeviceLibrary/bean/job/FixToInStoreJob.cs
DeviceLibrary/bean/job/GoLineForRecyJob.cs
DeviceLibrary/bean/job/GoWarehouseForOutStoreJob.cs
DeviceLibrary/bean/job/Job.cs
DeviceLibrary/bean/job/SendFixToLineJob.cs
DeviceLibrary/bean/job/StandyJob.cs
DeviceLibrary/bean/job/jobType/JobForFixture.cs
DeviceLibrary/manager/FixMissionManager.cs
DeviceLibrary/manager/OpManager.cs
DeviceLibrary/service/FixtureService.cs
SO940-AGV/App.config
Common/SettingString.cs
查看文件 @
2e45d04
...
@@ -17,6 +17,8 @@ namespace Common
...
@@ -17,6 +17,8 @@ namespace Common
public
const
string
DoorAirIn
=
"DoorAirIn"
;
public
const
string
DoorAirIn
=
"DoorAirIn"
;
public
const
string
DoorAirOut
=
"DoorAirOut"
;
public
const
string
DoorAirOut
=
"DoorAirOut"
;
public
const
string
AutoCharge
=
"AutoCharge"
;
public
const
string
AutoCharge
=
"AutoCharge"
;
public
const
string
PlaySound
=
"PlaySound"
;
public
const
string
StopSound
=
"StopSound"
;
public
const
string
Leave
=
"Leave"
;
public
const
string
Leave
=
"Leave"
;
public
const
string
Enter
=
"Enter"
;
public
const
string
Enter
=
"Enter"
;
public
const
string
Init
=
"Init"
;
public
const
string
Init
=
"Init"
;
...
@@ -36,13 +38,14 @@ namespace Common
...
@@ -36,13 +38,14 @@ namespace Common
public
const
string
FileName_Missions
=
"Missions.json"
;
public
const
string
FileName_Missions
=
"Missions.json"
;
public
const
string
IsUse
=
"IsUse"
;
public
const
string
IsUse
=
"IsUse"
;
public
const
string
RFID
=
"RFID"
;
public
const
string
RFID
=
"RFID"
;
public
const
string
Warehouse
=
"
s
torage"
;
public
const
string
Warehouse
=
"
JIGS
torage"
;
public
const
string
Cancel
=
"Cancel"
;
public
const
string
Cancel
=
"Cancel"
;
public
const
string
C4_STANDBY1
=
"C4_STANDBY1"
;
public
const
string
C4_STANDBY1
=
"C4_STANDBY1"
;
public
const
string
C4_STANDBY2
=
"C4_STANDBY2"
;
public
const
string
C4_STANDBY2
=
"C4_STANDBY2"
;
public
const
string
ChargeThreshold
=
"ChargeThreshold"
;
public
const
string
ChargeThreshold
=
"ChargeThreshold"
;
public
const
string
WaitTimeout
=
"WaitTimeout"
;
public
const
string
StandTimeout
=
"StandTimeout"
;
#
region
配置名
#
region
配置名
public
const
string
ITS
=
"ITS"
;
public
const
string
ITS
=
"ITS"
;
public
const
string
httpServer
=
"http.server"
;
public
const
string
httpServer
=
"http.server"
;
...
...
DeviceLibrary/Config/chargeinfos.xml
查看文件 @
2e45d04
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<fixed>
true
</fixed>
<fixed>
true
</fixed>
<!--固定充电桩为true,取第一个;false则判断所有agv.填写AGV编号-->
<!--固定充电桩为true,取第一个;false则判断所有agv.填写AGV编号-->
<agvs>
<agvs>
<agv>
12
</agv>
<agv>
49
</agv>
</agvs>
</agvs>
</pile>
</pile>
</piles>
</piles>
...
...
DeviceLibrary/bean/Agv_Info.cs
查看文件 @
2e45d04
...
@@ -227,7 +227,7 @@ namespace DeviceLibrary
...
@@ -227,7 +227,7 @@ namespace DeviceLibrary
public
List
<
string
>
RunInfos
;
public
List
<
string
>
RunInfos
;
DateTime
IoStartTime
=
DateTime
.
MaxValue
;
DateTime
IoStartTime
=
DateTime
.
MaxValue
;
int
IoLastTime
=
5000
;
int
IoLastTime
=
5000
;
int
StandLastTimeMinute
=
5
;
int
StandLastTimeMinute
=
AppConfigHelper
.
GetIntValue
(
SettingString
.
StandTimeout
)
;
public
DateTime
StandStartTime
=
DateTime
.
MaxValue
;
public
DateTime
StandStartTime
=
DateTime
.
MaxValue
;
public
bool
SetState
(
eAGVState
stateID
,
int
battery
,
string
missionText
,
MirPosition
position
)
public
bool
SetState
(
eAGVState
stateID
,
int
battery
,
string
missionText
,
MirPosition
position
)
{
{
...
@@ -402,31 +402,40 @@ namespace DeviceLibrary
...
@@ -402,31 +402,40 @@ namespace DeviceLibrary
/// <returns></returns>
/// <returns></returns>
private
void
CheckStandTimeOut
(
MirPosition
position
)
private
void
CheckStandTimeOut
(
MirPosition
position
)
{
{
if
(
IsUse
&&
CurJob
!=
null
&&
(!
this
.
Place
.
Type
.
Equals
(
NodeType
.
AutoCharge
)
||
!
this
.
Place
.
Type
.
Equals
(
NodeType
.
Standby
)
))
if
(
this
.
Place
.
Type
.
Equals
(
NodeType
.
AutoCharge
)
||
this
.
Place
.
Type
.
Equals
(
NodeType
.
Standby
))
{
{
if
(
Math
.
Abs
(
position
.
Point
.
X
-
Position
.
Point
.
X
)
<
1
&&
Math
.
Abs
(
position
.
Point
.
Y
-
Position
.
Point
.
Y
)
<
1
)
StandTimeOut
=
false
;
StandStartTime
=
DateTime
.
Now
;
}
else
{
if
(
IsUse
&&
CurJob
!=
null
)
{
{
//满足条件,计算持续时间
if
(
Math
.
Abs
(
position
.
Point
.
X
-
Position
.
Point
.
X
)
<
0.5
&&
Math
.
Abs
(
position
.
Point
.
Y
-
Position
.
Point
.
Y
)
<
0.5
)
if
(
StandStartTime
==
DateTime
.
MaxValue
)
{
{
//满足条件,计算持续时间
if
(
StandStartTime
==
DateTime
.
MaxValue
)
{
StandStartTime
=
DateTime
.
Now
;
}
TimeSpan
lastTimeSpan
=
DateTime
.
Now
-
StandStartTime
;
StandTimeOut
=
(
lastTimeSpan
.
TotalMinutes
>=
StandLastTimeMinute
);
}
else
{
//重新计时
StandStartTime
=
DateTime
.
Now
;
StandStartTime
=
DateTime
.
Now
;
StandTimeOut
=
false
;
}
}
TimeSpan
lastTimeSpan
=
DateTime
.
Now
-
StandStartTime
;
StandTimeOut
=
(
lastTimeSpan
.
TotalMinutes
>=
StandLastTimeMinute
);
}
}
else
else
{
{
//重新计时
StandStartTime
=
DateTime
.
Now
;
StandTimeOut
=
false
;
StandTimeOut
=
false
;
StandStartTime
=
DateTime
.
Now
;
}
}
}
}
else
{
StandTimeOut
=
false
;
StandStartTime
=
DateTime
.
Now
;
}
Position
=
position
;
Position
=
position
;
}
}
private
void
UpdateDisplayBoard
()
private
void
UpdateDisplayBoard
()
...
@@ -469,17 +478,13 @@ namespace DeviceLibrary
...
@@ -469,17 +478,13 @@ namespace DeviceLibrary
AGVManager
.
ErrorLogRecord
(
new
ErrorInfo
(
this
));
AGVManager
.
ErrorLogRecord
(
new
ErrorInfo
(
this
));
ClearErrorMsg
();
ClearErrorMsg
();
}
}
if
(
!
Msg
.
Equals
(
""
))
if
(
(
Place
.
Type
.
Equals
(
NodeType
.
Standby
)
||
Place
.
Type
.
Equals
(
NodeType
.
AutoCharge
)
))
{
{
msglist
.
Add
(
new
AlarmMsg
(
Name
,
"lineAgv."
+
Name
+
".
Msg"
,
Msg
,
1
));
msglist
.
Add
(
new
AlarmMsg
(
Name
,
"lineAgv."
+
Name
+
".
Place"
,
Place
.
Type
.
ToString
()
,
1
));
}
}
else
else
{
{
if
((
Place
.
Type
.
Equals
(
NodeType
.
Standby
)
||
Place
.
Type
.
Equals
(
NodeType
.
AutoCharge
)))
msglist
.
Add
(
new
AlarmMsg
(
Name
,
"lineAgv."
+
Name
+
".Msg"
,
Msg
,
1
));
{
msglist
.
Add
(
new
AlarmMsg
(
Name
,
"lineAgv."
+
Name
+
".Place"
,
Place
.
Type
.
ToString
(),
1
));
}
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
...
DeviceLibrary/bean/ChargePiles.cs
查看文件 @
2e45d04
...
@@ -93,7 +93,7 @@ namespace DeviceLibrary.bean
...
@@ -93,7 +93,7 @@ namespace DeviceLibrary.bean
{
{
if
(
Fixed
)
if
(
Fixed
)
{
{
if
(
agv
.
Equals
(
Agvs
[
0
]))
if
(
agv
.
ID
.
Equals
(
Agvs
[
0
]))
return
true
;
return
true
;
else
else
return
false
;
return
false
;
...
...
DeviceLibrary/bean/JobParam.cs
查看文件 @
2e45d04
...
@@ -29,12 +29,12 @@ namespace DeviceLibrary.bean
...
@@ -29,12 +29,12 @@ namespace DeviceLibrary.bean
/// </summary>
/// </summary>
public
Shelf
Shelf
{
get
;
set
;
}
public
Shelf
Shelf
{
get
;
set
;
}
public
OpType
OpType
{
get
;
set
;
}
=
OpType
.
ComToLine
;
public
OpType
OpType
{
get
;
set
;
}
=
OpType
.
ComToLine
;
public
JobParam
(
Node
srcplace
,
Node
tarplace
=
null
,
Shelf
shelf
=
null
)
public
JobParam
(
Node
srcplace
,
Node
tarplace
=
null
,
Shelf
shelf
=
null
,
manager
.
MissionInfo
FixMissionInfo
=
null
)
{
{
SrcNode
=
srcplace
;
SrcNode
=
srcplace
;
TargetNode
=
tarplace
;
TargetNode
=
tarplace
;
Shelf
=
shelf
;
Shelf
=
shelf
;
this
.
FixMissionInfo
=
FixMissionInfo
;
}
}
}
}
/// <summary>
/// <summary>
...
...
DeviceLibrary/bean/JobStep.cs
查看文件 @
2e45d04
...
@@ -54,11 +54,11 @@ namespace DeviceLibrary
...
@@ -54,11 +54,11 @@ namespace DeviceLibrary
/// </summary>
/// </summary>
/// <param name="timeOutMilliseconds"></param>
/// <param name="timeOutMilliseconds"></param>
/// <returns></returns>
/// <returns></returns>
public
bool
IsTimeOut
(
int
timeOut
Millis
econds
,
out
TimeSpan
timeOutValue
)
public
bool
IsTimeOut
(
int
timeOut
S
econds
,
out
TimeSpan
timeOutValue
)
{
{
TimeSpan
span
=
DateTime
.
Now
-
startTime
;
TimeSpan
span
=
DateTime
.
Now
-
startTime
;
timeOutValue
=
span
;
timeOutValue
=
span
;
if
(
span
.
Total
Milliseconds
>
timeOutMillis
econds
)
if
(
span
.
Total
Seconds
>
timeOutS
econds
)
{
{
return
true
;
return
true
;
}
}
...
...
DeviceLibrary/bean/job/EmptyAGVBackJob.cs
查看文件 @
2e45d04
...
@@ -19,7 +19,7 @@ namespace DeviceLibrary
...
@@ -19,7 +19,7 @@ namespace DeviceLibrary
/// <summary>
/// <summary>
/// 空车返回任务
/// 空车返回任务
/// </summary>
/// </summary>
public
EmptyAGVBackJob
(
JobParam
jobParam
)
:
base
(
jobParam
)
public
EmptyAGVBackJob
(
JobParam
jobParam
)
:
base
(
jobParam
)
{
{
JobName
=
"空车返回任务"
;
JobName
=
"空车返回任务"
;
}
}
...
@@ -33,15 +33,17 @@ namespace DeviceLibrary
...
@@ -33,15 +33,17 @@ namespace DeviceLibrary
StartJobTime
=
JobRunStep
.
startTime
;
StartJobTime
=
JobRunStep
.
startTime
;
if
(
JobRunStep
.
IsStep
(
RunStep
.
NONE
))
if
(
JobRunStep
.
IsStep
(
RunStep
.
NONE
))
{
{
return
null
;
JobRunStep
.
ToNextStep
(
RunStep
.
END
);
//{
AllocateTask
(
agv
,
SettingString
.
StopSound
);
// JobRunStep.ToNextStep(RunStep.END);
//}
}
}
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
END
))
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
END
))
{
{
JobRunStep
.
EndJob
();
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
return
null
;
{
JobRunStep
.
EndJob
();
return
null
;
}
}
}
return
this
;
return
this
;
}
}
...
...
DeviceLibrary/bean/job/FixToInStoreJob.cs
查看文件 @
2e45d04
...
@@ -105,7 +105,7 @@ namespace DeviceLibrary
...
@@ -105,7 +105,7 @@ namespace DeviceLibrary
}
}
}
}
else
if
(
JobRunStep
.
IsTimeOut
(
15
000
,
out
TimeSpan
timeOutValue
))
else
if
(
JobRunStep
.
IsTimeOut
(
15
,
out
TimeSpan
timeOutValue
))
{
{
tryTimes
++;
tryTimes
++;
if
(
tryTimes
<
3
)
if
(
tryTimes
<
3
)
...
@@ -131,11 +131,11 @@ namespace DeviceLibrary
...
@@ -131,11 +131,11 @@ namespace DeviceLibrary
AllocateTask
(
agv
,
SettingString
.
Init
);
AllocateTask
(
agv
,
SettingString
.
Init
);
WarehouseSigManager
.
StopEnter
=
false
;
WarehouseSigManager
.
StopEnter
=
false
;
}
}
else
if
(
JobRunStep
.
IsTimeOut
(
6000
0
,
out
TimeSpan
timeOutValue1
))
else
if
(
JobRunStep
.
IsTimeOut
(
12
0
,
out
TimeSpan
timeOutValue1
))
{
{
runInfo
=
"治具在["
+
JobParam
.
TargetNode
+
"]离开小车超时"
;
runInfo
=
"治具在["
+
JobParam
.
TargetNode
+
"]离开小车超时"
;
agv
.
HasError
=
true
;
agv
.
HasError
=
true
;
agv
.
SetErrorMsg
(
"治具在["
+
JobParam
.
TargetNode
+
"]
进入
小车超时"
,
timeOutValue1
.
TotalMinutes
.
ToString
(
"f2"
));
agv
.
SetErrorMsg
(
"治具在["
+
JobParam
.
TargetNode
+
"]
离开
小车超时"
,
timeOutValue1
.
TotalMinutes
.
ToString
(
"f2"
));
}
}
}
}
...
@@ -145,7 +145,7 @@ namespace DeviceLibrary
...
@@ -145,7 +145,7 @@ namespace DeviceLibrary
{
{
//调宽
//调宽
JobRunStep
.
ToNextStep
(
RunStep
.
ADJUST_WIDTH
);
JobRunStep
.
ToNextStep
(
RunStep
.
ADJUST_WIDTH
);
runInfo
=
JobParam
.
TargetNode
+
" 有出库任务,开始调宽
"
;
runInfo
=
JobParam
.
TargetNode
+
" 有出库任务,开始调宽
:"
+
WarehouseSigManager
.
OutStore
.
Type
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
AdjustWidth
(
agv
,
WarehouseSigManager
.
OutStore
.
Type
);
AdjustWidth
(
agv
,
WarehouseSigManager
.
OutStore
.
Type
);
}
}
...
@@ -163,7 +163,7 @@ namespace DeviceLibrary
...
@@ -163,7 +163,7 @@ namespace DeviceLibrary
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
{
{
JobRunStep
.
ToNextStep
(
RunStep
.
RECY_BACK_WAIT_RESPONSE
);
JobRunStep
.
ToNextStep
(
RunStep
.
RECY_BACK_WAIT_RESPONSE
);
runInfo
=
$
"调宽完成"
;
runInfo
=
$
"
{WarehouseSigManager.OutStore.Type}
调宽完成"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
}
}
}
}
...
@@ -186,7 +186,7 @@ namespace DeviceLibrary
...
@@ -186,7 +186,7 @@ namespace DeviceLibrary
runInfo
=
"治具进入AGV完成"
;
runInfo
=
"治具进入AGV完成"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
}
}
else
if
(
JobRunStep
.
IsTimeOut
(
6000
0
,
out
TimeSpan
timeOutValue
))
else
if
(
JobRunStep
.
IsTimeOut
(
12
0
,
out
TimeSpan
timeOutValue
))
{
{
//链条停止
//链条停止
runInfo
=
"治具在["
+
JobParam
.
TargetNode
.
Name
+
"]进入小车超时"
;
runInfo
=
"治具在["
+
JobParam
.
TargetNode
.
Name
+
"]进入小车超时"
;
...
...
DeviceLibrary/bean/job/GoLineForRecyJob.cs
查看文件 @
2e45d04
...
@@ -17,7 +17,7 @@ namespace DeviceLibrary
...
@@ -17,7 +17,7 @@ namespace DeviceLibrary
{
{
JobName
=
"治具回收任务"
;
JobName
=
"治具回收任务"
;
}
}
int
WaitTimeOut
=
AppConfigHelper
.
GetIntValue
(
SettingString
.
WaitTimeout
);
/// <summary>
/// <summary>
/// 料架回收任务
/// 料架回收任务
/// </summary>
/// </summary>
...
@@ -252,13 +252,16 @@ namespace DeviceLibrary
...
@@ -252,13 +252,16 @@ namespace DeviceLibrary
if
(
agv
.
TaskRunState
.
CheckAllocateOk
())
if
(
agv
.
TaskRunState
.
CheckAllocateOk
())
{
{
JobRunStep
.
ToNextStep
(
RunStep
.
RECY_TO_WAIT_REACH_PLACE
);
JobRunStep
.
ToNextStep
(
RunStep
.
RECY_TO_WAIT_REACH_PLACE
);
WarehouseSigManager
.
TargetWithFix
.
CurPlace
=
JobParam
.
TargetNode
.
Name
;
}
}
}
}
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
RECY_TO_WAIT_REACH_PLACE
))
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
RECY_TO_WAIT_REACH_PLACE
))
{
{
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
{
{
WarehouseSigManager
.
TargetWithFix
.
CurPlace
=
JobParam
.
TargetNode
.
Name
;
//设置音效类型并播放
SetPlcWithToInstore
(
agv
);
AllocateTask
(
agv
,
SettingString
.
PlaySound
);
if
(
JobParam
.
OpType
.
Equals
(
OpType
.
ComToLine
))
if
(
JobParam
.
OpType
.
Equals
(
OpType
.
ComToLine
))
{
{
JobRunStep
.
ToNextStep
(
RunStep
.
RECY_TO_WAIT_LINE_RESPONSE
);
JobRunStep
.
ToNextStep
(
RunStep
.
RECY_TO_WAIT_LINE_RESPONSE
);
...
@@ -290,7 +293,7 @@ namespace DeviceLibrary
...
@@ -290,7 +293,7 @@ namespace DeviceLibrary
runInfo
=
"人员在"
+
JobParam
.
TargetNode
+
"操作完成"
;
runInfo
=
"人员在"
+
JobParam
.
TargetNode
+
"操作完成"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
EndJob
();
JobRunStep
.
EndJob
();
return
new
FixToInStoreJob
(
new
JobParam
(
JobParam
.
TargetNode
,
null
,
JobParam
.
Shelf
==
null
?
null
:
JobParam
.
Shelf
.
ToCopy
()));
return
new
FixToInStoreJob
(
new
JobParam
(
JobParam
.
TargetNode
,
null
,
JobParam
.
Shelf
==
null
?
null
:
JobParam
.
Shelf
.
ToCopy
()
,
JobParam
.
FixMissionInfo
));
}
}
}
}
else
if
(
JobParam
.
OpType
.
Equals
(
OpType
.
RequestAPI
))
else
if
(
JobParam
.
OpType
.
Equals
(
OpType
.
RequestAPI
))
...
@@ -302,16 +305,34 @@ namespace DeviceLibrary
...
@@ -302,16 +305,34 @@ namespace DeviceLibrary
JobRunStep
.
ToNextStep
(
RunStep
.
END
);
JobRunStep
.
ToNextStep
(
RunStep
.
END
);
runInfo
=
"到达"
+
JobParam
.
TargetNode
+
",该任务被取消"
;
runInfo
=
"到达"
+
JobParam
.
TargetNode
+
",该任务被取消"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
//关闭音效
CloseSound
(
agv
);
AllocateTask
(
agv
,
SettingString
.
StopSound
);
System
.
Threading
.
Thread
.
Sleep
(
5000
);
}
}
else
else
{
{
runInfo
=
"人员在"
+
JobParam
.
TargetNode
+
"操作完成"
;
runInfo
=
"人员在"
+
JobParam
.
TargetNode
+
"操作完成"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
EndJob
();
JobRunStep
.
EndJob
();
return
new
FixToInStoreJob
(
new
JobParam
(
JobParam
.
TargetNode
,
NodeManager
.
GetNodeByName
(
target
),
JobParam
.
Shelf
==
null
?
null
:
JobParam
.
Shelf
.
ToCopy
()));
//关闭音效
CloseSound
(
agv
);
AllocateTask
(
agv
,
SettingString
.
StopSound
);
System
.
Threading
.
Thread
.
Sleep
(
5000
);
return
new
FixToInStoreJob
(
new
JobParam
(
JobParam
.
TargetNode
,
NodeManager
.
GetNodeByName
(
target
),
JobParam
.
Shelf
==
null
?
null
:
JobParam
.
Shelf
.
ToCopy
(),
JobParam
.
FixMissionInfo
));
}
}
}
}
else
if
(
JobRunStep
.
IsTimeOut
(
WaitTimeOut
*
60
,
out
TimeSpan
timeSpan
)
&&
!
agv
.
IsExistShelf
)
{
JobRunStep
.
ToNextStep
(
RunStep
.
END
);
runInfo
=
"到达"
+
JobParam
.
TargetNode
+
$
",该任务超时{WaitTimeOut}分钟,自动取消"
;
JobRunStep
.
Msg
=
runInfo
;
//关闭音效
CloseSound
(
agv
);
AllocateTask
(
agv
,
SettingString
.
StopSound
);
System
.
Threading
.
Thread
.
Sleep
(
5000
);
}
}
}
else
if
(
JobParam
.
OpType
.
Equals
(
OpType
.
MaulAndAPI
))
else
if
(
JobParam
.
OpType
.
Equals
(
OpType
.
MaulAndAPI
))
{
{
...
@@ -320,7 +341,7 @@ namespace DeviceLibrary
...
@@ -320,7 +341,7 @@ namespace DeviceLibrary
runInfo
=
"人员在"
+
JobParam
.
TargetNode
+
"操作完成"
;
runInfo
=
"人员在"
+
JobParam
.
TargetNode
+
"操作完成"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
EndJob
();
JobRunStep
.
EndJob
();
return
new
FixToInStoreJob
(
new
JobParam
(
JobParam
.
TargetNode
,
null
,
JobParam
.
Shelf
==
null
?
null
:
JobParam
.
Shelf
.
ToCopy
()));
return
new
FixToInStoreJob
(
new
JobParam
(
JobParam
.
TargetNode
,
null
,
JobParam
.
Shelf
==
null
?
null
:
JobParam
.
Shelf
.
ToCopy
()
,
JobParam
.
FixMissionInfo
));
}
}
}
}
}
}
...
@@ -341,7 +362,7 @@ namespace DeviceLibrary
...
@@ -341,7 +362,7 @@ namespace DeviceLibrary
AllocateTask
(
agv
,
SettingString
.
Enter
);
AllocateTask
(
agv
,
SettingString
.
Enter
);
}
}
else
if
(
JobRunStep
.
IsTimeOut
(
15
000
,
out
TimeSpan
timeOutValue
))
else
if
(
JobRunStep
.
IsTimeOut
(
15
,
out
TimeSpan
timeOutValue
))
{
{
agv
.
HasError
=
true
;
agv
.
HasError
=
true
;
agv
.
SetErrorMsg
(
$
"线体{JobParam.TargetNode}对出料请求无响应"
,
timeOutValue
.
TotalMinutes
.
ToString
(
"f2"
));
agv
.
SetErrorMsg
(
$
"线体{JobParam.TargetNode}对出料请求无响应"
,
timeOutValue
.
TotalMinutes
.
ToString
(
"f2"
));
...
@@ -356,7 +377,7 @@ namespace DeviceLibrary
...
@@ -356,7 +377,7 @@ namespace DeviceLibrary
return
new
FixToInStoreJob
(
new
JobParam
(
JobParam
.
TargetNode
.
ToCopy
()));
return
new
FixToInStoreJob
(
new
JobParam
(
JobParam
.
TargetNode
.
ToCopy
()));
}
}
else
if
(
JobRunStep
.
IsTimeOut
(
6000
0
,
out
TimeSpan
timeOutValue
))
else
if
(
JobRunStep
.
IsTimeOut
(
12
0
,
out
TimeSpan
timeOutValue
))
{
{
//链条停止
//链条停止
runInfo
=
"空料架在["
+
JobParam
.
TargetNode
+
"]进入小车超时"
;
runInfo
=
"空料架在["
+
JobParam
.
TargetNode
+
"]进入小车超时"
;
...
...
DeviceLibrary/bean/job/GoWarehouseForOutStoreJob.cs
查看文件 @
2e45d04
...
@@ -29,7 +29,7 @@ namespace DeviceLibrary
...
@@ -29,7 +29,7 @@ namespace DeviceLibrary
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
AdjustWidth
(
agv
,
JobParam
.
FixMissionInfo
.
Type
);
AdjustWidth
(
agv
,
JobParam
.
FixMissionInfo
.
Type
);
}
}
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
ADJUST_WIDTH
))
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
ADJUST_WIDTH
))
{
{
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
{
{
...
@@ -121,13 +121,6 @@ namespace DeviceLibrary
...
@@ -121,13 +121,6 @@ namespace DeviceLibrary
}
}
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
WAIT_DOUBLE_LINE_RESPONSE
))
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
WAIT_DOUBLE_LINE_RESPONSE
))
{
{
//Node node = NodeManager.GetNodeByName(JobParam.TargetNode.Name);
//if (node == null)
//{
// runInfo = "未找到节点:" + JobParam.TargetNode.Name;
// JobRunStep.Msg = runInfo;
// return this;
//}
if
(
WarehouseSigManager
.
MayLeave
)
if
(
WarehouseSigManager
.
MayLeave
)
{
{
agv
.
HasError
=
false
;
agv
.
HasError
=
false
;
...
@@ -136,9 +129,19 @@ namespace DeviceLibrary
...
@@ -136,9 +129,19 @@ namespace DeviceLibrary
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
AllocateTask
(
agv
,
SettingString
.
Enter
);
AllocateTask
(
agv
,
SettingString
.
Enter
);
WarehouseSigManager
.
MayLeave
=
false
;
WarehouseSigManager
.
MayLeave
=
false
;
}
}
else
if
(
JobRunStep
.
IsTimeOut
(
15000
,
out
TimeSpan
timeOutValue
))
else
if
(
OpManager
.
Info
.
GetTransfer
(
out
string
target
))
{
if
(
target
.
Equals
(
SettingString
.
Cancel
))
{
agv
.
HasError
=
false
;
runInfo
=
$
"收到离开信号,出库任务取消"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
EndJob
();
return
null
;
}
}
else
if
(
JobRunStep
.
IsTimeOut
(
15
,
out
TimeSpan
timeOutValue
))
{
{
//JobRunStep.ToNextStep(RunStep.WAIT_AGV_REACH_A6);
//JobRunStep.ToNextStep(RunStep.WAIT_AGV_REACH_A6);
agv
.
HasError
=
true
;
agv
.
HasError
=
true
;
...
@@ -152,13 +155,13 @@ namespace DeviceLibrary
...
@@ -152,13 +155,13 @@ namespace DeviceLibrary
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
{
{
agv
.
HasError
=
false
;
agv
.
HasError
=
false
;
//GoFullShelfStationStep.ToNextStep(RunStep.END
);
JobRunStep
.
ToNextStep
(
RunStep
.
WAIT_LEAVE_SIG
);
runInfo
=
JobParam
.
TargetNode
.
Name
+
"治具进入小车完成"
;
runInfo
=
JobParam
.
TargetNode
.
Name
+
"治具进入小车完成"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
EndJob
();
//
JobRunStep.EndJob();
return
new
SendFixToLineJob
(
new
JobParam
(
JobParam
.
TargetNode
.
ToCopy
()),
true
);
//
return new SendFixToLineJob(new JobParam(JobParam.TargetNode.ToCopy()),true);
}
}
else
if
(
JobRunStep
.
IsTimeOut
(
6000
0
,
out
TimeSpan
timeOutValue
))
else
if
(
JobRunStep
.
IsTimeOut
(
12
0
,
out
TimeSpan
timeOutValue
))
{
{
//链条停止
//链条停止
runInfo
=
"治具在["
+
JobParam
.
TargetNode
.
Name
+
"]进入小车超时"
;
runInfo
=
"治具在["
+
JobParam
.
TargetNode
.
Name
+
"]进入小车超时"
;
...
@@ -169,15 +172,16 @@ namespace DeviceLibrary
...
@@ -169,15 +172,16 @@ namespace DeviceLibrary
}
}
}
}
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
WAIT_LEAVE_SIG
))
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
WAIT_LEAVE_SIG
))
{
{
if
(
OpManager
.
Info
.
GetTransfer
(
out
string
target
))
if
(
OpManager
.
Info
.
GetTransfer
(
out
string
target
))
{
{
if
(!
target
.
Equals
(
SettingString
.
Cancel
))
if
(!
target
.
Equals
(
SettingString
.
Cancel
))
{
{
agv
.
HasError
=
false
;
agv
.
HasError
=
false
;
runInfo
=
$
"收到离开信号,开始运送出库治具
"
;
runInfo
=
$
"收到离开信号,开始运送出库治具
到"
+
target
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
EndJob
();
return
new
SendFixToLineJob
(
new
JobParam
(
JobParam
.
TargetNode
,
NodeManager
.
GetNodeByName
(
target
)),
true
);
return
new
SendFixToLineJob
(
new
JobParam
(
JobParam
.
TargetNode
,
NodeManager
.
GetNodeByName
(
target
)),
true
);
}
}
else
else
...
@@ -187,7 +191,7 @@ namespace DeviceLibrary
...
@@ -187,7 +191,7 @@ namespace DeviceLibrary
}
}
}
}
}
}
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
END
))
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
END
))
{
{
JobRunStep
.
EndJob
();
JobRunStep
.
EndJob
();
return
null
;
return
null
;
...
...
DeviceLibrary/bean/job/Job.cs
查看文件 @
2e45d04
...
@@ -75,6 +75,42 @@ namespace DeviceLibrary
...
@@ -75,6 +75,42 @@ namespace DeviceLibrary
AllocateTask
(
agv
,
SettingString
.
Adjust
);
AllocateTask
(
agv
,
SettingString
.
Adjust
);
}
}
/// <summary>
/// <summary>
/// 设置PLC值
/// </summary>
/// <param name="agv"></param>
/// <param name="port"></param>
/// <param name="val"></param>
protected
void
SetPlc
(
Agv_Info
agv
,
int
port
,
int
val
)
{
int
times
=
0
;
while
(!
MiR_API
.
Set_Register
(
agv
,
port
,
val
))
{
if
(
times
>
5
)
break
;
}
}
/// <summary>
/// 入库类型-1
/// </summary>
/// <param name="agv"></param>
protected
void
SetPlcWithToInstore
(
Agv_Info
agv
)
{
SetPlc
(
agv
,
51
,
1
);
}
/// <summary>
/// 出库类型-2
/// </summary>
/// <param name="agv"></param>
protected
void
SetPlcWithToOutstore
(
Agv_Info
agv
)
{
SetPlc
(
agv
,
51
,
2
);
}
protected
void
CloseSound
(
Agv_Info
agv
)
{
SetPlc
(
agv
,
51
,
0
);
}
/// <summary>
/// 任务重发
/// 任务重发
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
...
...
DeviceLibrary/bean/job/SendFixToLineJob.cs
查看文件 @
2e45d04
...
@@ -37,7 +37,7 @@ namespace DeviceLibrary
...
@@ -37,7 +37,7 @@ namespace DeviceLibrary
else
else
{
{
JobRunStep
.
ToNextStep
(
RunStep
.
SF_WAIT_AGV_REACH_LINE
);
JobRunStep
.
ToNextStep
(
RunStep
.
SF_WAIT_AGV_REACH_LINE
);
runInfo
=
string
.
Format
(
"前往{0}
,先过门
"
,
JobParam
.
TargetNode
);
runInfo
=
string
.
Format
(
"前往{0}"
,
JobParam
.
TargetNode
);
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
AllocateTask
(
agv
,
JobParam
.
TargetNode
.
Name
);
AllocateTask
(
agv
,
JobParam
.
TargetNode
.
Name
);
}
}
...
@@ -59,14 +59,14 @@ namespace DeviceLibrary
...
@@ -59,14 +59,14 @@ namespace DeviceLibrary
if
(
JobParam
.
TargetNode
.
Area
.
Equals
(
Area
.
C
)
||
JobParam
.
TargetNode
.
Area
.
Equals
(
Area
.
Air_C
))
if
(
JobParam
.
TargetNode
.
Area
.
Equals
(
Area
.
C
)
||
JobParam
.
TargetNode
.
Area
.
Equals
(
Area
.
Air_C
))
{
{
JobRunStep
.
ToNextStep
(
RunStep
.
WAIT_IN_ROOM_C
);
JobRunStep
.
ToNextStep
(
RunStep
.
WAIT_IN_ROOM_C
);
runInfo
=
string
.
Format
(
"前往{0}
,先过门
"
,
JobParam
.
TargetNode
);
runInfo
=
string
.
Format
(
"前往{0}"
,
JobParam
.
TargetNode
);
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
AllocateTask
(
agv
,
SettingString
.
DoorDToC
);
AllocateTask
(
agv
,
SettingString
.
DoorDToC
);
}
}
else
else
{
{
JobRunStep
.
ToNextStep
(
RunStep
.
SF_WAIT_AGV_REACH_LINE
);
JobRunStep
.
ToNextStep
(
RunStep
.
SF_WAIT_AGV_REACH_LINE
);
runInfo
=
string
.
Format
(
"前往{0}
,先过门
"
,
JobParam
.
TargetNode
);
runInfo
=
string
.
Format
(
"前往{0}"
,
JobParam
.
TargetNode
);
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
AllocateTask
(
agv
,
JobParam
.
TargetNode
.
Name
);
AllocateTask
(
agv
,
JobParam
.
TargetNode
.
Name
);
}
}
...
@@ -141,7 +141,9 @@ namespace DeviceLibrary
...
@@ -141,7 +141,9 @@ namespace DeviceLibrary
{
{
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
{
{
//设置音效类型
SetPlcWithToOutstore
(
agv
);
AllocateTask
(
agv
,
SettingString
.
PlaySound
);
if
(
JobParam
.
OpType
.
Equals
(
OpType
.
ComToLine
))
if
(
JobParam
.
OpType
.
Equals
(
OpType
.
ComToLine
))
{
{
JobRunStep
.
ToNextStep
(
RunStep
.
SF_WAIT_LINE_RESPONSE
);
JobRunStep
.
ToNextStep
(
RunStep
.
SF_WAIT_LINE_RESPONSE
);
...
@@ -167,6 +169,9 @@ namespace DeviceLibrary
...
@@ -167,6 +169,9 @@ namespace DeviceLibrary
runInfo
=
"人员在"
+
JobParam
.
TargetNode
+
"操作完成"
;
runInfo
=
"人员在"
+
JobParam
.
TargetNode
+
"操作完成"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
EndJob
();
JobRunStep
.
EndJob
();
//关闭音效
CloseSound
(
agv
);
AllocateTask
(
agv
,
SettingString
.
StopSound
);
return
new
EmptyAGVBackJob
(
new
JobParam
(
JobParam
.
TargetNode
,
null
,
JobParam
.
Shelf
==
null
?
null
:
JobParam
.
Shelf
.
ToCopy
()));
return
new
EmptyAGVBackJob
(
new
JobParam
(
JobParam
.
TargetNode
,
null
,
JobParam
.
Shelf
==
null
?
null
:
JobParam
.
Shelf
.
ToCopy
()));
}
}
}
}
...
@@ -177,6 +182,9 @@ namespace DeviceLibrary
...
@@ -177,6 +182,9 @@ namespace DeviceLibrary
runInfo
=
"人员在"
+
JobParam
.
TargetNode
+
"操作完成"
;
runInfo
=
"人员在"
+
JobParam
.
TargetNode
+
"操作完成"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
EndJob
();
JobRunStep
.
EndJob
();
//关闭音效
CloseSound
(
agv
);
AllocateTask
(
agv
,
SettingString
.
StopSound
);
return
new
FixToInStoreJob
(
new
JobParam
(
JobParam
.
TargetNode
,
null
,
JobParam
.
Shelf
==
null
?
null
:
JobParam
.
Shelf
.
ToCopy
()));
return
new
FixToInStoreJob
(
new
JobParam
(
JobParam
.
TargetNode
,
null
,
JobParam
.
Shelf
==
null
?
null
:
JobParam
.
Shelf
.
ToCopy
()));
}
}
}
}
...
@@ -187,6 +195,9 @@ namespace DeviceLibrary
...
@@ -187,6 +195,9 @@ namespace DeviceLibrary
runInfo
=
"人员在"
+
JobParam
.
TargetNode
+
"操作完成"
;
runInfo
=
"人员在"
+
JobParam
.
TargetNode
+
"操作完成"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
EndJob
();
JobRunStep
.
EndJob
();
//关闭音效
CloseSound
(
agv
);
AllocateTask
(
agv
,
SettingString
.
StopSound
);
return
new
FixToInStoreJob
(
new
JobParam
(
JobParam
.
TargetNode
,
null
,
JobParam
.
Shelf
.
ToCopy
()));
return
new
FixToInStoreJob
(
new
JobParam
(
JobParam
.
TargetNode
,
null
,
JobParam
.
Shelf
.
ToCopy
()));
}
}
}
}
...
@@ -203,7 +214,7 @@ namespace DeviceLibrary
...
@@ -203,7 +214,7 @@ namespace DeviceLibrary
AllocateTask
(
agv
,
SettingString
.
Leave
);
AllocateTask
(
agv
,
SettingString
.
Leave
);
}
}
else
if
(
JobRunStep
.
IsTimeOut
(
15
000
,
out
TimeSpan
timeOutValue
))
else
if
(
JobRunStep
.
IsTimeOut
(
15
,
out
TimeSpan
timeOutValue
))
{
{
JobRunStep
.
ToNextStep
(
RunStep
.
SF_WAIT_AGV_REACH_LINE
);
JobRunStep
.
ToNextStep
(
RunStep
.
SF_WAIT_AGV_REACH_LINE
);
runInfo
=
"到达"
+
JobParam
.
TargetNode
+
",15秒后重新向线体发送入料架请求"
;
runInfo
=
"到达"
+
JobParam
.
TargetNode
+
",15秒后重新向线体发送入料架请求"
;
...
@@ -223,7 +234,7 @@ namespace DeviceLibrary
...
@@ -223,7 +234,7 @@ namespace DeviceLibrary
JobRunStep
.
EndJob
();
JobRunStep
.
EndJob
();
return
new
EmptyAGVBackJob
(
new
JobParam
(
JobParam
.
TargetNode
.
ToCopy
()));
return
new
EmptyAGVBackJob
(
new
JobParam
(
JobParam
.
TargetNode
.
ToCopy
()));
}
}
else
if
(
JobRunStep
.
IsTimeOut
(
6000
0
,
out
TimeSpan
timeOutValue
))
else
if
(
JobRunStep
.
IsTimeOut
(
12
0
,
out
TimeSpan
timeOutValue
))
{
{
//链条停止
//链条停止
runInfo
=
"料架在"
+
JobParam
.
TargetNode
+
"离开小车超时"
;
runInfo
=
"料架在"
+
JobParam
.
TargetNode
+
"离开小车超时"
;
...
...
DeviceLibrary/bean/job/StandyJob.cs
查看文件 @
2e45d04
...
@@ -89,7 +89,7 @@ namespace DeviceLibrary
...
@@ -89,7 +89,7 @@ namespace DeviceLibrary
if
(
job
!=
null
&&
!(
job
is
StandyJob
))
if
(
job
!=
null
&&
!(
job
is
StandyJob
))
{
{
if
(
job
is
ChargeJob
&&
agv
.
Battery
>
BatteryMid
)
if
(
job
is
ChargeJob
&&
agv
.
Battery
>
BatteryMid
)
return
null
;
return
this
;
runInfo
=
"在待机位检测到任务,执行任务"
;
runInfo
=
"在待机位检测到任务,执行任务"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
EndJob
();
JobRunStep
.
EndJob
();
...
...
DeviceLibrary/bean/job/jobType/JobForFixture.cs
查看文件 @
2e45d04
...
@@ -22,9 +22,9 @@ namespace DeviceLibrary
...
@@ -22,9 +22,9 @@ namespace DeviceLibrary
{
{
if
(!
agv
.
IsIdle
())
if
(!
agv
.
IsIdle
())
return
null
;
return
null
;
if
(
FixMissionManager
.
HasNext
())
if
(
FixMissionManager
.
HasNext
(
MissionType
.
Line
))
{
{
MissionInfo
fixMissionInfo
=
manager
.
FixMissionManager
.
ExecuteMission
(
);
MissionInfo
fixMissionInfo
=
manager
.
FixMissionManager
.
ExecuteMission
(
MissionType
.
Line
);
JobParam
jobParam
=
new
JobParam
(
agv
.
Place
);
JobParam
jobParam
=
new
JobParam
(
agv
.
Place
);
jobParam
.
FixMissionInfo
=
fixMissionInfo
;
jobParam
.
FixMissionInfo
=
fixMissionInfo
;
jobParam
.
SrcNode
=
agv
.
Place
;
jobParam
.
SrcNode
=
agv
.
Place
;
...
@@ -34,7 +34,15 @@ namespace DeviceLibrary
...
@@ -34,7 +34,15 @@ namespace DeviceLibrary
jobParam
.
OpType
=
OpType
.
RequestAPI
;
jobParam
.
OpType
=
OpType
.
RequestAPI
;
return
new
GoLineForRecyJob
(
jobParam
);
return
new
GoLineForRecyJob
(
jobParam
);
}
}
else
if
(
fixMissionInfo
.
MissionType
.
Equals
(
MissionType
.
Warehouse
))
}
else
if
(
FixMissionManager
.
HasNext
(
MissionType
.
Warehouse
))
{
MissionInfo
fixMissionInfo
=
manager
.
FixMissionManager
.
ExecuteMission
(
MissionType
.
Warehouse
);
JobParam
jobParam
=
new
JobParam
(
agv
.
Place
);
jobParam
.
FixMissionInfo
=
fixMissionInfo
;
jobParam
.
SrcNode
=
agv
.
Place
;
jobParam
.
TargetNode
=
NodeManager
.
GetNodeByName
(
fixMissionInfo
.
Target
);
if
(
fixMissionInfo
.
MissionType
.
Equals
(
MissionType
.
Warehouse
))
{
{
return
new
GoWarehouseForOutStoreJob
(
jobParam
);
return
new
GoWarehouseForOutStoreJob
(
jobParam
);
}
}
...
...
DeviceLibrary/manager/FixMissionManager.cs
查看文件 @
2e45d04
...
@@ -73,9 +73,10 @@ namespace DeviceLibrary.manager
...
@@ -73,9 +73,10 @@ namespace DeviceLibrary.manager
{
{
web
.
Close
();
web
.
Close
();
}
}
public
static
bool
HasNext
()
public
static
bool
HasNext
(
MissionType
missionType
)
{
{
if
(
fixMissionInfos
.
Count
>
0
)
List
<
MissionInfo
>
has
=
fixMissionInfos
.
FindAll
(
s
=>
s
.
MissionType
.
Equals
(
missionType
));
if
(
has
!=
null
&&
has
.
Count
>
0
)
return
true
;
return
true
;
return
false
;
return
false
;
}
}
...
@@ -112,15 +113,16 @@ namespace DeviceLibrary.manager
...
@@ -112,15 +113,16 @@ namespace DeviceLibrary.manager
WriteMission
();
WriteMission
();
MissionChangedEvent
?.
Invoke
();
MissionChangedEvent
?.
Invoke
();
}
}
public
static
MissionInfo
ExecuteMission
()
public
static
MissionInfo
ExecuteMission
(
MissionType
missionType
)
{
{
MissionInfo
missionInfo
=
null
;
MissionInfo
missionInfo
=
null
;
try
try
{
{
if
(
Monitor
.
TryEnter
(
lockObj
,
1000
))
if
(
Monitor
.
TryEnter
(
lockObj
,
1000
))
{
{
missionInfo
=
fixMissionInfos
[
0
];
fixMissionInfos
.
RemoveAt
(
0
);
missionInfo
=
fixMissionInfos
.
Find
(
s
=>
s
.
MissionType
.
Equals
(
missionType
));
fixMissionInfos
.
Remove
(
missionInfo
);
}
}
}
}
catch
(
Exception
e
)
catch
(
Exception
e
)
...
...
DeviceLibrary/manager/OpManager.cs
查看文件 @
2e45d04
...
@@ -40,7 +40,7 @@ namespace DeviceLibrary
...
@@ -40,7 +40,7 @@ namespace DeviceLibrary
{
{
public
static
void
RemoveRfidBufInfo
(
string
rfid
)
public
static
void
RemoveRfidBufInfo
(
string
rfid
)
{
{
HttpManager
.
AgvRemoveRfid
(
rfid
);
//
HttpManager.AgvRemoveRfid(rfid);
}
}
}
}
...
...
DeviceLibrary/service/FixtureService.cs
查看文件 @
2e45d04
此文件的差异被折叠,
点击展开。
SO940-AGV/App.config
查看文件 @
2e45d04
...
@@ -6,13 +6,17 @@
...
@@ -6,13 +6,17 @@
<
appSettings
>
<
appSettings
>
<
add
key
=
"ITS"
value
=
"10.85.17.233"
/>
<
add
key
=
"ITS"
value
=
"10.85.17.233"
/>
<
add
key
=
"WebService"
value
=
"http://1
27.0.0.1:8888
/service/agv/"
/>
<
add
key
=
"WebService"
value
=
"http://1
0.85.196.40
/service/agv/"
/>
<
add
key
=
"http.server"
value
=
"http://10.85.1
62.124
/myproject/"
/>
<
add
key
=
"http.server"
value
=
"http://10.85.1
99.25
/myproject/"
/>
<
add
key
=
"FLEET"
value
=
"10.85.19.3"
/>
<
add
key
=
"FLEET"
value
=
"10.85.19.3"
/>
<
add
key
=
"log4net_configname"
value
=
"log4net.config"
/>
<
add
key
=
"log4net_configname"
value
=
"log4net.config"
/>
<
add
key
=
"File_AgvInfo"
value
=
"agvinfos.xml"
/>
<
add
key
=
"File_AgvInfo"
value
=
"agvinfos.xml"
/>
<
add
key
=
"File_AgvTaskInfo"
value
=
"taskinfos.xml"
/>
<
add
key
=
"File_AgvTaskInfo"
value
=
"taskinfos.xml"
/>
<
add
key
=
"File_NodeInfo"
value
=
"nodeinfos.xml"
/>
<
add
key
=
"File_NodeInfo"
value
=
"nodeinfos.xml"
/>
<
add
key
=
"ChargeThreshold"
value
=
"20,90"
/>
<
add
key
=
"ChargeThreshold"
value
=
"20,90"
/>
<!--等待人员操作超时时间(分钟)-->
<
add
key
=
"WaitTimeout"
value
=
"5"
/>
<!--停留超时异常上报时间(分钟)-->
<
add
key
=
"StandTimeout"
value
=
"6"
/>
</
appSettings
>
</
appSettings
>
</
configuration
>
</
configuration
>
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论