Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
SO940-AGV
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit aed2a716
由
张东亮
编写于
2021-07-06 15:21:53 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
接口变化以及流程变更
1 个父辈
0c83f472
全部展开
显示空白字符变更
内嵌
并排
正在显示
26 个修改的文件
包含
429 行增加
和
100 行删除
Common/SettingString.cs
DeviceLibrary/Config/nodeinfos.xml
DeviceLibrary/Config/taskinfos.xml
DeviceLibrary/Control.cs
DeviceLibrary/DeviceLibrary.csproj
DeviceLibrary/bean/RunStep.cs
DeviceLibrary/bean/TaskRunState.cs
DeviceLibrary/bean/job/EmptyAGVBackJob.cs
DeviceLibrary/bean/job/EmptyShelfBackJob.cs → DeviceLibrary/bean/job/FixToInStoreJob.cs
DeviceLibrary/bean/job/GoEmptyShelfLineJob.cs → DeviceLibrary/bean/job/GoLineForRecyJob.cs
DeviceLibrary/bean/job/GoFullShelfStationJob.cs → DeviceLibrary/bean/job/GoWarehouseForOutStoreJob.cs
DeviceLibrary/bean/job/Job.cs
DeviceLibrary/bean/job/SendFullShelfToLineJob.cs → DeviceLibrary/bean/job/SendFixToLineJob.cs
DeviceLibrary/bean/job/StandyJob.cs
DeviceLibrary/bean/job/jobType/JobForFixture.cs
DeviceLibrary/manager/AgvTaskManager.cs
DeviceLibrary/manager/ChargePileManager.cs
DeviceLibrary/manager/OpManager.cs
DeviceLibrary/manager/WarehouseSigManager.cs
DeviceLibrary/service/FixtureService.cs
DeviceLibrary/service/FixMissionInfo.cs → DeviceLibrary/service/MissionInfo.cs
SO940-AGV/App.config
SO940-AGV/FrmMain.cs
SO940-AGV/Manual.cs
SO940-AGV/log4net.config
_system~.ini
Common/SettingString.cs
查看文件 @
aed2a71
...
@@ -20,6 +20,7 @@ namespace Common
...
@@ -20,6 +20,7 @@ namespace Common
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"
;
public
const
string
Adjust
=
"Adjust"
;
//任务状态
//任务状态
...
@@ -35,7 +36,8 @@ namespace Common
...
@@ -35,7 +36,8 @@ 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
=
"Warehouse"
;
public
const
string
Warehouse
=
"storage"
;
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"
;
...
...
DeviceLibrary/Config/nodeinfos.xml
查看文件 @
aed2a71
...
@@ -382,7 +382,7 @@
...
@@ -382,7 +382,7 @@
<!--节点IP,不需要通讯的设为空-->
<!--节点IP,不需要通讯的设为空-->
<ip></ip>
<ip></ip>
<!--名称-->
<!--名称-->
<name>
Warehous
e
</name>
<name>
storag
e
</name>
<!--是否调用-->
<!--是否调用-->
<IsUse>
true
</IsUse>
<IsUse>
true
</IsUse>
<!--别名-->
<!--别名-->
...
...
DeviceLibrary/Config/taskinfos.xml
查看文件 @
aed2a71
...
@@ -217,4 +217,11 @@
...
@@ -217,4 +217,11 @@
<!--任务类型:None,Move,Dock,InOut-->
<!--任务类型:None,Move,Dock,InOut-->
<type>
Move
</type>
<type>
Move
</type>
</task>
</task>
<task
id =
"31"
>
<name>
Adjust
</name>
<alicename>
调宽
</alicename>
<guid>
615cef05-61f4-11eb-96a9-0001297a1dca
</guid>
<!--任务类型:None,Move,Dock,InOut-->
<type>
None
</type>
</task>
</tasks>
</tasks>
\ No newline at end of file
\ No newline at end of file
DeviceLibrary/Control.cs
查看文件 @
aed2a71
...
@@ -151,7 +151,17 @@ namespace DeviceLibrary
...
@@ -151,7 +151,17 @@ namespace DeviceLibrary
if
(!
AGVManager
.
agvInfo
[
i
].
IsUse
)
continue
;
//AGV是否可用
if
(!
AGVManager
.
agvInfo
[
i
].
IsUse
)
continue
;
//AGV是否可用
//Ready,Pause,Executing,Error
//Ready,Pause,Executing,Error
if
(!
AGVManager
.
agvInfo
[
i
].
StateID
.
Equals
(
eAGVState
.
Ready
)
&&
!
AGVManager
.
agvInfo
[
i
].
StateID
.
Equals
(
eAGVState
.
Pause
)
if
(
AGVManager
.
agvInfo
[
i
].
StateID
.
Equals
(
eAGVState
.
Pause
))
{
MiR_API
.
State_Ready
(
AGVManager
.
agvInfo
[
i
]);
continue
;
}
if
(
AGVManager
.
agvInfo
[
i
].
StateID
.
Equals
(
eAGVState
.
Error
))
{
MiR_API
.
Clear_Error
(
AGVManager
.
agvInfo
[
i
]);
continue
;
}
if
(!
AGVManager
.
agvInfo
[
i
].
StateID
.
Equals
(
eAGVState
.
Ready
)
&&
!
AGVManager
.
agvInfo
[
i
].
StateID
.
Equals
(
eAGVState
.
Executing
)
&&
!
AGVManager
.
agvInfo
[
i
].
StateID
.
Equals
(
eAGVState
.
None
))
&&
!
AGVManager
.
agvInfo
[
i
].
StateID
.
Equals
(
eAGVState
.
Executing
)
&&
!
AGVManager
.
agvInfo
[
i
].
StateID
.
Equals
(
eAGVState
.
None
))
{
{
log
.
Warn
(
string
.
Format
(
"{0}不能调用 StateID={1}"
,
AGVManager
.
agvInfo
[
i
].
Name
,
AGVManager
.
agvInfo
[
i
].
StateID
.
ToString
()));
log
.
Warn
(
string
.
Format
(
"{0}不能调用 StateID={1}"
,
AGVManager
.
agvInfo
[
i
].
Name
,
AGVManager
.
agvInfo
[
i
].
StateID
.
ToString
()));
...
...
DeviceLibrary/DeviceLibrary.csproj
查看文件 @
aed2a71
...
@@ -59,13 +59,13 @@
...
@@ -59,13 +59,13 @@
<Compile Include="bean\ChargePiles.cs" />
<Compile Include="bean\ChargePiles.cs" />
<Compile Include="bean\job\ChargeJob.cs" />
<Compile Include="bean\job\ChargeJob.cs" />
<Compile Include="bean\job\EmptyAGVBackJob.cs" />
<Compile Include="bean\job\EmptyAGVBackJob.cs" />
<Compile Include="bean\job\
EmptyShelfBack
Job.cs" />
<Compile Include="bean\job\
FixToInStore
Job.cs" />
<Compile Include="bean\job\Go
EmptyShelfLine
Job.cs" />
<Compile Include="bean\job\Go
LineForRecy
Job.cs" />
<Compile Include="bean\job\Go
FullShelfStation
Job.cs" />
<Compile Include="bean\job\Go
WarehouseForOutStore
Job.cs" />
<Compile Include="bean\JobParam.cs" />
<Compile Include="bean\JobParam.cs" />
<Compile Include="bean\TaskRunState.cs" />
<Compile Include="bean\TaskRunState.cs" />
<Compile Include="bean\job\jobType\JobForFixture.cs" />
<Compile Include="bean\job\jobType\JobForFixture.cs" />
<Compile Include="bean\job\SendF
ullShelf
ToLineJob.cs" />
<Compile Include="bean\job\SendF
ix
ToLineJob.cs" />
<Compile Include="bean\job\StandyJob.cs" />
<Compile Include="bean\job\StandyJob.cs" />
<Compile Include="bean\Task.cs" />
<Compile Include="bean\Task.cs" />
<Compile Include="bean\Node.cs" />
<Compile Include="bean\Node.cs" />
...
@@ -83,10 +83,11 @@
...
@@ -83,10 +83,11 @@
<Compile Include="manager\AGVManager.cs" />
<Compile Include="manager\AGVManager.cs" />
<Compile Include="DisplayBoard.cs" />
<Compile Include="DisplayBoard.cs" />
<Compile Include="bean\MiR_API.cs" />
<Compile Include="bean\MiR_API.cs" />
<Compile Include="manager\WarehouseSigManager.cs" />
<Compile Include="manager\XmlConfigOpManager.cs" />
<Compile Include="manager\XmlConfigOpManager.cs" />
<Compile Include="manager\AgvTaskManager.cs" />
<Compile Include="manager\AgvTaskManager.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="service\
Fix
MissionInfo.cs" />
<Compile Include="service\MissionInfo.cs" />
<Compile Include="manager\FixMissionManager.cs" />
<Compile Include="manager\FixMissionManager.cs" />
<Compile Include="bean\Shelf.cs" />
<Compile Include="bean\Shelf.cs" />
<Compile Include="service\FixtureService.cs" />
<Compile Include="service\FixtureService.cs" />
...
...
DeviceLibrary/bean/RunStep.cs
查看文件 @
aed2a71
...
@@ -29,6 +29,10 @@ namespace DeviceLibrary.bean
...
@@ -29,6 +29,10 @@ namespace DeviceLibrary.bean
/// 等待到达4C门
/// 等待到达4C门
/// </summary>
/// </summary>
WAIT_IN_ROOM_C
,
WAIT_IN_ROOM_C
,
/// <summary>
/// 调整宽度
/// </summary>
ADJUST_WIDTH
,
#
endregion
#
endregion
#
region
充电任务
#
region
充电任务
...
@@ -62,6 +66,22 @@ namespace DeviceLibrary.bean
...
@@ -62,6 +66,22 @@ namespace DeviceLibrary.bean
/// </summary>
/// </summary>
RECY_BACK_WAIT_SHELF_IN_RECY_ST
,
RECY_BACK_WAIT_SHELF_IN_RECY_ST
,
/// <summary>
/// <summary>
/// 检查是否有出库
/// </summary>
RECY_BACK_CHECK_OUT_STORE
,
/// <summary>
/// 等待出料信息
/// </summary>
RECY_BACK_WAIT_RESPONSE
,
/// <summary>
/// 等待治具进入AGV
/// </summary>
RECY_BACK_WAIT_FIX_IN_AGV
,
/// <summary>
/// 等待离开信号
/// </summary>
RECY_BACK_WAIT_LEAVE_SIG
,
/// <summary>
/// 回收处暂时不需要,等待AGV到达待机位
/// 回收处暂时不需要,等待AGV到达待机位
/// </summary>
/// </summary>
RECY_BACK_WAIT_REACH_STANDBY
,
RECY_BACK_WAIT_REACH_STANDBY
,
...
@@ -153,6 +173,10 @@ namespace DeviceLibrary.bean
...
@@ -153,6 +173,10 @@ namespace DeviceLibrary.bean
/// </summary>
/// </summary>
WAIT__FULL_SHELF_IN_AGV
,
WAIT__FULL_SHELF_IN_AGV
,
/// <summary>
/// <summary>
/// 等待离开信号
/// </summary>
WAIT_LEAVE_SIG
,
/// <summary>
/// 等待AGV到达待机位
/// 等待AGV到达待机位
/// </summary>
/// </summary>
WAIT_REACH_STANDBY
,
WAIT_REACH_STANDBY
,
...
...
DeviceLibrary/bean/TaskRunState.cs
查看文件 @
aed2a71
...
@@ -59,7 +59,7 @@ namespace DeviceLibrary
...
@@ -59,7 +59,7 @@ namespace DeviceLibrary
}
}
public
void
EnWaitTaskQueue
(
AgvTask
task
)
public
void
EnWaitTaskQueue
(
AgvTask
task
)
{
{
if
(
string
.
IsNullOrEmpty
(
task
.
Name
))
if
(
string
.
IsNullOrEmpty
(
task
.
Name
)
||
task
.
Type
.
Equals
(
TaskType
.
InOut
)
)
return
;
return
;
WaitExecuteTask
.
Enqueue
(
task
);
WaitExecuteTask
.
Enqueue
(
task
);
}
}
...
...
DeviceLibrary/bean/job/EmptyAGVBackJob.cs
查看文件 @
aed2a71
...
@@ -21,7 +21,7 @@ namespace DeviceLibrary
...
@@ -21,7 +21,7 @@ namespace DeviceLibrary
/// </summary>
/// </summary>
public
EmptyAGVBackJob
(
JobParam
jobParam
):
base
(
jobParam
)
public
EmptyAGVBackJob
(
JobParam
jobParam
):
base
(
jobParam
)
{
{
JobName
=
"返回任务"
;
JobName
=
"
空车
返回任务"
;
}
}
/// <summary>
/// <summary>
...
@@ -33,14 +33,15 @@ namespace DeviceLibrary
...
@@ -33,14 +33,15 @@ namespace DeviceLibrary
StartJobTime
=
JobRunStep
.
startTime
;
StartJobTime
=
JobRunStep
.
startTime
;
if
(
JobRunStep
.
IsStep
(
RunStep
.
NONE
))
if
(
JobRunStep
.
IsStep
(
RunStep
.
NONE
))
{
{
{
return
null
;
JobRunStep
.
ToNextStep
(
RunStep
.
END
);
//{
}
// JobRunStep.ToNextStep(RunStep.END);
//}
}
}
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
END
))
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
END
))
{
{
JobRunStep
.
EndJob
();
JobRunStep
.
EndJob
();
return
n
ew
ChargeJob
(
new
JobParam
(
JobParam
.
SrcNode
.
ToCopy
()))
;
return
n
ull
;
}
}
return
this
;
return
this
;
}
}
...
...
DeviceLibrary/bean/job/
EmptyShelfBack
Job.cs
→
DeviceLibrary/bean/job/
FixToInStore
Job.cs
查看文件 @
aed2a71
...
@@ -13,16 +13,16 @@ using DeviceLibrary.manager;
...
@@ -13,16 +13,16 @@ using DeviceLibrary.manager;
namespace
DeviceLibrary
namespace
DeviceLibrary
{
{
/// <summary>
/// <summary>
///
料架回收
任务
///
治具入库
任务
/// </summary>
/// </summary>
public
class
EmptyShelfBack
Job
:
Job
public
class
FixToInStore
Job
:
Job
{
{
/// <summary>
/// <summary>
/// 料架回收任务
/// 料架回收任务
/// </summary>
/// </summary>
public
EmptyShelfBack
Job
(
JobParam
jobParam
)
:
base
(
jobParam
)
public
FixToInStore
Job
(
JobParam
jobParam
)
:
base
(
jobParam
)
{
{
JobName
=
"
料架回收返回
任务"
;
JobName
=
"
治具入库
任务"
;
}
}
private
int
tryTimes
=
0
;
private
int
tryTimes
=
0
;
...
@@ -85,22 +85,23 @@ namespace DeviceLibrary
...
@@ -85,22 +85,23 @@ namespace DeviceLibrary
{
{
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
{
{
WarehouseSigManager
.
TargetWithFix
.
CurPlace
=
JobParam
.
TargetNode
.
Name
;
JobRunStep
.
ToNextStep
(
RunStep
.
RECY_BACK_WAIT_RECY_ST_RESPONSE
);
JobRunStep
.
ToNextStep
(
RunStep
.
RECY_BACK_WAIT_RECY_ST_RESPONSE
);
runInfo
=
"AGV到达 "
+
JobParam
.
TargetNode
+
",并发送
入料架
请求"
;
runInfo
=
"AGV到达 "
+
JobParam
.
TargetNode
+
",并发送
治具入库
请求"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
OpManager
.
ServerToClient
.
ReadyEnter
(
JobParam
.
TargetNode
.
Name
,
JobParam
.
Shelf
==
null
?
""
:
JobParam
.
Shelf
.
RFID
);
OpManager
.
ServerToClient
.
ReadyEnter
(
JobParam
.
TargetNode
.
Name
,
JobParam
.
Shelf
==
null
?
""
:
JobParam
.
Shelf
.
RFID
);
}
}
}
}
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
RECY_BACK_WAIT_RECY_ST_RESPONSE
))
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
RECY_BACK_WAIT_RECY_ST_RESPONSE
))
{
{
Node
node
=
NodeManager
.
GetNodeByName
(
JobParam
.
TargetNode
.
Name
);
if
(
WarehouseSigManager
.
MayEnter
)
if
(
node
.
StateEquals
(
NodeStatus
.
MayEnter
))
{
{
{
{
JobRunStep
.
ToNextStep
(
RunStep
.
RECY_BACK_WAIT_SHELF_IN_RECY_ST
);
JobRunStep
.
ToNextStep
(
RunStep
.
RECY_BACK_WAIT_SHELF_IN_RECY_ST
);
runInfo
=
"收到
入料架请求的响应 "
+
JobParam
.
TargetNode
+
"入料架
,小车链条运行"
;
runInfo
=
"收到
治具入库请求的响应 "
+
JobParam
.
TargetNode
+
"入治具
,小车链条运行"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
AllocateTask
(
agv
,
SettingString
.
Leave
);
AllocateTask
(
agv
,
SettingString
.
Leave
);
WarehouseSigManager
.
MayEnter
=
false
;
}
}
}
}
...
@@ -110,28 +111,112 @@ namespace DeviceLibrary
...
@@ -110,28 +111,112 @@ namespace DeviceLibrary
if
(
tryTimes
<
3
)
if
(
tryTimes
<
3
)
return
this
;
return
this
;
tryTimes
=
0
;
tryTimes
=
0
;
JobRunStep
.
ToNextStep
(
RunStep
.
RECY_BACK_WAIT_REACH_RECY_ST
);
runInfo
=
JobParam
.
TargetNode
+
"无响应"
;
runInfo
=
JobParam
.
TargetNode
+
"无响应,再次发送请求"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
AllocateTask
(
agv
,
SettingString
.
Standby
);
}
}
}
}
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
RECY_BACK_WAIT_SHELF_IN_RECY_ST
))
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
RECY_BACK_WAIT_SHELF_IN_RECY_ST
))
{
{
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
{
{
JobRunStep
.
ToNextStep
(
RunStep
.
END
);
JobRunStep
.
ToNextStep
(
RunStep
.
RECY_BACK_CHECK_OUT_STORE
);
runInfo
=
$
"
料架
{(JobParam.Shelf == null ? "" : JobParam.Shelf.RFID)}进入{JobParam.TargetNode}完成"
;
runInfo
=
$
"
治具
{(JobParam.Shelf == null ? "" : JobParam.Shelf.RFID)}进入{JobParam.TargetNode}完成"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
}
}
else
if
(
WarehouseSigManager
.
StopEnter
)
{
JobRunStep
.
ToNextStep
(
RunStep
.
RECY_BACK_CHECK_OUT_STORE
);
runInfo
=
$
"治具{(JobParam.Shelf == null ? "" : JobParam.Shelf.RFID)}进入{JobParam.TargetNode}完成"
;
JobRunStep
.
Msg
=
runInfo
;
AllocateTask
(
agv
,
SettingString
.
Init
);
WarehouseSigManager
.
StopEnter
=
false
;
}
else
if
(
JobRunStep
.
IsTimeOut
(
60000
,
out
TimeSpan
timeOutValue1
))
else
if
(
JobRunStep
.
IsTimeOut
(
60000
,
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"
));
}
}
}
}
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
RECY_BACK_CHECK_OUT_STORE
))
{
if
(
WarehouseSigManager
.
OutStore
.
Has
)
{
//调宽
JobRunStep
.
ToNextStep
(
RunStep
.
ADJUST_WIDTH
);
runInfo
=
JobParam
.
TargetNode
+
" 有出库任务,开始调宽"
;
JobRunStep
.
Msg
=
runInfo
;
AdjustWidth
(
agv
,
JobParam
.
FixMissionInfo
.
Type
);
}
else
if
(
OpManager
.
Info
.
GetTransfer
(
out
string
target
))
{
JobRunStep
.
ToNextStep
(
RunStep
.
END
);
runInfo
=
JobParam
.
TargetNode
+
" 无出库任务,任务结束"
;
JobRunStep
.
Msg
=
runInfo
;
}
}
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
ADJUST_WIDTH
))
{
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
{
JobRunStep
.
ToNextStep
(
RunStep
.
RECY_BACK_WAIT_RESPONSE
);
runInfo
=
$
"调宽完成"
;
JobRunStep
.
Msg
=
runInfo
;
}
}
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
RECY_BACK_WAIT_RESPONSE
))
{
if
(
WarehouseSigManager
.
MayLeave
)
{
JobRunStep
.
ToNextStep
(
RunStep
.
RECY_BACK_WAIT_FIX_IN_AGV
);
runInfo
=
"收到出料的响应 "
+
JobParam
.
TargetNode
+
"出治具,小车链条运行"
;
JobRunStep
.
Msg
=
runInfo
;
AllocateTask
(
agv
,
SettingString
.
Enter
);
}
}
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
RECY_BACK_WAIT_FIX_IN_AGV
))
{
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
{
agv
.
HasError
=
false
;
JobRunStep
.
ToNextStep
(
RunStep
.
RECY_BACK_WAIT_LEAVE_SIG
);
runInfo
=
"治具进入AGV完成"
;
JobRunStep
.
Msg
=
runInfo
;
}
else
if
(
JobRunStep
.
IsTimeOut
(
60000
,
out
TimeSpan
timeOutValue
))
{
//链条停止
runInfo
=
"治具在["
+
JobParam
.
TargetNode
.
Name
+
"]进入小车超时"
;
//msg +=runInfo;
//GoFullShelfStationStep.Msg = msg;
agv
.
HasError
=
true
;
agv
.
SetErrorMsg
(
"治具在["
+
JobParam
.
TargetNode
.
Name
+
"]进入小车超时"
,
timeOutValue
.
TotalMinutes
.
ToString
(
"f2"
));
}
}
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
RECY_BACK_WAIT_LEAVE_SIG
))
{
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
{
if
(
OpManager
.
Info
.
GetTransfer
(
out
string
target
))
{
if
(!
target
.
Equals
(
SettingString
.
Cancel
))
{
agv
.
HasError
=
false
;
runInfo
=
$
"收到离开信号,开始运送出库治具"
;
JobRunStep
.
Msg
=
runInfo
;
return
new
SendFixToLineJob
(
new
JobParam
(
JobParam
.
TargetNode
,
NodeManager
.
GetNodeByName
(
target
)),
true
);
}
else
{
agv
.
HasError
=
true
;
agv
.
SetErrorMsg
(
"有出库任务,但返回目的地为Cancel"
,(
DateTime
.
Now
-
StartJobTime
).
TotalMinutes
.
ToString
(
"f2"
));
}
}
}
}
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
END
))
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
END
))
{
{
JobRunStep
.
EndJob
();
JobRunStep
.
EndJob
();
...
...
DeviceLibrary/bean/job/Go
EmptyShelfLine
Job.cs
→
DeviceLibrary/bean/job/Go
LineForRecy
Job.cs
查看文件 @
aed2a71
...
@@ -6,16 +6,16 @@ using System;
...
@@ -6,16 +6,16 @@ using System;
namespace
DeviceLibrary
namespace
DeviceLibrary
{
{
/// <summary>
/// <summary>
/// 去
空料架任务点
/// 去
产线回收治具
/// </summary>
/// </summary>
public
class
Go
EmptyShelfLine
Job
:
Job
public
class
Go
LineForRecy
Job
:
Job
{
{
/// <summary>
/// <summary>
/// 去空料架任务点
/// 去空料架任务点
/// </summary>
/// </summary>
public
Go
EmptyShelfLine
Job
(
JobParam
jobParam
)
:
base
(
jobParam
)
public
Go
LineForRecy
Job
(
JobParam
jobParam
)
:
base
(
jobParam
)
{
{
JobName
=
"
料架
回收任务"
;
JobName
=
"
治具
回收任务"
;
}
}
/// <summary>
/// <summary>
...
@@ -27,6 +27,15 @@ namespace DeviceLibrary
...
@@ -27,6 +27,15 @@ namespace DeviceLibrary
Node
node
=
NodeManager
.
GetNodeByName
(
JobParam
.
TargetNode
.
Name
);
Node
node
=
NodeManager
.
GetNodeByName
(
JobParam
.
TargetNode
.
Name
);
if
(
JobRunStep
.
IsStep
(
RunStep
.
NONE
))
if
(
JobRunStep
.
IsStep
(
RunStep
.
NONE
))
{
{
JobRunStep
.
ToNextStep
(
RunStep
.
ADJUST_WIDTH
);
runInfo
=
"准备去"
+
JobParam
.
TargetNode
+
",先调宽"
;
JobRunStep
.
Msg
=
runInfo
;
AdjustWidth
(
agv
,
JobParam
.
FixMissionInfo
.
Type
);
}
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
ADJUST_WIDTH
))
{
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
{
if
(
JobParam
.
SrcNode
.
Area
.
Equals
(
Area
.
Air_C
)
&&
!
JobParam
.
TargetNode
.
Area
.
Equals
(
Area
.
Air_C
))
//4C风淋门内->风淋门外
if
(
JobParam
.
SrcNode
.
Area
.
Equals
(
Area
.
Air_C
)
&&
!
JobParam
.
TargetNode
.
Area
.
Equals
(
Area
.
Air_C
))
//4C风淋门内->风淋门外
{
{
JobRunStep
.
ToNextStep
(
RunStep
.
WAIT_OUT_AIR_DOOR
);
JobRunStep
.
ToNextStep
(
RunStep
.
WAIT_OUT_AIR_DOOR
);
...
@@ -121,7 +130,7 @@ namespace DeviceLibrary
...
@@ -121,7 +130,7 @@ namespace DeviceLibrary
}
}
}
}
}
}
}
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
WAIT_OUT_AIR_DOOR
))
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
WAIT_OUT_AIR_DOOR
))
{
{
...
@@ -230,7 +239,7 @@ namespace DeviceLibrary
...
@@ -230,7 +239,7 @@ namespace DeviceLibrary
JobRunStep
.
ToNextStep
(
RunStep
.
RECY_TO_BACK_WAIT_AGV_START_TASK
);
JobRunStep
.
ToNextStep
(
RunStep
.
RECY_TO_BACK_WAIT_AGV_START_TASK
);
runInfo
=
"移动到"
+
JobParam
.
TargetNode
;
runInfo
=
"移动到"
+
JobParam
.
TargetNode
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
AllocateTask
(
agv
,
JobParam
.
TargetNode
.
Name
);
AllocateTask
(
agv
,
JobParam
.
TargetNode
.
Name
);
}
}
else
else
{
{
...
@@ -249,6 +258,7 @@ namespace DeviceLibrary
...
@@ -249,6 +258,7 @@ namespace DeviceLibrary
{
{
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
{
{
WarehouseSigManager
.
TargetWithFix
.
CurPlace
=
JobParam
.
TargetNode
.
Name
;
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
);
...
@@ -282,18 +292,28 @@ namespace DeviceLibrary
...
@@ -282,18 +292,28 @@ namespace DeviceLibrary
runInfo
=
"人员在"
+
JobParam
.
TargetNode
+
"操作完成"
;
runInfo
=
"人员在"
+
JobParam
.
TargetNode
+
"操作完成"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
EndJob
();
JobRunStep
.
EndJob
();
return
new
EmptyShelfBack
Job
(
new
JobParam
(
JobParam
.
TargetNode
,
null
,
JobParam
.
Shelf
.
ToCopy
()));
return
new
FixToInStore
Job
(
new
JobParam
(
JobParam
.
TargetNode
,
null
,
JobParam
.
Shelf
.
ToCopy
()));
}
}
}
}
}
}
else
if
(
JobParam
.
OpType
.
Equals
(
OpType
.
RequestAPI
))
else
if
(
JobParam
.
OpType
.
Equals
(
OpType
.
RequestAPI
))
{
{
if
(
OpManager
.
Info
.
GetUnlock
(
JobParam
.
Shelf
.
RFID
))
if
(
OpManager
.
Info
.
GetTransfer
(
out
string
target
))
{
if
(
target
.
Equals
(
SettingString
.
Cancel
))
{
JobRunStep
.
ToNextStep
(
RunStep
.
END
);
runInfo
=
"到达"
+
JobParam
.
TargetNode
+
",该任务被取消"
;
JobRunStep
.
Msg
=
runInfo
;
}
else
{
{
runInfo
=
"人员在"
+
JobParam
.
TargetNode
+
"操作完成"
;
runInfo
=
"人员在"
+
JobParam
.
TargetNode
+
"操作完成"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
EndJob
();
JobRunStep
.
EndJob
();
return
new
EmptyShelfBackJob
(
new
JobParam
(
JobParam
.
TargetNode
,
null
,
JobParam
.
Shelf
.
ToCopy
()));
return
new
FixToInStoreJob
(
new
JobParam
(
JobParam
.
TargetNode
,
NodeManager
.
GetNodeByName
(
target
),
JobParam
.
Shelf
.
ToCopy
()));
}
}
}
}
}
else
if
(
JobParam
.
OpType
.
Equals
(
OpType
.
MaulAndAPI
))
else
if
(
JobParam
.
OpType
.
Equals
(
OpType
.
MaulAndAPI
))
...
@@ -305,7 +325,7 @@ namespace DeviceLibrary
...
@@ -305,7 +325,7 @@ namespace DeviceLibrary
runInfo
=
"人员在"
+
JobParam
.
TargetNode
+
"操作完成"
;
runInfo
=
"人员在"
+
JobParam
.
TargetNode
+
"操作完成"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
EndJob
();
JobRunStep
.
EndJob
();
return
new
EmptyShelfBack
Job
(
new
JobParam
(
JobParam
.
TargetNode
,
null
,
JobParam
.
Shelf
.
ToCopy
()));
return
new
FixToInStore
Job
(
new
JobParam
(
JobParam
.
TargetNode
,
null
,
JobParam
.
Shelf
.
ToCopy
()));
}
}
}
}
}
}
...
@@ -324,7 +344,7 @@ namespace DeviceLibrary
...
@@ -324,7 +344,7 @@ namespace DeviceLibrary
JobRunStep
.
ToNextStep
(
RunStep
.
RECY_TO_WAIT_TAKE_EMPTY_SHELF
);
JobRunStep
.
ToNextStep
(
RunStep
.
RECY_TO_WAIT_TAKE_EMPTY_SHELF
);
runInfo
=
"收到线体对出料请求的响应,"
+
JobParam
.
TargetNode
+
"出料架"
;
runInfo
=
"收到线体对出料请求的响应,"
+
JobParam
.
TargetNode
+
"出料架"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
AllocateTask
(
agv
,
SettingString
.
Enter
);
AllocateTask
(
agv
,
SettingString
.
Enter
);
}
}
else
if
(
JobRunStep
.
IsTimeOut
(
15000
,
out
TimeSpan
timeOutValue
))
else
if
(
JobRunStep
.
IsTimeOut
(
15000
,
out
TimeSpan
timeOutValue
))
...
@@ -339,7 +359,7 @@ namespace DeviceLibrary
...
@@ -339,7 +359,7 @@ namespace DeviceLibrary
{
{
agv
.
HasError
=
false
;
agv
.
HasError
=
false
;
JobRunStep
.
EndJob
();
JobRunStep
.
EndJob
();
return
new
EmptyShelfBack
Job
(
new
JobParam
(
JobParam
.
TargetNode
.
ToCopy
()));
return
new
FixToInStore
Job
(
new
JobParam
(
JobParam
.
TargetNode
.
ToCopy
()));
}
}
else
if
(
JobRunStep
.
IsTimeOut
(
60000
,
out
TimeSpan
timeOutValue
))
else
if
(
JobRunStep
.
IsTimeOut
(
60000
,
out
TimeSpan
timeOutValue
))
...
...
DeviceLibrary/bean/job/Go
FullShelfStation
Job.cs
→
DeviceLibrary/bean/job/Go
WarehouseForOutStore
Job.cs
查看文件 @
aed2a71
...
@@ -6,16 +6,16 @@ using System;
...
@@ -6,16 +6,16 @@ using System;
namespace
DeviceLibrary
namespace
DeviceLibrary
{
{
/// <summary>
/// <summary>
/// 去
云仓接满料
/// 去
立库接出库的治具
/// </summary>
/// </summary>
public
class
Go
FullShelfStation
Job
:
Job
public
class
Go
WarehouseForOutStore
Job
:
Job
{
{
/// <summary>
/// <summary>
/// 去云仓接满料
/// 去云仓接满料
/// </summary>
/// </summary>
public
Go
FullShelfStation
Job
(
JobParam
jobParam
)
:
base
(
jobParam
)
public
Go
WarehouseForOutStore
Job
(
JobParam
jobParam
)
:
base
(
jobParam
)
{
{
JobName
=
"
接满料
任务"
;
JobName
=
"
出库
任务"
;
}
}
bool
IsLoadOnAGV
=
false
;
bool
IsLoadOnAGV
=
false
;
...
@@ -24,11 +24,21 @@ namespace DeviceLibrary
...
@@ -24,11 +24,21 @@ namespace DeviceLibrary
if
(
JobRunStep
.
IsStep
(
RunStep
.
NONE
))
if
(
JobRunStep
.
IsStep
(
RunStep
.
NONE
))
{
{
JobRunStep
.
ToNextStep
(
RunStep
.
ADJUST_WIDTH
);
runInfo
=
"准备去"
+
JobParam
.
TargetNode
+
",先调宽"
;
JobRunStep
.
Msg
=
runInfo
;
AdjustWidth
(
agv
,
JobParam
.
FixMissionInfo
.
Type
);
}
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
ADJUST_WIDTH
))
{
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
{
JobRunStep
.
ToNextStep
(
RunStep
.
WAIT_CHECK_RESULT
);
JobRunStep
.
ToNextStep
(
RunStep
.
WAIT_CHECK_RESULT
);
runInfo
=
"检查AGV负载情况"
;
runInfo
=
"检查AGV负载情况"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
AllocateTask
(
agv
,
SettingString
.
CheckShelf
);
AllocateTask
(
agv
,
SettingString
.
CheckShelf
);
}
}
}
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
WAIT_CHECK_RESULT
))
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
WAIT_CHECK_RESULT
))
{
{
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
...
@@ -36,7 +46,7 @@ namespace DeviceLibrary
...
@@ -36,7 +46,7 @@ namespace DeviceLibrary
if
(
agv
.
IsExistShelf
)
if
(
agv
.
IsExistShelf
)
{
{
JobRunStep
.
ToNextStep
(
RunStep
.
END
);
JobRunStep
.
ToNextStep
(
RunStep
.
END
);
runInfo
=
"车上有
料架,无法接送满料
任务"
;
runInfo
=
"车上有
负载,无法运行出库
任务"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
IsLoadOnAGV
=
true
;
IsLoadOnAGV
=
true
;
}
}
...
@@ -101,8 +111,9 @@ namespace DeviceLibrary
...
@@ -101,8 +111,9 @@ namespace DeviceLibrary
{
{
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
{
{
WarehouseSigManager
.
TargetWithFix
.
CurPlace
=
JobParam
.
TargetNode
.
Name
;
JobRunStep
.
ToNextStep
(
RunStep
.
WAIT_DOUBLE_LINE_RESPONSE
);
JobRunStep
.
ToNextStep
(
RunStep
.
WAIT_DOUBLE_LINE_RESPONSE
);
runInfo
=
"到达 "
+
JobParam
.
TargetNode
.
Name
+
",并发送出
料架
请求"
;
runInfo
=
"到达 "
+
JobParam
.
TargetNode
.
Name
+
",并发送出
库
请求"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
OpManager
.
ServerToClient
.
ReadyLeave
(
JobParam
.
TargetNode
.
Name
,
JobParam
.
Shelf
==
null
?
""
:
JobParam
.
Shelf
.
RFID
);
OpManager
.
ServerToClient
.
ReadyLeave
(
JobParam
.
TargetNode
.
Name
,
JobParam
.
Shelf
==
null
?
""
:
JobParam
.
Shelf
.
RFID
);
...
@@ -110,20 +121,21 @@ namespace DeviceLibrary
...
@@ -110,20 +121,21 @@ 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
);
//
Node node = NodeManager.GetNodeByName(JobParam.TargetNode.Name);
if
(
node
==
null
)
//
if (node == null)
{
//
{
runInfo
=
"未找到节点:"
+
JobParam
.
TargetNode
.
Name
;
//
runInfo = "未找到节点:" + JobParam.TargetNode.Name;
JobRunStep
.
Msg
=
runInfo
;
//
JobRunStep.Msg = runInfo;
return
this
;
//
return this;
}
//
}
if
(
node
.
StateEquals
(
NodeStatus
.
MayLeave
)
)
if
(
WarehouseSigManager
.
MayLeave
)
{
{
agv
.
HasError
=
false
;
agv
.
HasError
=
false
;
JobRunStep
.
ToNextStep
(
RunStep
.
WAIT__FULL_SHELF_IN_AGV
);
JobRunStep
.
ToNextStep
(
RunStep
.
WAIT__FULL_SHELF_IN_AGV
);
runInfo
=
"收到出
料架请求的响应,"
+
JobParam
.
TargetNode
.
Name
+
"出料架
"
;
runInfo
=
"收到出
库请求的响应,"
+
JobParam
.
TargetNode
.
Name
+
"出治具
"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
AllocateTask
(
agv
,
SettingString
.
Enter
);
AllocateTask
(
agv
,
SettingString
.
Enter
);
WarehouseSigManager
.
MayLeave
=
false
;
}
}
else
if
(
JobRunStep
.
IsTimeOut
(
15000
,
out
TimeSpan
timeOutValue
))
else
if
(
JobRunStep
.
IsTimeOut
(
15000
,
out
TimeSpan
timeOutValue
))
...
@@ -141,22 +153,40 @@ namespace DeviceLibrary
...
@@ -141,22 +153,40 @@ namespace DeviceLibrary
{
{
agv
.
HasError
=
false
;
agv
.
HasError
=
false
;
//GoFullShelfStationStep.ToNextStep(RunStep.END);
//GoFullShelfStationStep.ToNextStep(RunStep.END);
runInfo
=
JobParam
.
TargetNode
.
Name
+
"
料架
进入小车完成"
;
runInfo
=
JobParam
.
TargetNode
.
Name
+
"
治具
进入小车完成"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
EndJob
();
JobRunStep
.
EndJob
();
return
new
SendF
ullShelfToLineJob
(
new
JobParam
(
JobParam
.
TargetNode
.
ToCopy
())
);
return
new
SendF
ixToLineJob
(
new
JobParam
(
JobParam
.
TargetNode
.
ToCopy
()),
true
);
}
}
else
if
(
JobRunStep
.
IsTimeOut
(
60000
,
out
TimeSpan
timeOutValue
))
else
if
(
JobRunStep
.
IsTimeOut
(
60000
,
out
TimeSpan
timeOutValue
))
{
{
//链条停止
//链条停止
runInfo
=
"
满料架
在["
+
JobParam
.
TargetNode
.
Name
+
"]进入小车超时"
;
runInfo
=
"
治具
在["
+
JobParam
.
TargetNode
.
Name
+
"]进入小车超时"
;
//msg +=runInfo;
//msg +=runInfo;
//GoFullShelfStationStep.Msg = msg;
//GoFullShelfStationStep.Msg = msg;
agv
.
HasError
=
true
;
agv
.
HasError
=
true
;
agv
.
SetErrorMsg
(
"
满料架
在["
+
JobParam
.
TargetNode
.
Name
+
"]进入小车超时"
,
timeOutValue
.
TotalMinutes
.
ToString
(
"f2"
));
agv
.
SetErrorMsg
(
"
治具
在["
+
JobParam
.
TargetNode
.
Name
+
"]进入小车超时"
,
timeOutValue
.
TotalMinutes
.
ToString
(
"f2"
));
}
}
}
}
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
WAIT_LEAVE_SIG
))
{
if
(
OpManager
.
Info
.
GetTransfer
(
out
string
target
))
{
if
(!
target
.
Equals
(
SettingString
.
Cancel
))
{
agv
.
HasError
=
false
;
runInfo
=
$
"收到离开信号,开始运送出库治具"
;
JobRunStep
.
Msg
=
runInfo
;
return
new
SendFixToLineJob
(
new
JobParam
(
JobParam
.
TargetNode
,
NodeManager
.
GetNodeByName
(
target
)),
true
);
}
else
{
agv
.
HasError
=
true
;
agv
.
SetErrorMsg
(
"有出库任务,但返回目的地为Cancel"
,
(
DateTime
.
Now
-
StartJobTime
).
TotalMinutes
.
ToString
(
"f2"
));
}
}
}
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
END
))
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
END
))
{
{
JobRunStep
.
EndJob
();
JobRunStep
.
EndJob
();
...
...
DeviceLibrary/bean/job/Job.cs
查看文件 @
aed2a71
using
Common
;
using
Common
;
using
DeviceLibrary.bean
;
using
DeviceLibrary.bean
;
using
DeviceLibrary.manager
;
using
System
;
using
System
;
namespace
DeviceLibrary
namespace
DeviceLibrary
{
{
public
abstract
class
Job
public
abstract
class
Job
{
{
public
Job
(
JobParam
jobParam
)
{
JobParam
=
jobParam
;
}
public
Job
(
JobParam
jobParam
)
{
JobParam
=
jobParam
;
WarehouseSigManager
.
Reset
();
}
public
JobParam
JobParam
{
get
;
private
set
;
}
public
JobParam
JobParam
{
get
;
private
set
;
}
public
JobStep
<
RunStep
>
JobRunStep
=
new
JobStep
<
RunStep
>(
RunStep
.
NONE
);
public
JobStep
<
RunStep
>
JobRunStep
=
new
JobStep
<
RunStep
>(
RunStep
.
NONE
);
...
@@ -17,11 +21,12 @@ namespace DeviceLibrary
...
@@ -17,11 +21,12 @@ namespace DeviceLibrary
/// <summary>
/// <summary>
/// 运行信息
/// 运行信息
/// </summary>
/// </summary>
public
string
RunInfo
{
get
{
return
$
"{JobName}{TaskStateInfo}:{runInfo}"
;
}
}
public
string
RunInfo
{
get
{
return
$
"{JobName}{TaskStateInfo}
{FixInfo}
:{runInfo}"
;
}
}
/// <summary>
/// <summary>
/// agv任务状态信息
/// agv任务状态信息
/// </summary>
/// </summary>
public
string
TaskStateInfo
=
""
;
public
string
TaskStateInfo
=
""
;
public
string
FixInfo
=
""
;
public
string
runInfo
=
""
;
public
string
runInfo
=
""
;
/// <summary>
/// <summary>
/// 根据任务状态继续执行任务
/// 根据任务状态继续执行任务
...
@@ -41,6 +46,7 @@ namespace DeviceLibrary
...
@@ -41,6 +46,7 @@ namespace DeviceLibrary
{
{
JobRunStep
.
StepRunInfo
.
SetInfo
(
agv
.
Name
.
PadLeft
(
4
,
'0'
),
JobName
,
agv
.
Place
.
AliceName
,
JobRunStep
.
CurStep
(),
runInfo
,
StartJobTime
,
DateTime
.
Now
);
JobRunStep
.
StepRunInfo
.
SetInfo
(
agv
.
Name
.
PadLeft
(
4
,
'0'
),
JobName
,
agv
.
Place
.
AliceName
,
JobRunStep
.
CurStep
(),
runInfo
,
StartJobTime
,
DateTime
.
Now
);
TaskStateInfo
=
agv
.
TaskRunState
.
ToTaskInfo
();
TaskStateInfo
=
agv
.
TaskRunState
.
ToTaskInfo
();
FixInfo
=
JobParam
.
FixMissionInfo
!=
null
?
JobParam
.
FixMissionInfo
.
ToTxt
():
""
;
StartJobTime
=
JobRunStep
.
startTime
;
StartJobTime
=
JobRunStep
.
startTime
;
}
}
/// <summary>
/// <summary>
...
@@ -57,6 +63,17 @@ namespace DeviceLibrary
...
@@ -57,6 +63,17 @@ namespace DeviceLibrary
Task
=
AgvTaskManager
.
GetTaskByName
(
taskName
);
Task
=
AgvTaskManager
.
GetTaskByName
(
taskName
);
AgvTaskManager
.
AssignMission
(
agv
,
taskName
);
AgvTaskManager
.
AssignMission
(
agv
,
taskName
);
}
}
protected
void
AdjustWidth
(
Agv_Info
agv
,
manager
.
FixType
fixType
)
{
int
val
=
(
int
)
fixType
;
int
times
=
0
;
while
(!
MiR_API
.
Set_Register
(
agv
,
50
,
val
))
{
if
(
times
>
5
)
break
;
}
AllocateTask
(
agv
,
SettingString
.
Adjust
);
}
/// <summary>
/// <summary>
/// 任务重发
/// 任务重发
/// </summary>
/// </summary>
...
...
DeviceLibrary/bean/job/SendF
ullShelf
ToLineJob.cs
→
DeviceLibrary/bean/job/SendF
ix
ToLineJob.cs
查看文件 @
aed2a71
...
@@ -6,23 +6,26 @@ using System;
...
@@ -6,23 +6,26 @@ using System;
namespace
DeviceLibrary
namespace
DeviceLibrary
{
{
/// <summary>
/// <summary>
///
从云仓向线体运送料任务
///
将治具送往产线
/// </summary>
/// </summary>
public
class
SendF
ullShelf
ToLineJob
:
Job
public
class
SendF
ix
ToLineJob
:
Job
{
{
/// <summary>
/// <summary>
///
从云仓向线体运送料
任务
///
送治具
任务
/// </summary>
/// </summary>
public
SendF
ullShelfToLineJob
(
JobParam
jobParam
)
:
base
(
jobParam
)
public
SendF
ixToLineJob
(
JobParam
jobParam
,
bool
adjustWidth
=
true
)
:
base
(
jobParam
)
{
{
JobName
=
"送
满料
任务"
;
JobName
=
"送
治具
任务"
;
jobParam
.
OpType
=
OpType
.
Mannual
;
jobParam
.
OpType
=
OpType
.
Mannual
;
this
.
adjustWidth
=
adjustWidth
;
}
}
bool
adjustWidth
=
false
;
public
override
Job
Run
(
Agv_Info
agv
)
public
override
Job
Run
(
Agv_Info
agv
)
{
{
if
(
JobRunStep
.
IsStep
(
RunStep
.
NONE
))
if
(
JobRunStep
.
IsStep
(
RunStep
.
NONE
))
{
{
if
(
adjustWidth
)
{
OpManager
.
ClientToSMDServer
.
RemoveRfidBufInfo
(
JobParam
.
Shelf
.
RFID
);
OpManager
.
ClientToSMDServer
.
RemoveRfidBufInfo
(
JobParam
.
Shelf
.
RFID
);
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
))
{
{
...
@@ -38,6 +41,36 @@ namespace DeviceLibrary
...
@@ -38,6 +41,36 @@ namespace DeviceLibrary
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
AllocateTask
(
agv
,
JobParam
.
TargetNode
.
Name
);
AllocateTask
(
agv
,
JobParam
.
TargetNode
.
Name
);
}
}
}
else
{
JobRunStep
.
ToNextStep
(
RunStep
.
ADJUST_WIDTH
);
runInfo
=
"准备去"
+
JobParam
.
TargetNode
+
",先调宽"
;
JobRunStep
.
Msg
=
runInfo
;
AdjustWidth
(
agv
,
JobParam
.
FixMissionInfo
.
Type
);
}
}
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
ADJUST_WIDTH
))
{
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
{
OpManager
.
ClientToSMDServer
.
RemoveRfidBufInfo
(
JobParam
.
Shelf
.
RFID
);
if
(
JobParam
.
TargetNode
.
Area
.
Equals
(
Area
.
C
)
||
JobParam
.
TargetNode
.
Area
.
Equals
(
Area
.
Air_C
))
{
JobRunStep
.
ToNextStep
(
RunStep
.
WAIT_IN_ROOM_C
);
runInfo
=
string
.
Format
(
"前往{0},先过门"
,
JobParam
.
TargetNode
);
JobRunStep
.
Msg
=
runInfo
;
AllocateTask
(
agv
,
SettingString
.
DoorDToC
);
}
else
{
JobRunStep
.
ToNextStep
(
RunStep
.
SF_WAIT_AGV_REACH_LINE
);
runInfo
=
string
.
Format
(
"前往{0},先过门"
,
JobParam
.
TargetNode
);
JobRunStep
.
Msg
=
runInfo
;
AllocateTask
(
agv
,
JobParam
.
TargetNode
.
Name
);
}
}
}
}
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
WAIT_IN_ROOM_C
))
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
WAIT_IN_ROOM_C
))
...
@@ -136,7 +169,7 @@ namespace DeviceLibrary
...
@@ -136,7 +169,7 @@ namespace DeviceLibrary
runInfo
=
"人员在"
+
JobParam
.
TargetNode
+
"操作完成"
;
runInfo
=
"人员在"
+
JobParam
.
TargetNode
+
"操作完成"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
EndJob
();
JobRunStep
.
EndJob
();
return
new
Empty
Shelf
BackJob
(
new
JobParam
(
JobParam
.
TargetNode
,
null
,
JobParam
.
Shelf
.
ToCopy
()));
return
new
Empty
AGV
BackJob
(
new
JobParam
(
JobParam
.
TargetNode
,
null
,
JobParam
.
Shelf
.
ToCopy
()));
}
}
}
}
}
}
...
@@ -147,7 +180,7 @@ namespace DeviceLibrary
...
@@ -147,7 +180,7 @@ namespace DeviceLibrary
runInfo
=
"人员在"
+
JobParam
.
TargetNode
+
"操作完成"
;
runInfo
=
"人员在"
+
JobParam
.
TargetNode
+
"操作完成"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
EndJob
();
JobRunStep
.
EndJob
();
return
new
EmptyShelfBack
Job
(
new
JobParam
(
JobParam
.
TargetNode
,
null
,
JobParam
.
Shelf
.
ToCopy
()));
return
new
FixToInStore
Job
(
new
JobParam
(
JobParam
.
TargetNode
,
null
,
JobParam
.
Shelf
.
ToCopy
()));
}
}
}
}
else
if
(
JobParam
.
OpType
.
Equals
(
OpType
.
MaulAndAPI
))
else
if
(
JobParam
.
OpType
.
Equals
(
OpType
.
MaulAndAPI
))
...
@@ -159,7 +192,7 @@ namespace DeviceLibrary
...
@@ -159,7 +192,7 @@ namespace DeviceLibrary
runInfo
=
"人员在"
+
JobParam
.
TargetNode
+
"操作完成"
;
runInfo
=
"人员在"
+
JobParam
.
TargetNode
+
"操作完成"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
EndJob
();
JobRunStep
.
EndJob
();
return
new
EmptyShelfBack
Job
(
new
JobParam
(
JobParam
.
TargetNode
,
null
,
JobParam
.
Shelf
.
ToCopy
()));
return
new
FixToInStore
Job
(
new
JobParam
(
JobParam
.
TargetNode
,
null
,
JobParam
.
Shelf
.
ToCopy
()));
}
}
}
}
}
}
...
@@ -209,7 +242,7 @@ namespace DeviceLibrary
...
@@ -209,7 +242,7 @@ namespace DeviceLibrary
}
}
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
END
))
else
if
(
JobRunStep
.
IsStep
(
RunStep
.
END
))
{
{
return
null
;
}
}
return
this
;
return
this
;
}
}
...
...
DeviceLibrary/bean/job/StandyJob.cs
查看文件 @
aed2a71
...
@@ -20,7 +20,7 @@ namespace DeviceLibrary
...
@@ -20,7 +20,7 @@ namespace DeviceLibrary
int
BatteryMin
=
ChargePileManager
.
GetChargePiles
().
BatteryMin
;
int
BatteryMin
=
ChargePileManager
.
GetChargePiles
().
BatteryMin
;
int
BatteryMid
=
ChargePileManager
.
GetChargePiles
().
BatteryMiddle
;
int
BatteryMid
=
ChargePileManager
.
GetChargePiles
().
BatteryMiddle
;
/// <summary>
/// <summary>
///
空车返回执行
///
待机任务
/// </summary>
/// </summary>
/// <param name="agv"></param>
/// <param name="agv"></param>
public
override
Job
Run
(
Agv_Info
agv
)
public
override
Job
Run
(
Agv_Info
agv
)
...
@@ -31,7 +31,7 @@ namespace DeviceLibrary
...
@@ -31,7 +31,7 @@ namespace DeviceLibrary
if
(
JobParam
.
SrcNode
.
Area
.
Equals
(
Area
.
Air_C
))
if
(
JobParam
.
SrcNode
.
Area
.
Equals
(
Area
.
Air_C
))
{
{
JobRunStep
.
ToNextStep
(
RunStep
.
WAIT_OUT_AIR_DOOR
);
JobRunStep
.
ToNextStep
(
RunStep
.
WAIT_OUT_AIR_DOOR
);
runInfo
=
string
.
Format
(
"
电量{0}%小于最大电量{1}%,
从{2}回到待机位,先过风淋门"
,
agv
.
Battery
,
BatteryMax
,
JobParam
.
SrcNode
.
Name
);
runInfo
=
string
.
Format
(
"从{2}回到待机位,先过风淋门"
,
agv
.
Battery
,
BatteryMax
,
JobParam
.
SrcNode
.
Name
);
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
AllocateTask
(
agv
,
SettingString
.
DoorAirOut
);
AllocateTask
(
agv
,
SettingString
.
DoorAirOut
);
...
@@ -39,7 +39,7 @@ namespace DeviceLibrary
...
@@ -39,7 +39,7 @@ namespace DeviceLibrary
else
if
(
JobParam
.
SrcNode
.
Area
.
Equals
(
Area
.
C
))
else
if
(
JobParam
.
SrcNode
.
Area
.
Equals
(
Area
.
C
))
{
{
JobRunStep
.
ToNextStep
(
RunStep
.
WAIT_IN_ROOM_D
);
JobRunStep
.
ToNextStep
(
RunStep
.
WAIT_IN_ROOM_D
);
runInfo
=
string
.
Format
(
"
电量{0}%小于最大电量{1}%,
从{2}回到待机位,先过门"
,
agv
.
Battery
,
BatteryMax
,
JobParam
.
SrcNode
.
Name
);
runInfo
=
string
.
Format
(
"从{2}回到待机位,先过门"
,
agv
.
Battery
,
BatteryMax
,
JobParam
.
SrcNode
.
Name
);
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
AllocateTask
(
agv
,
SettingString
.
DoorCToD
);
AllocateTask
(
agv
,
SettingString
.
DoorCToD
);
...
@@ -69,7 +69,7 @@ namespace DeviceLibrary
...
@@ -69,7 +69,7 @@ namespace DeviceLibrary
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
if
(
agv
.
TaskRunState
.
CheckTaskFinished
(
agv
.
Name
))
{
{
JobRunStep
.
ToNextStep
(
RunStep
.
STANDBY_WAIT_REACH_STANDBY
);
JobRunStep
.
ToNextStep
(
RunStep
.
STANDBY_WAIT_REACH_STANDBY
);
runInfo
=
"
充电桩有小车,
从"
+
JobParam
.
SrcNode
+
"回到待机位"
;
runInfo
=
"从"
+
JobParam
.
SrcNode
+
"回到待机位"
;
JobRunStep
.
Msg
=
runInfo
;
JobRunStep
.
Msg
=
runInfo
;
AllocateTask
(
agv
,
SettingString
.
Standby
);
AllocateTask
(
agv
,
SettingString
.
Standby
);
}
}
...
...
DeviceLibrary/bean/job/jobType/JobForFixture.cs
查看文件 @
aed2a71
...
@@ -4,7 +4,6 @@ using System.Collections.Generic;
...
@@ -4,7 +4,6 @@ using System.Collections.Generic;
using
System.Linq
;
using
System.Linq
;
using
DeviceLibrary.manager
;
using
DeviceLibrary.manager
;
using
DeviceLibrary.bean
;
using
DeviceLibrary.bean
;
using
DeviceLibrary.manager
;
namespace
DeviceLibrary
namespace
DeviceLibrary
{
{
...
@@ -21,23 +20,23 @@ namespace DeviceLibrary
...
@@ -21,23 +20,23 @@ namespace DeviceLibrary
/// <returns></returns>
/// <returns></returns>
public
override
Job
GetNewJob
(
Agv_Info
agv
)
public
override
Job
GetNewJob
(
Agv_Info
agv
)
{
{
//
if (!agv.IsIdle())
if
(!
agv
.
IsIdle
())
//
return null;
return
null
;
if
(
FixMissionManager
.
HasNext
())
if
(
FixMissionManager
.
HasNext
())
{
{
MissionInfo
fixMissionInfo
=
manager
.
FixMissionManager
.
ExecuteMission
();
MissionInfo
fixMissionInfo
=
manager
.
FixMissionManager
.
ExecuteMission
();
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
;
jobParam
.
TargetNode
=
NodeManager
.
GetNodeByName
(
fixMissionInfo
.
Name
);
jobParam
.
TargetNode
=
NodeManager
.
GetNodeByName
(
fixMissionInfo
.
Target
);
if
(
fixMissionInfo
.
MissionType
.
Equals
(
MissionType
.
Line
))
if
(
fixMissionInfo
.
MissionType
.
Equals
(
MissionType
.
Line
))
{
{
jobParam
.
OpType
=
OpType
.
Mannual
;
jobParam
.
OpType
=
OpType
.
RequestAPI
;
return
new
Go
EmptyShelfLine
Job
(
jobParam
);
return
new
Go
LineForRecy
Job
(
jobParam
);
}
}
else
if
(
fixMissionInfo
.
MissionType
.
Equals
(
MissionType
.
Warehouse
))
else
if
(
fixMissionInfo
.
MissionType
.
Equals
(
MissionType
.
Warehouse
))
{
{
return
new
Go
FullShelfStation
Job
(
jobParam
);
return
new
Go
WarehouseForOutStore
Job
(
jobParam
);
}
}
}
}
return
null
;
return
null
;
...
...
DeviceLibrary/manager/AgvTaskManager.cs
查看文件 @
aed2a71
...
@@ -88,9 +88,12 @@ namespace DeviceLibrary
...
@@ -88,9 +88,12 @@ namespace DeviceLibrary
{
{
bool
rtn
=
false
;
bool
rtn
=
false
;
AgvTask
task
=
GetTaskByName
(
taskname
);
AgvTask
task
=
GetTaskByName
(
taskname
);
Node
node
=
manager
.
NodeManager
.
GetNodeByName
(
taskname
);
if
(
task
!=
null
)
if
(
task
!=
null
)
{
{
agv
.
TaskRunState
.
Task
=
task
;
agv
.
TaskRunState
.
Task
=
task
;
if
(
node
!=
null
)
agv
.
Place
=
node
;
if
(!
agv
.
IsCon
)
if
(!
agv
.
IsCon
)
{
{
agv
.
TaskRunState
.
ResetInfo
();
agv
.
TaskRunState
.
ResetInfo
();
...
...
DeviceLibrary/manager/ChargePileManager.cs
查看文件 @
aed2a71
...
@@ -88,6 +88,7 @@ namespace DeviceLibrary
...
@@ -88,6 +88,7 @@ namespace DeviceLibrary
if
(
agv
.
Equals
(
item
.
OccupiedAgv
))
if
(
agv
.
Equals
(
item
.
OccupiedAgv
))
{
{
item
.
DelOccupy
(
agv
);
item
.
DelOccupy
(
agv
);
agv
.
IsInCharge
=
false
;
return
;
return
;
}
}
}
}
...
...
DeviceLibrary/manager/OpManager.cs
查看文件 @
aed2a71
...
@@ -51,6 +51,16 @@ namespace DeviceLibrary
...
@@ -51,6 +51,16 @@ namespace DeviceLibrary
{
{
return
HttpManager
.
GetRackBy
(
rfid
,
out
string
lineName
);
return
HttpManager
.
GetRackBy
(
rfid
,
out
string
lineName
);
}
}
public
static
bool
GetTransfer
(
out
string
target
)
{
target
=
""
;
if
(!
string
.
IsNullOrEmpty
(
manager
.
WarehouseSigManager
.
TargetWithFix
.
Target
))
{
target
=
manager
.
WarehouseSigManager
.
TargetWithFix
.
Target
;
return
true
;
}
return
false
;
}
public
static
bool
UpdateShelfStatus
(
string
rfid
,
string
place
)
public
static
bool
UpdateShelfStatus
(
string
rfid
,
string
place
)
{
{
return
true
;
return
true
;
...
...
DeviceLibrary/manager/WarehouseSigManager.cs
0 → 100644
查看文件 @
aed2a71
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
DeviceLibrary.manager
{
public
class
WarehouseSigManager
{
public
static
bool
MayEnter
=
false
;
public
static
bool
MayLeave
=
false
;
public
static
bool
StopEnter
=
false
;
public
static
TargetWithFix
TargetWithFix
=
new
TargetWithFix
();
public
static
OutStore
OutStore
=
new
OutStore
();
public
static
void
Reset
()
{
MayEnter
=
false
;
MayLeave
=
false
;
StopEnter
=
false
;
TargetWithFix
.
Reset
();
OutStore
.
Reset
();
}
}
/// <summary>
/// 运送目的地
/// </summary>
public
class
TargetWithFix
{
/// <summary>
/// 呼叫地
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 目的地
/// </summary>
public
string
Target
{
get
;
set
;
}
public
string
CurPlace
{
get
;
set
;
}
=
""
;
public
void
Set
(
string
name
,
string
target
)
{
Name
=
name
;
Target
=
target
;
}
public
void
Reset
()
{
Name
=
""
;
Target
=
""
;
CurPlace
=
""
;
}
}
public
class
FixInfoOnAGV
{
public
FixType
Type
{
get
;
private
set
;
}
public
bool
HasLoad
{
get
;
private
set
;
}
public
void
Set
(
FixType
fixType
,
bool
hasload
)
{
Type
=
fixType
;
HasLoad
=
hasload
;
}
public
void
Reset
()
{
Type
=
FixType
.
None
;
HasLoad
=
false
;
}
}
public
class
OutStore
{
public
bool
Has
{
get
;
set
;
}
public
FixType
Type
{
get
;
set
;
}
public
void
Set
(
bool
has
,
FixType
fixType
)
{
Has
=
has
;
Type
=
fixType
;
}
public
void
Reset
()
{
Has
=
false
;
Type
=
FixType
.
None
;
}
}
}
;
\ No newline at end of file
\ No newline at end of file
DeviceLibrary/service/FixtureService.cs
查看文件 @
aed2a71
此文件的差异被折叠,
点击展开。
DeviceLibrary/service/
Fix
MissionInfo.cs
→
DeviceLibrary/service/MissionInfo.cs
查看文件 @
aed2a71
...
@@ -13,21 +13,17 @@ namespace DeviceLibrary.manager
...
@@ -13,21 +13,17 @@ namespace DeviceLibrary.manager
public
class
MissionInfo
public
class
MissionInfo
{
{
/// <summary>
/// <summary>
///
请求任务
时间
///
呼叫
时间
/// </summary>
/// </summary>
public
DateTime
RTime
{
get
;
set
;
}
public
DateTime
RTime
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 呼叫地名称
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 治具类型
/// 治具类型
/// </summary>
/// </summary>
public
FixType
Type
{
get
;
set
;
}
public
FixType
Type
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 目的地名称
/// 目的地名称
/// </summary>
/// </summary>
public
string
Target
Name
{
get
;
set
;
}
public
string
Target
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 任务类型
/// 任务类型
/// </summary>
/// </summary>
...
@@ -36,12 +32,11 @@ namespace DeviceLibrary.manager
...
@@ -36,12 +32,11 @@ namespace DeviceLibrary.manager
/// 任务是否执行
/// 任务是否执行
/// </summary>
/// </summary>
public
bool
On
{
get
;
set
;
}
=
true
;
public
bool
On
{
get
;
set
;
}
=
true
;
public
MissionInfo
(
string
name
,
FixType
fixType
,
string
TargetNam
e
,
MissionType
missionType
)
public
MissionInfo
(
string
target
,
FixType
fixTyp
e
,
MissionType
missionType
)
{
{
RTime
=
DateTime
.
Now
;
RTime
=
DateTime
.
Now
;
Name
=
name
;
Type
=
fixType
;
Type
=
fixType
;
this
.
TargetName
=
TargetName
;
Target
=
target
;
MissionType
=
missionType
;
MissionType
=
missionType
;
}
}
public
MissionInfo
()
{
}
public
MissionInfo
()
{
}
...
@@ -55,12 +50,16 @@ namespace DeviceLibrary.manager
...
@@ -55,12 +50,16 @@ namespace DeviceLibrary.manager
}
}
return
tmp
;
return
tmp
;
}
}
public
string
ToTxt
()
{
return
$
" [Target={Target} Type={Type.ToString()}] "
;
}
public
override
bool
Equals
(
object
obj
)
public
override
bool
Equals
(
object
obj
)
{
{
if
(
obj
is
MissionInfo
)
if
(
obj
is
MissionInfo
)
{
{
MissionInfo
fixMissionInfo
=
obj
as
MissionInfo
;
MissionInfo
fixMissionInfo
=
obj
as
MissionInfo
;
if
(
this
.
Name
.
Equals
(
fixMissionInfo
.
Name
)
&&
this
.
Type
.
Equals
(
fixMissionInfo
.
Type
)
&&
this
.
TargetName
.
Equals
(
fixMissionInfo
.
TargetName
))
if
(
this
.
Target
.
Equals
(
fixMissionInfo
.
Target
))
return
true
;
return
true
;
else
else
return
false
;
return
false
;
...
...
SO940-AGV/App.config
查看文件 @
aed2a71
...
@@ -6,14 +6,13 @@
...
@@ -6,14 +6,13 @@
<
appSettings
>
<
appSettings
>
<
add
key
=
"ITS"
value
=
"10.85.17.233"
/>
<
add
key
=
"ITS"
value
=
"10.85.17.233"
/>
<
add
key
=
"WebService"
value
=
"http://127.0.0.1:8888/service/agv/
request/
"
/>
<
add
key
=
"WebService"
value
=
"http://127.0.0.1:8888/service/agv/"
/>
<
add
key
=
"http.server"
value
=
"http://10.85.162.124/myproject/"
/>
<
add
key
=
"http.server"
value
=
"http://10.85.162.124/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
=
"UseFleet"
value
=
"False"
/>
<
add
key
=
"ChargeThreshold"
value
=
"20,90"
/>
<
add
key
=
"ChargeThreshold"
value
=
"20,90"
/>
</
appSettings
>
</
appSettings
>
</
configuration
>
</
configuration
>
SO940-AGV/FrmMain.cs
查看文件 @
aed2a71
...
@@ -218,7 +218,7 @@ namespace AGVControl
...
@@ -218,7 +218,7 @@ namespace AGVControl
private
void
dgvInfos_CellContentClick
(
object
sender
,
DataGridViewCellEventArgs
e
)
private
void
dgvInfos_CellContentClick
(
object
sender
,
DataGridViewCellEventArgs
e
)
{
{
if
(
e
.
ColumnIndex
==
5
)
if
(
e
.
ColumnIndex
==
4
)
{
{
if
(
e
.
RowIndex
==
-
1
)
if
(
e
.
RowIndex
==
-
1
)
return
;
return
;
...
...
SO940-AGV/Manual.cs
查看文件 @
aed2a71
...
@@ -99,12 +99,14 @@ namespace AGVControl
...
@@ -99,12 +99,14 @@ namespace AGVControl
{
{
if
(
Agv
.
IsExistShelf
)
if
(
Agv
.
IsExistShelf
)
{
{
chkBxAuto
.
Checked
=
false
;
MessageBox
.
Show
(
this
,
string
.
Format
(
"{0} 车上有负载,无法开启自动模式,请先清空小车负载!"
,
Agv
.
Name
),
"警告"
);
LogUtil
.
error
(
string
.
Format
(
"{0} 车上有负载,无法开启自动模式,请先清空小车负载!"
,
Agv
.
Name
));
LogUtil
.
error
(
string
.
Format
(
"{0} 车上有负载,无法开启自动模式,请先清空小车负载!"
,
Agv
.
Name
));
return
;
return
;
}
}
if
(
Agv
.
Place
.
Equals
(
SettingString
.
Standby
)
||
Agv
.
Place
.
Equals
(
SettingString
.
AutoCharge
))
//
if (Agv.Place.Equals(SettingString.Standby) || Agv.Place.Equals(SettingString.AutoCharge))
Agv
.
Place
=
new
Node
();
//
Agv.Place = new Node();
if
(
Agv
.
IsCon
)
if
(
Agv
.
IsCon
)
MiR_API
.
Del_Mission
(
Agv
);
MiR_API
.
Del_Mission
(
Agv
);
}
}
...
...
SO940-AGV/log4net.config
查看文件 @
aed2a71
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
<
file
value
=
"logs/runLog/RunLog.json"
/>
<
file
value
=
"logs/runLog/RunLog.json"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
appendToFile
value
=
"true"
/>
<
param
name
=
"MaxSizeRollBackups"
value
=
"
1
0"
/>
<
param
name
=
"MaxSizeRollBackups"
value
=
"
3
0"
/>
<
rollingStyle
value
=
"Date"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
...
...
_system~.ini
0 → 100644
查看文件 @
aed2a71
文件属性发生变化
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论