Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit f379d31e
由
LN
编写于
2020-07-15 17:59:07 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
bug修改
1 个父辈
c5c3c74a
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
23 行增加
和
9 行删除
source/Common/util/LogUtil.cs
source/DeviceLibrary/assemblyLine/DischargeLine_Partial.cs
source/DeviceLibrary/assemblyLine/OutTrayLineBean.cs
source/DeviceLibrary/assemblymanager/SServerManager.cs
source/Common/util/LogUtil.cs
查看文件 @
f379d31
...
...
@@ -6,6 +6,7 @@ using log4net;
using
System.Reflection
;
using
System.Drawing
;
using
System.Runtime.ExceptionServices
;
using
System.Threading
;
namespace
OnlineStore.Common
{
...
...
@@ -102,15 +103,27 @@ namespace OnlineStore.Common
}
AddToBox
(
errorMsg
,
Color
.
Red
);
}
private
static
object
lockObj
=
""
;
private
static
void
AddToBox
(
string
msg
,
Color
color
)
{
if
(
Monitor
.
TryEnter
(
lockObj
,
2
))
{
try
{
ShowLogPro
(
msg
,
color
);
}
catch
(
Exception
ex
)
{
LOGGER
.
Error
(
"出错:"
,
ex
);
LOGGER
.
Error
(
"出错:"
,
ex
);
}
finally
{
Monitor
.
Exit
(
lockObj
);
}
}
else
{
LOGGER
.
Error
(
"ShowLogPro【"
+
msg
+
"】失败,未得到锁"
);
}
}
private
static
List
<
string
>
logList
=
new
List
<
string
>();
...
...
@@ -120,10 +133,6 @@ namespace OnlineStore.Common
{
try
{
if
(
logList
.
Count
>
0
)
{
// logList.RemoveAt(0);
}
if
(
logList
.
Count
>=
showCount
)
{
logList
.
RemoveAt
(
0
);
...
...
source/DeviceLibrary/assemblyLine/DischargeLine_Partial.cs
查看文件 @
f379d31
...
...
@@ -182,19 +182,20 @@ namespace OnlineStore.DeviceLibrary
{
TimeSpan
span
=
DateTime
.
Now
-
MoveInfo
.
LastSetpTime
;
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
DON_08_CRun
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
3000
));
IOMove
(
IO_Type
.
SeparateDevice_Run
,
IO_VALUE
.
HIGH
);
if
(
IOValue
(
IO_Type
.
SeparateDevice_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
10000
));
SeparateStopTime
=
DateTime
.
Now
.
AddSeconds
(
30
);
int
robotIndex
=
GetRobotIndex
();
LogUtil
.
info
(
hengyiName
+
MoveInfo
.
SLog
+
"送料,接驳台有料,调用arriveRobotLocation="
+
robotIndex
+
"["
+
StationInfo_Move
.
CodeStr
+
"]"
);
SServerManager
.
arriveRobotLocation
(
Name
,
robotIndex
,
StationInfo_Move
.
CodeStr
);
string
msg
=
SServerManager
.
arriveRobotLocation
(
Name
,
robotIndex
,
StationInfo_Move
.
CodeStr
);
MoveEndS
();
LogUtil
.
info
(
hengyiName
+
MoveInfo
.
SLog
+
"送料结束 "
);
LogUtil
.
info
(
hengyiName
+
MoveInfo
.
SLog
+
"送料结束
["
+
msg
+
"]
"
);
}
else
{
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
3000
));
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
DON_07_SeparateCheck
);
LogUtil
.
info
(
hengyiName
+
MoveInfo
.
SLog
+
"送料,未检测到SeparateDevice_Check,再次 等待料盘到达接驳台 "
);
MoveInfo
.
TimeOutSeconds
=
40
;
...
...
source/DeviceLibrary/assemblyLine/OutTrayLineBean.cs
查看文件 @
f379d31
...
...
@@ -344,11 +344,14 @@ namespace OnlineStore.DeviceLibrary
public
bool
CanStart
(
int
totalMS
=
1000
)
{
if
(
IOManager
.
IOValue
(
MoveDO
,
subType
).
Equals
(
IO_VALUE
.
LOW
))
{
TimeSpan
span
=
DateTime
.
Now
-
LastEndTime
;
if
(
span
.
TotalMilliseconds
>
totalMS
)
{
return
true
;
}
}
return
false
;
}
public
LineTurnBean
(
int
subType
,
string
moveDO
=
""
,
string
checkDI
=
""
)
...
...
source/DeviceLibrary/assemblymanager/SServerManager.cs
查看文件 @
f379d31
...
...
@@ -303,7 +303,7 @@ namespace OnlineStore.DeviceLibrary
{
if
(
robotIndex
<=
0
)
{
return
msg
;
return
"robotIndex="
+
robotIndex
;
}
DateTime
startTime
=
DateTime
.
Now
;
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
...
...
@@ -315,6 +315,7 @@ namespace OnlineStore.DeviceLibrary
}
catch
(
Exception
ex
)
{
msg
=
deviceName
+
" "
+
ex
.
ToString
();
LogUtil
.
error
(
deviceName
+
" "
+
ex
.
ToString
());
}
return
msg
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论