Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit b4731239
由
LN
编写于
2020-11-27 13:42:38 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
图片保存增加勾选项,增加请重写功能
1 个父辈
0a095af6
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
27 行增加
和
14 行删除
source/AssemblyLineClient/FrmLineStore.Designer.cs
source/AssemblyLineClient/FrmLineStore.cs
source/DeviceLibrary/assemblyLine/EquipBase.cs
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
source/AssemblyLineClient/FrmLineStore.Designer.cs
查看文件 @
b473123
此文件的差异被折叠,
点击展开。
source/AssemblyLineClient/FrmLineStore.cs
查看文件 @
b473123
...
...
@@ -520,15 +520,11 @@ namespace OnlineStore.AssemblyLine
private
void
timer1_Tick
(
object
sender
,
EventArgs
e
)
{
LogM
();
if
(!
listView1
.
Visible
)
if
(!
this
.
Visible
)
{
return
;
}
string
canScanCode
=
""
;
//if (lineBean.lineStatus.Equals(LineStatus.StoreOnline) && lineBean.runStatus.Equals(LineRunStatus.Runing))
//{
// //canScanCode = lineBean.CanScanCode() ? "(可扫码入库)" : "(出库未完成,不可扫码入库)";
string
canScanCode
=
""
;
if
(
AgvClient
.
CurrCancelState
)
{
aGVCancelStateToolStripMenuItem
.
Text
=
gouStr
+
" AGV cancelState"
;
...
...
@@ -562,7 +558,10 @@ namespace OnlineStore.AssemblyLine
}
}
}
if
(!
listView1
.
Visible
)
{
return
;
}
lblWarnMsg
.
Text
=
warnMsg
;
int
i
=
0
;
...
...
@@ -1163,6 +1162,18 @@ namespace OnlineStore.AssemblyLine
LogUtil
.
info
(
Name
+
" 点击:"
+
aGVCancelStateToolStripMenuItem
.
Text
);
}
private
void
chbSaveImage_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
if
(!
LoadOk
)
{
return
;
}
if
(
CodeManager
.
SaveImage
.
Equals
(
chbSaveImage
.
Checked
))
{
return
;
}
CodeManager
.
SaveImage
=
(
chbSaveImage
.
Checked
);
LogUtil
.
info
(
"勾选 保存扫码图片功能:CodeManager.SaveImage ="
+
CodeManager
.
SaveImage
);
}
}
}
source/DeviceLibrary/assemblyLine/EquipBase.cs
查看文件 @
b473123
...
...
@@ -463,7 +463,7 @@ namespace OnlineStore.DeviceLibrary
CheckAlarmProcess
(
moveInfo
,
LineAlarmType
.
IoSingleTimeOut
);
}
}
else
if
(
rwSpan
.
TotalSeconds
>
5
&&
span
.
TotalSeconds
>
6
&&
span
.
TotalSeconds
<
LineManager
.
Config
.
IOSingle_TimerOut
*
2
)
if
(
rwSpan
.
TotalSeconds
>
5
&&
span
.
TotalSeconds
>
6
&&
span
.
TotalSeconds
<
LineManager
.
Config
.
IOSingle_TimerOut
*
2
)
{
preRWTime
=
DateTime
.
Now
;
string
msg
=
moveInfo
.
Name
+
" ["
+
moveInfo
.
MoveType
+
"]["
+
moveInfo
.
MoveStep
+
"] "
+
NotOkMsg
+
"已等待 "
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"秒,重写DO:"
;
...
...
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
查看文件 @
b473123
...
...
@@ -16,6 +16,7 @@ namespace OnlineStore.DeviceLibrary
{
public
class
CodeManager
{
public
static
bool
SaveImage
=
false
;
public
static
List
<
string
>
codeTypeList
=
new
List
<
string
>();
public
static
List
<
string
>
balserNameList
=
new
List
<
string
>();
public
static
List
<
string
>
hikNameList
=
new
List
<
string
>();
...
...
@@ -124,8 +125,8 @@ namespace OnlineStore.DeviceLibrary
bool
findRightCode
=
false
;
try
{
ho_Image
=
Camera
.
_cam
.
CaptureOnImage
(
cameraName
);
if
(
ho_Image
==
null
)
ho_Image
=
Camera
.
_cam
.
CaptureOnImage
(
cameraName
);
if
(
ho_Image
==
null
)
{
LogUtil
.
error
(
deviceName
+
" 【"
+
cameraName
+
"】取图片失败["
+
Camera
.
_cam
.
ErrInfo
+
"],关闭相机"
);
CloseCamera
(
cameraName
);
...
...
@@ -165,9 +166,10 @@ namespace OnlineStore.DeviceLibrary
break
;
}
}
if
(!
findRightCode
&&
SaveErrorImageToFile
.
Equals
(
1
))
//if (!findRightCode && SaveErrorImageToFile.Equals(1))
if
(
SaveImage
)
{
SaveImageToFile
(
deviceName
,
cameraName
,
ho_Image
);
SaveImageToFile
(
deviceName
,
cameraName
,
ho_Image
);
}
if
(
deviceName
!=
""
||
r
!=
""
)
{
...
...
@@ -210,7 +212,7 @@ namespace OnlineStore.DeviceLibrary
return
codeList
;
}
private
static
int
SaveErrorImageToFile
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
SaveErrorImageToFile
);
private
static
int
SaveErrorImageToFile
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
SaveErrorImageToFile
);
private
static
void
SaveImageToFile
(
string
deviceName
,
string
cameraName
,
HalconDotNet
.
HObject
bitmap
)
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论