Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit ac876e8f
由
LN
编写于
2020-01-07 18:07:42 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
出库到皮带线不需要下降
1 个父辈
5d1cbe82
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
63 行增加
和
40 行删除
source/DeviceLibrary/assemblyLine/LineBean.cs
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
source/DeviceLibrary/assemblyLine/LineBean.cs
查看文件 @
ac876e8
...
@@ -708,7 +708,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -708,7 +708,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
Name
+
"定时检测报警出错:"
,
ex
);
LogUtil
.
error
(
Name
+
"定时检测报警出错:"
,
ex
);
}
}
Thread
.
Sleep
(
1
);
Thread
.
Sleep
(
1
);
}
}
/// <summary>
/// <summary>
/// 定时处理,监听信号,监听IO
/// 定时处理,监听信号,监听IO
/// </summary>
/// </summary>
...
@@ -750,28 +750,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -750,28 +750,7 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
switch
(
runStatus
)
LineTimerPro
();
{
case
LineRunStatus
.
Busy
:
BusyMoveProcess
();
break
;
case
LineRunStatus
.
HomeMoving
:
ResetProcess
();
break
;
case
LineRunStatus
.
Reset
:
ResetProcess
();
break
;
case
LineRunStatus
.
Runing
:
if
((
isInSuddenDown
.
Equals
(
false
)
&&
isNoAirCheck
.
Equals
(
false
)))
{
//清理超时异常
IOTimeOutProcess
();
}
break
;
default
:
break
;
}
SideWayTimerProcess
();
}
}
TimeSpan
span
=
DateTime
.
Now
-
time
;
TimeSpan
span
=
DateTime
.
Now
-
time
;
...
@@ -785,7 +764,49 @@ namespace OnlineStore.DeviceLibrary
...
@@ -785,7 +764,49 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
Name
+
"主定时器出错:"
,
ex
);
LogUtil
.
error
(
Name
+
"主定时器出错:"
,
ex
);
}
}
Thread
.
Sleep
(
1
);
Thread
.
Sleep
(
1
);
}
}
private
bool
busyPro
=
false
;
private
DateTime
busyProTime
=
DateTime
.
Now
;
private
void
LineTimerPro
()
{
TimeSpan
span
=
DateTime
.
Now
-
busyProTime
;
if
(
busyPro
&&
span
.
TotalSeconds
<
3
)
{
return
;
}
try
{
busyPro
=
true
;
busyProTime
=
DateTime
.
Now
;
switch
(
runStatus
)
{
case
LineRunStatus
.
Busy
:
BusyMoveProcess
();
break
;
case
LineRunStatus
.
HomeMoving
:
ResetProcess
();
break
;
case
LineRunStatus
.
Reset
:
ResetProcess
();
break
;
case
LineRunStatus
.
Runing
:
if
((
isInSuddenDown
.
Equals
(
false
)
&&
isNoAirCheck
.
Equals
(
false
)))
{
//清理超时异常
IOTimeOutProcess
();
}
break
;
default
:
break
;
}
SideWayTimerProcess
();
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
Name
+
"LineTimerPro 出错:"
,
ex
);
}
busyPro
=
false
;
}
/// <summary>
/// <summary>
/// 气压检测处理
/// 气压检测处理
/// </summary>
/// </summary>
...
@@ -864,8 +885,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -864,8 +885,8 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
EndMove
();
MoveInfo
.
EndMove
();
WriteDrivetMotorRun
(
IO_VALUE
.
LOW
);
WriteDrivetMotorRun
(
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
NGCylinder_After
,
IO_VALUE
.
LOW
);
//
IOMove(IO_Type.NGCylinder_After, IO_VALUE.LOW);
IOMove
(
IO_Type
.
NGCylinder_Before
,
IO_VALUE
.
LOW
);
//
IOMove(IO_Type.NGCylinder_Before, IO_VALUE.LOW);
IOMove
(
IO_Type
.
SW4_MotorRun
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SW4_MotorRun
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SW4_TopCylinder_Down
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SW4_TopCylinder_Down
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SW4_TopCylinder_Up
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SW4_TopCylinder_Up
,
IO_VALUE
.
LOW
);
...
...
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
查看文件 @
ac876e8
...
@@ -451,7 +451,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -451,7 +451,7 @@ namespace OnlineStore.DeviceLibrary
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
LogUtil
.
error
(
"SideWayTimerProcess 出错:"
,
ex
);
LogUtil
.
error
(
Name
+
"SideWayTimerProcess 出错:"
,
ex
);
}
}
sdIsInprocess
=
false
;
sdIsInprocess
=
false
;
}
}
...
...
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
查看文件 @
ac876e8
...
@@ -442,27 +442,29 @@ namespace OnlineStore.DeviceLibrary
...
@@ -442,27 +442,29 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
PO_06_CylinderBefore
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
PO_06_CylinderBefore
))
{
{
//判断是否可以下降
if
(
LineIsReady
())
if
(
LineIsReady
())
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
PO_07_CylinderDown
);
//气缸不下降,直接扔料
OutLog
(
"出料:"
+
MoveInfo
.
SLog
+
" ,上下气缸下降)"
);
//MoveInfo.NextMoveStep(LineMoveStep.PO_07_CylinderDown);
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down);
//OutLog("出料:" + MoveInfo.SLog + " ,上下气缸下降)");
UpdownDownP3Move
(
MoveInfo
.
MoveParam
.
PlateH
);
//UpdownDownP3Move(MoveInfo.MoveParam.PlateH);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
PO_08_CylinderRelax
);
OutLog
(
"出料:"
+
MoveInfo
.
SLog
+
",夹料气缸放松)"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
ClampCylinder_Slack
,
IO_Type
.
ClampCylinder_Tighten
);
}
}
else
if
(
MoveInfo
.
IsTimeOut
())
else
if
(
MoveInfo
.
IsTimeOut
())
{
{
WarnMsg
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
MoveStep
+
"]等待 皮带线可放料 "
+
"超时["
+
Math
.
Round
(
MoveInfo
.
StepSpan
().
TotalSeconds
,
1
)
+
"]秒"
;
WarnMsg
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
MoveStep
+
"]等待 皮带线可放料 "
+
"超时["
+
Math
.
Round
(
MoveInfo
.
StepSpan
().
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
DeviceID
+
20
);
LogUtil
.
error
(
WarnMsg
,
DeviceID
+
20
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
}
}
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
PO_07_CylinderDown
))
//
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_07_CylinderDown))
{
//
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
PO_08_CylinderRelax
);
//
MoveInfo.NextMoveStep(LineMoveStep.PO_08_CylinderRelax);
OutLog
(
"出料:"
+
MoveInfo
.
SLog
+
",夹料气缸放松)"
);
//
OutLog("出料:" + MoveInfo.SLog + ",夹料气缸放松)");
CylinderMove
(
MoveInfo
,
IO_Type
.
ClampCylinder_Slack
,
IO_Type
.
ClampCylinder_Tighten
);
//
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten);
}
//
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
PO_08_CylinderRelax
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
PO_08_CylinderRelax
))
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
PO_09_CylinderUp
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
PO_09_CylinderUp
);
...
@@ -474,7 +476,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -474,7 +476,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
PO_10_CylinderAfter
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
PO_10_CylinderAfter
);
OutLog
(
"出料:"
+
MoveInfo
.
SLog
+
",前后气缸后退,等待4000 ,皮带线继续运动"
);
OutLog
(
"出料:"
+
MoveInfo
.
SLog
+
",前后气缸后退,等待4000 ,皮带线继续运动"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
BeforeAfterCylinder_Before
,
IO_Type
.
BeforeAfterCylinder_After
);
CylinderMove
(
MoveInfo
,
IO_Type
.
BeforeAfterCylinder_Before
,
IO_Type
.
BeforeAfterCylinder_After
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
4
000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1
000
));
//出料皮带线停止出料
//出料皮带线停止出料
DisLineContiune
();
DisLineContiune
();
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论