Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 120633de
由
LN
编写于
2020-02-15 15:48:46 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
3315e408
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
26 行增加
和
24 行删除
source/DeviceLibrary/agvClient/AgvClient.cs
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
source/DeviceLibrary/assemblyLine/LineBean.cs
source/DeviceLibrary/agvClient/AgvClient.cs
查看文件 @
120633d
...
...
@@ -129,17 +129,17 @@ namespace OnlineStore.DeviceLibrary
public
static
bool
SetToNone
(
string
id
,
string
shelfId
=
""
)
{
ClientAction
currA
=
GetAction
(
id
);
if
(
currA
.
Equals
(
ClientAction
.
None
)
||
currA
.
Equals
(
ClientAction
.
FinishLeave
)
||
currA
.
Equals
(
ClientAction
.
FinishEnter
)
||
currA
.
Equals
(
ClientAction
.
NeedLeave
)
||
currA
.
Equals
(
ClientAction
.
NeedEnter
))
if
(
currA
.
Equals
(
ClientAction
.
None
)
||
currA
.
Equals
(
ClientAction
.
NeedLeave
)
||
currA
.
Equals
(
ClientAction
.
NeedEnter
))
{
SetStatus
(
id
,
shelfId
,
ClientAction
.
None
);
return
true
;
}
return
false
;
}
public
static
bool
NeedEnter
(
string
id
,
string
shelfId
=
""
)
public
static
bool
NeedEnter
(
string
id
,
string
shelfId
=
""
)
{
ClientAction
currA
=
GetAction
(
id
);
if
(
currA
.
Equals
(
ClientAction
.
None
)
||
currA
.
Equals
(
ClientAction
.
FinishLeave
)
||
currA
.
Equals
(
ClientAction
.
FinishEnter
)
||
currA
.
Equals
(
ClientAction
.
NeedLeave
)
||
currA
.
Equals
(
ClientAction
.
NeedEnter
))
if
(
currA
.
Equals
(
ClientAction
.
None
)
||
currA
.
Equals
(
ClientAction
.
NeedLeave
)
||
currA
.
Equals
(
ClientAction
.
NeedEnter
))
{
SetStatus
(
id
,
shelfId
,
ClientAction
.
NeedEnter
);
return
true
;
...
...
@@ -148,28 +148,27 @@ namespace OnlineStore.DeviceLibrary
}
public
static
bool
NeedLeave
(
string
id
,
string
shelfId
=
""
)
{
ClientAction
currA
=
GetAction
(
id
);
if
(
currA
.
Equals
(
ClientAction
.
None
)
||
currA
.
Equals
(
ClientAction
.
FinishLeave
)
||
currA
.
Equals
(
ClientAction
.
FinishEnter
)
||
currA
.
Equals
(
ClientAction
.
NeedLeave
)
||
currA
.
Equals
(
ClientAction
.
NeedEnter
))
if
(
currA
.
Equals
(
ClientAction
.
None
)
||
currA
.
Equals
(
ClientAction
.
NeedLeave
)
||
currA
.
Equals
(
ClientAction
.
NeedEnter
))
{
SetStatus
(
id
,
shelfId
,
ClientAction
.
NeedLeave
);
return
true
;
}
return
false
;
}
internal
static
void
MayEnter
(
string
NodeName
,
string
shelfId
=
""
)
{
SetStatus
(
NodeName
,
shelfId
,
ClientAction
.
MayEnter
,
ClientLevel
.
High
);
}
internal
static
void
FinishEnter
(
string
NodeName
,
string
shelfId
=
""
)
{
SetStatus
(
NodeName
,
shelfId
,
ClientAction
.
FinishEnter
,
ClientLevel
.
High
);
}
//
internal static void MayEnter(string NodeName, string shelfId = "")
//
{
//
SetStatus(NodeName, shelfId, ClientAction.MayEnter, ClientLevel.High);
//
}
//
internal static void FinishEnter(string NodeName, string shelfId = "")
//
{
//
SetStatus(NodeName, shelfId, ClientAction.FinishEnter, ClientLevel.High);
//
}
internal
static
void
MayLeave
(
string
NodeName
,
string
shelfId
=
""
)
{
SetStatus
(
NodeName
,
shelfId
,
ClientAction
.
MayLeave
,
ClientLevel
.
High
);
}
//
internal static void MayLeave(string NodeName, string shelfId = "")
//
{
//
SetStatus(NodeName, shelfId, ClientAction.MayLeave, ClientLevel.High);
//
}
private
static
bool
isLog
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
Agv_Log_Open
).
Equals
(
1
);
private
static
void
AgvClient_Log
(
string
s
)
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
查看文件 @
120633d
...
...
@@ -102,6 +102,9 @@ namespace OnlineStore.DeviceLibrary
{
LogInfo
(
"复位前,清理出库高度:"
+
OutStoreHeight
);
}
//复位时设置状态为none
AgvClient
.
SetStatus
(
Config
.
AgvInName
);
AgvClient
.
SetStatus
(
Config
.
AgvOutName
);
OutStoreHeight
=
-
1
;
//OutStoreCount = 0;
...
...
@@ -673,7 +676,7 @@ namespace OnlineStore.DeviceLibrary
if
(
IOValue
(
IO_Type
.
SL_Out_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
LogUtil
.
info
(
logName
+
"开始"
);
AgvClient
.
MayLeave
(
Config
.
AgvOutName
);
AgvClient
.
SetStatus
(
Config
.
AgvOutName
,
""
,
ClientAction
.
MayLeave
,
ClientLevel
.
High
);
ProcessShelfOut
=
true
;
//出口阻挡下降,出口线体转动
IOMove
(
IO_Type
.
SL_Out_StopDown
,
IO_VALUE
.
HIGH
);
...
...
@@ -697,7 +700,7 @@ namespace OnlineStore.DeviceLibrary
Task
.
Factory
.
StartNew
(
delegate
{
Thread
.
Sleep
(
10000
);
AgvClient
.
SetStatus
(
Config
.
AgvOutName
,
""
,
ClientAction
.
None
);
AgvClient
.
SetStatus
(
Config
.
AgvOutName
,
""
,
ClientAction
.
None
,
ClientLevel
.
High
);
});
ProcessShelfOut
=
false
;
LogUtil
.
info
(
logName
+
" 结束"
);
...
...
@@ -728,7 +731,7 @@ namespace OnlineStore.DeviceLibrary
if
(
IOValue
(
IO_Type
.
SL_Entry_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
LogUtil
.
info
(
logName
+
" 开始"
);
AgvClient
.
MayEnter
(
Config
.
AgvInName
);
AgvClient
.
SetStatus
(
Config
.
AgvInName
,
""
,
ClientAction
.
MayEnter
,
ClientLevel
.
High
);
ProcessShelfEnter
=
true
;
////进料阻挡上升
//IOMove(IO_Type.SL_Entry_StopDown, IO_VALUE.LOW);
...
...
@@ -751,11 +754,11 @@ namespace OnlineStore.DeviceLibrary
Thread
.
Sleep
(
3000
);
IOMove
(
IO_Type
.
SL_Line_Run
,
IO_VALUE
.
LOW
);
//料架可离开
AgvClient
.
FinishEnter
(
Config
.
AgvInName
);
AgvClient
.
SetStatus
(
Config
.
AgvInName
,
""
,
ClientAction
.
FinishEnter
,
ClientLevel
.
High
);
Task
.
Factory
.
StartNew
(
delegate
{
Thread
.
Sleep
(
10000
);
AgvClient
.
SetStatus
(
Config
.
AgvInName
,
""
,
ClientAction
.
None
);
AgvClient
.
SetStatus
(
Config
.
AgvInName
,
""
,
ClientAction
.
None
,
ClientLevel
.
High
);
});
ProcessShelfEnter
=
false
;
LogUtil
.
info
(
logName
+
" 结束"
);
...
...
source/DeviceLibrary/assemblyLine/LineBean.cs
查看文件 @
120633d
...
...
@@ -271,8 +271,8 @@ namespace OnlineStore.DeviceLibrary
if
(!
AgvClient
.
ISConnected
())
{
AgvClient
.
Init
();
}
}
LineServer
.
StartServer
(
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
TCPServerPort
));
RHomeOp
();
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论