Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
NS200
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a2bfff0b
由
贾鹏旭
编写于
2024-06-06 17:27:30 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
页面更改、添加出料口上升限制
1 个父辈
913215eb
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
19 个修改的文件
包含
398 行增加
和
123 行删除
AutoScanAndLabel/AboutBox1.cs
AutoScanAndLabel/AutoScanAndLabel.csproj
AutoScanAndLabel/Form1.Designer.cs
AutoScanAndLabel/Form1.cs
AutoScanAndLabel/FrmLabelSettings.Designer.cs
AutoScanAndLabel/FrmLabelSettings.cs
AutoScanAndLabel/FrmLabelSettings.resx
AutoScanAndLabel/IOControl.Designer.cs
AutoScanAndLabel/SettingControl.Designer.cs
AutoScanAndLabel/SettingControl.cs
AutoScanAndLabel/resources/en-US.lngres
AutoScanAndLabel/resources/zh-CN.lngres
Common/CodeResourceControl.cs
DeviceLibrary/AutoScanAndLabel/MainMachine _LeftProcess.cs
DeviceLibrary/AutoScanAndLabel/MainMachine _MiddleProcess.cs
DeviceLibrary/AutoScanAndLabel/MainMachine _RightProcess.cs
DeviceLibrary/AutoScanAndLabel/MainMachine.cs
DeviceLibrary/DeviceLibrary/CodeManager.cs
DeviceLibrary/DeviceLibrary/PrinterHelper.cs
AutoScanAndLabel/AboutBox1.cs
查看文件 @
a2bfff0
...
...
@@ -63,10 +63,10 @@ namespace AutoScanAndLabel
{
int
days
=
Convert
.
ToInt32
(
strArray
[
2
]);
int
seconds
=
Convert
.
ToInt32
(
strArray
[
3
]);
DateTime
d1
=
DateTime
.
Parse
(
"2024-0
1-25
"
);
var
newData
=
d1
.
AddDays
(
days
);
newData
=
newData
.
AddSeconds
(
seconds
*
2
);
updatetime
=
$
"{crc.GetString("
Res0220
", "
最后更新时间
:
")}"
+
newData
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
);
DateTime
d1
=
DateTime
.
Parse
(
"2024-0
6-06
"
);
//
var newData = d1.AddDays(days);
//
newData = newData.AddSeconds(seconds * 2);
updatetime
=
$
"{crc.GetString("
Res0220
", "
最后更新时间
:
")}"
+
d1
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
);
}
if
(
attributes
.
Length
==
0
)
...
...
AutoScanAndLabel/AutoScanAndLabel.csproj
查看文件 @
a2bfff0
...
...
@@ -108,6 +108,12 @@
<Compile Include="FrmLabelEdit.Designer.cs">
<DependentUpon>FrmLabelEdit.cs</DependentUpon>
</Compile>
<Compile Include="FrmLabelSettings.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmLabelSettings.Designer.cs">
<DependentUpon>FrmLabelSettings.cs</DependentUpon>
</Compile>
<Compile Include="IOControl.cs">
<SubType>UserControl</SubType>
</Compile>
...
...
@@ -165,6 +171,9 @@
<EmbeddedResource Include="FrmLabelEdit.resx">
<DependentUpon>FrmLabelEdit.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmLabelSettings.resx">
<DependentUpon>FrmLabelSettings.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="IOControl.resx">
<DependentUpon>IOControl.cs</DependentUpon>
</EmbeddedResource>
...
...
AutoScanAndLabel/Form1.Designer.cs
查看文件 @
a2bfff0
此文件的差异被折叠,
点击展开。
AutoScanAndLabel/Form1.cs
查看文件 @
a2bfff0
...
...
@@ -76,8 +76,8 @@ namespace AutoScanAndLabel
listView1
.
Columns
[
2
].
Text
=
crc
.
GetString
(
"Res0003"
,
"信息"
);
stateView
.
Columns
[
1
].
Text
=
crc
.
GetString
(
"Res0005"
,
"模块"
);
stateView
.
Columns
[
2
].
Text
=
crc
.
GetString
(
"Res0006"
,
"步骤"
);
stateView
.
Columns
[
3
].
Text
=
crc
.
GetString
(
"Form1_tabControl1_tabPage1_Text"
,
"信息"
);
//
stateView.Columns[2].Text = crc.GetString("Res0006", "步骤");
stateView
.
Columns
[
2
].
Text
=
crc
.
GetString
(
"Form1_tabControl1_tabPage1_Text"
,
"信息"
);
设备操作
ToolStripMenuItem
.
Text
=
!
RobotManage
.
IsDebug
?
crc
.
GetString
(
"Res0101"
,
"启用配置模式"
)
:
crc
.
GetString
(
"Res0012"
,
"停用配置模式"
);
...
...
@@ -134,15 +134,15 @@ namespace AutoScanAndLabel
c2
.
Width
=
100
;
ColumnHeader
c3
=
new
ColumnHeader
();
c3
.
Text
=
crc
.
GetString
(
"Res0006"
,
"步骤"
);
c3
.
Width
=
10
0
;
ColumnHeader
c4
=
new
ColumnHeader
();
c4
.
Text
=
crc
.
GetString
(
"Form1_tabControl1_tabPage1_Text"
,
"信息"
);
c4
.
Width
=
400
;
c3
.
Width
=
48
0
;
//
ColumnHeader c4 = new ColumnHeader();
//
c4.Text = crc.GetString("Form1_tabControl1_tabPage1_Text", "信息");
//
c4.Width = 400;
stateView
.
Columns
.
Add
(
c1
);
stateView
.
Columns
.
Add
(
c2
);
stateView
.
Columns
.
Add
(
c3
);
stateView
.
Columns
.
Add
(
c4
);
//
stateView.Columns.Add(c4);
stateView
.
ColumnWidthChanging
+=
listView_ColumnWidthChanging
;
#
endregion
...
...
@@ -268,14 +268,14 @@ namespace AutoScanAndLabel
{
continue
;
}
ListViewItem
lvi
=
new
ListViewItem
(
new
string
[]
{
""
,
moveInfo
.
Name
,
moveInfo
.
MoveStep
.
ToString
(),
moveInfo
.
GetStateStr
()
});
// ListViewItem lvi = new ListViewItem(new string[] { "", moveInfo.Name, moveInfo.MoveStep.ToString(), moveInfo.GetStateStr() });
ListViewItem
lvi
=
new
ListViewItem
(
new
string
[]
{
""
,
moveInfo
.
Name
,
moveInfo
.
GetStateStr
()
});
stateView
.
Items
.
Add
(
lvi
);
}
var
printstatus
=
PrinterHelper
.
LastPrintStatus
;
ListViewItem
lvi1
=
new
ListViewItem
(
new
string
[]
{
""
,
crc
.
GetString
(
"Res0216"
,
"打印机"
),
(
printstatus
==
CustPrinterStatus
.
Unknown
)
?
"Wait"
:
printstatus
.
ToString
(),
ConfigHelper
.
Config
.
Get
(
Setting_Init
.
PrinterName
)
});
stateView
.
Items
.
Add
(
lvi1
);
this
.
ResumeLayout
(
true
);
}
private
void
AddForm
(
string
id
,
string
text
,
UserControl
form
)
{
...
...
@@ -680,22 +680,22 @@ namespace AutoScanAndLabel
panel1
.
Controls
.
Clear
();
RobotManage
.
IsDebug
=
RobotManage
.
IsDebug
?
false
:
true
;
(
sender
as
ToolStripMenuItem
).
Text
=
!
RobotManage
.
IsDebug
?
crc
.
GetString
(
"Res0101"
,
"设备操作"
)
:
crc
.
GetString
(
"Res0012"
,
"停用配置模式"
);
//
(sender as ToolStripMenuItem).Text = !RobotManage.IsDebug ? crc.GetString("Res0101", "设备操作") : crc.GetString("Res0012", "停用配置模式");
if
(
RobotManage
.
IsDebug
)
{
RobotManage
.
Config
=
(
Robot_Config
)
CSVConfigReader
.
LoadConfig
(
RobotManage
.
Config
);
addTablePage
();
RobotManage
.
LoadDebug
();
}
else
{
var
tc
=
tabControl1
.
TabPages
.
Count
;
for
(
int
i
=
1
;
i
<
tc
;
i
++)
{
tabControl1
.
TabPages
[
tc
-
i
].
Parent
=
null
;
}
}
//
if (RobotManage.IsDebug)
//
{
//
RobotManage.Config = (Robot_Config)CSVConfigReader.LoadConfig(RobotManage.Config);
//
addTablePage();
//
RobotManage.LoadDebug();
//
}
//
else
//
{
//
var tc = tabControl1.TabPages.Count;
//
for (int i = 1; i <tc; i++)
//
{
//
tabControl1.TabPages[tc - i].Parent = null;
//
}
//
}
}
private
void
退出
ToolStripMenuItem1_Click
(
object
sender
,
EventArgs
e
)
...
...
@@ -777,6 +777,29 @@ namespace AutoScanAndLabel
}
}
#
endregion
#
endregion
private
void
打印设置
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
FrmLabelSettings
frmLabelSettings
=
new
FrmLabelSettings
();
frmLabelSettings
.
StartPosition
=
FormStartPosition
.
CenterParent
;
frmLabelSettings
.
ShowDialog
();
}
private
void
打开
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
RobotManage
.
Config
=
(
Robot_Config
)
CSVConfigReader
.
LoadConfig
(
RobotManage
.
Config
);
addTablePage
();
RobotManage
.
LoadDebug
();
}
private
void
关闭
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
var
tc
=
tabControl1
.
TabPages
.
Count
;
for
(
int
i
=
1
;
i
<
tc
;
i
++)
{
tabControl1
.
TabPages
[
tc
-
i
].
Parent
=
null
;
}
}
}
}
\ No newline at end of file
AutoScanAndLabel/FrmLabelSettings.Designer.cs
0 → 100644
查看文件 @
a2bfff0
namespace
AutoScanAndLabel
{
partial
class
FrmLabelSettings
{
/// <summary>
/// Required designer variable.
/// </summary>
private
System
.
ComponentModel
.
IContainer
components
=
null
;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected
override
void
Dispose
(
bool
disposing
)
{
if
(
disposing
&&
(
components
!=
null
))
{
components
.
Dispose
();
}
base
.
Dispose
(
disposing
);
}
#
region
Windows
Form
Designer
generated
code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private
void
InitializeComponent
()
{
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
FrmLabelSettings
));
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btn_labeledit
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
cb_labelselect
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
cb_printerselect
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
SuspendLayout
();
//
// label2
//
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
28
,
84
);
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
106
,
20
);
this
.
label2
.
TabIndex
=
2
;
this
.
label2
.
Text
=
"标签名"
;
this
.
label2
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// label1
//
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
28
,
30
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
106
,
20
);
this
.
label1
.
TabIndex
=
2
;
this
.
label1
.
Text
=
"打印机"
;
this
.
label1
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// btn_labeledit
//
this
.
btn_labeledit
.
Location
=
new
System
.
Drawing
.
Point
(
163
,
122
);
this
.
btn_labeledit
.
Name
=
"btn_labeledit"
;
this
.
btn_labeledit
.
Size
=
new
System
.
Drawing
.
Size
(
107
,
31
);
this
.
btn_labeledit
.
TabIndex
=
1
;
this
.
btn_labeledit
.
Text
=
"标签编辑"
;
this
.
btn_labeledit
.
UseVisualStyleBackColor
=
true
;
this
.
btn_labeledit
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_labeledit_Click
);
//
// cb_labelselect
//
this
.
cb_labelselect
.
FormattingEnabled
=
true
;
this
.
cb_labelselect
.
Location
=
new
System
.
Drawing
.
Point
(
143
,
84
);
this
.
cb_labelselect
.
Name
=
"cb_labelselect"
;
this
.
cb_labelselect
.
Size
=
new
System
.
Drawing
.
Size
(
198
,
20
);
this
.
cb_labelselect
.
TabIndex
=
0
;
this
.
cb_labelselect
.
SelectedIndexChanged
+=
new
System
.
EventHandler
(
this
.
cb_labelselect_SelectedIndexChanged
);
//
// cb_printerselect
//
this
.
cb_printerselect
.
FormattingEnabled
=
true
;
this
.
cb_printerselect
.
Location
=
new
System
.
Drawing
.
Point
(
143
,
31
);
this
.
cb_printerselect
.
Name
=
"cb_printerselect"
;
this
.
cb_printerselect
.
Size
=
new
System
.
Drawing
.
Size
(
198
,
20
);
this
.
cb_printerselect
.
TabIndex
=
0
;
this
.
cb_printerselect
.
SelectedIndexChanged
+=
new
System
.
EventHandler
(
this
.
cb_printerselect_SelectedIndexChanged
);
//
// FrmLabelSettings
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
444
,
189
);
this
.
Controls
.
Add
(
this
.
btn_labeledit
);
this
.
Controls
.
Add
(
this
.
label2
);
this
.
Controls
.
Add
(
this
.
label1
);
this
.
Controls
.
Add
(
this
.
cb_printerselect
);
this
.
Controls
.
Add
(
this
.
cb_labelselect
);
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Name
=
"FrmLabelSettings"
;
this
.
Text
=
"标签设置"
;
this
.
ResumeLayout
(
false
);
}
#
endregion
private
System
.
Windows
.
Forms
.
Label
label2
;
private
System
.
Windows
.
Forms
.
Label
label1
;
private
System
.
Windows
.
Forms
.
Button
btn_labeledit
;
private
System
.
Windows
.
Forms
.
ComboBox
cb_labelselect
;
private
System
.
Windows
.
Forms
.
ComboBox
cb_printerselect
;
}
}
\ No newline at end of file
AutoScanAndLabel/FrmLabelSettings.cs
0 → 100644
查看文件 @
a2bfff0
using
ConfigHelper
;
using
DeviceLibrary
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.IO
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
namespace
AutoScanAndLabel
{
public
partial
class
FrmLabelSettings
:
Form
{
public
FrmLabelSettings
()
{
InitializeComponent
();
RobotManage
.
LoadFinishEvent
+=
RobotManage_LoadFinishEvent
;
crc
.
LanguageProcess
(
this
,
this
.
GetType
().
Name
);
RobotManage_LoadFinishEvent
(
true
,
""
);
}
private
void
btn_labeledit_Click
(
object
sender
,
EventArgs
e
)
{
var
keys
=
File
.
ReadAllLines
(
Application
.
StartupPath
+
"\\NeoScan\\Config\\MacroKey.txt"
);
PrintLabel
.
FrmLabel
frmLabel
=
new
PrintLabel
.
FrmLabel
();
frmLabel
.
Text
=
crc
.
GetString
(
"FrmLabel_Text"
,
"标签编辑"
);
crc
.
LanguageProcess
(
frmLabel
,
"FrmLabel"
);
frmLabel
.
KeyWord
.
AddRange
(
keys
);
frmLabel
.
Show
();
RobotManage_LoadFinishEvent
(
true
,
""
);
RobotManage
.
LoadPrintSetting
();
}
private
void
RobotManage_LoadFinishEvent
(
bool
state
,
string
msg
)
{
if
(!
state
)
return
;
cb_printerselect
.
Items
.
Clear
();
cb_labelselect
.
Items
.
Clear
();
foreach
(
string
sPrint
in
System
.
Drawing
.
Printing
.
PrinterSettings
.
InstalledPrinters
)
//获取所有打印机名称
{
cb_printerselect
.
Items
.
Add
(
sPrint
);
}
if
(
RobotManage
.
printerHelper
!=
null
)
{
foreach
(
string
labelname
in
RobotManage
.
printerHelper
.
GetLabelList
())
{
cb_labelselect
.
Items
.
Add
(
labelname
);
}
}
string
PrintName
=
ConfigHelper
.
Config
.
Get
(
Setting_Init
.
PrinterName
);
string
labelName
=
ConfigHelper
.
Config
.
Get
(
Setting_Init
.
LabelName
);
cb_printerselect
.
Text
=
PrintName
;
cb_labelselect
.
Text
=
labelName
;
}
private
void
cb_printerselect_SelectedIndexChanged
(
object
sender
,
EventArgs
e
)
{
Config
.
Set
(
Setting_Init
.
PrinterName
,
(
sender
as
ComboBox
).
Text
);
RobotManage
.
LoadPrintSetting
();
}
private
void
cb_labelselect_SelectedIndexChanged
(
object
sender
,
EventArgs
e
)
{
Config
.
Set
(
Setting_Init
.
LabelName
,
(
sender
as
ComboBox
).
Text
);
RobotManage
.
LoadPrintSetting
();
}
}
}
AutoScanAndLabel/FrmLabelSettings.resx
0 → 100644
查看文件 @
a2bfff0
此文件的差异被折叠,
点击展开。
AutoScanAndLabel/IOControl.Designer.cs
查看文件 @
a2bfff0
...
...
@@ -82,12 +82,12 @@ namespace AutoScanAndLabel
this
.
tableLayoutPanel1
.
ColumnCount
=
1
;
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
100F
));
this
.
tableLayoutPanel1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
tableLayoutPanel1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
21
);
this
.
tableLayoutPanel1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
17
);
this
.
tableLayoutPanel1
.
Name
=
"tableLayoutPanel1"
;
this
.
tableLayoutPanel1
.
RowCount
=
2
;
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
,
7
38
);
this
.
tableLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
336
,
7
42
);
this
.
tableLayoutPanel1
.
TabIndex
=
102
;
//
// groupBox1
...
...
@@ -326,7 +326,7 @@ namespace AutoScanAndLabel
this
.
txtDOIndex
.
Location
=
new
System
.
Drawing
.
Point
(
73
,
52
);
this
.
txtDOIndex
.
MaxLength
=
10
;
this
.
txtDOIndex
.
Name
=
"txtDOIndex"
;
this
.
txtDOIndex
.
Size
=
new
System
.
Drawing
.
Size
(
70
,
2
7
);
this
.
txtDOIndex
.
Size
=
new
System
.
Drawing
.
Size
(
70
,
2
3
);
this
.
txtDOIndex
.
TabIndex
=
242
;
this
.
txtDOIndex
.
Text
=
"0"
;
//
...
...
@@ -337,7 +337,7 @@ namespace AutoScanAndLabel
this
.
label14
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
label14
.
Location
=
new
System
.
Drawing
.
Point
(
27
,
55
);
this
.
label14
.
Name
=
"label14"
;
this
.
label14
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
20
);
this
.
label14
.
Size
=
new
System
.
Drawing
.
Size
(
35
,
17
);
this
.
label14
.
TabIndex
=
239
;
this
.
label14
.
Text
=
"地址:"
;
this
.
label14
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
...
...
@@ -348,7 +348,7 @@ namespace AutoScanAndLabel
this
.
txtWriteTime
.
Location
=
new
System
.
Drawing
.
Point
(
242
,
52
);
this
.
txtWriteTime
.
MaxLength
=
10
;
this
.
txtWriteTime
.
Name
=
"txtWriteTime"
;
this
.
txtWriteTime
.
Size
=
new
System
.
Drawing
.
Size
(
72
,
2
7
);
this
.
txtWriteTime
.
Size
=
new
System
.
Drawing
.
Size
(
72
,
2
3
);
this
.
txtWriteTime
.
TabIndex
=
238
;
this
.
txtWriteTime
.
Text
=
"0"
;
//
...
...
@@ -371,7 +371,7 @@ namespace AutoScanAndLabel
this
.
label5
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
label5
.
Location
=
new
System
.
Drawing
.
Point
(
162
,
55
);
this
.
label5
.
Name
=
"label5"
;
this
.
label5
.
Size
=
new
System
.
Drawing
.
Size
(
74
,
20
);
this
.
label5
.
Size
=
new
System
.
Drawing
.
Size
(
60
,
17
);
this
.
label5
.
TabIndex
=
237
;
this
.
label5
.
Text
=
"定时(ms):"
;
this
.
label5
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
...
...
@@ -421,7 +421,7 @@ namespace AutoScanAndLabel
this
.
cmbWriteIO
.
FormattingEnabled
=
true
;
this
.
cmbWriteIO
.
Location
=
new
System
.
Drawing
.
Point
(
24
,
18
);
this
.
cmbWriteIO
.
Name
=
"cmbWriteIO"
;
this
.
cmbWriteIO
.
Size
=
new
System
.
Drawing
.
Size
(
278
,
32
);
this
.
cmbWriteIO
.
Size
=
new
System
.
Drawing
.
Size
(
278
,
27
);
this
.
cmbWriteIO
.
TabIndex
=
234
;
this
.
cmbWriteIO
.
ValueMember
=
"ProName"
;
this
.
cmbWriteIO
.
DrawItem
+=
new
System
.
Windows
.
Forms
.
DrawItemEventHandler
(
this
.
cmbWriteIO_DrawItem
);
...
...
@@ -433,12 +433,12 @@ namespace AutoScanAndLabel
this
.
tableLayoutPanel2
.
ColumnCount
=
1
;
this
.
tableLayoutPanel2
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
());
this
.
tableLayoutPanel2
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
tableLayoutPanel2
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
21
);
this
.
tableLayoutPanel2
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
17
);
this
.
tableLayoutPanel2
.
Name
=
"tableLayoutPanel2"
;
this
.
tableLayoutPanel2
.
RowCount
=
2
;
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
,
7
38
);
this
.
tableLayoutPanel2
.
Size
=
new
System
.
Drawing
.
Size
(
292
,
7
42
);
this
.
tableLayoutPanel2
.
TabIndex
=
103
;
//
// groupBox4
...
...
AutoScanAndLabel/SettingControl.Designer.cs
查看文件 @
a2bfff0
...
...
@@ -46,6 +46,7 @@ namespace AutoScanAndLabel
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
cb_EnableBuzzer
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
cb_IgnoreGratingSignal
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
checkBox1
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
uC_U11
=
new
AutoScanAndLabel
.
UC_U1
();
this
.
listEditControl1
=
new
AutoScanAndLabel
.
UC
.
ListEditControl
();
this
.
listEdit_pn
=
new
AutoScanAndLabel
.
UC
.
ListEditControl
();
...
...
@@ -62,12 +63,13 @@ namespace AutoScanAndLabel
this
.
groupBox1
.
Controls
.
Add
(
this
.
btn_labeledit
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
cb_labelselect
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
cb_printerselect
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
432
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
383
,
160
);
this
.
groupBox1
.
TabIndex
=
0
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"打印设置"
;
this
.
groupBox1
.
Visible
=
false
;
//
// label2
//
...
...
@@ -102,7 +104,7 @@ namespace AutoScanAndLabel
this
.
cb_labelselect
.
FormattingEnabled
=
true
;
this
.
cb_labelselect
.
Location
=
new
System
.
Drawing
.
Point
(
134
,
75
);
this
.
cb_labelselect
.
Name
=
"cb_labelselect"
;
this
.
cb_labelselect
.
Size
=
new
System
.
Drawing
.
Size
(
198
,
2
6
);
this
.
cb_labelselect
.
Size
=
new
System
.
Drawing
.
Size
(
198
,
2
0
);
this
.
cb_labelselect
.
TabIndex
=
0
;
this
.
cb_labelselect
.
SelectedIndexChanged
+=
new
System
.
EventHandler
(
this
.
cb_labelselect_SelectedIndexChanged
);
//
...
...
@@ -111,23 +113,23 @@ namespace AutoScanAndLabel
this
.
cb_printerselect
.
FormattingEnabled
=
true
;
this
.
cb_printerselect
.
Location
=
new
System
.
Drawing
.
Point
(
134
,
37
);
this
.
cb_printerselect
.
Name
=
"cb_printerselect"
;
this
.
cb_printerselect
.
Size
=
new
System
.
Drawing
.
Size
(
198
,
2
6
);
this
.
cb_printerselect
.
Size
=
new
System
.
Drawing
.
Size
(
198
,
2
0
);
this
.
cb_printerselect
.
TabIndex
=
0
;
this
.
cb_printerselect
.
SelectedIndexChanged
+=
new
System
.
EventHandler
(
this
.
cb_printerselect_SelectedIndexChanged
);
//
// chbAutoRun
//
this
.
chbAutoRun
.
AutoSize
=
true
;
this
.
chbAutoRun
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
169
);
this
.
chbAutoRun
.
Location
=
new
System
.
Drawing
.
Point
(
27
,
23
);
this
.
chbAutoRun
.
Name
=
"chbAutoRun"
;
this
.
chbAutoRun
.
Size
=
new
System
.
Drawing
.
Size
(
124
,
22
);
this
.
chbAutoRun
.
Size
=
new
System
.
Drawing
.
Size
(
48
,
16
);
this
.
chbAutoRun
.
TabIndex
=
1
;
this
.
chbAutoRun
.
Text
=
"开机
自启动
"
;
this
.
chbAutoRun
.
Text
=
"开机"
;
this
.
chbAutoRun
.
UseVisualStyleBackColor
=
true
;
//
// btn_labelDebug
//
this
.
btn_labelDebug
.
Location
=
new
System
.
Drawing
.
Point
(
402
,
163
);
this
.
btn_labelDebug
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
355
);
this
.
btn_labelDebug
.
Name
=
"btn_labelDebug"
;
this
.
btn_labelDebug
.
Size
=
new
System
.
Drawing
.
Size
(
140
,
28
);
this
.
btn_labelDebug
.
TabIndex
=
2
;
...
...
@@ -162,7 +164,7 @@ namespace AutoScanAndLabel
//
this
.
txt_code
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
24
);
this
.
txt_code
.
Name
=
"txt_code"
;
this
.
txt_code
.
Size
=
new
System
.
Drawing
.
Size
(
264
,
2
8
);
this
.
txt_code
.
Size
=
new
System
.
Drawing
.
Size
(
264
,
2
1
);
this
.
txt_code
.
TabIndex
=
5
;
//
// btn_codetest
...
...
@@ -197,7 +199,7 @@ namespace AutoScanAndLabel
//
// button1
//
this
.
button1
.
Location
=
new
System
.
Drawing
.
Point
(
36
,
553
);
this
.
button1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
389
);
this
.
button1
.
Name
=
"button1"
;
this
.
button1
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button1
.
TabIndex
=
10
;
...
...
@@ -209,9 +211,9 @@ namespace AutoScanAndLabel
// cb_EnableBuzzer
//
this
.
cb_EnableBuzzer
.
AutoSize
=
true
;
this
.
cb_EnableBuzzer
.
Location
=
new
System
.
Drawing
.
Point
(
124
,
169
);
this
.
cb_EnableBuzzer
.
Location
=
new
System
.
Drawing
.
Point
(
27
,
55
);
this
.
cb_EnableBuzzer
.
Name
=
"cb_EnableBuzzer"
;
this
.
cb_EnableBuzzer
.
Size
=
new
System
.
Drawing
.
Size
(
124
,
22
);
this
.
cb_EnableBuzzer
.
Size
=
new
System
.
Drawing
.
Size
(
84
,
16
);
this
.
cb_EnableBuzzer
.
TabIndex
=
13
;
this
.
cb_EnableBuzzer
.
Text
=
"使用蜂鸣器"
;
this
.
cb_EnableBuzzer
.
UseVisualStyleBackColor
=
true
;
...
...
@@ -220,14 +222,25 @@ namespace AutoScanAndLabel
// cb_IgnoreGratingSignal
//
this
.
cb_IgnoreGratingSignal
.
AutoSize
=
true
;
this
.
cb_IgnoreGratingSignal
.
Location
=
new
System
.
Drawing
.
Point
(
2
54
,
16
9
);
this
.
cb_IgnoreGratingSignal
.
Location
=
new
System
.
Drawing
.
Point
(
2
7
,
8
9
);
this
.
cb_IgnoreGratingSignal
.
Name
=
"cb_IgnoreGratingSignal"
;
this
.
cb_IgnoreGratingSignal
.
Size
=
new
System
.
Drawing
.
Size
(
142
,
22
);
this
.
cb_IgnoreGratingSignal
.
Size
=
new
System
.
Drawing
.
Size
(
96
,
16
);
this
.
cb_IgnoreGratingSignal
.
TabIndex
=
11
;
this
.
cb_IgnoreGratingSignal
.
Text
=
"忽略安全光栅"
;
this
.
cb_IgnoreGratingSignal
.
UseVisualStyleBackColor
=
true
;
this
.
cb_IgnoreGratingSignal
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
cb_IgnoreGratingSignal_CheckedChanged
);
//
// checkBox1
//
this
.
checkBox1
.
AutoSize
=
true
;
this
.
checkBox1
.
Location
=
new
System
.
Drawing
.
Point
(
27
,
126
);
this
.
checkBox1
.
Name
=
"checkBox1"
;
this
.
checkBox1
.
Size
=
new
System
.
Drawing
.
Size
(
168
,
16
);
this
.
checkBox1
.
TabIndex
=
14
;
this
.
checkBox1
.
Text
=
"忽略安全检查(含安全光栅)"
;
this
.
checkBox1
.
UseVisualStyleBackColor
=
true
;
this
.
checkBox1
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
checkBox1_CheckedChanged
);
//
// uC_U11
//
this
.
uC_U11
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
...
...
@@ -237,16 +250,17 @@ namespace AutoScanAndLabel
this
.
uC_U11
.
Name
=
"uC_U11"
;
this
.
uC_U11
.
Size
=
new
System
.
Drawing
.
Size
(
678
,
150
);
this
.
uC_U11
.
TabIndex
=
9
;
this
.
uC_U11
.
Visible
=
false
;
//
// listEditControl1
//
this
.
listEditControl1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
listEditControl1
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
listEditControl1
.
ListFile
=
"config/qty.list"
;
this
.
listEditControl1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
24
);
this
.
listEditControl1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
17
);
this
.
listEditControl1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
5
);
this
.
listEditControl1
.
Name
=
"listEditControl1"
;
this
.
listEditControl1
.
Size
=
new
System
.
Drawing
.
Size
(
354
,
20
1
);
this
.
listEditControl1
.
Size
=
new
System
.
Drawing
.
Size
(
354
,
20
8
);
this
.
listEditControl1
.
TabIndex
=
3
;
this
.
listEditControl1
.
DataRefresh
+=
new
System
.
EventHandler
(
this
.
listEdit_pn_DataRefresh
);
//
...
...
@@ -255,16 +269,17 @@ namespace AutoScanAndLabel
this
.
listEdit_pn
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
listEdit_pn
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
listEdit_pn
.
ListFile
=
"config/pn.list"
;
this
.
listEdit_pn
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
24
);
this
.
listEdit_pn
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
17
);
this
.
listEdit_pn
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
5
);
this
.
listEdit_pn
.
Name
=
"listEdit_pn"
;
this
.
listEdit_pn
.
Size
=
new
System
.
Drawing
.
Size
(
354
,
15
1
);
this
.
listEdit_pn
.
Size
=
new
System
.
Drawing
.
Size
(
354
,
15
8
);
this
.
listEdit_pn
.
TabIndex
=
3
;
this
.
listEdit_pn
.
DataRefresh
+=
new
System
.
EventHandler
(
this
.
listEdit_pn_DataRefresh
);
//
// SettingControl
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
Controls
.
Add
(
this
.
checkBox1
);
this
.
Controls
.
Add
(
this
.
cb_EnableBuzzer
);
this
.
Controls
.
Add
(
this
.
cb_IgnoreGratingSignal
);
this
.
Controls
.
Add
(
this
.
button1
);
...
...
@@ -310,5 +325,6 @@ namespace AutoScanAndLabel
private
System
.
Windows
.
Forms
.
Button
button1
;
private
System
.
Windows
.
Forms
.
CheckBox
cb_EnableBuzzer
;
private
System
.
Windows
.
Forms
.
CheckBox
cb_IgnoreGratingSignal
;
private
System
.
Windows
.
Forms
.
CheckBox
checkBox1
;
}
}
AutoScanAndLabel/SettingControl.cs
查看文件 @
a2bfff0
...
...
@@ -215,5 +215,10 @@ namespace AutoScanAndLabel
Config
.
Set
(
"EnableBuzzer"
,
cb_EnableBuzzer
.
Checked
);
AlarmBuzzer
.
Enable
=
cb_EnableBuzzer
.
Checked
;
}
private
void
checkBox1_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
RobotManage
.
IgnoreSafecheck
((
sender
as
CheckBox
).
Checked
);
}
}
}
AutoScanAndLabel/resources/en-US.lngres
查看文件 @
a2bfff0
...
...
@@ -100,7 +100,7 @@ Form1_tabControl1___IOControl_groupBox1_Text DO写入 DO Write
Form1_tabControl1___IOControl_groupBox3_Text DI列表 DI List
Form1_tabControl1___IOControl_groupBox4_Text DO列表 DO List
Form1_tabControl1___SettingControl_btn_labelConfig._Text 贴标调试 Label Config.
Form1_tabControl1___SettingControl_chbAutoRun_Text 开机
自启动 Auto Start
Form1_tabControl1___SettingControl_chbAutoRun_Text 开机
Power On
Form1_tabControl1___SettingControl_groupBox1_btn_labeledit_Text 标签编辑 Label Editing
Form1_tabControl1___SettingControl_groupBox1_label1_Text 打印机 Printer
Form1_tabControl1___SettingControl_groupBox1_label2_Text 标签名 Label Name
...
...
@@ -143,7 +143,7 @@ Form1_tabControl1_Res0008__IOControl_groupBox4_Text DO列表 DO List
Form1_tabControl1_Res0009__AxisControl_panel1_configControl1_btnSavePos_Text 全部保存 Save All
Form1_tabControl1_Res0009__AxisControl_panel1_configControl1_groupBox3_Text 点位列表 Positions List
Form1_tabControl1_Res0010__SettingControl_btn_labelConfig._Text 贴标调试 Label Config.
Form1_tabControl1_Res0010__SettingControl_chbAutoRun_Text 开机
自启动 Auto Start
Form1_tabControl1_Res0010__SettingControl_chbAutoRun_Text 开机
Power On
Form1_tabControl1_Res0010__SettingControl_groupBox1_btn_labeledit_Text 标签编辑 Label Editing
Form1_tabControl1_Res0010__SettingControl_groupBox1_label1_Text 打印机 Printer
Form1_tabControl1_Res0010__SettingControl_groupBox1_label2_Text 标签名 Label Name
...
...
@@ -192,7 +192,7 @@ Form1_tabControl1_tabPage1_cb_EnableBuzzer_Text 使用蜂鸣器 Use Buzzer
Form1_tabControl1_tabPage1_cb_IgnoreGratingSignal_Text 忽略安全光栅 Ignore Safety Light Curtain
Form1_tabControl1_tabPage1_cb_IgnoreSafecheck_Text 忽略安全检查(含安全光栅) Ignore Safety Check (Including Light Curtain)
Form1_tabControl1_tabPage1_groupBox1_Text 运行状态 Running Status
Form1_tabControl1_tabPage1_Text
信息 Info
Form1_tabControl1_tabPage1_Text
状态 Status
FrmCodeDecode_btnAn_Text 变暗 Dimming
FrmCodeDecode_btnbarCode_Text 一维码识别 1D Barcode Recognition
FrmCodeDecode_btnCameraImage_Text 相机获取图片 Capture Image From Camera
...
...
@@ -215,7 +215,7 @@ FrmCodeDecode_lblCount_Text 条码数量: Barcode Quantity
FrmCodeDecode_Text 二维码识别 QR Barcode Recognition
FrmCodeDecode_label6_Text 图片识别结果 Image recognition results:
FrmCodeDecode_butt_cameracode_Text 获取相机图片及条码 Obtain camera images and barcodes
FrmCodeDecode_check_issaveimage_Text 是否保存图片
Is Image Sav
e
FrmCodeDecode_check_issaveimage_Text 是否保存图片
Save Imag
e
FrmCodeDecode_button_optionfeil_Text 选择文件夹 Option Folder
FrmLabel_BtnFieldAdd_Text 字段添加 Add Field
FrmLabel_BtnFieldDel_Text 字段删除 Delete Field
...
...
@@ -332,10 +332,10 @@ Res0004 时间 Time
Res0005 模块 Module
Res0006 步骤 Step
Res0007 日志 Log
Res0008 I
O调试 IO Config.
Res0008 I
/O I/O
Res0009 伺服调试 Servo Config.
Res0010 相关设置 Related Settings
Res0011
启用
配置模式 Enable Config. Mode
Res0011 配置模式 Enable Config. Mode
Res0012 停用配置模式 Disable Config. Mode
Res0013 暂停运行 Pause Execution
Res0014 恢复运行 Resume Execution
...
...
@@ -363,7 +363,7 @@ Res0035 已呼叫AGV,不能重复呼叫 AGV Cannot Be Called Repeatedly.
Res0036 移载 Move
Res0037 温湿度传感器[ Temperature And Humidity Sensor
Res0038 本机IP:[ Local IP:
Res0039 入
口取料 LP Picking
Res0039 入
料口 Feed inlet
Res0040 出口空闲中 UP Available
Res0041 本机IP Local IP
Res0042 移栽 Remove
...
...
@@ -375,7 +375,7 @@ Res0047 抓料失败请手动处理,请将料盘放入:NG箱,按入口按钮继
Res0048 抓料失败请手动处理,请将料盘放入: 出口料串,按入口按钮继续 Loading Failed, Please Puting Stacker And Press The LP Button.
Res0049 等待出口允许放料 Wait For UP Release
Res0050 等待吸盘放松 Waiting Sucker Released
Res0051 出
口放料 UP Release
Res0051 出
料口 Discharge port
Res0052 贴标 ReLabel
Res0053 重置 Reset
Res0054 可能与贴标Y轴干涉 Possible Label Interference Y-Axis
...
...
@@ -425,7 +425,7 @@ Res0097 抓料失败请手动处理,请将料盘放入: 左侧料串,按右侧
Res0098 等待左侧允许放料 Waiting For Left Side To Allow Stacker Placement
Res0099 等待料盘取走 Waiting For Reel Removal
Res0100 ,料串已清空. Stacker Empty
Res0101
启用
配置模式 Config. Mode
Res0101 配置模式 Config. Mode
Res0102 吸盘夹紧 Vacumm Gripper Tightened
Res0103 吸盘放松 Vacumm Gripper Released
Res0104 等待 Waiting
...
...
@@ -516,4 +516,22 @@ Form1_tabControl1_Res0009__AxisControl_panel1_configControl1_groupBox3_tableLayo
Label_XOffset 贴标X轴偏移量 Labeling X-axis offset
Label_YOffset 贴标Y轴偏移量 Labeling Y-axis offset
Form1_tabControl1_Res0008__IOControl_groupBox3_tableLayoutPanel1_IO_RightCar_Check_label1_Text X11_进料口料车检测 Inspection of feeding port material truck
Form1_tabControl1_Res0008__IOControl_groupBox4_tableLayoutPanel2_IO_RightMoto_Reverse_label1_Text Y09_进料口电机反转指令 Input port motor reverse command
\ No newline at end of file
Form1_tabControl1_Res0008__IOControl_groupBox4_tableLayoutPanel2_IO_RightMoto_Reverse_label1_Text Y09_进料口电机反转指令 Input port motor reverse command
Form1_tabControl1_tabPage1_groupBox4_Text 入料口 Feed inlet
Form1_tabControl1_tabPage1_groupBox4_btn_releaserightshelf_Text 释放料串 Release Material String
Form1_tabControl1_tabPage1_groupBox4_btn_maulstart_Text 手动上料 Manual Feeding
Form1_tabControl1_tabPage1_groupBox3_Text 出料口 Discharge Port
Form1_tabControl1_tabPage1_groupBox3_btn_releaseleftshelf_Text 释放料串 Release Material String
Form1_tabControl1_tabPage1_groupBox3_btn_leftempty_Text 手动上料 Manual Feeding
menuStrip1_打印设置ToolStripMenuItem_Text 打印设置 Print Settings
设备操作ToolStripMenuItem_打开ToolStripMenuItem_Text 打开 Open
设备操作ToolStripMenuItem_关闭ToolStripMenuItem_Text 关闭 Close
Form1_tabControl1_Res0010__SettingControl_checkBox1_Text 忽略安全检查(含安全光栅) Ignore Safety Check (Including Safety Grating)
AgvRequest_FeedPort 进料口AGV请求应答 Feed Port AGV Request Response
AgvRequest_Outlet 出料口AGV请求应答 Discharge Port AGV Request Response
AxisMoveControl_groupAxis_panel1_cmbAxis_Text 进料提升轴 Feed Lifting Shaft
FrmLabelSettings_FrmLabelSettings_Text 标签设置 Label Settings
FrmLabelSettings_btn_labeledit_Text 标签编辑 Label Editing
FrmLabelSettings_label2_Text 标签名 Label Name
FrmLabelSettings_label1_Text 打印机 Printer
FrmLabel_label7_Text 字段属性 Field Properties
AutoScanAndLabel/resources/zh-CN.lngres
查看文件 @
a2bfff0
...
...
@@ -100,7 +100,7 @@ Form1_tabControl1___IOControl_groupBox1_Text DO写入 DO写入
Form1_tabControl1___IOControl_groupBox3_Text DI列表 DI列表
Form1_tabControl1___IOControl_groupBox4_Text DO列表 DO列表
Form1_tabControl1___SettingControl_btn_labelConfig._Text 贴标调试 贴标调试
Form1_tabControl1___SettingControl_chbAutoRun_Text 开机
自启动 开机自启动
Form1_tabControl1___SettingControl_chbAutoRun_Text 开机
开机
Form1_tabControl1___SettingControl_groupBox1_btn_labeledit_Text 标签编辑 标签编辑
Form1_tabControl1___SettingControl_groupBox1_label1_Text 打印机 打印机
Form1_tabControl1___SettingControl_groupBox1_label2_Text 标签名 标签名
...
...
@@ -143,7 +143,7 @@ Form1_tabControl1_Res0008__IOControl_groupBox4_Text DO列表 DO列表
Form1_tabControl1_Res0009__AxisControl_panel1_configControl1_btnSavePos_Text 全部保存 全部保存
Form1_tabControl1_Res0009__AxisControl_panel1_configControl1_groupBox3_Text 点位列表 点位列表
Form1_tabControl1_Res0010__SettingControl_btn_labelConfig._Text 贴标调试 贴标调试
Form1_tabControl1_Res0010__SettingControl_chbAutoRun_Text 开机
自启动 开机自启动
Form1_tabControl1_Res0010__SettingControl_chbAutoRun_Text 开机
开机
Form1_tabControl1_Res0010__SettingControl_groupBox1_btn_labeledit_Text 标签编辑 标签编辑
Form1_tabControl1_Res0010__SettingControl_groupBox1_label1_Text 打印机 打印机
Form1_tabControl1_Res0010__SettingControl_groupBox1_label2_Text 标签名 标签名
...
...
@@ -191,8 +191,8 @@ Form1_tabControl1_tabPage1_btn_releaserightshelf_Text 安全释放入口料串
Form1_tabControl1_tabPage1_cb_EnableBuzzer_Text 使用蜂鸣器 使用蜂鸣器
Form1_tabControl1_tabPage1_cb_IgnoreGratingSignal_Text 忽略安全光栅 忽略安全光栅
Form1_tabControl1_tabPage1_cb_IgnoreSafecheck_Text 忽略安全检查(含安全光栅) 忽略安全检查(含安全光栅)
Form1_tabControl1_tabPage1_groupBox1_Text
运行状态 运行
状态
Form1_tabControl1_tabPage1_Text
消息 消息
Form1_tabControl1_tabPage1_groupBox1_Text
硬件状态 硬件
状态
Form1_tabControl1_tabPage1_Text
状态 状态
FrmCodeDecode_btnAn_Text 变暗 变暗
FrmCodeDecode_btnbarCode_Text 一维码识别 一维码识别
FrmCodeDecode_btnCameraImage_Text 相机获取图片 相机获取图片
...
...
@@ -229,7 +229,7 @@ FrmLabel_grpDsc_Text 字段说明 字段说明
FrmLabel_Text 标签编辑 标签编辑
FrmLabel_label_labelsize_Text 标签尺寸: 标签尺寸:
FrmLabel_groupBox1_Text 字段说明 字段说明
FrmLabel_label5_Text
高: 高
:
FrmLabel_label5_Text
长: 长
:
FrmLabel_label6_Text 宽: 宽:
menuStrip1_关于ToolStripMenuItem_Text 关于 关于
menuStrip1_设备操作ToolStripMenuItem_Text 设备操作 设备操作
...
...
@@ -332,10 +332,10 @@ Res0004 时间 时间
Res0005 模块 模块
Res0006 步骤 步骤
Res0007 日志 日志
Res0008 I
O调试 IO调试
Res0008 I
/O I/O
Res0009 伺服调试 伺服调试
Res0010 相关设置 相关设置
Res0011
启用配置模式 启用
配置模式
Res0011
配置模式
配置模式
Res0012 停用配置模式 停用配置模式
Res0013 暂停运行 暂停运行
Res0014 恢复运行 恢复运行
...
...
@@ -363,7 +363,7 @@ Res0035 已呼叫AGV,不能重复呼叫 已呼叫AGV,不能重复呼叫
Res0036 移载 移载
Res0037 温湿度传感器[ 温湿度传感器[
Res0038 本机IP:[ 本机IP:[
Res0039 入
口取料 入口取料
Res0039 入
料口 入料口
Res0040 出口空闲中 出口空闲中
Res0041 本机IP 本机IP
Res0042 移栽 移栽
...
...
@@ -375,7 +375,7 @@ Res0047 抓料失败请手动处理,请将料盘放入:NG箱,按入口按钮继
Res0048 抓料失败请手动处理,请将料盘放入: 出口料串,按入口按钮继续 抓料失败请手动处理,请将料盘放入: 出口料串,按入口按钮继续
Res0049 等待出口允许放料 等待出口允许放料
Res0050 等待吸盘放松 等待吸盘放松
Res0051 出
口放料 出口放料
Res0051 出
料口 出料口
Res0052 贴标 贴标
Res0053 重置 重置
Res0054 可能与贴标Y轴干涉 可能与贴标Y轴干涉
...
...
@@ -425,7 +425,7 @@ Res0097 抓料失败请手动处理,请将料盘放入: 左侧料串,按右侧
Res0098 等待左侧允许放料 等待左侧允许放料
Res0099 等待料盘取走 等待料盘取走
Res0100 ,料串已清空. ,料串已清空.
Res0101
启用配置模式 启用
配置模式
Res0101
配置模式
配置模式
Res0102 吸盘夹紧 吸盘夹紧
Res0103 吸盘放松 吸盘放松
Res0104 等待 等待
...
...
Common/CodeResourceControl.cs
查看文件 @
a2bfff0
...
...
@@ -283,13 +283,15 @@ namespace OnlineStore
}
private
static
void
PreControlLanaguage
(
Control
partentControl
,
string
class
Name
)
{
string
newStr
=
""
;
//Con_GetTxt(partentControl, out string title);
//string newStr = GetString(GetTextIdStr(className, partentControl.Name), title);
//if (!newStr.Equals(""))
//{
//Con_SetTxt(partentControl, newStr.Replace("\\n", "\n"));
//}
if
(
class
Name
.
IndexOf
(
'_'
)
<
0
)
{
Con_GetTxt
(
partentControl
,
out
string
title
);
string
newStr
=
GetString
(
GetTextIdStr
(
class
Name
,
partentControl
.
Name
),
title
);
if
(!
newStr
.
Equals
(
""
))
{
Con_SetTxt
(
partentControl
,
newStr
.
Replace
(
"\\n"
,
"\n"
));
}
}
foreach
(
Control
con
in
partentControl
.
Controls
)
{
string
txt
=
""
;
...
...
@@ -302,7 +304,7 @@ namespace OnlineStore
if
(
Con_GetTxt
(
con
,
out
txt
))
{
newStr
=
GetString
(
GetTextIdStr
(
class
Name
,
con
.
Name
),
txt
);
string
newStr
=
GetString
(
GetTextIdStr
(
class
Name
,
con
.
Name
),
txt
);
if
(!
newStr
.
Equals
(
""
))
{
Con_SetTxt
(
con
,
newStr
.
Replace
(
"\\n"
,
"\n"
));
...
...
DeviceLibrary/AutoScanAndLabel/MainMachine _LeftProcess.cs
查看文件 @
a2bfff0
...
...
@@ -7,6 +7,7 @@ using System.Collections.Generic;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Data
;
namespace
DeviceLibrary
{
...
...
@@ -45,40 +46,35 @@ namespace DeviceLibrary
var
currpos
=
Left_Batch_Axis
.
GetAclPosition
();
if
(
currpos
<=
Config
.
Left_Batch_P1
)
{
//LeftShelfNoTray = true;
LeftMoveInfo
.
NextMoveStep
(
MoveStep
.
L40_ShelfFull
);
LeftMoveInfo
.
log
(
$
"批量轴已下降到底,料串已满,Left_Batch_P1={Config.Left_Batch_P1},needpos={currpos}"
);
}
else
{
LeftMoveInfo
.
NextMoveStep
(
MoveStep
.
L10_WaitReelPut
);
//Left_Batch_Axis.AbsMove(LeftMoveInfo, currpos, Config.Left_Batch_P1_speed);
//LeftMoveInfo.log($"批量轴已下降一张料盘位置,等待料盘放入,needpos={currpos}");
}
break
;
case
MoveStep
.
L10_WaitReelPut
:
case
MoveStep
.
L10_WaitReelPut
:
Msg
.
add
(
crc
.
GetString
(
"Res0095"
,
"左侧空闲中"
),
MsgLevel
.
info
);
break
;
case
MoveStep
.
L11_ReelPutted
:
LeftCount
++;
LeftMoveInfo
.
NextMoveStep
(
MoveStep
.
L12
);
//LeftBatchAxisToP1();
LeftBatchAxisDown
();
LabelMoveInfo
.
MoveParam
=
LeftMoveInfo
.
MoveParam
.
clone
();
//LeftMoveInfo.log($"料盘已放入,批量轴上升,LeftStartMovePosition={LeftStartMovePosition}");
LeftMoveInfo
.
log
(
$
"左侧料盘已放入,批量轴下降固定值"
);
break
;
case
MoveStep
.
L12
:
LeftMoveInfo
.
NextMoveStep
(
MoveStep
.
L13
);
LeftBatchAxisToP2
(
false
);
//LeftBatchAxisToP2(false);
LeftAxisRiseMax
();
LeftMoveInfo
.
log
(
$
"批量轴上升到P2位置,LeftStartMovePosition={LeftStartMovePosition}"
);
break
;
case
MoveStep
.
L13
:
//LabelMoveInfo.MoveParam = LeftMoveInfo.MoveParam.clone();
LeftMoveInfo
.
NextMoveStep
(
MoveStep
.
L20_WaitLabel
);
LeftMoveInfo
.
log
(
$
"批量轴完成上升,等待贴标"
);
break
;
case
MoveStep
.
L20_WaitLabel
:
case
MoveStep
.
L20_WaitLabel
:
break
;
case
MoveStep
.
L30_LabelFinish
:
if
(
SafeReleaseLeftShelf
)
...
...
@@ -99,7 +95,7 @@ namespace DeviceLibrary
LeftShelfNoTray
=
true
;
LeftMoveInfo
.
NextMoveStep
(
MoveStep
.
LEND
);
Left_Batch_Axis
.
AbsMove
(
LeftMoveInfo
,
Config
.
Left_Batch_P1
,
Config
.
Left_Batch_P1_speed
);
if
(
ConfigHelper
.
Config
.
Get
(
"UseAGVTransferShelf"
,
false
))
//是否用AGV运输料串
if
(
ConfigHelper
.
Config
.
Get
(
"UseAGVTransferShelf"
,
false
))
//是否用AGV运输料串
{
LeftMoveInfo
.
log
(
$
"料串已满,批量轴下降到P1位置"
);
}
...
...
@@ -201,7 +197,6 @@ namespace DeviceLibrary
LeftMoveInfo
.
log
(
$
"未找到对应步骤:{LeftMoveInfo.MoveStep}"
);
break
;
}
}
string
LeftState
()
{
...
...
@@ -240,7 +235,7 @@ namespace DeviceLibrary
}
LeftMoveInfo
.
log
(
"BatchAxisToP2 目标P2: "
+
targetP2
+
"("
+
currPosition
+
")"
);
}
targetSpeed
=
(
int
)(
Config
.
Left_Batch_P2_speed
*
0.7
);
targetSpeed
=
(
int
)(
Config
.
Left_Batch_P2_speed
*
0.7
);
}
LeftMoveInfo
.
TimeOutSeconds
=
200
;
LeftMoveInfo
.
CanWhileCount
=
0
;
...
...
@@ -277,12 +272,40 @@ namespace DeviceLibrary
{
int
targetP1
=
Left_Batch_Axis
.
GetAclPosition
()
-
ConfigHelper
.
Config
.
Get
(
"LeftAxisDownValue"
,
50
)
*
Config
.
Left_Batch_ChangeValue
;
int
targetSpeed
=
Config
.
Left_Batch_P1_speed
;
if
(
targetP1
<=
0
)
if
(
targetP1
<=
0
)
{
LeftMoveInfo
.
log
(
"出料提升机构,下降固定值小于0,设置回到0原点。"
);
targetP1
=
0
;
}
LeftMoveInfo
.
log
(
$
"出料提升机构,下降固定值为{targetP1}脉冲!"
);
Left_Batch_Axis
.
AbsMove
(
LeftMoveInfo
,
targetP1
,
targetSpeed
);
}
/// <summary>
/// 下降在上升以后,上升指定阈值,防止感应器失效
/// </summary>
void
LeftAxisRiseMax
()
{
//1.获取当前私服下降后的脉冲
LeftStartMovePosition
=
Left_Batch_Axis
.
GetAclPosition
();
//2.获取下降的高度、冗余高度、一毫米的脉冲值
int
downvalue
=
ConfigHelper
.
Config
.
Get
(
"LeftAxisDownValue"
,
50
);
int
redundancy
=
ConfigHelper
.
Config
.
Get
(
"LeftAxisRiseRedundancyValue"
,
10
);
int
change
=
Config
.
Left_Batch_ChangeValue
;
int
totalpulse
=(
downvalue
+
redundancy
)*
change
;
int
targetP2
=
LeftStartMovePosition
+
totalpulse
;
LeftMoveInfo
.
log
(
$
"下降固定值后提升,感应器亮或提升固定值:当前私服高度={LeftStartMovePosition},下降的固定高度={downvalue},"
+
$
"上升最大高度={redundancy},每毫米脉冲={change},上升脉冲为{targetP2},P2={Config.Left_Batch_P2}"
);
int
targetSpeed
=
Config
.
Left_Batch_P2_speed
;
LeftMoveInfo
.
TimeOutSeconds
=
200
;
LeftMoveInfo
.
CanWhileCount
=
0
;
// 需要增加定时器,获取验证信号并停止伺服
LeftMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxisMove
(
Config
.
Left_Batch_Axis
,
targetP2
,
targetSpeed
));
Config
.
Left_Batch_Axis
.
TargetPosition
=
targetP2
;
Left_Batch_Axis
.
AbsMove
(
null
,
targetP2
,
targetSpeed
);
//开始检测信号
Left_Batch_Axis
.
BatchAxisStartCheck
(
IO_Type
.
LeftTop_Check
,
IO_VALUE
.
HIGH
);
}
}
}
\ No newline at end of file
DeviceLibrary/AutoScanAndLabel/MainMachine _MiddleProcess.cs
查看文件 @
a2bfff0
...
...
@@ -162,7 +162,6 @@ namespace DeviceLibrary
MiddleMoveInfo
.
log
(
"等待左侧允许放料"
);
Msg
.
add
(
crc
.
GetString
(
"Res0098"
,
"等待左侧允许放料"
),
MsgLevel
.
info
);
}
break
;
case
MoveStep
.
M08
:
MiddleMoveInfo
.
NextMoveStep
(
MoveStep
.
M09
);
...
...
DeviceLibrary/AutoScanAndLabel/MainMachine _RightProcess.cs
查看文件 @
a2bfff0
...
...
@@ -36,16 +36,7 @@ namespace DeviceLibrary
RightMoveInfo
.
log
(
$
"批量轴上升到P2位置,二次提升,RightStartMovePosition={RightStartMovePosition}"
);
break
;
case
MoveStep
.
R03
:
//if (IOValue(IO_Type.RightOverHead_Check).Equals(IO_VALUE.HIGH))
//{
// RightMoveInfo.NextMoveStep(MoveStep.R02);
// Right_Batch_Axis.AbsMove(RightMoveInfo, RightStartMovePosition, Config.Right_Batch_P2_speed);
// RightMoveInfo.log($"批量轴上升过头,下降到:RightStartMovePosition={RightStartMovePosition}");
//}
//else
{
RightMoveInfo
.
NextMoveStep
(
MoveStep
.
R04
);
}
break
;
case
MoveStep
.
R04
:
if
(
IOValue
(
IO_Type
.
RightTop_Check
).
Equals
(
IO_VALUE
.
HIGH
)
&&
RightShelfNoTray
.
Equals
(
false
))
...
...
@@ -53,7 +44,6 @@ namespace DeviceLibrary
if
(
MiddleMoveInfo
.
MoveStep
>=
MoveStep
.
M09
||
MiddleMoveInfo
.
MoveStep
<
MoveStep
.
M02
)
{
RightMoveInfo
.
NextMoveStep
(
MoveStep
.
R06_GettedReelInfo
);
//GetHeight();
ScanCode
();
RightMoveInfo
.
log
(
$
"扫码开始"
);
//并获取上一盘料高度,LastHeight={LastHeight}
}
...
...
@@ -131,7 +121,6 @@ namespace DeviceLibrary
if
(
SafeReleaseRightShelf
)
{
SafeReleaseRightShelf
=
false
;
RightMoveInfo
.
NextMoveStep
(
MoveStep
.
R12_ShelfNoTray
);
RightMoveInfo
.
log
(
$
"用户请求释放料架."
);
}
...
...
@@ -279,9 +268,6 @@ namespace DeviceLibrary
void
ScanCode
()
{
RightMoveInfo
.
log
(
"开始扫码"
);
//RightMoveInfo.OneWaitCanEndStep = true;
//RightMoveInfo.WaitList.Add(WaitResultInfo.WaitScanCode());
//RightMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
try
{
RightScanTask
=
Task
.
Run
(
new
Func
<(
List
<
CodeInfo
>,
Dictionary
<
string
,
string
>,
string
,
Dictionary
<
string
,
int
>)>(()
=>
...
...
DeviceLibrary/AutoScanAndLabel/MainMachine.cs
查看文件 @
a2bfff0
...
...
@@ -76,12 +76,12 @@ namespace DeviceLibrary
Config
=
_config
;
RightMoveInfo
=
new
MoveInfo
(
crc
.
GetString
(
"Res0039"
,
"
右侧取料
"
));
RightMoveInfo
=
new
MoveInfo
(
crc
.
GetString
(
"Res0039"
,
"
入料口
"
));
RightMoveInfo
.
SetStateDelegate
(
RightState
);
MiddleMoveInfo
=
new
MoveInfo
(
crc
.
GetString
(
"Res0042"
,
"移栽"
));
MiddleMoveInfo
.
SetStateDelegate
(
MiddleState
);
LeftMoveInfo
=
new
MoveInfo
(
crc
.
GetString
(
"Res0051"
,
"
左侧放料
"
));
LeftMoveInfo
=
new
MoveInfo
(
crc
.
GetString
(
"Res0051"
,
"
出料口
"
));
LeftMoveInfo
.
SetStateDelegate
(
LeftState
);
LabelMoveInfo
=
new
MoveInfo
(
crc
.
GetString
(
"Res0052"
,
"贴标"
));
LabelMoveInfo
.
SetStateDelegate
(
LabelState
);
...
...
DeviceLibrary/DeviceLibrary/CodeManager.cs
查看文件 @
a2bfff0
...
...
@@ -245,7 +245,6 @@ namespace DeviceLibrary
{
LogUtil
.
error
(
" 扫码出现AccessViolationException异常,关闭相机【"
+
cameraName
+
"】:"
+
e
.
ToString
());
Camera
.
_cam
.
Close
(
cameraName
);
// GC.Collect();
}
catch
(
Exception
ex
)
{
...
...
@@ -263,13 +262,10 @@ namespace DeviceLibrary
catch
(
AccessViolationException
e
)
{
LogUtil
.
error
(
" 扫码出现AccessViolationException异常:"
+
e
.
ToString
());
//throw new Exception("扫码出现AccessViolationException异常");
// GC.Collect();
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
" 扫码出错:"
+
ex
.
ToString
());
//throw new Exception("扫码出错");
}
return
(
codeList
,
keyword
,
bitmapfilename
,
newpointanlge
);
}
...
...
DeviceLibrary/DeviceLibrary/PrinterHelper.cs
查看文件 @
a2bfff0
...
...
@@ -16,23 +16,35 @@ namespace DeviceLibrary
{
public
Asa
.
PrintLabel
print
;
ZebraPrinterHelper
.
ZebraManger
zebraManger
;
string
Port
;
public
bool
istscprin
=
ConfigHelper
.
Config
.
Get
(
"Hardwareversion"
,
"V2"
)
==
"V2"
;
int
dpi
=
100
;
public
static
bool
istscprin
=
ConfigHelper
.
Config
.
Get
(
"Hardwareversion"
,
"V2"
)==
"V2"
;
public
PrintDevice
printDevice
=
ConfigHelper
.
Config
.
Get
(
"PrintDevice"
,
istscprin
?
PrintDevice
.
TSC
:
PrintDevice
.
Zebra
);
public
enum
PrintDevice
{
TSC
,
Zebra
,
Windows
}
public
PrinterHelper
()
{
print
=
new
Asa
.
PrintLabel
(
Application
.
StartupPath
+
"\\Label"
,
300
);
if
(
printDevice
!=
PrintDevice
.
Windows
)
{
dpi
=
300
;
}
print
=
new
Asa
.
PrintLabel
(
Application
.
StartupPath
+
"\\Label"
,
dpi
);
}
public
static
CustPrinterStatus
LastPrintStatus
=
CustPrinterStatus
.
Unknown
;
public
bool
Connection
(
string
port
)
{
Port
=
port
;
if
(
istscprin
)
if
(
printDevice
==
PrintDevice
.
TSC
||
printDevice
==
PrintDevice
.
Windows
)
{
print
=
new
Asa
.
PrintLabel
(
Application
.
StartupPath
+
"\\Label"
,
300
);
print
=
new
Asa
.
PrintLabel
(
Application
.
StartupPath
+
"\\Label"
,
dpi
);
return
true
;
}
else
else
if
(
printDevice
==
PrintDevice
.
Zebra
)
{
//默认使用老打印机
zebraManger
=
new
ZebraPrinterHelper
.
ZebraManger
(
""
,
ZebraPrinterHelper
.
ConnectionType
.
UsbDirect
);
...
...
@@ -44,6 +56,7 @@ namespace DeviceLibrary
}
return
true
;
}
return
false
;
}
public
void
Close
()
{
...
...
@@ -61,7 +74,7 @@ namespace DeviceLibrary
public
bool
Print
(
string
labelname
,
Dictionary
<
string
,
string
>
data
,
out
string
msg
)
{
print
.
LoadLabel
(
labelname
);
if
(
istscprin
)
if
(
printDevice
==
PrintDevice
.
TSC
)
{
LogUtil
.
error
(
$
"TSC_打印数据:{JsonHelper.SerializeObject(data)}"
);
TscConfig
tscConfig
=
new
TscConfig
();
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论