Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 3c91b77f
由
LN
编写于
2019-12-31 17:53:23 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
提升轴待机点验证修改
1 个父辈
7dc49e34
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
77 行增加
和
14 行删除
source/AssemblyLineClient/FrmMoveEquip.cs
source/AssemblyLineClient/FrmProvidingEquip.cs
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
source/DeviceLibrary/assemblyLine/MoveEquip.cs
source/DeviceLibrary/assemblyLine/ProvidingEquip.cs
source/LoadCVSLibrary/storeConfig/ConfigItemBase.cs
source/AssemblyLineClient/FrmMoveEquip.cs
查看文件 @
3c91b77
...
@@ -367,8 +367,16 @@ namespace OnlineStore.AssemblyLine
...
@@ -367,8 +367,16 @@ namespace OnlineStore.AssemblyLine
private
void
btnBeforeAfterBefore_Click
(
object
sender
,
EventArgs
e
)
private
void
btnBeforeAfterBefore_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(
equipBean
.
CanBeforeAfter
())
{
BtnMove
(
btnBeforeAfterBefore
,
"横移前进"
,
"横移后退"
,
IO_Type
.
BeforeAfterCylinder_After
,
IO_Type
.
BeforeAfterCylinder_Before
);
BtnMove
(
btnBeforeAfterBefore
,
"横移前进"
,
"横移后退"
,
IO_Type
.
BeforeAfterCylinder_After
,
IO_Type
.
BeforeAfterCylinder_Before
);
}
}
else
{
MessageBox
.
Show
(
"升降气缸不在上升端 或 升降轴不在待机点P1"
,
"错误"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Error
);
}
}
private
void
btnUpDownUp_Click
(
object
sender
,
EventArgs
e
)
private
void
btnUpDownUp_Click
(
object
sender
,
EventArgs
e
)
{
{
BtnMove
(
btnUpDownUp
,
"升降上升"
,
"升降下降"
,
IO_Type
.
UpDownCylinder_Down
,
IO_Type
.
UpDownCylinder_Up
);
BtnMove
(
btnUpDownUp
,
"升降上升"
,
"升降下降"
,
IO_Type
.
UpDownCylinder_Down
,
IO_Type
.
UpDownCylinder_Up
);
...
...
source/AssemblyLineClient/FrmProvidingEquip.cs
查看文件 @
3c91b77
...
@@ -336,8 +336,16 @@ namespace OnlineStore.AssemblyLine
...
@@ -336,8 +336,16 @@ namespace OnlineStore.AssemblyLine
private
void
btnBeforeAfterBefore_Click
(
object
sender
,
EventArgs
e
)
private
void
btnBeforeAfterBefore_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(
equipBean
.
CanBeforeAfter
())
{
BtnMove
(
btnBeforeAfterBefore
,
"横移前进"
,
"横移后退"
,
IO_Type
.
BeforeAfterCylinder_After
,
IO_Type
.
BeforeAfterCylinder_Before
);
BtnMove
(
btnBeforeAfterBefore
,
"横移前进"
,
"横移后退"
,
IO_Type
.
BeforeAfterCylinder_After
,
IO_Type
.
BeforeAfterCylinder_Before
);
}
}
else
{
MessageBox
.
Show
(
"升降气缸不在上升端 或 升降轴不在待机点P1"
,
"错误"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Error
);
}
}
private
void
btnUpDownUp_Click
(
object
sender
,
EventArgs
e
)
private
void
btnUpDownUp_Click
(
object
sender
,
EventArgs
e
)
{
{
BtnMove
(
btnUpDownUp
,
"升降上升"
,
"升降下降"
,
IO_Type
.
UpDownCylinder_Down
,
IO_Type
.
UpDownCylinder_Up
);
BtnMove
(
btnUpDownUp
,
"升降上升"
,
"升降下降"
,
IO_Type
.
UpDownCylinder_Down
,
IO_Type
.
UpDownCylinder_Up
);
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
查看文件 @
3c91b77
...
@@ -436,10 +436,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -436,10 +436,9 @@ namespace OnlineStore.DeviceLibrary
}
}
else
else
{
{
WarnMsg
=
Name
+
"TrayLCylinderAfter:提升轴当前不在
待机点
P2,不后退定位气缸"
;
WarnMsg
=
Name
+
"TrayLCylinderAfter:提升轴当前不在
下降位置
P2,不后退定位气缸"
;
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
LogUtil
.
error
(
Name
+
"TrayLCylinderAfter:提升轴当前不在待机点P2,不后退定位气缸"
);
LogUtil
.
error
(
Name
+
"TrayLCylinderAfter:提升轴当前不在下降位置P2,不后退定位气缸"
);
}
}
if
(
moveinfo
!=
null
)
if
(
moveinfo
!=
null
)
{
{
...
@@ -454,11 +453,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -454,11 +453,11 @@ namespace OnlineStore.DeviceLibrary
{
{
int
currP
=
BatchAxis
.
GetAclPosition
();
int
currP
=
BatchAxis
.
GetAclPosition
();
int
chaz
=
Config
.
BatchAxisP2
-
currP
;
int
chaz
=
Config
.
BatchAxisP2
-
currP
;
if
((
Math
.
Abs
(
chaz
)
<
Config
.
Height_ChangeValue
*
2
))
if
((
Math
.
Abs
(
chaz
)
<
Math
.
Abs
(
Config
.
Height_ChangeValue
*
2
)
))
{
{
return
true
;
return
true
;
}
}
return
false
;
return
false
;
}
}
/// <summary>
/// <summary>
/// 升降盘是否在后退端
/// 升降盘是否在后退端
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
查看文件 @
3c91b77
...
@@ -427,8 +427,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -427,8 +427,8 @@ namespace OnlineStore.DeviceLibrary
else
else
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_01_TrayLocation_After
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_01_TrayLocation_After
);
InLog
(
"检测到料架, "
+
MoveInfo
.
MoveStep
+
" :升降盘定位气缸下降"
);
TrayLCylinderAfter
(
MoveInfo
);
TrayLCylinderAfter
(
MoveInfo
);
InLog
(
"检测到料架, "
+
MoveInfo
.
MoveStep
+
" :升降盘定位气缸下降"
);
}
}
return
true
;
return
true
;
}
}
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
查看文件 @
3c91b77
...
@@ -100,8 +100,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -100,8 +100,8 @@ namespace OnlineStore.DeviceLibrary
if
(
IsTrayLCylinderAfter
())
if
(
IsTrayLCylinderAfter
())
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_01_TrayLocation_After
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_01_TrayLocation_After
);
TrayLCylinderAfter
(
MoveInfo
);
OutLog
(
"准备出库料架, "
+
MoveInfo
.
SLog
+
" :升降盘定位气缸后退"
);
OutLog
(
"准备出库料架, "
+
MoveInfo
.
SLog
+
" :升降盘定位气缸后退"
);
TrayLCylinderAfter
(
MoveInfo
);
}
}
else
else
{
{
...
...
source/DeviceLibrary/assemblyLine/MoveEquip.cs
查看文件 @
3c91b77
...
@@ -23,7 +23,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -23,7 +23,7 @@ namespace OnlineStore.DeviceLibrary
this
.
Config
=
config
;
this
.
Config
=
config
;
baseConfig
=
config
;
baseConfig
=
config
;
IsDebug
=
config
.
IsDebug
.
Equals
(
1
);
IsDebug
=
config
.
IsDebug
.
Equals
(
1
);
Name
=
(
" "
+
"_进仓_"
+
DeviceID
.
ToString
().
PadLeft
(
2
,
'0'
)
+
" "
).
ToUpper
();
Name
=
(
" "
+
"_进仓_"
+
DeviceID
.
ToString
().
PadLeft
(
2
,
'0'
)
+
" "
).
ToUpper
();
Init
();
Init
();
...
@@ -44,10 +44,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -44,10 +44,10 @@ namespace OnlineStore.DeviceLibrary
Config
.
UpDown_Axis
.
ServerOnDO
=
IO_Type
.
UpDownAxis_ServoOn
;
Config
.
UpDown_Axis
.
ServerOnDO
=
IO_Type
.
UpDownAxis_ServoOn
;
Config
.
UpDown_Axis
.
BreakOnDO
=
IO_Type
.
UpDownAxis_BreakOn
;
Config
.
UpDown_Axis
.
BreakOnDO
=
IO_Type
.
UpDownAxis_BreakOn
;
}
}
UpdownAxis
=
new
AxisBean
(
config
.
UpDown_Axis
,
Name
);
UpdownAxis
=
new
AxisBean
(
config
.
UpDown_Axis
,
Name
);
}
}
public
override
bool
StartRun
(
bool
isDebug
=
false
)
public
override
bool
StartRun
(
bool
isDebug
=
false
)
{
{
if
(
CanStartRun
().
Equals
(
false
))
if
(
CanStartRun
().
Equals
(
false
))
{
{
...
@@ -66,7 +66,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -66,7 +66,7 @@ namespace OnlineStore.DeviceLibrary
LogInfo
(
"开始原点返回: 上下气缸回原点,阻挡1气缸上升 "
);
LogInfo
(
"开始原点返回: 上下气缸回原点,阻挡1气缸上升 "
);
MoveInfo
.
NewMove
(
LineMoveType
.
ReturnHome
);
MoveInfo
.
NewMove
(
LineMoveType
.
ReturnHome
);
StartReset
();
StartReset
();
if
(
isDebug
)
if
(
isDebug
)
{
{
mainTimer
.
Enabled
=
true
;
mainTimer
.
Enabled
=
true
;
}
}
...
@@ -131,7 +131,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -131,7 +131,7 @@ namespace OnlineStore.DeviceLibrary
{
{
case
LineMoveStep
.
MH_UpDownHomeMove
:
case
LineMoveStep
.
MH_UpDownHomeMove
:
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MH_UpDownCylinder_Up
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MH_UpDownCylinder_Up
);
DebugInfo
(
MoveInfo
.
MoveType
+
" : (上下轴原点返回完成,上下轴走到待机点 )开始"
);
DebugInfo
(
MoveInfo
.
MoveType
+
" : (上下轴原点返回完成,上下轴走到待机点 )开始"
);
UpdownUpMove
();
UpdownUpMove
();
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
break
;
break
;
...
@@ -264,6 +264,29 @@ namespace OnlineStore.DeviceLibrary
...
@@ -264,6 +264,29 @@ namespace OnlineStore.DeviceLibrary
waitOutStoreList
.
Enqueue
(
param
);
waitOutStoreList
.
Enqueue
(
param
);
}
}
}
}
/// <summary>
/// 判断上料横移机构是否可以横移运动
/// </summary>
/// <returns></returns>
public
bool
CanBeforeAfter
()
{
if
(
UseAxis
)
{
int
currPosition
=
UpdownAxis
.
GetAclPosition
()
-
Config
.
UpDownAxisP1
;
if
(
Math
.
Abs
(
currPosition
)
<
Math
.
Abs
(
Config
.
UpDown_Axis
.
CanErrorCountMax
*
10
))
{
return
true
;
}
}
else
{
if
(
IOValue
(
IO_Type
.
UpDownCylinder_Down
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
UpDownCylinder_Up
).
Equals
(
IO_VALUE
.
HIGH
))
{
return
true
;
}
}
return
false
;
}
#
region
上下气缸伺服运动
#
region
上下气缸伺服运动
...
@@ -320,3 +343,4 @@ namespace OnlineStore.DeviceLibrary
...
@@ -320,3 +343,4 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
source/DeviceLibrary/assemblyLine/ProvidingEquip.cs
查看文件 @
3c91b77
...
@@ -266,5 +266,29 @@ namespace OnlineStore.DeviceLibrary
...
@@ -266,5 +266,29 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
#
endregion
#
endregion
/// <summary>
/// 判断上料横移机构是否可以横移运动
/// </summary>
/// <returns></returns>
public
bool
CanBeforeAfter
()
{
if
(
UseAxis
)
{
int
currPosition
=
UpdownAxis
.
GetAclPosition
()
-
Config
.
UpDownAxisP1
;
if
(
Math
.
Abs
(
currPosition
)
<
Math
.
Abs
(
Config
.
UpDown_Axis
.
CanErrorCountMax
*
10
))
{
return
true
;
}
}
else
{
if
(
IOValue
(
IO_Type
.
UpDownCylinder_Down
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
UpDownCylinder_Up
).
Equals
(
IO_VALUE
.
HIGH
))
{
return
true
;
}
}
return
false
;
}
}
}
}
}
source/LoadCVSLibrary/storeConfig/ConfigItemBase.cs
查看文件 @
3c91b77
...
@@ -106,7 +106,7 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -106,7 +106,7 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary>
/// <summary>
/// 可以误差的脉冲范围的最大值
/// 可以误差的脉冲范围的最大值
/// </summary>
/// </summary>
public
int
CanErrorCountMax
=
5
00
;
public
int
CanErrorCountMax
=
10
00
;
/// <summary>
/// <summary>
/// 出入库目标值(只有出入库过程中才会有效)
/// 出入库目标值(只有出入库过程中才会有效)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论