Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO664-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 4a2d765f
由
LN
编写于
2021-01-05 14:22:37 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
获取库位号时,需要判断料盘是不是出库料盘
1 个父辈
0e7d1fb1
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
85 行增加
和
15 行删除
source/Common/bean/Bean.cs
source/Common/util/FormUtil.cs
source/DeviceLibrary/assemblyLine/EquipBase.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
source/DeviceLibrary/assemblyLine/HY/HY_C1Line.cs
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
source/DeviceLibrary/assemblymanager/SServerManager.cs
source/Common/bean/Bean.cs
查看文件 @
4a2d765
...
...
@@ -18,12 +18,12 @@ namespace OnlineStore.Common
public
string
code
=
""
;
}
public
class
LineOperation
public
class
ForPutinData
{
// //{"result":"0","msg":"","pos":"11#AC1_18_4_28","barcode":"R506072019102200414","cid":"line-ac-11"}
// 返回: {"code": 0, "msg":"ok", data:7}
/// <summary>
/// 0=成功
/// 0=成功
,98=此盘为出库盘。99:暂时不能入库,需要重新获取库位。100:服务器需要更新,需要重新获取库位
/// </summary>
public
int
result
;
public
string
cid
;
...
...
@@ -31,6 +31,18 @@ namespace OnlineStore.Common
public
string
pos
=
""
;
public
string
barcode
=
""
;
//以下为出库参数
public
string
posId
=
""
;
public
string
plateW
=
""
;
public
string
plateH
=
""
;
public
string
singleOut
=
""
;
public
string
urgentReel
=
""
;
public
string
cutReel
=
""
;
public
string
rfid
=
""
;
public
string
realRfid
=
""
;
public
string
rfidLoc
=
""
;
public
string
smallReel
=
""
;
}
/// <summary>
/// 与服务器通信用对象
...
...
source/Common/util/FormUtil.cs
查看文件 @
4a2d765
...
...
@@ -9,6 +9,19 @@ namespace OnlineStore.Common
{
public
class
FormUtil
{
public
static
int
GetIntValue
(
string
text
)
{
int
value
=
0
;
try
{
value
=
int
.
Parse
(
text
);
}
catch
(
Exception
ex
)
{
value
=
0
;
}
return
value
;
}
public
static
int
GetIntValue
(
TextBox
txt
)
{
int
value
=
0
;
...
...
source/DeviceLibrary/assemblyLine/EquipBase.cs
查看文件 @
4a2d765
...
...
@@ -651,7 +651,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
debug
(
Name
+
""
+
msg
);
}
}
protected
void
InLog
(
string
msg
)
protected
void
InLog
(
string
msg
)
{
string
posId
=
MoveInfo
.
MoveParam
!=
null
?
"["
+
currTrayNum
+
"]["
+
MoveInfo
.
MoveParam
.
PosId
+
"]["
+
MoveInfo
.
MoveParam
.
WareCode
+
"]"
:
""
;
//baseConfig.DType.Equals(DeviceType.HYEquip)
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
查看文件 @
4a2d765
...
...
@@ -476,7 +476,14 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
MoveParam
=
LastPosParam
.
Clone
();
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_32_WaitTray
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
100
));
InLog
(
" "
+
MoveInfo
.
SLog
+
" 开始拦截空托盘 "
);
if
(
LastResult
.
Equals
(
98
))
{
InLog
(
" "
+
MoveInfo
.
SLog
+
" 出库料,开始拦截空托盘 "
);
}
else
{
InLog
(
" "
+
MoveInfo
.
SLog
+
" 入库料,开始拦截空托盘 "
);
}
ClearTimeoutAlarm
(
"获取库位号超时"
);
}
...
...
@@ -495,17 +502,26 @@ namespace OnlineStore.DeviceLibrary
int
targetPositon
=
Config
.
GetUpdownP2Detial
(
LastHeight
,
LastWidth
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
targetPositon
,
Config
.
UpdownAxis_P2Speed
);
LastPosParam
.
TrayNumber
=
currTrayNum
;
TrayManager
.
UpdateTrayInfo
(
currTrayNum
,
true
,
ReelType
.
InStore
,
LastPosParam
.
Clone
(),
LastPosParam
.
NgMsg
);
TrayInfo
tray
=
TrayManager
.
GetTrayInfo
(
currTrayNum
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":移栽伺服下降到P2: ["
+
targetPositon
+
"] 更新托盘信息【"
+
tray
.
ToStr
()
+
"】"
);
SServerManager
.
SendPosToStoreCheck
(
Name
,
LastPosParam
.
Clone
());
if
(
LastResult
.
Equals
(
98
))
{
TrayManager
.
UpdateTrayInfo
(
currTrayNum
,
true
,
ReelType
.
OutStore
,
LastPosParam
.
Clone
(),
LastPosParam
.
NgMsg
);
TrayInfo
tray
=
TrayManager
.
GetTrayInfo
(
currTrayNum
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":升降轴到P2: ["
+
targetPositon
+
"] 更新料盘位置,更新托盘信息【"
+
tray
.
ToStr
()
+
"】"
);
SServerManager
.
UpdateTrayLoc
(
Name
,
LastPosParam
.
WareCode
,
LocStatus
.
INLINE
,
"E"
+
currTrayNum
.
ToString
().
PadLeft
(
2
,
'0'
));
}
else
{
TrayManager
.
UpdateTrayInfo
(
currTrayNum
,
true
,
ReelType
.
InStore
,
LastPosParam
.
Clone
(),
LastPosParam
.
NgMsg
);
TrayInfo
tray
=
TrayManager
.
GetTrayInfo
(
currTrayNum
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":升降轴到P2: ["
+
targetPositon
+
"] 更新托盘信息【"
+
tray
.
ToStr
()
+
"】"
);
SServerManager
.
SendPosToStoreCheck
(
Name
,
LastPosParam
.
Clone
());
}
if
(
IOValue
(
IO_Type
.
SL_AxisLocationCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
MoveInfo
.
ShelfNoTray
.
Equals
(
false
))
{
InLog
(
"获取库位"
+
MoveInfo
.
SLog
+
": 上料轴开始慢速上升到P3点,不等待结果"
);
BatchAxisToP3
(
false
,
false
);
}
}
ClearTimeoutAlarm
(
"等待空托盘到达超时"
);
}
else
if
(
MoveInfo
.
IsTimeOut
(
180
))
...
...
@@ -698,6 +714,7 @@ namespace OnlineStore.DeviceLibrary
}
private
Task
getPosTask
=
null
;
private
InOutParam
LastPosParam
=
null
;
private
int
LastResult
=
0
;
private
void
FI_31_GetPosID
()
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_31_GetPosID
);
...
...
@@ -719,6 +736,7 @@ namespace OnlineStore.DeviceLibrary
int
ms
=
5000
;
//从服务器获取库位号
GetPosResult
result
=
SServerManager
.
GetPosId
(
Name
,
LastCodeList
,
LastHeight
,
LastWidth
,
CurrShelfId
,
DeviceID
);
LastResult
=
result
.
Result
;
if
(
result
.
IsTimeOut
)
{
if
(
count
<
5
)
...
...
@@ -745,7 +763,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
LastPosParam
=
result
.
Param
;
LastPosParam
=
result
.
Param
;
break
;
}
count
++;
...
...
source/DeviceLibrary/assemblyLine/HY/HY_C1Line.cs
查看文件 @
4a2d765
...
...
@@ -852,13 +852,21 @@ namespace OnlineStore.DeviceLibrary
{
return
true
;
}
//NG料需要横移
if
(
tray
.
InoutPar
.
InStoreNg
)
{
return
true
;
}
}
}
}
else
if
(
DeviceID
.
Equals
(
215
))
{
//非分盘料的出库需要横移
//非11,12,23,24的入库料需要横移
//NG料直接横移
if
(
tray
.
IsFull
)
{
if
(
tray
.
InOrOutStore
.
Equals
(
2
)
&&
(!
tray
.
InoutPar
.
cutReel
))
...
...
@@ -873,6 +881,10 @@ namespace OnlineStore.DeviceLibrary
{
return
true
;
}
if
(
tray
.
InoutPar
.
InStoreNg
)
{
return
true
;
}
}
}
}
...
...
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
查看文件 @
4a2d765
...
...
@@ -419,8 +419,8 @@ namespace OnlineStore.DeviceLibrary
}
else
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MI_16_SendEnd
);
InLog
(
"入库 "
+
MoveInfo
.
SLog
+
" , 送料流程完成,料仓已开始入库"
);
LogInfo
(
"入库【"
+
posId
+
"】处理(移栽)全部完成!"
);
MoveEndS
(
);
}
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
MI_16_SendEnd
))
...
...
source/DeviceLibrary/assemblymanager/SServerManager.cs
查看文件 @
4a2d765
...
...
@@ -441,7 +441,7 @@ namespace OnlineStore.DeviceLibrary
return
result
;
}
//{"result":"0","msg":"","pos":"11#AC1_18_4_28","barcode":"R506072019102200414","cid":"line-ac-11"}
LineOperation
serverResult
=
JsonHelper
.
DeserializeJsonToObject
<
LineOperation
>(
resultStr
);
ForPutinData
serverResult
=
JsonHelper
.
DeserializeJsonToObject
<
ForPutinData
>(
resultStr
);
if
(
serverResult
==
null
)
{
...
...
@@ -453,6 +453,21 @@ namespace OnlineStore.DeviceLibrary
result
.
Param
.
NgMsg
=
"没有收到服务器反馈"
;
return
result
;
}
else
if
((!
string
.
IsNullOrEmpty
(
serverResult
.
msg
))
&&
serverResult
.
result
.
Equals
(
98
))
{
result
.
Result
=
serverResult
.
result
;
result
.
Msg
=
""
;
bool
cutReel
=
serverResult
.
cutReel
.
ToLower
().
Equals
(
"true"
);
bool
urgentReel
=
serverResult
.
urgentReel
.
ToLower
().
Equals
(
"true"
);
bool
smallReel
=
serverResult
.
smallReel
.
ToLower
().
Equals
(
"true"
);
int
rfidloc
=
FormUtil
.
GetIntValue
(
serverResult
.
rfidLoc
);
int
pH
=
FormUtil
.
GetIntValue
(
serverResult
.
plateH
);
int
pW
=
FormUtil
.
GetIntValue
(
serverResult
.
plateW
);
result
.
Param
=
new
InOutParam
(
0
,
serverResult
.
barcode
,
serverResult
.
posId
,
pH
,
pW
,
false
,
urgentReel
,
cutReel
,
smallReel
,
serverResult
.
rfid
,
rfidloc
);
LogUtil
.
info
(
deviceName
+
"收到出库命令: "
+
result
.
Param
.
ToStr
()
+
" "
);
return
result
;
}
else
if
((!
string
.
IsNullOrEmpty
(
serverResult
.
msg
))
||
serverResult
.
result
.
Equals
(
0
).
Equals
(
false
))
{
result
.
Result
=
serverResult
.
result
;
...
...
@@ -615,7 +630,7 @@ namespace OnlineStore.DeviceLibrary
{
public
string
Msg
=
""
;
/// <summary>
/// 99:暂时不能入库,需要重新获取库位。100:服务器需要更新,需要重新获取库位
///
0=成功,98=此盘为出库盘。
99:暂时不能入库,需要重新获取库位。100:服务器需要更新,需要重新获取库位
/// </summary>
public
int
Result
=
0
;
/// <summary>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论