Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit c4b8bec5
由
LN
编写于
2019-12-10 14:54:00 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加读托盘号
1 个父辈
04bea6bc
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
117 行增加
和
65 行删除
source/AssemblyLineClient/FrmFeedingEquip.Designer.cs
source/AssemblyLineClient/FrmFeedingEquip.cs
source/AssemblyLineClient/FrmLineStore.cs
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
source/DeviceLibrary/assemblyLine/LineBean.cs
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
source/DeviceLibrary/assemblymanager/TrayManager.cs
source/AssemblyLineClient/FrmFeedingEquip.Designer.cs
查看文件 @
c4b8bec
...
@@ -92,6 +92,7 @@
...
@@ -92,6 +92,7 @@
this
.
btnMoveto
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnMoveto
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
txtSizePosition
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtSizePosition
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
chbBoxSendShelf
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chbMoveStop
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chbMoveStop
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
lblName
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblName
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnScan
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnScan
=
new
System
.
Windows
.
Forms
.
Button
();
...
@@ -595,7 +596,7 @@
...
@@ -595,7 +596,7 @@
//
//
this
.
chbDebug
.
AutoSize
=
true
;
this
.
chbDebug
.
AutoSize
=
true
;
this
.
chbDebug
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbDebug
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbDebug
.
Location
=
new
System
.
Drawing
.
Point
(
651
,
1
5
);
this
.
chbDebug
.
Location
=
new
System
.
Drawing
.
Point
(
651
,
1
3
);
this
.
chbDebug
.
Name
=
"chbDebug"
;
this
.
chbDebug
.
Name
=
"chbDebug"
;
this
.
chbDebug
.
Size
=
new
System
.
Drawing
.
Size
(
84
,
24
);
this
.
chbDebug
.
Size
=
new
System
.
Drawing
.
Size
(
84
,
24
);
this
.
chbDebug
.
TabIndex
=
247
;
this
.
chbDebug
.
TabIndex
=
247
;
...
@@ -623,7 +624,7 @@
...
@@ -623,7 +624,7 @@
this
.
lblStoreStatus
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblStoreStatus
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblStoreStatus
.
ForeColor
=
System
.
Drawing
.
Color
.
Green
;
this
.
lblStoreStatus
.
ForeColor
=
System
.
Drawing
.
Color
.
Green
;
this
.
lblStoreStatus
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblStoreStatus
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblStoreStatus
.
Location
=
new
System
.
Drawing
.
Point
(
835
,
17
);
this
.
lblStoreStatus
.
Location
=
new
System
.
Drawing
.
Point
(
979
,
15
);
this
.
lblStoreStatus
.
Name
=
"lblStoreStatus"
;
this
.
lblStoreStatus
.
Name
=
"lblStoreStatus"
;
this
.
lblStoreStatus
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
20
);
this
.
lblStoreStatus
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
20
);
this
.
lblStoreStatus
.
TabIndex
=
245
;
this
.
lblStoreStatus
.
TabIndex
=
245
;
...
@@ -1113,6 +1114,7 @@
...
@@ -1113,6 +1114,7 @@
//
//
this
.
panel1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
this
.
panel1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
panel1
.
Controls
.
Add
(
this
.
chbBoxSendShelf
);
this
.
panel1
.
Controls
.
Add
(
this
.
chbMoveStop
);
this
.
panel1
.
Controls
.
Add
(
this
.
chbMoveStop
);
this
.
panel1
.
Controls
.
Add
(
this
.
lblName
);
this
.
panel1
.
Controls
.
Add
(
this
.
lblName
);
this
.
panel1
.
Controls
.
Add
(
this
.
btnScan
);
this
.
panel1
.
Controls
.
Add
(
this
.
btnScan
);
...
@@ -1126,11 +1128,23 @@
...
@@ -1126,11 +1128,23 @@
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
1306
,
47
);
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
1306
,
47
);
this
.
panel1
.
TabIndex
=
258
;
this
.
panel1
.
TabIndex
=
258
;
//
//
// chbBoxSendShelf
//
this
.
chbBoxSendShelf
.
AutoSize
=
true
;
this
.
chbBoxSendShelf
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbBoxSendShelf
.
Location
=
new
System
.
Drawing
.
Point
(
831
,
13
);
this
.
chbBoxSendShelf
.
Name
=
"chbBoxSendShelf"
;
this
.
chbBoxSendShelf
.
Size
=
new
System
.
Drawing
.
Size
(
140
,
24
);
this
.
chbBoxSendShelf
.
TabIndex
=
251
;
this
.
chbBoxSendShelf
.
Text
=
"出库完成送出料架"
;
this
.
chbBoxSendShelf
.
UseVisualStyleBackColor
=
true
;
this
.
chbBoxSendShelf
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbBoxSendShelf_CheckedChanged
);
//
// chbMoveStop
// chbMoveStop
//
//
this
.
chbMoveStop
.
AutoSize
=
true
;
this
.
chbMoveStop
.
AutoSize
=
true
;
this
.
chbMoveStop
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbMoveStop
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbMoveStop
.
Location
=
new
System
.
Drawing
.
Point
(
741
,
1
5
);
this
.
chbMoveStop
.
Location
=
new
System
.
Drawing
.
Point
(
741
,
1
3
);
this
.
chbMoveStop
.
Name
=
"chbMoveStop"
;
this
.
chbMoveStop
.
Name
=
"chbMoveStop"
;
this
.
chbMoveStop
.
Size
=
new
System
.
Drawing
.
Size
(
84
,
24
);
this
.
chbMoveStop
.
Size
=
new
System
.
Drawing
.
Size
(
84
,
24
);
this
.
chbMoveStop
.
TabIndex
=
250
;
this
.
chbMoveStop
.
TabIndex
=
250
;
...
@@ -1281,6 +1295,7 @@
...
@@ -1281,6 +1295,7 @@
private
System
.
Windows
.
Forms
.
Label
lblwidth
;
private
System
.
Windows
.
Forms
.
Label
lblwidth
;
private
System
.
Windows
.
Forms
.
Button
btnFLStop1
;
private
System
.
Windows
.
Forms
.
Button
btnFLStop1
;
private
System
.
Windows
.
Forms
.
Button
btnFLStop2Down
;
private
System
.
Windows
.
Forms
.
Button
btnFLStop2Down
;
private
System
.
Windows
.
Forms
.
CheckBox
chbBoxSendShelf
;
}
}
}
}
source/AssemblyLineClient/FrmFeedingEquip.cs
查看文件 @
c4b8bec
...
@@ -91,7 +91,7 @@ namespace OnlineStore.AssemblyLine
...
@@ -91,7 +91,7 @@ namespace OnlineStore.AssemblyLine
cmbWriteIO
.
DisplayMember
=
"DisplayStr"
;
cmbWriteIO
.
DisplayMember
=
"DisplayStr"
;
}
}
private
bool
IsInCheck
=
false
;
private
void
timer1_Tick
(
object
sender
,
EventArgs
e
)
private
void
timer1_Tick
(
object
sender
,
EventArgs
e
)
{
{
try
try
...
@@ -121,6 +121,10 @@ namespace OnlineStore.AssemblyLine
...
@@ -121,6 +121,10 @@ namespace OnlineStore.AssemblyLine
FormStatus
(
false
);
FormStatus
(
false
);
}
}
}
}
if
(!
equipBean
.
OutEndSendShelfOut
.
Equals
(
chbBoxSendShelf
.
Checked
)&&(!
IsInCheck
))
{
chbBoxSendShelf
.
Checked
=
equipBean
.
OutEndSendShelfOut
;
}
lblAgvInfo
.
Text
=
"AGV-"
+
equipBean
.
Config
.
AgvInName
+
" 状态:"
+
AgvClient
.
GetAction
(
equipBean
.
Config
.
AgvInName
).
ToString
()
+
lblAgvInfo
.
Text
=
"AGV-"
+
equipBean
.
Config
.
AgvInName
+
" 状态:"
+
AgvClient
.
GetAction
(
equipBean
.
Config
.
AgvInName
).
ToString
()
+
"\t AGV-"
+
equipBean
.
Config
.
AgvOutName
+
" 状态:"
+
AgvClient
.
GetAction
(
equipBean
.
Config
.
AgvOutName
).
ToString
()
+
""
;
"\t AGV-"
+
equipBean
.
Config
.
AgvOutName
+
" 状态:"
+
AgvClient
.
GetAction
(
equipBean
.
Config
.
AgvOutName
).
ToString
()
+
""
;
string
canOut
=
equipBean
.
Config
.
IsCanOut
.
Equals
(
1
)
?
"紧急出料模块"
:
"入料模块"
;
string
canOut
=
equipBean
.
Config
.
IsCanOut
.
Equals
(
1
)
?
"紧急出料模块"
:
"入料模块"
;
...
@@ -255,7 +259,9 @@ namespace OnlineStore.AssemblyLine
...
@@ -255,7 +259,9 @@ namespace OnlineStore.AssemblyLine
txtBp1
.
Text
=
equipBean
.
Config
.
BatchAxisP1
.
ToString
();
txtBp1
.
Text
=
equipBean
.
Config
.
BatchAxisP1
.
ToString
();
txtBP2
.
Text
=
equipBean
.
Config
.
BatchAxisP2
.
ToString
();
txtBP2
.
Text
=
equipBean
.
Config
.
BatchAxisP2
.
ToString
();
txtBP3
.
Text
=
equipBean
.
Config
.
BatchAxisP3
.
ToString
();
txtBP3
.
Text
=
equipBean
.
Config
.
BatchAxisP3
.
ToString
();
lblName
.
Text
=
equipBean
.
Name
;
lblName
.
Text
=
equipBean
.
Name
;
chbBoxSendShelf
.
Visible
=
equipBean
.
Config
.
IsCanOut
.
Equals
(
1
);
chbBoxSendShelf
.
Checked
=
equipBean
.
OutEndSendShelfOut
;
IsLoad
=
true
;
IsLoad
=
true
;
}
}
...
@@ -543,8 +549,7 @@ namespace OnlineStore.AssemblyLine
...
@@ -543,8 +549,7 @@ namespace OnlineStore.AssemblyLine
}
}
private
void
chbMoveStop_CheckedChanged
(
object
sender
,
EventArgs
e
)
private
void
chbMoveStop_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
{
if
(!
IsLoad
)
if
(!
IsLoad
)
{
{
return
;
return
;
...
@@ -559,16 +564,22 @@ namespace OnlineStore.AssemblyLine
...
@@ -559,16 +564,22 @@ namespace OnlineStore.AssemblyLine
}
}
private
void
btnFLStop1_Click
(
object
sender
,
EventArgs
e
)
private
void
btnFLStop1_Click
(
object
sender
,
EventArgs
e
)
{
{
BtnMove
(
btnFLStop1
,
"FL阻挡1下降"
,
"FL阻挡1上升"
,
IO_Type
.
FL_StopCylinder_Down1
);
BtnMove
(
btnFLStop1
,
"FL阻挡1下降"
,
"FL阻挡1上升"
,
IO_Type
.
FL_StopCylinder_Down1
);
}
}
private
void
btnFLStop2Down_Click
(
object
sender
,
EventArgs
e
)
private
void
btnFLStop2Down_Click
(
object
sender
,
EventArgs
e
)
{
{
BtnMove
(
btnFLStop2Down
,
"FL阻挡2下降"
,
"FL阻挡2上升"
,
IO_Type
.
FL_StopCylinder_Down2
);
BtnMove
(
btnFLStop2Down
,
"FL阻挡2下降"
,
"FL阻挡2上升"
,
IO_Type
.
FL_StopCylinder_Down2
);
}
}
private
void
chbBoxSendShelf_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
IsInCheck
=
true
;
LogUtil
.
info
(
equipBean
.
Name
+
"用户点击:出库完成送出料架="
+
chbBoxSendShelf
.
Checked
);
equipBean
.
OutEndSendShelfOut
=
chbBoxSendShelf
.
Checked
;
IsInCheck
=
false
;
}
}
}
}
}
...
...
source/AssemblyLineClient/FrmLineStore.cs
查看文件 @
c4b8bec
...
@@ -297,7 +297,7 @@ namespace OnlineStore.AssemblyLine
...
@@ -297,7 +297,7 @@ namespace OnlineStore.AssemblyLine
return
;
return
;
}
}
LogUtil
.
info
(
LOGGER
,
"开始启动"
);
LogUtil
.
info
(
LOGGER
,
"开始启动"
);
startTimer
.
Interval
=
1
;
startTimer
.
Interval
=
300
;
startTimer
.
Elapsed
+=
timer_Elapsed
;
startTimer
.
Elapsed
+=
timer_Elapsed
;
startTimer
.
Enabled
=
true
;
startTimer
.
Enabled
=
true
;
this
.
timer1
.
Start
();
this
.
timer1
.
Start
();
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
查看文件 @
c4b8bec
...
@@ -17,7 +17,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -17,7 +17,7 @@ namespace OnlineStore.DeviceLibrary
public
partial
class
FeedingEquip
:
EquipBase
public
partial
class
FeedingEquip
:
EquipBase
{
{
public
FeedingEquip_Config
Config
;
public
FeedingEquip_Config
Config
;
public
bool
OutEndSendShelfOut
=
false
;
public
AxisBean
BatchAxis
=
null
;
public
AxisBean
BatchAxis
=
null
;
public
FeedingEquip
(
string
cid
,
FeedingEquip_Config
config
)
public
FeedingEquip
(
string
cid
,
FeedingEquip_Config
config
)
{
{
...
@@ -356,7 +356,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -356,7 +356,13 @@ namespace OnlineStore.DeviceLibrary
}
}
if
(
SecondMoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
)
&&
NoErrorAlarm
())
if
(
SecondMoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
)
&&
NoErrorAlarm
())
{
{
StartCheckFixture
();
if
(
Config
.
IsCanOut
.
Equals
(
0
))
{
StartCheckFixture
();
}
else
if
(
LineManager
.
Line
.
runStatus
<=
LineRunStatus
.
Wait
)
{
StartCheckFixture
();
}
}
}
IOTimeOutProcess
();
IOTimeOutProcess
();
}
}
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
查看文件 @
c4b8bec
...
@@ -27,6 +27,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -27,6 +27,7 @@ namespace OnlineStore.DeviceLibrary
bool
isOk
=
ACServerManager
.
GetBusyStatus
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
()).
Equals
(
0
);
bool
isOk
=
ACServerManager
.
GetBusyStatus
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
()).
Equals
(
0
);
if
(
isOk
)
if
(
isOk
)
{
{
//TODO 判断是否达到高度,如果未达到,继续上升
BatchAxisStopCheck
();
BatchAxisStopCheck
();
return
true
;
return
true
;
}
}
...
@@ -82,10 +83,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -82,10 +83,10 @@ namespace OnlineStore.DeviceLibrary
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
,
CheckParam
);
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
,
CheckParam
);
TrayManager
.
UpdateSWState
(
Config
.
SidesWayNum
,
2
);
TrayManager
.
UpdateSWState
(
Config
.
SidesWayNum
,
2
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_01_StopCylinder1Down
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_01_StopCylinder1Down
);
CheckLog
(
"检测到SW_StopCheck:"
+
SecondMoveInfo
.
SLog
+
"阻挡气缸下降 ,
最多等待1秒"
);
CheckLog
(
"检测到SW_StopCheck:"
+
SecondMoveInfo
.
SLog
+
"阻挡气缸下降 ,
等待"
+
TrayManager
.
StopDownWaitTime
);
IOMove
(
IO_Type
.
SW_StopDown
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
SW_StopDown
,
IO_VALUE
.
HIGH
);
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW_StopDown, IO_VALUE.LOW));
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW_StopDown, IO_VALUE.LOW));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
TrayManager
.
StopDownWaitTime
));
}
}
}
}
else
else
...
@@ -146,7 +147,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -146,7 +147,7 @@ namespace OnlineStore.DeviceLibrary
{
{
CheckLog
(
"托盘检测:"
+
SecondMoveInfo
.
SLog
+
"阻挡气缸上升,等待SW_TrayCheck=1)"
);
CheckLog
(
"托盘检测:"
+
SecondMoveInfo
.
SLog
+
"阻挡气缸上升,等待SW_TrayCheck=1)"
);
IOMove
(
IO_Type
.
SW_StopDown
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SW_StopDown
,
IO_VALUE
.
LOW
);
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW_StopDown, IO_VALUE.LOW));
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW_StopDown, IO_VALUE.LOW));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW_TrayCheck
,
IO_VALUE
.
HIGH
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW_TrayCheck
,
IO_VALUE
.
HIGH
));
}
}
}
}
...
@@ -262,13 +263,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -262,13 +263,13 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_14_TopCylinder_Down
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_14_TopCylinder_Down
))
{
{
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_15_WaitCanGo
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_15_WaitCanGo
);
if
(
Config
.
SidesWayNum
>
0
)
if
(
Config
.
SidesWayNum
>
0
)
{
{
CheckLog
(
"托盘放行 "
+
SecondMoveInfo
.
SLog
+
" ,等待托盘离开"
);
CheckLog
(
"托盘放行 "
+
SecondMoveInfo
.
SLog
+
" ,等待托盘离开"
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW_TrayCheck
,
IO_VALUE
.
LOW
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW_TrayCheck
,
IO_VALUE
.
LOW
));
}
}
}
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_15_WaitCanGo
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_15_WaitCanGo
))
{
{
...
@@ -315,23 +316,22 @@ namespace OnlineStore.DeviceLibrary
...
@@ -315,23 +316,22 @@ namespace OnlineStore.DeviceLibrary
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_200_WaitInoutParam
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_200_WaitInoutParam
))
{
{
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
)
&&
StartTrayOut
(
SecondMoveInfo
.
MoveParam
)
)
{
{
StartTrayOut
(
SecondMoveInfo
.
MoveParam
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_201_WaitOutEnd
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_201_WaitOutEnd
);
}
}
else
else
{
{
TimeSpan
span
=
DateTime
.
Now
-
MoveInfo
.
LastSetpTime
;
TimeSpan
span
=
DateTime
.
Now
-
MoveInfo
.
LastSetpTime
;
if
(
span
.
TotalSeconds
>
180
)
if
(
span
.
TotalSeconds
>
180
)
{
{
WarnMsg
=
SecondMoveInfo
.
Name
+
"["
+
SecondMoveInfo
.
MoveType
+
"]["
+
SecondMoveInfo
.
MoveStep
+
"]等待横移机构空闲超时["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
WarnMsg
=
SecondMoveInfo
.
Name
+
"["
+
SecondMoveInfo
.
MoveType
+
"]["
+
SecondMoveInfo
.
MoveStep
+
"]等待横移机构空闲
可出库
超时["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
DeviceID
+
11
);
LogUtil
.
error
(
WarnMsg
,
DeviceID
+
11
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
}
}
}
}
}
}
}
}
#
endregion
#
endregion
...
@@ -773,6 +773,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -773,6 +773,8 @@ namespace OnlineStore.DeviceLibrary
#
endregion
#
endregion
}
}
private
void
FI_12_MoveCylinder_Give
()
private
void
FI_12_MoveCylinder_Give
()
{
{
if
(
MoveCylineCanTakeOrGive
())
if
(
MoveCylineCanTakeOrGive
())
...
@@ -843,7 +845,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -843,7 +845,7 @@ namespace OnlineStore.DeviceLibrary
if
(
LastHeight
<=
8
)
{
LastHeight
=
8
;
}
if
(
LastHeight
<=
8
)
{
LastHeight
=
8
;
}
else
else
{
{
LastHeight
=
(
int
)
Math
.
Ceiling
(
1F
*
(
LastHeight
-
2
-
4
)
/
4
)
*
4
;
LastHeight
=
(
int
)
Math
.
Floor
(
1F
*
(
LastHeight
)
/
4
)
*
4
;
}
}
if
(
LastHeight
<=
8
)
{
LastHeight
=
8
;
}
if
(
LastHeight
<=
8
)
{
LastHeight
=
8
;
}
LogUtil
.
info
(
msg
+
",归类为"
+
LastHeight
);
LogUtil
.
info
(
msg
+
",归类为"
+
LastHeight
);
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
查看文件 @
c4b8bec
...
@@ -11,20 +11,43 @@ namespace OnlineStore.DeviceLibrary
...
@@ -11,20 +11,43 @@ namespace OnlineStore.DeviceLibrary
partial
class
FeedingEquip
partial
class
FeedingEquip
{
{
#
region
出料流程
#
region
出料流程
private
int
OutStoreHeight
=
-
1
;
private
int
OutStoreHeight
=
-
1
;
internal
bool
CanStartCheckOut
()
private
bool
StartTrayOut
(
InOutParam
outParam
)
{
UpdateTrayNum
();
if
(
CurrTrayIsNeed
(
currTrayNum
,
true
))
{
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
,
CheckParam
);
TrayManager
.
UpdateSWState
(
Config
.
SidesWayNum
,
2
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_06_TopCylinderUp
);
CheckLog
(
"检测到SW_TrayCheck:"
+
SecondMoveInfo
.
SLog
+
"横移顶升气缸上升 )"
);
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
SW_TopCylinder_Down
,
IO_Type
.
SW_TopCylinder_Up
);
return
true
;
}
else
{
// currTrayNum = num;
TrayManager
.
UpdateSWState
(
Config
.
SidesWayNum
,
1
);
return
false
;
}
}
private
bool
StartTrayOut
(
InOutParam
outParam
)
{
{
if
(
outParam
==
null
||
outParam
.
PosId
==
null
||
outParam
.
PosId
.
Equals
(
""
))
if
(
outParam
==
null
||
outParam
.
PosId
==
null
||
outParam
.
PosId
.
Equals
(
""
))
{
{
LogUtil
.
error
(
Name
+
"出库失败,参数不完整:"
)
;
LogUtil
.
error
(
Name
+
"出库失败,参数不完整:"
)
;
LogUtil
.
error
(
outParam
.
ToStr
());
LogUtil
.
error
(
outParam
.
ToStr
());
return
false
;
return
false
;
}
if
(
IOValue
(
IO_Type
.
SL_Location_Check
).
Equals
(
IO_VALUE
.
LOW
)
||
OutStoreHeight
<
0
)
{
LogUtil
.
error
(
Name
+
"出库"
+
outParam
.
ToStr
()
+
"失败,未准备好料架"
);
return
false
;
}
}
runStatus
=
LineRunStatus
.
Busy
;
runStatus
=
LineRunStatus
.
Busy
;
lineStatus
=
LineStatus
.
OutStoreExecute
;
lineStatus
=
LineStatus
.
OutStoreExecute
;
MoveInfo
.
NewMove
(
LineMoveType
.
OutStore
,
outParam
);
MoveInfo
.
NewMove
(
LineMoveType
.
OutStore
,
outParam
);
//可以开始出库啦
//可以开始出库啦
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_211_AxisDownMove
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_211_AxisDownMove
);
OutLog
(
"出库移栽 "
+
MoveInfo
.
SLog
+
" :提升伺服下降指定的高度,升降轴回原点"
);
OutLog
(
"出库移栽 "
+
MoveInfo
.
SLog
+
" :提升伺服下降指定的高度,升降轴回原点"
);
...
@@ -32,7 +55,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -32,7 +55,7 @@ namespace OnlineStore.DeviceLibrary
if
(
targetPosition
<
Config
.
BatchAxisP2
)
if
(
targetPosition
<
Config
.
BatchAxisP2
)
{
{
targetPosition
=
Config
.
BatchAxisP2
;
targetPosition
=
Config
.
BatchAxisP2
;
}
}
BatchAxis
.
AbsMove
(
MoveInfo
,
targetPosition
,
Config
.
BatchAxis_P2Speed
);
BatchAxis
.
AbsMove
(
MoveInfo
,
targetPosition
,
Config
.
BatchAxis_P2Speed
);
return
true
;
return
true
;
//UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
//UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
...
@@ -245,14 +268,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -245,14 +268,13 @@ namespace OnlineStore.DeviceLibrary
BatchAxisStartCheck
(
IO_Type
.
SL_AxisLocationCheck
,
IO_VALUE
.
LOW
);
BatchAxisStartCheck
(
IO_Type
.
SL_AxisLocationCheck
,
IO_VALUE
.
LOW
);
}
}
}
}
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_31_BatchAxisToP2
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_31_BatchAxisToP2
))
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_32_TrayLocationCylinder_After
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_32_TrayLocationCylinder_After
);
OutLog
(
"出料完成 "
+
MoveInfo
.
SLog
+
": 升降盘定位气缸后退"
);
OutLog
(
"出料完成 "
+
MoveInfo
.
SLog
+
": 升降盘定位气缸后退,重置OutEndSendShelfOut=fasle,OutStoreHeight = -1"
);
OutEndSendShelfOut
=
false
;
OutStoreHeight
=
-
1
;
TrayLCylinderAfter
(
MoveInfo
);
TrayLCylinderAfter
(
MoveInfo
);
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_32_TrayLocationCylinder_After
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_32_TrayLocationCylinder_After
))
...
@@ -291,7 +313,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -291,7 +313,6 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_36_WaitShelfGo
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_36_WaitShelfGo
))
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_37_LineStop
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_37_LineStop
);
OutStoreHeight
=
-
1
;
OutLog
(
"出料完成 "
+
MoveInfo
.
SLog
+
", 料架到达出口,线体横移电机停止,清空出料高度 "
);
OutLog
(
"出料完成 "
+
MoveInfo
.
SLog
+
", 料架到达出口,线体横移电机停止,清空出料高度 "
);
IOMove
(
IO_Type
.
SL_LocationSideWay_Run
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SL_LocationSideWay_Run
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SL_OutSideWay_Run
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SL_OutSideWay_Run
,
IO_VALUE
.
LOW
);
...
@@ -413,8 +434,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -413,8 +434,8 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_221_UpdownAxisToP1
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_221_UpdownAxisToP1
))
{
{
//出库结束 TODO
//出库结束 TODO
bool
isNeedSendShelf
=
false
;
//
bool isNeedSendShelf = false;
if
(
isNeedSendShelf
)
if
(
OutEndSendShelfOut
)
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_31_BatchAxisToP2
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_31_BatchAxisToP2
);
OutLog
(
"紧急出料移栽 "
+
MoveInfo
.
SLog
+
":需要将料架送出,提升伺服到P2点"
);
OutLog
(
"紧急出料移栽 "
+
MoveInfo
.
SLog
+
":需要将料架送出,提升伺服到P2点"
);
...
...
source/DeviceLibrary/assemblyLine/LineBean.cs
查看文件 @
c4b8bec
...
@@ -121,13 +121,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -121,13 +121,13 @@ namespace OnlineStore.DeviceLibrary
cioList
=
new
List
<
string
>(
ioList
);
cioList
=
new
List
<
string
>(
ioList
);
string
ids
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
DebugDeviceId
);
string
ids
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
DebugDeviceId
);
rfidList
=
new
List
<
string
>(
DeviceConfig
.
ProRFIpMap
.
Values
);
//
rfidList = new List<string>(DeviceConfig.ProRFIpMap.Values);
rfidList
=
new
List
<
string
>();
if
(
IsDebug
)
if
(
IsDebug
)
{
{
//
rfidList = new List<string>() {
rfidList
=
new
List
<
string
>()
{
//
"192.168.210.116","192.168.210.120","192.168.210.121"
"192.168.210.116"
,
"192.168.210.120"
,
"192.168.210.121"
//
};
};
try
try
{
{
cioList
=
new
List
<
string
>();
cioList
=
new
List
<
string
>();
...
@@ -183,14 +183,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -183,14 +183,14 @@ namespace OnlineStore.DeviceLibrary
{
{
IOManager
.
instance
.
ConnectionIOList
(
cioList
);
IOManager
.
instance
.
ConnectionIOList
(
cioList
);
Thread
.
Sleep
(
5
);
Thread
.
Sleep
(
5
);
// if (!IsDebug)
// if (!IsDebug)
//{
//{
//
Task.Factory.StartNew(delegate
Task
.
Factory
.
StartNew
(
delegate
//
{
{
//
string[] rfidArray = rfidList.ToArray();
string
[]
rfidArray
=
rfidList
.
ToArray
();
//
//连接rfip
//连接rfip
//
TrayManager.RfidReader.Open(rfidArray);
TrayManager
.
RfidReader
.
Open
(
rfidArray
);
//
});
});
//}
//}
addLastDI
(
IO_Type
.
Airpressure_Check
,
IOValue
(
IO_Type
.
Airpressure_Check
));
addLastDI
(
IO_Type
.
Airpressure_Check
,
IOValue
(
IO_Type
.
Airpressure_Check
));
addLastDI
(
IO_Type
.
SuddenStop_BTN
,
IOValue
(
IO_Type
.
SuddenStop_BTN
));
addLastDI
(
IO_Type
.
SuddenStop_BTN
,
IOValue
(
IO_Type
.
SuddenStop_BTN
));
...
...
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
查看文件 @
c4b8bec
...
@@ -719,7 +719,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -719,7 +719,7 @@ namespace OnlineStore.DeviceLibrary
if
(
SW23_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW00_Wait
))
if
(
SW23_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW00_Wait
))
{
{
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW01_StopDown
);
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW01_StopDown
);
SWLog
(
"横移轨道23:阻挡气缸下降 等待 "
+
TrayManager
.
StopDownWaitTime
);
SWLog
(
"横移轨道23:阻挡气缸下降 等待 "
+
TrayManager
.
StopDownWaitTime
);
IOMove
(
IO_Type
.
SW2_StopDown
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
SW2_StopDown
,
IO_VALUE
.
HIGH
);
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
TrayManager
.
StopDownWaitTime
));
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
TrayManager
.
StopDownWaitTime
));
}
}
...
@@ -775,11 +775,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -775,11 +775,12 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
else
if
(
SW23_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW07_TopCylinderDown
))
else
if
(
SW23_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW07_TopCylinderDown
))
{
{
//开始入库
if
(
CheckTrayIsNeed
(
104
,
Sw23TrayNum
))
bool
result
=
FeedingEquipMap
[
104
].
CanStartCheckOut
();
if
(
result
)
{
{
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW09_WaitTrayGo
);
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW09_WaitTrayGo
);
SWLog
(
"横移轨道41:关闭皮带电机,不需要等待 托盘离开"
);
SWLog
(
"横移轨道41:关闭皮带电机,
需要紧急出料,
不需要等待 托盘离开"
);
IOMove
(
IO_Type
.
SW2_MotorRun
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SW2_MotorRun
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SW3_MotorRun
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SW3_MotorRun
,
IO_VALUE
.
LOW
);
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW2_MotorRun
,
IO_VALUE
.
LOW
));
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW2_MotorRun
,
IO_VALUE
.
LOW
));
...
...
source/DeviceLibrary/assemblymanager/TrayManager.cs
查看文件 @
c4b8bec
...
@@ -12,12 +12,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -12,12 +12,8 @@ namespace OnlineStore.DeviceLibrary
{
{
public
class
TrayManager
public
class
TrayManager
{
{
public
static
int
StopDownWaitTime
=
1000
;
public
static
int
StopDownWaitTime
=
500
;
public
static
RFID
RfidReader
=
new
RFID
();
public
static
RFID
RfidReader
=
new
RFID
();
///// <summary>
///// 出库时,可以不下降直接放料盘的宽度
///// </summary>
//public const int CanPushBagWidth = 7;
/// <summary>
/// <summary>
/// 托盘集合,key=托盘编号,value=托盘详细信息
/// 托盘集合,key=托盘编号,value=托盘详细信息
/// </summary>
/// </summary>
...
@@ -184,7 +180,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -184,7 +180,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
public
static
int
GetTrayNum
(
int
subType
,
bool
isClear
=
false
)
public
static
int
GetTrayNum
(
int
subType
,
bool
isClear
=
false
)
{
{
return
9
;
//
return 9;
if
(
subType
.
Equals
(
104
))
if
(
subType
.
Equals
(
104
))
{
{
return
LineManager
.
Line
.
Sw23TrayNum
;
return
LineManager
.
Line
.
Sw23TrayNum
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论