Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 4e0a0248
由
LN
编写于
2019-11-14 11:40:57 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
1d5d2575
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
179 行增加
和
124 行删除
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
4e0a024
...
...
@@ -46,7 +46,7 @@
this
.
label8
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnOpenAxis
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnCloseAxis
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
lblCountPulse
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtP
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtASpeed
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label47
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnAxisVMove
=
new
System
.
Windows
.
Forms
.
Button
();
...
...
@@ -65,6 +65,11 @@
this
.
label49
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
richTextBox1
=
new
System
.
Windows
.
Forms
.
RichTextBox
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
axis_4_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
txt4Target
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lblTargetP4
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lblActual4
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label7
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
axis_1_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_3_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_2_Alarm
=
new
UserFromControl
.
IOStatusControl
();
...
...
@@ -73,12 +78,12 @@
this
.
txtInoutTarget
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtUpdownTarget
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label12
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lbl
CountPulse
1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lbl
OutPulse
1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lbl
CountPulse
3
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lbl
OutPulse
3
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lbl
CountPulse
2
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lbl
OutPulse
2
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lbl
TargetP
1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lbl
Actual
1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lbl
TargetP
3
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lbl
Actual
3
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lbl
TargetP
2
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lbl
Actual
2
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label4
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label3
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
...
...
@@ -135,6 +140,7 @@
this
.
chbAuto
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
contextMenuStrip1
=
new
System
.
Windows
.
Forms
.
ContextMenuStrip
(
this
.
components
);
this
.
显示
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator1
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripMenuItem1
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
notifyIcon1
=
new
System
.
Windows
.
Forms
.
NotifyIcon
(
this
.
components
);
this
.
tabControl1
=
new
System
.
Windows
.
Forms
.
TabControl
();
...
...
@@ -188,7 +194,6 @@
this
.
btnSetNum
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnClearL
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnLogDebug
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
toolStripSeparator1
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
groupAxis
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupInout
.
SuspendLayout
();
...
...
@@ -245,7 +250,7 @@
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
.
txtP
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
txtASpeed
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label47
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
btnAxisVMove
);
...
...
@@ -462,13 +467,13 @@
this
.
btnCloseAxis
.
UseVisualStyleBackColor
=
false
;
this
.
btnCloseAxis
.
Click
+=
new
System
.
EventHandler
(
this
.
btnCloseAxis_Click
);
//
//
lblCountPulse
//
txtP
//
this
.
lblCountPulse
.
Location
=
new
System
.
Drawing
.
Point
(
232
,
164
);
this
.
lblCountPulse
.
Name
=
"lblCountPulse
"
;
this
.
lblCountPulse
.
ReadOnly
=
true
;
this
.
lblCountPulse
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
23
);
this
.
lblCountPulse
.
TabIndex
=
38
;
this
.
txtP
.
Location
=
new
System
.
Drawing
.
Point
(
232
,
164
);
this
.
txtP
.
Name
=
"txtP
"
;
this
.
txtP
.
ReadOnly
=
true
;
this
.
txtP
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
23
);
this
.
txtP
.
TabIndex
=
38
;
//
// txtASpeed
//
...
...
@@ -707,6 +712,11 @@
//
this
.
groupBox1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
groupBox1
.
Controls
.
Add
(
this
.
axis_4_Alarm
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
txt4Target
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
lblTargetP4
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
lblActual4
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label7
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
axis_1_Alarm
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
axis_3_Alarm
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
axis_2_Alarm
);
...
...
@@ -715,12 +725,12 @@
this
.
groupBox1
.
Controls
.
Add
(
this
.
txtInoutTarget
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
txtUpdownTarget
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label12
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
lbl
CountPulse
1
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
lbl
OutPulse
1
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
lbl
CountPulse
3
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
lbl
OutPulse
3
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
lbl
CountPulse
2
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
lbl
OutPulse
2
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
lbl
TargetP
1
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
lbl
Actual
1
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
lbl
TargetP
3
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
lbl
Actual
3
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
lbl
TargetP
2
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
lbl
Actual
2
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label4
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label3
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label1
);
...
...
@@ -734,6 +744,50 @@
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"伺服状态"
;
//
// axis_4_Alarm
//
this
.
axis_4_Alarm
.
IOName
=
""
;
this
.
axis_4_Alarm
.
IOValue
=
0
;
this
.
axis_4_Alarm
.
isCanClick
=
false
;
this
.
axis_4_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
432
,
39
);
this
.
axis_4_Alarm
.
Name
=
"axis_4_Alarm"
;
this
.
axis_4_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_4_Alarm
.
TabIndex
=
271
;
//
// txt4Target
//
this
.
txt4Target
.
Location
=
new
System
.
Drawing
.
Point
(
409
,
143
);
this
.
txt4Target
.
Name
=
"txt4Target"
;
this
.
txt4Target
.
ReadOnly
=
true
;
this
.
txt4Target
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
23
);
this
.
txt4Target
.
TabIndex
=
270
;
//
// lblTargetP4
//
this
.
lblTargetP4
.
Location
=
new
System
.
Drawing
.
Point
(
409
,
115
);
this
.
lblTargetP4
.
Name
=
"lblTargetP4"
;
this
.
lblTargetP4
.
ReadOnly
=
true
;
this
.
lblTargetP4
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
23
);
this
.
lblTargetP4
.
TabIndex
=
269
;
//
// lblActual4
//
this
.
lblActual4
.
Location
=
new
System
.
Drawing
.
Point
(
409
,
87
);
this
.
lblActual4
.
Name
=
"lblActual4"
;
this
.
lblActual4
.
ReadOnly
=
true
;
this
.
lblActual4
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
23
);
this
.
lblActual4
.
TabIndex
=
268
;
//
// label7
//
this
.
label7
.
AutoSize
=
true
;
this
.
label7
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
label7
.
Location
=
new
System
.
Drawing
.
Point
(
406
,
14
);
this
.
label7
.
Name
=
"label7"
;
this
.
label7
.
Size
=
new
System
.
Drawing
.
Size
(
71
,
17
);
this
.
label7
.
TabIndex
=
267
;
this
.
label7
.
Text
=
"轴四:压紧轴"
;
//
// axis_1_Alarm
//
this
.
axis_1_Alarm
.
IOName
=
""
;
...
...
@@ -808,53 +862,53 @@
this
.
label12
.
TabIndex
=
258
;
this
.
label12
.
Text
=
"出入库目标值:"
;
//
// lbl
CountPulse
1
// lbl
TargetP
1
//
this
.
lbl
CountPulse
1
.
Location
=
new
System
.
Drawing
.
Point
(
105
,
116
);
this
.
lbl
CountPulse1
.
Name
=
"lblCountPulse
1"
;
this
.
lbl
CountPulse
1
.
ReadOnly
=
true
;
this
.
lbl
CountPulse
1
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
23
);
this
.
lbl
CountPulse
1
.
TabIndex
=
257
;
this
.
lbl
TargetP
1
.
Location
=
new
System
.
Drawing
.
Point
(
105
,
116
);
this
.
lbl
TargetP1
.
Name
=
"lblTargetP
1"
;
this
.
lbl
TargetP
1
.
ReadOnly
=
true
;
this
.
lbl
TargetP
1
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
23
);
this
.
lbl
TargetP
1
.
TabIndex
=
257
;
//
// lbl
OutPulse
1
// lbl
Actual
1
//
this
.
lbl
OutPulse
1
.
Location
=
new
System
.
Drawing
.
Point
(
105
,
88
);
this
.
lbl
OutPulse1
.
Name
=
"lblOutPulse
1"
;
this
.
lbl
OutPulse
1
.
ReadOnly
=
true
;
this
.
lbl
OutPulse
1
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
23
);
this
.
lbl
OutPulse
1
.
TabIndex
=
256
;
this
.
lbl
Actual
1
.
Location
=
new
System
.
Drawing
.
Point
(
105
,
88
);
this
.
lbl
Actual1
.
Name
=
"lblActual
1"
;
this
.
lbl
Actual
1
.
ReadOnly
=
true
;
this
.
lbl
Actual
1
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
23
);
this
.
lbl
Actual
1
.
TabIndex
=
256
;
//
// lbl
CountPulse
3
// lbl
TargetP
3
//
this
.
lbl
CountPulse
3
.
Location
=
new
System
.
Drawing
.
Point
(
306
,
116
);
this
.
lbl
CountPulse3
.
Name
=
"lblCountPulse
3"
;
this
.
lbl
CountPulse
3
.
ReadOnly
=
true
;
this
.
lbl
CountPulse
3
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
23
);
this
.
lbl
CountPulse
3
.
TabIndex
=
178
;
this
.
lbl
TargetP
3
.
Location
=
new
System
.
Drawing
.
Point
(
306
,
116
);
this
.
lbl
TargetP3
.
Name
=
"lblTargetP
3"
;
this
.
lbl
TargetP
3
.
ReadOnly
=
true
;
this
.
lbl
TargetP
3
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
23
);
this
.
lbl
TargetP
3
.
TabIndex
=
178
;
//
// lbl
OutPulse
3
// lbl
Actual
3
//
this
.
lbl
OutPulse
3
.
Location
=
new
System
.
Drawing
.
Point
(
306
,
88
);
this
.
lbl
OutPulse3
.
Name
=
"lblOutPulse
3"
;
this
.
lbl
OutPulse
3
.
ReadOnly
=
true
;
this
.
lbl
OutPulse
3
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
23
);
this
.
lbl
OutPulse
3
.
TabIndex
=
177
;
this
.
lbl
Actual
3
.
Location
=
new
System
.
Drawing
.
Point
(
306
,
88
);
this
.
lbl
Actual3
.
Name
=
"lblActual
3"
;
this
.
lbl
Actual
3
.
ReadOnly
=
true
;
this
.
lbl
Actual
3
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
23
);
this
.
lbl
Actual
3
.
TabIndex
=
177
;
//
// lbl
CountPulse
2
// lbl
TargetP
2
//
this
.
lbl
CountPulse
2
.
Location
=
new
System
.
Drawing
.
Point
(
207
,
116
);
this
.
lbl
CountPulse2
.
Name
=
"lblCountPulse
2"
;
this
.
lbl
CountPulse
2
.
ReadOnly
=
true
;
this
.
lbl
CountPulse
2
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
23
);
this
.
lbl
CountPulse
2
.
TabIndex
=
176
;
this
.
lbl
TargetP
2
.
Location
=
new
System
.
Drawing
.
Point
(
207
,
116
);
this
.
lbl
TargetP2
.
Name
=
"lblTargetP
2"
;
this
.
lbl
TargetP
2
.
ReadOnly
=
true
;
this
.
lbl
TargetP
2
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
23
);
this
.
lbl
TargetP
2
.
TabIndex
=
176
;
//
// lbl
OutPulse
2
// lbl
Actual
2
//
this
.
lbl
OutPulse
2
.
Location
=
new
System
.
Drawing
.
Point
(
206
,
88
);
this
.
lbl
OutPulse2
.
Name
=
"lblOutPulse
2"
;
this
.
lbl
OutPulse
2
.
ReadOnly
=
true
;
this
.
lbl
OutPulse
2
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
23
);
this
.
lbl
OutPulse
2
.
TabIndex
=
175
;
this
.
lbl
Actual
2
.
Location
=
new
System
.
Drawing
.
Point
(
206
,
88
);
this
.
lbl
Actual2
.
Name
=
"lblActual
2"
;
this
.
lbl
Actual
2
.
ReadOnly
=
true
;
this
.
lbl
Actual
2
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
23
);
this
.
lbl
Actual
2
.
TabIndex
=
175
;
//
// label4
//
...
...
@@ -1701,6 +1755,11 @@
this
.
显示
ToolStripMenuItem
.
Text
=
"显示"
;
this
.
显示
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
显示
ToolStripMenuItem_Click
);
//
// toolStripSeparator1
//
this
.
toolStripSeparator1
.
Name
=
"toolStripSeparator1"
;
this
.
toolStripSeparator1
.
Size
=
new
System
.
Drawing
.
Size
(
107
,
6
);
//
// toolStripMenuItem1
//
this
.
toolStripMenuItem1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
...
...
@@ -2322,11 +2381,6 @@
this
.
btnLogDebug
.
UseVisualStyleBackColor
=
true
;
this
.
btnLogDebug
.
Click
+=
new
System
.
EventHandler
(
this
.
开启
DEBUGToolStripMenuItem_Click
);
//
// toolStripSeparator1
//
this
.
toolStripSeparator1
.
Name
=
"toolStripSeparator1"
;
this
.
toolStripSeparator1
.
Size
=
new
System
.
Drawing
.
Size
(
107
,
6
);
//
// FrmStoreBox
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
...
...
@@ -2387,7 +2441,7 @@
private
System
.
Windows
.
Forms
.
ComboBox
cmbPosition
;
private
System
.
Windows
.
Forms
.
Label
label43
;
private
System
.
Windows
.
Forms
.
Label
label42
;
private
System
.
Windows
.
Forms
.
TextBox
lblCountPulse
;
private
System
.
Windows
.
Forms
.
TextBox
txtP
;
private
System
.
Windows
.
Forms
.
Button
btnComAlarmClear
;
private
System
.
Windows
.
Forms
.
GroupBox
groupAxis
;
public
System
.
Windows
.
Forms
.
Button
btnComP1
;
...
...
@@ -2441,12 +2495,12 @@
private
System
.
Windows
.
Forms
.
Button
btnSavePosition
;
public
System
.
Windows
.
Forms
.
Button
btnCloseAxis
;
public
System
.
Windows
.
Forms
.
Button
btnOpenAxis
;
private
System
.
Windows
.
Forms
.
TextBox
lbl
CountPulse
3
;
private
System
.
Windows
.
Forms
.
TextBox
lbl
OutPulse
3
;
private
System
.
Windows
.
Forms
.
TextBox
lbl
CountPulse
2
;
private
System
.
Windows
.
Forms
.
TextBox
lbl
OutPulse
2
;
private
System
.
Windows
.
Forms
.
TextBox
lbl
CountPulse
1
;
private
System
.
Windows
.
Forms
.
TextBox
lbl
OutPulse
1
;
private
System
.
Windows
.
Forms
.
TextBox
lbl
TargetP
3
;
private
System
.
Windows
.
Forms
.
TextBox
lbl
Actual
3
;
private
System
.
Windows
.
Forms
.
TextBox
lbl
TargetP
2
;
private
System
.
Windows
.
Forms
.
TextBox
lbl
Actual
2
;
private
System
.
Windows
.
Forms
.
TextBox
lbl
TargetP
1
;
private
System
.
Windows
.
Forms
.
TextBox
lbl
Actual
1
;
private
System
.
Windows
.
Forms
.
Label
label8
;
private
System
.
Windows
.
Forms
.
TextBox
txtJiange
;
private
System
.
Windows
.
Forms
.
Label
label9
;
...
...
@@ -2540,6 +2594,11 @@
private
System
.
Windows
.
Forms
.
Label
label5
;
private
System
.
Windows
.
Forms
.
TextBox
txtServoStatue
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator1
;
private
UserFromControl
.
IOStatusControl
axis_4_Alarm
;
private
System
.
Windows
.
Forms
.
TextBox
txt4Target
;
private
System
.
Windows
.
Forms
.
TextBox
lblTargetP4
;
private
System
.
Windows
.
Forms
.
TextBox
lblActual4
;
private
System
.
Windows
.
Forms
.
Label
label7
;
}
}
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
4e0a024
...
...
@@ -17,6 +17,7 @@ using OnlineStore.DeviceLibrary;
using
System.IO.Ports
;
using
OnlineStore.LoadCSVLibrary
;
using
CodeLibrary
;
using
UserFromControl
;
namespace
OnlineStore.ACSingleStore
{
...
...
@@ -193,9 +194,9 @@ namespace OnlineStore.ACSingleStore
// {
// lblServerOn.Text = "伺服ON";
// int lOutPulse = ACServerManager.GetTargetPosition(portName, SlvAddr);
// lbl
OutPulse
.Text = string.Format("{0:d}", lOutPulse);
// lbl
Actual
.Text = string.Format("{0:d}", lOutPulse);
// int lCountPulse = ACServerManager.GetActualtPosition(portName, SlvAddr);
// lbl
CountPulse
.Text = string.Format("{0:d}", lCountPulse);
// lbl
TargetP
.Text = string.Format("{0:d}", lCountPulse);
// }
// else
// {
...
...
@@ -326,50 +327,30 @@ namespace OnlineStore.ACSingleStore
{
txtServoStatue
.
Text
=
"✘"
;
}
string
deviceName
=
GetPortName
();
if
(
ACServerManager
.
ServerOnStatus
(
store
.
Config
.
Middle_Axis
.
DeviceName
,
store
.
Config
.
Middle_Axis
.
GetAxisValue
()))
{
axis_1_Alarm
.
IOValue
=
ACServerManager
.
GetAlarmStatus
(
store
.
Config
.
Middle_Axis
.
DeviceName
,
store
.
Config
.
Middle_Axis
.
GetAxisValue
());
axis_1_Alarm
.
ShowData
();
int
lOutPulse1
=
ACServerManager
.
GetTargetPosition
(
store
.
Config
.
Middle_Axis
.
DeviceName
,
store
.
Config
.
Middle_Axis
.
GetAxisValue
());
lblOutPulse1
.
Text
=
string
.
Format
(
"{0:d}"
,
lOutPulse1
);
int
lCountPulse1
=
ACServerManager
.
GetActualtPosition
(
store
.
Config
.
Middle_Axis
.
DeviceName
,
store
.
Config
.
Middle_Axis
.
GetAxisValue
());
lblCountPulse1
.
Text
=
string
.
Format
(
"{0:d}"
,
lCountPulse1
);
txtMiddleTarget
.
Text
=
store
.
Config
.
Middle_Axis
.
TargetPosition
.
ToString
();
if
(
store
.
Config
.
Middle_Axis
.
IsSameAxis
(
portName
,
SlvAddr
))
{
lblCountPulse
.
Text
=
lblCountPulse1
.
Text
;
}
ReadA
(
store
.
Config
.
Middle_Axis
,
lblActual1
,
lblTargetP1
,
txtMiddleTarget
,
axis_1_Alarm
);
ReadA
(
store
.
Config
.
UpDown_Axis
,
lblActual2
,
lblTargetP2
,
txtUpdownTarget
,
axis_2_Alarm
);
ReadA
(
store
.
Config
.
InOut_Axis
,
lblActual3
,
lblTargetP3
,
txtInoutTarget
,
axis_3_Alarm
);
ReadA
(
store
.
Config
.
Comp_Axis
,
lblActual4
,
lblTargetP4
,
txt4Target
,
axis_4_Alarm
);
}
if
(
ACServerManager
.
ServerOnStatus
(
store
.
Config
.
UpDown_Axis
.
DeviceName
,
store
.
Config
.
UpDown_Axis
.
GetAxisValue
()))
{
axis_2_Alarm
.
IOValue
=
ACServerManager
.
GetAlarmStatus
(
store
.
Config
.
UpDown_Axis
.
DeviceName
,
store
.
Config
.
UpDown_Axis
.
GetAxisValue
());
axis_2_Alarm
.
ShowData
();
int
lOutPulse2
=
ACServerManager
.
GetTargetPosition
(
store
.
Config
.
UpDown_Axis
.
DeviceName
,
store
.
Config
.
UpDown_Axis
.
GetAxisValue
());
lblOutPulse2
.
Text
=
string
.
Format
(
"{0:d}"
,
lOutPulse2
);
int
lCountPulse2
=
ACServerManager
.
GetActualtPosition
(
store
.
Config
.
UpDown_Axis
.
DeviceName
,
store
.
Config
.
UpDown_Axis
.
GetAxisValue
());
lblCountPulse2
.
Text
=
string
.
Format
(
"{0:d}"
,
lCountPulse2
);
txtInoutTarget
.
Text
=
store
.
Config
.
InOut_Axis
.
TargetPosition
.
ToString
();
if
(
store
.
Config
.
UpDown_Axis
.
IsSameAxis
(
portName
,
SlvAddr
))
private
void
ReadA
(
ConfigMoveAxis
axis
,
TextBox
lblActual
,
TextBox
lblTarget
,
TextBox
lblT
,
IOStatusControl
sta
)
{
lblCountPulse
.
Text
=
lblCountPulse2
.
Text
;
}
}
if
(
ACServerManager
.
ServerOnStatus
(
store
.
Config
.
InOut_Axis
.
DeviceName
,
store
.
Config
.
InOut_Axis
.
GetAxisValue
()))
string
portName
=
GetPortName
();
int
SlvAddr
=
GetSlaveAddr
();
if
(
ACServerManager
.
ServerOnStatus
(
axis
.
DeviceName
,
axis
.
GetAxisValue
()))
{
axis_3_Alarm
.
IOValue
=
ACServerManager
.
GetAlarmStatus
(
store
.
Config
.
InOut_Axis
.
DeviceName
,
store
.
Config
.
InOut_A
xis
.
GetAxisValue
());
int
lOutPulse3
=
ACServerManager
.
GetTargetPosition
(
store
.
Config
.
InOut_Axis
.
DeviceName
,
store
.
Config
.
InOut_A
xis
.
GetAxisValue
());
lbl
OutPulse3
.
Text
=
string
.
Format
(
"{0:d}"
,
lOutPulse3
);
int
lCountPulse3
=
ACServerManager
.
GetActualtPosition
(
store
.
Config
.
InOut_Axis
.
DeviceName
,
store
.
Config
.
InOut_A
xis
.
GetAxisValue
());
lbl
CountPulse3
.
Text
=
string
.
Format
(
"{0:d}"
,
lCountPulse3
);
txtUpdownTarget
.
Text
=
store
.
Config
.
UpDown_A
xis
.
TargetPosition
.
ToString
();
if
(
store
.
Config
.
InOut_A
xis
.
IsSameAxis
(
portName
,
SlvAddr
))
sta
.
IOValue
=
ACServerManager
.
GetAlarmStatus
(
axis
.
DeviceName
,
a
xis
.
GetAxisValue
());
int
tP
=
ACServerManager
.
GetTargetPosition
(
axis
.
DeviceName
,
a
xis
.
GetAxisValue
());
lbl
Target
.
Text
=
string
.
Format
(
"{0:d}"
,
tP
);
int
aP
=
ACServerManager
.
GetActualtPosition
(
axis
.
DeviceName
,
a
xis
.
GetAxisValue
());
lbl
Actual
.
Text
=
string
.
Format
(
"{0:d}"
,
aP
);
lblT
.
Text
=
a
xis
.
TargetPosition
.
ToString
();
if
(
a
xis
.
IsSameAxis
(
portName
,
SlvAddr
))
{
lblCountPulse
.
Text
=
lblCountPulse3
.
Text
;
txtP
.
Text
=
lblActual
.
Text
;
}
}
}
private
void
Bt_ClearCounter_Click
(
object
sender
,
EventArgs
e
)
{
string
portName
=
txtAxisDeviceName
.
Text
;
...
...
@@ -495,22 +476,37 @@ namespace OnlineStore.ACSingleStore
{
if
(
this
.
cmbAxisList
.
SelectedIndex
>=
0
)
{
ConfigMoveAxis
SlvAddr
=
store
.
moveAxisList
[
cmbAxisList
.
SelectedIndex
];
txtAxisDeviceName
.
Text
=
SlvAddr
.
DeviceName
;
txtAxisValue
.
Text
=
SlvAddr
.
GetAxisValue
().
ToString
();
txtASpeed
.
Text
=
SlvAddr
.
TargetSpeed
.
ToString
();
//if (SlvAddr.Equals(store.Config.InOut_Axis))
//{
// txtASpeed.Text = store.Config.InOutAxis_P1_Speed.ToString();
//}
//else if (SlvAddr.Equals(store.Config.Middle_Axis))
//{
// txtASpeed.Text = store.Config.MiddleAxis_P1_Speed.ToString();
//}
//else if (SlvAddr.Equals(store.Config.UpDown_Axis))
//{
// txtASpeed.Text = store.Config.UpDownAxis_P1_Speed.ToString();
//}
ConfigMoveAxis
axis
=
store
.
moveAxisList
[
cmbAxisList
.
SelectedIndex
];
txtAxisDeviceName
.
Text
=
axis
.
DeviceName
;
txtAxisValue
.
Text
=
axis
.
GetAxisValue
().
ToString
();
txtASpeed
.
Text
=
axis
.
TargetSpeed
.
ToString
();
Color
color
=
Color
.
Black
;
if
(
store
.
Config
.
Middle_Axis
.
IsSameAxis
(
axis
.
DeviceName
,
axis
.
GetAxisValue
()))
{
color
=
Color
.
Red
;
}
else
if
(
store
.
Config
.
UpDown_Axis
.
IsSameAxis
(
axis
.
DeviceName
,
axis
.
GetAxisValue
()))
{
color
=
Color
.
Blue
;
}
else
if
(
store
.
Config
.
InOut_Axis
.
IsSameAxis
(
axis
.
DeviceName
,
axis
.
GetAxisValue
()))
{
color
=
Color
.
Green
;
}
else
if
(
store
.
Config
.
Comp_Axis
.
IsSameAxis
(
axis
.
DeviceName
,
axis
.
GetAxisValue
()))
{
color
=
Color
.
Purple
;
}
btnOpenAxis
.
ForeColor
=
color
;
btnCloseAxis
.
ForeColor
=
color
;
btnAxisAMove
.
ForeColor
=
color
;
btnAxisRMove
.
ForeColor
=
color
;
btnAxisVMove
.
ForeColor
=
color
;
btnAxisReturnHome
.
ForeColor
=
color
;
btnAxisStop
.
ForeColor
=
color
;
btnComAlarmClear
.
ForeColor
=
color
;
btnReadPosition
.
ForeColor
=
color
;
btnGetAlarm
.
ForeColor
=
color
;
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论