Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
NS200
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 1ad17547
由
刘韬
编写于
2024-07-01 09:02:07 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
修正io超时报警
1 个父辈
fb13a9c4
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
180 行增加
和
81 行删除
AutoScanAndLabel/Form1.Designer.cs
AutoScanAndLabel/Form1.cs
AutoScanAndLabel/IOControl.Designer.cs
AutoScanAndLabel/SettingControl.cs
AutoScanAndLabel/UC/ConfigControl.designer.cs
AutoScanAndLabel/resources/en-US.lngres
DeviceLibrary/AutoScanAndLabel/AxisBean.cs
DeviceLibrary/AutoScanAndLabel/Common.cs
DeviceLibrary/AutoScanAndLabel/MainMachine _Common_.cs
DeviceLibrary/AutoScanAndLabel/MainMachine _LedProcess.cs
DeviceLibrary/AutoScanAndLabel/MainMachine _RightProcess.cs
DeviceLibrary/AutoScanAndLabel/MainMachine.cs
DeviceLibrary/AutoScanAndLabel/RobotManage.cs
AutoScanAndLabel/Form1.Designer.cs
查看文件 @
1ad1754
...
@@ -45,6 +45,7 @@ namespace AutoScanAndLabel
...
@@ -45,6 +45,7 @@ namespace AutoScanAndLabel
this
.
关于
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
关于
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
退出
ToolStripMenuItem1
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
退出
ToolStripMenuItem1
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
tabPage1
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
tabPage1
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
btnUploadTest
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
lastFile
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lastFile
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox4
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox4
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
btn_releaserightshelf
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btn_releaserightshelf
=
new
System
.
Windows
.
Forms
.
Button
();
...
@@ -63,7 +64,6 @@ namespace AutoScanAndLabel
...
@@ -63,7 +64,6 @@ namespace AutoScanAndLabel
this
.
listView1
=
new
System
.
Windows
.
Forms
.
ListView
();
this
.
listView1
=
new
System
.
Windows
.
Forms
.
ListView
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
btnUploadTest
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
menuStrip1
.
SuspendLayout
();
this
.
menuStrip1
.
SuspendLayout
();
this
.
tabPage1
.
SuspendLayout
();
this
.
tabPage1
.
SuspendLayout
();
this
.
groupBox4
.
SuspendLayout
();
this
.
groupBox4
.
SuspendLayout
();
...
@@ -219,6 +219,18 @@ namespace AutoScanAndLabel
...
@@ -219,6 +219,18 @@ namespace AutoScanAndLabel
this
.
tabPage1
.
Text
=
"状体"
;
this
.
tabPage1
.
Text
=
"状体"
;
this
.
tabPage1
.
UseVisualStyleBackColor
=
true
;
this
.
tabPage1
.
UseVisualStyleBackColor
=
true
;
//
//
// btnUploadTest
//
this
.
btnUploadTest
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnUploadTest
.
Location
=
new
System
.
Drawing
.
Point
(
390
,
391
);
this
.
btnUploadTest
.
Name
=
"btnUploadTest"
;
this
.
btnUploadTest
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
37
);
this
.
btnUploadTest
.
TabIndex
=
12
;
this
.
btnUploadTest
.
Text
=
"File Test"
;
this
.
btnUploadTest
.
UseVisualStyleBackColor
=
true
;
this
.
btnUploadTest
.
Visible
=
false
;
this
.
btnUploadTest
.
Click
+=
new
System
.
EventHandler
(
this
.
btnUploadTest_Click
);
//
// lastFile
// lastFile
//
//
this
.
lastFile
.
AutoSize
=
true
;
this
.
lastFile
.
AutoSize
=
true
;
...
@@ -366,9 +378,9 @@ namespace AutoScanAndLabel
...
@@ -366,9 +378,9 @@ namespace AutoScanAndLabel
// btn_stop
// btn_stop
//
//
this
.
btn_stop
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btn_stop
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btn_stop
.
Location
=
new
System
.
Drawing
.
Point
(
2
5
,
119
);
this
.
btn_stop
.
Location
=
new
System
.
Drawing
.
Point
(
2
2
,
120
);
this
.
btn_stop
.
Name
=
"btn_stop"
;
this
.
btn_stop
.
Name
=
"btn_stop"
;
this
.
btn_stop
.
Size
=
new
System
.
Drawing
.
Size
(
1
05
,
37
);
this
.
btn_stop
.
Size
=
new
System
.
Drawing
.
Size
(
1
20
,
37
);
this
.
btn_stop
.
TabIndex
=
3
;
this
.
btn_stop
.
TabIndex
=
3
;
this
.
btn_stop
.
Text
=
"停止"
;
this
.
btn_stop
.
Text
=
"停止"
;
this
.
btn_stop
.
UseVisualStyleBackColor
=
true
;
this
.
btn_stop
.
UseVisualStyleBackColor
=
true
;
...
@@ -377,9 +389,9 @@ namespace AutoScanAndLabel
...
@@ -377,9 +389,9 @@ namespace AutoScanAndLabel
// btn_run
// btn_run
//
//
this
.
btn_run
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btn_run
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btn_run
.
Location
=
new
System
.
Drawing
.
Point
(
2
5
,
50
);
this
.
btn_run
.
Location
=
new
System
.
Drawing
.
Point
(
2
2
,
54
);
this
.
btn_run
.
Name
=
"btn_run"
;
this
.
btn_run
.
Name
=
"btn_run"
;
this
.
btn_run
.
Size
=
new
System
.
Drawing
.
Size
(
1
05
,
37
);
this
.
btn_run
.
Size
=
new
System
.
Drawing
.
Size
(
1
20
,
37
);
this
.
btn_run
.
TabIndex
=
4
;
this
.
btn_run
.
TabIndex
=
4
;
this
.
btn_run
.
Text
=
"启动"
;
this
.
btn_run
.
Text
=
"启动"
;
this
.
btn_run
.
UseVisualStyleBackColor
=
true
;
this
.
btn_run
.
UseVisualStyleBackColor
=
true
;
...
@@ -390,11 +402,11 @@ namespace AutoScanAndLabel
...
@@ -390,11 +402,11 @@ namespace AutoScanAndLabel
this
.
listView1
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
None
;
this
.
listView1
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
None
;
this
.
listView1
.
HeaderStyle
=
System
.
Windows
.
Forms
.
ColumnHeaderStyle
.
Nonclickable
;
this
.
listView1
.
HeaderStyle
=
System
.
Windows
.
Forms
.
ColumnHeaderStyle
.
Nonclickable
;
this
.
listView1
.
HideSelection
=
false
;
this
.
listView1
.
HideSelection
=
false
;
this
.
listView1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
2
3
);
this
.
listView1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
2
2
);
this
.
listView1
.
MultiSelect
=
false
;
this
.
listView1
.
MultiSelect
=
false
;
this
.
listView1
.
Name
=
"listView1"
;
this
.
listView1
.
Name
=
"listView1"
;
this
.
listView1
.
ShowGroups
=
false
;
this
.
listView1
.
ShowGroups
=
false
;
this
.
listView1
.
Size
=
new
System
.
Drawing
.
Size
(
828
,
1
15
);
this
.
listView1
.
Size
=
new
System
.
Drawing
.
Size
(
828
,
1
09
);
this
.
listView1
.
TabIndex
=
2
;
this
.
listView1
.
TabIndex
=
2
;
this
.
listView1
.
Tag
=
"not"
;
this
.
listView1
.
Tag
=
"not"
;
this
.
listView1
.
UseCompatibleStateImageBehavior
=
false
;
this
.
listView1
.
UseCompatibleStateImageBehavior
=
false
;
...
@@ -402,41 +414,30 @@ namespace AutoScanAndLabel
...
@@ -402,41 +414,30 @@ namespace AutoScanAndLabel
// groupBox2
// groupBox2
//
//
this
.
groupBox2
.
Controls
.
Add
(
this
.
listView1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
listView1
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
1
87
,
41
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
1
99
,
32
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
834
,
1
41
);
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
834
,
1
37
);
this
.
groupBox2
.
TabIndex
=
5
;
this
.
groupBox2
.
TabIndex
=
5
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"消息"
;
this
.
groupBox2
.
Text
=
"消息"
;
//
//
// panel1
// panel1
//
//
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
41
);
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
163
);
this
.
panel1
.
Name
=
"panel1"
;
this
.
panel1
.
Name
=
"panel1"
;
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
1029
,
619
);
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
1029
,
497
);
this
.
panel1
.
TabIndex
=
6
;
this
.
panel1
.
TabIndex
=
6
;
//
//
// btnUploadTest
//
this
.
btnUploadTest
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnUploadTest
.
Location
=
new
System
.
Drawing
.
Point
(
390
,
391
);
this
.
btnUploadTest
.
Name
=
"btnUploadTest"
;
this
.
btnUploadTest
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
37
);
this
.
btnUploadTest
.
TabIndex
=
12
;
this
.
btnUploadTest
.
Text
=
"File Test"
;
this
.
btnUploadTest
.
UseVisualStyleBackColor
=
true
;
this
.
btnUploadTest
.
Click
+=
new
System
.
EventHandler
(
this
.
btnUploadTest_Click
);
//
// Form1
// Form1
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
14F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
14F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1033
,
692
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1033
,
692
);
this
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
Controls
.
Add
(
this
.
btn_stop
);
this
.
Controls
.
Add
(
this
.
btn_stop
);
this
.
Controls
.
Add
(
this
.
btn_run
);
this
.
Controls
.
Add
(
this
.
tabControl1
);
this
.
Controls
.
Add
(
this
.
tabControl1
);
this
.
Controls
.
Add
(
this
.
btn_run
);
this
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
Controls
.
Add
(
this
.
menuStrip1
);
this
.
Controls
.
Add
(
this
.
menuStrip1
);
this
.
Controls
.
Add
(
this
.
panel1
);
this
.
Controls
.
Add
(
this
.
panel1
);
this
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
...
...
AutoScanAndLabel/Form1.cs
查看文件 @
1ad1754
...
@@ -156,6 +156,7 @@ namespace AutoScanAndLabel
...
@@ -156,6 +156,7 @@ namespace AutoScanAndLabel
RobotManage
.
UserPauseSet
+=
RobotManage_UserPauseSet
;
RobotManage
.
UserPauseSet
+=
RobotManage_UserPauseSet
;
DeviceLibrary
.
Common
.
LabelResult
+=
Common_LabelResult
;
DeviceLibrary
.
Common
.
LabelResult
+=
Common_LabelResult
;
OnlineStore
.
CodeResourceControl
.
RefreshLanguageEvent
+=
CodeResourceControl_RefreshLanguageEvent
;
OnlineStore
.
CodeResourceControl
.
RefreshLanguageEvent
+=
CodeResourceControl_RefreshLanguageEvent
;
panel1
.
Dock
=
DockStyle
.
Fill
;
}
}
private
void
CodeResourceControl_RefreshLanguageEvent
()
private
void
CodeResourceControl_RefreshLanguageEvent
()
...
@@ -364,6 +365,20 @@ namespace AutoScanAndLabel
...
@@ -364,6 +365,20 @@ namespace AutoScanAndLabel
else
else
lvi
.
ForeColor
=
Color
.
Red
;
lvi
.
ForeColor
=
Color
.
Red
;
listView1
.
Items
.
Add
(
lvi
);
listView1
.
Items
.
Add
(
lvi
);
if
(
msg
.
errInfo
==
ErrInfo
.
SuddenStop
)
{
Task
.
Run
(()
=>
{
if
(
RobotManage
.
isRunning
)
this
.
Invoke
((
EventHandler
)
delegate
{
btn_stop_Click
(
this
,
EventArgs
.
Empty
);
});
});
}
}
}
lastFile
.
Text
=
DataUploadUtil
.
lastFileInfo
;
lastFile
.
Text
=
DataUploadUtil
.
lastFileInfo
;
this
.
ResumeLayout
(
true
);
this
.
ResumeLayout
(
true
);
...
@@ -374,7 +389,8 @@ namespace AutoScanAndLabel
...
@@ -374,7 +389,8 @@ namespace AutoScanAndLabel
private
void
btn_run_Click
(
object
sender
,
EventArgs
e
)
private
void
btn_run_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(!
RobotManage
.
isRunning
)
if
(!
RobotManage
.
isRunning
)
{
{
Msg
.
clear
();
RobotManage
.
Start
();
RobotManage
.
Start
();
userpause
=
false
;
userpause
=
false
;
if
(
RobotManage
.
isRunning
)
if
(
RobotManage
.
isRunning
)
...
@@ -651,7 +667,9 @@ namespace AutoScanAndLabel
...
@@ -651,7 +667,9 @@ namespace AutoScanAndLabel
panel1
.
Controls
.
Clear
();
panel1
.
Controls
.
Clear
();
//crc.GetString("Res0070", "Agv调试");
//crc.GetString("Res0070", "Agv调试");
panel1
.
Controls
.
Add
(
agv
);
panel1
.
Controls
.
Add
(
agv
);
}
}
private
void
相机条码
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
private
void
相机条码
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
...
...
AutoScanAndLabel/IOControl.Designer.cs
查看文件 @
1ad1754
...
@@ -89,6 +89,7 @@ namespace AutoScanAndLabel
...
@@ -89,6 +89,7 @@ namespace AutoScanAndLabel
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
17F
));
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
17F
));
this
.
tableLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
336
,
742
);
this
.
tableLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
336
,
742
);
this
.
tableLayoutPanel1
.
TabIndex
=
102
;
this
.
tableLayoutPanel1
.
TabIndex
=
102
;
this
.
tableLayoutPanel1
.
Tag
=
"not"
;
//
//
// groupBox1
// groupBox1
//
//
...
@@ -440,6 +441,7 @@ namespace AutoScanAndLabel
...
@@ -440,6 +441,7 @@ namespace AutoScanAndLabel
this
.
tableLayoutPanel2
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
17F
));
this
.
tableLayoutPanel2
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
17F
));
this
.
tableLayoutPanel2
.
Size
=
new
System
.
Drawing
.
Size
(
292
,
742
);
this
.
tableLayoutPanel2
.
Size
=
new
System
.
Drawing
.
Size
(
292
,
742
);
this
.
tableLayoutPanel2
.
TabIndex
=
103
;
this
.
tableLayoutPanel2
.
TabIndex
=
103
;
this
.
tableLayoutPanel2
.
Tag
=
"not"
;
//
//
// groupBox4
// groupBox4
//
//
...
...
AutoScanAndLabel/SettingControl.cs
查看文件 @
1ad1754
...
@@ -57,7 +57,9 @@ namespace AutoScanAndLabel
...
@@ -57,7 +57,9 @@ namespace AutoScanAndLabel
private
void
SettingControl_Load
(
object
sender
,
EventArgs
e
)
private
void
SettingControl_Load
(
object
sender
,
EventArgs
e
)
{
{
AlarmBuzzer
.
Enable
=
Config
.
Get
(
"EnableBuzzer"
,
true
);
cb_EnableBuzzer
.
Checked
=
AlarmBuzzer
.
Enable
;
}
}
private
void
cb_printerselect_SelectedIndexChanged
(
object
sender
,
EventArgs
e
)
private
void
cb_printerselect_SelectedIndexChanged
(
object
sender
,
EventArgs
e
)
...
...
AutoScanAndLabel/UC/ConfigControl.designer.cs
查看文件 @
1ad1754
...
@@ -41,14 +41,12 @@ namespace AutoScanAndLabel
...
@@ -41,14 +41,12 @@ namespace AutoScanAndLabel
this
.
groupBox3
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
this
.
groupBox3
.
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
.
groupBox3
.
Controls
.
Add
(
this
.
tableLayoutPanel1
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
tableLayoutPanel1
);
this
.
groupBox3
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
4
);
this
.
groupBox3
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
groupBox3
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
4
,
4
,
4
);
this
.
groupBox3
.
Name
=
"groupBox3"
;
this
.
groupBox3
.
Name
=
"groupBox3"
;
this
.
groupBox3
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
4
,
4
,
4
);
this
.
groupBox3
.
Size
=
new
System
.
Drawing
.
Size
(
628
,
461
);
this
.
groupBox3
.
Size
=
new
System
.
Drawing
.
Size
(
942
,
692
);
this
.
groupBox3
.
TabIndex
=
108
;
this
.
groupBox3
.
TabIndex
=
108
;
this
.
groupBox3
.
TabStop
=
false
;
this
.
groupBox3
.
TabStop
=
false
;
this
.
groupBox3
.
Tag
=
"
not
"
;
this
.
groupBox3
.
Tag
=
""
;
this
.
groupBox3
.
Text
=
"点位列表"
;
this
.
groupBox3
.
Text
=
"点位列表"
;
//
//
// tableLayoutPanel1
// tableLayoutPanel1
...
@@ -63,21 +61,20 @@ namespace AutoScanAndLabel
...
@@ -63,21 +61,20 @@ namespace AutoScanAndLabel
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
30F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
30F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
10F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
10F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
10F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
10F
));
this
.
tableLayoutPanel1
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
21
);
this
.
tableLayoutPanel1
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
14
);
this
.
tableLayoutPanel1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
4
,
4
,
4
);
this
.
tableLayoutPanel1
.
Name
=
"tableLayoutPanel1"
;
this
.
tableLayoutPanel1
.
Name
=
"tableLayoutPanel1"
;
this
.
tableLayoutPanel1
.
RowCount
=
1
;
this
.
tableLayoutPanel1
.
RowCount
=
1
;
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tableLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
924
,
662
);
this
.
tableLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
616
,
441
);
this
.
tableLayoutPanel1
.
TabIndex
=
102
;
this
.
tableLayoutPanel1
.
TabIndex
=
102
;
this
.
tableLayoutPanel1
.
Tag
=
"not"
;
//
//
// btnSavePos
// btnSavePos
//
//
this
.
btnSavePos
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
btnSavePos
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
btnSavePos
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
705
);
this
.
btnSavePos
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
470
);
this
.
btnSavePos
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
4
,
4
,
4
);
this
.
btnSavePos
.
Name
=
"btnSavePos"
;
this
.
btnSavePos
.
Name
=
"btnSavePos"
;
this
.
btnSavePos
.
Size
=
new
System
.
Drawing
.
Size
(
200
,
46
);
this
.
btnSavePos
.
Size
=
new
System
.
Drawing
.
Size
(
133
,
31
);
this
.
btnSavePos
.
TabIndex
=
109
;
this
.
btnSavePos
.
TabIndex
=
109
;
this
.
btnSavePos
.
Text
=
"全部保存"
;
this
.
btnSavePos
.
Text
=
"全部保存"
;
this
.
btnSavePos
.
UseVisualStyleBackColor
=
true
;
this
.
btnSavePos
.
UseVisualStyleBackColor
=
true
;
...
@@ -85,13 +82,12 @@ namespace AutoScanAndLabel
...
@@ -85,13 +82,12 @@ namespace AutoScanAndLabel
//
//
// ConfigControl
// ConfigControl
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
9F
,
18
F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12
F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
Controls
.
Add
(
this
.
btnSavePos
);
this
.
Controls
.
Add
(
this
.
btnSavePos
);
this
.
Controls
.
Add
(
this
.
groupBox3
);
this
.
Controls
.
Add
(
this
.
groupBox3
);
this
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
4
,
4
,
4
);
this
.
Name
=
"ConfigControl"
;
this
.
Name
=
"ConfigControl"
;
this
.
Size
=
new
System
.
Drawing
.
Size
(
1
644
,
756
);
this
.
Size
=
new
System
.
Drawing
.
Size
(
1
096
,
504
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
ConfigControl_Load
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
ConfigControl_Load
);
this
.
groupBox3
.
ResumeLayout
(
false
);
this
.
groupBox3
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
...
...
AutoScanAndLabel/resources/en-US.lngres
查看文件 @
1ad1754
...
@@ -289,6 +289,7 @@ menuStrip1_语言toolStripMenuItem_Text 语言 Language
...
@@ -289,6 +289,7 @@ menuStrip1_语言toolStripMenuItem_Text 语言 Language
AgvRequest_FeedPort 进料口AGV请求应答 LP AGV Respond Request.
AgvRequest_FeedPort 进料口AGV请求应答 LP AGV Respond Request.
AgvRequest_Outlet 出料口AGV请求应答 UP AGV Respond Request.
AgvRequest_Outlet 出料口AGV请求应答 UP AGV Respond Request.
Airpressure_Check 气压检测 Pressure Detection
Airpressure_Check 气压检测 Pressure Detection
alarm 报警 Alarm
Alarm_Buzzer 报警蜂鸣器 Alarm Buzzer
Alarm_Buzzer 报警蜂鸣器 Alarm Buzzer
Alarm_HddLed 故障指示灯 Fault Indicator
Alarm_HddLed 故障指示灯 Fault Indicator
App_Title 自动贴标机 Neo Scan Plus
App_Title 自动贴标机 Neo Scan Plus
...
@@ -383,23 +384,28 @@ TraySize_13 13寸料盘检测 13-Inch Reel Detection
...
@@ -383,23 +384,28 @@ TraySize_13 13寸料盘检测 13-Inch Reel Detection
TraySize_15 15寸料盘检测 15-Inch Reel Detection
TraySize_15 15寸料盘检测 15-Inch Reel Detection
TraySize_7 吸盘压力检测 Vacumm Stress Detection
TraySize_7 吸盘压力检测 Vacumm Stress Detection
Res0001 关于 {0} About {0}
Res0001 关于 {0} About {0}
Res0001.b9534cf3 ...清除报警1 Clear Alarm1
Res0002 版本 {0} Version {0}
Res0002 版本 {0} Version {0}
Res0002.99b78abc ...清除报警2 Clear Alarm2
Res0003 信息 Message
Res0003 信息 Message
Res0004 时间 Time
Res0004 时间 Time
Res0005 模块 Module
Res0005 模块 Module
Res0006 步骤 Step
Res0006 步骤 Step
Res0007 日志 Log
Res0007 日志 Log
Res0008 IO调试 IO Diagnostic
Res0008 IO调试 IO Diagnostic
Res0008.226d8802 ...使能成功 ... Enable Succeed
Res0009 伺服调试 Servo Config.
Res0009 伺服调试 Servo Config.
Res0010 相关设置 Related Settings
Res0010 相关设置 Related Settings
Res0011 配置模式 Enable Config Mode
Res0011 配置模式 Enable Config Mode
Res0012 停用配置模式 Disable Config Mode
Res0012 停用配置模式 Disable Config Mode
Res0012.ebec6459 ...尝试使能失败 ... Enable Failed
Res0013 暂停运行 Pause Execution
Res0013 暂停运行 Pause Execution
Res0014 恢复运行 Resume Execution
Res0014 恢复运行 Resume Execution
Res0015 启动 Start
Res0015 启动 Start
Res0016 重置 Reset
Res0016 重置 Reset
Res0017 扫码还没完成,无法打开调试!请稍后再试. Waiting For Scan Completion To Do Config.
Res0017 扫码还没完成,无法打开调试!请稍后再试. Waiting For Scan Completion To Do Config.
Res0018 料串已是释放状态 Reel Already Released
Res0018 料串已是释放状态 Reel Already Released
Res0018.7f6dfad7 ...伺服连接中
Res0019 正在执行料串释放 Reel Releasing
Res0019 正在执行料串释放 Reel Releasing
Res0020 出口料串正在提升或下降, 不能释放 UP Stacker Movement,Releasing is Not Allowed.
Res0020 出口料串正在提升或下降, 不能释放 UP Stacker Movement,Releasing is Not Allowed.
Res0021 出口料串等待释放中({0}) Waiting For Release {0}
Res0021 出口料串等待释放中({0}) Waiting For Release {0}
...
@@ -414,7 +420,9 @@ Res0029 点位列表 Poisition List
...
@@ -414,7 +420,9 @@ Res0029 点位列表 Poisition List
Res0030 全部保存 Save All
Res0030 全部保存 Save All
Res0031 添加 Add
Res0031 添加 Add
Res0032 修改 Edit
Res0032 修改 Edit
Res0032.1bf30741 第{0}次尝试打开轴:{1} Try To Enable Axis: {1} For {0} Times
Res0033 确定要删除:\"{0}\"? Confirm Deletion:\"{0}\"?
Res0033 确定要删除:\"{0}\"? Confirm Deletion:\"{0}\"?
Res0033.814c87d5 ...伺服忙碌,急停{0}次 ... Servo Busy, EM Stop {0} Times
Res0034 警告 Caution
Res0034 警告 Caution
Res0035 已呼叫AGV,不能重复呼叫 AGV Alreay Called. Cannot Repeat
Res0035 已呼叫AGV,不能重复呼叫 AGV Alreay Called. Cannot Repeat
Res0036 移载 Transfer Unit
Res0036 移载 Transfer Unit
...
@@ -512,6 +520,7 @@ Res0127.a5affabf 设备未启动 Machine Not Started
...
@@ -512,6 +520,7 @@ Res0127.a5affabf 设备未启动 Machine Not Started
Res0128.e5d9ef10 模版匹配失败 Template Matching Failure
Res0128.e5d9ef10 模版匹配失败 Template Matching Failure
Res0129.0e13d0de 标签打印失败,请检查打印机状态,关门后将自动重试 Label printing failure.Please check the status. Will automatically retry after closing the door
Res0129.0e13d0de 标签打印失败,请检查打印机状态,关门后将自动重试 Label printing failure.Please check the status. Will automatically retry after closing the door
Res0130.c3836615 标签吸取失败,请检查,关门后将自动重试 Label sucking failed, please check, will automatically retry after closing the door
Res0130.c3836615 标签吸取失败,请检查,关门后将自动重试 Label sucking failed, please check, will automatically retry after closing the door
Res0131.df796d2d 运动报警 Motion Alarm
Res0188 电夹爪通讯失败:{0} Eletric Gripper Communication Failure:{0}
Res0188 电夹爪通讯失败:{0} Eletric Gripper Communication Failure:{0}
Res0189 IO板卡初始化失败 IO Card Failed To Initialize.
Res0189 IO板卡初始化失败 IO Card Failed To Initialize.
Res0190 打开配置模式 Turn On Configuration Modo
Res0190 打开配置模式 Turn On Configuration Modo
...
...
DeviceLibrary/AutoScanAndLabel/AxisBean.cs
查看文件 @
1ad1754
...
@@ -30,25 +30,72 @@ namespace DeviceLibrary
...
@@ -30,25 +30,72 @@ namespace DeviceLibrary
AxisName
=
deviceName
+
" "
+
Config
.
Explain
+
"["
+
Config
.
DeviceName
+
"-"
+
Config
.
GetAxisValue
()
+
"]"
;
AxisName
=
deviceName
+
" "
+
Config
.
Explain
+
"["
+
Config
.
DeviceName
+
"-"
+
Config
.
GetAxisValue
()
+
"]"
;
List
.
Add
(
this
);
List
.
Add
(
this
);
}
}
int
openretry
=
0
;
public
bool
Open
(
bool
isCheck
,
out
string
Ms
g
)
public
bool
Open
(
bool
clearalarm
,
out
string
Msg
,
out
string
detaillo
g
)
{
{
Msg
=
""
;
Msg
=
AxisName
+
":"
;
detaillog
=
Msg
;
string
portName
=
Config
.
DeviceName
;
string
portName
=
Config
.
DeviceName
;
short
slvAddr
=
Config
.
GetAxisValue
();
short
slvAddr
=
Config
.
GetAxisValue
();
AxisManager
.
AlarmClear
(
portName
,
slvAddr
);
var
sts
=
HuichuanLibrary
.
HCBoardManager
.
GetAxisSts
(
slvAddr
);
Thread
.
Sleep
(
50
);
detaillog
+=
sts
.
ToStr
();
AxisManager
.
ServoOn
(
portName
,
slvAddr
);
//if (Config.Disable)
Thread
.
Sleep
(
50
);
// return true;
//打开所有轴
var
isalarm
=
AxisManager
.
GetAlarmStatus
(
portName
,
slvAddr
)
==
1
;
if
(
isCheck
)
if
(
clearalarm
&&
isalarm
)
{
{
if
(!
OpenAxis
(
out
Msg
))
Msg
+=
crc
.
GetString
(
"Res0001.b9534cf3"
,
"...清除报警1"
);
AxisManager
.
AlarmClear
(
Config
.
ProName
,
slvAddr
);
Thread
.
Sleep
(
500
);
}
else
if
(
isalarm
)
{
Msg
=
$
"[{crc.GetString(Config.ProName, Config.Explain)}] {crc.GetString("
alarm
", "
报警
")}"
;
detaillog
=
$
"[{crc.GetString(Config.ProName, Config.Explain)}]{string.Join("
,
", HuichuanLibrary.HCBoardManager.GetAxisErrorDetail(slvAddr))}"
;
return
false
;
}
if
(
AxisManager
.
IsServeoOn
(
portName
,
slvAddr
))
{
openretry
=
0
;
return
true
;
}
openretry
++;
{
//Msg += string.Format(crc.GetString("Res0032.1bf30741", "第{0}次尝试打开轴:{1}"), openretry, crc.GetString(Config.ProName, Config.Explain));
detaillog
+=
string
.
Format
(
crc
.
GetString
(
"Res0032.1bf30741"
,
"第{0}次尝试打开轴:{1}"
),
openretry
,
crc
.
GetString
(
Config
.
ProName
,
Config
.
Explain
));
if
(
AxisManager
.
GetBusyStatus
(
portName
,
slvAddr
)
==
1
)
{
{
return
false
;
AxisManager
.
SuddenStop
(
portName
,
slvAddr
);
Msg
+=
string
.
Format
(
crc
.
GetString
(
"Res0033.814c87d5"
,
"...伺服忙碌,急停{0}次"
),
openretry
);
Thread
.
Sleep
(
500
);
}
}
if
(
clearalarm
&&
AxisManager
.
GetAlarmStatus
(
portName
,
slvAddr
)
==
1
)
{
Msg
+=
crc
.
GetString
(
"Res0002.99b78abc"
,
"...清除报警2"
);
AxisManager
.
AlarmClear
(
portName
,
slvAddr
);
Thread
.
Sleep
(
500
);
}
AxisManager
.
ServoOn
(
portName
,
slvAddr
);
Thread
.
Sleep
(
500
);
if
(
AxisManager
.
IsServeoOn
(
portName
,
slvAddr
))
{
Msg
+=
crc
.
GetString
(
"Res0008.226d8802"
,
"...使能成功"
);
openretry
=
0
;
return
true
;
}
else
Msg
+=
crc
.
GetString
(
"Res0012.ebec6459"
,
"...尝试使能失败"
);
Thread
.
Sleep
(
1000
);
if
(
openretry
<
5
)
Msg
+=
crc
.
GetString
(
"Res0018.7f6dfad7"
,
"...伺服连接中"
);
detaillog
+=
Msg
;
}
}
return
tru
e
;
return
fals
e
;
}
}
/// <summary>
/// <summary>
/// 打开所有轴
/// 打开所有轴
...
@@ -305,16 +352,19 @@ namespace DeviceLibrary
...
@@ -305,16 +352,19 @@ namespace DeviceLibrary
}
}
#
endregion
#
endregion
public
static
bool
RunMultiAxis
(
bool
isC
heck
,
out
string
msg
,
List
<
AxisBean
>
axisArray
)
public
static
bool
RunMultiAxis
(
bool
isC
learAlarm
,
out
string
msg
,
List
<
AxisBean
>
axisArray
)
{
{
msg
=
""
;
msg
=
""
;
if
(
axisArray
==
null
)
{
return
false
;
}
foreach
(
AxisBean
axis
in
axisArray
)
foreach
(
AxisBean
axis
in
axisArray
)
{
{
bool
result
=
axis
.
Open
(
false
,
out
ms
g
);
bool
result
=
axis
.
Open
(
isClearAlarm
,
out
msg
,
out
string
lo
g
);
if
(!
result
||
(!
String
.
IsNullOrEmpty
(
msg
))
)
if
(!
result
)
{
{
//SetWarnMsg(Name + msg);
LogUtil
.
error
(
log
);
//Alarm(AlarmType.AxisAlarm);
return
false
;
return
false
;
}
}
}
}
...
...
DeviceLibrary/AutoScanAndLabel/Common.cs
查看文件 @
1ad1754
...
@@ -913,7 +913,7 @@ namespace DeviceLibrary
...
@@ -913,7 +913,7 @@ namespace DeviceLibrary
public
string
msgtxt
;
public
string
msgtxt
;
public
MsgLevel
msgLevel
;
public
MsgLevel
msgLevel
;
public
DateTime
datetime
;
public
DateTime
datetime
;
public
ErrInfo
errInfo
;
public
static
List
<
Msg
>
get
()
public
static
List
<
Msg
>
get
()
{
{
if
(
_setlogones
)
if
(
_setlogones
)
...
@@ -925,9 +925,14 @@ namespace DeviceLibrary
...
@@ -925,9 +925,14 @@ namespace DeviceLibrary
List
<
Msg
>
mm
=
new
List
<
Msg
>(
msg
);
List
<
Msg
>
mm
=
new
List
<
Msg
>(
msg
);
return
mm
;
return
mm
;
}
}
public
static
void
add
(
string
m
,
MsgLevel
ml
)
public
static
void
add
(
string
m
,
MsgLevel
ml
,
ErrInfo
errInfo
=
ErrInfo
.
Empty
)
{
{
msg
.
Add
(
new
Msg
{
msgtxt
=
m
,
msgLevel
=
ml
,
datetime
=
DateTime
.
Now
});
lock
(
msg
)
{
var
fm
=
msg
.
Find
((
x
)
=>
x
.
msgtxt
==
m
);
if
(
fm
==
null
)
msg
.
Add
(
new
Msg
{
msgtxt
=
m
,
msgLevel
=
ml
,
datetime
=
DateTime
.
Now
,
errInfo
=
errInfo
});
}
}
}
static
bool
_setlogones
=
false
;
static
bool
_setlogones
=
false
;
internal
static
void
setlogones
()
internal
static
void
setlogones
()
...
@@ -946,6 +951,15 @@ namespace DeviceLibrary
...
@@ -946,6 +951,15 @@ namespace DeviceLibrary
info
,
info
,
alarm
alarm
}
}
public
enum
ErrInfo
{
Empty
,
X09_BoxNotDetect
,
ResetBtn
,
RunBtn
,
SuddenStop
,
X09_Clear
}
public
class
IdWorker
public
class
IdWorker
{
{
private
long
workerId
;
private
long
workerId
;
...
...
DeviceLibrary/AutoScanAndLabel/MainMachine _Common_.cs
查看文件 @
1ad1754
...
@@ -189,7 +189,7 @@ namespace DeviceLibrary
...
@@ -189,7 +189,7 @@ namespace DeviceLibrary
LogUtil
.
error
(
WarnMsg
,
logType
+
100
,
second
);
LogUtil
.
error
(
WarnMsg
,
logType
+
100
,
second
);
//MoveInfo.errlog(WarnMsg);
//MoveInfo.errlog(WarnMsg);
Alarm
(
AlarmType
.
IoSingleTimeOut
,
WarnMsg
);
Alarm
(
AlarmType
.
IoSingleTimeOut
,
WarnMsg
);
Msg
.
add
(
WarnMsg
,
MsgLevel
.
warning
);
Msg
.
add
(
WarnMsg
,
MsgLevel
.
alarm
);
}
}
return
true
;
return
true
;
}
}
...
...
DeviceLibrary/AutoScanAndLabel/MainMachine _LedProcess.cs
查看文件 @
1ad1754
...
@@ -27,13 +27,13 @@ namespace DeviceLibrary
...
@@ -27,13 +27,13 @@ namespace DeviceLibrary
RunningLed
.
LedState
=
LedState
.
off
;
RunningLed
.
LedState
=
LedState
.
off
;
RightLed
.
LedState
=
LedState
.
off
;
RightLed
.
LedState
=
LedState
.
off
;
LeftLed
.
LedState
=
LedState
.
off
;
LeftLed
.
LedState
=
LedState
.
off
;
//无法运行,量报警灯
//
//
无法运行,量报警灯
if
(!
canRunning
||
IsAlarm
)
//
if (!canRunning || IsAlarm)
{
//
{
AlarmLed
.
LedState
=
LedState
.
on
;
//
AlarmLed.LedState = LedState.on;
}
//
}
else
//
else
AlarmLed
.
LedState
=
LedState
.
off
;
//
AlarmLed.LedState = LedState.off;
//所有过程都在运动,闪烁运行中灯
//所有过程都在运动,闪烁运行中灯
//if (!RightMoveInfo.IsStep(MoveStep.Wait)
//if (!RightMoveInfo.IsStep(MoveStep.Wait)
// || !LeftMoveInfo.IsStep(MoveStep.Wait)
// || !LeftMoveInfo.IsStep(MoveStep.Wait)
...
@@ -43,12 +43,13 @@ namespace DeviceLibrary
...
@@ -43,12 +43,13 @@ namespace DeviceLibrary
// RunningLed.LedState = LedState.on;
// RunningLed.LedState = LedState.on;
//}
//}
if
(
alarmType
!=
AlarmType
.
None
||
IsAlarm
)
if
(
IsAlarm
)
{
{
AlarmLed
.
LedState
=
LedState
.
on
;
AlarmLed
.
LedState
=
LedState
.
on
;
AlarmBuzzer
.
ON
();
AlarmBuzzer
.
ON
();
}
}
else
{
else
{
AlarmLed
.
LedState
=
LedState
.
off
;
AlarmBuzzer
.
OFF
();
AlarmBuzzer
.
OFF
();
}
}
if
(
runStatus
==
RunStatus
.
HomeReset
)
if
(
runStatus
==
RunStatus
.
HomeReset
)
...
...
DeviceLibrary/AutoScanAndLabel/MainMachine _RightProcess.cs
查看文件 @
1ad1754
...
@@ -170,13 +170,13 @@ namespace DeviceLibrary
...
@@ -170,13 +170,13 @@ namespace DeviceLibrary
RightMoveInfo
.
NextMoveStep
(
MoveStep
.
R33
);
RightMoveInfo
.
NextMoveStep
(
MoveStep
.
R33
);
IOMove
(
IO_Type
.
RightMoto_Run
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
RightMoto_Run
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
RightMoto_Reverse
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
RightMoto_Reverse
,
IO_VALUE
.
HIGH
);
Middle
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
RightEnd_Check
,
IO_VALUE
.
LOW
));
Right
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
RightEnd_Check
,
IO_VALUE
.
LOW
));
RightMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
3000
));
RightMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
3000
));
RightMoveInfo
.
log
(
$
"电滚筒向外滚动"
);
RightMoveInfo
.
log
(
$
"电滚筒向外滚动"
);
break
;
break
;
case
MoveStep
.
R33
:
case
MoveStep
.
R33
:
RightMoveInfo
.
NextMoveStep
(
MoveStep
.
R34
);
RightMoveInfo
.
NextMoveStep
(
MoveStep
.
R34
);
Middle
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
RightFornt_Check
,
IO_VALUE
.
LOW
));
Right
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
RightFornt_Check
,
IO_VALUE
.
LOW
));
RightMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
3000
));
RightMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
3000
));
RightMoveInfo
.
OneWaitCanEndStep
=
true
;
RightMoveInfo
.
OneWaitCanEndStep
=
true
;
RightMoveInfo
.
log
(
$
"等待前置检测拉低"
);
RightMoveInfo
.
log
(
$
"等待前置检测拉低"
);
...
@@ -205,9 +205,9 @@ namespace DeviceLibrary
...
@@ -205,9 +205,9 @@ namespace DeviceLibrary
IOMove
(
IO_Type
.
RightMoto_Reverse
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
RightMoto_Reverse
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
RightMoto_Run
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
RightMoto_Run
,
IO_VALUE
.
HIGH
);
RightMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
RightEnd_Check
,
IO_VALUE
.
HIGH
));
RightMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
RightEnd_Check
,
IO_VALUE
.
HIGH
));
RightMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
60
000
));
RightMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
5
*
1
000
));
RightMoveInfo
.
TimeOutSeconds
=
60
;
//
RightMoveInfo.TimeOutSeconds = 60;
RightMoveInfo
.
OneWaitCanEndStep
=
true
;
//
RightMoveInfo.OneWaitCanEndStep = true;
RightMoveInfo
.
log
(
$
"等待料串到位"
);
RightMoveInfo
.
log
(
$
"等待料串到位"
);
break
;
break
;
case
MoveStep
.
R43
:
case
MoveStep
.
R43
:
...
...
DeviceLibrary/AutoScanAndLabel/MainMachine.cs
查看文件 @
1ad1754
...
@@ -435,7 +435,6 @@ namespace DeviceLibrary
...
@@ -435,7 +435,6 @@ namespace DeviceLibrary
/// </summary>
/// </summary>
DateTime
lastAirCloseTime
=
DateTime
.
MinValue
;
DateTime
lastAirCloseTime
=
DateTime
.
MinValue
;
internal
DateTime
checkAlarmTime
=
DateTime
.
Now
;
public
bool
DeviceCheck
()
public
bool
DeviceCheck
()
{
{
bool
ok
=
true
;
bool
ok
=
true
;
...
@@ -473,9 +472,14 @@ namespace DeviceLibrary
...
@@ -473,9 +472,14 @@ namespace DeviceLibrary
{
{
lastAirCloseTime
=
DateTime
.
MinValue
;
lastAirCloseTime
=
DateTime
.
MinValue
;
}
}
if
(
ok
&&
!
AxisBean
.
RunMultiAxis
(
false
,
out
string
msg
,
AxisBean
.
List
))
{
ok
=
false
;
Msg
.
add
(
msg
,
MsgLevel
.
alarm
,
ErrInfo
.
SuddenStop
);
//LogUtil.Log.Error(msg);
}
if
(
alarmType
!=
AlarmType
.
SuddenStop
)
if
(
alarmType
!=
AlarmType
.
SuddenStop
)
{
{
TimeSpan
span
=
DateTime
.
Now
-
checkAlarmTime
;
//在回原点,复位,出入库时,检测报警间隔减小
//在回原点,复位,出入库时,检测报警间隔减小
if
(!
runStatus
.
Equals
(
RunStatus
.
Stop
))
if
(!
runStatus
.
Equals
(
RunStatus
.
Stop
))
{
{
...
@@ -483,7 +487,7 @@ namespace DeviceLibrary
...
@@ -483,7 +487,7 @@ namespace DeviceLibrary
{
{
if
(
AxisManager
.
GetAlarmStatus
(
configMoveAxis
.
DeviceName
,
configMoveAxis
.
GetAxisValue
())
==
1
)
if
(
AxisManager
.
GetAlarmStatus
(
configMoveAxis
.
DeviceName
,
configMoveAxis
.
GetAxisValue
())
==
1
)
{
{
Msg
.
add
(
$
"{configMoveAxis.Explain}:运动报警"
,
MsgLevel
.
alarm
);
Msg
.
add
(
crc
.
GetString
(
configMoveAxis
.
ProName
,
configMoveAxis
.
Explain
)
+
crc
.
GetString
(
"Res0131.df796d2d"
,
"运动报警"
),
MsgLevel
.
alarm
,
ErrInfo
.
SuddenStop
);
ok
=
false
;
ok
=
false
;
}
}
}
}
...
...
DeviceLibrary/AutoScanAndLabel/RobotManage.cs
查看文件 @
1ad1754
...
@@ -100,15 +100,17 @@ namespace DeviceLibrary
...
@@ -100,15 +100,17 @@ namespace DeviceLibrary
}
}
mainMachine
.
ServerCM
.
StartConnectServer
();
mainMachine
.
ServerCM
.
StartConnectServer
();
clampTool
.
Open
();
clampTool
.
Open
();
AxisBean
.
List
.
ForEach
((
x
)
=>
{
AxisManager
.
AlarmClear
(
x
.
Config
.
DeviceName
,
x
.
Config
.
GetAxisValue
());
});
Task
.
Delay
(
500
).
Wait
();
mainMachine
.
OpenAllServo
();
mainThread
=
new
Thread
(
new
ThreadStart
(
mainMachine
.
Run
));
mainThread
=
new
Thread
(
new
ThreadStart
(
mainMachine
.
Run
));
mainThread
.
Start
();
mainThread
.
Start
();
isRunning
=
true
;
isRunning
=
true
;
GC
.
KeepAlive
(
mainThread
);
GC
.
KeepAlive
(
mainThread
);
Task
.
Run
(()
=>
Task
.
Run
(()
=>
{
{
AxisBean
.
List
.
ForEach
((
x
)
=>
{
AxisManager
.
AlarmClear
(
x
.
Config
.
DeviceName
,
x
.
Config
.
GetAxisValue
());
});
//Task.Delay(1000).Wait();
Task
.
Delay
(
1000
).
Wait
();
//if (mainMachine.DeviceCheck())
if
(
mainMachine
.
DeviceCheck
())
mainMachine
.
BeginHomeReset
(
true
);
mainMachine
.
BeginHomeReset
(
true
);
});
});
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论