Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC30-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit b117e876
由
LN
编写于
2019-09-19 11:03:37 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
激光对位置功能,间隔2秒以上才记录
1 个父辈
eb2722ae
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
12 行增加
和
4 行删除
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/positionTool/FrmPositionTool.cs
source/ACSingleStore/记录.txt
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
b117e87
...
@@ -1797,7 +1797,8 @@ namespace OnlineStore.AutoInOutStore
...
@@ -1797,7 +1797,8 @@ namespace OnlineStore.AutoInOutStore
int
slvAddr
=
store
.
Config
.
UpDown_Axis
.
GetAxisValue
();
int
slvAddr
=
store
.
Config
.
UpDown_Axis
.
GetAxisValue
();
string
ioIP
=
"192.168.200.13"
;
string
ioIP
=
"192.168.200.13"
;
int
ioIndex
=
0
;
int
ioIndex
=
0
;
if
(
store
.
Config
.
StoreDIList
.
ContainsKey
(
IO_Type
.
UpdownPositionSingal
))
// if (store.Config.StoreDIList.ContainsKey(IO_Type.UpdownPositionSingal))
if
(
store
.
Config
.
StoreDIList
.
ContainsKey
(
IO_Type
.
TrayCheck_Fixture
))
{
{
ioIP
=
store
.
Config
.
StoreDIList
[
IO_Type
.
TrayCheck_Fixture
].
DeviceName
;
ioIP
=
store
.
Config
.
StoreDIList
[
IO_Type
.
TrayCheck_Fixture
].
DeviceName
;
ioIndex
=
store
.
Config
.
StoreDIList
[
IO_Type
.
TrayCheck_Fixture
].
GetIOAddr
();
ioIndex
=
store
.
Config
.
StoreDIList
[
IO_Type
.
TrayCheck_Fixture
].
GetIOAddr
();
...
...
source/ACSingleStore/positionTool/FrmPositionTool.cs
查看文件 @
b117e87
...
@@ -227,6 +227,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -227,6 +227,7 @@ namespace OnlineStore.AutoInOutStore
private
DateTime
LastTime
=
DateTime
.
Now
;
private
DateTime
LastTime
=
DateTime
.
Now
;
private
List
<
int
>
PositionList
=
new
List
<
int
>();
private
List
<
int
>
PositionList
=
new
List
<
int
>();
private
IO_VALUE
LastValue
=
IO_VALUE
.
LOW
;
private
IO_VALUE
LastValue
=
IO_VALUE
.
LOW
;
private
DateTime
LastGetPTime
=
DateTime
.
Now
;
private
void
ToolTimer_Elapsed
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
private
void
ToolTimer_Elapsed
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
{
{
TimeSpan
span
=
DateTime
.
Now
-
LastTime
;
TimeSpan
span
=
DateTime
.
Now
-
LastTime
;
...
@@ -241,7 +242,8 @@ namespace OnlineStore.AutoInOutStore
...
@@ -241,7 +242,8 @@ namespace OnlineStore.AutoInOutStore
if
(
moveS
.
Equals
(
1
))
if
(
moveS
.
Equals
(
1
))
{
{
IO_VALUE
currValue
=
GetSingleValue
();
IO_VALUE
currValue
=
GetSingleValue
();
if
(
LastValue
.
Equals
(
IO_VALUE
.
LOW
)
&&
currValue
.
Equals
(
IO_VALUE
.
HIGH
))
TimeSpan
checkSpan
=
DateTime
.
Now
-
LastGetPTime
;
if
(
LastValue
.
Equals
(
IO_VALUE
.
LOW
)
&&
currValue
.
Equals
(
IO_VALUE
.
HIGH
)&&
checkSpan
.
TotalSeconds
>
2
)
{
{
int
currPos
=
ACServerManager
.
GetActualtPosition
(
PortName
,
SlvAddr
);
int
currPos
=
ACServerManager
.
GetActualtPosition
(
PortName
,
SlvAddr
);
txtActualPosition
.
Text
=
currPos
.
ToString
();
txtActualPosition
.
Text
=
currPos
.
ToString
();
...
@@ -254,6 +256,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -254,6 +256,7 @@ namespace OnlineStore.AutoInOutStore
}
}
LogUtil
.
info
(
LogName
+
"收到信号,【"
+
num
+
"】【"
+
currPos
+
"】,差值【"
+
Math
.
Abs
(
currPos
-
preValue
)+
"】"
);
LogUtil
.
info
(
LogName
+
"收到信号,【"
+
num
+
"】【"
+
currPos
+
"】,差值【"
+
Math
.
Abs
(
currPos
-
preValue
)+
"】"
);
LastValue
=
IO_VALUE
.
HIGH
;
LastValue
=
IO_VALUE
.
HIGH
;
LastGetPTime
=
DateTime
.
Now
;
}
}
LastValue
=
currValue
;
LastValue
=
currValue
;
...
@@ -325,10 +328,13 @@ namespace OnlineStore.AutoInOutStore
...
@@ -325,10 +328,13 @@ namespace OnlineStore.AutoInOutStore
timer1
.
Stop
();
timer1
.
Stop
();
if
(
btnServoOff
.
Enabled
)
if
(
btnServoOff
.
Enabled
)
{
{
btnServoOff_Click
(
null
,
null
);
StopTimer
();
// toolTimer.Stop();
ACServerManager
.
SuddenStop
(
PortName
,
SlvAddr
);
Thread
.
Sleep
(
100
);
}
}
//ACServerManager.CloseAllPort();
//ACServerManager.CloseAllPort();
IOManager
.
instance
.
CloseAllConnection
();
//
IOManager.instance.CloseAllConnection();
}
}
private
void
btnOpenFolder_Click
(
object
sender
,
EventArgs
e
)
private
void
btnOpenFolder_Click
(
object
sender
,
EventArgs
e
)
...
...
source/ACSingleStore/记录.txt
查看文件 @
b117e87
...
@@ -215,6 +215,7 @@ DI9 不要,只判断DI10
...
@@ -215,6 +215,7 @@ DI9 不要,只判断DI10
20190801 新建分支:RC1252-AutoInOutStore
20190801 新建分支:RC1252-AutoInOutStore
压紧轴改为伺服,压紧轴计量检测信号去掉。
压紧轴改为伺服,压紧轴计量检测信号去掉。
增加升降轴对位置功能,间隔2秒以上才记录
IO配置修改,改为新的IO配置。
IO配置修改,改为新的IO配置。
吸盘改为夹爪,代码逻辑修改。
吸盘改为夹爪,代码逻辑修改。
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论