Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1069_MIMO_PlUS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 88aa209c
由
刘韬
编写于
2022-05-23 09:51:56 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
ffe060f2
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
31 行增加
和
19 行删除
DeviceLibrary/theMachine/MainMachine _Common.cs
DeviceLibrary/theMachine/MainMachine_Store.cs
DeviceLibrary/theMachine/MainMachine_String.cs
DeviceLibrary/theMachine/MainMachine _Common.cs
查看文件 @
88aa209
...
...
@@ -329,8 +329,8 @@ namespace DeviceLibrary
public
enum
StringStateE
{
None
=
0
,
Empty
,
HasReel
,
OutStore
,
InStore
,
Full
}
public
enum
StringTypeE
...
...
DeviceLibrary/theMachine/MainMachine_Store.cs
查看文件 @
88aa209
...
...
@@ -71,9 +71,10 @@ namespace DeviceLibrary
}
}
//判断有没有出库任务, 需要入库空闲, 出口空闲
else
if
(
IsPutReelReady
&&
boxTransport
.
IsComplateOrFree
)
else
if
(
OutStoreJobList
.
Count
>
0
&&
boxTransport
.
IsComplateOrFree
)
{
if
(
OutStoreJobList
.
Dequeue
(
out
JobInfo
jobInfo
))
TurnToOut
();
if
(
IsPutReelReady
&&
OutStoreJobList
.
Dequeue
(
out
JobInfo
jobInfo
))
{
StoreMoveInfo
.
NewMove
(
MoveStep
.
StoreOut10
);
StoreMoveInfo
.
MoveParam
.
PosID
=
jobInfo
.
PosId
;
...
...
DeviceLibrary/theMachine/MainMachine_String.cs
查看文件 @
88aa209
...
...
@@ -59,9 +59,17 @@ namespace DeviceLibrary
/// <summary>
/// 强制转换料串为出库模式
/// </summary>
void
TurnToOut
()
{
StringState
=
StringStateE
.
Empty
;
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_06
);
public
bool
TurnToOut
()
{
if
(
StringState
==
StringStateE
.
OutStore
&&
StringMoveInfo
.
MoveStep
==
MoveStep
.
StringOut_Released
)
{
StringMoveInfo
.
log
(
$
"升起待机料串"
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_03
);
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringPosChecker_Home
,
IO_Type
.
StringPosChecker_Work
,
IO_VALUE
.
HIGH
);
return
true
;
}
return
false
;
}
StringStateE
LastStringState
{
get
=>
ConfigHelper
.
Config
.
Get
(
"Status_LastStringState"
,
StringStateE
.
None
);
set
=>
ConfigHelper
.
Config
.
Set
(
"Status_LastStringState"
,
value
);
}
...
...
@@ -83,7 +91,7 @@ namespace DeviceLibrary
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_01
);
StringMoveInfo
.
log
(
$
"检测到有料串"
);
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringFix_Bottom
,
IO_Type
.
StringFix_Top
,
IO_VALUE
.
LOW
);
StringState
=
StringStateE
.
Empty
;
StringState
=
StringStateE
.
OutStore
;
}
else
if
(
IOValue
(
IO_Type
.
StringBack_Check
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
StringFront_Check
).
Equals
(
IO_VALUE
.
LOW
)){
Msg
.
add
(
crc
.
GetString
(
L
.
no_string
,
"当前没有料串"
),
MsgLevel
.
info
);
...
...
@@ -146,21 +154,24 @@ namespace DeviceLibrary
break
;
case
MoveStep
.
StringLoad_04
:
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_04a
);
if
(
LastStringState
==
StringStateE
.
Empty
)
if
(
LastStringState
==
StringStateE
.
OutStore
)
{
StringMoveInfo
.
log
(
$
"恢复上次料串信息为出库料串"
);
StringState
=
StringStateE
.
Empty
;
StringState
=
StringStateE
.
OutStore
;
}
else
if
(
Batch_Axis
.
IsInPosition
(
Config
.
Batch_P2
)
&&
IOValue
(
IO_Type
.
TrayCheck
).
Equals
(
IO_VALUE
.
LOW
))
{
StringMoveInfo
.
log
(
$
"料串检测为空"
);
StringState
=
StringStateE
.
Empty
;
//LastStringState = StringState;
StringState
=
StringStateE
.
OutStore
;
if
(
OutStoreJobList
.
Count
==
0
)
{
StringMoveInfo
.
log
(
$
"当钱空料串, 并且没有出库任务, 料串下降待机"
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringOut_01
);
}
}
else
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_04a
);
StringState
=
StringStateE
.
HasReel
;
StringState
=
StringStateE
.
InStore
;
}
if
(!
newreel
)
SetReelHeight
(
GetHeight
(
StringMoveInfo
));
...
...
@@ -176,7 +187,7 @@ namespace DeviceLibrary
{
tpos2
=
0
;
}
if
(
StringState
==
StringStateE
.
Empty
&&
tpos2
-
Config
.
Batch_PoToMM
*
30
<
0
)
if
(
StringState
==
StringStateE
.
OutStore
&&
tpos2
-
Config
.
Batch_PoToMM
*
30
<
0
)
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringOut_01
);
StringState
=
StringStateE
.
Full
;
...
...
@@ -191,7 +202,7 @@ namespace DeviceLibrary
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringPosChecker_Home
,
IO_Type
.
StringPosChecker_Work
,
IO_VALUE
.
LOW
);
break
;
case
MoveStep
.
StringLoad_06
:
if
(
StringState
==
StringStateE
.
HasReel
)
if
(
StringState
==
StringStateE
.
InStore
)
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReadyGet
);
StringMoveInfo
.
log
(
$
"料串有盘上升5mm"
);
...
...
@@ -201,7 +212,7 @@ namespace DeviceLibrary
//OpenFlipDoor(StringMoveInfo);
StringType
=
StringTypeE
.
In
;
}
else
if
(
StringState
==
StringStateE
.
Empty
)
else
if
(
StringState
==
StringStateE
.
OutStore
)
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReadyPut
);
StringMoveInfo
.
log
(
$
"料串出库模式,下降5cm"
);
...
...
@@ -236,7 +247,7 @@ namespace DeviceLibrary
StringMoveInfo
.
log
(
$
"料串放料准备就绪"
);
break
;
case
MoveStep
.
StringReelPut
:
LastStringState
=
StringStateE
.
Empty
;
LastStringState
=
StringStateE
.
OutStore
;
var
tpos
=
Batch_Axis
.
GetAclPosition
()
-
Config
.
Batch_PoToMM
*
(
StringMoveInfo
.
MoveParam
.
PlateH
+
Config
.
Batch_OutPlateDownMM
);
if
(
tpos
<
0
)
tpos
=
0
;
...
...
@@ -352,14 +363,14 @@ namespace DeviceLibrary
string
StringProcessState
()
{
string
state
=
""
;
if
(
StringState
==
StringStateE
.
Empty
)
if
(
StringState
==
StringStateE
.
OutStore
)
state
=
crc
.
GetString
(
L
.
empty_reel
,
"空料串"
);
else
if
(
StringState
==
StringStateE
.
Full
)
{
state
=
crc
.
GetString
(
L
.
full_reel
,
"满料串"
);
}
else
if
(
StringState
==
StringStateE
.
HasReel
)
else
if
(
StringState
==
StringStateE
.
InStore
)
state
=
crc
.
GetString
(
L
.
instore_reel
,
"入库料串"
);
else
if
(
StringState
==
StringStateE
.
None
)
state
=
crc
.
GetString
(
L
.
no_string
,
"无料串"
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论