Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 9c775eb9
由
LN
编写于
2020-03-13 09:40:24 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
e3121344
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
25 行增加
和
12 行删除
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
查看文件 @
9c775eb
...
...
@@ -264,7 +264,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MI_06_CylinderDown
);
InLog
(
"入库 "
+
MoveInfo
.
SLog
+
": 升降下降"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
200
));
UpdownDownP2Move
(
MoveInfo
.
MoveParam
.
PlateH
,
MoveInfo
.
MoveParam
.
PlateW
);
UpdownDownP2Move
(
MoveInfo
.
MoveParam
.
PlateH
,
MoveInfo
.
MoveParam
.
PlateW
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MI_06_CylinderDown
))
{
...
...
@@ -284,7 +284,16 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MI_09_CylinderUp
);
InLog
(
"入库 "
+
MoveInfo
.
SLog
+
": 上下气缸上升"
);
UpdownUpMove
();
CylinderMove
(
null
,
IO_Type
.
TopCylinder_UP
,
IO_Type
.
TopCylinder_Down
);
//if (MoveInfo.MoveParam.PlateW.Equals(7))
//{
// InLog("放托盘(放开阻挡): " + MoveInfo.SLog + " 7寸盘已移走,气缸1下降");
// SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopDown);
// CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
//}
//else
//{
CylinderMove
(
null
,
IO_Type
.
TopCylinder_UP
,
IO_Type
.
TopCylinder_Down
);
//}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MI_09_CylinderUp
))
{
...
...
@@ -295,10 +304,13 @@ namespace OnlineStore.DeviceLibrary
TrayManager
.
UpdateTrayInfo
(
num
);
//阻挡气缸移动
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
InLog
(
"放托盘(放开阻挡): "
+
MoveInfo
.
SLog
+
" 物品已移走,顶升气缸1下降"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_14_TopDown
);
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
TopCylinder_UP
,
IO_Type
.
TopCylinder_Down
);
//if (SecondMoveInfo.MoveStep < LineMoveStep.MO_14_TopDown)
//{
// SecondMoveInfo.NewMove(LineMoveType.CheckFixture);
InLog
(
"放托盘(放开阻挡): "
+
MoveInfo
.
SLog
+
" 物品已移走,顶升气缸1下降"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_14_TopDown
);
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
TopCylinder_UP
,
IO_Type
.
TopCylinder_Down
);
//}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MI_10_WaitBox
))
{
...
...
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
查看文件 @
9c775eb
...
...
@@ -494,7 +494,7 @@ namespace OnlineStore.DeviceLibrary
LogInfo
(
"出料 【"
+
posId
+
"】"
+
MoveInfo
.
SLog
+
" 更新托盘【"
+
num
+
"】为空"
);
// MoveInfo.WaitList.Add(WaitResultInfo.WaitProvidingEquipCanOut());
TrayManager
.
UpdateTrayInfo
(
num
);
//阻挡气缸移动
MO_14_TopCylinder_Down
();
}
...
...
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
查看文件 @
9c775eb
...
...
@@ -132,17 +132,18 @@ namespace OnlineStore.DeviceLibrary
{
continue
;
}
LogUtil
.
info
(
deviceName
+
" 【"
+
cameraName
+
"】开始打开相机获取图片"
);
DateTime
startTime
=
DateTime
.
Now
;
LogUtil
.
info
(
deviceName
+
" 【"
+
cameraName
+
"】开始取图片"
);
using
(
Bitmap
bitmap
=
GetCamerImage
(
cameraName
))
{
if
(
bitmap
==
null
)
{
LogUtil
.
error
(
deviceName
+
" 【"
+
cameraName
+
"】
获
取图片失败["
+
Camera
.
_cam
.
ErrInfo
+
"],关闭相机"
);
LogUtil
.
error
(
deviceName
+
" 【"
+
cameraName
+
"】取图片失败["
+
Camera
.
_cam
.
ErrInfo
+
"],关闭相机"
);
CloseCamera
(
cameraName
);
continue
;
}
LogUtil
.
info
(
deviceName
+
" 【"
+
cameraName
+
"】
获取图片完成,开始转换图片,
并扫码"
);
LogUtil
.
info
(
deviceName
+
" 【"
+
cameraName
+
"】
取图片完成,开始转换
并扫码"
);
System
.
Threading
.
Thread
.
Sleep
(
1
);
//转换托盘大概100-150ms,不打印日志
Bitmap
bit
=
new
Bitmap
(
bitmap
);
...
...
@@ -174,9 +175,9 @@ namespace OnlineStore.DeviceLibrary
}
if
(
String
.
IsNullOrEmpty
(
r
))
{
SaveImageToFile
(
deviceName
,
cameraName
,
bit
);
//
SaveImageToFile(deviceName, cameraName, bit);
}
LogUtil
.
info
(
deviceName
+
" 【"
+
cameraName
+
"】扫码完成:"
+
r
);
LogUtil
.
info
(
deviceName
+
" 【"
+
cameraName
+
"】扫码完成
【"
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
"】
:"
+
r
);
bit
.
Dispose
();
ho_Image
.
Dispose
();
bitmap
.
Dispose
();
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论