Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO908-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit e1dd1d77
由
张东亮
编写于
2021-08-17 11:19:37 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
存储机构-最新版
1 个父辈
c3fa2e42
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
26 行增加
和
20 行删除
source/DeviceLibrary/Config/Camera.json
source/DeviceLibrary/Config/Config_BoxEquip.csv
source/DeviceLibrary/Config/Config_Store.csv
source/DeviceLibrary/Config/linePositions.csv
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/eyemLib-4.dll
source/DeviceLibrary/eyemLib.dll
source/DeviceLibrary/storeBean/boxBean/BoxEquip_AutoFindPos.cs
source/DeviceLibrary/storeBean/boxBean/EyemLibDemo.cs
source/XLRStoreClient/boxForm/FrmAutoFindPos.Designer.cs
source/XLRStoreClient/boxForm/FrmAutoFindPos.cs
source/DeviceLibrary/Config/Camera.json
查看文件 @
e1dd1d7
...
...
@@ -68,15 +68,15 @@
"Name"
:
"box_A"
,
"IP"
:
"192.168.107.21"
,
"User"
:
"admin"
,
"P
wd"
:
"Acc123
"
,
"Port"
:
"8000"
"P
assword"
:
"acc123456
"
,
"Port"
:
8000
},
{
"Name"
:
"box_B"
,
"IP"
:
"192.168.108.22"
,
"User"
:
"admin"
,
"P
wd"
:
"Acc123
"
,
"Port"
:
"8000"
"P
assword"
:
"acc123456
"
,
"Port"
:
8000
}
]
}
\ No newline at end of file
source/DeviceLibrary/Config/Config_BoxEquip.csv
查看文件 @
e1dd1d7
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/Config/Config_Store.csv
查看文件 @
e1dd1d7
...
...
@@ -44,8 +44,8 @@ DI,2,料屉第15层检测信号,Row_Check_15,30,HC,X30,,,,,,,,,,,,
DI,2,左前门门禁信号(存储机构),LeftDoor_Limit,32,HC,X32,,,,,,,,,,,,
DI,2,右前门门禁信号(存储机构),RightDoor_Limit,33,HC,X33,,,,,,,,,,,,
DI,2,后门门禁信号(存储机构),BackDoor_Limit,34,HC,X34,,,,,,,,,,,,
DI
,1,急停(取料机构),SuddenStop_BTN,35,HC,X35,,,,,,,,,,,,
DI
,1,复位(取料机构),Reset_BTN,36,HC,X36,,,,,,,,,,,,
,1,急停(取料机构),SuddenStop_BTN,35,HC,X35,,,,,,,,,,,,
,1,复位(取料机构),Reset_BTN,36,HC,X36,,,,,,,,,,,,
DI,1,光栅信号,SafetyRasterSignal,37,HC,X37,,,,,,,,,,,,
DI,1,旋转臂A料口侧检测,MAxis_Check_A,38,HC,X38,,,,,,,,,,,,
DI,1,旋转臂B料口侧检测,MAxis_Check_B,39,HC,X39,,,,,,,,,,,,
...
...
source/DeviceLibrary/Config/linePositions.csv
查看文件 @
e1dd1d7
此文件的差异太大,无法显示。
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
e1dd1d7
...
...
@@ -125,7 +125,9 @@
<Content Include="device_config.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="eyemLib.dll" />
<Content Include="eyemLib.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="halcon.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
...
...
source/DeviceLibrary/eyemLib-4.dll
0 → 100644
查看文件 @
e1dd1d7
此文件类型无法预览
source/DeviceLibrary/eyemLib.dll
查看文件 @
e1dd1d7
此文件类型无法预览
source/DeviceLibrary/storeBean/boxBean/BoxEquip_AutoFindPos.cs
查看文件 @
e1dd1d7
...
...
@@ -122,7 +122,7 @@ namespace OnlineStore.DeviceLibrary
AutoFindPosSaveImage
(
$
"NG_Mark点X轴坐标{eyemOcsFXYR.fX},模板Mark点X轴坐标{Config.Drawer_X},X轴偏差{(Config.Drawer_X - eyemOcsFXYR.fX)}"
);
LogInfo
(
$
"视觉对位 {MoveInfo.SLog}:Mark点X轴坐标{eyemOcsFXYR.fX},模板Mark点X轴坐标{Config.Drawer_X},X轴偏差{(Config.Drawer_X - eyemOcsFXYR.fX)},"
+
$
"行走机构相对移动{(Config.Drawer_X - eyemOcsFXYR.fX) * autoFindPos.XCoeffOfCoorToPulse}[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
MoveAxis
.
AbsMove
(
MoveInfo
,
Convert
.
ToInt32
(
MoveAxis
.
GetAclPosition
()
+
(
Config
.
Drawer_X
-
eyemOcsFXYR
.
fX
)
*
autoFindPos
.
XCoeffOfCoorToPulse
),
Config
.
MoveAxis_P1_Speed
/
2
);
MoveAxis
.
AbsMove
(
MoveInfo
,
Convert
.
ToInt32
(
MoveAxis
.
GetAclPosition
()
+
(
Config
.
Drawer_X
-
eyemOcsFXYR
.
fX
)
*
autoFindPos
.
XCoeffOfCoorToPulse
),
Config
.
MoveAxis_P1_Speed
/
10
);
return
false
;
}
private
bool
CheckMarkYPoint
(
EyemOcsFXYR
eyemOcsFXYR
)
...
...
@@ -135,8 +135,8 @@ namespace OnlineStore.DeviceLibrary
return
true
;
}
AutoFindPosSaveImage
(
$
"NG_Mark点Y轴坐标{eyemOcsFXYR.fY},模板Mark点Y轴坐标{Config.Drawer_Y},Y轴偏差{(Config.Drawer_Y - eyemOcsFXYR.fY)}"
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Convert
.
ToInt32
(
UpdownAxis
.
GetAclPosition
()
+
(
Config
.
Drawer_Y
-
eyemOcsFXYR
.
fY
)
*
autoFindPos
.
YCoeffOfCoorToPulse
),
Config
.
Updown_P1_Speed
/
2
);
PullAxis_Updown
.
AbsMove
(
MoveInfo
,
Convert
.
ToInt32
(
PullAxis_Updown
.
GetAclPosition
()
+
(
Config
.
Drawer_Y
-
eyemOcsFXYR
.
fY
)
*
autoFindPos
.
YCoeffOfCoorToPulse
),
Config
.
Updown_P1_Speed
/
2
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Convert
.
ToInt32
(
UpdownAxis
.
GetAclPosition
()
+
(
Config
.
Drawer_Y
-
eyemOcsFXYR
.
fY
)
*
autoFindPos
.
YCoeffOfCoorToPulse
),
Config
.
Updown_P1_Speed
/
10
);
PullAxis_Updown
.
AbsMove
(
MoveInfo
,
Convert
.
ToInt32
(
PullAxis_Updown
.
GetAclPosition
()
+
(
Config
.
Drawer_Y
-
eyemOcsFXYR
.
fY
)
*
autoFindPos
.
YCoeffOfCoorToPulse
),
Config
.
Updown_P1_Speed
/
10
);
LogInfo
(
$
"视觉对位 {MoveInfo.SLog}:Mark点Y轴坐标{eyemOcsFXYR.fY},模板Mark点Y轴坐标{Config.Drawer_Y},Y轴偏差{(Config.Drawer_Y - eyemOcsFXYR.fY)},"
+
$
"移栽升降轴、料屉升降轴相对移动{(Config.Drawer_Y - eyemOcsFXYR.fY) * autoFindPos.YCoeffOfCoorToPulse}[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
return
false
;
...
...
@@ -244,10 +244,10 @@ namespace OnlineStore.DeviceLibrary
//Bitmap bitmap = null;
Bitmap
bitmap
=
AcqImage
(
CamPosSide
(
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
));
int
res
=
AutoFindPos
.
GetMarkInfo
(
bitmap
,
$
"{MoveInfo.MoveParam.PosInfo.PosId.Substring(0, 4)}"
,
$
"row{autoFindPos.CurRow}_col{autoFindPos.CurColumn}"
,
out
ocsFXYR
);
LogInfo
(
$
"视觉对位 {MoveInfo.SLog}:取图[ret={res}],行={autoFindPos.CurRow},列={autoFindPos.CurColumn}[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
if
(
res
==
0
)
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SA_03_Pos_AcqImg
);
LogInfo
(
$
"视觉对位 {MoveInfo.SLog}:取图[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
}
else
if
(
res
==
-
4
)
{
...
...
@@ -319,10 +319,10 @@ namespace OnlineStore.DeviceLibrary
//Bitmap bitmap1 = null;
Bitmap
bitmap1
=
AcqImage
(
CamPosSide
(
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
));
int
res1
=
AutoFindPos
.
GetMarkInfo
(
bitmap1
,
$
"{MoveInfo.MoveParam.PosInfo.PosId.Substring(0, 4)}"
,
$
"row{autoFindPos.CurRow}_col{autoFindPos.CurColumn}"
,
out
ocsFXYR
);
LogInfo
(
$
"视觉对位 {MoveInfo.SLog}:取图[ret={res1}],行={autoFindPos.CurRow},列={autoFindPos.CurColumn}[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
if
(
res1
==
0
)
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SA_08_Neg_AcqImg
);
LogInfo
(
$
"视觉对位 {MoveInfo.SLog}:取图[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
}
else
if
(
res1
==
-
4
)
{
...
...
@@ -481,15 +481,17 @@ namespace OnlineStore.DeviceLibrary
string
path
=
Application
.
StartupPath
+
ConfigAppSettings
.
GetValue
(
Setting_Init
.
ImagePath
)
+
subpath
+
"\\"
+
DateTime
.
Now
.
ToString
(
"yyyyMMdd"
);
string
path1
=
path
+
"\\"
+
"Src\\"
;
string
path2
=
path
+
"\\"
+
"ResOut\\"
;
string
time
=
DateTime
.
Now
.
ToString
(
"HHmmss"
);
if
(!
System
.
IO
.
Directory
.
Exists
(
path1
))
Directory
.
CreateDirectory
(
path1
);
if
(!
System
.
IO
.
Directory
.
Exists
(
path2
))
Directory
.
CreateDirectory
(
path2
);
bitmap
.
Save
(
path1
+
filename
+
".bmp"
,
System
.
Drawing
.
Imaging
.
ImageFormat
.
Bmp
);
bitmap
.
Save
(
path1
+
filename
+
$
"_{flag}_{time}"
+
".bmp"
,
System
.
Drawing
.
Imaging
.
ImageFormat
.
Bmp
);
resBitmap
=
eyemCvtToBitmap
(
tpDstImg
);
if
(
resBitmap
!=
null
)
{
resBitmap
.
Save
(
string
.
Format
(
"{0}{1}_{2}_{3}_{4}
.bmp"
,
path2
,
filena
me
,
markCoor
.
fX
,
markCoor
.
fY
,
markCoor
.
fR
));
resBitmap
.
Save
(
string
.
Format
(
"{0}{1}_{2}_{3}_{4}
_{5}_{6}.bmp"
,
path2
,
filename
,
flag
,
ti
me
,
markCoor
.
fX
,
markCoor
.
fY
,
markCoor
.
fR
));
}
Marshal
.
FreeHGlobal
(
image
.
vpImage
);
eyemImageFree
(
ref
tpDstImg
);
...
...
@@ -505,15 +507,16 @@ namespace OnlineStore.DeviceLibrary
string
path
=
Application
.
StartupPath
+
ConfigAppSettings
.
GetValue
(
Setting_Init
.
ImagePath
)
+
subpath
+
"\\"
+
DateTime
.
Now
.
ToString
(
"yyyyMMdd"
);
string
path1
=
path
+
"\\"
+
"Src\\"
;
string
path2
=
path
+
"\\"
+
"ResOut\\"
;
string
time
=
DateTime
.
Now
.
ToString
(
"HHmmss"
);
if
(!
System
.
IO
.
Directory
.
Exists
(
path1
))
Directory
.
CreateDirectory
(
path1
);
if
(!
System
.
IO
.
Directory
.
Exists
(
path2
))
Directory
.
CreateDirectory
(
path2
);
bitmap
.
Save
(
path1
+
filename
+
".bmp"
,
System
.
Drawing
.
Imaging
.
ImageFormat
.
Bmp
);
bitmap
.
Save
(
path1
+
filename
+
$
"_{flag}_{time}"
+
".bmp"
,
System
.
Drawing
.
Imaging
.
ImageFormat
.
Bmp
);
Bitmap
resBitmap
=
eyemCvtToBitmap
(
tpDstImg
);
if
(
resBitmap
!=
null
)
{
resBitmap
.
Save
(
string
.
Format
(
"{0}{1}_{2}_{3}_{4}
.bmp"
,
path2
,
filename
,
markCoor
.
fX
,
markCoor
.
fY
,
markCoor
.
fR
));
resBitmap
.
Save
(
string
.
Format
(
"{0}{1}_{2}_{3}_{4}
_{5}_{6}.bmp"
,
path2
,
filename
,
flag
,
time
,
markCoor
.
fX
,
markCoor
.
fY
,
markCoor
.
fR
));
}
Marshal
.
FreeHGlobal
(
image
.
vpImage
);
eyemImageFree
(
ref
tpDstImg
);
...
...
source/DeviceLibrary/storeBean/boxBean/EyemLibDemo.cs
查看文件 @
e1dd1d7
...
...
@@ -594,7 +594,7 @@ namespace eyemLib_Sharp
#
region
项目
//圆形mark点定位
[
DllImport
(
"eyemLib.dll"
,
CharSet
=
CharSet
.
None
,
CallingConvention
=
CallingConvention
.
Cdecl
)]
public
static
extern
int
eyemMarkerTracing
(
EyemImage
tpImage
,
double
dThreshold
,
ref
EyemOcsFXYR
tpCircle
,
out
EyemImage
tpDstImg
,
bool
bHighAccuracy
=
fals
e
);
public
static
extern
int
eyemMarkerTracing
(
EyemImage
tpImage
,
double
dThreshold
,
ref
EyemOcsFXYR
tpCircle
,
out
EyemImage
tpDstImg
,
bool
bHighAccuracy
=
tru
e
);
#
endregion
#
region
通用
...
...
source/XLRStoreClient/boxForm/FrmAutoFindPos.Designer.cs
查看文件 @
e1dd1d7
...
...
@@ -592,7 +592,7 @@
this
.
textBox7
.
Name
=
"textBox7"
;
this
.
textBox7
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
23
);
this
.
textBox7
.
TabIndex
=
17
;
this
.
textBox7
.
Text
=
"
489
"
;
this
.
textBox7
.
Text
=
"
100
"
;
//
// label16
//
...
...
@@ -609,7 +609,7 @@
this
.
textBox8
.
Name
=
"textBox8"
;
this
.
textBox8
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
23
);
this
.
textBox8
.
TabIndex
=
15
;
this
.
textBox8
.
Text
=
"
489
"
;
this
.
textBox8
.
Text
=
"
100
"
;
//
// button10
//
...
...
source/XLRStoreClient/boxForm/FrmAutoFindPos.cs
查看文件 @
e1dd1d7
...
...
@@ -179,7 +179,6 @@ namespace OnlineStore.XLRStore
{
ktkPosition
.
ComAxis_AB_P2
=
srcPosition
.
ComAxis_AB_P2
;
ktkPosition
.
ComAxis_AB_P3
=
srcPosition
.
ComAxis_AB_P3
;
ktkPosition
.
MoveAxis_P3
=
srcPosition
.
MoveAxis_P3
;
ktkPosition
.
PullAxis_Inout_P2_P4
=
srcPosition
.
PullAxis_Inout_P2_P4
;
ktkPosition
.
PullAxis_Inout_P3_P5
=
srcPosition
.
PullAxis_Inout_P3_P5
;
//ktkPosition.PullAxis_Updown_P3 = srcPosition.PullAxis_Updown_P3;
...
...
@@ -219,6 +218,8 @@ namespace OnlineStore.XLRStore
}
}
info
=
$
"更新完成!"
;
label8
.
Text
=
info
;
label8
.
BackColor
=
Color
.
Green
;
}));
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论