Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
RC1250-FeederLineClient
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 1dc13a38
由
张东亮
编写于
2020-10-16 15:05:09 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
更改1
1 个父辈
88503705
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
22 行增加
和
18 行删除
source/DeviceLibrary/acFeederLine/FeederLineBean.cs
source/DeviceLibrary/agvClient/AgvClient.cs
source/DeviceLibrary/acFeederLine/FeederLineBean.cs
查看文件 @
1dc13a3
...
@@ -290,7 +290,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -290,7 +290,7 @@ namespace OnlineStore.DeviceLibrary
&&
l1_down_sig
&&
span
.
TotalSeconds
>
3
)
&&
l1_down_sig
&&
span
.
TotalSeconds
>
3
)
{
{
//如果Feeder1出口无料架,放一个料架到出口
//如果Feeder1出口无料架,放一个料架到出口
if
(
LineManager
.
checkWatch
(
ol_noshelfWatch1
,
1
000
))
if
(
LineManager
.
checkWatch
(
ol_noshelfWatch1
,
5
000
))
{
{
StopIOMove
(
IO_Type
.
L1_OutStopDown
,
StopDownMS
);
StopIOMove
(
IO_Type
.
L1_OutStopDown
,
StopDownMS
);
Thread
.
Sleep
(
1000
);
Thread
.
Sleep
(
1000
);
...
@@ -341,7 +341,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -341,7 +341,7 @@ namespace OnlineStore.DeviceLibrary
//Thread.Sleep(1000);
//Thread.Sleep(1000);
//IOManager.IOMove(IO_Type.Traverse_Up_SOL, IO_VALUE.LOW);
//IOManager.IOMove(IO_Type.Traverse_Up_SOL, IO_VALUE.LOW);
//Thread.Sleep(1000);
//Thread.Sleep(1000);
LogUtil
.
info
(
" 横移机构转移料架超时 ["
+
IO_Type
.
L1_StopDown
+
"]
["
+
stopwatch
.
Elapsed
.
TotalSeconds
+
"秒]
"
);
LogUtil
.
info
(
" 横移机构转移料架超时 ["
+
IO_Type
.
L1_StopDown
+
"]
大于2分钟
"
);
//break;
//break;
}
}
}
}
...
...
source/DeviceLibrary/agvClient/AgvClient.cs
查看文件 @
1dc13a3
...
@@ -21,6 +21,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -21,6 +21,8 @@ namespace OnlineStore.DeviceLibrary
public
bool
D21_InProcess
=
false
;
public
bool
D21_InProcess
=
false
;
public
bool
D22_InProcess
=
false
;
public
bool
D22_InProcess
=
false
;
private
static
string
InLine_Name
=
"C21"
;
private
static
string
OutLine_Name
=
"C22"
;
public
string
D22_RFID
{
get
;
set
;
}
=
""
;
public
string
D22_RFID
{
get
;
set
;
}
=
""
;
#
region
D21
Action
#
region
D21
Action
/// <summary>
/// <summary>
...
@@ -72,8 +74,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -72,8 +74,8 @@ namespace OnlineStore.DeviceLibrary
agvClient
.
AGVFinishLeave
+=
AgvClient_FinishLeave
;
agvClient
.
AGVFinishLeave
+=
AgvClient_FinishLeave
;
}
}
actionMap
=
new
Dictionary
<
string
,
AsaPL
.
ClientAction
>();
actionMap
=
new
Dictionary
<
string
,
AsaPL
.
ClientAction
>();
agvClient
.
SetStatus
(
"D21"
,
""
,
ClientAction
.
None
);
agvClient
.
SetStatus
(
InLine_Name
,
""
,
ClientAction
.
None
);
agvClient
.
SetStatus
(
"D22"
,
""
,
ClientAction
.
None
);
agvClient
.
SetStatus
(
OutLine_Name
,
""
,
ClientAction
.
None
);
agvClient
.
Connect
();
agvClient
.
Connect
();
LogUtil
.
info
(
"初始化AGV服务"
);
LogUtil
.
info
(
"初始化AGV服务"
);
}
}
...
@@ -100,9 +102,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -100,9 +102,9 @@ namespace OnlineStore.DeviceLibrary
/// <param name="name">节点名称</param>
/// <param name="name">节点名称</param>
private
void
AgvClient_ReadyEnter
(
string
name
)
private
void
AgvClient_ReadyEnter
(
string
name
)
{
{
if
(
IOManager
.
IOValue
(
IO_Type
.
L1_InCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
!
D21_InProcess
&&
name
.
Equals
(
"D21"
))
if
(
IOManager
.
IOValue
(
IO_Type
.
L1_InCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
!
D21_InProcess
&&
name
.
Equals
(
InLine_Name
))
{
{
MayEnter
(
"D21"
);
MayEnter
(
InLine_Name
);
Task
.
Factory
.
StartNew
(
delegate
Task
.
Factory
.
StartNew
(
delegate
{
{
Feeder_In_Msg
=
"Feeder In: 等待 L1_InCheck=HIGH"
;
Feeder_In_Msg
=
"Feeder In: 等待 L1_InCheck=HIGH"
;
...
@@ -123,7 +125,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -123,7 +125,7 @@ namespace OnlineStore.DeviceLibrary
Thread
.
Sleep
(
5000
);
Thread
.
Sleep
(
5000
);
Feeder_In_Msg
=
"Feeder In: 调用 FinishEnter "
;
Feeder_In_Msg
=
"Feeder In: 调用 FinishEnter "
;
LogUtil
.
info
(
Feeder_In_Msg
);
LogUtil
.
info
(
Feeder_In_Msg
);
FinishEnter
(
"D21"
);
FinishEnter
(
InLine_Name
);
Feeder_In_Msg
=
"Feeder In: 处理结束 更新状态为None "
;
Feeder_In_Msg
=
"Feeder In: 处理结束 更新状态为None "
;
LogUtil
.
info
(
Feeder_In_Msg
);
LogUtil
.
info
(
Feeder_In_Msg
);
D21_None
();
D21_None
();
...
@@ -154,10 +156,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -154,10 +156,10 @@ namespace OnlineStore.DeviceLibrary
// D22_InProcess = true;
// D22_InProcess = true;
// D22_ReadyLeave = true;
// D22_ReadyLeave = true;
//}
//}
if
(
IOManager
.
IOValue
(
IO_Type
.
L2_OutCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
!
D22_InProcess
&&
name
.
Equals
(
"D22"
))
if
(
IOManager
.
IOValue
(
IO_Type
.
L2_OutCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
!
D22_InProcess
&&
name
.
Equals
(
OutLine_Name
))
{
{
MayLeave
(
"D22"
);
MayLeave
(
OutLine_Name
);
//LineManager.feederLine.UpdateSleep(false);
//LineManager.feederLine.UpdateSleep(false);
LineManager
.
feederLine
.
StopIOMove
(
IO_Type
.
L2_OutStopDown
,
1500
);
LineManager
.
feederLine
.
StopIOMove
(
IO_Type
.
L2_OutStopDown
,
1500
);
//agvClient.MayLeave(id);
//agvClient.MayLeave(id);
...
@@ -171,7 +173,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -171,7 +173,7 @@ namespace OnlineStore.DeviceLibrary
Thread
.
Sleep
(
10000
);
Thread
.
Sleep
(
10000
);
Feeder_Out_Msg
=
"Feeder Out: 调用 FinishLeave "
;
Feeder_Out_Msg
=
"Feeder Out: 调用 FinishLeave "
;
LogUtil
.
info
(
Feeder_Out_Msg
);
LogUtil
.
info
(
Feeder_Out_Msg
);
FinishLeave
(
"D22"
);
FinishLeave
(
OutLine_Name
);
Thread
.
Sleep
(
5000
);
Thread
.
Sleep
(
5000
);
Feeder_Out_Msg
=
"Feeder Out: 处理结束 更新状态为None "
;
Feeder_Out_Msg
=
"Feeder Out: 处理结束 更新状态为None "
;
...
@@ -197,11 +199,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -197,11 +199,11 @@ namespace OnlineStore.DeviceLibrary
/// <param name="name"></param>
/// <param name="name"></param>
private
void
AgvClient_FinishLeave
(
string
name
)
private
void
AgvClient_FinishLeave
(
string
name
)
{
{
if
(
name
.
Equals
(
"D21"
))
if
(
name
.
Equals
(
InLine_Name
))
{
{
D21_InProcess
=
false
;
D21_InProcess
=
false
;
}
}
else
if
(
name
.
Equals
(
"D22"
))
else
if
(
name
.
Equals
(
OutLine_Name
))
{
{
D22_InProcess
=
false
;
D22_InProcess
=
false
;
}
}
...
@@ -227,19 +229,21 @@ namespace OnlineStore.DeviceLibrary
...
@@ -227,19 +229,21 @@ namespace OnlineStore.DeviceLibrary
public
void
MayEnter
(
string
name
)
public
void
MayEnter
(
string
name
)
{
{
SetStatus
(
name
,
""
,
ClientAction
.
MayEnter
);
SetStatus
(
name
,
""
,
ClientAction
.
MayEnter
);
if
(
name
.
Equals
(
"D21"
))
if
(
name
.
Equals
(
InLine_Name
))
{
{
D21_InProcess
=
true
;
D21_InProcess
=
true
;
}
}
LogUtil
.
info
(
"MayEnter ["
+
name
+
"] "
);
}
}
public
void
MayLeave
(
string
name
)
public
void
MayLeave
(
string
name
)
{
{
SetStatus
(
name
,
""
,
ClientAction
.
MayLeave
);
SetStatus
(
name
,
""
,
ClientAction
.
MayLeave
);
if
(
name
.
Equals
(
"D22"
))
if
(
name
.
Equals
(
OutLine_Name
))
{
{
D22_InProcess
=
true
;
D22_InProcess
=
true
;
}
}
LogUtil
.
info
(
"MayLeave ["
+
name
+
"] "
);
}
}
/// <summary>
/// <summary>
...
@@ -253,11 +257,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -253,11 +257,11 @@ namespace OnlineStore.DeviceLibrary
SetStatus
(
name
,
""
,
ClientAction
.
FinishEnter
);
SetStatus
(
name
,
""
,
ClientAction
.
FinishEnter
);
Thread
.
Sleep
(
15000
);
Thread
.
Sleep
(
15000
);
if
(
name
.
Equals
(
"D21"
))
if
(
name
.
Equals
(
InLine_Name
))
{
{
D21_InProcess
=
false
;
D21_InProcess
=
false
;
}
}
else
if
(
name
.
Equals
(
"D22"
))
else
if
(
name
.
Equals
(
OutLine_Name
))
{
{
D22_InProcess
=
false
;
D22_InProcess
=
false
;
}
}
...
@@ -274,11 +278,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -274,11 +278,11 @@ namespace OnlineStore.DeviceLibrary
{
{
SetStatus
(
name
,
""
,
ClientAction
.
FinishLeave
);
SetStatus
(
name
,
""
,
ClientAction
.
FinishLeave
);
Thread
.
Sleep
(
15000
);
Thread
.
Sleep
(
15000
);
if
(
name
.
Equals
(
"D21"
))
if
(
name
.
Equals
(
InLine_Name
))
{
{
D21_InProcess
=
false
;
D21_InProcess
=
false
;
}
}
else
if
(
name
.
Equals
(
"D22"
))
else
if
(
name
.
Equals
(
OutLine_Name
))
{
{
D22_InProcess
=
false
;
D22_InProcess
=
false
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论