Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 41340f0c
由
几米阳光
编写于
2019-04-04 12:48:29 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
伺服若已在原点但未回过原点,需要匀速走1500秒,再回原点
1 个父辈
635719e6
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
40 行增加
和
19 行删除
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/记录.txt
source/DeviceLibrary/PanasonicServo/ACServerManager.cs
source/DeviceLibrary/acSingleStore/StoreManager.cs
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
41340f0
...
...
@@ -1698,6 +1698,7 @@
//
// btnClearLog
//
this
.
btnClearLog
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
btnClearLog
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnClearLog
.
Location
=
new
System
.
Drawing
.
Point
(
313
,
515
);
this
.
btnClearLog
.
Name
=
"btnClearLog"
;
...
...
@@ -2305,6 +2306,7 @@
//
// btnCloseLed
//
this
.
btnCloseLed
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
btnCloseLed
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnCloseLed
.
Location
=
new
System
.
Drawing
.
Point
(
149
,
568
);
this
.
btnCloseLed
.
Name
=
"btnCloseLed"
;
...
...
@@ -2316,6 +2318,7 @@
//
// btnOpenLed
//
this
.
btnOpenLed
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
btnOpenLed
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnOpenLed
.
Location
=
new
System
.
Drawing
.
Point
(
32
,
568
);
this
.
btnOpenLed
.
Name
=
"btnOpenLed"
;
...
...
@@ -2327,6 +2330,7 @@
//
// btnCloseDoor
//
this
.
btnCloseDoor
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
btnCloseDoor
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnCloseDoor
.
Location
=
new
System
.
Drawing
.
Point
(
149
,
515
);
this
.
btnCloseDoor
.
Name
=
"btnCloseDoor"
;
...
...
@@ -2337,6 +2341,7 @@
//
// btnOpenDoor
//
this
.
btnOpenDoor
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
btnOpenDoor
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnOpenDoor
.
Location
=
new
System
.
Drawing
.
Point
(
32
,
515
);
this
.
btnOpenDoor
.
Name
=
"btnOpenDoor"
;
...
...
source/ACSingleStore/记录.txt
查看文件 @
41340f0
...
...
@@ -58,6 +58,8 @@
4.客户端启动时默认状态是复位中。
20190326修改:
伺服若已在原点但未回过原点,需要匀速走1500秒,再回原点
...
...
source/DeviceLibrary/PanasonicServo/ACServerManager.cs
查看文件 @
41340f0
...
...
@@ -299,29 +299,42 @@ namespace OnlineStore.DeviceLibrary
int
homeSingle
=
GetHomeSingle
(
portName
,
slvAddr
);
if
(
homeSingle
.
Equals
(
1
))
{
//int isHomeEnd = GetHomeEndStatus(portName, slvAddr);
//if (isHomeEnd.Equals(1))
//{
int
value
=
2000
;
LogUtil
.
info
(
"轴【"
+
portName
+
"_"
+
slvAddr
+
"】原点返回时发现原点已亮且回过原点,需要先相对走"
+
value
);
RelMove
(
portName
,
slvAddr
,
value
);
bool
isStop
=
false
;
for
(
int
i
=
0
;
i
<=
10
;
i
++)
int
isHomeEnd
=
GetHomeEndStatus
(
portName
,
slvAddr
);
if
(
isHomeEnd
.
Equals
(
1
))
{
Thread
.
Sleep
(
200
);
if
(
GetBusyStatus
(
portName
,
slvAddr
).
Equals
(
0
))
int
value
=
2000
;
LogUtil
.
info
(
"轴【"
+
portName
+
"_"
+
slvAddr
+
"】原点返回时发现原点已亮且回过原点,需要先相对走"
+
value
);
RelMove
(
portName
,
slvAddr
,
value
);
bool
isStop
=
false
;
for
(
int
i
=
0
;
i
<=
10
;
i
++)
{
isStop
=
true
;
LogUtil
.
info
(
"轴【"
+
portName
+
"_"
+
slvAddr
+
"】相对走"
+
value
+
"已结束"
);
break
;
Thread
.
Sleep
(
200
);
if
(
GetBusyStatus
(
portName
,
slvAddr
).
Equals
(
0
))
{
isStop
=
true
;
LogUtil
.
info
(
"轴【"
+
portName
+
"_"
+
slvAddr
+
"】相对走"
+
value
+
"已结束"
);
break
;
}
}
}
if
(!
isStop
)
if
(!
isStop
)
{
LogUtil
.
info
(
"轴【"
+
portName
+
"_"
+
slvAddr
+
"】相对走"
+
value
+
"已等待2分钟,直接停止"
);
SuddenStop
(
portName
,
slvAddr
);
}
}
else
{
LogUtil
.
info
(
"轴【"
+
portName
+
"_"
+
slvAddr
+
"】相对走"
+
value
+
"已等待2分钟,直接停止"
);
int
volSpeed
=
Math
.
Abs
(
speed
/
5
);
int
time
=
1500
;
LogUtil
.
info
(
"轴【"
+
portName
+
"_"
+
slvAddr
+
"】原点返回时发现原点已亮但未回过原点,先匀速向上走"
+
time
+
",速度["
+
volSpeed
+
"]"
);
//需要匀速向上走
ACServerManager
.
SpeedMove
(
portName
,
slvAddr
,
volSpeed
);
Thread
.
Sleep
(
time
);
LogUtil
.
info
(
"轴【"
+
portName
+
"_"
+
slvAddr
+
"】匀速 已等待"
+
time
+
",直接停止"
);
SuddenStop
(
portName
,
slvAddr
);
Thread
.
Sleep
(
100
);
}
//}
}
}
catch
(
Exception
ex
)
...
...
source/DeviceLibrary/acSingleStore/StoreManager.cs
查看文件 @
41340f0
...
...
@@ -19,8 +19,7 @@ namespace OnlineStore.DeviceLibrary
public
static
int
CurrInOutType
=
0
;
private
static
string
api_communication
=
"service/store/communication"
;
//流水线状态通信接口
private
static
string
api_nextFeeder
=
"service/store/nextFeeder"
;
// 出库站位列表切换接口
public
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
System
.
Reflection
.
MethodBase
.
GetCurrentMethod
().
DeclaringType
);
public
static
AC_SA_BoxBean
Store
=
null
;
public
static
AC_SA_Config
Config
=
null
;
...
...
@@ -141,6 +140,8 @@ namespace OnlineStore.DeviceLibrary
LOGGER
.
Error
(
"出错:"
,
ex
);
}
}
private
static
string
api_communication
=
"service/store/communication"
;
//流水线状态通信接口
private
static
string
api_nextFeeder
=
"service/store/nextFeeder"
;
// 出库站位列表切换接口
public
static
string
GetPostApi
(
string
host
)
{
if
(
host
==
""
)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论