Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 580a219a
由
LN
编写于
2020-03-15 10:53:11 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
扫码增加总次数统计
1 个父辈
e4da2f0c
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
29 行增加
和
3 行删除
source/DeviceLibrary/assemblyLine/DischargeLine.cs
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
source/DeviceLibrary/assemblyLine/DischargeLine.cs
查看文件 @
580a219
...
@@ -82,14 +82,16 @@ namespace OnlineStore.DeviceLibrary
...
@@ -82,14 +82,16 @@ namespace OnlineStore.DeviceLibrary
SetWarnMsg
(
Name
+
"启动失败:急停未开"
);
SetWarnMsg
(
Name
+
"启动失败:急停未开"
);
return
false
;
return
false
;
}
}
StationInfo_Move
=
new
StationTrayInfo
();
StationInfo_NG
=
new
StationTrayInfo
();
StationInfo_Scan
=
new
StationTrayInfo
();
mainTimer
.
Stop
();
mainTimer
.
Stop
();
MoveInfo
.
EndMove
();
MoveInfo
.
EndMove
();
SecondMoveInfo
.
EndMove
();
SecondMoveInfo
.
EndMove
();
lineStatus
=
LineStatus
.
StoreOnline
;
lineStatus
=
LineStatus
.
StoreOnline
;
runStatus
=
LineRunStatus
.
HomeMoving
;
runStatus
=
LineRunStatus
.
HomeMoving
;
MoveInfo
.
NewMove
(
LineMoveType
.
ReturnHome
);
MoveInfo
.
NewMove
(
LineMoveType
.
ReturnHome
);
//启动时需要主动扫码一次
NewTypeScan
(
true
);
StartReset
();
StartReset
();
if
(
isDebug
)
if
(
isDebug
)
{
{
...
@@ -176,6 +178,19 @@ namespace OnlineStore.DeviceLibrary
...
@@ -176,6 +178,19 @@ namespace OnlineStore.DeviceLibrary
case
LineMoveStep
.
DL_R_CylinderDown
:
case
LineMoveStep
.
DL_R_CylinderDown
:
IOMove
(
IO_Type
.
SeparateDevice_Run
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
SeparateDevice_Run
,
IO_VALUE
.
HIGH
);
LogInfo
(
MoveInfo
.
MoveType
+
"完成,接驳台皮带线常转 "
);
LogInfo
(
MoveInfo
.
MoveType
+
"完成,接驳台皮带线常转 "
);
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
ReturnHome
))
{
//启动时,出口定位信号亮,需要主动扫码一次
if
(
IOValue
(
IO_Type
.
Location_Check3
).
Equals
(
IO_VALUE
.
HIGH
))
{
LogUtil
.
info
(
Name
+
"启动时长皮带线定位信号亮,触发一次扫码"
);
NewTypeScan
(
true
);
}
else
{
}
}
MoveEndS
();
MoveEndS
();
SecondMoveInfo
.
EndMove
();
SecondMoveInfo
.
EndMove
();
break
;
break
;
...
@@ -508,10 +523,19 @@ namespace OnlineStore.DeviceLibrary
...
@@ -508,10 +523,19 @@ namespace OnlineStore.DeviceLibrary
{
{
LastCode
=
""
;
LastCode
=
""
;
StationInfo_Scan
=
new
StationTrayInfo
(
IO_VALUE
.
HIGH
,
LastCode
);
StationInfo_Scan
=
new
StationTrayInfo
(
IO_VALUE
.
HIGH
,
LastCode
);
if
(
DeviceID
.
Equals
(
301
))
if
(
DeviceID
.
Equals
(
301
))
{
{
if
(
Line3LastTrayP
>
Line3MaxPosition
)
{
Line3LastTrayP
=
Line3MaxPosition
;
}
StationInfo_NG
=
new
StationTrayInfo
(
StationInfo_Scan
.
TrayValue
,
StationInfo_Scan
.
CodeStr
);
StationInfo_NG
=
new
StationTrayInfo
(
StationInfo_Scan
.
TrayValue
,
StationInfo_Scan
.
CodeStr
);
}
}
else
{
if
(
Line3LastTrayP
>
Line3MaxPosition
-
1
)
{
Line3LastTrayP
=
Line3MaxPosition
-
1
;
}
}
LogUtil
.
info
(
hengyiName
+
"扫码工位:开始扫码,IsInScanCode="
+
IsInScanCode
);
LogUtil
.
info
(
hengyiName
+
"扫码工位:开始扫码,IsInScanCode="
+
IsInScanCode
);
List
<
string
>
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
hengyiName
);
List
<
string
>
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
hengyiName
);
if
(
LastCodeList
.
Count
<=
0
)
if
(
LastCodeList
.
Count
<=
0
)
...
...
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
查看文件 @
580a219
...
@@ -112,6 +112,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -112,6 +112,7 @@ namespace OnlineStore.DeviceLibrary
// }
// }
// return bitm;
// return bitm;
//}
//}
private
static
int
ScanCount
=
0
;
private
static
int
codeCount
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
CodeCount
);
private
static
int
codeCount
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
CodeCount
);
[
HandleProcessCorruptedStateExceptions
]
[
HandleProcessCorruptedStateExceptions
]
public
static
List
<
string
>
CameraScan
(
List
<
string
>
cameraList
,
string
deviceName
,
bool
isSaveImg
=
false
)
public
static
List
<
string
>
CameraScan
(
List
<
string
>
cameraList
,
string
deviceName
,
bool
isSaveImg
=
false
)
...
@@ -133,6 +134,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -133,6 +134,7 @@ namespace OnlineStore.DeviceLibrary
{
{
continue
;
continue
;
}
}
ScanCount
++;
DateTime
startTime
=
DateTime
.
Now
;
DateTime
startTime
=
DateTime
.
Now
;
LogUtil
.
info
(
deviceName
+
" 【"
+
cameraName
+
"】开始取图片"
);
LogUtil
.
info
(
deviceName
+
" 【"
+
cameraName
+
"】开始取图片"
);
//using (Bitmap bitmap = GetCamerImage(cameraName))
//using (Bitmap bitmap = GetCamerImage(cameraName))
...
@@ -179,7 +181,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -179,7 +181,7 @@ namespace OnlineStore.DeviceLibrary
{
{
// SaveImageToFile(deviceName, cameraName, bit);
// SaveImageToFile(deviceName, cameraName, bit);
}
}
LogUtil
.
info
(
deviceName
+
" 【"
+
cameraName
+
"】扫码完成【"
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
"】:"
+
r
);
LogUtil
.
info
(
deviceName
+
" 【"
+
cameraName
+
"】扫码完成【"
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
"】
"
+
ScanCount
+
"
:"
+
r
);
}
}
catch
(
AccessViolationException
e
)
catch
(
AccessViolationException
e
)
{
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论