Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO815-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 6a94653a
由
刘韬
编写于
2021-11-05 15:39:30 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
优化
1 个父辈
42429c38
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
19 个修改的文件
包含
256 行增加
和
78 行删除
source/ACSingleStore/App.config
source/ACSingleStore/AutoInOutStore.csproj
source/ACSingleStore/FrmIOStatus.Designer.cs
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/Program.cs
source/ACSingleStore/Properties/AssemblyInfo.cs
source/ACSingleStore/app.manifest
source/ACSingleStore/userControl/AxisMoveControl.Designer.cs
source/ACSingleStore/userControl/AxisTipControl.cs
source/ACSingleStore/userControl/AxisTipControl.designer.cs
source/ACSingleStore/userControl/uc_boxdebug.Designer.cs
source/Common/Setting_Init.cs
source/DeviceLibrary/DeviceLibrary/halcon/CodeManager.cs
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
source/DeviceLibrary/store/StoreMoveStep.cs
source/ACSingleStore/App.config
查看文件 @
6a94653
...
...
@@ -4,6 +4,7 @@
<
section
name
=
"log4net"
type
=
"log4net.Config.Log4NetConfigurationSectionHandler,log4net"
/>
</
configSections
>
<
appSettings
>
<
add
key
=
"EnableWindowsFormsHighDpiAutoResizing"
value
=
"false"
/>
<!--是否开机自动启动料仓-->
<
add
key
=
"App_AutoRun"
value
=
"1"
/>
<
add
key
=
"App_Title"
value
=
"料仓_批量上下料"
/>
...
...
source/ACSingleStore/AutoInOutStore.csproj
查看文件 @
6a94653
...
...
@@ -52,6 +52,9 @@
<PropertyGroup>
<ApplicationIcon>box.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="CodeLibrary, Version=1.0.7635.28877, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
...
...
@@ -190,6 +193,7 @@
<EmbeddedResource Include="userControl\uc_boxdebug.resx">
<DependentUpon>uc_boxdebug.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.manifest" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
...
...
source/ACSingleStore/FrmIOStatus.Designer.cs
查看文件 @
6a94653
此文件的差异被折叠,
点击展开。
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
6a94653
此文件的差异太大,无法显示。
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
6a94653
...
...
@@ -1140,6 +1140,9 @@ namespace OnlineStore.AutoInOutStore
}
IOManager
.
IOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
HIGH
);
CodeLibrary
.
FrmCodeDecode
frm
=
new
FrmCodeDecode
();
frm
.
chbZxing
.
Checked
=
false
;
frm
.
chbZxing
.
Visible
=
false
;
frm
.
ShowDialog
();
IOManager
.
IOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
LOW
);
}
...
...
source/ACSingleStore/Program.cs
查看文件 @
6a94653
...
...
@@ -94,6 +94,7 @@ namespace OnlineStore.AutoInOutStore
if
(!
isShow
)
{
XmlConfigurator
.
Configure
();
SetProcessDPIAware
();
Application
.
EnableVisualStyles
();
Application
.
SetCompatibleTextRenderingDefault
(
false
);
#if PositionTool
...
...
@@ -113,6 +114,9 @@ namespace OnlineStore.AutoInOutStore
#endif
}
}
[
System
.
Runtime
.
InteropServices
.
DllImport
(
"user32.dll"
)]
private
static
extern
bool
SetProcessDPIAware
();
static
void
CurrentDomain_UnhandledException
(
object
sender
,
UnhandledExceptionEventArgs
e
)
{
LogUnhandledException
(
e
.
ExceptionObject
);
...
...
source/ACSingleStore/Properties/AssemblyInfo.cs
查看文件 @
6a94653
...
...
@@ -9,7 +9,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SO815-AutoInOutStore-newui
edf7e3d07d3c8cafa890a08f4b855e559a36d414
")]
[assembly: AssemblyProduct("SO815-AutoInOutStore-newui
42429c38bd4866dbdd9596cbe2cadc4059c732d2
")]
[assembly: AssemblyCopyright("edf7e3d07d3c8cafa890a08f4b855e559a36d414")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
...
...
source/ACSingleStore/app.manifest
0 → 100644
查看文件 @
6a94653
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC 清单选项
如果想要更改 Windows 用户帐户控制级别,请使用
以下节点之一替换 requestedExecutionLevel 节点。n
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
指定 requestedExecutionLevel 元素将禁用文件和注册表虚拟化。
如果你的应用程序需要此虚拟化来实现向后兼容性,则删除此
元素。
-->
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- 设计此应用程序与其一起工作且已针对此应用程序进行测试的
Windows 版本的列表。取消评论适当的元素,
Windows 将自动选择最兼容的环境。 -->
<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
<!-- Windows 7 -->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
<!-- Windows 10 -->
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
</application>
</compatibility>
<!-- 指示该应用程序可感知 DPI 且 Windows 在 DPI 较高时将不会对其进行
自动缩放。Windows Presentation Foundation (WPF)应用程序自动感知 DPI,无需
选择加入。选择加入此设置的 Windows 窗体应用程序(面向 .NET Framework 4.6)还应
在其 app.config 中将 "EnableWindowsFormsHighDpiAutoResizing" 设置设置为 "true"。
将应用程序设为感知长路径。请参阅 https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>
<!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->
</assembly>
source/ACSingleStore/userControl/AxisMoveControl.Designer.cs
查看文件 @
6a94653
...
...
@@ -31,6 +31,7 @@
this
.
components
=
new
System
.
ComponentModel
.
Container
();
this
.
groupAxis
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
lblAlarmcode
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label4
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblhomeSts
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
...
...
@@ -99,7 +100,6 @@
this
.
txtAxisDeviceName
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lblServerOn
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
lblAlarmcode
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupAxis
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
...
...
@@ -119,7 +119,7 @@
this
.
groupAxis
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupAxis
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
3
);
this
.
groupAxis
.
Name
=
"groupAxis"
;
this
.
groupAxis
.
Size
=
new
System
.
Drawing
.
Size
(
69
2
,
395
);
this
.
groupAxis
.
Size
=
new
System
.
Drawing
.
Size
(
69
6
,
395
);
this
.
groupAxis
.
TabIndex
=
218
;
this
.
groupAxis
.
TabStop
=
false
;
this
.
groupAxis
.
Text
=
"伺服运动"
;
...
...
@@ -159,6 +159,17 @@
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"轴状态监控"
;
//
// lblAlarmcode
//
this
.
lblAlarmcode
.
AutoSize
=
true
;
this
.
lblAlarmcode
.
Location
=
new
System
.
Drawing
.
Point
(
433
,
65
);
this
.
lblAlarmcode
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
2
,
0
,
2
,
0
);
this
.
lblAlarmcode
.
Name
=
"lblAlarmcode"
;
this
.
lblAlarmcode
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
17
);
this
.
lblAlarmcode
.
TabIndex
=
19
;
this
.
lblAlarmcode
.
Text
=
"错误码:160"
;
this
.
lblAlarmcode
.
Visible
=
false
;
//
// label4
//
this
.
label4
.
AutoSize
=
true
;
...
...
@@ -941,23 +952,12 @@
this
.
timer1
.
Interval
=
1000
;
this
.
timer1
.
Tick
+=
new
System
.
EventHandler
(
this
.
timer1_Tick
);
//
// lblAlarmcode
//
this
.
lblAlarmcode
.
AutoSize
=
true
;
this
.
lblAlarmcode
.
Location
=
new
System
.
Drawing
.
Point
(
433
,
65
);
this
.
lblAlarmcode
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
2
,
0
,
2
,
0
);
this
.
lblAlarmcode
.
Name
=
"lblAlarmcode"
;
this
.
lblAlarmcode
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
17
);
this
.
lblAlarmcode
.
TabIndex
=
19
;
this
.
lblAlarmcode
.
Text
=
"错误码:160"
;
this
.
lblAlarmcode
.
Visible
=
false
;
//
// AxisMoveControl
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
Controls
.
Add
(
this
.
groupAxis
);
this
.
Name
=
"AxisMoveControl"
;
this
.
Size
=
new
System
.
Drawing
.
Size
(
699
,
402
);
this
.
Size
=
new
System
.
Drawing
.
Size
(
703
,
402
);
this
.
groupAxis
.
ResumeLayout
(
false
);
this
.
groupAxis
.
PerformLayout
();
this
.
groupBox2
.
ResumeLayout
(
false
);
...
...
source/ACSingleStore/userControl/AxisTipControl.cs
查看文件 @
6a94653
...
...
@@ -62,23 +62,72 @@ public partial class AxisTipControl : FrmBase
comjSpeed
.
Items
.
Add
(
targetSpeed
*
i
/
10
);
}
comjSpeed
.
SelectedIndex
=
4
;
comjSpeed
.
KeyUp
+=
ComjSpeed_KeyUp
;
SetRelList
((
int
)
comjSpeed
.
SelectedItem
);
//【2】读取轴状态,如果读取出错将关闭此定时器
AxisSts
sts
=
HCBoardManager
.
GetAxisSts
(
SlvAddr
);
if
(
sts
.
ServoOn
<
0
)
{
showToolTip
(
"伺服尚未使能"
,
c
);
return
;
//
return;
}
if
(
sts
.
ALM
!=
0
||
sts
.
WARN
!=
0
||
sts
.
EMG
!=
0
)
{
showToolTip
(
"伺服警报状态中"
,
c
);
return
;
//
return;
}
readPosition
();
this
.
Show
();
LanguageProcess
();
}
private
void
ComjSpeed_KeyUp
(
object
sender
,
KeyEventArgs
e
)
{
if
(!
int
.
TryParse
(
comjSpeed
.
Text
,
out
_
))
{
//e.Handled = false;
return
;
}
SetRelList
(
int
.
Parse
(
comjSpeed
.
Text
));
}
private
void
ComjSpeed_KeyPress
(
object
sender
,
KeyPressEventArgs
e
)
{
}
void
SetRelList
(
int
speed
)
{
flowLayoutPanel1
.
Controls
.
Clear
();
int
[]
zoom
=
new
int
[]
{
1
,
3
,
5
,
7
,
9
,
11
};
for
(
int
i
=
0
;
i
<
zoom
.
Length
;
i
++)
{
Button
b
=
new
Button
();
b
.
Size
=
new
Size
(
60
,
30
);
var
bs
=
(
int
)
Math
.
Floor
(
speed
/
(
decimal
)
zoom
[
i
]);
b
.
Text
=
"+"
+
bs
.
ToString
();
b
.
Tag
=
bs
;
b
.
Click
+=
B_Click
;
flowLayoutPanel1
.
Controls
.
Add
(
b
);
}
for
(
int
i
=
0
;
i
<
zoom
.
Length
;
i
++)
{
Button
b
=
new
Button
();
b
.
Size
=
new
Size
(
60
,
30
);
var
bs
=
(
int
)
Math
.
Floor
(
speed
/
(
decimal
)
zoom
[
zoom
.
Length
-
i
-
1
])
*-
1
;
b
.
Text
=
bs
.
ToString
();
b
.
Tag
=
bs
;
b
.
Click
+=
B_Click
;
flowLayoutPanel1
.
Controls
.
Add
(
b
);
}
}
private
void
B_Click
(
object
sender
,
EventArgs
e
)
{
var
b
=
sender
as
Button
;
int
pos
=
(
int
)
b
.
Tag
;
LogUtil
.
info
(
"【"
+
PortName
+
"_"
+
SlvAddr
+
"】相对运动: 点位:"
+
pos
);
AxisManager
.
RelMove
(
PortName
,
SlvAddr
,
pos
,
targetSpeed
,
targetSpeed
*
3
,
targetSpeed
*
3
);
}
void
showToolTip
(
string
txt
,
Control
control
)
{
var
m_ToolTip
=
new
ToolTip
();
m_ToolTip
.
ToolTipIcon
=
ToolTipIcon
.
Warning
;
...
...
@@ -191,5 +240,15 @@ public partial class AxisTipControl : FrmBase
c
.
Text
=
textBox_pos
.
Text
;
this
.
Close
();
}
private
void
AxisTipControl_Load
(
object
sender
,
EventArgs
e
)
{
}
private
void
comjSpeed_SelectedIndexChanged
(
object
sender
,
EventArgs
e
)
{
SetRelList
((
int
)
comjSpeed
.
SelectedItem
);
}
}
source/ACSingleStore/userControl/AxisTipControl.designer.cs
查看文件 @
6a94653
...
...
@@ -36,17 +36,20 @@ partial class AxisTipControl
this
.
label_position
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btn_ok
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btn_cancel
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
flowLayoutPanel1
=
new
System
.
Windows
.
Forms
.
FlowLayoutPanel
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox1
.
SuspendLayout
();
this
.
SuspendLayout
();
//
// comjSpeed
//
this
.
comjSpeed
.
DropDownStyle
=
System
.
Windows
.
Forms
.
ComboBoxStyle
.
DropDownList
;
this
.
comjSpeed
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
comjSpeed
.
FormattingEnabled
=
true
;
this
.
comjSpeed
.
Location
=
new
System
.
Drawing
.
Point
(
155
,
8
);
this
.
comjSpeed
.
Name
=
"comjSpeed"
;
this
.
comjSpeed
.
Size
=
new
System
.
Drawing
.
Size
(
116
,
28
);
this
.
comjSpeed
.
TabIndex
=
339
;
this
.
comjSpeed
.
SelectedIndexChanged
+=
new
System
.
EventHandler
(
this
.
comjSpeed_SelectedIndexChanged
);
//
// btnDelMove
//
...
...
@@ -55,7 +58,7 @@ partial class AxisTipControl
this
.
btnDelMove
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnDelMove
.
Location
=
new
System
.
Drawing
.
Point
(
155
,
42
);
this
.
btnDelMove
.
Name
=
"btnDelMove"
;
this
.
btnDelMove
.
Size
=
new
System
.
Drawing
.
Size
(
116
,
45
);
this
.
btnDelMove
.
Size
=
new
System
.
Drawing
.
Size
(
116
,
32
);
this
.
btnDelMove
.
TabIndex
=
338
;
this
.
btnDelMove
.
Text
=
"点动-"
;
this
.
btnDelMove
.
UseVisualStyleBackColor
=
false
;
...
...
@@ -69,7 +72,7 @@ partial class AxisTipControl
this
.
btnAddMove
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnAddMove
.
Location
=
new
System
.
Drawing
.
Point
(
14
,
42
);
this
.
btnAddMove
.
Name
=
"btnAddMove"
;
this
.
btnAddMove
.
Size
=
new
System
.
Drawing
.
Size
(
116
,
45
);
this
.
btnAddMove
.
Size
=
new
System
.
Drawing
.
Size
(
116
,
32
);
this
.
btnAddMove
.
TabIndex
=
337
;
this
.
btnAddMove
.
Text
=
"点动+"
;
this
.
btnAddMove
.
UseVisualStyleBackColor
=
false
;
...
...
@@ -87,14 +90,14 @@ partial class AxisTipControl
//
// textBox_pos
//
this
.
textBox_pos
.
Location
=
new
System
.
Drawing
.
Point
(
155
,
94
);
this
.
textBox_pos
.
Location
=
new
System
.
Drawing
.
Point
(
155
,
216
);
this
.
textBox_pos
.
Name
=
"textBox_pos"
;
this
.
textBox_pos
.
Size
=
new
System
.
Drawing
.
Size
(
116
,
23
);
this
.
textBox_pos
.
TabIndex
=
340
;
//
// label_position
//
this
.
label_position
.
Location
=
new
System
.
Drawing
.
Point
(
38
,
94
);
this
.
label_position
.
Location
=
new
System
.
Drawing
.
Point
(
38
,
216
);
this
.
label_position
.
Name
=
"label_position"
;
this
.
label_position
.
Size
=
new
System
.
Drawing
.
Size
(
111
,
20
);
this
.
label_position
.
TabIndex
=
336
;
...
...
@@ -103,7 +106,7 @@ partial class AxisTipControl
//
// btn_ok
//
this
.
btn_ok
.
Location
=
new
System
.
Drawing
.
Point
(
181
,
123
);
this
.
btn_ok
.
Location
=
new
System
.
Drawing
.
Point
(
181
,
245
);
this
.
btn_ok
.
Name
=
"btn_ok"
;
this
.
btn_ok
.
Size
=
new
System
.
Drawing
.
Size
(
90
,
33
);
this
.
btn_ok
.
TabIndex
=
341
;
...
...
@@ -113,7 +116,7 @@ partial class AxisTipControl
//
// btn_cancel
//
this
.
btn_cancel
.
Location
=
new
System
.
Drawing
.
Point
(
16
,
123
);
this
.
btn_cancel
.
Location
=
new
System
.
Drawing
.
Point
(
16
,
245
);
this
.
btn_cancel
.
Name
=
"btn_cancel"
;
this
.
btn_cancel
.
Size
=
new
System
.
Drawing
.
Size
(
90
,
33
);
this
.
btn_cancel
.
TabIndex
=
341
;
...
...
@@ -121,11 +124,30 @@ partial class AxisTipControl
this
.
btn_cancel
.
UseVisualStyleBackColor
=
true
;
this
.
btn_cancel
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_cancel_Click
);
//
// flowLayoutPanel1
//
this
.
flowLayoutPanel1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
flowLayoutPanel1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
19
);
this
.
flowLayoutPanel1
.
Name
=
"flowLayoutPanel1"
;
this
.
flowLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
269
,
108
);
this
.
flowLayoutPanel1
.
TabIndex
=
342
;
//
// groupBox1
//
this
.
groupBox1
.
Controls
.
Add
(
this
.
flowLayoutPanel1
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
13
,
80
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
275
,
130
);
this
.
groupBox1
.
TabIndex
=
343
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"相对运动"
;
//
// AxisTipControl
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
17F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
293
,
166
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
300
,
291
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
btn_cancel
);
this
.
Controls
.
Add
(
this
.
btn_ok
);
this
.
Controls
.
Add
(
this
.
textBox_pos
);
...
...
@@ -140,6 +162,8 @@ partial class AxisTipControl
this
.
Name
=
"AxisTipControl"
;
this
.
ShowIcon
=
false
;
this
.
ShowInTaskbar
=
false
;
this
.
Load
+=
new
System
.
EventHandler
(
this
.
AxisTipControl_Load
);
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
...
...
@@ -155,4 +179,6 @@ partial class AxisTipControl
private
System
.
Windows
.
Forms
.
Label
label_position
;
private
System
.
Windows
.
Forms
.
Button
btn_ok
;
private
System
.
Windows
.
Forms
.
Button
btn_cancel
;
private
System
.
Windows
.
Forms
.
FlowLayoutPanel
flowLayoutPanel1
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
}
source/ACSingleStore/userControl/uc_boxdebug.Designer.cs
查看文件 @
6a94653
此文件的差异被折叠,
点击展开。
source/Common/Setting_Init.cs
查看文件 @
6a94653
...
...
@@ -116,5 +116,7 @@ namespace OnlineStore.Common
public
static
string
Tool_TargetSpeed
=
"Tool_TargetSpeed"
;
public
static
string
Tool_TargetPosition
=
"Tool_TargetPosition"
;
public
static
string
code_block_size_list
=
"code_block_size_list"
;
public
static
string
DisableFixTray
=
"DisableFixTray"
;
public
static
string
InOutFixPos
=
"InOutFixPos"
;
}
}
source/DeviceLibrary/DeviceLibrary/halcon/CodeManager.cs
查看文件 @
6a94653
...
...
@@ -172,7 +172,7 @@ namespace OnlineStore.DeviceLibrary
Bitmap
bmp
=
null
;
try
{
bool
nohalcon
=
tru
e
;
bool
nohalcon
=
fals
e
;
ho_Image
=
Camera
.
_cam
.
CaptureOnImage
(
cameraName
,
out
bmp
,
nohalcon
);
if
(
ho_Image
==
null
&&
!
nohalcon
)
{
...
...
@@ -182,54 +182,25 @@ namespace OnlineStore.DeviceLibrary
}
LogUtil
.
info
(
" 【"
+
cameraName
+
"】取图片完成,开始扫码"
);
string
r
=
""
;
foreach
(
int
codesize
in
Code_Block_Size_List
)
RemoteDecodeHelper
.
RemoteDecodeParam
remoteDecodeParam
=
new
RemoteDecodeHelper
.
RemoteDecodeParam
{
if
(
codeList
.
Count
>
0
)
break
;
List
<
CodeInfo
>
tlci
=
EyemDecode
.
Decoder
(
ref
bmp
,
null
,
codesize
);
foreach
(
CodeInfo
code
in
tlci
)
{
LogUtil
.
info
(
" 【"
+
cameraName
+
"】[eyemDecode]"
+
code
.
CodeType
+
"(X: "
+
code
.
X
+
",Y: "
+
code
.
Y
+
") "
+
code
.
CodeStr
);
string
str
=
CodeManager
.
ReplaceCode
(
code
.
CodeStr
);
lock
(
codeList
)
{
if
(!
codeList
.
Contains
(
str
))
{
codeList
.
Add
(
str
);
r
=
r
+
"##"
+
str
;
}
}
}
}
/*
* List<CodeInfo> cc = new List<CodeInfo>();
foreach (string codeType in codeTypeList)
codeTypeList
=
codeTypeList
.
ToArray
(),
codeCount
=
codeCount
,
timeout
=
4000
};
var
cc
=
RemoteDecodeHelper
.
DecodeRequest
(
bmp
,
remoteDecodeParam
);
if
(
cc
!=
null
)
{
//判断是否是一维码
if (codeType.ToLower().Equals("barcode"))
{
cc = HDCodeHelper.DecodeBarCode(ho_Image);
}
else
{
cc = HDCodeHelper.DecodeCode(ho_Image, codeType, GetCodeParamFilePath(codeType), codeCount, 2000);
}
foreach
(
CodeInfo
c
in
cc
)
{
string
str
=
CodeManager
.
ReplaceCode
(
c
.
CodeStr
);
lock (codeList
)
if
(!
codeList
.
Contains
(
str
)
)
{
if (!codeList.Contains(str))
{
codeList.Add(str);
r = r + "##" + str;
}
codeList
.
Add
(
str
);
r
=
r
+
"##"
+
str
;
}
}
}
*/
if
(
codeList
.
Count
()
==
0
)
{
SaveImageToFile
(
"mimo"
,
cameraName
,
bmp
);
...
...
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
查看文件 @
6a94653
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
6a94653
...
...
@@ -872,6 +872,8 @@ namespace OnlineStore.DeviceLibrary
return
false
;
}
}
bool
DisableFixTray
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
DisableFixTray
).
Equals
(
1
);
int
InOutFixPos
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
InOutFixPos
);
LineMoveP
movePfix
=
new
LineMoveP
();
protected
override
void
OutStoreProcess
()
{
...
...
@@ -988,7 +990,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_07_CheckFix
)
{
if
(
StoreMove
.
IsBatchInOutStore
&&
StoreMove
.
MoveParam
!=
null
)
if
(
!
DisableFixTray
&&
StoreMove
.
IsBatchInOutStore
&&
StoreMove
.
MoveParam
!=
null
)
{
var
fixposid
=
$
"1#AC1_0A_99_{StoreMove.MoveParam.PlagtW}"
;
var
fixposition
=
CSVPositionReader
<
AutoStorePosition
>.
GetPositon
(
fixposid
);
...
...
@@ -1007,8 +1009,8 @@ namespace OnlineStore.DeviceLibrary
movePfix
.
UpDown_P1
=
Config
.
GetUpDownP1
(
StoreMove
.
MoveParam
.
PlateH
);
movePfix
.
ComPress_P2
=
fixposition
.
CompressAxis_Position
_P2
;
movePfix
.
ComPress_P3
=
fixposition
.
CompressAxis_CPosition
_P3
;
movePfix
.
ComPress_P2
=
moveP
.
ComPress
_P2
;
movePfix
.
ComPress_P3
=
moveP
.
ComPress
_P3
;
movePfix
.
InOut_P3
=
fixposition
.
InOutAxis_Position_P3
;
movePfix
.
Middle_P2
=
fixposition
.
MiddleAxis_Position_P2
;
movePfix
.
UpDown_P3
=
fixposition
.
UpDownAxis_IHPosition_P3
;
...
...
@@ -1039,16 +1041,23 @@ namespace OnlineStore.DeviceLibrary
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_07_CheckFix_02
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_07_CheckFix_03
);
InStoreLog
(
"出库:库位修正 叉子进入库位中,进出轴至P3(修正库位取放料点) "
);
ACAxisMove
(
Config
.
InOut_Axis
,
movePfix
.
InOut_P3
,
Config
.
InOutAxis_P3_Speed
);
InStoreLog
(
"出库:库位修正 叉子进入库位中,进出轴至Fix(修正库位取放料点) "
);
ACAxisMove
(
Config
.
InOut_Axis
,
movePfix
.
InOut_P3
+
InOutFixPos
,
Config
.
InOutAxis_P3_Speed
);
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_07_CheckFix_03
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_07_CheckFix_04
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_07_CheckFix_04
_inoutp3
);
InStoreLog
(
"出库:库位修正 压紧轴释放,升降轴到P4 "
);
ComMoveToPosition
(
movePfix
.
ComPress_P3
,
Config
.
CompAxis_P3_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
movePfix
.
UpDown_P4
,
Config
.
UpDownAxis_P4_Speed
);
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_07_CheckFix_04_inoutp3
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_07_CheckFix_04
);
InStoreLog
(
"出库:库位修正 进出轴到P3 "
);
ACAxisMove
(
Config
.
InOut_Axis
,
movePfix
.
InOut_P3
,
Config
.
InOutAxis_P3_Speed
);
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_07_CheckFix_04
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_07_CheckFix_05
);
...
...
@@ -1194,7 +1203,7 @@ namespace OnlineStore.DeviceLibrary
//如果可以直接下降,则不需要匀速上升
int
targetValue
=
GetBatchTargetValue
(
StoreMove
.
MoveParam
.
MoveP
.
BatchAxis_DownValue
);
if
(
targetValue
>=
290600
)
if
(
targetValue
>=
(
Config
.
BatchAxis_P3
-
Config
.
BatchAxis_P2
)*
0.1
)
{
OutStoreLog
(
"出库:SO_02 批量上下料轴直接下降后目标位置【"
+
targetValue
+
"】不需要匀速上升 "
);
}
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
查看文件 @
6a94653
...
...
@@ -215,6 +215,7 @@ namespace OnlineStore.DeviceLibrary
{
return
;
}
bool
isClearAlarm
=
false
;
switch
(
StoreMove
.
MoveStep
)
{
case
StoreMoveStep
.
AUTO_R00_Start
:
...
...
@@ -224,13 +225,21 @@ namespace OnlineStore.DeviceLibrary
// IOManager.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
AutomaticBaiting
.
CylinderMove
(
IO_Type
.
Clamping_Work
,
IO_Type
.
Clamping_Relax
,
StoreMove
);
CylinderMove
(
IO_Type
.
ClampingDisc_Up
,
IO_Type
.
ClampingDisc_Down
,
true
);
if
(
ACServerManager
.
GetAlarmStatus
(
StoreManager
.
Config
.
Batch_Axis
.
DeviceName
,
StoreManager
.
Config
.
Batch_Axis
.
GetAxisValue
()).
Equals
(
1
))
{
isClearAlarm
=
true
;
LogUtil
.
debug
(
Name
+
"复位中:批量上下料轴清理报警"
);
ACServerManager
.
AlarmClear
(
StoreManager
.
Config
.
Batch_Axis
.
DeviceName
,
StoreManager
.
Config
.
Batch_Axis
.
GetAxisValue
());
Thread
.
Sleep
(
100
);
}
ACAxisRelMove
(
StoreManager
.
Config
.
Batch_Axis
,
AxisChangeValue
*
5
,
StoreManager
.
Config
.
BatchAxis_P2_Speed
);
LogUtil
.
info
(
Name
+
"复位中:关闭门锁"
);
break
;
case
StoreMoveStep
.
AUTO_R01_CloseDoor
:
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R02_AutoAxisHome
);
StoreMove
.
TimeOutSeconds
=
120
;
bool
isClearAlarm
=
false
;
isClearAlarm
=
false
;
if
(
ACServerManager
.
GetAlarmStatus
(
StoreManager
.
Config
.
Batch_Axis
.
DeviceName
,
StoreManager
.
Config
.
Batch_Axis
.
GetAxisValue
()).
Equals
(
1
))
{
isClearAlarm
=
true
;
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
查看文件 @
6a94653
...
...
@@ -34,9 +34,16 @@ namespace OnlineStore.DeviceLibrary
moveAxis
.
TargetPosition
=
targetPosition
;
ACServerManager
.
AbsMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
,
moveAxis
.
AddSpeed
,
moveAxis
.
DelSpeed
);
}
private
static
void
ACAxisRelMove
(
ConfigMoveAxis
moveAxis
,
int
targetPosition
,
int
targetSpeed
)
{
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxis
(
moveAxis
,
int
.
MaxValue
,
targetSpeed
));
moveAxis
.
TargetPosition
=
targetPosition
;
ACServerManager
.
RelMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
,
moveAxis
.
AddSpeed
,
moveAxis
.
DelSpeed
);
}
private
static
void
ACAxisHomeMove
(
ConfigMoveAxis
moveAxis
)
{
moveAxis
.
TargetPosition
=
0
;
LogUtil
.
debug
(
Name
+
moveAxis
.
DisplayStr
+
"speed["
+
moveAxis
.
TargetSpeed
+
"]开始原点返回"
);
ACServerManager
.
HomeMove
(
moveAxis
.
DeviceName
,
(
short
)
moveAxis
.
GetAxisValue
(),
moveAxis
.
HomeHighSpeed
,
moveAxis
.
HomeLowSpeed
,
moveAxis
.
HomeAddSpeed
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxis
(
moveAxis
,
true
));
...
...
@@ -59,7 +66,7 @@ namespace OnlineStore.DeviceLibrary
if
(
errorCount
<=
moveAxis
.
CanErrorCountMax
)
{
LogUtil
.
info
(
Name
+
moveAxis
.
DisplayStr
+
"回原已到位,当前位置["
+
outCount
+
"]最大允许误差["
+
moveAxis
.
CanErrorCountMax
+
"]"
);
//
ACServerManager.SuddenStop(moveAxis);
ACServerManager
.
SuddenStop
(
moveAxis
);
return
true
;
}
//判断是否需要重新运动
...
...
@@ -239,7 +246,12 @@ namespace OnlineStore.DeviceLibrary
string
deviceName
=
moveAxis
.
DeviceName
;
short
axisNo
=
moveAxis
.
GetAxisValue
();
bool
countError
=
false
;
bool
IsOk
=
AxisManager
.
instance
.
AbsMoveIsEnd
(
deviceName
,
axisNo
,
targetPosition
,
moveAxis
.
CanErrorCountMax
,
out
countError
,
out
int
IMP
);
bool
IsOk
;
int
IMP
=
0
;
if
(
targetPosition
==
int
.
MaxValue
)
IsOk
=
AxisManager
.
instance
.
GetBusyStatus
(
deviceName
,
axisNo
).
Equals
(
0
);
else
IsOk
=
AxisManager
.
instance
.
AbsMoveIsEnd
(
deviceName
,
axisNo
,
targetPosition
,
moveAxis
.
CanErrorCountMax
,
out
countError
,
out
IMP
);
if
(
IsOk
)
{
return
true
;
...
...
source/DeviceLibrary/store/StoreMoveStep.cs
查看文件 @
6a94653
...
...
@@ -246,6 +246,7 @@ namespace OnlineStore.DeviceLibrary
SO_07_CheckFix_01
,
SO_07_CheckFix_02
,
SO_07_CheckFix_03
,
SO_07_CheckFix_04_inoutp3
,
SO_07_CheckFix_04
,
SO_07_CheckFix_05
,
/// <summary>
...
...
@@ -291,11 +292,11 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 升降轴走到门口位置
/// </summary>
SO_21_OpenDoor
=
121
,
SO_21_OpenDoor
,
/// <summary>
/// 等待操作人员拿走料盘
/// </summary>
SO_22_WaitTrayGo
=
122
,
SO_22_WaitTrayGo
,
///// <summary>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论