Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 34f6e3a2
由
LN
编写于
2020-03-08 16:09:15 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加托盘顺序检测功能NeedCheckTray的开关选项。
1 个父辈
12c6c25a
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
79 行增加
和
37 行删除
source/AssemblyLineClient/FrmLineStore.Designer.cs
source/AssemblyLineClient/FrmLineStore.cs
source/AssemblyLineClient/记录.txt
source/Common/Setting_Init.cs
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
source/DeviceLibrary/assemblymanager/TrayManager.cs
source/AssemblyLineClient/FrmLineStore.Designer.cs
查看文件 @
34f6e3a
...
...
@@ -86,6 +86,8 @@
this
.
iO
模块状态
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator13
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripMenuItem2
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator14
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
查看托盘信息
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator12
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
清空托盘信息
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
帮助
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
...
...
@@ -100,8 +102,7 @@
this
.
toolStripSeparator8
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripMenuItem1
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
toolStripSeparator14
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
查看托盘信息
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
chbTrayCheck
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabPage1
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
...
...
@@ -163,6 +164,7 @@
//
// groupBox2
//
this
.
groupBox2
.
Controls
.
Add
(
this
.
chbTrayCheck
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
chbBuzzer
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnTrayInfo
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
chbAutoRun
);
...
...
@@ -179,7 +181,7 @@
//
this
.
chbBuzzer
.
AutoSize
=
true
;
this
.
chbBuzzer
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbBuzzer
.
Location
=
new
System
.
Drawing
.
Point
(
21
,
50
);
this
.
chbBuzzer
.
Location
=
new
System
.
Drawing
.
Point
(
21
,
46
);
this
.
chbBuzzer
.
Name
=
"chbBuzzer"
;
this
.
chbBuzzer
.
Size
=
new
System
.
Drawing
.
Size
(
98
,
24
);
this
.
chbBuzzer
.
TabIndex
=
196
;
...
...
@@ -191,7 +193,7 @@
//
this
.
btnTrayInfo
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btnTrayInfo
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnTrayInfo
.
Location
=
new
System
.
Drawing
.
Point
(
181
,
17
);
this
.
btnTrayInfo
.
Location
=
new
System
.
Drawing
.
Point
(
27
,
76
);
this
.
btnTrayInfo
.
Name
=
"btnTrayInfo"
;
this
.
btnTrayInfo
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
35
);
this
.
btnTrayInfo
.
TabIndex
=
195
;
...
...
@@ -215,7 +217,7 @@
//
this
.
chkDebug
.
AutoSize
=
true
;
this
.
chkDebug
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chkDebug
.
Location
=
new
System
.
Drawing
.
Point
(
21
,
83
);
this
.
chkDebug
.
Location
=
new
System
.
Drawing
.
Point
(
165
,
17
);
this
.
chkDebug
.
Name
=
"chkDebug"
;
this
.
chkDebug
.
Size
=
new
System
.
Drawing
.
Size
(
72
,
24
);
this
.
chkDebug
.
TabIndex
=
194
;
...
...
@@ -226,7 +228,7 @@
//
this
.
btnClearLog
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btnClearLog
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnClearLog
.
Location
=
new
System
.
Drawing
.
Point
(
1
83
,
68
);
this
.
btnClearLog
.
Location
=
new
System
.
Drawing
.
Point
(
1
65
,
76
);
this
.
btnClearLog
.
Name
=
"btnClearLog"
;
this
.
btnClearLog
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
35
);
this
.
btnClearLog
.
TabIndex
=
190
;
...
...
@@ -632,7 +634,7 @@
// 扫码测试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
.
Visible
=
false
;
this
.
扫码测试
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
扫码测试
ToolStripMenuItem_Click
);
...
...
@@ -640,61 +642,73 @@
// toolStripSeparator6
//
this
.
toolStripSeparator6
.
Name
=
"toolStripSeparator6"
;
this
.
toolStripSeparator6
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator6
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
this
.
toolStripSeparator6
.
Visible
=
false
;
//
// 二维码学习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
.
Click
+=
new
System
.
EventHandler
(
this
.
二维码学习
ToolStripMenuItem_Click
);
//
// toolStripSeparator7
//
this
.
toolStripSeparator7
.
Name
=
"toolStripSeparator7"
;
this
.
toolStripSeparator7
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator7
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
//
// 托盘初始化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
.
Click
+=
new
System
.
EventHandler
(
this
.
托盘初始化
ToolStripMenuItem_Click
);
//
// toolStripSeparator9
//
this
.
toolStripSeparator9
.
Name
=
"toolStripSeparator9"
;
this
.
toolStripSeparator9
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator9
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
//
// iO模块状态ToolStripMenuItem
//
this
.
iO
模块状态
ToolStripMenuItem
.
Name
=
"iO模块状态ToolStripMenuItem"
;
this
.
iO
模块状态
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
iO
模块状态
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
iO
模块状态
ToolStripMenuItem
.
Text
=
"IO模块状态"
;
this
.
iO
模块状态
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
iO
模块状态
ToolStripMenuItem_Click
);
//
// toolStripSeparator13
//
this
.
toolStripSeparator13
.
Name
=
"toolStripSeparator13"
;
this
.
toolStripSeparator13
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator13
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
//
// toolStripMenuItem2
//
this
.
toolStripMenuItem2
.
Name
=
"toolStripMenuItem2"
;
this
.
toolStripMenuItem2
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
toolStripMenuItem2
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
toolStripMenuItem2
.
Text
=
"AGV调试"
;
this
.
toolStripMenuItem2
.
Click
+=
new
System
.
EventHandler
(
this
.
toolStripMenuItem2_Click
);
//
// toolStripSeparator14
//
this
.
toolStripSeparator14
.
Name
=
"toolStripSeparator14"
;
this
.
toolStripSeparator14
.
Size
=
new
System
.
Drawing
.
Size
(
173
,
6
);
//
// 查看托盘信息ToolStripMenuItem
//
this
.
查看托盘信息
ToolStripMenuItem
.
Name
=
"查看托盘信息ToolStripMenuItem"
;
this
.
查看托盘信息
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
176
,
26
);
this
.
查看托盘信息
ToolStripMenuItem
.
Text
=
"查看托盘信息"
;
this
.
查看托盘信息
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
btnTrayInfo_Click
);
//
// toolStripSeparator12
//
this
.
toolStripSeparator12
.
Name
=
"toolStripSeparator12"
;
this
.
toolStripSeparator12
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator12
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
//
// 清空托盘信息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
.
Click
+=
new
System
.
EventHandler
(
this
.
清空托盘信息
ToolStripMenuItem_Click
);
//
...
...
@@ -783,17 +797,17 @@
this
.
timer1
.
Interval
=
2000
;
this
.
timer1
.
Tick
+=
new
System
.
EventHandler
(
this
.
timer1_Tick
);
//
// toolStripSeparator14
//
this
.
toolStripSeparator14
.
Name
=
"toolStripSeparator14"
;
this
.
toolStripSeparator14
.
Size
=
new
System
.
Drawing
.
Size
(
177
,
6
);
// chbTrayCheck
//
// 查看托盘信息ToolStripMenuItem
//
this
.
查看托盘信息
ToolStripMenuItem
.
Name
=
"查看托盘信息ToolStripMenuItem"
;
this
.
查看托盘信息
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
180
,
26
);
this
.
查看托盘信息
ToolStripMenuItem
.
Text
=
"查看托盘信息"
;
this
.
查看托盘信息
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
btnTrayInfo_Click
);
this
.
chbTrayCheck
.
AutoSize
=
true
;
this
.
chbTrayCheck
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbTrayCheck
.
Location
=
new
System
.
Drawing
.
Point
(
165
,
46
);
this
.
chbTrayCheck
.
Name
=
"chbTrayCheck"
;
this
.
chbTrayCheck
.
Size
=
new
System
.
Drawing
.
Size
(
140
,
24
);
this
.
chbTrayCheck
.
TabIndex
=
197
;
this
.
chbTrayCheck
.
Text
=
"启用托盘顺序检测"
;
this
.
chbTrayCheck
.
UseVisualStyleBackColor
=
true
;
this
.
chbTrayCheck
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbTrayCheck_CheckedChanged
);
//
// FrmLineStore
//
...
...
@@ -906,6 +920,7 @@
private
System
.
Windows
.
Forms
.
CheckBox
chbBuzzer
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator14
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
查看托盘信息
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
CheckBox
chbTrayCheck
;
}
}
source/AssemblyLineClient/FrmLineStore.cs
查看文件 @
34f6e3a
...
...
@@ -114,7 +114,7 @@ namespace OnlineStore.AssemblyLine
this
.
notifyIcon1
.
Text
=
title
;
int
autoValue
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
App_AutoRun
);
chbAutoRun
.
Checked
=
autoValue
.
Equals
(
1
);
chbTrayCheck
.
Checked
=
TrayManager
.
NeedCheckTray
;
LoadStoreData
();
LoadListView
();
...
...
@@ -271,14 +271,14 @@ namespace OnlineStore.AssemblyLine
//如果料仓还在运行状态,先关闭料仓
if
(!
lineBean
.
runStatus
.
Equals
(
LineRunStatus
.
Wait
))
{
LogUtil
.
info
(
LOGGER
,
"即将退出程序,停止"
+
lineBean
.
Name
+
"运行 "
);
LogUtil
.
info
(
"即将退出程序,停止"
+
lineBean
.
Name
+
"运行 "
);
lineBean
.
StopRun
();
}
foreach
(
EquipBase
equip
in
lineBean
.
AllEquipMap
.
Values
)
{
if
(
equip
.
runStatus
>
LineRunStatus
.
Wait
)
{
LogUtil
.
info
(
LOGGER
,
"即将退出程序,停止"
+
equip
.
Name
+
"运行 "
);
LogUtil
.
info
(
"即将退出程序,停止"
+
equip
.
Name
+
"运行 "
);
equip
.
StopRun
();
}
}
...
...
@@ -328,7 +328,7 @@ namespace OnlineStore.AssemblyLine
MessageBox
.
Show
(
lineBean
.
Name
+
"当前状态:"
+
lineBean
.
runStatus
+
",不能启动!"
);
return
;
}
LogUtil
.
info
(
LOGGER
,
"
开始启动"
);
LogUtil
.
info
(
"点击
开始启动"
);
startTimer
.
Interval
=
300
;
startTimer
.
Elapsed
+=
timer_Elapsed
;
startTimer
.
AutoReset
=
false
;
...
...
@@ -955,5 +955,20 @@ namespace OnlineStore.AssemblyLine
LogUtil
.
info
(
"勾选:UseBuzzer ="
+
LineManager
.
UseBuzzer
);
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
UseBuzzer
,
(
LineManager
.
UseBuzzer
?
1
:
0
));
}
private
void
chbTrayCheck_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
if
(!
LoadOk
)
{
return
;
}
if
(
chbTrayCheck
.
Checked
.
Equals
(
TrayManager
.
NeedCheckTray
))
{
return
;
}
TrayManager
.
NeedCheckTray
=
chbTrayCheck
.
Checked
;
LogUtil
.
info
(
"勾选:启用托盘顺序检测 NeedCheckTray ="
+
TrayManager
.
NeedCheckTray
);
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
NeedCheckTray
,
(
TrayManager
.
NeedCheckTray
?
1
:
0
));
}
}
}
source/AssemblyLineClient/记录.txt
查看文件 @
34f6e3a
...
...
@@ -272,7 +272,8 @@ PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=800
上料模块夹走料盘后,需要判断信号是否消失
20200308
增加托盘顺序检测功能NeedCheckTray的开关选项。
...
...
source/Common/Setting_Init.cs
查看文件 @
34f6e3a
...
...
@@ -88,5 +88,6 @@ namespace OnlineStore.Common
public
static
string
MaxTrayNum
=
"MaxTrayNum"
;
public
static
string
UseBuzzer
=
"UseBuzzer"
;
public
static
string
NeedCheckTray
=
"NeedCheckTray"
;
}
}
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
查看文件 @
34f6e3a
...
...
@@ -395,14 +395,16 @@ namespace OnlineStore.DeviceLibrary
/// <returns></returns>
private
bool
CheckIsNeedOutStore
()
{
if
(
currTrayNum
<=
0
)
{
return
false
;
}
bool
isFull
=
TrayManager
.
TrayIsFull
(
currTrayNum
);
bool
moveOk
=
(
IsBigStore
()
&&
MoveInfo
.
MoveStep
>=
LineMoveStep
.
MO_55_CylinderUp
)
||
MoveInfo
.
MoveStep
>=
LineMoveStep
.
MO_56_CylinderAfter
;
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
OutStore
)
&&
moveOk
&&
(!
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_60_CylinderUp
)))
{
{
if
(
isFull
.
Equals
(
false
))
{
LogInfo
(
" 出库中,拦截空托盘【 "
+
currTrayNum
+
"】~"
);
...
...
@@ -417,6 +419,10 @@ namespace OnlineStore.DeviceLibrary
/// <returns></returns>
private
bool
CheckIsNeedInStore
()
{
if
(
currTrayNum
<=
0
)
{
return
false
;
}
bool
isfull
=
TrayManager
.
TrayIsFull
(
currTrayNum
);
//LogInfo("***************入库*****验证入库编号,托盘号【" + currTrayNum + "】,isfull【" + isfull + "】");
//FixtureCodeInfo code = GetBox().currInOutFixture;
...
...
source/DeviceLibrary/assemblymanager/TrayManager.cs
查看文件 @
34f6e3a
...
...
@@ -139,9 +139,13 @@ namespace OnlineStore.DeviceLibrary
}
return
false
;
}
internal
static
bool
CheckIsRightNum
(
int
trayNum
,
int
preTrayNum
,
bool
isCanUpdateMax
=
true
)
public
static
bool
NeedCheckTray
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
NeedCheckTray
).
Equals
(
1
);
internal
static
bool
CheckIsRightNum
(
int
trayNum
,
int
preTrayNum
,
bool
isCanUpdateMax
=
true
)
{
return
true
;
if
(!
NeedCheckTray
)
{
return
true
;
}
int
defNext
=
preTrayNum
+
1
;
if
(
preTrayNum
.
Equals
(
0
)
||
MaxTrayNum
.
Equals
(
0
)
||
trayNum
.
Equals
(
defNext
))
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论