Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO664-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 7290c4f8
由
张东亮
编写于
2023-11-23 17:14:10 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
横移10#12#17不放行
1 个父辈
47660d67
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
24 行增加
和
20 行删除
source/DeviceLibrary/assemblyLine/HY/HY_Coveryor_Partial.cs
source/DeviceLibrary/assemblyLine/HY/HY_Coveryor_Partial.cs
查看文件 @
7290c4f
...
@@ -90,13 +90,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -90,13 +90,14 @@ namespace OnlineStore.DeviceLibrary
bool
check2IsOk
=
CheckStopWatch
(
trayCheckLowWait
,
TrayWaitTime
,
false
);
bool
check2IsOk
=
CheckStopWatch
(
trayCheckLowWait
,
TrayWaitTime
,
false
);
if
(
IOValue
(
IO_Type
.
HY_FrontStopCheck
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
HY_FrontStopCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
if
(
CheckStopWatch
(
trayCheckWait
,
TrayWaitTime
,
false
)
&&
check2IsOk
&&
canpro
)
//CheckStopWatch(trayCheckWait, TrayWaitTime, false) &&
if
(
check2IsOk
&&
canpro
)
{
{
StartTrayCheck
();
StartTrayCheck
();
}
}
}
}
else
//
else
{
{
trayCheckWait
.
Stop
();
trayCheckWait
.
Stop
();
}
}
...
@@ -190,8 +191,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -190,8 +191,9 @@ namespace OnlineStore.DeviceLibrary
SecondMoveInfo
.
NewMove
(
LineMoveType
.
Fixture
);
SecondMoveInfo
.
NewMove
(
LineMoveType
.
Fixture
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
JHY_05_TrayCheck
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
JHY_05_TrayCheck
);
CheckLog
(
"接驳台托盘"
+
SecondMoveInfo
.
SLog
+
"前阻挡上升,等待托盘到位 "
);
CheckLog
(
"接驳台托盘"
+
SecondMoveInfo
.
SLog
+
"前阻挡下降1.2s,等待托盘到位 "
);
IOMove
(
IO_Type
.
HY_FrontStopDown
,
IO_VALUE
.
LOW
);
//IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.LOW);
IOMove
(
IO_Type
.
HY_FrontStopDown
,
IO_VALUE
.
HIGH
,
1200
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
HY_FrontStopDown
,
IO_VALUE
.
LOW
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
HY_FrontStopDown
,
IO_VALUE
.
LOW
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
HY_TrayCheck
,
IO_VALUE
.
HIGH
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
HY_TrayCheck
,
IO_VALUE
.
HIGH
));
...
@@ -403,7 +405,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -403,7 +405,7 @@ namespace OnlineStore.DeviceLibrary
{
{
time
=
800
;
time
=
800
;
}
}
CheckLog
(
" 托盘放行"
+
SecondMoveInfo
.
SLog
+
":等待"
+
time
+
"ms,托盘检测无信号"
);
CheckLog
(
" 托盘放行"
+
SecondMoveInfo
.
SLog
+
":等待"
+
time
+
"ms,托盘检测无信号"
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
time
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
time
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
HY_TrayCheck
,
IO_VALUE
.
LOW
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
HY_TrayCheck
,
IO_VALUE
.
LOW
));
}
}
...
@@ -487,7 +489,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -487,7 +489,7 @@ namespace OnlineStore.DeviceLibrary
string
code
=
SecondMoveInfo
.
MoveParam
.
WareCode
;
string
code
=
SecondMoveInfo
.
MoveParam
.
WareCode
;
bool
isNg
=
false
;
bool
isNg
=
false
;
string
result
=
SServerManager
.
GetTraySize
(
Name
,
robotIndex
,
code
,
out
LastWidth
,
out
isNg
);
string
result
=
SServerManager
.
GetTraySize
(
Name
,
robotIndex
,
code
,
out
LastWidth
,
out
isNg
);
OutLog
(
"接驳台托盘["
+
currTrayNum
+
"] ["
+
code
+
"] 获取尺寸【"
+
LastWidth
+
"】"
+(
isNg
?
"NG"
:
""
)+
"【"
+
result
+
"】"
,
1
);
OutLog
(
"接驳台托盘["
+
currTrayNum
+
"] ["
+
code
+
"] 获取尺寸【"
+
LastWidth
+
"】"
+
(
isNg
?
"NG"
:
""
)
+
"【"
+
result
+
"】"
,
1
);
if
(
LastWidth
>
0
)
if
(
LastWidth
>
0
)
{
{
...
@@ -588,13 +590,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -588,13 +590,13 @@ namespace OnlineStore.DeviceLibrary
return
false
;
return
false
;
}
}
InOutParam
inoup
=
trayInfo
.
InoutPar
;
InOutParam
inoup
=
trayInfo
.
InoutPar
;
if
(
trayInfo
.
IsFull
&&
trayInfo
.
InoutPar
.
IsNG
&&
this
.
DeviceID
.
Equals
(
217
)&&
trayInfo
.
InOrOutStore
.
Equals
(
1
))
if
(
trayInfo
.
IsFull
&&
trayInfo
.
InoutPar
.
IsNG
&&
this
.
DeviceID
.
Equals
(
217
)
&&
trayInfo
.
InOrOutStore
.
Equals
(
1
))
{
{
LogInfo
(
" NG料->NG箱"
+
""
+
inoup
.
ToStr
());
LogInfo
(
" NG料->NG箱"
+
""
+
inoup
.
ToStr
());
//如果分配了库位,需要调用取消
//如果分配了库位,需要调用取消
if
(
trayInfo
.
InoutPar
.
WareCode
!=
""
&&
trayInfo
.
InoutPar
.
PosId
!=
""
)
if
(
trayInfo
.
InoutPar
.
WareCode
!=
""
&&
trayInfo
.
InoutPar
.
PosId
!=
""
)
{
{
SServerManager
.
cancelPutInTask
(
Name
,
trayInfo
.
InoutPar
.
WareCode
,
false
);
SServerManager
.
cancelPutInTask
(
Name
,
trayInfo
.
InoutPar
.
WareCode
,
false
);
}
}
SecondMoveInfo
.
MoveParam
=
inoup
;
SecondMoveInfo
.
MoveParam
=
inoup
;
//MoveInfo.MoveParam = inoup;
//MoveInfo.MoveParam = inoup;
...
@@ -672,7 +674,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -672,7 +674,8 @@ namespace OnlineStore.DeviceLibrary
{
{
JM_02_CylinderTake
();
JM_02_CylinderTake
();
}
}
else
{
else
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
JM_01_UpdownToP1
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
JM_01_UpdownToP1
);
OutLog
(
"托盘移栽 升降气缸上升 "
);
OutLog
(
"托盘移栽 升降气缸上升 "
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpDownAxisP1
,
Config
.
UpdownAxis_P1Speed
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpDownAxisP1
,
Config
.
UpdownAxis_P1Speed
);
...
@@ -737,7 +740,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -737,7 +740,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
JM_02_CylinderTake
))
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
JM_02_CylinderTake
))
{
{
int
p2
=
Config
.
GetUpdownP2Detial
(
MoveInfo
.
MoveParam
.
PlateH
,
MoveInfo
.
MoveParam
.
PlateW
);
int
p2
=
Config
.
GetUpdownP2Detial
(
MoveInfo
.
MoveParam
.
PlateH
,
MoveInfo
.
MoveParam
.
PlateW
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
JM_03_UpdownToP2
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
JM_03_UpdownToP2
);
OutLog
(
logName
+
MoveInfo
.
SLog
+
":升降轴下降到取料点P2 ["
+
p2
+
"]"
);
OutLog
(
logName
+
MoveInfo
.
SLog
+
":升降轴下降到取料点P2 ["
+
p2
+
"]"
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
p2
,
Config
.
UpdownAxis_P2Speed
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
p2
,
Config
.
UpdownAxis_P2Speed
);
...
@@ -758,7 +761,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -758,7 +761,7 @@ namespace OnlineStore.DeviceLibrary
{
{
OutTrayNum
=
currTrayNum
;
OutTrayNum
=
currTrayNum
;
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
JM_06_UpdownToP1
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
JM_06_UpdownToP1
);
OutLog
(
logName
+
MoveInfo
.
SLog
+
":升降轴到P1 ["
+
Config
.
UpDownAxisP1
+
"],更新 getTrayReelOk=true,更新当前出库托盘号="
+
OutTrayNum
);
OutLog
(
logName
+
MoveInfo
.
SLog
+
":升降轴到P1 ["
+
Config
.
UpDownAxisP1
+
"],更新 getTrayReelOk=true,更新当前出库托盘号="
+
OutTrayNum
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpDownAxisP1
,
Config
.
UpdownAxis_P1Speed
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpDownAxisP1
,
Config
.
UpdownAxis_P1Speed
);
getTrayReelOk
=
true
;
getTrayReelOk
=
true
;
//如果不是NG口,提前放托盘离开
//如果不是NG口,提前放托盘离开
...
@@ -786,10 +789,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -786,10 +789,10 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
JM_07_ClampCheck
))
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
JM_07_ClampCheck
))
{
{
//判断是否正常抓取料
//判断是否正常抓取料
if
(
IOValue
(
IO_Type
.
HY_ClampCylinder_Check
).
Equals
(
IO_VALUE
.
LOW
))
if
(
IOValue
(
IO_Type
.
HY_ClampCylinder_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
{
getTrayReelOk
=
false
;
getTrayReelOk
=
false
;
LogInfo
(
"从托盘["
+
OutTrayNum
+
"]上抓取无料失败,夹爪气缸料盘检测信号=LOW"
);
LogInfo
(
"从托盘["
+
OutTrayNum
+
"]上抓取无料失败,夹爪气缸料盘检测信号=LOW"
);
}
}
//TrayCanGo();
//TrayCanGo();
if
(
IsNgPro
())
if
(
IsNgPro
())
...
@@ -852,7 +855,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -852,7 +855,7 @@ namespace OnlineStore.DeviceLibrary
//接驳台有料,直接发arrive
//接驳台有料,直接发arrive
int
robotIndex
=
GetRobotIndex
();
int
robotIndex
=
GetRobotIndex
();
string
msg
=
SServerManager
.
arrive3fRobotLocation
(
Name
,
robotIndex
,
code
);
string
msg
=
SServerManager
.
arrive3fRobotLocation
(
Name
,
robotIndex
,
code
);
OutLog
(
logName
+
MoveInfo
.
SLog
+
",工单料到达接驳台,更新托盘["
+
OutTrayNum
+
"]为空 ,发送 arrive3fRobotLocation = "
+
msg
,
1
);
OutLog
(
logName
+
MoveInfo
.
SLog
+
",工单料到达接驳台,更新托盘["
+
OutTrayNum
+
"]为空 ,发送 arrive3fRobotLocation = "
+
msg
,
1
);
afterPutCutOK
=
true
;
afterPutCutOK
=
true
;
//清空托盘
//清空托盘
TrayManager
.
UpdateTrayInfo
(
OutTrayNum
);
TrayManager
.
UpdateTrayInfo
(
OutTrayNum
);
...
@@ -865,19 +868,19 @@ namespace OnlineStore.DeviceLibrary
...
@@ -865,19 +868,19 @@ namespace OnlineStore.DeviceLibrary
afterPutCutOK
=
true
;
afterPutCutOK
=
true
;
if
(
getTrayReelOk
)
if
(
getTrayReelOk
)
{
{
OutLog
(
logName
+
MoveInfo
.
SLog
+
",工单料到达接驳台失败 ,更新托盘["
+
OutTrayNum
+
"]为NG ,发送 clearOutTask="
+
msg
,
1
);
OutLog
(
logName
+
MoveInfo
.
SLog
+
",工单料到达接驳台失败 ,更新托盘["
+
OutTrayNum
+
"]为NG ,发送 clearOutTask="
+
msg
,
1
);
//更新托盘为NG
//更新托盘为NG
TrayManager
.
UpdateInStoreNG
(
OutTrayNum
,
true
,
"工单料放料到接驳台失败"
);
TrayManager
.
UpdateInStoreNG
(
OutTrayNum
,
true
,
"工单料放料到接驳台失败"
);
}
}
else
else
{
{
OutLog
(
logName
+
MoveInfo
.
SLog
+
",工单料到达接驳台失败 (未抓起料盘),更新托盘["
+
OutTrayNum
+
"]为NG ,发送 clearOutTask="
+
msg
,
1
);
OutLog
(
logName
+
MoveInfo
.
SLog
+
",工单料到达接驳台失败 (未抓起料盘),更新托盘["
+
OutTrayNum
+
"]为NG ,发送 clearOutTask="
+
msg
,
1
);
//更新托盘为NG
//更新托盘为NG
TrayManager
.
UpdateInStoreNG
(
OutTrayNum
,
true
,
"工单料放料到接驳台失败(未抓起料盘)"
);
TrayManager
.
UpdateInStoreNG
(
OutTrayNum
,
true
,
"工单料放料到接驳台失败(未抓起料盘)"
);
}
}
}
}
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
JM_15_ClampCheck
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
JM_15_ClampCheck
);
OutLog
(
logName
+
MoveInfo
.
SLog
+
":夹爪料盘检测无料 "
,
1
);
OutLog
(
logName
+
MoveInfo
.
SLog
+
":夹爪料盘检测无料 "
,
1
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
HY_ClampCylinder_Check
,
IO_VALUE
.
LOW
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
HY_ClampCylinder_Check
,
IO_VALUE
.
LOW
));
}
}
...
@@ -902,7 +905,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -902,7 +905,8 @@ namespace OnlineStore.DeviceLibrary
TaskData
taskData
;
TaskData
taskData
;
string
msg
=
SServerManager
.
afterPutCut
(
Name
,
"BN"
,
code
,
""
,
1
,
out
taskData
);
string
msg
=
SServerManager
.
afterPutCut
(
Name
,
"BN"
,
code
,
""
,
1
,
out
taskData
);
afterPutCutOK
=
true
;
afterPutCutOK
=
true
;
}
else
if
(
MoveInfo
.
MoveParam
.
cutReel
)
}
else
if
(
MoveInfo
.
MoveParam
.
cutReel
)
{
{
OutLog
(
logName
+
MoveInfo
.
SLog
+
",分盘料已放入NG箱,发送 afterPutCut "
);
OutLog
(
logName
+
MoveInfo
.
SLog
+
",分盘料已放入NG箱,发送 afterPutCut "
);
TaskData
taskData
;
TaskData
taskData
;
...
@@ -937,7 +941,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -937,7 +941,7 @@ namespace OnlineStore.DeviceLibrary
}
}
if
(
afterPutCutOK
)
if
(
afterPutCutOK
)
{
{
ClearTimeoutAlarm
(
"给服务器发送 "
+
log
+
" 完成"
);
ClearTimeoutAlarm
(
"给服务器发送 "
+
log
+
" 完成"
);
MoveEndS
();
MoveEndS
();
}
}
else
if
(
MoveInfo
.
IsTimeOut
(
60
))
else
if
(
MoveInfo
.
IsTimeOut
(
60
))
...
@@ -1023,7 +1027,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1023,7 +1027,7 @@ namespace OnlineStore.DeviceLibrary
int
tLength
=
15
;
int
tLength
=
15
;
if
(!
String
.
IsNullOrEmpty
(
RFIDIP
))
if
(!
String
.
IsNullOrEmpty
(
RFIDIP
))
{
{
msg
+=
"当前托盘:"
+
currTrayNum
+
" 上个托盘:"
+
preTrayNum
+
",料盘托盘:"
+
OutTrayNum
+
"\n"
;
msg
+=
"当前托盘:"
+
currTrayNum
+
" 上个托盘:"
+
preTrayNum
+
",料盘托盘:"
+
OutTrayNum
+
"\n"
;
}
}
msg
+=
"runS: "
+
runStatus
+
"\n"
;
msg
+=
"runS: "
+
runStatus
+
"\n"
;
msg
+=
"alarm: "
+
alarmType
+
" "
+
LastAlarmTime
.
ToLongTimeString
()
+
"\n"
;
msg
+=
"alarm: "
+
alarmType
+
" "
+
LastAlarmTime
.
ToLongTimeString
()
+
"\n"
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论