Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 43eeaace
由
几米阳光
编写于
2019-04-10 11:18:37 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加调试屏蔽功能
1 个父辈
d404a67a
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
247 行增加
和
189 行删除
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/记录.txt
source/DeviceLibrary/halcon/CodeManager.cs
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
43eeaac
...
...
@@ -26,7 +26,7 @@
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
FrmStoreBox
));
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
lblWarnMsg
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
group
Box5
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
group
Axis
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
label6
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label5
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnReadHomeSingle
=
new
System
.
Windows
.
Forms
.
Button
();
...
...
@@ -90,7 +90,7 @@
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label43
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label42
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
group
Box2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
group
Inout
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
lblTemp
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblMsg
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnSavePosition
=
new
System
.
Windows
.
Forms
.
Button
();
...
...
@@ -174,7 +174,7 @@
this
.
显示
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripMenuItem1
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
notifyIcon1
=
new
System
.
Windows
.
Forms
.
NotifyIcon
(
this
.
components
);
this
.
group
Box4
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
group
ComAxis
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
label20
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtComAPosition
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lblShuoKeMsg
=
new
System
.
Windows
.
Forms
.
Label
();
...
...
@@ -234,13 +234,14 @@
this
.
button4
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnClearL
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnLogDebug
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox5
.
SuspendLayout
();
this
.
btnDebug
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupAxis
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
group
Box2
.
SuspendLayout
();
this
.
group
Inout
.
SuspendLayout
();
this
.
menuStrip1
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
this
.
contextMenuStrip1
.
SuspendLayout
();
this
.
group
Box4
.
SuspendLayout
();
this
.
group
ComAxis
.
SuspendLayout
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabPage3
.
SuspendLayout
();
this
.
tabPage1
.
SuspendLayout
();
...
...
@@ -267,59 +268,60 @@
this
.
lblWarnMsg
.
TabIndex
=
224
;
this
.
lblWarnMsg
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
//
// group
Box5
// group
Axis
//
this
.
group
Box5
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
this
.
group
Axis
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
groupBox5
.
Controls
.
Add
(
this
.
label6
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label5
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnReadHomeSingle
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
txtHomeSingle
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
chbAutoRead
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label16
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label15
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label14
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label11
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
txtHomeStatus
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
button2
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label10
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
txtBusyStatus
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
button1
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label2
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
txtAlarmStatus
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnGetAlarm
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnReadPosition
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
lblServerOn
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label7
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label8
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnOpenAxis
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnCloseAxis
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
lblCountPulse
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
txtASpeed
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
lblOutPulse
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label47
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnAxisVMove
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnAxisRMove
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnAxisReturnHome
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnAxisAMove
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
Bt_ClearCounter
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnComAlarmClear
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
txtAPosition
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label48
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnAxisStop
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
txtAxisValue
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
txtAxisDeviceName
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label45
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label46
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
cmbAxisList
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label49
);
this
.
groupBox5
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox5
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
6
);
this
.
groupBox5
.
Name
=
"groupBox5"
;
this
.
groupBox5
.
Size
=
new
System
.
Drawing
.
Size
(
543
,
351
);
this
.
groupBox5
.
TabIndex
=
216
;
this
.
groupBox5
.
TabStop
=
false
;
this
.
groupBox5
.
Text
=
"伺服运动"
;
this
.
groupAxis
.
Controls
.
Add
(
this
.
label6
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label5
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
btnReadHomeSingle
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
txtHomeSingle
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
chbAutoRead
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label16
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label15
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label14
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label11
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
txtHomeStatus
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
button2
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label10
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
txtBusyStatus
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
button1
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label2
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
txtAlarmStatus
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
btnGetAlarm
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
btnReadPosition
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
lblServerOn
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label7
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label8
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
btnOpenAxis
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
btnCloseAxis
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
lblCountPulse
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
txtASpeed
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
lblOutPulse
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label47
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
btnAxisVMove
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
btnAxisRMove
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
btnAxisReturnHome
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
btnAxisAMove
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
Bt_ClearCounter
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
btnComAlarmClear
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
txtAPosition
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label48
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
btnAxisStop
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
txtAxisValue
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
txtAxisDeviceName
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label45
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label46
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
cmbAxisList
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label49
);
this
.
groupAxis
.
Enabled
=
false
;
this
.
groupAxis
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupAxis
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
6
);
this
.
groupAxis
.
Name
=
"groupAxis"
;
this
.
groupAxis
.
Size
=
new
System
.
Drawing
.
Size
(
543
,
351
);
this
.
groupAxis
.
TabIndex
=
216
;
this
.
groupAxis
.
TabStop
=
false
;
this
.
groupAxis
.
Text
=
"伺服运动"
;
//
// label6
//
...
...
@@ -1010,56 +1012,57 @@
this
.
label42
.
TabIndex
=
24
;
this
.
label42
.
Text
=
"编码器计数:"
;
//
// groupBox2
//
this
.
groupBox2
.
Controls
.
Add
(
this
.
lblTemp
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
lblMsg
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnSavePosition
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnStartAuTo
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label9
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtJiange
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtComP1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtInOutP2
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtInOutP1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtMiddleP1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtUpDownP7
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtUpDownP8
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtUpDownP1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtUpDownP2
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtComP3
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtComP2
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtInOutP3
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtMiddleP2
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtUpDownP5
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtUpDownP6
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
cmbPosition
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label21
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtUpDownP3
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnInStore
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnOutStore
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtUpDownP4
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnComP1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnInOutP2
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnInOutP1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnMiddleP1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnUpDownP7
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnUpDownP8
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnUpDownP1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnUpDownP2
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnComP3
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnComP2
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnInOutP3
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnMiddleP2
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnUpDownP5
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnUpDownP6
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnUpDownP3
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnUpDownP4
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
236
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
496
,
502
);
this
.
groupBox2
.
TabIndex
=
100
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"料仓操作"
;
// groupInout
//
this
.
groupInout
.
Controls
.
Add
(
this
.
lblTemp
);
this
.
groupInout
.
Controls
.
Add
(
this
.
lblMsg
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnSavePosition
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnStartAuTo
);
this
.
groupInout
.
Controls
.
Add
(
this
.
label9
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtJiange
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtComP1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtInOutP2
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtInOutP1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtMiddleP1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtUpDownP7
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtUpDownP8
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtUpDownP1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtUpDownP2
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtComP3
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtComP2
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtInOutP3
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtMiddleP2
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtUpDownP5
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtUpDownP6
);
this
.
groupInout
.
Controls
.
Add
(
this
.
cmbPosition
);
this
.
groupInout
.
Controls
.
Add
(
this
.
label21
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtUpDownP3
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnInStore
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnOutStore
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtUpDownP4
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnComP1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnInOutP2
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnInOutP1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnMiddleP1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP7
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP8
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP2
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnComP3
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnComP2
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnInOutP3
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnMiddleP2
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP5
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP6
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP3
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP4
);
this
.
groupInout
.
Enabled
=
false
;
this
.
groupInout
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
236
);
this
.
groupInout
.
Name
=
"groupInout"
;
this
.
groupInout
.
Size
=
new
System
.
Drawing
.
Size
(
496
,
502
);
this
.
groupInout
.
TabIndex
=
100
;
this
.
groupInout
.
TabStop
=
false
;
this
.
groupInout
.
Text
=
"料仓操作"
;
//
// lblTemp
//
...
...
@@ -2014,40 +2017,41 @@
this
.
notifyIcon1
.
Text
=
"料仓客户端"
;
this
.
notifyIcon1
.
Visible
=
true
;
//
// group
Box4
// group
ComAxis
//
this
.
group
Box4
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
this
.
group
ComAxis
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
groupBox4
.
Controls
.
Add
(
this
.
label20
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
txtComAPosition
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
lblShuoKeMsg
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
btnRelMove
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
txtAddr
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
label18
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
btnGetPosition
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
cmbHomeType
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
label13
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
label17
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
txtSpeed
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
btnVolMove
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
btnClose
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
btnOpen
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
btnStatusSearch
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
label19
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
txtLinePosition
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
btnHomeMove
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
btnClearPosition
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
btnStop
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
btnLineAbsMove
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
label25
);
this
.
groupBox4
.
Controls
.
Add
(
this
.
comboBoxPortName
);
this
.
groupBox4
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox4
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
8
);
this
.
groupBox4
.
Name
=
"groupBox4"
;
this
.
groupBox4
.
Size
=
new
System
.
Drawing
.
Size
(
544
,
285
);
this
.
groupBox4
.
TabIndex
=
271
;
this
.
groupBox4
.
TabStop
=
false
;
this
.
groupBox4
.
Text
=
"压紧轴"
;
this
.
groupComAxis
.
Controls
.
Add
(
this
.
label20
);
this
.
groupComAxis
.
Controls
.
Add
(
this
.
txtComAPosition
);
this
.
groupComAxis
.
Controls
.
Add
(
this
.
lblShuoKeMsg
);
this
.
groupComAxis
.
Controls
.
Add
(
this
.
btnRelMove
);
this
.
groupComAxis
.
Controls
.
Add
(
this
.
txtAddr
);
this
.
groupComAxis
.
Controls
.
Add
(
this
.
label18
);
this
.
groupComAxis
.
Controls
.
Add
(
this
.
btnGetPosition
);
this
.
groupComAxis
.
Controls
.
Add
(
this
.
cmbHomeType
);
this
.
groupComAxis
.
Controls
.
Add
(
this
.
label13
);
this
.
groupComAxis
.
Controls
.
Add
(
this
.
label17
);
this
.
groupComAxis
.
Controls
.
Add
(
this
.
txtSpeed
);
this
.
groupComAxis
.
Controls
.
Add
(
this
.
btnVolMove
);
this
.
groupComAxis
.
Controls
.
Add
(
this
.
btnClose
);
this
.
groupComAxis
.
Controls
.
Add
(
this
.
btnOpen
);
this
.
groupComAxis
.
Controls
.
Add
(
this
.
btnStatusSearch
);
this
.
groupComAxis
.
Controls
.
Add
(
this
.
label19
);
this
.
groupComAxis
.
Controls
.
Add
(
this
.
txtLinePosition
);
this
.
groupComAxis
.
Controls
.
Add
(
this
.
btnHomeMove
);
this
.
groupComAxis
.
Controls
.
Add
(
this
.
btnClearPosition
);
this
.
groupComAxis
.
Controls
.
Add
(
this
.
btnStop
);
this
.
groupComAxis
.
Controls
.
Add
(
this
.
btnLineAbsMove
);
this
.
groupComAxis
.
Controls
.
Add
(
this
.
label25
);
this
.
groupComAxis
.
Controls
.
Add
(
this
.
comboBoxPortName
);
this
.
groupComAxis
.
Enabled
=
false
;
this
.
groupComAxis
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupComAxis
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
8
);
this
.
groupComAxis
.
Name
=
"groupComAxis"
;
this
.
groupComAxis
.
Size
=
new
System
.
Drawing
.
Size
(
544
,
285
);
this
.
groupComAxis
.
TabIndex
=
271
;
this
.
groupComAxis
.
TabStop
=
false
;
this
.
groupComAxis
.
Text
=
"压紧轴"
;
//
// label20
//
...
...
@@ -2345,7 +2349,7 @@
//
// tabPage1
//
this
.
tabPage1
.
Controls
.
Add
(
this
.
group
Box5
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
group
Axis
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
tabPage1
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
29
);
this
.
tabPage1
.
Name
=
"tabPage1"
;
...
...
@@ -2358,7 +2362,7 @@
// tabPage2
//
this
.
tabPage2
.
Controls
.
Add
(
this
.
groupBox7
);
this
.
tabPage2
.
Controls
.
Add
(
this
.
group
Box4
);
this
.
tabPage2
.
Controls
.
Add
(
this
.
group
ComAxis
);
this
.
tabPage2
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
29
);
this
.
tabPage2
.
Name
=
"tabPage2"
;
this
.
tabPage2
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
...
...
@@ -2568,6 +2572,7 @@
//
// tabPage5
//
this
.
tabPage5
.
Controls
.
Add
(
this
.
btnDebug
);
this
.
tabPage5
.
Controls
.
Add
(
this
.
btnAxisOff
);
this
.
tabPage5
.
Controls
.
Add
(
this
.
btnAxisOn
);
this
.
tabPage5
.
Controls
.
Add
(
this
.
btnScanCode
);
...
...
@@ -2693,6 +2698,17 @@
this
.
btnLogDebug
.
UseVisualStyleBackColor
=
true
;
this
.
btnLogDebug
.
Click
+=
new
System
.
EventHandler
(
this
.
开启
DEBUGToolStripMenuItem_Click
);
//
// btnDebug
//
this
.
btnDebug
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnDebug
.
Location
=
new
System
.
Drawing
.
Point
(
806
,
4
);
this
.
btnDebug
.
Name
=
"btnDebug"
;
this
.
btnDebug
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
39
);
this
.
btnDebug
.
TabIndex
=
13
;
this
.
btnDebug
.
Text
=
"启用调试"
;
this
.
btnDebug
.
UseVisualStyleBackColor
=
true
;
this
.
btnDebug
.
Click
+=
new
System
.
EventHandler
(
this
.
btnDebug_Click
);
//
// FrmStoreBox
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
...
...
@@ -2701,7 +2717,7 @@
this
.
Controls
.
Add
(
this
.
tabControl2
);
this
.
Controls
.
Add
(
this
.
tabControl1
);
this
.
Controls
.
Add
(
this
.
groupBox3
);
this
.
Controls
.
Add
(
this
.
group
Box2
);
this
.
Controls
.
Add
(
this
.
group
Inout
);
this
.
Controls
.
Add
(
this
.
menuStrip1
);
this
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
...
...
@@ -2713,19 +2729,19 @@
this
.
FormClosed
+=
new
System
.
Windows
.
Forms
.
FormClosedEventHandler
(
this
.
FrmStoreBox_FormClosed
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
FrmTest_Load
);
this
.
Shown
+=
new
System
.
EventHandler
(
this
.
FrmStoreBox_Shown
);
this
.
group
Box5
.
ResumeLayout
(
false
);
this
.
group
Box5
.
PerformLayout
();
this
.
group
Axis
.
ResumeLayout
(
false
);
this
.
group
Axis
.
PerformLayout
();
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
groupBox1
.
PerformLayout
();
this
.
group
Box2
.
ResumeLayout
(
false
);
this
.
group
Box2
.
PerformLayout
();
this
.
group
Inout
.
ResumeLayout
(
false
);
this
.
group
Inout
.
PerformLayout
();
this
.
menuStrip1
.
ResumeLayout
(
false
);
this
.
menuStrip1
.
PerformLayout
();
this
.
groupBox3
.
ResumeLayout
(
false
);
this
.
groupBox3
.
PerformLayout
();
this
.
contextMenuStrip1
.
ResumeLayout
(
false
);
this
.
group
Box4
.
ResumeLayout
(
false
);
this
.
group
Box4
.
PerformLayout
();
this
.
group
ComAxis
.
ResumeLayout
(
false
);
this
.
group
ComAxis
.
PerformLayout
();
this
.
tabControl1
.
ResumeLayout
(
false
);
this
.
tabPage3
.
ResumeLayout
(
false
);
this
.
tabPage1
.
ResumeLayout
(
false
);
...
...
@@ -2745,7 +2761,7 @@
#
endregion
private
System
.
Windows
.
Forms
.
Timer
timer1
;
private
System
.
Windows
.
Forms
.
GroupBox
group
Box2
;
private
System
.
Windows
.
Forms
.
GroupBox
group
Inout
;
private
System
.
Windows
.
Forms
.
Button
btnOutStore
;
private
System
.
Windows
.
Forms
.
Button
btnInStore
;
public
System
.
Windows
.
Forms
.
TextBox
txtUpDownP3
;
...
...
@@ -2760,7 +2776,7 @@
private
System
.
Windows
.
Forms
.
TextBox
lblOutPulse
;
private
System
.
Windows
.
Forms
.
TextBox
lblCountPulse
;
private
System
.
Windows
.
Forms
.
Button
btnComAlarmClear
;
private
System
.
Windows
.
Forms
.
GroupBox
group
Box5
;
private
System
.
Windows
.
Forms
.
GroupBox
group
Axis
;
public
System
.
Windows
.
Forms
.
Button
btnComP1
;
public
System
.
Windows
.
Forms
.
TextBox
txtComP1
;
public
System
.
Windows
.
Forms
.
Button
btnInOutP2
;
...
...
@@ -2894,7 +2910,7 @@
private
System
.
Windows
.
Forms
.
TextBox
txtHomeSingle
;
private
System
.
Windows
.
Forms
.
Label
label5
;
private
System
.
Windows
.
Forms
.
Label
label6
;
private
System
.
Windows
.
Forms
.
GroupBox
group
Box4
;
private
System
.
Windows
.
Forms
.
GroupBox
group
ComAxis
;
private
System
.
Windows
.
Forms
.
Button
btnRelMove
;
private
System
.
Windows
.
Forms
.
TextBox
txtAddr
;
private
System
.
Windows
.
Forms
.
Label
label18
;
...
...
@@ -2954,6 +2970,7 @@
private
System
.
Windows
.
Forms
.
Button
button4
;
private
System
.
Windows
.
Forms
.
Button
btnClearL
;
private
System
.
Windows
.
Forms
.
Button
btnStoreStart
;
private
System
.
Windows
.
Forms
.
Button
btnDebug
;
}
}
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
43eeaac
...
...
@@ -1472,5 +1472,30 @@ namespace OnlineStore.ACSingleStore
store
.
KNDIOMove
(
IO_Type
.
Door_Up
,
IO_VALUE
.
LOW
);
store
.
KNDIOMove
(
IO_Type
.
Door_Down
,
IO_VALUE
.
HIGH
);
}
private
void
DebugStatus
(
bool
status
)
{
if
(
status
)
{
btnDebug
.
Text
=
"禁用调试"
;
}
else
{
btnDebug
.
Text
=
"启用调试"
;
}
groupAxis
.
Enabled
=
status
;
groupComAxis
.
Enabled
=
status
;
groupInout
.
Enabled
=
status
;
}
private
void
btnDebug_Click
(
object
sender
,
EventArgs
e
)
{
if
(
btnDebug
.
Text
.
Equals
(
"启用调试"
))
{
DebugStatus
(
true
);
}
else
{
DebugStatus
(
false
);
}
}
}
}
source/ACSingleStore/记录.txt
查看文件 @
43eeaac
...
...
@@ -66,7 +66,8 @@ statusBean.addServerData("needInAfterOut",needInAfterOut);
为true时,盘点出库后需要接着扫码入库
2.Data中增加数据:"inTimeout","alarm" 盘点入库超时报警
20190319
增加调试屏蔽的功能。
...
...
source/DeviceLibrary/halcon/CodeManager.cs
查看文件 @
43eeaac
...
...
@@ -12,9 +12,9 @@ using System.Windows.Forms;
namespace
OnlineStore.DeviceLibrary
{
public
class
CodeManager
public
class
CodeManager
{
public
static
List
<
string
>
cameraNameList
=
new
List
<
string
>();
public
static
List
<
string
>
codeTypeList
=
new
List
<
string
>();
...
...
@@ -31,9 +31,8 @@ namespace OnlineStore.DeviceLibrary
{
cameraNameList
=
new
List
<
string
>();
codeTypeList
=
new
List
<
string
>();
HDLogUtil
.
LogName
=
"RollingLogFileAppender"
;
try
{
{
string
[]
nameArray
=
nameStr
.
Split
(
spiltChar
);
foreach
(
string
str
in
nameArray
)
{
...
...
@@ -47,30 +46,40 @@ namespace OnlineStore.DeviceLibrary
codeTypeList
.
Add
(
str
.
Trim
());
}
string
[]
names
=
CodeLibrary
.
HIKCamera
.
Instance
.
CameraName
;
hikNameList
.
AddRange
(
names
);
foreach
(
string
str
in
names
)
{
LogUtil
.
info
(
"加载到HIK相机:"
+
str
.
Trim
());
}
names
=
CodeLibrary
.
BaslerCamera
.
Instance
.
CameraName
;
balserNameList
.
AddRange
(
names
);
foreach
(
string
str
in
names
)
{
LogUtil
.
info
(
"加载到Balser相机:"
+
str
.
Trim
());
}
LoadCamera
();
CodeLibrary
.
HDCodeLearnHelper
.
LoadConfig
(
nameStr
,
codeStr
);
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"解析摄像机配置出错:"
+
ex
.
ToString
());
}
}
}
private
static
void
LoadCamera
()
{
string
[]
names
=
CodeLibrary
.
HIKCamera
.
Instance
.
CameraName
;
hikNameList
.
AddRange
(
names
);
names
=
CodeLibrary
.
BaslerCamera
.
Instance
.
CameraName
;
balserNameList
.
AddRange
(
names
);
foreach
(
string
name
in
hikNameList
)
{
LogUtil
.
info
(
"加载到HIK相机:"
+
name
);
}
foreach
(
string
name
in
balserNameList
)
{
LogUtil
.
info
(
"加载到Balser相机:"
+
name
);
}
}
public
static
Bitmap
GetCamerImage
(
string
cameraName
)
{
Bitmap
bitm
=
null
;
//若未加载到相机,需要重新加载相机
if
(
balserNameList
.
Count
<=
0
&&
hikNameList
.
Count
<=
0
)
{
LogUtil
.
error
(
"获取图片时发现未加载到相机,重新加载相机"
);
LoadCamera
();
}
if
(
balserNameList
.
Contains
(
cameraName
))
{
BaslerCamera
.
Instance
.
Open
(
cameraName
);
...
...
@@ -78,7 +87,7 @@ namespace OnlineStore.DeviceLibrary
bitm
=
BaslerCamera
.
Instance
.
Image
;
BaslerCamera
.
Instance
.
Close
();
}
else
if
(
hikNameList
.
Contains
(
cameraName
))
else
if
(
hikNameList
.
Contains
(
cameraName
))
{
HIKCamera
.
Instance
.
Open
(
cameraName
);
HIKCamera
.
Instance
.
GrabOne
();
...
...
@@ -87,10 +96,11 @@ namespace OnlineStore.DeviceLibrary
}
else
{
LogUtil
.
info
(
"未找到摄像机【"
+
cameraName
+
"】无法获取图片"
);
LogUtil
.
info
(
"未找到摄像机【"
+
cameraName
+
"】无法获取图片"
);
}
return
bitm
;
}
[
HandleProcessCorruptedStateExceptions
]
public
static
List
<
string
>
CameraScan
()
{
...
...
@@ -101,14 +111,18 @@ namespace OnlineStore.DeviceLibrary
{
foreach
(
string
cameraName
in
cameraNameList
)
{
Bitmap
bitmap
=
GetCamerImage
(
cameraName
);
if
(
bitmap
==
null
)
{
LogUtil
.
info
(
" 摄像机【"
+
cameraName
+
"】获取图片失败"
);
}
else
using
(
Bitmap
bitmap
=
GetCamerImage
(
cameraName
))
{
if
(
bitmap
==
null
)
{
LogUtil
.
info
(
" 摄像机【"
+
cameraName
+
"】获取图片失败"
);
continue
;
}
LogUtil
.
debug
(
" 摄像机【"
+
cameraName
+
"】获取图片完成"
);
System
.
Threading
.
Thread
.
Sleep
(
1
);
HObject
ho_Image
=
HDCodeHelper
.
Bitmap2HObjectBpp24
(
bitmap
);
LogUtil
.
debug
(
" 摄像机【"
+
cameraName
+
"】转换图片完成,开始扫码"
);
List
<
CodeInfo
>
cc
=
new
List
<
CodeInfo
>();
foreach
(
string
codeType
in
codeTypeList
)
{
...
...
@@ -121,10 +135,10 @@ namespace OnlineStore.DeviceLibrary
{
cc
=
HDCodeHelper
.
DecodeCode
(
ho_Image
,
1
,
GetCodeParamFilePath
(
codeType
),
codeType
);
}
//LogUtil.info(" 摄像机【" + cameraName + "】【"+ codeType + "】扫码完成");
allCodeList
.
AddRange
(
cc
);
}
allCodeList
.
AddRange
(
cc
);
}
bitmap
.
Dispose
();
}
}
catch
(
AccessViolationException
e
)
...
...
@@ -142,7 +156,7 @@ namespace OnlineStore.DeviceLibrary
}
return
codeList
;
}
public
static
string
GetCodeParamFilePath
(
string
codePath
)
{
...
...
@@ -158,13 +172,13 @@ namespace OnlineStore.DeviceLibrary
return
""
;
}
}
public
static
string
ProcessBarcode
(
List
<
string
>
codeList
,
int
height
)
public
static
string
ProcessBarcode
(
List
<
string
>
codeList
,
int
height
)
{
// 条码前面字母去掉之后用分号分割,最后不加分号
//P; H; Q
//code = "=1+0x0-7x" + height + "=" + code;
string
split
=
";"
;
string
split
=
";"
;
string
result
=
""
;
try
{
...
...
@@ -183,7 +197,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
result
=
result
+
split
+
s
;
result
=
result
+
split
+
s
;
}
}
}
...
...
@@ -191,14 +205,15 @@ namespace OnlineStore.DeviceLibrary
{
return
"=1+0x0-13x"
+
height
+
"="
+
result
;
}
}
catch
(
Exception
ex
)
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"处理二维码出错:"
+
ex
.
ToString
());
LogUtil
.
error
(
"处理二维码出错:"
+
ex
.
ToString
());
}
return
result
;
}
private
static
string
GetCodeByStart
(
List
<
string
>
codeList
,
string
start
)
private
static
string
GetCodeByStart
(
List
<
string
>
codeList
,
string
start
)
{
List
<
string
>
pCode
=
(
from
m
in
codeList
where
m
.
StartsWith
(
start
)
select
m
).
ToList
<
string
>();
if
(
pCode
.
Count
>
0
)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论