Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 4984321d
由
LN
编写于
2020-04-08 10:59:59 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
agv更新。盘高计算修改
1 个父辈
11602259
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
43 行增加
和
30 行删除
dll/Client.dll
source/AssemblyLineClient/agvtest/FrmAgvTest.cs
source/AssemblyLineClient/记录.txt
source/DeviceLibrary/agvClient/AgvClient.cs
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
dll/Client.dll
查看文件 @
4984321
此文件类型无法预览
source/AssemblyLineClient/agvtest/FrmAgvTest.cs
查看文件 @
4984321
...
@@ -14,7 +14,7 @@ namespace OnlineStore.AssemblyLine
...
@@ -14,7 +14,7 @@ namespace OnlineStore.AssemblyLine
{
{
public
partial
class
FrmAgvTest
:
Form
public
partial
class
FrmAgvTest
:
Form
{
{
private
Asa
.
Client2
client
;
private
Asa
.
AgvClient
client
;
private
string
[]
node
=
new
string
[]
{
"A1"
,
"A2"
,
"A3"
,
"A4"
,
"C1"
,
"C2"
,
"C3"
,
"C4"
,
"C5"
,
"C6"
,
"C7"
,
"C8"
};
private
string
[]
node
=
new
string
[]
{
"A1"
,
"A2"
,
"A3"
,
"A4"
,
"C1"
,
"C2"
,
"C3"
,
"C4"
,
"C5"
,
"C6"
,
"C7"
,
"C8"
};
public
FrmAgvTest
()
public
FrmAgvTest
()
...
@@ -25,7 +25,7 @@ namespace OnlineStore.AssemblyLine
...
@@ -25,7 +25,7 @@ namespace OnlineStore.AssemblyLine
private
void
Form1_Load
(
object
sender
,
EventArgs
e
)
private
void
Form1_Load
(
object
sender
,
EventArgs
e
)
{
{
label2
.
Text
=
"IP:"
+
ServerIp
;
label2
.
Text
=
"IP:"
+
ServerIp
;
client
=
new
Asa
.
Client2
(
ServerIp
);
client
=
new
Asa
.
AgvClient
(
ServerIp
);
client
.
Log
+=
Client_Log
;
client
.
Log
+=
Client_Log
;
client
.
Arrive
+=
AgvClient_Arrive
;
client
.
Arrive
+=
AgvClient_Arrive
;
// agvClient.CanEnter += AgvClient_CanEnter;
// agvClient.CanEnter += AgvClient_CanEnter;
...
@@ -33,16 +33,16 @@ namespace OnlineStore.AssemblyLine
...
@@ -33,16 +33,16 @@ namespace OnlineStore.AssemblyLine
// client.GetRFID += AgvClient_GetRFID;
// client.GetRFID += AgvClient_GetRFID;
}
}
private
void
AgvClient_Ready
(
string
name
,
byte
[]
content
)
private
void
AgvClient_Ready
(
string
name
,
string
rfid
)
{
{
RFIDData
data
=
new
RFIDData
(
content
);
//
RFIDData data = new RFIDData(content);
LogUtil
.
info
(
"FrmAgvTest 收到 AgvClient_Ready ["
+
name
+
"] ["
+
data
.
ToData
()
+
"] "
);
LogUtil
.
info
(
"FrmAgvTest 收到 AgvClient_Ready ["
+
name
+
"] ["
+
rfid
+
"] "
);
}
}
private
void
AgvClient_Arrive
(
string
name
,
byte
[]
content
)
private
void
AgvClient_Arrive
(
string
name
,
string
rfid
)
{
{
RFIDData
data
=
new
RFIDData
(
content
);
//
RFIDData data = new RFIDData(content);
LogUtil
.
info
(
"FrmAgvTest 收到 AgvClient_Arrive ["
+
name
+
"] ["
+
data
.
ToData
()
+
"] "
);
LogUtil
.
info
(
"FrmAgvTest 收到 AgvClient_Arrive ["
+
name
+
"] ["
+
rfid
+
"] "
);
}
}
//private static void AgvClient_GetRFID(string name, byte[] content)
//private static void AgvClient_GetRFID(string name, byte[] content)
...
...
source/AssemblyLineClient/记录.txt
查看文件 @
4984321
20200403
20200408 盘高计算修改:如果检测出<=15,都按照8计算
agv更新
20200403
紧急出料不放太慢。
紧急出料不放太慢。
rfid不需要格式化。
rfid不需要格式化。
上料模块批量轴上升时,如果不是第一次上升,最多上升100mm
上料模块批量轴上升时,如果不是第一次上升,最多上升100mm
...
@@ -45,8 +51,6 @@ http发送去掉ping。
...
@@ -45,8 +51,6 @@ http发送去掉ping。
在阳光电源流水线的基础上新建佳世达流水线料项目
在阳光电源流水线的基础上新建佳世达流水线料项目
流水线SubType:1000
流水线SubType:1000
移栽出入仓模块:1-18
移栽出入仓模块:1-18
...
...
source/DeviceLibrary/agvClient/AgvClient.cs
查看文件 @
4984321
...
@@ -13,7 +13,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -13,7 +13,7 @@ namespace OnlineStore.DeviceLibrary
{
{
public
static
bool
CurrCancelState
=
true
;
public
static
bool
CurrCancelState
=
true
;
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
;
...
@@ -25,7 +25,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -25,7 +25,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
;
...
@@ -81,38 +81,38 @@ namespace OnlineStore.DeviceLibrary
...
@@ -81,38 +81,38 @@ 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_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
+
"] "
);
}
}
private
static
void
AgvClient_Ready
(
string
id
,
byte
[]
content
)
private
static
void
AgvClient_Ready
(
string
id
,
string
rfid
)
{
{
UpdateAction
(
id
,
ClientAction
.
Ready
);
UpdateAction
(
id
,
ClientAction
.
Ready
);
RFIDData
data
=
new
RFIDData
(
content
);
//
RFIDData data = new RFIDData(content);
LogUtil
.
info
(
"收到 AgvClient_Ready ["
+
id
+
"] ["
+
data
.
ToData
()
+
"] "
);
LogUtil
.
info
(
"收到 AgvClient_Ready ["
+
id
+
"] ["
+
rfid
+
"] "
);
FeedingEquip
equip
=
getFeedEquip
(
id
);
FeedingEquip
equip
=
getFeedEquip
(
id
);
if
(
equip
==
null
)
if
(
equip
==
null
)
{
{
LogUtil
.
error
(
"收到 AgvClient_Ready ["
+
id
+
"] ["
+
data
.
ToData
()
+
"] 未找到对应的设备 ,暂不处理"
);
LogUtil
.
error
(
"收到 AgvClient_Ready ["
+
id
+
"] ["
+
rfid
+
"] 未找到对应的设备 ,暂不处理"
);
return
;
return
;
}
}
equip
.
AgvReady
(
id
,
data
);
equip
.
AgvReady
(
id
,
rfid
);
}
}
private
static
void
AgvClient_Arrive
(
string
id
,
byte
[]
content
)
private
static
void
AgvClient_Arrive
(
string
id
,
string
rfid
)
{
{
UpdateAction
(
id
,
ClientAction
.
Arrive
);
UpdateAction
(
id
,
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
+
"] "
);
FeedingEquip
equip
=
getFeedEquip
(
id
);
FeedingEquip
equip
=
getFeedEquip
(
id
);
if
(
equip
==
null
)
if
(
equip
==
null
)
{
{
LogUtil
.
error
(
"收到 AgvClient_Ready ["
+
id
+
"] ["
+
data
.
ToData
()
+
"] 未找到对应的设备 ,暂不处理 "
);
LogUtil
.
error
(
"收到 AgvClient_Ready ["
+
id
+
"] ["
+
rfid
+
"] 未找到对应的设备 ,暂不处理 "
);
return
;
return
;
}
}
equip
.
AgvArrive
(
id
,
data
);
equip
.
AgvArrive
(
id
,
rfid
);
}
}
private
static
FeedingEquip
getFeedEquip
(
string
nodeId
)
private
static
FeedingEquip
getFeedEquip
(
string
nodeId
)
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
查看文件 @
4984321
...
@@ -642,9 +642,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -642,9 +642,9 @@ namespace OnlineStore.DeviceLibrary
return
usable
;
return
usable
;
}
}
internal
void
AgvArrive
(
string
nodeId
,
RFIDData
data
)
internal
void
AgvArrive
(
string
nodeId
,
string
rfid
)
{
{
string
logN
=
Name
+
"收到 AgvArrive 事件 ["
+
nodeId
+
"] ["
+
data
.
ToData
()
+
"] "
;
string
logN
=
Name
+
"收到 AgvArrive 事件 ["
+
nodeId
+
"] ["
+
rfid
+
"] "
;
if
(
nodeId
.
Equals
(
Config
.
AgvInName
))
if
(
nodeId
.
Equals
(
Config
.
AgvInName
))
{
{
}
}
...
@@ -654,9 +654,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -654,9 +654,9 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
logN
+
":"
+
"暂无处理"
);
LogUtil
.
info
(
logN
+
":"
+
"暂无处理"
);
}
}
internal
void
AgvReady
(
string
nodeId
,
RFIDData
data
)
internal
void
AgvReady
(
string
nodeId
,
string
rfid
)
{
{
string
logN
=
Name
+
"收到 AgvReady 事件 ["
+
nodeId
+
"] ["
+
data
.
NumStr
()
+
"] "
;
string
logN
=
Name
+
"收到 AgvReady 事件 ["
+
nodeId
+
"] ["
+
rfid
+
"] "
;
if
(
nodeId
.
Equals
(
Config
.
AgvInName
))
if
(
nodeId
.
Equals
(
Config
.
AgvInName
))
{
{
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
查看文件 @
4984321
...
@@ -1211,6 +1211,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1211,6 +1211,14 @@ namespace OnlineStore.DeviceLibrary
buchongStr
=
"(最后一盘料已补充5)"
;
buchongStr
=
"(最后一盘料已补充5)"
;
height
+=
5
;
height
+=
5
;
}
}
//如果检测出<=15,都按照8计算
if
(
height
<=
15
)
{
LastHeight
=
8
;
}
else
{
List
<
int
>
heightList
=
LineManager
.
GetTrayList
();
List
<
int
>
heightList
=
LineManager
.
GetTrayList
();
heightList
=
(
from
m
in
heightList
orderby
m
descending
select
m
).
ToList
<
int
>();
heightList
=
(
from
m
in
heightList
orderby
m
descending
select
m
).
ToList
<
int
>();
float
minCha
=
height
;
float
minCha
=
height
;
...
@@ -1224,6 +1232,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1224,6 +1232,7 @@ namespace OnlineStore.DeviceLibrary
minCha
=
cha
;
minCha
=
cha
;
}
}
}
}
}
if
(
LastHeight
<=
8
)
{
LastHeight
=
8
;
}
if
(
LastHeight
<=
8
)
{
LastHeight
=
8
;
}
string
code
=
CodeManager
.
ProcessCode
(
LastCodeList
);
string
code
=
CodeManager
.
ProcessCode
(
LastCodeList
);
string
msg
=
Name
+
" 计算盘高:上升前 ["
+
StartMovePosition
+
"]实时[ "
+
EndMovePosition
+
"]差值["
+
(
EndMovePosition
-
StartMovePosition
)
+
"]系数["
+
AxisChangeValue
+
"] 计算后"
+
buchongStr
+
"["
+
height
+
"]"
+
",归类为【"
+
LastHeight
+
"mm】条码【"
+
code
+
"】"
;
string
msg
=
Name
+
" 计算盘高:上升前 ["
+
StartMovePosition
+
"]实时[ "
+
EndMovePosition
+
"]差值["
+
(
EndMovePosition
-
StartMovePosition
)
+
"]系数["
+
AxisChangeValue
+
"] 计算后"
+
buchongStr
+
"["
+
height
+
"]"
+
",归类为【"
+
LastHeight
+
"mm】条码【"
+
code
+
"】"
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论