Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a4fa7477
由
ke.sun
编写于
2018-04-03 12:03:33 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
ee359df2
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
95 行增加
和
111 行删除
source/ACServoDriveTest/ACServoDriveTest.csproj
source/ACSingleStore/FrmIOStatus.Designer.cs
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/DeviceLibrary/PanasonicServo/ACServerManager.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/ACServoDriveTest/ACServoDriveTest.csproj
查看文件 @
a4fa747
...
@@ -44,12 +44,6 @@
...
@@ -44,12 +44,6 @@
<Reference Include="System.Xml" />
<Reference Include="System.Xml" />
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Compile Include="FrmMoveTest.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmMoveTest.Designer.cs">
<DependentUpon>FrmMoveTest.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SerialBean.cs" />
<Compile Include="SerialBean.cs" />
...
@@ -59,9 +53,6 @@
...
@@ -59,9 +53,6 @@
<Compile Include="FrmACTest.Designer.cs">
<Compile Include="FrmACTest.Designer.cs">
<DependentUpon>FrmACTest.cs</DependentUpon>
<DependentUpon>FrmACTest.cs</DependentUpon>
</Compile>
</Compile>
<EmbeddedResource Include="FrmMoveTest.resx">
<DependentUpon>FrmMoveTest.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
...
...
source/ACSingleStore/FrmIOStatus.Designer.cs
查看文件 @
a4fa747
...
@@ -178,11 +178,11 @@
...
@@ -178,11 +178,11 @@
//
//
this
.
chbAutoRead
.
AutoSize
=
true
;
this
.
chbAutoRead
.
AutoSize
=
true
;
this
.
chbAutoRead
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbAutoRead
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbAutoRead
.
Location
=
new
System
.
Drawing
.
Point
(
172
,
18
);
this
.
chbAutoRead
.
Location
=
new
System
.
Drawing
.
Point
(
220
,
17
);
this
.
chbAutoRead
.
Name
=
"chbAutoRead"
;
this
.
chbAutoRead
.
Name
=
"chbAutoRead"
;
this
.
chbAutoRead
.
Size
=
new
System
.
Drawing
.
Size
(
89
,
21
);
this
.
chbAutoRead
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
21
);
this
.
chbAutoRead
.
TabIndex
=
244
;
this
.
chbAutoRead
.
TabIndex
=
244
;
this
.
chbAutoRead
.
Text
=
"自动读取
IO
"
;
this
.
chbAutoRead
.
Text
=
"自动读取"
;
this
.
chbAutoRead
.
UseVisualStyleBackColor
=
true
;
this
.
chbAutoRead
.
UseVisualStyleBackColor
=
true
;
//
//
// btnReadAllDi
// btnReadAllDi
...
@@ -223,7 +223,7 @@
...
@@ -223,7 +223,7 @@
this
.
txtDoName
.
Location
=
new
System
.
Drawing
.
Point
(
69
,
15
);
this
.
txtDoName
.
Location
=
new
System
.
Drawing
.
Point
(
69
,
15
);
this
.
txtDoName
.
MaxLength
=
10
;
this
.
txtDoName
.
MaxLength
=
10
;
this
.
txtDoName
.
Name
=
"txtDoName"
;
this
.
txtDoName
.
Name
=
"txtDoName"
;
this
.
txtDoName
.
Size
=
new
System
.
Drawing
.
Size
(
89
,
23
);
this
.
txtDoName
.
Size
=
new
System
.
Drawing
.
Size
(
123
,
23
);
this
.
txtDoName
.
TabIndex
=
241
;
this
.
txtDoName
.
TabIndex
=
241
;
this
.
txtDoName
.
Text
=
"0"
;
this
.
txtDoName
.
Text
=
"0"
;
//
//
...
@@ -384,7 +384,6 @@
...
@@ -384,7 +384,6 @@
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
groupBox4
);
this
.
Controls
.
Add
(
this
.
groupBox4
);
this
.
Controls
.
Add
(
this
.
groupBox3
);
this
.
Controls
.
Add
(
this
.
groupBox3
);
this
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
MaximizeBox
=
false
;
this
.
MaximizeBox
=
false
;
this
.
MinimizeBox
=
false
;
this
.
MinimizeBox
=
false
;
this
.
Name
=
"FrmIOStatus"
;
this
.
Name
=
"FrmIOStatus"
;
...
...
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
a4fa747
...
@@ -28,8 +28,6 @@
...
@@ -28,8 +28,6 @@
this
.
lblWarnMsg
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblWarnMsg
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox5
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox5
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
lblServerOn
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblServerOn
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
cmbAxisHomeType
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
label7
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label7
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label8
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label8
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnOpenAxis
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnOpenAxis
=
new
System
.
Windows
.
Forms
.
Button
();
...
@@ -171,6 +169,7 @@
...
@@ -171,6 +169,7 @@
this
.
txtPosition3
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtPosition3
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtPosition2
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtPosition2
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtPosition1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtPosition1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
btnReadPosition
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox5
.
SuspendLayout
();
this
.
groupBox5
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
...
@@ -198,9 +197,8 @@
...
@@ -198,9 +197,8 @@
//
//
this
.
groupBox5
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
this
.
groupBox5
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnReadPosition
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
lblServerOn
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
lblServerOn
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label2
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
cmbAxisHomeType
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label7
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label7
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label8
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label8
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnOpenAxis
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnOpenAxis
);
...
@@ -242,28 +240,6 @@
...
@@ -242,28 +240,6 @@
this
.
lblServerOn
.
Size
=
new
System
.
Drawing
.
Size
(
0
,
19
);
this
.
lblServerOn
.
Size
=
new
System
.
Drawing
.
Size
(
0
,
19
);
this
.
lblServerOn
.
TabIndex
=
268
;
this
.
lblServerOn
.
TabIndex
=
268
;
//
//
// label2
//
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
19
,
166
);
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
17
);
this
.
label2
.
TabIndex
=
277
;
this
.
label2
.
Text
=
"原点方向:"
;
//
// cmbAxisHomeType
//
this
.
cmbAxisHomeType
.
DropDownStyle
=
System
.
Windows
.
Forms
.
ComboBoxStyle
.
DropDownList
;
this
.
cmbAxisHomeType
.
FormattingEnabled
=
true
;
this
.
cmbAxisHomeType
.
Items
.
AddRange
(
new
object
[]
{
"正方向"
,
"负方向"
});
this
.
cmbAxisHomeType
.
Location
=
new
System
.
Drawing
.
Point
(
95
,
159
);
this
.
cmbAxisHomeType
.
Name
=
"cmbAxisHomeType"
;
this
.
cmbAxisHomeType
.
Size
=
new
System
.
Drawing
.
Size
(
88
,
25
);
this
.
cmbAxisHomeType
.
TabIndex
=
276
;
//
// label7
// label7
//
//
this
.
label7
.
AutoSize
=
true
;
this
.
label7
.
AutoSize
=
true
;
...
@@ -1810,35 +1786,35 @@
...
@@ -1810,35 +1786,35 @@
// 查看IOToolStripMenuItem
// 查看IOToolStripMenuItem
//
//
this
.
查看
IOToolStripMenuItem
.
Name
=
"查看IOToolStripMenuItem"
;
this
.
查看
IOToolStripMenuItem
.
Name
=
"查看IOToolStripMenuItem"
;
this
.
查看
IOToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
22
);
this
.
查看
IOToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
46
,
22
);
this
.
查看
IOToolStripMenuItem
.
Text
=
"查看IO"
;
this
.
查看
IOToolStripMenuItem
.
Text
=
"查看IO"
;
this
.
查看
IOToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
查看
IOToolStripMenuItem_Click
);
this
.
查看
IOToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
查看
IOToolStripMenuItem_Click
);
//
//
// 料仓运转ONToolStripMenuItem
// 料仓运转ONToolStripMenuItem
//
//
this
.
料仓运转
ONToolStripMenuItem
.
Name
=
"料仓运转ONToolStripMenuItem"
;
this
.
料仓运转
ONToolStripMenuItem
.
Name
=
"料仓运转ONToolStripMenuItem"
;
this
.
料仓运转
ONToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
22
);
this
.
料仓运转
ONToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
46
,
22
);
this
.
料仓运转
ONToolStripMenuItem
.
Text
=
"料仓运转ON"
;
this
.
料仓运转
ONToolStripMenuItem
.
Text
=
"料仓运转ON"
;
this
.
料仓运转
ONToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
料仓运转
ONToolStripMenuItem_Click
);
this
.
料仓运转
ONToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
料仓运转
ONToolStripMenuItem_Click
);
//
//
// 料仓运转OFFToolStripMenuItem
// 料仓运转OFFToolStripMenuItem
//
//
this
.
料仓运转
OFFToolStripMenuItem
.
Name
=
"料仓运转OFFToolStripMenuItem"
;
this
.
料仓运转
OFFToolStripMenuItem
.
Name
=
"料仓运转OFFToolStripMenuItem"
;
this
.
料仓运转
OFFToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
22
);
this
.
料仓运转
OFFToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
46
,
22
);
this
.
料仓运转
OFFToolStripMenuItem
.
Text
=
"料仓运转OFF"
;
this
.
料仓运转
OFFToolStripMenuItem
.
Text
=
"料仓运转OFF"
;
this
.
料仓运转
OFFToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
料仓运转
OFFToolStripMenuItem_Click
);
this
.
料仓运转
OFFToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
料仓运转
OFFToolStripMenuItem_Click
);
//
//
// 打开舱门ToolStripMenuItem
// 打开舱门ToolStripMenuItem
//
//
this
.
打开舱门
ToolStripMenuItem
.
Name
=
"打开舱门ToolStripMenuItem"
;
this
.
打开舱门
ToolStripMenuItem
.
Name
=
"打开舱门ToolStripMenuItem"
;
this
.
打开舱门
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
22
);
this
.
打开舱门
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
46
,
22
);
this
.
打开舱门
ToolStripMenuItem
.
Text
=
"打开仓门"
;
this
.
打开舱门
ToolStripMenuItem
.
Text
=
"打开仓门"
;
this
.
打开舱门
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
打开舱门
ToolStripMenuItem_Click
);
this
.
打开舱门
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
打开舱门
ToolStripMenuItem_Click
);
//
//
// 关闭仓门ToolStripMenuItem
// 关闭仓门ToolStripMenuItem
//
//
this
.
关闭仓门
ToolStripMenuItem
.
Name
=
"关闭仓门ToolStripMenuItem"
;
this
.
关闭仓门
ToolStripMenuItem
.
Name
=
"关闭仓门ToolStripMenuItem"
;
this
.
关闭仓门
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
22
);
this
.
关闭仓门
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
46
,
22
);
this
.
关闭仓门
ToolStripMenuItem
.
Text
=
"关闭仓门"
;
this
.
关闭仓门
ToolStripMenuItem
.
Text
=
"关闭仓门"
;
this
.
关闭仓门
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
关闭仓门
ToolStripMenuItem_Click
);
this
.
关闭仓门
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
关闭仓门
ToolStripMenuItem_Click
);
//
//
...
@@ -1993,6 +1969,21 @@
...
@@ -1993,6 +1969,21 @@
this
.
txtPosition1
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
23
);
this
.
txtPosition1
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
23
);
this
.
txtPosition1
.
TabIndex
=
265
;
this
.
txtPosition1
.
TabIndex
=
265
;
//
//
// btnReadPosition
//
this
.
btnReadPosition
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
btnReadPosition
.
Cursor
=
System
.
Windows
.
Forms
.
Cursors
.
Default
;
this
.
btnReadPosition
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnReadPosition
.
ForeColor
=
System
.
Drawing
.
SystemColors
.
ControlText
;
this
.
btnReadPosition
.
Location
=
new
System
.
Drawing
.
Point
(
458
,
162
);
this
.
btnReadPosition
.
Name
=
"btnReadPosition"
;
this
.
btnReadPosition
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
btnReadPosition
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
30
);
this
.
btnReadPosition
.
TabIndex
=
278
;
this
.
btnReadPosition
.
Text
=
"读取位置"
;
this
.
btnReadPosition
.
UseVisualStyleBackColor
=
true
;
this
.
btnReadPosition
.
Click
+=
new
System
.
EventHandler
(
this
.
btnReadPosition_Click
);
//
// FrmStoreBox
// FrmStoreBox
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
...
@@ -2165,8 +2156,6 @@
...
@@ -2165,8 +2156,6 @@
private
System
.
Windows
.
Forms
.
Button
btnClearLog
;
private
System
.
Windows
.
Forms
.
Button
btnClearLog
;
private
System
.
Windows
.
Forms
.
Button
btnRelMove
;
private
System
.
Windows
.
Forms
.
Button
btnRelMove
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
料仓运转
ONToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
料仓运转
ONToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
Label
label2
;
private
System
.
Windows
.
Forms
.
ComboBox
cmbAxisHomeType
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
扫码测试
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
扫码测试
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
料仓运转
OFFToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
料仓运转
OFFToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
打开舱门
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
打开舱门
ToolStripMenuItem
;
...
@@ -2181,9 +2170,7 @@
...
@@ -2181,9 +2170,7 @@
private
System
.
Windows
.
Forms
.
TextBox
txtPosition1
;
private
System
.
Windows
.
Forms
.
TextBox
txtPosition1
;
private
System
.
Windows
.
Forms
.
Button
btnStart
;
private
System
.
Windows
.
Forms
.
Button
btnStart
;
private
System
.
Windows
.
Forms
.
Label
lblServerOn
;
private
System
.
Windows
.
Forms
.
Label
lblServerOn
;
public
System
.
Windows
.
Forms
.
Button
btnReadPosition
;
}
}
}
}
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
a4fa747
...
@@ -151,9 +151,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -151,9 +151,7 @@ namespace OnlineStore.ACSingleStore
复位
ToolStripMenuItem
.
Enabled
=
isOpen
;
复位
ToolStripMenuItem
.
Enabled
=
isOpen
;
}
}
private
void
FrmTest_Load
(
object
sender
,
EventArgs
e
)
private
void
FrmTest_Load
(
object
sender
,
EventArgs
e
)
{
{
cmbAxisHomeType
.
SelectedIndex
=
1
;
cmbHomeType
.
SelectedIndex
=
0
;
LogUtil
.
logBox
=
this
.
richTextBox1
;
LogUtil
.
logBox
=
this
.
richTextBox1
;
initValue
();
initValue
();
this
.
ShowInTaskbar
=
true
;
this
.
ShowInTaskbar
=
true
;
...
@@ -164,7 +162,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -164,7 +162,7 @@ namespace OnlineStore.ACSingleStore
{
{
//验证运动是否完成
//验证运动是否完成
CheckWait
();
//
CheckWait();
string
portName
=
txtAxisDeviceName
.
Text
;
string
portName
=
txtAxisDeviceName
.
Text
;
int
SlvAddr
=
FormUtil
.
GetIntValue
(
txtAxisValue
);
int
SlvAddr
=
FormUtil
.
GetIntValue
(
txtAxisValue
);
...
@@ -172,44 +170,14 @@ namespace OnlineStore.ACSingleStore
...
@@ -172,44 +170,14 @@ namespace OnlineStore.ACSingleStore
//判断私服是否打开、
//判断私服是否打开、
if
(
ACServerManager
.
ServerOnStatus
(
portName
,
SlvAddr
)
)
if
(
ACServerManager
.
ServerOnStatus
(
portName
,
SlvAddr
)
)
{
{
lblServerOn
.
Text
=
"伺服ON"
;
lblServerOn
.
Text
=
"伺服ON"
;
}
}
else
else
{
{
lblServerOn
.
Text
=
"伺服OFF"
;
lblServerOn
.
Text
=
"伺服OFF"
;
}
}
if
(
ACServerManager
.
ServerOnStatus
(
store
.
Config
.
Middle_Axis
.
DeviceName
,
store
.
Config
.
Middle_Axis
.
GetAxisValue
())
)
//ReadPosistion();
{
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
(
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
(
ACServerManager
.
ServerOnStatus
(
store
.
Config
.
InOut_Axis
.
DeviceName
,
store
.
Config
.
InOut_Axis
.
GetAxisValue
())
)
{
axis_3_Alarm
.
IOValue
=
ACServerManager
.
GetAlarmStatus
(
store
.
Config
.
InOut_Axis
.
DeviceName
,
store
.
Config
.
InOut_Axis
.
GetAxisValue
());
int
lOutPulse3
=
ACServerManager
.
GetTargetPosition
(
store
.
Config
.
InOut_Axis
.
DeviceName
,
store
.
Config
.
InOut_Axis
.
GetAxisValue
());
lblOutPulse3
.
Text
=
string
.
Format
(
"{0:d}"
,
lOutPulse3
);
int
lCountPulse3
=
ACServerManager
.
GetActualtPosition
(
store
.
Config
.
InOut_Axis
.
DeviceName
,
store
.
Config
.
InOut_Axis
.
GetAxisValue
());
lblCountPulse3
.
Text
=
string
.
Format
(
"{0:d}"
,
lCountPulse3
);
txtUpdownTarget
.
Text
=
store
.
Config
.
UpDown_Axis
.
TargetPosition
.
ToString
();
}
if
(
store
.
storeRunStatus
>
StoreRunStatus
.
Wait
)
if
(
store
.
storeRunStatus
>
StoreRunStatus
.
Wait
)
{
{
if
(
启动
ToolStripMenuItem
.
Enabled
.
Equals
(
true
))
if
(
启动
ToolStripMenuItem
.
Enabled
.
Equals
(
true
))
...
@@ -286,7 +254,41 @@ namespace OnlineStore.ACSingleStore
...
@@ -286,7 +254,41 @@ namespace OnlineStore.ACSingleStore
}
}
}
}
}
}
private
void
ReadPosistion
()
{
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
(
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
(
ACServerManager
.
ServerOnStatus
(
store
.
Config
.
InOut_Axis
.
DeviceName
,
store
.
Config
.
InOut_Axis
.
GetAxisValue
()))
{
axis_3_Alarm
.
IOValue
=
ACServerManager
.
GetAlarmStatus
(
store
.
Config
.
InOut_Axis
.
DeviceName
,
store
.
Config
.
InOut_Axis
.
GetAxisValue
());
int
lOutPulse3
=
ACServerManager
.
GetTargetPosition
(
store
.
Config
.
InOut_Axis
.
DeviceName
,
store
.
Config
.
InOut_Axis
.
GetAxisValue
());
lblOutPulse3
.
Text
=
string
.
Format
(
"{0:d}"
,
lOutPulse3
);
int
lCountPulse3
=
ACServerManager
.
GetActualtPosition
(
store
.
Config
.
InOut_Axis
.
DeviceName
,
store
.
Config
.
InOut_Axis
.
GetAxisValue
());
lblCountPulse3
.
Text
=
string
.
Format
(
"{0:d}"
,
lCountPulse3
);
txtUpdownTarget
.
Text
=
store
.
Config
.
UpDown_Axis
.
TargetPosition
.
ToString
();
}
}
private
void
Bt_ClearCounter_Click
(
object
sender
,
EventArgs
e
)
private
void
Bt_ClearCounter_Click
(
object
sender
,
EventArgs
e
)
{
{
string
portName
=
txtAxisDeviceName
.
Text
;
string
portName
=
txtAxisDeviceName
.
Text
;
...
@@ -325,11 +327,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -325,11 +327,7 @@ namespace OnlineStore.ACSingleStore
{
{
stop_button_Click
(
null
,
null
);
stop_button_Click
(
null
,
null
);
}
}
foreach
(
string
str
in
store
.
Config
.
SMCDeviceNameList
)
{
//KTKSMCManager.WExit(str);
ACServerManager
.
ColsePort
(
str
);
}
KNDManager
.
CloseAllDO
();
KNDManager
.
CloseAllDO
();
StoreOpenStatus
(
false
);
StoreOpenStatus
(
false
);
KNDManager
.
CloseAllConnection
();
KNDManager
.
CloseAllConnection
();
...
@@ -448,21 +446,21 @@ namespace OnlineStore.ACSingleStore
...
@@ -448,21 +446,21 @@ namespace OnlineStore.ACSingleStore
private
void
btnAxisAMove_Click
(
object
sender
,
EventArgs
e
)
private
void
btnAxisAMove_Click
(
object
sender
,
EventArgs
e
)
{
{
ConfigMoveAxis
axisC
=
store
.
moveAxisList
[
cmbAxisList
.
SelectedIndex
];
//
ConfigMoveAxis axisC = store.moveAxisList[cmbAxisList.SelectedIndex];
string
portName
=
txtAxisDeviceName
.
Text
;
string
portName
=
txtAxisDeviceName
.
Text
;
short
SlvAddr
=
FormUtil
.
GetShortValue
(
txtAxisValue
);
short
SlvAddr
=
FormUtil
.
GetShortValue
(
txtAxisValue
);
int
position
=
FormUtil
.
GetIntValue
(
txtAPosition
);
int
position
=
FormUtil
.
GetIntValue
(
txtAPosition
);
int
speed
=
FormUtil
.
GetIntValue
(
txtASpeed
);
int
speed
=
FormUtil
.
GetIntValue
(
txtASpeed
);
if
(
axisC
.
PositionIsHasLimit
()
&&
(
axisC
.
PositionMin
>
position
||
axisC
.
PositionMax
<
position
))
//
if (axisC.PositionIsHasLimit() && (axisC.PositionMin > position || axisC.PositionMax < position))
{
//
{
MessageBox
.
Show
(
"位置超出"
+
axisC
.
Explain
+
"上下限("
+
axisC
.
PositionMin
+
"-"
+
axisC
.
PositionMax
+
")"
);
//
MessageBox.Show("位置超出" + axisC.Explain + "上下限(" + axisC.PositionMin + "-" + axisC.PositionMax + ")");
return
;
//
return;
}
//
}
ACServerManager
.
AbsMove
(
portName
,
SlvAddr
,
position
,
speed
/
10
);
ACServerManager
.
AbsMove
(
portName
,
SlvAddr
,
position
,
speed
/
10
);
}
}
private
void
btnAxisVMove_Click
(
object
sender
,
EventArgs
e
)
private
void
btnAxisVMove_Click
(
object
sender
,
EventArgs
e
)
{
{
ConfigMoveAxis
axisC
=
store
.
moveAxisList
[
cmbAxisList
.
SelectedIndex
];
//
ConfigMoveAxis axisC = store.moveAxisList[cmbAxisList.SelectedIndex];
string
portName
=
txtAxisDeviceName
.
Text
;
string
portName
=
txtAxisDeviceName
.
Text
;
short
SlvAddr
=
FormUtil
.
GetShortValue
(
txtAxisValue
);
short
SlvAddr
=
FormUtil
.
GetShortValue
(
txtAxisValue
);
int
speed
=
FormUtil
.
GetIntValue
(
txtASpeed
);
int
speed
=
FormUtil
.
GetIntValue
(
txtASpeed
);
...
@@ -471,18 +469,18 @@ namespace OnlineStore.ACSingleStore
...
@@ -471,18 +469,18 @@ namespace OnlineStore.ACSingleStore
private
void
btnAxisRMove_Click
(
object
sender
,
EventArgs
e
)
private
void
btnAxisRMove_Click
(
object
sender
,
EventArgs
e
)
{
{
ConfigMoveAxis
axisC
=
store
.
moveAxisList
[
cmbAxisList
.
SelectedIndex
];
//
ConfigMoveAxis axisC = store.moveAxisList[cmbAxisList.SelectedIndex];
string
portName
=
txtAxisDeviceName
.
Text
;
string
portName
=
txtAxisDeviceName
.
Text
;
short
SlvAddr
=
FormUtil
.
GetShortValue
(
txtAxisValue
);
short
SlvAddr
=
FormUtil
.
GetShortValue
(
txtAxisValue
);
int
position
=
FormUtil
.
GetIntValue
(
txtAPosition
);
int
position
=
FormUtil
.
GetIntValue
(
txtAPosition
);
int
speed
=
FormUtil
.
GetIntValue
(
txtASpeed
);
int
speed
=
FormUtil
.
GetIntValue
(
txtASpeed
);
int
currPositon
=
ACServerManager
.
GetActualtPosition
(
portName
,
SlvAddr
);
//
int currPositon = ACServerManager.GetActualtPosition(portName, SlvAddr);
int
newPosition
=
position
+
currPositon
;
//
int newPosition = position + currPositon;
if
(
axisC
.
PositionIsHasLimit
()
&&
(
axisC
.
PositionMin
>
newPosition
||
axisC
.
PositionMax
<
newPosition
))
//
if (axisC.PositionIsHasLimit() && (axisC.PositionMin > newPosition || axisC.PositionMax < newPosition))
{
//
{
MessageBox
.
Show
(
"位置超出"
+
axisC
.
Explain
+
"上下限("
+
axisC
.
PositionMin
+
"-"
+
axisC
.
PositionMax
+
")"
);
//
MessageBox.Show("位置超出"+axisC.Explain+"上下限(" + axisC.PositionMin + "-" + axisC.PositionMax + ")");
return
;
//
return;
}
//
}
ACServerManager
.
RelMove
(
portName
,
SlvAddr
,
position
,
speed
);
ACServerManager
.
RelMove
(
portName
,
SlvAddr
,
position
,
speed
);
}
}
...
@@ -609,8 +607,8 @@ namespace OnlineStore.ACSingleStore
...
@@ -609,8 +607,8 @@ namespace OnlineStore.ACSingleStore
string
portName
=
txtAxisDeviceName
.
Text
;
string
portName
=
txtAxisDeviceName
.
Text
;
short
SlvAddr
=
FormUtil
.
GetShortValue
(
txtAxisValue
);
short
SlvAddr
=
FormUtil
.
GetShortValue
(
txtAxisValue
);
ACServerManager
.
OpenPort
(
portName
);
ACServerManager
.
OpenPort
(
portName
);
ACServerManager
.
InitSlvAddr
(
portName
,
SlvAddr
);
//
ACServerManager.InitSlvAddr(portName, SlvAddr);
Thread
.
Sleep
(
100
);
//
Thread.Sleep(100);
ACServerManager
.
AlarmClear
(
portName
,
SlvAddr
);
ACServerManager
.
AlarmClear
(
portName
,
SlvAddr
);
Thread
.
Sleep
(
100
);
Thread
.
Sleep
(
100
);
ACServerManager
.
ServoOn
(
portName
,
SlvAddr
);
ACServerManager
.
ServoOn
(
portName
,
SlvAddr
);
...
@@ -1117,7 +1115,15 @@ namespace OnlineStore.ACSingleStore
...
@@ -1117,7 +1115,15 @@ namespace OnlineStore.ACSingleStore
private
void
btnAxisReturnHome_Click
(
object
sender
,
EventArgs
e
)
private
void
btnAxisReturnHome_Click
(
object
sender
,
EventArgs
e
)
{
{
string
portName
=
txtAxisDeviceName
.
Text
;
short
SlvAddr
=
FormUtil
.
GetShortValue
(
txtAxisValue
);
int
speed
=
FormUtil
.
GetIntValue
(
txtASpeed
);
ACServerManager
.
HomeMove
(
portName
,
SlvAddr
,
speed
);
}
}
private
void
btnReadPosition_Click
(
object
sender
,
EventArgs
e
)
{
ReadPosistion
();
}
}
}
}
}
source/DeviceLibrary/PanasonicServo/ACServerManager.cs
查看文件 @
a4fa747
...
@@ -193,7 +193,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -193,7 +193,7 @@ namespace OnlineStore.DeviceLibrary
string
v1
=
slvAddrStr
+
"064601 "
+
SpeedToStr
(
targetSpeed
,
4
)
+
" ffff"
;
string
v1
=
slvAddrStr
+
"064601 "
+
SpeedToStr
(
targetSpeed
,
4
)
+
" ffff"
;
SendStr
(
portName
,
v1
);
SendStr
(
portName
,
v1
);
RelMove
(
portName
,
slvAddr
,
position
,
targetSpeed
);
RelMove
(
portName
,
slvAddr
,
position
);
}
}
public
static
void
RelMove
(
string
portName
,
int
slvAddr
,
int
position
)
public
static
void
RelMove
(
string
portName
,
int
slvAddr
,
int
position
)
{
{
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
a4fa747
...
@@ -647,6 +647,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -647,6 +647,7 @@ namespace OnlineStore.DeviceLibrary
public
void
CloseAllAxis
()
public
void
CloseAllAxis
()
{
{
LogUtil
.
info
(
StoreName
+
"关闭刹车,关闭伺服"
);
KNDIOMove
(
IO_Type
.
Axis_Brake
,
IO_VALUE
.
LOW
);
KNDIOMove
(
IO_Type
.
Axis_Brake
,
IO_VALUE
.
LOW
);
foreach
(
ConfigMoveAxis
axis
in
moveAxisList
)
foreach
(
ConfigMoveAxis
axis
in
moveAxisList
)
{
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论