Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC30-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 70741fd3
由
几米阳光
编写于
2018-12-12 11:24:42 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
超时日志10秒打印一次
1 个父辈
a2234284
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
10 行增加
和
14 行删除
source/Common/util/LogUtil.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
source/Common/util/LogUtil.cs
查看文件 @
70741fd
...
...
@@ -71,17 +71,13 @@ namespace OnlineStore.Common
}
AddToBox
(
msg
,
Color
.
Gray
);
}
}
//private static List<string> lasErrorLogList = new List<string>();
private
static
int
errCount
=
5
;
public
static
void
error
(
ILog
log
,
string
errorMsg
,
int
type
)
}
public
static
void
error
(
string
errorMsg
,
int
type
)
{
if
(
lastErrorLogTime
.
ContainsKey
(
type
))
{
TimeSpan
span
=
DateTime
.
Now
-
lastErrorLogTime
[
type
];
if
(
span
.
TotalSeconds
<
5
)
if
(
span
.
TotalSeconds
<
10
)
{
return
;
}
...
...
@@ -89,13 +85,13 @@ namespace OnlineStore.Common
{
lastErrorLogTime
.
Remove
(
type
);
lastErrorLogTime
.
Add
(
type
,
DateTime
.
Now
);
error
(
log
,
errorMsg
);
error
(
errorMsg
);
}
}
else
{
lastErrorLogTime
.
Add
(
type
,
DateTime
.
Now
);
error
(
log
,
errorMsg
);
error
(
errorMsg
);
}
}
public
static
void
error
(
ILog
log
,
string
errorMsg
)
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
70741fd
...
...
@@ -185,7 +185,7 @@ namespace OnlineStore.DeviceLibrary
ConfigIO
io
=
Config
.
getWaitIO
(
wait
.
IoType
);
WarnMsg
=
StoreName
+
" 等待信号"
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
"超时!"
;
Alarm
(
StoreAlarmType
.
IoSingleTimeOut
,
io
.
ElectricalDefinition
,
WarnMsg
,
StoreMove
.
MoveType
);
LogUtil
.
error
(
LOGGER
,
StoreName
+
wait
.
IoType
+
"等待信号("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") 超时"
,
14
);
LogUtil
.
error
(
StoreName
+
wait
.
IoType
+
"等待信号("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") 超时"
,
14
);
isOk
=
false
;
break
;
}
...
...
@@ -258,7 +258,7 @@ namespace OnlineStore.DeviceLibrary
{
WarnMsg
=
WarnMsg
+
"\r\n"
+
wait
.
ToStr
();
}
LogUtil
.
error
(
LOGGER
,
WarnMsg
,
12
);
LogUtil
.
error
(
WarnMsg
,
12
);
}
else
{
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
查看文件 @
70741fd
...
...
@@ -56,7 +56,7 @@ namespace OnlineStore.DeviceLibrary
//else
//{
msg
=
Name
+
" storeMoveStep="
+
StoreMove
.
MoveStep
+
moveAxis
.
DisplayStr
+
"收到原点完成信号,当前位置["
+
outCount
+
"],误差过大,需要报警"
;
LogUtil
.
error
(
msg
);
LogUtil
.
error
(
msg
,
100
);
return
false
;
//}
}
...
...
@@ -99,7 +99,7 @@ namespace OnlineStore.DeviceLibrary
ConfigIO
io
=
StoreManager
.
Config
.
getWaitIO
(
wait
.
IoType
);
WarnMsg
=
"["
+
StoreMove
.
MoveStep
+
"] 等待["
+
io
.
ElectricalDefinition
+
"_"
+
io
.
Explain
+
"="
+
wait
.
IoValue
+
"]超时"
;
StoreManager
.
Store
.
Alarm
(
StoreAlarmType
.
BatchIoTimeOut
,
io
.
ElectricalDefinition
,
WarnMsg
,
StoreMove
.
MoveType
);
LogUtil
.
error
(
WarnMsg
);
LogUtil
.
error
(
WarnMsg
,
101
);
isOk
=
false
;
break
;
}
...
...
@@ -164,7 +164,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
span
.
TotalSeconds
>
StoreMove
.
TimeOutSeconds
)
{
WarnMsg
=
"["
+
StoreMove
.
MoveStep
+
"]等待["
+
NotOkMsg
+
"]超时["
+
Math
.
Round
(
span
.
TotalSeconds
,
0
)
+
"秒]"
;
LogUtil
.
error
(
WarnMsg
);
LogUtil
.
error
(
WarnMsg
,
102
);
StoreManager
.
Store
.
Alarm
(
StoreAlarmType
.
BatchIoTimeOut
,
""
,
WarnMsg
,
StoreMove
.
MoveType
);
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论