Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO1007_XLC_Store
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit c9ac5b9a
由
刘韬
编写于
2022-01-16 13:00:15 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
优化进出库流程
1 个父辈
694e2c7f
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
56 行增加
和
27 行删除
DeviceLibrary/theMachine/BoxTransport.cs
DeviceLibrary/theMachine/LabelParam.cs
DeviceLibrary/theMachine/MainMachine _Common.cs
DeviceLibrary/theMachine/MainMachine _Out.cs
DeviceLibrary/theMachine/MainMachine _Store.cs
DeviceLibrary/theMachine/MainMachine.cs
DeviceLibrary/theMachine/BoxTransport.cs
查看文件 @
c9ac5b9
...
@@ -26,7 +26,7 @@ namespace DeviceLibrary
...
@@ -26,7 +26,7 @@ namespace DeviceLibrary
public
event
Action
<
string
,
StoreMoveType
,
bool
>
InOutEndProcessEvent
;
public
event
Action
<
string
,
StoreMoveType
,
bool
>
InOutEndProcessEvent
;
public
bool
IsComplateOrFree
{
get
=>
MoveInfo
.
MoveStep
==
MoveStep
.
Wait
;
}
public
bool
IsComplateOrFree
{
get
=>
MoveInfo
.
MoveStep
==
MoveStep
.
Wait
;
}
public
bool
IsTakedBox
{
get
=>
MoveInfo
.
MoveStep
>=
MoveStep
.
StoreTS10
;
}
public
bool
IsTakedBox
{
get
=>
MoveInfo
.
MoveStep
>=
MoveStep
.
StoreTS10
;
}
public
bool
IsPutOnOut
{
get
=>
To
.
posid
==
BoxStorePosition
.
outdoor
&&
MoveInfo
.
MoveStep
<
MoveStep
.
StoreTS10
&&
MoveInfo
.
MoveStep
>=
MoveStep
.
StoreTS16
;
}
public
bool
IsPutOnOut
{
get
=>
To
.
posid
==
BoxStorePosition
.
outdoor
&&
MoveInfo
.
MoveStep
>=
MoveStep
.
StoreTS16
;
}
public
BoxTransport
(
Robot_Config
_Config
,
MainMachine
_mainMachine
)
public
BoxTransport
(
Robot_Config
_Config
,
MainMachine
_mainMachine
)
{
{
Config
=
_Config
;
Config
=
_Config
;
...
@@ -72,15 +72,29 @@ namespace DeviceLibrary
...
@@ -72,15 +72,29 @@ namespace DeviceLibrary
//thread = new Thread(new ThreadStart(Run));
//thread = new Thread(new ThreadStart(Run));
//thread.Start();
//thread.Start();
}
}
bool
isSameSide
(
int
from
)
bool
isNotSameSide
(
int
x_to
,
int
y_to
)
{
{
var
p
=
XAxis
.
GetAclPosition
();
var
p
=
XAxis
.
GetAclPosition
();
var
rtx
=
p
+
Config
.
XAxis
.
CanErrorCountMax
;
var
rtx
=
p
+
Config
.
XAxis
.
CanErrorCountMax
;
var
ltx
=
p
-
Config
.
XAxis
.
CanErrorCountMax
;
var
ltx
=
p
-
Config
.
XAxis
.
CanErrorCountMax
;
if
(
rtx
>=
Config
.
Xaxis_P1
&&
rtx
>=
from
)
return
true
;
var
py
=
YAxis
.
GetAclPosition
();
if
(
ltx
<=
Config
.
Xaxis_P1
&&
ltx
<=
from
)
var
uty
=
py
+
Config
.
YAxis
.
CanErrorCountMax
;
return
true
;
var
dty
=
py
-
Config
.
YAxis
.
CanErrorCountMax
;
//从外侧到内测,判断目标位置是否小于p1
if
(
rtx
>=
Config
.
Xaxis_P1
&&
x_to
<
Config
.
Xaxis_P1
)
{
if
(
y_to
<
Config
.
Yaxis_P1
)
return
true
;
}
//从内测到外侧判断当前位置是否小于p1
if
(
ltx
<=
Config
.
Xaxis_P1
&&
x_to
>
Config
.
Xaxis_P1
)
{
if
(
uty
<
Config
.
Yaxis_P1
)
return
true
;
}
return
false
;
return
false
;
}
}
...
@@ -118,7 +132,7 @@ namespace DeviceLibrary
...
@@ -118,7 +132,7 @@ namespace DeviceLibrary
break
;
break
;
case
MoveStep
.
StoreTS03
:
case
MoveStep
.
StoreTS03
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS04
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS04
);
if
(
is
SameSide
(
From
.
Xaxis_P2
))
if
(
is
NotSameSide
(
From
.
Xaxis_P2
,
From
.
Yaxis_PL
))
{
{
YAxis
.
AbsMove
(
MoveInfo
,
Config
.
Yaxis_P1
,
Config
.
Yaxis_P1_speed
);
YAxis
.
AbsMove
(
MoveInfo
,
Config
.
Yaxis_P1
,
Config
.
Yaxis_P1_speed
);
XAxis
.
AbsMove
(
MoveInfo
,
Config
.
Xaxis_P1
,
Config
.
Xaxis_P1_speed
);
XAxis
.
AbsMove
(
MoveInfo
,
Config
.
Xaxis_P1
,
Config
.
Xaxis_P1_speed
);
...
@@ -171,7 +185,7 @@ namespace DeviceLibrary
...
@@ -171,7 +185,7 @@ namespace DeviceLibrary
{
{
IgnoreX09
=
false
;
IgnoreX09
=
false
;
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS10
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS10
);
if
(
is
SameSide
(
To
.
Xaxis_P2
))
if
(
is
NotSameSide
(
To
.
Xaxis_P2
,
To
.
Yaxis_PL
))
{
{
YAxis
.
AbsMove
(
MoveInfo
,
Config
.
Yaxis_P1
,
Config
.
Yaxis_P1_speed
);
YAxis
.
AbsMove
(
MoveInfo
,
Config
.
Yaxis_P1
,
Config
.
Yaxis_P1_speed
);
XAxis
.
AbsMove
(
MoveInfo
,
Config
.
Xaxis_P1
,
Config
.
Xaxis_P1_speed
);
XAxis
.
AbsMove
(
MoveInfo
,
Config
.
Xaxis_P1
,
Config
.
Xaxis_P1_speed
);
...
...
DeviceLibrary/theMachine/LabelParam.cs
查看文件 @
c9ac5b9
...
@@ -107,15 +107,24 @@ namespace DeviceLibrary
...
@@ -107,15 +107,24 @@ namespace DeviceLibrary
}
}
[
Serializable
]
[
Serializable
]
class
BoxStorePosition
{
class
BoxStorePosition
{
//行走机构取料点
/// <summary>
/// 行走机构取料点
/// </summary>
public
int
Xaxis_P2
;
public
int
Xaxis_P2
;
//升降轴取料高点
/// <summary>
/// 升降轴取料高点
/// </summary>
public
int
Yaxis_PH
;
public
int
Yaxis_PH
;
//升降轴取料低点
/// <summary>
/// 升降轴取料低点
/// </summary>
public
int
Yaxis_PL
;
public
int
Yaxis_PL
;
//进出轴取料点
/// <summary>
/// 进出轴取料点
/// </summary>
public
int
Zaxis_P2
;
public
int
Zaxis_P2
;
public
string
posid
;
public
string
posid
;
...
...
DeviceLibrary/theMachine/MainMachine _Common.cs
查看文件 @
c9ac5b9
...
@@ -73,7 +73,7 @@ namespace DeviceLibrary
...
@@ -73,7 +73,7 @@ namespace DeviceLibrary
isOk
=
false
;
isOk
=
false
;
WarnMsg
=
msg
;
WarnMsg
=
msg
;
Alarm
(
AlarmType
.
AxisMoveError
,
WarnMsg
);
Alarm
(
AlarmType
.
AxisMoveError
,
WarnMsg
);
Msg
.
add
(
WarnMsg
,
MsgLevel
.
warning
);
Msg
.
add
(
WarnMsg
,
MsgLevel
.
alarm
);
break
;
break
;
}
}
}
}
...
...
DeviceLibrary/theMachine/MainMachine _Out.cs
查看文件 @
c9ac5b9
...
@@ -32,14 +32,20 @@ namespace DeviceLibrary
...
@@ -32,14 +32,20 @@ namespace DeviceLibrary
if
(
OutSideLift
.
isAtBOTTOM
)
if
(
OutSideLift
.
isAtBOTTOM
)
{
{
OutMoveInfo
.
NextMoveStep
(
MoveStep
.
WaitErr
);
OutMoveInfo
.
NextMoveStep
(
MoveStep
.
WaitErr
);
return
;
}
}
else
if
(
IOValue
(
IO_Type
.
OutEntryMaterialTop_Check
).
Equals
(
IO_VALUE
.
HIGH
)
&&
RobotManage
.
mainMachine
.
boxTransport
.
IsPutOnOut
)
else
if
(
IOValue
(
IO_Type
.
OutEntryMaterialTop_Check
).
Equals
(
IO_VALUE
.
HIGH
)
&&
OutMoveInfo
.
IsTimeOut
(
20
)
)
{
{
Msg
.
add
(
"检测到出料口有周转箱"
,
MsgLevel
.
warning
);
Msg
.
add
(
"检测到出料口有周转箱
,等待信息超时
"
,
MsgLevel
.
warning
);
OutMoveInfo
.
log
(
$
"检测到出料口有周转箱,送出"
);
OutMoveInfo
.
log
(
$
"检测到出料口有周转箱,
等待信息超时,
送出"
);
OutMoveInfo
.
NextMoveStep
(
MoveStep
.
OutBoxPutOn
);
OutMoveInfo
.
NextMoveStep
(
MoveStep
.
OutBoxPutOn
);
}
return
;
}
else
if
(
IOValue
(
IO_Type
.
OutEntryMaterialTop_Check
).
Equals
(
IO_VALUE
.
HIGH
))
return
;
OutMoveInfo
.
NextMoveStep
(
MoveStep
.
Wait
);
break
;
break
;
case
MoveStep
.
WaitErr
:
case
MoveStep
.
WaitErr
:
OutMoveInfo
.
NextMoveStep
(
MoveStep
.
Wait
);
OutMoveInfo
.
NextMoveStep
(
MoveStep
.
Wait
);
...
...
DeviceLibrary/theMachine/MainMachine _Store.cs
查看文件 @
c9ac5b9
...
@@ -96,7 +96,7 @@ namespace DeviceLibrary
...
@@ -96,7 +96,7 @@ namespace DeviceLibrary
//}
//}
break
;
break
;
case
MoveStep
.
StoreOut12
:
case
MoveStep
.
StoreOut12
:
if
(
boxTransport
.
Is
ComplateOrFree
)
if
(
boxTransport
.
Is
PutOnOut
)
{
{
OutMoveInfo
.
NextMoveStep
(
MoveStep
.
OutBoxPutOn
);
OutMoveInfo
.
NextMoveStep
(
MoveStep
.
OutBoxPutOn
);
OutMoveInfo
.
MoveParam
=
StoreMoveInfo
.
MoveParam
.
clone
();
OutMoveInfo
.
MoveParam
=
StoreMoveInfo
.
MoveParam
.
clone
();
...
...
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
c9ac5b9
...
@@ -288,20 +288,20 @@ namespace DeviceLibrary
...
@@ -288,20 +288,20 @@ namespace DeviceLibrary
ServerCM
.
storeStatus
=
StoreStatus
.
ResetMove
;
ServerCM
.
storeStatus
=
StoreStatus
.
ResetMove
;
ZAxis
.
HomeMove
(
ResetMoveInfo
,
forceHome
);
ZAxis
.
HomeMove
(
ResetMoveInfo
,
forceHome
);
break
;
break
;
case
MoveStep
.
H02_HomeReset
:
case
MoveStep
.
H02_HomeReset
:
if
(
IOValue
(
IO_Type
.
SideA_ForkMaterial_Check
).
Equals
(
IO_VALUE
.
HIGH
)
||
IOValue
(
IO_Type
.
SideB_ForkMaterial_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
Msg
.
add
(
"伸缩叉2侧X10/X11检测到有物料无法继续"
,
MsgLevel
.
warning
);
RobotManage
.
UserPause
(
"回源时料叉上有物料"
);
return
;
}
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H03_HomeReset
);
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H03_HomeReset
);
ResetMoveInfo
.
log
(
"正在回原,料叉P1待机点"
);
ResetMoveInfo
.
log
(
"正在回原,料叉P1待机点"
);
ZAxis
.
AbsMove
(
ResetMoveInfo
,
Config
.
Zaxis_P1
,
Config
.
Zaxis_P1_speed
);
ZAxis
.
AbsMove
(
ResetMoveInfo
,
Config
.
Zaxis_P1
,
Config
.
Zaxis_P1_speed
);
ResetMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
ResetMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
break
;
break
;
case
MoveStep
.
H03_HomeReset
:
case
MoveStep
.
H03_HomeReset
:
if
(
IOValue
(
IO_Type
.
SideA_ForkMaterial_Check
).
Equals
(
IO_VALUE
.
HIGH
)
||
IOValue
(
IO_Type
.
SideB_ForkMaterial_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
Msg
.
add
(
"伸缩叉2侧X10/X11检测到有物料无法继续"
,
MsgLevel
.
warning
);
RobotManage
.
UserPause
(
"回源时料叉上有物料"
);
return
;
}
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H04_HomeReset
);
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H04_HomeReset
);
ResetMoveInfo
.
log
(
"开始回原,行走机构,回原"
);
ResetMoveInfo
.
log
(
"开始回原,行走机构,回原"
);
XAxis
.
HomeMove
(
ResetMoveInfo
,
forceHome
);
XAxis
.
HomeMove
(
ResetMoveInfo
,
forceHome
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论