Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit f427b7b6
由
LN
编写于
2019-12-08 10:11:31 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
218ee8a4
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
63 行增加
和
18 行删除
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/DeviceLibrary/PanasonicServo/ACServerManager.cs
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
f427b7b
...
...
@@ -198,6 +198,7 @@
this
.
btnLineAbsMove
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
label25
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
comboBoxPortName
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
btnH
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox5
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
...
...
@@ -226,6 +227,7 @@
//
this
.
groupBox5
.
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
.
btnH
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label6
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
label5
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnReadHomeSingle
);
...
...
@@ -436,10 +438,10 @@
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
(
401
,
162
);
this
.
btnReadPosition
.
Location
=
new
System
.
Drawing
.
Point
(
207
,
153
);
this
.
btnReadPosition
.
Name
=
"btnReadPosition"
;
this
.
btnReadPosition
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
btnReadPosition
.
Size
=
new
System
.
Drawing
.
Size
(
90
,
33
);
this
.
btnReadPosition
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
33
);
this
.
btnReadPosition
.
TabIndex
=
278
;
this
.
btnReadPosition
.
Text
=
"读取位置"
;
this
.
btnReadPosition
.
UseVisualStyleBackColor
=
true
;
...
...
@@ -1775,55 +1777,55 @@
// 查看IOToolStripMenuItem
//
this
.
查看
IOToolStripMenuItem
.
Name
=
"查看IOToolStripMenuItem"
;
this
.
查看
IOToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
查看
IOToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
75
,
26
);
this
.
查看
IOToolStripMenuItem
.
Text
=
"查看IO"
;
this
.
查看
IOToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
查看
IOToolStripMenuItem_Click
);
//
// toolStripSeparator5
//
this
.
toolStripSeparator5
.
Name
=
"toolStripSeparator5"
;
this
.
toolStripSeparator5
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator5
.
Size
=
new
System
.
Drawing
.
Size
(
17
2
,
6
);
//
// 料仓运转ONToolStripMenuItem
//
this
.
料仓运转
ONToolStripMenuItem
.
Name
=
"料仓运转ONToolStripMenuItem"
;
this
.
料仓运转
ONToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
料仓运转
ONToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
75
,
26
);
this
.
料仓运转
ONToolStripMenuItem
.
Text
=
"料仓运转ON"
;
this
.
料仓运转
ONToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
料仓运转
ONToolStripMenuItem_Click
);
//
// toolStripSeparator6
//
this
.
toolStripSeparator6
.
Name
=
"toolStripSeparator6"
;
this
.
toolStripSeparator6
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator6
.
Size
=
new
System
.
Drawing
.
Size
(
17
2
,
6
);
//
// 料仓运转OFFToolStripMenuItem
//
this
.
料仓运转
OFFToolStripMenuItem
.
Name
=
"料仓运转OFFToolStripMenuItem"
;
this
.
料仓运转
OFFToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
料仓运转
OFFToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
75
,
26
);
this
.
料仓运转
OFFToolStripMenuItem
.
Text
=
"料仓运转OFF"
;
this
.
料仓运转
OFFToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
料仓运转
OFFToolStripMenuItem_Click
);
//
// toolStripSeparator7
//
this
.
toolStripSeparator7
.
Name
=
"toolStripSeparator7"
;
this
.
toolStripSeparator7
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator7
.
Size
=
new
System
.
Drawing
.
Size
(
17
2
,
6
);
//
// 打开舱门ToolStripMenuItem
//
this
.
打开舱门
ToolStripMenuItem
.
Name
=
"打开舱门ToolStripMenuItem"
;
this
.
打开舱门
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
打开舱门
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
75
,
26
);
this
.
打开舱门
ToolStripMenuItem
.
Text
=
"打开仓门"
;
this
.
打开舱门
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
打开舱门
ToolStripMenuItem_Click
);
//
// toolStripSeparator8
//
this
.
toolStripSeparator8
.
Name
=
"toolStripSeparator8"
;
this
.
toolStripSeparator8
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator8
.
Size
=
new
System
.
Drawing
.
Size
(
17
2
,
6
);
//
// 关闭仓门ToolStripMenuItem
//
this
.
关闭仓门
ToolStripMenuItem
.
Name
=
"关闭仓门ToolStripMenuItem"
;
this
.
关闭仓门
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
关闭仓门
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
75
,
26
);
this
.
关闭仓门
ToolStripMenuItem
.
Text
=
"关闭仓门"
;
this
.
关闭仓门
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
关闭仓门
ToolStripMenuItem_Click
);
//
...
...
@@ -1843,38 +1845,38 @@
// 轴卡点动ToolStripMenuItem
//
this
.
轴卡点动
ToolStripMenuItem
.
Name
=
"轴卡点动ToolStripMenuItem"
;
this
.
轴卡点动
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
轴卡点动
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
轴卡点动
ToolStripMenuItem
.
Text
=
"轴卡点动"
;
this
.
轴卡点动
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
轴卡点动
ToolStripMenuItem_Click
);
//
// toolStripSeparator9
//
this
.
toolStripSeparator9
.
Name
=
"toolStripSeparator9"
;
this
.
toolStripSeparator9
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator9
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
//
// 扫码测试ToolStripMenuItem
//
this
.
扫码测试
ToolStripMenuItem
.
Name
=
"扫码测试ToolStripMenuItem"
;
this
.
扫码测试
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
扫码测试
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
扫码测试
ToolStripMenuItem
.
Text
=
"扫码测试"
;
this
.
扫码测试
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
扫码测试
ToolStripMenuItem_Click
);
//
// toolStripSeparator10
//
this
.
toolStripSeparator10
.
Name
=
"toolStripSeparator10"
;
this
.
toolStripSeparator10
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator10
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
//
// 学习二维码ToolStripMenuItem
//
this
.
学习二维码
ToolStripMenuItem
.
Name
=
"学习二维码ToolStripMenuItem"
;
this
.
学习二维码
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
学习二维码
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
学习二维码
ToolStripMenuItem
.
Text
=
"学习二维码"
;
this
.
学习二维码
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
学习二维码
ToolStripMenuItem_Click
);
//
// 扫码循环测试ToolStripMenuItem
//
this
.
扫码循环测试
ToolStripMenuItem
.
Name
=
"扫码循环测试ToolStripMenuItem"
;
this
.
扫码循环测试
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
扫码循环测试
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
扫码循环测试
ToolStripMenuItem
.
Text
=
"开始循环扫码"
;
this
.
扫码循环测试
ToolStripMenuItem
.
Visible
=
false
;
this
.
扫码循环测试
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
扫码循环测试
ToolStripMenuItem_Click
);
...
...
@@ -2223,6 +2225,21 @@
this
.
comboBoxPortName
.
Size
=
new
System
.
Drawing
.
Size
(
103
,
25
);
this
.
comboBoxPortName
.
TabIndex
=
0
;
//
// btnH
//
this
.
btnH
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
btnH
.
Cursor
=
System
.
Windows
.
Forms
.
Cursors
.
Default
;
this
.
btnH
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnH
.
ForeColor
=
System
.
Drawing
.
SystemColors
.
ControlText
;
this
.
btnH
.
Location
=
new
System
.
Drawing
.
Point
(
401
,
185
);
this
.
btnH
.
Name
=
"btnH"
;
this
.
btnH
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
btnH
.
Size
=
new
System
.
Drawing
.
Size
(
90
,
70
);
this
.
btnH
.
TabIndex
=
301
;
this
.
btnH
.
Text
=
"正方向原点返回"
;
this
.
btnH
.
UseVisualStyleBackColor
=
true
;
this
.
btnH
.
Click
+=
new
System
.
EventHandler
(
this
.
btnH_Click
);
//
// FrmStoreBox
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
...
...
@@ -2439,6 +2456,7 @@
private
System
.
Windows
.
Forms
.
Label
lblShuoKeMsg
;
private
System
.
Windows
.
Forms
.
CheckBox
chbOnlyOut
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
扫码循环测试
ToolStripMenuItem
;
public
System
.
Windows
.
Forms
.
Button
btnH
;
}
}
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
f427b7b
...
...
@@ -1419,5 +1419,26 @@ namespace OnlineStore.ACSingleStore
LogUtil
.
info
(
"扫码测试未得到锁"
);
}
}
private
void
btnH_Click
(
object
sender
,
EventArgs
e
)
{
string
portName
=
txtAxisDeviceName
.
Text
;
short
SlvAddr
=
FormUtil
.
GetShortValue
(
txtAxisValue
);
if
(
store
.
Config
.
InOut_Axis
.
IsSameAxis
(
portName
,
SlvAddr
)
&&
(
store
.
InOutAxisCanMove
().
Equals
(
false
)))
{
MessageBox
.
Show
(
"定位气缸不在下降端,不能移动进出轴"
,
"警告"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Warning
);
return
;
}
else
if
(
store
.
Config
.
Middle_Axis
.
IsSameAxis
(
portName
,
SlvAddr
)
||
store
.
Config
.
UpDown_Axis
.
IsSameAxis
(
portName
,
SlvAddr
))
{
if
(!
InOutIsIsP1
())
{
return
;
}
}
LogUtil
.
info
(
"点击【正方向原点返回】,端口号【"
+
portName
+
"】地址【"
+
SlvAddr
+
"】 "
);
ACServerManager
.
ZhHomeMove
(
portName
,
SlvAddr
);
}
}
}
source/DeviceLibrary/PanasonicServo/ACServerManager.cs
查看文件 @
f427b7b
...
...
@@ -347,7 +347,13 @@ namespace OnlineStore.DeviceLibrary
Thread
.
Sleep
(
SleepMSendons
);
OpenAndCloseSTB
(
portName
,
slvAddr
);
}
public
static
void
ZhHomeMove
(
string
portName
,
int
slvAddr
)
{
UpdateBlock
(
portName
,
slvAddr
,
ACCMDManager
.
Block_HomeMove0
);
LogUtil
.
info
(
portName
+
"回原点:正方向"
);
Thread
.
Sleep
(
SleepMSendons
);
OpenAndCloseSTB
(
portName
,
slvAddr
);
}
public
static
void
SpeedMove
(
string
portName
,
int
slvAddr
,
int
speed
)
{
int
preSpeed
=
GetAddrValue
(
portName
,
slvAddr
,
ACCMDManager
.
Speed_Addr
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论