Commit 03e70b29 LN

1

1 个父辈 6aef2192
正在显示 37 个修改的文件 包含 466 行增加588 行删除
......@@ -85,11 +85,11 @@
<Compile Include="FrmAbout.Designer.cs">
<DependentUpon>FrmAbout.cs</DependentUpon>
</Compile>
<Compile Include="FrmMain.cs">
<Compile Include="FrmStore.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmMain.Designer.cs">
<DependentUpon>FrmMain.cs</DependentUpon>
<Compile Include="FrmStore.Designer.cs">
<DependentUpon>FrmStore.cs</DependentUpon>
</Compile>
<Compile Include="FrmPwd.cs">
<SubType>Form</SubType>
......@@ -97,15 +97,21 @@
<Compile Include="FrmPwd.Designer.cs">
<DependentUpon>FrmPwd.cs</DependentUpon>
</Compile>
<Compile Include="FrmStoreBox.cs">
<Compile Include="FrmBox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmStoreBox.Designer.cs">
<DependentUpon>FrmStoreBox.cs</DependentUpon>
<Compile Include="FrmBox.Designer.cs">
<DependentUpon>FrmBox.cs</DependentUpon>
</Compile>
<Compile Include="ManagerUtil.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="useControl\AxisMoveControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="useControl\AxisMoveControl.Designer.cs">
<DependentUpon>AxisMoveControl.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="FrmAxisDebug.resx">
<DependentUpon>FrmAxisDebug.cs</DependentUpon>
</EmbeddedResource>
......@@ -118,14 +124,14 @@
<EmbeddedResource Include="FrmAbout.resx">
<DependentUpon>FrmAbout.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmMain.resx">
<DependentUpon>FrmMain.cs</DependentUpon>
<EmbeddedResource Include="FrmStore.resx">
<DependentUpon>FrmStore.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmPwd.resx">
<DependentUpon>FrmPwd.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmStoreBox.resx">
<DependentUpon>FrmStoreBox.cs</DependentUpon>
<EmbeddedResource Include="FrmBox.resx">
<DependentUpon>FrmBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
......@@ -137,6 +143,9 @@
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<EmbeddedResource Include="useControl\AxisMoveControl.resx">
<DependentUpon>AxisMoveControl.cs</DependentUpon>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
......
......@@ -2,6 +2,7 @@
{
partial class FrmAbout
{
/// <summary>
/// Required designer variable.
/// </summary>
......@@ -31,6 +32,8 @@
this.btnNext = new System.Windows.Forms.Button();
this.lblVersion = new System.Windows.Forms.Label();
this.lblTime = new System.Windows.Forms.Label();
this.lblCodeName = new System.Windows.Forms.Label();
this.btnCopy = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// btnNext
......@@ -38,7 +41,7 @@
this.btnNext.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.btnNext.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNext.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnNext.Location = new System.Drawing.Point(152, 113);
this.btnNext.Location = new System.Drawing.Point(210, 140);
this.btnNext.Name = "btnNext";
this.btnNext.Size = new System.Drawing.Size(120, 45);
this.btnNext.TabIndex = 275;
......@@ -50,9 +53,9 @@
//
this.lblVersion.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblVersion.Location = new System.Drawing.Point(12, 33);
this.lblVersion.Location = new System.Drawing.Point(12, 36);
this.lblVersion.Name = "lblVersion";
this.lblVersion.Size = new System.Drawing.Size(413, 23);
this.lblVersion.Size = new System.Drawing.Size(529, 23);
this.lblVersion.TabIndex = 276;
this.lblVersion.Text = "版本号:1.1.0000.0000";
this.lblVersion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -61,18 +64,41 @@
//
this.lblTime.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblTime.Location = new System.Drawing.Point(12, 63);
this.lblTime.Location = new System.Drawing.Point(81, 66);
this.lblTime.Name = "lblTime";
this.lblTime.Size = new System.Drawing.Size(413, 23);
this.lblTime.Size = new System.Drawing.Size(379, 23);
this.lblTime.TabIndex = 277;
this.lblTime.Text = "更新时间:0000-00-00 00:00:00";
this.lblTime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblCodeName
//
this.lblCodeName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblCodeName.Location = new System.Drawing.Point(12, 100);
this.lblCodeName.Name = "lblCodeName";
this.lblCodeName.Size = new System.Drawing.Size(529, 23);
this.lblCodeName.TabIndex = 278;
this.lblCodeName.Text = "软件编号:????";
this.lblCodeName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// btnCopy
//
this.btnCopy.Location = new System.Drawing.Point(466, 64);
this.btnCopy.Name = "btnCopy";
this.btnCopy.Size = new System.Drawing.Size(75, 25);
this.btnCopy.TabIndex = 279;
this.btnCopy.Text = "复制";
this.btnCopy.UseVisualStyleBackColor = true;
this.btnCopy.Click += new System.EventHandler(this.btnCopy_Click);
//
// FrmAbout
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(437, 186);
this.ClientSize = new System.Drawing.Size(553, 222);
this.Controls.Add(this.btnCopy);
this.Controls.Add(this.lblCodeName);
this.Controls.Add(this.lblTime);
this.Controls.Add(this.lblVersion);
this.Controls.Add(this.btnNext);
......@@ -89,5 +115,7 @@
private System.Windows.Forms.Button btnNext;
private System.Windows.Forms.Label lblVersion;
private System.Windows.Forms.Label lblTime;
private System.Windows.Forms.Label lblCodeName;
private System.Windows.Forms.Button btnCopy;
}
}
\ No newline at end of file
......@@ -14,7 +14,7 @@ namespace OnlineStore.ACPackingStore
{
public partial class FrmAbout : FrmBase
{
public FrmAbout( )
public FrmAbout()
{
InitializeComponent();
}
......@@ -23,12 +23,19 @@ namespace OnlineStore.ACPackingStore
{
this.DialogResult = DialogResult.None;
lblTime.Text = "更新时间:" + GetVersion();
lblVersion.Text = "版本号:"+ System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
lblVersion.Text = "版本号:" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
lblCodeName.Text = "软件编号:" + GetCodeNum();
}
private void btnNext_Click(object sender, EventArgs e)
{
this.Close();
}
private void btnCopy_Click(object sender, EventArgs e)
{
Clipboard.SetDataObject(GetCodeNum(), true);
}
}
}
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;
namespace OnlineStore.ACSingleStore
{
public partial class FrmAxisMoveConfig : FrmBase
{
private AC_SA_BoxBean boxBean = null;
public FrmAxisMoveConfig(AC_SA_BoxBean box )
{
this.boxBean = box;
InitializeComponent();
}
private void FrmAxisMoveConfig_Load(object sender, EventArgs e)
{
txtUpdownP1S.Text = boxBean.Config.UpDownAxis_P1_Speed.ToString();
txtUpdownP2S.Text = boxBean.Config.UpDownAxis_P2_Speed.ToString();
txtUpdownP3S.Text = boxBean.Config.UpDownAxis_P3_Speed.ToString();
txtUpdownP4S.Text = boxBean.Config.UpDownAxis_P4_Speed.ToString();
txtUpdownP5S.Text = boxBean.Config.UpDownAxis_P5_Speed.ToString();
txtUpdownP6S.Text = boxBean.Config.UpDownAxis_P6_Speed.ToString();
txtUpdownP7S.Text = boxBean.Config.UpDownAxis_P7_Speed.ToString();
txtUpdownP8S.Text = boxBean.Config.UpDownAxis_P8_Speed.ToString();
txtInOutP1S.Text = boxBean.Config.InOutAxis_P1_Speed.ToString();
txtInOutP2S.Text = boxBean.Config.InOutAxis_P2_Speed.ToString();
txtInOutP3S.Text = boxBean.Config.InOutAxis_P3_Speed.ToString();
txtMiddleP1S.Text = boxBean.Config.MiddleAxis_P1_Speed.ToString();
txtMiddleP2S.Text = boxBean.Config.MiddleAxis_P2_Speed.ToString();
//txtMiddleSpeed.Text = boxBean.Config.MiddleAxis_StartSpeed.ToString();
//txtInOutSpeed.Text = boxBean.Config.InoutAxis_StartSpeed.ToString();
//txtUpDownSpeed.Text = boxBean.Config.UpdownAxis_StartSpeed.ToString();
this.txtMSpeed.Text = boxBean.Config.MiddleAxis_TargetSpeed.ToString();
this.txtISpeed.Text = boxBean.Config.InoutAxis_TargetSpeed.ToString();
this.txtUSpeed.Text = boxBean.Config.UpdownAxis_TargetSpeed.ToString();
this.txtMAtime.Text = boxBean.Config.MiddleAxis_AddSpeed.ToString();
this.txtIAtime.Text = boxBean.Config.InoutAxis_DelSpeed.ToString();
this.txtUAtime.Text = boxBean.Config.UpdownAxis_AddSpeed.ToString();
this.txtMDtime.Text = boxBean.Config.MiddleAxis_DelSpeed.ToString();
this.txtIDtime.Text = boxBean.Config.InoutAxis_DelSpeed.ToString();
this.txtUDtime.Text = boxBean.Config.UpdownAxis_DelSpeed.ToString();
txtMiddleMax.Text = boxBean.Config.MiddleAxis_ErrorCountMax.ToString();
txtUpdownMax.Text = boxBean.Config.UpdownAxis_ErrorCountMax.ToString();
txtInoutMax.Text = boxBean.Config.InoutAxis_ErrorCountMax.ToString();
//txtComMax.Text = boxBean.Config.CompressAxis_ErrorCountMax.ToString();
txtMiddleMin.Text = boxBean.Config.MiddleAxis_ErrorCountMin.ToString();
txtUpdownMin.Text = boxBean.Config.UpdownAxis_ErrorCountMin.ToString();
txtInoutMin.Text = boxBean.Config.InoutAxis_ErrorCountMin.ToString();
//txtComMin.Text = boxBean.Config.CompressAxis_ErrorCountMin.ToString();
txtMRSpeed.Text = boxBean.Config.MiddleAxis_ResolveSpeed.ToString();
txtIRSpeed.Text = boxBean.Config.InoutAxis_ResolveSpeed.ToString();
txtURSpeed.Text = boxBean.Config.UpdownAxis_ResolveSpeed.ToString();
//txtCRSpeed.Text = boxBean.Config.CompressAxis_ResolveSpeed.ToString();
//txtAddSpeed.Text = boxBean.Config.CompressAxis_AddSpeed.ToString();
//txtDelSpeed.Text = boxBean.Config.CompressAxis_DelSpeed.ToString();
//txtMaxSpeed.Text = boxBean.Config.CompressAxis_MaxSpeed.ToString();
//txtBeginSpeed.Text = boxBean.Config.CompressAxis_StartSpeed.ToString();
//txtTargetSpeed.Text = boxBean.Config.CompressAxis_EndSpeed.ToString();
//this.txtCDtime.Text = boxBean.Config.CompressAxis_DecelTime.ToString();
//this.txtCSpeed.Text = boxBean.Config.CompressAxis_TargetSpeed.ToString();
//this.txtCAtime.Text = boxBean.Config.CompressAxis_AccelTime.ToString();
}
private void btnSaveAxisSpeed_Click(object sender, EventArgs e)
{
DialogResult resul = MessageBox.Show("配置使用地方过多,需要重启才能生效,是否确定保存?", "提示", MessageBoxButtons.YesNo);
if (!resul.Equals(DialogResult.Yes))
{
return;
}
boxBean.Config.UpDownAxis_P1_Speed = FormUtil.GetIntValue(txtUpdownP1S);
boxBean.Config.UpDownAxis_P2_Speed = FormUtil.GetIntValue(txtUpdownP2S);
boxBean.Config.UpDownAxis_P3_Speed = FormUtil.GetIntValue(txtUpdownP3S);
boxBean.Config.UpDownAxis_P4_Speed = FormUtil.GetIntValue(txtUpdownP4S);
boxBean.Config.UpDownAxis_P5_Speed = FormUtil.GetIntValue(txtUpdownP5S);
boxBean.Config.UpDownAxis_P6_Speed = FormUtil.GetIntValue(txtUpdownP6S);
boxBean.Config.UpDownAxis_P7_Speed = FormUtil.GetIntValue(txtUpdownP7S);
boxBean.Config.UpDownAxis_P8_Speed = FormUtil.GetIntValue(txtUpdownP8S);
boxBean.Config.InOutAxis_P1_Speed = FormUtil.GetIntValue(txtInOutP1S);
boxBean.Config.InOutAxis_P2_Speed = FormUtil.GetIntValue(txtInOutP2S);
boxBean.Config.InOutAxis_P3_Speed = FormUtil.GetIntValue(txtInOutP3S);
boxBean.Config.MiddleAxis_P1_Speed = FormUtil.GetIntValue(txtMiddleP1S);
boxBean.Config.MiddleAxis_P2_Speed = FormUtil.GetIntValue(txtMiddleP2S);
//boxBean.Config.CompressAxis_P1_Speed = FormUtil.GetIntValue(txtComPressP1S);
//boxBean.Config.CompressAxis_P2_Speed = FormUtil.GetIntValue(txtComPressP2S);
//boxBean.Config.CompressAxis_P3_Speed = FormUtil.GetIntValue(txtComPressP3S);
//boxBean.Config.MiddleAxis_StartSpeed = FormUtil.GetIntValue(txtMiddleSpeed);
//boxBean.Config.InoutAxis_StartSpeed = FormUtil.GetIntValue(txtInOutSpeed);
//boxBean.Config.UpdownAxis_StartSpeed = FormUtil.GetIntValue(txtUpDownSpeed);
//boxBean.Config.CompressAxis_StartSpeed = FormUtil.GetIntValue(txtComSpeed);
boxBean.Config.MiddleAxis_TargetSpeed = FormUtil.GetIntValue(txtMSpeed);
boxBean.Config.InoutAxis_TargetSpeed = FormUtil.GetIntValue(txtISpeed);
boxBean.Config.UpdownAxis_TargetSpeed = FormUtil.GetIntValue(txtUSpeed);
boxBean.Config.MiddleAxis_AddSpeed = FormUtil.GetShortValue(txtMAtime);
boxBean.Config.InoutAxis_AddSpeed = FormUtil.GetShortValue(txtIAtime);
boxBean.Config.UpdownAxis_AddSpeed = FormUtil.GetShortValue(txtUAtime);
boxBean.Config.MiddleAxis_DelSpeed = FormUtil.GetShortValue(txtMDtime);
boxBean.Config.InoutAxis_DelSpeed = FormUtil.GetShortValue(txtIDtime);
boxBean.Config.UpdownAxis_DelSpeed = FormUtil.GetShortValue(txtUDtime);
boxBean.Config.MiddleAxis_ErrorCountMax = FormUtil.GetShortValue(txtMiddleMax);
boxBean.Config.UpdownAxis_ErrorCountMax = FormUtil.GetShortValue(txtUpdownMax);
boxBean.Config.InoutAxis_ErrorCountMax = FormUtil.GetShortValue(txtInoutMax);
boxBean.Config.MiddleAxis_ErrorCountMin = FormUtil.GetShortValue(txtMiddleMin);
boxBean.Config.UpdownAxis_ErrorCountMin = FormUtil.GetShortValue(txtUpdownMin);
boxBean.Config.InoutAxis_ErrorCountMin = FormUtil.GetShortValue(txtInoutMin);
boxBean.Config.MiddleAxis_ResolveSpeed = FormUtil.GetShortValue(txtMRSpeed);
boxBean.Config.InoutAxis_ResolveSpeed = FormUtil.GetShortValue(txtIRSpeed);
boxBean.Config.UpdownAxis_ResolveSpeed = FormUtil.GetShortValue(txtURSpeed);
//boxBean.Config.CompressAxis_StartSpeed = FormUtil.GetIntValue(txtBeginSpeed);
//boxBean.Config.CompressAxis_AddSpeed = FormUtil.GetIntValue(txtAddSpeed);
//boxBean.Config.CompressAxis_DelSpeed = FormUtil.GetIntValue(txtDelSpeed);
//boxBean.Config.CompressAxis_EndSpeed = FormUtil.GetIntValue(txtTargetSpeed);
//boxBean.Config.CompressAxis_MaxSpeed = FormUtil.GetIntValue(txtMaxSpeed);
//boxBean.Config.CompressAxis_TargetSpeed = FormUtil.GetIntValue(txtCSpeed);
//boxBean.Config.CompressAxis_AccelTime = FormUtil.GetShortValue(txtCAtime);
//boxBean.Config.CompressAxis_DecelTime = FormUtil.GetShortValue(txtCDtime);
//更新缓存
ACStoreManager.UpdateBoxConfig(boxBean.Config);
}
private void FrmAxisMoveConfig_Shown(object sender, EventArgs e)
{
SetSkin(this);
}
}
}
......@@ -13,14 +13,14 @@ namespace OnlineStore.ACPackingStore
{
public partial class FrmBase : Form
{
public static string GetVersion()
internal static string GetVersion()
{
string str = "";
string version = "";
DateTime newData = DateTime.Parse("2000-01-01");
try
{
System.Reflection.AssemblyName assemblyName= System.Reflection.Assembly.GetExecutingAssembly().GetName();
System.Reflection.AssemblyName assemblyName = System.Reflection.Assembly.GetExecutingAssembly().GetName();
version = assemblyName.Version.ToString();
string[] strArray = version.Split('.');
if (strArray.Length.Equals(4))
......@@ -38,9 +38,16 @@ namespace OnlineStore.ACPackingStore
str = version;
LogUtil.error("解析版本号【" + str + "】出错:" + ex.ToString());
}
LogUtil.info("版本号[" + version + "][" + str + "]");
LogUtil.info("版本号[" + version + "][" + str + "][" + GetCodeNum() + "]");
return str;
}
internal static string GetCodeNum(string codeName = "RC1250-ACPackingStore")
{
byte[] byteArray = System.Text.Encoding.ASCII.GetBytes(codeName);
string result = "";
result = AcSerialBean.ByteToString(byteArray);
return result;
}
public FrmBase()
{
InitializeComponent();
......
......@@ -120,9 +120,6 @@
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 16</value>
</metadata>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>107, 16</value>
</metadata>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>227, 16</value>
</metadata>
......
......@@ -85,7 +85,7 @@
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(485, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(332, 352);
this.groupBox1.Size = new System.Drawing.Size(332, 496);
this.groupBox1.TabIndex = 105;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "DO写入";
......@@ -345,7 +345,7 @@
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.button1.Location = new System.Drawing.Point(691, 411);
this.button1.Location = new System.Drawing.Point(691, 555);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(126, 37);
this.button1.TabIndex = 254;
......@@ -360,7 +360,7 @@
this.chbAutoRead.Checked = true;
this.chbAutoRead.CheckState = System.Windows.Forms.CheckState.Checked;
this.chbAutoRead.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbAutoRead.Location = new System.Drawing.Point(507, 416);
this.chbAutoRead.Location = new System.Drawing.Point(558, 560);
this.chbAutoRead.Name = "chbAutoRead";
this.chbAutoRead.Size = new System.Drawing.Size(75, 21);
this.chbAutoRead.TabIndex = 244;
......@@ -374,7 +374,7 @@
this.groupBox4.Controls.Add(this.tableLayoutPanel2);
this.groupBox4.Location = new System.Drawing.Point(247, 8);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(229, 446);
this.groupBox4.Size = new System.Drawing.Size(229, 590);
this.groupBox4.TabIndex = 104;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "DO列表";
......@@ -391,7 +391,7 @@
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(218, 426);
this.tableLayoutPanel2.Size = new System.Drawing.Size(218, 570);
this.tableLayoutPanel2.TabIndex = 103;
//
// groupBox3
......@@ -401,7 +401,7 @@
this.groupBox3.Controls.Add(this.tableLayoutPanel1);
this.groupBox3.Location = new System.Drawing.Point(12, 8);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(229, 446);
this.groupBox3.Size = new System.Drawing.Size(229, 590);
this.groupBox3.TabIndex = 103;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "DI列表";
......@@ -418,14 +418,14 @@
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(218, 426);
this.tableLayoutPanel1.Size = new System.Drawing.Size(218, 570);
this.tableLayoutPanel1.TabIndex = 102;
//
// FrmIOStatus
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(829, 464);
this.ClientSize = new System.Drawing.Size(880, 608);
this.Controls.Add(this.button1);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupBox4);
......
namespace OnlineStore.ACPackingStore
{
partial class FrmMain
{
/// <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()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain));
this.tabPageList = new System.Windows.Forms.TabControl();
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.显示ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.tabPageList.SuspendLayout();
this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout();
//
// tabPageList
//
this.tabPageList.Controls.Add(this.tabPage1);
this.tabPageList.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabPageList.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tabPageList.Location = new System.Drawing.Point(0, 0);
this.tabPageList.Name = "tabPageList";
this.tabPageList.SelectedIndex = 0;
this.tabPageList.Size = new System.Drawing.Size(1110, 660);
this.tabPageList.TabIndex = 0;
//
// notifyIcon1
//
this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon")));
this.notifyIcon1.Text = "料仓客户端";
this.notifyIcon1.Visible = true;
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.显示ToolStripMenuItem,
this.toolStripMenuItem1});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(111, 56);
//
// 显示ToolStripMenuItem
//
this.显示ToolStripMenuItem.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.显示ToolStripMenuItem.Name = "显示ToolStripMenuItem";
this.显示ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.显示ToolStripMenuItem.Text = "显示";
this.显示ToolStripMenuItem.Click += new System.EventHandler(this.显示ToolStripMenuItem_Click);
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(180, 26);
this.toolStripMenuItem1.Text = "退出";
this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click);
//
// tabPage1
//
this.tabPage1.Location = new System.Drawing.Point(4, 29);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(1102, 627);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "tabPage1";
this.tabPage1.UseVisualStyleBackColor = true;
//
// FrmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1110, 660);
this.Controls.Add(this.tabPageList);
this.Name = "FrmMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "包装料料仓";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.FrmMain_Load);
this.tabPageList.ResumeLayout(false);
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TabControl tabPageList;
private System.Windows.Forms.NotifyIcon notifyIcon1;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem 显示ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
private System.Windows.Forms.TabPage tabPage1;
}
}
\ No newline at end of file
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;
namespace OnlineStore.ACPackingStore
{
public partial class FrmMain : Form
{
public FrmMain()
{
InitializeComponent();
}
private void FrmMain_Load(object sender, EventArgs e)
{
PackingStoreBean store = StoreManager.InitStore();
if (store == null)
{
this.Close();
}
else
{
foreach (AC_BOX_Bean box in store.BoxMap.Values)
{
FrmStoreBox frm = new FrmStoreBox();
frm.BoxBean = box;
AddForm(box.Name, frm);
}
}
}
private void AddForm(string text, Form form)
{
text = text.PadLeft(10, ' ');
TabPage lineTabPage = new TabPage(text);
lineTabPage.AutoScroll = true;
Panel linePan = new Panel();
linePan.Dock = DockStyle.Fill;
linePan.AutoScroll = true;
lineTabPage.Controls.Add(linePan);
form.FormBorderStyle = FormBorderStyle.None;
form.TopLevel = false;
linePan.Controls.Add(form);
form.Dock = DockStyle.Fill;
linePan.Anchor = ((AnchorStyles)((AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Left)));
form.Anchor = ((AnchorStyles)((AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Left)));
form.Show();
tabPageList.Controls.Add(lineTabPage);
}
private void 显示ToolStripMenuItem_Click(object sender, EventArgs e)
{
try
{
FrmPwd fw = new FrmPwd(10);
DialogResult result = fw.ShowDialog();
if (!result.Equals(DialogResult.OK))
{
LogUtil.info("切换界面显示时,没有正确输入密码");
return;
}
this.Opacity = 100;
this.Visible = true;
this.WindowState = FormWindowState.Maximized;
this.notifyIcon1.Visible = false;
this.ShowInTaskbar = true;
//DebugStatus(false);
}
catch (Exception ex)
{
LogUtil.error("显示界面出错:" + ex.ToString());
}
}
private void toolStripMenuItem1_Click(object sender, EventArgs e)
{
DialogResult result = MessageBox.Show("是否确定退出?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result.Equals(DialogResult.Yes))
{
ExitApp();
}
}
private void ExitApp()
{
}
}
}
......@@ -96,7 +96,7 @@ namespace OnlineStore.ACPackingStore
XmlConfigurator.Configure();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FrmMain());
Application.Run(new FrmStore());
}
}
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
......
using log4net;
using OnlineStore.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.ServiceModel;
using System.Text;
namespace OnlineStore.ACSingleStore
{
public class WCFControl
{
//public static bool isRun=false;
//public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
//private static ServiceHost host = null;
//public static void OpenWCF()
//{
// if (isRun)
// {
// return;
// }
// try
// {
// if (host == null)
// {
// host = new ServiceHost(typeof(AcStoreWCF.CWSMDBox));
// }
// if (host.State != CommunicationState.Opening)
// {
// host.Open();
// }
// isRun = true;
// LogUtil.info("打开WCF服务成功");
// }
// catch (Exception ex)
// {
// LogUtil.error("打开WCF服务出错:" + ex.ToString());
// }
//}
//public static void CloseWCF()
//{
// try
// {
// isRun = false;
// if (host != null)
// {
// host.Close();
// }
// LogUtil.info("关闭WCF服务成功");
// }
// catch (Exception ex)
// {
// LogUtil.error("关闭WCF服务出错:" + ex.ToString());
// }
//}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using OnlineStore.DeviceLibrary;
using OnlineStore.Common;
using System.Threading;
using OnlineStore.LoadCSVLibrary;
namespace OnlineStore.AssemblyLine
{
public partial class AxisMoveControl : UserControl
{
private List<ConfigMoveAxis> axisList = new List<ConfigMoveAxis>();
private AC_BOX_Bean boxBean= null;
private string PortName = "";
private int SlvAddr = 0;
public AxisMoveControl( )
{
InitializeComponent();
}
public void LoadData(AC_BOX_Bean boxBean, params ConfigMoveAxis[] moveAxis)
{
this.boxBean = boxBean;
axisList = new List<ConfigMoveAxis>(moveAxis);
if (axisList.Count > 0)
{
comboBox1.Items.Clear();
foreach (ConfigMoveAxis a in axisList)
{
comboBox1.Items.Add(a.Explain);
}
comboBox1.SelectedIndex = 0;
PortName = moveAxis[0].DeviceName;
SlvAddr = moveAxis[0].GetAxisValue();
txtAxisDeviceName.Text = PortName;
txtAxisValue.Text = SlvAddr.ToString();
}
}
private void btnOpenAxis_Click(object sender, EventArgs e)
{
string portName = txtAxisDeviceName.Text;
short SlvAddr = FormUtil.GetShortValue(txtAxisValue);
ACServerManager.OpenPort(portName);
ACServerManager.AlarmClear(portName, SlvAddr);
Thread.Sleep(100);
ACServerManager.ServoOn(portName, SlvAddr);
LogUtil.info("点击【打开伺服】,端口号【" + PortName + "】地址【" + SlvAddr + "】 ");
// boxBean.OpenAxis(axisList[comboBox1.SelectedIndex]);
}
private void btnCloseAxis_Click(object sender, EventArgs e)
{
LogUtil.info("点击【关闭伺服】,端口号【" + PortName + "】地址【" + SlvAddr + "】 ");
ACServerManager.ServoOff(PortName, SlvAddr);
// boxBean.CloseAxis(axisList[comboBox1.SelectedIndex]);
}
private void btnAxisAMove_Click(object sender, EventArgs e)
{
int position = FormUtil.GetIntValue(txtAPosition);
int speed = FormUtil.GetIntValue(txtASpeed);
LogUtil.info("点击【绝对运动】,端口号【" + PortName + "】地址【" + SlvAddr + "】位置【" + position + "】速度【" + speed + "】");
ACServerManager.AbsMove(PortName, SlvAddr, position, speed);
}
private void btnAxisRMove_Click(object sender, EventArgs e)
{
int position = FormUtil.GetIntValue(txtAPosition);
int speed = FormUtil.GetIntValue(txtASpeed);
LogUtil.info("点击【相对运动】,端口号【" + PortName + "】地址【" + SlvAddr + "】位置【" + position + "】速度【" + speed + "】");
ACServerManager.RelMove(PortName, SlvAddr, position, speed);
}
private void btnAxisVMove_Click(object sender, EventArgs e)
{
int speed = FormUtil.GetIntValue(txtASpeed);
LogUtil.info("点击【匀速运动】,端口号【" + PortName + "】地址【" + SlvAddr + "】 速度【" + speed + "】");
ACServerManager.SpeedMove(PortName, SlvAddr, speed);
}
private void btnAxisStop_Click(object sender, EventArgs e)
{
LogUtil.info("点击【停止运动】,端口号【" + PortName + "】地址【" + SlvAddr + "】 ");
ACServerManager.SuddenStop(PortName, SlvAddr);
}
private void btnComAlarmClear_Click(object sender, EventArgs e)
{
LogUtil.info("点击【清理报警】,端口号【" + PortName + "】地址【" + SlvAddr + "】 ");
ACServerManager.AlarmClear(PortName, SlvAddr);
Thread.Sleep(100);
ACServerManager.ServoOn(PortName, SlvAddr);
}
private void btnAxisReturnHome_Click(object sender, EventArgs e)
{
int speed = FormUtil.GetIntValue(txtASpeed);
LogUtil.info("点击【原点返回】,端口号【" + PortName + "】地址【" + SlvAddr + "】 速度【" + speed + "】");
ACServerManager.HomeMove(PortName, SlvAddr, speed);
}
private void btnGetAlarm_Click(object sender, EventArgs e)
{
int value = ACServerManager.GetAlarmStatus(PortName, SlvAddr);
this.txtAlarmStatus.Text = value.ToString();
}
private void button1_Click(object sender, EventArgs e)
{
int value = ACServerManager.GetBusyStatus(PortName, SlvAddr);
this.txtBusyStatus.Text = value.ToString();
}
private void button2_Click(object sender, EventArgs e)
{
int value = ACServerManager.GetHomeEndStatus(PortName, SlvAddr);
this.txtHomeStatus.Text = value.ToString();
}
private void btnReadHomeSingle_Click(object sender, EventArgs e)
{
int value = ACServerManager.GetHomeSingle(PortName, SlvAddr);
this.txtHomeSingle.Text = value.ToString();
}
private void btnReadPosition_Click(object sender, EventArgs e)
{
lblOutPulse.Text = ACServerManager.GetTargetPosition(PortName, SlvAddr).ToString();
lblCountPulse.Text = ACServerManager.GetActualtPosition(PortName, SlvAddr).ToString();
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox1.SelectedIndex > 0)
{
ConfigMoveAxis axis = axisList[comboBox1.SelectedIndex];
PortName = axis.DeviceName;
SlvAddr = axis.GetAxisValue();
txtAxisDeviceName.Text = PortName;
txtAxisValue.Text = SlvAddr.ToString();
}
}
}
}
<?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
......@@ -659,14 +659,13 @@ namespace OnlineStore.DeviceLibrary
}
public bool InOutAxisCanMove()
{
if (IOValue(IO_Type.LocationCylinder_Down).Equals(IO_VALUE.HIGH)
&& IOValue(IO_Type.LocationCylinder_Up).Equals(IO_VALUE.LOW)
&& IOValue(IO_Type.LocationCylinder2_Down).Equals(IO_VALUE.HIGH)
&& IOValue(IO_Type.LocationCylinder2_Up).Equals(IO_VALUE.LOW))
{
return true;
}
//if (IOValue(IO_Type.LocationCylinder_Down).Equals(IO_VALUE.HIGH)
// && IOValue(IO_Type.LocationCylinder_Up).Equals(IO_VALUE.LOW)
// && IOValue(IO_Type.LocationCylinder2_Down).Equals(IO_VALUE.HIGH)
// && IOValue(IO_Type.LocationCylinder2_Up).Equals(IO_VALUE.LOW))
//{
// return true;
//}
return false;
}
......
......@@ -21,7 +21,7 @@ namespace OnlineStore.DeviceLibrary
public static readonly ILog LOGGER = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public static PackingStoreBean Store = null;
public static Store_Config Config = null;
public static Dictionary<int, StoreConfig> AllConfigMap = null;
public static Dictionary<int, BaseConfig> AllConfigMap = null;
private static bool isInit = false;
public static bool IsConnectServer = !ConfigAppSettings.GetValue(Setting_Init.http_server).Equals("");
public StoreManager()
......@@ -49,8 +49,8 @@ namespace OnlineStore.DeviceLibrary
{
try
{
AllConfigMap = new Dictionary<int, StoreConfig>();
StoreConfig.ProIOIpMap = new Dictionary<string, string>();
AllConfigMap = new Dictionary<int, BaseConfig>();
BaseConfig.ProIOIpMap = new Dictionary<string, string>();
if (!isInit)
{
string server = ConfigAppSettings.GetValue(Setting_Init.http_server);
......
类型,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义,SlaveID,
DI,急停,SuddenStop_BTN,0,PRO_AOI_IP_1,0,急停,X01,DI-01,0,
DI,复位,Reset_BTN,1,PRO_AOI_IP_1,0,复位,X02,DI-02,0,
DI,气压检测,Airpressure_Check,2,PRO_AOI_IP_1,0,门禁,X03,DI-03,0,
DI,L侧门禁,DoorLimit,3,PRO_AOI_IP_1,0,料盘检测1(进料口),X04,DI-04,0,
,,,,,,,,,,
DI,L侧料盘检测1(识别区),TrayCheck_1,0,PRO_AOI_IP_2,0,L侧料盘检测1(识别区),X21,DI-21,0,
......@@ -102,7 +105,7 @@ PRO,(轴二)升降轴最大限位,UpdownAxis_PositionMax,0,,,,,,,
PRO,(轴三)进出轴最大限位,InoutAxis_PositionMax,0,,,,,,,
,,,,,,,,, ,
,,,,,,,,, ,
,,,,,,,,,,
PRO,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,,
,,,,,,,,,,
PRO,预警温度,WarnTemperate,80,,,,,, ,
......
类型,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义,SlaveID,
DI,急停,SuddenStop_BTN,0,PRO_AOI_IP_1,0,急停,X01,DI-01,0,
DI,复位,Reset_BTN,1,PRO_AOI_IP_1,0,复位,X02,DI-02,0,
DI,气压检测,Airpressure_Check,2,PRO_AOI_IP_1,0,门禁,X03,DI-03,0,
DI,R侧门禁,DoorLimit,4,PRO_AOI_IP_1,0,料盘检测2(料叉),X05,DI-05,0,
,,,,,,,,,,
DI,R侧料盘检测1(识别区),TrayCheck_1,0,PRO_AOI_IP_3,0,R侧料盘检测1(识别区),X41,DI-41,0,
......
类型,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义,SlaveID,
PRO,IO模块对应的DI数量,IO_DILength,192.168.100.30#8;192.168.100.32#8;192.168.100.34#8;192.168.100.36#8;192.168.100.38#8;,,,,,
PRO,IO模块对应的DO数量,IO_DOLength,192.168.100.30#8;192.168.100.32#8;192.168.100.34#8;192.168.100.36#8;192.168.100.38#8;,,,,,
PRO,是否有仓门,HasDoor,1,,,,,,,
PRO,IO模块IP,PRO_AOI_IP_1,192.168.200.11,,,,,,,
PRO,IO模块IP,PRO_AOI_IP_2,192.168.200.12,,,,,,,
PRO,IO模块IP,PRO_AOI_IP_3,192.168.200.13,,,,,,,
......@@ -42,17 +41,4 @@ DO,NG料线体电机运转,NGLine_Run,4,PRO_AOI_IP_1,0,NG料线体电机运转,Y05,DO-05,0,
,,,15,PRO_AOI_IP_1,0,,Y16,DO-16,0,
,,,,,,,,,,
,,,,,,,,,,
,,,,,,,,,,
PRO,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,,
,,,,,,,,,,
PRO,预警温度,WarnTemperate,80,,,,,, ,
PRO,预警湿度,WarnHumidity,80,,,,,, ,
PRO,出入库多少次,会自动重置旋转轴,Box_ResetMCount,1000,,,,,,,
PRO,出入库多少次,会自动重置所有轴操作,Box_ResetACount,100,,,,,,,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,
PRO,是否使用料盘检测信号,IsUse_Tray_Check,0,,,,,,,
PRO,需要吹气的温度(温度标准),Max_Temperature,0,,,,,,,
PRO,需要吹气的湿度(湿度标准),Max_Humidity,10,,,,,,,
PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,
PRO,温湿度端口号,Humiture_Port,COM2,,,,,,,
......@@ -34,7 +34,7 @@ namespace OnlineStore.DeviceLibrary
protected static readonly ILog LOGGER = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public string Name { get; set; }
public int DeviceID { get; set; }
public StoreConfig baseConfig = null;
public BaseConfig baseConfig = null;
/// <summary>
/// 料仓状态
/// </summary>
......
......@@ -59,7 +59,7 @@
<Compile Include="position\CSVPositionReader.cs" />
<Compile Include="CSVReaderBase.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="storeConfig\config\StoreConfig.cs" />
<Compile Include="storeConfig\config\BaseConfig.cs" />
<Compile Include="position\StorePostionBase.cs" />
</ItemGroup>
<ItemGroup>
......
......@@ -136,21 +136,21 @@ namespace OnlineStore.LoadCSVLibrary
public static AC_BOX_Config LoadBoxConfig(int storeId, string cid, string storeType, string linefilePath)
{
StoreConfig config = null;
BaseConfig config = null;
config = new AC_BOX_Config(storeId, cid, storeType, linefilePath);
return (AC_BOX_Config)LoadConfig(config);
}
public static Store_Config LoadLineConfig(int storeId, string cid, string storeType, string linefilePath)
{
StoreConfig config = null;
BaseConfig config = null;
config = new Store_Config(storeId, cid, storeType, linefilePath);
return (Store_Config)LoadConfig(config);
}
public static StoreConfig LoadConfig(int storeId, string cid, string storeType, string filePath)
public static BaseConfig LoadConfig(int storeId, string cid, string storeType, string filePath)
{
StoreConfig config = null;
BaseConfig config = null;
if (storeType.Equals(StoreType.RC_AC_SA))
{
config = new AC_BOX_Config(storeId, cid, storeType, filePath);
......@@ -162,7 +162,7 @@ namespace OnlineStore.LoadCSVLibrary
return LoadConfig(config);
}
public static StoreConfig LoadConfig(StoreConfig config)
public static BaseConfig LoadConfig(BaseConfig config)
{
LOGGER.Info("开始读取文件:" + config.ConfigFilePath);
if (config == null || config.ConfigFilePath.Equals(""))
......
......@@ -218,9 +218,9 @@ namespace OnlineStore.LoadCSVLibrary
{
if (String.IsNullOrEmpty(IP))
{
if (StoreConfig.ProIOIpMap != null && StoreConfig.ProIOIpMap.ContainsKey(DeviceName))
if (BaseConfig.ProIOIpMap != null && BaseConfig.ProIOIpMap.ContainsKey(DeviceName))
{
IP = StoreConfig.ProIOIpMap[DeviceName];
IP = BaseConfig.ProIOIpMap[DeviceName];
}
else
{
......
......@@ -6,7 +6,7 @@ using System.Text;
namespace OnlineStore.LoadCSVLibrary
{
public class AC_BOX_Config : StoreConfig
public class AC_BOX_Config : BaseConfig
{
public AC_BOX_Config()
: base()
......@@ -438,27 +438,27 @@ namespace OnlineStore.LoadCSVLibrary
protected override void initMustHavePro()
{
MustHaveDIList = new List<string>();
MustHaveDOList = new List<string>();
MustHaveDIList.Add(IO_Type.SuddenStop_BTN);
MustHaveDIList.Add(IO_Type.Reset_BTN);
MustHaveDIList.Add(IO_Type.DoorLimit);
MustHaveDIList.Add(IO_Type.Airpressure_Check);
MustHaveDIList.Add(IO_Type.TrayCheck_Door);
MustHaveDIList.Add(IO_Type.TrayCheck_Fixture);
MustHaveDIList.Add(IO_Type.Door_Up);
MustHaveDIList.Add(IO_Type.Door_Down);
MustHaveDOList.Add(IO_Type.AutoRun_HddLed);
MustHaveDOList.Add(IO_Type.Alarm_HddLed);
MustHaveDOList.Add(IO_Type.RunSign_HddLed);
MustHaveDOList.Add(IO_Type.StartOrStopBlow);
MustHaveDOList.Add(IO_Type.Run_Signal);
MustHaveDOList.Add(IO_Type.Door_Up);
MustHaveDOList.Add(IO_Type.Door_Down);
MustHaveDOList.Add(IO_Type.Axis_Brake);
//MustHaveDIList = new List<string>();
//MustHaveDOList = new List<string>();
//MustHaveDIList.Add(IO_Type.SuddenStop_BTN);
//MustHaveDIList.Add(IO_Type.Reset_BTN);
//MustHaveDIList.Add(IO_Type.DoorLimit);
//MustHaveDIList.Add(IO_Type.Airpressure_Check);
//MustHaveDIList.Add(IO_Type.TrayCheck_Door);
//MustHaveDIList.Add(IO_Type.TrayCheck_Fixture);
//MustHaveDIList.Add(IO_Type.Door_Up);
//MustHaveDIList.Add(IO_Type.Door_Down);
//MustHaveDOList.Add(IO_Type.AutoRun_HddLed);
//MustHaveDOList.Add(IO_Type.Alarm_HddLed);
//MustHaveDOList.Add(IO_Type.RunSign_HddLed);
//MustHaveDOList.Add(IO_Type.StartOrStopBlow);
//MustHaveDOList.Add(IO_Type.Run_Signal);
//MustHaveDOList.Add(IO_Type.Door_Up);
//MustHaveDOList.Add(IO_Type.Door_Down);
//MustHaveDOList.Add(IO_Type.Axis_Brake);
}
public static void ConfigAxis(AC_BOX_Config Config)
{
......
......@@ -7,7 +7,7 @@ using System.Text;
namespace OnlineStore.LoadCSVLibrary
{
public class StoreConfig
public class BaseConfig
{
public static Dictionary<string, string> ProIOIpMap = null;
public const string IOIP_Str = "PRO_AOI_IP";
......@@ -62,12 +62,12 @@ namespace OnlineStore.LoadCSVLibrary
MustHaveDIList = new List<string>();
MustHaveDOList = new List<string>();
}
public StoreConfig()
public BaseConfig()
{
initMustHavePro();
}
public StoreConfig(int id, string cid, string type, string filepath)
public BaseConfig(int id, string cid, string type, string filepath)
{
initMustHavePro();
MustHaveDIList = new List<string>();
......
......@@ -6,7 +6,7 @@ using System.Text;
namespace OnlineStore.LoadCSVLibrary
{
public class Store_Config : StoreConfig
public class Store_Config : BaseConfig
{
public Store_Config()
: base()
......@@ -18,32 +18,32 @@ namespace OnlineStore.LoadCSVLibrary
}
/// <summary>
/// 预警温度
/// </summary>
[ConfigProAttribute("WarnTemperate")]
public int WarnTemperate { get; set; }
/// <summary>
/// 预警湿度
/// </summary>
[ConfigProAttribute("WarnHumidity")]
public int WarnHumidity { get; set; }
///// <summary>
///// 预警温度
///// </summary>
//[ConfigProAttribute("WarnTemperate")]
//public int WarnTemperate { get; set; }
///// <summary>
///// 预警湿度
///// </summary>
//[ConfigProAttribute("WarnHumidity")]
//public int WarnHumidity { get; set; }
/// <summary>
/// 气压检测IO关闭需要持续的时间(=3表示需要关闭三秒以上才算关闭)
/// </summary>
[ConfigProAttribute("AirCheckSeconds")]
public int AirCheckSeconds { get; set; }
/// <summary>
/// PRO,BOX出入库次数多少次时,会自动重置旋转轴,Box_ResetMCount,10,,,,,
/// </summary>
[ConfigProAttribute("Box_ResetMCount")]
public int Box_ResetMCount { get; set; }
/// <summary>
/// PRO,BOX出入库次数多少次时,会自动重置操作(会重置所有轴),Box_ResetACount,100,,,,,
/// </summary>
[ConfigProAttribute("Box_ResetACount")]
public int Box_ResetACount { get; set; }
///// <summary>
///// PRO,BOX出入库次数多少次时,会自动重置旋转轴,Box_ResetMCount,10,,,,,
///// </summary>
//[ConfigProAttribute("Box_ResetMCount")]
//public int Box_ResetMCount { get; set; }
///// <summary>
///// PRO,BOX出入库次数多少次时,会自动重置操作(会重置所有轴),Box_ResetACount,100,,,,,
///// </summary>
//[ConfigProAttribute("Box_ResetACount")]
//public int Box_ResetACount { get; set; }
/// <summary>
/// PRO IO信号超时时间(毫秒) IOSingle_TimerOut 5000
......@@ -52,35 +52,35 @@ namespace OnlineStore.LoadCSVLibrary
public int IOSingle_TimerOut { get; set; }
/// <summary>
/// PRO 需要吹气的温度(温度标准) Max_Temperature 10
/// </summary>
[ConfigProAttribute("Max_Temperature", false)]
public int Max_Temperature { get; set; }
/// <summary>
/// PRO 需要吹气的湿度(湿度标准) Max_Humidity 10
/// </summary>
[ConfigProAttribute("Max_Humidity", false)]
public int Max_Humidity { get; set; }
/// <summary>
/// PRO 每次吹气的时间(分钟) BlowAir_Time 10
/// </summary>
[ConfigProAttribute("BlowAir_Time", false)]
public int BlowAir_Time { get; set; }
/// <summary>
/// PRO 两次吹气间隔(分钟) BlowAir_Interval 10
/// </summary>
[ConfigProAttribute("BlowAir_Interval", false)]
public int BlowAir_Interval { get; set; }
public int InoutAxis_PositionMax { get; set; }
/// <summary>
/// PRO,温湿度端口号,Humiture_Port,COM1,,,,,,,
/// </summary>
[ConfigProAttribute("Humiture_Port", true )]
public string Humiture_Port { get; set; }
///// <summary>
///// PRO 需要吹气的温度(温度标准) Max_Temperature 10
///// </summary>
//[ConfigProAttribute("Max_Temperature", false)]
//public int Max_Temperature { get; set; }
///// <summary>
///// PRO 需要吹气的湿度(湿度标准) Max_Humidity 10
///// </summary>
//[ConfigProAttribute("Max_Humidity", false)]
//public int Max_Humidity { get; set; }
///// <summary>
///// PRO 每次吹气的时间(分钟) BlowAir_Time 10
///// </summary>
//[ConfigProAttribute("BlowAir_Time", false)]
//public int BlowAir_Time { get; set; }
///// <summary>
///// PRO 两次吹气间隔(分钟) BlowAir_Interval 10
///// </summary>
//[ConfigProAttribute("BlowAir_Interval", false)]
//public int BlowAir_Interval { get; set; }
//public int InoutAxis_PositionMax { get; set; }
///// <summary>
///// PRO,温湿度端口号,Humiture_Port,COM1,,,,,,,
///// </summary>
//[ConfigProAttribute("Humiture_Port", true )]
//public string Humiture_Port { get; set; }
/// <summary>
/// PRO IO模块对应的DI数量 IO_DILength 192.168.200.10#16;192.168.200.11#4
......@@ -93,11 +93,11 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("IO_DOLength")]
public string IO_DOLength { get; set; }
/// <summary>
/// PRO 是否有仓门 HasDoor 1
/// </summary>
[ConfigProAttribute("HasDoor")]
public int HasDoor { get; set; }
///// <summary>
///// PRO 是否有仓门 HasDoor 1
///// </summary>
//[ConfigProAttribute("HasDoor")]
//public int HasDoor { get; set; }
protected override void initMustHavePro()
{
......@@ -105,23 +105,15 @@ namespace OnlineStore.LoadCSVLibrary
MustHaveDOList = new List<string>();
MustHaveDIList.Add(IO_Type.SuddenStop_BTN);
MustHaveDIList.Add(IO_Type.Reset_BTN);
MustHaveDIList.Add(IO_Type.DoorLimit);
MustHaveDIList.Add(IO_Type.Airpressure_Check);
MustHaveDIList.Add(IO_Type.TrayCheck_Door);
MustHaveDIList.Add(IO_Type.TrayCheck_Fixture);
MustHaveDIList.Add(IO_Type.Door_Up);
MustHaveDIList.Add(IO_Type.Door_Down);
MustHaveDOList.Add(IO_Type.AutoRun_HddLed);
MustHaveDOList.Add(IO_Type.Alarm_HddLed);
MustHaveDOList.Add(IO_Type.RunSign_HddLed);
MustHaveDOList.Add(IO_Type.StartOrStopBlow);
MustHaveDOList.Add(IO_Type.Run_Signal);
MustHaveDOList.Add(IO_Type.Door_Up);
MustHaveDOList.Add(IO_Type.Door_Down);
MustHaveDOList.Add(IO_Type.Axis_Brake);
MustHaveDOList.Add(IO_Type.Alarm_Buzzer);
MustHaveDOList.Add(IO_Type.NGLine_Run);
}
public static void ConfigAxis(AC_BOX_Config Config)
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!