Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO664-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a20d2c42
由
LN
编写于
2020-12-11 09:21:44 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
bug修改
1 个父辈
7127ef2c
隐藏空白字符变更
内嵌
并排
正在显示
19 个修改的文件
包含
311 行增加
和
260 行删除
source/AssemblyLineClient/FrmLineStore.Designer.cs
source/AssemblyLineClient/FrmLineStore.cs
source/AssemblyLineClient/useControl/EquipControl.Designer.cs
source/DeviceLibrary/LineConfig/Config_DischargeLine_1.csv
source/DeviceLibrary/LineConfig/Config_DischargeLine_2.csv
source/DeviceLibrary/LineConfig/Config_FeedingEquip_1.csv
source/DeviceLibrary/LineConfig/Config_FeedingEquip_3.csv
source/DeviceLibrary/LineConfig/Config_FeedingEquip_4.csv
source/DeviceLibrary/LineConfig/Config_FeedingEquip_5.csv
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_09.csv
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_10.csv
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_15.csv
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_23.csv
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_24.csv
source/DeviceLibrary/assemblyLine/EquipBase.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
source/DeviceLibrary/assemblyLine/LineBean.cs
source/DeviceLibrary/assemblymanager/ALineManager.cs
source/DeviceLibrary/assemblymanager/SServerManager.cs
source/AssemblyLineClient/FrmLineStore.Designer.cs
查看文件 @
a20d2c4
...
...
@@ -32,8 +32,14 @@
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
FrmLineStore
));
this
.
tabControl1
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
tabPage1
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
chbRightDis
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
chbDisMove
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chbDisHy
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
chbLeftDis
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chbDisSL
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chbRightDis
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
lblCardMsg
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
lblPosId
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnUpdateStatus
=
new
System
.
Windows
.
Forms
.
Button
();
...
...
@@ -125,9 +131,9 @@
this
.
toolStripSeparator20
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
control_Debug
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator22
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
lblCardMsg
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabPage1
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
tabPage2
.
SuspendLayout
();
this
.
panel2
.
SuspendLayout
();
...
...
@@ -165,9 +171,7 @@
//
// tabPage1
//
this
.
tabPage1
.
Controls
.
Add
(
this
.
lblCardMsg
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
chbRightDis
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
chbLeftDis
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
logBox
);
this
.
tabPage1
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
29
);
...
...
@@ -177,27 +181,93 @@
this
.
tabPage1
.
Text
=
" 运行日志 "
;
this
.
tabPage1
.
UseVisualStyleBackColor
=
true
;
//
// groupBox2
//
this
.
groupBox2
.
Controls
.
Add
(
this
.
chbDisMove
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
lblCardMsg
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
chbDisHy
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label2
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
chbLeftDis
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
chbDisSL
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
chbRightDis
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
3
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
302
,
598
);
this
.
groupBox2
.
TabIndex
=
200
;
this
.
groupBox2
.
TabStop
=
false
;
//
// chbDisMove
//
this
.
chbDisMove
.
AutoSize
=
true
;
this
.
chbDisMove
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
205
);
this
.
chbDisMove
.
Name
=
"chbDisMove"
;
this
.
chbDisMove
.
Size
=
new
System
.
Drawing
.
Size
(
144
,
24
);
this
.
chbDisMove
.
TabIndex
=
202
;
this
.
chbDisMove
.
Text
=
"禁用所有进仓机构 "
;
this
.
chbDisMove
.
UseVisualStyleBackColor
=
true
;
this
.
chbDisMove
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbDisMove_CheckedChanged
);
//
// chbDisHy
//
this
.
chbDisHy
.
AutoSize
=
true
;
this
.
chbDisHy
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
165
);
this
.
chbDisHy
.
Name
=
"chbDisHy"
;
this
.
chbDisHy
.
Size
=
new
System
.
Drawing
.
Size
(
194
,
24
);
this
.
chbDisHy
.
TabIndex
=
201
;
this
.
chbDisHy
.
Text
=
"禁用所有横移(HY1~HY21)"
;
this
.
chbDisHy
.
UseVisualStyleBackColor
=
true
;
this
.
chbDisHy
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
checkBox1_CheckedChanged
);
//
// label2
//
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label2
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
277
);
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
224
,
17
);
this
.
label2
.
TabIndex
=
200
;
this
.
label2
.
Text
=
"此处修改不保存到配置,软件重启即恢复"
;
//
// chbLeftDis
//
this
.
chbLeftDis
.
AutoSize
=
true
;
this
.
chbLeftDis
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
29
);
this
.
chbLeftDis
.
Name
=
"chbLeftDis"
;
this
.
chbLeftDis
.
Size
=
new
System
.
Drawing
.
Size
(
277
,
24
);
this
.
chbLeftDis
.
TabIndex
=
196
;
this
.
chbLeftDis
.
Text
=
"禁用左侧出料线及横移( HY5,HY7,HY10)"
;
this
.
chbLeftDis
.
UseVisualStyleBackColor
=
true
;
this
.
chbLeftDis
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbLeftDis_CheckedChanged
);
//
// chbDisSL
//
this
.
chbDisSL
.
AutoSize
=
true
;
this
.
chbDisSL
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
125
);
this
.
chbDisSL
.
Name
=
"chbDisSL"
;
this
.
chbDisSL
.
Size
=
new
System
.
Drawing
.
Size
(
192
,
24
);
this
.
chbDisSL
.
TabIndex
=
199
;
this
.
chbDisSL
.
Text
=
"禁用所有上料机构(T1~T5)"
;
this
.
chbDisSL
.
UseVisualStyleBackColor
=
true
;
this
.
chbDisSL
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbDisSL_CheckedChanged
);
//
// chbRightDis
//
this
.
chbRightDis
.
AutoSize
=
true
;
this
.
chbRightDis
.
Location
=
new
System
.
Drawing
.
Point
(
158
,
14
);
this
.
chbRightDis
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
69
);
this
.
chbRightDis
.
Name
=
"chbRightDis"
;
this
.
chbRightDis
.
Size
=
new
System
.
Drawing
.
Size
(
126
,
24
);
this
.
chbRightDis
.
Size
=
new
System
.
Drawing
.
Size
(
293
,
24
);
this
.
chbRightDis
.
TabIndex
=
197
;
this
.
chbRightDis
.
Text
=
"禁用右侧出料线"
;
this
.
chbRightDis
.
Text
=
"禁用右侧出料线
及横移( HY12,HY14,HY17)
"
;
this
.
chbRightDis
.
UseVisualStyleBackColor
=
true
;
this
.
chbRightDis
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbRightDis_CheckedChanged
);
//
//
chbLeftDis
//
lblCardMsg
//
this
.
chbLeftDis
.
AutoSize
=
true
;
this
.
chbLeftDis
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
14
);
this
.
chbLeftDis
.
Name
=
"chbLeftDis"
;
this
.
chbLeftDis
.
Size
=
new
System
.
Drawing
.
Size
(
126
,
24
);
this
.
chbLeftDis
.
TabIndex
=
196
;
this
.
chbLeftDis
.
Text
=
"禁用左侧出料线"
;
this
.
chbLeftDis
.
UseVisualStyleBackColor
=
true
;
this
.
chbLeftDis
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbLeftDis_CheckedChanged
);
this
.
lblCardMsg
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
333
);
this
.
lblCardMsg
.
Name
=
"lblCardMsg"
;
this
.
lblCardMsg
.
Size
=
new
System
.
Drawing
.
Size
(
279
,
245
);
this
.
lblCardMsg
.
TabIndex
=
198
;
//
// groupBox1
//
...
...
@@ -210,9 +280,9 @@
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnInStoreTset
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
button2
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
button1
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
59
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
294
,
82
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
1078
,
69
);
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
939
,
69
);
this
.
groupBox1
.
TabIndex
=
195
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"料仓通信测试"
;
...
...
@@ -232,7 +302,7 @@
this
.
btnUpdateStatus
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
btnUpdateStatus
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btnUpdateStatus
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnUpdateStatus
.
Location
=
new
System
.
Drawing
.
Point
(
830
,
21
);
this
.
btnUpdateStatus
.
Location
=
new
System
.
Drawing
.
Point
(
637
,
21
);
this
.
btnUpdateStatus
.
Name
=
"btnUpdateStatus"
;
this
.
btnUpdateStatus
.
Size
=
new
System
.
Drawing
.
Size
(
222
,
35
);
this
.
btnUpdateStatus
.
TabIndex
=
195
;
...
...
@@ -297,9 +367,9 @@
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
logBox
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
logBox
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
5
3
);
this
.
logBox
.
Location
=
new
System
.
Drawing
.
Point
(
3
18
,
3
);
this
.
logBox
.
Name
=
"logBox"
;
this
.
logBox
.
Size
=
new
System
.
Drawing
.
Size
(
1
317
,
54
8
);
this
.
logBox
.
Size
=
new
System
.
Drawing
.
Size
(
1
002
,
59
8
);
this
.
logBox
.
TabIndex
=
106
;
this
.
logBox
.
Text
=
""
;
this
.
logBox
.
VisibleChanged
+=
new
System
.
EventHandler
(
this
.
logBox_VisibleChanged
);
...
...
@@ -1009,14 +1079,6 @@
this
.
toolStripSeparator22
.
Name
=
"toolStripSeparator22"
;
this
.
toolStripSeparator22
.
Size
=
new
System
.
Drawing
.
Size
(
159
,
6
);
//
// lblCardMsg
//
this
.
lblCardMsg
.
AutoSize
=
true
;
this
.
lblCardMsg
.
Location
=
new
System
.
Drawing
.
Point
(
364
,
18
);
this
.
lblCardMsg
.
Name
=
"lblCardMsg"
;
this
.
lblCardMsg
.
Size
=
new
System
.
Drawing
.
Size
(
0
,
20
);
this
.
lblCardMsg
.
TabIndex
=
198
;
//
// FrmLineStore
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
...
...
@@ -1032,7 +1094,6 @@
this
.
MainMenuStrip
=
this
.
menuStrip1
;
this
.
Name
=
"FrmLineStore"
;
this
.
Opacity
=
0.1D
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
this
.
Text
=
"流水线系统"
;
this
.
WindowState
=
System
.
Windows
.
Forms
.
FormWindowState
.
Maximized
;
this
.
FormClosing
+=
new
System
.
Windows
.
Forms
.
FormClosingEventHandler
(
this
.
FrmMain_FormClosing
);
...
...
@@ -1040,7 +1101,8 @@
this
.
Load
+=
new
System
.
EventHandler
(
this
.
FrmMain_Load
);
this
.
tabControl1
.
ResumeLayout
(
false
);
this
.
tabPage1
.
ResumeLayout
(
false
);
this
.
tabPage1
.
PerformLayout
();
this
.
groupBox2
.
ResumeLayout
(
false
);
this
.
groupBox2
.
PerformLayout
();
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
groupBox1
.
PerformLayout
();
this
.
tabPage2
.
ResumeLayout
(
false
);
...
...
@@ -1162,6 +1224,11 @@
private
System
.
Windows
.
Forms
.
CheckBox
chbLeftDis
;
private
System
.
Windows
.
Forms
.
CheckBox
chbRightDis
;
private
System
.
Windows
.
Forms
.
Label
lblCardMsg
;
private
System
.
Windows
.
Forms
.
CheckBox
chbDisSL
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox2
;
private
System
.
Windows
.
Forms
.
Label
label2
;
private
System
.
Windows
.
Forms
.
CheckBox
chbDisMove
;
private
System
.
Windows
.
Forms
.
CheckBox
chbDisHy
;
}
}
source/AssemblyLineClient/FrmLineStore.cs
查看文件 @
a20d2c4
...
...
@@ -984,6 +984,7 @@ namespace OnlineStore.AssemblyLine
MessageBox
.
Show
(
"["
+
seleEquip
.
Name
+
"]启动调试失败:"
+
seleEquip
.
WarnMsg
,
"错误"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Error
);
}
}
selControl
.
BackColor
=
seleEquip
.
GetShowColor
();
}
}
...
...
@@ -995,6 +996,7 @@ namespace OnlineStore.AssemblyLine
{
LogUtil
.
info
(
Name
+
"点击:停止运行["
+
seleEquip
.
Name
+
"]"
);
seleEquip
.
Reset
();
selControl
.
BackColor
=
seleEquip
.
GetShowColor
();
}
}
}
...
...
@@ -1029,6 +1031,7 @@ namespace OnlineStore.AssemblyLine
seleEquip
.
ChangeDebug
(
false
);
LogUtil
.
info
(
seleEquip
.
Name
+
"用户切换【"
+
seleEquip
.
Name
+
"】到正常工作状态 "
);
control_Stop
.
Text
=
"✔ 已启用"
;
selControl
.
BackColor
=
seleEquip
.
GetShowColor
();
}
}
else
...
...
@@ -1056,6 +1059,7 @@ namespace OnlineStore.AssemblyLine
seleEquip
.
ChangeDebug
(
true
);
LogUtil
.
info
(
seleEquip
.
Name
+
"用户切换【"
+
seleEquip
.
Name
+
"】到调试状态 "
);
control_Stop
.
Text
=
"✘ 未启用"
;
selControl
.
BackColor
=
seleEquip
.
GetShowColor
();
}
}
}
...
...
@@ -1100,7 +1104,20 @@ namespace OnlineStore.AssemblyLine
return
;
}
LineManager
.
DisLeftOutLine
=
chbLeftDis
.
Checked
;
LogUtil
.
error
(
"界面点击勾选:"
+
chbLeftDis
.
Text
+
"="
+
LineManager
.
DisLeftOutLine
);
if
(
LineManager
.
DisLeftOutLine
)
{
List
<
int
>
leftHYs
=
new
List
<
int
>()
{
205
,
207
,
210
};
foreach
(
int
id
in
leftHYs
)
{
LineManager
.
Line
.
HYEquipMap
[
id
].
IsDebug
=
true
;
}
LogUtil
.
info
(
"界面点击勾选:"
+
chbLeftDis
.
Text
+
"="
+
LineManager
.
DisLeftOutLine
+
",设置 HY5,HY7,HY10 为调试状态"
);
}
else
{
LogUtil
.
info
(
"界面点击勾选:"
+
chbLeftDis
.
Text
+
"="
+
LineManager
.
DisLeftOutLine
);
}
}
private
void
chbRightDis_CheckedChanged
(
object
sender
,
EventArgs
e
)
...
...
@@ -1113,8 +1130,96 @@ namespace OnlineStore.AssemblyLine
{
return
;
}
LineManager
.
DisRightOutLine
=
chbRightDis
.
Checked
;
LogUtil
.
error
(
"界面点击勾选:"
+
chbRightDis
.
Text
+
"="
+
LineManager
.
DisRightOutLine
);
LineManager
.
DisRightOutLine
=
chbRightDis
.
Checked
;
if
(
LineManager
.
DisRightOutLine
)
{
List
<
int
>
rightHYs
=
new
List
<
int
>()
{
212
,
214
,
217
};
foreach
(
int
id
in
rightHYs
)
{
LineManager
.
Line
.
HYEquipMap
[
id
].
IsDebug
=
true
;
}
LogUtil
.
info
(
"界面点击勾选:"
+
chbRightDis
.
Text
+
"="
+
LineManager
.
DisRightOutLine
+
",设置 HY12,HY14,HY17 为调试状态"
);
}
else
{
LogUtil
.
info
(
"界面点击勾选:"
+
chbRightDis
.
Text
+
"="
+
LineManager
.
DisRightOutLine
);
}
}
private
void
chbDisSL_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
if
(!
LoadOk
)
{
return
;
}
if
(
LineManager
.
DisSLEquip
.
Equals
(
chbDisSL
.
Checked
))
{
return
;
}
LineManager
.
DisSLEquip
=
chbDisSL
.
Checked
;
if
(
LineManager
.
DisSLEquip
)
{
List
<
int
>
rightHYs
=
new
List
<
int
>()
{
101
,
102
,
103
,
104
,
105
};
foreach
(
int
id
in
rightHYs
)
{
LineManager
.
Line
.
FeedingEquipMap
[
id
].
IsDebug
=
true
;
}
LogUtil
.
info
(
"界面点击勾选:"
+
chbDisSL
.
Text
+
"="
+
LineManager
.
DisSLEquip
+
",设置所有上料模块(T1~T5)为调试状态"
);
}
else
{
LogUtil
.
info
(
"界面点击勾选:"
+
chbDisSL
.
Text
+
"="
+
LineManager
.
DisSLEquip
);
}
}
private
void
checkBox1_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
if
(!
LoadOk
)
{
return
;
}
if
(
LineManager
.
DisAllHy
.
Equals
(
chbDisHy
.
Checked
))
{
return
;
}
LineManager
.
DisAllHy
=
chbDisHy
.
Checked
;
if
(
LineManager
.
DisAllHy
)
{
foreach
(
int
id
in
LineManager
.
Line
.
HYEquipMap
.
Keys
)
{
LineManager
.
Line
.
HYEquipMap
[
id
].
IsDebug
=
true
;
}
LogUtil
.
info
(
"界面点击勾选:"
+
chbDisHy
.
Text
+
"="
+
LineManager
.
DisAllHy
+
",设置所有HY为调试状态"
);
}
else
{
LogUtil
.
info
(
"界面点击勾选:"
+
chbDisHy
.
Text
+
"="
+
LineManager
.
DisAllHy
);
}
}
private
void
chbDisMove_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
if
(!
LoadOk
)
{
return
;
}
if
(
LineManager
.
DisAllMove
.
Equals
(
chbDisMove
.
Checked
))
{
return
;
}
LineManager
.
DisAllMove
=
chbDisMove
.
Checked
;
if
(
LineManager
.
DisAllMove
)
{
foreach
(
int
id
in
LineManager
.
Line
.
MoveEquipMap
.
Keys
)
{
LineManager
.
Line
.
MoveEquipMap
[
id
].
IsDebug
=
true
;
}
LogUtil
.
info
(
"界面点击勾选:"
+
chbDisMove
.
Text
+
"="
+
LineManager
.
DisAllMove
+
",设置所有进仓为调试状态"
);
}
else
{
LogUtil
.
info
(
"界面点击勾选:"
+
chbDisMove
.
Text
+
"="
+
LineManager
.
DisAllMove
);
}
}
}
}
source/AssemblyLineClient/useControl/EquipControl.Designer.cs
查看文件 @
a20d2c4
...
...
@@ -155,7 +155,7 @@
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Dpi
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
LightGreen
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
FixedSingle
;
this
.
Controls
.
Add
(
this
.
panName
);
this
.
Controls
.
Add
(
this
.
lblBox
);
...
...
source/DeviceLibrary/LineConfig/Config_DischargeLine_1.csv
deleted
100644 → 0
查看文件 @
7127ef2
类型,分类编号,说明,名称,属性值,设备名称,电器定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,扫码的相机名称(多个用#分隔),CameraNameList,GigE:MV-CE200-10GC (00D76546944),,
,,,,,,
DI,0,出料皮带线体1急停,DLine_SuddenStop,0,PRO_AOI_IP_2,X021
DI,0,出料皮带线体1复位,DLine_Reset,1,PRO_AOI_IP_2,X022
DI,0,皮带线1入口定位检测,EntryLocation_Check1,2,PRO_AOI_IP_2,X023
DI,0,皮带线1出口定位检测,ExitLocation_Check1,3,PRO_AOI_IP_2,X024
DI,0,皮带线1出口料盘检测,ExitTray_Check1,4,PRO_AOI_IP_2,X025
DI,0,皮带线2入口定位检测,EntryLocation_Check2,5,PRO_AOI_IP_2,X026
DI,0,皮带线2出口定位检测,ExitLocation_Check2,6,PRO_AOI_IP_2,X027
DI,0,皮带线2出口料盘检测,ExitTray_Check2,7,PRO_AOI_IP_2,X028
DI,0,皮带线3定位检测,Location_Check3,8,PRO_AOI_IP_2,X029
DI,0,皮带线3入口料盘检测,EntryTray_Check3,9,PRO_AOI_IP_2,X030
DI,0,皮带线3中间位置料盘检测,MiddleTray_Check3,10,PRO_AOI_IP_2,X031
DI,0,皮带线3出口料盘检测,ExitTray_Check3,11,PRO_AOI_IP_2,X032
DI,0,分盘装置1定位气缸上升端,SeparateDevice_Up,12,PRO_AOI_IP_2,X033
DI,0,分盘装置1定位气缸下降端,SeparateDevice_Down,13,PRO_AOI_IP_2,X034
DI,0,分盘装置1料盘检测,SeparateDevice_Check,14,PRO_AOI_IP_2,X035
DI,0,扫码NG料气缸1后退端,ScanNGCylinder_Back,15,PRO_AOI_IP_2,X036
,,,,,,
DO,0,出料皮带线体1运行状态,DLine_RunStatus,0,PRO_AOI_IP_2,Y021
DO,0,出料皮带线体1故障状态,DLine_RunAlarm,1,PRO_AOI_IP_2,Y022
DO,0,出料皮带线1运转,DLine_Run1,2,PRO_AOI_IP_2,Y023
DO,0,出料皮带线2运转,DLine_Run2,3,PRO_AOI_IP_2,Y024
DO,0,出料皮带线3运转,DLine_Run3,4,PRO_AOI_IP_2,Y025
DO,0,分盘装置电机1驱动,SeparateDevice_Run,5,PRO_AOI_IP_2,Y026
DO,0,分盘装置1定位气缸上升SOL,SeparateDevice_Up,6,PRO_AOI_IP_2,Y027
DO,0,分盘装置1定位气缸下降SOL,SeparateDevice_Down,7,PRO_AOI_IP_2,Y028
DO,0,扫码NG料气缸1前进SOL,ScanNGCylinder_Forward,8,PRO_AOI_IP_2,Y029
DO,0,扫码NG料气缸1后退SOL,ScanNGCylinder_Back,9,PRO_AOI_IP_2,Y030
DO,0,分盘装置电机1驱动反转,SeparateDevice_BackRun,10,PRO_AOI_IP_2,Y031
DO,0,皮带线1滚刷电机运行,DLine_Brush1,11,PRO_AOI_IP_2,Y032
DO,0,皮带线2滚刷电机运行,DLine_Brush2,12,PRO_AOI_IP_2,Y033
,0,,,13,PRO_AOI_IP_2,Y034
,0,,,14,PRO_AOI_IP_2,Y035
,0,,,15,PRO_AOI_IP_2,Y036
source/DeviceLibrary/LineConfig/Config_DischargeLine_2.csv
deleted
100644 → 0
查看文件 @
7127ef2
类型,分类编号,说明,名称,属性值,设备名称,电器定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,扫码的相机名称(多个用#分隔),CameraNameList,GigE:MV-CE200-10GC (00D76546876),,
,,,,,,
DI,0,出料皮带线体2急停,DLine_SuddenStop,0,PRO_AOI_IP_3,X041
DI,0,出料皮带线体2复位,DLine_Reset,1,PRO_AOI_IP_3,X042
DI,0,皮带线4入口定位检测,EntryLocation_Check1,2,PRO_AOI_IP_3,X043
DI,0,皮带线4出口定位检测,ExitLocation_Check1,3,PRO_AOI_IP_3,X044
DI,0,皮带线4出口料盘检测,ExitTray_Check1,4,PRO_AOI_IP_3,X045
DI,0,皮带线5入口定位检测,EntryLocation_Check2,5,PRO_AOI_IP_3,X046
DI,0,皮带线5出口定位检测,ExitLocation_Check2,6,PRO_AOI_IP_3,X047
DI,0,皮带线5出口料盘检测,ExitTray_Check2,7,PRO_AOI_IP_3,X048
DI,0,皮带线6定位检测,Location_Check3,8,PRO_AOI_IP_3,X049
DI,0,皮带线6入口料盘检测,EntryTray_Check3,9,PRO_AOI_IP_3,X050
DI,0,皮带线6中间位置料盘检测,MiddleTray_Check3,10,PRO_AOI_IP_3,X051
DI,0,皮带线6出口料盘检测,ExitTray_Check3,11,PRO_AOI_IP_3,X052
DI,0,分盘装置2定位气缸上升端,SeparateDevice_Up,12,PRO_AOI_IP_3,X053
DI,0,分盘装置2定位气缸下降端,SeparateDevice_Down,13,PRO_AOI_IP_3,X054
DI,0,分盘装置2料盘检测,SeparateDevice_Check,14,PRO_AOI_IP_3,X055
DI,0,扫码NG料气缸2后退端,ScanNGCylinder_Back,15,PRO_AOI_IP_3,X056
,,,,,,
DO,0,出料皮带线体2运行状态,DLine_RunStatus,0,PRO_AOI_IP_3,Y041
DO,0,出料皮带线体2故障状态,DLine_RunAlarm,1,PRO_AOI_IP_3,Y042
DO,0,出料皮带线4运转,DLine_Run1,2,PRO_AOI_IP_3,Y043
DO,0,出料皮带线5运转,DLine_Run2,3,PRO_AOI_IP_3,Y044
DO,0,出料皮带线6运转,DLine_Run3,4,PRO_AOI_IP_3,Y045
DO,0,分盘装置电机2驱动,SeparateDevice_Run,5,PRO_AOI_IP_3,Y046
DO,0,分盘装置2定位气缸上升SOL,SeparateDevice_Up,6,PRO_AOI_IP_3,Y047
DO,0,分盘装置2定位气缸下降SOL,SeparateDevice_Down,7,PRO_AOI_IP_3,Y048
DO,0,扫码NG料气缸2前进SOL,ScanNGCylinder_Forward,8,PRO_AOI_IP_3,Y049
DO,0,扫码NG料气缸2后退SOL,ScanNGCylinder_Back,9,PRO_AOI_IP_3,Y050
,0,,,10,PRO_AOI_IP_3,Y051
DO,0,皮带线3滚刷电机运行,DLine_Brush1,11,PRO_AOI_IP_3,Y052
DO,0,皮带线4滚刷电机运行,DLine_Brush2,12,PRO_AOI_IP_3,Y053
,0,,,13,PRO_AOI_IP_3,Y054
,0,,,14,PRO_AOI_IP_3,Y055
,0,,,15,PRO_AOI_IP_3,Y056
,,,,,,
DI,0,NG料盘推出气缸前进端,NGCylinder_Before,4,PRO_AOI_IP_1,X005
DI,0,NG料盘推出气缸后退端,NGCylinder_After,5,PRO_AOI_IP_1,X006
,,,,,,
DO,0,NG料盘推出气缸前进SOL,NGCylinder_Before,9,PRO_AOI_IP_1,Y010
DO,0,NG料盘推出气缸后退SOL,NGCylinder_After,10,PRO_AOI_IP_1,Y011
source/DeviceLibrary/LineConfig/Config_FeedingEquip_1.csv
查看文件 @
a20d2c4
...
...
@@ -14,7 +14,7 @@ PRO,0,提升上料缓慢上升目标位置P3,BatchAxisP3,53600,,
PRO,0,提升上料轴P1速度,BatchAxis_P1Speed,4000,,
PRO,0,提升上料轴P2速度,BatchAxis_P2Speed,4000,,
PRO,0,提升上料轴P3速度,BatchAxis_P3Speed,500,,
PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,1
10
00,,
PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,100,,
,,,,,,
AXIS,0,轴二移栽上下轴,UpDown_Axis,12,HC,,3000,10000,10000,500,4000,15000,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,10,,
...
...
source/DeviceLibrary/LineConfig/Config_FeedingEquip_3.csv
查看文件 @
a20d2c4
...
...
@@ -24,4 +24,4 @@ PRO,0,移栽上下轴P1速度,UpdownAxis_P1Speed,1500,,
PRO,0,移栽上下轴P2速度,UpdownAxis_P2Speed,1500,,
PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,1200,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=8000;,,
,,,,,,
\ No newline at end of file
,,,,,,
source/DeviceLibrary/LineConfig/Config_FeedingEquip_4.csv
查看文件 @
a20d2c4
...
...
@@ -24,4 +24,4 @@ PRO,0,移栽上下轴P1速度,UpdownAxis_P1Speed,1500,,
PRO,0,移栽上下轴P2速度,UpdownAxis_P2Speed,1500,,
PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,1200,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=8000;,,
,,,,,,
\ No newline at end of file
,,,,,,
source/DeviceLibrary/LineConfig/Config_FeedingEquip_5.csv
查看文件 @
a20d2c4
...
...
@@ -25,4 +25,4 @@ PRO,0,移栽上下轴P2速度,UpdownAxis_P2Speed,1500,,
PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,1200,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=8000;,,
,,,,,,
,,,,,,
\ No newline at end of file
,,,,,,
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_09.csv
查看文件 @
a20d2c4
...
...
@@ -5,9 +5,9 @@ PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,
,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,7,HC,,3000,4000,4000,1000,5000,20000,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,100,,
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=80000;12=9
718;16=9519;24=110000;32=98000;44=76000;48=73700;56=61000;8=8638
,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=90000;12=9
944;16=9803;24=138200;32=116800;44=92500;48=90000;56=95000;8=8252
,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,7X8=
8638;7X16=9519;7X12=9718
,,
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=80000;12=9
162;16=8943;24=110000;32=98000;44=76000;48=73700;56=61000;8=9856
,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=90000;12=9
325;16=9175;24=138200;32=116800;44=92500;48=90000;56=95000;8=10110
,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,7X8=
9856;7X16=8943;7X12=9162
,,
PRO,0,移栽上下轴P1速度,UpdownAxis_P1Speed,400,,
PRO,0,移栽上下轴P2速度,UpdownAxis_P2Speed,300,,
PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,300,,
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_10.csv
查看文件 @
a20d2c4
...
...
@@ -5,9 +5,9 @@ PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,
,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,8,HC,,3000,4000,4000,1000,5000,20000,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,100,,
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=80000;12=
9778;16=9502;24=110000;32=98000;44=76000;48=73700;56=61000;8=1040
8,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=90000;12=
10113;16=9792;24=138200;32=116800;44=92500;48=90000;56=95000;8=10800
,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,7X8=
10408;7X12=9778;7X16=9502
,,
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=80000;12=
8883;16=8848;24=110000;32=98000;44=76000;48=73700;56=61000;8=993
8,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=90000;12=
9513;16=9150;24=138200;32=116800;44=92500;48=90000;56=95000;8=10153
,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,7X8=
9938;7X12=8883;7X16=8848
,,
PRO,0,移栽上下轴P1速度,UpdownAxis_P1Speed,400,,
PRO,0,移栽上下轴P2速度,UpdownAxis_P2Speed,300,,
PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,300,,
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_15.csv
查看文件 @
a20d2c4
...
...
@@ -5,9 +5,9 @@ PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,
,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,18,HC,,3000,4000,4000,1000,5000,20000,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,100,,
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=80000;12=
141200;16=8029;24=110000;32=5427;44=4435;48=73700;56=3201
;8=150000,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=90000;12=1
57500;16=7916;24=138200;32=6124;44=5345;48=90000;56=4191
;8=160000,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,15X56=3
201;15X44=4517
,,
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=80000;12=
9078;16=8104;24=7426;32=6564;44=5480;48=73700;56=3630
;8=150000,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=90000;12=1
0281;16=9431;24=8746;32=7967;44=6836;48=90000;56=5259
;8=160000,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,15X56=3
630;15X44=4992;15X32=5797;13X44=5480;13X32=6564;13X24=7426;13X16=8104;13X12=8244;11X12=9078
,,
PRO,0,移栽上下轴P1速度,UpdownAxis_P1Speed,400,,
PRO,0,移栽上下轴P2速度,UpdownAxis_P2Speed,300,,
PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,300,,
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_23.csv
查看文件 @
a20d2c4
...
...
@@ -5,9 +5,9 @@ PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,
,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,2,HC,,3000,4000,4000,1000,5000,20000,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,100,,
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=80000;12=
141200;16=392;24=110000;32=107;44=4578;48=73700;56=3239
;8=150000,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=90000;12=1
57500;16=570;24=138200;32=408;44=6806;48=90000;56=5839
;8=160000,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,13X16=
392;15X32=107;15X44=4578;15X56=3239
,,
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=80000;12=
8652;16=7327;24=6642;32=5383;44=4736;48=73700;56=2931
;8=150000,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=90000;12=1
0635;16=9672;24=8644;32=8215;44=6839;48=90000;56=5374
;8=160000,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,13X16=
7327;15X32=5184;15X44=4124;15X56=2931;13X44=4736;13X32=5517;13X24=6642;13X12=7281;11X12=8652
,,
PRO,0,移栽上下轴P1速度,UpdownAxis_P1Speed,400,,
PRO,0,移栽上下轴P2速度,UpdownAxis_P2Speed,300,,
PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,300,,
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_24.csv
查看文件 @
a20d2c4
...
...
@@ -4,10 +4,10 @@ PRO,0,是否存放的大料盘,IsBigTray,1
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,
,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,1,HC,,3000,4000,4000,1000,5000,20000,10,100,0,0
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,
-5
00,,
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=927;12=
141200;16=605;24=110000;32=313;44=119;48=73700;56=61000
;8=150000,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=1193;12=1
57500;16=774;24=138200;32=590;44=434;48=90000;56=95000
;8=160000,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,7X8=927;13X8=927;13X12=
605;13X16=605;15X32=313;15X44=119
,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,
1
00,,
PRO,0,移栽上下轴流水线上方位置P2,UpDownP2List,0=927;12=
8494;16=7941;24=7941;32=6347;44=5347;48=73700;56=3342
;8=150000,,
PRO,0,移栽上下轴料仓门口位置P3,UpDownP3List,0=1193;12=1
0732;16=10382;24=10488;32=8650;44=7402;48=90000;56=5679
;8=160000,,
PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,7X8=927;13X8=927;13X12=
8494;13X16=7941;15X32=5509;15X44=4483;11X12=8850;15X56=3342;13X44=5342;13X32=6046;13X24=6998
,,
PRO,0,移栽上下轴P1速度,UpdownAxis_P1Speed,400,,
PRO,0,移栽上下轴P2速度,UpdownAxis_P2Speed,300,,
PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,300,,
source/DeviceLibrary/assemblyLine/EquipBase.cs
查看文件 @
a20d2c4
...
...
@@ -224,6 +224,19 @@ namespace OnlineStore.DeviceLibrary
LogInfo
(
"从调试状态切换到正常状态!"
);
}
}
else
{
if
(
isDebug
)
{
IsDebug
=
true
;
LogInfo
(
"从正常状态切换到调试状态!"
);
}
else
{
IsDebug
=
false
;
LogInfo
(
"从调试状态切换到正常状态!"
);
}
}
}
...
...
@@ -618,7 +631,14 @@ namespace OnlineStore.DeviceLibrary
{
if
(
runStatus
.
Equals
(
LineRunStatus
.
Wait
))
{
return
Color
.
White
;
if
(
IsDebug
)
{
return
Color
.
LightGray
;
}
else
{
return
Color
.
White
;
}
}
else
if
(
alarmType
.
Equals
(
LineAlarmType
.
IoSingleTimeOut
))
{
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
查看文件 @
a20d2c4
...
...
@@ -371,9 +371,7 @@ namespace OnlineStore.DeviceLibrary
//如果再出库中直接出库
MoveInfo
.
EndMove
();
runStatus
=
LineRunStatus
.
Runing
;
// MoveInfo.NextMoveStep(LineMoveStep.FO_39_OutLineRun);
OutLog
(
"准备出库料架完成"
);
// FO_11_AxisDownMove();
OutLog
(
"准备出库料架完成"
);
}
else
{
...
...
source/DeviceLibrary/assemblyLine/LineBean.cs
查看文件 @
a20d2c4
...
...
@@ -157,7 +157,7 @@ namespace OnlineStore.DeviceLibrary
{
return
"启动失败:设备未初始化完成"
;
}
if
(
HCBoardManager
.
CardInitOk
())
if
(
!
HCBoardManager
.
CardInitOk
())
{
return
"启动失败:板卡未初始化完成"
;
}
...
...
source/DeviceLibrary/assemblymanager/ALineManager.cs
查看文件 @
a20d2c4
...
...
@@ -17,6 +17,9 @@ namespace OnlineStore.DeviceLibrary
public
static
bool
DisLeftOutLine
=
false
;
public
static
bool
DisRightOutLine
=
false
;
public
static
bool
DisSLEquip
=
false
;
public
static
bool
DisAllHy
=
false
;
public
static
bool
DisAllMove
=
false
;
public
static
bool
UseBuzzer
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
UseBuzzer
).
Equals
(
1
);
private
static
bool
isInit
=
false
;
...
...
source/DeviceLibrary/assemblymanager/SServerManager.cs
查看文件 @
a20d2c4
...
...
@@ -23,21 +23,21 @@ namespace OnlineStore.DeviceLibrary
/// 地址: /rest/api/qisda/device/updateLocInfo
/// </summary>
private
static
string
Addr_updateLocInfo
=
"/rest/api/qisda/device/updateLocInfo"
;
/// <summary>
/// 3 放入料架(A,B,C,D)后调用,根据返回值决定当前料架是否放满,以及后续是否还有任务
// 地址: /rest/api/qisda/device/putShelfFinished
/// </summary>
private
static
string
Addr_putShelfFinished
=
"/rest/api/qisda/device/putShelfFinished"
;
///// <summary>
///// 3 放入料架(A,B,C,D)后调用,根据返回值决定当前料架是否放满,以及后续是否还有任务
//// 地址: /rest/api/qisda/device/putShelfFinished
///// </summary>
//private static string Addr_putShelfFinished = "/rest/api/qisda/device/putShelfFinished";
private
static
string
serverAddr
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
private
static
string
GetAddr
(
string
addr
,
Dictionary
<
string
,
string
>
paramsMap
)
{
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
if
(
server
.
EndsWith
(
"/"
))
if
(
server
Addr
.
EndsWith
(
"/"
))
{
server
=
server
.
Substring
(
0
,
serve
r
.
Length
-
1
);
server
Addr
=
serverAddr
.
Substring
(
0
,
serverAdd
r
.
Length
-
1
);
}
string
path
=
server
+
addr
.
Trim
()
+
"?"
;
string
path
=
server
Addr
+
addr
.
Trim
()
+
"?"
;
foreach
(
string
paramName
in
paramsMap
.
Keys
)
{
string
par
=
System
.
Web
.
HttpUtility
.
UrlEncode
(
paramsMap
[
paramName
],
System
.
Text
.
Encoding
.
UTF8
);
...
...
@@ -48,114 +48,7 @@ namespace OnlineStore.DeviceLibrary
}
//## 100 循环获取库位。服务器超时:循环获取库位
private
static
string
spiltStr
=
"##"
;
public
static
string
CodeReceived
(
string
deviceName
,
int
trayNum
,
List
<
string
>
codeList
,
int
height
,
int
width
,
string
rfid
,
int
feedEquipId
)
{
string
msg
=
""
;
try
{
string
codeStr
=
""
;
List
<
string
>
list
=
new
List
<
string
>();
foreach
(
string
str
in
codeList
)
{
if
(
list
.
Contains
(
str
.
Trim
())
||
String
.
IsNullOrEmpty
(
str
.
Trim
()))
{
continue
;
}
list
.
Add
(
str
.
Trim
());
string
code
=
"="
+
width
+
"x"
+
height
+
"="
+
str
.
Trim
();
codeStr
=
codeStr
+
code
+
spiltStr
;
}
codeStr
=
CodeManager
.
ReplaceCode
(
codeStr
);
//http://localhost/myproject/service/store/emptyPosForPutin
// 参数:cids: 多个 cid
//code: 条码内容
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"cids"
,
LineServer
.
GetAllCID
(
feedEquipId
));
paramMap
.
Add
(
"code"
,
codeStr
);
paramMap
.
Add
(
"trayRfid"
,
trayNum
.
ToString
());
paramMap
.
Add
(
ParamDefine
.
rfid
,
rfid
);
string
server
=
GetAddr
(
Addr_PosForPutin
,
paramMap
);
//string server = GetAddr(Addr_PosForPutin) + "?cids=" + LineServer.GetAllCID() + "&code=%3D" + codeStr;
DateTime
startTime
=
DateTime
.
Now
;
LogUtil
.
info
(
deviceName
+
"托盘【"
+
trayNum
+
"】 条码【 "
+
codeStr
+
"】料串【"
+
rfid
+
"】,获取入库库位:"
);
string
resultStr
=
HttpHelper
.
Post
(
server
,
""
,
10000
);
LogUtil
.
info
(
deviceName
+
"CodeReceived "
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
" 【"
+
server
+
"】【"
+
resultStr
+
"】"
);
//{"result":"0","msg":"","pos":"11#AC1_18_4_28","barcode":"R506072019102200414","cid":"line-ac-11"}
LineOperation
serverResult
=
JsonHelper
.
DeserializeJsonToObject
<
LineOperation
>(
resultStr
);
if
(
serverResult
==
null
)
{
msg
=
deviceName
+
" 【"
+
codeStr
+
"】结果:没有收到服务器反馈,调用 cancelPutInTask "
;
cancelPutInTask
(
deviceName
,
codeStr
);
return
msg
;
}
else
if
((!
string
.
IsNullOrEmpty
(
serverResult
.
msg
))
||
serverResult
.
result
.
Equals
(
0
).
Equals
(
false
))
{
return
msg
=
deviceName
+
" 【"
+
codeStr
+
"】结果:"
+
serverResult
.
msg
;
}
if
(!
serverResult
.
pos
.
Equals
(
""
))
{
// 仓位命名: 4D01020304
//第1和第2位表示楼层(4D)
//第3和第4位表示料仓(01) 01 - 18为流水线料仓, 19 - 24为包装料仓
//第5和第6位表示列(02)
//第7和第8位表示行(03)
//第9和第10位表示隔板位置(04)
//例如: 4D12010124 表示4楼12号料仓第1列第1行架子上的第24个隔板位置
//4D19050208 表示4楼19号料仓(包装料仓)第5列第2行架子上的第8个隔板位置
string
posId
=
serverResult
.
pos
;
int
plateW
=
width
;
int
plateH
=
height
;
int
storeId
=
InOutParam
.
GetPosStoreId
(
posId
);
string
wareNum
=
serverResult
.
barcode
;
//根据库位号查找移栽
MoveEquip
moveEquip
=
LineManager
.
Line
.
MoveEquipMap
[
storeId
];
// 判断PosID是否已经在入库或者在排队列表中,如果已经存在,加入列表失败
InOutParam
param
=
new
InOutParam
(
trayNum
,
wareNum
,
posId
,
plateH
,
plateW
);
param
.
rfid
=
rfid
;
if
(
LineManager
.
Line
.
IsReviceInPosId
(
moveEquip
,
posId
))
{
//LineManager.Line.SetWarnMsg("入库库位重复: " + param.ToStr() + " ,入库失败!");
//moveEquip.SetWarnMsg("入库库位重复: " + param.ToStr() + "");
return
msg
=
deviceName
+
(
"收到服务器入库命令 "
+
"入库库位重复: "
+
param
.
ToStr
()
+
" ,入库失败!"
);
}
LogUtil
.
info
(
deviceName
+
"收到入库命令: "
+
param
.
ToStr
()
+
" ,更新盘空满信息,托盘号【"
+
trayNum
+
"】,有料,"
+
ReelType
.
InStore
+
""
);
TrayManager
.
UpdateTrayInfo
(
trayNum
,
true
,
ReelType
.
InStore
,
new
InOutParam
(
trayNum
,
wareNum
,
posId
,
plateH
,
plateW
,
false
));
//TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器;
if
(
LineServer
.
BoxCanInStore
(
moveEquip
.
DeviceID
))
{
LineServer
.
CheckInStorePos
(
storeId
,
param
);
}
else
{
//等待3秒后重发验证
Task
.
Factory
.
StartNew
(
delegate
{
LogUtil
.
error
(
moveEquip
.
Name
+
" 入库命令: "
+
param
.
ToStr
()
+
" 给料仓发送验证失败,等待3秒后重发 "
);
Thread
.
Sleep
(
3000
);
LineServer
.
CheckInStorePos
(
storeId
,
param
);
});
}
lock
(
moveEquip
.
waitInListLock
)
{
//如果当前正在出入库中,需要记录下来,等待空闲时执行
LogUtil
.
info
(
moveEquip
.
Name
+
" 入库命令: "
+
param
.
ToStr
()
+
"加入等待列表中!"
);
moveEquip
.
waitInStoreList
.
Add
(
param
);
}
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
deviceName
+
" "
,
ex
);
}
return
""
;
}
public
static
string
ProcessCodeList
(
List
<
string
>
codeList
)
{
string
codeStr
=
""
;
...
...
@@ -180,6 +73,11 @@ namespace OnlineStore.DeviceLibrary
{
return
msg
=
deviceName
+
"未扫到条码"
;
}
if
(
string
.
IsNullOrEmpty
(
serverAddr
))
{
LogUtil
.
error
(
deviceName
+
"GetTraySize ["
+
robotIndex
+
"] ["
+
codeStr
+
"] :未找到服务器地址"
);
return
msg
;
}
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"robotIndex"
,
robotIndex
.
ToString
());
// 参数: robotIndex = 机器人编号,IP为51的机器人为1, 52的机器人为2, 53的机器人为3
paramMap
.
Add
(
"barcode"
,
codeStr
);
// barcode = 扫到的条码
...
...
@@ -226,6 +124,11 @@ namespace OnlineStore.DeviceLibrary
{
return
msg
;
}
if
(
string
.
IsNullOrEmpty
(
serverAddr
))
{
LogUtil
.
error
(
deviceName
+
"UpdateTrayLoc ["
+
barcode
+
"] ["
+
status
+
"] :未找到服务器地址"
);
return
msg
;
}
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"barcode"
,
barcode
);
//barcode = 料盘的条码
...
...
@@ -268,6 +171,11 @@ namespace OnlineStore.DeviceLibrary
{
return
msg
;
}
if
(
string
.
IsNullOrEmpty
(
serverAddr
))
{
LogUtil
.
error
(
deviceName
+
"clearPutInRfid ["
+
rfid
+
"] :未找到服务器地址"
);
return
msg
;
}
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"rfid"
,
rfid
);
//rfid
...
...
@@ -299,6 +207,11 @@ namespace OnlineStore.DeviceLibrary
public
static
string
arriveRobotLocation
(
string
deviceName
,
int
robotIndex
,
string
barcode
)
{
string
msg
=
""
;
if
(
string
.
IsNullOrEmpty
(
serverAddr
))
{
LogUtil
.
error
(
deviceName
+
"arriveRobotLocation ["
+
robotIndex
+
"]["
+
barcode
+
"] :未找到服务器地址"
);
return
msg
;
}
try
{
if
(
robotIndex
<=
0
)
...
...
@@ -328,6 +241,11 @@ namespace OnlineStore.DeviceLibrary
{
afterData
=
null
;
string
msg
=
""
;
if
(
string
.
IsNullOrEmpty
(
serverAddr
))
{
LogUtil
.
error
(
deviceName
+
"afterPutCut ["
+
rfid
+
"]["
+
barcode
+
"]["
+
cid
+
"]["
+
rfidLoc
+
"] :未找到服务器地址"
);
return
msg
;
}
try
{
//参数:
...
...
@@ -389,6 +307,11 @@ namespace OnlineStore.DeviceLibrary
{
tempRfid
=
""
;
string
msg
=
""
;
if
(
string
.
IsNullOrEmpty
(
serverAddr
))
{
LogUtil
.
error
(
deviceName
+
"findTempRfid ["
+
rfid
+
"] :未找到服务器地址"
);
return
msg
;
}
try
{
// 参数: rfid: RFID
...
...
@@ -436,6 +359,11 @@ namespace OnlineStore.DeviceLibrary
string
msg
=
""
;
try
{
if
(
string
.
IsNullOrEmpty
(
serverAddr
))
{
LogUtil
.
error
(
deviceName
+
"cancelPutInTask ["
+
barcode
+
"] :未找到服务器地址"
);
return
msg
;
}
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"barcode"
,
barcode
);
...
...
@@ -467,7 +395,7 @@ namespace OnlineStore.DeviceLibrary
public
static
GetPosResult
GetPosId
(
string
deviceName
,
List
<
string
>
codeList
,
int
height
,
int
width
,
string
rfid
,
int
feedEquipId
)
{
GetPosResult
result
=
new
GetPosResult
();
GetPosResult
result
=
new
GetPosResult
();
try
{
string
codeStr
=
""
;
...
...
@@ -483,6 +411,16 @@ namespace OnlineStore.DeviceLibrary
codeStr
=
codeStr
+
code
+
spiltStr
;
}
codeStr
=
CodeManager
.
ReplaceCode
(
codeStr
);
//判断是否不连接服务器
if
(
string
.
IsNullOrEmpty
(
serverAddr
))
{
LogUtil
.
error
(
deviceName
+
"GetPosId["
+
codeStr
+
"]["
+
height
+
"]["
+
width
+
"]:未找到服务器地址 "
);
result
.
Msg
=
"未找到服务器地址"
;
result
.
Param
=
new
InOutParam
(
0
,
codeStr
,
""
,
height
,
width
,
true
);
return
result
;
}
//http://localhost/myproject/service/store/emptyPosForPutin
// 参数:cids: 多个 cid
//code: 条码内容
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论