Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
AutoCountMachine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 4c8d82e2
由
刘韬
编写于
2022-02-09 09:02:03 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
出口相机拍照旋转方向, 添加13寸,15寸中心位置判断
1 个父辈
7f4d37f8
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
189 行增加
和
12 行删除
RC1266-AutoCountMachine/source/AutoCountClient/AutoCountClient.csproj
RC1266-AutoCountMachine/source/AutoCountClient/FrmAnalyze.Designer.cs
RC1266-AutoCountMachine/source/AutoCountClient/FrmAnalyze.cs
RC1266-AutoCountMachine/source/AutoCountClient/FrmAnalyze.resx
RC1266-AutoCountMachine/source/AutoCountClient/Program.cs
RC1266-AutoCountMachine/source/AutoCountClient/data/20220114PNList.pnlist
RC1266-AutoCountMachine/source/Common/Setting_Init.cs
RC1266-AutoCountMachine/source/DeviceLibrary/DeviceLibrary.csproj
RC1266-AutoCountMachine/source/DeviceLibrary/bean/BatchMoveBean_Partial.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/OutputEquip.cs
RC1266-AutoCountMachine/source/DeviceLibrary/bean/OutputEquip_Partial.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/manager/RobotManager.cs
RC1266-AutoCountMachine/source/DeviceLibrary/model/OldPNList.cs
RC1266-AutoCountMachine/source/AutoCountClient/AutoCountClient.csproj
查看文件 @
4c8d82e
...
@@ -284,6 +284,9 @@
...
@@ -284,6 +284,9 @@
</ProjectReference>
</ProjectReference>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<None Include="data\20220114PNList.pnlist">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Content Include="icon.ico" />
<Content Include="icon.ico" />
<Content Include="AuToRunManager.exe">
<Content Include="AuToRunManager.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
...
...
RC1266-AutoCountMachine/source/AutoCountClient/FrmAnalyze.Designer.cs
查看文件 @
4c8d82e
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
/// </summary>
/// </summary>
private
void
InitializeComponent
()
private
void
InitializeComponent
()
{
{
this
.
components
=
new
System
.
ComponentModel
.
Container
();
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
FrmAnalyze
));
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
FrmAnalyze
));
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
label4
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label4
=
new
System
.
Windows
.
Forms
.
Label
();
...
@@ -41,6 +42,8 @@
...
@@ -41,6 +42,8 @@
this
.
Column_Width
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_Width
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_Height
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_Height
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_ImageName
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_ImageName
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
contextMenuStrip1
=
new
System
.
Windows
.
Forms
.
ContextMenuStrip
(
this
.
components
);
this
.
toolStripMenuItem1
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
txtCode
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtCode
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnBack
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnBack
=
new
System
.
Windows
.
Forms
.
Button
();
...
@@ -53,6 +56,7 @@
...
@@ -53,6 +56,7 @@
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
panel2
.
SuspendLayout
();
this
.
panel2
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
dataGridView1
)).
BeginInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
dataGridView1
)).
BeginInit
();
this
.
contextMenuStrip1
.
SuspendLayout
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
// groupBox1
// groupBox1
...
@@ -135,6 +139,7 @@
...
@@ -135,6 +139,7 @@
this
.
dataGridView1
.
SelectionMode
=
System
.
Windows
.
Forms
.
DataGridViewSelectionMode
.
FullRowSelect
;
this
.
dataGridView1
.
SelectionMode
=
System
.
Windows
.
Forms
.
DataGridViewSelectionMode
.
FullRowSelect
;
this
.
dataGridView1
.
Size
=
new
System
.
Drawing
.
Size
(
1253
,
497
);
this
.
dataGridView1
.
Size
=
new
System
.
Drawing
.
Size
(
1253
,
497
);
this
.
dataGridView1
.
TabIndex
=
0
;
this
.
dataGridView1
.
TabIndex
=
0
;
this
.
dataGridView1
.
CellMouseDown
+=
new
System
.
Windows
.
Forms
.
DataGridViewCellMouseEventHandler
(
this
.
dataGridView1_CellMouseDown
);
//
//
// Column_Num
// Column_Num
//
//
...
@@ -185,6 +190,20 @@
...
@@ -185,6 +190,20 @@
this
.
Column_ImageName
.
ReadOnly
=
true
;
this
.
Column_ImageName
.
ReadOnly
=
true
;
this
.
Column_ImageName
.
Width
=
550
;
this
.
Column_ImageName
.
Width
=
550
;
//
//
// contextMenuStrip1
//
this
.
contextMenuStrip1
.
Items
.
AddRange
(
new
System
.
Windows
.
Forms
.
ToolStripItem
[]
{
this
.
toolStripMenuItem1
});
this
.
contextMenuStrip1
.
Name
=
"contextMenuStrip1"
;
this
.
contextMenuStrip1
.
Size
=
new
System
.
Drawing
.
Size
(
149
,
26
);
//
// toolStripMenuItem1
//
this
.
toolStripMenuItem1
.
Name
=
"toolStripMenuItem1"
;
this
.
toolStripMenuItem1
.
Size
=
new
System
.
Drawing
.
Size
(
148
,
22
);
this
.
toolStripMenuItem1
.
Text
=
"测试点料算法"
;
this
.
toolStripMenuItem1
.
Click
+=
new
System
.
EventHandler
(
this
.
toolStripMenuItem1_Click
);
//
// txtCode
// txtCode
//
//
this
.
txtCode
.
Location
=
new
System
.
Drawing
.
Point
(
623
,
28
);
this
.
txtCode
.
Location
=
new
System
.
Drawing
.
Point
(
623
,
28
);
...
@@ -275,6 +294,7 @@
...
@@ -275,6 +294,7 @@
this
.
groupBox1
.
PerformLayout
();
this
.
groupBox1
.
PerformLayout
();
this
.
panel2
.
ResumeLayout
(
false
);
this
.
panel2
.
ResumeLayout
(
false
);
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
dataGridView1
)).
EndInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
dataGridView1
)).
EndInit
();
this
.
contextMenuStrip1
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
}
}
...
@@ -302,5 +322,7 @@
...
@@ -302,5 +322,7 @@
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column_Height
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column_Height
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column_ImageName
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column_ImageName
;
private
System
.
Windows
.
Forms
.
Label
label4
;
private
System
.
Windows
.
Forms
.
Label
label4
;
private
System
.
Windows
.
Forms
.
ContextMenuStrip
contextMenuStrip1
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
toolStripMenuItem1
;
}
}
}
}
\ No newline at end of file
\ No newline at end of file
RC1266-AutoCountMachine/source/AutoCountClient/FrmAnalyze.cs
查看文件 @
4c8d82e
...
@@ -158,6 +158,37 @@ namespace OnlineStore.AutoCountClient
...
@@ -158,6 +158,37 @@ namespace OnlineStore.AutoCountClient
MessageBox
.
Show
(
"暂无数据可导出"
);
MessageBox
.
Show
(
"暂无数据可导出"
);
}
}
}
}
private
void
toolStripMenuItem1_Click
(
object
sender
,
EventArgs
e
)
{
var
rid
=
dataGridView1
.
SelectedRows
[
0
].
Cells
[
1
].
Value
.
ToString
();
var
datattime
=
DateTime
.
Parse
(
dataGridView1
.
SelectedRows
[
0
].
Cells
[
2
].
Value
.
ToString
());
var
basedir
=
Application
.
StartupPath
;
var
filepath
=
Path
.
Combine
(
basedir
,
"XRAY\\back\\"
);
filepath
=
Path
.
Combine
(
filepath
,
datattime
.
Year
.
ToString
()+
"-"
+
datattime
.
Month
.
ToString
());
filepath
=
Path
.
Combine
(
filepath
,
datattime
.
Day
.
ToString
());
filepath
=
Path
.
Combine
(
filepath
,
datattime
.
Hour
.
ToString
());
string
[]
files
=
Directory
.
GetFiles
(
filepath
,
$
"{rid.Replace("
;
","
-
")}*"
);
//D:\AutoCountClient\XRAY\back\2022-1\26\9
FrmLearning
frm
=
new
FrmLearning
();
frm
.
ImageFiles
=
files
;
frm
.
ImagePath
=
ParamManager
.
NoConfigPath
;
frm
.
Show
();
}
private
void
dataGridView1_CellMouseDown
(
object
sender
,
DataGridViewCellMouseEventArgs
e
)
{
if
(
e
.
Button
==
MouseButtons
.
Right
)
{
if
(
e
.
RowIndex
>=
0
)
{
//dataGridView1.ClearSelection();
//dataGridView1.Rows[e.RowIndex].Selected = true;
//dataGridView1.CurrentCell = dgItems.Rows[e.RowIndex].Cells[e.ColumnIndex];
contextMenuStrip1
.
Show
(
MousePosition
.
X
,
MousePosition
.
Y
);
}
}
}
}
}
...
...
RC1266-AutoCountMachine/source/AutoCountClient/FrmAnalyze.resx
查看文件 @
4c8d82e
...
@@ -138,6 +138,9 @@
...
@@ -138,6 +138,9 @@
<metadata name="Column_ImageName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="Column_ImageName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
<value>True</value>
</metadata>
</metadata>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>161, 17</value>
</metadata>
<metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
<value>17, 17</value>
</metadata>
</metadata>
...
...
RC1266-AutoCountMachine/source/AutoCountClient/Program.cs
查看文件 @
4c8d82e
...
@@ -54,8 +54,6 @@ namespace OnlineStore.AutoCountClient
...
@@ -54,8 +54,6 @@ namespace OnlineStore.AutoCountClient
[
STAThread
]
[
STAThread
]
static
void
Main
(
string
[]
Args
)
static
void
Main
(
string
[]
Args
)
{
{
//string code = " (X: 380,Y: 148) L00000000000WG9D19055;E20191230 0180;B7H.10618.5B1008082019123004000;R0080820191230E9600";
//string code = " (X: 380,Y: 148) L00000000000WG9D19055;E20191230 0180;B7H.10618.5B1008082019123004000;R0080820191230E9600";
//string r = CodeManager.ReplaceCode(code);
//string r = CodeManager.ReplaceCode(code);
Application
.
SetUnhandledExceptionMode
(
UnhandledExceptionMode
.
CatchException
);
Application
.
SetUnhandledExceptionMode
(
UnhandledExceptionMode
.
CatchException
);
...
...
RC1266-AutoCountMachine/source/AutoCountClient/data/20220114PNList.pnlist
0 → 100644
查看文件 @
4c8d82e
此文件的差异太大,无法显示。
RC1266-AutoCountMachine/source/Common/Setting_Init.cs
查看文件 @
4c8d82e
...
@@ -103,5 +103,8 @@ namespace OnlineStore.Common
...
@@ -103,5 +103,8 @@ namespace OnlineStore.Common
public
static
string
UseLabel
=
"UseLabel"
;
public
static
string
UseLabel
=
"UseLabel"
;
public
static
string
OutReelCenterX
=
"OutReelCenterX"
;
public
static
string
OutReelCenterX
=
"OutReelCenterX"
;
public
static
string
OutReelCenter7
=
"OutReelCenter7"
;
public
static
string
OutReelCenter13
=
"OutReelCenter13"
;
public
static
string
OutReelCenter15
=
"OutReelCenter15"
;
}
}
}
}
RC1266-AutoCountMachine/source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
4c8d82e
...
@@ -109,6 +109,7 @@
...
@@ -109,6 +109,7 @@
<Compile Include="manager\RFIDManagercs.cs" />
<Compile Include="manager\RFIDManagercs.cs" />
<Compile Include="manager\SServerManager.cs" />
<Compile Include="manager\SServerManager.cs" />
<Compile Include="model\AxisBean.cs" />
<Compile Include="model\AxisBean.cs" />
<Compile Include="model\OldPNList.cs" />
<Compile Include="model\WaitUtil.cs" />
<Compile Include="model\WaitUtil.cs" />
<Compile Include="deviceLibrary\halcon\CodeManager.cs" />
<Compile Include="deviceLibrary\halcon\CodeManager.cs" />
<Compile Include="deviceLibrary\IO\AIOBOX\AIOBOXManager.cs" />
<Compile Include="deviceLibrary\IO\AIOBOX\AIOBOXManager.cs" />
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/BatchMoveBean_Partial.cs
查看文件 @
4c8d82e
...
@@ -215,12 +215,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -215,12 +215,13 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
MoveParam
.
NgMsg
=
msg
;
MoveInfo
.
MoveParam
.
NgMsg
=
msg
;
//RobotManager.robot.sQLite.Insert(MoveInfo.MoveParam.WareCode, MoveInfo.MoveParam.PlateW, MoveInfo.MoveParam.PlateH, 0, MoveInfo.MoveParam.NgMsg);
//RobotManager.robot.sQLite.Insert(MoveInfo.MoveParam.WareCode, MoveInfo.MoveParam.PlateW, MoveInfo.MoveParam.PlateH, 0, MoveInfo.MoveParam.NgMsg);
}
}
}
}
else
{
else
{
MoveInfo
.
MoveParam
.
TargetPosType
=
1
;
MoveInfo
.
MoveParam
.
TargetPosType
=
1
;
}
}
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB10_ScanOK
);
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, "拍照扫码结束");
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/OutputEquip.cs
查看文件 @
4c8d82e
...
@@ -42,7 +42,45 @@ namespace OnlineStore.DeviceLibrary
...
@@ -42,7 +42,45 @@ namespace OnlineStore.DeviceLibrary
return
x
;
return
x
;
}
}
}
}
private
int
OutReelCenter7
{
get
{
var
x
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
OutReelCenter7
);
if
(
x
==
0
)
{
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
OutReelCenter7
,
2623
);
x
=
2623
;
}
return
x
;
}
}
private
int
OutReelCenter13
{
get
{
var
x
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
OutReelCenter13
);
if
(
x
==
0
)
{
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
OutReelCenter13
,
2623
);
x
=
2623
;
}
return
x
;
}
}
private
int
OutReelCenter15
{
get
{
var
x
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
OutReelCenter15
);
if
(
x
==
0
)
{
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
OutReelCenter15
,
2623
);
x
=
2623
;
}
return
x
;
}
}
public
OutputEquip
(
string
cid
,
OutputEquip_Config
config
)
public
OutputEquip
(
string
cid
,
OutputEquip_Config
config
)
{
{
var
xxx
=
OutReelCenterX
;
var
xxx
=
OutReelCenterX
;
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/OutputEquip_Partial.cs
查看文件 @
4c8d82e
...
@@ -197,6 +197,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -197,6 +197,11 @@ namespace OnlineStore.DeviceLibrary
if
(
MoveInfo
.
MoveParam
.
IsNgReel
)
if
(
MoveInfo
.
MoveParam
.
IsNgReel
)
{
{
if
(
IOValue
(
IO_Type
.
NGCylinder_Forward
).
Equals
(
IO_VALUE
.
HIGH
)
||
IOValue
(
IO_Type
.
NGCylinder_Back
).
Equals
(
IO_VALUE
.
LOW
))
{
WarnMsg
=
MoveInfo
.
Name
+
"NG气缸没有后退"
;
return
;
}
MoveInfo
.
NextMoveStep
(
StepEnum
.
OT07_MoveZToP2
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
OT07_MoveZToP2
);
WorkLog
(
"取料:取料Z轴到P2 "
,
0
);
WorkLog
(
"取料:取料Z轴到P2 "
,
0
);
MoveZAxis
.
AbsMove
(
MoveInfo
,
Config
.
GetMoveZP2
(
MoveInfo
.
MoveParam
.
PlateH
),
Config
.
MoveZ_P2Speed
);
MoveZAxis
.
AbsMove
(
MoveInfo
,
Config
.
GetMoveZP2
(
MoveInfo
.
MoveParam
.
PlateH
),
Config
.
MoveZ_P2Speed
);
...
@@ -294,6 +299,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -294,6 +299,12 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
OT05_GetImage
))
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
OT05_GetImage
))
{
{
if
(
IOValue
(
IO_Type
.
NGCylinder_Forward
).
Equals
(
IO_VALUE
.
HIGH
)
||
IOValue
(
IO_Type
.
NGCylinder_Back
).
Equals
(
IO_VALUE
.
LOW
))
{
WarnMsg
=
MoveInfo
.
Name
+
"NG气缸没有后退"
;
return
;
}
if
(
TakeReelRetay
==
0
&&
getPic
!=
null
&&
!
getPic
.
IsCompleted
)
if
(
TakeReelRetay
==
0
&&
getPic
!=
null
&&
!
getPic
.
IsCompleted
)
{
{
return
;
return
;
...
@@ -772,11 +783,17 @@ namespace OnlineStore.DeviceLibrary
...
@@ -772,11 +783,17 @@ namespace OnlineStore.DeviceLibrary
//rick切换贴标象限
//rick切换贴标象限
//圆心位置x2230,y2115
//圆心位置x2230,y2115
var
posL
=
false
;
var
posL
=
false
;
if
(
SecMoveInfo
.
MoveParam
.
PlateW
==
7
&&
SecMoveInfo
.
MoveParam
.
codePointer
.
Y
<
OutReelCenter7
)
if
(
SecMoveInfo
.
MoveParam
.
codePointer
.
X
>
OutReelCenterX
)
//2623)// && SecMoveInfo.MoveParam.codePointer.Y < 1225+80)
{
posL
=
true
;
posL
=
true
;
}
if
(
SecMoveInfo
.
MoveParam
.
PlateW
==
13
&&
SecMoveInfo
.
MoveParam
.
codePointer
.
Y
<
OutReelCenter13
)
posL
=
true
;
if
(
SecMoveInfo
.
MoveParam
.
PlateW
==
15
&&
SecMoveInfo
.
MoveParam
.
codePointer
.
Y
<
OutReelCenter15
)
posL
=
true
;
//if (SecMoveInfo.MoveParam.codePointer.X > OutReelCenterX)//2623)// && SecMoveInfo.MoveParam.codePointer.Y < 1225+80)
//{
// posL = true;
//}
//if (SecMoveInfo.MoveParam.codePointer.X > 2623 && SecMoveInfo.MoveParam.codePointer.Y < 1225 - 80)
//if (SecMoveInfo.MoveParam.codePointer.X > 2623 && SecMoveInfo.MoveParam.codePointer.Y < 1225 - 80)
//{
//{
// posL = true;
// posL = true;
...
@@ -792,7 +809,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -792,7 +809,7 @@ namespace OnlineStore.DeviceLibrary
{
{
LabelYAxis
.
AbsMove
(
SecMoveInfo
,
Config
.
LabelY_P3
,
Config
.
LabelY_P3Speed
);
LabelYAxis
.
AbsMove
(
SecMoveInfo
,
Config
.
LabelY_P3
,
Config
.
LabelY_P3Speed
);
}
}
SecWorkLog
(
"贴标: R轴到P3点 X;"
+
SecMoveInfo
.
MoveParam
.
codePointer
.
X
.
ToString
()
+
",Y:"
+
SecMoveInfo
.
MoveParam
.
codePointer
.
Y
.
ToString
()
+
",leftpos:"
+
posL
.
ToString
(),
1
);
SecWorkLog
(
"贴标: R轴到P3点 X;"
+
SecMoveInfo
.
MoveParam
.
codePointer
.
X
.
ToString
()
+
",Y:"
+
SecMoveInfo
.
MoveParam
.
codePointer
.
Y
.
ToString
()
+
",leftpos:"
+
posL
.
ToString
()
+
",PlateW:"
+
SecMoveInfo
.
MoveParam
.
PlateW
.
ToString
()+
",OutReelCenter7:"
+
OutReelCenter7
+
",OutReelCenter13:"
+
OutReelCenter13
+
",OutReelCenter15:"
+
OutReelCenter15
,
1
);
}
}
else
else
{
{
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip.cs
查看文件 @
4c8d82e
...
@@ -97,6 +97,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -97,6 +97,7 @@ namespace OnlineStore.DeviceLibrary
Directory
.
CreateDirectory
(
path2_out
);
Directory
.
CreateDirectory
(
path2_out
);
}
}
ParamManager
.
Init
();
ParamManager
.
Init
();
OldPNList
.
init
();
ResultMinCount
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
ResultMinCount
);
ResultMinCount
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
ResultMinCount
);
if
(
ResultMinCount
==
-
1
)
if
(
ResultMinCount
==
-
1
)
{
{
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/bean/X_RAY_Equip_Partial.cs
查看文件 @
4c8d82e
...
@@ -465,6 +465,23 @@ namespace OnlineStore.DeviceLibrary
...
@@ -465,6 +465,23 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
MoveParam
.
WareCount
=
count
;
MoveInfo
.
MoveParam
.
WareCount
=
count
;
Work_ReelInfo
.
WareCount
=
count
;
Work_ReelInfo
.
WareCount
=
count
;
}
}
var
splitindex
=
MoveInfo
.
MoveParam
.
WareCode
.
IndexOf
(
";"
);
if
(
splitindex
>
0
)
{
var
pn
=
MoveInfo
.
MoveParam
.
WareCode
.
Substring
(
0
,
splitindex
);
if
(!
OldPNList
.
HasPN
(
pn
))
{
WorkLog
(
" 【"
+
MoveInfo
.
MoveParam
.
WareCode
+
"】是以前没有过的PN:NG处理"
);
isNg
=
true
;
NgMsg
=
"未匹配算法的新PN盘,NG."
;
BackNGImg
(
Work_ReelInfo
.
WareCode
);
//MoveInfo.MoveParam.TargetPosType = 1;
//MoveInfo.MoveParam.IsNgReel = true;
//MoveInfo.MoveParam.NgMsg = "未匹配算法的新PN盘,NG.";
}
}
if
(!
isNg
&&
SServerManager
.
CanConnect
())
if
(!
isNg
&&
SServerManager
.
CanConnect
())
{
{
// string msg = "暂不上传";
// string msg = "暂不上传";
...
@@ -791,11 +808,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -791,11 +808,11 @@ namespace OnlineStore.DeviceLibrary
int
windowsize
=
param
.
WindowSize
;
;
int
windowsize
=
param
.
WindowSize
;
;
if
(
param
.
Sign
==
CountParam
.
SignType
.
AUTO
)
if
(
param
.
Sign
==
CountParam
.
SignType
.
AUTO
)
{
{
result
=
XrayImage
.
GetLocalCount
(
fileP
,
20
0
,
out
countStr
,
out
dst
);
result
=
XrayImage
.
GetLocalCount
(
fileP
,
5
0
,
out
countStr
,
out
dst
);
LogUtil
.
info
(
"GetCountResult "
+
type
+
" 调用 GetLocalCount 【"
+
fileP
+
"】【"
+
threshold
+
"】【"
+
windowsize
+
"】,返回【"
+
result
+
"】,结果【"
+
string
.
Join
(
","
,
countStr
)
+
"】"
);
LogUtil
.
info
(
"GetCountResult "
+
type
+
" 调用 GetLocalCount 【"
+
fileP
+
"】【"
+
threshold
+
"】【"
+
windowsize
+
"】,返回【"
+
result
+
"】,结果【"
+
string
.
Join
(
","
,
countStr
)
+
"】"
);
}
}
else
{
else
{
result
=
XrayImage
.
GetLocalCountIrregular
(
fileP
,
20
0
,
type
.
ToString
(),
out
countStr
,
out
dst
);
result
=
XrayImage
.
GetLocalCountIrregular
(
fileP
,
5
0
,
type
.
ToString
(),
out
countStr
,
out
dst
);
LogUtil
.
info
(
"GetCountResult "
+
type
+
" 调用 GetLocalCountIrregular 【"
+
fileP
+
"】【"
+
threshold
+
"】【"
+
windowsize
+
"】,返回【"
+
result
+
"】,结果【"
+
string
.
Join
(
","
,
countStr
)
+
"】"
);
LogUtil
.
info
(
"GetCountResult "
+
type
+
" 调用 GetLocalCountIrregular 【"
+
fileP
+
"】【"
+
threshold
+
"】【"
+
windowsize
+
"】,返回【"
+
result
+
"】,结果【"
+
string
.
Join
(
","
,
countStr
)
+
"】"
);
}
}
if
(
dst
!=
null
)
if
(
dst
!=
null
)
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/manager/ParamManager.cs
查看文件 @
4c8d82e
...
@@ -22,6 +22,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -22,6 +22,9 @@ namespace OnlineStore.DeviceLibrary
ConfigFilePath
=
Application
.
StartupPath
+
ConfigAppSettings
.
GetValue
(
Setting_Init
.
CounParamConfig
);
ConfigFilePath
=
Application
.
StartupPath
+
ConfigAppSettings
.
GetValue
(
Setting_Init
.
CounParamConfig
);
countParamMap
=
LoadParamMap
();
countParamMap
=
LoadParamMap
();
}
}
public
static
string
[]
GetPNlist
()
{
return
countParamMap
.
Keys
.
ToArray
();
}
public
static
string
GetSufanStr
(
int
type
)
public
static
string
GetSufanStr
(
int
type
)
{
{
SignType
sign
=
SignType
.
AUTO
;
SignType
sign
=
SignType
.
AUTO
;
...
@@ -96,6 +99,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -96,6 +99,7 @@ namespace OnlineStore.DeviceLibrary
{
{
try
try
{
{
OldPNList
.
AddOne
(
param
.
PN
);
if
(
countParamMap
.
ContainsKey
(
param
.
PN
))
if
(
countParamMap
.
ContainsKey
(
param
.
PN
))
{
{
countParamMap
[
param
.
PN
]
=
param
;
countParamMap
[
param
.
PN
]
=
param
;
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/manager/RobotManager.cs
查看文件 @
4c8d82e
...
@@ -24,6 +24,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -24,6 +24,7 @@ namespace OnlineStore.DeviceLibrary
public
static
RobotBean
robot
=
null
;
public
static
RobotBean
robot
=
null
;
public
static
Robot_Config
Config
=
null
;
public
static
Robot_Config
Config
=
null
;
public
static
Dictionary
<
int
,
DeviceConfig
>
allConfigMap
=
null
;
public
static
Dictionary
<
int
,
DeviceConfig
>
allConfigMap
=
null
;
public
RobotManager
()
public
RobotManager
()
{
{
}
}
...
...
RC1266-AutoCountMachine/source/DeviceLibrary/model/OldPNList.cs
0 → 100644
查看文件 @
4c8d82e
using
OnlineStore.Common
;
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
OnlineStore.DeviceLibrary
{
class
OldPNList
{
static
HashSet
<
string
>
pnlist
;
public
static
void
init
()
{
var
datafile
=
"data\\20220114PNList.pnlist"
;
if
(!
File
.
Exists
(
datafile
))
{
return
;
}
var
data
=
File
.
ReadAllLines
(
datafile
);
pnlist
=
new
HashSet
<
string
>(
data
);
LogUtil
.
info
(
$
"OldPNList加载数据{pnlist.Count}条"
);
pnlist
.
Union
(
ParamManager
.
GetPNlist
());
LogUtil
.
info
(
$
"OldPNList加载学习数据{pnlist.Count}条"
);
}
public
static
bool
HasPN
(
string
pn
)
{
return
pnlist
.
Contains
(
pn
);
}
public
static
void
AddOne
(
string
pn
)
{
if
(!
pnlist
.
Contains
(
pn
))
pnlist
.
Add
(
pn
);
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论