Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO775-DUOStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 195d453e
由
刘韬
编写于
2022-04-27 09:27:48 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
a684000c
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
24 行增加
和
6 行删除
source/DeviceLibrary/duoStore/BoxBean.cs
source/DeviceLibrary/duoStore/BoxBean_Camera.cs
source/DeviceLibrary/duoStore/BoxBean_Partial.cs
source/DeviceLibrary/duoStore/BoxBean.cs
查看文件 @
195d453
...
...
@@ -345,7 +345,7 @@ namespace OnlineStore.DeviceLibrary
runStatus
=
StoreRunStatus
.
Wait
;
mainTimer
.
Enabled
=
false
;
CameraClose
();
//
CameraClose();
TimeSpan
span
=
DateTime
.
Now
-
StartTime
;
LogInfo
(
",停止运行,总运行时间:"
+
span
.
ToString
());
}
...
...
source/DeviceLibrary/duoStore/BoxBean_Camera.cs
查看文件 @
195d453
...
...
@@ -59,6 +59,9 @@ namespace OnlineStore.DeviceLibrary
GC
.
KeepAlive
(
camerathread
);
}
~
BoxBean
()
{
CameraClose
();
}
int
errortimes
=
0
;
void
startCamera
()
{
...
...
@@ -66,7 +69,11 @@ namespace OnlineStore.DeviceLibrary
{
try
{
Bitmap
bmp
=
camera
.
GetImage
(
CameraDeviceName
);
Bitmap
bmp
;
lock
(
camera
)
{
bmp
=
camera
.
GetImage
(
CameraDeviceName
);
}
if
(
bmp
!=
null
)
{
errortimes
=
0
;
...
...
@@ -93,7 +100,11 @@ namespace OnlineStore.DeviceLibrary
errortimes
++;
}
}
camera
.
Close
(
CameraDeviceName
);
try
{
camera
.
Close
(
CameraDeviceName
);
}
catch
{
}
camera
.
Dispose
();
}
public
void
CameraClose
()
...
...
@@ -106,7 +117,11 @@ namespace OnlineStore.DeviceLibrary
try
{
LogUtil
.
info
(
Name
+
"库位文件名:"
+
filename
);
Bitmap
bmp
=
camera
.
GetImage
(
CameraDeviceName
);
Bitmap
bmp
;
lock
(
camera
)
{
bmp
=
camera
.
GetImage
(
CameraDeviceName
);
}
if
(
bmp
!=
null
)
{
if
(
File
.
Exists
(
filename
))
...
...
@@ -115,6 +130,9 @@ namespace OnlineStore.DeviceLibrary
bmp
.
Save
(
filename
,
ImageFormat
.
Jpeg
);
bmp
.
Dispose
();
}
else
{
LogUtil
.
info
(
Name
+
"获取图像失败"
);
}
}
catch
(
Exception
e
)
{
...
...
source/DeviceLibrary/duoStore/BoxBean_Partial.cs
查看文件 @
195d453
...
...
@@ -249,8 +249,7 @@ namespace OnlineStore.DeviceLibrary
//OutDoorReelType = 2;
}
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
SI_09_InoutToP1
))
{
CameraGrabOne
(
GetFixtureStateFilename
(
MoveInfo
.
MoveParam
,
FixtureState
.
Out
));
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SI_10_GoBack
);
InOutStoreLog
(
outType
+
"升降轴到P1["
+
moveP
.
UpDown_P1
+
"],旋转轴到P1["
+
moveP
.
Middle_P1
+
"] ,压紧轴到P1["
+
moveP
.
ComPress_P1
+
"],"
);
//ComAxis.AbsMove(MoveInfo, moveP.ComPress_P1, Config.CompAxis_P1_Speed);
...
...
@@ -263,6 +262,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
SI_10_GoBack
))
{
CameraGrabOne
(
GetFixtureStateFilename
(
MoveInfo
.
MoveParam
,
FixtureState
.
Out
));
TimeSpan
span
=
DateTime
.
Now
-
startInStoreTime
;
string
posId
=
MoveInfo
.
MoveParam
!=
null
?
MoveInfo
.
MoveParam
.
PosID
:
""
;
LogUtil
.
info
(
Name
+
" 【"
+
posId
+
"】入库结束,耗时【"
+
FormUtil
.
GetSpanStr
(
span
)
+
"】"
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论