Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 4a70e617
由
LN
编写于
2020-03-24 11:42:26 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.入料逻辑修改。
1 个父辈
f9e97528
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
58 行增加
和
36 行删除
source/AssemblyLineClient/FrmFeedingEquip.cs
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
source/DeviceLibrary/model/StoreStep.cs
source/AssemblyLineClient/FrmFeedingEquip.cs
查看文件 @
4a70e61
...
@@ -386,7 +386,7 @@ namespace OnlineStore.AssemblyLine
...
@@ -386,7 +386,7 @@ namespace OnlineStore.AssemblyLine
}
}
private
void
btnFeedSideWayCylinder_Click
(
object
sender
,
EventArgs
e
)
private
void
btnFeedSideWayCylinder_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(
equipBean
.
MoveCyline
CanTakeOrGive
())
if
(
equipBean
.
MoveCyline
IsUp
())
{
{
BtnMove
(
btnFeedSideWayCylinder
,
"上料横移气缸取料端"
,
"上料横移气缸放料端"
,
IO_Type
.
SL_MoveCylinder_Give
,
IO_Type
.
SL_MoveCylinder_Take
);
BtnMove
(
btnFeedSideWayCylinder
,
"上料横移气缸取料端"
,
"上料横移气缸放料端"
,
IO_Type
.
SL_MoveCylinder_Give
,
IO_Type
.
SL_MoveCylinder_Take
);
}
}
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
查看文件 @
4a70e61
...
@@ -205,7 +205,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -205,7 +205,7 @@ namespace OnlineStore.DeviceLibrary
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpDownAxisP1
,
Config
.
UpdownAxis_P1Speed
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpDownAxisP1
,
Config
.
UpdownAxis_P1Speed
);
break
;
break
;
case
LineMoveStep
.
FR_05_UpdownAxis_P1
:
case
LineMoveStep
.
FR_05_UpdownAxis_P1
:
if
(
MoveCyline
CanTakeOrGive
())
if
(
MoveCyline
IsUp
())
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_06_CylinderGive
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_06_CylinderGive
);
...
@@ -539,9 +539,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -539,9 +539,10 @@ namespace OnlineStore.DeviceLibrary
/// 判断上料横移机构是否可以横移运动
/// 判断上料横移机构是否可以横移运动
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
public
bool
MoveCyline
CanTakeOrGive
()
public
bool
MoveCyline
IsUp
()
{
{
if
(
IOValue
(
IO_Type
.
SL_MoveCylinder_Down
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
SL_MoveCylinder_Up
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
CylinderIsOk
(
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
))
// if (IOValue(IO_Type.SL_MoveCylinder_Down).Equals(IO_VALUE.LOW) && IOValue(IO_Type.SL_MoveCylinder_Up).Equals(IO_VALUE.HIGH))
{
{
return
true
;
return
true
;
}
}
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
查看文件 @
4a70e61
...
@@ -733,13 +733,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -733,13 +733,8 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_18_WaitNoLocationCheck
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_18_WaitNoLocationCheck
))
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_19_BatchAxisToP3
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_19_BatchAxisToP3
);
LastWidth
=
GetWidth
();
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":提升伺服运动到P3,盘宽【"
+
LastWidth
+
"】,横移气缸上升 "
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":提升伺服运动到P3,盘宽【"
+
LastWidth
+
"】,横移气缸上升 或到放料端"
);
if
(!
CylinderIsOk
(
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
))
if
(
CylinderIsOk
(
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
))
{
CylinderMove
(
null
,
IO_Type
.
SL_MoveCylinder_Take
,
IO_Type
.
SL_MoveCylinder_Give
);
}
else
{
{
CylinderMove
(
null
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
CylinderMove
(
null
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
}
}
...
@@ -747,20 +742,21 @@ namespace OnlineStore.DeviceLibrary
...
@@ -747,20 +742,21 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_19_BatchAxisToP3
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_19_BatchAxisToP3
))
{
{
// MoveInfo.NextMoveStep(LineMoveStep.FI_20_SaveSize);
if
(
MoveCylineCanTakeOrGive
())
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_21_CylinderGive
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料横移气缸放料SOL"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Take
,
IO_Type
.
SL_MoveCylinder_Give
);
}
else
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_20_SaveSize
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_20_SaveSize
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料横移气缸放料SOL前先上升横移气缸"
);
//if (MoveCylineCanTakeOrGive())
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
//{
}
// MoveInfo.NextMoveStep(LineMoveStep.FI_22_CylinderGive);
// InLog("料盘移栽" + MoveInfo.SLog + ":上料横移气缸放料SOL");
// CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give);
//}
//else
//{
// MoveInfo.NextMoveStep(LineMoveStep.FI_20_SaveSize);
// InLog("料盘移栽" + MoveInfo.SLog + ":上料横移气缸放料SOL前先上升横移气缸");
// CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
//}
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
LastWidth
=
GetWidth
();
LastHeight
=
GetHeight
();
LastHeight
=
GetHeight
();
if
(
LastWidth
.
Equals
(
7
)
&&
LastHeight
>
16
)
if
(
LastWidth
.
Equals
(
7
)
&&
LastHeight
>
16
)
{
{
...
@@ -774,6 +770,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -774,6 +770,8 @@ namespace OnlineStore.DeviceLibrary
int
chaz
=
Math
.
Abs
(
currP
-
Config
.
BatchAxisP3
);
int
chaz
=
Math
.
Abs
(
currP
-
Config
.
BatchAxisP3
);
if
(
chaz
<
BatchAxis
.
Config
.
CanErrorCountMax
)
if
(
chaz
<
BatchAxis
.
Config
.
CanErrorCountMax
)
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_21_BatchAxisDown
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":记录 高度【"
+
LastHeight
+
"】宽度【"
+
LastWidth
+
"】,已经没有料盘,且已达到P3:"
+
Config
.
BatchAxisP3
+
",提升轴开始回下降待机点P2"
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":记录 高度【"
+
LastHeight
+
"】宽度【"
+
LastWidth
+
"】,已经没有料盘,且已达到P3:"
+
Config
.
BatchAxisP3
+
",提升轴开始回下降待机点P2"
);
MoveInfo
.
ShelfNoTray
=
true
;
MoveInfo
.
ShelfNoTray
=
true
;
BatchAxis
.
AbsMove
(
null
,
Config
.
BatchAxisP2
,
Config
.
BatchAxis_P2Speed
);
BatchAxis
.
AbsMove
(
null
,
Config
.
BatchAxisP2
,
Config
.
BatchAxis_P2Speed
);
...
@@ -791,22 +789,41 @@ namespace OnlineStore.DeviceLibrary
...
@@ -791,22 +789,41 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_20_SaveSize
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_20_SaveSize
))
{
{
if
(
MoveCylineCanTakeOrGive
())
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_21_BatchAxisDown
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
200
));
int
maxtPosition
=
Config
.
BatchAxisP3
-
Config
.
Height_ChangeValue
*
30
;
//在上料位置基础上下降30mm
int
currPositon
=
BatchAxis
.
GetAclPosition
();
int
targetPosition
=
currPositon
-
Config
.
Height_ChangeValue
*
30
;
if
(
targetPosition
<=
Config
.
BatchAxisP2
)
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_21_CylinderGive
);
targetPosition
=
Config
.
BatchAxisP2
;
}
else
if
(
targetPosition
>
maxtPosition
)
{
targetPosition
=
maxtPosition
;
}
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":提升轴下降到料盘不溢出("
+
(
currPositon
-
Config
.
Height_ChangeValue
*
40
)
+
"):"
+
targetPosition
);
BatchAxis
.
AbsMove
(
MoveInfo
,
targetPosition
,
Config
.
BatchAxis_P2Speed
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_21_BatchAxisDown
))
{
if
(
MoveCylineIsUp
())
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_22_CylinderGive
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料横移气缸放料SOL"
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料横移气缸放料SOL"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Take
,
IO_Type
.
SL_MoveCylinder_Give
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Take
,
IO_Type
.
SL_MoveCylinder_Give
);
}
}
else
else
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_2
0_SaveSize
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_2
1_BatchAxisDown
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料横移气缸放料SOL前先上升横移气缸"
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料横移气缸放料SOL前先上升横移气缸"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
}
}
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_2
1
_CylinderGive
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_2
2
_CylinderGive
))
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_2
2
_WaitTray
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_2
3
_WaitTray
);
int
targetPositon
=
Config
.
GetUpdownP2Detial
(
LastHeight
,
LastWidth
);
int
targetPositon
=
Config
.
GetUpdownP2Detial
(
LastHeight
,
LastWidth
);
string
log
=
":移栽伺服下降到P2:"
+
targetPositon
;
string
log
=
":移栽伺服下降到P2:"
+
targetPositon
;
UpdownAxis
.
AbsMove
(
MoveInfo
,
targetPositon
,
Config
.
UpdownAxis_P2Speed
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
targetPositon
,
Config
.
UpdownAxis_P2Speed
);
...
@@ -842,7 +859,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -842,7 +859,7 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_2
2
_WaitTray
))
//TODO
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_2
3
_WaitTray
))
//TODO
{
{
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_11_CodeRember
))
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_11_CodeRember
))
{
{
...
@@ -1020,7 +1037,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1020,7 +1037,7 @@ namespace OnlineStore.DeviceLibrary
private
void
FI_12_MoveCylinder_Give
()
private
void
FI_12_MoveCylinder_Give
()
{
{
if
(
MoveCyline
CanTakeOrGive
())
if
(
MoveCyline
IsUp
())
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_12_CylinderGive
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_12_CylinderGive
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料机构检测到料盘,横移机构到放料端"
);
InLog
(
"料盘移栽"
+
MoveInfo
.
SLog
+
":上料机构检测到料盘,横移机构到放料端"
);
...
@@ -1257,7 +1274,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1257,7 +1274,7 @@ namespace OnlineStore.DeviceLibrary
if
(
trayCanUse
&&
runStatus
.
Equals
(
LineRunStatus
.
Busy
)
&&
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
InStore
))
if
(
trayCanUse
&&
runStatus
.
Equals
(
LineRunStatus
.
Busy
)
&&
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
InStore
))
{
{
//入料执行中, 且需要空托盘
//入料执行中, 且需要空托盘
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_2
2
_WaitTray
)&&
MoveInfo
.
IsInWait
.
Equals
(
false
))
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_2
3
_WaitTray
)&&
MoveInfo
.
IsInWait
.
Equals
(
false
))
//if (MoveInfo.MoveStep >= LineMoveStep.FI_11_CylinderUp && MoveInfo.MoveStep <= LineMoveStep.FI_20_WaitTray)
//if (MoveInfo.MoveStep >= LineMoveStep.FI_11_CylinderUp && MoveInfo.MoveStep <= LineMoveStep.FI_20_WaitTray)
{
{
if
(
NeedSaveParam
)
if
(
NeedSaveParam
)
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
查看文件 @
4a70e61
...
@@ -357,7 +357,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -357,7 +357,7 @@ namespace OnlineStore.DeviceLibrary
//判断伺服检测信号是否亮
//判断伺服检测信号是否亮
if
(
IOValue
(
IO_Type
.
SL_AxisLocationCheck
).
Equals
(
IO_VALUE
.
LOW
)
||
BatchAxis
.
IsInPosition
(
Config
.
BatchAxisP2
))
if
(
IOValue
(
IO_Type
.
SL_AxisLocationCheck
).
Equals
(
IO_VALUE
.
LOW
)
||
BatchAxis
.
IsInPosition
(
Config
.
BatchAxisP2
))
{
{
if
(
MoveCyline
CanTakeOrGive
())
if
(
MoveCyline
IsUp
())
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_212_CylinderTake
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_212_CylinderTake
);
OutLog
(
"紧急出料"
+
MoveInfo
.
SLog
+
":上料横移机构取料端"
);
OutLog
(
"紧急出料"
+
MoveInfo
.
SLog
+
":上料横移机构取料端"
);
...
@@ -428,7 +428,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -428,7 +428,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_217_UpdownAxisToP1
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_217_UpdownAxisToP1
))
{
{
if
(
MoveCyline
CanTakeOrGive
())
if
(
MoveCyline
IsUp
())
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_218_CylinderGive
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_218_CylinderGive
);
OutLog
(
"紧急出料"
+
MoveInfo
.
SLog
+
":上料横移机构到放料端"
);
OutLog
(
"紧急出料"
+
MoveInfo
.
SLog
+
":上料横移机构到放料端"
);
...
@@ -475,7 +475,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -475,7 +475,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_221_UpdownAxisToP1
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_221_UpdownAxisToP1
))
{
{
if
(
MoveCyline
CanTakeOrGive
())
if
(
MoveCyline
IsUp
())
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_222_CylinderTake
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_222_CylinderTake
);
OutLog
(
"紧急出料"
+
MoveInfo
.
SLog
+
":上料横移机构回到取料端"
);
OutLog
(
"紧急出料"
+
MoveInfo
.
SLog
+
":上料横移机构回到取料端"
);
...
...
source/DeviceLibrary/model/StoreStep.cs
查看文件 @
4a70e61
...
@@ -660,15 +660,19 @@ namespace OnlineStore.DeviceLibrary
...
@@ -660,15 +660,19 @@ namespace OnlineStore.DeviceLibrary
/// 料盘移栽:记录高度尺寸
/// 料盘移栽:记录高度尺寸
/// </summary>
/// </summary>
FI_20_SaveSize
,
FI_20_SaveSize
,
/// <summary>
/// 提升轴下降到料盘不溢出的位置
/// </summary>
FI_21_BatchAxisDown
,
/// <summary>
/// <summary>
/// 料盘移栽: 上料横移气缸放料SOL
/// 料盘移栽: 上料横移气缸放料SOL
/// </summary>
/// </summary>
FI_2
1
_CylinderGive
,
FI_2
2
_CylinderGive
,
/// <summary>
/// <summary>
/// 料盘移栽:等待空托盘到达,移栽伺服下降到P2,并预扫码
/// 料盘移栽:等待空托盘到达,移栽伺服下降到P2,并预扫码
/// </summary>
/// </summary>
FI_2
2
_WaitTray
,
FI_2
3
_WaitTray
,
///// <summary>
///// <summary>
///// 料盘移栽:移栽伺服下降到P2
///// 料盘移栽:移栽伺服下降到P2
///// </summary>
///// </summary>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论