Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO827-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit abe4ab16
由
LN
编写于
2021-07-20 16:28:45 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
修改物料的D7仓门口不抓的问题。
1 个父辈
d731fd6c
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
181 行增加
和
27 行删除
source/AssemblyLineClient/FrmLineStore.Designer.cs
source/AssemblyLineClient/FrmLineStore.cs
source/DeviceLibrary/assemblyLine/LineBean.cs
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
source/DeviceLibrary/assemblymanager/ALineManager.cs
source/DeviceLibrary/model/StoreStep.cs
source/AssemblyLineClient/FrmLineStore.Designer.cs
查看文件 @
abe4ab1
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
FrmLineStore
));
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
FrmLineStore
));
this
.
tabControl1
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
tabControl1
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
tabPage1
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
tabPage1
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
lblCPU
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
label3
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label3
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblOpText
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblOpText
=
new
System
.
Windows
.
Forms
.
Label
();
...
@@ -154,6 +155,7 @@
...
@@ -154,6 +155,7 @@
//
//
// tabPage1
// tabPage1
//
//
this
.
tabPage1
.
Controls
.
Add
(
this
.
lblCPU
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
panel1
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
panel1
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
groupBox1
);
...
@@ -165,6 +167,18 @@
...
@@ -165,6 +167,18 @@
this
.
tabPage1
.
Text
=
" 运行日志 "
;
this
.
tabPage1
.
Text
=
" 运行日志 "
;
this
.
tabPage1
.
UseVisualStyleBackColor
=
true
;
this
.
tabPage1
.
UseVisualStyleBackColor
=
true
;
//
//
// lblCPU
//
this
.
lblCPU
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
lblCPU
.
AutoSize
=
true
;
this
.
lblCPU
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblCPU
.
ForeColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
lblCPU
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
581
);
this
.
lblCPU
.
Name
=
"lblCPU"
;
this
.
lblCPU
.
Size
=
new
System
.
Drawing
.
Size
(
35
,
17
);
this
.
lblCPU
.
TabIndex
=
203
;
this
.
lblCPU
.
Text
=
"CPU:"
;
//
// panel1
// panel1
//
//
this
.
panel1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
panel1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
...
@@ -177,7 +191,7 @@
...
@@ -177,7 +191,7 @@
this
.
panel1
.
Controls
.
Add
(
this
.
label5
);
this
.
panel1
.
Controls
.
Add
(
this
.
label5
);
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
429
);
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
429
);
this
.
panel1
.
Name
=
"panel1"
;
this
.
panel1
.
Name
=
"panel1"
;
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
128
,
1
64
);
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
128
,
1
46
);
this
.
panel1
.
TabIndex
=
202
;
this
.
panel1
.
TabIndex
=
202
;
//
//
// label3
// label3
...
@@ -807,43 +821,43 @@
...
@@ -807,43 +821,43 @@
// 开机自动启动ToolStripMenuItem
// 开机自动启动ToolStripMenuItem
//
//
this
.
开机自动启动
ToolStripMenuItem
.
Name
=
"开机自动启动ToolStripMenuItem"
;
this
.
开机自动启动
ToolStripMenuItem
.
Name
=
"开机自动启动ToolStripMenuItem"
;
this
.
开机自动启动
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
开机自动启动
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
开机自动启动
ToolStripMenuItem
.
Text
=
"开机自动启动"
;
this
.
开机自动启动
ToolStripMenuItem
.
Text
=
"开机自动启动"
;
this
.
开机自动启动
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
开机自动启动
ToolStripMenuItem_Click
);
this
.
开机自动启动
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
开机自动启动
ToolStripMenuItem_Click
);
//
//
// toolStripSeparator15
// toolStripSeparator15
//
//
this
.
toolStripSeparator15
.
Name
=
"toolStripSeparator15"
;
this
.
toolStripSeparator15
.
Name
=
"toolStripSeparator15"
;
this
.
toolStripSeparator15
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator15
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
//
//
// 启用蜂鸣器ToolStripMenuItem
// 启用蜂鸣器ToolStripMenuItem
//
//
this
.
启用蜂鸣器
ToolStripMenuItem
.
Name
=
"启用蜂鸣器ToolStripMenuItem"
;
this
.
启用蜂鸣器
ToolStripMenuItem
.
Name
=
"启用蜂鸣器ToolStripMenuItem"
;
this
.
启用蜂鸣器
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
启用蜂鸣器
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
启用蜂鸣器
ToolStripMenuItem
.
Text
=
"启用蜂鸣器"
;
this
.
启用蜂鸣器
ToolStripMenuItem
.
Text
=
"启用蜂鸣器"
;
this
.
启用蜂鸣器
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
启用蜂鸣器
ToolStripMenuItem_Click
);
this
.
启用蜂鸣器
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
启用蜂鸣器
ToolStripMenuItem_Click
);
//
//
// toolStripSeparator25
// toolStripSeparator25
//
//
this
.
toolStripSeparator25
.
Name
=
"toolStripSeparator25"
;
this
.
toolStripSeparator25
.
Name
=
"toolStripSeparator25"
;
this
.
toolStripSeparator25
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator25
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
//
//
// toolStripMenuItem4
// toolStripMenuItem4
//
//
this
.
toolStripMenuItem4
.
Name
=
"toolStripMenuItem4"
;
this
.
toolStripMenuItem4
.
Name
=
"toolStripMenuItem4"
;
this
.
toolStripMenuItem4
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
toolStripMenuItem4
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
toolStripMenuItem4
.
Text
=
"启用安全门禁"
;
this
.
toolStripMenuItem4
.
Text
=
"启用安全门禁"
;
this
.
toolStripMenuItem4
.
Click
+=
new
System
.
EventHandler
(
this
.
toolStripMenuItem4_Click
);
this
.
toolStripMenuItem4
.
Click
+=
new
System
.
EventHandler
(
this
.
toolStripMenuItem4_Click
);
//
//
// toolStripSeparator17
// toolStripSeparator17
//
//
this
.
toolStripSeparator17
.
Name
=
"toolStripSeparator17"
;
this
.
toolStripSeparator17
.
Name
=
"toolStripSeparator17"
;
this
.
toolStripSeparator17
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator17
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
//
//
// 自动保存托盘信息ToolStripMenuItem
// 自动保存托盘信息ToolStripMenuItem
//
//
this
.
自动保存托盘信息
ToolStripMenuItem
.
Name
=
"自动保存托盘信息ToolStripMenuItem"
;
this
.
自动保存托盘信息
ToolStripMenuItem
.
Name
=
"自动保存托盘信息ToolStripMenuItem"
;
this
.
自动保存托盘信息
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
自动保存托盘信息
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
自动保存托盘信息
ToolStripMenuItem
.
Text
=
"保存托盘信息"
;
this
.
自动保存托盘信息
ToolStripMenuItem
.
Text
=
"保存托盘信息"
;
this
.
自动保存托盘信息
ToolStripMenuItem
.
Visible
=
false
;
this
.
自动保存托盘信息
ToolStripMenuItem
.
Visible
=
false
;
this
.
自动保存托盘信息
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
自动保存托盘信息
ToolStripMenuItem_Click
);
this
.
自动保存托盘信息
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
自动保存托盘信息
ToolStripMenuItem_Click
);
...
@@ -954,6 +968,7 @@
...
@@ -954,6 +968,7 @@
this
.
Load
+=
new
System
.
EventHandler
(
this
.
FrmMain_Load
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
FrmMain_Load
);
this
.
tabControl1
.
ResumeLayout
(
false
);
this
.
tabControl1
.
ResumeLayout
(
false
);
this
.
tabPage1
.
ResumeLayout
(
false
);
this
.
tabPage1
.
ResumeLayout
(
false
);
this
.
tabPage1
.
PerformLayout
();
this
.
panel1
.
ResumeLayout
(
false
);
this
.
panel1
.
ResumeLayout
(
false
);
this
.
groupBox2
.
ResumeLayout
(
false
);
this
.
groupBox2
.
ResumeLayout
(
false
);
this
.
groupBox2
.
PerformLayout
();
this
.
groupBox2
.
PerformLayout
();
...
@@ -1066,6 +1081,7 @@
...
@@ -1066,6 +1081,7 @@
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
toolStripMenuItem3
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
toolStripMenuItem3
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator16
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator16
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
toolStripMenuItem4
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
toolStripMenuItem4
;
private
System
.
Windows
.
Forms
.
Label
lblCPU
;
}
}
}
}
source/AssemblyLineClient/FrmLineStore.cs
查看文件 @
abe4ab1
...
@@ -445,15 +445,19 @@ namespace OnlineStore.AssemblyLine
...
@@ -445,15 +445,19 @@ namespace OnlineStore.AssemblyLine
UpdateControl
();
UpdateControl
();
string
canScanCode
=
""
;
string
canScanCode
=
""
;
lblCPU
.
Text
=
"CPU:"
+
LineManager
.
CurrCPUvalue
+
"%"
;
lblStatus
.
Text
=
lineBean
.
GetRunStr
()
+
canScanCode
;
lblStatus
.
Text
=
lineBean
.
GetRunStr
()
+
canScanCode
;
string
warnMsg
=
""
;
string
warnMsg
=
""
;
if
(
LineManager
.
Line
.
runStatus
>
LineRunStatus
.
Wait
)
if
(
LineManager
.
Line
.
runStatus
>
LineRunStatus
.
Wait
)
{
{
string
time
=
LineManager
.
Line
.
alarmType
.
Equals
(
LineAlarmType
.
None
)
?
""
:
LineManager
.
Line
.
LastAlarmTime
.
ToLongTimeString
();
string
time
=
LineManager
.
Line
.
alarmType
.
Equals
(
LineAlarmType
.
None
)
?
""
:
LineManager
.
Line
.
LastAlarmTime
.
ToLongTimeString
();
warnMsg
=
LineManager
.
Line
.
WarnMsg
.
Equals
(
""
)
?
""
:
(
time
+
LineManager
.
Line
.
WarnMsg
+
"\r\n"
);
warnMsg
=
LineManager
.
Line
.
WarnMsg
.
Equals
(
""
)
?
""
:
(
time
+
LineManager
.
Line
.
WarnMsg
+
"\r\n"
);
if
(!
String
.
IsNullOrEmpty
(
LineManager
.
Line
.
CpuMsg
))
{
warnMsg
+=
LineManager
.
Line
.
CpuMsg
+
"\r\n"
;
}
if
(
TrayManager
.
TrayErrorMsg
.
Equals
(
""
).
Equals
(
false
))
if
(
TrayManager
.
TrayErrorMsg
.
Equals
(
""
).
Equals
(
false
))
{
{
warnMsg
+=
TrayManager
.
TrayErrorMsg
+
"\r\n"
;
warnMsg
+=
TrayManager
.
TrayErrorMsg
+
"\r\n"
;
...
...
source/DeviceLibrary/assemblyLine/LineBean.cs
查看文件 @
abe4ab1
...
@@ -4,6 +4,7 @@ using OnlineStore.Common;
...
@@ -4,6 +4,7 @@ using OnlineStore.Common;
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Diagnostics
;
using
System.Drawing
;
using
System.Drawing
;
using
System.Linq
;
using
System.Linq
;
using
System.Net
;
using
System.Net
;
...
@@ -478,6 +479,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -478,6 +479,7 @@ namespace OnlineStore.DeviceLibrary
bool
isNeedAlarmLed
=
false
;
bool
isNeedAlarmLed
=
false
;
bool
isInOut
=
false
;
bool
isInOut
=
false
;
bool
yellowShanShuo
=
false
;
bool
yellowShanShuo
=
false
;
GetCPU
();
if
(
runStatus
.
Equals
(
LineRunStatus
.
HomeMoving
)
||
runStatus
.
Equals
(
LineRunStatus
.
Reset
))
if
(
runStatus
.
Equals
(
LineRunStatus
.
HomeMoving
)
||
runStatus
.
Equals
(
LineRunStatus
.
Reset
))
{
{
yellowShanShuo
=
true
;
yellowShanShuo
=
true
;
...
@@ -491,6 +493,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -491,6 +493,10 @@ namespace OnlineStore.DeviceLibrary
yellowShanShuo
=
true
;
yellowShanShuo
=
true
;
}
}
if
(!
String
.
IsNullOrEmpty
(
CpuMsg
))
{
isNeedAlarmLed
=
true
;
}
foreach
(
EquipBase
moveEquip
in
AllEquipMap
.
Values
)
foreach
(
EquipBase
moveEquip
in
AllEquipMap
.
Values
)
{
{
if
(
moveEquip
.
isNoAirCheck
||
moveEquip
.
isInSuddenDown
||
moveEquip
.
alarmType
>=
LineAlarmType
.
IoSingleTimeOut
)
if
(
moveEquip
.
isNoAirCheck
||
moveEquip
.
isInSuddenDown
||
moveEquip
.
alarmType
>=
LineAlarmType
.
IoSingleTimeOut
)
...
@@ -582,6 +588,51 @@ namespace OnlineStore.DeviceLibrary
...
@@ -582,6 +588,51 @@ namespace OnlineStore.DeviceLibrary
}
}
Thread
.
Sleep
(
5
);
Thread
.
Sleep
(
5
);
}
}
private
DateTime
lastLogTime
=
DateTime
.
Now
;
PerformanceCounter
curtime
=
null
;
public
string
CpuMsg
=
""
;
private
float
GetCPU
()
{
try
{
TimeSpan
sp
=
DateTime
.
Now
-
lastLogTime
;
if
(
sp
.
TotalMinutes
>=
1
)
{
lastLogTime
=
DateTime
.
Now
;
Process
process
=
Process
.
GetCurrentProcess
();
if
(
curtime
==
null
)
{
curtime
=
new
PerformanceCounter
(
"Process"
,
"% Processor Time"
,
process
.
ProcessName
);
}
if
(
process
!=
null
)
{
PerformanceCounter
pf1
=
new
PerformanceCounter
(
"Process"
,
"Working Set - Private"
,
process
.
ProcessName
);
float
cpuv
=
curtime
.
NextValue
()
/
Environment
.
ProcessorCount
;
LineManager
.
CurrCPUvalue
=
cpuv
;
if
(
LineManager
.
CurrCPUvalue
>
80
)
{
CpuMsg
=
"软件CPU过高:"
+
cpuv
+
"%,请检查"
;
LogUtil
.
info
(
Name
+
CpuMsg
);
}
else
{
if
(!
String
.
IsNullOrEmpty
(
CpuMsg
))
{
LogUtil
.
info
(
Name
+
"当前CPU:"
+
cpuv
+
" ,清理之前报警:"
+
CpuMsg
);
CpuMsg
=
""
;
}
}
return
LineManager
.
CurrCPUvalue
;
}
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"LogM Error: "
,
ex
);
}
return
0
;
}
#
endregion
#
endregion
private
void
IoCheckTimerProcess
(
object
sender
,
ElapsedEventArgs
e
)
private
void
IoCheckTimerProcess
(
object
sender
,
ElapsedEventArgs
e
)
...
@@ -962,6 +1013,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -962,6 +1013,10 @@ namespace OnlineStore.DeviceLibrary
conIsPro
=
true
;
conIsPro
=
true
;
conLastTime
=
DateTime
.
Now
;
conLastTime
=
DateTime
.
Now
;
List
<
AlarmMsg
>
alarmList
=
new
List
<
AlarmMsg
>();
List
<
AlarmMsg
>
alarmList
=
new
List
<
AlarmMsg
>();
if
(!
String
.
IsNullOrEmpty
(
CpuMsg
))
{
alarmList
.
Add
(
new
AlarmMsg
(
Name
,
"line.soft_cpu"
,
CpuMsg
));
}
foreach
(
EquipBase
equip
in
AllEquipMap
.
Values
)
foreach
(
EquipBase
equip
in
AllEquipMap
.
Values
)
{
{
if
(
equip
.
alarmType
.
Equals
(
LineAlarmType
.
None
)
||
equip
.
WarnMsg
.
Contains
(
"等待空托盘到达超时"
))
if
(
equip
.
alarmType
.
Equals
(
LineAlarmType
.
None
)
||
equip
.
WarnMsg
.
Contains
(
"等待空托盘到达超时"
))
...
...
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
查看文件 @
abe4ab1
...
@@ -315,7 +315,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -315,7 +315,7 @@ namespace OnlineStore.DeviceLibrary
//前进后退气缸后退以后才可以出库
//前进后退气缸后退以后才可以出库
else
if
(
move
.
runStatus
.
Equals
(
LineRunStatus
.
Busy
)
&&
move
.
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
OutStore
))
else
if
(
move
.
runStatus
.
Equals
(
LineRunStatus
.
Busy
)
&&
move
.
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
OutStore
))
{
{
if
(
move
.
MoveInfo
.
MoveStep
>=
(
LineMoveStep
.
MO_6
4
_CylinderDown
))
if
(
move
.
MoveInfo
.
MoveStep
>=
(
LineMoveStep
.
MO_6
5
_CylinderDown
))
{
{
return
true
;
return
true
;
}
}
...
...
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
查看文件 @
abe4ab1
...
@@ -28,7 +28,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -28,7 +28,7 @@ namespace OnlineStore.DeviceLibrary
}
}
bool
moveOk
=
(
IsBigStore
()
&&
MoveInfo
.
MoveStep
>=
LineMoveStep
.
MO_62_WaitTray
)
||
MoveInfo
.
MoveStep
>=
LineMoveStep
.
MO_63_CylinderAfter
;
bool
moveOk
=
(
IsBigStore
()
&&
MoveInfo
.
MoveStep
>=
LineMoveStep
.
MO_62_WaitTray
)
||
MoveInfo
.
MoveStep
>=
LineMoveStep
.
MO_63_CylinderAfter
;
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
OutStore
)
&&
moveOk
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
OutStore
)
&&
moveOk
&&
(!
MoveInfo
.
IsStep
(
LineMoveStep
.
MO_6
6
_CylinderUp
)))
&&
(!
MoveInfo
.
IsStep
(
LineMoveStep
.
MO_6
7
_CylinderUp
)))
{
{
if
(
isFull
.
Equals
(
false
))
if
(
isFull
.
Equals
(
false
))
{
{
...
@@ -47,7 +47,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -47,7 +47,7 @@ namespace OnlineStore.DeviceLibrary
}
}
bool
moveOk
=
(
IsBigStore
()
&&
MoveInfo
.
MoveStep
>=
LineMoveStep
.
MO_62_WaitTray
)
||
MoveInfo
.
MoveStep
>=
LineMoveStep
.
MO_63_CylinderAfter
;
bool
moveOk
=
(
IsBigStore
()
&&
MoveInfo
.
MoveStep
>=
LineMoveStep
.
MO_62_WaitTray
)
||
MoveInfo
.
MoveStep
>=
LineMoveStep
.
MO_63_CylinderAfter
;
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
OutStore
)
&&
moveOk
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
OutStore
)
&&
moveOk
&&
(!
MoveInfo
.
IsStep
(
LineMoveStep
.
MO_6
6
_CylinderUp
)))
&&
(!
MoveInfo
.
IsStep
(
LineMoveStep
.
MO_6
7
_CylinderUp
)))
{
{
return
true
;
return
true
;
}
}
...
@@ -222,6 +222,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -222,6 +222,7 @@ namespace OnlineStore.DeviceLibrary
#
endregion
#
endregion
#
region
出库
#
region
出库
private
int
ClampCount
=
0
;
private
int
ClampCount
=
0
;
private
bool
CheckCanPutOK
=
false
;
public
override
bool
StartOutStoreMove
(
InOutParam
param
)
public
override
bool
StartOutStoreMove
(
InOutParam
param
)
{
{
string
posId
=
param
!=
null
?
param
.
PosId
:
""
;
string
posId
=
param
!=
null
?
param
.
PosId
:
""
;
...
@@ -234,6 +235,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -234,6 +235,7 @@ namespace OnlineStore.DeviceLibrary
if
(
runStatus
.
Equals
(
LineRunStatus
.
Runing
))
if
(
runStatus
.
Equals
(
LineRunStatus
.
Runing
))
{
{
LogInfo
(
"启动出库【"
+
posId
+
"】升降气缸上升 "
);
LogInfo
(
"启动出库【"
+
posId
+
"】升降气缸上升 "
);
CheckCanPutOK
=
false
;
runStatus
=
LineRunStatus
.
Busy
;
runStatus
=
LineRunStatus
.
Busy
;
MoveInfo
.
NewMove
(
LineMoveType
.
OutStore
);
MoveInfo
.
NewMove
(
LineMoveType
.
OutStore
);
MoveInfo
.
MoveParam
=
param
;
MoveInfo
.
MoveParam
=
param
;
...
@@ -409,7 +411,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -409,7 +411,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
MO_61_WaitCanPut
))
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
MO_61_WaitCanPut
))
{
{
if
(
checkCanPutTask
==
null
||
checkCanPutTask
.
IsCompleted
)
if
(
checkCanPutTask
==
null
||
checkCanPutTask
.
IsCompleted
)
{
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_62_WaitTray
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_62_WaitTray
);
OutLog
(
"出库 "
+
MoveInfo
.
SLog
+
": 等待托盘到达"
);
OutLog
(
"出库 "
+
MoveInfo
.
SLog
+
": 等待托盘到达"
);
}
}
...
@@ -433,13 +435,17 @@ namespace OnlineStore.DeviceLibrary
...
@@ -433,13 +435,17 @@ namespace OnlineStore.DeviceLibrary
#
region
移载装置,放物品到流水线操作
#
region
移载装置,放物品到流水线操作
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
MO_63_CylinderAfter
))
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
MO_63_CylinderAfter
))
{
{
if
(
CylinderIsOk
(
IO_Type
.
BeforeAfterCylinder_Before
,
IO_Type
.
BeforeAfterCylinder_After
))
if
(!
CheckCanPutOK
)
{
MO_64_WaitCanPut
();
}
else
if
(
CylinderIsOk
(
IO_Type
.
BeforeAfterCylinder_Before
,
IO_Type
.
BeforeAfterCylinder_After
))
{
{
if
(
TrayIsOk
())
if
(
TrayIsOk
())
{
{
int
trayNum
=
SecondMoveInfo
.
MoveParam
.
TrayNumber
;
int
trayNum
=
SecondMoveInfo
.
MoveParam
.
TrayNumber
;
//去掉直接丢盘处理
//去掉直接丢盘处理
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_6
4
_CylinderDown
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_6
5
_CylinderDown
);
OutLog
(
"出库 "
+
MoveInfo
.
SLog
+
": 拦截到空托盘【"
+
trayNum
+
"】, 上下气缸下降 ,顶升气缸上升"
);
OutLog
(
"出库 "
+
MoveInfo
.
SLog
+
": 拦截到空托盘【"
+
trayNum
+
"】, 上下气缸下降 ,顶升气缸上升"
);
if
(
MoveInfo
.
MoveParam
!=
null
)
if
(
MoveInfo
.
MoveParam
!=
null
)
{
{
...
@@ -455,8 +461,39 @@ namespace OnlineStore.DeviceLibrary
...
@@ -455,8 +461,39 @@ namespace OnlineStore.DeviceLibrary
CylinderMove
(
MoveInfo
,
IO_Type
.
TopCylinder_Down
,
IO_Type
.
TopCylinder_Up
);
CylinderMove
(
MoveInfo
,
IO_Type
.
TopCylinder_Down
,
IO_Type
.
TopCylinder_Up
);
}
}
}
}
else
if
(
MoveInfo
.
IsTimeOut
(
20
))
{
MoveTimeOut
(
MoveInfo
,
"等待横移气缸后退到位超时"
);
}
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
MO_64_WaitCanPut
))
{
if
(
CylinderIsOk
(
IO_Type
.
BeforeAfterCylinder_Before
,
IO_Type
.
BeforeAfterCylinder_After
))
{
if
(
TrayIsOk
())
{
int
trayNum
=
SecondMoveInfo
.
MoveParam
.
TrayNumber
;
//去掉直接丢盘处理
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_65_CylinderDown
);
OutLog
(
"出库 "
+
MoveInfo
.
SLog
+
": 拦截到空托盘【"
+
trayNum
+
"】, 上下气缸下降 ,顶升气缸上升"
);
if
(
MoveInfo
.
MoveParam
!=
null
)
{
MoveInfo
.
MoveParam
.
TrayNumber
=
trayNum
;
}
else
{
MoveInfo
.
MoveParam
=
SecondMoveInfo
.
MoveParam
;
}
UpdownDownP2Move
(
MoveInfo
.
MoveParam
.
PlateH
,
MoveInfo
.
MoveParam
.
PlateW
);
CylinderMove
(
MoveInfo
,
IO_Type
.
TopCylinder_Down
,
IO_Type
.
TopCylinder_Up
);
}
}
else
if
(
MoveInfo
.
IsTimeOut
(
20
))
{
MoveTimeOut
(
MoveInfo
,
"等待横移气缸后退到位超时"
);
}
}
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
MO_6
4
_CylinderDown
))
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
MO_6
5
_CylinderDown
))
{
{
OutLog
(
"出库 "
+
MoveInfo
.
SLog
+
": 夹料气缸放松,更新托盘【"
+
MoveInfo
.
MoveParam
.
TrayNumber
+
"】,有料盘,OutStore,【"
+
MoveInfo
.
MoveParam
.
ToStr
()
+
"】"
);
OutLog
(
"出库 "
+
MoveInfo
.
SLog
+
": 夹料气缸放松,更新托盘【"
+
MoveInfo
.
MoveParam
.
TrayNumber
+
"】,有料盘,OutStore,【"
+
MoveInfo
.
MoveParam
.
ToStr
()
+
"】"
);
//更新料盘位置
//更新料盘位置
...
@@ -466,20 +503,20 @@ namespace OnlineStore.DeviceLibrary
...
@@ -466,20 +503,20 @@ namespace OnlineStore.DeviceLibrary
TrayInfo
tray
=
TrayManager
.
GetTrayInfo
(
trayNum
);
TrayInfo
tray
=
TrayManager
.
GetTrayInfo
(
trayNum
);
LogInfo
(
"出库 "
+
MoveInfo
.
SLog
+
": ,更新料盘位置【"
+
MoveInfo
.
MoveParam
.
WareCode
+
"】【INLINE】更新托盘【"
+
trayNum
+
"】 "
+
tray
.
ToStr
()
+
""
);
LogInfo
(
"出库 "
+
MoveInfo
.
SLog
+
": ,更新料盘位置【"
+
MoveInfo
.
MoveParam
.
WareCode
+
"】【INLINE】更新托盘【"
+
trayNum
+
"】 "
+
tray
.
ToStr
()
+
""
);
//出库全部完成
//出库全部完成
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_6
5
_CylinderRelax
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_6
6
_CylinderRelax
);
//CylinderMove(MoveInfo, IO_Type.ClampCylinder_Work, IO_Type.ClampCylinder_Relax);
//CylinderMove(MoveInfo, IO_Type.ClampCylinder_Work, IO_Type.ClampCylinder_Relax);
ClampJwa
.
Relax
(
MoveInfo
,
MoveInfo
.
MoveParam
.
WareCode
);
ClampJwa
.
Relax
(
MoveInfo
,
MoveInfo
.
MoveParam
.
WareCode
);
//EDataManager.UpdateParam(DeviceID);
//EDataManager.UpdateParam(DeviceID);
}
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
MO_6
5
_CylinderRelax
))
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
MO_6
6
_CylinderRelax
))
{
{
this
.
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_6
6
_CylinderUp
);
this
.
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_6
7
_CylinderUp
);
OutLog
(
"出库 "
+
MoveInfo
.
SLog
+
": 上下气缸上升,同时顶升气缸先下降"
);
OutLog
(
"出库 "
+
MoveInfo
.
SLog
+
": 上下气缸上升,同时顶升气缸先下降"
);
UpdownUpMove
();
UpdownUpMove
();
CylinderMove
(
null
,
IO_Type
.
TopCylinder_Up
,
IO_Type
.
TopCylinder_Down
);
CylinderMove
(
null
,
IO_Type
.
TopCylinder_Up
,
IO_Type
.
TopCylinder_Down
);
}
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
MO_6
6
_CylinderUp
))
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
MO_6
7
_CylinderUp
))
{
{
// 减去需要的盘数
// 减去需要的盘数
// TrayManager.DelNeedEmptyTrayNum();
// TrayManager.DelNeedEmptyTrayNum();
...
@@ -497,6 +534,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -497,6 +534,7 @@ namespace OnlineStore.DeviceLibrary
private
Task
checkCanPutTask
=
null
;
private
Task
checkCanPutTask
=
null
;
private
void
MO_61_WaitCanPut
()
private
void
MO_61_WaitCanPut
()
{
{
CheckCanPutOK
=
true
;
checkCanPutTask
=
null
;
checkCanPutTask
=
null
;
if
(
MoveInfo
.
MoveParam
.
urgentReel
)
if
(
MoveInfo
.
MoveParam
.
urgentReel
)
{
{
...
@@ -506,8 +544,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -506,8 +544,7 @@ namespace OnlineStore.DeviceLibrary
}
}
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_61_WaitCanPut
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_61_WaitCanPut
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
10000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
10000
));
checkCanPutTask
=
Task
.
Factory
.
StartNew
(
delegate
checkCanPutTask
=
Task
.
Factory
.
StartNew
(
delegate
{
{
int
getlocationCount
=
0
;
int
getlocationCount
=
0
;
...
@@ -526,6 +563,37 @@ namespace OnlineStore.DeviceLibrary
...
@@ -526,6 +563,37 @@ namespace OnlineStore.DeviceLibrary
}
}
});
});
}
}
private
void
MO_64_WaitCanPut
()
{
CheckCanPutOK
=
true
;
checkCanPutTask
=
null
;
if
(
MoveInfo
.
MoveParam
.
urgentReel
)
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_64_WaitCanPut
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
100
));
OutLog
(
"出库 "
+
MoveInfo
.
SLog
+
": 紧急料,直接等待托盘到达"
);
return
;
}
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_64_WaitCanPut
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
LogUtil
.
info
(
Name
+
"出库 "
+
MoveInfo
.
SLog
+
": 等待可以放到托盘上"
);
checkCanPutTask
=
Task
.
Factory
.
StartNew
(
delegate
{
int
getlocationCount
=
0
;
while
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
OutStore
))
{
getlocationCount
++;
if
(
SServerManager
.
GetLocation
(
MoveInfo
.
MoveParam
.
WareCode
))
{
LogUtil
.
info
(
Name
+
"出库 "
+
MoveInfo
.
SLog
+
": GetLocation OK,开始等待托盘到达"
);
break
;
}
//OutLog("出库 " + MoveInfo.SLog + ": 等待料盘可以放到托盘上,等待3秒后重新判断");
Thread
.
Sleep
(
3000
);
}
});
}
private
bool
TrayIsOk
()
private
bool
TrayIsOk
()
{
{
if
(
SecondMoveInfo
.
IsStep
(
LineMoveStep
.
MO_11_CodeRember
)
&&
!
SecondMoveInfo
.
IsInWait
)
if
(
SecondMoveInfo
.
IsStep
(
LineMoveStep
.
MO_11_CodeRember
)
&&
!
SecondMoveInfo
.
IsInWait
)
...
...
source/DeviceLibrary/assemblymanager/ALineManager.cs
查看文件 @
abe4ab1
...
@@ -27,6 +27,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -27,6 +27,7 @@ namespace OnlineStore.DeviceLibrary
public
static
LineBean
Line
=
null
;
public
static
LineBean
Line
=
null
;
public
static
Line_Config
Config
=
null
;
public
static
Line_Config
Config
=
null
;
public
static
Dictionary
<
int
,
DeviceConfig
>
allConfigMap
=
null
;
public
static
Dictionary
<
int
,
DeviceConfig
>
allConfigMap
=
null
;
public
static
float
CurrCPUvalue
=
0
;
public
LineManager
()
public
LineManager
()
{
{
}
}
...
...
source/DeviceLibrary/model/StoreStep.cs
查看文件 @
abe4ab1
...
@@ -360,18 +360,28 @@ namespace OnlineStore.DeviceLibrary
...
@@ -360,18 +360,28 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
MO_63_CylinderAfter
,
MO_63_CylinderAfter
,
/// <summary>
/// 移栽出库:开始等待托盘
/// </summary>
MO_64_WaitCanPut
,
/// <summary>
/// <summary>
/// 移载(流水线)装置出库处理,上下气缸1下降
/// 移载(流水线)装置出库处理,上下气缸1下降
/// </summary>
/// </summary>
MO_6
4
_CylinderDown
,
MO_6
5
_CylinderDown
,
/// <summary>
/// <summary>
/// 移载(流水线)装置出库处理,夹料气缸1放松
/// 移载(流水线)装置出库处理,夹料气缸1放松
/// </summary>
/// </summary>
MO_6
5
_CylinderRelax
,
MO_6
6
_CylinderRelax
,
/// <summary>
/// <summary>
/// 移载(流水线)装置出库处理,上下气缸1上升
/// 移载(流水线)装置出库处理,上下气缸1上升
/// </summary>
/// </summary>
MO_6
6
_CylinderUp
,
MO_6
7
_CylinderUp
,
#
region
入料模块,紧急出料移栽处理
#
region
入料模块,紧急出料移栽处理
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论