Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
AutoCountMachine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit fa81c6e7
由
刘韬
编写于
2020-12-01 10:18:38 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
出料防撞检测,平板出错检测
1 个父辈
dbedd0e8
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
21 个修改的文件
包含
242 行增加
和
88 行删除
RC1266-AutoCountMachine/source/AutoCountClient/App.config
RC1266-AutoCountMachine/source/AutoCountClient/AutoCountClient.csproj
RC1266-AutoCountMachine/source/AutoCountClient/FrmComponentList.cs
RC1266-AutoCountMachine/source/AutoCountClient/FrmLearning.Designer.cs
RC1266-AutoCountMachine/source/AutoCountClient/FrmLearning.cs
RC1266-AutoCountMachine/source/AutoCountClient/FrmRobotMain.Designer.cs
RC1266-AutoCountMachine/source/AutoCountClient/FrmRobotMain.cs
RC1266-AutoCountMachine/source/AutoCountClient/FrmXRay.cs
RC1266-AutoCountMachine/source/CodeLibrary/camera/HIK.cs
RC1266-AutoCountMachine/source/DeviceLibrary/DeviceLibrary.csproj
RC1266-AutoCountMachine/source/DeviceLibrary/bean/BatchMoveBean.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/BatchMoveBean_Partial.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/InputEquip.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/InputEquip_InStore.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/OutputEquip_Partial.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/OutputEquip_Shelf.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/RobotBean.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip_Partial.cs
RC1266-AutoCountMachine/source/DeviceLibrary/manager/ParamManager.cs
RC1266-AutoCountMachine/source/DeviceLibrary/model/AxisBean.cs
RC1266-AutoCountMachine/source/AutoCountClient/App.config
查看文件 @
fa81c6e
...
@@ -14,13 +14,13 @@
...
@@ -14,13 +14,13 @@
<
add
key
=
"ConfigPath_XRay"
value
=
"\RobotConfig\Config_XRay.csv"
/>
<
add
key
=
"ConfigPath_XRay"
value
=
"\RobotConfig\Config_XRay.csv"
/>
<
add
key
=
"ConfigPath_InputEquip"
value
=
"\RobotConfig\Config_InputEquip.csv"
/>
<
add
key
=
"ConfigPath_InputEquip"
value
=
"\RobotConfig\Config_InputEquip.csv"
/>
<
add
key
=
"ConfigPath_OutputEquip"
value
=
"\RobotConfig\Config_OutputEquip.csv"
/>
<
add
key
=
"ConfigPath_OutputEquip"
value
=
"\RobotConfig\Config_OutputEquip.csv"
/>
<
add
key
=
"CounParamConfig"
value
=
"\XRAY\countParam.csv"
/>
<!--二维码类型列表配置,用
#分割,一维码=Barcode 二维码: QR Code#Data Matrix ECC 200#Micro QR Code-->
<!--二维码类型列表配置,用
#分割,一维码=Barcode 二维码: QR Code#Data Matrix ECC 200#Micro QR Code-->
<
add
key
=
"CodeType"
value
=
"Data Matrix ECC 200#QR Code"
/>
<
add
key
=
"CodeType"
value
=
"Data Matrix ECC 200#QR Code"
/>
<!--<
add
key
=
"CodeType"
value
=
"Data Matrix ECC 200"
/>-->
<!--<
add
key
=
"CodeType"
value
=
"Data Matrix ECC 200"
/>-->
<
add
key
=
"ACBaudRate"
value
=
"115200"
/>
<
add
key
=
"ACBaudRate"
value
=
"115200"
/>
<!--二维码参数文件所在路径,文件名与二维码类型名一样-->
<!--二维码参数文件所在路径,文件名与二维码类型名一样-->
<
add
key
=
"CodeParamPath"
value
=
"\CodeParam\"
/>
<
add
key
=
"CodeParamPath"
value
=
"\CodeParam\
\XRAY\countParam.csv
"
/>
<
add
key
=
"Config_Pwd"
value
=
"123456"
/>
<
add
key
=
"Config_Pwd"
value
=
"123456"
/>
<
add
key
=
"UseAIOBOX"
value
=
"1"
/>
<
add
key
=
"UseAIOBOX"
value
=
"1"
/>
...
...
RC1266-AutoCountMachine/source/AutoCountClient/AutoCountClient.csproj
查看文件 @
fa81c6e
...
@@ -61,10 +61,6 @@
...
@@ -61,10 +61,6 @@
<Reference Include="AccImageBox">
<Reference Include="AccImageBox">
<HintPath>..\..\dll\AccImageBox.dll</HintPath>
<HintPath>..\..\dll\AccImageBox.dll</HintPath>
</Reference>
</Reference>
<Reference Include="Asa.CarerayImage, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\dll\X-Ray\Asa.CarerayImage.dll</HintPath>
</Reference>
<Reference Include="Asa.PrintLabel">
<Reference Include="Asa.PrintLabel">
<HintPath>..\..\dll\label\Asa.PrintLabel.dll</HintPath>
<HintPath>..\..\dll\label\Asa.PrintLabel.dll</HintPath>
</Reference>
</Reference>
...
...
RC1266-AutoCountMachine/source/AutoCountClient/FrmComponentList.cs
查看文件 @
fa81c6e
...
@@ -12,6 +12,7 @@ using System.IO;
...
@@ -12,6 +12,7 @@ using System.IO;
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.Common
;
using
OnlineStore.Common
;
using
OnlineStore.DeviceLibrary
;
using
OnlineStore.DeviceLibrary
;
using
static
OnlineStore
.
DeviceLibrary
.
CountParam
;
namespace
OnlineStore.AutoCountClient
namespace
OnlineStore.AutoCountClient
{
{
...
@@ -96,7 +97,9 @@ namespace OnlineStore.AutoCountClient
...
@@ -96,7 +97,9 @@ namespace OnlineStore.AutoCountClient
if
(
obj
.
Sufan
>=
0
)
if
(
obj
.
Sufan
>=
0
)
{
{
ParamManager
.
UpdateParam
(
new
CountParam
(
obj
.
PartNum
,
RobotManager
.
robot
.
XrayBean
.
ThresholdValue
,
3
,
obj
.
Sufan
));
var
suanfa
=
SignType
.
AUTO
;
Enum
.
TryParse
<
SignType
>(
obj
.
Sufan
.
ToString
(),
out
suanfa
);
ParamManager
.
UpdateParam
(
new
CountParam
(
obj
.
PartNum
,
RobotManager
.
robot
.
XrayBean
.
ThresholdValue
,
3
,
suanfa
));
ParamManager
.
SaveMapToFile
();
ParamManager
.
SaveMapToFile
();
}
}
}
}
...
@@ -134,7 +137,9 @@ namespace OnlineStore.AutoCountClient
...
@@ -134,7 +137,9 @@ namespace OnlineStore.AutoCountClient
groupInfo
.
Text
=
"元器件【"
+
obj
.
PartNum
+
"】的基本信息"
;
groupInfo
.
Text
=
"元器件【"
+
obj
.
PartNum
+
"】的基本信息"
;
if
(
obj
.
Sufan
>=
0
)
if
(
obj
.
Sufan
>=
0
)
{
{
ParamManager
.
UpdateParam
(
new
CountParam
(
obj
.
PartNum
,
RobotManager
.
robot
.
XrayBean
.
ThresholdValue
,
3
,
obj
.
Sufan
));
var
suanfa
=
SignType
.
AUTO
;
Enum
.
TryParse
<
SignType
>(
obj
.
Sufan
.
ToString
(),
out
suanfa
);
ParamManager
.
UpdateParam
(
new
CountParam
(
obj
.
PartNum
,
RobotManager
.
robot
.
XrayBean
.
ThresholdValue
,
3
,
suanfa
));
ParamManager
.
SaveMapToFile
();
ParamManager
.
SaveMapToFile
();
}
}
}
}
...
@@ -387,7 +392,7 @@ namespace OnlineStore.AutoCountClient
...
@@ -387,7 +392,7 @@ namespace OnlineStore.AutoCountClient
CountParam
param
=
ParamManager
.
GetParamByPN
(
com
.
PartNum
);
CountParam
param
=
ParamManager
.
GetParamByPN
(
com
.
PartNum
);
if
(
param
!=
null
)
if
(
param
!=
null
)
{
{
com
.
Sufan
=
param
.
Sign
;
com
.
Sufan
=
(
int
)
param
.
Sign
;
}
}
else
else
{
{
...
...
RC1266-AutoCountMachine/source/AutoCountClient/FrmLearning.Designer.cs
查看文件 @
fa81c6e
此文件的差异被折叠,
点击展开。
RC1266-AutoCountMachine/source/AutoCountClient/FrmLearning.cs
查看文件 @
fa81c6e
此文件的差异被折叠,
点击展开。
RC1266-AutoCountMachine/source/AutoCountClient/FrmRobotMain.Designer.cs
查看文件 @
fa81c6e
...
@@ -58,6 +58,8 @@
...
@@ -58,6 +58,8 @@
this
.
toolStripSeparator2
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripSeparator2
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
设置
TToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
设置
TToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
元器件学习
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
元器件学习
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
批量
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
单盘
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator17
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripSeparator17
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
二维码学习
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
二维码学习
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator7
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripSeparator7
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
...
@@ -361,11 +363,28 @@
...
@@ -361,11 +363,28 @@
//
//
// 元器件学习ToolStripMenuItem
// 元器件学习ToolStripMenuItem
//
//
this
.
元器件学习
ToolStripMenuItem
.
DropDownItems
.
AddRange
(
new
System
.
Windows
.
Forms
.
ToolStripItem
[]
{
this
.
批量
ToolStripMenuItem
,
this
.
单盘
ToolStripMenuItem
});
this
.
元器件学习
ToolStripMenuItem
.
Name
=
"元器件学习ToolStripMenuItem"
;
this
.
元器件学习
ToolStripMenuItem
.
Name
=
"元器件学习ToolStripMenuItem"
;
this
.
元器件学习
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
180
,
26
);
this
.
元器件学习
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
180
,
26
);
this
.
元器件学习
ToolStripMenuItem
.
Text
=
"元器件学习"
;
this
.
元器件学习
ToolStripMenuItem
.
Text
=
"元器件学习"
;
this
.
元器件学习
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
元器件学习
ToolStripMenuItem_Click
);
this
.
元器件学习
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
元器件学习
ToolStripMenuItem_Click
);
//
//
// 批量ToolStripMenuItem
//
this
.
批量
ToolStripMenuItem
.
Name
=
"批量ToolStripMenuItem"
;
this
.
批量
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
112
,
26
);
this
.
批量
ToolStripMenuItem
.
Text
=
"批量"
;
this
.
批量
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
批量
ToolStripMenuItem_Click
);
//
// 单盘ToolStripMenuItem
//
this
.
单盘
ToolStripMenuItem
.
Name
=
"单盘ToolStripMenuItem"
;
this
.
单盘
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
112
,
26
);
this
.
单盘
ToolStripMenuItem
.
Text
=
"单盘"
;
this
.
单盘
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
单盘
ToolStripMenuItem_Click
);
//
// toolStripSeparator17
// toolStripSeparator17
//
//
this
.
toolStripSeparator17
.
Name
=
"toolStripSeparator17"
;
this
.
toolStripSeparator17
.
Name
=
"toolStripSeparator17"
;
...
@@ -388,12 +407,14 @@
...
@@ -388,12 +407,14 @@
this
.
toolStripMenuItem2
.
Name
=
"toolStripMenuItem2"
;
this
.
toolStripMenuItem2
.
Name
=
"toolStripMenuItem2"
;
this
.
toolStripMenuItem2
.
Size
=
new
System
.
Drawing
.
Size
(
180
,
26
);
this
.
toolStripMenuItem2
.
Size
=
new
System
.
Drawing
.
Size
(
180
,
26
);
this
.
toolStripMenuItem2
.
Text
=
"AGV调试"
;
this
.
toolStripMenuItem2
.
Text
=
"AGV调试"
;
this
.
toolStripMenuItem2
.
Visible
=
false
;
this
.
toolStripMenuItem2
.
Click
+=
new
System
.
EventHandler
(
this
.
toolStripMenuItem2_Click
);
this
.
toolStripMenuItem2
.
Click
+=
new
System
.
EventHandler
(
this
.
toolStripMenuItem2_Click
);
//
//
// toolStripSeparator6
// toolStripSeparator6
//
//
this
.
toolStripSeparator6
.
Name
=
"toolStripSeparator6"
;
this
.
toolStripSeparator6
.
Name
=
"toolStripSeparator6"
;
this
.
toolStripSeparator6
.
Size
=
new
System
.
Drawing
.
Size
(
177
,
6
);
this
.
toolStripSeparator6
.
Size
=
new
System
.
Drawing
.
Size
(
177
,
6
);
this
.
toolStripSeparator6
.
Visible
=
false
;
//
//
// 标签编辑ToolStripMenuItem
// 标签编辑ToolStripMenuItem
//
//
...
@@ -421,55 +442,57 @@
...
@@ -421,55 +442,57 @@
// toolStripMenuItem3
// toolStripMenuItem3
//
//
this
.
toolStripMenuItem3
.
Name
=
"toolStripMenuItem3"
;
this
.
toolStripMenuItem3
.
Name
=
"toolStripMenuItem3"
;
this
.
toolStripMenuItem3
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
toolStripMenuItem3
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
toolStripMenuItem3
.
Text
=
"历史记录"
;
this
.
toolStripMenuItem3
.
Text
=
"历史记录"
;
this
.
toolStripMenuItem3
.
Click
+=
new
System
.
EventHandler
(
this
.
toolStripMenuItem3_Click
);
this
.
toolStripMenuItem3
.
Click
+=
new
System
.
EventHandler
(
this
.
toolStripMenuItem3_Click
);
//
//
// toolStripSeparator5
// toolStripSeparator5
//
//
this
.
toolStripSeparator5
.
Name
=
"toolStripSeparator5"
;
this
.
toolStripSeparator5
.
Name
=
"toolStripSeparator5"
;
this
.
toolStripSeparator5
.
Size
=
new
System
.
Drawing
.
Size
(
1
41
,
6
);
this
.
toolStripSeparator5
.
Size
=
new
System
.
Drawing
.
Size
(
1
77
,
6
);
//
//
// 元器件库ToolStripMenuItem
// 元器件库ToolStripMenuItem
//
//
this
.
元器件库
ToolStripMenuItem
.
Name
=
"元器件库ToolStripMenuItem"
;
this
.
元器件库
ToolStripMenuItem
.
Name
=
"元器件库ToolStripMenuItem"
;
this
.
元器件库
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
元器件库
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
元器件库
ToolStripMenuItem
.
Text
=
"元器件库"
;
this
.
元器件库
ToolStripMenuItem
.
Text
=
"元器件库"
;
this
.
元器件库
ToolStripMenuItem
.
Visible
=
false
;
this
.
元器件库
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
元器件库
ToolStripMenuItem_Click
);
this
.
元器件库
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
元器件库
ToolStripMenuItem_Click
);
//
//
// toolStripSeparator16
// toolStripSeparator16
//
//
this
.
toolStripSeparator16
.
Name
=
"toolStripSeparator16"
;
this
.
toolStripSeparator16
.
Name
=
"toolStripSeparator16"
;
this
.
toolStripSeparator16
.
Size
=
new
System
.
Drawing
.
Size
(
141
,
6
);
this
.
toolStripSeparator16
.
Size
=
new
System
.
Drawing
.
Size
(
177
,
6
);
this
.
toolStripSeparator16
.
Visible
=
false
;
//
//
// 清空日志ToolStripMenuItem
// 清空日志ToolStripMenuItem
//
//
this
.
清空日志
ToolStripMenuItem
.
Name
=
"清空日志ToolStripMenuItem"
;
this
.
清空日志
ToolStripMenuItem
.
Name
=
"清空日志ToolStripMenuItem"
;
this
.
清空日志
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
清空日志
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
清空日志
ToolStripMenuItem
.
Text
=
"清空日志"
;
this
.
清空日志
ToolStripMenuItem
.
Text
=
"清空日志"
;
this
.
清空日志
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
清空日志
ToolStripMenuItem_Click
);
this
.
清空日志
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
清空日志
ToolStripMenuItem_Click
);
//
//
// toolStripSeparator10
// toolStripSeparator10
//
//
this
.
toolStripSeparator10
.
Name
=
"toolStripSeparator10"
;
this
.
toolStripSeparator10
.
Name
=
"toolStripSeparator10"
;
this
.
toolStripSeparator10
.
Size
=
new
System
.
Drawing
.
Size
(
1
41
,
6
);
this
.
toolStripSeparator10
.
Size
=
new
System
.
Drawing
.
Size
(
1
77
,
6
);
//
//
// 复制日志ToolStripMenuItem
// 复制日志ToolStripMenuItem
//
//
this
.
复制日志
ToolStripMenuItem
.
Name
=
"复制日志ToolStripMenuItem"
;
this
.
复制日志
ToolStripMenuItem
.
Name
=
"复制日志ToolStripMenuItem"
;
this
.
复制日志
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
复制日志
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
复制日志
ToolStripMenuItem
.
Text
=
"复制日志"
;
this
.
复制日志
ToolStripMenuItem
.
Text
=
"复制日志"
;
this
.
复制日志
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
复制日志
ToolStripMenuItem_Click
);
this
.
复制日志
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
复制日志
ToolStripMenuItem_Click
);
//
//
// toolStripSeparator11
// toolStripSeparator11
//
//
this
.
toolStripSeparator11
.
Name
=
"toolStripSeparator11"
;
this
.
toolStripSeparator11
.
Name
=
"toolStripSeparator11"
;
this
.
toolStripSeparator11
.
Size
=
new
System
.
Drawing
.
Size
(
1
41
,
6
);
this
.
toolStripSeparator11
.
Size
=
new
System
.
Drawing
.
Size
(
1
77
,
6
);
//
//
// 版本号ToolStripMenuItem
// 版本号ToolStripMenuItem
//
//
this
.
版本号
ToolStripMenuItem
.
Name
=
"版本号ToolStripMenuItem"
;
this
.
版本号
ToolStripMenuItem
.
Name
=
"版本号ToolStripMenuItem"
;
this
.
版本号
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
版本号
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
版本号
ToolStripMenuItem
.
Text
=
"关于软件"
;
this
.
版本号
ToolStripMenuItem
.
Text
=
"关于软件"
;
this
.
版本号
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
版本号
ToolStripMenuItem_Click
);
this
.
版本号
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
版本号
ToolStripMenuItem_Click
);
//
//
...
@@ -535,7 +558,7 @@
...
@@ -535,7 +558,7 @@
//
//
this
.
aGVCancelStateToolStripMenuItem
.
Name
=
"aGVCancelStateToolStripMenuItem"
;
this
.
aGVCancelStateToolStripMenuItem
.
Name
=
"aGVCancelStateToolStripMenuItem"
;
this
.
aGVCancelStateToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
213
,
26
);
this
.
aGVCancelStateToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
213
,
26
);
this
.
aGVCancelStateToolStripMenuItem
.
Text
=
"
AGV cancelState
"
;
this
.
aGVCancelStateToolStripMenuItem
.
Text
=
"
禁用AGV
"
;
this
.
aGVCancelStateToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
aGVCancelStateToolStripMenuItem_Click
);
this
.
aGVCancelStateToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
aGVCancelStateToolStripMenuItem_Click
);
//
//
// toolStripSeparator13
// toolStripSeparator13
...
@@ -681,6 +704,8 @@
...
@@ -681,6 +704,8 @@
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator12
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator12
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator14
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator14
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
启用贴标功能
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
启用贴标功能
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
批量
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
单盘
ToolStripMenuItem
;
}
}
}
}
RC1266-AutoCountMachine/source/AutoCountClient/FrmRobotMain.cs
查看文件 @
fa81c6e
...
@@ -257,7 +257,8 @@ namespace OnlineStore.AutoCountClient
...
@@ -257,7 +257,8 @@ namespace OnlineStore.AutoCountClient
{
{
Camera
.
_cam
.
CloseAll
();
Camera
.
_cam
.
CloseAll
();
}
}
robot
.
sQLite
.
Close
();
if
(
robot
.
sQLite
!=
null
)
robot
.
sQLite
.
Close
();
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
@@ -486,7 +487,17 @@ namespace OnlineStore.AutoCountClient
...
@@ -486,7 +487,17 @@ namespace OnlineStore.AutoCountClient
{
{
return
;
return
;
}
}
lblXrayWork
.
Visible
=
robot
.
XrayBean
.
InXWork
;
lblXrayWork
.
Visible
=
robot
.
XrayBean
.
InXWork
;
if
(
robot
.
XrayBean
.
carerayImageError
)
{
robot
.
XrayBean
.
MoveStop
=
true
;
lblXrayWork
.
Text
=
"图像平板失效,请及时处理。"
;
lblXrayWork
.
Visible
=
true
;
}
string
canScanCode
=
""
;
string
canScanCode
=
""
;
lblStatus
.
Text
=
robot
.
GetRunStr
()
+
canScanCode
;
lblStatus
.
Text
=
robot
.
GetRunStr
()
+
canScanCode
;
string
warnMsg
=
robot
.
WarnMsg
;
string
warnMsg
=
robot
.
WarnMsg
;
...
@@ -535,11 +546,11 @@ namespace OnlineStore.AutoCountClient
...
@@ -535,11 +546,11 @@ namespace OnlineStore.AutoCountClient
//}
//}
if
(
AgvClient
.
CurrCancelState
)
if
(
AgvClient
.
CurrCancelState
)
{
{
aGVCancelStateToolStripMenuItem
.
Text
=
gouStr
+
"
AGV cancelState
"
;
aGVCancelStateToolStripMenuItem
.
Text
=
gouStr
+
"
禁用 AGV
"
;
}
}
else
else
{
{
aGVCancelStateToolStripMenuItem
.
Text
=
"
AGV cancelState
"
;
aGVCancelStateToolStripMenuItem
.
Text
=
"
禁用 AGV
"
;
}
}
UpdateListBox
();
UpdateListBox
();
}
}
...
@@ -707,7 +718,6 @@ namespace OnlineStore.AutoCountClient
...
@@ -707,7 +718,6 @@ namespace OnlineStore.AutoCountClient
ExitApp
();
ExitApp
();
}
}
private
void
logBox_VisibleChanged
(
object
sender
,
EventArgs
e
)
private
void
logBox_VisibleChanged
(
object
sender
,
EventArgs
e
)
{
{
if
(!
LoadOk
)
if
(!
LoadOk
)
...
@@ -941,7 +951,32 @@ namespace OnlineStore.AutoCountClient
...
@@ -941,7 +951,32 @@ namespace OnlineStore.AutoCountClient
private
void
元器件学习
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
private
void
元器件学习
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
{
}
private
void
单盘
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
string
backPath
=
ParamManager
.
NoConfigPath
;
string
backPath
=
ParamManager
.
NoConfigPath
;
OpenFileDialog
ofd
=
new
OpenFileDialog
();
ofd
.
InitialDirectory
=
ParamManager
.
NoConfigPath
;
ofd
.
Multiselect
=
true
;
ofd
.
Filter
=
"PNG|*.png"
;
if
(
DialogResult
.
OK
==
ofd
.
ShowDialog
(
this
))
{
FrmLearning
frm
=
new
FrmLearning
();
frm
.
ImageFiles
=
ofd
.
FileNames
;
frm
.
ImagePath
=
ParamManager
.
NoConfigPath
;
frm
.
Show
();
//Task.Run(() => { frm.ShowDialog(); });
}
}
private
void
批量
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
string
backPath
=
ParamManager
.
NoConfigPath
;
FrmLearning
frm
=
new
FrmLearning
();
frm
.
ImagePath
=
backPath
;
frm
.
Show
();
/*
folderBrowserDialog1.Description = "请选择需要学习的图片文件夹";
folderBrowserDialog1.Description = "请选择需要学习的图片文件夹";
if (!Directory.Exists(backPath))
if (!Directory.Exists(backPath))
{
{
...
@@ -954,9 +989,10 @@ namespace OnlineStore.AutoCountClient
...
@@ -954,9 +989,10 @@ namespace OnlineStore.AutoCountClient
string folder = folderBrowserDialog1.SelectedPath;
string folder = folderBrowserDialog1.SelectedPath;
FrmLearning frm = new FrmLearning();
FrmLearning frm = new FrmLearning();
frm.ImagePath = folder;
frm.ImagePath = folder;
frm
.
ShowDialog
();
frm.Show();
}
//Task.Run(() => { frm.ShowDialog(); });
}
}*/
}
private
void
元器件库
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
private
void
元器件库
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
{
FrmComponentList
frm
=
new
FrmComponentList
();
FrmComponentList
frm
=
new
FrmComponentList
();
...
@@ -1012,5 +1048,7 @@ namespace OnlineStore.AutoCountClient
...
@@ -1012,5 +1048,7 @@ namespace OnlineStore.AutoCountClient
}
}
LogUtil
.
info
(
Name
+
" 点击:"
+
启用贴标功能
ToolStripMenuItem
.
Text
);
LogUtil
.
info
(
Name
+
" 点击:"
+
启用贴标功能
ToolStripMenuItem
.
Text
);
}
}
}
}
}
}
RC1266-AutoCountMachine/source/AutoCountClient/FrmXRay.cs
查看文件 @
fa81c6e
...
@@ -16,13 +16,13 @@ using System.Reflection;
...
@@ -16,13 +16,13 @@ using System.Reflection;
using
UserFromControl
;
using
UserFromControl
;
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.Common
;
using
OnlineStore.Common
;
using
static
OnlineStore
.
DeviceLibrary
.
CountParam
;
namespace
OnlineStore.AutoCountClient
namespace
OnlineStore.AutoCountClient
{
{
internal
partial
class
FrmXRay
:
FrmEquipBase
internal
partial
class
FrmXRay
:
FrmEquipBase
{
{
private
int
DeviceType
=
0
;
private
SignType
DeviceType
=
SignType
.
AUTO
;
private
bool
IsLoad
=
false
;
private
bool
IsLoad
=
false
;
private
X_RAY_Equip
equipBean
;
private
X_RAY_Equip
equipBean
;
...
@@ -34,10 +34,15 @@ namespace OnlineStore.AutoCountClient
...
@@ -34,10 +34,15 @@ namespace OnlineStore.AutoCountClient
InitializeComponent
();
InitializeComponent
();
LoadIOList
();
LoadIOList
();
}
}
private
void
FrmXRay_Shown
(
object
sender
,
EventArgs
e
)
{
}
private
void
FrmStoreIOStatus_Load
(
object
sender
,
EventArgs
e
)
private
void
FrmStoreIOStatus_Load
(
object
sender
,
EventArgs
e
)
{
{
cmbType
.
Items
.
AddRange
(
new
string
[]
{
"
小器件"
,
"大器件"
,
"异形三角器件"
,
"异形三脚大器件"
,
"异形长条形器件
"
});
cmbType
.
Items
.
AddRange
(
new
string
[]
{
"
默认算法"
,
"算法A"
,
"算法B"
,
"算法C"
,
"算法D"
,
"算法E
"
});
cmbType
.
SelectedIndex
=
DeviceType
;
cmbType
.
SelectedIndex
=
(
DeviceType
==
SignType
.
AUTO
?
0
:
(
int
)
DeviceType
)
;
chbDebug
.
Checked
=
equipBean
.
IsDebug
;
chbDebug
.
Checked
=
equipBean
.
IsDebug
;
lblCom
.
Text
=
"X射线端口号:"
+
equipBean
.
Config
.
XRay_Port
;
lblCom
.
Text
=
"X射线端口号:"
+
equipBean
.
Config
.
XRay_Port
;
...
@@ -105,6 +110,7 @@ namespace OnlineStore.AutoCountClient
...
@@ -105,6 +110,7 @@ namespace OnlineStore.AutoCountClient
{
{
return
;
return
;
}
}
this
.
chbMoveStop
.
Checked
=
equipBean
.
MoveStop
;
ReadIOList
();
ReadIOList
();
ReadBtnDO
();
ReadBtnDO
();
lblOpen
.
Visible
=(!
equipBean
.
OpenXLine
);
lblOpen
.
Visible
=(!
equipBean
.
OpenXLine
);
...
@@ -447,9 +453,8 @@ namespace OnlineStore.AutoCountClient
...
@@ -447,9 +453,8 @@ namespace OnlineStore.AutoCountClient
txtResult
.
Text
=
"点料中..."
;
txtResult
.
Text
=
"点料中..."
;
int
th
=
(
int
)
numTh
.
Value
;
int
th
=
(
int
)
numTh
.
Value
;
int
wsize
=
(
int
)
numWSize
.
Value
;
int
wsize
=
(
int
)
numWSize
.
Value
;
Asa
.
API
.
EyemImage
tpDstImg
;
CountParam
param
=
new
CountParam
(
""
,
th
,
wsize
,
DeviceType
);
CountParam
param
=
new
CountParam
(
""
,
th
,
wsize
,
DeviceType
);
int
outCount
=
equipBean
.
GetCountResult
(
filePath
,
param
,
out
tpDstImg
);
int
outCount
=
equipBean
.
GetCountResult
(
filePath
,
param
,
out
_
);
txtResult
.
Text
=
outCount
.
ToString
();
txtResult
.
Text
=
outCount
.
ToString
();
LogUtil
.
info
(
equipBean
.
Name
+
"用户点击 点料测试【"
+
filePath
+
"】【"
+
th
+
"】【"
+
wsize
+
"】 结果:"
+
outCount
);
LogUtil
.
info
(
equipBean
.
Name
+
"用户点击 点料测试【"
+
filePath
+
"】【"
+
th
+
"】【"
+
wsize
+
"】 结果:"
+
outCount
);
}
}
...
@@ -494,7 +499,8 @@ namespace OnlineStore.AutoCountClient
...
@@ -494,7 +499,8 @@ namespace OnlineStore.AutoCountClient
int
index
=
cmbType
.
SelectedIndex
;
int
index
=
cmbType
.
SelectedIndex
;
if
(
index
>=
0
)
if
(
index
>=
0
)
{
{
DeviceType
=
index
;
index
--;
Enum
.
TryParse
<
SignType
>(
index
.
ToString
(),
out
DeviceType
);
LogUtil
.
info
(
Name
+
" "
+
equipBean
.
Name
+
" 更改 equipBean.DeviceType="
+
index
);
LogUtil
.
info
(
Name
+
" "
+
equipBean
.
Name
+
" 更改 equipBean.DeviceType="
+
index
);
}
}
}
}
...
...
RC1266-AutoCountMachine/source/CodeLibrary/camera/HIK.cs
查看文件 @
fa81c6e
...
@@ -48,6 +48,8 @@ namespace CodeLibrary
...
@@ -48,6 +48,8 @@ namespace CodeLibrary
}
}
public
override
void
CloseAll
()
public
override
void
CloseAll
()
{
{
if
(
cameraCurr
==
null
)
return
;
for
(
int
i
=
0
;
i
<
cameraCurr
.
Length
;
i
++)
for
(
int
i
=
0
;
i
<
cameraCurr
.
Length
;
i
++)
{
{
if
(
cameraCurr
[
i
]
!=
null
)
if
(
cameraCurr
[
i
]
!=
null
)
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
fa81c6e
...
@@ -41,8 +41,9 @@
...
@@ -41,8 +41,9 @@
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
<Reference Include="Asa.CarerayImage">
<Reference Include="Asa.CarerayImage, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\dll\X-Ray\Asa.CarerayImage.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\CarerayImage\CarerayImage\bin\Debug\Asa.CarerayImage.dll</HintPath>
</Reference>
</Reference>
<Reference Include="Asa.IOModule.AIOBOX">
<Reference Include="Asa.IOModule.AIOBOX">
<HintPath>..\..\dll\Asa.IOModule.AIOBOX.dll</HintPath>
<HintPath>..\..\dll\Asa.IOModule.AIOBOX.dll</HintPath>
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/BatchMoveBean.cs
查看文件 @
fa81c6e
...
@@ -81,6 +81,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -81,6 +81,7 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
Robot
.
AutoInput
&&
Robot
.
IOValue
(
IO_LineIn_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
Robot
.
AutoInput
&&
Robot
.
IOValue
(
IO_LineIn_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
//WorkLog("启动位置1");
StartWorking
(
new
WorkParam
());
StartWorking
(
new
WorkParam
());
}
}
}
}
...
@@ -106,12 +107,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -106,12 +107,12 @@ namespace OnlineStore.DeviceLibrary
WorkLog
(
"无料串,:通知agv来送料串AgvName:"
+
AgvName
+
",agvcallresult:"
+
agvcallresult
.
ToString
());
WorkLog
(
"无料串,:通知agv来送料串AgvName:"
+
AgvName
+
",agvcallresult:"
+
agvcallresult
.
ToString
());
}
}
}
}
else
// if(AgvClient.GetAction(AgvName)!=Asa.ClientAction.NeedLeave && AgvClient.GetAction(AgvName)!=Asa.ClientAction.MayLeave)
else
if
(
Robot
.
IOValue
(
IO_LineIn_Check
).
Equals
(
IO_VALUE
.
HIGH
)
&&
Robot
.
IOValue
(
IO_LineEnd_Check
).
Equals
(
IO_VALUE
.
HIGH
)
&&
AgvClient
.
GetAction
(
AgvName
)!=
Asa
.
ClientAction
.
NeedLeave
&&
AgvClient
.
GetAction
(
AgvName
)!=
Asa
.
ClientAction
.
MayLeave
&&
AgvClient
.
GetAction
(
AgvName
)
!=
Asa
.
ClientAction
.
FinishLeave
)
{
{
shelfWatch
.
Stop
();
shelfWatch
.
Stop
();
//
AgvClient.SetToNone(AgvName);
AgvClient
.
SetToNone
(
AgvName
);
}
}
}
}
private
Stopwatch
shelfWatch
=
new
Stopwatch
();
private
Stopwatch
shelfWatch
=
new
Stopwatch
();
public
bool
Reset
(
bool
needStop
=
false
)
public
bool
Reset
(
bool
needStop
=
false
)
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/BatchMoveBean_Partial.cs
查看文件 @
fa81c6e
...
@@ -181,17 +181,51 @@ namespace OnlineStore.DeviceLibrary
...
@@ -181,17 +181,51 @@ namespace OnlineStore.DeviceLibrary
#
region
检测到托盘,扫码,取料并放入托盘
#
region
检测到托盘,扫码,取料并放入托盘
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB07_AxisUpMove
))
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB07_AxisUpMove
))
{
{
CheckHasTray
();
//==>StepEnum.IB09_ScanCode
CheckHasTray
();
//==>StepEnum.IB09_ScanCode
}
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB09_ScanCode
))
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB09_ScanCode
))
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB10_ScanOK
);
WorkLog
(
"IB09_ScanCode"
);
MoveInfo
.
MoveParam
=
new
WorkParam
();
MoveInfo
.
MoveParam
.
WareCode
=
CodeManager
.
GetValidCode
(
LastCodeList
);
MoveInfo
.
MoveParam
.
WareCode
=
CodeManager
.
GetValidCode
(
LastCodeList
);
if
(
String
.
IsNullOrEmpty
(
MoveInfo
.
MoveParam
.
WareCode
))
{
MoveInfo
.
MoveParam
.
IsNgReel
=
true
;
MoveInfo
.
MoveParam
.
NgMsg
=
"无有效条码"
;
MoveInfo
.
MoveParam
.
TargetPosType
=
1
;
WorkLog
(
" 无有效条码,从XRay放到NG箱:"
+
MoveInfo
.
MoveParam
.
ToStr
());
string
outF
=
"无有效条码NG."
;
RobotManager
.
robot
.
sQLite
.
Insert
(
MoveInfo
.
MoveParam
.
WareCode
,
MoveInfo
.
MoveParam
.
PlateW
,
MoveInfo
.
MoveParam
.
PlateH
,
0
,
outF
);
}
else
if
(
SServerManager
.
CanConnect
())
{
int
needPosition
=
0
;
string
msg
=
SServerManager
.
Get_VMICheckRLC
(
Name
,
MoveInfo
.
MoveParam
.
WareCode
,
out
needPosition
);
if
(
needPosition
>=
1
&&
needPosition
<=
3
)
{
MoveInfo
.
MoveParam
.
TargetPosType
=
needPosition
;
WorkLog
(
" 【"
+
MoveInfo
.
MoveParam
.
WareCode
+
"】通过接口获取目标位置:"
+
needPosition
);
}
else
{
WorkLog
(
" 【"
+
MoveInfo
.
MoveParam
.
WareCode
+
"】获取是否测值失败:"
+
msg
);
MoveInfo
.
MoveParam
.
TargetPosType
=
1
;
MoveInfo
.
MoveParam
.
IsNgReel
=
true
;
MoveInfo
.
MoveParam
.
NgMsg
=
msg
;
RobotManager
.
robot
.
sQLite
.
Insert
(
MoveInfo
.
MoveParam
.
WareCode
,
MoveInfo
.
MoveParam
.
PlateW
,
MoveInfo
.
MoveParam
.
PlateH
,
0
,
msg
);
}
}
else
{
MoveInfo
.
MoveParam
.
TargetPosType
=
1
;
}
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB10_ScanOK
);
var
span
=
DateTime
.
Now
-
MoveInfo
.
LastSetpTime
;
var
span
=
DateTime
.
Now
-
MoveInfo
.
LastSetpTime
;
LogUtil
.
ticklog
(
""
,
MoveInfo
.
MoveParam
.
WareCode
,
span
.
TotalSeconds
,
"拍照扫码结束"
);
//
LogUtil.ticklog("", MoveInfo.MoveParam.WareCode, span.TotalSeconds, "拍照扫码结束");
WorkLog
(
"料串入料 :扫码结束【"
+
MoveInfo
.
MoveParam
.
WareCode
+
"】,等待取料机构来取料,
拍照识别耗时:"
+
span
.
TotalSeconds
.
ToString
());
WorkLog
(
"料串入料 :扫码结束【"
+
MoveInfo
.
MoveParam
.
WareCode
+
"】,等待取料机构来取料,
"
+
MoveInfo
.
MoveParam
.
ToStr
());
}
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB11_TrayLeave
))
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB11_TrayLeave
))
{
{
...
@@ -546,6 +580,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -546,6 +580,11 @@ namespace OnlineStore.DeviceLibrary
{
{
//入口有料串,暂不处理
//入口有料串,暂不处理
LogUtil
.
error
(
logName
+
",入口已有料架,暂不处理"
);
LogUtil
.
error
(
logName
+
",入口已有料架,暂不处理"
);
Task
.
Factory
.
StartNew
(
delegate
{
Thread
.
Sleep
(
3000
);
AgvClient
.
SetStatus
(
AgvName
,
""
,
ClientAction
.
None
,
ClientLevel
.
High
,
true
);
});
}
}
}
}
catch
(
TimeoutException
te
)
catch
(
TimeoutException
te
)
...
@@ -601,6 +640,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -601,6 +640,11 @@ namespace OnlineStore.DeviceLibrary
else
else
{
{
LogUtil
.
info
(
logName
+
" 未检测到料架,暂不处理"
);
LogUtil
.
info
(
logName
+
" 未检测到料架,暂不处理"
);
Task
.
Factory
.
StartNew
(
delegate
{
Thread
.
Sleep
(
3000
);
AgvClient
.
SetStatus
(
AgvName
,
""
,
ClientAction
.
None
,
ClientLevel
.
High
,
true
);
});
}
}
}
}
catch
(
TimeoutException
te
)
catch
(
TimeoutException
te
)
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/InputEquip.cs
查看文件 @
fa81c6e
...
@@ -249,13 +249,23 @@ namespace OnlineStore.DeviceLibrary
...
@@ -249,13 +249,23 @@ namespace OnlineStore.DeviceLibrary
if
(
LeftBatchMove
.
MoveInfo
.
MoveType
.
Equals
(
RobotMoveType
.
Working
)
&&
LeftBatchMove
.
MoveInfo
.
IsStep
(
StepEnum
.
IB10_ScanOK
))
if
(
LeftBatchMove
.
MoveInfo
.
MoveType
.
Equals
(
RobotMoveType
.
Working
)
&&
LeftBatchMove
.
MoveInfo
.
IsStep
(
StepEnum
.
IB10_ScanOK
))
{
{
WorkLog
(
"左侧开始取料"
);
string
code
=
LeftBatchMove
.
MoveInfo
.
MoveParam
.
WareCode
;
string
code
=
LeftBatchMove
.
MoveInfo
.
MoveParam
.
WareCode
;
StartWorking
(
new
WorkParam
(
1
,
0
,
code
));
var
p
=
new
WorkParam
(
1
,
0
,
code
);
p
.
IsNgReel
=
LeftBatchMove
.
MoveInfo
.
MoveParam
.
IsNgReel
;
p
.
TargetPosType
=
LeftBatchMove
.
MoveInfo
.
MoveParam
.
TargetPosType
;
p
.
NgMsg
=
LeftBatchMove
.
MoveInfo
.
MoveParam
.
NgMsg
;
StartWorking
(
p
);
}
}
else
if
(
RightBatchMove
.
MoveInfo
.
MoveType
.
Equals
(
RobotMoveType
.
Working
)
&&
RightBatchMove
.
MoveInfo
.
IsStep
(
StepEnum
.
IB10_ScanOK
))
else
if
(
RightBatchMove
.
MoveInfo
.
MoveType
.
Equals
(
RobotMoveType
.
Working
)
&&
RightBatchMove
.
MoveInfo
.
IsStep
(
StepEnum
.
IB10_ScanOK
))
{
{
WorkLog
(
"右侧开始取料"
);
string
code
=
RightBatchMove
.
MoveInfo
.
MoveParam
.
WareCode
;
string
code
=
RightBatchMove
.
MoveInfo
.
MoveParam
.
WareCode
;
StartWorking
(
new
WorkParam
(
2
,
0
,
code
));
var
p
=
new
WorkParam
(
2
,
0
,
code
);
p
.
IsNgReel
=
RightBatchMove
.
MoveInfo
.
MoveParam
.
IsNgReel
;
p
.
TargetPosType
=
RightBatchMove
.
MoveInfo
.
MoveParam
.
TargetPosType
;
p
.
NgMsg
=
RightBatchMove
.
MoveInfo
.
MoveParam
.
NgMsg
;
StartWorking
(
p
);
}
}
}
}
if
(
SecMoveInfo
.
MoveType
.
Equals
(
RobotMoveType
.
None
)
&&
NoErrorAlarm
())
if
(
SecMoveInfo
.
MoveType
.
Equals
(
RobotMoveType
.
None
)
&&
NoErrorAlarm
())
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/InputEquip_InStore.cs
查看文件 @
fa81c6e
此文件的差异被折叠,
点击展开。
RC1266-AutoCountMachine/source/DeviceLibrary/bean/OutputEquip_Partial.cs
查看文件 @
fa81c6e
...
@@ -50,7 +50,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -50,7 +50,6 @@ namespace OnlineStore.DeviceLibrary
}
}
#
region
取料
#
region
取料
internal
bool
IsInGetWare
()
internal
bool
IsInGetWare
()
{
{
if
(
MoveInfo
.
MoveStep
>=
StepEnum
.
OT06_MoveXToP2
&&
MoveInfo
.
MoveStep
<=
StepEnum
.
OT09_MoveZToP1
)
if
(
MoveInfo
.
MoveStep
>=
StepEnum
.
OT06_MoveXToP2
&&
MoveInfo
.
MoveStep
<=
StepEnum
.
OT09_MoveZToP1
)
...
@@ -110,7 +109,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -110,7 +109,6 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
MoveParam
.
IsNgReel
=
true
;
MoveInfo
.
MoveParam
.
IsNgReel
=
true
;
}
}
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Out_TrayCheck
,
IO_VALUE
.
HIGH
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Out_TrayCheck
,
IO_VALUE
.
HIGH
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
X_OLine_Run
,
IO_VALUE
.
LOW
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
X_OLine_Run
,
IO_VALUE
.
LOW
));
}
}
...
@@ -175,7 +173,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -175,7 +173,6 @@ namespace OnlineStore.DeviceLibrary
}
}
private
void
OT03_MoveXToP2
()
private
void
OT03_MoveXToP2
()
{
{
int
position
=
Config
.
GetMoveXP2
(
MoveInfo
.
MoveParam
.
PlateW
);
int
position
=
Config
.
GetMoveXP2
(
MoveInfo
.
MoveParam
.
PlateW
);
if
(
MoveXAxis
.
IsInPosition
(
position
))
if
(
MoveXAxis
.
IsInPosition
(
position
))
{
{
...
@@ -341,12 +338,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -341,12 +338,13 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
OT12_MoveXToP3
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
OT12_MoveXToP3
);
WorkLog
(
"放料:料串可放料,取料X轴移动到P3 ["
+
Config
.
MoveX_P3
+
"]"
);
WorkLog
(
"放料:料串可放料,取料X轴移动到P3 ["
+
Config
.
MoveX_P3
+
"]"
);
MoveXAxis
.
AbsMove
(
MoveInfo
,
Config
.
MoveX_P3
,
Config
.
MoveX_P3Speed
);
MoveXAxis
.
AbsMove
(
MoveInfo
,
Config
.
MoveX_P3
,
Config
.
MoveX_P3Speed
);
ClearTimeoutAlarm
(
"等待出料料串准备完成"
);
ClearTimeoutAlarm
(
"等待出料料串准备完成"
);
if
(
shelfOk
)
if
(
shelfOk
)
{
{
int
trayHeight
=
MoveInfo
.
MoveParam
.
PlateH
;
int
trayHeight
=
MoveInfo
.
MoveParam
.
PlateH
;
ShelfMoveInfo
.
NextMoveStep
(
StepEnum
.
OS_21_BatchDownH
);
ShelfMoveInfo
.
NextMoveStep
(
StepEnum
.
OS_21_BatchDownH
);
int
currP
=
BatchAxis
.
GetAclPosition
();
int
currP
=
BatchAxis
.
GetAclPosition
();
int
targetP
=
currP
-
(
trayHeight
+
20
)
*
Config
.
Height_ChangeValue
;
int
targetP
=
currP
-
(
trayHeight
+
20
)
*
Config
.
Height_ChangeValue
;
if
(
targetP
<
Config
.
BatchAxisP2
)
if
(
targetP
<
Config
.
BatchAxisP2
)
...
@@ -354,6 +352,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -354,6 +352,7 @@ namespace OnlineStore.DeviceLibrary
targetP
=
Config
.
BatchAxisP2
;
targetP
=
Config
.
BatchAxisP2
;
}
}
ShelfWorkLog
(
"放料: 提升轴下降指定高度 : 盘高【"
+
trayHeight
+
"】实时位置【"
+
currP
+
"】目标位置【"
+
targetP
+
"】"
);
ShelfWorkLog
(
"放料: 提升轴下降指定高度 : 盘高【"
+
trayHeight
+
"】实时位置【"
+
currP
+
"】目标位置【"
+
targetP
+
"】"
);
ShelfMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
BatchAxis
.
AbsMove
(
ShelfMoveInfo
,
targetP
,
Config
.
BatchAxis_P2Speed
);
BatchAxis
.
AbsMove
(
ShelfMoveInfo
,
targetP
,
Config
.
BatchAxis_P2Speed
);
}
}
}
}
...
@@ -367,12 +366,20 @@ namespace OnlineStore.DeviceLibrary
...
@@ -367,12 +366,20 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
OT12_MoveXToP3
))
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
OT12_MoveXToP3
))
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
OT13_MoveZToP3
);
if
(
IOValue
(
IO_Type
.
O_WLine_TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
int
p
=
Config
.
GetMoveZP3
(
MoveInfo
.
MoveParam
.
PlateH
);
ShelfMoveInfo
.
NextMoveStep
(
StepEnum
.
OS_20_ShelfReady
);
WorkLog
(
"放料:取料Z轴下降到P3 ["
+
p
+
"] "
,
1
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
OT11_WaitShelfOk
);
MoveZAxis
.
AbsMove
(
MoveInfo
,
p
,
Config
.
MoveZ_P3Speed
);
WorkLog
(
"放料:料串下降不到位,重新下降 "
,
1
);
}
else
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
OT13_MoveZToP3
);
int
p
=
Config
.
GetMoveZP3
(
MoveInfo
.
MoveParam
.
PlateH
);
WorkLog
(
"放料:取料Z轴下降到P3 ["
+
p
+
"] "
,
1
);
MoveZAxis
.
AbsMove
(
MoveInfo
,
p
,
Config
.
MoveZ_P3Speed
);
CheckStartLabel
();
CheckStartLabel
();
}
}
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
OT13_MoveZToP3
))
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
OT13_MoveZToP3
))
{
{
...
@@ -424,7 +431,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -424,7 +431,6 @@ namespace OnlineStore.DeviceLibrary
WorkLog
(
"放料完成,耗时("
+
FormUtil
.
GetSpanStr
(
span
)
+
")"
);
WorkLog
(
"放料完成,耗时("
+
FormUtil
.
GetSpanStr
(
span
)
+
")"
);
TickLog
(
"出口料串,放料完成"
);
TickLog
(
"出口料串,放料完成"
);
MoveInfo
.
EndMove
();
MoveInfo
.
EndMove
();
}
}
else
else
{
{
...
@@ -438,10 +444,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -438,10 +444,7 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
}
}
#
region
NG
料
#
region
NG
料
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
OT21_NG_MoveXToP1
))
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
OT21_NG_MoveXToP1
))
{
{
int
busyStatus
=
ACServerManager
.
GetBusyStatus
(
MoveZAxis
.
Config
.
DeviceName
,
MoveZAxis
.
Config
.
GetAxisValue
());
int
busyStatus
=
ACServerManager
.
GetBusyStatus
(
MoveZAxis
.
Config
.
DeviceName
,
MoveZAxis
.
Config
.
GetAxisValue
());
...
@@ -477,17 +480,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -477,17 +480,13 @@ namespace OnlineStore.DeviceLibrary
TimeSpan
span
=
DateTime
.
Now
-
MoveInfo
.
MoveStartTime
;
TimeSpan
span
=
DateTime
.
Now
-
MoveInfo
.
MoveStartTime
;
TickLog
(
"出口NG,放料完成"
);
TickLog
(
"出口NG,放料完成"
);
WorkLog
(
"放料完成,耗时("
+
FormUtil
.
GetSpanStr
(
span
)
+
")"
);
WorkLog
(
"放料完成,耗时("
+
FormUtil
.
GetSpanStr
(
span
)
+
")"
);
MoveInfo
.
EndMove
();
MoveInfo
.
EndMove
();
}
}
#
endregion
#
endregion
}
}
#
endregion
#
endregion
#
region
贴标
#
region
贴标
public
override
bool
StartLabelling
(
WorkParam
param
)
public
override
bool
StartLabelling
(
WorkParam
param
)
{
{
if
(!
SecMoveInfo
.
MoveType
.
Equals
(
RobotMoveType
.
None
))
if
(!
SecMoveInfo
.
MoveType
.
Equals
(
RobotMoveType
.
None
))
...
@@ -508,7 +507,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -508,7 +507,6 @@ namespace OnlineStore.DeviceLibrary
{
{
LabelZAxis
.
AbsMove
(
SecMoveInfo
,
Config
.
LabelZ_P1
,
Config
.
LabelZ_P1Speed
);
LabelZAxis
.
AbsMove
(
SecMoveInfo
,
Config
.
LabelZ_P1
,
Config
.
LabelZ_P1Speed
);
}
}
return
true
;
return
true
;
}
}
...
@@ -529,8 +527,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -529,8 +527,12 @@ namespace OnlineStore.DeviceLibrary
{
{
SecMoveInfo
.
NextMoveStep
(
StepEnum
.
OL03_PrintLabel
);
SecMoveInfo
.
NextMoveStep
(
StepEnum
.
OL03_PrintLabel
);
RobotManager
.
LastPrintStatus
=
Asa
.
PrintLabel
.
PrinterStatus
.
Unknown
;
RobotManager
.
LastPrintStatus
=
Asa
.
PrintLabel
.
PrinterStatus
.
Unknown
;
NeedPrint
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
NeedPrintLabel
).
Equals
(
1
);
try
StickingPosJudgment
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
StickingPosJudgment
).
Equals
(
1
);
{
NeedPrint
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
NeedPrintLabel
).
Equals
(
1
);
StickingPosJudgment
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
StickingPosJudgment
).
Equals
(
1
);
}
catch
{
}
SecWorkLog
(
"贴标: 重置PrintLabel状态=Unknown,开始打印标签["
+
NeedPrint
+
"] ,贴标XYR轴到取标签点P2, 等待1s"
);
SecWorkLog
(
"贴标: 重置PrintLabel状态=Unknown,开始打印标签["
+
NeedPrint
+
"] ,贴标XYR轴到取标签点P2, 等待1s"
);
SecMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
SecMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
if
(
NeedPrint
)
if
(
NeedPrint
)
...
@@ -548,7 +550,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -548,7 +550,6 @@ namespace OnlineStore.DeviceLibrary
LabelXAxis
.
AbsMove
(
SecMoveInfo
,
Config
.
LabelX_P2
,
Config
.
LabelX_P2Speed
);
LabelXAxis
.
AbsMove
(
SecMoveInfo
,
Config
.
LabelX_P2
,
Config
.
LabelX_P2Speed
);
LabelYAxis
.
AbsMove
(
SecMoveInfo
,
Config
.
LabelY_P2
,
Config
.
LabelY_P2Speed
);
LabelYAxis
.
AbsMove
(
SecMoveInfo
,
Config
.
LabelY_P2
,
Config
.
LabelY_P2Speed
);
LabelRAxis
.
AbsMove
(
SecMoveInfo
,
Config
.
LabelR_P2
,
Config
.
LabelR_P2Speed
);
LabelRAxis
.
AbsMove
(
SecMoveInfo
,
Config
.
LabelR_P2
,
Config
.
LabelR_P2Speed
);
}
}
else
if
(
SecMoveInfo
.
IsStep
(
StepEnum
.
OL03_PrintLabel
))
else
if
(
SecMoveInfo
.
IsStep
(
StepEnum
.
OL03_PrintLabel
))
{
{
...
@@ -576,7 +577,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -576,7 +577,6 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
WarnMsg
,
SecMoveInfo
.
ErrorLogType
,
SecMoveInfo
.
logSeconds
());
LogUtil
.
error
(
WarnMsg
,
SecMoveInfo
.
ErrorLogType
,
SecMoveInfo
.
logSeconds
());
Alarm
(
AlarmType
.
IoSingleTimeOut
);
Alarm
(
AlarmType
.
IoSingleTimeOut
);
}
}
}
}
else
if
(
SecMoveInfo
.
IsStep
(
StepEnum
.
OL05_TakeBack
))
else
if
(
SecMoveInfo
.
IsStep
(
StepEnum
.
OL05_TakeBack
))
{
{
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/OutputEquip_Shelf.cs
查看文件 @
fa81c6e
...
@@ -246,12 +246,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -246,12 +246,12 @@ namespace OnlineStore.DeviceLibrary
else
if
(
ShelfMoveInfo
.
IsStep
(
StepEnum
.
OS_21_BatchDownH
))
else
if
(
ShelfMoveInfo
.
IsStep
(
StepEnum
.
OS_21_BatchDownH
))
{
{
ShelfMoveInfo
.
NextMoveStep
(
StepEnum
.
OS_22_WaitTray
);
ShelfMoveInfo
.
NextMoveStep
(
StepEnum
.
OS_22_WaitTray
);
ShelfWorkLog
(
"等待料盘放入料串
"
);
ShelfWorkLog
(
"等待料盘放入料串
,O_WLine_TrayCheck="
+
IOValue
(
IO_Type
.
O_WLine_TrayCheck
).
ToString
()
);
}
}
else
if
(
ShelfMoveInfo
.
IsStep
(
StepEnum
.
OS_23_TrayOK
))
else
if
(
ShelfMoveInfo
.
IsStep
(
StepEnum
.
OS_23_TrayOK
))
{
{
ShelfMoveInfo
.
NextMoveStep
(
StepEnum
.
OS_24_BatchToP3
);
ShelfMoveInfo
.
NextMoveStep
(
StepEnum
.
OS_24_BatchToP3
);
ShelfWorkLog
(
"批量轴匀速到P3或信号亮
"
)
;
ShelfWorkLog
(
"批量轴匀速到P3或信号亮
,O_WLine_TrayCheck="
+
IOValue
(
IO_Type
.
O_WLine_TrayCheck
).
ToString
());
;
BatchAxisToP3
(
ShelfMoveInfo
);
BatchAxisToP3
(
ShelfMoveInfo
);
}
}
else
if
(
ShelfMoveInfo
.
IsStep
(
StepEnum
.
OS_24_BatchToP3
))
else
if
(
ShelfMoveInfo
.
IsStep
(
StepEnum
.
OS_24_BatchToP3
))
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/RobotBean.cs
查看文件 @
fa81c6e
using
BLL
;
using
Asa
;
using
BLL
;
using
log4net
;
using
log4net
;
using
OnlineStore.Common
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.LoadCSVLibrary
;
...
@@ -64,6 +65,17 @@ namespace OnlineStore.DeviceLibrary
...
@@ -64,6 +65,17 @@ namespace OnlineStore.DeviceLibrary
AgvClient
.
NodeList
.
Add
(
outputEquip
.
Config
.
AgvOutName
);
AgvClient
.
NodeList
.
Add
(
outputEquip
.
Config
.
AgvOutName
);
AgvClient
.
NodeList
.
Add
(
inputEquip
.
Config
.
RightAgvName
);
AgvClient
.
NodeList
.
Add
(
inputEquip
.
Config
.
RightAgvName
);
AgvClient
.
NodeList
.
Add
(
inputEquip
.
Config
.
LeftAgvName
);
AgvClient
.
NodeList
.
Add
(
inputEquip
.
Config
.
LeftAgvName
);
/*var carerayImage = new CarerayImage();
if (carerayImage.Open())
{
carerayImage.Close();
}
else {
LogUtil.info(Name + "图像平板打开失败! 系统不允许启动。");
return;
}
*/
Task
.
Factory
.
StartNew
(
delegate
Task
.
Factory
.
StartNew
(
delegate
{
{
LogUtil
.
info
(
Name
+
"开始连接IO模块 "
);
LogUtil
.
info
(
Name
+
"开始连接IO模块 "
);
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip.cs
查看文件 @
fa81c6e
...
@@ -61,7 +61,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -61,7 +61,7 @@ namespace OnlineStore.DeviceLibrary
}
}
public
bool
carerayImageError
=
false
;
private
void
XRayLoad
()
private
void
XRayLoad
()
{
{
try
try
...
@@ -69,7 +69,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -69,7 +69,7 @@ namespace OnlineStore.DeviceLibrary
carerayImage
=
new
CarerayImage
(
"XRay"
);
carerayImage
=
new
CarerayImage
(
"XRay"
);
bool
cResult
=
carerayImage
.
Open
();
bool
cResult
=
carerayImage
.
Open
();
LogUtil
.
info
(
Name
+
"carerayImage.Open()="
+
cResult
);
LogUtil
.
info
(
Name
+
"carerayImage.Open()="
+
cResult
);
carerayImageError
=
!
cResult
;
xRay
=
new
XRay
(
"XRay"
);
xRay
=
new
XRay
(
"XRay"
);
xRay
.
WarmUp
+=
XRay_WarmUp
;
xRay
.
WarmUp
+=
XRay_WarmUp
;
...
@@ -150,7 +150,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -150,7 +150,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NewMove
(
RobotMoveType
.
RHome
);
MoveInfo
.
NewMove
(
RobotMoveType
.
RHome
);
LogInfo
(
"开始 原点返回: "
);
LogInfo
(
"开始 原点返回: "
);
StartReset
();
StartReset
();
SetAllTimer
(
true
);
SetAllTimer
(
true
);
return
true
;
return
true
;
}
}
...
@@ -346,10 +346,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -346,10 +346,8 @@ namespace OnlineStore.DeviceLibrary
}
}
return
false
;
return
false
;
}
}
#
endregion
#
endregion
public
override
string
GetMoveStr
()
public
override
string
GetMoveStr
()
{
{
string
msg
=
""
;
string
msg
=
""
;
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip_Partial.cs
查看文件 @
fa81c6e
此文件的差异被折叠,
点击展开。
RC1266-AutoCountMachine/source/DeviceLibrary/manager/ParamManager.cs
查看文件 @
fa81c6e
...
@@ -8,6 +8,7 @@ using System.Linq;
...
@@ -8,6 +8,7 @@ using System.Linq;
using
System.Text
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
using
System.Windows.Forms
;
using
static
OnlineStore
.
DeviceLibrary
.
CountParam
;
namespace
OnlineStore.DeviceLibrary
namespace
OnlineStore.DeviceLibrary
{
{
...
@@ -16,13 +17,18 @@ namespace OnlineStore.DeviceLibrary
...
@@ -16,13 +17,18 @@ namespace OnlineStore.DeviceLibrary
public
static
string
NoConfigPath
=
@"D:\NoConfigImg\"
;
public
static
string
NoConfigPath
=
@"D:\NoConfigImg\"
;
private
static
Dictionary
<
string
,
CountParam
>
countParamMap
=
new
Dictionary
<
string
,
CountParam
>();
private
static
Dictionary
<
string
,
CountParam
>
countParamMap
=
new
Dictionary
<
string
,
CountParam
>();
private
static
string
ConfigFilePath
=
""
;
private
static
string
ConfigFilePath
=
""
;
internal
static
void
Init
()
public
static
void
Init
()
{
{
ConfigFilePath
=
Application
.
StartupPath
+
ConfigAppSettings
.
GetValue
(
Setting_Init
.
CounParamConfig
);
ConfigFilePath
=
Application
.
StartupPath
+
ConfigAppSettings
.
GetValue
(
Setting_Init
.
CounParamConfig
);
countParamMap
=
LoadParamMap
(
);
countParamMap
=
LoadParamMap
();
}
}
public
static
string
GetSufanStr
(
int
type
)
public
static
string
GetSufanStr
(
int
type
)
{
SignType
sign
=
SignType
.
AUTO
;
Enum
.
TryParse
<
SignType
>(
type
.
ToString
(),
out
sign
);
return
GetSufanStr
(
sign
);
}
public
static
string
GetSufanStr
(
SignType
type
)
{
{
if
(
type
.
Equals
(
0
))
if
(
type
.
Equals
(
0
))
{
{
...
@@ -44,7 +50,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -44,7 +50,7 @@ namespace OnlineStore.DeviceLibrary
{
{
return
"算法E"
;
return
"算法E"
;
}
}
return
""
;
return
"
默认算法
"
;
}
}
public
static
CountParam
GetParamByPN
(
string
pn
)
public
static
CountParam
GetParamByPN
(
string
pn
)
{
{
...
@@ -190,7 +196,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -190,7 +196,7 @@ namespace OnlineStore.DeviceLibrary
List
<
ComponetInfo
>
FZList
=
new
List
<
ComponetInfo
>();
List
<
ComponetInfo
>
FZList
=
new
List
<
ComponetInfo
>();
Dictionary
<
int
,
int
>
sufaCount
=
new
Dictionary
<
int
,
int
>();
Dictionary
<
int
,
int
>
sufaCount
=
new
Dictionary
<
int
,
int
>();
int
maxSufa
=
-
1
;
SignType
maxSufa
=
SignType
.
AUTO
;
int
maxCount
=
0
;
int
maxCount
=
0
;
foreach
(
ComponetInfo
obj
in
CSVBomManager
.
allComMap
.
Values
)
foreach
(
ComponetInfo
obj
in
CSVBomManager
.
allComMap
.
Values
)
{
{
...
@@ -199,7 +205,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -199,7 +205,7 @@ namespace OnlineStore.DeviceLibrary
CountParam
p
=
GetParamByPN
(
obj
.
PartNum
);
CountParam
p
=
GetParamByPN
(
obj
.
PartNum
);
if
(
p
!=
null
)
if
(
p
!=
null
)
{
{
obj
.
Sufan
=
p
.
Sign
;
obj
.
Sufan
=
(
int
)
p
.
Sign
;
if
(
sufaCount
.
ContainsKey
(
obj
.
Sufan
))
if
(
sufaCount
.
ContainsKey
(
obj
.
Sufan
))
{
{
...
@@ -213,7 +219,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -213,7 +219,7 @@ namespace OnlineStore.DeviceLibrary
if
(
sufaCount
[
obj
.
Sufan
]
>
maxCount
)
if
(
sufaCount
[
obj
.
Sufan
]
>
maxCount
)
{
{
maxCount
=
sufaCount
[
obj
.
Sufan
];
maxCount
=
sufaCount
[
obj
.
Sufan
];
maxSufa
=
obj
.
Sufan
;
Enum
.
TryParse
<
SignType
>(
obj
.
Sufan
.
ToString
(),
out
maxSufa
)
;
}
}
}
}
FZList
.
Add
(
obj
);
FZList
.
Add
(
obj
);
...
@@ -244,7 +250,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -244,7 +250,7 @@ namespace OnlineStore.DeviceLibrary
}
}
public
class
CountParam
public
class
CountParam
{
{
public
CountParam
(
string
pn
,
int
th
=
0
,
int
size
=
0
,
int
sign
=
0
,
int
value
=
0
)
public
CountParam
(
string
pn
,
int
th
=
0
,
int
size
=
0
,
SignType
sign
=
SignType
.
AUTO
,
int
value
=
0
)
{
{
this
.
PN
=
pn
;
this
.
PN
=
pn
;
this
.
Threshold
=
th
;
this
.
Threshold
=
th
;
...
@@ -256,12 +262,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -256,12 +262,12 @@ namespace OnlineStore.DeviceLibrary
public
int
Threshold
=
0
;
public
int
Threshold
=
0
;
public
int
WindowSize
=
0
;
public
int
WindowSize
=
0
;
public
string
AreaValue
=
""
;
public
string
AreaValue
=
""
;
public
int
Sign
=
0
;
public
SignType
Sign
=
0
;
public
int
Value
=
0
;
public
int
Value
=
0
;
public
string
ToStr
()
public
string
ToStr
()
{
{
return
"【PN="
+
PN
+
",sign="
+
Sign
+
",value="
+
Value
+
",th="
+
Threshold
+
",wsize="
+
WindowSize
+
"】"
;
return
"【PN="
+
PN
+
",sign="
+
Sign
.
ToString
()
+
",value="
+
Value
+
",th="
+
Threshold
+
",wsize="
+
WindowSize
+
"】"
;
}
}
public
string
ToCSVStr
()
public
string
ToCSVStr
()
{
{
...
@@ -277,7 +283,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -277,7 +283,9 @@ namespace OnlineStore.DeviceLibrary
if
(
array
.
Length
>=
5
)
if
(
array
.
Length
>=
5
)
{
{
string
pn
=
array
[
0
].
Trim
();
string
pn
=
array
[
0
].
Trim
();
int
sign
=
Convert
.
ToInt32
(
array
[
1
].
Trim
());
SignType
sign
=
SignType
.
AUTO
;
Enum
.
TryParse
<
SignType
>(
array
[
1
].
Trim
(),
out
sign
);
int
value
=
Convert
.
ToInt32
(
array
[
2
].
Trim
());
int
value
=
Convert
.
ToInt32
(
array
[
2
].
Trim
());
int
th
=
Convert
.
ToInt32
(
array
[
3
].
Trim
());
int
th
=
Convert
.
ToInt32
(
array
[
3
].
Trim
());
int
size
=
Convert
.
ToInt32
(
array
[
4
].
Trim
());
int
size
=
Convert
.
ToInt32
(
array
[
4
].
Trim
());
...
@@ -290,7 +298,15 @@ namespace OnlineStore.DeviceLibrary
...
@@ -290,7 +298,15 @@ namespace OnlineStore.DeviceLibrary
return
null
;
return
null
;
}
}
public
enum
SignType
{
IP_SMALL_PARTS
=
0
,
IP_LARGE_PARTS
=
1
,
IP_LONG_PARTS
=
2
,
IP_SQUARE_PARTS
=
3
,
IP_GEN_PARTS
=
4
,
AUTO
=
99
,
}
internal
static
string
GetCSVTitle
()
internal
static
string
GetCSVTitle
()
{
{
return
"type,sign,value,threshold,windowSize"
;
return
"type,sign,value,threshold,windowSize"
;
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/model/AxisBean.cs
查看文件 @
fa81c6e
...
@@ -275,7 +275,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -275,7 +275,7 @@ namespace OnlineStore.DeviceLibrary
if
(
IOManager
.
IOValue
(
TargetIoType
,
0
).
Equals
(
TargetIoValue
))
if
(
IOManager
.
IOValue
(
TargetIoType
,
0
).
Equals
(
TargetIoValue
))
{
{
AxisStopCheckMove
();
AxisStopCheckMove
();
LogUtil
.
info
(
AxisName
+
"上料轴,检测到 "
+
TargetIoType
+
"="
+
TargetIoValue
+
",停止运动
"
);
LogUtil
.
info
(
AxisName
+
"上料轴,检测到 "
+
TargetIoType
+
"="
+
TargetIoValue
+
",停止运动
,AclPosition="
+
GetAclPosition
().
ToString
()
);
SuddenStop
();
SuddenStop
();
}
}
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论