Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit e9880b04
由
LN
编写于
2020-04-15 18:16:02 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
错误日志重新定义
1 个父辈
6a892985
显示空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
35 行增加
和
28 行删除
source/Common/util/AcSerialBean.cs
source/Common/util/LogUtil.cs
source/Common/util/MyWebClient.cs
source/Common/util/TcpClient.cs
source/Common/util/TcpServer.cs
source/DeviceLibrary/assemblyLine/EquipBase.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
source/DeviceLibrary/assemblyLine/LineBean.cs
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
source/DeviceLibrary/assemblyLine/OutTrayLineBean.cs
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
source/DeviceLibrary/baan/AxisBean.cs
source/DeviceLibrary/model/KTK_Store.cs
source/Common/util/AcSerialBean.cs
查看文件 @
e9880b0
...
...
@@ -323,7 +323,7 @@ namespace OnlineStore.Common
catch
(
Exception
ex
)
{
isOk
=
false
;
LogUtil
.
error
(
"SendCommand ERROR:"
+
ex
.
ToString
(),
10
20
);
LogUtil
.
error
(
"SendCommand ERROR:"
+
ex
.
ToString
(),
10
8
);
}
finally
{
...
...
source/Common/util/LogUtil.cs
查看文件 @
e9880b0
...
...
@@ -61,7 +61,9 @@ namespace OnlineStore.Common
{
rfidLog
.
Debug
(
msg
);
}
public
static
void
error
(
string
errorMsg
,
int
type
,
int
seconds
=
10
)
public
static
void
error
(
string
errorMsg
,
int
type
,
int
seconds
=
10
)
{
try
{
if
(
lastErrorLogTime
.
ContainsKey
(
type
))
{
...
...
@@ -79,6 +81,11 @@ namespace OnlineStore.Common
error
(
LOGGER
,
errorMsg
);
}
}
catch
(
Exception
ex
)
{
LOGGER
.
Error
(
" 打印日志【"
+
type
+
"-"
+
errorMsg
+
"】出错:"
+
ex
.
ToString
());
}
}
public
static
void
error
(
ILog
log
,
string
errorMsg
,
Exception
ex
=
null
)
{
if
(
errorMsg
.
Trim
().
Equals
(
""
)&&(
ex
==
null
))
...
...
source/Common/util/MyWebClient.cs
查看文件 @
e9880b0
...
...
@@ -112,7 +112,7 @@ namespace OnlineStore.Common
}
catch
(
Exception
e
)
{
LogUtil
.
error
(
"POST ERROR:"
+
e
.
ToString
(),
10
0
1
);
LogUtil
.
error
(
"POST ERROR:"
+
e
.
ToString
(),
101
);
}
if
(!
result
.
Contains
(
"null"
)
&&
result
.
Length
!=
0
)
{
...
...
@@ -146,7 +146,7 @@ namespace OnlineStore.Common
}
catch
(
Exception
e
)
{
LogUtil
.
error
(
"HTTP GET ERROR:"
+
e
.
Message
,
10
0
2
);
LogUtil
.
error
(
"HTTP GET ERROR:"
+
e
.
Message
,
102
);
}
return
""
;
}
...
...
source/Common/util/TcpClient.cs
查看文件 @
e9880b0
...
...
@@ -119,7 +119,7 @@ namespace OnlineStore.Common
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"Connect to "
+
serverIP
+
":"
+
serverPort
+
" fail!"
+
ex
.
ToString
(),
10
0
3
);
LogUtil
.
error
(
"Connect to "
+
serverIP
+
":"
+
serverPort
+
" fail!"
+
ex
.
ToString
(),
103
);
//m_clientSocket = null;
}
}
...
...
@@ -233,7 +233,7 @@ namespace OnlineStore.Common
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"socket received error:"
+
ex
.
ToString
(),
10
0
4
);
LogUtil
.
error
(
"socket received error:"
+
ex
.
ToString
(),
104
);
}
}
}
...
...
source/Common/util/TcpServer.cs
查看文件 @
e9880b0
...
...
@@ -166,11 +166,11 @@ namespace OnlineStore.Common
}
catch
(
SocketException
e
)
{
LogUtil
.
error
(
"客户端{"
+
client
.
AddStr
+
"]:"
+
e
.
ToString
(),
10
0
6
);
LogUtil
.
error
(
"客户端{"
+
client
.
AddStr
+
"]:"
+
e
.
ToString
(),
106
);
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"客户端{"
+
client
.
AddStr
+
"]:"
+
ex
.
ToString
(),
10
0
5
);
LogUtil
.
error
(
"客户端{"
+
client
.
AddStr
+
"]:"
+
ex
.
ToString
(),
105
);
}
}
//private void ReceiveMessages(Client client)
...
...
source/DeviceLibrary/assemblyLine/EquipBase.cs
查看文件 @
e9880b0
...
...
@@ -410,7 +410,7 @@ namespace OnlineStore.DeviceLibrary
Alarm
(
LineAlarmType
.
AxisMoveError
);
CheckAlarmProcess
(
moveInfo
,
LineAlarmType
.
AxisMoveError
);
LogUtil
.
error
(
WarnMsg
,
DeviceID
+
18
);
LogUtil
.
error
(
WarnMsg
,
DeviceID
*
1000
+
14
);
break
;
}
}
...
...
@@ -429,7 +429,7 @@ namespace OnlineStore.DeviceLibrary
ConfigIO
io
=
baseConfig
.
getWaitIO
(
wait
.
IoType
);
WarnMsg
=
moveInfo
.
Name
+
"["
+
moveInfo
.
MoveType
+
"]["
+
moveInfo
.
MoveStep
+
"] 等待"
+
NotOkMsg
+
" 超时 "
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"秒"
;
LogUtil
.
error
(
MoveInfo
.
Name
+
WarnMsg
,
DeviceID
+
13
);
LogUtil
.
error
(
MoveInfo
.
Name
+
WarnMsg
,
DeviceID
*
1000
+
13
);
if
(
NoAlarm
())
{
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
...
...
@@ -527,7 +527,7 @@ namespace OnlineStore.DeviceLibrary
{
second
=
10
;
}
LogUtil
.
error
(
WarnMsg
,
DeviceID
+
15
,
second
);
LogUtil
.
error
(
WarnMsg
,
DeviceID
*
1000
+
15
,
second
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
CheckAlarmProcess
(
moveInfo
,
LineAlarmType
.
IoSingleTimeOut
);
}
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
查看文件 @
e9880b0
...
...
@@ -441,7 +441,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
SecondMoveInfo
.
IsTimeOut
(
60
))
{
WarnMsg
=
SecondMoveInfo
.
Name
+
"["
+
SecondMoveInfo
.
MoveStep
+
"] 等待出库移栽超时 ["
+
Math
.
Round
(
MoveInfo
.
StepSpan
().
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
DeviceID
+
1
1
);
LogUtil
.
error
(
WarnMsg
,
DeviceID
*
1000
+
2
1
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
}
}
...
...
@@ -892,7 +892,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
IsTimeOut
(
180
))
{
WarnMsg
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
SLog
+
"]等待空托盘到达超时["
+
Math
.
Round
(
MoveInfo
.
StepSpan
().
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
DeviceID
+
1
2
);
LogUtil
.
error
(
WarnMsg
,
DeviceID
*
1000
+
2
2
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
}
//送出料架处理
...
...
@@ -1323,19 +1323,19 @@ namespace OnlineStore.DeviceLibrary
//判断是否有料架,是否可以出库
if
(
IOValue
(
IO_Type
.
SL_Location_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
LogUtil
.
error
(
Name
+
" 【"
+
info
.
ToStr
()
+
"】需要出库,定位工位无料架,暂不处理"
,
DeviceID
+
16
);
LogUtil
.
error
(
Name
+
" 【"
+
info
.
ToStr
()
+
"】需要出库,定位工位无料架,暂不处理"
,
DeviceID
*
1000
+
16
);
return
false
;
}
else
if
(
OutStoreHeight
<
0
)
{
LogUtil
.
error
(
Name
+
" 【"
+
info
.
ToStr
()
+
"】需要出库,料架未准备好,暂不处理"
,
DeviceID
+
17
);
LogUtil
.
error
(
Name
+
" 【"
+
info
.
ToStr
()
+
"】需要出库,料架未准备好,暂不处理"
,
DeviceID
*
1000
+
17
);
return
false
;
}
//如果已经开始送出料架,暂不处理
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
OutStore
)&&
MoveInfo
.
MoveStep
>=
LineMoveStep
.
FO_30_BatchAxisToP2
)
{
LogUtil
.
error
(
Name
+
" 【"
+
info
.
ToStr
()
+
"】需要出库,正在送出料架,暂不处理"
,
DeviceID
+
18
);
LogUtil
.
error
(
Name
+
" 【"
+
info
.
ToStr
()
+
"】需要出库,正在送出料架,暂不处理"
,
DeviceID
*
1000
+
18
);
return
false
;
}
...
...
source/DeviceLibrary/assemblyLine/LineBean.cs
查看文件 @
e9880b0
...
...
@@ -909,7 +909,7 @@ namespace OnlineStore.DeviceLibrary
if
(
span
.
TotalSeconds
>
LineManager
.
Config
.
IOSingle_TimerOut
*
2
)
{
SetWarnMsg
(
moveEquip
.
Name
+
"下降阻挡气缸超时,已等待"
+
FormUtil
.
GetSpanStr
(
span
));
LogUtil
.
error
(
moveEquip
.
Name
+
"下降阻挡气缸超时,已等待"
+
FormUtil
.
GetSpanStr
(
span
),
11
2
);
LogUtil
.
error
(
moveEquip
.
Name
+
"下降阻挡气缸超时,已等待"
+
FormUtil
.
GetSpanStr
(
span
),
90
2
);
}
else
if
(
rwSpan
.
TotalSeconds
>
5
&&
span
.
TotalSeconds
>
6
&&
span
.
TotalSeconds
<
LineManager
.
Config
.
IOSingle_TimerOut
*
2
)
{
...
...
@@ -970,7 +970,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
span
.
TotalSeconds
>
120
)
{
WarnMsg
=
Name
+
"["
+
MoveInfo
.
MoveStep
+
"]["
+
msg
+
"]已等待["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
100
);
LogUtil
.
error
(
WarnMsg
,
903
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
}
}
...
...
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
查看文件 @
e9880b0
...
...
@@ -107,7 +107,7 @@ namespace OnlineStore.DeviceLibrary
ConfigIO
io
=
baseConfig
.
getWaitIO
(
wait
.
IoType
);
WarnMsg
=
Name
+
"["
+
checkWaitInfo
.
MoveStep
+
"]等待"
+
NotOkMsg
+
" 超时"
;
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
LogUtil
.
error
(
MoveInfo
.
Name
+
WarnMsg
,
DeviceID
+
13
);
LogUtil
.
error
(
MoveInfo
.
Name
+
WarnMsg
,
901
);
}
//超过报警时长
else
if
(
rwSpan
.
TotalSeconds
>
5
&&
span
.
TotalSeconds
>
6
&&
span
.
TotalSeconds
<
LineManager
.
Config
.
IOSingle_TimerOut
*
2
)
...
...
@@ -182,7 +182,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
span
.
TotalSeconds
>
checkWaitInfo
.
TimeOutSeconds
)
{
WarnMsg
=
checkWaitInfo
.
Name
+
"["
+
checkWaitInfo
.
MoveStep
+
"]["
+
NotOkMsg
+
"]已等待["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
1
00
);
LogUtil
.
error
(
WarnMsg
,
9
00
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
}
}
...
...
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
查看文件 @
e9880b0
...
...
@@ -204,7 +204,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
IsTimeOut
(
180
))
{
WarnMsg
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
SLog
+
"]等待空托盘到达超时["
+
Math
.
Round
(
MoveInfo
.
StepSpan
().
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
DeviceID
+
12
);
LogUtil
.
error
(
WarnMsg
,
DeviceID
*
1000
+
12
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
return
false
;
}
...
...
source/DeviceLibrary/assemblyLine/OutTrayLineBean.cs
查看文件 @
e9880b0
...
...
@@ -61,7 +61,7 @@ namespace OnlineStore.DeviceLibrary
{
if
(
LastTrayPosition
<=
1
)
{
LogUtil
.
error
(
Name
+
" 启动送料【"
+
moveParam
.
ToStr
()
+
"】 失败,入口有料"
,
Id
+
32
);
LogUtil
.
error
(
Name
+
" 启动送料【"
+
moveParam
.
ToStr
()
+
"】 失败,入口有料"
,
Id
*
1000
+
32
);
return
false
;
}
//MoveInfo.MoveParam = moveParam;
...
...
@@ -102,7 +102,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
LogUtil
.
error
(
Name
+
" 启动送料【"
+
moveParam
.
ToStr
()
+
"】 失败"
,
Id
+
31
);
LogUtil
.
error
(
Name
+
" 启动送料【"
+
moveParam
.
ToStr
()
+
"】 失败"
,
Id
*
1000
+
31
);
return
false
;
}
}
...
...
@@ -142,7 +142,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsTimeOut
(
180
))
{
LogUtil
.
error
(
Name
+
"等待入口无料超时"
+
FormUtil
.
GetSpanStr
(
MoveInfo
.
StepSpan
()),
Id
+
33
);
LogUtil
.
error
(
Name
+
"等待入口无料超时"
+
FormUtil
.
GetSpanStr
(
MoveInfo
.
StepSpan
()),
Id
*
1000
+
33
);
}
}
...
...
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
查看文件 @
e9880b0
...
...
@@ -541,7 +541,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
IsTimeOut
())
{
WarnMsg
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
MoveStep
+
"]等待 皮带线可放料 "
+
"超时["
+
Math
.
Round
(
MoveInfo
.
StepSpan
().
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
DeviceID
+
20
);
LogUtil
.
error
(
WarnMsg
,
DeviceID
*
1000
+
20
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
}
}
...
...
source/DeviceLibrary/baan/AxisBean.cs
查看文件 @
e9880b0
...
...
@@ -155,7 +155,7 @@ namespace OnlineStore.DeviceLibrary
{
msg
=
" "
+
MoveInfo
.
SLog
+
MoveInfo
.
Name
+
axis
.
DisplayStr
+
",目标位置["
+
targetPosition
+
"]当前位置["
+
outCount
+
"],误差过大,需要报警"
;
LogUtil
.
error
(
msg
,
1034
);
LogUtil
.
error
(
msg
,
600
);
}
}
return
false
;
...
...
source/DeviceLibrary/model/KTK_Store.cs
查看文件 @
e9880b0
...
...
@@ -280,11 +280,11 @@ namespace OnlineStore.DeviceLibrary
{
if
(
msg
.
StartsWith
(
Name
))
{
LogUtil
.
error
(
msg
,
105
);
LogUtil
.
error
(
msg
,
801
);
}
else
{
LogUtil
.
error
(
Name
+
msg
,
105
);
LogUtil
.
error
(
Name
+
msg
,
801
);
}
}
else
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论