Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit dee11770
由
LN
编写于
2020-03-20 09:15:36 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
扫码次数修改
1 个父辈
86ebf9cf
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
29 行增加
和
18 行删除
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
dee1177
...
...
@@ -232,7 +232,9 @@ namespace OnlineStore.DeviceLibrary
SetWarnMsg
();
CurrInOutACount
=
0
;
CurrInOutCount
=
0
;
InStoreFail
=
false
;
ClearInoutFail
();
IOManager
.
IOMove
(
IO_Type
.
Alarm_HddLed
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
AutoRun_HddLed
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
RunSign_HddLed
,
IO_VALUE
.
LOW
);
...
...
@@ -270,8 +272,8 @@ namespace OnlineStore.DeviceLibrary
CurrInOutCount
=
0
;
CurrInOutACount
=
0
;
InStoreFail
=
false
;
C
urrScanCount
=
0
;
C
learInoutFail
()
;
IOManager
.
IOMove
(
IO_Type
.
Alarm_HddLed
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
AutoRun_HddLed
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
RunSign_HddLed
,
IO_VALUE
.
LOW
);
...
...
@@ -1075,8 +1077,11 @@ namespace OnlineStore.DeviceLibrary
isWaitScan
=
false
;
IsScanCode
=
true
;
CurrScanCount
++;
LogUtil
.
info
(
StoreName
+
"检测到"
+
height
+
"寸料盘,开始扫码,次数 ["
+
CurrScanCount
+
"]"
);
GetCameraCode
();
LogUtil
.
info
(
StoreName
+
"["
+
CurrScanCount
+
"]检测到"
+
height
+
"寸料盘,开始扫码"
);
// GetCameraCode();
IOManager
.
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
HIGH
);
LastScanTime
=
DateTime
.
Now
;
dlScanSocket
.
BeginScan
();
}
}
else
...
...
@@ -1087,8 +1092,8 @@ namespace OnlineStore.DeviceLibrary
}
else
{
InStoreFail
=
false
;
C
urrScanCount
=
0
;
C
learInoutFail
()
;
isWaitScan
=
false
;
}
}
...
...
@@ -1350,7 +1355,7 @@ namespace OnlineStore.DeviceLibrary
if
(
CurrScanCount
>=
MaxScanCount
)
{
InStoreFail
=
true
;
LogUtil
.
info
(
LOGGER
,
StoreName
+
"
没有收到二维码信息 【"
+
CurrScanCount
+
"】次
,请重新放入料盘,通知服务器未扫到条码"
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"
["
+
CurrScanCount
+
"]未收到二维码
,请重新放入料盘,通知服务器未扫到条码"
);
//TODO 向服务器发送未扫到码消息
//发送扫码内容到服务器进行入库操作
...
...
@@ -1362,12 +1367,12 @@ namespace OnlineStore.DeviceLibrary
else
{
LogUtil
.
info
(
LOGGER
,
StoreName
+
"
没有收到二维码信息 【"
+
CurrScanCount
+
"】次
,请重新放入料盘"
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"
["
+
CurrScanCount
+
"]未收到二维码
,请重新放入料盘"
);
}
return
;
}
InStoreFail
=
false
;
//
InStoreFail = false;
if
(
storeRunStatus
.
Equals
(
StoreRunStatus
.
Wait
))
{
LogUtil
.
info
(
LOGGER
,
StoreName
+
"二维码【 "
+
message
+
"】,设备未启动,不需要发送服务器"
);
...
...
@@ -1391,6 +1396,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(!
string
.
IsNullOrEmpty
(
resultOperation
.
msg
))
{
InStoreFail
=
true
;
//如果有提示消息,直接显示提示
LogUtil
.
info
(
LOGGER
,
StoreName
+
" 二维码【"
+
message
+
"】 服务器反馈 :"
+
resultOperation
.
msg
);
IsScanCode
=
false
;
...
...
@@ -1446,7 +1452,8 @@ namespace OnlineStore.DeviceLibrary
//根据发送的posId获取位置列表
ACStorePosition
position
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
posId
);
if
(
position
==
null
)
{
//出入库没有找到服务器发送的库位,需要打印日志方便查询原因
{
//出入库没有找到服务器发送的库位,需要打印日志方便查询原因
InStoreFail
=
true
;
SetWarnMsg
(
ResourceControl
.
InStoreNoPosition
,
message
,
posId
);
// WarnMsg = "入库未找到库位:二维码【" + message + "】库位【" + posId + "】 ";
...
...
@@ -1457,8 +1464,7 @@ namespace OnlineStore.DeviceLibrary
//TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器;
if
(
CanStarInOut
())
{
InStoreFail
=
false
;
IsScanCode
=
false
;
ClearInoutFail
();
InOutStoreParam
param
=
new
InOutStoreParam
(
message
,
posId
,
plateH
,
plateW
,
0
);
StartInStoreMove
(
param
);
...
...
@@ -1474,7 +1480,12 @@ namespace OnlineStore.DeviceLibrary
}
}
private
void
ClearInoutFail
()
{
CurrScanCount
=
0
;
InStoreFail
=
false
;
IsScanCode
=
false
;
}
#
endregion
#
region
Halcon
扫码枪代码
...
...
@@ -1934,9 +1945,9 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
"收到服务器命令:op="
+
resultOperation
.
op
+
",未找到对应处理"
);
}
TimeSpan
span
=
DateTime
.
Now
-
time
;
if
(
span
.
TotalMilliseconds
>
10
)
if
(
span
.
TotalMilliseconds
>
10
0
)
{
LogUtil
.
info
(
StoreName
+
"
执行TimerProcess 共处理了【"
+
span
.
TotalMilliseconds
+
"】毫秒
"
);
LogUtil
.
info
(
StoreName
+
"
TimerProcess["
+
span
.
TotalMilliseconds
+
"]
"
);
}
}
private
void
ProcessHumidityCMD
(
Operation
resultOperation
)
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
dee1177
...
...
@@ -493,7 +493,7 @@ namespace OnlineStore.DeviceLibrary
{
TimeSpan
span
=
DateTime
.
Now
-
startInStoreTime
;
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PositionNum
:
""
;
LogUtil
.
info
(
LOGGER
,
StoreName
+
" 【"
+
posId
+
"】
整个入库流程结束,耗时【"
+
FormUtil
.
GetSpanStr
(
span
)
+
"】!
"
,
storeMoveColor
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
" 【"
+
posId
+
"】
入库结束["
+
FormUtil
.
GetSpanStr
(
span
)
+
"]
"
,
storeMoveColor
);
StoreMove
.
EndMove
();
storeRunStatus
=
StoreRunStatus
.
Runing
;
//设备连接,入库后,BOX恢复原始状态
...
...
@@ -750,7 +750,7 @@ namespace OnlineStore.DeviceLibrary
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PositionNum
:
""
;
storeStatus
=
StoreStatus
.
StoreOnline
;
LogUtil
.
info
(
LOGGER
,
StoreName
+
" 【"
+
posId
+
"】
整个出库流程结束,耗时【"
+
FormUtil
.
GetSpanStr
(
span
)
+
"】!
"
,
storeMoveColor
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
" 【"
+
posId
+
"】
出库结束["
+
FormUtil
.
GetSpanStr
(
span
)
+
"]
"
,
storeMoveColor
);
StoreMove
.
EndMove
();
storeRunStatus
=
StoreRunStatus
.
Runing
;
InOutEndProcess
(
StoreMoveType
.
OutStore
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论