Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 3c91b77f
由
LN
编写于
2019-12-31 17:53:23 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
提升轴待机点验证修改
1 个父辈
7dc49e34
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
103 行增加
和
40 行删除
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,7 +367,15 @@ namespace OnlineStore.AssemblyLine
private
void
btnBeforeAfterBefore_Click
(
object
sender
,
EventArgs
e
)
{
BtnMove
(
btnBeforeAfterBefore
,
"横移前进"
,
"横移后退"
,
IO_Type
.
BeforeAfterCylinder_After
,
IO_Type
.
BeforeAfterCylinder_Before
);
if
(
equipBean
.
CanBeforeAfter
())
{
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
)
{
...
...
source/AssemblyLineClient/FrmProvidingEquip.cs
查看文件 @
3c91b77
...
...
@@ -336,7 +336,15 @@ namespace OnlineStore.AssemblyLine
private
void
btnBeforeAfterBefore_Click
(
object
sender
,
EventArgs
e
)
{
BtnMove
(
btnBeforeAfterBefore
,
"横移前进"
,
"横移后退"
,
IO_Type
.
BeforeAfterCylinder_After
,
IO_Type
.
BeforeAfterCylinder_Before
);
if
(
equipBean
.
CanBeforeAfter
())
{
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
)
{
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
查看文件 @
3c91b77
...
...
@@ -428,7 +428,7 @@ namespace OnlineStore.DeviceLibrary
/// 升降盘定位气缸后退
/// </summary>
public
void
TrayLCylinderAfter
(
LineMoveInfo
moveinfo
=
null
)
{
{
if
(
TrayLCylinderCanAfter
())
{
IOMove
(
IO_Type
.
SL_TrayLocation_After
,
IO_VALUE
.
HIGH
);
...
...
@@ -436,10 +436,9 @@ namespace OnlineStore.DeviceLibrary
}
else
{
WarnMsg
=
Name
+
"TrayLCylinderAfter:提升轴当前不在
待机点
P2,不后退定位气缸"
;
WarnMsg
=
Name
+
"TrayLCylinderAfter:提升轴当前不在
下降位置
P2,不后退定位气缸"
;
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
LogUtil
.
error
(
Name
+
"TrayLCylinderAfter:提升轴当前不在待机点P2,不后退定位气缸"
);
LogUtil
.
error
(
Name
+
"TrayLCylinderAfter:提升轴当前不在下降位置P2,不后退定位气缸"
);
}
if
(
moveinfo
!=
null
)
{
...
...
@@ -454,11 +453,11 @@ namespace OnlineStore.DeviceLibrary
{
int
currP
=
BatchAxis
.
GetAclPosition
();
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>
/// 升降盘是否在后退端
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
查看文件 @
3c91b77
...
...
@@ -427,8 +427,8 @@ namespace OnlineStore.DeviceLibrary
else
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_01_TrayLocation_After
);
InLog
(
"检测到料架, "
+
MoveInfo
.
MoveStep
+
" :升降盘定位气缸下降"
);
TrayLCylinderAfter
(
MoveInfo
);
InLog
(
"检测到料架, "
+
MoveInfo
.
MoveStep
+
" :升降盘定位气缸下降"
);
}
return
true
;
}
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
查看文件 @
3c91b77
...
...
@@ -100,8 +100,8 @@ namespace OnlineStore.DeviceLibrary
if
(
IsTrayLCylinderAfter
())
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_01_TrayLocation_After
);
TrayLCylinderAfter
(
MoveInfo
);
OutLog
(
"准备出库料架, "
+
MoveInfo
.
SLog
+
" :升降盘定位气缸后退"
);
TrayLCylinderAfter
(
MoveInfo
);
}
else
{
...
...
source/DeviceLibrary/assemblyLine/MoveEquip.cs
查看文件 @
3c91b77
...
...
@@ -14,17 +14,17 @@ namespace OnlineStore.DeviceLibrary
/// 流水线自动料仓-进仓装置类
/// </summary>
public
partial
class
MoveEquip
:
EquipBase
{
{
public
MoveEquip_Config
Config
;
public
MoveEquip
(
string
cid
,
MoveEquip_Config
config
)
{
this
.
DeviceID
=
config
.
Id
;
this
.
Config
=
config
;
baseConfig
=
config
;
IsDebug
=
config
.
IsDebug
.
Equals
(
1
);
Name
=
(
" "
+
"_进仓_"
+
DeviceID
.
ToString
().
PadLeft
(
2
,
'0'
)
+
" "
).
ToUpper
();
Name
=
(
" "
+
"_进仓_"
+
DeviceID
.
ToString
().
PadLeft
(
2
,
'0'
)
+
" "
).
ToUpper
();
Init
();
...
...
@@ -44,10 +44,10 @@ namespace OnlineStore.DeviceLibrary
Config
.
UpDown_Axis
.
ServerOnDO
=
IO_Type
.
UpDownAxis_ServoOn
;
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
))
{
...
...
@@ -61,31 +61,31 @@ namespace OnlineStore.DeviceLibrary
mainTimer
.
Enabled
=
false
;
MoveInfo
.
EndMove
();
SecondMoveInfo
.
EndMove
();
runStatus
=
LineRunStatus
.
HomeMoving
;
SecondMoveInfo
.
EndMove
();
runStatus
=
LineRunStatus
.
HomeMoving
;
LogInfo
(
"开始原点返回: 上下气缸回原点,阻挡1气缸上升 "
);
MoveInfo
.
NewMove
(
LineMoveType
.
ReturnHome
);
StartReset
();
if
(
isDebug
)
if
(
isDebug
)
{
mainTimer
.
Enabled
=
true
;
}
return
true
;
}
public
override
bool
Reset
()
{
{
StopMove
();
if
(!
RunAxis
(
true
,
UpdownAxis
))
{
return
false
;
}
}
LogInfo
(
"开始重置: 上下气缸回原点,阻挡1气缸上升 "
);
runStatus
=
LineRunStatus
.
Reset
;
SecondMoveInfo
.
EndMove
();
MoveInfo
.
NewMove
(
LineMoveType
.
Reset
);
MoveInfo
.
NewMove
(
LineMoveType
.
Reset
);
StartReset
();
return
true
;
}
...
...
@@ -103,13 +103,13 @@ namespace OnlineStore.DeviceLibrary
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
HIGH
);
}
else
{
{
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
LOW
);
}
isInPro
=
false
;
}
protected
override
void
ResetProcess
()
{
if
(
MoveInfo
.
IsInWait
)
...
...
@@ -131,7 +131,7 @@ namespace OnlineStore.DeviceLibrary
{
case
LineMoveStep
.
MH_UpDownHomeMove
:
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MH_UpDownCylinder_Up
);
DebugInfo
(
MoveInfo
.
MoveType
+
" : (上下轴原点返回完成,上下轴走到待机点 )开始"
);
DebugInfo
(
MoveInfo
.
MoveType
+
" : (上下轴原点返回完成,上下轴走到待机点 )开始"
);
UpdownUpMove
();
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
break
;
...
...
@@ -155,15 +155,15 @@ namespace OnlineStore.DeviceLibrary
lineStatus
=
LineStatus
.
Debugging
;
}
else
{
{
lineStatus
=
LineStatus
.
StoreOnline
;
}
break
;
break
;
default
:
break
;
}
}
}
/// <summary>
/// 停止运动
/// </summary>
...
...
@@ -181,16 +181,16 @@ namespace OnlineStore.DeviceLibrary
SecondMoveInfo
.
EndMove
();
LogInfo
(
"停止运动:上下气缸上升端,阻挡气缸上升 ,开始 "
);
UpdownUpMove
();
CylinderMove
(
MoveInfo
,
IO_Type
.
TopCylinder_UP
,
IO_Type
.
TopCylinder_Down
);
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
LOW
);
}
public
override
void
StopRun
()
{
{
if
(
mainTimer
!=
null
)
{
mainTimer
.
Enabled
=
false
;
...
...
@@ -252,7 +252,7 @@ namespace OnlineStore.DeviceLibrary
}
}
public
void
AddWaitOutInfo
(
InOutParam
param
)
{
{
//判断是否已经加入,不重复加
List
<
InOutParam
>
paramList
=
(
from
m
in
waitOutStoreList
where
m
.
PosId
.
Equals
(
param
.
PosId
)
select
m
).
ToList
<
InOutParam
>();
if
(
paramList
.
Count
>
0
)
...
...
@@ -262,7 +262,30 @@ namespace OnlineStore.DeviceLibrary
else
{
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
上下气缸伺服运动
...
...
@@ -271,7 +294,7 @@ namespace OnlineStore.DeviceLibrary
{
if
(
UseAxis
)
{
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpDownAxisP1
,
Config
.
UpdownAxis_P1Speed
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpDownAxisP1
,
Config
.
UpdownAxis_P1Speed
);
}
else
{
...
...
@@ -320,3 +343,4 @@ namespace OnlineStore.DeviceLibrary
}
}
source/DeviceLibrary/assemblyLine/ProvidingEquip.cs
查看文件 @
3c91b77
...
...
@@ -266,5 +266,29 @@ namespace OnlineStore.DeviceLibrary
}
}
#
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
/// <summary>
/// 可以误差的脉冲范围的最大值
/// </summary>
public
int
CanErrorCountMax
=
5
00
;
public
int
CanErrorCountMax
=
10
00
;
/// <summary>
/// 出入库目标值(只有出入库过程中才会有效)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论