Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-ACPackingStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 0b688069
由
LN
编写于
2020-02-20 17:09:32 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
agv增加cancelState
1 个父辈
8c704242
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
22 行增加
和
15 行删除
source/ACPackingStore/FrmStore.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean.cs
source/DeviceLibrary/ACPackingStore/PackingStoreBean.cs
source/DeviceLibrary/agvClient/AgvClient.cs
source/ACPackingStore/FrmStore.cs
查看文件 @
0b68806
...
@@ -323,6 +323,7 @@ namespace OnlineStore.ACPackingStore
...
@@ -323,6 +323,7 @@ namespace OnlineStore.ACPackingStore
}
}
RFIDManager
.
Close
();
RFIDManager
.
Close
();
AgvClient
.
Dispose
();
}
}
private
void
btnClearLog_Click
(
object
sender
,
EventArgs
e
)
private
void
btnClearLog_Click
(
object
sender
,
EventArgs
e
)
{
{
...
...
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean.cs
查看文件 @
0b68806
...
@@ -142,13 +142,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -142,13 +142,13 @@ namespace OnlineStore.DeviceLibrary
}
}
LogInfo
(
"开始启动,启动时间:"
+
StartTime
.
ToString
());
LogInfo
(
"开始启动,启动时间:"
+
StartTime
.
ToString
());
// if (IsDebug)
// if (IsDebug)
{
//
{
//连接AGV调度
//
//连接AGV调度
if
(!
AgvClient
.
ISConnected
())
//
if (!AgvClient.ISConnected())
{
//
{
AgvClient
.
Init
();
//
AgvClient.Init();
}
//
}
}
//
}
AutoInout
.
StopAuto
();
AutoInout
.
StopAuto
();
mainTimer
.
Enabled
=
false
;
mainTimer
.
Enabled
=
false
;
alarmType
=
StoreAlarmType
.
None
;
alarmType
=
StoreAlarmType
.
None
;
...
...
source/DeviceLibrary/ACPackingStore/PackingStoreBean.cs
查看文件 @
0b68806
...
@@ -85,6 +85,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -85,6 +85,9 @@ namespace OnlineStore.DeviceLibrary
IOMove
(
IO_Type
.
RunSign_HddLed
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
RunSign_HddLed
,
IO_VALUE
.
LOW
);
mainTimer
.
Enabled
=
true
;
mainTimer
.
Enabled
=
true
;
canStart
=
true
;
canStart
=
true
;
//连接AGV调度
AgvClient
.
Init
();
});
});
}
}
...
@@ -137,11 +140,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -137,11 +140,10 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
Name
+
"开始启动,连接agv调度,连接rfid,启动时间:"
+
StartTime
.
ToString
());
LogUtil
.
info
(
Name
+
"开始启动,连接agv调度,连接rfid,启动时间:"
+
StartTime
.
ToString
());
storeRunStatus
=
StoreRunStatus
.
HomeMoving
;
storeRunStatus
=
StoreRunStatus
.
HomeMoving
;
StartTime
=
DateTime
.
Now
;
StartTime
=
DateTime
.
Now
;
//连接AGV调度
AgvClient
.
SetCancelState
(
false
);
if
(!
AgvClient
.
ISConnected
())
//if (!AgvClient.ISConnected())
{
//{
AgvClient
.
Init
();
//}
}
RFIDManager
.
Open
(
rfidList
.
ToArray
());
RFIDManager
.
Open
(
rfidList
.
ToArray
());
mainTimer
.
Enabled
=
false
;
mainTimer
.
Enabled
=
false
;
...
@@ -197,7 +199,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -197,7 +199,7 @@ namespace OnlineStore.DeviceLibrary
{
{
mainTimer
.
Enabled
=
false
;
mainTimer
.
Enabled
=
false
;
ledProcessTimer
.
Enabled
=
false
;
ledProcessTimer
.
Enabled
=
false
;
AgvClient
.
SetCancelState
(
true
);
//停止运行时,把阻挡气缸上升
//停止运行时,把阻挡气缸上升
StopMove
();
StopMove
();
foreach
(
AC_BOX_Bean
equip
in
BoxMap
.
Values
)
foreach
(
AC_BOX_Bean
equip
in
BoxMap
.
Values
)
...
...
source/DeviceLibrary/agvClient/AgvClient.cs
查看文件 @
0b68806
...
@@ -15,7 +15,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -15,7 +15,7 @@ namespace OnlineStore.DeviceLibrary
public
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
MethodBase
.
GetCurrentMethod
().
DeclaringType
);
public
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
MethodBase
.
GetCurrentMethod
().
DeclaringType
);
private
static
string
ServerIp
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
AgvServerIp
);
private
static
string
ServerIp
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
AgvServerIp
);
private
static
Asa
.
Client2
agvClient
;
private
static
Asa
.
Client2
agvClient
;
p
ublic
static
Dictionary
<
string
,
Asa
.
ClientAction
>
actionMap
=
new
Dictionary
<
string
,
Asa
.
ClientAction
>();
p
rivate
static
Dictionary
<
string
,
Asa
.
ClientAction
>
actionMap
=
new
Dictionary
<
string
,
Asa
.
ClientAction
>();
public
static
List
<
string
>
NodeList
=
new
List
<
string
>();
public
static
List
<
string
>
NodeList
=
new
List
<
string
>();
private
static
bool
isInit
=
false
;
private
static
bool
isInit
=
false
;
public
static
void
Init
()
public
static
void
Init
()
...
@@ -26,6 +26,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -26,6 +26,7 @@ namespace OnlineStore.DeviceLibrary
{
{
isInit
=
true
;
isInit
=
true
;
agvClient
=
new
Asa
.
Client2
(
ServerIp
);
agvClient
=
new
Asa
.
Client2
(
ServerIp
);
agvClient
.
CancelState
=
true
;
agvClient
.
Log
+=
AgvClient_Log
;
agvClient
.
Log
+=
AgvClient_Log
;
agvClient
.
Arrive
+=
AgvClient_Arrive
;
agvClient
.
Arrive
+=
AgvClient_Arrive
;
agvClient
.
Ready
+=
AgvClient_Ready
;
agvClient
.
Ready
+=
AgvClient_Ready
;
...
@@ -49,7 +50,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -49,7 +50,10 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
"初始化agvClient "
+
ServerIp
+
" 出错:"
+
ex
.
ToString
());
LogUtil
.
error
(
"初始化agvClient "
+
ServerIp
+
" 出错:"
+
ex
.
ToString
());
}
}
}
}
public
static
void
SetCancelState
(
bool
isCancel
)
{
agvClient
.
CancelState
=
isCancel
;
}
public
static
Dictionary
<
string
,
DateTime
>
closeDoorTimeMap
=
new
Dictionary
<
string
,
DateTime
>();
public
static
Dictionary
<
string
,
DateTime
>
closeDoorTimeMap
=
new
Dictionary
<
string
,
DateTime
>();
private
static
void
AgvClient_CloseDoor
(
string
id
,
byte
[]
content
)
private
static
void
AgvClient_CloseDoor
(
string
id
,
byte
[]
content
)
{
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论