Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO908-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 2fe00281
由
LN
编写于
2021-09-03 17:32:31 +0800
浏览文件
选项
浏览文件
标签
下载
差异文件
Merge branch 'master' of
http://106.15.194.121:8083/lina/SO908-XLRStore
2 个父辈
b35c19c3
e20db586
隐藏空白字符变更
内嵌
并排
正在显示
30 个修改的文件
包含
1415 行增加
和
124 行删除
source/Common/Setting_Init.cs
source/Common/bean/Bean.cs
source/DeviceLibrary/Config/Config_BoxEquip.csv
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/manager/model/DeviceStep.cs
source/DeviceLibrary/storeBean/boxBean/BoxEqiup_Tongs.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_AutoFindPos.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_Camera.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ConnectServerTimer.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_InExecute.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_OutExecute.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_Partial.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_PosDebug.cs
source/DeviceLibrary/storeBean/boxBean/positionDebug/PositionDebugManager.cs
source/DeviceLibrary/storeBean/boxBean/positionDebug/PositionDebugResult.cs
source/LoadCVSLibrary/CSVReaderBase.cs
source/LoadCVSLibrary/position/CSVPositionReader.cs
source/LoadCVSLibrary/storeConfig/config/BoxEquip_Config.cs
source/XLRStoreClient/App.config
source/XLRStoreClient/XLRStore.csproj
source/XLRStoreClient/boxForm/FrmAutoFindPos.Designer.cs
source/XLRStoreClient/boxForm/FrmAutoFindPos.cs
source/XLRStoreClient/boxForm/FrmBoxEquip.cs
source/XLRStoreClient/boxForm/FrmTongsLearn.Designer.cs
source/XLRStoreClient/boxForm/FrmTongsLearn.cs
source/XLRStoreClient/boxForm/FrmTongsLearn.resx
source/XLRStoreClient/boxForm/userControl/UCStatusPanel.Designer.cs
source/XLRStoreClient/boxForm/userControl/UCStatusPanel.cs
source/XLRStoreClient/boxForm/userControl/UCStatusPanel.resx
source/Common/Setting_Init.cs
查看文件 @
2fe0028
...
@@ -34,6 +34,7 @@ namespace OnlineStore.Common
...
@@ -34,6 +34,7 @@ namespace OnlineStore.Common
public
static
string
ConfigPath_BoxPosition
=
"ConfigPath_BoxPosition"
;
public
static
string
ConfigPath_BoxPosition
=
"ConfigPath_BoxPosition"
;
public
static
string
ConfigPath_DrawerPosition
=
"ConfigPath_DrawerPosition"
;
public
static
string
ConfigPath_DrawerPosition
=
"ConfigPath_DrawerPosition"
;
public
static
string
CloseCamDetect
=
"CloseCamDetect"
;
public
static
string
CloseCamDetect
=
"CloseCamDetect"
;
public
static
string
ConfigPath_PosDebugInfo
=
"ConfigPath_PosDebugInfo"
;
/// <summary>
/// <summary>
/// 需要识别的二维码类型,多个中间使用#分割
/// 需要识别的二维码类型,多个中间使用#分割
/// </summary>
/// </summary>
...
...
source/Common/bean/Bean.cs
查看文件 @
2fe0028
...
@@ -267,6 +267,9 @@ namespace OnlineStore.Common
...
@@ -267,6 +267,9 @@ namespace OnlineStore.Common
/// 上次入库的库位号
/// 上次入库的库位号
/// </summary>
/// </summary>
public
static
string
lastPosId
=
"lastPosId"
;
public
static
string
lastPosId
=
"lastPosId"
;
/// <summary>
/// 执行时间
/// </summary>
public
static
string
executeTime
=
"executeTime "
;
}
}
}
}
source/DeviceLibrary/Config/Config_BoxEquip.csv
查看文件 @
2fe0028
...
@@ -35,6 +35,17 @@ PRO,0,抽屉列数,Drawer_Columns,6,,,,,,,,,,,,
...
@@ -35,6 +35,17 @@ PRO,0,抽屉列数,Drawer_Columns,6,,,,,,,,,,,,
PRO,0,抽屉内行数,Rows_In_Drawer,4,,,,,,,,,,,,
PRO,0,抽屉内行数,Rows_In_Drawer,4,,,,,,,,,,,,
PRO,0,抽屉内列数,Cols_In_Drawer,20,,,,,,,,,,,,
PRO,0,抽屉内列数,Cols_In_Drawer,20,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,行走机构视觉对位速度,MoveAxis_FindPosSpeed,20,,,,,,,,,,,,
PRO,0,行走机构正极限位置,MoveAxis_PosLimit,20,,,,,,,,,,,,
PRO,0,行走机构负极限位置,MoveAxis_NegLimit,20,,,,,,,,,,,,
PRO,0,升降轴视觉对位速度,UpdownAxis_FindPosSpeed,20,,,,,,,,,,,,
PRO,0,升降轴正极限位置,UpdownAxis_PosLimit,20,,,,,,,,,,,,
PRO,0,升降轴负极限位置,UpdownAxis_NegLimit,20,,,,,,,,,,,,
PRO,0,拉取升降轴视觉对位速度,PullAxis_Updown_FindPosSpeed,20,,,,,,,,,,,,
PRO,0,拉取升降轴正极限位置,PullAxis_Updown_PosLimit,20,,,,,,,,,,,,
PRO,0,拉取升降轴负极限位置,PullAxis_Updown_NegLimit,20,,,,,,,,,,,,
PRO,0,抓手检测得分阈值,TongsDetectThreshold,20,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,行走机构_待机点P1,MoveAxis_P1,80000,,,,,,,,,,,,
PRO,0,行走机构_待机点P1,MoveAxis_P1,80000,,,,,,,,,,,,
PRO,0,行走机构_进出料机构取放点P2,MoveAxis_P2,-18000,,,,,,,,,,,,
PRO,0,行走机构_进出料机构取放点P2,MoveAxis_P2,-18000,,,,,,,,,,,,
PRO,0,行走机构_安全位置,MoveAxis_SafePos,80000,,,,,,,,,,,,
PRO,0,行走机构_安全位置,MoveAxis_SafePos,80000,,,,,,,,,,,,
...
...
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
2fe0028
...
@@ -86,15 +86,19 @@
...
@@ -86,15 +86,19 @@
<Compile Include="manager\StoreManager.cs" />
<Compile Include="manager\StoreManager.cs" />
<Compile Include="deviceLibrary\RFID\RFIDManagercs.cs" />
<Compile Include="deviceLibrary\RFID\RFIDManagercs.cs" />
<Compile Include="manager\SServerManager.cs" />
<Compile Include="manager\SServerManager.cs" />
<Compile Include="storeBean\boxBean\BoxEqiup_Tongs.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_Camera.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_Camera.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_ConnectServerTimer.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_ConnectServerTimer.cs" />
<Compile Include="storeBean\boxBean\AutoInoutInfo.cs" />
<Compile Include="storeBean\boxBean\AutoInoutInfo.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_InExecute.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_InExecute.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_OutExecute.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_OutExecute.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_AutoFindPos.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_AutoFindPos.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_PosDebug.cs" />
<Compile Include="storeBean\boxBean\EyemLibDemo.cs" />
<Compile Include="storeBean\boxBean\EyemLibDemo.cs" />
<Compile Include="storeBean\boxBean\Humiture\HumitureBean.cs" />
<Compile Include="storeBean\boxBean\Humiture\HumitureBean.cs" />
<Compile Include="storeBean\boxBean\Humiture\HumitureController.cs" />
<Compile Include="storeBean\boxBean\Humiture\HumitureController.cs" />
<Compile Include="storeBean\boxBean\positionDebug\PositionDebugManager.cs" />
<Compile Include="storeBean\boxBean\positionDebug\PositionDebugResult.cs" />
<Compile Include="storeBean\inputBean\BatchMoveBean.cs" />
<Compile Include="storeBean\inputBean\BatchMoveBean.cs" />
<Compile Include="storeBean\inputBean\BatchMoveBean_Partial.cs" />
<Compile Include="storeBean\inputBean\BatchMoveBean_Partial.cs" />
<Compile Include="storeBean\EquipBase.cs" />
<Compile Include="storeBean\EquipBase.cs" />
...
...
source/DeviceLibrary/manager/model/DeviceStep.cs
查看文件 @
2fe0028
...
@@ -459,6 +459,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -459,6 +459,10 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
SA_03_Pos_AcqImg
,
SA_03_Pos_AcqImg
,
/// <summary>
/// <summary>
/// 存储机构自动对位:获取Mark(正向)
/// </summary>
SA_03_Pos_GetMark
,
/// <summary>
/// 存储机构自动对位:对位(正向)
/// 存储机构自动对位:对位(正向)
/// </summary>
/// </summary>
SA_04_Pos_AdjPos
,
SA_04_Pos_AdjPos
,
...
@@ -479,6 +483,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -479,6 +483,10 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
SA_08_Neg_AcqImg
,
SA_08_Neg_AcqImg
,
/// <summary>
/// <summary>
/// 存储机构自动对位:获取mark(反向)
/// </summary>
SA_08_Neg_GetMark
,
/// <summary>
/// 存储机构自动对位:对位(反向)
/// 存储机构自动对位:对位(反向)
/// </summary>
/// </summary>
SA_09_Neg_AdjPos
,
SA_09_Neg_AdjPos
,
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEqiup_Tongs.cs
0 → 100644
查看文件 @
2fe0028
using
System
;
using
System.Collections.Generic
;
using
System.Drawing
;
using
System.Drawing.Imaging
;
using
System.IO
;
using
System.Linq
;
using
System.Runtime.InteropServices
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
OnlineStore.DeviceLibrary
{
public
partial
class
BoxEquip
{
/// <summary>
/// 图像信息
/// </summary>
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemImage
{
/// <summary>
/// 地址
/// </summary>
public
IntPtr
ucpImage
;
/// <summary>
/// 图像内存 x 方向大小
/// </summary>
public
int
iWidth
;
/// <summary>
/// 图像内存 y 方向大小
/// </summary>
public
int
iHeight
;
/// <summary>
/// iDepth:
/// uint8_t 取值范围[0, 255], iDepth = 0(常用,解码图像一般为此种格式)
/// int8_t 取值范围[-128, 127], iDepth = 1
/// uint16_t 取值范围[0, 56635], iDepth = 2(常用,点料机图像一般为此种格式)
/// int16_t 取值范围[-32768, 32767], iDepth = 3
/// int32_t 取值范围[-2147483648, 2147483647], iDepth = 4
/// float_t 取值范围[-3.4028235E38, 3.4028235E38], iDepth = 5
/// double_t 取值范围[-1.7E-308, 1.7E+308], iDepth = 6
/// </summary>
public
int
iDepth
;
/// <summary>
/// 彩色图 iChannels=3或4(比RGB多了Alpha通道),一般为3
/// 灰度图 iChannels = 1
/// </summary>
public
int
iChannels
;
// 图像通道数
}
[
DllImport
(
"libresnet.dll"
,
CharSet
=
CharSet
.
None
)]
unsafe
internal
static
extern
int
match_feature
(
string
output_path
,
EyemImage
tpImage
,
char
*
partnumber
,
bool
is_enroll
,
out
float
score
);
[
DllImport
(
"libresnet.dll"
,
CharSet
=
CharSet
.
None
,
CallingConvention
=
CallingConvention
.
Cdecl
)]
internal
static
extern
int
enroll_feature
(
string
input_path
,
string
output_path
);
string
input_path
=
"./Tongs/test_huanhong"
;
string
output_path
=
"./Tongs/feature/"
;
string
temp_path
=
"./Tongs/temp/"
;
//学习范围
Rectangle
rectangle
=
new
Rectangle
(
564
,
953
,
379
,
107
);
/// <summary>
/// 匹配抓手外观类型
/// </summary>
/// <param name="filename">x光图像文件名</param>
/// <param name="pn">返回标识</param>
/// <returns>匹配分值 -1:匹配失败 >=0:匹配成功</returns>
unsafe
float
match
(
string
filename
,
out
string
pn
,
out
Bitmap
bitmap
)
{
Directory
.
CreateDirectory
(
input_path
);
Directory
.
CreateDirectory
(
output_path
);
Directory
.
CreateDirectory
(
temp_path
);
bitmap
=
null
;
pn
=
""
;
Bitmap
a
=
new
Bitmap
(
filename
);
Bitmap
b
=
new
Bitmap
(
224
,
224
,
PixelFormat
.
Format32bppArgb
);
Graphics
g
=
Graphics
.
FromImage
(
b
);
g
.
DrawImage
(
a
,
new
Rectangle
(
0
,
0
,
224
,
224
),
rectangle
,
GraphicsUnit
.
Pixel
);
g
.
Save
();
EyemImage
eyemImage1
=
new
EyemImage
();
eyemImage1
.
iWidth
=
224
;
eyemImage1
.
iHeight
=
224
;
eyemImage1
.
iChannels
=
4
;
eyemImage1
.
iDepth
=
0
;
BitmapData
bitmapData
=
b
.
LockBits
(
new
Rectangle
(
0
,
0
,
224
,
224
),
ImageLockMode
.
ReadWrite
,
PixelFormat
.
Format32bppArgb
);
eyemImage1
.
ucpImage
=
bitmapData
.
Scan0
;
char
*
p
=
(
char
*)
Marshal
.
AllocHGlobal
(
100
);
match_feature
(
output_path
,
eyemImage1
,
(
char
*)
p
,
false
,
out
float
score
);
b
.
UnlockBits
(
bitmapData
);
pn
=
Marshal
.
PtrToStringAnsi
((
IntPtr
)
p
);
Marshal
.
FreeHGlobal
((
IntPtr
)
p
);
bitmap
=
b
;
score
=
score
*
100
;
return
score
;
}
public
bool
MatchAndSaveImg
(
Bitmap
bitmap
,
string
imgname
)
{
var
score
=
match
(
bitmap
,
out
string
pn
,
out
Bitmap
bitmap1
);
var
pnpath
=
Path
.
Combine
(
temp_path
,
score
>
Config
.
TongsDetectThreshold
?
"OK"
:
"NG"
);
Directory
.
CreateDirectory
(
pnpath
);
var
simpletemp
=
Path
.
Combine
(
pnpath
,
$
"{imgname}-{score.ToString("
##
.
##
")}-{pn}.png"
);
bitmap
.
Save
(
simpletemp
,
ImageFormat
.
Png
);
bitmap
.
Dispose
();
return
false
;
}
/// <summary>
/// 匹配抓手外观类型
/// </summary>
/// <param name="filename">x光图像文件名</param>
/// <param name="pn">返回标识</param>
/// <returns>匹配分值 -1:匹配失败 >=0:匹配成功</returns>
public
unsafe
float
match
(
Bitmap
inputImg
,
out
string
pn
,
out
Bitmap
bitmap
)
{
Directory
.
CreateDirectory
(
input_path
);
Directory
.
CreateDirectory
(
output_path
);
Directory
.
CreateDirectory
(
temp_path
);
bitmap
=
null
;
pn
=
""
;
Bitmap
b
=
new
Bitmap
(
224
,
224
,
PixelFormat
.
Format32bppArgb
);
Graphics
g
=
Graphics
.
FromImage
(
b
);
g
.
DrawImage
(
inputImg
,
new
Rectangle
(
0
,
0
,
224
,
224
),
rectangle
,
GraphicsUnit
.
Pixel
);
g
.
Save
();
EyemImage
eyemImage1
=
new
EyemImage
();
eyemImage1
.
iWidth
=
224
;
eyemImage1
.
iHeight
=
224
;
eyemImage1
.
iChannels
=
4
;
eyemImage1
.
iDepth
=
0
;
BitmapData
bitmapData
=
b
.
LockBits
(
new
Rectangle
(
0
,
0
,
224
,
224
),
ImageLockMode
.
ReadWrite
,
PixelFormat
.
Format32bppArgb
);
eyemImage1
.
ucpImage
=
bitmapData
.
Scan0
;
char
*
p
=
(
char
*)
Marshal
.
AllocHGlobal
(
100
);
match_feature
(
output_path
,
eyemImage1
,
(
char
*)
p
,
false
,
out
float
score
);
b
.
UnlockBits
(
bitmapData
);
pn
=
Marshal
.
PtrToStringAnsi
((
IntPtr
)
p
);
Marshal
.
FreeHGlobal
((
IntPtr
)
p
);
bitmap
=
b
;
score
=
score
*
100
;
return
score
;
}
/// <summary>
/// 学习抓手外观
/// </summary>
/// <param name="filename">x光图像</param>
/// <param name="pn">标识符</param>
public
unsafe
void
learn
(
string
filename
,
string
pn
)
{
Directory
.
CreateDirectory
(
input_path
);
Directory
.
CreateDirectory
(
output_path
);
Directory
.
CreateDirectory
(
temp_path
);
Bitmap
a
=
new
Bitmap
(
filename
);
Bitmap
b
=
new
Bitmap
(
224
,
224
,
PixelFormat
.
Format32bppRgb
);
Graphics
g
=
Graphics
.
FromImage
(
b
);
g
.
DrawImage
(
a
,
new
Rectangle
(
0
,
0
,
224
,
224
),
rectangle
,
GraphicsUnit
.
Pixel
);
g
.
Save
();
EyemImage
eyemImage1
=
new
EyemImage
();
eyemImage1
.
iWidth
=
224
;
eyemImage1
.
iHeight
=
224
;
eyemImage1
.
iChannels
=
3
;
eyemImage1
.
iDepth
=
0
;
BitmapData
bitmapData
=
b
.
LockBits
(
new
Rectangle
(
0
,
0
,
224
,
224
),
ImageLockMode
.
ReadWrite
,
PixelFormat
.
Format32bppRgb
);
eyemImage1
.
ucpImage
=
bitmapData
.
Scan0
;
char
*
p
=
(
char
*)
Marshal
.
StringToHGlobalAnsi
(
pn
).
ToPointer
();
match_feature
(
output_path
,
eyemImage1
,
(
char
*)
p
,
true
,
out
_
);
b
.
UnlockBits
(
bitmapData
);
b
.
Dispose
();
}
/// <summary>
/// 学习抓手外观
/// </summary>
/// <param name="filename">x光图像</param>
/// <param name="pn">标识符</param>
public
unsafe
void
learn
(
Bitmap
inputimg
,
string
pn
)
{
Directory
.
CreateDirectory
(
input_path
);
Directory
.
CreateDirectory
(
output_path
);
Directory
.
CreateDirectory
(
temp_path
);
Bitmap
b
=
new
Bitmap
(
224
,
224
,
PixelFormat
.
Format32bppRgb
);
Graphics
g
=
Graphics
.
FromImage
(
b
);
g
.
DrawImage
(
inputimg
,
new
Rectangle
(
0
,
0
,
224
,
224
),
rectangle
,
GraphicsUnit
.
Pixel
);
g
.
Save
();
EyemImage
eyemImage1
=
new
EyemImage
();
eyemImage1
.
iWidth
=
224
;
eyemImage1
.
iHeight
=
224
;
eyemImage1
.
iChannels
=
3
;
eyemImage1
.
iDepth
=
0
;
BitmapData
bitmapData
=
b
.
LockBits
(
new
Rectangle
(
0
,
0
,
224
,
224
),
ImageLockMode
.
ReadWrite
,
PixelFormat
.
Format32bppRgb
);
eyemImage1
.
ucpImage
=
bitmapData
.
Scan0
;
char
*
p
=
(
char
*)
Marshal
.
StringToHGlobalAnsi
(
pn
).
ToPointer
();
match_feature
(
output_path
,
eyemImage1
,
(
char
*)
p
,
true
,
out
_
);
b
.
UnlockBits
(
bitmapData
);
b
.
Dispose
();
}
}
}
source/DeviceLibrary/storeBean/boxBean/BoxEquip.cs
查看文件 @
2fe0028
...
@@ -68,6 +68,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -68,6 +68,7 @@ namespace OnlineStore.DeviceLibrary
//温湿度
//温湿度
public
HumitureBean
humBean
=
null
;
public
HumitureBean
humBean
=
null
;
public
string
lastPosId
=
""
;
public
string
lastPosId
=
""
;
public
string
executeTime
=
""
;
public
DeviceStatus
deviceStatus
=
DeviceStatus
.
ResetMove
;
public
DeviceStatus
deviceStatus
=
DeviceStatus
.
ResetMove
;
public
string
CID
=
""
;
public
string
CID
=
""
;
/// <summary>
/// <summary>
...
@@ -740,6 +741,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -740,6 +741,10 @@ namespace OnlineStore.DeviceLibrary
{
{
AutoFindPosProcess
();
AutoFindPosProcess
();
}
}
else
if
(
isInitPosDebugInfo
)
{
PosDebugProcess
();
}
BusyMoveProcess
();
BusyMoveProcess
();
IOTimeOutProcess
();
IOTimeOutProcess
();
if
(
NoErrorAlarm
())
if
(
NoErrorAlarm
())
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_AutoFindPos.cs
查看文件 @
2fe0028
...
@@ -85,26 +85,61 @@ namespace OnlineStore.DeviceLibrary
...
@@ -85,26 +85,61 @@ namespace OnlineStore.DeviceLibrary
}
}
private
void
ToDrawer_StartPoint
()
private
void
ToDrawer_StartPoint
()
{
{
StringBuilder
stringBuilder
=
new
StringBuilder
(
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
.
Substring
(
0
,
4
));
//
StringBuilder stringBuilder = new StringBuilder(MoveInfo.MoveParam.PosInfo.PosId.Substring(0, 4));
stringBuilder
.
Append
(
autoFindPos
.
CurRow
.
ToString
().
PadLeft
(
2
,
'0'
));
//
stringBuilder.Append(autoFindPos.CurRow.ToString().PadLeft(2, '0'));
stringBuilder
.
Append
(
autoFindPos
.
CurColumn
.
ToString
().
PadLeft
(
2
,
'0'
));
//
stringBuilder.Append(autoFindPos.CurColumn.ToString().PadLeft(2, '0'));
stringBuilder
.
Append
(
"0101"
);
//
stringBuilder.Append("0101");
if
(
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
.
Equals
(
stringBuilder
.
ToString
()))
//
if (MoveInfo.MoveParam.PosInfo.PosId.Equals(stringBuilder.ToString()))
{
//
{
MoveAxisToP3
();
//
MoveAxisToP3();
UpdownAxisTo_P6_P12
();
//
UpdownAxisTo_P6_P12();
PullAxis_UpdownToLowP4
();
//
PullAxis_UpdownToLowP4();
}
//
}
else
//
else
{
{
autoFindPos
.
Startposition_MoveAxis
=
MoveAxis
.
GetAclPosition
();
autoFindPos
.
Startposition_MoveAxis
=
MoveAxis
.
GetAclPosition
()
+
(
autoFindPos
.
CurColumn
-
autoFindPos
.
PreColumn
)
*
autoFindPos
.
Row_Spacing
;
autoFindPos
.
Startposition_PullUpdpwnAxis
=
PullAxis_Updown
.
GetAclPosition
();
autoFindPos
.
Startposition_PullUpdpwnAxis
=
PullAxis_Updown
.
GetAclPosition
()
+
(
autoFindPos
.
CurRow
-
autoFindPos
.
PreRow
)
*
autoFindPos
.
Column_Spacing
;
autoFindPos
.
Startposition_UpDownAxis
=
UpdownAxis
.
GetAclPosition
();
autoFindPos
.
Startposition_UpDownAxis
=
UpdownAxis
.
GetAclPosition
()
+
(
autoFindPos
.
CurRow
-
autoFindPos
.
PreRow
)
*
autoFindPos
.
Column_Spacing
;
int
moveAxis
,
pullUpDwnAxis
,
UpdwnAxis
;
if
(
autoFindPos
.
Startposition_MoveAxis
>=
Config
.
MoveAxis_PosLimit
)
{
moveAxis
=
Config
.
MoveAxis_PosLimit
;
}
else
if
(
autoFindPos
.
Startposition_MoveAxis
<=
Config
.
MoveAxis_NegLimit
)
{
moveAxis
=
Config
.
MoveAxis_NegLimit
;
}
else
moveAxis
=
autoFindPos
.
Startposition_MoveAxis
;
if
(
autoFindPos
.
Startposition_PullUpdpwnAxis
>=
Config
.
PullAxis_Updown_PosLimit
)
{
pullUpDwnAxis
=
Config
.
PullAxis_Updown_PosLimit
;
}
else
if
(
autoFindPos
.
Startposition_PullUpdpwnAxis
<=
Config
.
PullAxis_Updown_NegLimit
)
{
pullUpDwnAxis
=
Config
.
PullAxis_Updown_NegLimit
;
}
else
{
pullUpDwnAxis
=
autoFindPos
.
Startposition_PullUpdpwnAxis
;
}
if
(
autoFindPos
.
Startposition_UpDownAxis
>=
Config
.
UpdownAxis_PosLimit
)
{
UpdwnAxis
=
Config
.
UpdownAxis_PosLimit
;
}
else
if
(
autoFindPos
.
Startposition_UpDownAxis
<=
Config
.
UpdownAxis_NegLimit
)
{
UpdwnAxis
=
Config
.
UpdownAxis_NegLimit
;
}
else
{
UpdwnAxis
=
autoFindPos
.
Startposition_UpDownAxis
;
}
LogUtil
.
info
(
$
"视觉对位 运行到抽屉 行={autoFindPos.CurRow},列={autoFindPos.CurColumn}"
);
LogUtil
.
info
(
$
"视觉对位 运行到抽屉 行={autoFindPos.CurRow},列={autoFindPos.CurColumn}"
);
MoveAxis
.
AbsMove
(
MoveInfo
,
autoFindPos
.
Startposition_MoveAxis
+
(
autoFindPos
.
CurColumn
-
autoFindPos
.
PreColumn
)
*
autoFindPos
.
Row_Spacing
,
Config
.
MoveAxis_P1_
Speed
);
MoveAxis
.
AbsMove
(
MoveInfo
,
moveAxis
,
Config
.
MoveAxis_FindPos
Speed
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
autoFindPos
.
Startposition_UpDownAxis
+
(
autoFindPos
.
CurRow
-
autoFindPos
.
PreRow
)
*
autoFindPos
.
Column_Spacing
,
Config
.
Updown_P1_
Speed
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
UpdwnAxis
,
Config
.
UpdownAxis_FindPos
Speed
);
PullAxis_Updown
.
AbsMove
(
MoveInfo
,
autoFindPos
.
Startposition_PullUpdpwnAxis
+
(
autoFindPos
.
CurRow
-
autoFindPos
.
PreRow
)
*
autoFindPos
.
Column_Spacing
,
Config
.
PullAxis_Updown_P1_
Speed
);
PullAxis_Updown
.
AbsMove
(
MoveInfo
,
pullUpDwnAxis
,
Config
.
PullAxis_Updown_FindPos
Speed
);
}
}
}
}
...
@@ -151,7 +186,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -151,7 +186,7 @@ namespace OnlineStore.DeviceLibrary
AutoFindPosSaveImage
(
$
"NG_Mark点X轴坐标{eyemOcsFXYR.fX},模板Mark点X轴坐标{GetDrawerX()},X轴偏差{(GetDrawerX() - eyemOcsFXYR.fX)}"
);
AutoFindPosSaveImage
(
$
"NG_Mark点X轴坐标{eyemOcsFXYR.fX},模板Mark点X轴坐标{GetDrawerX()},X轴偏差{(GetDrawerX() - eyemOcsFXYR.fX)}"
);
LogInfo
(
$
"视觉对位 {MoveInfo.SLog}:Mark点X轴坐标{eyemOcsFXYR.fX},模板Mark点X轴坐标{GetDrawerX()},X轴偏差{(GetDrawerX() - eyemOcsFXYR.fX)},"
+
LogInfo
(
$
"视觉对位 {MoveInfo.SLog}:Mark点X轴坐标{eyemOcsFXYR.fX},模板Mark点X轴坐标{GetDrawerX()},X轴偏差{(GetDrawerX() - eyemOcsFXYR.fX)},"
+
$
"行走机构相对移动{(GetDrawerX() - eyemOcsFXYR.fX) * autoFindPos.XCoeffOfCoorToPulse}[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
$
"行走机构相对移动{(GetDrawerX() - eyemOcsFXYR.fX) * autoFindPos.XCoeffOfCoorToPulse}[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
MoveAxis
.
AbsMove
(
MoveInfo
,
Convert
.
ToInt32
(
MoveAxis
.
GetAclPosition
()
+
(
GetDrawerX
()
-
eyemOcsFXYR
.
fX
)
*
autoFindPos
.
XCoeffOfCoorToPulse
),
Config
.
MoveAxis_
P1_
Speed
/
10
);
MoveAxis
.
AbsMove
(
MoveInfo
,
Convert
.
ToInt32
(
MoveAxis
.
GetAclPosition
()
+
(
GetDrawerX
()
-
eyemOcsFXYR
.
fX
)
*
autoFindPos
.
XCoeffOfCoorToPulse
),
Config
.
MoveAxis_
FindPos
Speed
/
10
);
return
false
;
return
false
;
}
}
private
bool
CheckMarkYPoint
(
EyemOcsFXYR
eyemOcsFXYR
)
private
bool
CheckMarkYPoint
(
EyemOcsFXYR
eyemOcsFXYR
)
...
@@ -164,8 +199,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -164,8 +199,8 @@ namespace OnlineStore.DeviceLibrary
return
true
;
return
true
;
}
}
AutoFindPosSaveImage
(
$
"NG_Mark点Y轴坐标{eyemOcsFXYR.fY},模板Mark点Y轴坐标{GetDrawerY()},Y轴偏差{(GetDrawerY() - eyemOcsFXYR.fY)}"
);
AutoFindPosSaveImage
(
$
"NG_Mark点Y轴坐标{eyemOcsFXYR.fY},模板Mark点Y轴坐标{GetDrawerY()},Y轴偏差{(GetDrawerY() - eyemOcsFXYR.fY)}"
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Convert
.
ToInt32
(
UpdownAxis
.
GetAclPosition
()
+
(
GetDrawerY
()
-
eyemOcsFXYR
.
fY
)
*
autoFindPos
.
YCoeffOfCoorToPulse
),
Config
.
Updown
_P1_
Speed
/
10
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Convert
.
ToInt32
(
UpdownAxis
.
GetAclPosition
()
+
(
GetDrawerY
()
-
eyemOcsFXYR
.
fY
)
*
autoFindPos
.
YCoeffOfCoorToPulse
),
Config
.
Updown
Axis_FindPos
Speed
/
10
);
PullAxis_Updown
.
AbsMove
(
MoveInfo
,
Convert
.
ToInt32
(
PullAxis_Updown
.
GetAclPosition
()
+
(
GetDrawerY
()
-
eyemOcsFXYR
.
fY
)
*
autoFindPos
.
YCoeffOfCoorToPulse
),
Config
.
Updown_P1_
Speed
/
10
);
PullAxis_Updown
.
AbsMove
(
MoveInfo
,
Convert
.
ToInt32
(
PullAxis_Updown
.
GetAclPosition
()
+
(
GetDrawerY
()
-
eyemOcsFXYR
.
fY
)
*
autoFindPos
.
YCoeffOfCoorToPulse
),
Config
.
PullAxis_Updown_FindPos
Speed
/
10
);
LogInfo
(
$
"视觉对位 {MoveInfo.SLog}:Mark点Y轴坐标{eyemOcsFXYR.fY},模板Mark点Y轴坐标{GetDrawerY()},Y轴偏差{(GetDrawerY() - eyemOcsFXYR.fY)},"
+
LogInfo
(
$
"视觉对位 {MoveInfo.SLog}:Mark点Y轴坐标{eyemOcsFXYR.fY},模板Mark点Y轴坐标{GetDrawerY()},Y轴偏差{(GetDrawerY() - eyemOcsFXYR.fY)},"
+
$
"移栽升降轴、料屉升降轴相对移动{(GetDrawerY() - eyemOcsFXYR.fY) * autoFindPos.YCoeffOfCoorToPulse}[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
$
"移栽升降轴、料屉升降轴相对移动{(GetDrawerY() - eyemOcsFXYR.fY) * autoFindPos.YCoeffOfCoorToPulse}[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
return
false
;
return
false
;
...
@@ -188,54 +223,63 @@ namespace OnlineStore.DeviceLibrary
...
@@ -188,54 +223,63 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NewMove
(
MoveType
.
Working
,
param
);
MoveInfo
.
NewMove
(
MoveType
.
Working
,
param
);
SetBoxStatus
(
DeviceStatus
.
Debugging
,
RunStatus
.
Busy
);
SetBoxStatus
(
DeviceStatus
.
Debugging
,
RunStatus
.
Busy
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SA_01_Pos_Start_Find_Pos
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SA_01_Pos_Start_Find_Pos
);
PullAxis_Inout_To_
Cam
();
PullAxis_Inout_To_
P1
();
}
}
private
bool
SaveDrawerPosition
()
private
bool
SaveDrawerPosition
()
{
{
StringBuilder
stringBuilder
=
new
StringBuilder
(
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
.
Substring
(
0
,
4
));
try
stringBuilder
.
Append
(
autoFindPos
.
CurRow
.
ToString
().
PadLeft
(
2
,
'0'
));
stringBuilder
.
Append
(
autoFindPos
.
CurColumn
.
ToString
().
PadLeft
(
2
,
'0'
));
List
<
string
>
curDrawer
=
PositionNumList
.
FindAll
(
s
=>
s
.
StartsWith
(
stringBuilder
.
ToString
()));
if
(
curDrawer
!=
null
&&
curDrawer
.
Count
>
0
)
{
{
foreach
(
string
item
in
curDrawer
)
StringBuilder
stringBuilder
=
new
StringBuilder
(
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
.
Substring
(
0
,
4
));
stringBuilder
.
Append
(
autoFindPos
.
CurRow
.
ToString
().
PadLeft
(
2
,
'0'
));
stringBuilder
.
Append
(
autoFindPos
.
CurColumn
.
ToString
().
PadLeft
(
2
,
'0'
));
List
<
string
>
curDrawer
=
PositionNumList
.
FindAll
(
s
=>
s
.
StartsWith
(
stringBuilder
.
ToString
()));
if
(
curDrawer
!=
null
&&
curDrawer
.
Count
>
0
)
{
{
BoxPosition
ktkPosition
=
CSVPositionReader
<
BoxPosition
>.
GetPositon
(
item
);
foreach
(
string
item
in
curDrawer
)
if
(
ktkPosition
!=
null
)
{
ktkPosition
.
MoveAxis_P3
=
MoveAxis
.
GetAclPosition
();
ktkPosition
.
Updown_P6_P12
=
UpdownAxis
.
GetAclPosition
();
ktkPosition
.
Updown_P7_P13
=
UpdownAxis
.
GetAclPosition
()
+
autoFindPos
.
UpdownAxis_Diff_Upper_Low
;
ktkPosition
.
PullAxis_Updown_P4
=
PullAxis_Updown
.
GetAclPosition
();
ktkPosition
.
PullAxis_Updown_P2
=
PullAxis_Updown
.
GetAclPosition
()
+
autoFindPos
.
PullUpdown_Diff_mid
;
ktkPosition
.
PullAxis_Updown_P3
=
PullAxis_Updown
.
GetAclPosition
()
+
autoFindPos
.
PullUpdown_Diff_high
;
}
//位置配置
string
appPath
=
Application
.
StartupPath
;
//如果总配置文件存在,保存到总的配置文件
string
positionConfigFile
=
appPath
+
ConfigAppSettings
.
GetValue
(
Setting_Init
.
ConfigPath_BoxPosition
);
if
(!
File
.
Exists
(
positionConfigFile
))
{
string
nameStr
=
DeviceID
.
ToString
();
positionConfigFile
=
positionConfigFile
.
Replace
(
".csv"
,
"_"
+
nameStr
+
".csv"
);
}
bool
result
=
CSVPositionReader
<
BoxPosition
>.
SavePostion
(
positionConfigFile
,
ktkPosition
);
if
(!
result
)
{
SetWarnMsg
(
"库位【"
+
item
+
"】保存失败!"
);
}
else
{
{
BoxPosition
ktkPosition
=
CSVPositionReader
<
BoxPosition
>.
GetPositon
(
item
);
if
(
ktkPosition
!=
null
)
{
ktkPosition
.
MoveAxis_P3
=
MoveAxis
.
GetAclPosition
();
ktkPosition
.
Updown_P6_P12
=
UpdownAxis
.
GetAclPosition
();
ktkPosition
.
Updown_P7_P13
=
UpdownAxis
.
GetAclPosition
()
+
autoFindPos
.
UpdownAxis_Diff_Upper_Low
;
ktkPosition
.
PullAxis_Updown_P4
=
PullAxis_Updown
.
GetAclPosition
();
ktkPosition
.
PullAxis_Updown_P2
=
PullAxis_Updown
.
GetAclPosition
()
+
autoFindPos
.
PullUpdown_Diff_mid
;
ktkPosition
.
PullAxis_Updown_P3
=
PullAxis_Updown
.
GetAclPosition
()
+
autoFindPos
.
PullUpdown_Diff_high
;
}
//位置配置
string
appPath
=
Application
.
StartupPath
;
//如果总配置文件存在,保存到总的配置文件
string
positionConfigFile
=
appPath
+
ConfigAppSettings
.
GetValue
(
Setting_Init
.
ConfigPath_BoxPosition
);
if
(!
File
.
Exists
(
positionConfigFile
))
{
string
nameStr
=
DeviceID
.
ToString
();
positionConfigFile
=
positionConfigFile
.
Replace
(
".csv"
,
"_"
+
nameStr
+
".csv"
);
}
bool
result
=
CSVPositionReader
<
BoxPosition
>.
SavePostion
(
positionConfigFile
,
ktkPosition
,
false
);
if
(!
result
)
{
SetWarnMsg
(
"库位【"
+
item
+
"】保存失败!"
);
return
false
;
}
else
{
// LogInfo($"存储机构-视觉对位 {MoveInfo.SLog}:库位[{item}]保存成功[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
// LogInfo($"存储机构-视觉对位 {MoveInfo.SLog}:库位[{item}]保存成功[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
}
}
}
LogInfo
(
$
"视觉对位 {MoveInfo.SLog}:抽屉[{autoFindPos.CurRow},{autoFindPos.CurColumn}]位置信息保存成功[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
return
true
;
}
}
LogInfo
(
$
"视觉对位 {MoveInfo.SLog}:抽屉[{autoFindPos.CurRow},{autoFindPos.CurColumn}]位置信息保存成功[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
}
return
true
;
catch
(
Exception
e
)
{
LogUtil
.
error
(
"SaveDrawerPosition"
,
e
);
}
}
return
false
;
return
false
;
}
}
Bitmap
bitmap
=
null
;
public
void
FindPosEnd
()
public
void
FindPosEnd
()
{
{
MoveInfo
.
EndMove
();
MoveInfo
.
EndMove
();
...
@@ -246,6 +290,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -246,6 +290,8 @@ namespace OnlineStore.DeviceLibrary
{
{
LogUtil
.
info
(
"视觉对位失败抽屉:"
+
item
);
LogUtil
.
info
(
"视觉对位失败抽屉:"
+
item
);
}
}
if
(
autoFindPos
.
FailedDrawers
.
Count
>
0
)
autoFindPos
.
FailedDrawers
.
Clear
();
}
}
EyemOcsFXYR
ocsFXYR
;
EyemOcsFXYR
ocsFXYR
;
public
void
AutoFindPosProcess
()
public
void
AutoFindPosProcess
()
...
@@ -271,12 +317,17 @@ namespace OnlineStore.DeviceLibrary
...
@@ -271,12 +317,17 @@ namespace OnlineStore.DeviceLibrary
case
StepEnum
.
SA_02_Pos_To_Drawer_StartPoint
:
case
StepEnum
.
SA_02_Pos_To_Drawer_StartPoint
:
//取图
//取图
//Bitmap bitmap = null;
//Bitmap bitmap = null;
Bitmap
bitmap
=
AcqImage
(
CamPosSide
(
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
));
MoveInfo
.
NextMoveStep
(
StepEnum
.
SA_03_Pos_AcqImg
);
bitmap
=
AcqImage
(
CamPosSide
(
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
LogInfo
(
$
"视觉对位 {MoveInfo.SLog}:取图,行={autoFindPos.CurRow},列={autoFindPos.CurColumn}[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
break
;
case
StepEnum
.
SA_03_Pos_AcqImg
:
int
res
=
AutoFindPos
.
GetMarkInfo
(
bitmap
,
$
"{MoveInfo.MoveParam.PosInfo.PosId.Substring(0, 4)}"
,
$
"row{autoFindPos.CurRow}_col{autoFindPos.CurColumn}"
,
out
ocsFXYR
);
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
)
if
(
res
==
0
)
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SA_03_Pos_AcqImg
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SA_03_Pos_GetMark
);
LogInfo
(
$
"视觉对位 {MoveInfo.SLog}:获取Mark成功[ret={res}],行={autoFindPos.CurRow},列={autoFindPos.CurColumn}[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
}
}
else
if
(
res
==
-
4
)
else
if
(
res
==
-
4
)
{
{
...
@@ -291,9 +342,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -291,9 +342,11 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
SA_05_Pos_NextDrawer
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SA_05_Pos_NextDrawer
);
}
}
break
;
break
;
case
StepEnum
.
SA_03_Pos_
AcqImg
:
case
StepEnum
.
SA_03_Pos_
GetMark
:
if
(
CheckMarkXPoint
(
ocsFXYR
)
&&
CheckMarkYPoint
(
ocsFXYR
))
if
(
CheckMarkXPoint
(
ocsFXYR
)
&&
CheckMarkYPoint
(
ocsFXYR
))
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SA_05_Pos_NextDrawer
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
//存储抽屉位置信息
//存储抽屉位置信息
if
(
SaveDrawerPosition
())
if
(
SaveDrawerPosition
())
{
{
...
@@ -303,7 +356,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -303,7 +356,6 @@ namespace OnlineStore.DeviceLibrary
{
{
autoFindPos
.
FailedDrawers
.
Add
(
$
"{autoFindPos.CurRow},{autoFindPos.CurColumn}"
);
autoFindPos
.
FailedDrawers
.
Add
(
$
"{autoFindPos.CurRow},{autoFindPos.CurColumn}"
);
}
}
MoveInfo
.
NextMoveStep
(
StepEnum
.
SA_05_Pos_NextDrawer
);
}
}
else
else
{
{
...
@@ -346,29 +398,36 @@ namespace OnlineStore.DeviceLibrary
...
@@ -346,29 +398,36 @@ namespace OnlineStore.DeviceLibrary
case
StepEnum
.
SA_07_Neg_To_Drawer_StartPoint
:
case
StepEnum
.
SA_07_Neg_To_Drawer_StartPoint
:
//取图
//取图
//Bitmap bitmap1 = null;
//Bitmap bitmap1 = null;
Bitmap
bitmap1
=
AcqImage
(
CamPosSide
(
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
));
MoveInfo
.
NextMoveStep
(
StepEnum
.
SA_08_Neg_AcqImg
);
int
res1
=
AutoFindPos
.
GetMarkInfo
(
bitmap1
,
$
"{MoveInfo.MoveParam.PosInfo.PosId.Substring(0, 4)}"
,
$
"row{autoFindPos.CurRow}_col{autoFindPos.CurColumn}"
,
out
ocsFXYR
);
bitmap
=
AcqImage
(
CamPosSide
(
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
));
LogInfo
(
$
"视觉对位 {MoveInfo.SLog}:取图[ret={res1}],行={autoFindPos.CurRow},列={autoFindPos.CurColumn}[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
LogInfo
(
$
"视觉对位 {MoveInfo.SLog}:取图,行={autoFindPos.CurRow},列={autoFindPos.CurColumn}[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
break
;
case
StepEnum
.
SA_08_Neg_AcqImg
:
int
res1
=
AutoFindPos
.
GetMarkInfo
(
bitmap
,
$
"{MoveInfo.MoveParam.PosInfo.PosId.Substring(0, 4)}"
,
$
"row{autoFindPos.CurRow}_col{autoFindPos.CurColumn}"
,
out
ocsFXYR
);
if
(
res1
==
0
)
if
(
res1
==
0
)
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SA_08_Neg_AcqImg
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SA_08_Neg_GetMark
);
LogInfo
(
$
"视觉对位 {MoveInfo.SLog}:获取Mark成功[ret={res1}],行={autoFindPos.CurRow},列={autoFindPos.CurColumn}[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
}
}
else
if
(
res1
==
-
4
)
else
if
(
res1
==
-
4
)
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SA_10_Neg_NextDrawer
);
SetWarnMsg
(
$
"视觉对位异常[code={res1}],未找到Mark点。对位失败的行={autoFindPos.CurRow}[{MoveAxis.GetAclPosition()}],列={autoFindPos.CurColumn}[{UpdownAxis.GetAclPosition()}]"
);
SetWarnMsg
(
$
"视觉对位异常[code={res1}],未找到Mark点。对位失败的行={autoFindPos.CurRow}[{MoveAxis.GetAclPosition()}],列={autoFindPos.CurColumn}[{UpdownAxis.GetAclPosition()}]"
);
autoFindPos
.
FailedDrawers
.
Add
(
$
"{autoFindPos.CurRow},{autoFindPos.CurColumn}"
);
autoFindPos
.
FailedDrawers
.
Add
(
$
"{autoFindPos.CurRow},{autoFindPos.CurColumn}"
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SA_10_Neg_NextDrawer
);
}
}
else
else
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SA_10_Neg_NextDrawer
);
SetWarnMsg
(
$
"视觉对位异常[code={res1}],未找到Mark点。对位失败的行={autoFindPos.CurRow}[{MoveAxis.GetAclPosition()}],列={autoFindPos.CurColumn}[{UpdownAxis.GetAclPosition()}]"
);
SetWarnMsg
(
$
"视觉对位异常[code={res1}],未找到Mark点。对位失败的行={autoFindPos.CurRow}[{MoveAxis.GetAclPosition()}],列={autoFindPos.CurColumn}[{UpdownAxis.GetAclPosition()}]"
);
autoFindPos
.
FailedDrawers
.
Add
(
$
"{autoFindPos.CurRow},{autoFindPos.CurColumn}"
);
autoFindPos
.
FailedDrawers
.
Add
(
$
"{autoFindPos.CurRow},{autoFindPos.CurColumn}"
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SA_10_Neg_NextDrawer
);
}
}
break
;
break
;
case
StepEnum
.
SA_08_Neg_
AcqImg
:
case
StepEnum
.
SA_08_Neg_
GetMark
:
if
(
CheckMarkXPoint
(
ocsFXYR
)
&&
CheckMarkYPoint
(
ocsFXYR
))
if
(
CheckMarkXPoint
(
ocsFXYR
)
&&
CheckMarkYPoint
(
ocsFXYR
))
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SA_10_Neg_NextDrawer
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
//存储抽屉位置信息
//存储抽屉位置信息
if
(
SaveDrawerPosition
())
if
(
SaveDrawerPosition
())
{
{
...
@@ -378,7 +437,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -378,7 +437,6 @@ namespace OnlineStore.DeviceLibrary
{
{
autoFindPos
.
FailedDrawers
.
Add
(
$
"{autoFindPos.CurRow},{autoFindPos.CurColumn}"
);
autoFindPos
.
FailedDrawers
.
Add
(
$
"{autoFindPos.CurRow},{autoFindPos.CurColumn}"
);
}
}
MoveInfo
.
NextMoveStep
(
StepEnum
.
SA_10_Neg_NextDrawer
);
}
}
else
else
{
{
...
@@ -481,7 +539,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -481,7 +539,7 @@ namespace OnlineStore.DeviceLibrary
Columns
=
boxEquip_Config
.
Drawer_Columns
;
Columns
=
boxEquip_Config
.
Drawer_Columns
;
FailedDrawers
=
new
List
<
string
>();
FailedDrawers
=
new
List
<
string
>();
}
}
public
void
SetParam
(
int
curRow
,
int
curColumn
,
int
startRow
,
int
startCol
,
float
xCooef
,
float
yCooef
)
public
void
SetParam
(
int
curRow
,
int
curColumn
,
int
startRow
,
int
startCol
,
float
xCooef
,
float
yCooef
)
{
{
CurRow
=
startRow
;
CurRow
=
startRow
;
CurColumn
=
startCol
;
CurColumn
=
startCol
;
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_Camera.cs
查看文件 @
2fe0028
...
@@ -64,22 +64,22 @@ namespace OnlineStore.DeviceLibrary
...
@@ -64,22 +64,22 @@ namespace OnlineStore.DeviceLibrary
{
{
camera_event
?.
Invoke
(
new
CameraArgs
(
name
,
bmp
));
camera_event
?.
Invoke
(
new
CameraArgs
(
name
,
bmp
));
}
}
if
(
MoveInfo
!=
null
)
//
if (MoveInfo != null)
{
//
{
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
InStore
)
||
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
OutStore
))
//
if (MoveInfo.MoveType.Equals(MoveType.InStore) || MoveInfo.MoveType.Equals(MoveType.OutStore))
{
//
{
if
(
CheckASide
()
&&
name
.
Equals
(
"box_A"
))
//
if (CheckASide() && name.Equals("box_A"))
{
//
{
SaveImage
(
name
);
//
SaveImage(name);
}
//
}
else
//
else
{
//
{
SaveImage
(
"box_B"
);
//
SaveImage("box_B");
}
//
}
}
//
}
}
//
}
Thread
.
Sleep
(
5
00
);
Thread
.
Sleep
(
3
00
);
}
}
}
}
void
StopCamera
()
void
StopCamera
()
...
@@ -93,9 +93,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -93,9 +93,10 @@ namespace OnlineStore.DeviceLibrary
Bitmap
bitmap
=
camera
.
GetImage
(
camName
);
Bitmap
bitmap
=
camera
.
GetImage
(
camName
);
return
bitmap
;
return
bitmap
;
}
}
string
imgPath
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
ImagePath
);
public
void
SaveImage
(
string
camName
)
public
void
SaveImage
(
string
camName
)
{
{
string
path
=
Application
.
StartupPath
+
ConfigAppSettings
.
GetValue
(
Setting_Init
.
ImagePath
)
+
camName
+
"\\"
+
DateTime
.
Now
.
ToString
(
"yyyyMMdd"
);
string
path
=
Application
.
StartupPath
+
imgPath
+
camName
+
"\\"
+
DateTime
.
Now
.
ToString
(
"yyyyMMdd"
);
if
(
AutoSaveImage
)
if
(
AutoSaveImage
)
{
{
if
(!
System
.
IO
.
Directory
.
Exists
(
path
))
if
(!
System
.
IO
.
Directory
.
Exists
(
path
))
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ConnectServerTimer.cs
查看文件 @
2fe0028
...
@@ -103,10 +103,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -103,10 +103,12 @@ namespace OnlineStore.DeviceLibrary
else
if
(
runStatus
.
Equals
(
DeviceStatus
.
OutStoreBoxEnd
)
||
runStatus
.
Equals
(
DeviceStatus
.
InStoreEnd
))
else
if
(
runStatus
.
Equals
(
DeviceStatus
.
OutStoreBoxEnd
)
||
runStatus
.
Equals
(
DeviceStatus
.
InStoreEnd
))
{
{
boxStatus
.
data
.
Add
(
ParamDefine
.
posId
,
lastPosId
);
boxStatus
.
data
.
Add
(
ParamDefine
.
posId
,
lastPosId
);
boxStatus
.
data
.
Add
(
ParamDefine
.
executeTime
,
executeTime
);
}
}
else
if
(!
lastPosId
.
Equals
(
""
))
else
if
(!
lastPosId
.
Equals
(
""
))
{
{
boxStatus
.
data
.
Add
(
ParamDefine
.
posId
,
lastPosId
);
boxStatus
.
data
.
Add
(
ParamDefine
.
posId
,
lastPosId
);
boxStatus
.
data
.
Add
(
ParamDefine
.
executeTime
,
executeTime
);
boxStatus
.
status
=
(
int
)
deviceStatus
;
boxStatus
.
status
=
(
int
)
deviceStatus
;
if
(
lastPosId
!=
""
)
if
(
lastPosId
!=
""
)
{
{
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_InExecute.cs
查看文件 @
2fe0028
...
@@ -275,46 +275,55 @@ namespace OnlineStore.DeviceLibrary
...
@@ -275,46 +275,55 @@ namespace OnlineStore.DeviceLibrary
case
StepEnum
.
SI_09_ToTray
:
case
StepEnum
.
SI_09_ToTray
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_10_LiftTray
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_10_LiftTray
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:提升抽屉,料斗拉取升降轴到料屉提取高点P3[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:提升抽屉,料斗拉取升降轴到料屉提取高点P3[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
SaveSpecifiedImage
();
PullAxis_UpdownToHighP3
();
PullAxis_UpdownToHighP3
();
break
;
break
;
case
StepEnum
.
SI_10_LiftTray
:
case
StepEnum
.
SI_10_LiftTray
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_11_PullTray
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_11_PullTray
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:拉抽屉到库位点,料斗拉取进出轴到料屉库位点P3/P5[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:拉抽屉到库位点,料斗拉取进出轴到料屉库位点P3/P5[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
PullAxis_Inout_To_P3_P5
();
PullAxis_Inout_To_P3_P5
();
SaveSpecifiedImage
();
break
;
break
;
case
StepEnum
.
SI_11_PullTray
:
case
StepEnum
.
SI_11_PullTray
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_12_DropTrayToPos
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_12_DropTrayToPos
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:将抽屉降到库位提取点,料斗拉取升降轴到P2料屉提取水平点P2,到位后检测{trayRows[GetPosRow()]}=1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:将抽屉降到库位提取点,料斗拉取升降轴到P2料屉提取水平点P2,到位后检测{trayRows[GetPosRow()]}=1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
PullAxis_UpdownToMiddleP2
();
PullAxis_UpdownToMiddleP2
();
SaveSpecifiedImage
();
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
trayRows
[
GetPosRow
()],
IO_VALUE
.
HIGH
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
trayRows
[
GetPosRow
()],
IO_VALUE
.
HIGH
));
break
;
break
;
case
StepEnum
.
SI_12_DropTrayToPos
:
case
StepEnum
.
SI_12_DropTrayToPos
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_13_GetReel
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_13_GetReel
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:进入库位中,移栽升降轴到料屉取放点P7/P13[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:进入库位中,移栽升降轴到料屉取放点P7/P13[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
UpdownAxisToP7_P13
();
UpdownAxisToP7_P13
();
SaveSpecifiedImage
();
break
;
break
;
case
StepEnum
.
SI_13_GetReel
:
case
StepEnum
.
SI_13_GetReel
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_14_ReleaseCompress
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_14_ReleaseCompress
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:压紧轴开始缓慢释放,移栽压紧轴到压紧前点P2[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:压紧轴开始缓慢释放,移栽压紧轴到压紧前点P2[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
ComAxis_To_P2
();
ComAxis_To_P2
();
SaveSpecifiedImage
();
break
;
break
;
case
StepEnum
.
SI_14_ReleaseCompress
:
case
StepEnum
.
SI_14_ReleaseCompress
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_15_UpDownBack
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_15_UpDownBack
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:叉子从库位返回,[{MoveInfo.MoveParam.PosInfo.ToStr()}]入库完成,移栽升降轴到料屉上方过度点P6/P12[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:叉子从库位返回,[{MoveInfo.MoveParam.PosInfo.ToStr()}]入库完成,移栽升降轴到料屉上方过度点P6/P12[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
//入库完成
//入库完成
SetBoxStatus
(
DeviceStatus
.
InStoreEnd
,
RunStatus
.
Busy
,
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
);
SetBoxStatus
(
DeviceStatus
.
InStoreEnd
,
RunStatus
.
Busy
,
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
);
executeTime
=
(
DateTime
.
Now
-
startTime
).
TotalSeconds
.
ToString
(
"f2"
);
UpdownAxisTo_P6_P12
();
UpdownAxisTo_P6_P12
();
SaveSpecifiedImage
();
break
;
break
;
case
StepEnum
.
SI_15_UpDownBack
:
case
StepEnum
.
SI_15_UpDownBack
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_16_LiftTray
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_16_LiftTray
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:提升抽屉,料斗拉取升降轴到料屉提取高点P3[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:提升抽屉,料斗拉取升降轴到料屉提取高点P3[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
PullAxis_UpdownToHighP3
();
PullAxis_UpdownToHighP3
();
SaveSpecifiedImage
();
break
;
break
;
case
StepEnum
.
SI_16_LiftTray
:
case
StepEnum
.
SI_16_LiftTray
:
//MoveInfo.NextMoveStep(StepEnum.SI_17_PushTray);
//MoveInfo.NextMoveStep(StepEnum.SI_17_PushTray);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_18_PutTrayMiddle
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_18_PutTrayMiddle
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:推到抽屉提取点,料斗拉取进出轴到料屉提取点P2[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:推到抽屉提取点,料斗拉取进出轴到料屉提取点P2[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
PullAxis_Inout_To_P2_P4
();
PullAxis_Inout_To_P2_P4
();
SaveSpecifiedImage
();
break
;
break
;
//case StepEnum.SI_17_PushTray:
//case StepEnum.SI_17_PushTray:
// MoveInfo.NextMoveStep(StepEnum.SI_18_PutTrayMiddle);
// MoveInfo.NextMoveStep(StepEnum.SI_18_PutTrayMiddle);
...
@@ -336,6 +345,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -336,6 +345,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_18_PutTrayDown
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_18_PutTrayDown
);
//LogInfo($"入库 {MoveInfo.SLog}:放下料屉,料斗拉取升降轴到料屉提取低点P4[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
//LogInfo($"入库 {MoveInfo.SLog}:放下料屉,料斗拉取升降轴到料屉提取低点P4[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
PullAxis_UpdownToLowP4
();
PullAxis_UpdownToLowP4
();
SaveSpecifiedImage
();
if
(
CheckASide
())
if
(
CheckASide
())
{
{
LogInfo
(
$
"入库 {MoveInfo.SLog}:放下料屉,料斗拉取升降轴到料屉提取低点P4,同时检测{trayAColumns[GetPosColumn()]}=1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:放下料屉,料斗拉取升降轴到料屉提取低点P4,同时检测{trayAColumns[GetPosColumn()]}=1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
...
@@ -353,9 +363,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -353,9 +363,10 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_19_InoutBack
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_19_InoutBack
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:料斗拉取进出轴到拍照点[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:料斗拉取进出轴到拍照点[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
PullAxis_Inout_To_Cam
();
PullAxis_Inout_To_Cam
();
SaveSpecifiedImage
();
break
;
break
;
case
StepEnum
.
SI_19_InoutBack
:
case
StepEnum
.
SI_19_InoutBack
:
SaveSpecifiedImage
();
if
(!
CheckInStoreOtherSideInfo
())
if
(!
CheckInStoreOtherSideInfo
())
{
{
SetBoxStatus
(
DeviceStatus
.
StoreOnline
,
RunStatus
.
Runing
);
SetBoxStatus
(
DeviceStatus
.
StoreOnline
,
RunStatus
.
Runing
);
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_OutExecute.cs
查看文件 @
2fe0028
...
@@ -75,37 +75,44 @@ namespace OnlineStore.DeviceLibrary
...
@@ -75,37 +75,44 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_04_LiftTray
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_04_LiftTray
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:提升抽屉,料斗拉取升降轴到料屉提取高点P3[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:提升抽屉,料斗拉取升降轴到料屉提取高点P3[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
PullAxis_UpdownToHighP3
();
PullAxis_UpdownToHighP3
();
SaveSpecifiedImage
();
break
;
break
;
case
StepEnum
.
SO_04_LiftTray
:
case
StepEnum
.
SO_04_LiftTray
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_05_PullTray
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_05_PullTray
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:拉抽屉到库位点,料斗拉取进出轴到料屉库位点P3/P5[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:拉抽屉到库位点,料斗拉取进出轴到料屉库位点P3/P5[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
PullAxis_Inout_To_P3_P5
();
PullAxis_Inout_To_P3_P5
();
SaveSpecifiedImage
();
break
;
break
;
case
StepEnum
.
SO_05_PullTray
:
case
StepEnum
.
SO_05_PullTray
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_06_DropTrayToPos
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_06_DropTrayToPos
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:将抽屉降到库位提取点,料斗拉取升降轴到P2料屉提取水平点P2,到位后检测{trayRows[GetPosRow()]}=1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:将抽屉降到库位提取点,料斗拉取升降轴到P2料屉提取水平点P2,到位后检测{trayRows[GetPosRow()]}=1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
PullAxis_UpdownToMiddleP2
();
PullAxis_UpdownToMiddleP2
();
SaveSpecifiedImage
();
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
trayRows
[
GetPosRow
()],
IO_VALUE
.
HIGH
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
trayRows
[
GetPosRow
()],
IO_VALUE
.
HIGH
));
break
;
break
;
case
StepEnum
.
SO_06_DropTrayToPos
:
case
StepEnum
.
SO_06_DropTrayToPos
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_07_GetReel
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_07_GetReel
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:进入库位中,移栽升降轴到料屉取放点P7/P13[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:进入库位中,移栽升降轴到料屉取放点P7/P13[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
UpdownAxisToP7_P13
();
UpdownAxisToP7_P13
();
SaveSpecifiedImage
();
break
;
break
;
case
StepEnum
.
SO_07_GetReel
:
case
StepEnum
.
SO_07_GetReel
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_08_StartCompress
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_08_StartCompress
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:压紧轴开始缓慢夹取,移栽压紧轴到压紧点P3[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:压紧轴开始缓慢夹取,移栽压紧轴到压紧点P3[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
ComAxis_To_P3
();
ComAxis_To_P3
();
SaveSpecifiedImage
();
break
;
break
;
case
StepEnum
.
SO_08_StartCompress
:
case
StepEnum
.
SO_08_StartCompress
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_09_UpDownBack
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_09_UpDownBack
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:叉子从库位返回,移栽升降轴到料屉上方过度点P6/P12[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:叉子从库位返回,移栽升降轴到料屉上方过度点P6/P12[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
UpdownAxisTo_P6_P12
();
UpdownAxisTo_P6_P12
();
SaveSpecifiedImage
();
break
;
break
;
case
StepEnum
.
SO_09_UpDownBack
:
case
StepEnum
.
SO_09_UpDownBack
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_10_LiftTray
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_10_LiftTray
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:提升抽屉,料斗拉取升降轴到料屉提取高点P3[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:提升抽屉,料斗拉取升降轴到料屉提取高点P3[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
PullAxis_UpdownToHighP3
();
PullAxis_UpdownToHighP3
();
SaveSpecifiedImage
();
break
;
break
;
case
StepEnum
.
SO_10_LiftTray
:
case
StepEnum
.
SO_10_LiftTray
:
//MoveInfo.NextMoveStep(StepEnum.SO_11_PushTray);
//MoveInfo.NextMoveStep(StepEnum.SO_11_PushTray);
...
@@ -114,6 +121,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -114,6 +121,7 @@ namespace OnlineStore.DeviceLibrary
PullAxis_Inout_To_P2_P4
();
PullAxis_Inout_To_P2_P4
();
MiddleAxis_To_P2
();
MiddleAxis_To_P2
();
XAxis_To_P1
();
XAxis_To_P1
();
SaveSpecifiedImage
();
break
;
break
;
//case StepEnum.SO_11_PushTray:
//case StepEnum.SO_11_PushTray:
// MoveInfo.NextMoveStep(StepEnum.SO_12_PutTrayMiddle);
// MoveInfo.NextMoveStep(StepEnum.SO_12_PutTrayMiddle);
...
@@ -135,6 +143,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -135,6 +143,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_12_PutTrayDown
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_12_PutTrayDown
);
//LogInfo($"出库 {MoveInfo.SLog}:放下料屉,料斗拉取升降轴到料屉提取低点P4[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
//LogInfo($"出库 {MoveInfo.SLog}:放下料屉,料斗拉取升降轴到料屉提取低点P4[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
PullAxis_UpdownToLowP4
();
PullAxis_UpdownToLowP4
();
SaveSpecifiedImage
();
if
(
CheckASide
())
if
(
CheckASide
())
{
{
LogInfo
(
$
"出库 {MoveInfo.SLog}:放下料屉,料斗拉取升降轴到料屉提取低点P4,同时检测{trayAColumns[GetPosColumn()]}=1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:放下料屉,料斗拉取升降轴到料屉提取低点P4,同时检测{trayAColumns[GetPosColumn()]}=1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
...
@@ -152,6 +161,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -152,6 +161,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_13_InoutBack
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_13_InoutBack
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:料斗拉取进出轴到拍照点[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:料斗拉取进出轴到拍照点[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
PullAxis_Inout_To_Cam
();
PullAxis_Inout_To_Cam
();
SaveSpecifiedImage
();
break
;
break
;
case
StepEnum
.
SO_13_InoutBack
:
case
StepEnum
.
SO_13_InoutBack
:
//检查另一面是否有出库任务
//检查另一面是否有出库任务
...
@@ -235,6 +245,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -235,6 +245,7 @@ namespace OnlineStore.DeviceLibrary
case
StepEnum
.
SO_17_InOutToBuff
:
case
StepEnum
.
SO_17_InOutToBuff
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_18_PutReel
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_18_PutReel
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:放料盘,移栽升降轴到下暂存区放料低点P5/P11,移栽压紧轴到压紧前点P2"
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:放料盘,移栽升降轴到下暂存区放料低点P5/P11,移栽压紧轴到压紧前点P2"
);
executeTime
=
(
DateTime
.
Now
-
startTime
).
TotalSeconds
.
ToString
(
"f2"
);
SetBoxStatus
(
DeviceStatus
.
OutStoreBoxEnd
,
RunStatus
.
Busy
,
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
);
SetBoxStatus
(
DeviceStatus
.
OutStoreBoxEnd
,
RunStatus
.
Busy
,
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
);
UpdownAxisTo_P5_P11
();
UpdownAxisTo_P5_P11
();
ComAxis_To_P2
();
ComAxis_To_P2
();
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_Partial.cs
查看文件 @
2fe0028
...
@@ -943,6 +943,16 @@ namespace OnlineStore.DeviceLibrary
...
@@ -943,6 +943,16 @@ namespace OnlineStore.DeviceLibrary
OutstoreExecute
();
OutstoreExecute
();
}
}
#
endregion
#
endregion
private
void
SaveSpecifiedImage
()
{
if
(
CheckASide
())
{
SaveImage
(
"box_A"
);
}
else
{
SaveImage
(
"box_B"
);
}
}
}
}
}
}
source/DeviceLibrary/storeBean/boxBean/BoxEquip_PosDebug.cs
0 → 100644
查看文件 @
2fe0028
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
OnlineStore.DeviceLibrary
{
partial
class
BoxEquip
{
public
bool
isInitPosDebugInfo
=
false
;
public
void
InitPosDebugInfo
()
{
PosDebugResultManager
.
Init
(
PositionNumList
);
isInitPosDebugInfo
=
PosDebugResultManager
.
isInit
;
}
public
void
PosDebugProcess
()
{
if
(
MoveInfo
.
IsInWait
)
{
CheckWait
(
MoveInfo
);
}
if
(
MoveInfo
.
IsInWait
)
{
return
;
}
}
}
public
class
PosDebugInfo
{
public
string
PosSide
{
get
;
set
;
}
public
int
StartDrawerRow
{
get
;
set
;
}
public
int
StartDrawerCol
{
get
;
set
;
}
public
int
StartRowInDrawer
{
get
;
set
;
}
public
int
StartColInDrawer
{
get
;
set
;
}
public
int
EndDrawerRow
{
get
;
set
;
}
public
int
EndDrawerCol
{
get
;
set
;
}
public
int
EndRowInDrawer
{
get
;
set
;
}
public
int
EndColInDrawer
{
get
;
set
;
}
}
}
source/DeviceLibrary/storeBean/boxBean/positionDebug/PositionDebugManager.cs
0 → 100644
查看文件 @
2fe0028
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
OnlineStore.DeviceLibrary
{
public
class
PosDebugResultManager
{
public
static
List
<
PosDebugResult
>
posResultList
;
public
static
bool
isInit
=
false
;
static
string
filePath
=
Common
.
ConfigAppSettings
.
GetValue
(
Common
.
Setting_Init
.
ConfigPath_PosDebugInfo
);
public
static
void
Init
(
List
<
string
>
posNumList
)
{
if
(!
System
.
IO
.
File
.
Exists
(
filePath
))
{
posResultList
=
new
List
<
PosDebugResult
>();
foreach
(
var
item
in
posNumList
)
{
posResultList
.
Add
(
new
PosDebugResult
()
{
Name
=
item
});
}
}
else
{
string
txt
=
System
.
IO
.
File
.
ReadAllText
(
filePath
);
posResultList
=
Common
.
JsonHelper
.
DeserializeJsonToList
<
PosDebugResult
>(
txt
);
}
isInit
=
true
;
}
public
static
int
GetResult
(
string
name
)
{
if
(!
isInit
)
return
-
1
;
PosDebugResult
debugResult
=
posResultList
.
Find
(
s
=>
s
.
Name
.
Equals
(
name
));
return
debugResult
.
ResCode
;
}
public
static
void
SetResult
(
string
name
,
int
code
)
{
if
(!
isInit
)
return
;
PosDebugResult
debugResult
=
posResultList
.
Find
(
s
=>
s
.
Name
.
Equals
(
name
));
debugResult
.
ResCode
=
code
;
}
}
}
source/DeviceLibrary/storeBean/boxBean/positionDebug/PositionDebugResult.cs
0 → 100644
查看文件 @
2fe0028
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
OnlineStore.DeviceLibrary
{
public
class
PosDebugResult
{
/// <summary>
/// 位置名称
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 调试结果:-1表示未运行过,0表示NG,1表示OK
/// </summary>
public
int
ResCode
{
get
;
set
;
}
=
-
1
;
}
}
source/LoadCVSLibrary/CSVReaderBase.cs
查看文件 @
2fe0028
...
@@ -85,34 +85,38 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -85,34 +85,38 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary>
/// <summary>
/// 把数据写入csv中
/// 把数据写入csv中
/// </summary>
/// </summary>
protected
static
bool
WriteCSVFile
(
string
filePath
,
string
[]
lines
)
protected
static
bool
WriteCSVFile
(
string
filePath
,
string
[]
lines
,
bool
isbackup
=
true
)
{
{
try
try
{
{
//备份保存
if
(
isbackup
)
try
{
{
FileInfo
file
=
new
FileInfo
(
filePath
);
//备份保存
string
date
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
);
try
string
targetBackPath
=
@"C:\configBack\" + date + @"
\
";
if
(!
Directory
.
Exists
(
targetBackPath
))
{
{
Directory
.
CreateDirectory
(
targetBackPath
);
FileInfo
file
=
new
FileInfo
(
filePath
);
string
date
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
);
string
targetBackPath
=
@"C:\configBack\" + date + @"
\
";
if
(!
Directory
.
Exists
(
targetBackPath
))
{
Directory
.
CreateDirectory
(
targetBackPath
);
}
string
fileName
=
file
.
Name
;
string
backFile
=
targetBackPath
+
fileName
;
if
(
File
.
Exists
(
backFile
))
{
File
.
Delete
(
backFile
);
}
File
.
Copy
(
filePath
,
backFile
,
true
);
// File.WriteAllLines(backFile, lines, Encoding.UTF8);
}
}
string
fileName
=
file
.
Name
;
catch
(
Exception
e
)
string
backFile
=
targetBackPath
+
fileName
;
if
(
File
.
Exists
(
backFile
))
{
{
File
.
Delete
(
backFil
e
);
LogUtil
.
error
(
"出错:"
,
e
);
}
}
File
.
Copy
(
filePath
,
backFile
,
true
);
// File.WriteAllLines(backFile, lines, Encoding.UTF8);
}
catch
(
Exception
e
)
{
LogUtil
.
error
(
"出错:"
,
e
);
}
}
if
(
File
.
Exists
(
filePath
))
if
(
File
.
Exists
(
filePath
))
{
{
File
.
Delete
(
filePath
);
File
.
Delete
(
filePath
);
...
...
source/LoadCVSLibrary/position/CSVPositionReader.cs
查看文件 @
2fe0028
...
@@ -149,7 +149,7 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -149,7 +149,7 @@ namespace OnlineStore.LoadCSVLibrary
}
}
}
}
public
static
bool
SavePostion
(
string
filePath
,
T
position
)
public
static
bool
SavePostion
(
string
filePath
,
T
position
,
bool
isbackup
=
true
)
{
{
Type
type
=
typeof
(
T
);
Type
type
=
typeof
(
T
);
...
@@ -189,7 +189,7 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -189,7 +189,7 @@ namespace OnlineStore.LoadCSVLibrary
allPositionMap
.
Add
(
position
.
PositionNum
,
position
);
allPositionMap
.
Add
(
position
.
PositionNum
,
position
);
string
newValue
=
PostionToString
(
position
,
titleIndex
,
proTitleMap
);
string
newValue
=
PostionToString
(
position
,
titleIndex
,
proTitleMap
);
lines
[
index
]
=
newValue
;
lines
[
index
]
=
newValue
;
return
WriteCSVFile
(
filePath
,
lines
);
return
WriteCSVFile
(
filePath
,
lines
,
isbackup
);
}
}
}
}
}
}
...
...
source/LoadCVSLibrary/storeConfig/config/BoxEquip_Config.cs
查看文件 @
2fe0028
...
@@ -191,8 +191,57 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -191,8 +191,57 @@ namespace OnlineStore.LoadCSVLibrary
[
ConfigProAttribute
(
"Cols_In_Drawer"
)]
[
ConfigProAttribute
(
"Cols_In_Drawer"
)]
public
int
Cols_In_Drawer
{
get
;
set
;
}
public
int
Cols_In_Drawer
{
get
;
set
;
}
/// <summary>
/// 行走机构视觉对位速度
/// </summary>
[
ConfigProAttribute
(
"MoveAxis_FindPosSpeed"
)]
public
int
MoveAxis_FindPosSpeed
{
get
;
set
;
}
/// <summary>
/// 行走机构正极限位置
/// </summary>
[
ConfigProAttribute
(
"MoveAxis_PosLimit"
)]
public
int
MoveAxis_PosLimit
{
get
;
set
;
}
/// <summary>
/// 行走机构负极限位置
/// </summary>
[
ConfigProAttribute
(
"MoveAxis_NegLimit"
)]
public
int
MoveAxis_NegLimit
{
get
;
set
;
}
/// <summary>
/// 升降轴视觉对位速度
/// </summary>
[
ConfigProAttribute
(
"UpdownAxis_FindPosSpeed"
)]
public
int
UpdownAxis_FindPosSpeed
{
get
;
set
;
}
/// <summary>
/// 升降轴正极限位置
/// </summary>
[
ConfigProAttribute
(
"UpdownAxis_PosLimit"
)]
public
int
UpdownAxis_PosLimit
{
get
;
set
;
}
/// <summary>
/// 升降轴负极限位置
/// </summary>
[
ConfigProAttribute
(
"UpdownAxis_NegLimit"
)]
public
int
UpdownAxis_NegLimit
{
get
;
set
;
}
/// <summary>
/// 拉取升降轴视觉对位速度
/// </summary>
[
ConfigProAttribute
(
"PullAxis_Updown_FindPosSpeed"
)]
public
int
PullAxis_Updown_FindPosSpeed
{
get
;
set
;
}
/// <summary>
/// 拉取升降轴正极限位置
/// </summary>
[
ConfigProAttribute
(
"PullAxis_Updown_PosLimit"
)]
public
int
PullAxis_Updown_PosLimit
{
get
;
set
;
}
/// <summary>
/// 拉取升降轴负极限位置
/// </summary>
[
ConfigProAttribute
(
"PullAxis_Updown_NegLimit"
)]
public
int
PullAxis_Updown_NegLimit
{
get
;
set
;
}
/// <summary>
/// 抓手检测得分阈值
/// </summary>
[
ConfigProAttribute
(
"TongsDetectThreshold"
)]
public
float
TongsDetectThreshold
{
get
;
set
;
}
/// <summary>
/// <summary>
/// PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,,,,,,,,
/// PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,,,,,,,,
/// </summary>
/// </summary>
...
...
source/XLRStoreClient/App.config
查看文件 @
2fe0028
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
<
add
key
=
"ConfigPath_BoxPosition"
value
=
"\Config\linePositions.csv"
/>
<
add
key
=
"ConfigPath_BoxPosition"
value
=
"\Config\linePositions.csv"
/>
<
add
key
=
"ConfigPath_DrawerPosition"
value
=
"\Config\DrawerPosition.csv"
/>
<
add
key
=
"ConfigPath_DrawerPosition"
value
=
"\Config\DrawerPosition.csv"
/>
<
add
key
=
"ConfigPath_TrayList"
value
=
"\LineConfig\TrayList.data"
/>
<
add
key
=
"ConfigPath_TrayList"
value
=
"\LineConfig\TrayList.data"
/>
<
add
key
=
"ConfigPath_PosDebugInfo"
value
=
"\Config\PosDebugInfo.json"
/>
<
add
key
=
"ImagePath"
value
=
"\Images\"
/>
<
add
key
=
"ImagePath"
value
=
"\Images\"
/>
<
add
key
=
"Line_CID"
value
=
"05"
/>
<
add
key
=
"Line_CID"
value
=
"05"
/>
<!--
end
one
store
config
-->
<!--
end
one
store
config
-->
...
...
source/XLRStoreClient/XLRStore.csproj
查看文件 @
2fe0028
...
@@ -103,6 +103,18 @@
...
@@ -103,6 +103,18 @@
<Compile Include="boxForm\FrmAxisMove.Designer.cs">
<Compile Include="boxForm\FrmAxisMove.Designer.cs">
<DependentUpon>FrmAxisMove.cs</DependentUpon>
<DependentUpon>FrmAxisMove.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="boxForm\FrmTongsLearn.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="boxForm\FrmTongsLearn.Designer.cs">
<DependentUpon>FrmTongsLearn.cs</DependentUpon>
</Compile>
<Compile Include="boxForm\userControl\UCStatusPanel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="boxForm\userControl\UCStatusPanel.Designer.cs">
<DependentUpon>UCStatusPanel.cs</DependentUpon>
</Compile>
<Compile Include="FrmBase.cs">
<Compile Include="FrmBase.cs">
<SubType>Form</SubType>
<SubType>Form</SubType>
</Compile>
</Compile>
...
@@ -196,6 +208,12 @@
...
@@ -196,6 +208,12 @@
<EmbeddedResource Include="boxForm\FrmAxisMove.resx">
<EmbeddedResource Include="boxForm\FrmAxisMove.resx">
<DependentUpon>FrmAxisMove.cs</DependentUpon>
<DependentUpon>FrmAxisMove.cs</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
<EmbeddedResource Include="boxForm\FrmTongsLearn.resx">
<DependentUpon>FrmTongsLearn.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="boxForm\userControl\UCStatusPanel.resx">
<DependentUpon>UCStatusPanel.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmBase.resx">
<EmbeddedResource Include="FrmBase.resx">
<DependentUpon>FrmBase.cs</DependentUpon>
<DependentUpon>FrmBase.cs</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
...
...
source/XLRStoreClient/boxForm/FrmAutoFindPos.Designer.cs
查看文件 @
2fe0028
...
@@ -278,7 +278,7 @@
...
@@ -278,7 +278,7 @@
this
.
txtStartCol
.
Name
=
"txtStartCol"
;
this
.
txtStartCol
.
Name
=
"txtStartCol"
;
this
.
txtStartCol
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
23
);
this
.
txtStartCol
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
23
);
this
.
txtStartCol
.
TabIndex
=
22
;
this
.
txtStartCol
.
TabIndex
=
22
;
this
.
txtStartCol
.
Text
=
"
1
"
;
this
.
txtStartCol
.
Text
=
"
2
"
;
this
.
txtStartCol
.
TextChanged
+=
new
System
.
EventHandler
(
this
.
txtChanged
);
this
.
txtStartCol
.
TextChanged
+=
new
System
.
EventHandler
(
this
.
txtChanged
);
//
//
// txtCoffX
// txtCoffX
...
@@ -486,7 +486,7 @@
...
@@ -486,7 +486,7 @@
this
.
tabPage2
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
26
);
this
.
tabPage2
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
26
);
this
.
tabPage2
.
Name
=
"tabPage2"
;
this
.
tabPage2
.
Name
=
"tabPage2"
;
this
.
tabPage2
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tabPage2
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tabPage2
.
Size
=
new
System
.
Drawing
.
Size
(
786
,
2
14
);
this
.
tabPage2
.
Size
=
new
System
.
Drawing
.
Size
(
786
,
3
14
);
this
.
tabPage2
.
TabIndex
=
1
;
this
.
tabPage2
.
TabIndex
=
1
;
this
.
tabPage2
.
Text
=
"配置对位抽屉模板[相机在中间位置]"
;
this
.
tabPage2
.
Text
=
"配置对位抽屉模板[相机在中间位置]"
;
this
.
tabPage2
.
UseVisualStyleBackColor
=
true
;
this
.
tabPage2
.
UseVisualStyleBackColor
=
true
;
...
@@ -521,6 +521,7 @@
...
@@ -521,6 +521,7 @@
this
.
btnPullUpdwnToPos1
.
TabIndex
=
17
;
this
.
btnPullUpdwnToPos1
.
TabIndex
=
17
;
this
.
btnPullUpdwnToPos1
.
Text
=
"抽屉升降轴到位"
;
this
.
btnPullUpdwnToPos1
.
Text
=
"抽屉升降轴到位"
;
this
.
btnPullUpdwnToPos1
.
UseVisualStyleBackColor
=
true
;
this
.
btnPullUpdwnToPos1
.
UseVisualStyleBackColor
=
true
;
this
.
btnPullUpdwnToPos1
.
Click
+=
new
System
.
EventHandler
(
this
.
btnPullUpdwnToPos1_Click
);
//
//
// btnMoveAxisToPos1
// btnMoveAxisToPos1
//
//
...
@@ -530,6 +531,7 @@
...
@@ -530,6 +531,7 @@
this
.
btnMoveAxisToPos1
.
TabIndex
=
16
;
this
.
btnMoveAxisToPos1
.
TabIndex
=
16
;
this
.
btnMoveAxisToPos1
.
Text
=
"行走机构到位"
;
this
.
btnMoveAxisToPos1
.
Text
=
"行走机构到位"
;
this
.
btnMoveAxisToPos1
.
UseVisualStyleBackColor
=
true
;
this
.
btnMoveAxisToPos1
.
UseVisualStyleBackColor
=
true
;
this
.
btnMoveAxisToPos1
.
Click
+=
new
System
.
EventHandler
(
this
.
btnMoveAxisToPos1_Click
);
//
//
// btnUndwnToPos1
// btnUndwnToPos1
//
//
...
@@ -539,6 +541,7 @@
...
@@ -539,6 +541,7 @@
this
.
btnUndwnToPos1
.
TabIndex
=
15
;
this
.
btnUndwnToPos1
.
TabIndex
=
15
;
this
.
btnUndwnToPos1
.
Text
=
"移栽升降轴到位"
;
this
.
btnUndwnToPos1
.
Text
=
"移栽升降轴到位"
;
this
.
btnUndwnToPos1
.
UseVisualStyleBackColor
=
true
;
this
.
btnUndwnToPos1
.
UseVisualStyleBackColor
=
true
;
this
.
btnUndwnToPos1
.
Click
+=
new
System
.
EventHandler
(
this
.
btnUndwnToPos1_Click
);
//
//
// btnInoutToPosition1
// btnInoutToPosition1
//
//
...
@@ -548,6 +551,7 @@
...
@@ -548,6 +551,7 @@
this
.
btnInoutToPosition1
.
TabIndex
=
14
;
this
.
btnInoutToPosition1
.
TabIndex
=
14
;
this
.
btnInoutToPosition1
.
Text
=
"进出轴到位"
;
this
.
btnInoutToPosition1
.
Text
=
"进出轴到位"
;
this
.
btnInoutToPosition1
.
UseVisualStyleBackColor
=
true
;
this
.
btnInoutToPosition1
.
UseVisualStyleBackColor
=
true
;
this
.
btnInoutToPosition1
.
Click
+=
new
System
.
EventHandler
(
this
.
btnInoutToPosition1_Click
);
//
//
// label17
// label17
//
//
...
@@ -642,7 +646,7 @@
...
@@ -642,7 +646,7 @@
this
.
tabPage3
.
Controls
.
Add
(
this
.
pictureBox2
);
this
.
tabPage3
.
Controls
.
Add
(
this
.
pictureBox2
);
this
.
tabPage3
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
26
);
this
.
tabPage3
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
26
);
this
.
tabPage3
.
Name
=
"tabPage3"
;
this
.
tabPage3
.
Name
=
"tabPage3"
;
this
.
tabPage3
.
Size
=
new
System
.
Drawing
.
Size
(
786
,
2
14
);
this
.
tabPage3
.
Size
=
new
System
.
Drawing
.
Size
(
786
,
3
14
);
this
.
tabPage3
.
TabIndex
=
4
;
this
.
tabPage3
.
TabIndex
=
4
;
this
.
tabPage3
.
Text
=
"配置验证抽屉模板[相机在两边位置]"
;
this
.
tabPage3
.
Text
=
"配置验证抽屉模板[相机在两边位置]"
;
this
.
tabPage3
.
UseVisualStyleBackColor
=
true
;
this
.
tabPage3
.
UseVisualStyleBackColor
=
true
;
...
@@ -677,6 +681,7 @@
...
@@ -677,6 +681,7 @@
this
.
button1
.
TabIndex
=
17
;
this
.
button1
.
TabIndex
=
17
;
this
.
button1
.
Text
=
"抽屉升降轴到位"
;
this
.
button1
.
Text
=
"抽屉升降轴到位"
;
this
.
button1
.
UseVisualStyleBackColor
=
true
;
this
.
button1
.
UseVisualStyleBackColor
=
true
;
this
.
button1
.
Click
+=
new
System
.
EventHandler
(
this
.
btnPullUpdwnToPos1_Click
);
//
//
// button2
// button2
//
//
...
@@ -686,6 +691,7 @@
...
@@ -686,6 +691,7 @@
this
.
button2
.
TabIndex
=
16
;
this
.
button2
.
TabIndex
=
16
;
this
.
button2
.
Text
=
"行走机构到位"
;
this
.
button2
.
Text
=
"行走机构到位"
;
this
.
button2
.
UseVisualStyleBackColor
=
true
;
this
.
button2
.
UseVisualStyleBackColor
=
true
;
this
.
button2
.
Click
+=
new
System
.
EventHandler
(
this
.
btnMoveAxisToPos1_Click
);
//
//
// button3
// button3
//
//
...
@@ -695,6 +701,7 @@
...
@@ -695,6 +701,7 @@
this
.
button3
.
TabIndex
=
15
;
this
.
button3
.
TabIndex
=
15
;
this
.
button3
.
Text
=
"移栽升降轴到位"
;
this
.
button3
.
Text
=
"移栽升降轴到位"
;
this
.
button3
.
UseVisualStyleBackColor
=
true
;
this
.
button3
.
UseVisualStyleBackColor
=
true
;
this
.
button3
.
Click
+=
new
System
.
EventHandler
(
this
.
btnUndwnToPos1_Click
);
//
//
// button4
// button4
//
//
...
@@ -704,6 +711,7 @@
...
@@ -704,6 +711,7 @@
this
.
button4
.
TabIndex
=
14
;
this
.
button4
.
TabIndex
=
14
;
this
.
button4
.
Text
=
"进出轴到位"
;
this
.
button4
.
Text
=
"进出轴到位"
;
this
.
button4
.
UseVisualStyleBackColor
=
true
;
this
.
button4
.
UseVisualStyleBackColor
=
true
;
this
.
button4
.
Click
+=
new
System
.
EventHandler
(
this
.
button4_Click
);
//
//
// label3
// label3
//
//
...
@@ -802,7 +810,7 @@
...
@@ -802,7 +810,7 @@
this
.
tabPage4
.
Controls
.
Add
(
this
.
btnStartVision
);
this
.
tabPage4
.
Controls
.
Add
(
this
.
btnStartVision
);
this
.
tabPage4
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
26
);
this
.
tabPage4
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
26
);
this
.
tabPage4
.
Name
=
"tabPage4"
;
this
.
tabPage4
.
Name
=
"tabPage4"
;
this
.
tabPage4
.
Size
=
new
System
.
Drawing
.
Size
(
786
,
2
14
);
this
.
tabPage4
.
Size
=
new
System
.
Drawing
.
Size
(
786
,
3
14
);
this
.
tabPage4
.
TabIndex
=
3
;
this
.
tabPage4
.
TabIndex
=
3
;
this
.
tabPage4
.
Text
=
"视觉对位"
;
this
.
tabPage4
.
Text
=
"视觉对位"
;
this
.
tabPage4
.
UseVisualStyleBackColor
=
true
;
this
.
tabPage4
.
UseVisualStyleBackColor
=
true
;
...
...
source/XLRStoreClient/boxForm/FrmAutoFindPos.cs
查看文件 @
2fe0028
...
@@ -45,14 +45,16 @@ namespace OnlineStore.XLRStore
...
@@ -45,14 +45,16 @@ namespace OnlineStore.XLRStore
boxEquip
.
Config
.
Column_Spacing
=
int
.
Parse
(
txtColumnSpacing
.
Text
);
boxEquip
.
Config
.
Column_Spacing
=
int
.
Parse
(
txtColumnSpacing
.
Text
);
boxEquip
.
Config
.
Row_Spacing
=
int
.
Parse
(
txtRowSpacing
.
Text
);
boxEquip
.
Config
.
Row_Spacing
=
int
.
Parse
(
txtRowSpacing
.
Text
);
boxEquip
.
Config
.
FindPos_Drawer_X_Error
=
int
.
Parse
(
txtMark_X_err
.
Text
);
boxEquip
.
Config
.
FindPos_Drawer_X_Error
=
float
.
Parse
(
txtMark_X_err
.
Text
);
boxEquip
.
Config
.
FindPos_Drawer_Y_Error
=
int
.
Parse
(
txtMark_Y_err
.
Text
);
boxEquip
.
Config
.
FindPos_Drawer_Y_Error
=
float
.
Parse
(
txtMark_Y_err
.
Text
);
boxEquip
.
Config
.
Validate_Drawer_X_Error
=
int
.
Parse
(
txtMarkX_err_Validate
.
Text
);
boxEquip
.
Config
.
Validate_Drawer_X_Error
=
float
.
Parse
(
txtMarkX_err_Validate
.
Text
);
boxEquip
.
Config
.
Validate_Drawer_Y_Error
=
int
.
Parse
(
txtMarkY_err_Validate
.
Text
);
boxEquip
.
Config
.
Validate_Drawer_Y_Error
=
float
.
Parse
(
txtMarkY_err_Validate
.
Text
);
boxEquip
.
autoFindPos
.
XCoeffOfCoorToPulse
=
float
.
Parse
(
txtCoffX
.
Text
);
boxEquip
.
autoFindPos
.
YCoeffOfCoorToPulse
=
float
.
Parse
(
txtCoofY
.
Text
);
if
(
posSide
.
Equals
(
"AA"
))
if
(
posSide
.
Equals
(
"AA"
))
{
{
boxEquip
.
Config
.
PixelToPulse_A_X
=
in
t
.
Parse
(
txtCoffX
.
Text
);
boxEquip
.
Config
.
PixelToPulse_A_X
=
floa
t
.
Parse
(
txtCoffX
.
Text
);
boxEquip
.
Config
.
PixelToPulse_A_Y
=
in
t
.
Parse
(
txtCoofY
.
Text
);
boxEquip
.
Config
.
PixelToPulse_A_Y
=
floa
t
.
Parse
(
txtCoofY
.
Text
);
boxEquip
.
Config
.
FindPos_Drawer_A_X
=
float
.
Parse
(
txtMark_X
.
Text
);
boxEquip
.
Config
.
FindPos_Drawer_A_X
=
float
.
Parse
(
txtMark_X
.
Text
);
boxEquip
.
Config
.
FindPos_Drawer_A_Y
=
float
.
Parse
(
txtMark_Y
.
Text
);
boxEquip
.
Config
.
FindPos_Drawer_A_Y
=
float
.
Parse
(
txtMark_Y
.
Text
);
boxEquip
.
Config
.
Validate_Drawer_A_X
=
float
.
Parse
(
txtMarkX_Validate
.
Text
);
boxEquip
.
Config
.
Validate_Drawer_A_X
=
float
.
Parse
(
txtMarkX_Validate
.
Text
);
...
@@ -60,8 +62,8 @@ namespace OnlineStore.XLRStore
...
@@ -60,8 +62,8 @@ namespace OnlineStore.XLRStore
}
}
else
else
{
{
boxEquip
.
Config
.
PixelToPulse_B_X
=
in
t
.
Parse
(
txtCoffX
.
Text
);
boxEquip
.
Config
.
PixelToPulse_B_X
=
floa
t
.
Parse
(
txtCoffX
.
Text
);
boxEquip
.
Config
.
PixelToPulse_B_Y
=
in
t
.
Parse
(
txtCoofY
.
Text
);
boxEquip
.
Config
.
PixelToPulse_B_Y
=
floa
t
.
Parse
(
txtCoofY
.
Text
);
boxEquip
.
Config
.
FindPos_Drawer_B_X
=
float
.
Parse
(
txtMark_X
.
Text
);
boxEquip
.
Config
.
FindPos_Drawer_B_X
=
float
.
Parse
(
txtMark_X
.
Text
);
boxEquip
.
Config
.
FindPos_Drawer_B_Y
=
float
.
Parse
(
txtMark_Y
.
Text
);
boxEquip
.
Config
.
FindPos_Drawer_B_Y
=
float
.
Parse
(
txtMark_Y
.
Text
);
boxEquip
.
Config
.
Validate_Drawer_B_X
=
float
.
Parse
(
txtMarkX_Validate
.
Text
);
boxEquip
.
Config
.
Validate_Drawer_B_X
=
float
.
Parse
(
txtMarkX_Validate
.
Text
);
...
@@ -184,7 +186,13 @@ namespace OnlineStore.XLRStore
...
@@ -184,7 +186,13 @@ namespace OnlineStore.XLRStore
private
void
button12_Click
(
object
sender
,
EventArgs
e
)
private
void
button12_Click
(
object
sender
,
EventArgs
e
)
{
{
boxEquip
.
FindPosEnd
();
if
(
listBox1
.
Items
.
Count
>
0
)
listBox1
.
Items
.
Clear
();
foreach
(
string
item
in
boxEquip
.
autoFindPos
.
FailedDrawers
)
{
listBox1
.
Items
.
Add
(
item
);
}
boxEquip
.
FindPosEnd
();
btnPauseVision
.
Enabled
=
false
;
btnPauseVision
.
Enabled
=
false
;
btnStopVision
.
Enabled
=
false
;
btnStopVision
.
Enabled
=
false
;
}
}
...
@@ -389,9 +397,48 @@ namespace OnlineStore.XLRStore
...
@@ -389,9 +397,48 @@ namespace OnlineStore.XLRStore
}
}
}
}
private
void
btn
SaveMarkInfo2
_Click
(
object
sender
,
EventArgs
e
)
private
void
btn
InoutToPosition1
_Click
(
object
sender
,
EventArgs
e
)
{
{
boxEquip
.
PullAxis_Inout
.
AbsMove
(
null
,
boxEquip
.
Config
.
PullAxis_Inout_P1
,
boxEquip
.
Config
.
PullAxis_Inout_P1_Speed
);
}
private
void
button4_Click
(
object
sender
,
EventArgs
e
)
{
if
(
posSide
.
Equals
(
"AA"
))
{
boxEquip
.
PullAxis_Inout
.
AbsMove
(
null
,
boxEquip
.
Config
.
PullAxis_Inout_CamA
,
boxEquip
.
Config
.
PullAxis_Inout_P1_Speed
);
}
else
{
boxEquip
.
PullAxis_Inout
.
AbsMove
(
null
,
boxEquip
.
Config
.
PullAxis_Inout_CamB
,
boxEquip
.
Config
.
PullAxis_Inout_P1_Speed
);
}
}
private
void
btnMoveAxisToPos1_Click
(
object
sender
,
EventArgs
e
)
{
StringBuilder
head2
=
new
StringBuilder
(
boxEquip
.
CID
+
posSide
+
txtCurRow
.
Text
.
PadLeft
(
2
,
'0'
)
+
txtCurCol
.
Text
.
PadLeft
(
2
,
'0'
));
head2
.
Append
(
"0101"
);
LineMoveP
lineMoveP
=
new
LineMoveP
();
lineMoveP
.
UpdatePosById
(
head2
.
ToString
());
boxEquip
.
MoveAxis
.
AbsMove
(
null
,
lineMoveP
.
MoveAxis_P3
,
boxEquip
.
Config
.
MoveAxis_FindPosSpeed
);
}
private
void
btnUndwnToPos1_Click
(
object
sender
,
EventArgs
e
)
{
StringBuilder
head2
=
new
StringBuilder
(
boxEquip
.
CID
+
posSide
+
txtCurRow
.
Text
.
PadLeft
(
2
,
'0'
)
+
txtCurCol
.
Text
.
PadLeft
(
2
,
'0'
));
head2
.
Append
(
"0101"
);
LineMoveP
lineMoveP
=
new
LineMoveP
();
lineMoveP
.
UpdatePosById
(
head2
.
ToString
());
boxEquip
.
UpdownAxis
.
AbsMove
(
null
,
lineMoveP
.
Updown_P6_P12
,
boxEquip
.
Config
.
UpdownAxis_FindPosSpeed
);
}
private
void
btnPullUpdwnToPos1_Click
(
object
sender
,
EventArgs
e
)
{
StringBuilder
head2
=
new
StringBuilder
(
boxEquip
.
CID
+
posSide
+
txtCurRow
.
Text
.
PadLeft
(
2
,
'0'
)
+
txtCurCol
.
Text
.
PadLeft
(
2
,
'0'
));
head2
.
Append
(
"0101"
);
LineMoveP
lineMoveP
=
new
LineMoveP
();
lineMoveP
.
UpdatePosById
(
head2
.
ToString
());
boxEquip
.
PullAxis_Updown
.
AbsMove
(
null
,
lineMoveP
.
PullAxis_Updown_P4
,
boxEquip
.
Config
.
PullAxis_Updown_FindPosSpeed
);
}
}
}
}
}
}
source/XLRStoreClient/boxForm/FrmBoxEquip.cs
查看文件 @
2fe0028
...
@@ -43,6 +43,8 @@ namespace OnlineStore.XLRStore
...
@@ -43,6 +43,8 @@ namespace OnlineStore.XLRStore
chbDebug
.
Checked
=
boxBean
.
IsDebug
;
chbDebug
.
Checked
=
boxBean
.
IsDebug
;
FrmAutoFindPos
frmAutoFindPos
=
new
FrmAutoFindPos
();
FrmAutoFindPos
frmAutoFindPos
=
new
FrmAutoFindPos
();
AddForm
(
tabControl1
,
" 视觉对位 "
,
frmAutoFindPos
);
AddForm
(
tabControl1
,
" 视觉对位 "
,
frmAutoFindPos
);
FrmTongsLearn
learn
=
new
FrmTongsLearn
();
AddForm
(
tabControl1
,
" 抓手图片训练 "
,
learn
);
boxBean
.
camera_event
+=
BoxBean_camera_event
;
boxBean
.
camera_event
+=
BoxBean_camera_event
;
IsLoad
=
true
;
IsLoad
=
true
;
}
}
...
...
source/XLRStoreClient/boxForm/FrmTongsLearn.Designer.cs
0 → 100644
查看文件 @
2fe0028
namespace
OnlineStore.XLRStore
{
partial
class
FrmTongsLearn
{
/// <summary>
/// Required designer variable.
/// </summary>
private
System
.
ComponentModel
.
IContainer
components
=
null
;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected
override
void
Dispose
(
bool
disposing
)
{
if
(
disposing
&&
(
components
!=
null
))
{
components
.
Dispose
();
}
base
.
Dispose
(
disposing
);
}
#
region
Windows
Form
Designer
generated
code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private
void
InitializeComponent
()
{
this
.
txtImagePath
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
btnSelect
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
picSrc
=
new
System
.
Windows
.
Forms
.
PictureBox
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
rdoBside
=
new
System
.
Windows
.
Forms
.
RadioButton
();
this
.
rdoAside
=
new
System
.
Windows
.
Forms
.
RadioButton
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnAcquire
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox3
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
picResult
=
new
System
.
Windows
.
Forms
.
PictureBox
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtScoreThreshold
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
btnSave
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
lblResult
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnMatch
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnLearn
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnSelectPatch
=
new
System
.
Windows
.
Forms
.
Button
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
picSrc
)).
BeginInit
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
picResult
)).
BeginInit
();
this
.
SuspendLayout
();
//
// txtImagePath
//
this
.
txtImagePath
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
20
);
this
.
txtImagePath
.
Name
=
"txtImagePath"
;
this
.
txtImagePath
.
ReadOnly
=
true
;
this
.
txtImagePath
.
Size
=
new
System
.
Drawing
.
Size
(
523
,
21
);
this
.
txtImagePath
.
TabIndex
=
0
;
//
// btnSelect
//
this
.
btnSelect
.
Location
=
new
System
.
Drawing
.
Point
(
535
,
18
);
this
.
btnSelect
.
Name
=
"btnSelect"
;
this
.
btnSelect
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
btnSelect
.
TabIndex
=
1
;
this
.
btnSelect
.
Text
=
"选择图片"
;
this
.
btnSelect
.
UseVisualStyleBackColor
=
true
;
this
.
btnSelect
.
Click
+=
new
System
.
EventHandler
(
this
.
btnSelect_Click
);
//
// picSrc
//
this
.
picSrc
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
picSrc
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
17
);
this
.
picSrc
.
Name
=
"picSrc"
;
this
.
picSrc
.
Size
=
new
System
.
Drawing
.
Size
(
359
,
191
);
this
.
picSrc
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
Zoom
;
this
.
picSrc
.
TabIndex
=
2
;
this
.
picSrc
.
TabStop
=
false
;
//
// groupBox1
//
this
.
groupBox1
.
Controls
.
Add
(
this
.
rdoBside
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
rdoAside
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label1
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnAcquire
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
txtImagePath
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnSelect
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
12
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
776
,
78
);
this
.
groupBox1
.
TabIndex
=
1
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"取图"
;
//
// rdoBside
//
this
.
rdoBside
.
AutoSize
=
true
;
this
.
rdoBside
.
Location
=
new
System
.
Drawing
.
Point
(
364
,
50
);
this
.
rdoBside
.
Name
=
"rdoBside"
;
this
.
rdoBside
.
Size
=
new
System
.
Drawing
.
Size
(
41
,
16
);
this
.
rdoBside
.
TabIndex
=
5
;
this
.
rdoBside
.
Text
=
"B面"
;
this
.
rdoBside
.
UseVisualStyleBackColor
=
true
;
this
.
rdoBside
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
SideCheckedChanged
);
//
// rdoAside
//
this
.
rdoAside
.
AutoSize
=
true
;
this
.
rdoAside
.
Checked
=
true
;
this
.
rdoAside
.
Location
=
new
System
.
Drawing
.
Point
(
179
,
50
);
this
.
rdoAside
.
Name
=
"rdoAside"
;
this
.
rdoAside
.
Size
=
new
System
.
Drawing
.
Size
(
41
,
16
);
this
.
rdoAside
.
TabIndex
=
4
;
this
.
rdoAside
.
TabStop
=
true
;
this
.
rdoAside
.
Text
=
"A面"
;
this
.
rdoAside
.
UseVisualStyleBackColor
=
true
;
this
.
rdoAside
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
SideCheckedChanged
);
//
// label1
//
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
630
,
23
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
17
,
12
);
this
.
label1
.
TabIndex
=
3
;
this
.
label1
.
Text
=
"或"
;
//
// btnAcquire
//
this
.
btnAcquire
.
Location
=
new
System
.
Drawing
.
Point
(
472
,
47
);
this
.
btnAcquire
.
Name
=
"btnAcquire"
;
this
.
btnAcquire
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
btnAcquire
.
TabIndex
=
2
;
this
.
btnAcquire
.
Text
=
"从相机取图"
;
this
.
btnAcquire
.
UseVisualStyleBackColor
=
true
;
this
.
btnAcquire
.
Click
+=
new
System
.
EventHandler
(
this
.
btnAcquire_Click
);
//
// groupBox2
//
this
.
groupBox2
.
Controls
.
Add
(
this
.
picSrc
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
96
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
365
,
211
);
this
.
groupBox2
.
TabIndex
=
3
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"源图像"
;
//
// groupBox3
//
this
.
groupBox3
.
Controls
.
Add
(
this
.
picResult
);
this
.
groupBox3
.
Location
=
new
System
.
Drawing
.
Point
(
423
,
96
);
this
.
groupBox3
.
Name
=
"groupBox3"
;
this
.
groupBox3
.
Size
=
new
System
.
Drawing
.
Size
(
365
,
211
);
this
.
groupBox3
.
TabIndex
=
4
;
this
.
groupBox3
.
TabStop
=
false
;
this
.
groupBox3
.
Text
=
"结果图像"
;
//
// picResult
//
this
.
picResult
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
picResult
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
17
);
this
.
picResult
.
Name
=
"picResult"
;
this
.
picResult
.
Size
=
new
System
.
Drawing
.
Size
(
359
,
191
);
this
.
picResult
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
Zoom
;
this
.
picResult
.
TabIndex
=
2
;
this
.
picResult
.
TabStop
=
false
;
//
// label2
//
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
16
,
328
);
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
12
);
this
.
label2
.
TabIndex
=
5
;
this
.
label2
.
Text
=
"得分阈值:"
;
//
// txtScoreThreshold
//
this
.
txtScoreThreshold
.
Location
=
new
System
.
Drawing
.
Point
(
85
,
325
);
this
.
txtScoreThreshold
.
Name
=
"txtScoreThreshold"
;
this
.
txtScoreThreshold
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
21
);
this
.
txtScoreThreshold
.
TabIndex
=
6
;
//
// btnSave
//
this
.
btnSave
.
Location
=
new
System
.
Drawing
.
Point
(
191
,
310
);
this
.
btnSave
.
Name
=
"btnSave"
;
this
.
btnSave
.
Size
=
new
System
.
Drawing
.
Size
(
101
,
40
);
this
.
btnSave
.
TabIndex
=
7
;
this
.
btnSave
.
Text
=
"保存"
;
this
.
btnSave
.
UseVisualStyleBackColor
=
true
;
this
.
btnSave
.
Click
+=
new
System
.
EventHandler
(
this
.
btnSave_Click
);
//
// lblResult
//
this
.
lblResult
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
12F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblResult
.
Location
=
new
System
.
Drawing
.
Point
(
423
,
315
);
this
.
lblResult
.
Name
=
"lblResult"
;
this
.
lblResult
.
Size
=
new
System
.
Drawing
.
Size
(
124
,
47
);
this
.
lblResult
.
TabIndex
=
8
;
this
.
lblResult
.
Text
=
"score"
;
this
.
lblResult
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
//
// btnMatch
//
this
.
btnMatch
.
Location
=
new
System
.
Drawing
.
Point
(
298
,
310
);
this
.
btnMatch
.
Name
=
"btnMatch"
;
this
.
btnMatch
.
Size
=
new
System
.
Drawing
.
Size
(
101
,
40
);
this
.
btnMatch
.
TabIndex
=
9
;
this
.
btnMatch
.
Text
=
"匹配"
;
this
.
btnMatch
.
UseVisualStyleBackColor
=
true
;
this
.
btnMatch
.
Click
+=
new
System
.
EventHandler
(
this
.
btnMatch_Click
);
//
// btnLearn
//
this
.
btnLearn
.
Location
=
new
System
.
Drawing
.
Point
(
577
,
310
);
this
.
btnLearn
.
Name
=
"btnLearn"
;
this
.
btnLearn
.
Size
=
new
System
.
Drawing
.
Size
(
101
,
40
);
this
.
btnLearn
.
TabIndex
=
10
;
this
.
btnLearn
.
Text
=
"学习"
;
this
.
btnLearn
.
UseVisualStyleBackColor
=
true
;
this
.
btnLearn
.
Click
+=
new
System
.
EventHandler
(
this
.
btnLearn_Click
);
//
// btnSelectPatch
//
this
.
btnSelectPatch
.
Location
=
new
System
.
Drawing
.
Point
(
684
,
310
);
this
.
btnSelectPatch
.
Name
=
"btnSelectPatch"
;
this
.
btnSelectPatch
.
Size
=
new
System
.
Drawing
.
Size
(
101
,
40
);
this
.
btnSelectPatch
.
TabIndex
=
7
;
this
.
btnSelectPatch
.
Text
=
"批量学习"
;
this
.
btnSelectPatch
.
UseVisualStyleBackColor
=
true
;
this
.
btnSelectPatch
.
Click
+=
new
System
.
EventHandler
(
this
.
btnSelectPatch_Click
);
//
// FrmTongsLearn
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
800
,
387
);
this
.
Controls
.
Add
(
this
.
btnLearn
);
this
.
Controls
.
Add
(
this
.
btnSelectPatch
);
this
.
Controls
.
Add
(
this
.
btnMatch
);
this
.
Controls
.
Add
(
this
.
lblResult
);
this
.
Controls
.
Add
(
this
.
btnSave
);
this
.
Controls
.
Add
(
this
.
txtScoreThreshold
);
this
.
Controls
.
Add
(
this
.
label2
);
this
.
Controls
.
Add
(
this
.
groupBox3
);
this
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Name
=
"FrmTongsLearn"
;
this
.
Text
=
" "
;
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
picSrc
)).
EndInit
();
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
groupBox1
.
PerformLayout
();
this
.
groupBox2
.
ResumeLayout
(
false
);
this
.
groupBox3
.
ResumeLayout
(
false
);
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
picResult
)).
EndInit
();
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
}
#
endregion
private
System
.
Windows
.
Forms
.
Button
btnSelect
;
private
System
.
Windows
.
Forms
.
TextBox
txtImagePath
;
private
System
.
Windows
.
Forms
.
PictureBox
picSrc
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
Label
label1
;
private
System
.
Windows
.
Forms
.
Button
btnAcquire
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox2
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox3
;
private
System
.
Windows
.
Forms
.
PictureBox
picResult
;
private
System
.
Windows
.
Forms
.
RadioButton
rdoBside
;
private
System
.
Windows
.
Forms
.
RadioButton
rdoAside
;
private
System
.
Windows
.
Forms
.
Label
label2
;
private
System
.
Windows
.
Forms
.
TextBox
txtScoreThreshold
;
private
System
.
Windows
.
Forms
.
Button
btnSave
;
private
System
.
Windows
.
Forms
.
Label
lblResult
;
private
System
.
Windows
.
Forms
.
Button
btnMatch
;
private
System
.
Windows
.
Forms
.
Button
btnLearn
;
private
System
.
Windows
.
Forms
.
Button
btnSelectPatch
;
}
}
\ No newline at end of file
\ No newline at end of file
source/XLRStoreClient/boxForm/FrmTongsLearn.cs
0 → 100644
查看文件 @
2fe0028
using
OnlineStore.DeviceLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
namespace
OnlineStore.XLRStore
{
public
partial
class
FrmTongsLearn
:
Form
{
public
FrmTongsLearn
()
{
InitializeComponent
();
boxEquip
=
StoreManager
.
XLRStore
.
boxEquip
;
txtScoreThreshold
.
Text
=
boxEquip
.
Config
.
TongsDetectThreshold
.
ToString
();
}
Bitmap
srcBitmap
=
null
;
BoxEquip
boxEquip
;
string
camName
=
"box_A"
;
private
void
btnSelect_Click
(
object
sender
,
EventArgs
e
)
{
OpenFileDialog
fileDialog
=
new
OpenFileDialog
();
fileDialog
.
InitialDirectory
=
Application
.
StartupPath
+
Common
.
ConfigAppSettings
.
GetValue
(
Common
.
Setting_Init
.
ImagePath
);
fileDialog
.
Filter
=
"图片|*.bmp"
;
fileDialog
.
RestoreDirectory
=
true
;
if
(
fileDialog
.
ShowDialog
()==
DialogResult
.
OK
)
{
txtImagePath
.
Text
=
System
.
IO
.
Path
.
GetFullPath
(
fileDialog
.
FileName
);
srcBitmap
=
new
Bitmap
(
txtImagePath
.
Text
);
picSrc
.
Image
=
srcBitmap
;
}
}
private
void
btnAcquire_Click
(
object
sender
,
EventArgs
e
)
{
srcBitmap
=
boxEquip
.
AcqImage
(
camName
);
picSrc
.
Image
=
srcBitmap
;
}
private
void
SideCheckedChanged
(
object
sender
,
EventArgs
e
)
{
if
(
rdoAside
.
Checked
)
{
camName
=
"box_A"
;
}
else
if
(
rdoBside
.
Checked
)
{
camName
=
"box_B"
;
}
}
private
void
btnSave_Click
(
object
sender
,
EventArgs
e
)
{
boxEquip
.
Config
.
TongsDetectThreshold
=
float
.
Parse
(
txtScoreThreshold
.
Text
);
StoreManager
.
SaveBoxConfig
(
boxEquip
.
Config
);
}
private
void
btnMatch_Click
(
object
sender
,
EventArgs
e
)
{
if
(
srcBitmap
!=
null
)
{
float
score
=
boxEquip
.
match
(
srcBitmap
,
out
string
pn
,
out
Bitmap
bitmap
);
picResult
.
Image
=
bitmap
;
updateResult
(
score
);
}
}
private
void
updateResult
(
float
score
)
{
lblResult
.
Text
=
score
.
ToString
(
"f2"
);
if
(
score
<
boxEquip
.
Config
.
TongsDetectThreshold
)
{
lblResult
.
BackColor
=
Color
.
Red
;
}
else
{
lblResult
.
BackColor
=
Color
.
GreenYellow
;
}
}
private
void
btnLearn_Click
(
object
sender
,
EventArgs
e
)
{
if
(
srcBitmap
!=
null
)
boxEquip
.
learn
(
srcBitmap
,
Guid
.
NewGuid
().
ToString
());
}
private
void
btnSelectPatch_Click
(
object
sender
,
EventArgs
e
)
{
FolderBrowserDialog
folderDialog
=
new
FolderBrowserDialog
();
folderDialog
.
Description
=
"请选择需要训练图像的路径"
;
if
(
folderDialog
.
ShowDialog
()
==
DialogResult
.
OK
)
{
txtImagePath
.
Text
=
folderDialog
.
SelectedPath
+
@"\"
;
string
[]
files
=
System
.
IO
.
Directory
.
GetFiles
(
txtImagePath
.
Text
);
lblResult
.
Text
=
"开始学习..."
;
System
.
Threading
.
Tasks
.
Task
task
=
System
.
Threading
.
Tasks
.
Task
.
Factory
.
StartNew
(
delegate
{
foreach
(
var
item
in
files
)
{
boxEquip
.
learn
(
item
,
Guid
.
NewGuid
().
ToString
());
}
});
task
.
Wait
();
lblResult
.
Text
=
"学习完成"
;
lblResult
.
BackColor
=
Color
.
AliceBlue
;
}
}
}
}
source/XLRStoreClient/boxForm/FrmTongsLearn.resx
0 → 100644
查看文件 @
2fe0028
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
\ No newline at end of file
source/XLRStoreClient/boxForm/userControl/UCStatusPanel.Designer.cs
0 → 100644
查看文件 @
2fe0028
namespace
OnlineStore.XLRStore.boxForm.userControl
{
partial
class
UCStatusPanel
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private
System
.
ComponentModel
.
IContainer
components
=
null
;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected
override
void
Dispose
(
bool
disposing
)
{
if
(
disposing
&&
(
components
!=
null
))
{
components
.
Dispose
();
}
base
.
Dispose
(
disposing
);
}
#
region
组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private
void
InitializeComponent
()
{
this
.
lblStatus
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
SuspendLayout
();
//
// lblStatus
//
this
.
lblStatus
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
lblStatus
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblStatus
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
lblStatus
.
Name
=
"lblStatus"
;
this
.
lblStatus
.
Size
=
new
System
.
Drawing
.
Size
(
150
,
38
);
this
.
lblStatus
.
TabIndex
=
0
;
this
.
lblStatus
.
Text
=
"05BB01010101"
;
this
.
lblStatus
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
//
// UCStatusPanel
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
Controls
.
Add
(
this
.
lblStatus
);
this
.
Name
=
"UCStatusPanel"
;
this
.
Size
=
new
System
.
Drawing
.
Size
(
150
,
38
);
this
.
ResumeLayout
(
false
);
}
#
endregion
private
System
.
Windows
.
Forms
.
Label
lblStatus
;
}
}
source/XLRStoreClient/boxForm/userControl/UCStatusPanel.cs
0 → 100644
查看文件 @
2fe0028
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
namespace
OnlineStore.XLRStore.boxForm.userControl
{
public
partial
class
UCStatusPanel
:
UserControl
{
public
UCStatusPanel
()
{
InitializeComponent
();
}
}
}
source/XLRStoreClient/boxForm/userControl/UCStatusPanel.resx
0 → 100644
查看文件 @
2fe0028
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论