Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO908-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 0ac004a3
由
张东亮
编写于
2021-06-04 14:22:03 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
存储机构-更新视觉定位dll
1 个父辈
148e3fdb
隐藏空白字符变更
内嵌
并排
正在显示
29 个修改的文件
包含
1656 行增加
和
31 行删除
dll/eyemLib.dll
dll/libdecode.dll
dll/libdmtx.dll
source/Common/Setting_Init.cs
source/DeviceLibrary/Config/Config_BoxEquip.csv
source/DeviceLibrary/Config/DrawerPosition.csv
source/DeviceLibrary/Config/linePositions.csv
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/eyemLib.dll
source/DeviceLibrary/libdecode.dll
source/DeviceLibrary/libdmtx.dll
source/DeviceLibrary/manager/StoreManager.cs
source/DeviceLibrary/manager/model/DeviceStep.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_AutoFindPos.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ConnectServerTimer.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_Partial.cs
source/DeviceLibrary/storeBean/boxBean/EyemLibDemo.cs
source/LoadCVSLibrary/position/DrawerPosition.cs
source/LoadCVSLibrary/storeConfig/config/BoxEquip_Config.cs
source/XLRStoreClient/App.config
source/XLRStoreClient/FrmXLRStore.Designer.cs
source/XLRStoreClient/XLRStore.csproj
source/XLRStoreClient/boxForm/FrmAutoFindPos.Designer.cs
source/XLRStoreClient/boxForm/FrmAutoFindPos.cs
source/XLRStoreClient/boxForm/FrmAutoFindPos.resx
source/XLRStoreClient/boxForm/FrmAxisMove.Designer.cs
source/XLRStoreClient/boxForm/FrmAxisMove.cs
source/XLRStoreClient/boxForm/FrmBoxEquip.cs
dll/eyemLib.dll
查看文件 @
0ac004a
此文件类型无法预览
dll/libdecode.dll
查看文件 @
0ac004a
此文件类型无法预览
dll/libdmtx.dll
查看文件 @
0ac004a
此文件类型无法预览
source/Common/Setting_Init.cs
查看文件 @
0ac004a
...
...
@@ -31,6 +31,7 @@ namespace OnlineStore.Common
public
static
string
ConfigPath_Input
=
"ConfigPath_Input"
;
public
static
string
ConfigPath_Box
=
"ConfigPath_Box"
;
public
static
string
ConfigPath_BoxPosition
=
"ConfigPath_BoxPosition"
;
public
static
string
ConfigPath_DrawerPosition
=
"ConfigPath_DrawerPosition"
;
/// <summary>
/// 需要识别的二维码类型,多个中间使用#分割
/// </summary>
...
...
source/DeviceLibrary/Config/Config_BoxEquip.csv
查看文件 @
0ac004a
...
...
@@ -12,6 +12,14 @@ AXIS,0,B面移栽压紧轴,ComAxis_B,9,HC,,35000,60000,60000,1000,5000,20000,10,100,0,
,,,,,,,,,,,,,,,,
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,,,,,,,,
PRO,0,温湿度端口号,Humiture_Port,0,,,,,,,,,,,,
PRO,0,抽屉Mark_X坐标,Drawer_X,0,,,,,,,,,,,,
PRO,0,抽屉Mark_Y坐标,Drawer_Y,0,,,,,,,,,,,,
PRO,0,抽屉Mark_X方向误差范围,Drawer_X_Error,0,,,,,,,,,,,,
PRO,0,抽屉Mark_Y方向误差范围,Drawer_Y_Error,0,,,,,,,,,,,,
PRO,0,抽屉行间距,Row_Spacing,0,,,,,,,,,,,,
PRO,0,抽屉列间距,Column_Spacing,0,,,,,,,,,,,,
PRO,0,抽屉层数,Drawer_Rows,15,,,,,,,,,,,,
PRO,0,抽屉列数,Drawer_Columns,6,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,行走机构_待机点P1,MoveAxis_P1,100,,,,,,,,,,,,
PRO,0,行走机构_进出料机构取放点P2,MoveAxis_P2,100,,,,,,,,,,,,
...
...
source/DeviceLibrary/Config/DrawerPosition.csv
0 → 100644
查看文件 @
0ac004a
位置,料仓ID,优先级,高度,宽度,X坐标,Y坐标,X方向误差范围,Y方向误差范围
05AA0101,2,1,8,7,20,3,100,100
05AA0102,2,1,8,7,20,3,100,100
05AA0103,2,1,8,7,20,3,100,100
05AA0104,2,1,8,7,20,3,100,100
05AA0105,2,1,8,7,20,3,100,100
05AA0106,2,1,8,7,20,3,100,100
05AA0201,2,1,8,7,20,3,100,100
05AA0202,2,1,8,7,20,3,100,100
05AA0203,2,1,8,7,20,3,100,100
05AA0204,2,1,8,7,20,3,100,100
05AA0205,2,1,8,7,20,3,100,100
05AA0206,2,1,8,7,20,3,100,100
05AA0301,2,1,8,7,20,3,100,100
05AA0302,2,1,8,7,20,3,100,100
05AA0303,2,1,8,7,20,3,100,100
05AA0304,2,1,8,7,20,3,100,100
05AA0305,2,1,8,7,20,3,100,100
05AA0306,2,1,8,7,20,3,100,100
05AA0401,2,1,8,7,20,3,100,100
05AA0402,2,1,8,7,20,3,100,100
05AA0403,2,1,8,7,20,3,100,100
05AA0404,2,1,8,7,20,3,100,100
05AA0405,2,1,8,7,20,3,100,100
05AA0406,2,1,8,7,20,3,100,100
05AA0501,2,1,8,7,20,3,100,100
05AA0502,2,1,8,7,20,3,100,100
05AA0503,2,1,8,7,20,3,100,100
05AA0504,2,1,8,7,20,3,100,100
05AA0505,2,1,8,7,20,3,100,100
05AA0506,2,1,8,7,20,3,100,100
05AA0601,2,1,8,7,20,3,100,100
05AA0602,2,1,8,7,20,3,100,100
05AA0603,2,1,8,7,20,3,100,100
05AA0604,2,1,8,7,20,3,100,100
05AA0605,2,1,8,7,20,3,100,100
05AA0606,2,1,8,7,20,3,100,100
05AA0701,2,1,8,7,20,3,100,100
05AA0702,2,1,8,7,20,3,100,100
05AA0703,2,1,8,7,20,3,100,100
05AA0704,2,1,8,7,20,3,100,100
05AA0705,2,1,8,7,20,3,100,100
05AA0706,2,1,8,7,20,3,100,100
05AA0801,2,1,8,7,20,3,100,100
05AA0802,2,1,8,7,20,3,100,100
05AA0803,2,1,8,7,20,3,100,100
05AA0804,2,1,8,7,20,3,100,100
05AA0805,2,1,8,7,20,3,100,100
05AA0806,2,1,8,7,20,3,100,100
05AA0901,2,1,8,7,20,3,100,100
05AA0902,2,1,8,7,20,3,100,100
05AA0903,2,1,8,7,20,3,100,100
05AA0904,2,1,8,7,20,3,100,100
05AA0905,2,1,8,7,20,3,100,100
05AA0906,2,1,8,7,20,3,100,100
05AA1001,2,1,8,7,20,3,100,100
05AA1002,2,1,8,7,20,3,100,100
05AA1003,2,1,8,7,20,3,100,100
05AA1004,2,1,8,7,20,3,100,100
05AA1005,2,1,8,7,20,3,100,100
05AA1006,2,1,8,7,20,3,100,100
05AA1101,2,1,8,7,20,3,100,100
05AA1102,2,1,8,7,20,3,100,100
05AA1103,2,1,8,7,20,3,100,100
05AA1104,2,1,8,7,20,3,100,100
05AA1105,2,1,8,7,20,3,100,100
05AA1106,2,1,8,7,20,3,100,100
05AA1201,2,1,8,7,20,3,100,100
05AA1202,2,1,8,7,20,3,100,100
05AA1203,2,1,8,7,20,3,100,100
05AA1204,2,1,8,7,20,3,100,100
05AA1205,2,1,8,7,20,3,100,100
05AA1206,2,1,8,7,20,3,100,100
05AA1301,2,1,8,7,20,3,100,100
05AA1302,2,1,8,7,20,3,100,100
05AA1303,2,1,8,7,20,3,100,100
05AA1304,2,1,8,7,20,3,100,100
05AA1305,2,1,8,7,20,3,100,100
05AA1306,2,1,8,7,20,3,100,100
05AA1401,2,1,8,7,20,3,100,100
05AA1402,2,1,8,7,20,3,100,100
05AA1403,2,1,8,7,20,3,100,100
05AA1404,2,1,8,7,20,3,100,100
05AA1405,2,1,8,7,20,3,100,100
05AA1406,2,1,8,7,20,3,100,100
05AA1501,2,1,8,7,20,3,100,100
05AA1502,2,1,8,7,20,3,100,100
05AA1503,2,1,8,7,20,3,100,100
05AA1504,2,1,8,7,20,3,100,100
05AA1505,2,1,8,7,20,3,100,100
05AA1506,2,1,8,7,20,3,100,100
05AA1601,2,1,8,7,20,3,100,100
05AA1602,2,1,8,7,20,3,100,100
05AA1603,2,1,8,7,20,3,100,100
05AA1604,2,1,8,7,20,3,100,100
05AA1605,2,1,8,7,20,3,100,100
05AA1606,2,1,8,7,20,3,100,100
05BB0101,2,1,8,7,20,3,100,100
05BB0102,2,1,8,7,20,3,100,100
05BB0103,2,1,8,7,20,3,100,100
05BB0104,2,1,8,7,20,3,100,100
05BB0105,2,1,8,7,20,3,100,100
05BB0106,2,1,8,7,20,3,100,100
05BB0201,2,1,8,7,20,3,100,100
05BB0202,2,1,8,7,20,3,100,100
05BB0203,2,1,8,7,20,3,100,100
05BB0204,2,1,8,7,20,3,100,100
05BB0205,2,1,8,7,20,3,100,100
05BB0206,2,1,8,7,20,3,100,100
05BB0301,2,1,8,7,20,3,100,100
05BB0302,2,1,8,7,20,3,100,100
05BB0303,2,1,8,7,20,3,100,100
05BB0304,2,1,8,7,20,3,100,100
05BB0305,2,1,8,7,20,3,100,100
05BB0306,2,1,8,7,20,3,100,100
05BB0401,2,1,8,7,20,3,100,100
05BB0402,2,1,8,7,20,3,100,100
05BB0403,2,1,8,7,20,3,100,100
05BB0404,2,1,8,7,20,3,100,100
05BB0405,2,1,8,7,20,3,100,100
05BB0406,2,1,8,7,20,3,100,100
05BB0501,2,1,8,7,20,3,100,100
05BB0502,2,1,8,7,20,3,100,100
05BB0503,2,1,8,7,20,3,100,100
05BB0504,2,1,8,7,20,3,100,100
05BB0505,2,1,8,7,20,3,100,100
05BB0506,2,1,8,7,20,3,100,100
05BB0601,2,1,8,7,20,3,100,100
05BB0602,2,1,8,7,20,3,100,100
05BB0603,2,1,8,7,20,3,100,100
05BB0604,2,1,8,7,20,3,100,100
05BB0605,2,1,8,7,20,3,100,100
05BB0606,2,1,8,7,20,3,100,100
05BB0701,2,1,8,7,20,3,100,100
05BB0702,2,1,8,7,20,3,100,100
05BB0703,2,1,8,7,20,3,100,100
05BB0704,2,1,8,7,20,3,100,100
05BB0705,2,1,8,7,20,3,100,100
05BB0706,2,1,8,7,20,3,100,100
05BB0801,2,1,8,7,20,3,100,100
05BB0802,2,1,8,7,20,3,100,100
05BB0803,2,1,8,7,20,3,100,100
05BB0804,2,1,8,7,20,3,100,100
05BB0805,2,1,8,7,20,3,100,100
05BB0806,2,1,8,7,20,3,100,100
05BB0901,2,1,8,7,20,3,100,100
05BB0902,2,1,8,7,20,3,100,100
05BB0903,2,1,8,7,20,3,100,100
05BB0904,2,1,8,7,20,3,100,100
05BB0905,2,1,8,7,20,3,100,100
05BB0906,2,1,8,7,20,3,100,100
05BB1001,2,1,8,7,20,3,100,100
05BB1002,2,1,8,7,20,3,100,100
05BB1003,2,1,8,7,20,3,100,100
05BB1004,2,1,8,7,20,3,100,100
05BB1005,2,1,8,7,20,3,100,100
05BB1006,2,1,8,7,20,3,100,100
05BB1101,2,1,8,7,20,3,100,100
05BB1102,2,1,8,7,20,3,100,100
05BB1103,2,1,8,7,20,3,100,100
05BB1104,2,1,8,7,20,3,100,100
05BB1105,2,1,8,7,20,3,100,100
05BB1106,2,1,8,7,20,3,100,100
05BB1201,2,1,8,7,20,3,100,100
05BB1202,2,1,8,7,20,3,100,100
05BB1203,2,1,8,7,20,3,100,100
05BB1204,2,1,8,7,20,3,100,100
05BB1205,2,1,8,7,20,3,100,100
05BB1206,2,1,8,7,20,3,100,100
05BB1301,2,1,8,7,20,3,100,100
05BB1302,2,1,8,7,20,3,100,100
05BB1303,2,1,8,7,20,3,100,100
05BB1304,2,1,8,7,20,3,100,100
05BB1305,2,1,8,7,20,3,100,100
05BB1306,2,1,8,7,20,3,100,100
05BB1401,2,1,8,7,20,3,100,100
05BB1402,2,1,8,7,20,3,100,100
05BB1403,2,1,8,7,20,3,100,100
05BB1404,2,1,8,7,20,3,100,100
05BB1405,2,1,8,7,20,3,100,100
05BB1406,2,1,8,7,20,3,100,100
05BB1501,2,1,8,7,20,3,100,100
05BB1502,2,1,8,7,20,3,100,100
05BB1503,2,1,8,7,20,3,100,100
05BB1504,2,1,8,7,20,3,100,100
05BB1505,2,1,8,7,20,3,100,100
05BB1506,2,1,8,7,20,3,100,100
05BB1601,2,1,8,7,20,3,100,100
05BB1602,2,1,8,7,20,3,100,100
05BB1603,2,1,8,7,20,3,100,100
05BB1604,2,1,8,7,20,3,100,100
05BB1605,2,1,8,7,20,3,100,100
05BB1606,2,1,8,7,20,3,100,100
\ No newline at end of file
source/DeviceLibrary/Config/linePositions.csv
查看文件 @
0ac004a
位置,优先级,高度,宽度,料仓ID,料斗进出轴料屉提取点P2P4,料斗进出轴料屉库位点P3P5,料斗升降轴料屉提取高点P3,料斗升降轴料屉提取低点P4,存储库位取放点位P3,移栽升降轴料屉上方过渡点P6P12,移栽升降轴料屉取放点P7P13,AB移栽X轴料屉库位取放料点P3,AB移栽压紧轴压紧前点P2,AB移栽压紧轴压紧点P3
05AA03040102,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05BB03040102,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05AA01010101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05AA01020101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05AA01030101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05AA01040101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05AA01050101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05AA01060101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05AA02010101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05AA02020101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05AA02030101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05AA02040101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05AA02050101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05AA02060101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05AA03010101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05AA03020101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05AA03030101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05AA03040101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05AA03050101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05AA03060101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05BB01010101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05BB01020101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05BB01030101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05BB01040101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05BB01050101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05BB01060101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05BB02010101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05BB02020101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05BB02030101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05BB02040101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05BB02050101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05BB02060101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05BB03010101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05BB03020101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05BB03030101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05BB03040101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05BB03050101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
05BB03060101,1,20,7,2,190500,1779933,1790933,1790933,1779933,1779933,1779933,1779933,1779933,1779933
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
0ac004a
...
...
@@ -83,6 +83,8 @@
<Compile Include="storeBean\boxBean\AutoInoutInfo.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_InExecute.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_OutExecute.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_AutoFindPos.cs" />
<Compile Include="storeBean\boxBean\EyemLibDemo.cs" />
<Compile Include="storeBean\boxBean\Humiture\HumitureBean.cs" />
<Compile Include="storeBean\boxBean\Humiture\HumitureController.cs" />
<Compile Include="storeBean\inputBean\BatchMoveBean.cs" />
...
...
source/DeviceLibrary/eyemLib.dll
查看文件 @
0ac004a
此文件类型无法预览
source/DeviceLibrary/libdecode.dll
查看文件 @
0ac004a
此文件类型无法预览
source/DeviceLibrary/libdmtx.dll
查看文件 @
0ac004a
此文件类型无法预览
source/DeviceLibrary/manager/StoreManager.cs
查看文件 @
0ac004a
...
...
@@ -106,9 +106,12 @@ namespace OnlineStore.DeviceLibrary
boxConfig
.
SetIO
(
2
);
boxConfig
.
CID
=
CID
;
allConfigMap
.
Add
(
2
,
boxConfig
);
//加载点位
//加载
仓位
点位
string
positionConfigFile
=
appPath
+
ConfigAppSettings
.
GetValue
(
Setting_Init
.
ConfigPath_BoxPosition
);
CSVPositionReader
<
BoxPosition
>.
AddCSVFile
(
positionConfigFile
);
//加载抽屉点位
//string drawConfigFile = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_DrawerPosition);
//CSVPositionReader<DrawerPosition>.AddCSVFile(drawConfigFile);
XLRStore
=
new
XLRStoreBean
(
Config
,
inputConfig
,
boxConfig
);
LogUtil
.
info
(
"加载 完成!"
);
...
...
source/DeviceLibrary/manager/model/DeviceStep.cs
查看文件 @
0ac004a
...
...
@@ -368,6 +368,41 @@ namespace OnlineStore.DeviceLibrary
#
endregion
#
region
存储机构自动对位功能
400
开始
/// <summary>
/// 存储机构自动对位:开始对位
/// </summary>
SA_Drawer_Start_Find_Pos
=
401
,
/// <summary>
/// 存储机构自动对位:去抽屉起始点
/// </summary>
SA_01_To_Drawer_StartPoint
,
/// <summary>
/// 存储机构自动对位:取图(正向)
/// </summary>
SA_02_Pos_AcqImg
,
/// <summary>
/// 存储机构自动对位:对位(正向)
/// </summary>
SA_03_Pos_AdjPos
,
/// <summary>
/// 存储机构自动对位:到下一个抽屉(正向)
/// </summary>
SA_04_Pos_NextDrawer
,
/// <summary>
/// 存储机构自动对位:取图(反向)
/// </summary>
SA_05_Neg_AcqImg
,
/// <summary>
/// 存储机构自动对位:对位(反向)
/// </summary>
SA_06_Neg_AdjPos
,
/// <summary>
/// 存储机构自动对位:到下一个抽屉(反向)
/// </summary>
SA_07_Neg_NextDrawer
,
#
endregion
#
region
入料模块复位
1000
开始
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip.cs
查看文件 @
0ac004a
...
...
@@ -80,10 +80,6 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public
string
[]
trayBColumns
;
/// <summary>
/// 等待出库的队列
/// </summary>
public
ConcurrentQueue
<
InOutParam
>
waitOutStoreList
=
new
ConcurrentQueue
<
InOutParam
>();
/// <summary>
/// A面等待出库的队列
/// </summary>
public
ConcurrentQueue
<
InOutParam
>
waitAOutStoreList
=
new
ConcurrentQueue
<
InOutParam
>();
...
...
@@ -111,6 +107,7 @@ namespace OnlineStore.DeviceLibrary
InitRowColumnSig
();
InitAllAxis
();
InitPosititionNumList
();
InitDrawInfos
();
}
void
InitRowColumnSig
()
...
...
@@ -379,13 +376,66 @@ namespace OnlineStore.DeviceLibrary
dtUpperB
=
DateTime
.
Now
;
}
}
private
void
ExecuteOutListProcess
()
{
try
{
//bool noInStore = true;
//if (AutoInout.CurrInOutACount >= this.Config.Box_ResetACount && noInStore)
//{
// if (storeRunStatus < StoreRunStatus.Runing || MoveInfo.MoveType == StoreMoveType.InStore || MoveInfo.MoveType == StoreMoveType.OutStore)
// {
// // LogInfo("已经累计出入库" + AutoInout.CurrInOutACount + "次,当时当前正在忙碌中暂不复位");
// }
// else
// {
// LogInfo("已经累计出入库" + AutoInout.CurrInOutACount + "次,需要复位一下");
// Reset();
// }
// return;
//}
if
(
waitAOutStoreList
.
Count
>
0
)
{
InOutParam
param
=
null
;
bool
result
=
waitAOutStoreList
.
TryDequeue
(
out
param
);
if
(
result
&&
param
!=
null
)
{
LogInfo
(
"执行A面排队的出库【"
+
param
.
PosInfo
.
ToStr
()
+
"】"
);
StartExecuctOut
(
param
);
return
;
}
}
if
(
waitBOutStoreList
.
Count
>
0
)
{
InOutParam
param
=
null
;
bool
result
=
waitBOutStoreList
.
TryDequeue
(
out
param
);
if
(
result
&&
param
!=
null
)
{
LogInfo
(
"执行B面排队的出库【"
+
param
.
PosInfo
.
ToStr
()
+
"】"
);
StartExecuctOut
(
param
);
return
;
}
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
Name
+
"处理出库排队列表出错:"
+
ex
.
ToString
());
}
}
protected
override
void
BaseTimerProcess
()
{
if
(
isInSuddenDown
||
isNoAirpressure_Check
)
{
return
;
}
if
(
runStatus
.
Equals
(
RunStatus
.
Runing
))
{
ExecuteOutListProcess
();
}
if
(
autoFindPosMode
)
//自动对位模式
{
AutoFindPosProcess
();
}
BusyMoveProcess
();
if
(
NoErrorAlarm
())
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_AutoFindPos.cs
0 → 100644
查看文件 @
0ac004a
using
CodeLibrary
;
using
HuichuanLibrary
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Diagnostics
;
using
System.Drawing
;
using
System.Linq
;
using
System.Runtime.InteropServices
;
using
System.Text
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
System.Windows.Forms.VisualStyles
;
using
static
eyemLib_Sharp
.
EyemLibDemo
;
namespace
OnlineStore.DeviceLibrary
{
public
partial
class
BoxEquip
{
//public Dictionary<string, List<DrawerInfo>> DrawerNums = new Dictionary<string, List<DrawerInfo>>();
AutoFindPos
autoFindPos
;
private
bool
autoFindPosMode
=
false
;
private
void
InitDrawInfos
()
{
autoFindPos
=
new
AutoFindPos
(
Config
);
//DrawerNums.Add("A", new List<DrawerInfo>());
//DrawerNums.Add("B", new List<DrawerInfo>());
//List<DrawerPosition> drawerPositions = CSVPositionReader<DrawerPosition>.getPositionList();
//foreach (DrawerPosition position in drawerPositions)
//{
// if (position.StoreId.Equals(DeviceID))
// {
// DrawerNums[PosSide(position.PositionNum)].Add(new DrawerInfo(position.PositionNum,PositionNumList));
// }
//}
}
/// <summary>
/// 获取抽屉/仓位所在面
/// </summary>
/// <param name="pos">位置</param>
/// <returns></returns>
private
string
PosSide
(
string
pos
)
{
if
(
pos
.
Substring
(
2
,
2
).
Equals
(
"AA"
))
return
"A"
;
else
if
(
pos
.
Substring
(
2
,
2
).
Equals
(
"BB"
))
return
"B"
;
return
""
;
}
/// <summary>
/// 获取轴的负限位
/// </summary>
/// <param name="axisNo"></param>
/// <returns></returns>
public
bool
GetAxisNelSts
(
short
axisNo
)
{
AxisSts
sts
=
HCBoardManager
.
GetAxisSts
(
axisNo
);
return
sts
.
NEL
==
1
;
}
/// <summary>
/// 获取轴的正限位
/// </summary>
/// <param name="axisNo"></param>
/// <returns></returns>
public
bool
GetAxisPelSts
(
short
axisNo
)
{
AxisSts
sts
=
HCBoardManager
.
GetAxisSts
(
axisNo
);
return
sts
.
PEL
==
1
;
}
public
void
AutoFindPosProcess
()
{
if
(
MoveInfo
.
IsInWait
)
{
CheckWait
(
MoveInfo
);
}
if
(
MoveInfo
.
IsInWait
)
{
return
;
}
switch
(
MoveInfo
.
MoveStep
)
{
case
StepEnum
.
SA_Drawer_Start_Find_Pos
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SA_01_To_Drawer_StartPoint
);
LogInfo
(
$
"存储机构-视觉对位 {MoveInfo.SLog}:到抽屉起始点,"
+
$
"行走机构到进出料机构取放点P2,移栽升降轴到上暂存区取料低点P3/P9,移栽压紧轴到压紧前点P2,移栽旋转轴到进出料暂存区取放料水平点P2[{MoveInfo.MoveParam.PosInfo.PosSide}面]"
);
MoveAxis
.
AbsMove
(
MoveInfo
,
Config
.
MoveAxis_P2
,
Config
.
MoveAxis_P2_Speed
);
break
;
case
StepEnum
.
SA_01_To_Drawer_StartPoint
:
break
;
case
StepEnum
.
SA_02_Pos_AcqImg
:
break
;
case
StepEnum
.
SA_03_Pos_AdjPos
:
break
;
case
StepEnum
.
SA_04_Pos_NextDrawer
:
break
;
case
StepEnum
.
SA_05_Neg_AcqImg
:
break
;
case
StepEnum
.
SA_06_Neg_AdjPos
:
break
;
case
StepEnum
.
SA_07_Neg_NextDrawer
:
break
;
//case StepEnum.:
// //如果行>抽屉行数,直接退出。否则获取图片、得到mark的坐标,并与模板坐标比较。根据误差范围外对行走机构和移栽升降轴移动
// //在误差范围内,保存该位置脉冲同时生成库位位置信息。列加1进行第二步
// break;
//case StepEnum.:
// //如果列>抽屉列数,判断行是否大于抽屉的行数?大于则结束;否则行加1,移栽升降轴运动,到第三步
// //否则行走机构移动一个行间距的距离,到第一步
// break;
//case StepEnum.:
// //如果行>抽屉行数,直接退出。否则获取图片、得到mark的坐标,并与模板坐标比较。根据误差范围外对行走机构和移栽升降轴移动
// //在误差范围内,保存该位置脉冲同时生成库位位置信息。列减1进行第四步
// break;
//case StepEnum.:
// //如果列《1,判断行是否大于抽屉的行数?大于则结束;否则行加1,移栽升降轴运动,到第一步
// //否则行走机构移动一个行间距的距离,到第三步
// break;
//case StepEnum.:
// break;
}
}
}
public
class
AutoFindPos
{
/// <summary>
/// 当前行
/// </summary>
public
int
CurRow
{
get
;
set
;
}
=
1
;
/// <summary>
/// 当前行脉冲
/// </summary>
public
int
CurRowPulse
{
get
;
set
;
}
=
0
;
/// <summary>
/// 当前列脉冲
/// </summary>
public
int
CurColumnPulse
{
get
;
set
;
}
=
0
;
/// <summary>
/// 坐标到脉冲的转换系数
/// </summary>
public
float
CoeffOfCoorToPulse
{
get
;
set
;
}
=
1
;
/// <summary>
/// 当前列
/// </summary>
public
int
CurColumn
{
get
;
set
;
}
=
1
;
/// <summary>
/// 抽屉行数
/// </summary>
public
int
Rows
{
get
;
private
set
;
}
/// <summary>
/// 抽屉列数
/// </summary>
public
int
Columns
{
get
;
private
set
;
}
/// <summary>
/// 抽屉间行间距
/// </summary>
public
int
Row_Spacing
{
get
;
private
set
;
}
/// <summary>
/// 抽屉间列间距
/// </summary>
public
int
Column_Spacing
{
get
;
private
set
;
}
public
AutoFindPos
(
BoxEquip_Config
boxEquip_Config
)
{
Row_Spacing
=
boxEquip_Config
.
Row_Spacing
;
Column_Spacing
=
boxEquip_Config
.
Column_Spacing
;
Rows
=
boxEquip_Config
.
Drawer_Rows
;
Columns
=
boxEquip_Config
.
Drawer_Columns
;
}
/// <summary>
/// Mark点坐标信息
/// </summary>
/// <param name="bitmap">输入图片</param>
/// <param name="markCoor">mark点坐标信息</param>
/// <returns>0 正常 -4未定位到 </returns>
public
static
int
GetMarkInfo
(
Bitmap
bitmap
,
out
EyemOcsFXYR
markCoor
)
{
int
flag
;
markCoor
=
new
EyemOcsFXYR
();
EyemImage
image
=
eyemCvtToEyemImage
(
bitmap
);
flag
=
eyemMarkerTracing
(
image
,
130
,
ref
markCoor
);
Marshal
.
FreeHGlobal
(
image
.
vpImage
);
return
flag
;
}
}
public
class
DrawerInfo
{
/// <summary>
/// 抽屉信息
/// </summary>
/// <param name="pos">抽屉位置</param>
/// <param name="posNums">仓位列表</param>
public
DrawerInfo
(
string
pos
,
List
<
string
>
posNums
)
{
PositionNum
=
pos
;
Positions
=
posNums
.
FindAll
(
s
=>
s
.
StartsWith
(
pos
));
}
/// <summary>
/// 抽屉位置
/// </summary>
public
string
PositionNum
{
get
;
private
set
;
}
/// <summary>
/// 抽屉内的仓位位置
/// </summary>
public
List
<
string
>
Positions
{
get
;
private
set
;
}
}
}
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ConnectServerTimer.cs
查看文件 @
0ac004a
...
...
@@ -290,14 +290,17 @@ namespace OnlineStore.DeviceLibrary
try
{
//判断是否接收过此库位的出库信息
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
OutStore
)
&&
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
.
Equals
(
posId
))
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
OutStore
)
&&
(
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
.
Equals
(
posId
)||
(
MoveInfo
.
MoveParam
.
PosInfoBack
!=
null
&&
MoveInfo
.
MoveParam
.
PosInfoBack
.
PosId
.
Equals
(
posId
))))
{
LogUtil
.
error
(
Name
+
" 出库命令【"
+
inoutParam
.
PosInfo
.
ToStr
()
+
"】重复,正在【"
+
posId
+
"】出库中"
);
continue
;
}
//判断排队列表中是否已存在
List
<
InOutParam
>
reviceList
=
new
List
<
InOutParam
>(
waitOutStoreList
);
List
<
InOutParam
>
reviceList
=
new
List
<
InOutParam
>();
reviceList
.
AddRange
(
waitAOutStoreList
);
reviceList
.
AddRange
(
waitBOutStoreList
);
reviceList
=
(
from
m
in
reviceList
where
m
.
PosInfo
.
PosId
.
Equals
(
posId
)
select
m
).
ToList
<
InOutParam
>();
if
(
reviceList
.
Count
>
0
)
{
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_Partial.cs
查看文件 @
0ac004a
...
...
@@ -319,6 +319,7 @@ namespace OnlineStore.DeviceLibrary
}
return
false
;
}
private
static
object
outStoreObject
=
new
object
();
public
void
StartExecuctOut
(
InOutParam
param
)
{
bool
result
=
false
;
...
...
@@ -328,7 +329,7 @@ namespace OnlineStore.DeviceLibrary
}
if
(!
result
)
{
lock
(
waitOutStoreLis
t
)
lock
(
outStoreObjec
t
)
{
LogInfo
(
" 执行出库【"
+
param
.
PosInfo
.
ToStr
()
+
"】失败,加入等待队列"
);
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
OutStore
)
&&
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
.
Equals
(
param
.
PosInfo
.
PosId
))
...
...
@@ -337,11 +338,20 @@ namespace OnlineStore.DeviceLibrary
return
;
}
List
<
InOutParam
>
reviceList
=
new
List
<
InOutParam
>(
waitOutStoreList
);
List
<
InOutParam
>
reviceList
=
new
List
<
InOutParam
>();
reviceList
.
AddRange
(
waitAOutStoreList
);
reviceList
.
AddRange
(
waitBOutStoreList
);
reviceList
=
(
from
m
in
reviceList
where
m
.
PosInfo
.
PosId
.
Equals
(
param
.
PosInfo
.
PosId
)
select
m
).
ToList
<
InOutParam
>();
if
(
reviceList
.
Count
==
0
)
{
waitOutStoreList
.
Enqueue
(
param
);
if
(
param
.
PosInfo
.
PosSide
.
Equals
(
"A"
))
{
waitAOutStoreList
.
Enqueue
(
param
);
}
else
if
(
param
.
PosInfo
.
PosSide
.
Equals
(
"B"
))
{
waitBOutStoreList
.
Enqueue
(
param
);
}
}
}
}
...
...
source/DeviceLibrary/storeBean/boxBean/EyemLibDemo.cs
0 → 100644
查看文件 @
0ac004a
using
Microsoft.Win32.SafeHandles
;
using
System
;
using
System.Runtime.InteropServices
;
using
System.Diagnostics
;
using
System.Linq
;
using
System.Collections.Generic
;
using
System.Drawing
;
using
System.Drawing.Imaging
;
namespace
eyemLib_Sharp
{
public
unsafe
class
EyemLibDemo
{
#
region
枚举
//稳健估计方法
public
enum
ROBUST_METHOD
{
EYEM_DIST_USER
=
-
1
,
EYEM_DIST_L1
=
1
,
EYEM_DIST_L12
=
2
,
EYEM_DIST_FAIR
=
3
,
EYEM_DIST_WELSCH
=
4
,
EYEM_DIST_HUBER
=
5
,
EYEM_DIST_BISQUARE
=
6
,
EYEM_DIST_CAUCHY
=
7
,
EYEM_DIST_LOGISTIC
=
8
,
EYEM_DIST_ANDREWS
=
9
,
EYEM_DIST_ATLWORTH
=
10
}
//图像格式信息
enum
ColorConversionCodes
{
COLOR_BGR2BGRA
=
0
,
//!< add alpha channel to RGB or BGR image
COLOR_RGB2RGBA
=
COLOR_BGR2BGRA
,
COLOR_BGRA2BGR
=
1
,
//!< remove alpha channel from RGB or BGR image
COLOR_RGBA2RGB
=
COLOR_BGRA2BGR
,
COLOR_BGR2RGBA
=
2
,
//!< convert between RGB and BGR color spaces (with or without alpha channel)
COLOR_RGB2BGRA
=
COLOR_BGR2RGBA
,
COLOR_RGBA2BGR
=
3
,
COLOR_BGRA2RGB
=
COLOR_RGBA2BGR
,
COLOR_BGR2RGB
=
4
,
COLOR_RGB2BGR
=
COLOR_BGR2RGB
,
COLOR_BGRA2RGBA
=
5
,
COLOR_RGBA2BGRA
=
COLOR_BGRA2RGBA
,
COLOR_BGR2GRAY
=
6
,
//!< convert between RGB/BGR and grayscale, @ref color_convert_rgb_gray "color conversions"
COLOR_RGB2GRAY
=
7
,
COLOR_GRAY2BGR
=
8
,
COLOR_GRAY2RGB
=
COLOR_GRAY2BGR
,
COLOR_GRAY2BGRA
=
9
,
COLOR_GRAY2RGBA
=
COLOR_GRAY2BGRA
,
COLOR_BGRA2GRAY
=
10
,
COLOR_RGBA2GRAY
=
11
,
COLOR_BGR2BGR565
=
12
,
//!< convert between RGB/BGR and BGR565 (16-bit images)
COLOR_RGB2BGR565
=
13
,
COLOR_BGR5652BGR
=
14
,
COLOR_BGR5652RGB
=
15
,
COLOR_BGRA2BGR565
=
16
,
COLOR_RGBA2BGR565
=
17
,
COLOR_BGR5652BGRA
=
18
,
COLOR_BGR5652RGBA
=
19
,
COLOR_GRAY2BGR565
=
20
,
//!< convert between grayscale to BGR565 (16-bit images)
COLOR_BGR5652GRAY
=
21
,
COLOR_BGR2BGR555
=
22
,
//!< convert between RGB/BGR and BGR555 (16-bit images)
COLOR_RGB2BGR555
=
23
,
COLOR_BGR5552BGR
=
24
,
COLOR_BGR5552RGB
=
25
,
COLOR_BGRA2BGR555
=
26
,
COLOR_RGBA2BGR555
=
27
,
COLOR_BGR5552BGRA
=
28
,
COLOR_BGR5552RGBA
=
29
,
COLOR_GRAY2BGR555
=
30
,
//!< convert between grayscale and BGR555 (16-bit images)
COLOR_BGR5552GRAY
=
31
,
COLOR_BGR2XYZ
=
32
,
//!< convert RGB/BGR to CIE XYZ, @ref color_convert_rgb_xyz "color conversions"
COLOR_RGB2XYZ
=
33
,
COLOR_XYZ2BGR
=
34
,
COLOR_XYZ2RGB
=
35
,
COLOR_BGR2YCrCb
=
36
,
//!< convert RGB/BGR to luma-chroma (aka YCC), @ref color_convert_rgb_ycrcb "color conversions"
COLOR_RGB2YCrCb
=
37
,
COLOR_YCrCb2BGR
=
38
,
COLOR_YCrCb2RGB
=
39
,
COLOR_BGR2HSV
=
40
,
//!< convert RGB/BGR to HSV (hue saturation value), @ref color_convert_rgb_hsv "color conversions"
COLOR_RGB2HSV
=
41
,
COLOR_BGR2Lab
=
44
,
//!< convert RGB/BGR to CIE Lab, @ref color_convert_rgb_lab "color conversions"
COLOR_RGB2Lab
=
45
,
COLOR_BGR2Luv
=
50
,
//!< convert RGB/BGR to CIE Luv, @ref color_convert_rgb_luv "color conversions"
COLOR_RGB2Luv
=
51
,
COLOR_BGR2HLS
=
52
,
//!< convert RGB/BGR to HLS (hue lightness saturation), @ref color_convert_rgb_hls "color conversions"
COLOR_RGB2HLS
=
53
,
COLOR_HSV2BGR
=
54
,
//!< backward conversions to RGB/BGR
COLOR_HSV2RGB
=
55
,
COLOR_Lab2BGR
=
56
,
COLOR_Lab2RGB
=
57
,
COLOR_Luv2BGR
=
58
,
COLOR_Luv2RGB
=
59
,
COLOR_HLS2BGR
=
60
,
COLOR_HLS2RGB
=
61
,
COLOR_BGR2HSV_FULL
=
66
,
COLOR_RGB2HSV_FULL
=
67
,
COLOR_BGR2HLS_FULL
=
68
,
COLOR_RGB2HLS_FULL
=
69
,
COLOR_HSV2BGR_FULL
=
70
,
COLOR_HSV2RGB_FULL
=
71
,
COLOR_HLS2BGR_FULL
=
72
,
COLOR_HLS2RGB_FULL
=
73
,
COLOR_LBGR2Lab
=
74
,
COLOR_LRGB2Lab
=
75
,
COLOR_LBGR2Luv
=
76
,
COLOR_LRGB2Luv
=
77
,
COLOR_Lab2LBGR
=
78
,
COLOR_Lab2LRGB
=
79
,
COLOR_Luv2LBGR
=
80
,
COLOR_Luv2LRGB
=
81
,
COLOR_BGR2YUV
=
82
,
//!< convert between RGB/BGR and YUV
COLOR_RGB2YUV
=
83
,
COLOR_YUV2BGR
=
84
,
COLOR_YUV2RGB
=
85
,
//! YUV 4:2:0 family to RGB
COLOR_YUV2RGB_NV12
=
90
,
COLOR_YUV2BGR_NV12
=
91
,
COLOR_YUV2RGB_NV21
=
92
,
COLOR_YUV2BGR_NV21
=
93
,
COLOR_YUV420sp2RGB
=
COLOR_YUV2RGB_NV21
,
COLOR_YUV420sp2BGR
=
COLOR_YUV2BGR_NV21
,
COLOR_YUV2RGBA_NV12
=
94
,
COLOR_YUV2BGRA_NV12
=
95
,
COLOR_YUV2RGBA_NV21
=
96
,
COLOR_YUV2BGRA_NV21
=
97
,
COLOR_YUV420sp2RGBA
=
COLOR_YUV2RGBA_NV21
,
COLOR_YUV420sp2BGRA
=
COLOR_YUV2BGRA_NV21
,
COLOR_YUV2RGB_YV12
=
98
,
COLOR_YUV2BGR_YV12
=
99
,
COLOR_YUV2RGB_IYUV
=
100
,
COLOR_YUV2BGR_IYUV
=
101
,
COLOR_YUV2RGB_I420
=
COLOR_YUV2RGB_IYUV
,
COLOR_YUV2BGR_I420
=
COLOR_YUV2BGR_IYUV
,
COLOR_YUV420p2RGB
=
COLOR_YUV2RGB_YV12
,
COLOR_YUV420p2BGR
=
COLOR_YUV2BGR_YV12
,
COLOR_YUV2RGBA_YV12
=
102
,
COLOR_YUV2BGRA_YV12
=
103
,
COLOR_YUV2RGBA_IYUV
=
104
,
COLOR_YUV2BGRA_IYUV
=
105
,
COLOR_YUV2RGBA_I420
=
COLOR_YUV2RGBA_IYUV
,
COLOR_YUV2BGRA_I420
=
COLOR_YUV2BGRA_IYUV
,
COLOR_YUV420p2RGBA
=
COLOR_YUV2RGBA_YV12
,
COLOR_YUV420p2BGRA
=
COLOR_YUV2BGRA_YV12
,
COLOR_YUV2GRAY_420
=
106
,
COLOR_YUV2GRAY_NV21
=
COLOR_YUV2GRAY_420
,
COLOR_YUV2GRAY_NV12
=
COLOR_YUV2GRAY_420
,
COLOR_YUV2GRAY_YV12
=
COLOR_YUV2GRAY_420
,
COLOR_YUV2GRAY_IYUV
=
COLOR_YUV2GRAY_420
,
COLOR_YUV2GRAY_I420
=
COLOR_YUV2GRAY_420
,
COLOR_YUV420sp2GRAY
=
COLOR_YUV2GRAY_420
,
COLOR_YUV420p2GRAY
=
COLOR_YUV2GRAY_420
,
//! YUV 4:2:2 family to RGB
COLOR_YUV2RGB_UYVY
=
107
,
COLOR_YUV2BGR_UYVY
=
108
,
//COLOR_YUV2RGB_VYUY = 109,
//COLOR_YUV2BGR_VYUY = 110,
COLOR_YUV2RGB_Y422
=
COLOR_YUV2RGB_UYVY
,
COLOR_YUV2BGR_Y422
=
COLOR_YUV2BGR_UYVY
,
COLOR_YUV2RGB_UYNV
=
COLOR_YUV2RGB_UYVY
,
COLOR_YUV2BGR_UYNV
=
COLOR_YUV2BGR_UYVY
,
COLOR_YUV2RGBA_UYVY
=
111
,
COLOR_YUV2BGRA_UYVY
=
112
,
//COLOR_YUV2RGBA_VYUY = 113,
//COLOR_YUV2BGRA_VYUY = 114,
COLOR_YUV2RGBA_Y422
=
COLOR_YUV2RGBA_UYVY
,
COLOR_YUV2BGRA_Y422
=
COLOR_YUV2BGRA_UYVY
,
COLOR_YUV2RGBA_UYNV
=
COLOR_YUV2RGBA_UYVY
,
COLOR_YUV2BGRA_UYNV
=
COLOR_YUV2BGRA_UYVY
,
COLOR_YUV2RGB_YUY2
=
115
,
COLOR_YUV2BGR_YUY2
=
116
,
COLOR_YUV2RGB_YVYU
=
117
,
COLOR_YUV2BGR_YVYU
=
118
,
COLOR_YUV2RGB_YUYV
=
COLOR_YUV2RGB_YUY2
,
COLOR_YUV2BGR_YUYV
=
COLOR_YUV2BGR_YUY2
,
COLOR_YUV2RGB_YUNV
=
COLOR_YUV2RGB_YUY2
,
COLOR_YUV2BGR_YUNV
=
COLOR_YUV2BGR_YUY2
,
COLOR_YUV2RGBA_YUY2
=
119
,
COLOR_YUV2BGRA_YUY2
=
120
,
COLOR_YUV2RGBA_YVYU
=
121
,
COLOR_YUV2BGRA_YVYU
=
122
,
COLOR_YUV2RGBA_YUYV
=
COLOR_YUV2RGBA_YUY2
,
COLOR_YUV2BGRA_YUYV
=
COLOR_YUV2BGRA_YUY2
,
COLOR_YUV2RGBA_YUNV
=
COLOR_YUV2RGBA_YUY2
,
COLOR_YUV2BGRA_YUNV
=
COLOR_YUV2BGRA_YUY2
,
COLOR_YUV2GRAY_UYVY
=
123
,
COLOR_YUV2GRAY_YUY2
=
124
,
//CV_YUV2GRAY_VYUY = CV_YUV2GRAY_UYVY,
COLOR_YUV2GRAY_Y422
=
COLOR_YUV2GRAY_UYVY
,
COLOR_YUV2GRAY_UYNV
=
COLOR_YUV2GRAY_UYVY
,
COLOR_YUV2GRAY_YVYU
=
COLOR_YUV2GRAY_YUY2
,
COLOR_YUV2GRAY_YUYV
=
COLOR_YUV2GRAY_YUY2
,
COLOR_YUV2GRAY_YUNV
=
COLOR_YUV2GRAY_YUY2
,
//! alpha premultiplication
COLOR_RGBA2mRGBA
=
125
,
COLOR_mRGBA2RGBA
=
126
,
//! RGB to YUV 4:2:0 family
COLOR_RGB2YUV_I420
=
127
,
COLOR_BGR2YUV_I420
=
128
,
COLOR_RGB2YUV_IYUV
=
COLOR_RGB2YUV_I420
,
COLOR_BGR2YUV_IYUV
=
COLOR_BGR2YUV_I420
,
COLOR_RGBA2YUV_I420
=
129
,
COLOR_BGRA2YUV_I420
=
130
,
COLOR_RGBA2YUV_IYUV
=
COLOR_RGBA2YUV_I420
,
COLOR_BGRA2YUV_IYUV
=
COLOR_BGRA2YUV_I420
,
COLOR_RGB2YUV_YV12
=
131
,
COLOR_BGR2YUV_YV12
=
132
,
COLOR_RGBA2YUV_YV12
=
133
,
COLOR_BGRA2YUV_YV12
=
134
,
//! Demosaicing
COLOR_BayerBG2BGR
=
46
,
COLOR_BayerGB2BGR
=
47
,
COLOR_BayerRG2BGR
=
48
,
COLOR_BayerGR2BGR
=
49
,
COLOR_BayerBG2RGB
=
COLOR_BayerRG2BGR
,
COLOR_BayerGB2RGB
=
COLOR_BayerGR2BGR
,
COLOR_BayerRG2RGB
=
COLOR_BayerBG2BGR
,
COLOR_BayerGR2RGB
=
COLOR_BayerGB2BGR
,
COLOR_BayerBG2GRAY
=
86
,
COLOR_BayerGB2GRAY
=
87
,
COLOR_BayerRG2GRAY
=
88
,
COLOR_BayerGR2GRAY
=
89
,
//! Demosaicing using Variable Number of Gradients
COLOR_BayerBG2BGR_VNG
=
62
,
COLOR_BayerGB2BGR_VNG
=
63
,
COLOR_BayerRG2BGR_VNG
=
64
,
COLOR_BayerGR2BGR_VNG
=
65
,
COLOR_BayerBG2RGB_VNG
=
COLOR_BayerRG2BGR_VNG
,
COLOR_BayerGB2RGB_VNG
=
COLOR_BayerGR2BGR_VNG
,
COLOR_BayerRG2RGB_VNG
=
COLOR_BayerBG2BGR_VNG
,
COLOR_BayerGR2RGB_VNG
=
COLOR_BayerGB2BGR_VNG
,
//! Edge-Aware Demosaicing
COLOR_BayerBG2BGR_EA
=
135
,
COLOR_BayerGB2BGR_EA
=
136
,
COLOR_BayerRG2BGR_EA
=
137
,
COLOR_BayerGR2BGR_EA
=
138
,
COLOR_BayerBG2RGB_EA
=
COLOR_BayerRG2BGR_EA
,
COLOR_BayerGB2RGB_EA
=
COLOR_BayerGR2BGR_EA
,
COLOR_BayerRG2RGB_EA
=
COLOR_BayerBG2BGR_EA
,
COLOR_BayerGR2RGB_EA
=
COLOR_BayerGB2BGR_EA
,
//! Demosaicing with alpha channel
COLOR_BayerBG2BGRA
=
139
,
COLOR_BayerGB2BGRA
=
140
,
COLOR_BayerRG2BGRA
=
141
,
COLOR_BayerGR2BGRA
=
142
,
COLOR_BayerBG2RGBA
=
COLOR_BayerRG2BGRA
,
COLOR_BayerGB2RGBA
=
COLOR_BayerGR2BGRA
,
COLOR_BayerRG2RGBA
=
COLOR_BayerBG2BGRA
,
COLOR_BayerGR2RGBA
=
COLOR_BayerGB2BGRA
,
COLOR_COLORCVT_MAX
=
143
};
#
endregion
#
region
结构体
// 图像信息
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemImage
{
public
IntPtr
vpImage
;
// 地址
public
int
iWidth
;
// 图像内存 x 方向大小
public
int
iHeight
;
// 图像内存 y 方向大小
public
int
iDepth
;
// 图像位深度(详见说明)
public
int
iChannels
;
// 图像通道数
}
// 矩形定义
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemRect
{
public
int
iXs
;
// 起始点(左上角) x 坐标
public
int
iYs
;
// 起始点(左上角) y 坐标
public
int
iWidth
;
// x 方向大小(宽度)
public
int
iHeight
;
// y 方向大小(高度)
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemRect2
{
int
iXs
;
// 起始点(左上角) x 坐标
int
iYs
;
// 起始点(左上角) y 坐标
int
iXe
;
// 端点(右下) x 坐标
int
iYe
;
// 端点(右下) y 坐标
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemRect3
{
public
int
iXs
;
// 起始点(左上角) x 坐标
public
int
iYs
;
// 起始点(左上角) y 坐标
public
int
iWidth
;
// x 方向大小(宽度)
public
int
iHeight
;
// y 方向大小(高度)
public
double
dVar
;
// 某种可能会使用的值
}
///////////////////////////////////////////////////////////////////////////////
// Orthogonal Coordinate System
/////////////////////
// int type
//
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsIXY
{
int
iX
;
// X坐标
int
iY
;
// Y坐标
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsIXYZ
{
int
iX
;
// X坐标
int
iY
;
// Y坐标
int
iZ
;
// Z坐标
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsIXYQ
{
int
iX
;
// X坐标
int
iY
;
// Y坐标
int
iQ
;
// θ
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsIXYR
// 用于表示圆
{
int
iX
;
// X坐标
int
iY
;
// Y坐标
int
iR
;
// 半径
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsIABC
// 用于表示直线(一般形式)
{
int
iA
;
// a
int
iB
;
// b
int
iC
;
// c
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsIRQ
// 用于表示直线(黑森标准形式)或矢量
{
int
iR
;
// ρ
int
iQ
;
// θ
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsIXYQS
{
int
iX
;
// X坐标(单位:像素)
int
iY
;
// Y坐标(单位:像素)
int
iQ
;
// 斜率(単位:rad)
int
iS
;
// 刻度
}
/////////////////////
// float type
//
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsFXY
{
float
fX
;
// X坐标
float
fY
;
// Y坐标
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsFXYZ
{
float
fX
;
// X坐标
float
fY
;
// Y坐标
float
fZ
;
// Z坐标
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsFXYQ
{
float
fX
;
// X坐标
float
fY
;
// Y坐标
float
fQ
;
// θ
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsFXYR
// 用于表示圆
{
float
fX
;
// X坐标
float
fY
;
// Y坐标
float
fR
;
// 半径
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsFABC
// 用于表示直线(一般形式)
{
float
fA
;
// a
float
fB
;
// b
float
fC
;
// c
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsFRQ
// 用于表示直线(黑森标准形式)或矢量
{
float
fR
;
// ρ
float
fQ
;
// θ
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsFXYQS
{
float
fX
;
// X坐标(単位:像素)
float
fY
;
// Y坐标(単位:像素)
float
fQ
;
// 斜率(単位:rad)
float
fS
;
// 刻度
}
/////////////////////
// double type
//
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsDXY
{
public
double
dX
;
// X坐标
public
double
dY
;
// Y坐标
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsDXYZ
{
double
dX
;
// X坐标
double
dY
;
// Y坐标
double
dZ
;
// Z坐标
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsDXYQ
{
double
dX
;
// X坐标
double
dY
;
// Y坐标
double
dQ
;
// θ
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsDXYR
// 用于表示圆
{
double
dX
;
// 中心的X坐标
double
dY
;
// 中心的Y坐标
double
dR
;
// 半径
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsDABC
// 直线(一般形)的表现形式
{
double
dA
;
// a
double
dB
;
// b
double
dC
;
// c
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsDRQ
// 直線(ヘッセの標準形)やベクトルの表現に使用
{
double
dR
;
// ρ
double
dQ
;
// θ
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsDXYQS
{
double
dX
;
// X座標
double
dY
;
// Y座標
double
dQ
;
// 回転角(単位:rad)
double
dS
;
// スケール
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsDABCD
// 平面(一般形)の表現に使用
{
double
dA
;
// a
double
dB
;
// b
double
dC
;
// c
double
dD
;
// d
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsDXYLSQ
// 楕円の表現に使用
{
double
dXo
;
// 中心のX座標
double
dYo
;
// 中心のY座標
double
dL
;
// 長軸半径
double
dS
;
// 短軸半径
double
dQ
;
// 長軸の傾き(単位:rad)
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsDPV
// 3次元空間内の直線の表現に使用
{
EyemOcsDXYZ
tP
;
// 直線上の1点の座標
EyemOcsDXYZ
tV
;
// 直線の方向ベクトル
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemOcsDCRUVW
// 楕円体の表現に使用
{
EyemOcsDXYZ
tC
;
// 楕円体の中心
EyemOcsDXYZ
tR
;
// 軸の半径(dX:長軸, dY:中軸, dZ:短軸)
double
dU
;
// 長軸のXY平面への射影がX軸となす角(単位:rad)
double
dV
;
// 長軸のXY平面とのなす角(単位:rad)
double
dW
;
// 長軸まわりの回転角(単位:rad)
}
// Blob 分析结果
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemBinBlob
{
public
int
iLabel
;
// 标签
public
int
iArea
;
// 面积
public
double
dCenterX
;
// 重心x坐标
public
double
dCenterY
;
// 重心y坐标
public
int
iXs
,
iYs
,
iXe
,
iYe
;
// 外接矩形(始点,终点)
public
int
iWidth
,
iHeight
;
// 外接矩形(x 方向大小(宽度),y 方向大小(高度))
public
double
dTheta
;
// 主轴倾斜角(rad)
}
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemChainCode
{
int
iLabel
;
// 标签
double
dX
;
// x坐标
double
dY
;
// y坐标
double
dVx
,
dVy
;
// 向量
}
// 条码 解码结果
[
StructLayout
(
LayoutKind
.
Sequential
)]
public
struct
EyemBarCode
{
public
double
dAngle
;
// 角度
public
int
iCenterX
;
// x坐标
public
int
iCenterY
;
// y坐标
public
IntPtr
hType
;
// 码类型
public
IntPtr
hText
;
// 码内容
}
#
endregion
#
region
项目
//圆形mark点定位
[
DllImport
(
"eyemLib.dll"
,
CharSet
=
CharSet
.
None
,
CallingConvention
=
CallingConvention
.
Cdecl
)]
public
static
extern
int
eyemMarkerTracing
(
EyemImage
tpImage
,
double
dThreshold
,
ref
EyemOcsFXYR
tpCircle
,
bool
bHighAccuracy
=
false
);
#
endregion
#
region
通用
// Win32 memory copy function
[
DllImport
(
"ntdll.dll"
,
CallingConvention
=
CallingConvention
.
Cdecl
)]
private
static
extern
byte
*
memcpy
(
byte
*
dst
,
byte
*
src
,
int
count
);
//读取图像,支持彩色与多深度
[
DllImport
(
"eyemLib.dll"
,
CharSet
=
CharSet
.
None
,
CallingConvention
=
CallingConvention
.
Cdecl
)]
private
static
extern
int
eyemImageRead
(
string
filename
,
int
iFalgs
,
out
EyemImage
tpImage
);
//释放图像资源
[
DllImport
(
"eyemLib.dll"
,
CharSet
=
CharSet
.
None
,
CallingConvention
=
CallingConvention
.
Cdecl
)]
private
static
extern
void
eyemImageFree
(
ref
EyemImage
tpImage
);
#
endregion
//点料算法例程
public
static
void
eyeyTestTemplateModelMethod
(
string
fileName
)
{
EyemImage
image
;
EyemImage
tpDstImg
=
new
EyemImage
();
int
flag
=
eyemImageRead
(
fileName
,
-
1
,
out
image
);
if
(
flag
!=
0
)
{
Console
.
WriteLine
(
"读图失败!"
);
return
;
}
EyemOcsFXYR
tpCircle
=
new
EyemOcsFXYR
();
flag
=
eyemMarkerTracing
(
image
,
130
,
ref
tpCircle
);
//0 正常 -4未定位到
Bitmap
bitmap
=
eyemCvtToBitmap
(
tpDstImg
);
if
(
bitmap
!=
null
)
{
bitmap
.
Save
(
System
.
Windows
.
Forms
.
Application
.
StartupPath
+
"\\ResOut\\"
+
"文件名"
);
}
//free image
eyemImageFree
(
ref
tpDstImg
);
eyemImageFree
(
ref
image
);
}
#
region
EyemImage
与
Bitmap
相互转换
public
static
Bitmap
eyemCvtToBitmap
(
EyemImage
tpImage
)
{
if
(
tpImage
.
vpImage
==
IntPtr
.
Zero
||
tpImage
.
iDepth
!=
0
)
return
null
;
PixelFormat
format
;
switch
(
tpImage
.
iChannels
)
{
case
1
:
format
=
PixelFormat
.
Format8bppIndexed
;
break
;
case
3
:
format
=
PixelFormat
.
Format24bppRgb
;
break
;
case
4
:
format
=
PixelFormat
.
Format32bppArgb
;
break
;
default
:
return
null
;
}
Bitmap
bitmap
=
new
Bitmap
(
tpImage
.
iWidth
,
tpImage
.
iHeight
,
format
);
//对于输出灰度图像
if
(
format
==
PixelFormat
.
Format8bppIndexed
)
{
ColorPalette
palette
=
bitmap
.
Palette
;
for
(
int
i
=
0
;
i
<
256
;
i
++)
{
palette
.
Entries
[
i
]
=
Color
.
FromArgb
(
i
,
i
,
i
);
}
bitmap
.
Palette
=
palette
;
}
//锁定数据区
BitmapData
bd
=
bitmap
.
LockBits
(
new
Rectangle
(
0
,
0
,
tpImage
.
iWidth
,
tpImage
.
iHeight
),
ImageLockMode
.
WriteOnly
,
format
);
try
{
int
pd
=
((
tpImage
.
iWidth
*
tpImage
.
iChannels
)
+
3
)
/
4
*
4
;
long
bytesToCopy
=
tpImage
.
iWidth
*
tpImage
.
iChannels
;
for
(
int
y
=
0
;
y
<
tpImage
.
iHeight
;
y
++)
{
long
offsetSrc
=
(
y
*
tpImage
.
iWidth
*
tpImage
.
iChannels
);
long
offsetDst
=
(
y
*
pd
);
Buffer
.
MemoryCopy
((
byte
*)(
tpImage
.
vpImage
.
ToPointer
())
+
offsetSrc
,
(
byte
*)(
bd
.
Scan0
.
ToPointer
())
+
offsetDst
,
bytesToCopy
,
bytesToCopy
);
}
}
finally
{
bitmap
.
UnlockBits
(
bd
);
}
return
bitmap
;
}
public
static
EyemImage
eyemCvtToEyemImage
(
Bitmap
bitmap
)
{
EyemImage
tpImage
=
new
EyemImage
();
//锁定数据区
BitmapData
bd
=
bitmap
.
LockBits
(
new
Rectangle
(
0
,
0
,
bitmap
.
Width
,
bitmap
.
Height
),
ImageLockMode
.
ReadOnly
,
bitmap
.
PixelFormat
);
switch
(
bitmap
.
PixelFormat
)
{
case
PixelFormat
.
Format8bppIndexed
:
tpImage
.
iChannels
=
1
;
break
;
case
PixelFormat
.
Format24bppRgb
:
tpImage
.
iChannels
=
3
;
break
;
case
PixelFormat
.
Format32bppArgb
:
tpImage
.
iChannels
=
4
;
break
;
default
:
throw
new
Exception
(
"Image formats are not supported"
);
}
//仅支持8位
tpImage
.
iDepth
=
0
;
//图像尺寸
tpImage
.
iWidth
=
bitmap
.
Width
;
tpImage
.
iHeight
=
bitmap
.
Height
;
//分配内存(释放不是用eyemImageFree,用Marshal.FreeHGlobal(tpImage.vpImage))
tpImage
.
vpImage
=
Marshal
.
AllocHGlobal
(
bd
.
Stride
*
bd
.
Height
);
try
{
int
pd
=
((
tpImage
.
iWidth
*
tpImage
.
iChannels
)
+
3
)
/
4
*
4
;
long
bytesToCopy
=
tpImage
.
iWidth
*
tpImage
.
iChannels
;
for
(
int
y
=
0
;
y
<
tpImage
.
iHeight
;
y
++)
{
long
offsetSrc
=
y
*
pd
;
long
offsetDst
=
y
*
tpImage
.
iWidth
*
tpImage
.
iChannels
;
Buffer
.
MemoryCopy
((
byte
*)(
bd
.
Scan0
.
ToPointer
())
+
offsetSrc
,
(
byte
*)(
tpImage
.
vpImage
.
ToPointer
())
+
offsetDst
,
bytesToCopy
,
bytesToCopy
);
}
}
finally
{
bitmap
.
UnlockBits
(
bd
);
}
return
tpImage
;
}
#
endregion
}
}
source/LoadCVSLibrary/position/DrawerPosition.cs
0 → 100644
查看文件 @
0ac004a
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
OnlineStore.LoadCSVLibrary
{
/// <summary>
/// 抽屉配置信息
/// </summary>
public
class
DrawerPosition
:
PositionBase
{
/// <summary>
/// 对应的料仓ID(流水线料仓需要用此字段区分哪个BOX)
/// </summary>
[
CSVAttribute
(
"料仓ID"
)]
public
int
StoreId
{
get
;
set
;
}
/// <summary>
/// X坐标
/// </summary>
[
CSVAttribute
(
"X坐标"
)]
public
double
X
{
get
;
set
;
}
/// <summary>
/// Y坐标
/// </summary>
[
CSVAttribute
(
"Y坐标"
)]
public
double
Y
{
get
;
set
;
}
/// <summary>
/// X方向误差范围
/// </summary>
[
CSVAttribute
(
"X方向误差范围"
)]
public
string
X_Error
{
get
;
set
;
}
/// <summary>
/// Y方向误差范围
/// </summary>
[
CSVAttribute
(
"Y方向误差范围"
)]
public
string
Y_Error
{
get
;
set
;
}
}
}
source/LoadCVSLibrary/storeConfig/config/BoxEquip_Config.cs
查看文件 @
0ac004a
...
...
@@ -71,6 +71,46 @@ namespace OnlineStore.LoadCSVLibrary
[
ConfigProAttribute
(
"ComAxis_B"
)]
public
ConfigMoveAxis
ComAxis_B
{
get
;
set
;
}
#
endregion
/// <summary>
/// 抽屉Mark_X坐标
/// </summary>
[
ConfigProAttribute
(
"Drawer_X"
)]
public
double
Drawer_X
{
get
;
set
;
}
/// <summary>
/// 抽屉Mark_Y坐标
/// </summary>
[
ConfigProAttribute
(
"Drawer_Y"
)]
public
double
Drawer_Y
{
get
;
set
;
}
/// <summary>
/// 抽屉Mark_X方向误差范围
/// </summary>
[
ConfigProAttribute
(
"Drawer_X_Error"
)]
public
string
Drawer_X_Error
{
get
;
set
;
}
/// <summary>
/// 抽屉Mark_Y方向误差范围
/// </summary>
[
ConfigProAttribute
(
"Drawer_Y_Error"
)]
public
string
Drawer_Y_Error
{
get
;
set
;
}
/// <summary>
/// 抽屉行间距
/// </summary>
[
ConfigProAttribute
(
"Row_Spacing"
)]
public
int
Row_Spacing
{
get
;
set
;
}
/// <summary>
/// 抽屉列间距
/// </summary>
[
ConfigProAttribute
(
"Column_Spacing"
)]
public
int
Column_Spacing
{
get
;
set
;
}
/// <summary>
/// 抽屉行数
/// </summary>
[
ConfigProAttribute
(
"Drawer_Rows"
)]
public
int
Drawer_Rows
{
get
;
set
;
}
/// <summary>
/// 抽屉列数
/// </summary>
[
ConfigProAttribute
(
"Drawer_Columns"
)]
public
int
Drawer_Columns
{
get
;
set
;
}
/// <summary>
/// PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,,,,,,,,
...
...
source/XLRStoreClient/App.config
查看文件 @
0ac004a
...
...
@@ -20,6 +20,7 @@
<
add
key
=
"ConfigPath_Input"
value
=
"\Config\Config_InputEquip.csv"
/>
<
add
key
=
"ConfigPath_Box"
value
=
"\Config\Config_BoxEquip.csv"
/>
<
add
key
=
"ConfigPath_BoxPosition"
value
=
"\Config\linePositions.csv"
/>
<
add
key
=
"ConfigPath_DrawerPosition"
value
=
"\Config\DrawerPosition.csv"
/>
<
add
key
=
"ConfigPath_TrayList"
value
=
"\LineConfig\TrayList.data"
/>
<
add
key
=
"Line_CID"
value
=
"so827"
/>
<!--
end
one
store
config
-->
...
...
source/XLRStoreClient/FrmXLRStore.Designer.cs
查看文件 @
0ac004a
...
...
@@ -137,7 +137,7 @@
this
.
tabPage2
.
Controls
.
Add
(
this
.
panel1
);
this
.
tabPage2
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
29
);
this
.
tabPage2
.
Name
=
"tabPage2"
;
this
.
tabPage2
.
Size
=
new
System
.
Drawing
.
Size
(
192
,
67
);
this
.
tabPage2
.
Size
=
new
System
.
Drawing
.
Size
(
988
,
605
);
this
.
tabPage2
.
TabIndex
=
1
;
this
.
tabPage2
.
Text
=
" 设备状态 "
;
this
.
tabPage2
.
UseVisualStyleBackColor
=
true
;
...
...
@@ -148,7 +148,7 @@
this
.
panel1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
panel1
.
Name
=
"panel1"
;
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
192
,
67
);
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
988
,
605
);
this
.
panel1
.
TabIndex
=
1
;
//
// tableLayoutPanel1
...
...
@@ -173,7 +173,7 @@
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
14.28571F
));
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
19.04762F
));
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
19.04762F
));
this
.
tableLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
192
,
67
);
this
.
tableLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
988
,
605
);
this
.
tableLayoutPanel1
.
TabIndex
=
0
;
//
// InputControl
...
...
@@ -184,10 +184,10 @@
this
.
tableLayoutPanel1
.
SetColumnSpan
(
this
.
InputControl
,
2
);
this
.
InputControl
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
InputControl
.
EquipText
=
"上料机构"
;
this
.
InputControl
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
43
);
this
.
InputControl
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
376
);
this
.
InputControl
.
MoveInfo
=
"暂无出入库"
;
this
.
InputControl
.
Name
=
"InputControl"
;
this
.
InputControl
.
Size
=
new
System
.
Drawing
.
Size
(
186
,
6
);
this
.
InputControl
.
Size
=
new
System
.
Drawing
.
Size
(
982
,
109
);
this
.
InputControl
.
TabIndex
=
5
;
this
.
InputControl
.
WorkStatus
=
"暂未启动"
;
//
...
...
@@ -197,10 +197,10 @@
this
.
ReelControlA1
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
FixedSingle
;
this
.
ReelControlA1
.
ColorStatus
=
System
.
Drawing
.
Color
.
White
;
this
.
ReelControlA1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
ReelControlA1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
2
5
);
this
.
ReelControlA1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
2
04
);
this
.
ReelControlA1
.
Name
=
"ReelControlA1"
;
this
.
ReelControlA1
.
ReelText
=
"暂存区物料"
;
this
.
ReelControlA1
.
Size
=
new
System
.
Drawing
.
Size
(
90
,
3
);
this
.
ReelControlA1
.
Size
=
new
System
.
Drawing
.
Size
(
488
,
80
);
this
.
ReelControlA1
.
TabIndex
=
0
;
//
// ReelControlA2
...
...
@@ -209,10 +209,10 @@
this
.
ReelControlA2
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
FixedSingle
;
this
.
ReelControlA2
.
ColorStatus
=
System
.
Drawing
.
Color
.
White
;
this
.
ReelControlA2
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
ReelControlA2
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
34
);
this
.
ReelControlA2
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
290
);
this
.
ReelControlA2
.
Name
=
"ReelControlA2"
;
this
.
ReelControlA2
.
ReelText
=
"暂存区物料"
;
this
.
ReelControlA2
.
Size
=
new
System
.
Drawing
.
Size
(
90
,
3
);
this
.
ReelControlA2
.
Size
=
new
System
.
Drawing
.
Size
(
488
,
80
);
this
.
ReelControlA2
.
TabIndex
=
1
;
//
// ReelControlB1
...
...
@@ -221,10 +221,10 @@
this
.
ReelControlB1
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
FixedSingle
;
this
.
ReelControlB1
.
ColorStatus
=
System
.
Drawing
.
Color
.
White
;
this
.
ReelControlB1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
ReelControlB1
.
Location
=
new
System
.
Drawing
.
Point
(
99
,
25
);
this
.
ReelControlB1
.
Location
=
new
System
.
Drawing
.
Point
(
497
,
204
);
this
.
ReelControlB1
.
Name
=
"ReelControlB1"
;
this
.
ReelControlB1
.
ReelText
=
"暂存区物料"
;
this
.
ReelControlB1
.
Size
=
new
System
.
Drawing
.
Size
(
90
,
3
);
this
.
ReelControlB1
.
Size
=
new
System
.
Drawing
.
Size
(
488
,
80
);
this
.
ReelControlB1
.
TabIndex
=
2
;
//
// ReelControlB2
...
...
@@ -233,10 +233,10 @@
this
.
ReelControlB2
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
FixedSingle
;
this
.
ReelControlB2
.
ColorStatus
=
System
.
Drawing
.
Color
.
White
;
this
.
ReelControlB2
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
ReelControlB2
.
Location
=
new
System
.
Drawing
.
Point
(
99
,
34
);
this
.
ReelControlB2
.
Location
=
new
System
.
Drawing
.
Point
(
497
,
290
);
this
.
ReelControlB2
.
Name
=
"ReelControlB2"
;
this
.
ReelControlB2
.
ReelText
=
"暂存区物料"
;
this
.
ReelControlB2
.
Size
=
new
System
.
Drawing
.
Size
(
90
,
3
);
this
.
ReelControlB2
.
Size
=
new
System
.
Drawing
.
Size
(
488
,
80
);
this
.
ReelControlB2
.
TabIndex
=
3
;
//
// BoxControl
...
...
@@ -250,7 +250,7 @@
this
.
BoxControl
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
BoxControl
.
MoveInfo
=
"暂无出入库"
;
this
.
BoxControl
.
Name
=
"BoxControl"
;
this
.
BoxControl
.
Size
=
new
System
.
Drawing
.
Size
(
186
,
16
);
this
.
BoxControl
.
Size
=
new
System
.
Drawing
.
Size
(
982
,
195
);
this
.
BoxControl
.
TabIndex
=
4
;
this
.
BoxControl
.
WorkStatus
=
"暂未启动"
;
//
...
...
@@ -261,10 +261,10 @@
this
.
ShelfAControl
.
ColorStatus
=
System
.
Drawing
.
Color
.
White
;
this
.
ShelfAControl
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
ShelfAControl
.
EquipText
=
"A料口"
;
this
.
ShelfAControl
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
55
);
this
.
ShelfAControl
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
491
);
this
.
ShelfAControl
.
MoveInfo
=
"暂无出入库"
;
this
.
ShelfAControl
.
Name
=
"ShelfAControl"
;
this
.
ShelfAControl
.
Size
=
new
System
.
Drawing
.
Size
(
90
,
9
);
this
.
ShelfAControl
.
Size
=
new
System
.
Drawing
.
Size
(
488
,
111
);
this
.
ShelfAControl
.
TabIndex
=
6
;
this
.
ShelfAControl
.
WorkStatus
=
"暂未启动"
;
//
...
...
@@ -275,10 +275,10 @@
this
.
ShelfBControl
.
ColorStatus
=
System
.
Drawing
.
Color
.
White
;
this
.
ShelfBControl
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
ShelfBControl
.
EquipText
=
"B料口"
;
this
.
ShelfBControl
.
Location
=
new
System
.
Drawing
.
Point
(
99
,
55
);
this
.
ShelfBControl
.
Location
=
new
System
.
Drawing
.
Point
(
497
,
491
);
this
.
ShelfBControl
.
MoveInfo
=
"暂无出入库"
;
this
.
ShelfBControl
.
Name
=
"ShelfBControl"
;
this
.
ShelfBControl
.
Size
=
new
System
.
Drawing
.
Size
(
90
,
9
);
this
.
ShelfBControl
.
Size
=
new
System
.
Drawing
.
Size
(
488
,
111
);
this
.
ShelfBControl
.
TabIndex
=
7
;
this
.
ShelfBControl
.
WorkStatus
=
"暂未启动"
;
//
...
...
source/XLRStoreClient/XLRStore.csproj
查看文件 @
0ac004a
...
...
@@ -89,6 +89,12 @@
<Reference Include="XLRStore, Version=1.0.7818.19677, Culture=neutral, PublicKeyToken=null" />
</ItemGroup>
<ItemGroup>
<Compile Include="boxForm\FrmAutoFindPos.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="boxForm\FrmAutoFindPos.Designer.cs">
<DependentUpon>FrmAutoFindPos.cs</DependentUpon>
</Compile>
<Compile Include="boxForm\FrmAxisMove.cs">
<SubType>Form</SubType>
</Compile>
...
...
@@ -182,6 +188,9 @@
<Compile Include="useControl\EquipControl.Designer.cs">
<DependentUpon>EquipControl.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="boxForm\FrmAutoFindPos.resx">
<DependentUpon>FrmAutoFindPos.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="boxForm\FrmAxisMove.resx">
<DependentUpon>FrmAxisMove.cs</DependentUpon>
</EmbeddedResource>
...
...
source/XLRStoreClient/boxForm/FrmAutoFindPos.Designer.cs
0 → 100644
查看文件 @
0ac004a
namespace
OnlineStore.XLRStore
{
partial
class
FrmAutoFindPos
{
/// <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
.
SuspendLayout
();
//
// FrmAutoFindPos
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
17F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
800
,
450
);
this
.
Name
=
"FrmAutoFindPos"
;
this
.
Text
=
"自动对位"
;
this
.
ResumeLayout
(
false
);
}
#
endregion
}
}
\ No newline at end of file
source/XLRStoreClient/boxForm/FrmAutoFindPos.cs
0 → 100644
查看文件 @
0ac004a
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
{
internal
partial
class
FrmAutoFindPos
:
FrmBase
{
internal
FrmAutoFindPos
()
{
InitializeComponent
();
}
}
}
source/XLRStoreClient/boxForm/FrmAutoFindPos.resx
0 → 100644
查看文件 @
0ac004a
<?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
source/XLRStoreClient/boxForm/FrmAxisMove.Designer.cs
查看文件 @
0ac004a
此文件的差异太大,无法显示。
source/XLRStoreClient/boxForm/FrmAxisMove.cs
查看文件 @
0ac004a
...
...
@@ -642,5 +642,38 @@ namespace OnlineStore.XLRStore
}
}
}
private
void
btnToPosPage_Click
(
object
sender
,
EventArgs
e
)
{
tabControl1
.
SelectedIndex
=
0
;
}
private
void
btnToReelPage_Click
(
object
sender
,
EventArgs
e
)
{
tabControl1
.
SelectedIndex
=
1
;
}
private
void
btnToSigPage_Click
(
object
sender
,
EventArgs
e
)
{
tabControl1
.
SelectedIndex
=
2
;
}
private
void
button1_Click
(
object
sender
,
EventArgs
e
)
{
tabControl1
.
SelectedIndex
=
0
;
tabControl2
.
SelectedIndex
=
0
;
}
private
void
button2_Click
(
object
sender
,
EventArgs
e
)
{
tabControl1
.
SelectedIndex
=
0
;
tabControl2
.
SelectedIndex
=
1
;
}
private
void
button3_Click
(
object
sender
,
EventArgs
e
)
{
tabControl1
.
SelectedIndex
=
0
;
tabControl2
.
SelectedIndex
=
2
;
}
}
}
source/XLRStoreClient/boxForm/FrmBoxEquip.cs
查看文件 @
0ac004a
...
...
@@ -40,6 +40,7 @@ namespace OnlineStore.XLRStore
lblName
.
Text
=
boxBean
.
Name
;
this
.
Text
=
boxBean
.
Name
;
chbDebug
.
Checked
=
boxBean
.
IsDebug
;
IsLoad
=
true
;
}
protected
Dictionary
<
string
,
IOTextControl
>
DIControlList
=
new
Dictionary
<
string
,
IOTextControl
>();
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论