Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-VMILineClient
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 87f37e53
由
LN
编写于
2020-04-09 13:39:50 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
agv客户端更新
1 个父辈
f51fe40e
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
17 行增加
和
18 行删除
dll/Client.dll
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/LineConfig/VMILineConfig.csv
source/DeviceLibrary/RFID/RFIDManager.cs
source/DeviceLibrary/agvClient/AgvClient.cs
dll/Client.dll
查看文件 @
87f37e5
此文件类型无法预览
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
87f37e5
...
@@ -39,8 +39,7 @@
...
@@ -39,8 +39,7 @@
<Reference Include="Asa.IOModule.AIOBOX">
<Reference Include="Asa.IOModule.AIOBOX">
<HintPath>..\..\dll\Asa.IOModule.AIOBOX.dll</HintPath>
<HintPath>..\..\dll\Asa.IOModule.AIOBOX.dll</HintPath>
</Reference>
</Reference>
<Reference Include="Client, Version=1.0.0.1, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Client">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\dll\Client.dll</HintPath>
<HintPath>..\..\dll\Client.dll</HintPath>
</Reference>
</Reference>
<Reference Include="CodeLibrary">
<Reference Include="CodeLibrary">
...
...
source/DeviceLibrary/LineConfig/VMILineConfig.csv
查看文件 @
87f37e5
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
PRO,IO模块对应的DI数量,IO_DILength,192.168.103.25#16,,,,,,,
PRO,IO模块对应的DI数量,IO_DILength,192.168.103.25#16,,,,,,,
PRO,模块对应的DO数量,IO_DOLength,192.168.103.25#16,,,,,,,
PRO,模块对应的DO数量,IO_DOLength,192.168.103.25#16,,,,,,,
PRO,IO模块IP,PRO_AOI_IP_1,192.168.103.25,,,,,,,
PRO,IO模块IP,PRO_AOI_IP_1,192.168.103.25,,,,,,,
PRO,休眠秒数(秒),SleepSeconds,60,,,,,,,
,,,,,,,,,,
,,,,,,,,,,
DI,急停,SuddenStop_BTN,0,PRO_AOI_IP_1,0,急停,X721,DI-01,0,
DI,急停,SuddenStop_BTN,0,PRO_AOI_IP_1,0,急停,X721,DI-01,0,
DI,复位,Reset_BTN,1,PRO_AOI_IP_1,0,复位,X722,DI-02,0,
DI,复位,Reset_BTN,1,PRO_AOI_IP_1,0,复位,X722,DI-02,0,
...
@@ -38,6 +37,7 @@ DO,进料线入口阻挡,InL_InStopDown,9,PRO_AOI_IP_1,0,进料线入口阻挡,Y730,DO-02,0,
...
@@ -38,6 +37,7 @@ DO,进料线入口阻挡,InL_InStopDown,9,PRO_AOI_IP_1,0,进料线入口阻挡,Y730,DO-02,0,
,,,15,PRO_AOI_IP_1,0,,Y736,DO-08,0,
,,,15,PRO_AOI_IP_1,0,,Y736,DO-08,0,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,
PRO,出空料架流水线AGV节点名称,OutL_AgvName,A2,,,,,,,
PRO,出空料架流水线AGV节点名称,OutL_AgvName,A2,,,,,,,
PRO,入料架流水线AGV节点名称,InL_AgvName,A3,,,,,,,
PRO,入料架流水线AGV节点名称,InL_AgvName,A1,,,,,,,
PRO,入料架流水线入口RFIDIP,InL_In_RFIDIP,192.168.102.108,,,,,, ,
PRO,入料架流水线入口RFIDIP,InL_In_RFIDIP,192.168.103.108,,,,,, ,
PRO,入料架流水线出口RFIDIP,InL_Out_RFIDIP,192.168.102.107,,,,,, ,
PRO,入料架流水线出口RFIDIP,InL_Out_RFIDIP,192.168.103.107,,,,,, ,
PRO,休眠秒数(秒),SleepSeconds,60,,,,,,,
source/DeviceLibrary/RFID/RFIDManager.cs
查看文件 @
87f37e5
...
@@ -67,7 +67,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -67,7 +67,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// <summary>
/// RFID类型,区分是料架还是托盘,托盘E=69,包装料料架A=65,料串=B
/// RFID类型,区分是料架还是托盘,托盘E=69,包装料料架A=65,料串=B
/// </summary>
/// </summary>
public
char
RFType
=
'
X
'
;
public
char
RFType
=
'
0
'
;
public
int
Num
=
0
;
public
int
Num
=
0
;
public
RFIDData
(
int
num
,
int
t
)
public
RFIDData
(
int
num
,
int
t
)
...
...
source/DeviceLibrary/agvClient/AgvClient.cs
查看文件 @
87f37e5
...
@@ -15,7 +15,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -15,7 +15,7 @@ namespace OnlineStore.DeviceLibrary
public
class
AgvClient
public
class
AgvClient
{
{
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
.
AgvClient
agvClient
;
public
static
Dictionary
<
string
,
Asa
.
ClientAction
>
actionMap
=
new
Dictionary
<
string
,
Asa
.
ClientAction
>();
public
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
;
...
@@ -26,7 +26,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -26,7 +26,7 @@ namespace OnlineStore.DeviceLibrary
if
(!
isInit
)
if
(!
isInit
)
{
{
isInit
=
true
;
isInit
=
true
;
agvClient
=
new
Asa
.
Client2
(
ServerIp
);
agvClient
=
new
Asa
.
AgvClient
(
ServerIp
);
agvClient
.
CancelState
=
true
;
agvClient
.
CancelState
=
true
;
agvClient
.
Log
+=
AgvClient_Log
;
agvClient
.
Log
+=
AgvClient_Log
;
agvClient
.
Arrive
+=
AgvClient_Arrive
;
agvClient
.
Arrive
+=
AgvClient_Arrive
;
...
@@ -57,10 +57,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -57,10 +57,10 @@ namespace OnlineStore.DeviceLibrary
{
{
agvClient
.
CancelState
=
isCancel
;
agvClient
.
CancelState
=
isCancel
;
}
}
private
static
void
AgvClient_CloseDoor
(
string
id
,
byte
[]
content
)
private
static
void
AgvClient_CloseDoor
(
string
id
,
string
rfid
)
{
{
RFIDData
data
=
new
RFIDData
(
content
);
//
RFIDData data = new RFIDData(content);
LogUtil
.
info
(
"收到 AgvClient_CloseDoor ["
+
id
+
"] ["
+
data
.
NumStr
()
+
"] "
);
LogUtil
.
info
(
"收到 AgvClient_CloseDoor ["
+
id
+
"] ["
+
rfid
+
"] "
);
}
}
public
static
void
SetStatus
(
string
id
,
string
shelfId
=
""
,
ClientAction
action
=
ClientAction
.
None
,
ClientLevel
level
=
ClientLevel
.
Low
)
public
static
void
SetStatus
(
string
id
,
string
shelfId
=
""
,
ClientAction
action
=
ClientAction
.
None
,
ClientLevel
level
=
ClientLevel
.
Low
)
...
@@ -78,11 +78,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -78,11 +78,11 @@ namespace OnlineStore.DeviceLibrary
agvClient
.
SetStatus
(
id
,
""
,
shelfId
,
action
,
level
);
agvClient
.
SetStatus
(
id
,
""
,
shelfId
,
action
,
level
);
UpdateAction
(
id
,
action
);
UpdateAction
(
id
,
action
);
}
}
private
static
void
AgvClient_Ready
(
string
id
,
byte
[]
content
)
private
static
void
AgvClient_Ready
(
string
id
,
string
rfid
)
{
{
RFIDData
data
=
new
RFIDData
(
content
);
//
RFIDData data = new RFIDData(content);
string
logName
=
"收到 AgvClient_Ready ["
+
id
+
"] ["
+
data
.
NumStr
()
+
"] "
;
string
logName
=
"收到 AgvClient_Ready ["
+
id
+
"] ["
+
rfid
+
"] "
;
LogUtil
.
info
(
logName
);
LogUtil
.
info
(
logName
);
UpdateAction
(
id
,
Asa
.
ClientAction
.
Ready
);
UpdateAction
(
id
,
Asa
.
ClientAction
.
Ready
);
...
@@ -154,11 +154,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -154,11 +154,11 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
}
}
private
static
void
AgvClient_Arrive
(
string
id
,
byte
[]
content
)
private
static
void
AgvClient_Arrive
(
string
id
,
string
rfid
)
{
{
UpdateAction
(
id
,
Asa
.
ClientAction
.
Arrive
);
UpdateAction
(
id
,
Asa
.
ClientAction
.
Arrive
);
RFIDData
data
=
new
RFIDData
(
content
);
//
RFIDData data = new RFIDData(content);
LogUtil
.
info
(
"收到 AgvClient_Arrive ["
+
id
+
"] ["
+
data
.
ToData
()
+
"] "
);
LogUtil
.
info
(
"收到 AgvClient_Arrive ["
+
id
+
"] ["
+
rfid
+
"] "
);
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论