Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 8a501738
由
LN
编写于
2019-09-18 09:34:00 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
b933db27
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
86 行增加
和
38 行删除
source/AssemblyLineClient/FrmMoveEquip.cs
source/DeviceLibrary/assemblyLine/LineBean.cs
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
source/DeviceLibrary/assemblyLine/MoveEquip.cs
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
source/DeviceLibrary/model/StoreMoveInfo.cs
source/DeviceLibrary/model/StoreStep.cs
source/AssemblyLineClient/FrmMoveEquip.cs
查看文件 @
8a50173
...
...
@@ -96,6 +96,18 @@ namespace OnlineStore.AssemblyLine
text
+=
param
.
ToStr
()
+
"\r"
;
}
}
else
{
ps
=
new
List
<
InOutParam
>(
moveEquip
.
waitOutStoreList
);
if
(
ps
.
Count
>
0
)
{
text
=
"等待出库列表:\r"
;
foreach
(
InOutParam
param
in
ps
)
{
text
+=
param
.
ToStr
()
+
"\r"
;
}
}
}
if
(!
lblInstoreList
.
Text
.
Equals
(
text
))
{
lblInstoreList
.
Text
=
text
;
...
...
source/DeviceLibrary/assemblyLine/LineBean.cs
查看文件 @
8a50173
...
...
@@ -124,19 +124,25 @@ namespace OnlineStore.DeviceLibrary
string
posId
=
param
!=
null
?
param
.
PosId
:
""
;
if
(
moveEquip
.
IsDebug
)
{
LogUtil
.
error
(
param
.
ToStr
()
+
" 已经完成出库,"
+
moveEquip
.
Name
+
"当前正在调试中,不继续操作!"
);
LogUtil
.
error
(
param
.
ToStr
()
+
" 已经完成出库,"
+
moveEquip
.
Name
+
"当前正在调试中,不继续操作!"
);
return
;
}
//料仓出库完成,移栽装置开始出库检测
if
(
moveEquip
.
IsDebug
==
false
&&
moveEquip
.
MoveInfo
.
MoveType
==
LineMoveType
.
None
&&
moveEquip
.
runStatus
==
LineRunStatus
.
Runing
)
{
LogUtil
.
info
(
param
.
ToStr
()
+
" 已经完成出库,开始"
+
moveEquip
.
Name
+
"出库!"
);
moveEquip
.
StartOutStoreMove
(
param
);
LogUtil
.
info
(
param
.
ToStr
()
+
" 已经完成出库,开始"
+
moveEquip
.
Name
+
"出库!"
);
bool
result
=
moveEquip
.
StartOutStoreMove
(
param
);
if
(!
result
)
{
LogUtil
.
info
(
Name
+
" 执行出库【"
+
param
.
ToStr
()
+
"】失败, 加入等待队列"
);
moveEquip
.
AddWaitOutInfo
(
param
);
}
}
else
{
LogUtil
.
info
(
param
.
ToStr
()
+
"已经完成出库,"
+
moveEquip
.
Name
+
"正在忙碌中!"
);
LogUtil
.
info
(
param
.
ToStr
()
+
"已经完成出库,"
+
moveEquip
.
Name
+
"正在忙碌中,把出库信息放入列表中!"
);
moveEquip
.
AddWaitOutInfo
(
param
);
}
}
...
...
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
查看文件 @
8a50173
...
...
@@ -196,13 +196,14 @@ namespace OnlineStore.DeviceLibrary
}
/// <summary>
/// 判断当前是否可以开始扫码
/// </summary>
public
bool
CanScanCode
()
/// </summary>
public
bool
CanScanCode
()
{
//若有移栽在出库过程中,则不能扫码
foreach
(
MoveEquip
move
in
MoveEquipMap
.
Values
)
{
if
(
move
.
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
OutStore
))
List
<
InOutParam
>
ps
=
new
List
<
InOutParam
>(
move
.
waitOutStoreList
);
if
(
move
.
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
OutStore
)
||
ps
.
Count
>
0
)
{
return
false
;
}
...
...
source/DeviceLibrary/assemblyLine/MoveEquip.cs
查看文件 @
8a50173
...
...
@@ -26,10 +26,10 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public
LineMoveInfo
SecondMoveInfo
=
null
;
//
public List<InOutParam> waitOutStoreList = new List<InOutParam>();
public
List
<
InOutParam
>
waitOutStoreList
=
new
List
<
InOutParam
>();
public
List
<
InOutParam
>
waitInStoreList
=
new
List
<
InOutParam
>();
public
object
waitInListLock
=
""
;
//
public object waitOutListLock = "";
public
object
waitOutListLock
=
""
;
public
MoveEquip
(
string
cid
,
MoveEquip_Config
config
)
{
...
...
@@ -206,6 +206,8 @@ namespace OnlineStore.DeviceLibrary
}
}
IOTimeOutProcess
();
OutStoreListPro
();
}
catch
(
Exception
ex
)
{
...
...
@@ -215,6 +217,44 @@ namespace OnlineStore.DeviceLibrary
isInPro
=
false
;
}
/// <summary>
/// 出库队列处理
/// </summary>
private
void
OutStoreListPro
()
{
//料仓出库完成,移栽装置开始出库检测
if
(
IsDebug
.
Equals
(
false
)
&&
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
)
&&
runStatus
.
Equals
(
LineRunStatus
.
Runing
))
{
InOutParam
waitOutParma
=
null
;
lock
(
waitOutListLock
)
{
if
(
waitOutStoreList
.
Count
>
0
)
{
waitOutParma
=
waitOutStoreList
[
0
];
waitOutStoreList
.
RemoveAt
(
0
);
}
}
if
(
waitOutParma
!=
null
)
{
LogUtil
.
info
(
Name
+
"开始 执行排队中的出库【"
+
waitOutParma
.
ToStr
()
+
"】"
);
//出库
bool
result
=
StartOutStoreMove
(
waitOutParma
);
if
(!
result
)
{
LogUtil
.
info
(
Name
+
" 执行排队中的出库【"
+
waitOutParma
.
ToStr
()
+
"】失败,重新加入等待队列"
);
AddWaitOutInfo
(
waitOutParma
);
}
}
}
}
public
void
AddWaitOutInfo
(
InOutParam
param
)
{
lock
(
waitOutListLock
)
{
waitOutStoreList
.
Add
(
param
);
}
}
private
DateTime
preIoTimerOutTime
=
DateTime
.
Now
;
private
void
IOTimeOutProcess
()
{
...
...
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
查看文件 @
8a50173
...
...
@@ -131,7 +131,7 @@ namespace OnlineStore.DeviceLibrary
{
wait
.
IsEnd
=
(
span
.
TotalMilliseconds
>=
wait
.
TimeMSeconds
);
}
else
if
(
wait
.
WaitType
==
8
)
else
if
(
wait
.
WaitType
.
Equals
(
8
)
)
{
string
posId
=
moveInfo
.
MoveParam
.
PosId
;
int
id
=
moveInfo
.
MoveParam
.
GetStoreId
();
...
...
@@ -190,10 +190,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NewMove
(
LineMoveType
.
OutStore
);
MoveInfo
.
MoveParam
=
param
;
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_50_StartOutProcess
);
TrayManager
.
AddNeedEmptyTrayNum
();
// MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck, IO_VALUE.HIGH));
//CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before);
// OutStoreLog(" 出库【" + posId + "】 叫托盘");
TrayManager
.
AddNeedEmptyTrayNum
();
return
true
;
}
else
...
...
@@ -414,17 +411,14 @@ namespace OnlineStore.DeviceLibrary
{
InStoreLog
(
"入库:(MI_09_UpDownCylinderUp,上下气缸1上升)"
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MI_09_UpDownCylinderUp
);
UpdownUpMove
();
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
UpdownUpMove
();
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MI_09_UpDownCylinderUp
))
{
int
num
=
MoveInfo
.
MoveParam
.
TrayNumber
;
InStoreLog
(
"入库:(MI_10_BeforeAfterCylinderBefore,前后气缸1前进),更新盘号【"
+
num
+
"】为空盘"
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MI_10_BeforeAfterCylinderBefore
);
CylinderMove
(
MoveInfo
,
IO_Type
.
BeforeAfterCylinder_After
,
IO_Type
.
BeforeAfterCylinder_Before
);
// int num = TrayManager.GetNum(DeviceID);
//LogInfo("入库【" + posId + "】处理: 物品已移走,重新读取并更新盘号【" + num + "】为空盘");
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MI_10_WaitBox
);
LogInfo
(
"入库【"
+
posId
+
"】处理(等待移栽):(判断box门口没有盘, 且可以入库),更新盘号【"
+
num
+
"】为空盘"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBoxCanReviceTray
());
TrayManager
.
UpdateFixtureValue
(
num
,
false
,
0
);
//阻挡气缸移动
...
...
@@ -433,20 +427,17 @@ namespace OnlineStore.DeviceLibrary
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_09_TopCylinder_Down
);
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
TopCylinder_UP
,
IO_Type
.
TopCylinder_Down
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MI_10_
BeforeAfterCylinderBefore
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MI_10_
WaitBox
))
{
LogInfo
(
"入库【"
+
posId
+
"】处理(等待移栽):(判断box门口没有盘, 且可以入库,才能把料盘放下)"
);
//此处需要等待box门口没有盘
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBoxCanReviceTray
());
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MI_10_WaitBox
);
InStoreLog
(
"入库:(MI_10_BeforeAfterCylinderBefore,前后气缸1前进)"
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MI_10_BeforeAfterCylinderBefore
);
CylinderMove
(
MoveInfo
,
IO_Type
.
BeforeAfterCylinder_After
,
IO_Type
.
BeforeAfterCylinder_Before
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MI_10_WaitBox
))
// else if (StoreMove.MoveStep .Equals( StoreMoveStep.MI_10_WaitBox && GetBox().CanStarInOut())
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MI_10_BeforeAfterCylinderBefore
))
{
InStoreLog
(
"入库:(MI_11_UpDownCylinderDown ,上下气缸1下降)"
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MI_11_UpDownCylinderDown
);
UpdownDownBoxMove
(
MoveInfo
.
MoveParam
.
PlateH
);
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MI_11_UpDownCylinderDown
))
{
...
...
@@ -459,24 +450,20 @@ namespace OnlineStore.DeviceLibrary
InStoreLog
(
"入库:(MI_13_UpdownCylinderUp,上下气缸1上升)"
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MI_13_UpdownCylinderUp
);
UpdownUpMove
();
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MI_13_UpdownCylinderUp
))
// else if (StoreMove.MoveStep .Equals( StoreMoveStep.MI_13_UpdownCylinderUp && GetBox().CanStarInOut())
{
InStoreLog
(
"入库:(MI_14_BeforeAfterCylinderAfter,前后气缸1后退 )"
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MI_14_BeforeAfterCylinderAfter
);
CylinderMove
(
MoveInfo
,
IO_Type
.
BeforeAfterCylinder_Before
,
IO_Type
.
BeforeAfterCylinder_After
);
//此时box就可以入库操作了 //触发事件,BOX入库
//MoveEndEvent.Invoke(DeviceID, MoveInfo.MoveType, MoveInfo.MoveParam);
LineServer
.
StartInStore
(
DeviceID
,
MoveInfo
.
MoveParam
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MI_14_BeforeAfterCylinderAfter
))
{
InStoreLog
(
"入库:(MI_15_SendEnd , 送料流程完成)"
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MI_15_SendEnd
);
// MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck, IO_VALUE.HIGH));
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MI_15_SendEnd
))
...
...
source/DeviceLibrary/model/StoreMoveInfo.cs
查看文件 @
8a50173
...
...
@@ -297,7 +297,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
WaitType
==
9
)
{
return
"
入库
BOX可以开始入库"
;
return
"BOX可以开始入库"
;
}
else
{
...
...
source/DeviceLibrary/model/StoreStep.cs
查看文件 @
8a50173
...
...
@@ -307,10 +307,7 @@ namespace OnlineStore.DeviceLibrary
///移载装置入库处理,检测 夹具编码
/// </summary>
MI_05_CodeCheck
=
3005
,
/// <summary>
/// 移载装置入库处理,等待box等待状态才能继续操作
/// </summary>
MI_10_WaitBox
=
3006
,
/// <summary>
///移载装置入库处理,编码与仓位一致,上下气缸1下降
/// </summary>
...
...
@@ -331,6 +328,11 @@ namespace OnlineStore.DeviceLibrary
///移载装置入库处理,,前后气缸1前进
/// </summary>
MI_10_BeforeAfterCylinderBefore
=
3010
,
/// <summary>
/// 移载装置入库处理,等待box等待状态才能继续操作
/// </summary>
MI_10_WaitBox
=
3006
,
/// <summary>
///移载装置入库处理,上下气缸1下降
/// </summary>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论