Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO664-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit fb6c05d4
由
LN
编写于
2023-08-29 13:45:41 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
hy03处理慢问题优化。
1 个父辈
1c062c07
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
119 行增加
和
53 行删除
source/DeviceLibrary/assemblyLine/HY/HY_C1Line.cs
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
source/DeviceLibrary/assemblyLine/HY/HY_C1Line.cs
查看文件 @
fb6c05d
...
@@ -311,11 +311,17 @@ namespace OnlineStore.DeviceLibrary
...
@@ -311,11 +311,17 @@ namespace OnlineStore.DeviceLibrary
}
}
ClearTrayRFID
();
ClearTrayRFID
();
IOMove
(
IO_Type
.
HY_FrontStopDown
,
IO_VALUE
.
HIGH
,
TrayManager
.
StopDTime
);
IOMove
(
IO_Type
.
HY_FrontStopDown
,
IO_VALUE
.
HIGH
,
TrayManager
.
StopDTime
);
MoveInfo
.
OneWaitCanEndStep
=
true
;
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
HY_FrontStopCheck
,
IO_VALUE
.
LOW
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
HY_FrontStopCheck
,
IO_VALUE
.
LOW
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
HY_TrayCheck
,
IO_VALUE
.
HIGH
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
HY_TrayCheck
,
IO_VALUE
.
HIGH
));
CylinderMove
(
null
,
IO_Type
.
HY_TopCylinder_Up
,
IO_Type
.
HY_TopCylinder_Down
);
CylinderMove
(
null
,
IO_Type
.
HY_TopCylinder_Up
,
IO_Type
.
HY_TopCylinder_Down
);
IOMove
(
IO_Type
.
HY_OL_StopDown
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
HY_OL_StopDown
,
IO_VALUE
.
LOW
);
MoveInfo
.
OneWaitCanEndStep
=
true
;
if
(
IOValue
(
IO_Type
.
HY_FrontStopDown
).
Equals
(
IO_VALUE
.
LOW
))
{
LogInfo
(
" 托盘检测:"
+
MoveInfo
.
SLog
+
",重新写前阻挡下降"
);
IOMove
(
IO_Type
.
HY_FrontStopDown
,
IO_VALUE
.
HIGH
);
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
...
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
查看文件 @
fb6c05d
...
@@ -779,75 +779,92 @@ namespace OnlineStore.DeviceLibrary
...
@@ -779,75 +779,92 @@ namespace OnlineStore.DeviceLibrary
private
object
lockObj
=
""
;
private
object
lockObj
=
""
;
private
void
CheckFixture
()
private
void
CheckFixture
()
{
{
if
(
Monitor
.
TryEnter
(
lockObj
,
TrayManager
.
mTimeOut
))
//if (Monitor.TryEnter(lockObj, TrayManager.mTimeOut))
//{
try
{
{
try
if
(
SecondMoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
).
Equals
(
false
))
{
{
if
(
SecondMoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
).
Equals
(
false
))
if
(
IOValue
(
IO_Type
.
StopCheck2
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
if
(
IOValue
(
IO_Type
.
StopCheck2
).
Equals
(
IO_VALUE
.
HIGH
))
trayCheck2LowWait
.
Stop
();
{
}
trayCheck2LowWait
.
Stop
();
else
}
{
else
CheckStopWatch
(
trayCheck2LowWait
,
30000
,
false
);
}
LogUtil
.
error
(
Name
+
" CheckFixture "
+
" 不在空闲中,直接返回 "
);
return
;
}
if
(
SecondMoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
//bool canpro = LineManager.Line.Move5CanProcessTray(DeviceID);
bool
canpro
=
true
;
if
(
IOValue
(
IO_Type
.
StopCheck2
).
Equals
(
IO_VALUE
.
HIGH
))
{
trayCheck2LowWait
.
Stop
();
if
(
canpro
&&
CheckStopWatch
(
trayCheckWait
,
TrayWaitTime
,
true
))
{
{
CheckStopWatch
(
trayCheck2LowWait
,
30000
,
false
);
TrayStart_MIO_03_StopUp
();
}
}
LogUtil
.
error
(
Name
+
" CheckFixture "
+
" 不在空闲中,直接返回 "
);
return
;
}
}
if
(
SecondMoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
else
{
{
//bool canpro = LineManager.Line.Move5CanProcessTray(DeviceID);
bool
check2IsOk
=
CheckStopWatch
(
trayCheck2LowWait
,
TrayWaitTime
,
false
);
bool
canpro
=
true
;
if
(
IOValue
(
IO_Type
.
StopCheck1
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
StopCheck2
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
trayCheck2LowWait
.
Stop
();
if
(
CheckStopWatch
(
trayCheckWait
,
TrayWaitTime
,
false
)
&&
check2IsOk
&&
canpro
)
if
(
canpro
&&
CheckStopWatch
(
trayCheckWait
,
TrayWaitTime
,
true
))
{
{
SecondMoveInfo
.
NewMove
(
LineMoveType
.
Fixture
);
TrayStart_MIO_00_Stop1Down
();
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_03_StopUp
);
CheckLog
(
"托盘阻挡"
+
SecondMoveInfo
.
SLog
+
" 阻挡气缸1-1上升)"
);
IOMove
(
IO_Type
.
StopDown1
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
StopDown2
,
IO_VALUE
.
LOW
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopDown1
,
IO_VALUE
.
LOW
));
}
}
}
}
else
else
{
{
bool
check2IsOk
=
CheckStopWatch
(
trayCheck2LowWait
,
TrayWaitTime
,
false
);
trayCheckWait
.
Stop
();
if
(
IOValue
(
IO_Type
.
StopCheck1
).
Equals
(
IO_VALUE
.
HIGH
))
{
if
(
CheckStopWatch
(
trayCheckWait
,
TrayWaitTime
,
false
)
&&
check2IsOk
&&
canpro
)
{
StopDownCount
=
0
;
trayCheckWait
.
Stop
();
trayCheck2LowWait
.
Stop
();
//托盘在第一个阻挡处
SecondMoveInfo
.
NewMove
(
LineMoveType
.
Fixture
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_00_Stop1Down
);
CheckLog
(
" 托盘检测:料盘检测StopCylinder_Check1 "
+
SecondMoveInfo
.
SLog
+
"阻挡气缸1-1下降 , 等待 StopCylinder_Check1=0,清理托盘RFID"
);
ClearTrayRFID
();
IOMove
(
IO_Type
.
StopDown2
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
StopDown1
,
IO_VALUE
.
HIGH
,
TrayManager
.
StopDTime
);
SecondMoveInfo
.
OneWaitCanEndStep
=
true
;
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCheck1
,
IO_VALUE
.
LOW
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCheck2
,
IO_VALUE
.
HIGH
));
//最多等待30秒
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
30000
));
}
}
else
{
trayCheckWait
.
Stop
();
}
}
}
}
}
}
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
Name
+
" CheckFixture "
+
" 出错:"
+
ex
.
ToString
());
}
// finally
// {
// Monitor.Exit(lockObj);
// }
//}
//else
//{
// LogUtil.error(Name + " CheckFixture " + "失败,未得到锁");
//}
}
private
void
TrayStart_MIO_03_StopUp
()
{
string
logName
=
"TrayStart_MIO_03_StopUp"
;
if
(
Monitor
.
TryEnter
(
lockObj
,
TrayManager
.
mTimeOut
))
{
try
{
if
(
SecondMoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
).
Equals
(
false
))
{
LogUtil
.
error
(
Name
+
logName
+
" 不在空闲中,直接返回 "
);
return
;
}
SecondMoveInfo
.
NewMove
(
LineMoveType
.
Fixture
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_03_StopUp
);
CheckLog
(
"托盘阻挡"
+
SecondMoveInfo
.
SLog
+
" 阻挡气缸1-1上升)"
);
IOMove
(
IO_Type
.
StopDown1
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
StopDown2
,
IO_VALUE
.
LOW
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopDown1
,
IO_VALUE
.
LOW
));
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
LogUtil
.
error
(
Name
+
" CheckFixture "
+
" 出错:"
+
ex
.
ToString
());
LogUtil
.
error
(
Name
+
logName
+
" 出错:"
+
ex
.
ToString
());
}
}
finally
finally
{
{
...
@@ -856,10 +873,53 @@ namespace OnlineStore.DeviceLibrary
...
@@ -856,10 +873,53 @@ namespace OnlineStore.DeviceLibrary
}
}
else
else
{
{
LogUtil
.
error
(
Name
+
" CheckFixture "
+
"失败,未得到锁"
);
LogUtil
.
error
(
Name
+
logName
+
"失败,未得到锁"
);
}
}
}
}
private
void
TrayStart_MIO_00_Stop1Down
()
{
string
logName
=
"MIO_00_Stop1Down"
;
if
(
Monitor
.
TryEnter
(
lockObj
,
TrayManager
.
mTimeOut
))
{
try
{
if
(
SecondMoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
).
Equals
(
false
))
{
LogUtil
.
error
(
Name
+
logName
+
" 不在空闲中,直接返回 "
);
return
;
}
StopDownCount
=
0
;
trayCheckWait
.
Stop
();
trayCheck2LowWait
.
Stop
();
//托盘在第一个阻挡处
SecondMoveInfo
.
NewMove
(
LineMoveType
.
Fixture
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_00_Stop1Down
);
CheckLog
(
" 托盘检测:料盘检测StopCylinder_Check1 "
+
SecondMoveInfo
.
SLog
+
"阻挡气缸1-1下降 , 等待 StopCylinder_Check1=0,清理托盘RFID"
);
ClearTrayRFID
();
IOMove
(
IO_Type
.
StopDown2
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
StopDown1
,
IO_VALUE
.
HIGH
,
TrayManager
.
StopDTime
);
SecondMoveInfo
.
OneWaitCanEndStep
=
true
;
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCheck1
,
IO_VALUE
.
LOW
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCheck2
,
IO_VALUE
.
HIGH
));
//最多等待30秒
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
30000
));
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
Name
+
logName
+
" 出错:"
+
ex
.
ToString
());
}
finally
{
Monitor
.
Exit
(
lockObj
);
}
}
else
{
LogUtil
.
error
(
Name
+
logName
+
"失败,未得到锁"
);
}
}
private
int
StopDownCount
=
0
;
private
int
StopDownCount
=
0
;
protected
override
void
FixtureProcess
()
protected
override
void
FixtureProcess
()
{
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论