Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 227f7be8
由
LN
编写于
2019-12-02 12:02:04 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
fuwei
1 个父辈
8f31be6a
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
252 行增加
和
241 行删除
dll/CodeLibrary.dll
dll/halcon.dll
source/AssemblyLineClient/AssemblyLineClient.csproj
source/AssemblyLineClient/FrmEquipBase.cs
source/AssemblyLineClient/FrmFeedingEquip.Designer.cs
source/AssemblyLineClient/FrmLineStore.cs
source/AssemblyLineClient/FrmRFIPEdit.Designer.cs
source/AssemblyLineClient/FrmRFIPEdit.cs
source/DeviceLibrary/LineConfig/Config_FeedingEquip_3.csv
source/DeviceLibrary/assemblyLine/EquipBase.cs
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
source/DeviceLibrary/assemblyLine/LineBean.cs
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
source/DeviceLibrary/deviceLibrary/halcon/CodeManager - 复制.cs → source/DeviceLibrary/deviceLibrary/halcon/NCodeManager.cs
source/DeviceLibrary/model/StoreStep.cs
dll/CodeLibrary.dll
查看文件 @
227f7be
此文件类型无法预览
dll/halcon.dll
查看文件 @
227f7be
此文件太大,无法显示。
source/AssemblyLineClient/AssemblyLineClient.csproj
查看文件 @
227f7be
...
...
@@ -38,6 +38,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>true</Prefer32Bit>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
...
...
source/AssemblyLineClient/FrmEquipBase.cs
查看文件 @
227f7be
...
...
@@ -106,7 +106,8 @@ namespace OnlineStore.AssemblyLine
{
if
(
equipBase
.
runStatus
>=
LineRunStatus
.
HomeMoving
)
{
equipBase
.
StopRun
();
equipBase
.
StopRun
();
FormStatus
(
false
);
}
else
{
...
...
source/AssemblyLineClient/FrmFeedingEquip.Designer.cs
查看文件 @
227f7be
...
...
@@ -127,9 +127,9 @@
this
.
groupBox1
.
Controls
.
Add
(
this
.
txtWriteTime
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label5
);
this
.
groupBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
488
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
527
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
394
,
1
58
);
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
394
,
1
69
);
this
.
groupBox1
.
TabIndex
=
105
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"DO写入"
;
...
...
@@ -276,7 +276,7 @@
this
.
groupBox4
.
Controls
.
Add
(
this
.
tableLayoutPanel2
);
this
.
groupBox4
.
Location
=
new
System
.
Drawing
.
Point
(
488
,
6
);
this
.
groupBox4
.
Name
=
"groupBox4"
;
this
.
groupBox4
.
Size
=
new
System
.
Drawing
.
Size
(
240
,
475
);
this
.
groupBox4
.
Size
=
new
System
.
Drawing
.
Size
(
240
,
519
);
this
.
groupBox4
.
TabIndex
=
104
;
this
.
groupBox4
.
TabStop
=
false
;
this
.
groupBox4
.
Text
=
"DO列表"
;
...
...
@@ -293,7 +293,7 @@
this
.
tableLayoutPanel2
.
RowCount
=
2
;
this
.
tableLayoutPanel2
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
17F
));
this
.
tableLayoutPanel2
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
17F
));
this
.
tableLayoutPanel2
.
Size
=
new
System
.
Drawing
.
Size
(
229
,
4
55
);
this
.
tableLayoutPanel2
.
Size
=
new
System
.
Drawing
.
Size
(
229
,
4
99
);
this
.
tableLayoutPanel2
.
TabIndex
=
103
;
//
// groupBox3
...
...
@@ -303,7 +303,7 @@
this
.
groupBox3
.
Controls
.
Add
(
this
.
tableLayoutPanel1
);
this
.
groupBox3
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
6
);
this
.
groupBox3
.
Name
=
"groupBox3"
;
this
.
groupBox3
.
Size
=
new
System
.
Drawing
.
Size
(
240
,
475
);
this
.
groupBox3
.
Size
=
new
System
.
Drawing
.
Size
(
240
,
519
);
this
.
groupBox3
.
TabIndex
=
103
;
this
.
groupBox3
.
TabStop
=
false
;
this
.
groupBox3
.
Text
=
"DI列表"
;
...
...
@@ -320,7 +320,7 @@
this
.
tableLayoutPanel1
.
RowCount
=
2
;
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
17F
));
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
17F
));
this
.
tableLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
229
,
4
55
);
this
.
tableLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
229
,
4
99
);
this
.
tableLayoutPanel1
.
TabIndex
=
102
;
//
// groupBox5
...
...
@@ -345,7 +345,7 @@
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnFeedSideWay
);
this
.
groupBox5
.
Location
=
new
System
.
Drawing
.
Point
(
974
,
6
);
this
.
groupBox5
.
Name
=
"groupBox5"
;
this
.
groupBox5
.
Size
=
new
System
.
Drawing
.
Size
(
338
,
475
);
this
.
groupBox5
.
Size
=
new
System
.
Drawing
.
Size
(
338
,
519
);
this
.
groupBox5
.
TabIndex
=
255
;
this
.
groupBox5
.
TabStop
=
false
;
this
.
groupBox5
.
Text
=
"IO操作测试"
;
...
...
@@ -657,10 +657,10 @@
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
tabControl1
.
Controls
.
Add
(
this
.
tabPage1
);
this
.
tabControl1
.
Controls
.
Add
(
this
.
tabPage2
);
this
.
tabControl1
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
6
9
);
this
.
tabControl1
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
6
4
);
this
.
tabControl1
.
Name
=
"tabControl1"
;
this
.
tabControl1
.
SelectedIndex
=
0
;
this
.
tabControl1
.
Size
=
new
System
.
Drawing
.
Size
(
1327
,
687
);
this
.
tabControl1
.
Size
=
new
System
.
Drawing
.
Size
(
1327
,
731
);
this
.
tabControl1
.
TabIndex
=
257
;
//
// tabPage1
...
...
@@ -675,7 +675,7 @@
this
.
tabPage1
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
26
);
this
.
tabPage1
.
Name
=
"tabPage1"
;
this
.
tabPage1
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tabPage1
.
Size
=
new
System
.
Drawing
.
Size
(
1319
,
657
);
this
.
tabPage1
.
Size
=
new
System
.
Drawing
.
Size
(
1319
,
701
);
this
.
tabPage1
.
TabIndex
=
0
;
this
.
tabPage1
.
Text
=
" IO列表 "
;
this
.
tabPage1
.
UseVisualStyleBackColor
=
true
;
...
...
@@ -688,9 +688,9 @@
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblAgvInfo
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblInstoreList
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblThisSta
);
this
.
groupBox6
.
Location
=
new
System
.
Drawing
.
Point
(
403
,
488
);
this
.
groupBox6
.
Location
=
new
System
.
Drawing
.
Point
(
403
,
527
);
this
.
groupBox6
.
Name
=
"groupBox6"
;
this
.
groupBox6
.
Size
=
new
System
.
Drawing
.
Size
(
909
,
1
60
);
this
.
groupBox6
.
Size
=
new
System
.
Drawing
.
Size
(
909
,
1
71
);
this
.
groupBox6
.
TabIndex
=
278
;
this
.
groupBox6
.
TabStop
=
false
;
this
.
groupBox6
.
Text
=
"消息"
;
...
...
@@ -711,7 +711,7 @@
this
.
lblAgvInfo
.
AutoSize
=
true
;
this
.
lblAgvInfo
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblAgvInfo
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblAgvInfo
.
Location
=
new
System
.
Drawing
.
Point
(
2
37
,
29
);
this
.
lblAgvInfo
.
Location
=
new
System
.
Drawing
.
Point
(
2
48
,
25
);
this
.
lblAgvInfo
.
Name
=
"lblAgvInfo"
;
this
.
lblAgvInfo
.
Size
=
new
System
.
Drawing
.
Size
(
61
,
17
);
this
.
lblAgvInfo
.
TabIndex
=
276
;
...
...
@@ -736,7 +736,7 @@
this
.
groupBox7
.
Controls
.
Add
(
this
.
tableLayoutPanel3
);
this
.
groupBox7
.
Location
=
new
System
.
Drawing
.
Point
(
247
,
6
);
this
.
groupBox7
.
Name
=
"groupBox7"
;
this
.
groupBox7
.
Size
=
new
System
.
Drawing
.
Size
(
240
,
475
);
this
.
groupBox7
.
Size
=
new
System
.
Drawing
.
Size
(
240
,
519
);
this
.
groupBox7
.
TabIndex
=
279
;
this
.
groupBox7
.
TabStop
=
false
;
this
.
groupBox7
.
Text
=
"DI列表"
;
...
...
@@ -753,7 +753,7 @@
this
.
tableLayoutPanel3
.
RowCount
=
2
;
this
.
tableLayoutPanel3
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
17F
));
this
.
tableLayoutPanel3
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
17F
));
this
.
tableLayoutPanel3
.
Size
=
new
System
.
Drawing
.
Size
(
229
,
4
55
);
this
.
tableLayoutPanel3
.
Size
=
new
System
.
Drawing
.
Size
(
229
,
4
99
);
this
.
tableLayoutPanel3
.
TabIndex
=
102
;
//
// groupBox8
...
...
@@ -763,7 +763,7 @@
this
.
groupBox8
.
Controls
.
Add
(
this
.
tableLayoutPanel4
);
this
.
groupBox8
.
Location
=
new
System
.
Drawing
.
Point
(
728
,
6
);
this
.
groupBox8
.
Name
=
"groupBox8"
;
this
.
groupBox8
.
Size
=
new
System
.
Drawing
.
Size
(
240
,
475
);
this
.
groupBox8
.
Size
=
new
System
.
Drawing
.
Size
(
240
,
519
);
this
.
groupBox8
.
TabIndex
=
280
;
this
.
groupBox8
.
TabStop
=
false
;
this
.
groupBox8
.
Text
=
"DO列表"
;
...
...
@@ -780,7 +780,7 @@
this
.
tableLayoutPanel4
.
RowCount
=
2
;
this
.
tableLayoutPanel4
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
17F
));
this
.
tableLayoutPanel4
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
17F
));
this
.
tableLayoutPanel4
.
Size
=
new
System
.
Drawing
.
Size
(
229
,
4
55
);
this
.
tableLayoutPanel4
.
Size
=
new
System
.
Drawing
.
Size
(
229
,
4
99
);
this
.
tableLayoutPanel4
.
TabIndex
=
103
;
//
// tabPage2
...
...
@@ -1082,7 +1082,7 @@
this
.
panel1
.
Controls
.
Add
(
this
.
btnReset
);
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
2
,
1
);
this
.
panel1
.
Name
=
"panel1"
;
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
1326
,
6
8
);
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
1326
,
6
2
);
this
.
panel1
.
TabIndex
=
258
;
//
// chbMoveStop
...
...
@@ -1126,7 +1126,7 @@
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
17F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1338
,
7
62
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1338
,
7
97
);
this
.
Controls
.
Add
(
this
.
panel1
);
this
.
Controls
.
Add
(
this
.
tabControl1
);
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
...
...
source/AssemblyLineClient/FrmLineStore.cs
查看文件 @
227f7be
...
...
@@ -258,7 +258,7 @@ namespace OnlineStore.AssemblyLine
IOManager
.
instance
.
CloseAllConnection
();
//AIManager.CloseConnect();
ACServerManager
.
CloseAllPort
();
CodeManager
.
CloseAllCamera
();
//
CodeManager.CloseAllCamera();
RFIDManager
.
CloseAllConnection
();
//this.Close();
System
.
Environment
.
Exit
(
System
.
Environment
.
ExitCode
);
...
...
source/AssemblyLineClient/FrmRFIPEdit.Designer.cs
查看文件 @
227f7be
...
...
@@ -42,12 +42,11 @@
this
.
numNum
=
new
System
.
Windows
.
Forms
.
NumericUpDown
();
this
.
btnFind
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
lblHas
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtSearchIp
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
btnSearch
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
cmbLocalIp
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
label5
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
l
abel6
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
l
istView1
=
new
System
.
Windows
.
Forms
.
ListView
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
btnClose
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnConnect
=
new
System
.
Windows
.
Forms
.
Button
();
...
...
@@ -61,7 +60,7 @@
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label1
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
80
,
36
);
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
28
,
36
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
107
,
20
);
this
.
label1
.
TabIndex
=
0
;
...
...
@@ -72,7 +71,7 @@
//
this
.
btnNext
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnNext
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnNext
.
Location
=
new
System
.
Drawing
.
Point
(
405
,
17
8
);
this
.
btnNext
.
Location
=
new
System
.
Drawing
.
Point
(
270
,
16
8
);
this
.
btnNext
.
Name
=
"btnNext"
;
this
.
btnNext
.
Size
=
new
System
.
Drawing
.
Size
(
120
,
45
);
this
.
btnNext
.
TabIndex
=
275
;
...
...
@@ -85,7 +84,7 @@
//
this
.
btnBack
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnBack
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnBack
.
Location
=
new
System
.
Drawing
.
Point
(
412
,
238
);
this
.
btnBack
.
Location
=
new
System
.
Drawing
.
Point
(
196
,
286
);
this
.
btnBack
.
Name
=
"btnBack"
;
this
.
btnBack
.
Size
=
new
System
.
Drawing
.
Size
(
120
,
45
);
this
.
btnBack
.
TabIndex
=
274
;
...
...
@@ -96,19 +95,23 @@
// txtIP
//
this
.
txtIP
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtIP
.
Location
=
new
System
.
Drawing
.
Point
(
1
96
,
82
);
this
.
txtIP
.
Location
=
new
System
.
Drawing
.
Point
(
1
44
,
82
);
this
.
txtIP
.
Name
=
"txtIP"
;
this
.
txtIP
.
Size
=
new
System
.
Drawing
.
Size
(
233
,
26
);
this
.
txtIP
.
Size
=
new
System
.
Drawing
.
Size
(
189
,
26
);
this
.
txtIP
.
TabIndex
=
276
;
//
// comboxType
//
this
.
comboxType
.
DropDownHeight
=
200
;
this
.
comboxType
.
DropDownStyle
=
System
.
Windows
.
Forms
.
ComboBoxStyle
.
DropDownList
;
this
.
comboxType
.
DropDownWidth
=
200
;
this
.
comboxType
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
comboxType
.
FormattingEnabled
=
true
;
this
.
comboxType
.
Location
=
new
System
.
Drawing
.
Point
(
196
,
33
);
this
.
comboxType
.
IntegralHeight
=
false
;
this
.
comboxType
.
ItemHeight
=
20
;
this
.
comboxType
.
Location
=
new
System
.
Drawing
.
Point
(
144
,
33
);
this
.
comboxType
.
Name
=
"comboxType"
;
this
.
comboxType
.
Size
=
new
System
.
Drawing
.
Size
(
233
,
28
);
this
.
comboxType
.
Size
=
new
System
.
Drawing
.
Size
(
189
,
28
);
this
.
comboxType
.
TabIndex
=
277
;
this
.
comboxType
.
SelectedIndexChanged
+=
new
System
.
EventHandler
(
this
.
comboxType_SelectedIndexChanged
);
//
...
...
@@ -117,7 +120,7 @@
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label2
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
109
,
84
);
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
57
,
84
);
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
78
,
20
);
this
.
label2
.
TabIndex
=
278
;
...
...
@@ -136,7 +139,7 @@
"C"
,
"D"
,
"E"
});
this
.
comType
.
Location
=
new
System
.
Drawing
.
Point
(
1
96
,
129
);
this
.
comType
.
Location
=
new
System
.
Drawing
.
Point
(
1
44
,
129
);
this
.
comType
.
Name
=
"comType"
;
this
.
comType
.
Size
=
new
System
.
Drawing
.
Size
(
120
,
28
);
this
.
comType
.
TabIndex
=
280
;
...
...
@@ -146,7 +149,7 @@
this
.
label3
.
AutoSize
=
true
;
this
.
label3
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label3
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
122
,
132
);
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
70
,
132
);
this
.
label3
.
Name
=
"label3"
;
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
20
);
this
.
label3
.
TabIndex
=
279
;
...
...
@@ -157,7 +160,7 @@
//
this
.
btnRead
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnRead
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnRead
.
Location
=
new
System
.
Drawing
.
Point
(
28
6
,
238
);
this
.
btnRead
.
Location
=
new
System
.
Drawing
.
Point
(
19
6
,
238
);
this
.
btnRead
.
Name
=
"btnRead"
;
this
.
btnRead
.
Size
=
new
System
.
Drawing
.
Size
(
120
,
45
);
this
.
btnRead
.
TabIndex
=
281
;
...
...
@@ -170,7 +173,7 @@
this
.
label4
.
AutoSize
=
true
;
this
.
label4
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label4
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
label4
.
Location
=
new
System
.
Drawing
.
Point
(
136
,
180
);
this
.
label4
.
Location
=
new
System
.
Drawing
.
Point
(
84
,
180
);
this
.
label4
.
Name
=
"label4"
;
this
.
label4
.
Size
=
new
System
.
Drawing
.
Size
(
51
,
20
);
this
.
label4
.
TabIndex
=
282
;
...
...
@@ -180,7 +183,7 @@
// numNum
//
this
.
numNum
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
numNum
.
Location
=
new
System
.
Drawing
.
Point
(
1
96
,
178
);
this
.
numNum
.
Location
=
new
System
.
Drawing
.
Point
(
1
44
,
178
);
this
.
numNum
.
Name
=
"numNum"
;
this
.
numNum
.
Size
=
new
System
.
Drawing
.
Size
(
120
,
26
);
this
.
numNum
.
TabIndex
=
283
;
...
...
@@ -189,7 +192,7 @@
//
this
.
btnFind
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnFind
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnFind
.
Location
=
new
System
.
Drawing
.
Point
(
405
,
12
9
);
this
.
btnFind
.
Location
=
new
System
.
Drawing
.
Point
(
270
,
11
9
);
this
.
btnFind
.
Name
=
"btnFind"
;
this
.
btnFind
.
Size
=
new
System
.
Drawing
.
Size
(
120
,
45
);
this
.
btnFind
.
TabIndex
=
284
;
...
...
@@ -203,7 +206,7 @@
this
.
lblHas
.
AutoSize
=
true
;
this
.
lblHas
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblHas
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblHas
.
Location
=
new
System
.
Drawing
.
Point
(
531
,
178
);
this
.
lblHas
.
Location
=
new
System
.
Drawing
.
Point
(
339
,
216
);
this
.
lblHas
.
Name
=
"lblHas"
;
this
.
lblHas
.
Size
=
new
System
.
Drawing
.
Size
(
51
,
20
);
this
.
lblHas
.
TabIndex
=
285
;
...
...
@@ -211,20 +214,11 @@
this
.
lblHas
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblHas
.
Visible
=
false
;
//
// txtSearchIp
//
this
.
txtSearchIp
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtSearchIp
.
Location
=
new
System
.
Drawing
.
Point
(
196
,
87
);
this
.
txtSearchIp
.
Multiline
=
true
;
this
.
txtSearchIp
.
Name
=
"txtSearchIp"
;
this
.
txtSearchIp
.
Size
=
new
System
.
Drawing
.
Size
(
233
,
244
);
this
.
txtSearchIp
.
TabIndex
=
286
;
//
// btnSearch
//
this
.
btnSearch
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnSearch
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnSearch
.
Location
=
new
System
.
Drawing
.
Point
(
446
,
68
);
this
.
btnSearch
.
Location
=
new
System
.
Drawing
.
Point
(
28
,
136
);
this
.
btnSearch
.
Name
=
"btnSearch"
;
this
.
btnSearch
.
Size
=
new
System
.
Drawing
.
Size
(
120
,
45
);
this
.
btnSearch
.
TabIndex
=
287
;
...
...
@@ -237,9 +231,9 @@
this
.
cmbLocalIp
.
DropDownStyle
=
System
.
Windows
.
Forms
.
ComboBoxStyle
.
DropDownList
;
this
.
cmbLocalIp
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
cmbLocalIp
.
FormattingEnabled
=
true
;
this
.
cmbLocalIp
.
Location
=
new
System
.
Drawing
.
Point
(
196
,
38
);
this
.
cmbLocalIp
.
Location
=
new
System
.
Drawing
.
Point
(
28
,
80
);
this
.
cmbLocalIp
.
Name
=
"cmbLocalIp"
;
this
.
cmbLocalIp
.
Size
=
new
System
.
Drawing
.
Size
(
233
,
28
);
this
.
cmbLocalIp
.
Size
=
new
System
.
Drawing
.
Size
(
120
,
28
);
this
.
cmbLocalIp
.
TabIndex
=
288
;
//
// label5
...
...
@@ -247,7 +241,7 @@
this
.
label5
.
AutoSize
=
true
;
this
.
label5
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label5
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
label5
.
Location
=
new
System
.
Drawing
.
Point
(
81
,
38
);
this
.
label5
.
Location
=
new
System
.
Drawing
.
Point
(
14
,
36
);
this
.
label5
.
Name
=
"label5"
;
this
.
label5
.
Size
=
new
System
.
Drawing
.
Size
(
106
,
20
);
this
.
label5
.
TabIndex
=
289
;
...
...
@@ -256,34 +250,35 @@
//
// groupBox1
//
this
.
groupBox1
.
Controls
.
Add
(
this
.
l
abel6
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
l
istView1
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
cmbLocalIp
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label5
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
txtSearchIp
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnSearch
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
22
,
12
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
61
4
,
350
);
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
36
4
,
350
);
this
.
groupBox1
.
TabIndex
=
290
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"搜索RFID"
;
//
// l
abel6
// l
istView1
//
this
.
label6
.
AutoSize
=
true
;
this
.
label6
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label6
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
label6
.
Location
=
new
System
.
Drawing
.
Point
(
108
,
90
);
this
.
label6
.
Name
=
"label6"
;
this
.
label6
.
Size
=
new
System
.
Drawing
.
Size
(
79
,
20
);
this
.
label6
.
TabIndex
=
290
;
this
.
label6
.
Text
=
"搜素结果:"
;
this
.
label6
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
listView1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
listView1
.
FullRowSelect
=
true
;
this
.
listView1
.
HideSelection
=
false
;
this
.
listView1
.
Location
=
new
System
.
Drawing
.
Point
(
173
,
22
);
this
.
listView1
.
Name
=
"listView1"
;
this
.
listView1
.
Size
=
new
System
.
Drawing
.
Size
(
174
,
309
);
this
.
listView1
.
TabIndex
=
291
;
this
.
listView1
.
UseCompatibleStateImageBehavior
=
false
;
this
.
listView1
.
View
=
System
.
Windows
.
Forms
.
View
.
List
;
//
// groupBox2
//
this
.
groupBox2
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
groupBox2
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnClose
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnConnect
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
comboxType
);
...
...
@@ -299,9 +294,9 @@
this
.
groupBox2
.
Controls
.
Add
(
this
.
label3
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label4
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
comType
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
22
,
368
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
392
,
12
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
614
,
301
);
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
412
,
350
);
this
.
groupBox2
.
TabIndex
=
291
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"读取RFID"
;
...
...
@@ -310,7 +305,7 @@
//
this
.
btnClose
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnClose
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnClose
.
Location
=
new
System
.
Drawing
.
Point
(
160
,
238
);
this
.
btnClose
.
Location
=
new
System
.
Drawing
.
Point
(
34
,
286
);
this
.
btnClose
.
Name
=
"btnClose"
;
this
.
btnClose
.
Size
=
new
System
.
Drawing
.
Size
(
120
,
45
);
this
.
btnClose
.
TabIndex
=
287
;
...
...
@@ -334,7 +329,7 @@
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
17F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
662
,
693
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
816
,
374
);
this
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
...
...
@@ -365,14 +360,13 @@
private
System
.
Windows
.
Forms
.
NumericUpDown
numNum
;
private
System
.
Windows
.
Forms
.
Button
btnFind
;
private
System
.
Windows
.
Forms
.
Label
lblHas
;
private
System
.
Windows
.
Forms
.
TextBox
txtSearchIp
;
private
System
.
Windows
.
Forms
.
Button
btnSearch
;
private
System
.
Windows
.
Forms
.
ComboBox
cmbLocalIp
;
private
System
.
Windows
.
Forms
.
Label
label5
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox2
;
private
System
.
Windows
.
Forms
.
Label
label6
;
private
System
.
Windows
.
Forms
.
Button
btnConnect
;
private
System
.
Windows
.
Forms
.
Button
btnClose
;
private
System
.
Windows
.
Forms
.
ListView
listView1
;
}
}
\ No newline at end of file
source/AssemblyLineClient/FrmRFIPEdit.cs
查看文件 @
227f7be
...
...
@@ -140,9 +140,8 @@ namespace OnlineStore.AssemblyLine
string
[]
ip
=
RFIDManager
.
SearchIP
(
text
);
foreach
(
string
ipstr
in
ip
)
{
txtSearchIp
.
Text
+=
ipstr
+
"\n"
;
listView1
.
Items
.
Add
(
ipstr
)
;
}
// txtSearchIp.Text = ip;
}
private
void
btnConnect_Click
(
object
sender
,
EventArgs
e
)
...
...
source/DeviceLibrary/LineConfig/Config_FeedingEquip_3.csv
查看文件 @
227f7be
...
...
@@ -8,9 +8,9 @@ PRO,0,上料流水线入口AGV小车站号名称,AgvInName,D1,,,,,
PRO,0,上料流水线出口AGV小车站号名称,AgvOutName,D2,,,,,
,,,,,,,,,
AXIS,0,提升上料轴,Batch_Axis,5,COM5,0,,,
PRO,0,提升上料轴上升待机点 P1,BatchAxisP1,
10000
,,,,,
PRO,0,提升上料轴下降位置P2,BatchAxisP2,
-200
0,,,,,
PRO,0,提升上料缓慢上升目标位置P3,BatchAxisP3,
10000
,,,,,
PRO,0,提升上料轴上升待机点 P1,BatchAxisP1,
23453414
,,,,,
PRO,0,提升上料轴下降位置P2,BatchAxisP2,0,,,,,
PRO,0,提升上料缓慢上升目标位置P3,BatchAxisP3,
22283118
,,,,,
PRO,0,提升上料轴目标速度,BatchAxis_TargetSpeed,1500,,,,,
PRO,0,提升上料轴加速度,BatchAxis_AddSpeed,400,,,,,
PRO,0,提升上料轴减速度,BatchAxis_DelSpeed,400,,,,,
...
...
@@ -24,8 +24,8 @@ PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,5000,,,,,
,,,,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,6,COM5,0,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,2000,,,,,
PRO,0,移栽上下轴P2移栽机构下降位置,UpDownP2List,0=180000
;
,,,,,
PRO,0,移栽上下轴P3取料位置,UpDownAxisP3,
2
0000,,,,,
PRO,0,移栽上下轴P2移栽机构下降位置,UpDownP2List,0=180000,,,,,
PRO,0,移栽上下轴P3取料位置,UpDownAxisP3,
31
0000,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
PRO,0,移栽上下轴减速度,UpdownAxis_DelSpeed,400,,,,,
...
...
source/DeviceLibrary/assemblyLine/EquipBase.cs
查看文件 @
227f7be
...
...
@@ -130,7 +130,7 @@ namespace OnlineStore.DeviceLibrary
lastProTimer
=
DateTime
.
Now
;
try
{
if
(
IsDebug
)
if
(
IsDebug
&&
runStatus
<=
LineRunStatus
.
Wait
)
{
isInPro
=
false
;
return
;
...
...
@@ -461,6 +461,8 @@ namespace OnlineStore.DeviceLibrary
msg
+=
"preTrayNum:"
.
PadRight
(
tLength
,
' '
)
+
preTrayNum
+
"\n"
;
msg
+=
"currTrayNum:"
.
PadRight
(
tLength
,
' '
)
+
currTrayNum
+
"\n"
;
msg
+=
"runStatus:"
.
PadRight
(
tLength
,
' '
)
+
runStatus
+
"\n"
;
msg
+=
"lineStatus:"
.
PadRight
(
tLength
,
' '
)
+
lineStatus
+
"\n"
;
msg
+=
"MoveType:"
.
PadRight
(
tLength
,
' '
)
+
MoveInfo
.
MoveType
+
"\n"
;
msg
+=
"MoveStep:"
.
PadRight
(
tLength
,
' '
)
+
MoveInfo
.
MoveStep
+
"\n"
;
msg
+=
"SMoveType:"
.
PadRight
(
tLength
,
' '
)
+
SecondMoveInfo
.
MoveType
+
"\n"
;
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
查看文件 @
227f7be
...
...
@@ -64,8 +64,10 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NewMove
(
LineMoveType
.
ReturnHome
);
StartReset
();
if
(
isDebug
)
{
LogInfo
(
"开始调试,启动定时器 "
);
mainTimer
.
Start
();
}
return
true
;
...
...
@@ -138,12 +140,14 @@ namespace OnlineStore.DeviceLibrary
break
;
case
LineMoveStep
.
FR_01_MoveCylinder_Up
:
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_02_BatchAxisHome
);
MoveInfo
.
TimeOutSeconds
=
120
;
LogInfo
(
MoveInfo
.
MoveType
+
":"
+
MoveInfo
.
MoveStep
+
":提升伺服回原点,升降伺服回原点,所有阻挡气缸上升"
);
BatchAxis
.
HomeMove
(
MoveInfo
);
UpdownAxis
.
HomeMove
(
MoveInfo
);
break
;
case
LineMoveStep
.
FR_02_BatchAxisHome
:
LogInfo
(
MoveInfo
.
MoveType
+
":FR_03_BatchAxisToP2:提升伺服下降到P2点,升降伺服上升到待机点"
);
MoveInfo
.
TimeOutSeconds
=
120
;
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_03_BatchAxisToP2
);
BatchAxis
.
AbsMove
(
MoveInfo
,
Config
.
BatchAxisP2
,
Config
.
BatchAxis_P2Speed
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpDownAxisP1
,
Config
.
UpdownAxis_P1Speed
);
...
...
@@ -182,9 +186,9 @@ namespace OnlineStore.DeviceLibrary
case
LineMoveStep
.
FR_08_MoveCylinder_Slack
:
if
(
MoveCylineCanTakeOrGive
())
{
LogInfo
(
MoveInfo
.
MoveType
+
":FR_09_MoveCylinder_
Take: 上料横移气缸取
料端SOL"
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_09_MoveCylinder_
Tak
e
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_
Give
,
IO_Type
.
SL_MoveCylinder_Tak
e
);
LogInfo
(
MoveInfo
.
MoveType
+
":FR_09_MoveCylinder_
Give: 上料横移气缸放
料端SOL"
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_09_MoveCylinder_
Giv
e
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_
Take
,
IO_Type
.
SL_MoveCylinder_Giv
e
);
}
else
{
...
...
@@ -193,7 +197,7 @@ namespace OnlineStore.DeviceLibrary
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
}
break
;
case
LineMoveStep
.
FR_09_MoveCylinder_
Tak
e
:
case
LineMoveStep
.
FR_09_MoveCylinder_
Giv
e
:
LogInfo
(
MoveInfo
.
MoveType
+
":FR_10_OutTopCylinder_Down: 出口顶升下降SOL"
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_10_OutTopCylinder_Down
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_OutTopCylinder_Up
,
IO_Type
.
SL_OutTopCylinder_Down
);
...
...
@@ -201,6 +205,7 @@ namespace OnlineStore.DeviceLibrary
case
LineMoveStep
.
FR_10_OutTopCylinder_Down
:
LogInfo
(
"重置完成!"
);
runStatus
=
LineRunStatus
.
Runing
;
lineStatus
=
LineStatus
.
StoreOnline
;
MoveInfo
.
EndMove
();
break
;
default
:
break
;
...
...
@@ -283,7 +288,7 @@ namespace OnlineStore.DeviceLibrary
{
StartCheckFixture
();
}
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
)
&&
Config
.
IsCanOut
.
Equals
(
false
))
if
(
Config
.
IsCanOut
.
Equals
(
false
))
{
StartInStoreP
();
}
...
...
source/DeviceLibrary/assemblyLine/LineBean.cs
查看文件 @
227f7be
...
...
@@ -212,15 +212,20 @@ namespace OnlineStore.DeviceLibrary
public
string
CanStart
()
{
if
(
MoveEquipMap
==
null
)
{
return
"启动失败:未加载到移栽信息"
;
}
if
(
IsDebug
)
{
return
""
;
}
if
(!
canStart
)
{
return
"启动失败:设备未初始化完成"
;
}
if
(
MoveEquipMap
==
null
)
{
return
"启动失败:未加载到移栽信息"
;
}
if
(
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
))
{
return
"启动失败:急停未开"
;
...
...
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
查看文件 @
227f7be
...
...
@@ -14,7 +14,7 @@ namespace OnlineStore.DeviceLibrary
public
bool
LineCanRun
()
{
if
(
IOValue
(
IO_Type
.
Line_Run
).
Equals
(
IO_VALUE
.
HIGH
))
//
if (IOValue(IO_Type.Line_Run).Equals(IO_VALUE.HIGH))
{
return
true
;
}
...
...
@@ -23,6 +23,10 @@ namespace OnlineStore.DeviceLibrary
public
bool
CanProcessLine
(
bool
isCheckSleep
=
true
)
{
if
(
IsDebug
)
{
return
true
;
}
if
(
LineCanRun
()
&&
IOManager
.
IOValue
(
IO_Type
.
DriveMotor_Run1
,
0
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOManager
.
IOValue
(
IO_Type
.
DriveMotor_Run2
,
0
).
Equals
(
IO_VALUE
.
HIGH
)
&&
...
...
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
查看文件 @
227f7be
using
CodeLibrary
;
using
CodeLibrary
;
using
OnlineStore.Common
;
using
System
;
using
System.Collections.Generic
;
...
...
@@ -6,7 +6,7 @@ using System.Drawing;
using
System.IO
;
using
System.Linq
;
using
System.Runtime.ExceptionServices
;
using
System.T
hreading.Tasks
;
using
System.T
ext
;
using
System.Windows.Forms
;
namespace
OnlineStore.DeviceLibrary
...
...
@@ -53,7 +53,7 @@ namespace OnlineStore.DeviceLibrary
{
try
{
CodeLibrary
.
HIKC
Manager
.
Load
();
CodeLibrary
.
HIKC
amera
.
Instance
.
Load
();
}
catch
(
Exception
ex
)
{
...
...
@@ -61,14 +61,14 @@ namespace OnlineStore.DeviceLibrary
}
try
{
CodeLibrary
.
BaslerC
Manager
.
Load
();
CodeLibrary
.
BaslerC
amera
.
Instance
.
Load
();
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"加载Basler相机出错:"
+
ex
.
ToString
());
}
}
string
[]
names
=
CodeLibrary
.
HIKC
Manager
.
CameraName
;
string
[]
names
=
CodeLibrary
.
HIKC
amera
.
Instance
.
CameraName
;
if
(
names
!=
null
)
...
...
@@ -79,7 +79,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
"加载到HIK相机:"
+
name
);
}
}
names
=
CodeLibrary
.
BaslerC
Manager
.
CameraName
;
names
=
CodeLibrary
.
BaslerC
amera
.
Instance
.
CameraName
;
if
(
names
!=
null
)
{
balserNameList
.
AddRange
(
names
);
...
...
@@ -89,23 +89,10 @@ namespace OnlineStore.DeviceLibrary
}
}
}
public
static
void
CloseCamera
(
string
name
)
public
static
void
CloseCamera
()
{
//BaslerCamera.Instance.Close();
//HIKCamera.Instance.Close();
if
(
HIKCManager
.
CameraName
.
Contains
(
name
))
{
HIKCManager
.
Close
(
name
);
}
else
{
BaslerCManager
.
Close
(
name
);
}
}
public
static
void
CloseAllCamera
()
{
HIKCManager
.
CloseAll
();
BaslerCManager
.
CloseAll
();
BaslerCamera
.
Instance
.
Close
();
HIKCamera
.
Instance
.
Close
();
}
public
static
Bitmap
GetCamerImage
(
string
cameraName
)
...
...
@@ -115,15 +102,13 @@ namespace OnlineStore.DeviceLibrary
{
if
(
balserNameList
.
Contains
(
cameraName
))
{
bool
result
=
true
;
if
(!
BaslerCManager
.
IsOpen
(
cameraName
))
{
result
=
BaslerCManager
.
Open
(
cameraName
);
}
bool
result
=
BaslerCamera
.
Instance
.
Open
(
cameraName
);
// LogUtil.info("打开相机:" + cameraName + "(" + result + ")");
if
(
result
)
{
bitm
=
BaslerCManager
.
GrabOne
(
cameraName
);
BaslerCamera
.
Instance
.
GrabOne
();
bitm
=
BaslerCamera
.
Instance
.
Image
;
BaslerCamera
.
Instance
.
Close
();
}
else
{
...
...
@@ -132,16 +117,13 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
hikNameList
.
Contains
(
cameraName
))
{
bool
result
=
true
;
if
(!
HIKCManager
.
IsOpen
(
cameraName
))
{
result
=
HIKCManager
.
Open
(
cameraName
);
}
bool
result
=
HIKCamera
.
Instance
.
Open
(
cameraName
);
// LogUtil.info("打开相机:" + cameraName + "(" + result + ")");
if
(
result
)
{
bitm
=
HIKCManager
.
GrabOne
(
cameraName
);
HIKCamera
.
Instance
.
GrabOne
();
bitm
=
HIKCamera
.
Instance
.
Image
;
HIKCamera
.
Instance
.
Close
();
}
else
{
...
...
@@ -167,56 +149,54 @@ namespace OnlineStore.DeviceLibrary
}
[
HandleProcessCorruptedStateExceptions
]
public
static
List
<
string
>
CameraScan
(
List
<
string
>
cameraNameList
)
public
static
List
<
string
>
CameraScan
(
List
<
string
>
cameraNameList
=
null
)
{
List
<
string
>
codeList
=
new
List
<
string
>();
List
<
string
>
codeList
=
new
List
<
string
>();
//List<CodeInfo> allCodeList = new List<CodeInfo>();
if
(
cameraNameList
==
null
)
{
return
codeList
;
}
try
{
List
<
Task
<
List
<
CodeInfo
>>>
taskList
=
new
List
<
Task
<
List
<
CodeInfo
>>>();
foreach
(
string
cameraName
in
cameraNameList
)
{
Task
.
Factory
.
StartNew
(
delegate
(
)
using
(
Bitmap
bitmap
=
GetCamerImage
(
cameraName
)
)
{
using
(
Bitmap
bitmap
=
GetCamerImage
(
cameraName
)
)
if
(
bitmap
==
null
)
{
if
(
bitmap
==
null
)
LogUtil
.
error
(
" 摄像机【"
+
cameraName
+
"】获取图片失败,关闭相机"
);
CloseCamera
();
continue
;
}
LogUtil
.
debug
(
" 摄像机【"
+
cameraName
+
"】获取图片完成"
);
System
.
Threading
.
Thread
.
Sleep
(
1
);
HalconDotNet
.
HObject
ho_Image
=
HDCodeHelper
.
Bitmap2HObjectBpp24
(
bitmap
);
LogUtil
.
debug
(
" 摄像机【"
+
cameraName
+
"】转换图片完成,开始扫码"
);
List
<
CodeInfo
>
cc
=
new
List
<
CodeInfo
>();
foreach
(
string
codeType
in
codeTypeList
)
{
//判断是否是一维码
if
(
codeType
.
ToLower
().
Equals
(
"barcode"
))
{
LogUtil
.
error
(
" 摄像机【"
+
cameraName
+
"】获取图片失败,关闭相机"
);
CloseCamera
(
cameraName
);
return
;
cc
=
HDCodeHelper
.
DecodeBarCode
(
ho_Image
);
}
LogUtil
.
debug
(
" 摄像机【"
+
cameraName
+
"】获取图片完成"
);
System
.
Threading
.
Thread
.
Sleep
(
1
);
HalconDotNet
.
HObject
ho_Image
=
HDCodeHelper
.
Bitmap2HObjectBpp24
(
bitmap
);
LogUtil
.
debug
(
" 摄像机【"
+
cameraName
+
"】转换图片完成,开始扫码"
);
List
<
CodeInfo
>
cc
=
new
List
<
CodeInfo
>();
foreach
(
string
codeType
in
codeTypeList
)
else
{
Task
<
List
<
CodeInfo
>>
typeDeCode
=
new
Task
<
List
<
CodeInfo
>>(
delegate
()
cc
=
HDCodeHelper
.
DecodeCode
(
ho_Image
,
1
,
GetCodeParamFilePath
(
codeType
),
codeType
);
}
if
(
cc
.
Count
>
0
)
{
string
r
=
""
;
foreach
(
CodeInfo
c
in
cc
)
{
return
DeCode
(
ho_Image
,
codeType
);
})
;
taskList
.
Add
(
typeDeCode
);
typeDeCode
.
Start
(
);
codeList
.
Add
(
c
.
CodeStr
);
r
=
r
+
"##"
+
c
.
CodeStr
;
}
LogUtil
.
debug
(
" 【"
+
cameraName
+
"】【"
+
codeType
+
"】扫码完成:"
+
r
);
}
}
});
}
Task
.
WaitAll
(
taskList
.
ToArray
());
foreach
(
Task
<
List
<
CodeInfo
>>
t
in
taskList
)
{
List
<
CodeInfo
>
cc
=
t
.
Result
;
if
(
cc
.
Count
>
0
)
{
string
r
=
""
;
foreach
(
CodeInfo
c
in
cc
)
{
codeList
.
Add
(
c
.
CodeStr
);
r
=
r
+
"##"
+
c
.
CodeStr
;
}
}
}
}
...
...
@@ -228,34 +208,10 @@ namespace OnlineStore.DeviceLibrary
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"扫码出错:"
+
ex
.
ToString
());
}
}
return
codeList
;
}
private
static
List
<
CodeInfo
>
DeCode
(
HalconDotNet
.
HObject
ho_Image
,
string
codeType
)
{
List
<
CodeInfo
>
cc
=
new
List
<
CodeInfo
>();
//判断是否是一维码
if
(
codeType
.
ToLower
().
Equals
(
"barcode"
))
{
cc
=
HDCodeHelper
.
DecodeBarCode
(
ho_Image
);
}
else
{
cc
=
HDCodeHelper
.
DecodeCode
(
ho_Image
,
1
,
GetCodeParamFilePath
(
codeType
),
codeType
);
}
//if (cc.Count > 0)
//{
// string r = "";
// foreach (CodeInfo c in cc)
// {
// codeList.Add(c.CodeStr);
// r = r + "##" + c.CodeStr;
// }
// LogUtil.debug(" 【" + cameraName + "】【" + codeType + "】扫码完成:" + r);
//}
return
cc
;
}
public
static
string
GetCodeParamFilePath
(
string
codePath
)
{
...
...
source/DeviceLibrary/deviceLibrary/halcon/
CodeManager - 复制
.cs
→
source/DeviceLibrary/deviceLibrary/halcon/
NCodeManager
.cs
查看文件 @
227f7be
using
CodeLibrary
;
using
CodeLibrary
;
using
OnlineStore.Common
;
using
System
;
using
System.Collections.Generic
;
...
...
@@ -6,7 +6,7 @@ using System.Drawing;
using
System.IO
;
using
System.Linq
;
using
System.Runtime.ExceptionServices
;
using
System.T
ext
;
using
System.T
hreading.Tasks
;
using
System.Windows.Forms
;
namespace
OnlineStore.DeviceLibrary
...
...
@@ -53,7 +53,7 @@ namespace OnlineStore.DeviceLibrary
{
try
{
CodeLibrary
.
HIKC
amera
.
Instance
.
Load
();
CodeLibrary
.
HIKC
Manager
.
Load
();
}
catch
(
Exception
ex
)
{
...
...
@@ -61,14 +61,14 @@ namespace OnlineStore.DeviceLibrary
}
try
{
CodeLibrary
.
BaslerC
amera
.
Instance
.
Load
();
CodeLibrary
.
BaslerC
Manager
.
Load
();
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"加载Basler相机出错:"
+
ex
.
ToString
());
}
}
string
[]
names
=
CodeLibrary
.
HIKC
amera
.
Instance
.
CameraName
;
string
[]
names
=
CodeLibrary
.
HIKC
Manager
.
CameraName
;
if
(
names
!=
null
)
...
...
@@ -79,7 +79,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
"加载到HIK相机:"
+
name
);
}
}
names
=
CodeLibrary
.
BaslerC
amera
.
Instance
.
CameraName
;
names
=
CodeLibrary
.
BaslerC
Manager
.
CameraName
;
if
(
names
!=
null
)
{
balserNameList
.
AddRange
(
names
);
...
...
@@ -89,10 +89,23 @@ namespace OnlineStore.DeviceLibrary
}
}
}
public
static
void
CloseCamera
()
public
static
void
CloseCamera
(
string
name
)
{
BaslerCamera
.
Instance
.
Close
();
HIKCamera
.
Instance
.
Close
();
//BaslerCamera.Instance.Close();
//HIKCamera.Instance.Close();
if
(
HIKCManager
.
CameraName
.
Contains
(
name
))
{
HIKCManager
.
Close
(
name
);
}
else
{
BaslerCManager
.
Close
(
name
);
}
}
public
static
void
CloseAllCamera
()
{
HIKCManager
.
CloseAll
();
BaslerCManager
.
CloseAll
();
}
public
static
Bitmap
GetCamerImage
(
string
cameraName
)
...
...
@@ -102,13 +115,15 @@ namespace OnlineStore.DeviceLibrary
{
if
(
balserNameList
.
Contains
(
cameraName
))
{
bool
result
=
BaslerCamera
.
Instance
.
Open
(
cameraName
);
bool
result
=
true
;
if
(!
BaslerCManager
.
IsOpen
(
cameraName
))
{
result
=
BaslerCManager
.
Open
(
cameraName
);
}
// LogUtil.info("打开相机:" + cameraName + "(" + result + ")");
if
(
result
)
{
BaslerCamera
.
Instance
.
GrabOne
();
bitm
=
BaslerCamera
.
Instance
.
Image
;
BaslerCamera
.
Instance
.
Close
();
bitm
=
BaslerCManager
.
GrabOne
(
cameraName
);
}
else
{
...
...
@@ -117,13 +132,16 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
hikNameList
.
Contains
(
cameraName
))
{
bool
result
=
HIKCamera
.
Instance
.
Open
(
cameraName
);
bool
result
=
true
;
if
(!
HIKCManager
.
IsOpen
(
cameraName
))
{
result
=
HIKCManager
.
Open
(
cameraName
);
}
// LogUtil.info("打开相机:" + cameraName + "(" + result + ")");
if
(
result
)
{
HIKCamera
.
Instance
.
GrabOne
();
bitm
=
HIKCamera
.
Instance
.
Image
;
HIKCamera
.
Instance
.
Close
();
bitm
=
HIKCManager
.
GrabOne
(
cameraName
);
}
else
{
...
...
@@ -149,54 +167,56 @@ namespace OnlineStore.DeviceLibrary
}
[
HandleProcessCorruptedStateExceptions
]
public
static
List
<
string
>
CameraScan
(
List
<
string
>
cameraNameList
=
null
)
public
static
List
<
string
>
CameraScan
(
List
<
string
>
cameraNameList
)
{
List
<
string
>
codeList
=
new
List
<
string
>();
//List<CodeInfo> allCodeList = new List<CodeInfo>();
if
(
cameraNameList
==
null
)
{
return
codeList
;
}
List
<
string
>
codeList
=
new
List
<
string
>();
try
{
List
<
Task
<
List
<
CodeInfo
>>>
taskList
=
new
List
<
Task
<
List
<
CodeInfo
>>>();
foreach
(
string
cameraName
in
cameraNameList
)
{
using
(
Bitmap
bitmap
=
GetCamerImage
(
cameraName
)
)
Task
.
Factory
.
StartNew
(
delegate
(
)
{
if
(
bitmap
==
null
)
using
(
Bitmap
bitmap
=
GetCamerImage
(
cameraName
)
)
{
LogUtil
.
error
(
" 摄像机【"
+
cameraName
+
"】获取图片失败,关闭相机"
);
CloseCamera
();
continue
;
}
LogUtil
.
debug
(
" 摄像机【"
+
cameraName
+
"】获取图片完成"
);
System
.
Threading
.
Thread
.
Sleep
(
1
);
HalconDotNet
.
HObject
ho_Image
=
HDCodeHelper
.
Bitmap2HObjectBpp24
(
bitmap
);
LogUtil
.
debug
(
" 摄像机【"
+
cameraName
+
"】转换图片完成,开始扫码"
);
List
<
CodeInfo
>
cc
=
new
List
<
CodeInfo
>();
foreach
(
string
codeType
in
codeTypeList
)
{
//判断是否是一维码
if
(
codeType
.
ToLower
().
Equals
(
"barcode"
))
if
(
bitmap
==
null
)
{
cc
=
HDCodeHelper
.
DecodeBarCode
(
ho_Image
);
LogUtil
.
error
(
" 摄像机【"
+
cameraName
+
"】获取图片失败,关闭相机"
);
CloseCamera
(
cameraName
);
return
;
}
else
{
cc
=
HDCodeHelper
.
DecodeCode
(
ho_Image
,
1
,
GetCodeParamFilePath
(
codeType
),
codeType
);
}
if
(
cc
.
Count
>
0
)
LogUtil
.
debug
(
" 摄像机【"
+
cameraName
+
"】获取图片完成"
);
System
.
Threading
.
Thread
.
Sleep
(
1
);
HalconDotNet
.
HObject
ho_Image
=
HDCodeHelper
.
Bitmap2HObjectBpp24
(
bitmap
);
LogUtil
.
debug
(
" 摄像机【"
+
cameraName
+
"】转换图片完成,开始扫码"
);
List
<
CodeInfo
>
cc
=
new
List
<
CodeInfo
>();
foreach
(
string
codeType
in
codeTypeList
)
{
string
r
=
""
;
foreach
(
CodeInfo
c
in
cc
)
Task
<
List
<
CodeInfo
>>
typeDeCode
=
new
Task
<
List
<
CodeInfo
>>(
delegate
()
{
codeList
.
Add
(
c
.
CodeStr
);
r
=
r
+
"##"
+
c
.
CodeStr
;
}
LogUtil
.
debug
(
" 【"
+
cameraName
+
"】【"
+
codeType
+
"】扫码完成:"
+
r
);
return
DeCode
(
ho_Image
,
codeType
);
})
;
taskList
.
Add
(
typeDeCode
);
typeDeCode
.
Start
(
);
}
}
});
}
Task
.
WaitAll
(
taskList
.
ToArray
());
foreach
(
Task
<
List
<
CodeInfo
>>
t
in
taskList
)
{
List
<
CodeInfo
>
cc
=
t
.
Result
;
if
(
cc
.
Count
>
0
)
{
string
r
=
""
;
foreach
(
CodeInfo
c
in
cc
)
{
codeList
.
Add
(
c
.
CodeStr
);
r
=
r
+
"##"
+
c
.
CodeStr
;
}
}
}
}
...
...
@@ -208,10 +228,34 @@ namespace OnlineStore.DeviceLibrary
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"扫码出错:"
+
ex
.
ToString
());
}
}
return
codeList
;
}
private
static
List
<
CodeInfo
>
DeCode
(
HalconDotNet
.
HObject
ho_Image
,
string
codeType
)
{
List
<
CodeInfo
>
cc
=
new
List
<
CodeInfo
>();
//判断是否是一维码
if
(
codeType
.
ToLower
().
Equals
(
"barcode"
))
{
cc
=
HDCodeHelper
.
DecodeBarCode
(
ho_Image
);
}
else
{
cc
=
HDCodeHelper
.
DecodeCode
(
ho_Image
,
1
,
GetCodeParamFilePath
(
codeType
),
codeType
);
}
//if (cc.Count > 0)
//{
// string r = "";
// foreach (CodeInfo c in cc)
// {
// codeList.Add(c.CodeStr);
// r = r + "##" + c.CodeStr;
// }
// LogUtil.debug(" 【" + cameraName + "】【" + codeType + "】扫码完成:" + r);
//}
return
cc
;
}
public
static
string
GetCodeParamFilePath
(
string
codePath
)
{
...
...
source/DeviceLibrary/model/StoreStep.cs
查看文件 @
227f7be
...
...
@@ -507,7 +507,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
///上料装置:上料横移气缸取料端SOL
/// </summary>
FR_09_MoveCylinder_
Tak
e
=
10009
,
FR_09_MoveCylinder_
Giv
e
=
10009
,
/// <summary>
///上料装置:出口顶升下降SOL
/// </summary>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论