Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-ACPackingStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 724c59e4
由
LN
编写于
2020-02-21 18:37:04 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加AgvClient_EnterShelf事件处理
1 个父辈
42bbba02
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
48 行增加
和
37 行删除
dll/Client.dll
dll/Client.xml
source/ACPackingStore/记录.txt
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
source/DeviceLibrary/ACPackingStore/PackingStoreBean.cs
source/DeviceLibrary/agvClient/AgvClient.cs
dll/Client.dll
查看文件 @
724c59e
此文件类型无法预览
dll/Client.xml
查看文件 @
724c59e
...
...
@@ -242,7 +242,12 @@
</member>
<member
name=
"E:Asa.Client2.CloseDoor"
>
<summary>
关门
关门,仅包装料仓
</summary>
</member>
<member
name=
"E:Asa.Client2.EnterShelf"
>
<summary>
准备进入料架不能出料,仅包装料仓
</summary>
</member>
<member
name=
"E:Asa.Client2.Log"
>
...
...
@@ -431,6 +436,11 @@
小车已准备,已对接上流水线
</summary>
</member>
<member
name=
"F:Asa.ClientAction.EnterShelf"
>
<summary>
包装料仓只能入料不能出料
</summary>
</member>
<member
name=
"T:Asa.ClientLevel"
>
<summary>
客户端的优先级
...
...
source/ACPackingStore/记录.txt
查看文件 @
724c59e
...
...
@@ -58,5 +58,6 @@ agvclien增加cancelState的参数设置
BI_03_LineRun超时报警改为40秒
20200221
agv客户端启动时需要设置状态为none
区分是入库结束出空料架还是出库完成的有料料架,当入库完成出空料架时,mark="0"
\ No newline at end of file
agv客户端启动时需要设置状态为none。
区分是入库结束出空料架还是出库完成的有料料架,当入库完成出空料架时,mark="0"。
增加AgvClient_EnterShelf事件处理。
\ No newline at end of file
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean.cs
查看文件 @
724c59e
...
...
@@ -43,6 +43,10 @@ namespace OnlineStore.DeviceLibrary
public
HumitureBean
humBean
=
null
;
private
System
.
Timers
.
Timer
serverConnectTimer
=
new
System
.
Timers
.
Timer
();
private
System
.
Timers
.
Timer
IoCheckTimer
=
new
System
.
Timers
.
Timer
();
/// <summary>
/// 是否有料架在来的路上
/// </summary>
public
bool
WaitShelfEnter
=
false
;
public
AC_BOX_Bean
(
AC_BOX_Config
config
)
{
Init
();
...
...
@@ -140,15 +144,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
Name
+
"启动失败:设备未初始化完成"
);
return
false
;
}
LogInfo
(
"开始启动,启动时间:"
+
StartTime
.
ToString
());
// if (IsDebug)
//{
// //连接AGV调度
// if (!AgvClient.ISConnected())
// {
// AgvClient.Init();
// }
//}
LogInfo
(
"开始启动,启动时间:"
+
StartTime
.
ToString
());
AutoInout
.
StopAuto
();
mainTimer
.
Enabled
=
false
;
alarmType
=
StoreAlarmType
.
None
;
...
...
@@ -214,6 +210,7 @@ namespace OnlineStore.DeviceLibrary
#
region
原点返回和复位处理
private
void
ReturnHome
()
{
WaitShelfEnter
=
false
;
lastPosId
=
""
;
lastPosIdStatus
=
StoreStatus
.
ResetMove
;
AutoInout
.
ClearCount
();
...
...
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
查看文件 @
724c59e
...
...
@@ -287,7 +287,8 @@ namespace OnlineStore.DeviceLibrary
else
{
LogInfo
(
" 空闲中,需要料架入库,料架入库 "
+
MoveInfo
.
SLog
+
":入料口移门打开,"
);
LogInfo
(
" 空闲中,需要料架入库,料架入库 "
+
MoveInfo
.
SLog
+
":入料口移门打开,更新 WaitShelfEnter=false"
);
WaitShelfEnter
=
false
;
MoveInfo
.
NewMove
(
StoreMoveType
.
InStore
,
new
InOutParam
());
MoveInfo
.
MoveParam
.
MoveP
=
new
LineMoveP
(
Config
);
MoveInfo
.
ShelfPositionList
=
new
List
<
string
>(
ShelfPosList
);
...
...
@@ -739,7 +740,10 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
Name
+
" 启动出库【"
+
param
.
ToStr
()
+
"】失败,忙碌或报警中 ,storeStatus:"
+
storeRunStatus
+
",MoveType:"
+
MoveInfo
.
MoveType
+
",isInSuddenDown:"
+
isInSuddenDown
+
",isNoAirCheck:"
+
isNoAirCheck
);
return
false
;
}
if
(
WaitShelfEnter
)
{
LogUtil
.
error
(
Name
+
" 启动出库【"
+
param
.
ToStr
()
+
"】失败,WaitShelfEnter=true ,需要等待入库结束才能出库"
);
}
if
(!
StoreManager
.
LoadInoutParam
(
param
,
false
,
this
))
{
LogUtil
.
error
(
Name
+
" 启动出库【"
+
param
.
ToStr
()
+
"】出错,找不到库位信息"
);
...
...
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
查看文件 @
724c59e
...
...
@@ -300,35 +300,16 @@ namespace OnlineStore.DeviceLibrary
internal
bool
ProcessAGVAction
(
string
name
,
ClientAction
action
)
{
string
logN
=
name
+
"收到调度【"
+
name
+
"】=【"
+
action
+
"】"
;
//状态处理
//if (action.Equals(ClientAction.CanEnter))
//{
// //判断入口是否可用:入口无料架,缓冲工位无料架,不在入料架处理中
// bool usable = (storeRunStatus.Equals(StoreRunStatus.Runing) &&
// waitOutStoreList.Count <= 0 &&
// MoveInfo.MoveType.Equals(StoreMoveType.None) &&
// alarmType.Equals(StoreAlarmType.None)
// && IOValue(IO_Type.LineIn_Check).Equals(IO_VALUE.LOW)
// && IOValue(IO_Type.LineTake_Check).Equals(IO_VALUE.LOW));
// LogUtil.info(logN + ":" + usable);
// return usable;
//}
//else
//Arrive收到后打开门
if
(
action
.
Equals
(
ClientAction
.
Arrive
))
{
{
//出库处理中不处理
if
(
MoveInfo
.
MoveType
.
Equals
(
StoreMoveType
.
OutStore
))
{
return
true
;
}
//if (IOValue(IO_Type.LineIn_Check).Equals(IO_VALUE.LOW))
//{
// LogUtil.info(logN + " ,未检测到:LineIn_Check,不处理");
// return false;
//}
//agv到达,开始处理
if
(
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
)
&&
MoveInfo
.
MoveType
.
Equals
(
StoreMoveType
.
None
)
&&
...
...
source/DeviceLibrary/ACPackingStore/PackingStoreBean.cs
查看文件 @
724c59e
...
...
@@ -399,7 +399,7 @@ namespace OnlineStore.DeviceLibrary
}
}
return
false
;
}
}
public
override
void
Alarm
(
StoreAlarmType
alarmType
,
string
alarmDetial
,
string
alarmMsg
,
StoreMoveType
storeMoveType
)
{
...
...
source/DeviceLibrary/agvClient/AgvClient.cs
查看文件 @
724c59e
...
...
@@ -31,6 +31,7 @@ namespace OnlineStore.DeviceLibrary
agvClient
.
Arrive
+=
AgvClient_Arrive
;
agvClient
.
Ready
+=
AgvClient_Ready
;
agvClient
.
CloseDoor
+=
AgvClient_CloseDoor
;
agvClient
.
EnterShelf
+=
AgvClient_EnterShelf
;
}
actionMap
=
new
Dictionary
<
string
,
Asa
.
ClientAction
>();
//foreach (string key in NodeList)
...
...
@@ -50,6 +51,23 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
"初始化agvClient "
+
ServerIp
+
" 出错:"
+
ex
.
ToString
());
}
}
private
static
void
AgvClient_EnterShelf
(
string
id
,
byte
[]
content
)
{
RFIDData
data
=
new
RFIDData
(
content
);
LogUtil
.
info
(
"收到 AgvClient_EnterShelf ["
+
id
+
"] ["
+
data
.
NumStr
()
+
"] "
);
StoreManager
.
Store
.
AGVProcess
(
id
,
ClientAction
.
Arrive
);
foreach
(
AC_BOX_Bean
box
in
StoreManager
.
Store
.
BoxMap
.
Values
)
{
if
(
box
.
Config
.
AgvNodeName
.
Equals
(
id
))
{
LogUtil
.
info
(
"收到 AgvClient_EnterShelf ["
+
id
+
"] ["
+
data
.
NumStr
()
+
"] ,设置 ["
+
box
.
Name
+
"] WaitShelfEnter = true"
);
box
.
WaitShelfEnter
=
true
;
break
;
}
}
}
public
static
void
SetCancelState
(
bool
isCancel
)
{
agvClient
.
CancelState
=
isCancel
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论