Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO815-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 03f4a83b
由
几米阳光
编写于
2019-04-20 15:55:10 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
0877157c
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
36 行增加
和
16 行删除
source/ACSingleStore/FrmStoreBox.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/halcon/CodeManager.cs
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
03f4a83
...
@@ -1317,9 +1317,12 @@ namespace OnlineStore.AutoInOutStore
...
@@ -1317,9 +1317,12 @@ namespace OnlineStore.AutoInOutStore
{
{
stop_button_Click
(
null
,
null
);
stop_button_Click
(
null
,
null
);
}
}
LogUtil
.
info
(
"ExitApp:停止料仓运行"
);
store
.
Exit
();
store
.
Exit
();
LogUtil
.
info
(
"ExitApp:料仓已停止,关闭所有DO"
);
IOManager
.
instance
.
CloseAllDO
();
IOManager
.
instance
.
CloseAllDO
();
StoreOpenStatus
(
false
);
StoreOpenStatus
(
false
);
LogUtil
.
info
(
"ExitApp:关闭所有DO完成,端口所有IO连接"
);
IOManager
.
instance
.
CloseAllConnection
();
IOManager
.
instance
.
CloseAllConnection
();
//KNDAIManager.CloseAllConnection();
//KNDAIManager.CloseAllConnection();
//WCFControl.CloseWCF();
//WCFControl.CloseWCF();
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
03f4a83
...
@@ -753,7 +753,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -753,7 +753,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
public
override
void
StopRun
()
public
override
void
StopRun
()
{
{
WarnMsg
=
""
;
WarnMsg
=
""
;
autoNext
=
false
;
autoNext
=
false
;
IoCheckTimer
.
Enabled
=
false
;
IoCheckTimer
.
Enabled
=
false
;
serverConnectTimer
.
Enabled
=
false
;
serverConnectTimer
.
Enabled
=
false
;
...
@@ -764,7 +764,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -764,7 +764,9 @@ namespace OnlineStore.DeviceLibrary
storeRunStatus
=
StoreRunStatus
.
Wait
;
storeRunStatus
=
StoreRunStatus
.
Wait
;
storeStatus
=
StoreStatus
.
ResetMove
;
storeStatus
=
StoreStatus
.
ResetMove
;
//mainTimer.Enabled = false;
//mainTimer.Enabled = false;
LogUtil
.
info
(
"StopRun:批量模块停止运行"
);
AutomaticBaiting
.
StopRun
();
AutomaticBaiting
.
StopRun
();
LogUtil
.
info
(
"StopRun:关闭所有DO"
);
IOManager
.
instance
.
CloseAllDO
();
IOManager
.
instance
.
CloseAllDO
();
if
(
IsHasCompress_Axis
)
if
(
IsHasCompress_Axis
)
{
{
...
@@ -772,7 +774,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -772,7 +774,7 @@ namespace OnlineStore.DeviceLibrary
}
}
HumitureController
.
Release
();
HumitureController
.
Release
();
StoreManager
.
CurrInOutType
=
0
;
StoreManager
.
CurrInOutType
=
0
;
LogUtil
.
info
(
LOGGER
,
StoreName
+
",停止运行,总运行时间:"
+
runTimeWatch
.
Elapsed
.
ToString
());
LogUtil
.
info
(
LOGGER
,
StoreName
+
"
StopRun
,停止运行,总运行时间:"
+
runTimeWatch
.
Elapsed
.
ToString
());
}
}
public
void
Exit
()
public
void
Exit
()
{
{
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
03f4a83
...
@@ -479,7 +479,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -479,7 +479,7 @@ namespace OnlineStore.DeviceLibrary
lastPosIdStatus
=
StoreStatus
.
InStoreEnd
;
lastPosIdStatus
=
StoreStatus
.
InStoreEnd
;
storeStatus
=
StoreStatus
.
InStoreEnd
;
storeStatus
=
StoreStatus
.
InStoreEnd
;
//手动发给服务器状态,防止没有手动
//手动发给服务器状态,防止没有手动
//SendLineStatus(StoreID, posId, StoreStatus.InStoreEnd
);
SendLineStatus
(
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_12_PutWareToBag
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_12_PutWareToBag
);
ComMoveToPosition
(
moveP
.
ComPress_P3
,
true
);
ComMoveToPosition
(
moveP
.
ComPress_P3
,
true
);
...
@@ -721,6 +721,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -721,6 +721,8 @@ namespace OnlineStore.DeviceLibrary
lastPosId
=
posId
;
lastPosId
=
posId
;
lastPosIdStatus
=
StoreStatus
.
OutStoreBoxEnd
;
lastPosIdStatus
=
StoreStatus
.
OutStoreBoxEnd
;
storeStatus
=
StoreStatus
.
OutStoreBoxEnd
;
storeStatus
=
StoreStatus
.
OutStoreBoxEnd
;
//手动发给服务器状态,防止没有手动
SendLineStatus
();
}
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_06_BagDeviceBack
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_06_BagDeviceBack
)
...
@@ -976,8 +978,16 @@ namespace OnlineStore.DeviceLibrary
...
@@ -976,8 +978,16 @@ namespace OnlineStore.DeviceLibrary
public
void
AddWaitOutInfo
(
FixtureCodeInfo
code
)
public
void
AddWaitOutInfo
(
FixtureCodeInfo
code
)
{
{
lock
(
waitOutListLock
)
lock
(
waitOutListLock
)
{
{
//判断已经有此库位号的出库信息,直接抛弃不处理
waitOutStoreList
.
Add
(
code
);
List
<
FixtureCodeInfo
>
list
=
(
from
m
in
waitOutStoreList
where
m
.
PosId
.
Equals
(
code
.
PosId
)
select
m
).
ToList
<
FixtureCodeInfo
>();
if
(
list
.
Count
>
0
)
{
LogUtil
.
info
(
"【"
+
code
.
ToStr
()
+
"】 加入等待队列失败,【"
+
code
.
PosId
+
"】已在出库队列中"
);
}
else
{
waitOutStoreList
.
Add
(
code
);
}
}
}
}
}
...
...
source/DeviceLibrary/halcon/CodeManager.cs
查看文件 @
03f4a83
...
@@ -46,7 +46,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -46,7 +46,7 @@ namespace OnlineStore.DeviceLibrary
codeTypeList
.
Add
(
str
.
Trim
());
codeTypeList
.
Add
(
str
.
Trim
());
}
}
LoadCamera
();
LoadCamera
(
false
);
CodeLibrary
.
HDCodeLearnHelper
.
LoadConfig
(
nameStr
,
codeStr
);
CodeLibrary
.
HDCodeLearnHelper
.
LoadConfig
(
nameStr
,
codeStr
);
}
}
...
@@ -55,8 +55,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -55,8 +55,13 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
"解析摄像机配置出错:"
+
ex
.
ToString
());
LogUtil
.
error
(
"解析摄像机配置出错:"
+
ex
.
ToString
());
}
}
}
}
private
static
void
LoadCamera
(
)
private
static
void
LoadCamera
(
bool
isReLoad
)
{
{
if
(
isReLoad
)
{
CodeLibrary
.
HIKCamera
.
Instance
.
Load
();
CodeLibrary
.
BaslerCamera
.
Instance
.
Load
();
}
string
[]
names
=
CodeLibrary
.
HIKCamera
.
Instance
.
CameraName
;
string
[]
names
=
CodeLibrary
.
HIKCamera
.
Instance
.
CameraName
;
hikNameList
.
AddRange
(
names
);
hikNameList
.
AddRange
(
names
);
names
=
CodeLibrary
.
BaslerCamera
.
Instance
.
CameraName
;
names
=
CodeLibrary
.
BaslerCamera
.
Instance
.
CameraName
;
...
@@ -74,12 +79,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -74,12 +79,7 @@ namespace OnlineStore.DeviceLibrary
{
{
Bitmap
bitm
=
null
;
Bitmap
bitm
=
null
;
//若未加载到相机,需要重新加载相机
if
(
balserNameList
.
Count
<=
0
&&
hikNameList
.
Count
<=
0
)
{
LogUtil
.
error
(
"获取图片时发现未加载到相机,重新加载相机"
);
LoadCamera
();
}
if
(
balserNameList
.
Contains
(
cameraName
))
if
(
balserNameList
.
Contains
(
cameraName
))
{
{
BaslerCamera
.
Instance
.
Open
(
cameraName
);
BaslerCamera
.
Instance
.
Open
(
cameraName
);
...
@@ -87,7 +87,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -87,7 +87,7 @@ namespace OnlineStore.DeviceLibrary
bitm
=
BaslerCamera
.
Instance
.
Image
;
bitm
=
BaslerCamera
.
Instance
.
Image
;
BaslerCamera
.
Instance
.
Close
();
BaslerCamera
.
Instance
.
Close
();
}
}
else
if
(
hikNameList
.
Contains
(
cameraName
))
else
if
(
hikNameList
.
Contains
(
cameraName
))
{
{
HIKCamera
.
Instance
.
Open
(
cameraName
);
HIKCamera
.
Instance
.
Open
(
cameraName
);
HIKCamera
.
Instance
.
GrabOne
();
HIKCamera
.
Instance
.
GrabOne
();
...
@@ -96,11 +96,16 @@ namespace OnlineStore.DeviceLibrary
...
@@ -96,11 +96,16 @@ namespace OnlineStore.DeviceLibrary
}
}
else
else
{
{
LogUtil
.
info
(
"未找到摄像机【"
+
cameraName
+
"】无法获取图片"
);
LogUtil
.
info
(
"未找到摄像机【"
+
cameraName
+
"】无法获取图片"
);
//若未加载到相机,需要重新加载相机
if
(
balserNameList
.
Count
<=
0
&&
hikNameList
.
Count
<=
0
)
{
LogUtil
.
error
(
"获取图片时发现未加载到相机,重新加载相机"
);
LoadCamera
(
true
);
}
}
}
return
bitm
;
return
bitm
;
}
}
[
HandleProcessCorruptedStateExceptions
]
[
HandleProcessCorruptedStateExceptions
]
public
static
List
<
string
>
CameraScan
()
public
static
List
<
string
>
CameraScan
()
{
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论