Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
AutoCountMachine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit ad40a6a7
由
LN
编写于
2020-06-16 16:09:56 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
日志打印修改。点料时间加长。如果未找到区域时不写文件area.txt
1 个父辈
d345b915
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
55 行增加
和
23 行删除
RC1266-AutoCountMachine/dll/X-Ray/CountImage.dll
RC1266-AutoCountMachine/source/AutoCountClient/App.config
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip_Partial.cs
RC1266-AutoCountMachine/source/DeviceLibrary/deviceLibrary/IO/AIOBOX/AIOBOXManager.cs
RC1266-AutoCountMachine/dll/X-Ray/CountImage.dll
查看文件 @
ad40a6a
此文件类型无法预览
RC1266-AutoCountMachine/source/AutoCountClient/App.config
查看文件 @
ad40a6a
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
</
layout
>
</
layout
>
</
appender
>
</
appender
>
<
appender
name
=
"TheRFID"
type
=
"log4net.Appender.RollingFileAppender"
>
<
appender
name
=
"TheRFID"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/TheRFID.log"
/>
<
file
value
=
"logs/
rfid/
TheRFID.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
rollingStyle
value
=
"Date"
/>
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
</
layout
>
</
layout
>
</
appender
>
</
appender
>
<
appender
name
=
"XRay"
type
=
"log4net.Appender.RollingFileAppender"
>
<
appender
name
=
"XRay"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/XRay.log"
/>
<
file
value
=
"logs/
xray/
XRay.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
rollingStyle
value
=
"Date"
/>
...
@@ -84,7 +84,27 @@
...
@@ -84,7 +84,27 @@
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
</
layout
>
</
layout
>
</
appender
>
</
appender
>
<
appender
name
=
"Count"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/Count.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
</
layout
>
</
appender
>
<
appender
name
=
"AIOBOX"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/aio/AIOBOX.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
</
layout
>
</
appender
>
<
logger
name
=
"RollingLogFileAppender"
>
<
logger
name
=
"RollingLogFileAppender"
>
<
level
value
=
"Info"
/>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
...
@@ -97,6 +117,14 @@
...
@@ -97,6 +117,14 @@
<
level
value
=
"Info"
/>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"XRay"
/>
<
appender
-
ref
ref
=
"XRay"
/>
</
logger
>
</
logger
>
<
logger
name
=
"Count"
>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"Count"
/>
</
logger
>
<
logger
name
=
"AIOBOX"
>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"AIOBOX"
/>
</
logger
>
<!--<
root
>
<!--<
root
>
<
level
value
=
"Info"
/>
<
level
value
=
"Info"
/>
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip.cs
查看文件 @
ad40a6a
...
@@ -66,7 +66,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -66,7 +66,7 @@ namespace OnlineStore.DeviceLibrary
{
{
try
try
{
{
countImage
=
new
CountImage
(
"
XRay
"
);
countImage
=
new
CountImage
(
"
Count
"
);
countImage
.
SetDirectory
(
path1_tif
,
path2_out
,
path3_area
);
countImage
.
SetDirectory
(
path1_tif
,
path2_out
,
path3_area
);
LogUtil
.
info
(
Name
+
"CountImage path1【"
+
path1_tif
+
"】"
);
LogUtil
.
info
(
Name
+
"CountImage path1【"
+
path1_tif
+
"】"
);
LogUtil
.
info
(
Name
+
"CountImage path2【"
+
path2_out
+
"】"
);
LogUtil
.
info
(
Name
+
"CountImage path2【"
+
path2_out
+
"】"
);
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip_Partial.cs
查看文件 @
ad40a6a
...
@@ -331,22 +331,23 @@ namespace OnlineStore.DeviceLibrary
...
@@ -331,22 +331,23 @@ namespace OnlineStore.DeviceLibrary
return
;
return
;
}
}
MoveInfo
.
NextMoveStep
(
StepEnum
.
XW15_GetResult
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
XW15_GetResult
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1
5
000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1
80
000
));
if
(
xRay
.
IsRayOpen
)
if
(
xRay
.
IsRayOpen
)
{
{
xRay
.
Stop
();
xRay
.
Stop
();
}
}
int
count
=
99999
;
int
count
=
99999
;
countImage
.
GetCount
(
lastTh
,
out
count
);
WorkLog
(
"点料:开始调用 countImage.GetCount "
);
InXWork
=
false
;
bool
result
=
countImage
.
GetCount
(
lastTh
,
out
count
);
WorkLog
(
"点料:获取点料结果["
+
lastTh
+
"]=【"
+
count
+
"】,保存并上传结果"
);
WorkLog
(
"点料:获取点料结果["
+
lastTh
+
"]=【"
+
count
+
"】,result="
+
result
+
",保存并上传结果"
);
if
(
Work_ReelInfo
.
WareCount
<=
0
)
if
(
Work_ReelInfo
.
WareCount
<=
0
)
{
{
MoveInfo
.
MoveParam
.
WareCount
=
count
;
MoveInfo
.
MoveParam
.
WareCount
=
count
;
Work_ReelInfo
.
WareCount
=
count
;
Work_ReelInfo
.
WareCount
=
count
;
}
}
string
outF
=
path2_out
+
@"\"
+
lastFileName
;
string
outF
=
path2_out
+
lastFileName
;
try
try
{
{
if
(
System
.
IO
.
File
.
Exists
(
outF
))
if
(
System
.
IO
.
File
.
Exists
(
outF
))
...
@@ -364,15 +365,16 @@ namespace OnlineStore.DeviceLibrary
...
@@ -364,15 +365,16 @@ namespace OnlineStore.DeviceLibrary
{
{
LogUtil
.
error
(
"读取结果图片【"
+
outF
+
"】出错:"
+
ex
.
ToString
());
LogUtil
.
error
(
"读取结果图片【"
+
outF
+
"】出错:"
+
ex
.
ToString
());
}
}
InXWork
=
false
;
Task
.
Factory
.
StartNew
(
delegate
Task
.
Factory
.
StartNew
(
delegate
{
{
// string msg = "暂不上传";
// string msg = "暂不上传";
string
msg
=
SServerManager
.
Return_Material
(
Name
,
Work_ReelInfo
.
WareCode
,
Work_ReelInfo
.
WareCount
);
string
msg
=
SServerManager
.
Return_Material
(
Name
,
Work_ReelInfo
.
WareCode
,
Work_ReelInfo
.
WareCount
);
if
(!
String
.
IsNullOrEmpty
(
msg
))
if
(!
String
.
IsNullOrEmpty
(
msg
))
{
{
LogUtil
.
error
(
Name
+
"上传【"
+
Work_ReelInfo
.
ToStr
()
+
"】点料结果失败:"
+
msg
);
LogUtil
.
error
(
Name
+
"上传【"
+
Work_ReelInfo
.
ToStr
()
+
"】点料结果失败:"
+
msg
);
}
}
});
});
MoveInfo
.
EndStepWait
();
MoveInfo
.
EndStepWait
();
}
}
...
@@ -442,18 +444,20 @@ namespace OnlineStore.DeviceLibrary
...
@@ -442,18 +444,20 @@ namespace OnlineStore.DeviceLibrary
{
{
lastTh
=
ThresholdValue
;
lastTh
=
ThresholdValue
;
string
[]
codeArray
=
codeStr
.
Split
(
';'
);
string
[]
codeArray
=
codeStr
.
Split
(
';'
);
string
fileValue
=
""
;
string
area
=
""
;
if
(
codeArray
.
Length
.
Equals
(
2
))
if
(
codeArray
.
Length
.
Equals
(
2
))
{
{
string
pn
=
codeArray
[
0
];
string
pn
=
codeArray
[
0
];
if
(
countParamMap
.
ContainsKey
(
pn
))
if
(
countParamMap
.
ContainsKey
(
pn
))
{
{
string
area
=
countParamMap
[
pn
].
AreaValue
;
area
=
countParamMap
[
pn
].
AreaValue
;
string
fileValue
=
lastFileName
+
" "
+
area
;
fileValue
=
lastFileName
+
" "
+
area
;
lastTh
=
countParamMap
[
pn
].
Threshold
;
lastTh
=
countParamMap
[
pn
].
Threshold
;
LogUtil
.
info
(
"【"
+
codeStr
+
"】使用参数【"
+
lastTh
+
"】【"
+
area
+
"】,文件名【"
+
lastFileName
+
"】"
);
File
.
WriteAllText
(
path3_area
,
fileValue
);
}
}
}
}
LogUtil
.
info
(
"【"
+
codeStr
+
"】使用参数【"
+
lastTh
+
"】【"
+
area
+
"】,文件名【"
+
lastFileName
+
"】内容【"
+
fileValue
+
"】"
);
File
.
WriteAllText
(
path3_area
,
fileValue
);
}
}
private
void
ClearFilePath
()
private
void
ClearFilePath
()
{
{
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/deviceLibrary/IO/AIOBOX/AIOBOXManager.cs
查看文件 @
ad40a6a
...
@@ -71,7 +71,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -71,7 +71,7 @@ namespace OnlineStore.DeviceLibrary
string
logName
=
"IO模块["
+
ioIp
+
"] DI["
+
DILength
+
"] DO["
+
DOLength
+
"] "
;
string
logName
=
"IO模块["
+
ioIp
+
"] DI["
+
DILength
+
"] DO["
+
DOLength
+
"] "
;
try
try
{
{
aioBox
=
new
AIOBOX
();
aioBox
=
new
AIOBOX
(
"AIOBOX"
);
aioBox
.
SetType
(
Asa
.
IOModule
.
Box_Type
.
DI
,
DILength
,
Asa
.
IOModule
.
Box_Type
.
DO
,
DOLength
);
aioBox
.
SetType
(
Asa
.
IOModule
.
Box_Type
.
DI
,
DILength
,
Asa
.
IOModule
.
Box_Type
.
DO
,
DOLength
);
aioBox
.
IP
=
ioIp
;
aioBox
.
IP
=
ioIp
;
aioBox
.
Upload
=
true
;
aioBox
.
Upload
=
true
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论