Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 34a0a4fb
由
LN
编写于
2019-12-30 10:37:46 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
189c6b6c
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
68 行增加
和
63 行删除
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
source/DeviceLibrary/assemblymanager/TrayManager.cs
source/DeviceLibrary/model/TrayInfo.cs
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
查看文件 @
34a0a4f
...
...
@@ -87,27 +87,85 @@ namespace OnlineStore.DeviceLibrary
{
return
null
;
}
TimeSpan
span
=
DateTime
.
Now
-
trayInfo
.
LastUpdateTime
;
int
youxianS
=
180
;
InOutParam
inoup
=
trayInfo
.
InoutPar
;
//入料失败料
if
(
trayInfo
.
IsFull
&&
trayInfo
.
InoutPar
.
InStoreNg
&&
this
.
Config
.
SidesWayNum
.
Equals
(
4
))
if
(
trayInfo
.
IsFull
&&
trayInfo
.
InoutPar
.
InStoreNg
&&
this
.
Config
.
SidesWayNum
.
Equals
(
4
))
{
return
inoup
;
}
else
if
(
trayInfo
.
InOrOutStore
.
Equals
(
ReelType
.
OutStore
)
&&
inoup
.
urgentReel
.
Equals
(
false
)
&&
inoup
.
cutReel
.
Equals
(
false
))
{
//urgentReel: true 表示紧急料,需要出到料串上
//cutReel: true 表示分盘料,需要出到料串上
//smallReel: true 小料(7x8),放置到小料架上
//rfid: 分配的料架RFID
//rfidLoc:
//是否是小盘
if
(
inoup
.
smallReel
&&
inoup
.
rfidLoc
>=
70
&&
inoup
.
rfidLoc
<=
72
)
if
(
inoup
.
smallReel
)
{
if
(
inoup
.
rfidLoc
>=
70
&&
inoup
.
rfidLoc
<=
72
)
{
// 70,71,72时只能分配到3 / 4号皮带线;
if
(
DeviceID
.
Equals
(
203
)
||
DeviceID
.
Equals
(
204
))
{
return
inoup
;
}
}
else
if
(
span
.
TotalSeconds
>
youxianS
||
inoup
.
rfidLoc
.
Equals
(-
1
))
{
//,值为 - 1时,可以自由分配皮带线,,超过指定时间后随机分配
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
return
inoup
;
}
}
else
if
(
inoup
.
rfidLoc
<=
46
)
{
// 小料时,架位为1 - 46优先走1 / 2号皮带线
if
(
DeviceID
.
Equals
(
201
)
||
DeviceID
.
Equals
(
202
))
{
return
inoup
;
}
}
else
if
(
inoup
.
rfidLoc
>=
47
)
{
// ,47 - 92优先走3 / 4号皮带线,
if
(
DeviceID
.
Equals
(
203
)
||
DeviceID
.
Equals
(
204
))
{
return
inoup
;
}
}
}
else
{
// 料架的架位大料时,架位1 - 6优先走1 / 2号皮带线, 7 - 12优先走3 / 4号皮带线
if
(
span
.
TotalSeconds
>
youxianS
||
inoup
.
rfidLoc
.
Equals
(-
1
))
{
//,值为 - 1时,可以自由分配皮带线,
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
return
inoup
;
}
}
else
if
(
inoup
.
rfidLoc
<=
6
)
{
if
(
DeviceID
.
Equals
(
201
)
||
DeviceID
.
Equals
(
202
))
{
return
inoup
;
}
}
else
if
(
inoup
.
rfidLoc
>=
7
)
{
if
(
DeviceID
.
Equals
(
203
)
||
DeviceID
.
Equals
(
204
))
{
return
inoup
;
}
}
}
}
//TODO 判断是否是需要移栽出料的料盘
return
null
;
...
...
@@ -179,7 +237,7 @@ namespace OnlineStore.DeviceLibrary
{
SecondMoveInfo
.
MoveParam
=
param
;
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_05_WaitTime
);
CheckLog
(
"托盘
阻挡
需要出库"
+
SecondMoveInfo
.
SLog
+
":"
+
param
.
ToStr
()
+
" 等待1秒后顶升上升 )"
);
CheckLog
(
"托盘
【"
+
currTrayNum
+
"】
需要出库"
+
SecondMoveInfo
.
SLog
+
":"
+
param
.
ToStr
()
+
" 等待1秒后顶升上升 )"
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitProvidingEquipCanOut
());
//等待
...
...
source/DeviceLibrary/assemblymanager/TrayManager.cs
查看文件 @
34a0a4f
...
...
@@ -79,17 +79,13 @@ namespace OnlineStore.DeviceLibrary
}
public
static
void
UpdateTrayInfo
(
int
trayNum
,
bool
isFull
=
false
,
int
inOrOut
=
0
,
InOutParam
param
=
null
,
string
ngMsg
=
""
)
public
static
void
UpdateTrayInfo
(
int
trayNum
,
bool
isFull
=
false
,
int
inOrOut
=
0
,
InOutParam
param
=
null
,
string
ngMsg
=
""
)
{
if
(
TrayInfoMap
.
ContainsKey
(
trayNum
))
{
TrayInfoMap
[
trayNum
].
IsFull
=
isFull
;
TrayInfoMap
[
trayNum
].
InOrOutStore
=
inOrOut
;
//TrayInfoMap[trayNum].WareCode = wareCode;
//TrayInfoMap[trayNum].PosId = posId;
//TrayInfoMap[trayNum].PlateH = plateH;
//TrayInfoMap[trayNum].PlateW = plateW;
TrayInfoMap
[
trayNum
].
LastUpdateTime
=
DateTime
.
Now
;
if
(
param
==
null
)
{
param
=
new
InOutParam
();
...
...
@@ -111,17 +107,9 @@ namespace OnlineStore.DeviceLibrary
{
TrayInfoMap
[
trayNum
].
InoutPar
.
InStoreNg
=
isNg
;
TrayInfoMap
[
trayNum
].
ShowMsg
=
msg
;
TrayInfoMap
[
trayNum
].
LastUpdateTime
=
DateTime
.
Now
;
}
}
//internal static void UpdateEmergencyOut(int trayNum, bool isEmp)
//{
// LogUtil.info("更新托盘【" + trayNum + "】EmergencyOut=【" + isEmp + "】 ");
// if (TrayInfoMap.ContainsKey(trayNum))
// {
// TrayInfoMap[trayNum].EmergencyOut = isEmp;
// }
//}
/// <summary>
/// 是否还有有料仓的盘
...
...
@@ -182,11 +170,7 @@ namespace OnlineStore.DeviceLibrary
{
TrayInfoMap
=
new
ConcurrentDictionary
<
int
,
TrayInfo
>();
}
#
region
横移状态缓存
internal
static
bool
LineCanMoveSW
(
int
swNum
)
{
//若此横移对应的设备未启动,直接可处理
...
...
@@ -222,8 +206,6 @@ namespace OnlineStore.DeviceLibrary
}
return
false
;
}
#
endregion
public
static
bool
checkWatch
(
Stopwatch
watch
,
int
targetMs
,
bool
isStop
=
true
)
{
...
...
@@ -239,10 +221,6 @@ namespace OnlineStore.DeviceLibrary
}
return
false
;
}
}
}
source/DeviceLibrary/model/TrayInfo.cs
查看文件 @
34a0a4f
using
System
;
using
OnlineStore.Common
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
...
...
@@ -11,28 +12,16 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public
class
TrayInfo
{
//public TrayInfo(int trayNum, bool isFull = false, int inOrOut = 0)
//{
// this.TrayCode = trayNum;
// this.IsFull = isFull;
// this.InOrOutStore = inOrOut;
//}
public
TrayInfo
(
int
trayNum
,
bool
isFull
,
int
inOrOut
=
0
,
InOutParam
inoutParam
=
null
)
{
this
.
TrayCode
=
trayNum
;
this
.
IsFull
=
isFull
;
this
.
InOrOutStore
=
inOrOut
;
//this.WareCode = wareCode;
//this.PosId = posId;
//this.PlateH = plateH;
//this.PlateW = plateW;
if
(
inoutParam
==
null
)
{
inoutParam
=
new
InOutParam
();
}
this
.
inoutPar
=
inoutParam
;
// InStoreNG = false;
ShowMsg
=
""
;
}
public
string
ToStr
()
...
...
@@ -50,7 +39,7 @@ namespace OnlineStore.DeviceLibrary
//return "托盘 [" + TrayCode + "] [" + (IsFull ? "有料" : "空") +"] ["+ type +
// "]二维码[" + WareCode + "]库位号[" + PosId + "] [" + PlateW + "X" + PlateH+ "] " + err + " "+ jinji + "" ;
return
"托盘 ["
+
TrayCode
+
"] ["
+
(
IsFull
?
"有料"
:
"空"
)
+
"] ["
+
type
+
"]"
;
return
"托盘 ["
+
TrayCode
+
"] ["
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
LastUpdateTime
)
+
"] ["
+
(
IsFull
?
"有料"
:
"空"
)
+
"] ["
+
type
+
"]"
;
}
/// <summary>
/// 夹具编码值(1-32?)
...
...
@@ -65,29 +54,9 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public
int
InOrOutStore
=
0
;
///// <summary>
///// 物品二维码信息
///// </summary>
//public string WareCode = "";
///// <summary>
///// 位置名(对应配置表的位置)
///// </summary>
//public string PosId = "";
///// <summary>
///// 料盘高度
///// </summary>
//public int PlateH = 0;
///// <summary>
///// 料盘宽度
///// </summary>
//public int PlateW = 0;
/// <summary>
/// 入库失败料盘,未扫到码或获取库位号失败
/// </summary>
// public bool InStoreNG = false;
public
string
ShowMsg
=
""
;
//public bool EmergencyOut = false
;
public
DateTime
LastUpdateTime
=
DateTime
.
Now
;
private
InOutParam
inoutPar
=
null
;
public
InOutParam
InoutPar
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论