Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO815-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit e22a6f0e
由
LN
编写于
2019-11-19 17:21:18 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
位置调试增加参数保存功能。
1 个父辈
43a3d873
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
49 行增加
和
0 行删除
source/ACSingleStore/positionTool/FrmPositionTool.cs
source/Common/Setting_Init.cs
source/ACSingleStore/positionTool/FrmPositionTool.cs
查看文件 @
e22a6f0
...
...
@@ -62,12 +62,46 @@ namespace OnlineStore.AutoInOutStore
IOManager
.
Init
();
IOManager
.
instance
.
ConnectionIOList
(
new
List
<
string
>
{
/*IoIp*/
});
}
P3Offset
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
Tool_P3_Offset
);
P4Offset
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
Tool_P4_Offset
);
P5Offset
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
Tool_P5_Offset
);
P6Offset
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
Tool_P6_Offset
);
int
tSpeed
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
Tool_TargetSpeed
);
int
tPosition
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
Tool_TargetPosition
);
if
(
P3Offset
.
Equals
(
0
))
P3Offset
=
6000
;
if
(
P4Offset
.
Equals
(
0
))
P4Offset
=
-
6000
;
if
(
P5Offset
.
Equals
(
0
))
P5Offset
=
-
6000
;
if
(
P6Offset
.
Equals
(
0
))
P6Offset
=
6000
;
if
(
tSpeed
.
Equals
(
0
))
tSpeed
=
20
;
if
(
tPosition
.
Equals
(
0
))
tPosition
=
6000
;
txtP3Offset
.
Text
=
P3Offset
.
ToString
();
txtP4Offset
.
Text
=
P4Offset
.
ToString
();
txtP5Offset
.
Text
=
P5Offset
.
ToString
();
txtP6Offset
.
Text
=
P6Offset
.
ToString
();
txtSpeed
.
Text
=
tSpeed
.
ToString
();
txtPosition
.
Text
=
tPosition
.
ToString
();
SaveConfig
(
tSpeed
,
tPosition
);
//判断伺服是否已经打开
bool
isOn
=
ACServerManager
.
ServerOnStatus
(
PortName
,
SlvAddr
);
formStatus
(
isOn
);
timer1
.
Start
();
ioStatusControl1
.
IOName
=
ResourceCulture
.
GetString
(
"检测信号"
);
}
private
void
SaveConfig
(
int
speed
,
int
position
)
{
//保存配置
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
Tool_P3_Offset
,
P3Offset
);
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
Tool_P4_Offset
,
P4Offset
);
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
Tool_P5_Offset
,
P5Offset
);
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
Tool_P6_Offset
,
P6Offset
);
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
Tool_TargetSpeed
,
speed
);
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
Tool_TargetPosition
,
position
);
}
private
void
btnServoOn_Click
(
object
sender
,
EventArgs
e
)
{
//PositionList.Add(32000);
...
...
@@ -184,6 +218,9 @@ namespace OnlineStore.AutoInOutStore
P5Offset
=
FormUtil
.
GetIntValue
(
txtP5Offset
);
P6Offset
=
FormUtil
.
GetIntValue
(
txtP6Offset
);
LastValue
=
IO_VALUE
.
LOW
;
SaveConfig
(
speed
,
position
);
string
fileName
=
txtFileName
.
Text
;
string
filePath
=
Application
.
StartupPath
+
@"\logs\"
+
fileName
;
if
(
File
.
Exists
(
filePath
))
...
...
source/Common/Setting_Init.cs
查看文件 @
e22a6f0
...
...
@@ -103,5 +103,17 @@ namespace OnlineStore.Common
public
static
string
QRCodeCount
=
"QRCodeCount"
;
public
static
string
OpenCycleOut
=
"OpenCycleOut"
;
public
static
string
AIOAutoUpload
=
"AIOAutoUpload"
;
public
static
string
Tool_P3_Offset
=
"Tool_P3_Offset"
;
public
static
string
Tool_P4_Offset
=
"Tool_P4_Offset"
;
public
static
string
Tool_P5_Offset
=
"Tool_P5_Offset"
;
public
static
string
Tool_P6_Offset
=
"Tool_P6_Offset"
;
public
static
string
Tool_TargetSpeed
=
"Tool_TargetSpeed"
;
public
static
string
Tool_TargetPosition
=
"Tool_TargetPosition"
;
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论