Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a64130bc
由
LN
编写于
2023-02-07 15:36:12 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
托盘经过时上传托盘号到服务器。
1 个父辈
c8b734a6
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
57 行增加
和
17 行删除
source/DeviceLibrary/assemblyLine/EquipBase.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
source/DeviceLibrary/assemblyLine/LineBean.cs
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
source/DeviceLibrary/assemblyLine/LineBean_Shunt2.cs
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
source/DeviceLibrary/assemblymanager/SServerManager.cs
source/DeviceLibrary/assemblymanager/TrayDisableManager.cs
source/DeviceLibrary/model/TrayInfo.cs
source/DeviceLibrary/assemblyLine/EquipBase.cs
查看文件 @
a64130b
...
...
@@ -497,6 +497,7 @@ namespace OnlineStore.DeviceLibrary
else
{
currTrayNum
=
RFIDManager
.
GetTrayNum
(
DeviceID
,
true
);
SServerManager
.
updateTray
(
currTrayNum
);
LogUtil
.
LOGGER
.
Info
(
Name
+
" ["
+
trayCount
+
"] IP ["
+
RFIDManager
.
GetRFIP
(
DeviceID
)
+
"] ["
+
preTrayNum
+
"] 当前托盘 ["
+
currTrayNum
+
"]"
);
if
(
preTrayNum
.
Equals
(
currTrayNum
)
&&
currTrayNum
>
0
)
{
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
查看文件 @
a64130b
...
...
@@ -365,7 +365,7 @@ namespace OnlineStore.DeviceLibrary
LogInfo
(
"当前托盘上的料盘检测信号["
+
io
.
ConfigStr
+
"]的值:"
+
IOValue
(
IO_Type
.
ReelCheck
));
}
LogInfo
(
SecondMoveInfo
.
MoveNum
+
SecondMoveInfo
.
SLog
+
" 入库中,需拦截空托盘【 "
+
currTrayNum
+
"】,空托盘料盘检测信号亮,禁用托盘,暂时放托盘离开"
);
TrayDisableManager
.
AddDisable
(
currTrayNum
,
Name
,
"空托盘料盘检测信号亮"
,
2
);
TrayDisableManager
.
AddDisable
(
currTrayNum
,
Name
,
"空托盘料盘检测信号亮"
,
2
,
DeviceID
);
TrayMoveOk
();
return
;
}
...
...
@@ -376,7 +376,7 @@ namespace OnlineStore.DeviceLibrary
if
((!
isfull
)
&&
IOValue
(
IO_Type
.
ReelCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
LogInfo
(
SecondMoveInfo
.
MoveNum
+
SecondMoveInfo
.
SLog
+
" 入库中,需拦截空托盘【 "
+
currTrayNum
+
"】,空托盘料盘检测信号亮,禁用托盘,暂时放托盘离开"
);
TrayDisableManager
.
AddDisable
(
currTrayNum
,
Name
,
"空托盘料盘检测信号亮"
,
2
);
TrayDisableManager
.
AddDisable
(
currTrayNum
,
Name
,
"空托盘料盘检测信号亮"
,
2
,
DeviceID
);
TrayMoveOk
();
return
;
}
...
...
@@ -388,7 +388,7 @@ namespace OnlineStore.DeviceLibrary
LogInfo
(
"当前托盘上的料盘检测信号["
+
io
.
ConfigStr
+
"]的值:"
+
IOValue
(
IO_Type
.
ReelCheck
));
}
LogInfo
(
SecondMoveInfo
.
MoveNum
+
SecondMoveInfo
.
SLog
+
" 需拦截有料托盘【 "
+
currTrayNum
+
"】,有料托盘料盘检测信号不亮,禁用托盘,暂时放托盘离开"
);
TrayDisableManager
.
AddDisable
(
currTrayNum
,
Name
,
"有料托盘料盘检测信号不亮"
,
1
);
TrayDisableManager
.
AddDisable
(
currTrayNum
,
Name
,
"有料托盘料盘检测信号不亮"
,
1
,
DeviceID
);
TrayMoveOk
();
return
;
}
...
...
source/DeviceLibrary/assemblyLine/LineBean.cs
查看文件 @
a64130b
...
...
@@ -92,7 +92,7 @@ namespace OnlineStore.DeviceLibrary
//增加AGV小车客户端
AgvClient
.
NodeList
.
Add
(
config
.
AgvInName
);
AgvClient
.
NodeList
.
Add
(
config
.
AgvOutName
);
LogUtil
.
info
(
Name
+
$
" {equip.Name} DeviceID: {equip.DeviceID} "
);
AddDeviceName
(
ioList
,
config
.
IOIPList
);
FeedingEquipMap
.
Add
(
config
.
Id
,
equip
);
AllEquipMap
.
Add
(
config
.
Id
,
equip
);
...
...
@@ -102,6 +102,7 @@ namespace OnlineStore.DeviceLibrary
{
MoveEquip
equip
=
new
MoveEquip
(
lineConfig
.
CID
,
config
);
LogUtil
.
info
(
Name
+
$
" {equip.Name} DeviceID: {equip.DeviceID} "
);
AddDeviceName
(
ioList
,
config
.
IOIPList
);
MoveEquipMap
.
Add
(
config
.
Id
,
equip
);
AllEquipMap
.
Add
(
config
.
Id
,
equip
);
...
...
@@ -110,6 +111,7 @@ namespace OnlineStore.DeviceLibrary
{
ProvidingEquip
equip
=
new
ProvidingEquip
(
lineConfig
.
CID
,
config
);
LogUtil
.
info
(
Name
+
$
" {equip.Name} DeviceID: {equip.DeviceID} "
);
AddDeviceName
(
ioList
,
config
.
IOIPList
);
ProvidingEquipMap
.
Add
(
config
.
Id
,
equip
);
AllEquipMap
.
Add
(
config
.
Id
,
equip
);
...
...
@@ -119,6 +121,7 @@ namespace OnlineStore.DeviceLibrary
{
DischargeLine
equip
=
new
DischargeLine
(
lineConfig
.
CID
,
config
);
LogUtil
.
info
(
Name
+
$
" {equip.Name} DeviceID: {equip.DeviceID} "
);
AddDeviceName
(
ioList
,
config
.
IOIPList
);
DisLineMap
.
Add
(
config
.
Id
,
equip
);
AllEquipMap
.
Add
(
config
.
Id
,
equip
);
...
...
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
查看文件 @
a64130b
...
...
@@ -581,6 +581,7 @@ namespace OnlineStore.DeviceLibrary
else
{
Sw41TrayNum
=
RFIDManager
.
GetTrayNum
(
204
,
true
);
SServerManager
.
updateTray
(
Sw41TrayNum
);
}
}
}
...
...
@@ -597,6 +598,7 @@ namespace OnlineStore.DeviceLibrary
else
{
Sw23TrayNum
=
RFIDManager
.
GetTrayNum
(
103
,
true
);
SServerManager
.
updateTray
(
Sw23TrayNum
);
}
}
}
...
...
source/DeviceLibrary/assemblyLine/LineBean_Shunt2.cs
查看文件 @
a64130b
...
...
@@ -167,6 +167,7 @@ namespace OnlineStore.DeviceLibrary
//读取进仓5处的托盘号
Shunt2TrayNum
=
RFIDManager
.
GetTrayNum
(
5
,
false
);
SServerManager
.
updateTray
(
Shunt2TrayNum
);
Shunt2Log
(
"分流横移2:托盘号【"
+
Shunt2TrayNum
+
"】等待阻挡1亮,阻挡2亮,阻挡1上升,升降1下降 "
);
CylinderMove
(
Shunt2_MoveInfo
,
IO_Type
.
Shunt2_TopCylinder_Up1
,
IO_Type
.
Shunt2_TopCylinder_Down1
,
true
);
CheckAndMove
(
IO_Type
.
Shunt2_StopDown1_Front
,
IO_VALUE
.
LOW
);
...
...
@@ -247,6 +248,7 @@ namespace OnlineStore.DeviceLibrary
//读取进仓5处的托盘号
Shunt2TrayNum
=
RFIDManager
.
GetTrayNum
(
5
,
false
);
SServerManager
.
updateTray
(
Shunt2TrayNum
);
Shunt2Log
(
"分流横移2:托盘号【"
+
Shunt2TrayNum
+
"】等待阻挡1亮,阻挡2亮,阻挡1上升,升降1下降 "
);
CylinderMove
(
Shunt2_MoveInfo
,
IO_Type
.
Shunt2_TopCylinder_Up1
,
IO_Type
.
Shunt2_TopCylinder_Down1
,
true
);
CheckAndMove
(
IO_Type
.
Shunt2_StopDown1_Front
,
IO_VALUE
.
LOW
);
...
...
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
查看文件 @
a64130b
...
...
@@ -352,7 +352,7 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil
.
error
(
Name
+
"入库 ["
+
posId
+
"],升降气缸下降到托盘["
+
currTrayNum
+
"]取料失败,升降轴上升,禁用托盘,同时放行托盘"
);
LogInfo
(
"入库 ["
+
posId
+
"]"
+
MoveInfo
.
SLog
+
": 升降轴上升,禁用托盘,同时放行托盘,顶升气缸1下降"
);
TrayDisableManager
.
AddDisable
(
currTrayNum
,
Name
,
"入库取料失败"
,
0
);
TrayDisableManager
.
AddDisable
(
currTrayNum
,
Name
,
"入库取料失败"
,
0
,
DeviceID
);
MI_18_UpdownUp
();
}
}
...
...
@@ -398,7 +398,7 @@ namespace OnlineStore.DeviceLibrary
}
LogUtil
.
error
(
Name
+
"入库 ["
+
posId
+
"],托盘【 "
+
currTrayNum
+
"】,有料托盘料盘检测信号不亮,升降轴上升,禁用托盘,同时放行托盘"
);
LogInfo
(
"入库 ["
+
posId
+
"]"
+
MoveInfo
.
SLog
+
": 升降轴上升,禁用托盘,同时放行托盘,顶升气缸1下降"
);
TrayDisableManager
.
AddDisable
(
currTrayNum
,
Name
,
"有料托盘料盘检测信号不亮"
,
1
);
TrayDisableManager
.
AddDisable
(
currTrayNum
,
Name
,
"有料托盘料盘检测信号不亮"
,
1
,
DeviceID
);
MI_18_UpdownUp
();
}
else
...
...
@@ -665,7 +665,7 @@ namespace OnlineStore.DeviceLibrary
LogInfo
(
"当前托盘上的料盘检测信号["
+
io
.
ConfigStr
+
"]的值:"
+
IOValue
(
IO_Type
.
TrayCheck
));
}
LogInfo
(
" 出库中,需拦截空托盘【 "
+
currTrayNum
+
"】,空托盘料盘检测信号亮,禁用托盘"
);
TrayDisableManager
.
AddDisable
(
currTrayNum
,
Name
,
"空托盘料盘检测信号亮"
,
2
);
TrayDisableManager
.
AddDisable
(
currTrayNum
,
Name
,
"空托盘料盘检测信号亮"
,
2
,
DeviceID
);
}
else
{
...
...
@@ -754,7 +754,7 @@ namespace OnlineStore.DeviceLibrary
LogInfo
(
"当前托盘上的料盘检测信号["
+
io
.
ConfigStr
+
"]的值:"
+
IOValue
(
IO_Type
.
TrayCheck
));
}
LogInfo
(
" 入库需拦截有料托盘【 "
+
currTrayNum
+
"】,有料托盘料盘检测信号不亮,禁用托盘"
);
TrayDisableManager
.
AddDisable
(
currTrayNum
,
Name
,
"有料托盘料盘检测信号不亮"
,
1
);
TrayDisableManager
.
AddDisable
(
currTrayNum
,
Name
,
"有料托盘料盘检测信号不亮"
,
1
,
DeviceID
);
return
false
;
}
else
if
(!
LineServer
.
BoxCanInStore
(
StoreID
))
...
...
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
查看文件 @
a64130b
...
...
@@ -181,7 +181,7 @@ namespace OnlineStore.DeviceLibrary
if
(
resCode
==-
1
)
{
TrayDisableManager
.
AddDisableTray
(
trayNum
,
Name
,
"【屏蔽料盘二次判断】【-1】"
);
TrayDisableManager
.
AddDisableTray
(
trayNum
,
Name
,
"【屏蔽料盘二次判断】【-1】"
,
DeviceID
);
LogUtil
.
info
(
$
"【屏蔽料盘二次判断】【-1】【需要禁用该托盘】【{tray.ToStr()}】"
);
}
else
if
(
resCode
==
100
)
...
...
@@ -242,7 +242,7 @@ namespace OnlineStore.DeviceLibrary
(
int
resCode
,
taskInfo
task
)
=
SServerManager
.
getTaskInfo
(
barcode
);
if
(
resCode
==
-
1
)
{
TrayDisableManager
.
AddDisableTray
(
trayNum
,
Name
,
"【屏蔽料盘二次判断】【-1】【初次无料,第二次有料】"
);
TrayDisableManager
.
AddDisableTray
(
trayNum
,
Name
,
"【屏蔽料盘二次判断】【-1】【初次无料,第二次有料】"
,
DeviceID
);
LogUtil
.
info
(
$
"【屏蔽料盘二次判断】【-1】【初次无料,第二次有料】 【禁用该托盘】【{tray.ToStr()}】"
);
}
else
if
(
resCode
==
100
)
...
...
source/DeviceLibrary/assemblymanager/SServerManager.cs
查看文件 @
a64130b
...
...
@@ -930,11 +930,11 @@ namespace OnlineStore.DeviceLibrary
{
if
(
String
.
IsNullOrEmpty
(
disabledTray
))
{
disabledTray
+=
"E"
+
dis
.
TrayCode
;
disabledTray
+=
"E"
+
dis
.
TrayCode
+
"="
+
dis
.
DeviceId
;
}
else
{
disabledTray
+=
",E"
+
dis
.
TrayCode
;
disabledTray
+=
",E"
+
dis
.
TrayCode
+
"="
+
dis
.
DeviceId
;
}
}
try
...
...
@@ -959,6 +959,33 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
"disabledTray 出错"
,
ex
);
}
}
///rest/api/qisda/device/updateTray?trayId=xxx
private
static
string
Addr_updateTray
=
"/rest/api/qisda/device/updateTray"
;
public
static
void
updateTray
(
int
trayNum
)
{
Task
.
Factory
.
StartNew
(
delegate
{
try
{
//code= 0 表示正常,其他为异常
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"trayId"
,
"E"
+
trayNum
);
//
string
server
=
GetAddr
(
Addr_updateTray
,
paramMap
);
DateTime
startTime
=
DateTime
.
Now
;
string
resultStr
=
HttpHelper
.
Get
(
server
);
LogUtil
.
debug
(
"updateTray ["
+
trayNum
+
"] "
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
" 【"
+
server
+
"】【"
+
resultStr
+
"】"
);
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"updateTray ["
+
trayNum
+
"] 出错"
,
ex
);
}
});
}
}
public
class
ReturnData
...
...
source/DeviceLibrary/assemblymanager/TrayDisableManager.cs
查看文件 @
a64130b
...
...
@@ -43,9 +43,9 @@ namespace OnlineStore.DeviceLibrary
/// <param name="deviceName"></param>
/// <param name="describle"></param>
/// <param name="type">0,无;1:硬件未检测到;2:硬件检测到</param>
public
static
void
AddDisable
(
int
trayNum
,
string
deviceName
,
string
describle
,
int
type
)
public
static
void
AddDisable
(
int
trayNum
,
string
deviceName
,
string
describle
,
int
type
,
int
deviceId
)
{
TrayDisableInfo
t
=
new
TrayDisableInfo
(
trayNum
,
deviceName
,
describle
);
TrayDisableInfo
t
=
new
TrayDisableInfo
(
trayNum
,
deviceName
,
describle
,
deviceId
);
if
(
UseNewLogic
)
{
TrayInfo
tray
=
TrayManager
.
GetTrayInfo
(
trayNum
);
...
...
@@ -108,12 +108,13 @@ namespace OnlineStore.DeviceLibrary
}
}
public
static
void
AddDisableTray
(
int
trayNum
,
string
deviceName
,
string
describe
)
public
static
void
AddDisableTray
(
int
trayNum
,
string
deviceName
,
string
describe
,
int
deviceId
)
{
TrayDisableInfo
t
=
new
TrayDisableInfo
();
t
.
TrayCode
=
trayNum
;
t
.
DDescribe
=
describe
;
t
.
DDeviceName
=
deviceName
;
t
.
DeviceId
=
deviceId
;
if
(
TrayDisableMap
.
ContainsKey
(
trayNum
))
{
TrayDisableMap
[
trayNum
]
=
t
;
...
...
source/DeviceLibrary/model/TrayInfo.cs
查看文件 @
a64130b
...
...
@@ -109,7 +109,7 @@ namespace OnlineStore.DeviceLibrary
DisableTime
=
DateTime
.
Now
;
}
public
TrayDisableInfo
(
int
trayNum
,
string
deviceName
,
string
describle
)
public
TrayDisableInfo
(
int
trayNum
,
string
deviceName
,
string
describle
,
int
deviceId
)
{
this
.
TrayCode
=
trayNum
;
this
.
DDeviceName
=
deviceName
;
...
...
@@ -124,10 +124,14 @@ namespace OnlineStore.DeviceLibrary
public
string
DDescribe
{
get
;
set
;
}
=
""
;
public
DateTime
DisableTime
{
get
;
set
;
}
/// <summary>
/// 禁用的设备ID
/// </summary>
public
int
DeviceId
{
get
;
set
;
}
public
string
ToStr
()
{
return
$
"托盘 [{TrayCode }] [{DisableTime.ToLongTimeString() }] [{DDeviceName} [{DDescribe}]"
;
return
$
"托盘 [{TrayCode }] [{DisableTime.ToLongTimeString() }] [{DDeviceName} [{DDescribe}]
设备ID[{DeviceId}]
"
;
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论