Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
AutoCountMachine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit d9775306
由
LN
编写于
2020-07-06 18:54:48 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
点料修改:根据大小料调用不同的方法
1 个父辈
eaf73262
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
106 行增加
和
69 行删除
RC1266-AutoCountMachine/source/AutoCountClient/FrmOutputEquip.cs
RC1266-AutoCountMachine/source/AutoCountClient/FrmXRay.Designer.cs
RC1266-AutoCountMachine/source/AutoCountSystem/ProjectInstaller.cs
RC1266-AutoCountMachine/source/DeviceLibrary/XRAY/countParam.csv
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip_Partial.cs
RC1266-AutoCountMachine/source/DeviceLibrary/model/MoveStep.cs
RC1266-AutoCountMachine/source/AutoCountClient/FrmOutputEquip.cs
查看文件 @
d977530
...
...
@@ -761,11 +761,13 @@ namespace OnlineStore.AutoCountClient
{
return
;
}
if
(!
chbPrint
.
Checked
.
Equals
(
equipBean
.
AutoSendShelfOut
))
{
bool
isCheck
=
chbPrint
.
Checked
;
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
NeedPrintLabel
,(
isCheck
?
1
:
0
));
LogUtil
.
info
(
equipBean
.
Name
+
"用户切换 启用标签打印 ="
+
isCheck
);
string
v
=
(
isCheck
?
1
:
0
).
ToString
();
if
(
ConfigAppSettings
.
GetValue
(
Setting_Init
.
NeedPrintLabel
).
Equals
(
v
).
Equals
(
false
))
{
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
NeedPrintLabel
,
v
);
LogUtil
.
info
(
equipBean
.
Name
+
"用户切换 启用标签打印 ="
+
v
);
}
}
...
...
RC1266-AutoCountMachine/source/AutoCountClient/FrmXRay.Designer.cs
查看文件 @
d977530
...
...
@@ -55,6 +55,8 @@
this
.
tabPage3
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
groupBox6
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox8
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
radioButton2
=
new
System
.
Windows
.
Forms
.
RadioButton
();
this
.
radioButton1
=
new
System
.
Windows
.
Forms
.
RadioButton
();
this
.
btnSelImage
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
txtImage
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
numWSize
=
new
System
.
Windows
.
Forms
.
NumericUpDown
();
...
...
@@ -81,8 +83,6 @@
this
.
lblThisSta
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
tabControl1
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
fileSystemWatcher1
=
new
System
.
IO
.
FileSystemWatcher
();
this
.
radioButton1
=
new
System
.
Windows
.
Forms
.
RadioButton
();
this
.
radioButton2
=
new
System
.
Windows
.
Forms
.
RadioButton
();
this
.
panel1
.
SuspendLayout
();
this
.
tabPage1
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
...
...
@@ -606,6 +606,28 @@
this
.
groupBox8
.
TabStop
=
false
;
this
.
groupBox8
.
Text
=
"点料测试"
;
//
// radioButton2
//
this
.
radioButton2
.
AutoSize
=
true
;
this
.
radioButton2
.
Location
=
new
System
.
Drawing
.
Point
(
108
,
134
);
this
.
radioButton2
.
Name
=
"radioButton2"
;
this
.
radioButton2
.
Size
=
new
System
.
Drawing
.
Size
(
50
,
21
);
this
.
radioButton2
.
TabIndex
=
298
;
this
.
radioButton2
.
Text
=
"大料"
;
this
.
radioButton2
.
UseVisualStyleBackColor
=
true
;
//
// radioButton1
//
this
.
radioButton1
.
AutoSize
=
true
;
this
.
radioButton1
.
Checked
=
true
;
this
.
radioButton1
.
Location
=
new
System
.
Drawing
.
Point
(
26
,
134
);
this
.
radioButton1
.
Name
=
"radioButton1"
;
this
.
radioButton1
.
Size
=
new
System
.
Drawing
.
Size
(
50
,
21
);
this
.
radioButton1
.
TabIndex
=
297
;
this
.
radioButton1
.
TabStop
=
true
;
this
.
radioButton1
.
Text
=
"小料"
;
this
.
radioButton1
.
UseVisualStyleBackColor
=
true
;
//
// btnSelImage
//
this
.
btnSelImage
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
...
...
@@ -898,27 +920,6 @@
this
.
fileSystemWatcher1
.
EnableRaisingEvents
=
true
;
this
.
fileSystemWatcher1
.
SynchronizingObject
=
this
;
//
// radioButton1
//
this
.
radioButton1
.
AutoSize
=
true
;
this
.
radioButton1
.
Checked
=
true
;
this
.
radioButton1
.
Location
=
new
System
.
Drawing
.
Point
(
26
,
134
);
this
.
radioButton1
.
Name
=
"radioButton1"
;
this
.
radioButton1
.
Size
=
new
System
.
Drawing
.
Size
(
62
,
21
);
this
.
radioButton1
.
TabIndex
=
297
;
this
.
radioButton1
.
Text
=
"小料盘"
;
this
.
radioButton1
.
UseVisualStyleBackColor
=
true
;
//
// radioButton2
//
this
.
radioButton2
.
AutoSize
=
true
;
this
.
radioButton2
.
Location
=
new
System
.
Drawing
.
Point
(
108
,
134
);
this
.
radioButton2
.
Name
=
"radioButton2"
;
this
.
radioButton2
.
Size
=
new
System
.
Drawing
.
Size
(
62
,
21
);
this
.
radioButton2
.
TabIndex
=
298
;
this
.
radioButton2
.
Text
=
"大料盘"
;
this
.
radioButton2
.
UseVisualStyleBackColor
=
true
;
//
// FrmXRay
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
17F
);
...
...
RC1266-AutoCountMachine/source/AutoCountSystem/ProjectInstaller.cs
查看文件 @
d977530
...
...
@@ -15,11 +15,11 @@ namespace StoreServer
public
ProjectInstaller
()
{
InitializeComponent
();
string
cid
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
Line_CID
);
if
(!
cid
.
Equals
(
""
))
{
this
.
AutoCountClientSystem
.
Description
=
"流水线系统["
+
cid
+
"]"
;
}
//
string cid = ConfigAppSettings.GetValue(Setting_Init.Line_CID);
//
if (!cid.Equals(""))
//
{
//
this.AutoCountClientSystem.Description = "流水线系统[" +cid +"]";
//
}
}
}
}
RC1266-AutoCountMachine/source/DeviceLibrary/XRAY/countParam.csv
查看文件 @
d977530
类型,阈值,窗口大小
6D5S1,2,3
6C1D1,2,5
6D551,2,7
7H5S1,2,3
type,sign,value,threshold,windowSize
6H10B,1,5,0,0
7H5S1,0,0,0,0
6H106,1,0,0,0
6H10W,1,0,0,0
6H20J,1,0,0,0
6H100,1,0,0,0
6H105,1,0,0,0
6C1D1,0,0,0,0
6C1H1,0,0,0,0
6CEH1,0,0,0,0
6C1D1,0,0,0,0
6D551,0,0,0,0
7H1F1,0,0,0,0
7H2F1,0,0,0,0
7H5B1,0,0,0,0
7H5F1,0,0,0,0
6H0R2,0,0,0,0
6H10C,1,0,0,0
6H20N,0,0,0,0
6H103,1,0,0,0
7H2S1,0,0,0,0
7H5C1,0,0,0,0
8CA3F,2,0,0,0
8CA8H,0,0,0,0
8CF3F,0,0,0,0
8CG3F,0,0,0,0
8CH8F,0,0,0,0
6J091,0,0,0,0
6J121,0,0,0,0
6J161,0,0,0,0
6J181,0,0,0,0
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip.cs
查看文件 @
d977530
...
...
@@ -408,35 +408,39 @@ namespace OnlineStore.DeviceLibrary
public
class
CountParam
{
public
CountParam
(
string
pn
,
int
th
,
string
area
)
{
this
.
PN
=
pn
;
this
.
Threshold
=
th
;
this
.
AreaValue
=
area
;
}
public
CountParam
(
string
pn
,
int
th
,
int
size
)
public
CountParam
(
string
pn
=
""
,
int
th
=
0
,
int
size
=
0
,
int
sign
=
0
,
int
value
=
0
)
{
this
.
PN
=
pn
;
this
.
Threshold
=
th
;
this
.
WindowSize
=
size
;
this
.
Sign
=
sign
;
this
.
Value
=
value
;
}
public
string
PN
=
""
;
public
int
Threshold
=
0
;
public
int
WindowSize
=
0
;
public
string
AreaValue
=
""
;
public
int
Sign
=
0
;
public
int
Value
=
0
;
public
string
ToStr
()
{
return
"【PN="
+
PN
+
",sign="
+
Sign
+
",value="
+
Value
+
",th="
+
Threshold
+
",wsize="
+
WindowSize
+
"】"
;
}
internal
static
CountParam
NewParam
(
string
line
)
{
try
{
string
[]
array
=
line
.
Split
(
','
);
if
(
array
.
Length
>=
3
)
if
(
array
.
Length
>=
5
)
{
string
pn
=
array
[
0
].
Trim
();
int
th
=
Convert
.
ToInt32
(
array
[
1
].
Trim
());
int
size
=
Convert
.
ToInt32
(
array
[
2
].
Trim
());
return
new
CountParam
(
pn
,
th
,
size
);
int
sign
=
Convert
.
ToInt32
(
array
[
1
].
Trim
());
int
value
=
Convert
.
ToInt32
(
array
[
2
].
Trim
());
int
th
=
Convert
.
ToInt32
(
array
[
3
].
Trim
());
int
size
=
Convert
.
ToInt32
(
array
[
4
].
Trim
());
return
new
CountParam
(
pn
,
th
,
size
,
sign
,
value
);
}
}
catch
(
Exception
ex
)
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip_Partial.cs
查看文件 @
d977530
...
...
@@ -42,7 +42,7 @@ namespace OnlineStore.DeviceLibrary
{
if
(!
MoveInfo
.
MoveType
.
Equals
(
RobotMoveType
.
None
))
{
return
false
;
return
false
;
}
//出口有料
if
(
IOValue
(
IO_Type
.
X_ReelCheck
).
Equals
(
IO_VALUE
.
HIGH
))
...
...
@@ -54,7 +54,7 @@ namespace OnlineStore.DeviceLibrary
if
(
Work_ReelInfo
.
WareCount
<=
0
)
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
XW06_WaitTime
);
WorkLog
(
"扫描区有料["
+
Work_ReelInfo
.
ToStr
()+
"],还未进行点料,开始处理"
);
WorkLog
(
"扫描区有料["
+
Work_ReelInfo
.
ToStr
()
+
"],还未进行点料,开始处理"
);
//IOMove(IO_Type.X_InLine_Run, IO_VALUE.HIGH);
IOMove
(
IO_Type
.
X_MLine_Run
,
IO_VALUE
.
HIGH
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
3000
));
...
...
@@ -66,14 +66,15 @@ namespace OnlineStore.DeviceLibrary
WorkLog
(
"扫描区有料["
+
Work_ReelInfo
.
ToStr
()
+
"],点料已完成,准备放出料盘"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Out_TrayCheck
,
IO_VALUE
.
LOW
));
}
}
else
if
(
IOValue
(
IO_Type
.
X_InLine_Check
).
Equals
(
IO_VALUE
.
HIGH
))
}
else
if
(
IOValue
(
IO_Type
.
X_InLine_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
runStatus
=
RobotRunStatus
.
Busy
;
MoveInfo
.
NewMove
(
RobotMoveType
.
Working
);
MoveInfo
.
MoveParam
.
SetReelInfo
(
In_ReelInfo
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
XW01_WaitInReel
);
WorkLog
(
"入口皮带线有料["
+
In_ReelInfo
.
ToStr
()
+
"],开始处理"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
X_InLine_Check
,
IO_VALUE
.
HIGH
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
X_InLine_Check
,
IO_VALUE
.
HIGH
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
X_ReelCheck
,
IO_VALUE
.
LOW
));
}
...
...
@@ -325,8 +326,9 @@ namespace OnlineStore.DeviceLibrary
#
region
点料处理
private
string
lastFileName
=
""
;
private
int
lastTh
=
0
;
private
int
lastWSize
=
0
;
//private int lastTh = 0;
//private int lastWSize = 0;
private
CountParam
lastParam
=
new
CountParam
();
private
void
XW15_GetResult
()
{
if
(
IOValue
(
IO_Type
.
X_Lock_On
).
Equals
(
IO_VALUE
.
LOW
))
...
...
@@ -347,18 +349,18 @@ namespace OnlineStore.DeviceLibrary
string
fileP
=
path1_tif
+
@"\"
+
lastFileName
;
int
n
=
0
;
if
(
Work_ReelInfo
.
PlateW
.
Equals
(
7
))
if
(
lastParam
.
Sign
.
Equals
(
0
))
{
WorkLog
(
"点料:开始调用 carerayImage.GetLocalCount "
);
n
=
carerayImage
.
GetLocalCount
(
fileP
,
last
Th
,
lastW
Size
,
out
count
,
out
Asa
.
API
.
EyemImage
tpDstImg
);
n
=
carerayImage
.
GetLocalCount
(
fileP
,
last
Param
.
Threshold
,
lastParam
.
Window
Size
,
out
count
,
out
Asa
.
API
.
EyemImage
tpDstImg
);
}
else
{
WorkLog
(
"点料:开始调用 carerayImage.GetLocalCountHuge "
);
n
=
carerayImage
.
GetLocalCountHuge
(
fileP
,
last
Th
,
lastW
Size
,
out
count
,
out
Asa
.
API
.
EyemImage
tpDstImg
);
n
=
carerayImage
.
GetLocalCountHuge
(
fileP
,
last
Param
.
Threshold
,
lastParam
.
Window
Size
,
out
count
,
out
Asa
.
API
.
EyemImage
tpDstImg
);
}
WorkLog
(
"点料:获取点料结果 【"
+
count
+
"】
【"
+
lastTh
+
"】【"
+
lastWSize
+
"】
,n ="
+
n
+
",保存并上传结果"
);
WorkLog
(
"点料:获取点料结果 【"
+
count
+
"】
"
+
lastParam
.
ToStr
()
+
"
,n ="
+
n
+
",保存并上传结果"
);
if
(
Work_ReelInfo
.
WareCount
<=
0
)
{
...
...
@@ -485,8 +487,9 @@ namespace OnlineStore.DeviceLibrary
private
void
UpdateArea
(
string
codeStr
)
{
lastTh
=
ThresholdValue
;
lastWSize
=
3
;
lastParam
=
new
CountParam
(
""
,
ThresholdValue
,
3
);
//lastTh = ThresholdValue;
//lastWSize = 3;
string
[]
codeArray
=
codeStr
.
Split
(
';'
);
string
fileValue
=
""
;
string
area
=
""
;
...
...
@@ -499,14 +502,17 @@ namespace OnlineStore.DeviceLibrary
{
area
=
countParamMap
[
pn
].
AreaValue
;
fileValue
=
lastFileName
+
" "
+
area
;
lastTh
=
countParamMap
[
pn
].
Threshold
;
}
else
if
(
countParamMap
.
ContainsKey
(
type
))
// lastTh = countParamMap[pn].Threshold;
lastParam
=
countParamMap
[
pn
];
}
else
if
(
countParamMap
.
ContainsKey
(
type
))
{
lastTh
=
countParamMap
[
type
].
Threshold
;
lastWSize
=
countParamMap
[
type
].
WindowSize
;
lastParam
=
countParamMap
[
type
];
//lastTh = countParamMap[type].Threshold;
//lastWSize = countParamMap[type].WindowSize;
}
}
LogUtil
.
info
(
"【"
+
codeStr
+
"】使用参数
【"
+
lastTh
+
"】【"
+
lastWSize
+
"】
"
);
LogUtil
.
info
(
"【"
+
codeStr
+
"】使用参数
"
+
lastParam
.
ToStr
()
+
"
"
);
//LogUtil.info("【" + codeStr + "】使用参数【" + lastTh + "】【" + area + "】,文件名【" + lastFileName + "】内容【" + fileValue + "】");
File
.
WriteAllText
(
path3_area
,
fileValue
);
}
...
...
@@ -536,8 +542,5 @@ namespace OnlineStore.DeviceLibrary
}
#
endregion
}
}
\ No newline at end of file
RC1266-AutoCountMachine/source/DeviceLibrary/model/MoveStep.cs
查看文件 @
d977530
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论