Commit 42429c38 刘韬

增加出库库位校准

增加点位快捷微调
1 个父辈 edf7e3d0
...@@ -44,7 +44,6 @@ ...@@ -44,7 +44,6 @@
<add key="Default_Language" value="zh-CN" /> <add key="Default_Language" value="zh-CN" />
<add key="UseAIOBOX" value="0" /> <add key="UseAIOBOX" value="0" />
<add key="UseHCBoard" value="1" /> <add key="UseHCBoard" value="1" />
<add key="DIMS" value="20" /> <add key="DIMS" value="20" />
<add key="DOMS" value="200" /> <add key="DOMS" value="200" />
<add key="SinglePosId" value="1#AC2_1_1_6" /> <add key="SinglePosId" value="1#AC2_1_1_6" />
...@@ -62,6 +61,7 @@ ...@@ -62,6 +61,7 @@
<add key="Tool_P6_Offset" value="60" /> <add key="Tool_P6_Offset" value="60" />
<add key="Tool_TargetSpeed" value="20" /> <add key="Tool_TargetSpeed" value="20" />
<add key="Tool_TargetPosition" value="6000" /> <add key="Tool_TargetPosition" value="6000" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
</appSettings> </appSettings>
<log4net> <log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
...@@ -150,4 +150,16 @@ ...@@ -150,4 +150,16 @@
</serviceBehaviors> </serviceBehaviors>
</behaviors> </behaviors>
</system.serviceModel> </system.serviceModel>
<system.web>
<membership defaultProvider="ClientAuthenticationMembershipProvider">
<providers>
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
</providers>
</membership>
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
<providers>
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
</providers>
</roleManager>
</system.web>
</configuration> </configuration>
\ No newline at end of file \ No newline at end of file
...@@ -12,6 +12,21 @@ ...@@ -12,6 +12,21 @@
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
...@@ -54,8 +69,10 @@ ...@@ -54,8 +69,10 @@
<HintPath>..\..\..\增广夹爪\Rmaxis\bin\Debug\log4net.dll</HintPath> <HintPath>..\..\..\增广夹爪\Rmaxis\bin\Debug\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.ServiceModel" /> <Reference Include="System.ServiceModel" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
...@@ -113,6 +130,12 @@ ...@@ -113,6 +130,12 @@
<Compile Include="userControl\AxisMoveControl.Designer.cs"> <Compile Include="userControl\AxisMoveControl.Designer.cs">
<DependentUpon>AxisMoveControl.cs</DependentUpon> <DependentUpon>AxisMoveControl.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="userControl\AxisTipControl.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="userControl\AxisTipControl.designer.cs">
<DependentUpon>AxisTipControl.cs</DependentUpon>
</Compile>
<Compile Include="userControl\uc_boxdebug.cs"> <Compile Include="userControl\uc_boxdebug.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
...@@ -161,6 +184,9 @@ ...@@ -161,6 +184,9 @@
<EmbeddedResource Include="userControl\AxisMoveControl.resx"> <EmbeddedResource Include="userControl\AxisMoveControl.resx">
<DependentUpon>AxisMoveControl.cs</DependentUpon> <DependentUpon>AxisMoveControl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="userControl\AxisTipControl.resx">
<DependentUpon>AxisTipControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="userControl\uc_boxdebug.resx"> <EmbeddedResource Include="userControl\uc_boxdebug.resx">
<DependentUpon>uc_boxdebug.cs</DependentUpon> <DependentUpon>uc_boxdebug.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
...@@ -243,7 +269,25 @@ ...@@ -243,7 +269,25 @@
<ItemGroup> <ItemGroup>
<WCFMetadata Include="Connected Services\" /> <WCFMetadata Include="Connected Services\" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.6.1">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.6.1 %28x86 和 x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>powershell.exe -command "$ci=(git rev-parse HEAD);$bi=git rev-parse --abbrev-ref HEAD ;$ti=Get-Content ..\..\Properties\AssemblyInfo.cs ; Foreach-Object {$ti -replace 'AssemblyProduct.*',\"AssemblyProduct(\"\"$bi $ci\"\")]\"} | Set-Content ..\..\Properties\AssemblyInfo.cs"</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>rem powershell.exe -command "$ci=(git rev-parse HEAD) ; $vi=([System.Diagnostics.FileVersionInfo]::GetVersionInfo('$(TargetPath)').FileVersion) ; $vi+' = '+$ci &gt;&gt; gitCommitVer.txt"</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild"> <Target Name="BeforeBuild">
......
...@@ -42,6 +42,9 @@ namespace OnlineStore.AutoInOutStore ...@@ -42,6 +42,9 @@ namespace OnlineStore.AutoInOutStore
newData = newData.AddSeconds(seconds * 2); newData = newData.AddSeconds(seconds * 2);
str = newData.ToString("yyyy-MM-dd HH:mm:ss"); str = newData.ToString("yyyy-MM-dd HH:mm:ss");
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -53,10 +56,8 @@ namespace OnlineStore.AutoInOutStore ...@@ -53,10 +56,8 @@ namespace OnlineStore.AutoInOutStore
} }
internal static string GetCodeNum(string codeName = "RC1252-AutoInOutStore-N") internal static string GetCodeNum(string codeName = "RC1252-AutoInOutStore-N")
{ {
byte[] byteArray = System.Text.Encoding.ASCII.GetBytes(codeName); var xx = (System.Reflection.AssemblyProductAttribute)System.Reflection.Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(System.Reflection.AssemblyProductAttribute), false)[0];
string result = ""; return xx.Product;
result = AcSerialBean.ByteToString(byteArray);
return result;
} }
public FrmBase() public FrmBase()
{ {
......
...@@ -88,6 +88,27 @@ namespace OnlineStore.AutoInOutStore ...@@ -88,6 +88,27 @@ namespace OnlineStore.AutoInOutStore
} }
timer1.Enabled = true; timer1.Enabled = true;
setAxisPopup(txtMiddleP1, btnMiddleP1, store.Config.Middle_Axis);
setAxisPopup(txtMiddleP2, btnMiddleP2, store.Config.Middle_Axis);
setAxisPopup(txtUpDownP1, btnUpDownP1, store.Config.UpDown_Axis);
setAxisPopup(txtUpdownP2, btnUpdownP2, store.Config.UpDown_Axis);
setAxisPopup(txtUpDownP3, btnUpDownP3, store.Config.UpDown_Axis);
setAxisPopup(txtUpDownP4, btnUpDownP4, store.Config.UpDown_Axis);
setAxisPopup(txtUpDownP5, btnUpDownP5, store.Config.UpDown_Axis);
setAxisPopup(txtUpDownP6, btnUpDownP6, store.Config.UpDown_Axis);
setAxisPopup(txtUpDownDoor, btnUpDownDoor, store.Config.UpDown_Axis);
setAxisPopup(txtUpdownP8, btnUpdownP8, store.Config.UpDown_Axis);
setAxisPopup(txtComP1, btnComP1, store.Config.Comp_Axis);
setAxisPopup(txtComP2, btnComP2, store.Config.Comp_Axis);
setAxisPopup(txtComP3, btnComP3, store.Config.Comp_Axis);
setAxisPopup(txtInOutP1, btnInOutP1, store.Config.InOut_Axis);
setAxisPopup(txtInOutP2, btnInOutP2, store.Config.InOut_Axis);
setAxisPopup(txtInOutP3, btnInOutP3, store.Config.InOut_Axis);
setAxisPopup(txtInoutP4, btnInOutP4, store.Config.InOut_Axis);
} }
#endregion #endregion
private string WaitStart = ResourceCulture.GetString(ResourceCulture.WaitStart, "等待启动"); private string WaitStart = ResourceCulture.GetString(ResourceCulture.WaitStart, "等待启动");
...@@ -824,6 +845,15 @@ namespace OnlineStore.AutoInOutStore ...@@ -824,6 +845,15 @@ namespace OnlineStore.AutoInOutStore
AxisABSMove(store.Config.Comp_Axis, value, store.Config.CompAxis_P3_Speed); AxisABSMove(store.Config.Comp_Axis, value, store.Config.CompAxis_P3_Speed);
//ShuoKeControls.AbsMove(store.Config.CompressAxis_Slv, value); //ShuoKeControls.AbsMove(store.Config.CompressAxis_Slv, value);
} }
void setAxisPopup(Control c, Control title, ConfigMoveAxis configMoveAxis)
{
c.Tag = "A";
c.Click += (cc, e) =>
{
AxisTipControl axisTipControl = new AxisTipControl();
axisTipControl.ShowTips((Control)cc, title.Text, configMoveAxis.GetAxisValue(), configMoveAxis.TargetSpeed);
};
}
int xWidth = SystemInformation.PrimaryMonitorSize.Width;//获取显示器屏幕宽度 int xWidth = SystemInformation.PrimaryMonitorSize.Width;//获取显示器屏幕宽度
int yHeight = SystemInformation.PrimaryMonitorSize.Height;//高度 int yHeight = SystemInformation.PrimaryMonitorSize.Height;//高度
......
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
// 有关程序集的常规信息通过以下 // 有关程序集的常规信息通过以下
// 特性集控制。更改这些特性值可修改 // 特性集控制。更改这些特性值可修改
// 与程序集关联的信息。 // 与程序集关联的信息。
[assembly: AssemblyTitle("ACSingleStore")] [assembly: AssemblyTitle("ACSingleStore")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ACSingleStore")] [assembly: AssemblyProduct("SO815-AutoInOutStore-newui edf7e3d07d3c8cafa890a08f4b855e559a36d414")]
[assembly: AssemblyCopyright("Copyright © 2017")] [assembly: AssemblyCopyright("edf7e3d07d3c8cafa890a08f4b855e559a36d414")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 使此程序集中的类型 // 将 ComVisible 设置为 false 使此程序集中的类型
// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
// 则将该类型上的 ComVisible 特性设置为 true。 // 则将该类型上的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("1b0a0559-e045-4edb-9dac-740eb0d8bb52")] [assembly: Guid("1b0a0559-e045-4edb-9dac-740eb0d8bb52")]
// 程序集的版本信息由下面四个值组成: // 程序集的版本信息由下面四个值组成:
// //
// 主版本 // 主版本
// 次版本 // 次版本
// 生成号 // 生成号
// 修订号 // 修订号
// //
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”: // 方法是按如下所示使用“*”:
[assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.*")]
//[assembly: AssemblyVersion("1.0.0.0")] //[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")] //[assembly: AssemblyFileVersion("1.0.0.0")]
using HuichuanLibrary;
using OnlineStore.ACSingleStore;
using OnlineStore.AutoInOutStore;
using OnlineStore.Common;
using OnlineStore.DeviceLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
//using AxisManager = OnlineStore.DeviceLibrary.AxisManager;
public partial class AxisTipControl : FrmBase
{
static AxisManager AxisManager = AxisManager.instance;
public AxisTipControl()
{
InitializeComponent();
this.Deactivate += AxisTipControl_Deactivate;
this.LostFocus += AxisTipControl_LostFocus;
this.TopMost = true;
}
private void AxisTipControl_LostFocus(object sender, EventArgs e)
{
//this.Close();
}
private void AxisTipControl_Deactivate(object sender, EventArgs e)
{
this.Close();
}
short SlvAddr;
string PortName;
int targetSpeed;
static Control c;
public void ShowTips(Control _c,string title, short axisid, int _targetSpeed)
{
if (_c.Tag == null)
return;
if (c!=null && c.Name == _c.Name)
return;
Text = title;
/*var cp = c.PointToScreen(new Point(0, 0));
var cc = this.Parent.PointToClient(cp);
cc.Y += c.Height;
this.Location = cc;
*/
c = _c;
SlvAddr = axisid;
PortName = c.Name;
targetSpeed = _targetSpeed;
comjSpeed.Items.Clear();
for (int i = 1; i <= 10; i++)
{
comjSpeed.Items.Add(targetSpeed * i / 10);
}
comjSpeed.SelectedIndex = 4;
//【2】读取轴状态,如果读取出错将关闭此定时器
AxisSts sts = HCBoardManager.GetAxisSts(SlvAddr);
if (sts.ServoOn < 0)
{
showToolTip("伺服尚未使能",c);
return;
}
if (sts.ALM != 0 || sts.WARN != 0 || sts.EMG != 0) {
showToolTip("伺服警报状态中",c);
return;
}
readPosition();
this.Show();
LanguageProcess();
}
void showToolTip(string txt,Control control) {
var m_ToolTip = new ToolTip();
m_ToolTip.ToolTipIcon = ToolTipIcon.Warning;
m_ToolTip.ToolTipTitle = "无法操作";
m_ToolTip.AutoPopDelay = 0;
m_ToolTip.AutomaticDelay = 0;
m_ToolTip.InitialDelay = 0;
m_ToolTip.ShowAlways = true;
m_ToolTip.Show(txt, control);
Task.Run(() => {
Task.Delay(5000).Wait();
m_ToolTip.Dispose();
});
}
private void AxisMove(int speed)
{
LogUtil.info("【" + PortName + "_" + SlvAddr + "】点动: 速度:" + speed);
AxisManager.SpeedMove(PortName, SlvAddr, speed);
}
private void btnAddMove_MouseDown(object sender, MouseEventArgs e)
{
if (!CanMove(sender))
{
return;
}
if (btnAddMove.BackColor.Equals(Color.White))
{
int speed = Convert.ToInt32(comjSpeed.Text);
if (speed <= 0)
{
MessageBox.Show("提示", "请先输入正确的速度");
return;
}
btnAddMove.BackColor = Color.Green;
AxisMove(speed);
}
}
private void btnAddMove_MouseUp(object sender, MouseEventArgs e)
{
if (btnAddMove.BackColor == Color.Green)
{
btnAddMove.BackColor = Color.White;
AxisManager.SuddenStop(PortName, SlvAddr);
readPosition();
}
}
void readPosition()
{
textBox_pos.Text = AxisManager.GetActualtPosition(PortName, SlvAddr).ToString();
}
private void btnDelMove_MouseDown(object sender, MouseEventArgs e)
{
if (!CanMove(sender))
{
return;
}
if (btnDelMove.BackColor.Equals(Color.White))
{
int speed = Convert.ToInt32(comjSpeed.Text);
if (speed <= 0)
{
MessageBox.Show("提示", "请先输入正确的速度");
return;
}
btnDelMove.BackColor = Color.Green;
AxisMove(-speed);
}
}
private void btnDelMove_MouseUp(object sender, MouseEventArgs e)
{
if (btnDelMove.BackColor == Color.Green)
{
btnDelMove.BackColor = Color.White;
AxisManager.SuddenStop(PortName, SlvAddr);
readPosition();
}
}
bool CanMove(object sender)
{
AxisSts sts = HCBoardManager.GetAxisSts(SlvAddr);
if (sts.ServoOn < 0)
{
showToolTip("伺服尚未使能", (Control)sender);
return false;
}
if (sts.ALM != 0 || sts.WARN != 0 || sts.EMG != 0)
{
showToolTip("伺服警报状态中", (Control)sender);
return false;
}
return true;
}
private void btn_cancel_Click(object sender, EventArgs e)
{
this.Close();
//c.Select();
//c.Focus();
}
private void btn_ok_Click(object sender, EventArgs e)
{
c.Text = textBox_pos.Text;
this.Close();
}
}

partial class AxisTipControl
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.comjSpeed = new System.Windows.Forms.ComboBox();
this.btnDelMove = new System.Windows.Forms.Button();
this.btnAddMove = new System.Windows.Forms.Button();
this.label_speed = new System.Windows.Forms.Label();
this.textBox_pos = new System.Windows.Forms.TextBox();
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.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;
//
// btnDelMove
//
this.btnDelMove.BackColor = System.Drawing.Color.White;
this.btnDelMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
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.TabIndex = 338;
this.btnDelMove.Text = "点动-";
this.btnDelMove.UseVisualStyleBackColor = false;
this.btnDelMove.MouseDown += new System.Windows.Forms.MouseEventHandler(this.btnDelMove_MouseDown);
this.btnDelMove.MouseUp += new System.Windows.Forms.MouseEventHandler(this.btnDelMove_MouseUp);
//
// btnAddMove
//
this.btnAddMove.BackColor = System.Drawing.Color.White;
this.btnAddMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
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.TabIndex = 337;
this.btnAddMove.Text = "点动+";
this.btnAddMove.UseVisualStyleBackColor = false;
this.btnAddMove.MouseDown += new System.Windows.Forms.MouseEventHandler(this.btnAddMove_MouseDown);
this.btnAddMove.MouseUp += new System.Windows.Forms.MouseEventHandler(this.btnAddMove_MouseUp);
//
// label_speed
//
this.label_speed.Location = new System.Drawing.Point(38, 12);
this.label_speed.Name = "label_speed";
this.label_speed.Size = new System.Drawing.Size(111, 19);
this.label_speed.TabIndex = 336;
this.label_speed.Text = "点动速度:";
this.label_speed.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// textBox_pos
//
this.textBox_pos.Location = new System.Drawing.Point(155, 94);
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.Name = "label_position";
this.label_position.Size = new System.Drawing.Size(111, 20);
this.label_position.TabIndex = 336;
this.label_position.Text = "当前位置:";
this.label_position.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btn_ok
//
this.btn_ok.Location = new System.Drawing.Point(181, 123);
this.btn_ok.Name = "btn_ok";
this.btn_ok.Size = new System.Drawing.Size(90, 33);
this.btn_ok.TabIndex = 341;
this.btn_ok.Text = "确定";
this.btn_ok.UseVisualStyleBackColor = true;
this.btn_ok.Click += new System.EventHandler(this.btn_ok_Click);
//
// btn_cancel
//
this.btn_cancel.Location = new System.Drawing.Point(16, 123);
this.btn_cancel.Name = "btn_cancel";
this.btn_cancel.Size = new System.Drawing.Size(90, 33);
this.btn_cancel.TabIndex = 341;
this.btn_cancel.Text = "取消";
this.btn_cancel.UseVisualStyleBackColor = true;
this.btn_cancel.Click += new System.EventHandler(this.btn_cancel_Click);
//
// 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.Controls.Add(this.btn_cancel);
this.Controls.Add(this.btn_ok);
this.Controls.Add(this.textBox_pos);
this.Controls.Add(this.comjSpeed);
this.Controls.Add(this.btnDelMove);
this.Controls.Add(this.btnAddMove);
this.Controls.Add(this.label_position);
this.Controls.Add(this.label_speed);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "AxisTipControl";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ComboBox comjSpeed;
private System.Windows.Forms.Button btnDelMove;
private System.Windows.Forms.Button btnAddMove;
private System.Windows.Forms.Label label_speed;
private System.Windows.Forms.TextBox textBox_pos;
private System.Windows.Forms.Label label_position;
private System.Windows.Forms.Button btn_ok;
private System.Windows.Forms.Button btn_cancel;
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file \ No newline at end of file
...@@ -59,6 +59,17 @@ namespace OnlineStore.ACSingleStore.useControl ...@@ -59,6 +59,17 @@ namespace OnlineStore.ACSingleStore.useControl
FillBoxPos(); FillBoxPos();
store.InOutEndProcessEvent += Store_InOutEndProcessEvent; store.InOutEndProcessEvent += Store_InOutEndProcessEvent;
timer1.Enabled = true; timer1.Enabled = true;
setAxisPopup(txtUpDownP3, btnUpDownP3, store.Config.UpDown_Axis);
setAxisPopup(txtUpDownP4, btnUpDownP4, store.Config.UpDown_Axis);
setAxisPopup(txtUpDownP5, btnUpDownP5, store.Config.UpDown_Axis);
setAxisPopup(txtUpDownP6, btnUpDownP6, store.Config.UpDown_Axis);
setAxisPopup(txtMiddleP2, btnMiddleP2, store.Config.Middle_Axis);
setAxisPopup(txtInOutP2, btnInOutP2, store.Config.InOut_Axis);
setAxisPopup(txtInOutP3, btnInOutP3, store.Config.InOut_Axis);
setAxisPopup(txtComP2, btnComP2, store.Config.Comp_Axis);
setAxisPopup(txtComP3, btnComP3, store.Config.Comp_Axis);
return; return;
} }
...@@ -104,6 +115,9 @@ namespace OnlineStore.ACSingleStore.useControl ...@@ -104,6 +115,9 @@ namespace OnlineStore.ACSingleStore.useControl
public int col; public int col;
} }
int PosCompare(string a, string b) { int PosCompare(string a, string b) {
if (a.StartsWith("fix") || b.StartsWith("fix"))
return -1;
string[] pa = a.Split('_'); string[] pa = a.Split('_');
string[] pb = b.Split('_'); string[] pb = b.Split('_');
...@@ -190,6 +204,8 @@ namespace OnlineStore.ACSingleStore.useControl ...@@ -190,6 +204,8 @@ namespace OnlineStore.ACSingleStore.useControl
{ {
int ci = store.PositionNumList.Count-1 - i; int ci = store.PositionNumList.Count-1 - i;
string posname = store.PositionNumList[ci]; string posname = store.PositionNumList[ci];
if (posname.StartsWith("fix"))
continue;
string[] _posstr = posname.Split('_'); string[] _posstr = posname.Split('_');
int col = int.Parse(_posstr[1][0].ToString()); int col = int.Parse(_posstr[1][0].ToString());
string ab = "A"; string ab = "A";
...@@ -284,7 +300,7 @@ namespace OnlineStore.ACSingleStore.useControl ...@@ -284,7 +300,7 @@ namespace OnlineStore.ACSingleStore.useControl
store.autoJiange = jiange; store.autoJiange = jiange;
if (!string.IsNullOrEmpty(cmbPosition.Text)) if (!string.IsNullOrEmpty(cmbPosition.Text))
{ {
int currIndex = store.PositionNumList.IndexOf(cmbPosition.Text); ; int currIndex = store.PositionNumList.IndexOf(cmbPosition.Text);
store.autoPositionIndex = currIndex; store.autoPositionIndex = currIndex;
store.AutoStartIndex = currIndex; store.AutoStartIndex = currIndex;
//store.Double_Alternate = checkBox_Double_Alternate.Checked; //store.Double_Alternate = checkBox_Double_Alternate.Checked;
...@@ -563,5 +579,15 @@ namespace OnlineStore.ACSingleStore.useControl ...@@ -563,5 +579,15 @@ namespace OnlineStore.ACSingleStore.useControl
var posid = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Tag.ToString(); var posid = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Tag.ToString();
setData(posid); setData(posid);
} }
void setAxisPopup(Control c, Control title, ConfigMoveAxis configMoveAxis)
{
c.Tag = "A";
c.Click += (cc, e) =>
{
AxisTipControl axisTipControl = new AxisTipControl();
axisTipControl.ShowTips((Control)cc, title.Text, configMoveAxis.GetAxisValue(), configMoveAxis.TargetSpeed);
};
}
} }
} }
...@@ -872,6 +872,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -872,6 +872,7 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
} }
LineMoveP movePfix=new LineMoveP();
protected override void OutStoreProcess() protected override void OutStoreProcess()
{ {
LineMoveP moveP = StoreMove.MoveParam.MoveP; LineMoveP moveP = StoreMove.MoveParam.MoveP;
...@@ -977,25 +978,112 @@ namespace OnlineStore.DeviceLibrary ...@@ -977,25 +978,112 @@ namespace OnlineStore.DeviceLibrary
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_06_BagDeviceBack) else if (StoreMove.MoveStep == StoreMoveStep.SO_06_BagDeviceBack)
{ {
if (Config.IsUse_Tray_Check.Equals(1) && IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.LOW)) StoreMove.NextMoveStep(StoreMoveStep.SO_07_CheckFix);
if (Config.IsUse_Tray_Check.Equals(1))
{ {
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : ""; string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
LogUtil.error("出库【" + posId + "】取料完成后,未检测到叉子料盘信号 "); LogUtil.error("出库【" + posId + "】取料完成后,检测叉子料盘信号 ");
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.HIGH));
} }
if (IsHasCompress_Axis || Config.IsHasLocationCylinder.Equals(0)) }
else if (StoreMove.MoveStep == StoreMoveStep.SO_07_CheckFix)
{
if (StoreMove.IsBatchInOutStore && StoreMove.MoveParam != null)
{
var fixposid = $"1#AC1_0A_99_{StoreMove.MoveParam.PlagtW}";
var fixposition = CSVPositionReader<AutoStorePosition>.GetPositon(fixposid);
OutStoreLog($"出库 获取修正库位置{fixposid}={fixposition}");
if (fixposition != null)
{ {
SO_08_ToDoorPosition(); OutStoreLog($"出库 找到对应修正库位 获取修正库位置{fixposid}={fixposition}");
movePfix.ComPress_P1 = Config.CompressAxis_P1_Position;
movePfix.InOut_P1 = Config.InOutAxis_P1_Position;
movePfix.Middle_P1 = Config.MiddleAxis_P1_Position;
movePfix.UpDown_Door_P7 = Config.UpDownAxis_Door_P7;
movePfix.UpDown_OutHigh_P2 = Config.UpDownAxis_OutHigh_P2;
movePfix.UpDown_OutLow_P8 = Config.UpDownAxis_OutLow_P8;
movePfix.InOut_P2 = fixposition.InOutAxis_Batch_P2;
movePfix.InOut_P4 = fixposition.InOutAxis_DoorOutPosition_P4;
movePfix.UpDown_P1 = Config.GetUpDownP1(StoreMove.MoveParam.PlateH);
movePfix.ComPress_P2 = fixposition.CompressAxis_Position_P2;
movePfix.ComPress_P3 = fixposition.CompressAxis_CPosition_P3;
movePfix.InOut_P3 = fixposition.InOutAxis_Position_P3;
movePfix.Middle_P2 = fixposition.MiddleAxis_Position_P2;
movePfix.UpDown_P3 = fixposition.UpDownAxis_IHPosition_P3;
movePfix.UpDown_P4 = fixposition.UpDownAxis_ILPosition_P4;
movePfix.UpDown_P5 = fixposition.UpDownAxis_OHPosition_P5;
movePfix.UpDown_P6 = fixposition.UpDownAxis_OLPosition_P6;
StoreMove.NextMoveStep(StoreMoveStep.SO_07_CheckFix_01);
} }
else else
{ {
OutStoreLog($"出库 未找到对应修正库位 获取修正库位置{fixposid}");
StoreMove.NextMoveStep(StoreMoveStep.SO_07_LocationCylinder_Up); StoreMove.NextMoveStep(StoreMoveStep.SO_07_LocationCylinder_Up);
OutStoreLog("出库:SO_07 定位气缸伸出 ");
//LocationUpAndWait();
} }
} }
else
{
StoreMove.NextMoveStep(StoreMoveStep.SO_07_LocationCylinder_Up);
}
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_07_CheckFix_01)
{
StoreMove.NextMoveStep(StoreMoveStep.SO_07_CheckFix_02);
InStoreLog("出库:库位修正,旋转轴至P2(修正库位点),升降轴至P3(修正库位入库前点) ");
ACAxisMove(Config.Middle_Axis, movePfix.Middle_P2, Config.MiddleAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, movePfix.UpDown_P3, Config.UpDownAxis_P3_Speed);
}
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);
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_07_CheckFix_03)
{
StoreMove.NextMoveStep(StoreMoveStep.SO_07_CheckFix_04);
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)
{
StoreMove.NextMoveStep(StoreMoveStep.SO_07_CheckFix_05);
InStoreLog("出库:库位修正 压紧轴压紧,升降轴到P6 ");
ComMoveToPosition(movePfix.ComPress_P2, Config.CompAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, movePfix.UpDown_P6, Config.UpDownAxis_P6_Speed);
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_07_CheckFix_05)
{
StoreMove.NextMoveStep(StoreMoveStep.SO_07_LocationCylinder_Up);
InStoreLog("出库:库位修正 进出轴返回P1 ");
InOutBackToP1(moveP.InOut_P1);
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_07_LocationCylinder_Up) else if (StoreMove.MoveStep == StoreMoveStep.SO_07_LocationCylinder_Up)
{ {
SO_08_ToDoorPosition(); //LineMoveP moveP = StoreMove.MoveParam.MoveP;
StoreMove.NextMoveStep(StoreMoveStep.SO_08_ToDoorPosition);
if (StoreMove.IsBatchInOutStore)
{
OutStoreLog("出库:SO_08 升降轴到出料高点P2,旋转轴至P1(待机点),等待吸盘处于上升端");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_OutHigh_P2, Config.UpDownAxis_P2_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
//BatchAxisUpTrayHeight();
}
else
{
OutStoreLog("出库:SO_08 走到料门口,旋转轴至P1(待机点)升降轴至P2(进料口出料前点),等待吸盘处于上升端 ");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_Door_P7, Config.UpDownAxis_P7_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
}
//此处需要等待吸盘在上升位置
IOManager.IOMove(IO_Type.ClampingDisc_Up, IO_VALUE.HIGH);
IOManager.IOMove(IO_Type.ClampingDisc_Down, IO_VALUE.LOW);
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.ClampingDisc_Up, IO_VALUE.HIGH));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.ClampingDisc_Down, IO_VALUE.LOW));
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_08_ToDoorPosition) else if (StoreMove.MoveStep == StoreMoveStep.SO_08_ToDoorPosition)
{ {
......
...@@ -85,6 +85,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -85,6 +85,12 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(LOGGER, "加载位置文件:" + positionConfigFile); LogUtil.info(LOGGER, "加载位置文件:" + positionConfigFile);
CSVPositionReader<AutoStorePosition>.ReloadCSVFile(positionConfigFile); CSVPositionReader<AutoStorePosition>.ReloadCSVFile(positionConfigFile);
} }
var fixposfile = Path.Combine(Path.GetDirectoryName(positionConfigFile), @"FixPositions.csv");
if (File.Exists(fixposfile))
{
LogUtil.info(LOGGER, "加载校准位置文件:" + fixposfile);
CSVPositionReader<AutoStorePosition>.AddCSVFile(fixposfile);
}
Config = (AUTO_SA_Config)storeConfig; Config = (AUTO_SA_Config)storeConfig;
Store = new AC_SA_BoxBean(Config); Store = new AC_SA_BoxBean(Config);
Store.CID = CID; Store.CID = CID;
......
...@@ -241,12 +241,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -241,12 +241,17 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 料仓出库,定位气缸伸出(有压紧轴的不需要此步骤),,定位气缸伸出 Y103-1/PCI5O1-83) Y103-2/PCI5O1-90) Y103-3/PCI5O1-95) 伸出到位 /// 料仓出库,定位气缸伸出(有压紧轴的不需要此步骤),,定位气缸伸出 Y103-1/PCI5O1-83) Y103-2/PCI5O1-90) Y103-3/PCI5O1-95) 伸出到位
/// </summary> /// </summary>
SO_07_LocationCylinder_Up = 107, SO_07_LocationCylinder_Up,
SO_07_CheckFix,
SO_07_CheckFix_01 ,
SO_07_CheckFix_02 ,
SO_07_CheckFix_03 ,
SO_07_CheckFix_04 ,
SO_07_CheckFix_05 ,
/// <summary> /// <summary>
/// 料仓出库,,所有设备运行到门,,轴1( 转盘) 至P1( 待机点)轴2( 上下) 至P2( 进料口出料前点) /// 料仓出库,,所有设备运行到门,,轴1( 转盘) 至P1( 待机点)轴2( 上下) 至P2( 进料口出料前点)
/// </summary> /// </summary>
SO_08_ToDoorPosition = 108, SO_08_ToDoorPosition,
/// <summary> /// <summary>
/// 到达门口后,判断叉子料盘检测信号 /// 到达门口后,判断叉子料盘检测信号
...@@ -595,6 +600,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -595,6 +600,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
AUTO_O07_WaitDown = 1307, AUTO_O07_WaitDown = 1307,
#endregion #endregion
} }
......
...@@ -75,6 +75,11 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -75,6 +75,11 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary> /// </summary>
[CSVAttribute("进出轴吸盘取料点P2", "InOutAxis_Batch_P2")] [CSVAttribute("进出轴吸盘取料点P2", "InOutAxis_Batch_P2")]
public int InOutAxis_Batch_P2 { get; set; } public int InOutAxis_Batch_P2 { get; set; }
public override string ToString()
{
return $"UpDownAxis_IHPosition_P3={UpDownAxis_IHPosition_P3},UpDownAxis_ILPosition_P4={UpDownAxis_ILPosition_P4}";
}
public static bool CheckPosition(AutoStorePosition position, AUTO_SA_Config Config) public static bool CheckPosition(AutoStorePosition position, AUTO_SA_Config Config)
{ {
try try
......
...@@ -13,6 +13,11 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -13,6 +13,11 @@ namespace OnlineStore.LoadCSVLibrary
{ {
public class CSVPositionReader<T> : CSVReaderBase where T : StorePostionBase public class CSVPositionReader<T> : CSVReaderBase where T : StorePostionBase
{ {
static CSVPositionReader()
{
allPositionMap = new Dictionary<string, T>();
hasReadFileList = new List<string>();
}
/// <summary> /// <summary>
/// 所有的位置集合,key=位置 /// 所有的位置集合,key=位置
/// </summary> /// </summary>
...@@ -27,9 +32,6 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -27,9 +32,6 @@ namespace OnlineStore.LoadCSVLibrary
/// <returns></returns> /// <returns></returns>
public static Dictionary<String, T> ReloadCSVFile(string filePath) public static Dictionary<String, T> ReloadCSVFile(string filePath)
{ {
allPositionMap = new Dictionary<string, T>();
hasReadFileList = new List<string>();
return AddCSVFile(filePath); return AddCSVFile(filePath);
} }
public static List<string> getPositionKeyList() public static List<string> getPositionKeyList()
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!