Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 278b446e
由
LN
编写于
2020-04-17 09:15:14 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
入料模块修改:定位机构不在后退端时不能处理料架。
1 个父辈
63511bf5
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
41 行增加
和
20 行删除
source/AssemblyLineClient/Program.cs
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
source/AssemblyLineClient/Program.cs
查看文件 @
278b446
...
...
@@ -120,11 +120,13 @@ namespace OnlineStore.AssemblyLine
LogUnhandledException
(
"Application_ThreadException"
,
e
.
ToString
()
+
""
+
e
.
Exception
.
ToString
()
+
" "
);
}
static
void
LogUnhandledException
(
string
type
,
string
exceptionobj
)
static
void
LogUnhandledException
(
string
type
,
string
exceptionobj
)
{
//这里可以进一步地写日志
LOGGER
.
Error
(
"【"
+
type
+
"】"
+
exceptionobj
);
MessageBox
.
Show
(
exceptionobj
,
type
);
LogUtil
.
error
(
"【"
+
type
+
"】"
+
exceptionobj
);
}
}
}
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
查看文件 @
278b446
...
...
@@ -83,10 +83,14 @@ namespace OnlineStore.DeviceLibrary
}
public
override
bool
Reset
()
{
StopMove
();
{
runStatus
=
LineRunStatus
.
Reset
;
StopMove
();
MoveInfo
.
NewMove
(
LineMoveType
.
Reset
);
SecondMoveInfo
.
EndMove
();
if
(
RunAxis
(
true
,
BatchAxis
)
&&
RunAxis
(
true
,
UpdownAxis
))
{
alarmType
=
LineAlarmType
.
None
;
LogInfo
(
"开始重置: "
);
runStatus
=
LineRunStatus
.
Reset
;
...
...
@@ -289,8 +293,8 @@ namespace OnlineStore.DeviceLibrary
internal
override
void
StopMove
()
{
MoveInfo
.
EndMove
();
SecondMoveInfo
.
EndMove
();
//
MoveInfo.EndMove();
//
SecondMoveInfo.EndMove();
BatchAxisStopCheck
();
BatchAxis
.
SuddenStop
();
UpdownAxis
.
SuddenStop
();
...
...
@@ -325,7 +329,8 @@ namespace OnlineStore.DeviceLibrary
mainTimer
.
Enabled
=
false
;
}
StopMove
();
MoveInfo
.
EndMove
();
SecondMoveInfo
.
EndMove
();
}
...
...
@@ -613,7 +618,7 @@ namespace OnlineStore.DeviceLibrary
lastOkTime
=
DateTime
.
Now
;
if
(
IOValue
(
TargetIoType
).
Equals
(
TargetIoValue
))
{
LogUtil
.
debug
(
Name
+
"上料轴,检测到 "
+
TargetIoType
+
"="
+
TargetIoValue
+
",可以
停止运动"
);
LogUtil
.
info
(
Name
+
"上料轴,检测到 "
+
TargetIoType
+
"="
+
TargetIoValue
+
",
停止运动"
);
BatchAxis
.
SuddenStop
();
BatchAxisStopCheck
();
}
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
查看文件 @
278b446
...
...
@@ -523,8 +523,12 @@ namespace OnlineStore.DeviceLibrary
{
//若定位工位,阻挡工位,有 料架,需要进行处理
if
(
IOValue
(
IO_Type
.
SL_Location_Check
).
Equals
(
IO_VALUE
.
HIGH
)
||
IOValue
(
IO_Type
.
SL_Stop_Check
).
Equals
(
IO_VALUE
.
HIGH
)
||
IOValue
(
IO_Type
.
SL_Entry_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
StartInStoreMove
(
null
);
{
//升降盘需要在后退端
if
(
IsTrayLCylinderAfter
())
{
StartInStoreMove
(
null
);
}
}
else
if
(
IOValue
(
IO_Type
.
SL_Entry_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
...
...
@@ -553,9 +557,17 @@ namespace OnlineStore.DeviceLibrary
}
else
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_01_TrayLocation_After
);
InLog
(
"检测到料架, "
+
MoveInfo
.
MoveStep
+
" :升降盘定位气缸下降"
);
TrayLCylinderAfter
(
MoveInfo
);
if
(
IsTrayLCylinderAfter
())
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_01_TrayLocation_After
);
InLog
(
"检测到料架, "
+
MoveInfo
.
MoveStep
+
" :升降盘定位气缸下降"
);
TrayLCylinderAfter
(
MoveInfo
);
}
else
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_00_BatchAxisToP2
);
OutLog
(
"检测到料架,升降盘不在后退端 "
+
MoveInfo
.
SLog
+
" :提升伺服先回到P2"
);
BatchAxis
.
AbsMove
(
MoveInfo
,
Config
.
BatchAxisP2
,
Config
.
BatchAxis_P2Speed
);
}
}
return
true
;
}
...
...
@@ -621,11 +633,11 @@ namespace OnlineStore.DeviceLibrary
return
;
}
#
region
入料:料架进入并开始检测托盘
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
Wait
))
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_00_BatchAxisToP2
))
{
//
MoveInfo.NextMoveStep(LineMoveStep.FI_01_TrayLocation_After);
//
InLog("料架入库" + MoveInfo.SLog + " :升降盘定位气缸下降");
//
TrayLCylinderAfter(MoveInfo);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_01_TrayLocation_After
);
InLog
(
"料架入库"
+
MoveInfo
.
SLog
+
" :升降盘定位气缸下降"
);
TrayLCylinderAfter
(
MoveInfo
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_01_TrayLocation_After
))
{
...
...
@@ -1189,26 +1201,28 @@ namespace OnlineStore.DeviceLibrary
private
void
BatchAxisToP3
(
bool
isFirstMove
=
true
)
{
int
targetP3
=
Config
.
BatchAxisP3
;
int
targetSpeed
=
Config
.
BatchAxis_P3Speed
;
if
(!
isFirstMove
)
{
int
currPosition
=
BatchAxis
.
GetAclPosition
();
if
(
currPosition
!=
-
1
)
{
targetP3
=
currPosition
+
Config
.
Height_ChangeValue
*
10
0
;
targetP3
=
currPosition
+
Config
.
Height_ChangeValue
*
8
0
;
if
(
targetP3
>
Config
.
BatchAxisP3
)
{
targetP3
=
Config
.
BatchAxisP3
;
}
LogUtil
.
info
(
Name
+
" BatchAxisToP3 目标P3: "
+
targetP3
+
"("
+
currPosition
+
")"
);
}
targetSpeed
=
Config
.
BatchAxis_P3Speed
/
2
;
}
MoveInfo
.
TimeOutSeconds
=
200
;
MoveInfo
.
CanWhileCount
=
0
;
// 需要增加定时器,获取验证信号并停止伺服
StartMovePosition
=
BatchAxis
.
GetAclPosition
();
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxis
(
Config
.
Batch_Axis
,
targetP3
,
Config
.
BatchAxis_P3
Speed
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxis
(
Config
.
Batch_Axis
,
targetP3
,
target
Speed
));
Config
.
Batch_Axis
.
TargetPosition
=
targetP3
;
BatchAxis
.
AbsMove
(
null
,
targetP3
,
Config
.
BatchAxis_P3
Speed
);
BatchAxis
.
AbsMove
(
null
,
targetP3
,
target
Speed
);
//开始检测信号
BatchAxisStartCheck
();
}
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
查看文件 @
278b446
...
...
@@ -175,7 +175,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NewMove
(
LineMoveType
.
OutStore
);
MoveInfo
.
MoveParam
=
new
InOutParam
();
taskData
=
null
;
if
(
IOValue
(
IO_Type
.
SL_Location_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
SL_Location_Check
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IsTrayLCylinderAfter
()
)
{
FO_04_WaitTime
();
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论