Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 30029a9c
由
LN
编写于
2019-12-07 14:56:06 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
87bd6e54
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
33 行增加
和
26 行删除
source/Common/util/LogUtil.cs
source/Common/util/TcpClient.cs
source/DeviceLibrary/LineConfig/Config_FeedingEquip_4.csv
source/DeviceLibrary/assemblyLine/EquipBase.cs
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
source/DeviceLibrary/assemblymanager/TrayManager.cs
source/DeviceLibrary/baan/AxisBean.cs
source/DeviceLibrary/deviceLibrary/IO/AIOBOX/AIOBOXManager.cs
source/DeviceLibrary/model/TrayInfo.cs
source/Common/util/LogUtil.cs
查看文件 @
30029a9
...
...
@@ -80,7 +80,7 @@ namespace OnlineStore.Common
if
(
lastErrorLogTime
.
ContainsKey
(
type
))
{
TimeSpan
span
=
DateTime
.
Now
-
lastErrorLogTime
[
type
];
if
(
span
.
TotalSeconds
>
3
)
if
(
span
.
TotalSeconds
>
5
)
{
lastErrorLogTime
.
Remove
(
type
);
lastErrorLogTime
.
Add
(
type
,
DateTime
.
Now
);
...
...
source/Common/util/TcpClient.cs
查看文件 @
30029a9
...
...
@@ -119,7 +119,7 @@ namespace OnlineStore.Common
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"Connect to "
+
serverIP
+
":"
+
serverPort
+
" fail!"
+
ex
.
ToString
(),
3
);
LogUtil
.
error
(
"Connect to "
+
serverIP
+
":"
+
serverPort
+
" fail!"
+
ex
.
ToString
(),
100
3
);
//m_clientSocket = null;
}
}
...
...
@@ -233,7 +233,7 @@ namespace OnlineStore.Common
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"socket received error:"
+
ex
.
ToString
(),
4
);
LogUtil
.
error
(
"socket received error:"
+
ex
.
ToString
(),
100
4
);
}
}
}
...
...
source/DeviceLibrary/LineConfig/Config_FeedingEquip_4.csv
查看文件 @
30029a9
...
...
@@ -10,7 +10,7 @@ PRO,0,上料流水线出口AGV小车站号名称,AgvOutName,D8,,,,,
AXIS,0,提升上料轴,Batch_Axis,7,COM5,0,,,
PRO,0,提升上料轴上升待机点 P1,BatchAxisP1,23400000,,,,,
PRO,0,提升上料轴下降位置P2,BatchAxisP2,0,,,,,
PRO,0,提升上料缓慢上升目标位置P3,BatchAxisP3,20
93
0000,,,,,
PRO,0,提升上料缓慢上升目标位置P3,BatchAxisP3,20
45
0000,,,,,
PRO,0,提升上料轴目标速度,BatchAxis_TargetSpeed,1500,,,,,
PRO,0,提升上料轴加速度,BatchAxis_AddSpeed,400,,,,,
PRO,0,提升上料轴减速度,BatchAxis_DelSpeed,400,,,,,
...
...
@@ -24,8 +24,8 @@ PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,38000,,,,,
,,,,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,8,COM5,0,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,2000,,,,,
PRO,0,移栽上下轴P2移栽机构下降位置,UpDownP2List,0=
90
000,,,,,
PRO,0,移栽上下轴P3放料位置,UpDownAxisP3,
20
0000,,,,,
PRO,0,移栽上下轴P2移栽机构下降位置,UpDownP2List,0=
158
000,,,,,
PRO,0,移栽上下轴P3放料位置,UpDownAxisP3,
31
0000,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
PRO,0,移栽上下轴减速度,UpdownAxis_DelSpeed,400,,,,,
...
...
source/DeviceLibrary/assemblyLine/EquipBase.cs
查看文件 @
30029a9
...
...
@@ -465,7 +465,7 @@ namespace OnlineStore.DeviceLibrary
{
WarnMsg
=
moveInfo
.
Name
+
"["
+
moveInfo
.
MoveType
+
"]["
+
moveInfo
.
MoveStep
+
"]等待["
+
NotOkMsg
+
"]超时["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
DeviceID
+
1
8
);
LogUtil
.
error
(
WarnMsg
,
DeviceID
+
1
5
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
}
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
查看文件 @
30029a9
...
...
@@ -291,7 +291,10 @@ namespace OnlineStore.DeviceLibrary
}
return
;
}
if
(
isInSuddenDown
||
isNoAirCheck
)
{
return
;
}
if
(
IOValue
(
IO_Type
.
SL_Reset_BTN
).
Equals
(
IO_VALUE
.
HIGH
))
{
if
(
alarmType
.
Equals
(
LineAlarmType
.
None
))
...
...
@@ -314,9 +317,8 @@ namespace OnlineStore.DeviceLibrary
}
BusyMoveProcess
();
//判断流水线打开了才可以运行
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
)&&
alarmType
.
Equals
(
LineAlarmType
.
None
))
{
if
(
Config
.
IsCanOut
.
Equals
(
0
))
{
StartInStoreP
();
...
...
@@ -326,7 +328,7 @@ namespace OnlineStore.DeviceLibrary
StartOutStoreP
();
}
}
if
(
SecondMoveInfo
.
MoveType
.
Equals
(
LineMove
Type
.
None
))
if
(
SecondMoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
)
&&
alarmType
.
Equals
(
LineAlarm
Type
.
None
))
{
StartCheckFixture
();
}
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
查看文件 @
30029a9
...
...
@@ -68,7 +68,7 @@ namespace OnlineStore.DeviceLibrary
TrayManager
.
UpdateSWState
(
Config
.
SidesWayNum
,
1
);
}
}
else
if
(
IOValue
(
IO_Type
.
SW_StopCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
(
isTestNeed
||
isNeedTray
))
else
if
(
Config
.
SidesWayNum
.
Equals
(
2
)&&
IOValue
(
IO_Type
.
SW_StopCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
(
isTestNeed
||
isNeedTray
))
{
//判断是否是需要的托盘
if
(
NeedCurrTray
())
...
...
@@ -334,7 +334,7 @@ namespace OnlineStore.DeviceLibrary
if
(
span
.
TotalSeconds
>
180
)
{
WarnMsg
=
SecondMoveInfo
.
Name
+
"["
+
SecondMoveInfo
.
MoveType
+
"]["
+
SecondMoveInfo
.
MoveStep
+
"]等待横移机构空闲超时["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
DeviceID
+
1
9
);
LogUtil
.
error
(
WarnMsg
,
DeviceID
+
1
1
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
}
}
...
...
@@ -651,7 +651,7 @@ namespace OnlineStore.DeviceLibrary
if
(
span
.
TotalSeconds
>
180
)
{
WarnMsg
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
MoveStep
+
"]等待空托盘到达超时["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
DeviceID
+
1
9
);
LogUtil
.
error
(
WarnMsg
,
DeviceID
+
1
2
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
}
}
...
...
@@ -897,8 +897,8 @@ namespace OnlineStore.DeviceLibrary
if
(
Config
.
IsCanOut
.
Equals
(
1
))
{
//此托盘是紧急出料盘,需要通过料架出库
bool
debugNeed
=
IsDebug
&&
runStatus
>=
LineRunStatus
.
HomeMov
ing
;
bool
isJinji
=
info
.
EmergencyOut
&&
info
.
IsFull
&&
runStatus
>=
LineRunStatus
.
HomeMov
ing
;
bool
debugNeed
=
IsDebug
&&
runStatus
>=
LineRunStatus
.
Run
ing
;
bool
isJinji
=
info
.
EmergencyOut
&&
info
.
IsFull
&&
runStatus
>=
LineRunStatus
.
Run
ing
;
if
(
debugNeed
||
isJinji
)
{
...
...
@@ -909,11 +909,11 @@ namespace OnlineStore.DeviceLibrary
//判断是否有料架,是否可以出库
if
(
IOValue
(
IO_Type
.
SL_Location_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
Log
Info
(
"托盘【"
+
info
.
ToStr
()
+
"】需要出库,但是无料架暂不处理"
);
Log
Util
.
error
(
Name
+
" 【"
+
info
.
ToStr
()
+
"】需要出库,但是无料架暂不处理"
,
DeviceID
+
16
);
}
else
if
(
OutStoreHeight
<
0
)
{
Log
Info
(
"托盘【"
+
info
.
ToStr
()
+
"】需要出库,但是料架没准备好暂不处理"
);
Log
Util
.
error
(
Name
+
" 【"
+
info
.
ToStr
()
+
"】需要出库,但是料架没准备好暂不处理"
,
DeviceID
+
17
);
}
else
{
...
...
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
查看文件 @
30029a9
...
...
@@ -204,7 +204,7 @@ namespace OnlineStore.DeviceLibrary
{
WarnMsg
=
Name
+
" 等待"
+
NotOkMsg
+
"超时"
;
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
LogUtil
.
error
(
checkWaitInfo
.
Name
+
":"
+
checkWaitInfo
.
MoveStep
+
"等待"
+
NotOkMsg
+
"超时"
,
1
4
);
LogUtil
.
error
(
checkWaitInfo
.
Name
+
":"
+
checkWaitInfo
.
MoveStep
+
"等待"
+
NotOkMsg
+
"超时"
,
1
01
);
}
isOk
=
false
;
break
;
...
...
@@ -252,7 +252,7 @@ namespace OnlineStore.DeviceLibrary
{
checkWaitInfo
.
EndStepWait
();
}
else
if
(
span
.
TotalSeconds
>
checkWaitInfo
.
TimeOutSeconds
)
else
if
(
span
.
TotalSeconds
>
checkWaitInfo
.
TimeOutSeconds
&&
alarmType
.
Equals
(
LineAlarmType
.
None
)
)
{
WarnMsg
=
checkWaitInfo
.
Name
+
"["
+
checkWaitInfo
.
MoveStep
+
"]["
+
NotOkMsg
+
"]已等待["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
100
);
...
...
source/DeviceLibrary/assemblymanager/TrayManager.cs
查看文件 @
30029a9
...
...
@@ -234,8 +234,10 @@ namespace OnlineStore.DeviceLibrary
internal
static
bool
CanMoveSidesWay
(
int
swNum
)
{
int
status
=
0
;
if
(
SidesWayStateMap
.
ContainsKey
(
swNum
))
{
status
=
SidesWayStateMap
[
swNum
];
if
(
SidesWayStateMap
[
swNum
].
Equals
(
1
))
{
return
true
;
...
...
@@ -257,7 +259,7 @@ namespace OnlineStore.DeviceLibrary
{
return
true
;
}
if
(
s
wNum
.
Equals
(
2
)
&&
equip
.
alarmType
.
Equals
(
LineAlarmType
.
None
).
Equals
(
false
))
if
(
s
tatus
.
Equals
(
0
)&&
swNum
.
Equals
(
2
)
&&
(
equip
.
isInSuddenDown
||
equip
.
isNoAirCheck
))
{
//上料3如果报警,可以直接处理移栽
return
true
;
...
...
source/DeviceLibrary/baan/AxisBean.cs
查看文件 @
30029a9
...
...
@@ -150,7 +150,7 @@ namespace OnlineStore.DeviceLibrary
{
msg
=
" storeMoveStep="
+
MoveInfo
.
MoveStep
+
axis
.
DisplayStr
+
"目标位置["
+
targetPosition
+
"]当前位置["
+
outCount
+
"],误差过大,需要报警"
;
LogUtil
.
error
(
msg
,
34
);
LogUtil
.
error
(
msg
,
10
34
);
}
}
return
false
;
...
...
source/DeviceLibrary/deviceLibrary/IO/AIOBOX/AIOBOXManager.cs
查看文件 @
30029a9
...
...
@@ -39,7 +39,7 @@ namespace OnlineStore.DeviceLibrary
{
conTimer
=
new
System
.
Timers
.
Timer
();
conTimer
.
AutoReset
=
true
;
conTimer
.
Interval
=
6
0000
;
conTimer
.
Interval
=
1
0000
;
conTimer
.
Elapsed
+=
ConTimer_Elapsed
;
}
conTimer
.
Enabled
=
false
;
...
...
source/DeviceLibrary/model/TrayInfo.cs
查看文件 @
30029a9
...
...
@@ -37,11 +37,14 @@ namespace OnlineStore.DeviceLibrary
{
type
=
"入库"
;
}
else
else
if
(
InOrOutStore
.
Equals
(
2
))
{
type
=
"出库"
;
}
return
"托盘【"
+
TrayCode
+
"】"
+
(
IsFull
?
"有料,"
:
"空,"
)
+
type
+
","
+
WareCode
+
","
+
PosId
+
","
+
PlateH
+
","
+
PlateW
+
","
+
InStoreNG
+
","
+
NgMsg
;
string
err
=
InStoreNG
?
"入库失败:"
+
NgMsg
:
""
;
string
jinji
=
EmergencyOut
?
"紧急出料"
:
""
;
return
"托盘["
+
TrayCode
+
"]["
+
(
IsFull
?
"有料,"
:
"空,"
)
+
"]["
+
type
+
"]二维码["
+
WareCode
+
"]库位号["
+
PosId
+
"]盘高["
+
PlateH
+
"]盘宽["
+
PlateW
+
"] ["
+
err
+
"] ["
+
jinji
+
"]"
;
}
/// <summary>
/// 夹具编码值(1-32?)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论