Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1069_MIMO_PlUS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 9a73f2f2
由
刘韬
编写于
2022-11-26 19:04:00 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
优化盘高识别
1 个父辈
4d1ea6c5
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
35 行增加
和
24 行删除
DeviceLibrary/DeviceLibrary/AxisBean.cs
DeviceLibrary/DeviceLibrary/LiftMonitor.cs
DeviceLibrary/theMachine/MainMachine_String.cs
DeviceLibrary/theMachine/MoveStep.cs
DeviceLibrary/DeviceLibrary/AxisBean.cs
查看文件 @
9a73f2f
...
...
@@ -338,7 +338,7 @@ namespace DeviceLibrary
{
axisCheckTimer
=
new
System
.
Timers
.
Timer
();
axisCheckTimer
.
AutoReset
=
true
;
axisCheckTimer
.
Interval
+=
1
5
;
axisCheckTimer
.
Interval
+=
1
0
;
axisCheckTimer
.
Elapsed
+=
CheckTimer_Elapsed
;
axisCheckTimer
.
Enabled
=
false
;
}
...
...
DeviceLibrary/DeviceLibrary/LiftMonitor.cs
查看文件 @
9a73f2f
...
...
@@ -78,7 +78,7 @@ namespace DeviceLibrary
moveInfo
.
WaitList
.
Add
(
wr
);
Task
.
Run
(()=>
{
while
(!
IOManager
.
IOValue
(
up
.
ToString
()).
Equals
(
IO_VALUE
.
HIGH
))
{
Task
.
Delay
(
15
);
Task
.
Delay
(
15
)
.
Wait
()
;
if
(
paused
)
{
paused
=
false
;
...
...
@@ -158,7 +158,7 @@ namespace DeviceLibrary
Task
.
Run
(()
=>
{
while
(!
IOManager
.
IOValue
(
down
.
ToString
()).
Equals
(
IO_VALUE
.
HIGH
))
{
Task
.
Delay
(
15
);
Task
.
Delay
(
15
)
.
Wait
()
;
if
(
paused
)
{
paused
=
false
;
...
...
DeviceLibrary/theMachine/MainMachine_String.cs
查看文件 @
9a73f2f
...
...
@@ -97,7 +97,6 @@ namespace DeviceLibrary
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_01
);
StringMoveInfo
.
log
(
$
"检测到有料串"
);
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringFix_Bottom
,
IO_Type
.
StringFix_Top
,
IO_VALUE
.
LOW
);
//StringState = StringStateE.OutStore;
}
else
if
(
IOValue
(
IO_Type
.
StringBack_Check
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
StringFront_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
...
...
@@ -132,7 +131,7 @@ namespace DeviceLibrary
case
MoveStep
.
StringLoad_02
:
if
(
IOValue
(
IO_Type
.
StringBack_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_0
3
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_0
2a
);
StringMoveInfo
.
log
(
$
"顶起料串固定顶升"
);
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringFix_Bottom
,
IO_Type
.
StringFix_Top
,
IO_VALUE
.
HIGH
);
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringPosChecker_Home
,
IO_Type
.
StringPosChecker_Work
,
IO_VALUE
.
HIGH
);
...
...
@@ -147,6 +146,26 @@ namespace DeviceLibrary
downCheck2
=
false
;
downCheck3
=
false
;
break
;
case
MoveStep
.
StringLoad_02a
:
if
(
ConfigHelper
.
Config
.
Get
(
"Device_Disable_StringDoor"
,
false
)
||
IOValue
(
IO_Type
.
StringDoor_Close
).
Equals
(
IO_VALUE
.
HIGH
))
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_02b
);
StringMoveInfo
.
log
(
$
"批量轴高速到顶部检测点"
);
//CylinderMove(StringMoveInfo, IO_Type.StringDoor_Close, IO_Type.StringDoor_Open, IO_VALUE.LOW);
BatchAxisToP2
(
StringMoveInfo
,
true
);
StringMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitMsg
(
crc
.
GetString
(
"Res0009"
,
"料串正在上升"
),
MsgLevel
.
warning
));
}
else
if
(
StringMoveInfo
.
IsTimeOut
(
10
))
{
Msg
.
add
(
crc
.
GetString
(
L
.
wait_stringdoor_close
,
"等待关门折叠门"
),
MsgLevel
.
warning
);
StringMoveInfo
.
log
(
$
"等待关门"
);
}
break
;
case
MoveStep
.
StringLoad_02b
:
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_03
);
StringMoveInfo
.
log
(
$
"料串下降到x13信号灭"
);
BatchAxisToTagLow
(
StringMoveInfo
);
break
;
case
MoveStep
.
StringLoad_03
:
if
(
ConfigHelper
.
Config
.
Get
(
"Device_Disable_StringDoor"
,
false
)
||
IOValue
(
IO_Type
.
StringDoor_Close
).
Equals
(
IO_VALUE
.
HIGH
))
{
...
...
@@ -198,7 +217,7 @@ namespace DeviceLibrary
case
MoveStep
.
StringLoad_04b
:
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_05
);
if
(!
newreel
)
SetReelHeight
(
GetHeight
(
String
MoveInfo
));
SetReelHeight
(
GetHeight
(
Clamp
MoveInfo
));
newreel
=
false
;
StringMoveInfo
.
log
(
$
"料串有盘下降5mm"
);
...
...
@@ -214,7 +233,6 @@ namespace DeviceLibrary
StringMoveInfo
.
log
(
$
"料串已满可以送出"
);
}
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
tpos2
,
Config
.
Batch_P1_speed
);
break
;
case
MoveStep
.
StringLoad_05
:
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_06
);
...
...
@@ -227,7 +245,7 @@ namespace DeviceLibrary
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReadyGet
);
StringMoveInfo
.
log
(
$
"料串有盘上升5mm"
);
var
tpos4
=
Batch_Axis
.
GetAclPosition
()
+
Config
.
Batch_PoToMM
*
(
Config
.
Batch_DetectDownMM
+
2
);
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
tpos4
,
Config
.
Batch_P1
);
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
tpos4
,
Config
.
Batch_P1
_speed
);
CylinderMove
(
StringMoveInfo
,
IO_Type
.
Clamping_Relax
,
IO_Type
.
Clamping_Work
,
IO_VALUE
.
LOW
);
//OpenFlipDoor(StringMoveInfo);
StringType
=
StringTypeE
.
In
;
...
...
@@ -241,7 +259,7 @@ namespace DeviceLibrary
tpos2
=
0
;
}
StringMoveInfo
.
log
(
$
"料串出库模式,下降{Config.Batch_OutStoreDownMM}cm,={tpos2},{Batch_Axis.GetAclPosition()}"
);
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
tpos2
,
Config
.
Batch_P1
);
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
tpos2
,
Config
.
Batch_P1
_speed
);
StringType
=
StringTypeE
.
Out
;
}
break
;
...
...
@@ -260,7 +278,7 @@ namespace DeviceLibrary
var
tpos1
=
Batch_Axis
.
GetAclPosition
()
-
Config
.
Batch_PoToMM
*
Config
.
Batch_DetectDownMM
;
if
(
tpos1
<
0
)
tpos1
=
0
;
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
tpos1
,
Config
.
Batch_P1
);
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
tpos1
,
Config
.
Batch_P1
_speed
);
break
;
case
MoveStep
.
StringReadyPut
:
Msg
.
add
(
crc
.
GetString
(
L
.
string_ready_for_put
,
"料串放料准备就绪"
),
MsgLevel
.
info
);
...
...
@@ -464,27 +482,18 @@ namespace DeviceLibrary
int
StartMovePosition
=
0
;
void
BatchAxisToP2
(
MoveInfo
moveInfo
,
bool
isFirstMove
=
tru
e
)
void
BatchAxisToP2
(
MoveInfo
moveInfo
,
bool
isFirstMove
=
fals
e
)
{
int
targetP2
=
Config
.
Batch_P2
;
int
targetSpeed
=
Config
.
Batch_P2_speed
;
if
(
!
isFirstMove
)
if
(
isFirstMove
)
{
int
currPosition
=
Batch_Axis
.
GetAclPosition
();
if
(
currPosition
!=
-
1
)
{
//targetP2 = currPosition + Config.Right_Batch_ChangeValue * 80;
if
(
targetP2
>
Config
.
Batch_P2
)
{
targetP2
=
Config
.
Batch_P2
;
}
//moveInfo.log("BatchAxisToP2 目标P2: " + targetP2 + "(" + currPosition + ")");
}
//targetSpeed = Config.BatchAxis_P3Speed / 2;
targetSpeed
=
Config
.
Batch_P1_speed
;
}
moveInfo
.
log
(
"BatchAxisToP2 目标P2: "
+
targetP2
);
moveInfo
.
TimeOutSeconds
=
200
;
moveInfo
.
CanWhileCount
=
0
;
Batch_Axis
.
SuddenStop
();
// 需要增加定时器,获取验证信号并停止伺服
StartMovePosition
=
Batch_Axis
.
GetAclPosition
()-
(
Config
.
Batch_PoToMM
*
2
);
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxisMove
(
Config
.
Batch_Axis
,
targetP2
,
targetSpeed
));
...
...
@@ -532,7 +541,7 @@ namespace DeviceLibrary
}
else
if
(
moveInfo
.
MoveParam
.
PlateW
==
13
)
{
//height -= 3
;
height
-=
1
;
}
//如果检测出<=15,都按照8计算
if
(
height
<
12
)
...
...
DeviceLibrary/theMachine/MoveStep.cs
查看文件 @
9a73f2f
...
...
@@ -35,6 +35,8 @@ namespace DeviceLibrary
StringLoad_01
,
StringLoad_01a
,
StringLoad_02
,
StringLoad_02a
,
StringLoad_02b
,
StringLoad_03
,
StringLoad_04
,
StringLoad_04a
,
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论