Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 2d395298
由
LN
编写于
2020-06-28 18:46:06 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加异常看板数据
1 个父辈
9be2ce71
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
101 行增加
和
11 行删除
source/DeviceLibrary/assemblyLine/LineBean.cs
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
source/DeviceLibrary/assemblymanager/SServerManager.cs
source/DeviceLibrary/assemblyLine/LineBean.cs
查看文件 @
2d39529
...
@@ -211,7 +211,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -211,7 +211,7 @@ namespace OnlineStore.DeviceLibrary
IoCheckTimer
.
Enabled
=
false
;
IoCheckTimer
.
Enabled
=
false
;
serverConTimer
=
new
System
.
Timers
.
Timer
();
serverConTimer
=
new
System
.
Timers
.
Timer
();
serverConTimer
.
Interval
=
2
000
;
serverConTimer
.
Interval
=
3
000
;
serverConTimer
.
AutoReset
=
true
;
serverConTimer
.
AutoReset
=
true
;
serverConTimer
.
Elapsed
+=
ServerConTimer_Elapsed
;
serverConTimer
.
Elapsed
+=
ServerConTimer_Elapsed
;
serverConTimer
.
Enabled
=
false
;
serverConTimer
.
Enabled
=
false
;
...
@@ -1030,6 +1030,19 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1030,6 +1030,19 @@ namespace OnlineStore.DeviceLibrary
// >> - msg:消息,
// >> - msg:消息,
// >> - data:
// >> - data:
List
<
AlarmMsg
>
alarmList
=
new
List
<
AlarmMsg
>();
foreach
(
EquipBase
equip
in
AllEquipMap
.
Values
)
{
if
(
equip
.
alarmType
.
Equals
(
LineAlarmType
.
None
)
||
equip
.
WarnMsg
.
Contains
(
"等待空托盘到达超时"
))
{
continue
;
}
else
{
alarmList
.
Add
(
new
AlarmMsg
(
equip
.
Name
,
"line."
+
equip
.
Name
+
"_"
+
equip
.
alarmType
,
equip
.
WarnMsg
));
}
}
SServerManager
.
updateDeviceAlarmMsg
(
alarmList
);
}
}
}
}
}
}
\ No newline at end of file
\ No newline at end of file
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
查看文件 @
2d39529
...
@@ -688,12 +688,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -688,12 +688,13 @@ namespace OnlineStore.DeviceLibrary
if
(
topCylinderDown
)
if
(
topCylinderDown
)
{
{
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW12_WaitTrayGo
);
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW12_WaitTrayGo
);
SWLog
(
"横移轨道41:关闭皮带电机,等待SW1_TrayCheck=0,
最多等待5秒,
关闭横移电机 "
);
SWLog
(
"横移轨道41:关闭皮带电机,等待SW1_TrayCheck=0,关闭横移电机 "
);
IOMove
(
IO_Type
.
SW4_MotorRun
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SW4_MotorRun
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SW1_MotorRun
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SW1_MotorRun
,
IO_VALUE
.
LOW
);
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW1_TrayCheck
,
IO_VALUE
.
LOW
));
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW1_TrayCheck
,
IO_VALUE
.
LOW
));
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
5000
));
//
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(5000));
SW41_MoveInfo
.
OneWaitCanEndStep
=
true
;
//
SW41_MoveInfo.OneWaitCanEndStep = true;
}
}
else
else
{
{
...
@@ -924,12 +925,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -924,12 +925,13 @@ namespace OnlineStore.DeviceLibrary
if
(
topCylinderDown
)
if
(
topCylinderDown
)
{
{
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW12_WaitTrayGo
);
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW12_WaitTrayGo
);
SWLog
(
"横移轨道23:关闭皮带电机,等待SW3_TrayCheck=0,
最多等待5秒,
关闭横移电机 "
);
SWLog
(
"横移轨道23:关闭皮带电机,等待SW3_TrayCheck=0,关闭横移电机 "
);
IOMove
(
IO_Type
.
SW2_MotorRun
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SW2_MotorRun
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SW3_MotorRun
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SW3_MotorRun
,
IO_VALUE
.
LOW
);
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW3_TrayCheck
,
IO_VALUE
.
LOW
));
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW3_TrayCheck
,
IO_VALUE
.
LOW
));
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
5000
));
//
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(5000));
SW23_MoveInfo
.
OneWaitCanEndStep
=
true
;
//
SW23_MoveInfo.OneWaitCanEndStep = true;
}
}
else
else
{
{
...
...
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
查看文件 @
2d39529
...
@@ -299,7 +299,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -299,7 +299,7 @@ namespace OnlineStore.DeviceLibrary
{
{
TimeSpan
span
=
DateTime
.
Now
-
SecondMoveInfo
.
LastSetpTime
;
TimeSpan
span
=
DateTime
.
Now
-
SecondMoveInfo
.
LastSetpTime
;
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_04_Wait
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_04_Wait
);
LogUtil
.
debug
(
Name
+
"托盘阻挡"
+
SecondMoveInfo
.
SLog
+
" 阻挡气缸上升,下降耗时("
+
FormUtil
.
GetSpanStr
(
span
)
+
"),等待 阻挡2托盘检测=1)"
);
LogUtil
.
debug
(
Name
+
"托盘阻挡"
+
SecondMoveInfo
.
SLog
+
" 阻挡气缸上升,下降耗时("
+
FormUtil
.
GetSpanStr
(
span
)
+
"),等待 阻挡2托盘检测=1)"
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Check2
,
IO_VALUE
.
HIGH
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Check2
,
IO_VALUE
.
HIGH
));
}
}
// else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_01_FixtureCheck))
// else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_01_FixtureCheck))
...
@@ -323,6 +323,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -323,6 +323,10 @@ namespace OnlineStore.DeviceLibrary
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MIO_04_Wait
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MIO_04_Wait
))
{
{
UpdateTrayNum
();
UpdateTrayNum
();
if
(
Config
.
SidesWayNum
.
Equals
(
4
))
{
CylinderMove
(
null
,
IO_Type
.
TopCylinder_Down
,
IO_Type
.
TopCylinder_UP
);
}
if
(
TrayManager
.
RightTrayCode
(
currTrayNum
,
preTrayNum
,
false
))
if
(
TrayManager
.
RightTrayCode
(
currTrayNum
,
preTrayNum
,
false
))
{
{
if
(
TrayManager
.
ErrorDeviceId
.
Equals
(
DeviceID
))
if
(
TrayManager
.
ErrorDeviceId
.
Equals
(
DeviceID
))
...
@@ -369,8 +373,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -369,8 +373,11 @@ namespace OnlineStore.DeviceLibrary
{
{
LineManager
.
Line
.
CylinderMove
(
null
,
IO_Type
.
SW1_TopCylinder_Down
,
IO_Type
.
SW1_TopCylinder_Up
);
LineManager
.
Line
.
CylinderMove
(
null
,
IO_Type
.
SW1_TopCylinder_Down
,
IO_Type
.
SW1_TopCylinder_Up
);
}
}
SecondMoveInfo
.
EndMove
();
CheckLog
(
"托盘放行 结束,触发 TrayPEndEvent "
);
lastStopDown
=
DateTime
.
Now
.
AddSeconds
(-
2
);
this
.
TrayPEndEvent
?.
Invoke
(
Config
.
SidesWayNum
,
currTrayNum
);
}
}
//MO_14_TopCylinder_Down();
}
}
}
}
else
else
...
...
source/DeviceLibrary/assemblymanager/SServerManager.cs
查看文件 @
2d39529
...
@@ -543,7 +543,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -543,7 +543,7 @@ namespace OnlineStore.DeviceLibrary
result
.
Param
.
rfid
=
rfid
;
result
.
Param
.
rfid
=
rfid
;
int
storeId
=
result
.
Param
.
GetStoreId
();
int
storeId
=
result
.
Param
.
GetStoreId
();
if
(
LineManager
.
Line
.
MoveEquipMap
.
ContainsKey
(
storeId
))
if
(
LineManager
.
Line
.
MoveEquipMap
.
ContainsKey
(
storeId
))
{
{
MoveEquip
moveEquip
=
LineManager
.
Line
.
MoveEquipMap
[
storeId
];
MoveEquip
moveEquip
=
LineManager
.
Line
.
MoveEquipMap
[
storeId
];
if
(
LineManager
.
Line
.
IsReviceInPosId
(
moveEquip
,
posId
))
if
(
LineManager
.
Line
.
IsReviceInPosId
(
moveEquip
,
posId
))
{
{
...
@@ -557,7 +557,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -557,7 +557,7 @@ namespace OnlineStore.DeviceLibrary
else
else
{
{
result
.
Param
.
InStoreNg
=
true
;
result
.
Param
.
InStoreNg
=
true
;
result
.
Param
.
NgMsg
=
"未找到料仓["
+
storeId
+
"]"
;
result
.
Param
.
NgMsg
=
"未找到料仓["
+
storeId
+
"]"
;
result
.
Msg
=
deviceName
+
(
"收到服务器入库命令 "
+
"未找到料仓["
+
storeId
+
"]: "
+
result
.
Param
.
ToStr
()
+
" ,入库失败!"
);
result
.
Msg
=
deviceName
+
(
"收到服务器入库命令 "
+
"未找到料仓["
+
storeId
+
"]: "
+
result
.
Param
.
ToStr
()
+
" ,入库失败!"
);
return
result
;
return
result
;
}
}
...
@@ -598,6 +598,74 @@ namespace OnlineStore.DeviceLibrary
...
@@ -598,6 +598,74 @@ namespace OnlineStore.DeviceLibrary
moveEquip
.
waitInStoreList
.
Add
(
param
);
moveEquip
.
waitInStoreList
.
Add
(
param
);
}
}
}
}
//14.异常看板
// > 地址:
//>>/ rest / api / qisda / device / updateDeviceAlarmMsg
private
static
string
Addr_updateDeviceAlarmMsg
=
"/rest/api/qisda/device/updateDeviceAlarmMsg"
;
public
static
string
updateDeviceAlarmMsg
(
List
<
AlarmMsg
>
msgList
)
{
string
msg
=
""
;
try
{
// >
// > 参数:
//>> deviceAlarmList : 异常列表Json字符串 `[{"name":"移栽5", "msgKey":"line.move5.timeOut", "msgValue":"运动超时"},{"name":"移栽4", "msgKey":"line.move4.timeOut", "msgValue":"误差过大"}]`
//>>>name : 异常位置名称
//>>>msgKey : 异常信息唯一标识
//>>>msgValue : 异常信息
//>
//> 返回:
//>>` {"code":0,"msg":"ok","data":""}`
//>>
//>> - code: 0为正常,其他为异常,
// >> - msg:消息,
// >> - data:
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
string
msgListStr
=
JsonHelper
.
SerializeObject
(
msgList
);
paramMap
.
Add
(
"deviceAlarmList"
,
msgListStr
);
string
server
=
GetAddr
(
Addr_updateDeviceAlarmMsg
,
paramMap
);
DateTime
startTime
=
DateTime
.
Now
;
string
resultStr
=
HttpHelper
.
Post
(
server
,
""
,
2000
);
LogUtil
.
debug
(
"updateDeviceAlarmMsg "
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
" 【"
+
server
+
"】【"
+
resultStr
+
"】"
);
RfidData
data
=
JsonHelper
.
DeserializeJsonToObject
<
RfidData
>(
resultStr
);
if
(
data
==
null
)
{
return
msg
=
" updateDeviceAlarmMsg 没有收到服务器反馈"
;
}
else
if
(
data
.
code
.
Equals
(
0
).
Equals
(
false
))
{
return
msg
=
" updateDeviceAlarmMsg 【"
+
server
+
"】【"
+
resultStr
+
"】"
+
data
.
msg
;
}
return
""
;
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
" updateDeviceAlarmMsg Error: "
+
ex
.
ToString
());
}
return
msg
;
}
}
public
class
AlarmMsg
{
//>>>name : 异常位置名称
public
string
name
=
""
;
//>>>msgKey : 异常信息唯一标识
public
string
msgKey
=
""
;
//>>>msgValue : 异常信息
public
string
msgValue
=
""
;
public
AlarmMsg
(
string
n
,
string
key
,
string
value
)
{
this
.
name
=
n
;
this
.
msgKey
=
key
;
this
.
msgValue
=
value
;
}
}
}
public
class
GetPosResult
public
class
GetPosResult
{
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论