Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO827-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 975c3354
由
LN
编写于
2021-02-03 16:14:31 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
bug修改
1 个父辈
ccb5e455
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
311 行增加
和
225 行删除
source/AssemblyLineClient/FrmLineIO.cs
source/AssemblyLineClient/FrmMoveEquip.Designer.cs
source/AssemblyLineClient/FrmMoveEquip.cs
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
source/LoadCVSLibrary/storeConfig/ConfigItemBase.cs
source/AssemblyLineClient/FrmLineIO.cs
查看文件 @
975c335
...
...
@@ -220,7 +220,11 @@ namespace OnlineStore.AssemblyLine
string
code
=
txtTrayCode
.
Text
.
Trim
();
if
(
hasTray
)
{
InOutParam
inoutP
=
new
InOutParam
(
num
,
"CodeTest"
,
posId
,
ph
,
pw
,
inNg
,
urg
,
cutReel
,
isSmall
,
""
,
loc
);
if
(
String
.
IsNullOrEmpty
(
code
))
{
code
=
"CodeTest"
;
}
InOutParam
inoutP
=
new
InOutParam
(
num
,
code
,
posId
,
ph
,
pw
,
inNg
,
urg
,
cutReel
,
isSmall
,
""
,
loc
);
TrayManager
.
UpdateTrayInfo
(
num
,
hasTray
,
trayType
,
inoutP
,
"InStoreNG "
);
}
else
...
...
source/AssemblyLineClient/FrmMoveEquip.Designer.cs
查看文件 @
975c335
...
...
@@ -76,6 +76,10 @@
this
.
label4
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnP2
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
txtP2
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
groupBox5
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
label7
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtPosId
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
btnClear
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
panBase
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox4
.
SuspendLayout
();
...
...
@@ -87,6 +91,7 @@
this
.
tabPage2
.
SuspendLayout
();
this
.
groupDetial
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
groupBox5
.
SuspendLayout
();
this
.
SuspendLayout
();
//
// panBase
...
...
@@ -142,9 +147,9 @@
this
.
groupBox1
.
Controls
.
Add
(
this
.
txtSlaveId
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
cmbWriteIO
);
this
.
groupBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
500
,
17
5
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
500
,
17
6
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
373
,
15
1
);
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
373
,
15
0
);
this
.
groupBox1
.
TabIndex
=
105
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"DO写入"
;
...
...
@@ -353,9 +358,9 @@
this
.
groupDO
.
Controls
.
Add
(
this
.
BeforeAfterCylinder_Before
);
this
.
groupDO
.
Controls
.
Add
(
this
.
TopCylinder_Up
);
this
.
groupDO
.
Controls
.
Add
(
this
.
UpDownCylinder_Up
);
this
.
groupDO
.
Location
=
new
System
.
Drawing
.
Point
(
500
,
3
32
);
this
.
groupDO
.
Location
=
new
System
.
Drawing
.
Point
(
500
,
3
29
);
this
.
groupDO
.
Name
=
"groupDO"
;
this
.
groupDO
.
Size
=
new
System
.
Drawing
.
Size
(
652
,
11
7
);
this
.
groupDO
.
Size
=
new
System
.
Drawing
.
Size
(
652
,
11
1
);
this
.
groupDO
.
TabIndex
=
255
;
this
.
groupDO
.
TabStop
=
false
;
this
.
groupDO
.
Text
=
"IO操作测试"
;
...
...
@@ -497,7 +502,7 @@
this
.
lblThisSta
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblThisSta
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblThisSta
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblThisSta
.
Location
=
new
System
.
Drawing
.
Point
(
199
,
12
7
);
this
.
lblThisSta
.
Location
=
new
System
.
Drawing
.
Point
(
199
,
12
6
);
this
.
lblThisSta
.
Name
=
"lblThisSta"
;
this
.
lblThisSta
.
Size
=
new
System
.
Drawing
.
Size
(
942
,
28
);
this
.
lblThisSta
.
TabIndex
=
246
;
...
...
@@ -519,6 +524,7 @@
//
// tabPage1
//
this
.
tabPage1
.
Controls
.
Add
(
this
.
groupBox5
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
groupDO
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
clampJawControl1
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
groupBox6
);
...
...
@@ -561,7 +567,7 @@
this
.
lblInoutInfo
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
lblInoutInfo
.
ForeColor
=
System
.
Drawing
.
Color
.
Green
;
this
.
lblInoutInfo
.
Location
=
new
System
.
Drawing
.
Point
(
2
,
1
7
);
this
.
lblInoutInfo
.
Location
=
new
System
.
Drawing
.
Point
(
2
,
1
6
);
this
.
lblInoutInfo
.
Name
=
"lblInoutInfo"
;
this
.
lblInoutInfo
.
Size
=
new
System
.
Drawing
.
Size
(
1138
,
23
);
this
.
lblInoutInfo
.
TabIndex
=
281
;
...
...
@@ -585,7 +591,7 @@
this
.
lblInstoreList
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblInstoreList
.
ForeColor
=
System
.
Drawing
.
Color
.
Green
;
this
.
lblInstoreList
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblInstoreList
.
Location
=
new
System
.
Drawing
.
Point
(
199
,
4
5
);
this
.
lblInstoreList
.
Location
=
new
System
.
Drawing
.
Point
(
199
,
4
4
);
this
.
lblInstoreList
.
Name
=
"lblInstoreList"
;
this
.
lblInstoreList
.
Size
=
new
System
.
Drawing
.
Size
(
942
,
77
);
this
.
lblInstoreList
.
TabIndex
=
277
;
...
...
@@ -889,6 +895,48 @@
this
.
txtP2
.
TabIndex
=
305
;
this
.
txtP2
.
Text
=
"-1"
;
//
// groupBox5
//
this
.
groupBox5
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
groupBox5
.
Controls
.
Add
(
this
.
label7
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
txtPosId
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnClear
);
this
.
groupBox5
.
Location
=
new
System
.
Drawing
.
Point
(
500
,
443
);
this
.
groupBox5
.
Name
=
"groupBox5"
;
this
.
groupBox5
.
Size
=
new
System
.
Drawing
.
Size
(
652
,
66
);
this
.
groupBox5
.
TabIndex
=
280
;
this
.
groupBox5
.
TabStop
=
false
;
//
// label7
//
this
.
label7
.
AutoSize
=
true
;
this
.
label7
.
Location
=
new
System
.
Drawing
.
Point
(
14
,
28
);
this
.
label7
.
Name
=
"label7"
;
this
.
label7
.
Size
=
new
System
.
Drawing
.
Size
(
47
,
17
);
this
.
label7
.
TabIndex
=
284
;
this
.
label7
.
Text
=
"库位号:"
;
//
// txtPosId
//
this
.
txtPosId
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtPosId
.
Location
=
new
System
.
Drawing
.
Point
(
72
,
23
);
this
.
txtPosId
.
Name
=
"txtPosId"
;
this
.
txtPosId
.
Size
=
new
System
.
Drawing
.
Size
(
150
,
26
);
this
.
txtPosId
.
TabIndex
=
283
;
//
// btnClear
//
this
.
btnClear
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btnClear
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnClear
.
Location
=
new
System
.
Drawing
.
Point
(
233
,
19
);
this
.
btnClear
.
Name
=
"btnClear"
;
this
.
btnClear
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
35
);
this
.
btnClear
.
TabIndex
=
286
;
this
.
btnClear
.
Text
=
"清空入库任务"
;
this
.
btnClear
.
UseVisualStyleBackColor
=
false
;
this
.
btnClear
.
Click
+=
new
System
.
EventHandler
(
this
.
btnClear_Click
);
//
// FrmMoveEquip
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
17F
);
...
...
@@ -921,6 +969,8 @@
this
.
groupDetial
.
PerformLayout
();
this
.
groupBox2
.
ResumeLayout
(
false
);
this
.
groupBox2
.
PerformLayout
();
this
.
groupBox5
.
ResumeLayout
(
false
);
this
.
groupBox5
.
PerformLayout
();
this
.
ResumeLayout
(
false
);
}
...
...
@@ -986,6 +1036,10 @@
private
System
.
Windows
.
Forms
.
Label
lblP2
;
private
System
.
Windows
.
Forms
.
Label
lblP3List
;
private
useControl
.
ClampJawControl
clampJawControl1
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox5
;
private
System
.
Windows
.
Forms
.
Label
label7
;
private
System
.
Windows
.
Forms
.
TextBox
txtPosId
;
private
System
.
Windows
.
Forms
.
Button
btnClear
;
}
}
source/AssemblyLineClient/FrmMoveEquip.cs
查看文件 @
975c335
...
...
@@ -682,7 +682,38 @@ namespace OnlineStore.AssemblyLine
LogUtil
.
info
(
equipBean
.
Name
+
"用户切换是否暂停: "
+
equipBean
.
MoveStop
);
}
private
void
btnClear_Click
(
object
sender
,
EventArgs
e
)
{
string
posId
=
txtPosId
.
Text
.
Trim
();
if
(
String
.
IsNullOrEmpty
(
posId
))
{
MessageBox
.
Show
(
"请输入正确的库位号"
,
"提示"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Error
,
MessageBoxDefaultButton
.
Button1
);
txtPosId
.
Focus
();
return
;
}
LogUtil
.
info
(
"点击 "
+
btnClear
.
Text
+
" , 库位号["
+
posId
+
"]"
);
InOutParam
param
=
null
;
List
<
InOutParam
>
paramList
=
new
List
<
InOutParam
>(
equipBean
.
waitInStoreList
);
foreach
(
InOutParam
p
in
paramList
)
{
if
(
p
.
PosId
.
Equals
(
posId
))
{
param
=
p
;
break
;
}
}
if
(
param
==
null
)
{
MessageBox
.
Show
(
"未找到对应的任务,请输入正确的库位号"
,
"提示"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Error
,
MessageBoxDefaultButton
.
Button1
);
txtPosId
.
Focus
();
return
;
}
else
{
equipBean
.
RemoveInStore
(
param
,
"手动清除入库任务"
);
txtPosId
.
Clear
();
}
}
}
}
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
查看文件 @
975c335
...
...
@@ -189,6 +189,12 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_05_UpdownAxis_P1
);
LogInfo
(
MoveInfo
.
MoveType
+
":"
+
MoveInfo
.
SLog
+
": 升降伺服到P1"
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpDownAxisP1
,
Config
.
UpdownAxis_P1Speed
);
currTrayNum
=
-
1
;
if
(
LineManager
.
Line
.
TrayIsReady
(
DeviceID
,
out
currTrayNum
))
{
LogInfo
(
"复位中,发现托盘准备完成,放托盘离开"
);
TrayMoveOk
();
}
break
;
case
LineMoveStep
.
FR_05_UpdownAxis_P1
:
if
(
UpdownIsInP1
())
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
查看文件 @
975c335
...
...
@@ -518,20 +518,8 @@ namespace OnlineStore.DeviceLibrary
int
targetPositon
=
Config
.
GetUpdownP2Detial
(
LastHeight
,
LastWidth
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
targetPositon
,
Config
.
UpdownAxis_P2Speed
);
LastPosParam
.
TrayNumber
=
currTrayNum
;
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
());
}
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":升降轴到P2: ["
+
targetPositon
+
"] 暂不更新托盘信息"
);
if
(
IOValue
(
IO_Type
.
SL_AxisLocationCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
MoveInfo
.
ShelfNoTray
.
Equals
(
false
))
{
InLog
(
"获取库位"
+
MoveInfo
.
SLog
+
": 上料轴开始慢速上升到P3点,不等待结果"
);
...
...
@@ -554,9 +542,22 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
FI_34_CylinderRelax
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_35_AxisToP1
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":升降轴到P1点 ["
+
Config
.
UpDownAxisP1
+
"]"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpDownAxisP1
,
Config
.
UpdownAxis_P1Speed
);
if
(
LastResult
.
Equals
(
98
))
{
TrayManager
.
UpdateTrayInfo
(
currTrayNum
,
true
,
ReelType
.
OutStore
,
LastPosParam
.
Clone
(),
LastPosParam
.
NgMsg
);
TrayInfo
tray
=
TrayManager
.
GetTrayInfo
(
currTrayNum
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":升降轴到P1点 ["
+
Config
.
UpDownAxisP1
+
"] 更新料盘位置,更新托盘信息【"
+
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
+
":升降轴到P1点 ["
+
Config
.
UpDownAxisP1
+
"] 更新托盘信息【"
+
tray
.
ToStr
()
+
"】"
);
SServerManager
.
SendPosToStoreCheck
(
Name
,
LastPosParam
.
Clone
());
}
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
FI_35_AxisToP1
))
{
...
...
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
查看文件 @
975c335
...
...
@@ -13,7 +13,190 @@ namespace OnlineStore.DeviceLibrary
{
partial
class
MoveEquip
{
#
region
判断托盘是否需要出入库
private
bool
CheckIsNeedOutStore
()
{
if
(
currTrayNum
<=
0
||
OnlyProOutTray
)
{
return
false
;
}
bool
isFull
=
TrayManager
.
TrayIsFull
(
currTrayNum
);
if
(
isFull
)
{
return
false
;
}
bool
moveOk
=
(
IsBigStore
()
&&
MoveInfo
.
MoveStep
>=
LineMoveStep
.
MO_58_WaitTray
)
||
MoveInfo
.
MoveStep
>=
LineMoveStep
.
MO_59_CylinderAfter
;
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
OutStore
)
&&
moveOk
&&
(!
MoveInfo
.
IsStep
(
LineMoveStep
.
MO_62_CylinderUp
)))
{
if
(
isFull
.
Equals
(
false
))
{
LogInfo
(
" 出库中,拦截空托盘【 "
+
currTrayNum
+
"】~"
);
return
true
;
}
}
return
false
;
}
internal
bool
IsWaitEmptyTray
()
{
if
(
isInSuddenDown
||
isNoAirCheck
)
{
return
false
;
}
bool
moveOk
=
(
IsBigStore
()
&&
MoveInfo
.
MoveStep
>=
LineMoveStep
.
MO_58_WaitTray
)
||
MoveInfo
.
MoveStep
>=
LineMoveStep
.
MO_59_CylinderAfter
;
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
OutStore
)
&&
moveOk
&&
(!
MoveInfo
.
IsStep
(
LineMoveStep
.
MO_62_CylinderUp
)))
{
return
true
;
}
return
false
;
}
private
int
LastWidth
=
0
;
private
bool
CheckIsNeedMove
()
{
if
(
currTrayNum
<=
0
||
(!
OnlyProOutTray
))
{
return
false
;
}
TrayInfo
tray
=
TrayManager
.
GetTrayInfo
(
currTrayNum
);
InOutParam
param
=
tray
.
InoutPar
;
if
(
tray
.
InOrOutStore
.
Equals
(
2
))
{
//获取尺寸
int
robotIndex
=
0
;
string
code
=
SecondMoveInfo
.
MoveParam
.
WareCode
;
string
result
=
SServerManager
.
GetTraySize
(
Name
,
robotIndex
,
code
,
out
LastWidth
);
LogUtil
.
info
(
Name
+
"["
+
currTrayNum
+
"] ["
+
code
+
"] 获取尺寸【"
+
LastWidth
+
"】【"
+
result
+
"】"
);
if
(
LastWidth
>
0
)
{
SecondMoveInfo
.
MoveParam
=
param
.
Clone
();
return
true
;
}
else
{
LogUtil
.
info
(
Name
+
"["
+
currTrayNum
+
"] ["
+
tray
.
ToStr
()
+
"] 获取尺寸失败,托盘继续流转"
);
}
}
else
if
(
param
.
InStoreNg
)
{
SecondMoveInfo
.
MoveParam
=
param
.
Clone
();
return
true
;
}
return
false
;
}
private
bool
CheckIsNeedInStore
()
{
if
(
currTrayNum
<=
0
||
LineManager
.
DisGetWare
||
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
OutStore
)
||
waitOutStoreList
.
Count
>
0
)
{
return
false
;
}
bool
isfull
=
TrayManager
.
TrayIsFull
(
currTrayNum
);
if
(!
isfull
)
{
return
false
;
}
InOutParam
currCode
=
null
;
TrayInfo
tray
=
TrayManager
.
GetTrayInfo
(
currTrayNum
);
if
(
waitInStoreList
.
Count
>
0
)
{
lock
(
waitInListLock
)
{
//判断是否是自己排队列表中的入库信息
int
reIndex
=
-
1
;
for
(
int
i
=
0
;
i
<
waitInStoreList
.
Count
;
i
++)
{
InOutParam
cc
=
waitInStoreList
[
i
];
if
(
cc
.
TrayNumber
.
Equals
(
currTrayNum
)
&&
(!
cc
.
WareCode
.
Equals
(
""
)))
{
reIndex
=
i
;
currCode
=
cc
;
SecondMoveInfo
.
MoveParam
=
new
InOutParam
(
cc
.
TrayNumber
,
cc
.
WareCode
,
cc
.
PosId
,
cc
.
PlateH
,
cc
.
PlateW
,
cc
.
InStoreNg
);
break
;
}
}
if
(
reIndex
>=
0
)
{
if
(
currCode
.
PosId
.
Equals
(
tray
.
InoutPar
.
PosId
)
&&
tray
.
InOrOutStore
.
Equals
(
1
)
&&
tray
.
InoutPar
.
InStoreNg
.
Equals
(
false
))
{
if
(!
LineServer
.
BoxCanInStore
(
DeviceID
))
{
LogInfo
(
"*******托盘"
+
currTrayNum
+
"需要入库【"
+
currCode
.
ToStr
()
+
"】,BoxCanInStore验证失败,先放托盘通过"
);
return
false
;
}
else
{
//判断是否验证成功,如果验证失败,不入库
if
(
LineServer
.
RightInPosId
(
DeviceID
,
currCode
.
PosId
))
{
//waitInStoreList.RemoveAt(reIndex);
LogInfo
(
"*******托盘"
+
currTrayNum
+
"需要入库【"
+
currCode
.
ToStr
()
+
"】 ,开始入库移栽"
);
return
true
;
}
else
{
LogUtil
.
error
(
Name
+
"托盘号【"
+
currTrayNum
+
"】入库信息【"
+
currCode
.
ToStr
()
+
"】料仓未验证成功,更新为入库NG料,从waitInStoreList中删除"
+
reIndex
+
",取消入库任务"
);
TrayManager
.
UpdateInStoreNG
(
currTrayNum
,
true
,
"Box验证入库失败"
);
waitInStoreList
.
RemoveAt
(
reIndex
);
SServerManager
.
cancelPutInTask
(
Name
,
currCode
.
WareCode
);
return
false
;
}
}
}
else
{
LogUtil
.
error
(
Name
+
"托盘信息 "
+
tray
.
ToStr
()
+
" 与入库任务 "
+
currCode
.
ToStr
()
+
" 不一致,从waitInStoreList中删除"
+
reIndex
+
",取消入库任务"
);
waitInStoreList
.
RemoveAt
(
reIndex
);
SServerManager
.
cancelPutInTask
(
Name
,
currCode
.
WareCode
);
return
false
;
}
}
}
}
return
false
;
}
public
bool
RemoveInStore
(
InOutParam
param
,
string
logName
=
"料盘已移走"
)
{
if
(
waitInStoreList
.
Count
>
0
)
{
lock
(
waitInListLock
)
{
//判断是否是自己排队列表中的入库信息
int
reIndex
=
-
1
;
for
(
int
i
=
0
;
i
<
waitInStoreList
.
Count
;
i
++)
{
InOutParam
cc
=
waitInStoreList
[
i
];
//托盘号一致,二维码一致,库位号一致
if
(
cc
.
TrayNumber
.
Equals
(
param
.
TrayNumber
)
&&
cc
.
PosId
.
Equals
(
param
.
PosId
)
&&
cc
.
WareCode
.
Equals
(
param
.
WareCode
))
{
reIndex
=
i
;
break
;
}
}
if
(
reIndex
>=
0
)
{
waitInStoreList
.
RemoveAt
(
reIndex
);
LogInfo
(
"*******"
+
logName
+
",清理入库任务:【"
+
param
.
ToStr
()
+
"】"
);
return
true
;
}
}
}
return
false
;
}
#
endregion
#
region
出库
private
int
ClampCount
=
0
;
public
override
bool
StartOutStoreMove
(
InOutParam
param
)
...
...
@@ -540,202 +723,7 @@ namespace OnlineStore.DeviceLibrary
}
private
bool
CheckIsNeedOutStore
()
{
if
(
currTrayNum
<=
0
)
{
return
false
;
}
if
(
OnlyProOutTray
)
{
return
false
;
}
bool
isFull
=
TrayManager
.
TrayIsFull
(
currTrayNum
);
if
(
isFull
)
{
return
false
;
}
bool
moveOk
=
(
IsBigStore
()
&&
MoveInfo
.
MoveStep
>=
LineMoveStep
.
MO_58_WaitTray
)
||
MoveInfo
.
MoveStep
>=
LineMoveStep
.
MO_59_CylinderAfter
;
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
OutStore
)
&&
moveOk
&&
(!
MoveInfo
.
IsStep
(
LineMoveStep
.
MO_62_CylinderUp
)))
{
if
(
isFull
.
Equals
(
false
))
{
LogInfo
(
" 出库中,拦截空托盘【 "
+
currTrayNum
+
"】~"
);
return
true
;
}
}
return
false
;
}
internal
bool
IsWaitEmptyTray
()
{
if
(
isInSuddenDown
||
isNoAirCheck
)
{
return
false
;
}
bool
moveOk
=
(
IsBigStore
()
&&
MoveInfo
.
MoveStep
>=
LineMoveStep
.
MO_58_WaitTray
)
||
MoveInfo
.
MoveStep
>=
LineMoveStep
.
MO_59_CylinderAfter
;
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
OutStore
)
&&
moveOk
&&
(!
MoveInfo
.
IsStep
(
LineMoveStep
.
MO_62_CylinderUp
)))
{
return
true
;
}
return
false
;
}
private
int
LastWidth
=
0
;
private
bool
ChekcIsNeedMoveReel
()
{
if
(
currTrayNum
<=
0
)
{
return
false
;
}
if
(
OnlyProOutTray
)
{
TrayInfo
tray
=
TrayManager
.
GetTrayInfo
(
currTrayNum
);
InOutParam
param
=
tray
.
InoutPar
;
if
(
tray
.
InOrOutStore
.
Equals
(
2
))
{
//获取尺寸
int
robotIndex
=
0
;
string
code
=
SecondMoveInfo
.
MoveParam
.
WareCode
;
string
result
=
SServerManager
.
GetTraySize
(
Name
,
robotIndex
,
code
,
out
LastWidth
);
LogUtil
.
info
(
Name
+
"["
+
currTrayNum
+
"] ["
+
code
+
"] 获取尺寸【"
+
LastWidth
+
"】【"
+
result
+
"】"
);
if
(
LastWidth
>
0
)
{
SecondMoveInfo
.
MoveParam
=
param
.
Clone
();
return
true
;
}
else
{
LogUtil
.
info
(
Name
+
"["
+
currTrayNum
+
"] ["
+
tray
.
ToStr
()
+
"] 获取尺寸失败,托盘继续流转"
);
}
}
else
if
(
param
.
InStoreNg
)
{
SecondMoveInfo
.
MoveParam
=
param
.
Clone
();
return
true
;
}
}
return
false
;
}
private
bool
CheckIsNeedInStore
()
{
if
(
currTrayNum
<=
0
)
{
return
false
;
}
if
(
LineManager
.
DisGetWare
)
{
return
false
;
}
//如果正在出库执行中,不能拦截入库托盘
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
OutStore
))
{
return
false
;
}
else
if
(
waitOutStoreList
.
Count
>
0
)
{
return
false
;
}
bool
isfull
=
TrayManager
.
TrayIsFull
(
currTrayNum
);
if
(!
isfull
)
{
return
false
;
}
InOutParam
currCode
=
null
;
TrayInfo
tray
=
TrayManager
.
GetTrayInfo
(
currTrayNum
);
if
(
waitInStoreList
.
Count
>
0
)
{
lock
(
waitInListLock
)
{
//判断是否是自己排队列表中的入库信息
int
reIndex
=
-
1
;
for
(
int
i
=
0
;
i
<
waitInStoreList
.
Count
;
i
++)
{
InOutParam
cc
=
waitInStoreList
[
i
];
if
(
cc
.
TrayNumber
.
Equals
(
currTrayNum
)
&&
(!
cc
.
WareCode
.
Equals
(
""
)))
{
reIndex
=
i
;
currCode
=
cc
;
SecondMoveInfo
.
MoveParam
=
new
InOutParam
(
cc
.
TrayNumber
,
cc
.
WareCode
,
cc
.
PosId
,
cc
.
PlateH
,
cc
.
PlateW
,
cc
.
InStoreNg
);
break
;
}
}
if
(
reIndex
>=
0
)
{
if
(
currCode
.
PosId
.
Equals
(
tray
.
InoutPar
.
PosId
)
&&
tray
.
InOrOutStore
.
Equals
(
1
)
&&
tray
.
InoutPar
.
InStoreNg
.
Equals
(
false
))
{
if
(!
LineServer
.
BoxCanInStore
(
DeviceID
))
{
LogInfo
(
"*******托盘"
+
currTrayNum
+
"需要入库【"
+
currCode
.
ToStr
()
+
"】,BoxCanInStore验证失败,先放托盘通过"
);
return
false
;
}
else
{
//判断是否验证成功,如果验证失败,不入库
if
(
LineServer
.
RightInPosId
(
DeviceID
,
currCode
.
PosId
))
{
//waitInStoreList.RemoveAt(reIndex);
LogInfo
(
"*******托盘"
+
currTrayNum
+
"需要入库【"
+
currCode
.
ToStr
()
+
"】 ,开始入库移栽"
);
return
true
;
}
else
{
LogUtil
.
error
(
Name
+
"托盘号【"
+
currTrayNum
+
"】入库信息【"
+
currCode
.
ToStr
()
+
"】料仓未验证成功,更新为入库NG料,从waitInStoreList中删除"
+
reIndex
+
",取消入库任务"
);
TrayManager
.
UpdateInStoreNG
(
currTrayNum
,
true
,
"Box验证入库失败"
);
waitInStoreList
.
RemoveAt
(
reIndex
);
SServerManager
.
cancelPutInTask
(
Name
,
currCode
.
WareCode
);
return
false
;
}
}
}
else
{
LogUtil
.
error
(
Name
+
"托盘信息 "
+
tray
.
ToStr
()
+
" 与入库任务 "
+
currCode
.
ToStr
()
+
" 不一致,从waitInStoreList中删除"
+
reIndex
+
",取消入库任务"
);
waitInStoreList
.
RemoveAt
(
reIndex
);
SServerManager
.
cancelPutInTask
(
Name
,
currCode
.
WareCode
);
return
false
;
}
}
}
}
return
false
;
}
public
bool
RemoveInStore
(
InOutParam
param
,
string
logName
=
"料盘已移走"
)
{
if
(
waitInStoreList
.
Count
>
0
)
{
lock
(
waitInListLock
)
{
//判断是否是自己排队列表中的入库信息
int
reIndex
=
-
1
;
for
(
int
i
=
0
;
i
<
waitInStoreList
.
Count
;
i
++)
{
InOutParam
cc
=
waitInStoreList
[
i
];
//托盘号一致,二维码一致,库位号一致
if
(
cc
.
TrayNumber
.
Equals
(
param
.
TrayNumber
)
&&
cc
.
PosId
.
Equals
(
param
.
PosId
)
&&
cc
.
WareCode
.
Equals
(
param
.
WareCode
))
{
reIndex
=
i
;
break
;
}
}
if
(
reIndex
>=
0
)
{
waitInStoreList
.
RemoveAt
(
reIndex
);
LogInfo
(
"*******"
+
logName
+
",清理入库任务:【"
+
param
.
ToStr
()
+
"】"
);
return
true
;
}
}
}
return
false
;
}
#
endregion
#
region
托盘检测
...
...
@@ -973,7 +961,7 @@ namespace OnlineStore.DeviceLibrary
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_08_WaitInStore
);
isNeedMove
=
true
;
}
else
if
(
Che
kcIsNeedMoveReel
())
else
if
(
Che
ckIsNeedMove
())
{
LogInfo
(
SecondMoveInfo
.
MoveNum
+
"*************** 托盘【"
+
currTrayNum
+
"】,料盘要去出料口,等待移栽"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_08_WaitInStore
);
...
...
@@ -997,7 +985,9 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
SecondMoveInfo
.
IsStep
(
LineMoveStep
.
MIO_08_WaitInStore
)
&&
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
else
if
(
SecondMoveInfo
.
IsStep
(
LineMoveStep
.
MIO_08_WaitInStore
)
&&
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
)&&
runStatus
.
Equals
(
LineRunStatus
.
Runing
))
{
StartInStoreMove
(
SecondMoveInfo
.
MoveParam
);
CheckLog
(
"托盘放行"
+
SecondMoveInfo
.
SLog
+
" ,等待移栽完成后放开阻挡)"
);
...
...
source/LoadCVSLibrary/storeConfig/ConfigItemBase.cs
查看文件 @
975c335
...
...
@@ -70,10 +70,10 @@ namespace OnlineStore.LoadCSVLibrary
[
CSVAttribute
(
"加速度"
)]
public
shor
t
AddSpeed
{
get
;
set
;
}
public
in
t
AddSpeed
{
get
;
set
;
}
[
CSVAttribute
(
"减速度"
)]
public
shor
t
DelSpeed
{
get
;
set
;
}
public
in
t
DelSpeed
{
get
;
set
;
}
[
CSVAttribute
(
"回零低速"
)]
public
int
HomeLowSpeed
{
get
;
set
;
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论