Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 1c3c6ffa
由
LN
编写于
2020-03-17 16:54:39 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
急停逻辑修改
1 个父辈
049e89b4
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
186 行增加
和
62 行删除
source/AssemblyLineClient/FrmLineStore.Designer.cs
source/AssemblyLineClient/FrmLineStore.cs
source/DeviceLibrary/assemblyLine/DischargeLine.cs
source/DeviceLibrary/assemblyLine/EquipBase.cs
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
source/DeviceLibrary/assemblyLine/LineBean.cs
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
source/DeviceLibrary/assemblyLine/OutTrayLineBean.cs
source/DeviceLibrary/model/KTK_Store.cs
source/AssemblyLineClient/FrmLineStore.Designer.cs
查看文件 @
1c3c6ff
...
@@ -148,6 +148,7 @@
...
@@ -148,6 +148,7 @@
//
//
this
.
listView1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
this
.
listView1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
listView1
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
listView1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
listView1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
listView1
.
FullRowSelect
=
true
;
this
.
listView1
.
FullRowSelect
=
true
;
this
.
listView1
.
GridLines
=
true
;
this
.
listView1
.
GridLines
=
true
;
...
...
source/AssemblyLineClient/FrmLineStore.cs
查看文件 @
1c3c6ff
...
@@ -152,7 +152,7 @@ namespace OnlineStore.AssemblyLine
...
@@ -152,7 +152,7 @@ namespace OnlineStore.AssemblyLine
lvi
.
SubItems
.
Add
(
move
.
Config
.
IsDebug
.
Equals
(
1
)
?
"✘"
:
"✔"
);
lvi
.
SubItems
.
Add
(
move
.
Config
.
IsDebug
.
Equals
(
1
)
?
"✘"
:
"✔"
);
lvi
.
SubItems
.
Add
(
move
.
alarmType
.
ToString
());
lvi
.
SubItems
.
Add
(
move
.
alarmType
.
ToString
());
// lvi.SubItems.Add(move.lineStatus.ToString());
// lvi.SubItems.Add(move.lineStatus.ToString());
lvi
.
SubItems
.
Add
(
KTK_Store
.
GetRunStr
(
move
.
lineStatus
,
move
.
runStatus
));
lvi
.
SubItems
.
Add
(
move
.
GetRunStr
(
));
BoxInfo
box
=
LineServer
.
GetBoxInfo
(
move
.
DeviceID
);
BoxInfo
box
=
LineServer
.
GetBoxInfo
(
move
.
DeviceID
);
if
(
box
!=
null
)
if
(
box
!=
null
)
{
{
...
@@ -184,7 +184,7 @@ namespace OnlineStore.AssemblyLine
...
@@ -184,7 +184,7 @@ namespace OnlineStore.AssemblyLine
lvi
.
Text
=
equip
.
Name
;
lvi
.
Text
=
equip
.
Name
;
lvi
.
SubItems
.
Add
(
equip
.
Config
.
IsDebug
.
Equals
(
1
)
?
"✘"
:
"✔"
);
lvi
.
SubItems
.
Add
(
equip
.
Config
.
IsDebug
.
Equals
(
1
)
?
"✘"
:
"✔"
);
lvi
.
SubItems
.
Add
(
equip
.
alarmType
.
ToString
());
lvi
.
SubItems
.
Add
(
equip
.
alarmType
.
ToString
());
lvi
.
SubItems
.
Add
(
KTK_Store
.
GetRunStr
(
equip
.
lineStatus
,
equip
.
runStatus
));
lvi
.
SubItems
.
Add
(
equip
.
GetRunStr
(
));
this
.
listView1
.
Items
.
Add
(
lvi
);
this
.
listView1
.
Items
.
Add
(
lvi
);
}
}
...
@@ -195,7 +195,7 @@ namespace OnlineStore.AssemblyLine
...
@@ -195,7 +195,7 @@ namespace OnlineStore.AssemblyLine
lvi
.
Text
=
equip
.
Name
;
lvi
.
Text
=
equip
.
Name
;
lvi
.
SubItems
.
Add
(
equip
.
Config
.
IsDebug
.
Equals
(
1
)
?
"✘"
:
"✔"
);
lvi
.
SubItems
.
Add
(
equip
.
Config
.
IsDebug
.
Equals
(
1
)
?
"✘"
:
"✔"
);
lvi
.
SubItems
.
Add
(
equip
.
alarmType
.
ToString
());
lvi
.
SubItems
.
Add
(
equip
.
alarmType
.
ToString
());
lvi
.
SubItems
.
Add
(
KTK_Store
.
GetRunStr
(
equip
.
lineStatus
,
equip
.
runStatus
));
lvi
.
SubItems
.
Add
(
equip
.
GetRunStr
(
));
this
.
listView1
.
Items
.
Add
(
lvi
);
this
.
listView1
.
Items
.
Add
(
lvi
);
}
}
this
.
listView1
.
Items
.
Add
((
ListViewItem
)
emptyView
.
Clone
());
this
.
listView1
.
Items
.
Add
((
ListViewItem
)
emptyView
.
Clone
());
...
@@ -205,7 +205,7 @@ namespace OnlineStore.AssemblyLine
...
@@ -205,7 +205,7 @@ namespace OnlineStore.AssemblyLine
lvi
.
Text
=
equip
.
Name
;
lvi
.
Text
=
equip
.
Name
;
lvi
.
SubItems
.
Add
(
equip
.
Config
.
IsDebug
.
Equals
(
1
)
?
"✘"
:
"✔"
);
lvi
.
SubItems
.
Add
(
equip
.
Config
.
IsDebug
.
Equals
(
1
)
?
"✘"
:
"✔"
);
lvi
.
SubItems
.
Add
(
equip
.
alarmType
.
ToString
());
lvi
.
SubItems
.
Add
(
equip
.
alarmType
.
ToString
());
lvi
.
SubItems
.
Add
(
KTK_Store
.
GetRunStr
(
equip
.
lineStatus
,
equip
.
runStatus
));
lvi
.
SubItems
.
Add
(
equip
.
GetRunStr
(
));
this
.
listView1
.
Items
.
Add
(
lvi
);
this
.
listView1
.
Items
.
Add
(
lvi
);
}
}
cmbBoxIndex
.
Items
.
Clear
();
cmbBoxIndex
.
Items
.
Clear
();
...
@@ -487,7 +487,7 @@ namespace OnlineStore.AssemblyLine
...
@@ -487,7 +487,7 @@ namespace OnlineStore.AssemblyLine
//{
//{
// //canScanCode = lineBean.CanScanCode() ? "(可扫码入库)" : "(出库未完成,不可扫码入库)";
// //canScanCode = lineBean.CanScanCode() ? "(可扫码入库)" : "(出库未完成,不可扫码入库)";
//}
//}
lblStatus
.
Text
=
KTK_Store
.
GetRunStr
(
lineBean
.
lineStatus
,
lineBean
.
runStatus
)
+
canScanCode
;
lblStatus
.
Text
=
lineBean
.
GetRunStr
(
)
+
canScanCode
;
string
time
=
LineManager
.
Line
.
alarmType
.
Equals
(
LineAlarmType
.
None
)
?
""
:
LineManager
.
Line
.
LastAlarmTime
.
ToLongTimeString
();
string
time
=
LineManager
.
Line
.
alarmType
.
Equals
(
LineAlarmType
.
None
)
?
""
:
LineManager
.
Line
.
LastAlarmTime
.
ToLongTimeString
();
string
warnMsg
=
LineManager
.
Line
.
WarnMsg
.
Equals
(
""
)
?
""
:
time
+
LineManager
.
Line
.
WarnMsg
+
"\r\n"
;
string
warnMsg
=
LineManager
.
Line
.
WarnMsg
.
Equals
(
""
)
?
""
:
time
+
LineManager
.
Line
.
WarnMsg
+
"\r\n"
;
...
@@ -529,7 +529,7 @@ namespace OnlineStore.AssemblyLine
...
@@ -529,7 +529,7 @@ namespace OnlineStore.AssemblyLine
lvi
.
Text
=
move
.
Name
;
lvi
.
Text
=
move
.
Name
;
SetItemText
(
i
,
item_debug_index
,
move
.
Config
.
IsDebug
.
Equals
(
1
)
?
"✘"
:
"✔"
);
SetItemText
(
i
,
item_debug_index
,
move
.
Config
.
IsDebug
.
Equals
(
1
)
?
"✘"
:
"✔"
);
SetItemText
(
i
,
item_alarm_index
,
move
.
alarmType
.
ToString
());
SetItemText
(
i
,
item_alarm_index
,
move
.
alarmType
.
ToString
());
SetItemText
(
i
,
item_runStr_index
,
KTK_Store
.
GetRunStr
(
move
.
lineStatus
,
move
.
runStatus
));
SetItemText
(
i
,
item_runStr_index
,
move
.
GetRunStr
(
));
BoxInfo
box
=
LineServer
.
GetBoxInfo
(
move
.
DeviceID
);
BoxInfo
box
=
LineServer
.
GetBoxInfo
(
move
.
DeviceID
);
if
(
box
!=
null
)
if
(
box
!=
null
)
{
{
...
@@ -550,7 +550,7 @@ namespace OnlineStore.AssemblyLine
...
@@ -550,7 +550,7 @@ namespace OnlineStore.AssemblyLine
SetItemText
(
i
,
item_SAlarmType_index
,
""
);
SetItemText
(
i
,
item_SAlarmType_index
,
""
);
SetItemText
(
i
,
item_BoxStr_index
,
""
);
SetItemText
(
i
,
item_BoxStr_index
,
""
);
}
}
SetItemColor
(
i
,
move
.
runStatus
);
SetItemColor
(
i
,
move
.
runStatus
,
move
.
alarmType
);
i
++;
i
++;
}
}
i
++;
i
++;
...
@@ -558,8 +558,8 @@ namespace OnlineStore.AssemblyLine
...
@@ -558,8 +558,8 @@ namespace OnlineStore.AssemblyLine
{
{
SetItemText
(
i
,
item_debug_index
,
equip
.
Config
.
IsDebug
.
Equals
(
1
)
?
"✘"
:
"✔"
);
SetItemText
(
i
,
item_debug_index
,
equip
.
Config
.
IsDebug
.
Equals
(
1
)
?
"✘"
:
"✔"
);
SetItemText
(
i
,
item_alarm_index
,
equip
.
alarmType
.
ToString
());
SetItemText
(
i
,
item_alarm_index
,
equip
.
alarmType
.
ToString
());
SetItemText
(
i
,
item_runStr_index
,
KTK_Store
.
GetRunStr
(
equip
.
lineStatus
,
equip
.
runStatus
));
SetItemText
(
i
,
item_runStr_index
,
equip
.
GetRunStr
(
));
SetItemColor
(
i
,
equip
.
runStatus
);
SetItemColor
(
i
,
equip
.
runStatus
,
equip
.
alarmType
);
i
++;
i
++;
}
}
i
++;
i
++;
...
@@ -567,8 +567,8 @@ namespace OnlineStore.AssemblyLine
...
@@ -567,8 +567,8 @@ namespace OnlineStore.AssemblyLine
{
{
SetItemText
(
i
,
item_debug_index
,
equip
.
Config
.
IsDebug
.
Equals
(
1
)
?
"✘"
:
"✔"
);
SetItemText
(
i
,
item_debug_index
,
equip
.
Config
.
IsDebug
.
Equals
(
1
)
?
"✘"
:
"✔"
);
SetItemText
(
i
,
item_alarm_index
,
equip
.
alarmType
.
ToString
());
SetItemText
(
i
,
item_alarm_index
,
equip
.
alarmType
.
ToString
());
SetItemText
(
i
,
item_runStr_index
,
KTK_Store
.
GetRunStr
(
equip
.
lineStatus
,
equip
.
runStatus
));
SetItemText
(
i
,
item_runStr_index
,
equip
.
GetRunStr
(
));
SetItemColor
(
i
,
equip
.
runStatus
);
SetItemColor
(
i
,
equip
.
runStatus
,
equip
.
alarmType
);
i
++;
i
++;
}
}
i
++;
i
++;
...
@@ -576,8 +576,8 @@ namespace OnlineStore.AssemblyLine
...
@@ -576,8 +576,8 @@ namespace OnlineStore.AssemblyLine
{
{
SetItemText
(
i
,
item_debug_index
,
equip
.
Config
.
IsDebug
.
Equals
(
1
)
?
"✘"
:
"✔"
);
SetItemText
(
i
,
item_debug_index
,
equip
.
Config
.
IsDebug
.
Equals
(
1
)
?
"✘"
:
"✔"
);
SetItemText
(
i
,
item_alarm_index
,
equip
.
alarmType
.
ToString
());
SetItemText
(
i
,
item_alarm_index
,
equip
.
alarmType
.
ToString
());
SetItemText
(
i
,
item_runStr_index
,
KTK_Store
.
GetRunStr
(
equip
.
lineStatus
,
equip
.
runStatus
));
SetItemText
(
i
,
item_runStr_index
,
equip
.
GetRunStr
(
));
SetItemColor
(
i
,
equip
.
runStatus
);
SetItemColor
(
i
,
equip
.
runStatus
,
equip
.
alarmType
);
i
++;
i
++;
}
}
if
(
lineBean
.
runStatus
>
LineRunStatus
.
Wait
)
if
(
lineBean
.
runStatus
>
LineRunStatus
.
Wait
)
...
@@ -609,20 +609,28 @@ namespace OnlineStore.AssemblyLine
...
@@ -609,20 +609,28 @@ namespace OnlineStore.AssemblyLine
}
}
}
}
private
void
SetItemColor
(
int
i
,
LineRunStatus
runStatus
)
private
void
SetItemColor
(
int
i
,
LineRunStatus
runStatus
,
LineAlarmType
alarmType
)
{
{
if
(
runStatus
.
Equals
(
LineRunStatus
.
Wait
))
if
(
runStatus
.
Equals
(
LineRunStatus
.
Wait
))
{
{
SetItemColor
(
i
,
Color
.
White
);
SetItemColor
(
i
,
Color
.
White
);
//listView1.Items[i].BackColor = Color.White;
//listView1.Items[i].BackColor = Color.White;
}
}
else
if
(
alarmType
.
Equals
(
LineAlarmType
.
IoSingleTimeOut
))
{
SetItemColor
(
i
,
Color
.
LightCoral
);
}
else
if
(
alarmType
.
Equals
(
LineAlarmType
.
None
).
Equals
(
false
))
{
SetItemColor
(
i
,
Color
.
Red
);
}
else
if
(
runStatus
.
Equals
(
LineRunStatus
.
HomeMoving
)
||
runStatus
.
Equals
(
LineRunStatus
.
Reset
))
else
if
(
runStatus
.
Equals
(
LineRunStatus
.
HomeMoving
)
||
runStatus
.
Equals
(
LineRunStatus
.
Reset
))
{
{
SetItemColor
(
i
,
Color
.
Orange
);
SetItemColor
(
i
,
Color
.
Orange
);
}
}
else
if
(
runStatus
.
Equals
(
LineRunStatus
.
Busy
))
else
if
(
runStatus
.
Equals
(
LineRunStatus
.
Busy
))
{
{
SetItemColor
(
i
,
Color
.
Green
);
SetItemColor
(
i
,
Color
.
Lime
Green
);
}
}
if
(
runStatus
.
Equals
(
LineRunStatus
.
Runing
))
if
(
runStatus
.
Equals
(
LineRunStatus
.
Runing
))
{
{
...
...
source/DeviceLibrary/assemblyLine/DischargeLine.cs
查看文件 @
1c3c6ff
...
@@ -247,22 +247,24 @@ namespace OnlineStore.DeviceLibrary
...
@@ -247,22 +247,24 @@ namespace OnlineStore.DeviceLibrary
protected
override
void
BaseTimerProcess
()
protected
override
void
BaseTimerProcess
()
{
{
if
(
IOValue
(
IO_Type
.
DLine_SuddenStop
).
Equals
(
IO_VALUE
.
LOW
)
&&
(!
isInSuddenDown
)
)
if
(
IOValue
(
IO_Type
.
DLine_SuddenStop
).
Equals
(
IO_VALUE
.
LOW
))
{
{
LogUtil
.
error
(
Name
+
"收到急停信号,等待300后再次验证急停"
);
if
(!
isInSuddenDown
)
Task
.
Factory
.
StartNew
(
delegate
{
{
Thread
.
Sleep
(
300
);
LogUtil
.
error
(
Name
+
"收到急停信号,等待300后再次验证急停"
);
if
(
IOValue
(
IO_Type
.
DLine_SuddenStop
).
Equals
(
IO_VALUE
.
LOW
))
Task
.
Factory
.
StartNew
(
delegate
{
{
SetWarnMsg
(
Name
+
"收到急停信号,急停报警"
);
Thread
.
Sleep
(
300
);
Alarm
(
LineAlarmType
.
SuddenStop
);
if
(
IOValue
(
IO_Type
.
DLine_SuddenStop
).
Equals
(
IO_VALUE
.
LOW
))
return
;
{
}
SetWarnMsg
(
Name
+
"收到急停信号,急停报警"
);
});
Alarm
(
LineAlarmType
.
SuddenStop
);
}
return
;
}
if
(
IOValue
(
IO_Type
.
DLine_Reset
).
Equals
(
IO_VALUE
.
HIGH
))
});
}
}
else
if
(
IOValue
(
IO_Type
.
DLine_Reset
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
if
(
NoAlarm
())
if
(
NoAlarm
())
{
{
...
...
source/DeviceLibrary/assemblyLine/EquipBase.cs
查看文件 @
1c3c6ff
...
@@ -436,7 +436,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -436,7 +436,7 @@ namespace OnlineStore.DeviceLibrary
CheckAlarmProcess
(
moveInfo
,
LineAlarmType
.
IoSingleTimeOut
);
CheckAlarmProcess
(
moveInfo
,
LineAlarmType
.
IoSingleTimeOut
);
}
}
}
}
else
if
(
rwSpan
.
TotalSeconds
>
5
&&
span
.
TotalSeconds
>
8
&&
span
.
TotalSeconds
<
LineManager
.
Config
.
IOSingle_TimerOut
*
2
)
else
if
(
rwSpan
.
TotalSeconds
>
5
&&
span
.
TotalSeconds
>
6
&&
span
.
TotalSeconds
<
LineManager
.
Config
.
IOSingle_TimerOut
*
2
)
{
{
preRWTime
=
DateTime
.
Now
;
preRWTime
=
DateTime
.
Now
;
string
msg
=
moveInfo
.
Name
+
" ["
+
moveInfo
.
MoveType
+
"]["
+
moveInfo
.
MoveStep
+
"] "
+
NotOkMsg
+
"已等待 "
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"秒,重写DO:"
;
string
msg
=
moveInfo
.
Name
+
" ["
+
moveInfo
.
MoveType
+
"]["
+
moveInfo
.
MoveStep
+
"] "
+
NotOkMsg
+
"已等待 "
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"秒,重写DO:"
;
...
@@ -445,9 +445,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -445,9 +445,12 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
ww
!=
null
&&
ww
.
WaitType
.
Equals
(
2
)
&&
baseConfig
.
DOList
.
ContainsKey
(
ww
.
IoType
))
if
(
ww
!=
null
&&
ww
.
WaitType
.
Equals
(
2
)
&&
baseConfig
.
DOList
.
ContainsKey
(
ww
.
IoType
))
{
{
isLog
=
true
;
if
(
IOManager
.
DOValue
(
ww
.
IoType
,
baseConfig
.
Id
).
Equals
(
ww
.
IoValue
).
Equals
(
false
))
IOMove
(
ww
.
IoType
,
ww
.
IoValue
);
{
msg
+=
ww
.
ToStr
()
+
","
;
isLog
=
true
;
IOMove
(
ww
.
IoType
,
ww
.
IoValue
);
msg
+=
ww
.
ToStr
()
+
","
;
}
}
}
}
}
if
(
isLog
)
if
(
isLog
)
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
查看文件 @
1c3c6ff
...
@@ -326,24 +326,27 @@ namespace OnlineStore.DeviceLibrary
...
@@ -326,24 +326,27 @@ namespace OnlineStore.DeviceLibrary
protected
override
void
BaseTimerProcess
()
protected
override
void
BaseTimerProcess
()
{
{
if
(
IOValue
(
IO_Type
.
SL_SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
)
&&
(!
isInSuddenDown
)
)
if
(
IOValue
(
IO_Type
.
SL_SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
))
{
{
LogUtil
.
error
(
Name
+
"收到急停信号,等待300后再次验证急停"
);
if
(!
isInSuddenDown
)
Task
.
Factory
.
StartNew
(
delegate
{
{
Thread
.
Sleep
(
300
);
LogUtil
.
error
(
Name
+
"收到急停信号,等待300后再次验证急停"
);
if
(
IOValue
(
IO_Type
.
SL_SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
))
Task
.
Factory
.
StartNew
(
delegate
{
{
SetWarnMsg
(
Name
+
"收到急停信号,急停报警"
);
Thread
.
Sleep
(
300
);
if
(
isInSuddenDown
.
Equals
(
false
))
if
(
IOValue
(
IO_Type
.
SL_SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
))
{
{
Alarm
(
LineAlarmType
.
SuddenStop
);
SetWarnMsg
(
Name
+
"收到急停信号,急停报警"
);
if
(
isInSuddenDown
.
Equals
(
false
))
{
Alarm
(
LineAlarmType
.
SuddenStop
);
}
return
;
}
}
return
;
});
}
}
});
}
}
else
if
(
IOValue
(
IO_Type
.
SL_Reset_BTN
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
SL_Reset_BTN
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
if
(
NoAlarm
())
if
(
NoAlarm
())
{
{
...
...
source/DeviceLibrary/assemblyLine/LineBean.cs
查看文件 @
1c3c6ff
...
@@ -480,7 +480,27 @@ namespace OnlineStore.DeviceLibrary
...
@@ -480,7 +480,27 @@ namespace OnlineStore.DeviceLibrary
if
(
alarmType
==
LineAlarmType
.
SuddenStop
||
alarmType
.
Equals
(
LineAlarmType
.
NoAirCheck
))
if
(
alarmType
==
LineAlarmType
.
SuddenStop
||
alarmType
.
Equals
(
LineAlarmType
.
NoAirCheck
))
{
{
LogUtil
.
error
(
WarnMsg
);
LogUtil
.
error
(
WarnMsg
);
StopMove
();
// StopMove();
MoveInfo
.
EndMove
();
WriteDrivetMotorRun
(
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SW4_MotorRun
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SW4_TopCylinder_Down
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SW4_TopCylinder_Up
,
IO_VALUE
.
LOW
);
SideWayStop
();
foreach
(
EquipBase
equip
in
this
.
AllEquipMap
.
Values
)
{
if
(
equip
.
runStatus
>
LineRunStatus
.
Wait
)
{
equip
.
Alarm
(
alarmType
);
}
else
{
equip
.
CloseCylinderStop
();
}
}
}
}
IOMove
(
IO_Type
.
Alarm_HddLed
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
Alarm_HddLed
,
IO_VALUE
.
HIGH
);
}
}
...
@@ -643,18 +663,21 @@ namespace OnlineStore.DeviceLibrary
...
@@ -643,18 +663,21 @@ namespace OnlineStore.DeviceLibrary
//急停按钮和气压检测按钮需要一起使用
//急停按钮和气压检测按钮需要一起使用
if
(
suddenBtn
.
Equals
(
IO_VALUE
.
LOW
))
if
(
suddenBtn
.
Equals
(
IO_VALUE
.
LOW
))
{
{
LogUtil
.
error
(
Name
+
"收到急停信号,等待300后再次验证急停"
);
if
(
isInSuddenDown
.
Equals
(
false
))
Task
.
Factory
.
StartNew
(
delegate
{
{
Thread
.
Sleep
(
300
);
LogUtil
.
error
(
Name
+
"收到急停信号,等待300后再次验证急停"
);
if
(
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
))
Task
.
Factory
.
StartNew
(
delegate
{
{
SetWarnMsg
(
"收到急停信号,报警急停"
);
Thread
.
Sleep
(
300
);
Alarm
(
LineAlarmType
.
SuddenStop
);
if
(
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
))
}
{
});
SetWarnMsg
(
"收到急停信号,报警急停"
);
Alarm
(
LineAlarmType
.
SuddenStop
);
}
});
}
}
}
if
(
fuweiValue
.
Equals
(
IO_VALUE
.
HIGH
)
&&
(!
fuweiValue
.
Equals
(
lastFuwei
)))
else
if
(
fuweiValue
.
Equals
(
IO_VALUE
.
HIGH
)
&&
(!
fuweiValue
.
Equals
(
lastFuwei
)))
{
{
if
(
suddenBtn
.
Equals
(
IO_VALUE
.
LOW
))
if
(
suddenBtn
.
Equals
(
IO_VALUE
.
LOW
))
{
{
...
...
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
查看文件 @
1c3c6ff
...
@@ -119,9 +119,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -119,9 +119,12 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
ww
!=
null
&&
ww
.
WaitType
.
Equals
(
2
)
&&
baseConfig
.
DOList
.
ContainsKey
(
ww
.
IoType
))
if
(
ww
!=
null
&&
ww
.
WaitType
.
Equals
(
2
)
&&
baseConfig
.
DOList
.
ContainsKey
(
ww
.
IoType
))
{
{
isLog
=
true
;
if
(
IOManager
.
DOValue
(
ww
.
IoType
,
baseConfig
.
Id
).
Equals
(
ww
.
IoValue
).
Equals
(
false
))
IOMove
(
ww
.
IoType
,
ww
.
IoValue
);
{
msg
+=
ww
.
ToStr
()
+
","
;
isLog
=
true
;
IOMove
(
ww
.
IoType
,
ww
.
IoValue
);
msg
+=
ww
.
ToStr
()
+
","
;
}
}
}
}
}
if
(
isLog
)
if
(
isLog
)
...
...
source/DeviceLibrary/assemblyLine/OutTrayLineBean.cs
查看文件 @
1c3c6ff
...
@@ -431,7 +431,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -431,7 +431,8 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
result
.
Equals
(
""
))
if
(
result
.
Equals
(
""
))
{
{
if
(
span
.
TotalSeconds
>=
3
&&
span
.
TotalSeconds
<=
5
)
//正常4-5秒
if
(
span
.
TotalSeconds
>=
1
&&
span
.
TotalSeconds
<=
6
)
{
{
LogUtil
.
debug
(
subType
+
"停止运动:["
+
moveDO
+
"] ["
+
checkDI
+
"] 耗时 ["
+
FormUtil
.
GetSpanStr
(
span
)
+
"]["
+
canWhileCount
+
"]"
);
LogUtil
.
debug
(
subType
+
"停止运动:["
+
moveDO
+
"] ["
+
checkDI
+
"] 耗时 ["
+
FormUtil
.
GetSpanStr
(
span
)
+
"]["
+
canWhileCount
+
"]"
);
}
}
...
...
source/DeviceLibrary/model/KTK_Store.cs
查看文件 @
1c3c6ff
...
@@ -302,7 +302,87 @@ namespace OnlineStore.DeviceLibrary
...
@@ -302,7 +302,87 @@ namespace OnlineStore.DeviceLibrary
WarnMsg
=
msg
;
WarnMsg
=
msg
;
}
}
public
static
string
GetRunStr
(
LineStatus
ls
,
LineRunStatus
runs
)
public
string
GetRunStr
(
)
{
string
sta
=
"运行中"
;
string
aa
=
""
;
switch
(
runStatus
)
{
case
LineRunStatus
.
Busy
:
sta
=
"忙碌"
;
break
;
case
LineRunStatus
.
HomeMoving
:
sta
=
"原点返回"
;
break
;
case
LineRunStatus
.
Reset
:
sta
=
"重置"
;
break
;
case
LineRunStatus
.
Runing
:
sta
=
"运行中"
;
break
;
case
LineRunStatus
.
Wait
:
sta
=
"等待启动"
;
break
;
}
if
(
runStatus
>
LineRunStatus
.
Wait
)
{
//"0":"急停中", "1":"设备联机", "2":"故障中", "3":"入库执行中", "4":"出库执行中", 5":"料盘入仓位完成", "6":"料盘出仓位完成", 7":"设备调试中",
switch
(
lineStatus
)
{
case
LineStatus
.
Debugging
:
aa
=
"设备调试中"
;
break
;
//case LineStatus.InStoreEnd:
// aa = "料盘入仓位完成";
// break;
case
LineStatus
.
InStoreExecute
:
aa
=
"入库执行中"
;
break
;
case
LineStatus
.
InTrouble
:
aa
=
"故障中"
;
break
;
//case LineStatus.OutStoreBoxEnd:
// aa = "料盘出仓位完成";
// break;
case
LineStatus
.
OutStoreExecute
:
aa
=
"出库执行中"
;
break
;
case
LineStatus
.
StoreOnline
:
aa
=
"设备联机"
;
break
;
case
LineStatus
.
SuddenStop
:
aa
=
"急停中"
;
break
;
//case LineStatus.OutMoveExecute:
// aa = "出库完成";
// break;
//case LineStatus.InStoreFaild:
// aa = "入库失败(" + WarnMsg + ")";
// break;
//case LineStatus.OutStoreFaild:
// aa = "出库失败(" + WarnMsg + ")";
// break;
}
if
(
isInSuddenDown
)
{
aa
=
"急停中"
;
}
else
if
(
isNoAirCheck
)
{
aa
=
"无气压信号"
;
}
}
if
(!
aa
.
Equals
(
""
))
{
return
sta
+
"_"
+
aa
;
}
else
{
return
sta
;
}
}
public
static
string
GetRunStr
(
LineStatus
ls
,
LineRunStatus
runs
)
{
{
string
sta
=
"运行中"
;
string
sta
=
"运行中"
;
string
aa
=
""
;
string
aa
=
""
;
...
@@ -362,9 +442,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -362,9 +442,9 @@ namespace OnlineStore.DeviceLibrary
//case LineStatus.OutStoreFaild:
//case LineStatus.OutStoreFaild:
// aa = "出库失败(" + WarnMsg + ")";
// aa = "出库失败(" + WarnMsg + ")";
// break;
// break;
}
}
}
}
if
(!
aa
.
Equals
(
""
))
if
(!
aa
.
Equals
(
""
))
{
{
return
sta
+
"_"
+
aa
;
return
sta
+
"_"
+
aa
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论