Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
RC1250-FeederLineClient
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 0c638219
由
张东亮
编写于
2020-12-22 10:30:44 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
11
1 个父辈
0b5ed504
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
17 行增加
和
15 行删除
source/DeviceLibrary/acFeederLine/FeederLineBean.cs
source/DeviceLibrary/agvClient/AgvClient.cs
source/DeviceLibrary/acFeederLine/FeederLineBean.cs
查看文件 @
0c63821
...
@@ -261,6 +261,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -261,6 +261,7 @@ namespace OnlineStore.DeviceLibrary
private
Stopwatch
ol_noshelfWatch
=
new
Stopwatch
();
private
Stopwatch
ol_noshelfWatch
=
new
Stopwatch
();
private
Stopwatch
ol_noshelfWatch1
=
new
Stopwatch
();
private
Stopwatch
ol_noshelfWatch1
=
new
Stopwatch
();
private
Stopwatch
rfidWatch
=
new
Stopwatch
();
private
DateTime
ol_lastSendShelfTime
=
DateTime
.
Now
;
private
DateTime
ol_lastSendShelfTime
=
DateTime
.
Now
;
private
int
StopDownMS
=
1500
;
private
int
StopDownMS
=
1500
;
/// <summary>
/// <summary>
...
@@ -283,6 +284,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -283,6 +284,7 @@ namespace OnlineStore.DeviceLibrary
IOManager
.
CIOMove
(
IO_Type
.
L2_OutStopDown
,
IO_VALUE
.
LOW
);
IOManager
.
CIOMove
(
IO_Type
.
L2_OutStopDown
,
IO_VALUE
.
LOW
);
LogUtil
.
info
(
" Feeder2线体出口无料架,下降 ["
+
IO_Type
.
L2_StopDown
+
"] ["
+
StopDownMS
+
"] 秒"
);
LogUtil
.
info
(
" Feeder2线体出口无料架,下降 ["
+
IO_Type
.
L2_StopDown
+
"] ["
+
StopDownMS
+
"] 秒"
);
ol_lastSendShelfTime
=
DateTime
.
Now
;
ol_lastSendShelfTime
=
DateTime
.
Now
;
agvClient
.
OutLine_RFID
=
""
;
StopIOMove
(
IO_Type
.
L2_StopDown
,
StopDownMS
);
StopIOMove
(
IO_Type
.
L2_StopDown
,
StopDownMS
);
}
}
}
}
...
@@ -307,15 +309,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -307,15 +309,10 @@ namespace OnlineStore.DeviceLibrary
IOManager
.
CIOMove
(
IO_Type
.
L1_StopDown
,
IO_VALUE
.
LOW
);
IOManager
.
CIOMove
(
IO_Type
.
L1_StopDown
,
IO_VALUE
.
LOW
);
IOManager
.
CIOMove
(
IO_Type
.
L1_OutStopDown
,
IO_VALUE
.
LOW
);
IOManager
.
CIOMove
(
IO_Type
.
L1_OutStopDown
,
IO_VALUE
.
LOW
);
}
}
if
(
IOManager
.
IOValue
(
IO_Type
.
L2_OutCheck
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOManager
.
IOValue
(
IO_Type
.
L2_OutCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
LineManager
.
checkWatch
(
rfidWatch
,
2000
)
)
{
{
if
(!
LastOutShelfId
.
Equals
(
agvClient
.
OutLine_RFID
))
agvClient
.
OutLine_NeedLeave
(
LastOutShelfId
);
{
agvClient
.
OutLine_RFID
=
LastOutShelfId
;
agvClient
.
OutLine_NeedLeave
();
}
}
}
}
}
private
Task
TranverseTask
;
private
Task
TranverseTask
;
private
static
void
TranverseProcess
()
private
static
void
TranverseProcess
()
...
...
source/DeviceLibrary/agvClient/AgvClient.cs
查看文件 @
0c63821
...
@@ -45,17 +45,22 @@ namespace OnlineStore.DeviceLibrary
...
@@ -45,17 +45,22 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// <summary>
/// 无状态
/// 无状态
/// </summary>
/// </summary>
public
void
OutLine_None
()
public
void
OutLine_None
(
string
rfid
=
""
)
{
{
SetStatus
(
OutLine_Name
,
""
,
ClientAction
.
None
);
SetStatus
(
OutLine_Name
,
rfid
,
ClientAction
.
None
);
}
}
/// <summary>
/// <summary>
/// 可以出去状态
/// 可以出去状态
/// </summary>
/// </summary>
public
void
OutLine_NeedLeave
()
public
void
OutLine_NeedLeave
(
string
rfid
)
{
{
SetStatus
(
OutLine_Name
,
OutLine_RFID
,
ClientAction
.
NeedLeave
);
if
(!
OutLine_RFID
.
Equals
(
rfid
))
{
OutLine_RFID
=
rfid
;
SetStatus
(
OutLine_Name
,
rfid
,
ClientAction
.
NeedLeave
);
}
}
}
#
endregion
#
endregion
...
@@ -235,7 +240,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -235,7 +240,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
"MayEnter ["
+
name
+
"] "
);
LogUtil
.
info
(
"MayEnter ["
+
name
+
"] "
);
}
}
public
void
MayLeave
(
string
name
,
string
rfid
)
public
void
MayLeave
(
string
name
,
string
rfid
)
{
{
SetStatus
(
name
,
rfid
,
ClientAction
.
MayLeave
);
SetStatus
(
name
,
rfid
,
ClientAction
.
MayLeave
);
if
(
name
.
Equals
(
OutLine_Name
))
if
(
name
.
Equals
(
OutLine_Name
))
...
@@ -271,7 +276,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -271,7 +276,7 @@ namespace OnlineStore.DeviceLibrary
/// 料架离开产线完成
/// 料架离开产线完成
/// </summary>
/// </summary>
/// <param name="name"></param>
/// <param name="name"></param>
public
void
FinishLeave
(
string
name
,
string
rfid
=
""
)
public
void
FinishLeave
(
string
name
,
string
rfid
=
""
)
{
{
Task
.
Factory
.
StartNew
(
delegate
Task
.
Factory
.
StartNew
(
delegate
{
{
...
@@ -307,12 +312,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -307,12 +312,12 @@ namespace OnlineStore.DeviceLibrary
}
}
// actionMap[name] = action;
// actionMap[name] = action;
// agvClient.SetStatus(name, shelfId, action, level);
// agvClient.SetStatus(name, shelfId, action, level);
//
LogUtil.info("设置 " + name + " [" + shelfId + "] " + action.ToString());
LogUtil
.
info
(
"设置 "
+
name
+
" ["
+
shelfId
+
"] "
+
action
.
ToString
());
return
true
;
return
true
;
}
}
agvClient
.
SetStatus
(
name
,
shelfId
,
action
,
level
);
agvClient
.
SetStatus
(
name
,
shelfId
,
action
,
level
);
//actionMap.Add(name, action);
//actionMap.Add(name, action);
//
LogUtil.info("设置 " + name + " ["+ shelfId + "] "+ action.ToString());
LogUtil
.
info
(
"设置 "
+
name
+
" ["
+
shelfId
+
"] "
+
action
.
ToString
());
return
true
;
return
true
;
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论