Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
SO1131-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit f36d0cee
由
张东亮
编写于
2023-03-17 10:33:20 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
入库料盘未抓起30秒报警并送入NG
1 个父辈
182f871a
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
38 行增加
和
28 行删除
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
source/DeviceLibrary/storeBean/EquipBase.cs
source/DeviceLibrary/storeBean/inputBean/BatchMoveBean.cs
source/DeviceLibrary/storeBean/inputBean/BatchMoveBean_Partial.cs
source/DeviceLibrary/storeBean/inputBean/InputEquip_InStore.cs
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
查看文件 @
f36d0ce
...
...
@@ -128,7 +128,6 @@ namespace OnlineStore.DeviceLibrary
continue
;
}
ScanCount
++;
DateTime
startTime
=
DateTime
.
Now
;
if
(
deviceName
!=
""
)
{
LogUtil
.
info
(
deviceName
+
" 【"
+
cameraName
+
"】开始取图片"
);
...
...
@@ -146,9 +145,8 @@ namespace OnlineStore.DeviceLibrary
LoadCamera
(
true
);
continue
;
}
DateTime
startTime
=
DateTime
.
Now
;
LogUtil
.
info
(
deviceName
+
" 【"
+
cameraName
+
"】取图片完成,开始扫码"
);
string
r
=
""
;
if
(!
isPreScan
)
{
...
...
source/DeviceLibrary/storeBean/EquipBase.cs
查看文件 @
f36d0ce
...
...
@@ -20,7 +20,6 @@ namespace OnlineStore.DeviceLibrary
public
bool
IsDebug
=
false
;
public
bool
MoveStop
=
false
;
public
bool
AxisAlarmFlag
=
false
;
//轴报警异常标识
protected
void
SetAllTimer
(
bool
open
)
{
IoCheckTimer
.
Enabled
=
open
;
...
...
source/DeviceLibrary/storeBean/inputBean/BatchMoveBean.cs
查看文件 @
f36d0ce
...
...
@@ -22,6 +22,10 @@ namespace OnlineStore.DeviceLibrary
public
string
WarnMsg
=
""
;
public
BatchMoveConfig
Config
=
null
;
public
int
ShelfType
=
0
;
/// <summary>
/// 机器人抓取料盘失败
/// </summary>
public
bool
ReelNotTakeOk
=
false
;
private
InputEquip
Robot
{
get
{
return
StoreManager
.
XLRStore
.
inputEquip
;
}
...
...
source/DeviceLibrary/storeBean/inputBean/BatchMoveBean_Partial.cs
查看文件 @
f36d0ce
...
...
@@ -367,7 +367,7 @@ namespace OnlineStore.DeviceLibrary
WorkLog
(
"料盘移栽 :开始扫码"
);
MoveInfo
.
OneWaitCanEndStep
=
true
;
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitFeedScanCode
());
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
6000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
6000
0
));
try
{
scanTask
=
Task
.
Factory
.
StartNew
(
delegate
...
...
@@ -377,7 +377,7 @@ namespace OnlineStore.DeviceLibrary
codes
=
CodeManager
.
CameraScan
(
Config
.
CameraName
,
Name
);
if
(
codes
.
Count
<=
0
)
{
LogUtil
.
error
(
$
"{Name} 第一次解码失败:{string.Join("
|
",codes)},重新解码"
);
LogUtil
.
error
(
$
"{Name} 第一次解码失败:{string.Join("
|
",
codes)},重新解码"
);
codes
=
CodeManager
.
CameraScan
(
Config
.
CameraName
,
Name
);
}
//TODO 需要判断是否和上次的条码重复,重复的条码不可用
...
...
@@ -534,9 +534,13 @@ namespace OnlineStore.DeviceLibrary
buchongStr
=
"(最后一盘料已补充5)"
;
height
+=
5
;
}
if
(
ReelNotTakeOk
)
{
LastHeight
=
1000
;
ReelNotTakeOk
=
false
;
}
//如果检测出<=15,都按照8计算
if
(
height
<=
15
)
else
if
(
height
<=
15
)
{
LastHeight
=
8
;
}
...
...
source/DeviceLibrary/storeBean/inputBean/InputEquip_InStore.cs
查看文件 @
f36d0ce
using
Asa
;
using
CodeLibrary
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
...
...
@@ -155,12 +156,33 @@ namespace OnlineStore.DeviceLibrary
}
else
{
II05_WaitAxisCheck
();
if
(
IOValue
(
IO_Type
.
Shelf_ReelCheck
).
Equals
(
IO_VALUE
.
LOW
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
II06_WaitHeight
);
BatchMove
.
GetTrayOK
();
}
else
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
II05_WaitAxisCheck
);
MoveLog
(
$
"入库取料, 等待定位料盘信号消失"
);
//MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Shelf_ReelCheck, IO_VALUE.LOW));
}
}
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
II05_WaitAxisCheck
))
{
II05_WaitAxisCheck
();
if
(
IOValue
(
IO_Type
.
Shelf_ReelCheck
).
Equals
(
IO_VALUE
.
LOW
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
II06_WaitHeight
);
BatchMove
.
GetTrayOK
();
}
else
if
(
MoveInfo
.
IsTimeOut
(
30
))
{
BatchMove
.
ReelNotTakeOk
=
true
;
WarnMsg
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
MoveStep
+
"] 等待"
+
IO_Type
.
Shelf_ReelCheck
+
"=HIGH 超时 "
+
Math
.
Round
((
DateTime
.
Now
-
MoveInfo
.
LastSetpTime
).
TotalSeconds
,
1
)
+
"秒"
;
LogUtil
.
error
(
WarnMsg
);
}
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
II06_WaitHeight
))
{
...
...
@@ -176,13 +198,12 @@ namespace OnlineStore.DeviceLibrary
//}
MoveInfo
.
MoveParam
.
PosInfo
.
PlateH
=
Height
;
MoveInfo
.
MoveParam
.
PosInfo
.
PlateW
=
width
;
MoveLog
(
$
"入库取料{shelf}{MoveInfo.SLog}: 料盘尺寸{width}X{Height}"
);
II13_GetPosId
();
}
else
if
(
MoveInfo
.
IsTimeOut
(
60
))
{
MoveTimeOut
(
MoveInfo
,
""
+
moveBean
.
Name
+
"获取料盘高度完成"
);
MoveTimeOut
(
MoveInfo
,
""
+
moveBean
.
Name
+
"获取料盘高度完成
超时
"
);
}
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
II08_GetPosId
))
...
...
@@ -533,22 +554,6 @@ namespace OnlineStore.DeviceLibrary
});
}
private
void
II05_WaitAxisCheck
()
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
II05_WaitAxisCheck
);
MoveLog
(
$
"入库取料, 等待定位料盘信号消失,通知料串料盘已离开"
);
if
(
IOValue
(
IO_Type
.
Shelf_ReelCheck
).
Equals
(
IO_VALUE
.
LOW
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
II06_WaitHeight
);
BatchMove
.
GetTrayOK
();
}
else
{
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Shelf_ReelCheck
,
IO_VALUE
.
LOW
));
}
}
#
endregion
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论