Commit 1c2795a4 刘韬

1

1 个父辈 d0bf436c
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
...@@ -37,6 +37,9 @@ ...@@ -37,6 +37,9 @@
<PropertyGroup> <PropertyGroup>
<ApplicationIcon>icon.ico</ApplicationIcon> <ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Asa.PrintLabel"> <Reference Include="Asa.PrintLabel">
<HintPath>..\dll\Asa.PrintLabel.dll</HintPath> <HintPath>..\dll\Asa.PrintLabel.dll</HintPath>
...@@ -51,8 +54,9 @@ ...@@ -51,8 +54,9 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\增广夹爪\Rmaxis\bin\Debug\log4net.dll</HintPath> <HintPath>..\..\增广夹爪\Rmaxis\bin\Debug\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="Neotel.Rmaxis"> <Reference Include="RmaxisV2, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\dll\Neotel.Rmaxis.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\增广夹爪\RmaxisV2\bin\Debug\RmaxisV2.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
...@@ -164,6 +168,7 @@ ...@@ -164,6 +168,7 @@
<EmbeddedResource Include="UC\ListEditControl.resx"> <EmbeddedResource Include="UC\ListEditControl.resx">
<DependentUpon>ListEditControl.cs</DependentUpon> <DependentUpon>ListEditControl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<None Include="app.manifest" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput> <LastGenOutput>Settings.Designer.cs</LastGenOutput>
......
...@@ -58,6 +58,7 @@ namespace AutoScanAndLabel ...@@ -58,6 +58,7 @@ namespace AutoScanAndLabel
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.btn夹爪回原 = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox4.SuspendLayout(); this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
...@@ -68,6 +69,7 @@ namespace AutoScanAndLabel ...@@ -68,6 +69,7 @@ namespace AutoScanAndLabel
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.groupBox1.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.groupBox1.Controls.Add(this.btnCloseAll); this.groupBox1.Controls.Add(this.btnCloseAll);
this.groupBox1.Controls.Add(this.btn夹爪回原);
this.groupBox1.Controls.Add(this.btn夹爪夹紧); this.groupBox1.Controls.Add(this.btn夹爪夹紧);
this.groupBox1.Controls.Add(this.btn夹爪放松); this.groupBox1.Controls.Add(this.btn夹爪放松);
this.groupBox1.Controls.Add(this.btn右侧电滚筒停止); this.groupBox1.Controls.Add(this.btn右侧电滚筒停止);
...@@ -103,7 +105,7 @@ namespace AutoScanAndLabel ...@@ -103,7 +105,7 @@ namespace AutoScanAndLabel
// //
this.btnCloseAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnCloseAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCloseAll.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnCloseAll.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseAll.Location = new System.Drawing.Point(167, 515); this.btnCloseAll.Location = new System.Drawing.Point(166, 562);
this.btnCloseAll.Name = "btnCloseAll"; this.btnCloseAll.Name = "btnCloseAll";
this.btnCloseAll.Size = new System.Drawing.Size(125, 34); this.btnCloseAll.Size = new System.Drawing.Size(125, 34);
this.btnCloseAll.TabIndex = 302; this.btnCloseAll.TabIndex = 302;
...@@ -187,7 +189,7 @@ namespace AutoScanAndLabel ...@@ -187,7 +189,7 @@ namespace AutoScanAndLabel
// //
this.btn关闭设备光源.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn关闭设备光源.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn关闭设备光源.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btn关闭设备光源.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btn关闭设备光源.Location = new System.Drawing.Point(167, 461); this.btn关闭设备光源.Location = new System.Drawing.Point(166, 508);
this.btn关闭设备光源.Name = "btn关闭设备光源"; this.btn关闭设备光源.Name = "btn关闭设备光源";
this.btn关闭设备光源.Size = new System.Drawing.Size(125, 34); this.btn关闭设备光源.Size = new System.Drawing.Size(125, 34);
this.btn关闭设备光源.TabIndex = 293; this.btn关闭设备光源.TabIndex = 293;
...@@ -199,7 +201,7 @@ namespace AutoScanAndLabel ...@@ -199,7 +201,7 @@ namespace AutoScanAndLabel
// //
this.btn关闭相机光源.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn关闭相机光源.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn关闭相机光源.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btn关闭相机光源.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btn关闭相机光源.Location = new System.Drawing.Point(31, 461); this.btn关闭相机光源.Location = new System.Drawing.Point(30, 508);
this.btn关闭相机光源.Name = "btn关闭相机光源"; this.btn关闭相机光源.Name = "btn关闭相机光源";
this.btn关闭相机光源.Size = new System.Drawing.Size(125, 34); this.btn关闭相机光源.Size = new System.Drawing.Size(125, 34);
this.btn关闭相机光源.TabIndex = 290; this.btn关闭相机光源.TabIndex = 290;
...@@ -211,7 +213,7 @@ namespace AutoScanAndLabel ...@@ -211,7 +213,7 @@ namespace AutoScanAndLabel
// //
this.btn打开设备光源.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn打开设备光源.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn打开设备光源.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btn打开设备光源.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btn打开设备光源.Location = new System.Drawing.Point(167, 421); this.btn打开设备光源.Location = new System.Drawing.Point(166, 468);
this.btn打开设备光源.Name = "btn打开设备光源"; this.btn打开设备光源.Name = "btn打开设备光源";
this.btn打开设备光源.Size = new System.Drawing.Size(125, 34); this.btn打开设备光源.Size = new System.Drawing.Size(125, 34);
this.btn打开设备光源.TabIndex = 293; this.btn打开设备光源.TabIndex = 293;
...@@ -223,7 +225,7 @@ namespace AutoScanAndLabel ...@@ -223,7 +225,7 @@ namespace AutoScanAndLabel
// //
this.btn打开相机光源.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn打开相机光源.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn打开相机光源.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btn打开相机光源.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btn打开相机光源.Location = new System.Drawing.Point(31, 421); this.btn打开相机光源.Location = new System.Drawing.Point(30, 468);
this.btn打开相机光源.Name = "btn打开相机光源"; this.btn打开相机光源.Name = "btn打开相机光源";
this.btn打开相机光源.Size = new System.Drawing.Size(125, 34); this.btn打开相机光源.Size = new System.Drawing.Size(125, 34);
this.btn打开相机光源.TabIndex = 290; this.btn打开相机光源.TabIndex = 290;
...@@ -444,6 +446,18 @@ namespace AutoScanAndLabel ...@@ -444,6 +446,18 @@ namespace AutoScanAndLabel
this.tableLayoutPanel1.Size = new System.Drawing.Size(244, 718); this.tableLayoutPanel1.Size = new System.Drawing.Size(244, 718);
this.tableLayoutPanel1.TabIndex = 102; this.tableLayoutPanel1.TabIndex = 102;
// //
// btn夹爪回原
//
this.btn夹爪回原.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn夹爪回原.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btn夹爪回原.Location = new System.Drawing.Point(30, 412);
this.btn夹爪回原.Name = "btn夹爪回原";
this.btn夹爪回原.Size = new System.Drawing.Size(125, 34);
this.btn夹爪回原.TabIndex = 297;
this.btn夹爪回原.Text = "夹爪回原";
this.btn夹爪回原.UseVisualStyleBackColor = false;
this.btn夹爪回原.Click += new System.EventHandler(this.btn夹爪回原_Click);
//
// IOControl // IOControl
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
...@@ -494,5 +508,6 @@ namespace AutoScanAndLabel ...@@ -494,5 +508,6 @@ namespace AutoScanAndLabel
private System.Windows.Forms.Button btn关闭相机光源; private System.Windows.Forms.Button btn关闭相机光源;
private System.Windows.Forms.Button btn右侧电滚筒停止; private System.Windows.Forms.Button btn右侧电滚筒停止;
private System.Windows.Forms.Button btn左侧电滚筒停止; private System.Windows.Forms.Button btn左侧电滚筒停止;
private System.Windows.Forms.Button btn夹爪回原;
} }
} }
...@@ -292,5 +292,10 @@ namespace AutoScanAndLabel ...@@ -292,5 +292,10 @@ namespace AutoScanAndLabel
{ {
IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.LOW); IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.LOW);
} }
private void btn夹爪回原_Click(object sender, EventArgs e)
{
RobotManage.electricGripper.HomeReset();
}
} }
} }
<?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>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</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>
...@@ -50,8 +50,9 @@ ...@@ -50,8 +50,9 @@
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath> <HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="Neotel.Rmaxis"> <Reference Include="RmaxisV2, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\dll\Neotel.Rmaxis.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\增广夹爪\RmaxisV2\bin\Debug\RmaxisV2.dll</HintPath>
</Reference> </Reference>
<Reference Include="SdkApi.Core"> <Reference Include="SdkApi.Core">
<HintPath>..\dll\SdkApi.Core.dll</HintPath> <HintPath>..\dll\SdkApi.Core.dll</HintPath>
......
...@@ -56,7 +56,7 @@ namespace DeviceLibrary ...@@ -56,7 +56,7 @@ namespace DeviceLibrary
public static void SpeedMove(string portName, short slvAddr, int speed,int acc,int dec) public static void SpeedMove(string portName, short slvAddr, int speed,int acc,int dec)
{ {
instance.SpeedMove(portName, slvAddr, speed,acc,dec); instance.SpeedMove(portName, slvAddr, speed,0,0);
} }
public static void SuddenStop(string portName, short slvAddr) public static void SuddenStop(string portName, short slvAddr)
{ {
......
...@@ -36,7 +36,8 @@ namespace DeviceLibrary ...@@ -36,7 +36,8 @@ namespace DeviceLibrary
moveInfo.WaitList.Add(WaitResultInfo.WaitAction(new Func<WaitResultInfo, bool>(WaitAction),crc.GetString("Res0192","夹爪夹紧"))); moveInfo.WaitList.Add(WaitResultInfo.WaitAction(new Func<WaitResultInfo, bool>(WaitAction),crc.GetString("Res0192","夹爪夹紧")));
if (!IsBusy) if (!IsBusy)
{ {
axis.Push(ConfigHelper.Config.Get("ElectricGripperPushForce",40), 4.5f, 15); axis.ResetError();
axis.Push(ConfigHelper.Config.Get("ElectricGripperPushForce",40), 6f, 20);
clampTimes++; clampTimes++;
if (moveInfo != null) if (moveInfo != null)
moveInfo.WaitList.Add(WaitResultInfo.WaitTime(100)); moveInfo.WaitList.Add(WaitResultInfo.WaitTime(100));
...@@ -54,9 +55,13 @@ namespace DeviceLibrary ...@@ -54,9 +55,13 @@ namespace DeviceLibrary
public bool Release(MoveInfo moveInfo = null) public bool Release(MoveInfo moveInfo = null)
{ {
GripperType = GripperTypeE.Release; GripperType = GripperTypeE.Release;
HomeReset();
return true;
if (!IsBusy) if (!IsBusy)
{ {
axis.MoveAbsolute(0, 30, 500, 500, 0.1f); axis.StopAxis();
axis.ResetError();
axis.MoveAbsolute(0, 50, 100, 100, 0.5f);
clampTimes = 0; clampTimes = 0;
if (moveInfo != null) if (moveInfo != null)
moveInfo.WaitList.Add(WaitResultInfo.WaitTime(100)); moveInfo.WaitList.Add(WaitResultInfo.WaitTime(100));
...@@ -72,8 +77,9 @@ namespace DeviceLibrary ...@@ -72,8 +77,9 @@ namespace DeviceLibrary
public void HomeReset(MoveInfo moveInfo = null) public void HomeReset(MoveInfo moveInfo = null)
{ {
GripperType = GripperTypeE.Reset; GripperType = GripperTypeE.Reset;
ClosePort(); //ClosePort();
OpenPort(ConfigHelper.Config.Get("ElectricGripperPort")); //OpenPort(ConfigHelper.Config.Get("ElectricGripperPort"));
axis.StopAxis();
axis.ResetError(); axis.ResetError();
axis.GoHome(); axis.GoHome();
clampTimes = 0; clampTimes = 0;
...@@ -87,7 +93,7 @@ namespace DeviceLibrary ...@@ -87,7 +93,7 @@ namespace DeviceLibrary
{ {
LogUtil.info($"ElectricGripper IsReached:{axis.IsReached},IsMoving:{axis.IsMoving}"); LogUtil.info($"ElectricGripper IsReached:{axis.IsReached},IsMoving:{axis.IsMoving}");
//return false; //return false;
return !axis.IsReached; return axis.IsMoving;
} }
} }
public bool IsClamp public bool IsClamp
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!