Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO815-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 3bc2cedb
由
LN
编写于
2019-09-24 14:46:39 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
中英文完善
1 个父辈
cce296ab
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
94 行增加
和
7 行删除
source/ACSingleStore/Properties/Resource.en-US.resx
source/ACSingleStore/Properties/Resource.zh-CN.resx
source/ACSingleStore/positionTool/FrmPositionTool.cs
source/DeviceLibrary/DeviceLibrary/IO/AIOBOX/AIOBOXManager.cs
source/ACSingleStore/Properties/Resource.en-US.resx
查看文件 @
3bc2ced
...
@@ -1333,4 +1333,40 @@
...
@@ -1333,4 +1333,40 @@
<data name="启动失败:设备未初始化完成" xml:space="preserve">
<data name="启动失败:设备未初始化完成" xml:space="preserve">
<value>Startup failure: device initialization is not complete</value>
<value>Startup failure: device initialization is not complete</value>
</data>
</data>
<data name="FrmPositionTool_groupBox1_Text" xml:space="preserve">
<value>equipment information</value>
</data>
<data name="FrmPositionTool_groupBox2_Text" xml:space="preserve">
<value>location information</value>
</data>
<data name="FrmPositionTool_label10_Text" xml:space="preserve">
<value>Point P4 offset:</value>
</data>
<data name="FrmPositionTool_label4_Text" xml:space="preserve">
<value>Point P5 offset:</value>
</data>
<data name="FrmPositionTool_label5_Text" xml:space="preserve">
<value>Point P6 offset:</value>
</data>
<data name="FrmPositionTool_label9_Text" xml:space="preserve">
<value>Point P3 offset:</value>
</data>
<data name="升降轴位置调试:" xml:space="preserve">
<value>Updown-Axis Debug Location:</value>
</data>
<data name="打开串口失败" xml:space="preserve">
<value>Failed to open serial port</value>
</data>
<data name="文件【{0}】已存在,是否确定覆盖?" xml:space="preserve">
<value>File [{0}] already exists, is it ok to overwrite?</value>
</data>
<data name="检测信号" xml:space="preserve">
<value>detection signal </value>
</data>
<data name="请输入正确的速度" xml:space="preserve">
<value>Please enter the correct speed</value>
</data>
</root>
</root>
\ No newline at end of file
\ No newline at end of file
source/ACSingleStore/Properties/Resource.zh-CN.resx
查看文件 @
3bc2ced
...
@@ -1332,4 +1332,38 @@
...
@@ -1332,4 +1332,38 @@
<data name="启动失败:设备未初始化完成" xml:space="preserve">
<data name="启动失败:设备未初始化完成" xml:space="preserve">
<value>启动失败:设备未初始化完成</value>
<value>启动失败:设备未初始化完成</value>
</data>
</data>
<data name="FrmPositionTool_groupBox1_Text" xml:space="preserve">
<value>设备信息</value>
</data>
<data name="FrmPositionTool_groupBox2_Text" xml:space="preserve">
<value>位置信息</value>
</data>
<data name="FrmPositionTool_label10_Text" xml:space="preserve">
<value>入料缓冲点P4偏移量:</value>
</data>
<data name="FrmPositionTool_label4_Text" xml:space="preserve">
<value>出料前点P5偏移值:</value>
</data>
<data name="FrmPositionTool_label5_Text" xml:space="preserve">
<value>出料缓冲点P6偏移量:</value>
</data>
<data name="FrmPositionTool_label9_Text" xml:space="preserve">
<value>入料前点P3偏移量:</value>
</data>
<data name="升降轴位置调试:" xml:space="preserve">
<value>升降轴位置调试:</value>
</data>
<data name="打开串口失败" xml:space="preserve">
<value>打开串口失败</value>
</data>
<data name="文件【{0}】已存在,是否确定覆盖?" xml:space="preserve">
<value>文件【{0}】已存在,是否确定覆盖?</value>
</data>
<data name="检测信号" xml:space="preserve">
<value>检测信号</value>
</data>
<data name="请输入正确的速度" xml:space="preserve">
<value>请输入正确的速度</value>
</data>
</root>
</root>
\ No newline at end of file
\ No newline at end of file
source/ACSingleStore/positionTool/FrmPositionTool.cs
查看文件 @
3bc2ced
...
@@ -19,7 +19,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -19,7 +19,7 @@ namespace OnlineStore.AutoInOutStore
{
{
public
partial
class
FrmPositionTool
:
FrmBase
public
partial
class
FrmPositionTool
:
FrmBase
{
{
private
string
LogName
=
"升降轴位置调试:"
;
private
string
LogName
=
ResourceCulture
.
GetString
(
"升降轴位置调试:"
)
;
private
string
PortName
=
""
;
private
string
PortName
=
""
;
private
int
SlvAddr
=
0
;
private
int
SlvAddr
=
0
;
private
string
IoIp
=
""
;
private
string
IoIp
=
""
;
...
@@ -45,7 +45,10 @@ namespace OnlineStore.AutoInOutStore
...
@@ -45,7 +45,10 @@ namespace OnlineStore.AutoInOutStore
private
void
Form1_Load
(
object
sender
,
EventArgs
e
)
private
void
Form1_Load
(
object
sender
,
EventArgs
e
)
{
{
ACServerManager
.
IsShowMsg
=
false
;
ACServerManager
.
IsShowMsg
=
false
;
LogUtil
.
logBox
=
this
.
richTextBox1
;
if
(
ResourceCulture
.
CurrLanguage
.
Equals
(
ResourceCulture
.
China
))
{
LogUtil
.
logBox
=
this
.
richTextBox1
;
}
//ACServerManager.richeBox = this.richTextBox1;
//ACServerManager.richeBox = this.richTextBox1;
CheckForIllegalCrossThreadCalls
=
false
;
CheckForIllegalCrossThreadCalls
=
false
;
...
@@ -63,7 +66,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -63,7 +66,7 @@ namespace OnlineStore.AutoInOutStore
bool
isOn
=
ACServerManager
.
ServerOnStatus
(
PortName
,
SlvAddr
);
bool
isOn
=
ACServerManager
.
ServerOnStatus
(
PortName
,
SlvAddr
);
formStatus
(
isOn
);
formStatus
(
isOn
);
timer1
.
Start
();
timer1
.
Start
();
ioStatusControl1
.
IOName
=
"检测信号"
;
ioStatusControl1
.
IOName
=
ResourceCulture
.
GetString
(
"检测信号"
)
;
}
}
private
void
btnServoOn_Click
(
object
sender
,
EventArgs
e
)
private
void
btnServoOn_Click
(
object
sender
,
EventArgs
e
)
{
{
...
@@ -82,7 +85,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -82,7 +85,7 @@ namespace OnlineStore.AutoInOutStore
bool
result
=
ACServerManager
.
OpenPort
(
PortName
);
bool
result
=
ACServerManager
.
OpenPort
(
PortName
);
if
(!
result
)
if
(!
result
)
{
{
MessageBox
.
Show
(
"打开串口失败!"
);
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
"打开串口失败"
)
);
return
;
return
;
}
}
...
@@ -172,7 +175,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -172,7 +175,7 @@ namespace OnlineStore.AutoInOutStore
if
(
speed
<=(
0
))
if
(
speed
<=(
0
))
{
{
MessageBox
.
Show
(
"请输入正确的速度"
);
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
"请输入正确的速度"
)
);
txtSpeed
.
Focus
();
txtSpeed
.
Focus
();
return
;
return
;
}
}
...
@@ -185,7 +188,8 @@ namespace OnlineStore.AutoInOutStore
...
@@ -185,7 +188,8 @@ namespace OnlineStore.AutoInOutStore
string
filePath
=
Application
.
StartupPath
+
@"\logs\"
+
fileName
;
string
filePath
=
Application
.
StartupPath
+
@"\logs\"
+
fileName
;
if
(
File
.
Exists
(
filePath
))
if
(
File
.
Exists
(
filePath
))
{
{
DialogResult
result
=
MessageBox
.
Show
(
"文件【"
+
filePath
+
"】已存在,是否确定覆盖?"
,
""
,
MessageBoxButtons
.
OKCancel
,
MessageBoxIcon
.
Question
);
string
msg
=
ResourceCulture
.
GetString
(
"文件【{0}】已存在,是否确定覆盖?"
,
"文件【{0}】已存在,是否确定覆盖?"
,
fileName
);
DialogResult
result
=
MessageBox
.
Show
(
msg
,
""
,
MessageBoxButtons
.
OKCancel
,
MessageBoxIcon
.
Question
);
if
(!
result
.
Equals
(
DialogResult
.
OK
))
if
(!
result
.
Equals
(
DialogResult
.
OK
))
{
{
return
;
return
;
...
@@ -254,7 +258,11 @@ namespace OnlineStore.AutoInOutStore
...
@@ -254,7 +258,11 @@ namespace OnlineStore.AutoInOutStore
{
{
preValue
=
PositionList
[
num
-
2
];
preValue
=
PositionList
[
num
-
2
];
}
}
LogUtil
.
info
(
LogName
+
"收到信号,【"
+
num
+
"】【"
+
currPos
+
"】,差值【"
+
Math
.
Abs
(
currPos
-
preValue
)+
"】"
);
LogUtil
.
info
(
LogName
+
"【"
+
num
+
"】【"
+
currPos
+
"】【"
+
Math
.
Abs
(
currPos
-
preValue
)+
"】"
);
if
(
LogUtil
.
logBox
==
null
)
{
this
.
richTextBox1
.
AppendText
(
LogName
+
"【"
+
num
+
"】【"
+
currPos
+
"】【"
+
Math
.
Abs
(
currPos
-
preValue
)
+
"】"
+
Environment
.
NewLine
);
}
LastValue
=
IO_VALUE
.
HIGH
;
LastValue
=
IO_VALUE
.
HIGH
;
LastGetPTime
=
DateTime
.
Now
;
LastGetPTime
=
DateTime
.
Now
;
}
}
...
@@ -333,6 +341,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -333,6 +341,7 @@ namespace OnlineStore.AutoInOutStore
ACServerManager
.
SuddenStop
(
PortName
,
SlvAddr
);
ACServerManager
.
SuddenStop
(
PortName
,
SlvAddr
);
Thread
.
Sleep
(
100
);
Thread
.
Sleep
(
100
);
}
}
LogUtil
.
logBox
=
null
;
//ACServerManager.CloseAllPort();
//ACServerManager.CloseAllPort();
//IOManager.instance.CloseAllConnection();
//IOManager.instance.CloseAllConnection();
}
}
...
...
source/DeviceLibrary/DeviceLibrary/IO/AIOBOX/AIOBOXManager.cs
查看文件 @
3bc2ced
...
@@ -327,6 +327,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -327,6 +327,14 @@ namespace OnlineStore.DeviceLibrary
public
override
void
CloseAllConnection
()
public
override
void
CloseAllConnection
()
{
{
if
(
conTimer
!=
null
)
{
conTimer
.
Stop
();
}
if
(
AIOMap
==
null
)
{
return
;
}
foreach
(
AIOBOX
aio
in
AIOMap
.
Values
)
foreach
(
AIOBOX
aio
in
AIOMap
.
Values
)
{
{
aio
.
Close
();
aio
.
Close
();
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论