Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC30-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 26d2917a
由
几米阳光
编写于
2019-05-20 13:40:07 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
b31bb69f
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
23 行增加
和
30 行删除
source/DeviceLibrary/DeviceLibrary/IO/AIOBOX/AIOBOXManager.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
source/DeviceLibrary/store/AC_Store.cs
source/DeviceLibrary/DeviceLibrary/IO/AIOBOX/AIOBOXManager.cs
查看文件 @
26d2917
...
...
@@ -81,7 +81,7 @@ namespace OnlineStore.DeviceLibrary
aioBox
.
DI_Changed_Event
+=
AioBox_DI_Changed_Event
;
;
aioBox
.
DO_Changed_Event
+=
AioBox_DO_Changed_Event
;
aioBox
.
Log_Out_Event
+=
AioBox_Log_Out_Event
;
aioBox
.
Log_RxTx_Event
+=
AioBox_Log_RxTx_Event
;
//
aioBox.Log_RxTx_Event += AioBox_Log_RxTx_Event;
AIOMap
.
Add
(
ioIp
,
aioBox
);
LogUtil
.
info
(
"开始连接IO模块["
+
ioIp
+
"]["
+
DIMS
+
"]["
+
DOMS
+
"],尝试重连三次"
);
for
(
int
i
=
1
;
i
<=
3
;
i
++)
...
...
@@ -129,25 +129,25 @@ namespace OnlineStore.DeviceLibrary
}
private
DateTime
lastLogTime
=
DateTime
.
Now
;
private
void
AioBox_Log_RxTx_Event
(
AIOBOX
box
,
string
[]
s
)
{
TimeSpan
span
=
DateTime
.
Now
-
lastLogTime
;
if
(
span
.
TotalMinutes
>
1
)
{
lastLogTime
=
DateTime
.
Now
;
foreach
(
string
str
in
s
)
{
LogUtil
.
AIOLog
.
Debug
(
"["
+
box
.
IP
+
"]"
+
str
);
}
}
}
//
private void AioBox_Log_RxTx_Event(AIOBOX box, string[] s)
//
{
//
TimeSpan span = DateTime.Now - lastLogTime;
// //
if (span.TotalMinutes > 1)
//
{
//
lastLogTime = DateTime.Now;
//
foreach (string str in s)
//
{
//
LogUtil.AIOLog.Debug("[" + box.IP + "]" + str);
//
}
//
}
//
}
private
void
AioBox_Log_Out_Event
(
AIOBOX
box
,
string
[]
s
)
{
//
foreach (string str in s)
//
{
// LogUtil.AIOLog.Debug( "["+box.IP+"]"
+ str);
//
}
foreach
(
string
str
in
s
)
{
LogUtil
.
AIOLog
.
Debug
(
"["
+
box
.
IP
+
"]"
+
str
);
}
}
private
void
AioBox_DI_Changed_Event
(
AIOBOX
box
,
Box_Sta
[]
sta
)
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
26d2917
...
...
@@ -165,15 +165,7 @@ namespace OnlineStore.DeviceLibrary
{
timeOutMs
=
650000
;
}
if
(!
wait
.
IsEnd
&&
span
.
TotalSeconds
>
1
&&
(
wait
.
IoType
.
Equals
(
IO_Type
.
SuckingDisc_Air
)
))
{
IO_VALUE
doValue
=
IOManager
.
DOValue
(
wait
.
IoType
);
if
(!
doValue
.
Equals
(
wait
.
IoValue
))
{
LogUtil
.
error
(
"等待["
+
NotOkMsg
+
"],重写DO("
+
wait
.
IoType
+
"="
+
wait
.
IoValue
+
")"
);
IOManager
.
IOMove
(
wait
.
IoType
,
wait
.
IoValue
);
}
}
if
((!
wait
.
IsEnd
)
&&
span
.
TotalMilliseconds
>
timeOutMs
)
{
ConfigIO
io
=
Config
.
getWaitIO
(
wait
.
IoType
);
...
...
@@ -737,6 +729,7 @@ namespace OnlineStore.DeviceLibrary
if
(
BatchNeedMove
)
{
StoreMove
.
TimeOutSeconds
=
120
;
Thread
.
Sleep
(
1000
);
ACAxisMove
(
Config
.
Batch_Axis
,
targetValue
,
Config
.
BatchAxis_P1_Speed
);
OutStoreLog
(
"出库:SO_03 批量轴下降【"
+
outDownPosition
+
"】目标【"
+
targetValue
+
"】 "
);
Thread
.
Sleep
(
100
);
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
查看文件 @
26d2917
...
...
@@ -268,7 +268,7 @@ namespace OnlineStore.DeviceLibrary
else
{
TimeSpan
span
=
DateTime
.
Now
-
AxisResetMoveTime
;
if
((
AutoBaitingStatus
.
Equals
(
StoreRunStatus
.
Busy
)||
AutoBaitingStatus
.
Equals
(
StoreRunStatus
.
Reset
))
&&
span
.
TotalSeconds
>
3
)
if
((
AutoBaitingStatus
.
Equals
(
StoreRunStatus
.
Busy
)||
AutoBaitingStatus
.
Equals
(
StoreRunStatus
.
Reset
))
&&
span
.
TotalSeconds
>
10
)
//if (AutoBaitingStatus.Equals(StoreRunStatus.Busy) && StoreMove.CanWhileCount > 0)
{
AxisResetMoveTime
=
DateTime
.
Now
;
...
...
@@ -277,9 +277,9 @@ namespace OnlineStore.DeviceLibrary
if
(
isEnd
)
{
//判断是否需要重新运动
StoreMove
.
CanWhileCount
--;
LogUtil
.
error
(
wait
.
ToStr
()
+
"未收到信号且停止运动,重新匀速"
+
StoreManager
.
Config
.
BatchAxis_SlowSpeed
+
"运动,剩余["
+
StoreMove
.
CanWhileCount
+
"]次"
);
LogUtil
.
error
(
wait
.
ToStr
()
+
"
未收到信号且停止运动,重新匀速"
+
StoreManager
.
Config
.
BatchAxis_SlowSpeed
+
"运动,剩余["
+
StoreMove
.
CanWhileCount
+
"]次"
);
ACServerManager
.
SuddenStop
(
wait
.
AxisInfo
);
Thread
.
Sleep
(
3
00
);
Thread
.
Sleep
(
20
00
);
ACServerManager
.
SpeedMove
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
(),
StoreManager
.
Config
.
BatchAxis_SlowSpeed
);
}
}
...
...
source/DeviceLibrary/store/AC_Store.cs
查看文件 @
26d2917
...
...
@@ -376,7 +376,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
LOGGER
,
moveAxis
.
DisplayStr
+
"目标位置["
+
targetPosition
+
"]当前位置["
+
outCount
+
"],误差过大,重新开始运动,剩余["
+
StoreMove
.
CanWhileCount
+
"]次"
);
ACServerManager
.
SuddenStop
(
moveAxis
);
Thread
.
Sleep
(
3
00
);
Thread
.
Sleep
(
10
00
);
ACServerManager
.
AbsMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
);
StoreMove
.
CanWhileCount
--;
return
false
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论