Commit f56d3329 刘韬

出厂前

1 个父辈 fb156731
正在显示 51 个修改的文件 包含 4439 行增加2839 行删除
......@@ -19,6 +19,7 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Description = 汇川模块的SISO料仓
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7FA84E1E-BCDE-49F6-BE42-0BC397AF65B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
......
此文件类型无法预览
......@@ -53,8 +53,17 @@
<ApplicationIcon>box.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net">
<HintPath>..\..\dll\log4net.dll</HintPath>
<Reference Include="CodeLibrary, Version=1.0.7874.27460, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\GeneralClassLibrary\CodeLibraryProject\CodeLibrary\bin\Debug\CodeLibrary.dll</HintPath>
</Reference>
<Reference Include="HuichuanLibrary, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\HuichuanLibrary\HuichuanLibrary\bin\Debug\HuichuanLibrary.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\增广夹爪\Rmaxis\bin\Debug\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
......@@ -131,9 +140,15 @@
<Compile Include="useControl\AxisMoveControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="useControl\AxisMoveControl.Designer.cs">
<Compile Include="useControl\AxisMoveControl.designer.cs">
<DependentUpon>AxisMoveControl.cs</DependentUpon>
</Compile>
<Compile Include="useControl\uc_AxisDebug.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="useControl\uc_AxisDebug.Designer.cs">
<DependentUpon>uc_AxisDebug.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="FrmInOutStore.resx">
<DependentUpon>FrmInOutStore.cs</DependentUpon>
</EmbeddedResource>
......@@ -174,6 +189,9 @@
<EmbeddedResource Include="useControl\AxisMoveControl.resx">
<DependentUpon>AxisMoveControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="useControl\uc_AxisDebug.resx">
<DependentUpon>uc_AxisDebug.cs</DependentUpon>
</EmbeddedResource>
<None Include="resource\language.resource">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
......
......@@ -33,14 +33,16 @@
<!--解码方式,0=halcon 解码,1=西安料仓 使用zxing解码,2=成都料仓-->
<add key="DeCodeType" value="0"/>
<add key ="DefaultPWD" value ="123456"/>
<add key="UseAIOBOX" value="1"/>
<add key="DefaultPWD" value ="123456"/>
<!--是否使用蜂鸣器-->
<add key ="UseBuzzer" value ="1"/>
<add key ="StartScan_CMD" value ="S"/>
<add key ="ShowLanguageMsg" value ="1"/>
<!--每盘料扫码的次数-->
<add key ="MaxScanCount" value ="2"/>
<add key="CameraName" value="GigE:acA3800-10gc (23124327)#GigE:acA3800-10gc (23172285)" />
<add key="CodeType" value="Data Matrix ECC 200#QR Code#PDF417" />
<add key="CodeParamPath" value="\CodeParam\" />
</appSettings>
<log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
......
......@@ -26,10 +26,8 @@
this.label2 = new System.Windows.Forms.Label();
this.txtDOIndex = new System.Windows.Forms.TextBox();
this.txtDoName = new System.Windows.Forms.TextBox();
this.btnCloseAxisBreak = new System.Windows.Forms.Button();
this.label17 = new System.Windows.Forms.Label();
this.btnReadIO = new System.Windows.Forms.Button();
this.btnOpenAxisBreak = new System.Windows.Forms.Button();
this.label14 = new System.Windows.Forms.Label();
this.btnWriteSingleDO = new System.Windows.Forms.Button();
this.txtWriteTime = new System.Windows.Forms.TextBox();
......@@ -71,7 +69,7 @@
//
// timer1
//
this.timer1.Interval = 1000;
this.timer1.Interval = 300;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// groupBox1
......@@ -86,10 +84,8 @@
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.txtDOIndex);
this.groupBox1.Controls.Add(this.txtDoName);
this.groupBox1.Controls.Add(this.btnCloseAxisBreak);
this.groupBox1.Controls.Add(this.label17);
this.groupBox1.Controls.Add(this.btnReadIO);
this.groupBox1.Controls.Add(this.btnOpenAxisBreak);
this.groupBox1.Controls.Add(this.label14);
this.groupBox1.Controls.Add(this.btnWriteSingleDO);
this.groupBox1.Controls.Add(this.txtWriteTime);
......@@ -193,17 +189,6 @@
this.txtDoName.TabIndex = 241;
this.txtDoName.Text = "0";
//
// btnCloseAxisBreak
//
this.btnCloseAxisBreak.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseAxisBreak.Location = new System.Drawing.Point(173, 236);
this.btnCloseAxisBreak.Name = "btnCloseAxisBreak";
this.btnCloseAxisBreak.Size = new System.Drawing.Size(144, 43);
this.btnCloseAxisBreak.TabIndex = 253;
this.btnCloseAxisBreak.Text = "关闭刹车";
this.btnCloseAxisBreak.UseVisualStyleBackColor = true;
this.btnCloseAxisBreak.Click += new System.EventHandler(this.btnCloseAxisBreak_Click);
//
// label17
//
this.label17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
......@@ -226,17 +211,6 @@
this.btnReadIO.UseVisualStyleBackColor = true;
this.btnReadIO.Click += new System.EventHandler(this.btnReadIO_Click);
//
// btnOpenAxisBreak
//
this.btnOpenAxisBreak.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenAxisBreak.Location = new System.Drawing.Point(173, 189);
this.btnOpenAxisBreak.Name = "btnOpenAxisBreak";
this.btnOpenAxisBreak.Size = new System.Drawing.Size(144, 43);
this.btnOpenAxisBreak.TabIndex = 252;
this.btnOpenAxisBreak.Text = "打开刹车";
this.btnOpenAxisBreak.UseVisualStyleBackColor = true;
this.btnOpenAxisBreak.Click += new System.EventHandler(this.btnOpenAxisBreak_Click);
//
// label14
//
this.label14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
......@@ -352,6 +326,7 @@
this.button1.TabIndex = 254;
this.button1.Text = "关闭";
this.button1.UseVisualStyleBackColor = true;
this.button1.Visible = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// chbAutoRead
......@@ -367,6 +342,7 @@
this.chbAutoRead.TabIndex = 244;
this.chbAutoRead.Text = "自动读取";
this.chbAutoRead.UseVisualStyleBackColor = true;
this.chbAutoRead.Visible = false;
//
// groupBox4
//
......@@ -693,8 +669,6 @@
private System.Windows.Forms.TextBox txtDoName;
private System.Windows.Forms.Button btnCloseDoor;
private System.Windows.Forms.Button btnOpenDoor;
private System.Windows.Forms.Button btnCloseAxisBreak;
private System.Windows.Forms.Button btnOpenAxisBreak;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button btnCloseLed;
private System.Windows.Forms.Button btnOpenLed;
......
......@@ -90,7 +90,7 @@ namespace OnlineStore.ACSingleStore
private void timer1_Tick(object sender, EventArgs e)
{
if (chbAutoRead.Checked)
if (chbAutoRead.Checked && this.Visible)
{
ReadIOList();
}
......@@ -98,7 +98,7 @@ namespace OnlineStore.ACSingleStore
private void FrmTest_FormClosing(object sender, FormClosingEventArgs e)
{
AIManager.Instance.NeedShow = false;
//AIManager.Instance.NeedShow = false;
try
{
if (this.timer1.Enabled)
......@@ -161,7 +161,7 @@ namespace OnlineStore.ACSingleStore
private void FrmStoreIOStatus_Load(object sender, EventArgs e)
{
AIManager.Instance.NeedShow = true;
//AIManager.Instance.NeedShow = true;
if (boxBean.Config.StoreDOList.ContainsKey(IO_Type.Device_Led))
{
btnDevideLed.Visible = true;
......@@ -230,10 +230,10 @@ namespace OnlineStore.ACSingleStore
}
}
double ai1Value = AIManager.Instance.GetAIValue(boxBean.Config.AIDevice_IP, StoreManager.Config.AIDI1_Addr);
double ai2Value = AIManager.Instance.GetAIValue(boxBean.Config.AIDevice_IP, StoreManager.Config.AIDI2_Addr);
double ai3Value = AIManager.Instance.GetAIValue(boxBean.Config.AIDevice_IP, StoreManager.Config.AIDI3_Addr);
double ai4Value = AIManager.Instance.GetAIValue(boxBean.Config.AIDevice_IP, StoreManager.Config.AIDI4_Addr);
double ai1Value = IOManager.GetADIOValue(StoreManager.Config.AIDI1_Addr);
double ai2Value = IOManager.GetADIOValue(StoreManager.Config.AIDI2_Addr);
double ai3Value = IOManager.GetADIOValue(StoreManager.Config.AIDI3_Addr);
double ai4Value = IOManager.GetADIOValue(StoreManager.Config.AIDI4_Addr);
//double ai3Value = AIManager.Instance.GetAIValue(boxBean.Config.AIDevice_IP, 3);
txtAI1.Text = ai1Value.ToString();
......@@ -242,16 +242,21 @@ namespace OnlineStore.ACSingleStore
txtAI4.Text = ai4Value.ToString();
//txtAI3.Text = ai3Value.ToString();
txtAIResult1.Text = AIManager.ConvertAI(ai1Value,boxBean.Config.AIDI1_DefaultPosition).ToString();
txtAIResult2.Text = AIManager.ConvertAI(ai2Value, boxBean.Config.AIDI2_DefaultPosition).ToString();
txtAIResult3.Text = AIManager.ConvertAI(ai3Value, boxBean.Config.AIDI3_DefaultPosition).ToString();
txtAIResult4.Text = AIManager.ConvertAI(ai4Value, boxBean.Config.AIDI4_DefaultPosition).ToString();
txtAIResult1.Text = ConvertAI(ai1Value,boxBean.Config.AIDI1_DefaultPosition).ToString();
txtAIResult2.Text = ConvertAI(ai2Value, boxBean.Config.AIDI2_DefaultPosition).ToString();
txtAIResult3.Text = ConvertAI(ai3Value, boxBean.Config.AIDI3_DefaultPosition).ToString();
txtAIResult4.Text = ConvertAI(ai4Value, boxBean.Config.AIDI4_DefaultPosition).ToString();
//txtAIResult3.Text = AIManager.ConvertAI(ai3Value, boxBean.Config.AIDI3_DefaultPosition).ToString();
txtHeight.Text = boxBean.GetHeight().ToString();
txtSize.Text = boxBean.GetSize().ToString();
}
public static double ConvertAI(double aiValue, double defaultValue)
{
double xishu = (double)StoreManager.Config.AI_ConvertPosition;
double result = Math.Round((aiValue - defaultValue) / xishu, 2);
return result;
}
private void btnReadAllDi_Click(object sender, EventArgs e)
{
string deviceName = txtDoName.Text;
......@@ -272,14 +277,12 @@ namespace OnlineStore.ACSingleStore
private void btnOpenDoor_Click(object sender, EventArgs e)
{
LogUtil.info("点击按钮:" + btnOpenDoor.Text);
IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.HIGH);
IOManager.IOMove(IO_Type.Door_Down, IO_VALUE.LOW);
boxBean.OpenDoor(false);
}
private void btnCloseDoor_Click(object sender, EventArgs e)
{
LogUtil.info("点击按钮:" + btnCloseDoor.Text);
IOManager.IOMove(IO_Type.Door_Down, IO_VALUE.HIGH);
IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.LOW);
boxBean.CloseDoor(false);
}
private void FrmIOStatus_Shown(object sender, EventArgs e)
......@@ -289,12 +292,12 @@ namespace OnlineStore.ACSingleStore
private void btnOpenAxisBreak_Click(object sender, EventArgs e)
{
IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.HIGH);
//IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.HIGH);
}
private void btnCloseAxisBreak_Click(object sender, EventArgs e)
{
IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
//IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
}
private void button1_Click(object sender, EventArgs e)
......
......@@ -32,6 +32,7 @@
this.btnOk = new System.Windows.Forms.Button();
this.rbtnEnglish = new System.Windows.Forms.RadioButton();
this.rbtnChina = new System.Windows.Forms.RadioButton();
this.rbtnJapanese = new System.Windows.Forms.RadioButton();
this.SuspendLayout();
//
// btnCancel
......@@ -64,19 +65,19 @@
//
this.rbtnEnglish.AutoSize = true;
this.rbtnEnglish.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.rbtnEnglish.Location = new System.Drawing.Point(198, 113);
this.rbtnEnglish.Location = new System.Drawing.Point(198, 84);
this.rbtnEnglish.Name = "rbtnEnglish";
this.rbtnEnglish.Size = new System.Drawing.Size(60, 25);
this.rbtnEnglish.TabIndex = 281;
this.rbtnEnglish.TabStop = true;
this.rbtnEnglish.Text = "英";
this.rbtnEnglish.Text = "英";
this.rbtnEnglish.UseVisualStyleBackColor = true;
//
// rbtnChina
//
this.rbtnChina.AutoSize = true;
this.rbtnChina.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.rbtnChina.Location = new System.Drawing.Point(198, 59);
this.rbtnChina.Location = new System.Drawing.Point(198, 39);
this.rbtnChina.Name = "rbtnChina";
this.rbtnChina.Size = new System.Drawing.Size(60, 25);
this.rbtnChina.TabIndex = 280;
......@@ -84,6 +85,18 @@
this.rbtnChina.Text = "中文";
this.rbtnChina.UseVisualStyleBackColor = true;
//
// rbtnJapanese
//
this.rbtnJapanese.AutoSize = true;
this.rbtnJapanese.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.rbtnJapanese.Location = new System.Drawing.Point(198, 130);
this.rbtnJapanese.Name = "rbtnJapanese";
this.rbtnJapanese.Size = new System.Drawing.Size(60, 25);
this.rbtnJapanese.TabIndex = 281;
this.rbtnJapanese.TabStop = true;
this.rbtnJapanese.Text = "日语";
this.rbtnJapanese.UseVisualStyleBackColor = true;
//
// FrmLanguare
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
......@@ -91,6 +104,7 @@
this.ClientSize = new System.Drawing.Size(456, 274);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOk);
this.Controls.Add(this.rbtnJapanese);
this.Controls.Add(this.rbtnEnglish);
this.Controls.Add(this.rbtnChina);
this.MaximizeBox = false;
......@@ -109,5 +123,6 @@
private System.Windows.Forms.Button btnOk;
private System.Windows.Forms.RadioButton rbtnEnglish;
private System.Windows.Forms.RadioButton rbtnChina;
private System.Windows.Forms.RadioButton rbtnJapanese;
}
}
\ No newline at end of file
......@@ -27,6 +27,10 @@ namespace OnlineStore.ACSingleStore
{
rbtnEnglish.Checked = true;
}
else if(ResourceCulture.CurrLanguage.Equals(ResourceCulture.Japanese))
{
rbtnJapanese.Checked = true;
}
else
{
rbtnChina.Checked = true;
......@@ -45,7 +49,10 @@ namespace OnlineStore.ACSingleStore
{
str = ResourceCulture.English;
}
else
else if(rbtnJapanese.Checked)
{
str = ResourceCulture.Japanese;
}else
{
str = ResourceCulture.China;
}
......
......@@ -36,13 +36,13 @@
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(153, 61);
this.label1.Location = new System.Drawing.Point(71, 61);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(126, 25);
this.label1.Size = new System.Drawing.Size(306, 25);
this.label1.TabIndex = 0;
this.label1.Text = "请输入密码:";
this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// btnNext
//
......
namespace OnlineStore.ACSingleStore
using OnlineStore.DUOStore;
namespace OnlineStore.ACSingleStore
{
partial class FrmStoreBox
{
......@@ -69,6 +71,7 @@
this.btnClearLog = new System.Windows.Forms.Button();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.panel1 = new System.Windows.Forms.Panel();
this.groupBox7 = new System.Windows.Forms.GroupBox();
this.groupHistory = new System.Windows.Forms.GroupBox();
this.txtHistoryTemp = new System.Windows.Forms.TextBox();
......@@ -91,7 +94,6 @@
this.label27 = new System.Windows.Forms.Label();
this.btnTempClose = new System.Windows.Forms.Button();
this.btnTempInit = new System.Windows.Forms.Button();
this.axisMoveControl1 = new OnlineStore.ACPackingStore.AxisMoveControl();
this.groupInout = new System.Windows.Forms.GroupBox();
this.lblTempStr = new System.Windows.Forms.Label();
this.lblMsg = new System.Windows.Forms.Label();
......@@ -134,6 +136,7 @@
this.btnUpDownP6 = new System.Windows.Forms.Button();
this.btnUpDownP3 = new System.Windows.Forms.Button();
this.btnUpDownP4 = new System.Windows.Forms.Button();
this.axisMoveControl1 = new OnlineStore.DUOStore.AxisMoveControl();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.料仓操作ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
......@@ -167,6 +170,7 @@
this.开启DEBUGToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
this.清理日志ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.tabPage8 = new System.Windows.Forms.TabPage();
this.contextMenuStrip1.SuspendLayout();
this.tabControl2.SuspendLayout();
this.tabPage4.SuspendLayout();
......@@ -177,6 +181,7 @@
this.groupBox3.SuspendLayout();
this.tabPage3.SuspendLayout();
this.tabPage1.SuspendLayout();
this.panel1.SuspendLayout();
this.groupBox7.SuspendLayout();
this.groupHistory.SuspendLayout();
this.groupInout.SuspendLayout();
......@@ -424,9 +429,9 @@
//
this.btnUpdown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpdown.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpdown.Location = new System.Drawing.Point(834, 383);
this.btnUpdown.Location = new System.Drawing.Point(826, 410);
this.btnUpdown.Name = "btnUpdown";
this.btnUpdown.Size = new System.Drawing.Size(135, 45);
this.btnUpdown.Size = new System.Drawing.Size(135, 33);
this.btnUpdown.TabIndex = 272;
this.btnUpdown.Text = "升降轴位置调试";
this.btnUpdown.UseVisualStyleBackColor = true;
......@@ -436,9 +441,9 @@
//
this.btnAxisOff.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisOff.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisOff.Location = new System.Drawing.Point(694, 383);
this.btnAxisOff.Location = new System.Drawing.Point(686, 410);
this.btnAxisOff.Name = "btnAxisOff";
this.btnAxisOff.Size = new System.Drawing.Size(135, 45);
this.btnAxisOff.Size = new System.Drawing.Size(135, 33);
this.btnAxisOff.TabIndex = 11;
this.btnAxisOff.Text = "料仓运转OFF";
this.btnAxisOff.UseVisualStyleBackColor = true;
......@@ -448,9 +453,9 @@
//
this.btnAxisOn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisOn.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisOn.Location = new System.Drawing.Point(554, 383);
this.btnAxisOn.Location = new System.Drawing.Point(546, 410);
this.btnAxisOn.Name = "btnAxisOn";
this.btnAxisOn.Size = new System.Drawing.Size(135, 45);
this.btnAxisOn.Size = new System.Drawing.Size(135, 33);
this.btnAxisOn.TabIndex = 10;
this.btnAxisOn.Text = "料仓运转ON";
this.btnAxisOn.UseVisualStyleBackColor = true;
......@@ -513,6 +518,7 @@
this.tabControl1.Controls.Add(this.tabPage3);
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage8);
this.tabControl1.Location = new System.Drawing.Point(6, 85);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
......@@ -720,12 +726,7 @@
//
// tabPage1
//
this.tabPage1.Controls.Add(this.btnUpdown);
this.tabPage1.Controls.Add(this.groupBox7);
this.tabPage1.Controls.Add(this.axisMoveControl1);
this.tabPage1.Controls.Add(this.btnAxisOff);
this.tabPage1.Controls.Add(this.btnAxisOn);
this.tabPage1.Controls.Add(this.groupInout);
this.tabPage1.Controls.Add(this.panel1);
this.tabPage1.Location = new System.Drawing.Point(4, 29);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
......@@ -734,6 +735,21 @@
this.tabPage1.Text = " 伺服调试 ";
this.tabPage1.UseVisualStyleBackColor = true;
//
// panel1
//
this.panel1.AutoScroll = true;
this.panel1.Controls.Add(this.groupBox7);
this.panel1.Controls.Add(this.btnUpdown);
this.panel1.Controls.Add(this.groupInout);
this.panel1.Controls.Add(this.btnAxisOff);
this.panel1.Controls.Add(this.axisMoveControl1);
this.panel1.Controls.Add(this.btnAxisOn);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(3, 3);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(984, 597);
this.panel1.TabIndex = 273;
//
// groupBox7
//
this.groupBox7.Controls.Add(this.groupHistory);
......@@ -747,9 +763,9 @@
this.groupBox7.Controls.Add(this.btnTempClose);
this.groupBox7.Controls.Add(this.btnTempInit);
this.groupBox7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox7.Location = new System.Drawing.Point(549, 441);
this.groupBox7.Location = new System.Drawing.Point(542, 447);
this.groupBox7.Name = "groupBox7";
this.groupBox7.Size = new System.Drawing.Size(427, 124);
this.groupBox7.Size = new System.Drawing.Size(427, 117);
this.groupBox7.TabIndex = 272;
this.groupBox7.TabStop = false;
this.groupBox7.Text = "温控器调试";
......@@ -962,7 +978,7 @@
//
this.label27.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label27.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label27.Location = new System.Drawing.Point(4, 29);
this.label27.Location = new System.Drawing.Point(6, 30);
this.label27.Name = "label27";
this.label27.Size = new System.Drawing.Size(102, 17);
this.label27.TabIndex = 242;
......@@ -991,13 +1007,6 @@
this.btnTempInit.UseVisualStyleBackColor = true;
this.btnTempInit.Click += new System.EventHandler(this.btnTempInit_Click);
//
// axisMoveControl1
//
this.axisMoveControl1.Location = new System.Drawing.Point(545, 4);
this.axisMoveControl1.Name = "axisMoveControl1";
this.axisMoveControl1.Size = new System.Drawing.Size(437, 374);
this.axisMoveControl1.TabIndex = 0;
//
// groupInout
//
this.groupInout.Controls.Add(this.lblTempStr);
......@@ -1042,7 +1051,7 @@
this.groupInout.Controls.Add(this.btnUpDownP3);
this.groupInout.Controls.Add(this.btnUpDownP4);
this.groupInout.Enabled = false;
this.groupInout.Location = new System.Drawing.Point(6, 6);
this.groupInout.Location = new System.Drawing.Point(3, 3);
this.groupInout.Name = "groupInout";
this.groupInout.Size = new System.Drawing.Size(533, 561);
this.groupInout.TabIndex = 100;
......@@ -1691,6 +1700,13 @@
this.btnUpDownP4.UseVisualStyleBackColor = false;
this.btnUpDownP4.Click += new System.EventHandler(this.btnUpDownP4_Click);
//
// axisMoveControl1
//
this.axisMoveControl1.Location = new System.Drawing.Point(542, 0);
this.axisMoveControl1.Name = "axisMoveControl1";
this.axisMoveControl1.Size = new System.Drawing.Size(557, 397);
this.axisMoveControl1.TabIndex = 0;
//
// tabPage2
//
this.tabPage2.Location = new System.Drawing.Point(4, 29);
......@@ -1714,7 +1730,7 @@
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Padding = new System.Windows.Forms.Padding(5, 2, 0, 2);
this.menuStrip1.Size = new System.Drawing.Size(1101, 33);
this.menuStrip1.Size = new System.Drawing.Size(1008, 33);
this.menuStrip1.TabIndex = 257;
this.menuStrip1.Text = "menuStrip1";
this.menuStrip1.Visible = false;
......@@ -1941,6 +1957,15 @@
this.清理日志ToolStripMenuItem.Text = "清理日志";
this.清理日志ToolStripMenuItem.Click += new System.EventHandler(this.清理日志ToolStripMenuItem_Click);
//
// tabPage8
//
this.tabPage8.Location = new System.Drawing.Point(4, 29);
this.tabPage8.Name = "tabPage8";
this.tabPage8.Size = new System.Drawing.Size(990, 603);
this.tabPage8.TabIndex = 4;
this.tabPage8.Text = " 库位调试 ";
this.tabPage8.UseVisualStyleBackColor = true;
//
// FrmStoreBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
......@@ -1972,6 +1997,7 @@
this.tabPage3.ResumeLayout(false);
this.tabPage3.PerformLayout();
this.tabPage1.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.groupBox7.ResumeLayout(false);
this.groupBox7.PerformLayout();
this.groupHistory.ResumeLayout(false);
......@@ -2116,7 +2142,7 @@
private System.Windows.Forms.Button btnSelHistory;
private System.Windows.Forms.GroupBox groupHistory;
private System.Windows.Forms.CheckBox chbBuzzer;
private ACPackingStore.AxisMoveControl axisMoveControl1;
private AxisMoveControl axisMoveControl1;
private System.Windows.Forms.Button btnUpdown;
private System.Windows.Forms.Button btnLan;
private System.Windows.Forms.CheckBox chbIsDebug;
......@@ -2130,6 +2156,8 @@
private System.Windows.Forms.Button btnOpenDLed;
private System.Windows.Forms.Button btnCloseDoor;
private System.Windows.Forms.Button btnCloseDLed;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.TabPage tabPage8;
}
}
......@@ -16,6 +16,7 @@ using log4net;
using OnlineStore.DeviceLibrary;
using System.IO.Ports;
using OnlineStore.LoadCSVLibrary;
using CodeLibrary;
namespace OnlineStore.ACSingleStore
{
......@@ -154,7 +155,7 @@ namespace OnlineStore.ACSingleStore
notifyIcon1.Text = ConfigAppSettings.GetValue(Setting_Init.App_Title);
this.chbBuzzer.Checked = store.UseBuzzer;
axisMoveControl1.LoadData(store, store.moveAxisList.ToArray());
axisMoveControl1.LoadData(store);
chbIsDebug.Checked = store.IsDebug;
LoadOk = true;
HideForm();
......@@ -188,6 +189,26 @@ namespace OnlineStore.ACSingleStore
// this.tabControl1.TabPages.Remove(tabPage3);
// groupCode.Visible = false;
AddForm(" IO调试 ", new FrmIOStatus(store));
}
private void AddForm<T>(string text, T form) where T : Form
{
TabPage lineTabPage = new TabPage(text);
Panel linePan = new Panel();
linePan.Dock = DockStyle.Fill;
linePan.AutoScroll = true;
form.FormBorderStyle = FormBorderStyle.None;
form.TopLevel = false;
lineTabPage.Controls.Add(form);
//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();
tabControl1.Controls.Add(lineTabPage);
}
private string WaitStart = ResourceCulture.GetString("等待启动");
private string dooropen = ResourceCulture.GetString("前门未关");
......@@ -299,10 +320,14 @@ namespace OnlineStore.ACSingleStore
{
lblWarnMsg.Text = store.WarnObj.WarnMsg;
}
else
else if (CurrLanguage.Equals(ResourceCulture.English))
{
lblWarnMsg.Text = store.WarnObj.WarnMsgEn;
}
else
{
lblWarnMsg.Text = store.WarnObj.WarnMsgJp;
}
if (store.Config.IsHasDoorLimit.Equals(1))
{
......@@ -531,7 +556,7 @@ namespace OnlineStore.ACSingleStore
private void AxisABSMove(ConfigMoveAxis moveAxis, int targetPosition, int targetSpeed)
{
moveAxis.TargetPosition = targetPosition;
ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed);
ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed, targetSpeed*4, targetSpeed*4);
}
private void btnUpDownP1_Click(object sender, EventArgs e)
{
......@@ -805,14 +830,22 @@ namespace OnlineStore.ACSingleStore
private void 扫码测试ToolStripMenuItem_Click(object sender, EventArgs e)
{
store.dlScanSocket.StartConnect();
store.GetCameraCode();
//store.dlScanSocket.StartConnect();
//store.GetCameraCode();
IOManager.IOMove(IO_Type.Camera_Led, IO_VALUE.HIGH);
if (Camera._cam != null)
{
Camera._cam.CloseAll();
}
CodeLibrary.FrmCodeDecode frm = new CodeLibrary.FrmCodeDecode();
frm.ShowDialog();
frm.Dispose();
IOManager.IOMove(IO_Type.Camera_Led, IO_VALUE.LOW);
}
private void 打开舱门ToolStripMenuItem_Click(object sender, EventArgs e)
{
IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.HIGH);
IOManager.IOMove(IO_Type.Door_Down, IO_VALUE.LOW);
store.OpenDoor(false);
}
private void 料仓运转OFFToolStripMenuItem_Click(object sender, EventArgs e)
......@@ -823,8 +856,7 @@ namespace OnlineStore.ACSingleStore
private void 关闭仓门ToolStripMenuItem_Click(object sender, EventArgs e)
{
IOManager.IOMove(IO_Type.Door_Down, IO_VALUE.HIGH);
IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.LOW);
store.CloseDoor(false);
}
private void 回待机点ToolStripMenuItem_Click(object sender, EventArgs e)
......@@ -968,10 +1000,7 @@ namespace OnlineStore.ACSingleStore
IOManager.instance.CloseAllDO();
StoreOpenStatus(false);
IOManager.instance.CloseAllConnection();
AIManager.Instance.CloseConnect();
ACServerManager.CloseAllPort();
//WCFControl.CloseWCF();
System.Environment.Exit(System.Environment.ExitCode);
}
catch (Exception ex)
......@@ -1049,8 +1078,7 @@ namespace OnlineStore.ACSingleStore
private void btnOpenDoor_Click(object sender, EventArgs e)
{
IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.HIGH);
IOManager.IOMove(IO_Type.Door_Down, IO_VALUE.LOW);
store.OpenDoor(false);
}
private void btnOpenLed_Click(object sender, EventArgs e)
......@@ -1118,8 +1146,7 @@ namespace OnlineStore.ACSingleStore
private void btnCloseDoor_Click(object sender, EventArgs e)
{
IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Door_Down, IO_VALUE.HIGH);
store.CloseDoor(false);
}
private void chbBuzzer_CheckedChanged(object sender, EventArgs e)
......@@ -1146,16 +1173,14 @@ namespace OnlineStore.ACSingleStore
private void btnUpdown_Click(object sender, EventArgs e)
{
string PortName = store.Config.UpDown_Axis.DeviceName;
int slvAddr = store.Config.UpDown_Axis.GetAxisValue();
string ioIP = "192.168.200.13";
short slvAddr = store.Config.UpDown_Axis.GetAxisValue();
int ioIndex = 0;
// if (store.Config.StoreDIList.ContainsKey(IO_Type.UpdownPositionSingal))
if (store.Config.StoreDIList.ContainsKey(IO_Type.TrayCheck_Fixture))
{
ioIP = store.Config.StoreDIList[IO_Type.TrayCheck_Fixture].IO_IP;
ioIndex = store.Config.StoreDIList[IO_Type.TrayCheck_Fixture].GetIOAddr();
}
FrmPositionTool frm = new FrmPositionTool(PortName, slvAddr, ioIP, ioIndex);
FrmPositionTool frm = new FrmPositionTool(PortName, slvAddr, ioIndex, store.Config.UpDown_Axis.HomeHighSpeed, store.Config.UpDown_Axis.HomeLowSpeed, store.Config.UpDown_Axis.HomeAddSpeed);
frm.ShowDialog();
LogUtil.logBox = this.richTextBox1;
......@@ -1175,7 +1200,7 @@ namespace OnlineStore.ACSingleStore
{
if (store != null)
{
axisMoveControl1.LoadData(store, store.moveAxisList.ToArray());
axisMoveControl1.LoadData(store);
}
string className = this.ClassName;
CurrLanguage = ResourceCulture.CurrLanguage;
......
......@@ -20,6 +20,7 @@ namespace OnlineStore
public static bool ShowMsg = ConfigAppSettings.GetIntValue(Setting_Init.ShowLanguageMsg).Equals(1);
public static string China = "zh-CN";
public static string English = "en-US";
public static string Japanese = "ja-JP";
public static string CurrLanguage = "zh-CN";
public static Dictionary<string, string> defaultMap = new Dictionary<string, string>();
......@@ -47,6 +48,7 @@ namespace OnlineStore
{
ResourceControl.GetChinaStringEvent += GetChinaString;
ResourceControl.GetEnglishStringEvent += GetEnglishString;
ResourceControl.GetJapaneseStringEvent += GetJapaneseString;
ResourceControl.GetStrEvent += GetString;
ResourceControl.GetStringEvent += GetString;
CSVResourceControl.GetStrEvent += GetString;
......@@ -60,6 +62,7 @@ namespace OnlineStore
ResourceMap = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> ChinaMap = new Dictionary<string, string>();
Dictionary<string, string> EnglishMap = new Dictionary<string, string>();
Dictionary<string, string> JapaneseMap = new Dictionary<string, string>();
if (File.Exists(rPath))
{
string[] lines = File.ReadAllLines(rPath);
......@@ -82,6 +85,11 @@ namespace OnlineStore
{
eng = array[2].Replace('&', ',').Trim();
}
string jp = "";
if (array.Length >= 4)
{
jp = array[3].Replace('&', ',').Trim();
}
if (ChinaMap.ContainsKey(key))
{
ChinaMap[key] = china;
......@@ -100,7 +108,18 @@ namespace OnlineStore
{
EnglishMap.Add(key, eng);
}
// EnglishMap.Add(key, eng);
}
if (String.IsNullOrEmpty(jp).Equals(false))
{
if (JapaneseMap.ContainsKey(key))
{
JapaneseMap[key] = jp;
}
else
{
JapaneseMap.Add(key, jp);
}
}
}
}catch(Exception ex)
......@@ -111,8 +130,9 @@ namespace OnlineStore
}
ResourceMap.Add(China, ChinaMap);
ResourceMap.Add(English, EnglishMap);
ResourceMap.Add(Japanese, JapaneseMap);
/*
Dictionary<string, string> rMap = LoadRMap();
bool isNeedUpE = false;
......@@ -161,6 +181,7 @@ namespace OnlineStore
// }
//}
//FileUtil.SaveListToFile(allList.ToArray(), Application.StartupPath + "\\a.txt");
*/
}
private static Dictionary<string,string> LoadRMap()
......@@ -272,6 +293,11 @@ namespace OnlineStore
string strCurLanguage = gets(English, id);
return String.Format(strCurLanguage, param);
}
public static string GetJapaneseString(string id, params object[] param)
{
string strCurLanguage = gets(Japanese, id);
return String.Format(strCurLanguage, param);
}
private static string gets(string language,string id,string defaultStr="")
{
if (String.IsNullOrEmpty(defaultStr))
......
......@@ -44,6 +44,7 @@
this.txtSpeed = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.txtFileName = new System.Windows.Forms.TextBox();
this.ioStatusControl1 = new UserFromControl.IOStatusControl();
this.btnAbsMove = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
......@@ -62,14 +63,11 @@
this.txtPortName = new System.Windows.Forms.TextBox();
this.btnServoOff = new System.Windows.Forms.Button();
this.txtIOIndex = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.txtIoIp = new System.Windows.Forms.TextBox();
this.btnExit = new System.Windows.Forms.Button();
this.btnClear = new System.Windows.Forms.Button();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.ioStatusControl1 = new UserFromControl.IOStatusControl();
this.groupBox6.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
......@@ -258,6 +256,16 @@
this.txtFileName.TabIndex = 278;
this.txtFileName.Text = "position.csv";
//
// ioStatusControl1
//
this.ioStatusControl1.IOName = "检测信号";
this.ioStatusControl1.IOValue = 0;
this.ioStatusControl1.isCanClick = false;
this.ioStatusControl1.Location = new System.Drawing.Point(38, 401);
this.ioStatusControl1.Name = "ioStatusControl1";
this.ioStatusControl1.Size = new System.Drawing.Size(267, 69);
this.ioStatusControl1.TabIndex = 279;
//
// btnAbsMove
//
this.btnAbsMove.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
......@@ -360,9 +368,7 @@
this.groupBox1.Controls.Add(this.txtPortName);
this.groupBox1.Controls.Add(this.btnServoOff);
this.groupBox1.Controls.Add(this.txtIOIndex);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.txtIoIp);
this.groupBox1.Location = new System.Drawing.Point(9, 13);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(458, 173);
......@@ -449,43 +455,23 @@
//
this.txtIOIndex.Enabled = false;
this.txtIOIndex.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtIOIndex.Location = new System.Drawing.Point(136, 133);
this.txtIOIndex.Location = new System.Drawing.Point(136, 93);
this.txtIOIndex.MaxLength = 30;
this.txtIOIndex.Name = "txtIOIndex";
this.txtIOIndex.Size = new System.Drawing.Size(164, 26);
this.txtIOIndex.TabIndex = 275;
this.txtIOIndex.Text = "1";
//
// label1
//
this.label1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(8, 100);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(122, 20);
this.label1.TabIndex = 272;
this.label1.Text = "IO模块IP:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label2
//
this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(8, 136);
this.label2.Location = new System.Drawing.Point(8, 96);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(122, 20);
this.label2.TabIndex = 274;
this.label2.Text = "检测信号地址:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtIoIp
//
this.txtIoIp.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtIoIp.Location = new System.Drawing.Point(136, 97);
this.txtIoIp.MaxLength = 30;
this.txtIoIp.Name = "txtIoIp";
this.txtIoIp.Size = new System.Drawing.Size(164, 26);
this.txtIoIp.TabIndex = 273;
this.txtIoIp.Text = "192.168.201.11";
//
// btnExit
//
this.btnExit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
......@@ -525,16 +511,6 @@
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// ioStatusControl1
//
this.ioStatusControl1.IOName = "检测信号";
this.ioStatusControl1.IOValue = 0;
this.ioStatusControl1.isCanClick = false;
this.ioStatusControl1.Location = new System.Drawing.Point(38, 401);
this.ioStatusControl1.Name = "ioStatusControl1";
this.ioStatusControl1.Size = new System.Drawing.Size(267, 69);
this.ioStatusControl1.TabIndex = 279;
//
// FrmPositionTool
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
......@@ -581,8 +557,6 @@
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.TextBox txtIOIndex;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtIoIp;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtPortName;
private System.Windows.Forms.TextBox txtFileName;
private System.Windows.Forms.Label label3;
......
......@@ -21,18 +21,23 @@ namespace OnlineStore.ACSingleStore
{
private string LogName = ResourceCulture.GetString("升降轴位置调试:");
private string PortName = "";
private int SlvAddr = 0;
private string IoIp = "";
private short SlvAddr = 0;
private int IoIndex = 0;
public string Axis_Brake = IO_Type.Axis_Brake;
private int ptpAcc = 0;
private int ptpDec = 0;
private int homespeed = 0;
//public string Axis_Brake = IO_Type.Axis_Brake;
private System.Timers.Timer toolTimer = new System.Timers.Timer();
public FrmPositionTool(string protName, int slvAddr,string ioIp, int ioIndex)
public FrmPositionTool(string protName, short slvAddr, int ioIndex, int ptpAcc, int ptpDec,int homespeed)
{
InitializeComponent();
this.PortName = protName;
this.SlvAddr = slvAddr;
this.IoIp = ioIp;
this.IoIndex = ioIndex;
this.ptpAcc = ptpAcc;
this.ptpDec = ptpDec;
this.homespeed = homespeed;
toolTimer.Enabled = false;
toolTimer.Interval = 50;
......@@ -45,8 +50,8 @@ namespace OnlineStore.ACSingleStore
private void Form1_Load(object sender, EventArgs e)
{
ACServerManager.IsShowMsg = false;
//LogUtil.logBox = this.richTextBox1;
//LogUtil.logBox = null;
LogUtil.logBox = this.richTextBox1;
//ACServerManager.richeBox = this.richTextBox1;
......@@ -54,7 +59,7 @@ namespace OnlineStore.ACSingleStore
txtPortName.Text = PortName;
txtAddr.Text = SlvAddr.ToString();
txtIOIndex.Text = IoIndex.ToString();
txtIoIp.Text = IoIp.ToString();
//txtIoIp.Text = IoIp.ToString();
if (IOManager.instance == null)
{
......@@ -94,7 +99,7 @@ namespace OnlineStore.ACSingleStore
private void btnServoOn_Click(object sender, EventArgs e)
{
this.PortName = txtPortName.Text;
this.SlvAddr = FormUtil.GetIntValue(txtAddr);
this.SlvAddr = FormUtil.GetShortValue(txtAddr);
bool result = ACServerManager.OpenPort(PortName);
if (!result)
{
......@@ -108,14 +113,6 @@ namespace OnlineStore.ACSingleStore
ACServerManager.AlarmClear(PortName, SlvAddr);
ACServerManager.ServoOn(PortName, SlvAddr);
try
{
IOManager.IOMove(Axis_Brake, IO_VALUE.HIGH);
}catch(Exception ex)
{
}
}
private void btnServoOff_Click(object sender, EventArgs e)
......@@ -124,14 +121,6 @@ namespace OnlineStore.ACSingleStore
// toolTimer.Stop();
ACServerManager.SuddenStop(PortName, SlvAddr);
Thread.Sleep(100);
try
{
IOManager.IOMove(Axis_Brake, IO_VALUE.LOW);
}
catch (Exception ex)
{
}
ACServerManager.ServoOff(PortName, SlvAddr);
formStatus(false);
}
......@@ -160,12 +149,13 @@ namespace OnlineStore.ACSingleStore
private void btnRelMove_Click(object sender, EventArgs e)
{
int position = Convert.ToInt32(txtPosition.Text);
ACServerManager.RelMove(PortName, SlvAddr, position);
int speed = Convert.ToInt32(txtSpeed.Text);
ACServerManager.RelMove(PortName, SlvAddr, position, speed, speed*4, speed * 4);
}
private void btnHomeMove_Click(object sender, EventArgs e)
{
int speed = Convert.ToInt32(txtSpeed.Text);
ACServerManager.HomeMove(PortName, SlvAddr, speed);
ACServerManager.HomeMove(PortName, SlvAddr, ptpAcc, ptpDec,homespeed);
}
private void btnSpeedMove_Click(object sender, EventArgs e)
{
......@@ -223,7 +213,7 @@ namespace OnlineStore.ACSingleStore
PositionList = new List<int>();
LogUtil.info(LogName + "伺服开始运动,速度【" + speed + "】位置【" + position + "】启动定时器 ");
formMoveStatus(false);
ACServerManager.AbsMove(PortName, SlvAddr, position, speed);
ACServerManager.AbsMove(PortName, SlvAddr, position, speed, speed * 4, speed * 4);
toolTimer.Start();
}
private int P3Offset = 0;
......@@ -249,7 +239,7 @@ namespace OnlineStore.ACSingleStore
private IO_VALUE GetSingleValue()
{
return IOManager.instance.GetDIValue(IoIp, 0, (ushort)IoIndex);
return IOManager.instance.GetDIValue(PortName, 0, (ushort)IoIndex);
}
private int TargetPostion = 0;
private bool isInProcesss = false;
......
FrmStoreBox_Text,AC_SA_料仓,AC_SA_SMD BOX
FrmStoreBox_tabControl2_Text,FrmStoreBox_tabControl2_Text,FrmStoreBox_tabControl2_Text
FrmStoreBox_tabPage4_Text,料仓操作,Operation
FrmStoreBox_chbBuzzer_Text,启用蜂鸣器,Enable the buzzer
FrmStoreBox_btnStoreExit_Text,退出系统,Exit
FrmStoreBox_btnStoreHome_Text,回待机位,Back to standby
FrmStoreBox_chbAuto_Text,开机自动启动,Auto start
FrmStoreBox_btnSotreReset_Text,复位,Reset
FrmStoreBox_btnStoreStop_Text,停止,Stop
FrmStoreBox_btnStoreStart_Text,启动,Start
FrmStoreBox_tabPage5_Text,设备调试,Device Debugging
FrmStoreBox_btnUpdown_Text,升降轴位置调试,Updown-Axis Debug Location
FrmStoreBox_btnDebug_Text,启用调试,Enable debugging
FrmStoreBox_btnAxisOff_Text,料仓运转OFF,SMD BOX operating OFF
FrmStoreBox_btnAxisOn_Text,料仓运转ON,SMD BOX operating ON
FrmStoreBox_btnScanCode_Text,扫码测试,scanning test
FrmStoreBox_btnAxisP_Text,轴卡点动,axis inching adjusting
FrmStoreBox_btnIO_Text,查看IO,IO check
FrmStoreBox_tabPage6_Text,其他,Other
FrmStoreBox_btnLan_Text,语言,Language
FrmStoreBox_button4_Text,关于软件,About
FrmStoreBox_btnClearL_Text,清理日志,Clean log
FrmStoreBox_btnLogDebug_Text,开启DEBUG,Open Debug
FrmStoreBox_tabControl1_Text,FrmStoreBox_tabControl1_Text,FrmStoreBox_tabControl1_Text
FrmStoreBox_tabPage3_Text,操作日志,Operation Log
FrmStoreBox_btnCloseLed_Text,关闭相机照明,Close Camera light
FrmStoreBox_btnClearLog_Text,清理日志,Clean log
FrmStoreBox_btnOpenLed_Text,打开相机照明,Open Camera light
FrmStoreBox_btnCloseDoor_Text,关闭仓门,Close door
FrmStoreBox_btnOpenDoor_Text,打开仓门,Open door
FrmStoreBox_tabPage1_Text,伺服调试,Servo debug
FrmStoreBox_axisMoveControl1_Text,FrmStoreBox_axisMoveControl1_Text,FrmStoreBox_axisMoveControl1_Text
FrmStoreBox_groupBox1_Text,伺服状态,Servo state
FrmStoreBox_axis_4_Alarm_Text,,
FrmStoreBox_label1_Text,轴四:压紧轴,Axis 4 pressure axis
FrmStoreBox_axis_1_Alarm_Text,,
FrmStoreBox_axis_3_Alarm_Text,,
FrmStoreBox_axis_2_Alarm_Text,,
FrmStoreBox_label38_Text,ALM:,ALM:
FrmStoreBox_label12_Text,出入库目标值:,Providing target value:
FrmStoreBox_label4_Text,轴三:进出轴,Axis 3 in-out axis
FrmStoreBox_label3_Text,轴二:上下轴,Axis 2 lifting axis
FrmStoreBox_label5_Text,轴一:旋转轴,Axis 1 rotation axis
FrmStoreBox_label43_Text,输出脉冲值:,Output impulse valve:
FrmStoreBox_label42_Text,编码器计数:,Encoder count:
FrmStoreBox_groupAxis_Text,伺服运动,Servo motor
FrmStoreBox_label7_Text,伺服状态:,Servo Info
FrmStoreBox_label17_Text,负极限信号:,Negative limit signal:
FrmStoreBox_label19_Text,正极限信号:,Positive limit signal:
FrmStoreBox_label6_Text,原点信号:,Home signal:
FrmStoreBox_label11_Text,HOME-CMP状态:,HOME-CMP state:
FrmStoreBox_label10_Text,BUSY状态:,BUSY state:
FrmStoreBox_label2_Text,报警状态:,Alarm state:
FrmStoreBox_btnGetAlarm_Text,读取状态,Read state
FrmStoreBox_btnReadPosition_Text,读取位置,Update location
FrmStoreBox_label8_Text,实时位置:,Actual position:
FrmStoreBox_btnOpenAxis_Text,打开伺服,Open servo
FrmStoreBox_btnCloseAxis_Text,关闭伺服,Close servo
FrmStoreBox_label47_Text,速度:,Speed:
FrmStoreBox_btnAxisVMove_Text,匀速运动,uniform move
FrmStoreBox_btnAxisRMove_Text,相对运动,Relative move
FrmStoreBox_btnAxisReturnHome_Text,原点返回,Back to home
FrmStoreBox_btnAxisAMove_Text,绝对运动,Abosolute move
FrmStoreBox_btnComAlarmClear_Text,清除报警,Clear alarm
FrmStoreBox_label48_Text,位置:,Position:
FrmStoreBox_btnAxisStop_Text,停止运动,Stop move
FrmStoreBox_label45_Text,端口号:,Port number:
FrmStoreBox_label46_Text,地址:,Address:
FrmStoreBox_label49_Text,AC伺服:,AC server:
FrmStoreBox_tabPage2_Text,温湿度,Temp controller
FrmStoreBox_groupCode_Text,扫码测试,scanning test
FrmStoreBox_label32_Text,二维码内容:,Code info:
FrmStoreBox_label31_Text,图片:,Image:
FrmStoreBox_btnCodeTest_Text,扫码测试,scanning test
FrmStoreBox_btnOpenFile_Text,打开本地图片,Open Local Image
FrmStoreBox_groupBox7_Text,温控器调试,Temp controller debug
FrmStoreBox_groupHistory_Text,历史记录,History:
FrmStoreBox_btnSelHistory_Text,查询记录信息,Query record information
FrmStoreBox_label24_Text,记录总条数:,Total number:
FrmStoreBox_label30_Text,记录时间:,Time:
FrmStoreBox_label23_Text,当前指针位置:,pointer position:
FrmStoreBox_label26_Text,记录湿度值:,humidity value:
FrmStoreBox_label22_Text,记录温度值:,temperature value:
FrmStoreBox_btnSelTemp_Text,查询实时数据,Query real-time data
FrmStoreBox_label29_Text,湿度:,Humidity:
FrmStoreBox_label28_Text,温度:,Temperature:
FrmStoreBox_label27_Text,端口号:,Port number:
FrmStoreBox_btnTempClose_Text,断开,Disconnect
FrmStoreBox_btnTempInit_Text,初始化,Initialize
FrmStoreBox_groupBox3_Text,设备状态,Machine state
FrmStoreBox_lblWarnMsg_Text,FrmStoreBox_lblWarnMsg_Text,FrmStoreBox_lblWarnMsg_Text
FrmStoreBox_lblThisSta_Text,等待启动,Wait to start
FrmStoreBox_groupInout_Text,料仓操作,Operation
FrmStoreBox_lblTemp_Text,当前温度--,当前湿度--,Current temperature--& current humidity--
FrmStoreBox_lblMsg_Text,没有开启自动出入库,Auto providing not start
FrmStoreBox_btnSavePosition_Text,保存位置,Save position
FrmStoreBox_btnStartAuTo_Text,启动自动模式,Start auto mode
FrmStoreBox_label9_Text,入库间隔仓位:,Storage space:
FrmStoreBox_label21_Text,选择仓位:,Seletct Position:
FrmStoreBox_btnInStore_Text,入库测试,Saving testing
FrmStoreBox_btnOutStore_Text,出库测试,Outbound test
FrmStoreBox_btnComP1_Text,压紧轴待机点P1:,p-axis stanby P1:
FrmStoreBox_btnInOutP2_Text,进出轴取料点P2:,In-out axis P2:
FrmStoreBox_btnInOutP1_Text,进出轴待机点P1:,In-out axis stanby P1:
FrmStoreBox_btnMiddleP1_Text,旋转轴待机点P1:,Rotation axis stanby P1:
FrmStoreBox_btnUpDownP7_Text,升降轴入料缓冲点P7:,l-axis storing buffer P7:
FrmStoreBox_btnUpDownP8_Text,升降轴出料缓冲点P8:,l-axis providing buffer P8:
FrmStoreBox_btnUpDownP1_Text,升降轴入料点P1:,l-axis storing P1:
FrmStoreBox_btnUpDownP2_Text,升降轴出料前点P2:,l-axis providing P2:
FrmStoreBox_btnComP3_Text,压紧轴压紧前点P3:,p-axis former pressing P3:
FrmStoreBox_btnComP2_Text,压紧轴压紧点P2:,p-axis pressing P2:
FrmStoreBox_btnInOutP3_Text,进出轴取料点P3:,In-out axis P3:
FrmStoreBox_btnMiddleP2_Text,旋转轴库位点P2:,Rotation axis storage P2:
FrmStoreBox_btnUpDownP5_Text,升降轴出料前点P5:,l-axis former providing P5:
FrmStoreBox_btnUpDownP6_Text,升降轴出料缓冲点P6:,l-axis providing buffer P6:
FrmStoreBox_btnUpDownP3_Text,升降轴入料前点P3:,l-axis former storing P3:
FrmStoreBox_btnUpDownP4_Text,升降轴入料缓冲点P4:,l-axis storing buffer P4:
FrmPwd_Text,请输入密码,Enter PSW:
FrmPwd_btnNext_Text,确定,Confirm
FrmPwd_btnBack_Text,返回,Back
FrmPwd_label1_Text,请输入密码:,Enter PSW:
FrmIOStatus_Text,IO查看,IO check
FrmIOStatus_button1_Text,关闭,Close
FrmIOStatus_groupBox2_Text,高度传感器,Height Single:
FrmIOStatus_label11_Text,4:,4:
FrmIOStatus_label10_Text,料盘尺寸:,Size:
FrmIOStatus_label9_Text,料盘高度:,Hieght:
FrmIOStatus_label8_Text,->,->
FrmIOStatus_label7_Text,3:,3:
FrmIOStatus_label4_Text,2:,2:
FrmIOStatus_label1_Text,1:,1:
FrmIOStatus_groupBox1_Text,DO写入,DO write
FrmIOStatus_btnCloseLed_Text,关闭相机照明,Close Camera light
FrmIOStatus_label3_Text,选择DO:,Select DO:
FrmIOStatus_btnOpenLed_Text,打开相机照明,Open Camera light
FrmIOStatus_label2_Text,SlaveId,SlaveId
FrmIOStatus_btnCloseAxisBreak_Text,关闭刹车,Close brake
FrmIOStatus_label17_Text,设备IP:,IP:
FrmIOStatus_btnReadIO_Text,读取IO状态,Read IO state
FrmIOStatus_btnOpenAxisBreak_Text,打开刹车,Open brake
FrmIOStatus_label14_Text,地址:,Servo address:
FrmIOStatus_btnWriteSingleDO_Text,写入DO,Write DO
FrmIOStatus_label5_Text,定时(ms):,Time(ms):
FrmIOStatus_btnReadAllDi_Text,读取所有DI,Read all DI
FrmIOStatus_label6_Text,写入值:,Write value:
FrmIOStatus_btnReadAllDo_Text,读取所有DO,Read all DO
FrmIOStatus_btnCloseDoor_Text,关闭仓门,Close door
FrmIOStatus_btnOpenDoor_Text,打开仓门,Open door
FrmIOStatus_groupBox4_Text,DO列表,DO list
FrmIOStatus_groupBox3_Text,DI列表,DI list
FrmIOStatus_chbAutoRead_Text,自动读取,Auto read
FrmAxisDebug_Text,料仓BOX_1 _轴点动调试,SMD BOX_1 _axis inching adjusting
FrmAxisDebug_btnCCopy_Text,复制,Copy
FrmAxisDebug_btnICopy_Text,复制,Copy
FrmAxisDebug_btnUCopy_Text,复制,Copy
FrmAxisDebug_btnMCopy_Text,复制,Copy
FrmAxisDebug_lblSpeed_Text,点动速度=0.2倍目标速度,Speed=0.2xTarget Speed
FrmAxisDebug_btnComMovej_Text,压紧轴-(向上),Pressure axis-(up)
FrmAxisDebug_btnComMove_Text,压紧轴+(向下),Pressure axis+(down)
FrmAxisDebug_label4_Text,(轴四)压紧轴,(Axis 4)pressure axis
FrmAxisDebug_label6_Text,实时坐标,Real time coordinate
FrmAxisDebug_label5_Text,点动速度,Inching speed
FrmAxisDebug_button1_Text,关闭,Close
FrmAxisDebug_btnInOutMovej_Text,进出轴-(后退),In-out axis-backward
FrmAxisDebug_btnUpDownMovej_Text,升降轴-(下降),l-axis-descent
FrmAxisDebug_btnMiddleMovej_Text,旋转轴-(逆时针),Rotation axis- anti-clockwise
FrmAxisDebug_btnInOutMove_Text,进出轴+(前进),In-out axis+forward
FrmAxisDebug_btnUpDownMove_Text,升降轴+(上升),l-axis+ascent
FrmAxisDebug_btnMiddleMove_Text,旋转轴+(顺时针),Rotation axis+clockwise
FrmAxisDebug_label3_Text,(轴三)进出轴,(Axis 3) in-out axis
FrmAxisDebug_label2_Text,(轴二)升降轴,(Axis 2) lifting axis
FrmAxisDebug_label1_Text,(轴一)旋转轴,(Axis 1) rotation axis
升降轴位置调试:,升降轴位置调试:,Updown-Axis Debug Location:
FrmPositionTool_Text,升降轴位置测试,Updown-Axis Debug Location
FrmPositionTool_groupBox6_Text,,
FrmPositionTool_groupBox2_Text,位置信息,location information
FrmPositionTool_label10_Text,入料缓冲点P4偏移量:,Point P4 offset:
FrmPositionTool_label9_Text,入料前点P3偏移量:,Point P3 offset:
FrmPositionTool_label5_Text,出料缓冲点P6偏移量:,Point P6 offset:
FrmPositionTool_label4_Text,出料前点P5偏移值:,Point P5 offset:
FrmPositionTool_btnOpenFolder_Text,打开文件夹,Open the folder
FrmPositionTool_btnGetActualPosition_Text,读取位置,Update location
FrmPositionTool_label8_Text,移动速度:,Move speed:
FrmPositionTool_ioStatusControl1_Text,FrmPositionTool_ioStatusControl1_Text,FrmPositionTool_ioStatusControl1_Text
FrmPositionTool_label1_Text,label1,label1
FrmPositionTool_btnAbsMove_Text,开始运动,Start
FrmPositionTool_label3_Text,保存文件名称:,file name:
FrmPositionTool_label7_Text,实际位置:,actual position:
FrmPositionTool_label13_Text,目标位置:,target location:
FrmPositionTool_btnSdStop_Text,停止,Stop
FrmPositionTool_label6_Text,目标位置:,target location:
FrmPositionTool_groupBox1_Text,设备信息,equipment information
FrmPositionTool_label12_Text,端口号:,Port number:
FrmPositionTool_label18_Text,地址:,Servo address:
FrmPositionTool_btnHomeMove_Text,原点返回,Back to home
FrmPositionTool_btnServoOn_Text,打开伺服,Open servo
FrmPositionTool_btnServoOff_Text,关闭伺服,Close servo
FrmPositionTool_label2_Text,检测信号地址:,signal address:
FrmPositionTool_btnExit_Text,退出,Exit
FrmPositionTool_btnClear_Text,清理,Clear
检测信号,检测信号,detection signal
FrmLanguare_Text,语言设置,Language
FrmLanguare_btnCancel_Text,取消,Cancel
FrmLanguare_btnOk_Text,确定,Confirm
FrmLanguare_rbtnEnglish_Text,英文,English
FrmLanguare_rbtnChina_Text,中文,Chinese
FrmAbout_Text,软件信息,Software Info
FrmAbout_btnCopy_Text,复制编号,Copy
FrmAbout_lblCodeName_Text,软件编号:52 43 2D 44 4C 2D 41 43 53 69 6E 67 6C 65 53 74 6F 72 65,Software Number:52 43 2D 44 4C 2D 41 43 53 69 6E 67 6C 65 53 74 6F 72 65
FrmAbout_lblTime_Text,更新时间:2020-02-07 21:16,UpdateTime:2020-02-07 21:16
FrmAbout_lblVersion_Text,版本号:1.0.7342.38298,Version:1.0.7342.38298
FrmAbout_btnNext_Text,确定,Confirm
Middle_Axis,(轴一)旋转轴,(Axis 1) rotation axis
UpDown_Axis,(轴二)升降轴轴,(Axis 2) lifting axis
InOut_Axis,(轴三)进出轴,(Axis 3) in-out axis
Comp_Axis,(轴四)压紧轴,(Axis 4)pressure axis
启用调试,启用调试,Enable debugging
等待启动,等待启动,Wait to start
前门未关,前门未关,Front door open
叉子料盘检测有料,请检查,叉子料盘检测有料,请检查,Fork tray full& please check
开始自动出入库,开始自动出入库,Start auto storing
停止自动出入库,停止自动出入库,Stop auto storing
自动出库:,自动出库:,Auto outbound:
自动入库:,自动入库:,Auto warehousing:
定位气缸不在下降端,不能移动进出轴,定位气缸不在下降端,不能移动进出轴,The position cylinder is not at the descent position& not move the in-out axis
警告,警告,Warning
开始循环出库,开始循环出库,Start looping out
停止循环出库,停止循环出库,Stop the loop
FrmStoreBox_显示ToolStripMenuItem_Text,显示,Show
FrmStoreBox_toolStripMenuItem1_Text,退出,Exit
X01,急停,Emergency stop
X02,复位,Reset
X03,自动,Auto
X04,气压检测,Pressure detection
X05,料盘检测1(进料口),Tray check 1
X06,料盘检测2(料叉),Tray check 2
X07,进料口门上升端,Portal ascent position
X08,进料口门下降端,Portal descent position
X09,安全光栅,Security grating
X10,前门限位,front door limit
X11,左侧门限位,Left side threshold
X12,右侧门限位,Right hand threshold
Y01,自动指示灯,Auto indicator light
Y02,故障指示灯,Error indicator light
Y03,待机指示灯,indicator light
Y04,故障蜂鸣器,Fault buzzer
Y05,吹气SOL ON,Blowing SOL ON
Y06,料仓运转ON,SMD BOX operating ON
Y07,轴2刹车电源ON,Brake power of axis2 ON
Y08,进料口门上升SOL,Portal ascent SOL
Y09,进料口门下降SOL,Portal descent SOL
Y10,相机照明开,Camera light ON
是否确定退出?,是否确定退出?,Are you sure you want to quit?
提示,提示,Remind
点动速度,点动速度,Inching speed
倍目标速度,倍目标速度,Double target speed
禁用调试,禁用调试,Disable debugging
无报警,无出入库或者重置操作时,才可以回待机点!,无报警,无出入库或者重置操作时,才可以回待机点!,"No alarm
inSuddenStop,收到急停信号,报警急停,Emergency stop signal received,alarm emergency stop
InoutAlarm,进出轴报警!复位失败,请检查,in-out axis alarm! Reset failed& please check
OpenAxisFail,打开轴{0}失败,Failed to open axis {0}
NoAIr,未检测到气压信号,Pressure signal undetected
AutoReset,收到复位信号,自动复位,Receive reset signal& automatical reset
AxisAlarm,运动轴{0}报警,Motion axis {0} alarm
startFail,启动失败:急停未开,Startup failure: emergency stop not opened
WaitSingleTimeOut,等待信号{0}={1}超时,Wait signal {0}={1} timeout
startFailAir,启动失败:没有气压信号,Startup failure: no air pressure signal
AxisHomeMoveAlarm,运动{0}轴{1}收到原点完成信号,当前位置[{2}],误差过大,需要报警,The movement {0} axis {1} receives the origin completion signal& the current position [{2}]& the error is too large& it needs to alarm
AxisMoveAlarm,运动{0}轴{1}目标位置[{2}]当前位置{3}误差过大,需要报警,Movement {0} axis {1} target position [{2}] current position {3} error is too large& need to alarm
MoveTimeOut,{0}]超时{1}[{2}],{0}]Time out {1}[{2}]
WaitInstoreTimeOut,[{0}]超时[等待可以入库][{1}秒],[{0}] timeout [wait to store][{1} seconds]
HasWare,叉子料盘检测有料,请检查,Fork tray full& please check
NoCodeMsg,未扫到二维码,请重新放入料盘,If the qr code is not scanned& please put it back into the material tray
InStoreNoCode,未扫到二维码,需要将料盘送出,The qr code is not scanned& the material plate needs to be sent out
InStoreError,入库库位格式错误:条码[{0}]库位号[{1}],Incorrect format of the library entry: barcode [{0}] library entry number [{1}]
InStoreNoPosition,入库未找到库位:条码[{0}]库位号[{1}],Storage location not found: barcode [{0}] storage location [{1}]
OutStoreError,出库格式错误{0},Providing format error{0}
OutStoreNoPosition,出库未找库位:{0},Storage location not found :{0}
HomeMove,原点返回,Back to home
AbsMove,绝对运动,Abosolute move
WaitIo,IO信号等待,IO wait
WaitTime,时间等待:,Time to wait:
TargetPosition,电钢目标位置:,Target position of electric steel:
trayHeight,料盘高度,Reel height
请先启动料仓!,请先启动料仓!,Please start the system!
保存位置失败!,保存位置失败!,Save position Fail!
警告(叉子在待机位时,才能移动升降轴和旋转轴),警告(叉子在待机位时,才能移动升降轴和旋转轴),Warn(move the lifting and rotating axis only when the gripper is stanby)
叉子不在待机位,请先将叉子退回待机位,叉子不在待机位,请先将叉子退回待机位,Gripper not stanby& return the gripper to standby
确定开始自动出入库?,确定开始自动出入库?,Make sure to start automatic storage ?
请输入正确的密码,请输入正确的密码,Enter the right PSW
打开串口失败,打开串口失败,Failed to open serial port
请输入正确的速度,请输入正确的速度,Please enter the correct speed
自动出库:,自动出库:,Auto outbound:
自动入库:,自动入库:,Auto warehousing:
升降轴位置调试:,升降轴位置调试:,Updown-Axis Debug Location
关闭DEBUG,关闭DEBUG,Close DEBUG
开启DEBUG,开启DEBUG,Open DEBUG
出库{0}叉子从库位退出后,未检测到料盘有料,出库{0}叉子从库位退出后,未检测到料盘有料,Outgoing {0} after the fork exits from the storage,no material on the tray is detected
左侧门未关,左侧门未关,Left door open
右侧门未关,右侧门未关,Right door open
FrmStoreBox_chbIsDebug_Text,调试状态,debug mode
光栅被遮挡,光栅被遮挡,Grating blocked
InTrouble,故障中,In trouble
OutStoreBoxEnd,料盘出仓位完成,Providing executed
OutStoreExecute,出库执行中,Providing Executing
StoreOnline,设备联机,System online
SuddenStop,急停中,Emerengy stop
OutMoveExecute,出库完成,Providing Executed
InStoreFailed,入库失败,Saving failed
OutStoreFailed,出库失败,Providing failed
WaitSingle,等待信号,Wait signal
TimeOut,超时,Time out
Run,运行中,Runing
Runing,运行中,Runing
OutStorEnd,出库完成,OutStorEnd
FrmStoreBox_btnCloseDLed_Text,关闭设备照明,Turn off lighting
FrmStoreBox_btnOpenDLed_Text,打开设备照明,Turn on lighting
FrmStoreBox_btnOpenAutoInOut_Text,开启自动出入库, start auto storage and retrieval
FrmStoreBox_btnHul_Text,忽略夹爪检测信号,Ignore the gripper detection signal
FrmStoreBox_lblTempStr_Text,FrmStoreBox_lblTempStr_Text,FrmStoreBox_lblTempStr_Text
Y11,设备照明开,Equipment lighting on
FrmIOStatus_btnCDLed_Text,关闭设备照明,Turn off equipment lighting
FrmIOStatus_btnDevideLed_Text,打开设备照明,Turn on equipment lighting
FrmStoreBox_chbOpenLog_Text,显示日志,Open Log
FrmStoreBox_tabPage7_Text, 设备状态 , Machine state
\ No newline at end of file
FrmStoreBox_Text,AC_SA_料仓,AC_SA_SMD BOX,AC_SA_box
FrmStoreBox_tabControl2_Text,FrmStoreBox_tabControl2_Text,FrmStoreBox_tabControl2_Text,FrmStoreBox_tabControl2_Text
FrmStoreBox_tabPage4_Text,料仓操作,Operation,boxの操作
FrmStoreBox_chbBuzzer_Text,启用蜂鸣器,Enable the buzzer,ブザーを鳴らす
FrmStoreBox_btnStoreExit_Text,退出系统,Exit,システムを退出する
FrmStoreBox_btnStoreHome_Text,回待机位,Back to standby,待機状態に戻る
FrmStoreBox_chbAuto_Text,开机自动启动,Auto start,電源を入れると自動スタート
FrmStoreBox_btnSotreReset_Text,复位,Reset,リセット
FrmStoreBox_btnStoreStop_Text,停止,Stop,ストップ
FrmStoreBox_btnStoreStart_Text,启动,Start,スタート
FrmStoreBox_tabPage5_Text,设备调试,Device Debugging,設備のデバック
FrmStoreBox_btnUpdown_Text,升降轴位置调试,Updown-Axis Debug Location,リフト軸位置のデバック
FrmStoreBox_btnDebug_Text,启用调试,Enable debugging,デバックの実行
FrmStoreBox_btnAxisOff_Text,料仓运转OFF,SMD BOX operating OFF,box動作off
FrmStoreBox_btnAxisOn_Text,料仓运转ON,SMD BOX operating ON,box動作ON
FrmStoreBox_btnScanCode_Text,扫码测试,scanning test,スキャンテスト
FrmStoreBox_btnAxisP_Text,轴卡点动,axis inching adjusting,アクシスカードのポインティング
FrmStoreBox_btnIO_Text,查看IO,IO check,チェックIO
FrmStoreBox_tabPage6_Text,其他,Other,その他
FrmStoreBox_btnLan_Text,语言,Language,言語
FrmStoreBox_button4_Text,关于软件,About,ソフトウェアについて
FrmStoreBox_btnClearL_Text,清理日志,Clean log,ブログの消去
FrmStoreBox_btnLogDebug_Text,开启DEBUG,Open Debug,DEBUGをオンにする
FrmStoreBox_tabControl1_Text,FrmStoreBox_tabControl1_Text,FrmStoreBox_tabControl1_Text,FrmStoreBox_tabControl1_Text
FrmStoreBox_tabPage3_Text,操作日志,Operation Log,操作ブログ
FrmStoreBox_btnCloseLed_Text,关闭相机照明,Close Camera light,カメラの照明をオフにする
FrmStoreBox_btnClearLog_Text,清理日志,Clean log,ブログの消去
FrmStoreBox_btnOpenLed_Text,打开相机照明,Open Camera light,カメラの照明をオンにする
FrmStoreBox_btnCloseDoor_Text,关闭仓门,Close door,boxの扉を閉める
FrmStoreBox_btnOpenDoor_Text,打开仓门,Open door,boxの扉を開ける
FrmStoreBox_tabPage1_Text,伺服调试,Servo debug,サーボのデバック
FrmStoreBox_axisMoveControl1_Text,FrmStoreBox_axisMoveControl1_Text,FrmStoreBox_axisMoveControl1_Text,FrmStoreBox_axisMoveControl1_Text
FrmStoreBox_groupBox1_Text,伺服状态,Servo state,サーボ状態
FrmStoreBox_axis_4_Alarm_Text,,,
FrmStoreBox_label1_Text,轴四:压紧轴,Axis 4 pressure axis,第4軸:圧着軸
FrmStoreBox_label_speed,点动速度,Inching speed,タップスピード
FrmStoreBox_axis_1_Alarm_Text,,,
FrmStoreBox_axis_3_Alarm_Text,,,
FrmStoreBox_axis_2_Alarm_Text,,,
FrmStoreBox_label38_Text,ALM:,ALM:,ALM
FrmStoreBox_label12_Text,出入库目标值:,Providing target value:,出庫と入庫の目標値
FrmStoreBox_label4_Text,轴三:进出轴,Axis 3 in-out axis,III軸:出入り軸
FrmStoreBox_label3_Text,轴二:上下轴,Axis 2 lifting axis,II軸:上下軸
FrmStoreBox_label5_Text,轴一:旋转轴,Axis 1 rotation axis,I軸:回転軸
FrmStoreBox_label43_Text,输出脉冲值:,Output impulse valve:,パルス波値出力
FrmStoreBox_label42_Text,编码器计数:,Encoder count:,エンコーダカウント
FrmStoreBox_groupAxis_Text,伺服运动,Servo motor,サーボの動き
FrmStoreBox_label7_Text,伺服状态:,Servo Info,サーボの状態
FrmStoreBox_label17_Text,负极限信号:,Negative limit signal:,負のリミット信号。
FrmStoreBox_label19_Text,正极限信号:,Positive limit signal:,正のリミット信号。
FrmStoreBox_label6_Text,原点信号:,Home signal:,原点信号
FrmStoreBox_label11_Text,HOME-CMP状态:,HOME-CMP state:,HOME-CMP状態
FrmStoreBox_label10_Text,BUSY状态:,BUSY state:,BUSY状態。
FrmStoreBox_label2_Text,报警状态:,Alarm state:,ALARM状態
FrmStoreBox_btnGetAlarm_Text,读取状态,Read state,読み取り状態
FrmStoreBox_btnReadPosition_Text,读取位置,Update location,ポジション読み取り
FrmStoreBox_label8_Text,实时位置:,Actual position:,リアルタイムの位置。
FrmStoreBox_btnOpenAxis_Text,打开伺服,Open servo,サーボオン
FrmStoreBox_btnCloseAxis_Text,关闭伺服,Close servo,サーボオフ
FrmStoreBox_label47_Text,速度:,Speed:,スピード
FrmStoreBox_btnAxisVMove_Text,匀速运动,uniform move,均一的な動き
FrmStoreBox_btnAxisRMove_Text,相对运动,Relative move,相対運動
FrmStoreBox_btnAxisReturnHome_Text,原点返回,Back to home,原点回帰
FrmStoreBox_btnAxisAMove_Text,绝对运动,Abosolute move,絶対運動
FrmStoreBox_btnComAlarmClear_Text,清除报警,Clear alarm,アラーム解除
FrmStoreBox_label48_Text,位置:,Position:,ポジション
FrmStoreBox_btnAxisStop_Text,停止运动,Stop move,運動停止
FrmStoreBox_label45_Text,端口号:,Port number:,ポート番号
FrmStoreBox_label46_Text,地址:,Address:,アドレス
FrmStoreBox_label49_Text,AC伺服:,AC server:,ACサーボ
FrmStoreBox_tabPage2_Text,温湿度,Temp controller,温度・湿度
FrmStoreBox_groupCode_Text,扫码测试,scanning test,スキャンコードテスト
FrmStoreBox_label32_Text,二维码内容:,Code info:,QRコードの内容
FrmStoreBox_label31_Text,图片:,Image:,写真
FrmStoreBox_btnCodeTest_Text,扫码测试,scanning test,スキャンコードテスト
FrmStoreBox_btnOpenFile_Text,打开本地图片,Open Local Image,ローカルイメージを開く
FrmStoreBox_groupBox7_Text,温控器调试,Temp controller debug,サーモスタットのデバック
FrmStoreBox_groupHistory_Text,历史记录,History:,履歴
FrmStoreBox_btnSelHistory_Text,查询记录信息,Query record information,検索履歴情報
FrmStoreBox_label24_Text,记录总条数:,Total number:,レコード履歴の総数
FrmStoreBox_label30_Text,记录时间:,Time:,タイムライン
FrmStoreBox_label23_Text,当前指针位置:,pointer position:,現在のポインタの位置
FrmStoreBox_label26_Text,记录湿度值:,humidity value:,湿度の値を記録
FrmStoreBox_label22_Text,记录温度值:,temperature value:,温度の値を記録
FrmStoreBox_btnSelTemp_Text,查询实时数据,Query real-time data,リアルタイムデータの照会
FrmStoreBox_label29_Text,湿度:,Humidity:,湿度
FrmStoreBox_label28_Text,温度:,Temperature:,温度
FrmStoreBox_label27_Text,端口号:,Port number:,ポート番号
FrmStoreBox_btnTempClose_Text,断开,Disconnect,接続解除
FrmStoreBox_btnTempInit_Text,初始化,Initialize,初期化
FrmStoreBox_groupBox3_Text,设备状态,Machine state,デバイスの状態
FrmStoreBox_lblWarnMsg_Text,FrmStoreBox_lblWarnMsg_Text,FrmStoreBox_lblWarnMsg_Text,FrmStoreBox_lblWarnMsg_Text
FrmStoreBox_lblThisSta_Text,等待启动,Wait to start,起動待つ
FrmStoreBox_groupInout_Text,料仓操作,Operation,BOX操作
FrmStoreBox_lblTemp_Text,当前温度--,当前湿度--,Current temperature--& current humidity--,現在の温度-‐、現在の湿度-‐
FrmStoreBox_lblMsg_Text,没有开启自动出入库,Auto providing not start,BOX自動出入りができない
FrmStoreBox_btnSavePosition_Text,とり,Save position,位置の保存
FrmStoreBox_btnStartAuTo_Text,启动自动模式,Start auto mode,自動モード開始
FrmStoreBox_label9_Text,入库间隔仓位:,Storage space:,入庫の間隔boxのロケーション
FrmStoreBox_label21_Text,选择仓位:,Seletct Position:,BOXポジション選択
FrmStoreBox_btnInStore_Text,入库测试,Saving testing,入庫テスト
FrmStoreBox_btnOutStore_Text,出库测试,Outbound test,出庫テスト
FrmStoreBox_btnComP1_Text,压紧轴待机点P1:,p-axis stanby P1:,圧着軸待機P1:
FrmStoreBox_btnInOutP2_Text,进出轴取料点P2:,In-out axis P2:,出入り軸原料取りP2:
FrmStoreBox_btnInOutP1_Text,进出轴待机点P1:,In-out axis stanby P1:,出入り軸待機P1:
FrmStoreBox_btnMiddleP1_Text,旋转轴待机点P1:,Rotation axis stanby P1:,回転軸待機P1:
FrmStoreBox_btnUpDownP7_Text,升降轴入料缓冲点P7:,l-axis storing buffer P7:,昇降軸原料取りバッファP7:
FrmStoreBox_btnUpDownP8_Text,升降轴出料缓冲点P8:,l-axis providing buffer P8:,昇降軸原料出しバッファP8:
FrmStoreBox_btnUpDownP1_Text,升降轴入料点P1:,l-axis storing P1:,昇降軸原料取りバッファP1
FrmStoreBox_btnUpDownP2_Text,升降轴出料前点P2:,l-axis providing P2:,昇降軸原料出しバッファP2:
FrmStoreBox_btnComP3_Text,压紧轴压紧前点P3:,p-axis former pressing P3:,圧着軸圧着前P3:
FrmStoreBox_btnComP2_Text,压紧轴压紧点P2:,p-axis pressing P2:,圧着軸圧着P2:
FrmStoreBox_btnInOutP3_Text,进出轴取料点P3:,In-out axis P3:,出入り軸原料取りP3:
FrmStoreBox_btnMiddleP2_Text,旋转轴库位点P2:,Rotation axis storage P2:,回転軸荷物P2:
FrmStoreBox_btnUpDownP5_Text,升降轴出料前点P5:,l-axis former providing P5:,昇降軸原料出しP5:
FrmStoreBox_btnUpDownP6_Text,升降轴出料缓冲点P6:,l-axis providing buffer P6:,昇降軸原料出しバッファP6:
FrmStoreBox_btnUpDownP3_Text,升降轴入料前点P3:,l-axis former storing P3:,昇降軸原料取りP3:
FrmStoreBox_btnUpDownP4_Text,升降轴入料缓冲点P4:,l-axis storing buffer P4:,昇降軸原料取りバッファP4:
FrmPwd_Text,请输入密码,Enter PSW:,パスワード入力
FrmPwd_btnNext_Text,确定,Confirm,OK
FrmPwd_btnBack_Text,返回,Back,戻る
FrmPwd_label1_Text,请输入密码:,Enter PSW:,パスワードを入力してください。
FrmIOStatus_Text,IO查看,IO check,IO確認
FrmIOStatus_button1_Text,关闭,Close,閉じる
FrmIOStatus_groupBox2_Text,高度传感器,Height Single:,高精度センサー
FrmIOStatus_label11_Text,4:00,4:00,4:00
FrmIOStatus_label10_Text,料盘尺寸:,Size:,トレイのサイズ。
FrmIOStatus_label9_Text,料盘高度:,Hieght:,トレイの高さ。
FrmIOStatus_label8_Text,->,->,->
FrmIOStatus_label7_Text,3:00,3:00,3:00
FrmIOStatus_label4_Text,2:00,2:00,2:00
FrmIOStatus_label1_Text,1:00,1:00,1:00
FrmIOStatus_groupBox1_Text,DO写入,DO write,DO写す
FrmIOStatus_btnCloseLed_Text,关闭相机照明,Close Camera light,カメラの照明をオフにする
FrmIOStatus_label3_Text,选择DO:,Select DO:,DOを選択します。
FrmIOStatus_btnOpenLed_Text,打开相机照明,Open Camera light,カメラの照明をオンにする
FrmIOStatus_label2_Text,SlaveId,SlaveId,SlaveId
FrmIOStatus_btnCloseAxisBreak_Text,关闭刹车,Close brake,ブレーキを切る
FrmIOStatus_label17_Text,设备IP:,IP:,デバイスアドレス
FrmIOStatus_btnReadIO_Text,读取IO状态,Read IO state,IO状態の読み取り
FrmIOStatus_btnOpenAxisBreak_Text,打开刹车,Open brake,ブレーキをかける
FrmIOStatus_label14_Text,地址:,Servo address:,アドレス
FrmIOStatus_btnWriteSingleDO_Text,写入DO,Write DO,DOを書き込み
FrmIOStatus_label5_Text,定时(ms):,Time(ms):,タイマー設定
FrmIOStatus_btnReadAllDi_Text,读取所有DI,Read all DI,すべてのDIを読み取る
FrmIOStatus_label6_Text,写入值:,Write value:,書き込み値
FrmIOStatus_btnReadAllDo_Text,读取所有DO,Read all DO,すべてのDOを読み取り
FrmIOStatus_btnCloseDoor_Text,关闭仓门,Close door,ビンの扉を閉じる
FrmIOStatus_btnOpenDoor_Text,打开仓门,Open door,ビンの扉を開ける
FrmIOStatus_groupBox4_Text,DO列表,DO list,DOリスト
FrmIOStatus_groupBox3_Text,DI列表,DI list,DIリスト
FrmIOStatus_chbAutoRead_Text,自动读取,Auto read,自動読み取り
FrmAxisDebug_Text,料仓BOX_1 _轴点动调试,SMD BOX_1 _axis inching adjusting,BOX_1 _アクシスのポインティングのバッファ
FrmAxisDebug_btnCCopy_Text,复制,Copy,コピー
FrmAxisDebug_btnICopy_Text,复制,Copy,コピー
FrmAxisDebug_btnUCopy_Text,复制,Copy,コピー
FrmAxisDebug_btnMCopy_Text,复制,Copy,コピー
FrmAxisDebug_lblSpeed_Text,点动速度=0.2倍目标速度,Speed=0.2xTarget Speed,タップスピード=ターゲットスピードの0.2倍
FrmAxisDebug_btnComMovej_Text,压紧轴-(向上),Pressure axis-(up),圧着軸 - (上
FrmAxisDebug_btnComMove_Text,压紧轴+(向下),Pressure axis+(down),圧着軸 (下)
FrmAxisDebug_label4_Text,(轴四)压紧轴,(Axis 4)pressure axis,(IV軸) 圧着軸
FrmAxisDebug_label6_Text,实时坐标,Real time coordinate,リアルタイム座標
FrmAxisDebug_label5_Text,点动速度,Inching speed,タップスピード
FrmAxisDebug_button1_Text,关闭,Close,閉じる
FrmAxisDebug_btnInOutMovej_Text,进出轴-(后退),In-out axis-backward, 出入り- (バック)
FrmAxisDebug_btnUpDownMovej_Text,升降轴-(下降),l-axis-descent,昇降軸 - (降下)
FrmAxisDebug_btnMiddleMovej_Text,旋转轴-(逆时针),Rotation axis- anti-clockwise,回転軸-(反時計回り)
FrmAxisDebug_btnInOutMove_Text,进出轴+(前进),In-out axis+forward,出入力軸+(前進)
FrmAxisDebug_btnUpDownMove_Text,升降轴+(上升),l-axis+ascent,昇降軸+(上昇)
FrmAxisDebug_btnMiddleMove_Text,旋转轴+(顺时针),Rotation axis+clockwise,回転軸+(時計回り)
FrmAxisDebug_label3_Text,(轴三)进出轴,(Axis 3) in-out axis,(III軸) 出入り軸
FrmAxisDebug_label2_Text,(轴二)升降轴,(Axis 2) lifting axis,(II軸) 昇降軸
FrmAxisDebug_label1_Text,(轴一)旋转轴,(Axis 1) rotation axis,(I軸) 回転軸
升降轴位置调试:,升降轴位置调试:,Updown-Axis Debug Location:,昇降軸位置のデバック
FrmPositionTool_Text,升降轴位置测试,Updown-Axis Debug Location,昇降軸位置のテスト
FrmPositionTool_groupBox6_Text,,,
FrmPositionTool_groupBox2_Text,位置信息,location information,ポジション情報
FrmPositionTool_label10_Text,入料缓冲点P4偏移量:,Point P4 offset:,原料入りバッファ位置p4シフト量
FrmPositionTool_label9_Text,入料前点P3偏移量:,Point P3 offset:,原料入りの前p3位置シフト量
FrmPositionTool_label5_Text,出料缓冲点P6偏移量:,Point P6 offset:,原料出しバッファ位置p6シフト量
FrmPositionTool_label4_Text,出料前点P5偏移值:,Point P5 offset:,原料出し前位置p5シフト量
FrmPositionTool_btnOpenFolder_Text,打开文件夹,Open the folder,フォルダを開く
FrmPositionTool_btnGetActualPosition_Text,读取位置,Update location,ポジション読み取り
FrmPositionTool_label8_Text,移动速度:,Move speed:,移動速度
FrmPositionTool_ioStatusControl1_Text,FrmPositionTool_ioStatusControl1_Text,FrmPositionTool_ioStatusControl1_Text,FrmPositionTool_ioStatusControl1_Text
FrmPositionTool_label1_Text,label1,label1,ラベル1
FrmPositionTool_btnAbsMove_Text,开始运动,Start,動作開始
FrmPositionTool_label3_Text,保存文件名称:,file name:,ファイル名の保存
FrmPositionTool_label7_Text,实际位置:,actual position:,実際の位置
FrmPositionTool_label13_Text,目标位置:,target location:,目標位置
FrmPositionTool_btnSdStop_Text,停止,Stop,ストップ
FrmPositionTool_label6_Text,目标位置:,target location:,目標位置
FrmPositionTool_groupBox1_Text,设备信息,equipment information,デバイス情報
FrmPositionTool_label12_Text,端口号:,Port number:,ポート番号
FrmPositionTool_label18_Text,地址:,Servo address:,アドレス
FrmPositionTool_btnHomeMove_Text,原点返回,Back to home,原点回帰
FrmPositionTool_btnServoOn_Text,打开伺服,Open servo,サーボを開ける
FrmPositionTool_btnServoOff_Text,关闭伺服,Close servo,サーボを閉じる
FrmPositionTool_label2_Text,检测信号地址:,signal address:,検査信号のアドレス
FrmPositionTool_btnExit_Text,退出,Exit,終了
FrmPositionTool_btnClear_Text,清理,Clear,クリア
检测信号,检测信号,detection signal,信号の検査
FrmLanguare_Text,语言设置,Language,言語設定
FrmLanguare_btnCancel_Text,取消,Cancel,キャンセル
FrmLanguare_btnOk_Text,确定,Confirm,OK
FrmLanguare_rbtnEnglish_Text,英文,English,英語
FrmLanguare_rbtnChina_Text,中文,Chinese,中国語
FrmAbout_Text,软件信息,Software Info,ソフトウェア情報
FrmAbout_btnCopy_Text,复制编号,Copy,コピーナンバー
FrmAbout_lblCodeName_Text,软件编号:52 43 2D 44 4C 2D 41 43 53 69 6E 67 6C 65 53 74 6F 72 65,Software Number:52 43 2D 44 4C 2D 41 43 53 69 6E 67 6C 65 53 74 6F 72 65,ソフトウェアコード:52 43 2D 44 4C 2D 41 43 53 69 6E 67 6C 65 53 74 6F 72 65
FrmAbout_lblTime_Text,更新时间:2020-02-07 21:16,UpdateTime:2020-02-07 21:16,更新日時:2020-02-07 21:16
FrmAbout_lblVersion_Text,版本号:1.0.7342.38298,Version:1.0.7342.38298,バージョン番号:1.0.7342.38298
FrmAbout_btnNext_Text,确定,Confirm,確定
Middle_Axis,(轴一)旋转轴,(Axis 1) rotation axis,(I軸) 回転軸
UpDown_Axis,(轴二)升降轴轴,(Axis 2) lifting axis,(I軸) 昇降軸
InOut_Axis,(轴三)进出轴,(Axis 3) in-out axis,(III軸) 出入り軸
Comp_Axis,(轴四)压紧轴,(Axis 4)pressure axis,(IV軸)圧着軸
启用调试,启用调试,Enable debugging,デバック起動
等待启动,等待启动,Wait to start,スタートアップを待つ
前门未关,前门未关,Front door open,フロントドアが閉まらない
叉子料盘检测有料,请检查,叉子料盘检测有料,请检查,Fork tray full& please check,フォークパレットは材料があって、確認
开始自动出入库,开始自动出入库,Start auto storing,自動入出庫の開始
停止自动出入库,停止自动出入库,Stop auto storing,自動ロード/アンロードの停止
自动出库:,自动出库:,Auto outbound:,自動出庫
自动入库:,自动入库:,Auto warehousing:,自動入庫
定位气缸不在下降端,不能移动进出轴,定位气缸不在下降端,不能移动进出轴,The position cylinder is not at the descent position& not move the in-out axis,位置決めシリンダーは下降端になく、出入り軸が移動不可
警告,警告,Warning,警告
开始循环出库,开始循环出库,Start looping out,サイクルアウトの開始
停止循环出库,停止循环出库,Stop the loop,サイクルアウトの停止
FrmStoreBox_显示ToolStripMenuItem_Text,显示,Show,ディスプレイ
FrmStoreBox_toolStripMenuItem1_Text,退出,Exit,終了
,,,
是否确定退出?,是否确定退出?,Are you sure you want to quit?,終了しますか?
提示,提示,Remind,ヒント
点动速度,点动速度,Inching speed,タップスピード
倍目标速度,倍目标速度,Double target speed,目標速度の2倍
禁用调试,禁用调试,Disable debugging,デバッグ禁止
无报警,无出入库或者重置操作时,才可以回待机点!,无报警,无出入库或者重置操作时,才可以回待机点!,No Alarm,No Alarm
,,,
inSuddenStop,收到急停信号,报警急停,Emergency stop signal received,alarm emergency stop,緊急停止信号を受信し、緊急停止を警告します
InoutAlarm,进出轴报警!复位失败,请检查,in-out axis alarm! Reset failed& please check,出入り軸アラーム!初期化が失敗し、確認
OpenAxisFail,打开轴{0}失败,Failed to open axis {0},軸を開けることが不可{0}
NoAIr,未检测到气压信号,Pressure signal undetected,気圧信号はまだ検出していません。
AutoReset,收到复位信号,自动复位,Receive reset signal& automatical reset,リセット信号を受け、自動初期化に戻す
AxisAlarm,运动轴{0}报警,Motion axis {0} alarm,運転軸がアラームする{0}
startFail,启动失败:急停未开,Startup failure: emergency stop not opened,設備が立ち上がらなく、急に止まる
WaitSingleTimeOut,等待信号{0}={1}超时,Wait signal {0}={1} timeout,信号を待つ、タイムオーバーする{0}={1}
startFailAir,启动失败:没有气压信号,Startup failure: no air pressure signal,起動失敗し、気圧信号がない
AxisHomeMoveAlarm,运动{0}轴{1}收到原点完成信号,当前位置[{2}],误差过大,需要报警,The movement {0} axis {1} receives the origin completion signal& the current position [{2}]& the error is too large& it needs to alarm,運転軸は原点に戻って信号を獲得、現在位置、誤差過大、緊急通報が必要だ{0} axis {1}[{2}]
AxisMoveAlarm,运动{0}轴{1}目标位置[{2}]当前位置{3}误差过大,需要报警,Movement {0} axis {1} target position [{2}] current position {3} error is too large& need to alarm,運転軸 目標位置、現在位置、誤差過大、緊急通報が必要だ{0} axis {1} target position [{2}]
MoveTimeOut,{0}]超时{1}[{2}],{0}]Time out {1}[{2}],タイムオーバー{0}]超时{1}[{2}] {0}]Time out {1}[{2}]
WaitInstoreTimeOut,[{0}]超时[等待可以入库][{1}秒],[{0}] timeout [wait to store][{1} seconds],タイムオーバー 入庫するのを待つ[{0}] timeout [wait to store][{1} seconds]
HasWare,叉子料盘检测有料,请检查,Fork tray full& please check,フォークリールには材料があって、確認
NoCodeMsg,未扫到二维码,请重新放入料盘,If the qr code is not scanned& please put it back into the material tray,QRコードはまだスキャンしていませんので、改めてフォークリールにいれてください
InStoreNoCode,未扫到二维码,需要将料盘送出,The qr code is not scanned& the material plate needs to be sent out,QRコードはまだスキャンしていませんので、リールを取り出してください。
InStoreError,入库库位格式错误:条码[{0}]库位号[{1}],Incorrect format of the library entry: barcode [{0}] library entry number [{1}],入庫ロケーションの格式は問題があります。バーコード[{0}]ロケーション番号[{1}]
InStoreNoPosition,入库未找到库位:条码[{0}]库位号[{1}],Storage location not found: barcode [{0}] storage location [{1}],入庫に保管場所が見つかりません:バーコード[{0}]ロケーション番号[{1}]
OutStoreError,出库格式错误{0},Providing format error{0},出庫格式はエラーですerror{0}
OutStoreNoPosition,出库未找库位:{0},Storage location not found :{0},出庫に保管場所が見つかりませんnot found :{0}
HomeMove,原点返回,Back to home,原点に戻る
AbsMove,绝对运动,Abosolute move,絶対運動
WaitIo,IO信号等待,IO wait,信号待つ
WaitTime,时间等待:,Time to wait:,時間待つ
TargetPosition,电钢目标位置:,Target position of electric steel:,電気鋼のターゲット位置
trayHeight,料盘高度,Reel height,リールの高さ
请先启动料仓!,请先启动料仓!,Please start the system!,先にboxを起動してください!先にboxを起動してください!
保存位置失败!,保存位置失败!,Save position Fail!,位置保存失敗!位置保存失敗!
警告(叉子在待机位时,才能移动升降轴和旋转轴),警告(叉子在待机位时,才能移动升降轴和旋转轴),Warn(move the lifting and rotating axis only when the gripper is stanby),警告(フォークは待機位置にある場合のみ、昇降軸と回転軸が移動できます)警告(フォークは待機位置にある場合のみ、昇降軸と回転軸が移動できます)
叉子不在待机位,请先将叉子退回待机位,叉子不在待机位,请先将叉子退回待机位,Gripper not stanby& return the gripper to standby,フォークが待機位置にない場合は、まずフォークを待機位置に戻してください。フォークが待機位置にない場合は、まずフォークを待機位置に戻してください。
确定开始自动出入库?,确定开始自动出入库?,Make sure to start automatic storage ?,自動保存を開始してもよろしいですか? 自動保存を開始してもよろしいですか?
请输入正确的密码,请输入正确的密码,Enter the right PSW,正しいパスワードを入力してください正しいパスワードを入力してください
打开串口失败,打开串口失败,Failed to open serial port,シリアルポートを開けることが不可 シリアルポートを開けることが不可
请输入正确的速度,请输入正确的速度,Please enter the correct speed,正しい速度を入力してください正しい速度を入力してください
自动出库:,自动出库:,Auto outbound:,自動出庫:自動出庫:
自动入库:,自动入库:,Auto warehousing:,自動入庫 自動入庫
升降轴位置调试:,升降轴位置调试:,Updown-Axis Debug Location,昇降軸位置デバック  昇降軸位置デバック
关闭DEBUG,关闭DEBUG,Close DEBUG,閉める 閉める
开启DEBUG,开启DEBUG,Open DEBUG,開ける 開ける
出库{0}叉子从库位退出后,未检测到料盘有料,出库{0}叉子从库位退出后,未检测到料盘有料,Outgoing {0} after the fork exits from the storage,no material on the tray is detected,出庫{0}フォークがその場所から出た後、リールに材料が検出されません。出庫{0}フォークがその場所から出た後、リールに材料が検出されません。
左侧门未关,左侧门未关,Left door open,左側のドアが閉まっていない  左側のドアが閉まっていない
右侧门未关,右侧门未关,Right door open,右側のドアが閉まっていない  右側のドアが閉まっていない
FrmStoreBox_chbIsDebug_Text,调试状态,debug mode,デバック状態
光栅被遮挡,光栅被遮挡,Grating blocked,グレーティングがブロックされている  グレーティングがブロックされている
InTrouble,故障中,In trouble,故障中
OutStoreBoxEnd,料盘出仓位完成,Providing executed,リールの出庫ロケーションは完成
OutStoreExecute,出库执行中,Providing Executing,出庫中
StoreOnline,设备联机,System online,設備はオンライン中
SuddenStop,急停中,Emergency stop,緊急停止中
OutMoveExecute,出库完成,Providing Executed,出庫完成
InStoreFailed,入库失败,Saving failed,入庫失敗
OutStoreFailed,出库失败,Providing failed,出庫失敗
WaitSingle,等待信号,Wait signal,信号待つ
TimeOut,超时,Time out,タイムオーバー
Run,运行中,Runing,作業中
Runing,运行中,Runing,作業中
OutStorEnd,出库完成,OutStorEnd,出庫完成
FrmStoreBox_btnCloseDLed_Text,关闭设备照明,Turn off lighting,設備照明を閉める
FrmStoreBox_btnOpenDLed_Text,打开设备照明,Turn on lighting,設備照明を開ける
FrmStoreBox_btnOpenAutoInOut_Text,开启自动出入库, start auto storage and retrieval,入庫と出庫の機能を自動的にオンにします
FrmStoreBox_btnHul_Text,忽略夹爪检测信号,Ignore the gripper detection signal,グリッパー検出信号を無視する
FrmStoreBox_lblTempStr_Text,FrmStoreBox_lblTempStr_Text,FrmStoreBox_lblTempStr_Text,
Y11,设备照明开,Equipment lighting on,設備照明を開ける
FrmIOStatus_btnCDLed_Text,关闭设备照明,Turn off equipment lighting,設備照明を閉める
FrmIOStatus_btnDevideLed_Text,打开设备照明,Turn on equipment lighting,設備照明を開ける
FrmStoreBox_chbOpenLog_Text,显示日志,Open Log,ブログを表示する
FrmStoreBox_tabPage7_Text, 设备状态 , Machine state ,設備状態
,,,
,,,
X00,急停,Emergency stop,緊急停止
X01,复位,Reset,リセット
X02,启动,Auto,自動
X03,氮气气压检测,Pressure detection,空気圧検査
X04,料盘检测1(进料口),Tray check 1,リール検査1(原料入り入口
X05,料盘检测2(料叉),Tray check 2,リール検査2(フォーク
X06,进料口门上升端,Portal ascent position,原料入り入口上昇端
X07,进料口门下降端,Portal descent position,原料入り入口降下端
X08,安全光栅,Security grating,セーフティーグレーチング
X09,前门限位,front door limit,フロントドアの制限位置
X10,左侧门限位,Left side threshold,左側ドアの限定位置
X11,右侧门限位,Right hand threshold,右側ドアの限定位置
X12,激光对点检测,Laser point detection,レーザ当て検査
X13,进料口电机异常,Portal motor abnormal,原料入れ口電機異常
Y00,自动指示灯,Auto indicator light,自動指示ライト
Y01,故障指示灯,Error indicator light,故障指示ライト
Y02,待机指示灯,Indicator light,待機指示ライト
Y03,故障蜂鸣器,Fault buzzer,故障ブザー
Y04,设备照明开启,System light ON,設備照明開け
Y05,相机光源开启,Camera light ON,カメラ照明ON
Y06,氮气阀门开启,Nitrogen valve open,アンモ二アバルブ開け
Y07,进料口门运转,Portal door operation,原料入れ口ドア運転
Y08,进料口门反转关门,Portal door reverse close,原料入れ口ドア逆転閉め
,,,
FrmStoreBox_groupBox2_Text,轴状态监控,Axis status monitor,軸状態監視
FrmStoreBox_lblAlarmcode_Text,错误码:,Wrong code:,エラーコード
FrmStoreBox_lblINP_Text,到位,Ready,準備
FrmStoreBox_lblBUSY_Text,忙碌,Busy,忙しい
FrmStoreBox_lblNEL_Text,负极限,Negative limit, 負極限
FrmStoreBox_lblORG_Text,原点,Origin,原点
FrmStoreBox_lblPEL_Text,正极限,Positive limit,正極限
FrmStoreBox_lblSvOn_Text,伺服,Servo,サーボ
FrmStoreBox_lblEMG_Text,急停,Emergency stop,急停
FrmStoreBox_lblWARN_Text,警告,Warning,警告
FrmStoreBox_lblALM_Text,报警,Alarm,通報+
FrmStoreBox_label53_Text,规划速度:,Planning speed:,計画速度
FrmStoreBox_label56_Text,实际速度:,Actual speed:,実際速度
FrmStoreBox_label55_Text,实际位置:,Actual location:,実際位置
FrmStoreBox_label52_Text,规划位置:,Planning location:,計画位置
FrmStoreBox_label50_Text,规划模式:,Planning mode:,計画モード
FrmStoreBox_linkLabel1_Text,复制,Copy,コピー
FrmStoreBox_btnDelMove_Text,点动- ,Jogging-,クリック‐
FrmStoreBox_btnAddMove_Text,点动+ ,Jogging+,クリック
\ No newline at end of file
namespace OnlineStore.ACPackingStore
namespace OnlineStore.DUOStore
{
partial class AxisMoveControl
{
......@@ -28,286 +28,672 @@
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.groupAxis = new System.Windows.Forms.GroupBox();
this.label7 = new System.Windows.Forms.Label();
this.txtServoStatue = new System.Windows.Forms.TextBox();
this.label17 = new System.Windows.Forms.Label();
this.txtLimit2 = new System.Windows.Forms.TextBox();
this.label19 = new System.Windows.Forms.Label();
this.txtLimit1 = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.txtHomeSingle = new System.Windows.Forms.TextBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.lblAlarmcode = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.lblhomeSts = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.lblAxEncAcc = new System.Windows.Forms.Label();
this.lblINP = new System.Windows.Forms.Label();
this.lblBUSY = new System.Windows.Forms.Label();
this.lblNEL = new System.Windows.Forms.Label();
this.lblORG = new System.Windows.Forms.Label();
this.lblPEL = new System.Windows.Forms.Label();
this.lblSvOn = new System.Windows.Forms.Label();
this.lblEMG = new System.Windows.Forms.Label();
this.lblWARN = new System.Windows.Forms.Label();
this.lblALM = new System.Windows.Forms.Label();
this.label53 = new System.Windows.Forms.Label();
this.label56 = new System.Windows.Forms.Label();
this.label55 = new System.Windows.Forms.Label();
this.label52 = new System.Windows.Forms.Label();
this.lblAxEncVel = new System.Windows.Forms.Label();
this.lblAxPrfVel = new System.Windows.Forms.Label();
this.lblAxEncPos = new System.Windows.Forms.Label();
this.lblAxPrfPos = new System.Windows.Forms.Label();
this.lblAxisPrfMode = new System.Windows.Forms.Label();
this.label50 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.txtBusyStatus = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.txtHomeStatus = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.txtBusyStatus = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txtAlarmStatus = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label24 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.btnGetAlarm = new System.Windows.Forms.Button();
this.btnReadPosition = new System.Windows.Forms.Button();
this.label8 = new System.Windows.Forms.Label();
this.txtAlarmStatus = new System.Windows.Forms.TextBox();
this.txtLimit2 = new System.Windows.Forms.TextBox();
this.txtServoStatue = new System.Windows.Forms.TextBox();
this.label22 = new System.Windows.Forms.Label();
this.txtLimit1 = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.txtHomeSingle = new System.Windows.Forms.TextBox();
this.panel1 = new System.Windows.Forms.Panel();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.comjSpeed = new System.Windows.Forms.ComboBox();
this.btnComAlarmClear = new System.Windows.Forms.Button();
this.btnAxisStop = new System.Windows.Forms.Button();
this.btnAxisReturnHome = new System.Windows.Forms.Button();
this.cmbAxis = new System.Windows.Forms.ComboBox();
this.btnDelMove = new System.Windows.Forms.Button();
this.btnOpenAxis = new System.Windows.Forms.Button();
this.btnCloseAxis = new System.Windows.Forms.Button();
this.txtP = new System.Windows.Forms.TextBox();
this.btnAddMove = new System.Windows.Forms.Button();
this.txtASpeed = new System.Windows.Forms.TextBox();
this.label_speed = new System.Windows.Forms.Label();
this.label47 = new System.Windows.Forms.Label();
this.btnReadPosition = new System.Windows.Forms.Button();
this.btnAxisVMove = new System.Windows.Forms.Button();
this.label8 = new System.Windows.Forms.Label();
this.btnAxisRMove = new System.Windows.Forms.Button();
this.btnAxisReturnHome = new System.Windows.Forms.Button();
this.lblCountPulse = new System.Windows.Forms.TextBox();
this.btnAxisAMove = new System.Windows.Forms.Button();
this.btnComAlarmClear = new System.Windows.Forms.Button();
this.label49 = new System.Windows.Forms.Label();
this.txtAPosition = new System.Windows.Forms.TextBox();
this.label46 = new System.Windows.Forms.Label();
this.label48 = new System.Windows.Forms.Label();
this.btnAxisStop = new System.Windows.Forms.Button();
this.label45 = new System.Windows.Forms.Label();
this.txtAxisValue = new System.Windows.Forms.TextBox();
this.txtAxisDeviceName = new System.Windows.Forms.TextBox();
this.label45 = new System.Windows.Forms.Label();
this.label46 = new System.Windows.Forms.Label();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.axis_4_Alarm = new UserFromControl.IOStatusControl();
this.txt4Target = new System.Windows.Forms.TextBox();
this.lblTargetP4 = new System.Windows.Forms.TextBox();
this.lblActual4 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.axis_1_Alarm = new UserFromControl.IOStatusControl();
this.axis_3_Alarm = new UserFromControl.IOStatusControl();
this.axis_2_Alarm = new UserFromControl.IOStatusControl();
this.label38 = new System.Windows.Forms.Label();
this.txtMiddleTarget = new System.Windows.Forms.TextBox();
this.txtInoutTarget = new System.Windows.Forms.TextBox();
this.txtUpdownTarget = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.lblTargetP1 = new System.Windows.Forms.TextBox();
this.lblActual1 = new System.Windows.Forms.TextBox();
this.lblTargetP3 = new System.Windows.Forms.TextBox();
this.lblActual3 = new System.Windows.Forms.TextBox();
this.lblTargetP2 = new System.Windows.Forms.TextBox();
this.lblActual2 = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label43 = new System.Windows.Forms.Label();
this.label42 = new System.Windows.Forms.Label();
this.lblServerOn = new System.Windows.Forms.Label();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.groupAxis.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// groupAxis
//
this.groupAxis.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
this.groupAxis.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupAxis.Controls.Add(this.label7);
this.groupAxis.Controls.Add(this.txtServoStatue);
this.groupAxis.Controls.Add(this.label17);
this.groupAxis.Controls.Add(this.txtLimit2);
this.groupAxis.Controls.Add(this.label19);
this.groupAxis.Controls.Add(this.txtLimit1);
this.groupAxis.Controls.Add(this.label6);
this.groupAxis.Controls.Add(this.txtHomeSingle);
this.groupAxis.Controls.Add(this.label11);
this.groupAxis.Controls.Add(this.txtHomeStatus);
this.groupAxis.Controls.Add(this.label10);
this.groupAxis.Controls.Add(this.txtBusyStatus);
this.groupAxis.Controls.Add(this.label2);
this.groupAxis.Controls.Add(this.txtAlarmStatus);
this.groupAxis.Controls.Add(this.btnGetAlarm);
this.groupAxis.Controls.Add(this.btnReadPosition);
this.groupAxis.Controls.Add(this.label8);
this.groupAxis.Controls.Add(this.btnOpenAxis);
this.groupAxis.Controls.Add(this.btnCloseAxis);
this.groupAxis.Controls.Add(this.txtP);
this.groupAxis.Controls.Add(this.txtASpeed);
this.groupAxis.Controls.Add(this.label47);
this.groupAxis.Controls.Add(this.btnAxisVMove);
this.groupAxis.Controls.Add(this.btnAxisRMove);
this.groupAxis.Controls.Add(this.btnAxisReturnHome);
this.groupAxis.Controls.Add(this.btnAxisAMove);
this.groupAxis.Controls.Add(this.btnComAlarmClear);
this.groupAxis.Controls.Add(this.txtAPosition);
this.groupAxis.Controls.Add(this.label48);
this.groupAxis.Controls.Add(this.btnAxisStop);
this.groupAxis.Controls.Add(this.txtAxisValue);
this.groupAxis.Controls.Add(this.txtAxisDeviceName);
this.groupAxis.Controls.Add(this.label45);
this.groupAxis.Controls.Add(this.label46);
this.groupAxis.Controls.Add(this.comboBox1);
this.groupAxis.BackColor = System.Drawing.Color.White;
this.groupAxis.Controls.Add(this.groupBox2);
this.groupAxis.Controls.Add(this.groupBox1);
this.groupAxis.Controls.Add(this.panel1);
this.groupAxis.Controls.Add(this.lblServerOn);
this.groupAxis.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupAxis.Location = new System.Drawing.Point(4, 4);
this.groupAxis.Location = new System.Drawing.Point(4, 3);
this.groupAxis.Name = "groupAxis";
this.groupAxis.Size = new System.Drawing.Size(423, 361);
this.groupAxis.TabIndex = 217;
this.groupAxis.Size = new System.Drawing.Size(692, 395);
this.groupAxis.TabIndex = 218;
this.groupAxis.TabStop = false;
this.groupAxis.Text = "伺服运动";
//
// label7
// groupBox2
//
this.groupBox2.Controls.Add(this.lblAlarmcode);
this.groupBox2.Controls.Add(this.label4);
this.groupBox2.Controls.Add(this.lblhomeSts);
this.groupBox2.Controls.Add(this.label2);
this.groupBox2.Controls.Add(this.lblAxEncAcc);
this.groupBox2.Controls.Add(this.lblINP);
this.groupBox2.Controls.Add(this.lblBUSY);
this.groupBox2.Controls.Add(this.lblNEL);
this.groupBox2.Controls.Add(this.lblORG);
this.groupBox2.Controls.Add(this.lblPEL);
this.groupBox2.Controls.Add(this.lblSvOn);
this.groupBox2.Controls.Add(this.lblEMG);
this.groupBox2.Controls.Add(this.lblWARN);
this.groupBox2.Controls.Add(this.lblALM);
this.groupBox2.Controls.Add(this.label53);
this.groupBox2.Controls.Add(this.label56);
this.groupBox2.Controls.Add(this.label55);
this.groupBox2.Controls.Add(this.label52);
this.groupBox2.Controls.Add(this.lblAxEncVel);
this.groupBox2.Controls.Add(this.lblAxPrfVel);
this.groupBox2.Controls.Add(this.lblAxEncPos);
this.groupBox2.Controls.Add(this.lblAxPrfPos);
this.groupBox2.Controls.Add(this.lblAxisPrfMode);
this.groupBox2.Controls.Add(this.label50);
this.groupBox2.Location = new System.Drawing.Point(7, 270);
this.groupBox2.Margin = new System.Windows.Forms.Padding(2);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Padding = new System.Windows.Forms.Padding(2);
this.groupBox2.Size = new System.Drawing.Size(540, 118);
this.groupBox2.TabIndex = 303;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "轴状态监控";
//
// lblAlarmcode
//
this.lblAlarmcode.AutoSize = true;
this.lblAlarmcode.Location = new System.Drawing.Point(433, 65);
this.lblAlarmcode.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblAlarmcode.Name = "lblAlarmcode";
this.lblAlarmcode.Size = new System.Drawing.Size(68, 17);
this.lblAlarmcode.TabIndex = 19;
this.lblAlarmcode.Text = "错误码:160";
this.lblAlarmcode.Visible = false;
//
this.label7.Location = new System.Drawing.Point(10, 216);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(99, 17);
this.label7.TabIndex = 328;
this.label7.Text = "伺服状态:";
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtServoStatue
//
this.txtServoStatue.Enabled = false;
this.txtServoStatue.Location = new System.Drawing.Point(112, 213);
this.txtServoStatue.Name = "txtServoStatue";
this.txtServoStatue.Size = new System.Drawing.Size(25, 23);
this.txtServoStatue.TabIndex = 327;
//
// label17
//
this.label17.Location = new System.Drawing.Point(142, 329);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(99, 17);
this.label17.TabIndex = 316;
this.label17.Text = "负极限信号:";
this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtLimit2
// label4
//
this.txtLimit2.Enabled = false;
this.txtLimit2.Location = new System.Drawing.Point(245, 326);
this.txtLimit2.Name = "txtLimit2";
this.txtLimit2.Size = new System.Drawing.Size(25, 23);
this.txtLimit2.TabIndex = 313;
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(267, 90);
this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(59, 17);
this.label4.TabIndex = 18;
this.label4.Text = "回原状态:";
//
// label19
// lblhomeSts
//
this.label19.Location = new System.Drawing.Point(142, 290);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(99, 17);
this.label19.TabIndex = 312;
this.label19.Text = "正极限信号:";
this.label19.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblhomeSts.AutoSize = true;
this.lblhomeSts.Location = new System.Drawing.Point(332, 90);
this.lblhomeSts.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblhomeSts.Name = "lblhomeSts";
this.lblhomeSts.Size = new System.Drawing.Size(17, 17);
this.lblhomeSts.TabIndex = 17;
this.lblhomeSts.Text = "...";
//
// txtLimit1
// label2
//
this.txtLimit1.Enabled = false;
this.txtLimit1.Location = new System.Drawing.Point(245, 287);
this.txtLimit1.Name = "txtLimit1";
this.txtLimit1.Size = new System.Drawing.Size(25, 23);
this.txtLimit1.TabIndex = 309;
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(433, 90);
this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(71, 17);
this.label2.TabIndex = 11;
this.label2.Text = "实际加速度:";
this.label2.Visible = false;
//
// lblAxEncAcc
//
this.lblAxEncAcc.AutoSize = true;
this.lblAxEncAcc.Location = new System.Drawing.Point(510, 90);
this.lblAxEncAcc.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblAxEncAcc.Name = "lblAxEncAcc";
this.lblAxEncAcc.Size = new System.Drawing.Size(17, 17);
this.lblAxEncAcc.TabIndex = 12;
this.lblAxEncAcc.Text = "...";
this.lblAxEncAcc.Visible = false;
//
// lblINP
//
this.lblINP.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblINP.Location = new System.Drawing.Point(414, 24);
this.lblINP.Name = "lblINP";
this.lblINP.Size = new System.Drawing.Size(56, 30);
this.lblINP.TabIndex = 10;
this.lblINP.Text = "到位";
this.lblINP.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblBUSY
//
this.lblBUSY.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblBUSY.Location = new System.Drawing.Point(356, 24);
this.lblBUSY.Name = "lblBUSY";
this.lblBUSY.Size = new System.Drawing.Size(56, 30);
this.lblBUSY.TabIndex = 9;
this.lblBUSY.Text = "忙碌";
this.lblBUSY.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblNEL
//
this.lblNEL.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblNEL.Location = new System.Drawing.Point(298, 24);
this.lblNEL.Name = "lblNEL";
this.lblNEL.Size = new System.Drawing.Size(56, 30);
this.lblNEL.TabIndex = 8;
this.lblNEL.Text = "负极限";
this.lblNEL.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblORG
//
this.lblORG.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblORG.Location = new System.Drawing.Point(240, 24);
this.lblORG.Name = "lblORG";
this.lblORG.Size = new System.Drawing.Size(56, 30);
this.lblORG.TabIndex = 7;
this.lblORG.Text = "原点";
this.lblORG.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblPEL
//
this.lblPEL.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblPEL.Location = new System.Drawing.Point(182, 24);
this.lblPEL.Name = "lblPEL";
this.lblPEL.Size = new System.Drawing.Size(56, 30);
this.lblPEL.TabIndex = 6;
this.lblPEL.Text = "正极限";
this.lblPEL.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblSvOn
//
this.lblSvOn.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblSvOn.Location = new System.Drawing.Point(8, 24);
this.lblSvOn.Name = "lblSvOn";
this.lblSvOn.Size = new System.Drawing.Size(56, 30);
this.lblSvOn.TabIndex = 5;
this.lblSvOn.Text = "伺服";
this.lblSvOn.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblEMG
//
this.lblEMG.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblEMG.Location = new System.Drawing.Point(124, 24);
this.lblEMG.Name = "lblEMG";
this.lblEMG.Size = new System.Drawing.Size(56, 30);
this.lblEMG.TabIndex = 4;
this.lblEMG.Text = "急停";
this.lblEMG.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblWARN
//
this.lblWARN.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblWARN.Location = new System.Drawing.Point(472, 24);
this.lblWARN.Name = "lblWARN";
this.lblWARN.Size = new System.Drawing.Size(56, 30);
this.lblWARN.TabIndex = 3;
this.lblWARN.Text = "警告";
this.lblWARN.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblALM
//
this.lblALM.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblALM.Location = new System.Drawing.Point(66, 24);
this.lblALM.Name = "lblALM";
this.lblALM.Size = new System.Drawing.Size(56, 30);
this.lblALM.TabIndex = 2;
this.lblALM.Text = "报警";
this.lblALM.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label53
//
this.label53.AutoSize = true;
this.label53.Location = new System.Drawing.Point(134, 90);
this.label53.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label53.Name = "label53";
this.label53.Size = new System.Drawing.Size(59, 17);
this.label53.TabIndex = 1;
this.label53.Text = "规划速度:";
//
// label56
//
this.label56.AutoSize = true;
this.label56.Location = new System.Drawing.Point(10, 90);
this.label56.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label56.Name = "label56";
this.label56.Size = new System.Drawing.Size(59, 17);
this.label56.TabIndex = 1;
this.label56.Text = "实际速度:";
//
// label55
//
this.label55.AutoSize = true;
this.label55.Location = new System.Drawing.Point(10, 65);
this.label55.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label55.Name = "label55";
this.label55.Size = new System.Drawing.Size(59, 17);
this.label55.TabIndex = 1;
this.label55.Text = "实际位置:";
//
// label52
//
this.label52.AutoSize = true;
this.label52.Location = new System.Drawing.Point(134, 65);
this.label52.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label52.Name = "label52";
this.label52.Size = new System.Drawing.Size(59, 17);
this.label52.TabIndex = 1;
this.label52.Text = "规划位置:";
//
// lblAxEncVel
//
this.lblAxEncVel.AutoSize = true;
this.lblAxEncVel.Location = new System.Drawing.Point(73, 90);
this.lblAxEncVel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblAxEncVel.Name = "lblAxEncVel";
this.lblAxEncVel.Size = new System.Drawing.Size(17, 17);
this.lblAxEncVel.TabIndex = 1;
this.lblAxEncVel.Text = "...";
//
// lblAxPrfVel
//
this.lblAxPrfVel.AutoSize = true;
this.lblAxPrfVel.Location = new System.Drawing.Point(199, 90);
this.lblAxPrfVel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblAxPrfVel.Name = "lblAxPrfVel";
this.lblAxPrfVel.Size = new System.Drawing.Size(17, 17);
this.lblAxPrfVel.TabIndex = 1;
this.lblAxPrfVel.Text = "...";
//
// lblAxEncPos
//
this.lblAxEncPos.AutoSize = true;
this.lblAxEncPos.Location = new System.Drawing.Point(73, 65);
this.lblAxEncPos.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblAxEncPos.Name = "lblAxEncPos";
this.lblAxEncPos.Size = new System.Drawing.Size(17, 17);
this.lblAxEncPos.TabIndex = 1;
this.lblAxEncPos.Text = "...";
//
// lblAxPrfPos
//
this.lblAxPrfPos.AutoSize = true;
this.lblAxPrfPos.Location = new System.Drawing.Point(199, 65);
this.lblAxPrfPos.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblAxPrfPos.Name = "lblAxPrfPos";
this.lblAxPrfPos.Size = new System.Drawing.Size(17, 17);
this.lblAxPrfPos.TabIndex = 1;
this.lblAxPrfPos.Text = "...";
//
// lblAxisPrfMode
//
this.lblAxisPrfMode.AutoSize = true;
this.lblAxisPrfMode.Location = new System.Drawing.Point(332, 65);
this.lblAxisPrfMode.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblAxisPrfMode.Name = "lblAxisPrfMode";
this.lblAxisPrfMode.Size = new System.Drawing.Size(17, 17);
this.lblAxisPrfMode.TabIndex = 1;
this.lblAxisPrfMode.Text = "...";
//
// label50
//
this.label50.AutoSize = true;
this.label50.Location = new System.Drawing.Point(267, 65);
this.label50.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label50.Name = "label50";
this.label50.Size = new System.Drawing.Size(59, 17);
this.label50.TabIndex = 1;
this.label50.Text = "规划模式:";
//
// label6
// groupBox1
//
this.label6.Location = new System.Drawing.Point(142, 251);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(99, 17);
this.label6.TabIndex = 300;
this.label6.Text = "原点信号:";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.groupBox1.Controls.Add(this.txtBusyStatus);
this.groupBox1.Controls.Add(this.label11);
this.groupBox1.Controls.Add(this.txtHomeStatus);
this.groupBox1.Controls.Add(this.label10);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label24);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.btnGetAlarm);
this.groupBox1.Controls.Add(this.txtAlarmStatus);
this.groupBox1.Controls.Add(this.txtLimit2);
this.groupBox1.Controls.Add(this.txtServoStatue);
this.groupBox1.Controls.Add(this.label22);
this.groupBox1.Controls.Add(this.txtLimit1);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.txtHomeSingle);
this.groupBox1.Location = new System.Drawing.Point(553, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(135, 260);
this.groupBox1.TabIndex = 302;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "状态";
//
// txtHomeSingle
// txtBusyStatus
//
this.txtHomeSingle.Enabled = false;
this.txtHomeSingle.Location = new System.Drawing.Point(245, 248);
this.txtHomeSingle.Name = "txtHomeSingle";
this.txtHomeSingle.Size = new System.Drawing.Size(25, 23);
this.txtHomeSingle.TabIndex = 297;
this.txtBusyStatus.Enabled = false;
this.txtBusyStatus.Location = new System.Drawing.Point(99, 76);
this.txtBusyStatus.Name = "txtBusyStatus";
this.txtBusyStatus.Size = new System.Drawing.Size(25, 23);
this.txtBusyStatus.TabIndex = 288;
//
// label11
//
this.label11.Location = new System.Drawing.Point(10, 329);
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(31, 107);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(99, 17);
this.label11.Size = new System.Drawing.Size(59, 17);
this.label11.TabIndex = 292;
this.label11.Text = "HOME-CMP状态:";
this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label11.Text = "回零状态:";
//
// txtHomeStatus
//
this.txtHomeStatus.Enabled = false;
this.txtHomeStatus.Location = new System.Drawing.Point(112, 326);
this.txtHomeStatus.Location = new System.Drawing.Point(99, 104);
this.txtHomeStatus.Name = "txtHomeStatus";
this.txtHomeStatus.Size = new System.Drawing.Size(25, 23);
this.txtHomeStatus.TabIndex = 291;
//
// label10
//
this.label10.Location = new System.Drawing.Point(10, 290);
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(24, 79);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(99, 17);
this.label10.Size = new System.Drawing.Size(66, 17);
this.label10.TabIndex = 289;
this.label10.Text = "BUSY状态:";
this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtBusyStatus
// label3
//
this.txtBusyStatus.Enabled = false;
this.txtBusyStatus.Location = new System.Drawing.Point(112, 287);
this.txtBusyStatus.Name = "txtBusyStatus";
this.txtBusyStatus.Size = new System.Drawing.Size(25, 23);
this.txtBusyStatus.TabIndex = 288;
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(31, 51);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(59, 17);
this.label3.TabIndex = 286;
this.label3.Text = "报警状态:";
//
// label2
// label24
//
this.label2.Location = new System.Drawing.Point(10, 251);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(99, 17);
this.label2.TabIndex = 286;
this.label2.Text = "报警状态:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label24.AutoSize = true;
this.label24.Location = new System.Drawing.Point(19, 191);
this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(71, 17);
this.label24.TabIndex = 316;
this.label24.Text = "负极限信号:";
this.label24.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtAlarmStatus
// label5
//
this.txtAlarmStatus.Enabled = false;
this.txtAlarmStatus.Location = new System.Drawing.Point(112, 248);
this.txtAlarmStatus.Name = "txtAlarmStatus";
this.txtAlarmStatus.Size = new System.Drawing.Size(25, 23);
this.txtAlarmStatus.TabIndex = 285;
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(31, 23);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(59, 17);
this.label5.TabIndex = 328;
this.label5.Text = "伺服状态:";
//
// btnGetAlarm
//
this.btnGetAlarm.BackColor = System.Drawing.SystemColors.Control;
this.btnGetAlarm.BackColor = System.Drawing.Color.White;
this.btnGetAlarm.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnGetAlarm.Location = new System.Drawing.Point(284, 282);
this.btnGetAlarm.Location = new System.Drawing.Point(14, 218);
this.btnGetAlarm.Name = "btnGetAlarm";
this.btnGetAlarm.Size = new System.Drawing.Size(115, 33);
this.btnGetAlarm.Size = new System.Drawing.Size(110, 34);
this.btnGetAlarm.TabIndex = 284;
this.btnGetAlarm.Text = "读状态";
this.btnGetAlarm.Text = "读状态";
this.btnGetAlarm.UseVisualStyleBackColor = false;
this.btnGetAlarm.Click += new System.EventHandler(this.btnGetAlarm_Click);
//
// btnReadPosition
// txtAlarmStatus
//
this.btnReadPosition.BackColor = System.Drawing.SystemColors.Control;
this.btnReadPosition.Cursor = System.Windows.Forms.Cursors.Default;
this.btnReadPosition.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReadPosition.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReadPosition.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnReadPosition.Location = new System.Drawing.Point(284, 243);
this.btnReadPosition.Name = "btnReadPosition";
this.btnReadPosition.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnReadPosition.Size = new System.Drawing.Size(115, 33);
this.btnReadPosition.TabIndex = 278;
this.btnReadPosition.Text = "读取位置";
this.btnReadPosition.UseVisualStyleBackColor = false;
this.btnReadPosition.Click += new System.EventHandler(this.btnReadPosition_Click);
this.txtAlarmStatus.Enabled = false;
this.txtAlarmStatus.Location = new System.Drawing.Point(99, 48);
this.txtAlarmStatus.Name = "txtAlarmStatus";
this.txtAlarmStatus.Size = new System.Drawing.Size(25, 23);
this.txtAlarmStatus.TabIndex = 285;
//
// label8
// txtLimit2
//
this.label8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.Location = new System.Drawing.Point(142, 216);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(99, 17);
this.label8.TabIndex = 255;
this.label8.Text = "实时位置:";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.txtLimit2.Enabled = false;
this.txtLimit2.Location = new System.Drawing.Point(99, 188);
this.txtLimit2.Name = "txtLimit2";
this.txtLimit2.Size = new System.Drawing.Size(25, 23);
this.txtLimit2.TabIndex = 313;
//
// txtServoStatue
//
this.txtServoStatue.Enabled = false;
this.txtServoStatue.Location = new System.Drawing.Point(99, 20);
this.txtServoStatue.Name = "txtServoStatue";
this.txtServoStatue.Size = new System.Drawing.Size(25, 23);
this.txtServoStatue.TabIndex = 327;
//
// label22
//
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(19, 163);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(71, 17);
this.label22.TabIndex = 312;
this.label22.Text = "正极限信号:";
this.label22.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtLimit1
//
this.txtLimit1.Enabled = false;
this.txtLimit1.Location = new System.Drawing.Point(99, 160);
this.txtLimit1.Name = "txtLimit1";
this.txtLimit1.Size = new System.Drawing.Size(25, 23);
this.txtLimit1.TabIndex = 309;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(31, 135);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(59, 17);
this.label6.TabIndex = 300;
this.label6.Text = "原点信号:";
//
// txtHomeSingle
//
this.txtHomeSingle.Enabled = false;
this.txtHomeSingle.Location = new System.Drawing.Point(99, 132);
this.txtHomeSingle.Name = "txtHomeSingle";
this.txtHomeSingle.Size = new System.Drawing.Size(25, 23);
this.txtHomeSingle.TabIndex = 297;
//
// panel1
//
this.panel1.Controls.Add(this.linkLabel1);
this.panel1.Controls.Add(this.comjSpeed);
this.panel1.Controls.Add(this.btnComAlarmClear);
this.panel1.Controls.Add(this.btnAxisStop);
this.panel1.Controls.Add(this.btnAxisReturnHome);
this.panel1.Controls.Add(this.cmbAxis);
this.panel1.Controls.Add(this.btnDelMove);
this.panel1.Controls.Add(this.btnOpenAxis);
this.panel1.Controls.Add(this.btnCloseAxis);
this.panel1.Controls.Add(this.btnAddMove);
this.panel1.Controls.Add(this.txtASpeed);
this.panel1.Controls.Add(this.label_speed);
this.panel1.Controls.Add(this.label47);
this.panel1.Controls.Add(this.btnReadPosition);
this.panel1.Controls.Add(this.btnAxisVMove);
this.panel1.Controls.Add(this.label8);
this.panel1.Controls.Add(this.btnAxisRMove);
this.panel1.Controls.Add(this.lblCountPulse);
this.panel1.Controls.Add(this.btnAxisAMove);
this.panel1.Controls.Add(this.label49);
this.panel1.Controls.Add(this.txtAPosition);
this.panel1.Controls.Add(this.label46);
this.panel1.Controls.Add(this.label48);
this.panel1.Controls.Add(this.label45);
this.panel1.Controls.Add(this.txtAxisValue);
this.panel1.Controls.Add(this.txtAxisDeviceName);
this.panel1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.panel1.Location = new System.Drawing.Point(7, 17);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(540, 250);
this.panel1.TabIndex = 219;
//
// linkLabel1
//
this.linkLabel1.AutoSize = true;
this.linkLabel1.Location = new System.Drawing.Point(161, 163);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(32, 17);
this.linkLabel1.TabIndex = 336;
this.linkLabel1.TabStop = true;
this.linkLabel1.Text = "复制";
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
//
// 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(106, 211);
this.comjSpeed.Name = "comjSpeed";
this.comjSpeed.Size = new System.Drawing.Size(90, 28);
this.comjSpeed.TabIndex = 335;
//
// btnComAlarmClear
//
this.btnComAlarmClear.BackColor = System.Drawing.Color.White;
this.btnComAlarmClear.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnComAlarmClear.Location = new System.Drawing.Point(307, 154);
this.btnComAlarmClear.Name = "btnComAlarmClear";
this.btnComAlarmClear.Size = new System.Drawing.Size(110, 34);
this.btnComAlarmClear.TabIndex = 50;
this.btnComAlarmClear.Text = "清除报警";
this.btnComAlarmClear.UseVisualStyleBackColor = false;
this.btnComAlarmClear.Click += new System.EventHandler(this.btnComAlarmClear_Click);
//
// btnAxisStop
//
this.btnAxisStop.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.btnAxisStop.Cursor = System.Windows.Forms.Cursors.Default;
this.btnAxisStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisStop.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisStop.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnAxisStop.Location = new System.Drawing.Point(427, 78);
this.btnAxisStop.Name = "btnAxisStop";
this.btnAxisStop.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnAxisStop.Size = new System.Drawing.Size(110, 110);
this.btnAxisStop.TabIndex = 246;
this.btnAxisStop.Text = " 停止运动";
this.btnAxisStop.UseVisualStyleBackColor = false;
this.btnAxisStop.Click += new System.EventHandler(this.btnAxisStop_Click);
//
// btnAxisReturnHome
//
this.btnAxisReturnHome.BackColor = System.Drawing.Color.White;
this.btnAxisReturnHome.Cursor = System.Windows.Forms.Cursors.Default;
this.btnAxisReturnHome.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisReturnHome.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisReturnHome.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnAxisReturnHome.Location = new System.Drawing.Point(307, 116);
this.btnAxisReturnHome.Name = "btnAxisReturnHome";
this.btnAxisReturnHome.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnAxisReturnHome.Size = new System.Drawing.Size(110, 34);
this.btnAxisReturnHome.TabIndex = 247;
this.btnAxisReturnHome.Text = "原点返回";
this.btnAxisReturnHome.UseVisualStyleBackColor = false;
this.btnAxisReturnHome.Click += new System.EventHandler(this.btnAxisReturnHome_Click);
//
// cmbAxis
//
this.cmbAxis.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbAxis.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbAxis.FormattingEnabled = true;
this.cmbAxis.Location = new System.Drawing.Point(71, 6);
this.cmbAxis.Name = "cmbAxis";
this.cmbAxis.Size = new System.Drawing.Size(227, 28);
this.cmbAxis.TabIndex = 301;
this.cmbAxis.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
//
// 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(351, 203);
this.btnDelMove.Name = "btnDelMove";
this.btnDelMove.Size = new System.Drawing.Size(140, 45);
this.btnDelMove.TabIndex = 332;
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);
//
// btnOpenAxis
//
this.btnOpenAxis.BackColor = System.Drawing.SystemColors.Control;
this.btnOpenAxis.BackColor = System.Drawing.Color.White;
this.btnOpenAxis.Cursor = System.Windows.Forms.Cursors.Default;
this.btnOpenAxis.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOpenAxis.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenAxis.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnOpenAxis.Location = new System.Drawing.Point(300, 18);
this.btnOpenAxis.Location = new System.Drawing.Point(307, 2);
this.btnOpenAxis.Name = "btnOpenAxis";
this.btnOpenAxis.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnOpenAxis.Size = new System.Drawing.Size(115, 33);
this.btnOpenAxis.Size = new System.Drawing.Size(110, 34);
this.btnOpenAxis.TabIndex = 253;
this.btnOpenAxis.Text = "打开伺服";
this.btnOpenAxis.UseVisualStyleBackColor = false;
......@@ -315,495 +701,268 @@
//
// btnCloseAxis
//
this.btnCloseAxis.BackColor = System.Drawing.SystemColors.Control;
this.btnCloseAxis.BackColor = System.Drawing.Color.White;
this.btnCloseAxis.Cursor = System.Windows.Forms.Cursors.Default;
this.btnCloseAxis.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCloseAxis.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseAxis.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnCloseAxis.Location = new System.Drawing.Point(300, 56);
this.btnCloseAxis.Location = new System.Drawing.Point(427, 2);
this.btnCloseAxis.Name = "btnCloseAxis";
this.btnCloseAxis.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnCloseAxis.Size = new System.Drawing.Size(115, 33);
this.btnCloseAxis.Size = new System.Drawing.Size(110, 34);
this.btnCloseAxis.TabIndex = 252;
this.btnCloseAxis.Text = "关闭伺服";
this.btnCloseAxis.UseVisualStyleBackColor = false;
this.btnCloseAxis.Click += new System.EventHandler(this.btnCloseAxis_Click);
//
// txtP
// btnAddMove
//
this.txtP.Location = new System.Drawing.Point(245, 213);
this.txtP.Name = "txtP";
this.txtP.ReadOnly = true;
this.txtP.Size = new System.Drawing.Size(110, 23);
this.txtP.TabIndex = 38;
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(202, 203);
this.btnAddMove.Name = "btnAddMove";
this.btnAddMove.Size = new System.Drawing.Size(140, 45);
this.btnAddMove.TabIndex = 330;
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);
//
// txtASpeed
//
this.txtASpeed.AcceptsReturn = true;
this.txtASpeed.BackColor = System.Drawing.SystemColors.Window;
this.txtASpeed.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtASpeed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtASpeed.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtASpeed.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtASpeed.Location = new System.Drawing.Point(86, 133);
this.txtASpeed.Location = new System.Drawing.Point(207, 88);
this.txtASpeed.MaxLength = 12;
this.txtASpeed.Name = "txtASpeed";
this.txtASpeed.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.txtASpeed.Size = new System.Drawing.Size(87, 23);
this.txtASpeed.Size = new System.Drawing.Size(91, 26);
this.txtASpeed.TabIndex = 251;
this.txtASpeed.Text = "30";
this.txtASpeed.Text = "200";
//
// label_speed
//
this.label_speed.Location = new System.Drawing.Point(3, 217);
this.label_speed.Name = "label_speed";
this.label_speed.Size = new System.Drawing.Size(100, 17);
this.label_speed.TabIndex = 329;
this.label_speed.Text = "点动速度:";
this.label_speed.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label47
//
this.label47.AutoSize = true;
this.label47.Cursor = System.Windows.Forms.Cursors.Default;
this.label47.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label47.ForeColor = System.Drawing.SystemColors.ControlText;
this.label47.Location = new System.Drawing.Point(5, 137);
this.label47.Location = new System.Drawing.Point(142, 93);
this.label47.Name = "label47";
this.label47.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.label47.Size = new System.Drawing.Size(75, 17);
this.label47.Size = new System.Drawing.Size(59, 17);
this.label47.TabIndex = 250;
this.label47.Text = "速度:";
this.label47.Text = "目标速度:";
this.label47.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnReadPosition
//
this.btnReadPosition.BackColor = System.Drawing.Color.White;
this.btnReadPosition.Cursor = System.Windows.Forms.Cursors.Default;
this.btnReadPosition.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReadPosition.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReadPosition.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnReadPosition.Location = new System.Drawing.Point(199, 127);
this.btnReadPosition.Name = "btnReadPosition";
this.btnReadPosition.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnReadPosition.Size = new System.Drawing.Size(99, 34);
this.btnReadPosition.TabIndex = 278;
this.btnReadPosition.Text = "读取位置";
this.btnReadPosition.UseVisualStyleBackColor = false;
this.btnReadPosition.Click += new System.EventHandler(this.btnReadPosition_Click);
//
// btnAxisVMove
//
this.btnAxisVMove.BackColor = System.Drawing.SystemColors.Control;
this.btnAxisVMove.BackColor = System.Drawing.Color.White;
this.btnAxisVMove.Cursor = System.Windows.Forms.Cursors.Default;
this.btnAxisVMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisVMove.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisVMove.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnAxisVMove.Location = new System.Drawing.Point(58, 172);
this.btnAxisVMove.Location = new System.Drawing.Point(307, 78);
this.btnAxisVMove.Name = "btnAxisVMove";
this.btnAxisVMove.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnAxisVMove.Size = new System.Drawing.Size(115, 33);
this.btnAxisVMove.Size = new System.Drawing.Size(110, 34);
this.btnAxisVMove.TabIndex = 249;
this.btnAxisVMove.Text = "匀速运动";
this.btnAxisVMove.UseVisualStyleBackColor = false;
this.btnAxisVMove.Click += new System.EventHandler(this.btnAxisVMove_Click);
//
// label8
//
this.label8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.Location = new System.Drawing.Point(6, 136);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(84, 17);
this.label8.TabIndex = 255;
this.label8.Text = "实时位置:";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnAxisRMove
//
this.btnAxisRMove.BackColor = System.Drawing.SystemColors.Control;
this.btnAxisRMove.BackColor = System.Drawing.Color.White;
this.btnAxisRMove.Cursor = System.Windows.Forms.Cursors.Default;
this.btnAxisRMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisRMove.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisRMove.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnAxisRMove.Location = new System.Drawing.Point(179, 133);
this.btnAxisRMove.Location = new System.Drawing.Point(427, 39);
this.btnAxisRMove.Name = "btnAxisRMove";
this.btnAxisRMove.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnAxisRMove.Size = new System.Drawing.Size(115, 33);
this.btnAxisRMove.Size = new System.Drawing.Size(110, 34);
this.btnAxisRMove.TabIndex = 248;
this.btnAxisRMove.Text = "相对运动";
this.btnAxisRMove.UseVisualStyleBackColor = false;
this.btnAxisRMove.Click += new System.EventHandler(this.btnAxisRMove_Click);
//
// btnAxisReturnHome
// lblCountPulse
//
this.btnAxisReturnHome.BackColor = System.Drawing.SystemColors.Control;
this.btnAxisReturnHome.Cursor = System.Windows.Forms.Cursors.Default;
this.btnAxisReturnHome.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisReturnHome.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisReturnHome.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnAxisReturnHome.Location = new System.Drawing.Point(179, 172);
this.btnAxisReturnHome.Name = "btnAxisReturnHome";
this.btnAxisReturnHome.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnAxisReturnHome.Size = new System.Drawing.Size(115, 33);
this.btnAxisReturnHome.TabIndex = 247;
this.btnAxisReturnHome.Text = "原点返回";
this.btnAxisReturnHome.UseVisualStyleBackColor = false;
this.btnAxisReturnHome.Click += new System.EventHandler(this.btnAxisReturnHome_Click);
this.lblCountPulse.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblCountPulse.Location = new System.Drawing.Point(94, 131);
this.lblCountPulse.Name = "lblCountPulse";
this.lblCountPulse.ReadOnly = true;
this.lblCountPulse.Size = new System.Drawing.Size(99, 26);
this.lblCountPulse.TabIndex = 38;
//
// btnAxisAMove
//
this.btnAxisAMove.BackColor = System.Drawing.SystemColors.Control;
this.btnAxisAMove.BackColor = System.Drawing.Color.White;
this.btnAxisAMove.Cursor = System.Windows.Forms.Cursors.Default;
this.btnAxisAMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisAMove.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisAMove.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnAxisAMove.Location = new System.Drawing.Point(179, 95);
this.btnAxisAMove.Location = new System.Drawing.Point(307, 40);
this.btnAxisAMove.Name = "btnAxisAMove";
this.btnAxisAMove.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnAxisAMove.Size = new System.Drawing.Size(115, 33);
this.btnAxisAMove.Size = new System.Drawing.Size(110, 34);
this.btnAxisAMove.TabIndex = 245;
this.btnAxisAMove.Text = "绝对运动";
this.btnAxisAMove.UseVisualStyleBackColor = false;
this.btnAxisAMove.Click += new System.EventHandler(this.btnAxisAMove_Click);
//
// btnComAlarmClear
// label49
//
this.btnComAlarmClear.BackColor = System.Drawing.SystemColors.Control;
this.btnComAlarmClear.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnComAlarmClear.Location = new System.Drawing.Point(284, 321);
this.btnComAlarmClear.Name = "btnComAlarmClear";
this.btnComAlarmClear.Size = new System.Drawing.Size(115, 33);
this.btnComAlarmClear.TabIndex = 50;
this.btnComAlarmClear.Text = "清除报警";
this.btnComAlarmClear.UseVisualStyleBackColor = false;
this.btnComAlarmClear.Click += new System.EventHandler(this.btnComAlarmClear_Click);
this.label49.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label49.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label49.Location = new System.Drawing.Point(5, 11);
this.label49.Name = "label49";
this.label49.Size = new System.Drawing.Size(58, 23);
this.label49.TabIndex = 233;
this.label49.Text = "AC伺服:";
this.label49.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtAPosition
//
this.txtAPosition.BackColor = System.Drawing.SystemColors.Window;
this.txtAPosition.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtAPosition.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAPosition.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAPosition.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtAPosition.Location = new System.Drawing.Point(86, 99);
this.txtAPosition.Location = new System.Drawing.Point(207, 48);
this.txtAPosition.MaxLength = 12;
this.txtAPosition.Name = "txtAPosition";
this.txtAPosition.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.txtAPosition.Size = new System.Drawing.Size(87, 23);
this.txtAPosition.Size = new System.Drawing.Size(91, 26);
this.txtAPosition.TabIndex = 244;
this.txtAPosition.Text = "3000";
//
// label46
//
this.label46.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label46.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label46.Location = new System.Drawing.Point(5, 93);
this.label46.Name = "label46";
this.label46.Size = new System.Drawing.Size(58, 17);
this.label46.TabIndex = 239;
this.label46.Text = "地址:";
this.label46.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label48
//
this.label48.AutoSize = true;
this.label48.Cursor = System.Windows.Forms.Cursors.Default;
this.label48.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label48.ForeColor = System.Drawing.SystemColors.ControlText;
this.label48.Location = new System.Drawing.Point(5, 102);
this.label48.Location = new System.Drawing.Point(142, 53);
this.label48.Name = "label48";
this.label48.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.label48.Size = new System.Drawing.Size(75, 17);
this.label48.Size = new System.Drawing.Size(59, 17);
this.label48.TabIndex = 243;
this.label48.Text = "位置:";
this.label48.Text = "目标位置:";
this.label48.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnAxisStop
// label45
//
this.btnAxisStop.BackColor = System.Drawing.SystemColors.Control;
this.btnAxisStop.Cursor = System.Windows.Forms.Cursors.Default;
this.btnAxisStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisStop.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnAxisStop.Location = new System.Drawing.Point(300, 95);
this.btnAxisStop.Name = "btnAxisStop";
this.btnAxisStop.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnAxisStop.Size = new System.Drawing.Size(115, 110);
this.btnAxisStop.TabIndex = 246;
this.btnAxisStop.Text = " 停止运动";
this.btnAxisStop.UseVisualStyleBackColor = false;
this.btnAxisStop.Click += new System.EventHandler(this.btnAxisStop_Click);
this.label45.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label45.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label45.Location = new System.Drawing.Point(5, 53);
this.label45.Name = "label45";
this.label45.Size = new System.Drawing.Size(58, 17);
this.label45.TabIndex = 240;
this.label45.Text = "端口号:";
this.label45.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtAxisValue
//
this.txtAxisValue.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAxisValue.Location = new System.Drawing.Point(227, 59);
this.txtAxisValue.Location = new System.Drawing.Point(71, 88);
this.txtAxisValue.MaxLength = 10;
this.txtAxisValue.Name = "txtAxisValue";
this.txtAxisValue.ReadOnly = true;
this.txtAxisValue.Size = new System.Drawing.Size(58, 26);
this.txtAxisValue.Size = new System.Drawing.Size(50, 26);
this.txtAxisValue.TabIndex = 242;
this.txtAxisValue.Text = "0";
//
// txtAxisDeviceName
//
this.txtAxisDeviceName.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAxisDeviceName.Location = new System.Drawing.Point(83, 59);
this.txtAxisDeviceName.Location = new System.Drawing.Point(71, 48);
this.txtAxisDeviceName.MaxLength = 10;
this.txtAxisDeviceName.Name = "txtAxisDeviceName";
this.txtAxisDeviceName.ReadOnly = true;
this.txtAxisDeviceName.Size = new System.Drawing.Size(58, 26);
this.txtAxisDeviceName.Size = new System.Drawing.Size(50, 26);
this.txtAxisDeviceName.TabIndex = 241;
this.txtAxisDeviceName.Text = "0";
//
// label45
//
this.label45.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label45.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label45.Location = new System.Drawing.Point(5, 64);
this.label45.Name = "label45";
this.label45.Size = new System.Drawing.Size(75, 17);
this.label45.TabIndex = 240;
this.label45.Text = "端口号:";
this.label45.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label46
//
this.label46.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label46.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label46.Location = new System.Drawing.Point(149, 64);
this.label46.Name = "label46";
this.label46.Size = new System.Drawing.Size(75, 17);
this.label46.TabIndex = 239;
this.label46.Text = "地址:";
this.label46.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// comboBox1
//
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.comboBox1.FormattingEnabled = true;
this.comboBox1.ItemHeight = 17;
this.comboBox1.Location = new System.Drawing.Point(8, 23);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(277, 25);
this.comboBox1.TabIndex = 234;
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.axis_4_Alarm);
this.groupBox1.Controls.Add(this.txt4Target);
this.groupBox1.Controls.Add(this.lblTargetP4);
this.groupBox1.Controls.Add(this.lblActual4);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.axis_1_Alarm);
this.groupBox1.Controls.Add(this.axis_3_Alarm);
this.groupBox1.Controls.Add(this.axis_2_Alarm);
this.groupBox1.Controls.Add(this.label38);
this.groupBox1.Controls.Add(this.txtMiddleTarget);
this.groupBox1.Controls.Add(this.txtInoutTarget);
this.groupBox1.Controls.Add(this.txtUpdownTarget);
this.groupBox1.Controls.Add(this.label12);
this.groupBox1.Controls.Add(this.lblTargetP1);
this.groupBox1.Controls.Add(this.lblActual1);
this.groupBox1.Controls.Add(this.lblTargetP3);
this.groupBox1.Controls.Add(this.lblActual3);
this.groupBox1.Controls.Add(this.lblTargetP2);
this.groupBox1.Controls.Add(this.lblActual2);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.label43);
this.groupBox1.Controls.Add(this.label42);
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(4, 369);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(417, 203);
this.groupBox1.TabIndex = 218;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "伺服状态";
this.groupBox1.Visible = false;
//
// axis_4_Alarm
//
this.axis_4_Alarm.IOName = "";
this.axis_4_Alarm.IOValue = 0;
this.axis_4_Alarm.isCanClick = false;
this.axis_4_Alarm.Location = new System.Drawing.Point(453, 64);
this.axis_4_Alarm.Name = "axis_4_Alarm";
this.axis_4_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_4_Alarm.TabIndex = 271;
//
// txt4Target
//
this.txt4Target.Location = new System.Drawing.Point(430, 168);
this.txt4Target.Name = "txt4Target";
this.txt4Target.ReadOnly = true;
this.txt4Target.Size = new System.Drawing.Size(87, 23);
this.txt4Target.TabIndex = 270;
//
// lblTargetP4
//
this.lblTargetP4.Location = new System.Drawing.Point(430, 140);
this.lblTargetP4.Name = "lblTargetP4";
this.lblTargetP4.ReadOnly = true;
this.lblTargetP4.Size = new System.Drawing.Size(87, 23);
this.lblTargetP4.TabIndex = 269;
//
// lblActual4
//
this.lblActual4.Location = new System.Drawing.Point(430, 112);
this.lblActual4.Name = "lblActual4";
this.lblActual4.ReadOnly = true;
this.lblActual4.Size = new System.Drawing.Size(87, 23);
this.lblActual4.TabIndex = 268;
//
// label1
//
this.label1.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label1.Location = new System.Drawing.Point(427, 11);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(96, 49);
this.label1.TabIndex = 267;
this.label1.Text = "轴四:压紧轴";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// axis_1_Alarm
//
this.axis_1_Alarm.IOName = "";
this.axis_1_Alarm.IOValue = 0;
this.axis_1_Alarm.isCanClick = false;
this.axis_1_Alarm.Location = new System.Drawing.Point(148, 65);
this.axis_1_Alarm.Name = "axis_1_Alarm";
this.axis_1_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_1_Alarm.TabIndex = 264;
//
// axis_3_Alarm
//
this.axis_3_Alarm.IOName = "";
this.axis_3_Alarm.IOValue = 0;
this.axis_3_Alarm.isCanClick = false;
this.axis_3_Alarm.Location = new System.Drawing.Point(350, 65);
this.axis_3_Alarm.Name = "axis_3_Alarm";
this.axis_3_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_3_Alarm.TabIndex = 266;
//
// axis_2_Alarm
//
this.axis_2_Alarm.IOName = "";
this.axis_2_Alarm.IOValue = 0;
this.axis_2_Alarm.isCanClick = false;
this.axis_2_Alarm.Location = new System.Drawing.Point(245, 65);
this.axis_2_Alarm.Name = "axis_2_Alarm";
this.axis_2_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_2_Alarm.TabIndex = 265;
//
// label38
//
this.label38.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label38.Location = new System.Drawing.Point(7, 67);
this.label38.Name = "label38";
this.label38.Size = new System.Drawing.Size(116, 17);
this.label38.TabIndex = 263;
this.label38.Text = "ALM:";
this.label38.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtMiddleTarget
//
this.txtMiddleTarget.Location = new System.Drawing.Point(126, 169);
this.txtMiddleTarget.Name = "txtMiddleTarget";
this.txtMiddleTarget.ReadOnly = true;
this.txtMiddleTarget.Size = new System.Drawing.Size(87, 23);
this.txtMiddleTarget.TabIndex = 262;
//
// txtInoutTarget
//
this.txtInoutTarget.Location = new System.Drawing.Point(327, 169);
this.txtInoutTarget.Name = "txtInoutTarget";
this.txtInoutTarget.ReadOnly = true;
this.txtInoutTarget.Size = new System.Drawing.Size(87, 23);
this.txtInoutTarget.TabIndex = 260;
//
// txtUpdownTarget
//
this.txtUpdownTarget.Location = new System.Drawing.Point(227, 169);
this.txtUpdownTarget.Name = "txtUpdownTarget";
this.txtUpdownTarget.ReadOnly = true;
this.txtUpdownTarget.Size = new System.Drawing.Size(87, 23);
this.txtUpdownTarget.TabIndex = 259;
//
// label12
//
this.label12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label12.Location = new System.Drawing.Point(7, 172);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(116, 17);
this.label12.TabIndex = 258;
this.label12.Text = "出入库目标值:";
this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lblTargetP1
//
this.lblTargetP1.Location = new System.Drawing.Point(126, 141);
this.lblTargetP1.Name = "lblTargetP1";
this.lblTargetP1.ReadOnly = true;
this.lblTargetP1.Size = new System.Drawing.Size(87, 23);
this.lblTargetP1.TabIndex = 257;
//
// lblActual1
//
this.lblActual1.Location = new System.Drawing.Point(126, 113);
this.lblActual1.Name = "lblActual1";
this.lblActual1.ReadOnly = true;
this.lblActual1.Size = new System.Drawing.Size(87, 23);
this.lblActual1.TabIndex = 256;
//
// lblTargetP3
//
this.lblTargetP3.Location = new System.Drawing.Point(327, 141);
this.lblTargetP3.Name = "lblTargetP3";
this.lblTargetP3.ReadOnly = true;
this.lblTargetP3.Size = new System.Drawing.Size(87, 23);
this.lblTargetP3.TabIndex = 178;
//
// lblActual3
//
this.lblActual3.Location = new System.Drawing.Point(327, 113);
this.lblActual3.Name = "lblActual3";
this.lblActual3.ReadOnly = true;
this.lblActual3.Size = new System.Drawing.Size(87, 23);
this.lblActual3.TabIndex = 177;
//
// lblTargetP2
//
this.lblTargetP2.Location = new System.Drawing.Point(228, 141);
this.lblTargetP2.Name = "lblTargetP2";
this.lblTargetP2.ReadOnly = true;
this.lblTargetP2.Size = new System.Drawing.Size(87, 23);
this.lblTargetP2.TabIndex = 176;
//
// lblActual2
//
this.lblActual2.Location = new System.Drawing.Point(227, 113);
this.lblActual2.Name = "lblActual2";
this.lblActual2.ReadOnly = true;
this.lblActual2.Size = new System.Drawing.Size(87, 23);
this.lblActual2.TabIndex = 175;
//
// label4
//
this.label4.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label4.Location = new System.Drawing.Point(327, 12);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(96, 49);
this.label4.TabIndex = 100;
this.label4.Text = "轴三:进出轴";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// lblServerOn
//
// label3
//
this.label3.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label3.Location = new System.Drawing.Point(227, 12);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(96, 49);
this.label3.TabIndex = 99;
this.label3.Text = "轴二:上下轴";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.lblServerOn.AutoSize = true;
this.lblServerOn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.lblServerOn.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblServerOn.ForeColor = System.Drawing.Color.Red;
this.lblServerOn.Location = new System.Drawing.Point(32, 115);
this.lblServerOn.Name = "lblServerOn";
this.lblServerOn.Size = new System.Drawing.Size(0, 19);
this.lblServerOn.TabIndex = 268;
//
// label5
// timer1
//
this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label5.Location = new System.Drawing.Point(127, 12);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(96, 49);
this.label5.TabIndex = 97;
this.label5.Text = "轴一:旋转轴";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label43
//
this.label43.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label43.Location = new System.Drawing.Point(7, 115);
this.label43.Name = "label43";
this.label43.Size = new System.Drawing.Size(116, 17);
this.label43.TabIndex = 23;
this.label43.Text = "输出脉冲值:";
this.label43.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label42
//
this.label42.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label42.Location = new System.Drawing.Point(7, 142);
this.label42.Name = "label42";
this.label42.Size = new System.Drawing.Size(116, 17);
this.label42.TabIndex = 24;
this.label42.Text = "编码器计数:";
this.label42.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// AxisMoveControl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.groupAxis);
this.Controls.Add(this.groupBox1);
this.Name = "AxisMoveControl";
this.Size = new System.Drawing.Size(432, 623);
this.Size = new System.Drawing.Size(699, 402);
this.groupAxis.ResumeLayout(false);
this.groupAxis.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
}
......@@ -811,65 +970,75 @@
#endregion
private System.Windows.Forms.GroupBox groupAxis;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox txtServoStatue;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.TextBox txtLimit2;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.TextBox txtLimit1;
private System.Windows.Forms.ComboBox cmbAxis;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtHomeSingle;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox txtHomeStatus;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox txtBusyStatus;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtAlarmStatus;
private System.Windows.Forms.Button btnGetAlarm;
public System.Windows.Forms.Button btnReadPosition;
internal System.Windows.Forms.Button btnReadPosition;
private System.Windows.Forms.Label lblServerOn;
private System.Windows.Forms.Label label8;
public System.Windows.Forms.Button btnOpenAxis;
public System.Windows.Forms.Button btnCloseAxis;
private System.Windows.Forms.TextBox txtP;
public System.Windows.Forms.TextBox txtASpeed;
public System.Windows.Forms.Label label47;
public System.Windows.Forms.Button btnAxisVMove;
public System.Windows.Forms.Button btnAxisRMove;
public System.Windows.Forms.Button btnAxisReturnHome;
public System.Windows.Forms.Button btnAxisAMove;
internal System.Windows.Forms.Button btnOpenAxis;
internal System.Windows.Forms.Button btnCloseAxis;
private System.Windows.Forms.TextBox lblCountPulse;
internal System.Windows.Forms.TextBox txtASpeed;
internal System.Windows.Forms.Label label47;
internal System.Windows.Forms.Button btnAxisVMove;
internal System.Windows.Forms.Button btnAxisRMove;
internal System.Windows.Forms.Button btnAxisReturnHome;
internal System.Windows.Forms.Button btnAxisAMove;
private System.Windows.Forms.Button btnComAlarmClear;
public System.Windows.Forms.TextBox txtAPosition;
public System.Windows.Forms.Label label48;
public System.Windows.Forms.Button btnAxisStop;
internal System.Windows.Forms.TextBox txtAPosition;
internal System.Windows.Forms.Label label48;
internal System.Windows.Forms.Button btnAxisStop;
private System.Windows.Forms.TextBox txtAxisValue;
private System.Windows.Forms.TextBox txtAxisDeviceName;
private System.Windows.Forms.Label label45;
private System.Windows.Forms.Label label46;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.Label label49;
private System.Windows.Forms.Label label24;
private System.Windows.Forms.TextBox txtLimit2;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.TextBox txtLimit1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtServoStatue;
private System.Windows.Forms.Button btnDelMove;
private System.Windows.Forms.Button btnAddMove;
private System.Windows.Forms.Label label_speed;
private System.Windows.Forms.GroupBox groupBox1;
private UserFromControl.IOStatusControl axis_4_Alarm;
private System.Windows.Forms.TextBox txt4Target;
private System.Windows.Forms.TextBox lblTargetP4;
private System.Windows.Forms.TextBox lblActual4;
private System.Windows.Forms.Label label1;
private UserFromControl.IOStatusControl axis_1_Alarm;
private UserFromControl.IOStatusControl axis_3_Alarm;
private UserFromControl.IOStatusControl axis_2_Alarm;
private System.Windows.Forms.Label label38;
private System.Windows.Forms.TextBox txtMiddleTarget;
private System.Windows.Forms.TextBox txtInoutTarget;
private System.Windows.Forms.TextBox txtUpdownTarget;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox lblTargetP1;
private System.Windows.Forms.TextBox lblActual1;
private System.Windows.Forms.TextBox lblTargetP3;
private System.Windows.Forms.TextBox lblActual3;
private System.Windows.Forms.TextBox lblTargetP2;
private System.Windows.Forms.TextBox lblActual2;
private System.Windows.Forms.ComboBox comjSpeed;
private System.Windows.Forms.LinkLabel linkLabel1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label43;
private System.Windows.Forms.Label label42;
private System.Windows.Forms.Label lblhomeSts;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label lblAxEncAcc;
private System.Windows.Forms.Label lblINP;
private System.Windows.Forms.Label lblBUSY;
private System.Windows.Forms.Label lblNEL;
private System.Windows.Forms.Label lblORG;
private System.Windows.Forms.Label lblPEL;
private System.Windows.Forms.Label lblSvOn;
private System.Windows.Forms.Label lblEMG;
private System.Windows.Forms.Label lblWARN;
private System.Windows.Forms.Label lblALM;
private System.Windows.Forms.Label label53;
private System.Windows.Forms.Label label56;
private System.Windows.Forms.Label label55;
private System.Windows.Forms.Label label52;
private System.Windows.Forms.Label lblAxEncVel;
private System.Windows.Forms.Label lblAxPrfVel;
private System.Windows.Forms.Label lblAxEncPos;
private System.Windows.Forms.Label lblAxPrfPos;
private System.Windows.Forms.Label lblAxisPrfMode;
private System.Windows.Forms.Label label50;
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.Label lblAlarmcode;
}
}
......@@ -11,247 +11,415 @@ using OnlineStore.DeviceLibrary;
using OnlineStore.Common;
using System.Threading;
using OnlineStore.LoadCSVLibrary;
using UserFromControl;
using HuichuanLibrary;
namespace OnlineStore.ACPackingStore
namespace OnlineStore.DUOStore
{
using AxisManager = ACServerManager;
public partial class AxisMoveControl : UserControl
{
public bool IsHuiChuan = true;
private List<ConfigMoveAxis> axisList = new List<ConfigMoveAxis>();
private AC_SA_BoxBean BoxBean= null;
private AC_SA_BoxBean boxBean = null;
private string PortName = "";
private int SlvAddr = 0;
private short SlvAddr = 0;
public AxisMoveControl( )
public AxisMoveControl()
{
InitializeComponent();
}
public void LoadData(AC_SA_BoxBean boxBean, params ConfigMoveAxis[] moveAxis)
public void LoadData(AC_SA_BoxBean equipBase, bool isHc = true)
{
this.BoxBean = boxBean;
axisList = new List<ConfigMoveAxis>(moveAxis);
this.boxBean = equipBase;
axisList = new List<ConfigMoveAxis>(equipBase.moveAxisList);
if (axisList.Count > 0)
{
comboBox1.Items.Clear();
cmbAxis.Items.Clear();
foreach (ConfigMoveAxis a in axisList)
{
comboBox1.Items.Add(a.DisplayStr);
cmbAxis.Items.Add(a.Explain);
}
comboBox1.SelectedIndex = 0;
cmbAxis.SelectedIndex = 0;
PortName = moveAxis[0].DeviceName;
SlvAddr = moveAxis[0].GetAxisValue();
PortName = axisList[0].DeviceName;
SlvAddr = axisList[0].GetAxisValue();
txtAxisDeviceName.Text = PortName;
txtAxisValue.Text = SlvAddr.ToString();
}
btnAddMove.BackColor = Color.White;
btnDelMove.BackColor = Color.White;
this.IsHuiChuan = isHc;
if (IsHuiChuan)
{
groupBox1.Visible = false;
groupBox2.Visible = true;
timer1.Start();
}
private void btnOpenAxis_Click(object sender, EventArgs e)
else
{
LogUtil.info("点击【打开伺服】,端口号【" + PortName + "】地址【" + SlvAddr + "】 ");
ACServerManager.OpenPort(PortName);
ACServerManager.AlarmClear(PortName, SlvAddr);
Thread.Sleep(100);
ACServerManager.ServoOn(PortName, SlvAddr);
groupBox1.Visible = true;
groupBox2.Visible = false;
}
}
private void btnCloseAxis_Click(object sender, EventArgs e)
private bool CanMove()
{
LogUtil.info("点击【关闭伺服】,端口号【" + PortName + "】地址【" + SlvAddr + "】 ");
ACServerManager.ServoOff(PortName, SlvAddr);
if (axis == null)
{
MessageBox.Show("请先选择运动轴", "警告 ", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
/// <summary>
/// 判断进出轴是否在P1点
/// </summary>
private bool InOutIsIsP1()
//如果是取料升降轴,取料旋转轴,如果进出轴不在待机点,不能运动
if (boxBean.Config!=null && (boxBean.Config.UpDown_Axis.IsSameAxis(PortName, SlvAddr)
|| (boxBean.Config.Middle_Axis.IsSameAxis(PortName, SlvAddr))))
{
int InOutDefaultPosition = ConfigAppSettings.GetIntValue(Setting_Init.InOutDefaultPosition);
int currValue = ACServerManager.GetActualtPosition(BoxBean.Config.InOut_Axis.DeviceName, BoxBean.Config.InOut_Axis.GetAxisValue());
int currValue =AxisManager.GetActualtPosition( boxBean.Config.InOut_Axis.DeviceName,boxBean.Config.InOut_Axis.GetAxisValue());
if (currValue <= InOutDefaultPosition)
{
return true;
}
// MyMessage.Show("叉子不在待机位,请先将叉子退回待机位(" + InOutDefaultPosition + ")", "警告(叉子在待机位时,才能移动升降轴和旋转轴) ", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
MessageBox.Show(ResourceCulture.GetString("叉子不在待机位,请先将叉子退回待机位") + "(" + InOutDefaultPosition + ")!",
ResourceCulture.GetString("警告(叉子在待机位时,才能移动升降轴和旋转轴)"), MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
MessageBox.Show("叉子不在待机位,请先将叉子退回待机位(" + InOutDefaultPosition + ")", "警告(叉子在待机位时,才能移动升降轴和旋转轴) ", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
private void btnAxisAMove_Click(object sender, EventArgs e)
{
int position = FormUtil.GetIntValue(txtAPosition);
int speed = FormUtil.GetIntValue(txtASpeed);
if (BoxBean.Config.Middle_Axis.IsSameAxis(PortName, SlvAddr) || BoxBean.Config.UpDown_Axis.IsSameAxis(PortName, SlvAddr))
{
if (!InOutIsIsP1())
else
{
return;
return true;
}
}
LogUtil.info("点击【绝对运动】,端口号【" + PortName + "】地址【" + SlvAddr + "】位置【" + position + "】速度【" + speed + "】");
ACServerManager.AbsMove(PortName, SlvAddr, position, speed);
private void btnOpenAxis_Click(object sender, EventArgs e)
{
LogUtil.info(boxBean.Name+"点击【打开伺服】,【" + PortName + "_" + SlvAddr + "】 ");
AxisManager.ServoOn(PortName, SlvAddr);
}
private void btnCloseAxis_Click(object sender, EventArgs e)
{
LogUtil.info(boxBean.Name+"点击【关闭伺服】,【" + PortName + "_" + SlvAddr + "】 ");
AxisManager.ServoOff(PortName, SlvAddr);
}
private void btnAxisRMove_Click(object sender, EventArgs e)
private void btnAxisAMove_Click(object sender, EventArgs e)
{
if (!CanMove())
{
return;
}
int position = FormUtil.GetIntValue(txtAPosition);
int speed = FormUtil.GetIntValue(txtASpeed);
if (BoxBean.Config.Middle_Axis.IsSameAxis(PortName, SlvAddr) || BoxBean.Config.UpDown_Axis.IsSameAxis(PortName, SlvAddr))
LogUtil.info(boxBean.Name+"点击【绝对运动】,【" + PortName + "_" + SlvAddr + "】位置【" + position + "】速度【" + speed + "】");
AxisManager.AbsMove(PortName, SlvAddr, position, speed, speed*4, speed * 4);
}
private void btnAxisRMove_Click(object sender, EventArgs e)
{
if (!InOutIsIsP1())
if (!CanMove())
{
return;
}
}
LogUtil.info("点击【相对运动】,端口号【" + PortName + "】地址【" + SlvAddr + "】位置【" + position + "】速度【" + speed + "】");
ACServerManager.RelMove(PortName, SlvAddr, position, speed);
int position = FormUtil.GetIntValue(txtAPosition);
int speed = FormUtil.GetIntValue(txtASpeed);
LogUtil.info(boxBean.Name+"点击【相对运动】,【" + PortName + "_" + SlvAddr + "】位置【" + position + "】速度【" + speed + "】");
AxisManager.RelMove(PortName, SlvAddr, position, speed, speed*4, speed*4);
}
private void btnAxisVMove_Click(object sender, EventArgs e)
{
int speed = FormUtil.GetIntValue(txtASpeed);
if (BoxBean.Config.Middle_Axis.IsSameAxis(PortName, SlvAddr) || BoxBean.Config.UpDown_Axis.IsSameAxis(PortName, SlvAddr))
{
if (!InOutIsIsP1())
if (!CanMove())
{
return;
}
}
LogUtil.info("点击【匀速运动】,端口号【" + PortName + "】地址【" + SlvAddr + "】 速度【" + speed + "】");
ACServerManager.SpeedMove(PortName, SlvAddr, speed);
}
int speed = FormUtil.GetIntValue(txtASpeed);
LogUtil.info(boxBean.Name+"点击【匀速运动】,【" + PortName + "_" + SlvAddr + "】 速度【" + speed + "】");
AxisManager.SpeedMove(PortName, SlvAddr, speed);
}
private void btnAxisStop_Click(object sender, EventArgs e)
{
LogUtil.info("点击【停止运动】,端口号【" + PortName + "】地址【" + SlvAddr + "】 ");
ACServerManager.SuddenStop(PortName, SlvAddr);
LogUtil.info(boxBean.Name+"点击【停止运动】,【" + PortName + "_" + SlvAddr + "】 ");
AxisManager.SuddenStop(PortName, SlvAddr);
if (btnAddMove.BackColor == Color.Green)
{
btnAddMove.BackColor = System.Drawing.SystemColors.Control;
}
if (btnDelMove.BackColor == Color.Green)
{
btnDelMove.BackColor = System.Drawing.SystemColors.Control;
}
btnReadPosition_Click(null, null);
}
private void btnComAlarmClear_Click(object sender, EventArgs e)
{
LogUtil.info("点击【清理报警】,端口号【" + PortName + "】地址【" + SlvAddr + "】 ");
ACServerManager.AlarmClear(PortName, SlvAddr);
LogUtil.info(boxBean.Name+"点击【清理报警】,【" + PortName + "_" + SlvAddr + "】 ");
AxisManager.AlarmClear(PortName, SlvAddr);
Thread.Sleep(100);
ACServerManager.ServoOn(PortName, SlvAddr);
AxisManager.ServoOn(PortName, SlvAddr);
}
private void btnAxisReturnHome_Click(object sender, EventArgs e)
{
int speed = FormUtil.GetIntValue(txtASpeed);
if (BoxBean.Config.Middle_Axis.IsSameAxis(PortName, SlvAddr) || BoxBean.Config.UpDown_Axis.IsSameAxis(PortName, SlvAddr))
{
if (!InOutIsIsP1())
if (!CanMove())
{
return;
}
//int speed = FormUtil.GetIntValue(txtASpeed);
foreach(ConfigMoveAxis a in axisList)
{
if (a.IsSameAxis(PortName, SlvAddr))
{
LogUtil.info(boxBean.Name+"点击【原点返回】,【" + PortName + "_" + SlvAddr + "】 速度【" + a.HomeHighSpeed + "】");
AxisManager.HomeMove(PortName, SlvAddr, a.HomeHighSpeed,a.HomeLowSpeed,a.HomeAddSpeed);
}
}
LogUtil.info("点击【原点返回】,端口号【" + PortName + "】地址【" + SlvAddr + "】 速度【" + speed + "】");
ACServerManager.HomeMove(PortName, SlvAddr, speed);
}
private void btnGetAlarm_Click(object sender, EventArgs e)
{
string PortName = txtAxisDeviceName.Text;
short SlvAddr = FormUtil.GetShortValue(txtAxisValue);
txtServoStatue.Text = ACServerManager.ServerOnStatus(PortName, SlvAddr) ? "✔" : "✘";
this.txtAlarmStatus.Text = ACServerManager.GetAlarmStatus(PortName, SlvAddr).ToString();
this.txtBusyStatus.Text = ACServerManager.GetBusyStatus(PortName, SlvAddr).ToString();
this.txtHomeStatus.Text = ACServerManager.GetHomeEndStatus(PortName, SlvAddr).ToString();
this.txtHomeSingle.Text = ACServerManager.GetHomeSingle(PortName, SlvAddr).ToString();
this.txtLimit1.Text = ACServerManager.GetLimitPositiveSingle(PortName, SlvAddr).ToString();
this.txtLimit2.Text = ACServerManager.GetLimitNegativeSingle(PortName, SlvAddr).ToString();
this.txtAlarmStatus.Text = AxisManager.GetAlarmStatus(PortName, SlvAddr).ToString();
this.txtBusyStatus.Text = AxisManager.GetBusyStatus(PortName, SlvAddr).ToString();
//this.txtStb.Text = AxisManager.instance.GetSTBState(PortName, SlvAddr).ToString();
this.txtHomeStatus.Text = AxisManager.GetHomeEndStatus(PortName, SlvAddr).ToString();
this.txtHomeSingle.Text = AxisManager.GetHomeSingle(PortName, SlvAddr).ToString();
this.txtLimit1.Text = AxisManager.GetLimitPositiveSingle(PortName, SlvAddr).ToString();
this.txtLimit2.Text = AxisManager.GetLimitNegativeSingle(PortName, SlvAddr).ToString();
txtServoStatue.Text = AxisManager.ServerOnStatus(PortName, SlvAddr) ? "✔" : "✘";
}
private void btnReadPosition_Click(object sender, EventArgs e)
{
ReadPosistion();
lblCountPulse.Text = AxisManager.GetActualtPosition(PortName, SlvAddr).ToString();
}
private void ReadPosistion()
private ConfigMoveAxis axis = null;
private List<Color> colorsList = new List<Color>();
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (cmbAxis.SelectedIndex >= 0)
{
axis = axisList[cmbAxis.SelectedIndex];
PortName = axis.DeviceName;
SlvAddr = axis.GetAxisValue();
txtAxisDeviceName.Text = PortName;
txtAxisValue.Text = SlvAddr.ToString();
Color color = Color.Black;
//判断私服是否打开、
if (ACServerManager.ServerOnStatus(PortName, SlvAddr))
int targetSpeed = axis.TargetSpeed;
comjSpeed.Items.Clear();
for (int i = 1; i <= 10; i++)
{
txtServoStatue.Text = "✔";
comjSpeed.Items.Add(targetSpeed * i / 10);
}
else
comjSpeed.SelectedIndex = 4;
//btnAddMove.Text = "点动+ ";
//btnDelMove.Text = "点动- ";
txtASpeed.Text = targetSpeed.ToString();
int SelIndex = cmbAxis.SelectedIndex;
if (colorsList.Count <= 0)
{
txtServoStatue.Text = "✘";
colorsList.Add(Color.Blue);
colorsList.Add(Color.Red);
colorsList.Add(Color.Green);
colorsList.Add(System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(192))))));
colorsList.Add(System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))));
colorsList.Add(Color.BlueViolet);
colorsList.Add(Color.Firebrick);
}
if (groupBox1.Visible)
color = colorsList[SelIndex];
btnOpenAxis.ForeColor = color;
btnCloseAxis.ForeColor = color;
btnAxisAMove.ForeColor = color;
btnAxisRMove.ForeColor = color;
btnAxisVMove.ForeColor = color;
btnAxisReturnHome.ForeColor = color;
btnAxisStop.ForeColor = color;
btnComAlarmClear.ForeColor = color;
btnReadPosition.ForeColor = color;
btnGetAlarm.ForeColor = color;
btnAddMove.ForeColor = color;
btnDelMove.ForeColor = color;
this.txtAlarmStatus.Text = "";
this.txtBusyStatus.Text = "";
this.txtHomeStatus.Text = "";
this.txtHomeSingle.Text = "";
this.txtLimit1.Text = "";
this.txtLimit2.Text = "";
txtServoStatue.Text = "";
}
}
private void AxisMove(int speed)
{
ReadA(BoxBean.Config.Middle_Axis, lblActual1, lblTargetP1, txtMiddleTarget, axis_1_Alarm);
ReadA(BoxBean.Config.UpDown_Axis, lblActual2, lblTargetP2, txtUpdownTarget, axis_2_Alarm);
ReadA(BoxBean.Config.InOut_Axis, lblActual3, lblTargetP3, txtInoutTarget, axis_3_Alarm);
ReadA(BoxBean.Config.Comp_Axis, lblActual4, lblTargetP4, txt4Target, axis_4_Alarm);
LogUtil.info(boxBean.Name+"【" + PortName + "_" + SlvAddr + "】点动: 速度:" + speed);
AxisManager.SpeedMove(PortName, SlvAddr, speed);
}
private void btnAddMove_MouseDown(object sender, MouseEventArgs e)
{
if (!CanMove())
{
return;
}
private void ReadA(ConfigMoveAxis axis, TextBox lblActual, TextBox lblTarget, TextBox lblT, IOStatusControl sta)
if (btnAddMove.BackColor.Equals(Color.White))
{
int speed = Convert.ToInt32(comjSpeed.Text);
if (speed <= 0)
{
MessageBox.Show("提示", "请先输入正确的速度");
return;
}
btnAddMove.BackColor = Color.Green;
AxisMove(speed);
}
}
if (ACServerManager.ServerOnStatus(axis.DeviceName, axis.GetAxisValue()))
private void btnAddMove_MouseUp(object sender, MouseEventArgs e)
{
sta.IOValue = ACServerManager.GetAlarmStatus(axis.DeviceName, axis.GetAxisValue());
int tP = ACServerManager.GetTargetPosition(axis.DeviceName, axis.GetAxisValue());
lblTarget.Text = string.Format("{0:d}", tP);
int aP = ACServerManager.GetActualtPosition(axis.DeviceName, axis.GetAxisValue());
lblActual.Text = string.Format("{0:d}", aP);
lblT.Text = axis.TargetPosition.ToString();
if (axis.IsSameAxis(PortName, SlvAddr))
if (btnAddMove.BackColor == Color.Green)
{
txtP.Text = lblActual.Text;
btnAddMove.BackColor = Color.White;
AxisManager.SuddenStop(PortName, SlvAddr);
btnReadPosition_Click(null, null);
}
}
private void btnDelMove_MouseDown(object sender, MouseEventArgs e)
{
if (!CanMove())
{
return;
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
if (btnDelMove.BackColor.Equals(Color.White))
{
if (comboBox1.SelectedIndex >= 0)
int speed = Convert.ToInt32(comjSpeed.Text);
if (speed <= 0)
{
ConfigMoveAxis axis = axisList[comboBox1.SelectedIndex];
PortName = axis.DeviceName;
SlvAddr = axis.GetAxisValue();
txtAxisDeviceName.Text = PortName;
txtAxisValue.Text = SlvAddr.ToString();
Color color = Color.Black;
if (BoxBean.Config.Middle_Axis.IsSameAxis(axis.DeviceName, axis.GetAxisValue()))
MessageBox.Show("提示", "请先输入正确的速度");
return;
}
btnDelMove.BackColor = Color.Green;
AxisMove(-speed);
}
}
private void btnDelMove_MouseUp(object sender, MouseEventArgs e)
{
color = Color.Red;
if (btnDelMove.BackColor == Color.Green)
{
btnDelMove.BackColor = Color.White;
AxisManager.SuddenStop(PortName, SlvAddr);
btnReadPosition_Click(null, null);
}
}
else if (BoxBean.Config.UpDown_Axis.IsSameAxis(axis.DeviceName, axis.GetAxisValue()))
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
color = Color.Blue;
Clipboard.SetDataObject(lblCountPulse.Text, true);
}
else if (BoxBean.Config.InOut_Axis.IsSameAxis(axis.DeviceName, axis.GetAxisValue()))
private void timer1_Tick(object sender, EventArgs e)
{
if (this.Visible)
{
color = Color.Green;
ReadAxisStatus();
}
else if (BoxBean.Config.Comp_Axis.IsSameAxis(axis.DeviceName, axis.GetAxisValue()))
}
private void ReadAxisStatus()
{
groupBox2.Text = cmbAxis.Text + "-状态监控";
//【1】更新轴号
short axisNo = SlvAddr;
if (axisNo < 0)
{
color = Color.Purple;
return;
}
btnOpenAxis.ForeColor = color;
btnCloseAxis.ForeColor = color;
btnAxisAMove.ForeColor = color;
btnAxisRMove.ForeColor = color;
btnAxisVMove.ForeColor = color;
btnAxisReturnHome.ForeColor = color;
btnAxisStop.ForeColor = color;
btnComAlarmClear.ForeColor = color;
btnReadPosition.ForeColor = color;
btnGetAlarm.ForeColor = color;
short modeValue = HCBoardManager.GetAxisPrfMode(axisNo);
if (modeValue < 0)
{
return;
}
else
{
string mode = HCBoardManager.AxisPrfMode(modeValue);
lblAxisPrfMode.Text = mode;
}
private void AxisABSMove(ConfigMoveAxis moveAxis, int targetPosition, int targetSpeed)
//【2】读取轴状态,如果读取出错将关闭此定时器
AxisSts sts = HCBoardManager.GetAxisSts(axisNo);
if (sts.ServoOn < 0)
{
moveAxis.TargetPosition = targetPosition;
ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed);
return;
}
//【3】更新界面显示
ShowlbSts(lblALM, sts.ALM,true); //报警信号
ShowlbSts(lblWARN, sts.WARN); //警告信号
ShowlbSts(lblEMG, sts.EMG);//急停信号
ShowlbSts(lblSvOn, sts.ServoOn); //使能信号
ShowlbSts(lblBUSY, sts.BUSY); //轴忙信号
ShowlbSts(lblINP, sts.INP); //轴到位信号
if (sts.ORG < 0)
{
return;
}
ShowlbSts(lblPEL, sts.PEL); //正限位信号
ShowlbSts(lblORG, sts.ORG); //原点信号
ShowlbSts(lblNEL, sts.NEL); //负限位信号
//label59.Text = ConvertDecimalToBinary(nTimerAxSts[0]); //轴状态是按bit进行解读,因此这里将AxSts转换为二进制bit进行显示
lblAxPrfPos.Text = HCBoardManager.GetAxisPrfPos(axisNo).ToString();
lblAxPrfVel.Text = HCBoardManager.GetAxisPrfVel(axisNo).ToString();
//label62.Text = nTimerAxPrfAcc[0].ToString();
lblAxEncPos.Text = HCBoardManager.GetAxisCurrPos(axisNo).ToString();
lblAxEncVel.Text = HCBoardManager.GetAxisCurrVel(axisNo).ToString();
lblAxEncAcc.Text = HCBoardManager.GetAxisCurrAcc(axisNo).ToString();
//label65.Text = nTimerAxEncAcc[0].ToString();
short value = HCBoardManager.GetHomeStatus(axisNo);
string homesstr = HCBoardManager.AxisHomeSts(value);
lblhomeSts.Text = homesstr;
}
private void ShowlbSts(Label lbl, int value,bool isAlarm=false )
{
if (value.Equals(1))
{
if (isAlarm)
{
lbl.BackColor = Color.Red ;
lblAlarmcode.Visible = true;
lblAlarmcode.ForeColor = Color.Red;
lblAlarmcode.Text = "错误码:" + HCBoardManager.GetAxErrCode(SlvAddr);
}
else
{
lbl.BackColor = Color.Lime;
}
}
else if (value.Equals(0))
{
lbl.BackColor = Color.LightGray;
if (isAlarm)
{
lblAlarmcode.Visible = false ;
}
}
else
{
lbl.BackColor = this.BackColor;
}
}
public void StopTimer()
{
this.timer1.Stop();
}
}
}
......@@ -117,4 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
\ No newline at end of file
namespace OnlineStore.ACPackingStore
{
partial class AxisMoveControl
{
/// <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.groupAxis = new System.Windows.Forms.GroupBox();
this.label7 = new System.Windows.Forms.Label();
this.txtServoStatue = new System.Windows.Forms.TextBox();
this.label17 = new System.Windows.Forms.Label();
this.txtLimit2 = new System.Windows.Forms.TextBox();
this.label19 = new System.Windows.Forms.Label();
this.txtLimit1 = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.txtHomeSingle = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.txtHomeStatus = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.txtBusyStatus = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txtAlarmStatus = new System.Windows.Forms.TextBox();
this.btnGetAlarm = new System.Windows.Forms.Button();
this.btnReadPosition = new System.Windows.Forms.Button();
this.label8 = new System.Windows.Forms.Label();
this.btnOpenAxis = new System.Windows.Forms.Button();
this.btnCloseAxis = new System.Windows.Forms.Button();
this.txtP = new System.Windows.Forms.TextBox();
this.txtASpeed = new System.Windows.Forms.TextBox();
this.label47 = new System.Windows.Forms.Label();
this.btnAxisVMove = new System.Windows.Forms.Button();
this.btnAxisRMove = new System.Windows.Forms.Button();
this.btnAxisReturnHome = new System.Windows.Forms.Button();
this.btnAxisAMove = new System.Windows.Forms.Button();
this.btnComAlarmClear = new System.Windows.Forms.Button();
this.txtAPosition = new System.Windows.Forms.TextBox();
this.label48 = new System.Windows.Forms.Label();
this.btnAxisStop = new System.Windows.Forms.Button();
this.txtAxisValue = new System.Windows.Forms.TextBox();
this.txtAxisDeviceName = new System.Windows.Forms.TextBox();
this.label45 = new System.Windows.Forms.Label();
this.label46 = new System.Windows.Forms.Label();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.axis_4_Alarm = new UserFromControl.IOStatusControl();
this.txt4Target = new System.Windows.Forms.TextBox();
this.lblTargetP4 = new System.Windows.Forms.TextBox();
this.lblActual4 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.axis_1_Alarm = new UserFromControl.IOStatusControl();
this.axis_3_Alarm = new UserFromControl.IOStatusControl();
this.axis_2_Alarm = new UserFromControl.IOStatusControl();
this.label38 = new System.Windows.Forms.Label();
this.txtMiddleTarget = new System.Windows.Forms.TextBox();
this.txtInoutTarget = new System.Windows.Forms.TextBox();
this.txtUpdownTarget = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.lblTargetP1 = new System.Windows.Forms.TextBox();
this.lblActual1 = new System.Windows.Forms.TextBox();
this.lblTargetP3 = new System.Windows.Forms.TextBox();
this.lblActual3 = new System.Windows.Forms.TextBox();
this.lblTargetP2 = new System.Windows.Forms.TextBox();
this.lblActual2 = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label43 = new System.Windows.Forms.Label();
this.label42 = new System.Windows.Forms.Label();
this.groupAxis.SuspendLayout();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// groupAxis
//
this.groupAxis.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupAxis.Controls.Add(this.label7);
this.groupAxis.Controls.Add(this.txtServoStatue);
this.groupAxis.Controls.Add(this.label17);
this.groupAxis.Controls.Add(this.txtLimit2);
this.groupAxis.Controls.Add(this.label19);
this.groupAxis.Controls.Add(this.txtLimit1);
this.groupAxis.Controls.Add(this.label6);
this.groupAxis.Controls.Add(this.txtHomeSingle);
this.groupAxis.Controls.Add(this.label11);
this.groupAxis.Controls.Add(this.txtHomeStatus);
this.groupAxis.Controls.Add(this.label10);
this.groupAxis.Controls.Add(this.txtBusyStatus);
this.groupAxis.Controls.Add(this.label2);
this.groupAxis.Controls.Add(this.txtAlarmStatus);
this.groupAxis.Controls.Add(this.btnGetAlarm);
this.groupAxis.Controls.Add(this.btnReadPosition);
this.groupAxis.Controls.Add(this.label8);
this.groupAxis.Controls.Add(this.btnOpenAxis);
this.groupAxis.Controls.Add(this.btnCloseAxis);
this.groupAxis.Controls.Add(this.txtP);
this.groupAxis.Controls.Add(this.txtASpeed);
this.groupAxis.Controls.Add(this.label47);
this.groupAxis.Controls.Add(this.btnAxisVMove);
this.groupAxis.Controls.Add(this.btnAxisRMove);
this.groupAxis.Controls.Add(this.btnAxisReturnHome);
this.groupAxis.Controls.Add(this.btnAxisAMove);
this.groupAxis.Controls.Add(this.btnComAlarmClear);
this.groupAxis.Controls.Add(this.txtAPosition);
this.groupAxis.Controls.Add(this.label48);
this.groupAxis.Controls.Add(this.btnAxisStop);
this.groupAxis.Controls.Add(this.txtAxisValue);
this.groupAxis.Controls.Add(this.txtAxisDeviceName);
this.groupAxis.Controls.Add(this.label45);
this.groupAxis.Controls.Add(this.label46);
this.groupAxis.Controls.Add(this.comboBox1);
this.groupAxis.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupAxis.Location = new System.Drawing.Point(4, 4);
this.groupAxis.Name = "groupAxis";
this.groupAxis.Size = new System.Drawing.Size(423, 361);
this.groupAxis.TabIndex = 217;
this.groupAxis.TabStop = false;
this.groupAxis.Text = "伺服运动";
//
// label7
//
this.label7.Location = new System.Drawing.Point(10, 216);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(99, 17);
this.label7.TabIndex = 328;
this.label7.Text = "伺服状态:";
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtServoStatue
//
this.txtServoStatue.Enabled = false;
this.txtServoStatue.Location = new System.Drawing.Point(112, 213);
this.txtServoStatue.Name = "txtServoStatue";
this.txtServoStatue.Size = new System.Drawing.Size(25, 23);
this.txtServoStatue.TabIndex = 327;
//
// label17
//
this.label17.Location = new System.Drawing.Point(142, 329);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(99, 17);
this.label17.TabIndex = 316;
this.label17.Text = "负极限信号:";
this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtLimit2
//
this.txtLimit2.Enabled = false;
this.txtLimit2.Location = new System.Drawing.Point(245, 326);
this.txtLimit2.Name = "txtLimit2";
this.txtLimit2.Size = new System.Drawing.Size(25, 23);
this.txtLimit2.TabIndex = 313;
//
// label19
//
this.label19.Location = new System.Drawing.Point(142, 290);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(99, 17);
this.label19.TabIndex = 312;
this.label19.Text = "正极限信号:";
this.label19.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtLimit1
//
this.txtLimit1.Enabled = false;
this.txtLimit1.Location = new System.Drawing.Point(245, 287);
this.txtLimit1.Name = "txtLimit1";
this.txtLimit1.Size = new System.Drawing.Size(25, 23);
this.txtLimit1.TabIndex = 309;
//
// label6
//
this.label6.Location = new System.Drawing.Point(142, 251);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(99, 17);
this.label6.TabIndex = 300;
this.label6.Text = "原点信号:";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtHomeSingle
//
this.txtHomeSingle.Enabled = false;
this.txtHomeSingle.Location = new System.Drawing.Point(245, 248);
this.txtHomeSingle.Name = "txtHomeSingle";
this.txtHomeSingle.Size = new System.Drawing.Size(25, 23);
this.txtHomeSingle.TabIndex = 297;
//
// label11
//
this.label11.Location = new System.Drawing.Point(10, 329);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(99, 17);
this.label11.TabIndex = 292;
this.label11.Text = "HOME-CMP状态:";
this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtHomeStatus
//
this.txtHomeStatus.Enabled = false;
this.txtHomeStatus.Location = new System.Drawing.Point(112, 326);
this.txtHomeStatus.Name = "txtHomeStatus";
this.txtHomeStatus.Size = new System.Drawing.Size(25, 23);
this.txtHomeStatus.TabIndex = 291;
//
// label10
//
this.label10.Location = new System.Drawing.Point(10, 290);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(99, 17);
this.label10.TabIndex = 289;
this.label10.Text = "BUSY状态:";
this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtBusyStatus
//
this.txtBusyStatus.Enabled = false;
this.txtBusyStatus.Location = new System.Drawing.Point(112, 287);
this.txtBusyStatus.Name = "txtBusyStatus";
this.txtBusyStatus.Size = new System.Drawing.Size(25, 23);
this.txtBusyStatus.TabIndex = 288;
//
// label2
//
this.label2.Location = new System.Drawing.Point(10, 251);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(99, 17);
this.label2.TabIndex = 286;
this.label2.Text = "报警状态:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtAlarmStatus
//
this.txtAlarmStatus.Enabled = false;
this.txtAlarmStatus.Location = new System.Drawing.Point(112, 248);
this.txtAlarmStatus.Name = "txtAlarmStatus";
this.txtAlarmStatus.Size = new System.Drawing.Size(25, 23);
this.txtAlarmStatus.TabIndex = 285;
//
// btnGetAlarm
//
this.btnGetAlarm.BackColor = System.Drawing.SystemColors.Control;
this.btnGetAlarm.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnGetAlarm.Location = new System.Drawing.Point(284, 282);
this.btnGetAlarm.Name = "btnGetAlarm";
this.btnGetAlarm.Size = new System.Drawing.Size(115, 33);
this.btnGetAlarm.TabIndex = 284;
this.btnGetAlarm.Text = "读取状态";
this.btnGetAlarm.UseVisualStyleBackColor = false;
this.btnGetAlarm.Click += new System.EventHandler(this.btnGetAlarm_Click);
//
// btnReadPosition
//
this.btnReadPosition.BackColor = System.Drawing.SystemColors.Control;
this.btnReadPosition.Cursor = System.Windows.Forms.Cursors.Default;
this.btnReadPosition.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReadPosition.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReadPosition.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnReadPosition.Location = new System.Drawing.Point(284, 243);
this.btnReadPosition.Name = "btnReadPosition";
this.btnReadPosition.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnReadPosition.Size = new System.Drawing.Size(115, 33);
this.btnReadPosition.TabIndex = 278;
this.btnReadPosition.Text = "读取位置";
this.btnReadPosition.UseVisualStyleBackColor = false;
this.btnReadPosition.Click += new System.EventHandler(this.btnReadPosition_Click);
//
// label8
//
this.label8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.Location = new System.Drawing.Point(142, 216);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(99, 17);
this.label8.TabIndex = 255;
this.label8.Text = "实时位置:";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnOpenAxis
//
this.btnOpenAxis.BackColor = System.Drawing.SystemColors.Control;
this.btnOpenAxis.Cursor = System.Windows.Forms.Cursors.Default;
this.btnOpenAxis.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOpenAxis.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenAxis.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnOpenAxis.Location = new System.Drawing.Point(300, 18);
this.btnOpenAxis.Name = "btnOpenAxis";
this.btnOpenAxis.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnOpenAxis.Size = new System.Drawing.Size(115, 33);
this.btnOpenAxis.TabIndex = 253;
this.btnOpenAxis.Text = "打开伺服";
this.btnOpenAxis.UseVisualStyleBackColor = false;
this.btnOpenAxis.Click += new System.EventHandler(this.btnOpenAxis_Click);
//
// btnCloseAxis
//
this.btnCloseAxis.BackColor = System.Drawing.SystemColors.Control;
this.btnCloseAxis.Cursor = System.Windows.Forms.Cursors.Default;
this.btnCloseAxis.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCloseAxis.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseAxis.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnCloseAxis.Location = new System.Drawing.Point(300, 56);
this.btnCloseAxis.Name = "btnCloseAxis";
this.btnCloseAxis.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnCloseAxis.Size = new System.Drawing.Size(115, 33);
this.btnCloseAxis.TabIndex = 252;
this.btnCloseAxis.Text = "关闭伺服";
this.btnCloseAxis.UseVisualStyleBackColor = false;
this.btnCloseAxis.Click += new System.EventHandler(this.btnCloseAxis_Click);
//
// txtP
//
this.txtP.Location = new System.Drawing.Point(245, 213);
this.txtP.Name = "txtP";
this.txtP.ReadOnly = true;
this.txtP.Size = new System.Drawing.Size(110, 23);
this.txtP.TabIndex = 38;
//
// txtASpeed
//
this.txtASpeed.AcceptsReturn = true;
this.txtASpeed.BackColor = System.Drawing.SystemColors.Window;
this.txtASpeed.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtASpeed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtASpeed.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtASpeed.Location = new System.Drawing.Point(86, 133);
this.txtASpeed.MaxLength = 12;
this.txtASpeed.Name = "txtASpeed";
this.txtASpeed.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.txtASpeed.Size = new System.Drawing.Size(87, 23);
this.txtASpeed.TabIndex = 251;
this.txtASpeed.Text = "30";
//
// label47
//
this.label47.Cursor = System.Windows.Forms.Cursors.Default;
this.label47.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label47.ForeColor = System.Drawing.SystemColors.ControlText;
this.label47.Location = new System.Drawing.Point(5, 137);
this.label47.Name = "label47";
this.label47.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.label47.Size = new System.Drawing.Size(75, 17);
this.label47.TabIndex = 250;
this.label47.Text = "速度:";
this.label47.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnAxisVMove
//
this.btnAxisVMove.BackColor = System.Drawing.SystemColors.Control;
this.btnAxisVMove.Cursor = System.Windows.Forms.Cursors.Default;
this.btnAxisVMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisVMove.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisVMove.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnAxisVMove.Location = new System.Drawing.Point(58, 172);
this.btnAxisVMove.Name = "btnAxisVMove";
this.btnAxisVMove.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnAxisVMove.Size = new System.Drawing.Size(115, 33);
this.btnAxisVMove.TabIndex = 249;
this.btnAxisVMove.Text = "匀速运动";
this.btnAxisVMove.UseVisualStyleBackColor = false;
this.btnAxisVMove.Click += new System.EventHandler(this.btnAxisVMove_Click);
//
// btnAxisRMove
//
this.btnAxisRMove.BackColor = System.Drawing.SystemColors.Control;
this.btnAxisRMove.Cursor = System.Windows.Forms.Cursors.Default;
this.btnAxisRMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisRMove.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisRMove.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnAxisRMove.Location = new System.Drawing.Point(179, 133);
this.btnAxisRMove.Name = "btnAxisRMove";
this.btnAxisRMove.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnAxisRMove.Size = new System.Drawing.Size(115, 33);
this.btnAxisRMove.TabIndex = 248;
this.btnAxisRMove.Text = "相对运动";
this.btnAxisRMove.UseVisualStyleBackColor = false;
this.btnAxisRMove.Click += new System.EventHandler(this.btnAxisRMove_Click);
//
// btnAxisReturnHome
//
this.btnAxisReturnHome.BackColor = System.Drawing.SystemColors.Control;
this.btnAxisReturnHome.Cursor = System.Windows.Forms.Cursors.Default;
this.btnAxisReturnHome.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisReturnHome.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisReturnHome.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnAxisReturnHome.Location = new System.Drawing.Point(179, 172);
this.btnAxisReturnHome.Name = "btnAxisReturnHome";
this.btnAxisReturnHome.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnAxisReturnHome.Size = new System.Drawing.Size(115, 33);
this.btnAxisReturnHome.TabIndex = 247;
this.btnAxisReturnHome.Text = "原点返回";
this.btnAxisReturnHome.UseVisualStyleBackColor = false;
this.btnAxisReturnHome.Click += new System.EventHandler(this.btnAxisReturnHome_Click);
//
// btnAxisAMove
//
this.btnAxisAMove.BackColor = System.Drawing.SystemColors.Control;
this.btnAxisAMove.Cursor = System.Windows.Forms.Cursors.Default;
this.btnAxisAMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisAMove.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisAMove.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnAxisAMove.Location = new System.Drawing.Point(179, 95);
this.btnAxisAMove.Name = "btnAxisAMove";
this.btnAxisAMove.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnAxisAMove.Size = new System.Drawing.Size(115, 33);
this.btnAxisAMove.TabIndex = 245;
this.btnAxisAMove.Text = "绝对运动";
this.btnAxisAMove.UseVisualStyleBackColor = false;
this.btnAxisAMove.Click += new System.EventHandler(this.btnAxisAMove_Click);
//
// btnComAlarmClear
//
this.btnComAlarmClear.BackColor = System.Drawing.SystemColors.Control;
this.btnComAlarmClear.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnComAlarmClear.Location = new System.Drawing.Point(284, 321);
this.btnComAlarmClear.Name = "btnComAlarmClear";
this.btnComAlarmClear.Size = new System.Drawing.Size(115, 33);
this.btnComAlarmClear.TabIndex = 50;
this.btnComAlarmClear.Text = "清除报警";
this.btnComAlarmClear.UseVisualStyleBackColor = false;
this.btnComAlarmClear.Click += new System.EventHandler(this.btnComAlarmClear_Click);
//
// txtAPosition
//
this.txtAPosition.BackColor = System.Drawing.SystemColors.Window;
this.txtAPosition.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtAPosition.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAPosition.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtAPosition.Location = new System.Drawing.Point(86, 99);
this.txtAPosition.MaxLength = 12;
this.txtAPosition.Name = "txtAPosition";
this.txtAPosition.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.txtAPosition.Size = new System.Drawing.Size(87, 23);
this.txtAPosition.TabIndex = 244;
this.txtAPosition.Text = "3000";
//
// label48
//
this.label48.Cursor = System.Windows.Forms.Cursors.Default;
this.label48.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label48.ForeColor = System.Drawing.SystemColors.ControlText;
this.label48.Location = new System.Drawing.Point(5, 102);
this.label48.Name = "label48";
this.label48.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.label48.Size = new System.Drawing.Size(75, 17);
this.label48.TabIndex = 243;
this.label48.Text = "位置:";
this.label48.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnAxisStop
//
this.btnAxisStop.BackColor = System.Drawing.SystemColors.Control;
this.btnAxisStop.Cursor = System.Windows.Forms.Cursors.Default;
this.btnAxisStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisStop.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnAxisStop.Location = new System.Drawing.Point(300, 95);
this.btnAxisStop.Name = "btnAxisStop";
this.btnAxisStop.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnAxisStop.Size = new System.Drawing.Size(115, 110);
this.btnAxisStop.TabIndex = 246;
this.btnAxisStop.Text = " 停止运动";
this.btnAxisStop.UseVisualStyleBackColor = false;
this.btnAxisStop.Click += new System.EventHandler(this.btnAxisStop_Click);
//
// txtAxisValue
//
this.txtAxisValue.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAxisValue.Location = new System.Drawing.Point(227, 59);
this.txtAxisValue.MaxLength = 10;
this.txtAxisValue.Name = "txtAxisValue";
this.txtAxisValue.ReadOnly = true;
this.txtAxisValue.Size = new System.Drawing.Size(58, 26);
this.txtAxisValue.TabIndex = 242;
this.txtAxisValue.Text = "0";
//
// txtAxisDeviceName
//
this.txtAxisDeviceName.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAxisDeviceName.Location = new System.Drawing.Point(83, 59);
this.txtAxisDeviceName.MaxLength = 10;
this.txtAxisDeviceName.Name = "txtAxisDeviceName";
this.txtAxisDeviceName.ReadOnly = true;
this.txtAxisDeviceName.Size = new System.Drawing.Size(58, 26);
this.txtAxisDeviceName.TabIndex = 241;
this.txtAxisDeviceName.Text = "0";
//
// label45
//
this.label45.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label45.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label45.Location = new System.Drawing.Point(5, 64);
this.label45.Name = "label45";
this.label45.Size = new System.Drawing.Size(75, 17);
this.label45.TabIndex = 240;
this.label45.Text = "端口号:";
this.label45.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label46
//
this.label46.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label46.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label46.Location = new System.Drawing.Point(149, 64);
this.label46.Name = "label46";
this.label46.Size = new System.Drawing.Size(75, 17);
this.label46.TabIndex = 239;
this.label46.Text = "地址:";
this.label46.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// comboBox1
//
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.comboBox1.FormattingEnabled = true;
this.comboBox1.ItemHeight = 17;
this.comboBox1.Location = new System.Drawing.Point(8, 23);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(277, 25);
this.comboBox1.TabIndex = 234;
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.axis_4_Alarm);
this.groupBox1.Controls.Add(this.txt4Target);
this.groupBox1.Controls.Add(this.lblTargetP4);
this.groupBox1.Controls.Add(this.lblActual4);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.axis_1_Alarm);
this.groupBox1.Controls.Add(this.axis_3_Alarm);
this.groupBox1.Controls.Add(this.axis_2_Alarm);
this.groupBox1.Controls.Add(this.label38);
this.groupBox1.Controls.Add(this.txtMiddleTarget);
this.groupBox1.Controls.Add(this.txtInoutTarget);
this.groupBox1.Controls.Add(this.txtUpdownTarget);
this.groupBox1.Controls.Add(this.label12);
this.groupBox1.Controls.Add(this.lblTargetP1);
this.groupBox1.Controls.Add(this.lblActual1);
this.groupBox1.Controls.Add(this.lblTargetP3);
this.groupBox1.Controls.Add(this.lblActual3);
this.groupBox1.Controls.Add(this.lblTargetP2);
this.groupBox1.Controls.Add(this.lblActual2);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.label43);
this.groupBox1.Controls.Add(this.label42);
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(4, 369);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(417, 203);
this.groupBox1.TabIndex = 218;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "伺服状态";
this.groupBox1.Visible = false;
//
// axis_4_Alarm
//
this.axis_4_Alarm.IOName = "";
this.axis_4_Alarm.IOValue = 0;
this.axis_4_Alarm.isCanClick = false;
this.axis_4_Alarm.Location = new System.Drawing.Point(453, 64);
this.axis_4_Alarm.Name = "axis_4_Alarm";
this.axis_4_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_4_Alarm.TabIndex = 271;
//
// txt4Target
//
this.txt4Target.Location = new System.Drawing.Point(430, 168);
this.txt4Target.Name = "txt4Target";
this.txt4Target.ReadOnly = true;
this.txt4Target.Size = new System.Drawing.Size(87, 23);
this.txt4Target.TabIndex = 270;
//
// lblTargetP4
//
this.lblTargetP4.Location = new System.Drawing.Point(430, 140);
this.lblTargetP4.Name = "lblTargetP4";
this.lblTargetP4.ReadOnly = true;
this.lblTargetP4.Size = new System.Drawing.Size(87, 23);
this.lblTargetP4.TabIndex = 269;
//
// lblActual4
//
this.lblActual4.Location = new System.Drawing.Point(430, 112);
this.lblActual4.Name = "lblActual4";
this.lblActual4.ReadOnly = true;
this.lblActual4.Size = new System.Drawing.Size(87, 23);
this.lblActual4.TabIndex = 268;
//
// label1
//
this.label1.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label1.Location = new System.Drawing.Point(427, 11);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(96, 49);
this.label1.TabIndex = 267;
this.label1.Text = "轴四:压紧轴";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// axis_1_Alarm
//
this.axis_1_Alarm.IOName = "";
this.axis_1_Alarm.IOValue = 0;
this.axis_1_Alarm.isCanClick = false;
this.axis_1_Alarm.Location = new System.Drawing.Point(148, 65);
this.axis_1_Alarm.Name = "axis_1_Alarm";
this.axis_1_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_1_Alarm.TabIndex = 264;
//
// axis_3_Alarm
//
this.axis_3_Alarm.IOName = "";
this.axis_3_Alarm.IOValue = 0;
this.axis_3_Alarm.isCanClick = false;
this.axis_3_Alarm.Location = new System.Drawing.Point(350, 65);
this.axis_3_Alarm.Name = "axis_3_Alarm";
this.axis_3_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_3_Alarm.TabIndex = 266;
//
// axis_2_Alarm
//
this.axis_2_Alarm.IOName = "";
this.axis_2_Alarm.IOValue = 0;
this.axis_2_Alarm.isCanClick = false;
this.axis_2_Alarm.Location = new System.Drawing.Point(245, 65);
this.axis_2_Alarm.Name = "axis_2_Alarm";
this.axis_2_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_2_Alarm.TabIndex = 265;
//
// label38
//
this.label38.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label38.Location = new System.Drawing.Point(7, 67);
this.label38.Name = "label38";
this.label38.Size = new System.Drawing.Size(116, 17);
this.label38.TabIndex = 263;
this.label38.Text = "ALM:";
this.label38.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtMiddleTarget
//
this.txtMiddleTarget.Location = new System.Drawing.Point(126, 169);
this.txtMiddleTarget.Name = "txtMiddleTarget";
this.txtMiddleTarget.ReadOnly = true;
this.txtMiddleTarget.Size = new System.Drawing.Size(87, 23);
this.txtMiddleTarget.TabIndex = 262;
//
// txtInoutTarget
//
this.txtInoutTarget.Location = new System.Drawing.Point(327, 169);
this.txtInoutTarget.Name = "txtInoutTarget";
this.txtInoutTarget.ReadOnly = true;
this.txtInoutTarget.Size = new System.Drawing.Size(87, 23);
this.txtInoutTarget.TabIndex = 260;
//
// txtUpdownTarget
//
this.txtUpdownTarget.Location = new System.Drawing.Point(227, 169);
this.txtUpdownTarget.Name = "txtUpdownTarget";
this.txtUpdownTarget.ReadOnly = true;
this.txtUpdownTarget.Size = new System.Drawing.Size(87, 23);
this.txtUpdownTarget.TabIndex = 259;
//
// label12
//
this.label12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label12.Location = new System.Drawing.Point(7, 172);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(116, 17);
this.label12.TabIndex = 258;
this.label12.Text = "出入库目标值:";
this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lblTargetP1
//
this.lblTargetP1.Location = new System.Drawing.Point(126, 141);
this.lblTargetP1.Name = "lblTargetP1";
this.lblTargetP1.ReadOnly = true;
this.lblTargetP1.Size = new System.Drawing.Size(87, 23);
this.lblTargetP1.TabIndex = 257;
//
// lblActual1
//
this.lblActual1.Location = new System.Drawing.Point(126, 113);
this.lblActual1.Name = "lblActual1";
this.lblActual1.ReadOnly = true;
this.lblActual1.Size = new System.Drawing.Size(87, 23);
this.lblActual1.TabIndex = 256;
//
// lblTargetP3
//
this.lblTargetP3.Location = new System.Drawing.Point(327, 141);
this.lblTargetP3.Name = "lblTargetP3";
this.lblTargetP3.ReadOnly = true;
this.lblTargetP3.Size = new System.Drawing.Size(87, 23);
this.lblTargetP3.TabIndex = 178;
//
// lblActual3
//
this.lblActual3.Location = new System.Drawing.Point(327, 113);
this.lblActual3.Name = "lblActual3";
this.lblActual3.ReadOnly = true;
this.lblActual3.Size = new System.Drawing.Size(87, 23);
this.lblActual3.TabIndex = 177;
//
// lblTargetP2
//
this.lblTargetP2.Location = new System.Drawing.Point(228, 141);
this.lblTargetP2.Name = "lblTargetP2";
this.lblTargetP2.ReadOnly = true;
this.lblTargetP2.Size = new System.Drawing.Size(87, 23);
this.lblTargetP2.TabIndex = 176;
//
// lblActual2
//
this.lblActual2.Location = new System.Drawing.Point(227, 113);
this.lblActual2.Name = "lblActual2";
this.lblActual2.ReadOnly = true;
this.lblActual2.Size = new System.Drawing.Size(87, 23);
this.lblActual2.TabIndex = 175;
//
// label4
//
this.label4.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label4.Location = new System.Drawing.Point(327, 12);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(96, 49);
this.label4.TabIndex = 100;
this.label4.Text = "轴三:进出轴";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label3
//
this.label3.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label3.Location = new System.Drawing.Point(227, 12);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(96, 49);
this.label3.TabIndex = 99;
this.label3.Text = "轴二:上下轴";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label5
//
this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label5.Location = new System.Drawing.Point(127, 12);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(96, 49);
this.label5.TabIndex = 97;
this.label5.Text = "轴一:旋转轴";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label43
//
this.label43.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label43.Location = new System.Drawing.Point(7, 115);
this.label43.Name = "label43";
this.label43.Size = new System.Drawing.Size(116, 17);
this.label43.TabIndex = 23;
this.label43.Text = "输出脉冲值:";
this.label43.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label42
//
this.label42.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label42.Location = new System.Drawing.Point(7, 142);
this.label42.Name = "label42";
this.label42.Size = new System.Drawing.Size(116, 17);
this.label42.TabIndex = 24;
this.label42.Text = "编码器计数:";
this.label42.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// AxisMoveControl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.groupAxis);
this.Controls.Add(this.groupBox1);
this.Name = "AxisMoveControl";
this.Size = new System.Drawing.Size(432, 623);
this.groupAxis.ResumeLayout(false);
this.groupAxis.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupAxis;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox txtServoStatue;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.TextBox txtLimit2;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.TextBox txtLimit1;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtHomeSingle;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox txtHomeStatus;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox txtBusyStatus;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtAlarmStatus;
private System.Windows.Forms.Button btnGetAlarm;
public System.Windows.Forms.Button btnReadPosition;
private System.Windows.Forms.Label label8;
public System.Windows.Forms.Button btnOpenAxis;
public System.Windows.Forms.Button btnCloseAxis;
private System.Windows.Forms.TextBox txtP;
public System.Windows.Forms.TextBox txtASpeed;
public System.Windows.Forms.Label label47;
public System.Windows.Forms.Button btnAxisVMove;
public System.Windows.Forms.Button btnAxisRMove;
public System.Windows.Forms.Button btnAxisReturnHome;
public System.Windows.Forms.Button btnAxisAMove;
private System.Windows.Forms.Button btnComAlarmClear;
public System.Windows.Forms.TextBox txtAPosition;
public System.Windows.Forms.Label label48;
public System.Windows.Forms.Button btnAxisStop;
private System.Windows.Forms.TextBox txtAxisValue;
private System.Windows.Forms.TextBox txtAxisDeviceName;
private System.Windows.Forms.Label label45;
private System.Windows.Forms.Label label46;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.GroupBox groupBox1;
private UserFromControl.IOStatusControl axis_4_Alarm;
private System.Windows.Forms.TextBox txt4Target;
private System.Windows.Forms.TextBox lblTargetP4;
private System.Windows.Forms.TextBox lblActual4;
private System.Windows.Forms.Label label1;
private UserFromControl.IOStatusControl axis_1_Alarm;
private UserFromControl.IOStatusControl axis_3_Alarm;
private UserFromControl.IOStatusControl axis_2_Alarm;
private System.Windows.Forms.Label label38;
private System.Windows.Forms.TextBox txtMiddleTarget;
private System.Windows.Forms.TextBox txtInoutTarget;
private System.Windows.Forms.TextBox txtUpdownTarget;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox lblTargetP1;
private System.Windows.Forms.TextBox lblActual1;
private System.Windows.Forms.TextBox lblTargetP3;
private System.Windows.Forms.TextBox lblActual3;
private System.Windows.Forms.TextBox lblTargetP2;
private System.Windows.Forms.TextBox lblActual2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label43;
private System.Windows.Forms.Label label42;
}
}
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;
using UserFromControl;
namespace OnlineStore.ACPackingStore
{
public partial class AxisMoveControl : UserControl
{
private List<ConfigMoveAxis> axisList = new List<ConfigMoveAxis>();
private AC_SA_BoxBean BoxBean= null;
private string PortName = "";
private short SlvAddr = 0;
public AxisMoveControl( )
{
InitializeComponent();
}
public void LoadData(AC_SA_BoxBean 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.DisplayStr);
}
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)
{
LogUtil.info("点击【打开伺服】,端口号【" + PortName + "】地址【" + SlvAddr + "】 ");
ACServerManager.OpenPort(PortName);
ACServerManager.AlarmClear(PortName, SlvAddr);
Thread.Sleep(100);
ACServerManager.ServoOn(PortName, SlvAddr);
}
private void btnCloseAxis_Click(object sender, EventArgs e)
{
LogUtil.info("点击【关闭伺服】,端口号【" + PortName + "】地址【" + SlvAddr + "】 ");
ACServerManager.ServoOff(PortName, SlvAddr);
}
/// <summary>
/// 判断进出轴是否在P1点
/// </summary>
private bool InOutIsIsP1()
{
int InOutDefaultPosition = ConfigAppSettings.GetIntValue(Setting_Init.InOutDefaultPosition);
int currValue = ACServerManager.GetActualtPosition(BoxBean.Config.InOut_Axis.DeviceName, BoxBean.Config.InOut_Axis.GetAxisValue());
if (currValue <= InOutDefaultPosition)
{
return true;
}
// MyMessage.Show("叉子不在待机位,请先将叉子退回待机位(" + InOutDefaultPosition + ")", "警告(叉子在待机位时,才能移动升降轴和旋转轴) ", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
MessageBox.Show(ResourceCulture.GetString("叉子不在待机位,请先将叉子退回待机位") + "(" + InOutDefaultPosition + ")!",
ResourceCulture.GetString("警告(叉子在待机位时,才能移动升降轴和旋转轴)"), MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return false;
}
private void btnAxisAMove_Click(object sender, EventArgs e)
{
int position = FormUtil.GetIntValue(txtAPosition);
int speed = FormUtil.GetIntValue(txtASpeed);
if (BoxBean.Config.Middle_Axis.IsSameAxis(PortName, SlvAddr) || BoxBean.Config.UpDown_Axis.IsSameAxis(PortName, SlvAddr))
{
if (!InOutIsIsP1())
{
return;
}
}
LogUtil.info("点击【绝对运动】,端口号【" + PortName + "】地址【" + SlvAddr + "】位置【" + position + "】速度【" + speed + "】");
ACServerManager.AbsMove(PortName, SlvAddr, position, speed,1,1);
}
private void btnAxisRMove_Click(object sender, EventArgs e)
{
int position = FormUtil.GetIntValue(txtAPosition);
int speed = FormUtil.GetIntValue(txtASpeed);
if (BoxBean.Config.Middle_Axis.IsSameAxis(PortName, SlvAddr) || BoxBean.Config.UpDown_Axis.IsSameAxis(PortName, SlvAddr))
{
if (!InOutIsIsP1())
{
return;
}
}
LogUtil.info("点击【相对运动】,端口号【" + PortName + "】地址【" + SlvAddr + "】位置【" + position + "】速度【" + speed + "】");
ACServerManager.RelMove(PortName, SlvAddr, position, speed, 1, 1);
}
private void btnAxisVMove_Click(object sender, EventArgs e)
{
int speed = FormUtil.GetIntValue(txtASpeed);
if (BoxBean.Config.Middle_Axis.IsSameAxis(PortName, SlvAddr) || BoxBean.Config.UpDown_Axis.IsSameAxis(PortName, SlvAddr))
{
if (!InOutIsIsP1())
{
return;
}
}
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);
if (BoxBean.Config.Middle_Axis.IsSameAxis(PortName, SlvAddr) || BoxBean.Config.UpDown_Axis.IsSameAxis(PortName, SlvAddr))
{
if (!InOutIsIsP1())
{
return;
}
}
LogUtil.info("点击【原点返回】,端口号【" + PortName + "】地址【" + SlvAddr + "】 速度【" + speed + "】");
ACServerManager.HomeMove(PortName, SlvAddr, speed, 1, 1);
}
private void btnGetAlarm_Click(object sender, EventArgs e)
{
string PortName = txtAxisDeviceName.Text;
short SlvAddr = FormUtil.GetShortValue(txtAxisValue);
txtServoStatue.Text = ACServerManager.ServerOnStatus(PortName, SlvAddr) ? "✔" : "✘";
this.txtAlarmStatus.Text = ACServerManager.GetAlarmStatus(PortName, SlvAddr).ToString();
this.txtBusyStatus.Text = ACServerManager.GetBusyStatus(PortName, SlvAddr).ToString();
this.txtHomeStatus.Text = ACServerManager.GetHomeEndStatus(PortName, SlvAddr).ToString();
this.txtHomeSingle.Text = ACServerManager.GetHomeSingle(PortName, SlvAddr).ToString();
this.txtLimit1.Text = ACServerManager.GetLimitPositiveSingle(PortName, SlvAddr).ToString();
this.txtLimit2.Text = ACServerManager.GetLimitNegativeSingle(PortName, SlvAddr).ToString();
}
private void btnReadPosition_Click(object sender, EventArgs e)
{
ReadPosistion();
}
private void ReadPosistion()
{
//判断私服是否打开、
if (ACServerManager.ServerOnStatus(PortName, SlvAddr))
{
txtServoStatue.Text = "✔";
}
else
{
txtServoStatue.Text = "✘";
}
if (groupBox1.Visible)
{
ReadA(BoxBean.Config.Middle_Axis, lblActual1, lblTargetP1, txtMiddleTarget, axis_1_Alarm);
ReadA(BoxBean.Config.UpDown_Axis, lblActual2, lblTargetP2, txtUpdownTarget, axis_2_Alarm);
ReadA(BoxBean.Config.InOut_Axis, lblActual3, lblTargetP3, txtInoutTarget, axis_3_Alarm);
ReadA(BoxBean.Config.Comp_Axis, lblActual4, lblTargetP4, txt4Target, axis_4_Alarm);
}
}
private void ReadA(ConfigMoveAxis axis, TextBox lblActual, TextBox lblTarget, TextBox lblT, IOStatusControl sta)
{
if (ACServerManager.ServerOnStatus(axis.DeviceName, axis.GetAxisValue()))
{
sta.IOValue = ACServerManager.GetAlarmStatus(axis.DeviceName, axis.GetAxisValue());
int tP = ACServerManager.GetTargetPosition(axis.DeviceName, axis.GetAxisValue());
lblTarget.Text = string.Format("{0:d}", tP);
int aP = ACServerManager.GetActualtPosition(axis.DeviceName, axis.GetAxisValue());
lblActual.Text = string.Format("{0:d}", aP);
lblT.Text = axis.TargetPosition.ToString();
if (axis.IsSameAxis(PortName, SlvAddr))
{
txtP.Text = lblActual.Text;
}
}
}
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();
Color color = Color.Black;
if (BoxBean.Config.Middle_Axis.IsSameAxis(axis.DeviceName, axis.GetAxisValue()))
{
color = Color.Red;
}
else if (BoxBean.Config.UpDown_Axis.IsSameAxis(axis.DeviceName, axis.GetAxisValue()))
{
color = Color.Blue;
}
else if (BoxBean.Config.InOut_Axis.IsSameAxis(axis.DeviceName, axis.GetAxisValue()))
{
color = Color.Green;
}
else if (BoxBean.Config.Comp_Axis.IsSameAxis(axis.DeviceName, axis.GetAxisValue()))
{
color = Color.Purple;
}
btnOpenAxis.ForeColor = color;
btnCloseAxis.ForeColor = color;
btnAxisAMove.ForeColor = color;
btnAxisRMove.ForeColor = color;
btnAxisVMove.ForeColor = color;
btnAxisReturnHome.ForeColor = color;
btnAxisStop.ForeColor = color;
btnComAlarmClear.ForeColor = color;
btnReadPosition.ForeColor = color;
btnGetAlarm.ForeColor = color;
}
}
private void AxisABSMove(ConfigMoveAxis moveAxis, int targetPosition, int targetSpeed)
{
moveAxis.TargetPosition = targetPosition;
ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed, 1, 1);
}
}
}
<?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

namespace OnlineStore.ACSingleStore.useControl
{
partial class uc_AxisDebug
{
/// <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.SuspendLayout();
//
// uc_AxisDebug
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Name = "uc_AxisDebug";
this.Size = new System.Drawing.Size(966, 594);
this.ResumeLayout(false);
}
#endregion
}
}
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.useControl
{
public partial class uc_AxisDebug : UserControl
{
public uc_AxisDebug()
{
InitializeComponent();
}
}
}
<?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
......@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.Common</RootNamespace>
<AssemblyName>Common</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
......@@ -33,9 +33,9 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\dll\log4net.dll</HintPath>
<HintPath>..\..\..\HuichuanLibrary\HuichuanLibrary\bin\Debug\log4net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\..\dll\Newtonsoft.Json.dll</HintPath>
......
......@@ -39,14 +39,14 @@ namespace OnlineStore.Common
public static string Store_ConfigPath = "Store_ConfigPath";
public static string Store_Position_Config = "Store_Position_Config";
///// <summary>
///// 摄像机名称,多个中间使用#分割
///// </summary>
//public static string CameraName = "CameraName";
///// <summary>
///// 需要识别的二维码类型,多个中间使用#分割
///// </summary>
//public static string CodeType = "CodeType";
/// <summary>
/// 摄像机名称,多个中间使用#分割
/// </summary>
public static string CameraName = "CameraName";
/// <summary>
/// 需要识别的二维码类型,多个中间使用#分割
/// </summary>
public static string CodeType = "CodeType";
/// <summary>
/// 开始吹气的判断值(配置值=服务器发送的湿度值-开始吹气值)
......@@ -57,10 +57,10 @@ namespace OnlineStore.Common
/// </summary>
public static string StopBlowValue = "StopBlowValue";
///// <summary>
///// 配置文件路径 Data Matrix ECC 200.dcm
///// </summary>
//public static string CodeParamPath = "CodeParamPath";
/// <summary>
/// 配置文件路径 Data Matrix ECC 200.dcm
/// </summary>
public static string CodeParamPath = "CodeParamPath";
/// <summary>
/// 进出轴最大待机点,需要小于3000
......@@ -84,7 +84,6 @@ namespace OnlineStore.Common
/// </summary>
public static string DeCodeType = "DeCodeType";
public static string DefaultPWD = "DefaultPWD";
public static string UseAIOBOX = "UseAIOBOX";
/// <summary>
/// 是否打开蜂鸣器
/// </summary>
......@@ -104,5 +103,6 @@ namespace OnlineStore.Common
public static string Default_Language= "Default_Language";
public static string MaxScanCount = "MaxScanCount";
public static string QRCodeCount = "MaxScanCount";
}
}
......@@ -65,6 +65,7 @@ namespace OnlineStore.Common
public string msg { get; set; }
public string msgEn { get; set; }
public string msgJp { get; set; }
/// <summary>
/// 包含的多个 BOX 的状态信息
/// </summary>
......@@ -100,6 +101,7 @@ namespace OnlineStore.Common
public string msg { get; set; }
public string msgEn { get; set; }
public string msgJp { get; set; }
/// <summary>
/// 温度
/// </summary>
......@@ -123,7 +125,7 @@ namespace OnlineStore.Common
public class AlarmInfo
{
public AlarmInfo(int StoreID, int aType, string alarmDetial, string WarnMsg,string alarmMsgEn, int inoutStatus)
public AlarmInfo(int StoreID, int aType, string alarmDetial, string WarnMsg,string alarmMsgEn, string alarmMsgJp, int inoutStatus)
{
// TODO: Complete member initialization
this.boxId = StoreID;
......@@ -132,6 +134,7 @@ namespace OnlineStore.Common
this.alarmMsg = WarnMsg;
this.inOutStatus = inoutStatus;
this.alarmMsgEn = alarmMsgEn;
this.alarmMsgJp = alarmMsgJp;
}
public AlarmInfo()
......@@ -163,6 +166,7 @@ namespace OnlineStore.Common
public string alarmDetail { get; set; }
public string alarmMsgEn { get; set; }
public string alarmMsgJp { get; set; }
/// <summary>
/// 报警消息
/// </summary>
......
......@@ -39,9 +39,18 @@
<Reference Include="Asa.IOModule.AIOBOX">
<HintPath>..\..\dll\Asa.IOModule.AIOBOX.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<Reference Include="CodeLibrary">
<HintPath>..\..\..\GeneralClassLibrary\CodeLibraryProject\CodeLibrary\bin\Debug\CodeLibrary.dll</HintPath>
</Reference>
<Reference Include="halcondotnet">
<HintPath>..\..\..\GeneralClassLibrary\CodeLibraryProject\CodeLibrary\bin\Debug\halcondotnet.dll</HintPath>
</Reference>
<Reference Include="HuichuanLibrary">
<HintPath>..\..\..\HuichuanLibrary\HuichuanLibrary\bin\Debug\HuichuanLibrary.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\dll\log4net.dll</HintPath>
<HintPath>..\..\..\HuichuanLibrary\HuichuanLibrary\bin\Debug\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
......@@ -58,19 +67,15 @@
<ItemGroup>
<Compile Include="acSingleStore\AC_SA_BoxBean.cs" />
<Compile Include="acSingleStore\AC_SA_BoxBean_Partial.cs" />
<Compile Include="acSingleStore\DoorControl.cs" />
<Compile Include="acSingleStore\StoreManager.cs" />
<Compile Include="dataLogic\DLScanSocket.cs" />
<Compile Include="IO\AIManager.cs" />
<Compile Include="IO\AIOBOX\AIOAIManager.cs" />
<Compile Include="IO\AIOBOX\AIOBOXManager.cs" />
<Compile Include="halcon\CodeManager.cs" />
<Compile Include="IO\HCIOManager.cs" />
<Compile Include="IO\IOManager.cs" />
<Compile Include="IO\KangNaiDe\AITcpClient.cs" />
<Compile Include="IO\KangNaiDe\KNDAIManager.cs" />
<Compile Include="IO\KangNaiDe\KNDManager.cs" />
<Compile Include="IO\KangNaiDe\MasterTcpClient.cs" />
<Compile Include="PanasonicServo\ACCMDManager.cs" />
<Compile Include="PanasonicServo\ACServerManager.cs" />
<Compile Include="PanasonicServo\ACServerManager_Partial.cs" />
<Compile Include="PanasonicServo\HC\HCAxisManager.cs" />
<Compile Include="ResourceControl.cs" />
<Compile Include="store\LineMoveP.cs" />
<Compile Include="store\LineAlarm.cs">
......@@ -111,6 +116,9 @@
<None Include="StoreConfig\AC\linePositions.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="StoreConfig\AC\StoreConfig - 复制.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="StoreConfig\AC\StoreConfig.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
......
......@@ -17,11 +17,11 @@ namespace OnlineStore.DeviceLibrary
bool isAIOBox = ConfigAppSettings.GetIntValue(Setting_Init.UseAIOBOX).Equals(1);
if (isAIOBox)
{
Instance = new AIOAIManager();
//Instance = new AIOAIManager();
}
else
{
Instance = new KNDAIManager();
//Instance = new KNDAIManager();
}
}
public static double ConvertAI(double aiValue, double defaultValue)
......
using HuichuanLibrary;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary.IO
{
public class HCIOManager : IOManager
{
public void CloseAllConnection()
{
HCBoardManager.CloseCard();
}
public void CloseAllDO()
{
HCBoardManager.CloseAllDO();
}
public bool ConnectionIOList(List<string> dIODeviceNameList)
{
if (!HCBoardManager.CardInitOk())
{
HCBoardManager.InitConfig("", "", "HCBOARD");
if (!HCBoardManager.OpenCard())
{
LogUtil.info("板卡第一次打开失败,关闭后重新打开");
HCBoardManager.CloseCard();
Thread.Sleep(2000);
return HCBoardManager.OpenCard();
}
}
return true;
}
public IO_VALUE GetDIValue(string deviceName, byte slaveID, ushort index)
{
short v = HCBoardManager.GetBitDI((short)index);
return (IO_VALUE)v;
}
public IO_VALUE GetDOValue(string deviceName, byte slaveID, ushort index)
{
short v = HCBoardManager.GetBitDO((short)index);
return (IO_VALUE)v;
}
public IO_VALUE GetIOValue(ConfigIO configIO)
{
short index =(short) configIO.GetIOAddr();
if (configIO.ProType=="DI")
return (IO_VALUE)HCBoardManager.GetBitDI(index);
else
return (IO_VALUE)HCBoardManager.GetBitDO(index);
}
public void ReadAllDI(string deviceName, byte slaveId)
{
}
public void ReadAllDO(string deviceName, byte slaveId)
{
}
public short GetAdVal(short index)
{
short v = HCBoardManager.GetAdVal(index);
return v;
}
public void WriteSingleDO(string deviceName, byte slaveId, ushort index, IO_VALUE value, int time)
{
try
{
short v = (short)value;
HCBoardManager.SetBitDO((short)index, v);
short targetV = 0;
if (v.Equals((short)0))
{
targetV = 1;
}
//写入之后,等待指定间隔后回写
System.Timers.Timer mytimer = new System.Timers.Timer(time);
mytimer.Elapsed += (o1, e1) =>
{
try
{
HCBoardManager.SetBitDO((short)index, targetV);
}
catch (Exception ex)
{
LogUtil.error("**********定时回写入 出错:" + ex.StackTrace);
}
};
mytimer.AutoReset = false;
mytimer.Enabled = true;
}
catch (Exception ex)
{
LogUtil.error("AIO WriteSingleDO [" + index + "] 出错:" + ex.ToString());
}
}
public void WriteSingleDO(string deviceName, byte slaveId, ushort index, IO_VALUE value)
{
short v = (short)value;
HCBoardManager.SetBitDO((short)index, v);
}
}
}
using OnlineStore.Common;
using OnlineStore.DeviceLibrary.IO;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
......@@ -10,59 +11,68 @@ namespace OnlineStore.DeviceLibrary
{
public abstract class IOManager
{
public static IOManager instance = null;
public abstract void ConnectionIOList(List<string> dIODeviceNameList);
public static HCIOManager instance = null;
#region KNDIO
public static void IOMove(string ioType, IO_VALUE ioValue)
public static void IOMove(string ioType, IO_VALUE ioValue, int subType=0)
{
if (StoreManager.Config.StoreDOList.ContainsKey(ioType))
if (string.IsNullOrEmpty(ioType))
{
return;
}
ConfigIO configIo = GetDO(ioType, subType);
if (configIo != null)
{
ConfigIO configIo = StoreManager.Config.StoreDOList[ioType];
//DateTime time = DateTime.Now;
instance.WriteSingleDO(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr(), ioValue);
//TimeSpan span = DateTime.Now - time;
//if (span.TotalMilliseconds > 100)
//{
// LogUtil.error("IOMove [" + ioType + "] ["+ioValue+"]耗时" + span.TotalMilliseconds);
//}
Thread.Sleep(60);
Thread.Sleep(10);
}
else
{
LogUtil.error("没有DO=" + ioType);
LogUtil.error("未找到DO,[" + ioType + "][" + subType + "]");
}
}
public static IO_VALUE IOValue(string ioType)
public static IO_VALUE IOValue(string ioType, int subType=0)
{
IO_VALUE ioValue = IO_VALUE.LOW;
if (StoreManager.Config.StoreDIList.ContainsKey(ioType))
if (string.IsNullOrEmpty(ioType))
{
return IO_VALUE.None;
}
IO_VALUE ioValue = IO_VALUE.None;
ConfigIO configIo = GetDI(ioType, subType);
if (configIo == null)
{
configIo = GetDO(ioType, subType);
}
if (configIo != null)
{
if (configIo.ProType.Equals(ConfigItemType.DI))
{
ConfigIO configIo = StoreManager.Config.StoreDIList[ioType];
ioValue = instance.GetDIValue(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr());
//UpdateDoValue(ioType, ioValue);
}
else if (StoreManager.Config.StoreDOList.ContainsKey(ioType))
else
{
ConfigIO configIo = StoreManager.Config.StoreDOList[ioType];
ioValue = instance.GetDOValue(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr());
}
}
else
{
LogUtil.error("没有DO=" + ioType);
LogUtil.error("未找到IO[" + ioType + "][" + subType + "]");
}
return ioValue;
}
public static IO_VALUE DOValue(string ioType)
public static IO_VALUE DOValue(string ioType, int subType=0)
{
IO_VALUE ioValue = IO_VALUE.LOW;
if (StoreManager.Config.StoreDOList.ContainsKey(ioType))
if (string.IsNullOrEmpty(ioType))
{
return IO_VALUE.None;
}
IO_VALUE ioValue = IO_VALUE.None;
ConfigIO configIo = GetDO(ioType, subType);
if (configIo != null)
{
ConfigIO configIo = StoreManager.Config.StoreDOList[ioType];
ioValue = instance.GetDOValue(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr());
}
else
......@@ -71,40 +81,106 @@ namespace OnlineStore.DeviceLibrary
}
return ioValue;
}
#endregion
public static void Init()
public static IO_VALUE DIValue(string ioType, int subType=0)
{
if (string.IsNullOrEmpty(ioType))
{
bool isAIOBox = ConfigAppSettings.GetIntValue(Setting_Init.UseAIOBOX).Equals(1);
if (isAIOBox)
return IO_VALUE.None;
}
IO_VALUE ioValue = IO_VALUE.None;
ConfigIO configIo = GetDI(ioType, subType);
if (configIo != null)
{
instance = new AIOBOXManager();
ioValue = instance.GetDIValue(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr());
}
else
{
instance = new KNDManager();
LogUtil.error("未找到 DI [" + ioType + "][" + subType + "]");
}
return ioValue;
}
internal static ConfigIO GetIO(string ioType, int subType=0)
{
ConfigIO configIo = GetDI(ioType, subType);
if (configIo == null)
{
configIo = GetDO(ioType, subType);
}
return configIo;
}
internal static ConfigIO GetDI(string ioType, int subType=0)
{
ConfigIO configIo = null;
if (subType <= 0)
{
if (StoreManager.Config.StoreDIList.ContainsKey(ioType))
{
return StoreManager.Config.StoreDIList[ioType];
}
}
else
{
if (StoreManager.allConfigMap.ContainsKey(subType))
{
if (StoreManager.allConfigMap[subType].StoreDIList.ContainsKey(ioType))
{
return StoreManager.allConfigMap[subType].StoreDIList[ioType];
}
}
public abstract void ReadAllDI(string deviceName, byte slaveId);
public abstract void ReadAllDO(string deviceName, byte slaveId);
public abstract void WriteSingleDO(string deviceName, byte slaveId, ushort index, IO_VALUE value, int time);
public abstract void WriteSingleDO(string deviceName, byte slaveId, ushort index, IO_VALUE value);
public abstract IO_VALUE GetDIValue(string deviceName, byte slaveID, ushort v);
public abstract IO_VALUE GetDOValue(string deviceName, byte slaveID, ushort v);
public abstract IO_VALUE GetIOValue(ConfigIO configIO);
public abstract void CloseAllDO();
}
if (configIo == null && subType > 0)
{
if (StoreManager.Config.StoreDIList.ContainsKey(ioType))
{
return StoreManager.Config.StoreDIList[ioType];
}
}
return configIo;
}
internal static ConfigIO GetDO(string ioType, int subType=0)
{
ConfigIO configIo = null;
if (subType <= 0)
{
if (StoreManager.Config.StoreDOList.ContainsKey(ioType))
{
return StoreManager.Config.StoreDOList[ioType];
}
}
else
{
if (StoreManager.allConfigMap.ContainsKey(subType))
{
if (StoreManager.allConfigMap[subType].StoreDOList.ContainsKey(ioType))
{
return StoreManager.allConfigMap[subType].StoreDOList[ioType];
}
}
}
if (configIo == null && subType > 0)
{
if (StoreManager.Config.StoreDOList.ContainsKey(ioType))
{
return StoreManager.Config.StoreDOList[ioType];
}
}
return configIo;
}
public abstract void CloseAllConnection();
public static short GetADIOValue(short ioAddr)
{
return instance.GetAdVal(ioAddr);
}
#endregion
public static void Init()
{
bool UseHCBoard = true;// ConfigAppSettings.GetIntValue(Setting_Init.UseHCBoard).Equals(1);
if (UseHCBoard)
{
instance = new HCIOManager();
}
}
}
}
......@@ -15,299 +15,59 @@ namespace OnlineStore.DeviceLibrary
public partial class ACServerManager
{
public static bool IsShowMsg = false ;
private static int SleepMSendons = 20;
private static int ReviceOutTimeMS = 100;
private static Dictionary<string, Dictionary<string, int>> ComAddrValue = new Dictionary<string, Dictionary<string, int>>();
private static string mapObj = "";
private static int GetAddrValue(string portName, int slvAddr, string addr)
{
int value = -1;
try
{
string name = portName + "_" + slvAddr;
Dictionary<string, int> map = null;
ComAddrValue.TryGetValue(name, out map);
if (map == null)
{
return -1;
}
if (map.ContainsKey(addr))
{
return map[addr];
}
}
catch (Exception ex)
{
LogUtil.error("UpdateAddrValue出错:" + ex.ToString());
}
return value;
}
private static void UpdateAddrValue(string portName, int slvAddr, string addr, int value)
{
try
{
lock (mapObj)
{
string name = portName + "_" + slvAddr;
Dictionary<string, int> map = null;
ComAddrValue.TryGetValue(name, out map);
if (map == null)
{
map = new Dictionary<string, int>();
ComAddrValue.Add(name, map);
}
if (map.ContainsKey(addr))
{
ComAddrValue[name][addr] = value;
}
else
{
ComAddrValue[name].Add(addr, value);
}
}
}
catch (Exception ex)
{
LogUtil.error("UpdateAddrValue出错:" + ex.ToString());
}
}
static HCAxisManager HCAxis = new HCAxisManager();
public static bool OpenPort(string portName)
{
if (serialBeanMap.ContainsKey(portName))
{
return true;
}
int ACBaudRate = ConfigAppSettings.GetIntValue(Setting_Init.ACBaudRate);
if (ACBaudRate <= 0)
{
ACBaudRate = 9600;
}
AcSerialBean bean = new AcSerialBean(portName, ACBaudRate, Parity.Even, 8, StopBits.One);
bool result = bean.openPort();
if (!result)
{
LogUtil.info("打开串口【" + portName + "】【" + ACBaudRate + "】失败");
return false;
}
LogUtil.info("打开串口【" + portName + "】【" + ACBaudRate + "】成功");
//bean.DataReceived += DataReceived;
if (serialBeanMap.ContainsKey(portName))
{
serialBeanMap.Remove(portName);
}
serialBeanMap.Add(portName, bean);
return true;
}
public static void ColsePort(string portName)
{
AcSerialBean bean = GetSerialBean(portName);
if (bean == null)
{
LogUtil.info("串口【" + portName + "】未打开,不需要关闭");
return;
}
//清理缓存
bean.clearInBuffer();
bean.clearOutBuffer();
bean.closePort();
if (serialBeanMap.ContainsKey(portName))
{
serialBeanMap.Remove(portName);
}
LogUtil.info("ACServerManager 关闭串口【" + portName + "】 ");
}
public static void CloseAllPort()
{
List<string> kes = new List<string>(serialBeanMap.Keys);
foreach (string key in kes)
{
ColsePort(key);
}
}
/// <summary>
/// 是否成功打开伺服
/// </summary>
public static bool ServerOnStatus(string portName, int slvAddr)
{
if (!serialBeanMap.ContainsKey(portName))
public static bool ServerOnStatus(string portName, short slvAddr)
{
return false ;
}
PreReadCoilAddr = ACCMDManager.ServerOn_Addr;
byte[] dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_ReadCoil, PreReadCoilAddr, "0000", 1);
//SendData(portName,dataArray);
byte[] reviceData = SendCommand(portName, dataArray, ReviceOutTimeMS, 6);
int result= GetCoilData(portName, reviceData, PreReadCoilAddr);
//TODO
return result>=1;
return HCAxis.IsServeoOn(portName, slvAddr);
}
/// <summary>
/// 是否原点返回完成
/// </summary>
public static bool IsHomeMoveEnd(string portName, int slvAddr)
public static bool IsHomeMoveEnd(string portName, short slvAddr)
{
int status = GetHomeEndStatus(portName, slvAddr);
bool isOk = ACServerManager.GetBusyStatus(portName, slvAddr).Equals(0);
if (status >= 1&&isOk)
{
return true;
} return false;
return HCAxis.IsHomeMoveEnd(portName, slvAddr);
}
public static void InitSlvAddr(string portName, int slvAddr)
{
InitSlvAddr(portName, slvAddr, 100, 30, 30 );
//InitSlvAddr(portName, slvAddr, 100, 30, 30, 100, 50, 30);
}
//把数字转换为四位的字符串
public static string SpeedToStr(int speed,int length)
{
string str = String.Format("{0:X}", speed);
return str.PadLeft(length, '0');
}
public static void InitSlvAddr(string portName, int slvAddr,int targetSpeed,int addSpeed,int delSpeed )
//public static void InitSlvAddr(string portName, int slvAddr,int targetSpeed,int addSpeed,int delSpeed,int homeHighSpeed,int homeLowSpeed,int homeAddSpeed)
{
LogUtil.info("开始初始化伺服【" + portName + "】【" + slvAddr + "】");
//写入block
int sleep = 50;
string slvAddrStr = string.Format(strFromat, slvAddr);
////block0=原点返回,正方向
//string str0 = slvAddrStr + "104800 000408 00000420 00000000 ffff";
//SendStrAndSleep(portName, str0, sleep);
////block1=原点返回,反方向
//string str1 = slvAddrStr + "104804 000408 04000420 00000000 ffff";
//SendStrAndSleep(portName, str1, sleep);
////block2=绝对位置运动
//string str2 = slvAddrStr + "104808 000408 10000211EC78FFFF ffff";
//SendStrAndSleep(portName, str2, sleep);
////block3=相对位置运动
//string str3 = slvAddrStr + "10480C 000408 10000111EC78FFFF ffff";
//SendStrAndSleep(portName, str3, sleep);
////block4=正方向匀速运动
//string str4 = slvAddrStr + "104810 000408 10000311 00000000 ffff";
//SendStrAndSleep(portName, str4, sleep);
////block5=反方向匀速运动
//string str5 = slvAddrStr + "104814 000408 14000311 00000000 ffff";
//SendStrAndSleep(portName, str5, sleep);
////block6=减速停止
//string str6 = slvAddrStr + "104818 000408 00000500 00000000 ffff";
//SendStrAndSleep(portName, str6, sleep);
////block7=紧急停止
//string str7 = slvAddrStr + "10481c 000408 00000510 00000000 ffff";
//SendStrAndSleep(portName, str7, sleep);
//0106460001009D12
//速度 V1 =100
string v1 = slvAddrStr + "064601 " + SpeedToStr(targetSpeed, 4) + " ffff";
SendStrAndSleep(portName, v1, sleep);
//加速度 A1 =30
string a1 = slvAddrStr + "064611 " + SpeedToStr(addSpeed, 4) + " ffff";
SendStrAndSleep(portName, a1, sleep);
//减速度 D1=30
string d1 = slvAddrStr + "064621 " + SpeedToStr(delSpeed, 4) + " ffff";
SendStrAndSleep(portName, d1, sleep);
////原点返回高速 homeHighSpeed=100
//SendStrAndSleep(portName, slvAddrStr + "06 4637 " + SpeedToStr(homeHighSpeed, 4) + " ffff", sleep);
////原点返回抵速 homeLowSpeed=50
//SendStrAndSleep(portName, slvAddrStr + "06 4638 " + SpeedToStr(homeLowSpeed, 4) + " ffff", sleep);
////原点返回加速度=30
//SendStrAndSleep(portName, slvAddrStr + "06 4639 " + SpeedToStr(homeAddSpeed, 4) + " ffff", sleep);
//UpdateEEPROM(portName, slvAddr);
}
public static void UpdateEEPROM(string portName, int slvAddr)
public static void ServoOn(string portName, short slvAddr)
{
string addr = ACCMDManager.EEPROM_Param_Addr;
string data = "6173";
int length = 2;
byte[] dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_WriteRegisters, addr, data, length);
SendData(portName, dataArray, 5);
}
public static void ServoOn(string portName, int slvAddr)
{
string addr = ACCMDManager.ServerOn_Addr;
string data = "FF00";
//byte cmd = 0x05;
int length = 2;
byte[] dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_WriteCoil, addr, data, length);
SendData(portName, dataArray);
HCAxis.ServoOn(portName, slvAddr);
}
public static void ServoOff(string portName, int slvAddr)
public static void ServoOff(string portName, short slvAddr)
{
string addr = ACCMDManager.ServerOn_Addr;
string data = "0000";
//byte cmd = 0x05;
int length = 2;
byte[] dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_WriteCoil, addr, data, length);
SendData(portName, dataArray);
HCAxis.ServoOff(portName, slvAddr);
}
public static void RelMove(string portName, int slvAddr, int position,int targetSpeed)
public static void RelMove(string portName, short slvAddr, int targetPosition, int targetSpeed, int ptpAcc, int ptpDec)
{
//先更新速度
string slvAddrStr = string.Format(strFromat, slvAddr);
string v1 = slvAddrStr + "064601 " + SpeedToStr(targetSpeed, 4) + " ffff";
SendStrAndSleep(portName, v1,SleepMSendons);
RelMove(portName, slvAddr, position);
HCAxis.RelMove(portName, slvAddr, targetPosition, targetSpeed, ptpAcc, ptpDec);
}
public static void RelMove(string portName, int slvAddr, int position)
{
//int position = Convert.ToInt32(txtPosition.Text);
byte[] positionData = AcSerialBean.StringToByte(position.ToString("X8"));
byte[] data = AcSerialBean.StringToByte("0110480C 000408 10000111EC78FFFF ffff");
data[0] = (byte)slvAddr;
data[data.Length - 1] = 0x00;
data[data.Length - 2] = 0x00;
if (positionData.Length == 4)
{
data[11] = positionData[2];
data[12] = positionData[3];
data[13] = positionData[0];
data[14] = positionData[1];
}
else if (positionData.Length == 3)
{
data[11] = positionData[1];
data[12] = positionData[2];
data[13] = 0x00;
data[14] = positionData[0];
}
else if (positionData.Length == 2)
{
data[11] = positionData[0];
data[12] = positionData[1];
data[13] = 0x00;
data[14] = 0x00;
}
else if (positionData.Length == 1)
{
data[11] = 0x00;
data[12] = positionData[0];
data[13] = 0x00;
data[14] = 0x00;
}
data = ACCMDManager.buildCheckData(data, data.Length - 2);
SendData(portName, data);
System.Threading.Thread.Sleep(SleepMSendons);
UpdateBlock(portName, slvAddr, ACCMDManager.Block_RelMove);
OpenAndCloseSTB(portName, slvAddr);
}
public static void HomeMove(string portName, int slvAddr, int speed)
public static void HomeMove(string portName, short slvAddr, int highVel,int lowVel,int acc)
{
try
{
......@@ -320,7 +80,7 @@ namespace OnlineStore.DeviceLibrary
{
int value = 2000;
LogUtil.info("轴【" + portName + "_" + slvAddr + "】原点返回时发现原点已亮且回过原点,需要先相对走" + value);
RelMove(portName, slvAddr, value);
HCAxis.RelMove(portName, slvAddr, value, highVel, acc, acc);
bool isStop = false;
for (int i = 0; i <= 10; i++)
{
......@@ -340,7 +100,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
int volSpeed = Math.Abs(speed / 5);
int volSpeed = Math.Abs(acc / 5);
int time = 1500;
LogUtil.info("轴【" + portName + "_" + slvAddr + "】原点返回时发现原点已亮但未回过原点,先匀速向上走" + time + ",速度[" + volSpeed + "]");
......@@ -357,50 +117,11 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil.error("轴【" + portName + "_" + slvAddr + "】原点返回前验证是否在原点出错:" + ex.StackTrace);
}
//默认负方向原点返回
UpdateBlock(portName, slvAddr, ACCMDManager.Block_HomeMove1);
Thread.Sleep(SleepMSendons);
OpenAndCloseSTB(portName, slvAddr);
HCAxis.HomeMove(portName, slvAddr, highVel, lowVel, acc);
}
public static void SetSpeed(string portName, int slvAddr, int speed)
{
speed = Math.Abs(speed);
int preSpeed = GetAddrValue(portName, slvAddr, ACCMDManager.Speed_Addr);
if ((preSpeed.Equals(-1)) || (!preSpeed.Equals(speed)))
{
string v1 = slvAddr + "064601 " + ACServerManager.SpeedToStr(speed, 4) + " ffff";
LogUtil.debug("轴【" + portName + "_" + slvAddr + "】更新速度为【" + speed + "】,发送数据【" + v1 + "】");
Thread.Sleep(SleepMSendons);
for (int i = 1; i <= 3; i++)
public static void SpeedMove(string portName, short slvAddr, int speed)
{
bool result = SendStrAndSleep(portName, v1, SleepMSendons);
if (result)
{
break;
}
else
{
LogUtil.error("轴【" + portName + "_" + slvAddr + "】更新速度为【" + speed + "】,发送数据【" + v1 + "】,第【" + i + "】次失败");
Thread.Sleep(SleepMSendons);
}
}
UpdateAddrValue(portName, slvAddr, ACCMDManager.Speed_Addr, speed);
Thread.Sleep(SleepMSendons);
}
}
public static void SpeedMove(string portName, int slvAddr, int speed)
{
SetSpeed(portName, slvAddr, speed);
if (speed > 0)
{
UpdateBlock(portName, slvAddr, ACCMDManager.Block_VolMove0);
}
else
{
UpdateBlock(portName, slvAddr, ACCMDManager.Block_VolMove1);
}
//Thread.Sleep(SleepMSendons);
OpenAndCloseSTB(portName, slvAddr);
HCAxis.SpeedMove(portName, slvAddr, speed);
}
public static bool isInPosition(ConfigMoveAxis Axis, int PPosition)
......@@ -417,67 +138,10 @@ namespace OnlineStore.DeviceLibrary
}
}
public static void AbsMove(string portName, int slvAddr, int targetPosition, int targetSpeed)
{
//先更新速度
string slvAddrStr = string.Format(strFromat, slvAddr);
int preSpeed = GetAddrValue(portName,slvAddr, ACCMDManager.Speed_Addr);
if ((preSpeed.Equals(-1)) || (!preSpeed.Equals(targetSpeed)))
public static void AbsMove(string portName, short slvAddr, int targetPosition, int targetSpeed, int ptpAcc, int ptpDec)
{
//速度 V1 =100
string v1 = slvAddrStr + "064601 " + SpeedToStr(targetSpeed, 4) + " ffff";
SendStrAndSleep(portName, v1, SleepMSendons);
UpdateAddrValue(portName,slvAddr, ACCMDManager.Speed_Addr, targetSpeed);
}
//绝对运动
AbsMove(portName, slvAddr, targetPosition);
}
public static void AbsMove(string portName, int slvAddr, int position)
{
//int position = Convert.ToInt32(txtPosition.Text, 10);
byte[] positionData = AcSerialBean.StringToByte(position.ToString("X8"));
byte[] data = AcSerialBean.StringToByte("01104808 000408 10000211 EC78FFFF ffff");
data[0] = (byte)slvAddr;
data[data.Length - 1] = 0x00;
data[data.Length - 2] = 0x00;
if (positionData.Length == 4)
{
data[11] = positionData[2];
data[12] = positionData[3];
data[13] = positionData[0];
data[14] = positionData[1];
}
else if (positionData.Length == 3)
{
data[11] = positionData[1];
data[12] = positionData[2];
data[13] = 0x00;
data[14] = positionData[0];
}
else if (positionData.Length == 2)
{
data[11] = positionData[0];
data[12] = positionData[1];
data[13] = 0x00;
data[14] = 0x00;
}
else if (positionData.Length == 1)
{
data[11] = 0x00;
data[12] = positionData[0];
data[13] = 0x00;
data[14] = 0x00;
}
data = ACCMDManager.buildCheckData(data, data.Length - 2);
SendData(portName, data);
Thread.Sleep(SleepMSendons);
UpdateBlock(portName, slvAddr, ACCMDManager.Block_AbsMove);
//data = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_WriteRegisters, ACCMDManager.BlockNo, ACCMDManager.Block_AbsMove, 2);
//SendData(portName, data);
//Thread.Sleep(SleepMSendons);
OpenAndCloseSTB(portName, slvAddr);
HCAxis.AbsMove(portName, slvAddr, targetPosition, targetSpeed, ptpAcc, ptpDec);
}
}
}
......@@ -13,250 +13,6 @@ namespace OnlineStore.DeviceLibrary
partial class ACServerManager
{
private static Dictionary<int, Dictionary<string, RegisterInfo>> LastDataMap = new Dictionary<int, Dictionary<string, RegisterInfo>>();
//private static SerialBean bean = null;
private static string strFromat = "{0:X2}";
private static Dictionary<string, AcSerialBean> serialBeanMap = new Dictionary<string, AcSerialBean>();
private static AcSerialBean GetSerialBean(string portName)
{
if (serialBeanMap.ContainsKey(portName))
{
return serialBeanMap[portName];
}
return null;
}
public static bool SendStrAndSleep(string portName, string str, int sleepS)
{
byte[] data = AcSerialBean.StringToByte(str);
data[data.Length - 1] = 0x00;
data[data.Length - 2] = 0x00;
data = ACCMDManager.buildCheckData(data, data.Length - 2);
bool result = SendData(portName, data);
System.Threading.Thread.Sleep(sleepS);
return result;
}
public static void SaveData(string portName, byte slvAddr, string regAddr, int value)
{
if (LastDataMap.ContainsKey(slvAddr))
{
if (LastDataMap[slvAddr].ContainsKey(regAddr))
{
LastDataMap[slvAddr][regAddr] = new RegisterInfo(slvAddr, regAddr, value);
}
else
{
LastDataMap[slvAddr].Add(regAddr, new RegisterInfo(slvAddr, regAddr, value));
}
}
else
{
Dictionary<string, RegisterInfo> map = new Dictionary<string, RegisterInfo>();
map.Add(regAddr, new RegisterInfo(slvAddr, regAddr, value));
LastDataMap.Add(slvAddr, map);
}
}
public static RegisterInfo GetData(string portName, byte slvAddr, string regAddr)
{
if (LastDataMap.ContainsKey(slvAddr))
{
if (LastDataMap[slvAddr].ContainsKey(regAddr))
{
return LastDataMap[slvAddr][regAddr];
}
}
return null;
}
public static void SendData(string portName, byte[] data, int reviceLength)
{
if (data == null)
{
return;
}
byte[] returnData = SendCommand(portName, data, ReviceOutTimeMS, reviceLength);
string strSend = "";
for (int i = 0; i < returnData.Length; i++)
{
strSend += string.Format("{0:X2} ", returnData[i]);
}
if (IsShowMsg)
{
LogUtil.info( "串口" + portName + " 收到数据:" + strSend + "");
}
}
public static bool SendData(string portName, byte[] data)
{
if (data == null)
{
return false;
}
bool result = false;
byte[] returnData = SendCommand(portName, data, ReviceOutTimeMS, 8, out result);
if (returnData != null)
{
string strSend = "";
for (int i = 0; i < returnData.Length; i++)
{
strSend += string.Format("{0:X2} ", returnData[i]);
}
if (IsShowMsg)
{
LogUtil.info("串口" + portName + " 收到数据:" + strSend + "");
}
}
return result;
}
/// <summary>
/// 发送数据并获取返回值
/// </summary>
/// <param name="data">发送的数据</param>
/// <param name="outTime">超时时间</param>
/// <returns>返回值的长度</returns>
public static byte[] SendCommand(string portName, byte[] data, int outTime, int reviceLength)
{
if (outTime <100)
{
outTime = 100;
}
byte[] returnData = null;
try
{
if (data == null)
{
return returnData;
}
string strSend = "";
for (int i = 0; i < data.Length; i++)
{
strSend += string.Format("{0:X2} ", data[i]);
}
if (strSend.Equals(""))
{
return returnData;
}
if (IsShowMsg)
{
LogUtil.info( "串口" + portName + " 写入数据:" + strSend + "");
}
AcSerialBean bean = GetSerialBean(portName);
if (bean == null)
{
LogUtil.debug("ACServerManager SendCommand 试图向未打开串口【" + portName + "】写入数据:" + strSend + "。");
}
else
{
int ret= bean.SendCommand(data, ref returnData, outTime, reviceLength);
string rDataStr = AcSerialBean.ByteToString(returnData);
if (!ret.Equals(reviceLength))
{
LogUtil.error("串口" + portName + " 写入数据:" + strSend + ",预计返回字节数【"+reviceLength+"】实际返回【"+ret+"】【"+rDataStr+"】");
}
System.Threading.Thread.Sleep(2);
}
}
catch (Exception ex)
{
LogUtil.info(ex.ToString());
}
return returnData;
}
/// <summary>
/// 发送数据并获取返回值
/// </summary>
/// <param name="data">发送的数据</param>
/// <param name="outTime">超时时间</param>
/// <param name="result">返回结果,是否发送成功</param>
/// <returns>返回值的长度</returns>
public static byte[] SendCommand(string portName, byte[] data, int outTime, int reviceLength, out bool result)
{
if (outTime < 100)
{
outTime = 100;
}
byte[] returnData = null;
result = false;
try
{
if (data == null)
{
return returnData;
}
string strSend = "";
for (int i = 0; i < data.Length; i++)
{
strSend += string.Format("{0:X2} ", data[i]);
}
if (strSend.Equals(""))
{
return returnData;
}
if (IsShowMsg)
{
LogUtil.info("串口" + portName + " 写入数据:" + strSend + "");
}
AcSerialBean bean = GetSerialBean(portName);
if (bean == null)
{
LogUtil.debug("ACServerManager SendCommand 试图向未打开串口【" + portName + "】写入数据:" + strSend + "。");
}
else
{
int ret = bean.SendCommand(data, ref returnData, outTime, reviceLength);
if (!ret.Equals(reviceLength))
{
string datastr = AcSerialBean.ByteToString(returnData);
LogUtil.error("串口" + portName + " 写入数据:" + strSend + ",预计返回字节数【" + reviceLength + "】实际返回【" + ret + "】:"+ datastr);
}
else
{
result = true;
}
System.Threading.Thread.Sleep(2);
}
}
catch (Exception ex)
{
LogUtil.info(ex.ToString());
}
return returnData;
}
public static void WriteData(string portName, int slvAddr, string addr, string data, byte cmd, int length)
{
byte[] dataArray = ACCMDManager.GetWriteData(slvAddr, cmd, addr, data, length);
SendData(portName, dataArray);
}
public static void SendStr(string portName, int slvAddr, string str)
{
//string str = txtSendStr.Text;
byte[] data = AcSerialBean.StringToByte(str);
data[data.Length - 1] = 0x00;
data[data.Length - 2] = 0x00;
data = ACCMDManager.buildCheckData(data, data.Length - 2);
SendData(portName, data);
}
public static void Stop(string portName, int slvAddr)
{
//RunBlock(6);
string addr = ACCMDManager.Stop_Addr;
string data = "FF00";
//byte cmd = 0x05;
int length = 2;
byte[] dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_WriteCoil, addr, data, length);
SendData(portName, dataArray);
System.Threading.Thread.Sleep(1000);
data = "0000";
dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_WriteCoil, addr, data, length);
SendData(portName, dataArray);
}
public static void SuddenStop(ConfigMoveAxis axis)
{
if (GetBusyStatus(axis.DeviceName, axis.GetAxisValue()).Equals(1))
......@@ -264,312 +20,57 @@ namespace OnlineStore.DeviceLibrary
SuddenStop(axis.DeviceName, axis.GetAxisValue());
}
}
public static void SuddenStop(string portName, int slvAddr)
{
// RunBlock(7);
string addr = ACCMDManager.SDStop_Addr;
string data = "FF00";
//byte cmd = 0x05;
int length = 2;
byte[] dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_WriteCoil, addr, data, length);
for (int i = 1; i <= 3; i++)
{
bool result = SendData(portName, dataArray);
if (result)
public static void SuddenStop(string portName, short slvAddr)
{
System.Threading.Thread.Sleep(500);
data = "0000";
dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_WriteCoil, addr, data, length);
result = SendData(portName, dataArray);
break;
}
else
{
LogUtil.error("【" + portName + "_" + slvAddr + "】 , 第" + i + "次,SuddenStop 发送数据失败");
Thread.Sleep(180);
}
}
HCAxis.SuddenStop(portName, slvAddr);
}
public static void OpenAndCloseSTB(string portName, int slvAddr)
{
if (GetBusyStatus(portName, slvAddr).Equals(1))
public static void AlarmClear(string portName, short slvAddr)
{
LogUtil.error("伺服【" + portName + "_" + slvAddr + "】OpenSTB时发现 busy=1,直接返回");
return;
HCAxis.AlarmClear(portName, slvAddr);
}
System.Threading.Thread.Sleep(SleepMSendons);
if (GetSTBState(portName, slvAddr).Equals(1))
{
LogUtil.error("伺服【" + portName + "_" + slvAddr + "】OpenSTB时发现 STB=ON,先关闭STB");
CloseSTB(portName, slvAddr);
System.Threading.Thread.Sleep(SleepMSendons);
if (GetSTBState(portName, slvAddr).Equals(1))
public static int GetTargetPosition(string portName, short slvAddr)
{
LogUtil.error("伺服【" + portName + "_" + slvAddr + "】OpenSTB时发现 STB=ON,先关闭STB 后发现STB仍为ON,直接返回");
return;
}
}
OnlyOpenSTB(portName, slvAddr);
System.Threading.Thread.Sleep(200);
CloseSTB(portName, slvAddr);
System.Threading.Thread.Sleep(SleepMSendons);
return HCAxis.GetTargetPosition(portName, slvAddr);
}
public static void OnlyOpenSTB(string portName, int slvAddr)
public static int GetActualtPosition(string portName, short slvAddr)
{
string addr = ACCMDManager.STB_Addr;
string data = "FF00";
int length = 2;
byte[] dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_WriteCoil, addr, data, length);
SendData(portName, dataArray);
}
public static void CloseSTB(string portName, int slvAddr)
{
string addr = ACCMDManager.STB_Addr;
string data = "0000";
int length = 2;
byte[] dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_WriteCoil, addr, data, length);
SendData(portName, dataArray);
return HCAxis.GetActualtPosition(portName, slvAddr);
}
public static void UpdateBlock(string portName, int slvAddr, string blockNum)
{
int preNum = GetAddrValue(portName,slvAddr, ACCMDManager.BlockNo);
if (preNum.Equals(-1) || (!preNum.ToString().Equals(blockNum)))
public static int GetAlarmStatus(string portName, short slvAddr)
{
byte[] data = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_WriteRegisters, ACCMDManager.BlockNo, blockNum , 2);
SendData(portName, data);
int value = Convert.ToInt16(blockNum);
UpdateAddrValue(portName,slvAddr, ACCMDManager.BlockNo, value);
Thread.Sleep(SleepMSendons);
return HCAxis.GetAlarmStatus(portName, slvAddr);
}
}
public static void AlarmClear(string portName, int slvAddr)
{
string addr = ACCMDManager.Clear_Alarm_Addr;
string data = "FF00";
//byte cmd = 0x05;
int length = 2;
byte[] dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_WriteCoil, addr, data, length);
SendData(portName, dataArray);
System.Threading.Thread.Sleep(200);
data = "0000";
dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_WriteCoil, addr, data, length);
SendData(portName, dataArray);
}
public static void CloseAlarmClear(string portName, int slvAddr)
{
string addr = ACCMDManager.Clear_Alarm_Addr;
string data = "0000";
//byte cmd = 0x05;
int length = 2;
byte[] dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_WriteCoil, addr, data, length);
SendData(portName, dataArray);
}
private static string PreReadAddr = "";
private static string PreReadCoilAddr = "";
public static int GetRegisterData(string portName, byte[] reviceData, string Address)
{
if (reviceData != null && reviceData.Length > 0)
{
string strSend = "";
for (int i = 0; i < reviceData.Length; i++)
{
strSend += string.Format("{0:X2} ", reviceData[i]);
}
if (IsShowMsg)
{
LogUtil.info( "串口" + portName + " 收到数据:" + strSend + "");
}
string strFromat = "{0:X2}";
byte slvAddrR = reviceData[0];
int lenth = reviceData[2];
byte cmd = reviceData[1];
if (cmd.Equals(ACCMDManager.CMD_ReadRegisters) && reviceData.Length > 6 && lenth == 4)
public static int GetBusyStatus(string portName, short slvAddr)
{
string str = string.Format(strFromat, reviceData[5]) + string.Format(strFromat, reviceData[6]) + string.Format(strFromat, reviceData[3]) + string.Format(strFromat, reviceData[4]);
int value = Convert.ToInt32(str.Trim().Replace(" ", ""), 16);
SaveData(portName, slvAddrR, Address, value);
return value;
}
return HCAxis.GetBusyStatus(portName, slvAddr);
}
return -1;
}
public static int GetTargetPosition(string portName, int slvAddr)
{
PreReadAddr = ACCMDManager.TargetPostion;
byte[] dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_ReadRegisters, ACCMDManager.TargetPostion, "0000", 2);
// SendData(portName,dataArray);
byte[] reviceData = SendCommand(portName, dataArray, ReviceOutTimeMS, 9);
return GetRegisterData(portName, reviceData, ACCMDManager.TargetPostion);
}
public static int GetActualtPosition(ConfigMoveAxis axis)
public static int GetHomeEndStatus(string portName, short slvAddr)
{
return GetActualtPosition(axis.DeviceName, axis.GetAxisValue());
return HCAxis.GetHomeEndStatus(portName, slvAddr);
}
public static int GetActualtPosition(string portName, int slvAddr,int rGetCount=3)
{
PreReadAddr = ACCMDManager.ActualPosition;
byte[] dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_ReadRegisters, ACCMDManager.ActualPosition, "0000", 2);
// SendData(portName,dataArray);
byte[] reviceData = SendCommand(portName, dataArray, ReviceOutTimeMS, 9);
int result = -1;
for (int i = 1; i <= rGetCount; i++)
{
result = GetRegisterData(portName, reviceData, ACCMDManager.ActualPosition);
if (!result.Equals(-1))
{
break;
}
else
public static int GetHomeSingle(string portName, short slvAddr)
{
LogUtil.error("第" + i + "次获取" + portName + "_" + slvAddr + "的实时位置" + result);
}
Thread.Sleep(180);
}
return result;
}
public static int GetCoilData(string portName, byte[] reviceData, string Address)
{
if (reviceData != null && reviceData.Length > 0)
{
string strSend = "";
for (int i = 0; i < reviceData.Length; i++)
{
strSend += string.Format("{0:X2} ", reviceData[i]);
}
if (IsShowMsg)
{
LogUtil.info( "串口" + portName + " 收到数据:" + strSend + "");
}
string strFromat = "{0:X2}";
byte slvAddrR = reviceData[0];
int lenth = reviceData[2];
byte cmd = reviceData[1];
if (cmd.Equals(ACCMDManager.CMD_ReadCoil) && reviceData.Length >= 6 && lenth == 1)
{
string str = string.Format(strFromat, reviceData[3]);
int value = Convert.ToInt32(str.Trim().Replace(" ", ""), 16);
SaveData(portName, slvAddrR, Address, value);
return value;
}
}
return -1;
}
public static int GetAlarmStatus(string portName, int slvAddr)
{
PreReadCoilAddr = ACCMDManager.Alarm_Status;
byte[] dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_ReadCoil, PreReadCoilAddr, "0000", 1);
//SendData(portName,dataArray);
byte[] reviceData = SendCommand(portName, dataArray, ReviceOutTimeMS, 6);
return GetCoilData(portName, reviceData, PreReadCoilAddr);
}
public static int GetBusyStatus(string portName, int slvAddr)
{
PreReadCoilAddr = ACCMDManager.BUSYStatus;
byte[] dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_ReadCoil, ACCMDManager.BUSYStatus, "0000", 1);
//SendData(portName,dataArray);
byte[] reviceData = SendCommand(portName, dataArray, ReviceOutTimeMS, 6);
return GetCoilData(portName, reviceData, ACCMDManager.BUSYStatus);
}
public static int GetHomeEndStatus(string portName, int slvAddr)
{
PreReadCoilAddr = ACCMDManager.HOME_CMP_Status;
byte[] dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_ReadCoil, ACCMDManager.HOME_CMP_Status, "0000", 1);
//SendData(portName,dataArray);
byte[] reviceData = SendCommand(portName, dataArray, ReviceOutTimeMS, 6);
return GetCoilData(portName, reviceData, ACCMDManager.HOME_CMP_Status);
}
public static int GetHomeSingle(string portName, int slvAddr)
{
PreReadCoilAddr = ACCMDManager.Home_Single;
byte[] dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_ReadCoil, ACCMDManager.Home_Single, "0000", 1);
byte[] reviceData = SendCommand(portName, dataArray, ReviceOutTimeMS, 6);
return GetCoilData(portName, reviceData, ACCMDManager.Home_Single);
}
/// <summary>
/// 获取STB信号值,1=On,0=OFF
/// </summary>
/// <param name="portName"></param>
/// <param name="slvAddr"></param>
/// <returns></returns>
public static int GetSTBState(string portName, int slvAddr)
{
PreReadCoilAddr = ACCMDManager.STB_State;
byte[] dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_ReadCoil, ACCMDManager.STB_State, "0000", 1);
byte[] reviceData = SendCommand(portName, dataArray, ReviceOutTimeMS, 6);
return GetCoilData(portName, reviceData, ACCMDManager.STB_State);
}
/// <summary>
/// 负极限
/// </summary>
public static int GetLimitNegativeSingle(string portName, int slvAddr)
{
PreReadCoilAddr = ACCMDManager.Home_Single;
byte[] dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_ReadCoil, ACCMDManager.Limit_Negative_Single, "0000", 1);
byte[] reviceData = SendCommand(portName, dataArray, ReviceOutTimeMS, 6);
return GetCoilData(portName, reviceData, ACCMDManager.Home_Single);
return HCAxis.GetHomeSingle(portName, slvAddr);
}
/// <summary>
/// 负极限
/// </summary>
public static int GetLimitNegativeSingle(ConfigMoveAxis axis)
{
return GetLimitNegativeSingle(axis.DeviceName, axis.GetAxisValue());
}
/// <summary>
/// 正极限
/// </summary>
public static int GetLimitPositiveSingle(ConfigMoveAxis axis)
public static int GetLimitNegativeSingle(string portName, short slvAddr)
{
return GetLimitPositiveSingle(axis.DeviceName, axis.GetAxisValue());
return HCAxis.GetLimitNegativeSingle(portName, slvAddr);
}
/// <summary>
/// 正极限
/// </summary>
public static int GetLimitPositiveSingle(string portName, int slvAddr)
{
PreReadCoilAddr = ACCMDManager.Home_Single;
byte[] dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_ReadCoil, ACCMDManager.Limit_Positive_Single, "0000", 1);
byte[] reviceData = SendCommand(portName, dataArray, ReviceOutTimeMS, 6);
return GetCoilData(portName, reviceData, ACCMDManager.Home_Single);
}
}
/// <summary>
/// 记录最后一次获得的寄存器的值
/// </summary>
public class RegisterInfo
{
public RegisterInfo(int slv, string addr, int data)
public static int GetLimitPositiveSingle(string portName, short slvAddr)
{
this.SlvAddr = slv;
this.RegisterAddr = addr;
this.LastData = data;
this.LastTime = new DateTime();
return HCAxis.GetLimitPositiveSingle(portName, slvAddr);
}
public int SlvAddr { get; set; }
public string RegisterAddr { get; set; }
public int LastData { get; set; }
public DateTime LastTime { get; set; }
}
}
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
public abstract class AxisManager
{
public bool IsShowMsg = false;
public static AxisManager instance;
public static bool UseHCBoard = true;
public static void Init()
{
// UseHCBoard = ConfigAppSettings.GetIntValue(Setting_Init.UseHCBoard).Equals(1);
if (UseHCBoard)
{
instance = new HCAxisManager();
}
else
{
//instance = new ACServerManager();
}
}
#region 485通信方法
/// <summary>
/// 废弃return true
/// </summary>
/// <param name="portName"></param>
/// <returns></returns>
public abstract bool OpenPort(string portName);
/// <summary>
/// 松下专用
/// </summary>
/// <param name="portName"></param>
public abstract void ColsePort(string portName);
/// <summary>
/// 松下专用
/// </summary>
public abstract void CloseAllPort();
/// <summary>
/// 松下专用
/// </summary>
public abstract void ClearSpeed();
/// <summary>
/// 松下专用
/// </summary>
/// <param name="portName"></param>
/// <param name="slvAddr"></param>
/// <param name="targetSpeed"></param>
/// <param name="addSpeed"></param>
/// <param name="delSpeed"></param>
public abstract void InitSlvAddr(string portName, short slvAddr, int targetSpeed, int addSpeed, int delSpeed);
public abstract bool IsServeoOn(string portName, short slvAddr);
#endregion
public abstract bool OpenCard();
public abstract bool CloseCard();
public abstract bool IsHomeMoveEnd(string portName, short slvAddr);
public abstract bool AbsMoveIsEnd(string portName, short axisNo, int targetPosition, int canErrorCount, out bool countError);
public abstract void ServoOn(string portName, short slvAddr);
public abstract void ServoOff(string portName, short slvAddr);
public abstract void RelMove(string portName, short slvAddr, int position, int targetSpeed , int ptpAcc , int ptpDec );
public abstract void HomeMove(string portName, short slvAddr, int highVel, int lowVel, int acc);
public abstract void SpeedMove(string portName, short slvAddr, int speed);
public abstract void SuddenStop(string portName, short slvAddr);
public abstract bool isInPosition(string portName, short slvAddr, int PPosition, int canErrorCount, bool isLog = false);
public abstract void AbsMove(string portName, short slvAddr, int targetPosition, int targetSpeed , int ptpAcc , int ptpDec );
public abstract void AlarmClear(string portName, short slvAddr);
public abstract int GetTargetPosition(string portName, short slvAddr);
public abstract int GetActualtPosition(string portName, short slvAddr);
public abstract int GetAlarmStatus(string portName, short slvAddr);
public abstract int GetBusyStatus(string portName, short slvAddr);
public abstract int GetHomeEndStatus(string portName, short slvAddr);
public abstract int GetHomeSingle(string portName, short slvAddr);
/// <summary>
/// 负极限
/// </summary>
public abstract int GetLimitNegativeSingle(string portName, short slvAddr);
/// <summary>
/// 正极限
/// </summary>
public abstract int GetLimitPositiveSingle(string portName, short slvAddr);
public abstract short GetErrorCode(string portName, short slvAddr);
public static void SuddenStop(ConfigMoveAxis axis)
{
if (instance.GetBusyStatus(axis.DeviceName, axis.GetAxisValue()).Equals(1))
{
instance.SuddenStop(axis.DeviceName, axis.GetAxisValue());
}
}
}
}
using HuichuanLibrary;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
public class HCAxisManager
{
public bool OpenCard()
{
return HCBoardManager.OpenCard();
}
public bool CloseCard()
{
return HCBoardManager.CloseCard();
}
public void AbsMove(string portName, short slvAddr, int targetPosition, int targetSpeed, int ptpAcc, int ptpDec)
{
HCLogUtil.LOGGER.Info($"slvAddr={slvAddr},targetPosition={targetPosition},targetSpeed={targetSpeed},ptpAcc={ptpAcc},ptpDec={ptpDec}");
HCBoardManager.AbsMove((short)slvAddr, targetPosition, targetSpeed, ptpAcc, ptpDec);
}
public void AlarmClear(string portName, short slvAddr)
{
HCBoardManager.ClearAxisSts((short)slvAddr);
}
public bool OpenPort(string portName)
{
return true;
}
public void ClearSpeed()
{
}
public void CloseAllPort()
{
}
public void ColsePort(string portName)
{
}
public void InitSlvAddr(string portName, short slvAddr, int targetSpeed, int addSpeed, int delSpeed)
{
}
public int GetActualtPosition(string portName, short slvAddr)
{
return (int)HCBoardManager.GetAxisCurrPos(slvAddr);
}
public int GetAlarmStatus(string portName, short slvAddr)
{
AxisSts axisS = HCBoardManager.GetAxisSts(slvAddr);
return axisS.ALM;
}
public int GetBusyStatus(string portName, short slvAddr)
{
AxisSts axisS = HCBoardManager.GetAxisSts(slvAddr);
return axisS.BUSY;
}
public int GetHomeEndStatus(string portName, short slvAddr)
{
return (int)HCBoardManager.GetHomeStatus(slvAddr);
}
public int GetHomeSingle(string portName, short slvAddr)
{
AxisSts axisS = HCBoardManager.GetAxisSts(slvAddr);
return axisS.ALM;
}
public int GetLimitNegativeSingle(string portName, short slvAddr)
{
AxisSts axisS = HCBoardManager.GetAxisSts(slvAddr);
return axisS.NEL;
}
public int GetLimitPositiveSingle(string portName, short slvAddr)
{
AxisSts axisS = HCBoardManager.GetAxisSts(slvAddr);
return axisS.PEL;
}
public int GetTargetPosition(string portName, short slvAddr)
{
return (int)HCBoardManager.GetAxisPrfPos(slvAddr);
}
public void HomeMove(string portName, short slvAddr, int highVel, int lowVel, int acc)
{
HCBoardManager.StartHomeMove(slvAddr, (uint)highVel, (uint)lowVel, (uint)acc);
}
public bool IsHomeMoveEnd(string portName, short slvAddr)
{
return HCBoardManager.HomeingIsEnd(slvAddr);
}
public bool isInPosition(string portName, short slvAddr, int PPosition, int canErrorCount, bool isLog = false)
{
return HCBoardManager.IsInPosition(slvAddr, PPosition, canErrorCount);
}
public void RelMove(string portName, short slvAddr, int position, int targetSpeed, int ptpAcc, int ptpDec)
{
HCBoardManager.RelMove(slvAddr, position, targetSpeed, ptpAcc, ptpDec);
}
public bool IsServeoOn(string portName, short slvAddr)
{
AxisSts axisS = HCBoardManager.GetAxisSts(slvAddr);
return axisS.ServoOn.Equals(1);
}
public void ServoOff(string portName, short slvAddr)
{
HCBoardManager.ServoOff(slvAddr);
}
public void ServoOn(string portName, short slvAddr)
{
HCBoardManager.ServoOn(slvAddr);
}
public void SpeedMove(string portName, short slvAddr, int speed)
{
HCBoardManager.SpeedMove(slvAddr, speed);
}
public void SuddenStop(string portName, short slvAddr)
{
HCBoardManager.AxisStop(slvAddr);
}
public bool AbsMoveIsEnd(string portName, short axisNo, int targetPosition, int canErrorCount, out bool countError)
{
countError = false;
bool isOk = HCBoardManager.MoveIsEnd(axisNo);
if (isOk)
{
if (HCBoardManager.IsInPosition(axisNo, targetPosition, canErrorCount))
{
return true;
}
else
{
countError = true;
}
}
return false;
}
public short GetErrorCode(string portName, short slvAddr)
{
AxisSts axisS = HCBoardManager.GetAxisSts(slvAddr);
HCLogUtil.LOGGER.Info(axisS.ToStr());
return HCBoardManager.GetAxErrCode(slvAddr);
}
}
}
......@@ -20,6 +20,8 @@ namespace OnlineStore.DeviceLibrary
public delegate string GetEnglishStringDelegate(string id, params object[] param);
public static event GetEnglishStringDelegate GetEnglishStringEvent;
public delegate string GetJapaneseStringDelegate(string id, params object[] param);
public static event GetJapaneseStringDelegate GetJapaneseStringEvent;
public static string GetMsgStr(string value)
{
......@@ -49,7 +51,10 @@ namespace OnlineStore.DeviceLibrary
public static string GetEnglishString(string id, params object[] param)
{
return GetEnglishStringEvent?.Invoke(id, param);
}
public static string GetJapaneseString(string id, params object[] param)
{
return GetJapaneseStringEvent?.Invoke(id, param);
}
/// <summary>
......
类型,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义,SlaveID,
,,,,,,,,,,
PRO,IO模块对应的DI数量,IO_DILength,192.168.200.21#16,,,,,,,
PRO,模块对应的DO数量,IO_DOLength,192.168.200.21#16,,,,,,,
,,,,,,,,,,
DI,急停,SuddenStop_BTN,0,192.168.200.21,0,急停,X01,X01,0,
DI,复位,Reset_BTN,1,192.168.200.21,0,复位,X02,X02,0,
DI,启动,AutoRun_Signal,2,192.168.200.21,0,启动,X03,X03,0,
DI,气压检测,Airpressure_Check,3,192.168.200.21,0,气压检测,X04,X04,0,
DI,料盘检测1(进料口),TrayCheck_Door,4,192.168.200.21,0,料盘检测1(进料口),X05,X05,0,
DI,料盘检测2(料叉),TrayCheck_Fixture,5,192.168.200.21,0,料盘检测2(料叉),X06,X06,0,
DI,进料口门上升端,Door_Up,6,192.168.200.21,0,进料口门上升端,X07,X07,0,
DI,进料口门下降端,Door_Down,7,192.168.200.21,0,进料口门下降端,X08,X08,0,
DI,安全光栅,SafetyLightCurtains,8,192.168.200.21,0,安全光栅,X09,X09,0,
DI,前门限位,Door_Limit,9,192.168.200.21,0,前门限位,X10,X10,0,
DI,左侧门限位,Door_LeftLimit,10,192.168.200.21,0,左侧门限位,X11,X11,0,
DI,右侧门限位,Door_RightLimit,11,192.168.200.21,0,右侧门限位,X12,X12,0,
,,,12,192.168.200.21,0,,X13,X13,0,
,,,13,192.168.200.21,0,,X14,X14,0,
,,,14,192.168.200.21,0,,X15,X15,0,
,,,15,192.168.200.21,0,,X16,X16,0,
DO,自动指示灯,AutoRun_HddLed,0,192.168.200.21,0,自动指示灯,Y01,Y01,0,
DO,故障指示灯,Alarm_HddLed,1,192.168.200.21,0,故障指示灯,Y02,Y02,0,
DO,待机指示灯,RunSign_HddLed,2,192.168.200.21,0,待机指示灯,Y03,Y03,0,
DO,故障蜂鸣器,Alarm_Buzzer,3,192.168.200.21,0,故障蜂鸣器,Y04,Y04,0,
DO,吹气SOL ON,StartOrStopBlow,4,192.168.200.21,0,吹气SOL ON,Y05,Y05,0,
DO,料仓运转ON,Run_Signal,5,192.168.200.21,0,料仓运转ON,Y06,Y06,0,
DO,轴2刹车电源ON,Axis_Brake,6,192.168.200.21,0,轴2刹车电源ON,Y07,Y07,0,
DO,进料口门上升SOL,Door_Up,7,192.168.200.21,0,进料口门上升SOL,Y08,Y08,0,
DO,进料口门下降SOL,Door_Down,8,192.168.200.21,0,进料口门下降SOL,Y09,Y09,0,
DO,相机照明开,Camera_Led,9,192.168.200.21,0,相机照明开,Y10,Y10,0,
DO,设备照明开,Device_Led,10,192.168.200.21,0,设备照明开,Y11,Y11,0,
,,,11,192.168.200.21,0,,Y12,Y12,0,
,,,12,192.168.200.21,0,,Y13,Y13,0,
,,,13,192.168.200.21,0,,Y14,Y14,0,
,,,14,192.168.200.21,0,,Y15,Y15,0,
,,,15,192.168.200.21,0,,Y16,Y16,0,
AXIS,(轴一)旋转轴,Middle_Axis,1,COM2,0,,,,,
AXIS,(轴二)升降轴轴,UpDown_Axis,2,COM2,0,,,,,
AXIS,(轴三)进出轴,InOut_Axis,3,COM2,0,,,,,
AXIS,(轴四)压紧轴,Comp_Axis,4,COM2,0,,,,,
PRO,升降轴 进料口取料点 P1,UpDownAxis_DoorOPosition_P1,380000,,,,,,,
PRO,升降轴 进料口出料前点 P2,UpDownAxis_DoorIPosition_P2,394000,,,,,,,
PRO,升降轴 进料口取料缓冲点 P7,UpDownAxis_DoorOBPosition_P7,394000,,,,,,,
PRO,升降轴 进料口出料缓冲点 P8,UpDownAxis_DoorIBPosition_P8,380000,,,,,,,
PRO,旋转轴(轴1)P1 待机原位点,MiddleAxis_P1_Position,266793,,,,,,,
PRO,进出轴(轴3)P1待机原位点,InOutAxis_P1_Position,0,,,,,,,
PRO,压紧轴(轴4)P1待机原位点,CompressAxis_P1_Position,2000,,,,,,,
PRO,是否使用定位气缸,IsHasLocationCylinder,0,,,,,,,
PRO,是否有左右侧门,IsHasDoorLimit,1,,,,,,,
PRO,是否使用压紧轴(1=使用),IsHasCompress_Axis,1,,,,, ,,
PRO,设备是否处于调试状态(1=调试,0=正常),IsInDebug,1,,,,,,,
PRO,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,,
,温湿度传感器地址,TemperateServer_Port,9001,,,,,,,
PRO,预警温度,WarnTemperate,80,,,,,,,
PRO,预警湿度,WarnHumidity,80,,,,,,,
PRO,(轴一)旋转轴目标速度,MiddleAxis_TargetSpeed,250,,,,,,,
PRO,(轴一)旋转轴加速度,MiddleAxis_AddSpeed,2000,,,,,,,
PRO,(轴一)旋转轴减速度,MiddleAxis_DelSpeed,2000,,,,,,,
PRO,(轴一)旋转轴原点低速度,MiddleAxis_HomeLowSpeed,80,,,,,,,
PRO,(轴一)旋转轴原点高速,MiddleAxis_HomeHighSpeed,60,,,,,,,
PRO,(轴一)旋转轴原点加速度,MiddleAxis_HomeAddSpeed,50,,,,,,,
PRO,(轴二)升降轴轴目标速度,UpdownAxis_TargetSpeed,2000,,,,,,,
PRO,(轴二)升降轴轴加速度,UpdownAxis_AddSpeed,400,,,,,,,
PRO,(轴二)升降轴轴减速度,UpdownAxis_DelSpeed,400,,,,,,,
PRO,(轴二)升降轴轴原点低速度,UpdownAxis_HomeLowSpeed,100,,,,,,,
PRO,(轴二)升降轴轴原点高速,UpdownAxis_HomeHighSpeed,200,,,,,,,
PRO,(轴二)升降轴轴原点加速度,UpdownAxis_HomeAddSpeed,200,,,,,,,
PRO,(轴三)进出轴目标速度,InoutAxis_TargetSpeed,100,,,,,,,
PRO,(轴三)进出轴加速度,InoutAxis_AddSpeed,300,,,,,,,
PRO,(轴三)进出轴减速度,InoutAxis_DelSpeed,300,,,,,,,
PRO,(轴三)进出轴原点低速,InoutAxis_HomeLowSpeed,20,,,,,,,
PRO,(轴三)进出轴原点高速,InoutAxis_HomeHighSpeed,60,,,,,,,
PRO,(轴三)进出轴原点加速度,InoutAxis_HomeAddSpeed,200,,,,,,,
PRO,(轴四)压紧轴目标速度,CompAxis_TargetSpeed,100,,,,,,,
PRO,(轴四)压紧轴加速度,CompAxis_AddSpeed,300,,,,,,,
PRO,(轴四)压紧轴减速度,CompAxis_DelSpeed,300,,,,,,,
PRO,(轴四)压紧轴原点低速,CompAxis_HomeLowSpeed,20,,,,,,,
PRO,(轴四)压紧轴原点高速,CompAxis_HomeHighSpeed,60,,,,,,,
PRO,(轴四)压紧轴原点加速度,CompAxis_HomeAddSpeed,200,,,,,,,
,,,,,,,,,,
PRO,升降轴(轴2)P1速度,UpDownAxis_P1_Speed,800,,,,,,,
PRO,升降轴(轴2)P2速度,UpDownAxis_P2_Speed,800,,,,,,,
PRO,升降轴(轴2)P3速度,UpDownAxis_P3_Speed,800,,,,,,,
PRO,升降轴(轴2)P4速度,UpDownAxis_P4_Speed,300,,,,,,,
PRO,升降轴(轴2)P5速度,UpDownAxis_P5_Speed,800,,,,,,,
PRO,升降轴(轴2)P6速度,UpDownAxis_P6_Speed,300,,,,,,,
PRO,升降轴(轴2)P7速度,UpDownAxis_P7_Speed,300,,,,,, ,
PRO,升降轴(轴2)P8速度,UpDownAxis_P8_Speed,300,,,,,,,
PRO,旋转轴(轴1)P1速度,MiddleAxis_P1_Speed,300,,,,,,,
PRO,旋转轴(轴1)P2速度,MiddleAxis_P2_Speed,300,,,,,,,
PRO,进出轴(轴3)P1速度,InOutAxis_P1_Speed,300,,,,,,,
PRO,进出轴(轴3)P2速度,InOutAxis_P2_Speed,300,,,,,,,
PRO,进出轴(轴3)P3速度,InOutAxis_P3_Speed,300,,,,,,,
PRO,压紧轴(轴4)P1速度,CompAxis_P1_Speed,800,,,,,,,
PRO,压紧轴(轴4)P2速度,CompAxis_P2_Speed,800,,,,,,,
PRO,压紧轴(轴4)P3速度,CompAxis_P3_Speed,800,,,,,,,
PRO,(轴一)旋转轴停止时可误差的脉冲数的最小值,MiddleAxis_ErrorCountMin,10,,,,,,,
PRO,(轴二)升降轴轴停止时可误差的脉冲数的最小值,UpdownAxis_ErrorCountMin,10,,,,,, ,
PRO,(轴三)进出轴停止时可误差的脉冲数的最小值,InoutAxis_ErrorCountMin,100,,,,,,,
PRO,(轴一)旋转轴停止时可误差的脉冲数的最大值,MiddleAxis_ErrorCountMax,1000,,,,,,,
PRO,(轴二)升降轴轴停止时可误差的脉冲数的最大值,UpdownAxis_ErrorCountMax,1000,,,,,,,
PRO,(轴三)进出轴停止时可误差的脉冲数的最大值,InoutAxis_ErrorCountMax,1000,,,,,,,
PRO,出入库多少次,会自动重置旋转轴,Box_ResetMCount,1000,,,,,,,
PRO,出入库多少次,会自动重置所有轴操作,Box_ResetACount,1000,,,,,,,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,
PRO,是否使用料盘检测信号,IsUse_Tray_Check,0,,,,,, ,
PRO,(轴一)旋转轴最小限位,MiddleAxis_PositionMin,0,,,,,,,
PRO,(轴二)升降轴最小限位,UpdownAxis_PositionMin,0,,,,,,,
PRO,(轴三)进出轴最小限位,InoutAxis_PositionMin,0,,,,,,,
PRO,(轴一)旋转轴最大限位,MiddleAxis_PositionMax,0,,,,,,,
PRO,(轴二)升降轴最大限位,UpdownAxis_PositionMax,0,,,,,,,
PRO,(轴三)进出轴最大限位,InoutAxis_PositionMax,0,,,,,,,
PRO,需要吹气的温度(温度标准),Max_Temperature,0,,,,,,,
PRO,需要吹气的湿度(湿度标准),Max_Humidity,10,,,,,,,
PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,
PRO,温湿度端口号,Humiture_Port,COM1,,,,,,,
,,,,,,,,, ,
PRO,模拟量IO模块的IP地址,AIDevice_IP,192.168.200.22,,,,,,,
PRO,模拟信号1默认高度,AIDI1_DefaultPosition,18031,,,,,,,
PRO,模拟信号2默认高度,AIDI2_DefaultPosition,18064,,,,,,,
PRO,模拟信号3默认高度,AIDI3_DefaultPosition,2500,,,,,,,
PRO,模拟信号4默认高度,AIDI4_DefaultPosition,2500,,,,,,,
,,,,,,,,, ,
PRO,模拟信号1的地址,AIDI1_Addr,0,,,,,,,
PRO,模拟信号2的地址,AIDI2_Addr,1,,,,,,,
PRO,模拟信号3的地址(13寸高度),AIDI3_Addr,2,,,,,,,
PRO,模拟信号4的地址(15寸高度),AIDI4_Addr,3,,,,,,,
,,,,,,,,, ,
PRO,模拟转换系数,AI_ConvertPosition,150,,,,,,,
,,,,,,,,, ,
PRO,默认的料盘宽度(多种尺寸为0),Default_TrayWidth,0,,,,,,,
PRO,特殊二维码尺寸配置,CodeSizeConfig,XA=13x48#XB=13x32,,,,,,,
,,,,,,,,, ,
PRO,扫码枪IP,Scanner_Ip,192.168.201.21,,,,,,,
PRO,扫码枪端口号,Scanner_Port,51236,,,,,,,
,,,,,,,,, ,
PRO,大盘宽度(13寸或15寸),Big_TrayWidth,13,,,,,,,
类型,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义,SlaveID,
,,,,,,,,,,
PRO,IO模块对应的DI数量,IO_DILength,192.168.200.21#16,,,,,,,
PRO,模块对应的DO数量,IO_DOLength,192.168.200.21#16,,,,,,,
,,,,,,,,,,
DI,急停,SuddenStop_BTN,0,192.168.200.21,0,急停,X01,X01,0,
DI,复位,Reset_BTN,1,192.168.200.21,0,复位,X02,X02,0,
DI,启动,AutoRun_Signal,2,192.168.200.21,0,启动,X03,X03,0,
DI,气压检测,Airpressure_Check,3,192.168.200.21,0,气压检测,X04,X04,0,
DI,料盘检测1(进料口),TrayCheck_Door,4,192.168.200.21,0,料盘检测1(进料口),X05,X05,0,
DI,料盘检测2(料叉),TrayCheck_Fixture,5,192.168.200.21,0,料盘检测2(料叉),X06,X06,0,
DI,进料口门上升端,Door_Up,6,192.168.200.21,0,进料口门上升端,X07,X07,0,
DI,进料口门下降端,Door_Down,7,192.168.200.21,0,进料口门下降端,X08,X08,0,
DI,安全光栅,SafetyLightCurtains,8,192.168.200.21,0,安全光栅,X09,X09,0,
DI,前门限位,Door_Limit,9,192.168.200.21,0,前门限位,X10,X10,0,
DI,左侧门限位,Door_LeftLimit,10,192.168.200.21,0,左侧门限位,X11,X11,0,
DI,右侧门限位,Door_RightLimit,11,192.168.200.21,0,右侧门限位,X12,X12,0,
,,,12,192.168.200.21,0,,X13,X13,0,
,,,13,192.168.200.21,0,,X14,X14,0,
,,,14,192.168.200.21,0,,X15,X15,0,
,,,15,192.168.200.21,0,,X16,X16,0,
DO,自动指示灯,AutoRun_HddLed,0,192.168.200.21,0,自动指示灯,Y01,Y01,0,
DO,故障指示灯,Alarm_HddLed,1,192.168.200.21,0,故障指示灯,Y02,Y02,0,
DO,待机指示灯,RunSign_HddLed,2,192.168.200.21,0,待机指示灯,Y03,Y03,0,
DO,故障蜂鸣器,Alarm_Buzzer,3,192.168.200.21,0,故障蜂鸣器,Y04,Y04,0,
DO,吹气SOL ON,StartOrStopBlow,4,192.168.200.21,0,吹气SOL ON,Y05,Y05,0,
DO,料仓运转ON,Run_Signal,5,192.168.200.21,0,料仓运转ON,Y06,Y06,0,
DO,轴2刹车电源ON,Axis_Brake,6,192.168.200.21,0,轴2刹车电源ON,Y07,Y07,0,
DO,进料口门上升SOL,Door_Up,7,192.168.200.21,0,进料口门上升SOL,Y08,Y08,0,
DO,进料口门下降SOL,Door_Down,8,192.168.200.21,0,进料口门下降SOL,Y09,Y09,0,
DO,相机照明开,Camera_Led,9,192.168.200.21,0,相机照明开,Y10,Y10,0,
DO,设备照明开,Device_Led,10,192.168.200.21,0,设备照明开,Y11,Y11,0,
,,,11,192.168.200.21,0,,Y12,Y12,0,
,,,12,192.168.200.21,0,,Y13,Y13,0,
,,,13,192.168.200.21,0,,Y14,Y14,0,
,,,14,192.168.200.21,0,,Y15,Y15,0,
,,,15,192.168.200.21,0,,Y16,Y16,0,
AXIS,(轴一)旋转轴,Middle_Axis,1,COM2,0,,,,,
AXIS,(轴二)升降轴轴,UpDown_Axis,2,COM2,0,,,,,
AXIS,(轴三)进出轴,InOut_Axis,3,COM2,0,,,,,
AXIS,(轴四)压紧轴,Comp_Axis,4,COM2,0,,,,,
PRO,升降轴 进料口取料点 P1,UpDownAxis_DoorOPosition_P1,380000,,,,,,,
PRO,升降轴 进料口出料前点 P2,UpDownAxis_DoorIPosition_P2,394000,,,,,,,
PRO,升降轴 进料口取料缓冲点 P7,UpDownAxis_DoorOBPosition_P7,394000,,,,,,,
PRO,升降轴 进料口出料缓冲点 P8,UpDownAxis_DoorIBPosition_P8,380000,,,,,,,
PRO,旋转轴(轴1)P1 待机原位点,MiddleAxis_P1_Position,266793,,,,,,,
PRO,进出轴(轴3)P1待机原位点,InOutAxis_P1_Position,0,,,,,,,
PRO,压紧轴(轴4)P1待机原位点,CompressAxis_P1_Position,2000,,,,,,,
PRO,是否使用定位气缸,IsHasLocationCylinder,0,,,,,,,
PRO,是否有左右侧门,IsHasDoorLimit,1,,,,,,,
PRO,是否使用压紧轴(1=使用),IsHasCompress_Axis,1,,,,, ,,
PRO,设备是否处于调试状态(1=调试,0=正常),IsInDebug,1,,,,,,,
PRO,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,,
,温湿度传感器地址,TemperateServer_Port,9001,,,,,,,
PRO,预警温度,WarnTemperate,80,,,,,,,
PRO,预警湿度,WarnHumidity,80,,,,,,,
PRO,(轴一)旋转轴目标速度,MiddleAxis_TargetSpeed,250,,,,,,,
PRO,(轴一)旋转轴加速度,MiddleAxis_AddSpeed,2000,,,,,,,
PRO,(轴一)旋转轴减速度,MiddleAxis_DelSpeed,2000,,,,,,,
PRO,(轴一)旋转轴原点低速度,MiddleAxis_HomeLowSpeed,80,,,,,,,
PRO,(轴一)旋转轴原点高速,MiddleAxis_HomeHighSpeed,60,,,,,,,
PRO,(轴一)旋转轴原点加速度,MiddleAxis_HomeAddSpeed,50,,,,,,,
PRO,(轴二)升降轴轴目标速度,UpdownAxis_TargetSpeed,2000,,,,,,,
PRO,(轴二)升降轴轴加速度,UpdownAxis_AddSpeed,400,,,,,,,
PRO,(轴二)升降轴轴减速度,UpdownAxis_DelSpeed,400,,,,,,,
PRO,(轴二)升降轴轴原点低速度,UpdownAxis_HomeLowSpeed,100,,,,,,,
PRO,(轴二)升降轴轴原点高速,UpdownAxis_HomeHighSpeed,200,,,,,,,
PRO,(轴二)升降轴轴原点加速度,UpdownAxis_HomeAddSpeed,200,,,,,,,
PRO,(轴三)进出轴目标速度,InoutAxis_TargetSpeed,100,,,,,,,
PRO,(轴三)进出轴加速度,InoutAxis_AddSpeed,300,,,,,,,
PRO,(轴三)进出轴减速度,InoutAxis_DelSpeed,300,,,,,,,
PRO,(轴三)进出轴原点低速,InoutAxis_HomeLowSpeed,20,,,,,,,
PRO,(轴三)进出轴原点高速,InoutAxis_HomeHighSpeed,60,,,,,,,
PRO,(轴三)进出轴原点加速度,InoutAxis_HomeAddSpeed,200,,,,,,,
PRO,(轴四)压紧轴目标速度,CompAxis_TargetSpeed,100,,,,,,,
PRO,(轴四)压紧轴加速度,CompAxis_AddSpeed,300,,,,,,,
PRO,(轴四)压紧轴减速度,CompAxis_DelSpeed,300,,,,,,,
PRO,(轴四)压紧轴原点低速,CompAxis_HomeLowSpeed,20,,,,,,,
PRO,(轴四)压紧轴原点高速,CompAxis_HomeHighSpeed,60,,,,,,,
PRO,(轴四)压紧轴原点加速度,CompAxis_HomeAddSpeed,200,,,,,,,
,,,,,,,,,,
PRO,升降轴(轴2)P1速度,UpDownAxis_P1_Speed,800,,,,,,,
PRO,升降轴(轴2)P2速度,UpDownAxis_P2_Speed,800,,,,,,,
PRO,升降轴(轴2)P3速度,UpDownAxis_P3_Speed,800,,,,,,,
PRO,升降轴(轴2)P4速度,UpDownAxis_P4_Speed,300,,,,,,,
PRO,升降轴(轴2)P5速度,UpDownAxis_P5_Speed,800,,,,,,,
PRO,升降轴(轴2)P6速度,UpDownAxis_P6_Speed,300,,,,,,,
PRO,升降轴(轴2)P7速度,UpDownAxis_P7_Speed,300,,,,,, ,
PRO,升降轴(轴2)P8速度,UpDownAxis_P8_Speed,300,,,,,,,
PRO,旋转轴(轴1)P1速度,MiddleAxis_P1_Speed,300,,,,,,,
PRO,旋转轴(轴1)P2速度,MiddleAxis_P2_Speed,300,,,,,,,
PRO,进出轴(轴3)P1速度,InOutAxis_P1_Speed,300,,,,,,,
PRO,进出轴(轴3)P2速度,InOutAxis_P2_Speed,300,,,,,,,
PRO,进出轴(轴3)P3速度,InOutAxis_P3_Speed,300,,,,,,,
PRO,压紧轴(轴4)P1速度,CompAxis_P1_Speed,800,,,,,,,
PRO,压紧轴(轴4)P2速度,CompAxis_P2_Speed,800,,,,,,,
PRO,压紧轴(轴4)P3速度,CompAxis_P3_Speed,800,,,,,,,
PRO,(轴一)旋转轴停止时可误差的脉冲数的最小值,MiddleAxis_ErrorCountMin,10,,,,,,,
PRO,(轴二)升降轴轴停止时可误差的脉冲数的最小值,UpdownAxis_ErrorCountMin,10,,,,,, ,
PRO,(轴三)进出轴停止时可误差的脉冲数的最小值,InoutAxis_ErrorCountMin,100,,,,,,,
PRO,(轴一)旋转轴停止时可误差的脉冲数的最大值,MiddleAxis_ErrorCountMax,1000,,,,,,,
PRO,(轴二)升降轴轴停止时可误差的脉冲数的最大值,UpdownAxis_ErrorCountMax,1000,,,,,,,
PRO,(轴三)进出轴停止时可误差的脉冲数的最大值,InoutAxis_ErrorCountMax,1000,,,,,,,
PRO,出入库多少次,会自动重置旋转轴,Box_ResetMCount,1000,,,,,,,
PRO,出入库多少次,会自动重置所有轴操作,Box_ResetACount,1000,,,,,,,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,
PRO,是否使用料盘检测信号,IsUse_Tray_Check,0,,,,,, ,
PRO,(轴一)旋转轴最小限位,MiddleAxis_PositionMin,0,,,,,,,
PRO,(轴二)升降轴最小限位,UpdownAxis_PositionMin,0,,,,,,,
PRO,(轴三)进出轴最小限位,InoutAxis_PositionMin,0,,,,,,,
PRO,(轴一)旋转轴最大限位,MiddleAxis_PositionMax,0,,,,,,,
PRO,(轴二)升降轴最大限位,UpdownAxis_PositionMax,0,,,,,,,
PRO,(轴三)进出轴最大限位,InoutAxis_PositionMax,0,,,,,,,
PRO,需要吹气的温度(温度标准),Max_Temperature,0,,,,,,,
PRO,需要吹气的湿度(湿度标准),Max_Humidity,10,,,,,,,
PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,
PRO,温湿度端口号,Humiture_Port,COM1,,,,,,,
,,,,,,,,, ,
PRO,模拟量IO模块的IP地址,AIDevice_IP,192.168.200.22,,,,,,,
PRO,模拟信号1默认高度,AIDI1_DefaultPosition,18031,,,,,,,
PRO,模拟信号2默认高度,AIDI2_DefaultPosition,18064,,,,,,,
PRO,模拟信号3默认高度,AIDI3_DefaultPosition,2500,,,,,,,
PRO,模拟信号4默认高度,AIDI4_DefaultPosition,2500,,,,,,,
,,,,,,,,, ,
PRO,模拟信号1的地址,AIDI1_Addr,0,,,,,,,
PRO,模拟信号2的地址,AIDI2_Addr,1,,,,,,,
PRO,模拟信号3的地址(13寸高度),AIDI3_Addr,2,,,,,,,
PRO,模拟信号4的地址(15寸高度),AIDI4_Addr,3,,,,,,,
,,,,,,,,, ,
PRO,模拟转换系数,AI_ConvertPosition,150,,,,,,,
,,,,,,,,, ,
PRO,默认的料盘宽度(多种尺寸为0),Default_TrayWidth,0,,,,,,,
PRO,特殊二维码尺寸配置,CodeSizeConfig,XA=13x48#XB=13x32,,,,,,,
,,,,,,,,, ,
PRO,扫码枪IP,Scanner_Ip,192.168.201.21,,,,,,,
PRO,扫码枪端口号,Scanner_Port,51236,,,,,,,
,,,,,,,,, ,
PRO,大盘宽度(13寸或15寸),Big_TrayWidth,13,,,,,,,
类型,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义,SlaveID
AXIS,(轴一)旋转轴,Middle_Axis,0,HC,0,,,,
AXIS,(轴二)升降轴轴,UpDown_Axis,1,HC,0,,,,
AXIS,(轴三)进出轴,InOut_Axis,2,HC,0,,,,
AXIS,(轴四)压紧轴,Comp_Axis,3,HC,0,,,,
,,,,,,,,,
DI,急停,SuddenStop_BTN,0,HC,0,急停,X00,X00,0
DI,复位,Reset_BTN,1,HC,0,复位,X01,X01,0
DI,启动,AutoRun_Signal,2,HC,0,启动,X02,X02,0
DI,氮气气压检测,Airpressure_Check,3,HC,0,氮气气压检测,X03,X03,0
DI,料盘检测1(进料口),TrayCheck_Door,4,HC,0,料盘检测1(进料口),X04,X04,0
DI,料盘检测2(料叉),TrayCheck_Fixture,5,HC,0,料盘检测2(料叉),X05,X05,0
DI,进料口门上升端,Door_Up,6,HC,0,进料口门上升端,X06,X06,0
DI,进料口门下降端,Door_Down,7,HC,0,进料口门下降端,X07,X07,0
DI,安全光栅,SafetyLightCurtains,8,HC,0,安全光栅,X08,X08,0
DI,前门限位,Door_Limit,9,HC,0,前门限位,X09,X09,0
DI,左侧门限位,Door_LeftLimit,10,HC,0,左侧门限位,X10,X10,0
DI,右侧门限位,Door_RightLimit,11,HC,0,右侧门限位,X11,X11,0
DI,激光对点检测,Laser_detection,12,HC,0,激光对点检测,X12,X12,0
DI,进料口电机异常,Motor_Error,13,HC,0,进料口电机异常,X13,X13,0
,,,,,,,,,
DO,自动指示灯,AutoRun_HddLed,0,HC,0,自动指示灯,Y00,Y01,0
DO,故障指示灯,Alarm_HddLed,1,HC,0,故障指示灯,Y01,Y02,0
DO,待机指示灯,RunSign_HddLed,2,HC,0,待机指示灯,Y02,Y03,0
DO,故障蜂鸣器,Alarm_Buzzer,3,HC,0,故障蜂鸣器,Y03,Y04,0
DO,设备照明开启,Device_Led,4,HC,0,设备照明开启,Y04,Y05,0
DO,相机光源开启,Camera_Led,5,HC,0,相机光源开启,Y05,Y06,0
DO,氮气阀门开启,StartOrStopBlow,6,HC,0,氮气阀门开启,Y06,Y07,0
DO,进料口门运转,Door_Moto_Run,7,HC,0,进料口门运转,Y07,Y08,0
DO,进料口门反转关门,Door_Moto_Rev,8,HC,0,进料口门反转,Y08,Y09,0
,,,,,,,,,
PRO,升降轴 进料口取料点 P1,UpDownAxis_DoorOPosition_P1,699000,,,,,,
PRO,升降轴 进料口出料前点 P2,UpDownAxis_DoorIPosition_P2,716000,,,,,,
PRO,升降轴 进料口取料缓冲点 P7,UpDownAxis_DoorOBPosition_P7,716000,,,,,,
PRO,升降轴 进料口出料缓冲点 P8,UpDownAxis_DoorIBPosition_P8,6999000,,,,,,
PRO,旋转轴(轴1)P1 待机原位点,MiddleAxis_P1_Position,151500,,,,,,
PRO,进出轴(轴3)P1待机原位点,InOutAxis_P1_Position,0,,,,,,
PRO,压紧轴(轴4)P1待机原位点,CompressAxis_P1_Position,2000,,,,,,
PRO,是否使用定位气缸,IsHasLocationCylinder,0,,,,,,
PRO,是否有左右侧门,IsHasDoorLimit,1,,,,,,
PRO,是否使用压紧轴(1=使用),IsHasCompress_Axis,1,,,,,,
PRO,设备是否处于调试状态(1=调试,0=正常),IsInDebug,0,,,,,,
PRO,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,
,温湿度传感器地址,TemperateServer_Port,9001,,,,,,
PRO,预警温度,WarnTemperate,80,,,,,,
PRO,预警湿度,WarnHumidity,80,,,,,,
,,,,,,,,,
PRO,(轴一)旋转轴目标速度,MiddleAxis_TargetSpeed,250,,,,,,
PRO,(轴一)旋转轴加速度,MiddleAxis_AddSpeed,2000,,,,,,
PRO,(轴一)旋转轴减速度,MiddleAxis_DelSpeed,2000,,,,,,
PRO,(轴一)旋转轴原点低速度,MiddleAxis_HomeLowSpeed,2000,,,,,,
PRO,(轴一)旋转轴原点高速,MiddleAxis_HomeHighSpeed,20000,,,,,,
PRO,(轴一)旋转轴原点加速度,MiddleAxis_HomeAddSpeed,200000,,,,,,
PRO,(轴二)升降轴轴目标速度,UpdownAxis_TargetSpeed,2000,,,,,,
PRO,(轴二)升降轴轴加速度,UpdownAxis_AddSpeed,400,,,,,,
PRO,(轴二)升降轴轴减速度,UpdownAxis_DelSpeed,400,,,,,,
PRO,(轴二)升降轴轴原点低速度,UpdownAxis_HomeLowSpeed,3000,,,,,,
PRO,(轴二)升降轴轴原点高速,UpdownAxis_HomeHighSpeed,45000,,,,,,
PRO,(轴二)升降轴轴原点加速度,UpdownAxis_HomeAddSpeed,500000,,,,,,
PRO,(轴三)进出轴目标速度,InoutAxis_TargetSpeed,100,,,,,,
PRO,(轴三)进出轴加速度,InoutAxis_AddSpeed,300,,,,,,
PRO,(轴三)进出轴减速度,InoutAxis_DelSpeed,300,,,,,,
PRO,(轴三)进出轴原点低速,InoutAxis_HomeLowSpeed,1000,,,,,,
PRO,(轴三)进出轴原点高速,InoutAxis_HomeHighSpeed,40000,,,,,,
PRO,(轴三)进出轴原点加速度,InoutAxis_HomeAddSpeed,400000,,,,,,
PRO,(轴四)压紧轴目标速度,CompAxis_TargetSpeed,100,,,,,,
PRO,(轴四)压紧轴加速度,CompAxis_AddSpeed,300,,,,,,
PRO,(轴四)压紧轴减速度,CompAxis_DelSpeed,300,,,,,,
PRO,(轴四)压紧轴原点低速,CompAxis_HomeLowSpeed,800,,,,,,
PRO,(轴四)压紧轴原点高速,CompAxis_HomeHighSpeed,8000,,,,,,
PRO,(轴四)压紧轴原点加速度,CompAxis_HomeAddSpeed,100000,,,,,,
,,,,,,,,,
PRO,升降轴(轴2)P1速度,UpDownAxis_P1_Speed,300000,,,,,,
PRO,升降轴(轴2)P2速度,UpDownAxis_P2_Speed,300000,,,,,,
PRO,升降轴(轴2)P3速度,UpDownAxis_P3_Speed,300000,,,,,,
PRO,升降轴(轴2)P4速度,UpDownAxis_P4_Speed,200000,,,,,,
PRO,升降轴(轴2)P5速度,UpDownAxis_P5_Speed,300000,,,,,,
PRO,升降轴(轴2)P6速度,UpDownAxis_P6_Speed,200000,,,,,,
PRO,升降轴(轴2)P7速度,UpDownAxis_P7_Speed,200000,,,,,,
PRO,升降轴(轴2)P8速度,UpDownAxis_P8_Speed,200000,,,,,,
PRO,旋转轴(轴1)P1速度,MiddleAxis_P1_Speed,80000,,,,,,
PRO,旋转轴(轴1)P2速度,MiddleAxis_P2_Speed,80000,,,,,,
PRO,进出轴(轴3)P1速度,InOutAxis_P1_Speed,120000,,,,,,
PRO,进出轴(轴3)P2速度,InOutAxis_P2_Speed,120000,,,,,,
PRO,进出轴(轴3)P3速度,InOutAxis_P3_Speed,120000,,,,,,
PRO,压紧轴(轴4)P1速度,CompAxis_P1_Speed,30000,,,,,,
PRO,压紧轴(轴4)P2速度,CompAxis_P2_Speed,30000,,,,,,
PRO,压紧轴(轴4)P3速度,CompAxis_P3_Speed,30000,,,,,,
PRO,(轴一)旋转轴停止时可误差的脉冲数的最小值,MiddleAxis_ErrorCountMin,10,,,,,,
PRO,(轴二)升降轴轴停止时可误差的脉冲数的最小值,UpdownAxis_ErrorCountMin,10,,,,,,
PRO,(轴三)进出轴停止时可误差的脉冲数的最小值,InoutAxis_ErrorCountMin,100,,,,,,
PRO,(轴一)旋转轴停止时可误差的脉冲数的最大值,MiddleAxis_ErrorCountMax,1000,,,,,,
PRO,(轴二)升降轴轴停止时可误差的脉冲数的最大值,UpdownAxis_ErrorCountMax,1000,,,,,,
PRO,(轴三)进出轴停止时可误差的脉冲数的最大值,InoutAxis_ErrorCountMax,1000,,,,,,
PRO,出入库多少次,会自动重置旋转轴,Box_ResetMCount,1000,,,,,,
PRO,出入库多少次,会自动重置所有轴操作,Box_ResetACount,1000,,,,,,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,
PRO,是否使用料盘检测信号,IsUse_Tray_Check,0,,,,,,
,,,,,,,,,
PRO,(轴一)旋转轴最小限位,MiddleAxis_PositionMin,0,,,,,,
PRO,(轴二)升降轴最小限位,UpdownAxis_PositionMin,0,,,,,,
PRO,(轴三)进出轴最小限位,InoutAxis_PositionMin,0,,,,,,
PRO,(轴一)旋转轴最大限位,MiddleAxis_PositionMax,0,,,,,,
PRO,(轴二)升降轴最大限位,UpdownAxis_PositionMax,0,,,,,,
PRO,(轴三)进出轴最大限位,InoutAxis_PositionMax,0,,,,,,
PRO,需要吹气的温度(温度标准),Max_Temperature,0,,,,,,
PRO,需要吹气的湿度(湿度标准),Max_Humidity,10,,,,,,
PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,
PRO,温湿度端口号,Humiture_Port,COM5,,,,,,
,,,,,,,,,
PRO,模拟信号1默认高度,AIDI1_DefaultPosition,0,,,,,,
PRO,模拟信号2默认高度,AIDI2_DefaultPosition,0,,,,,,
PRO,模拟信号3默认高度,AIDI3_DefaultPosition,0,,,,,,
PRO,模拟信号4默认高度,AIDI4_DefaultPosition,0,,,,,,
,,,,,,,,,
PRO,模拟信号1的地址,AIDI1_Addr,0,,,,,,
PRO,模拟信号2的地址,AIDI2_Addr,1,,,,,,
PRO,模拟信号3的地址(13寸高度),AIDI3_Addr,2,,,,,,
PRO,模拟信号4的地址(15寸高度),AIDI4_Addr,3,,,,,,
,,,,,,,,,
PRO,模拟转换系数,AI_ConvertPosition,1,,,,,,
,,,,,,,,,
PRO,默认的料盘宽度(多种尺寸为0),Default_TrayWidth,7,,,,,,
......@@ -16,13 +16,14 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public partial class AC_SA_BoxBean : KTK_Store
{
public DLScanSocket dlScanSocket;
//public DLScanSocket dlScanSocket;
private static bool IsIntSlvBlock = false;
/// <summary>
/// 开始运行
/// </summary>
public static bool IsRun = false;
public string CID = "";
public string Name = "";
public AC_SA_Config Config;
/// <summary>
/// 记录最后一次 出库的posID,出库完成发送给服务器之后清除
......@@ -97,15 +98,16 @@ namespace OnlineStore.DeviceLibrary
}
}
LogUtil.info(StoreName + "共加载到["+positionList.Count+"]个库位,["+ PositionNumList.Count + "]个为料仓有效库位");
dlScanSocket = new DLScanSocket(config.Scanner_Ip, config.Scanner_Port, onCodeReceived);
//dlScanSocket = new DLScanSocket(config.Scanner_Ip, config.Scanner_Port, onCodeReceived);
//初始化摄像机配置
// CodeManager.LoadConfig( );
CodeManager.LoadConfig();
IOManager.Init();
//初始化 //连接设备
IOManager.instance.ConnectionIOList(Config.DIODeviceNameList);
AIManager.Init();
AIManager.Instance.StartConnect(Config.AIDevice_IP);
//scanSocket.OnScanRevice += onCodeReceived;
if (!IOManager.instance.ConnectionIOList(Config.DIODeviceNameList))
{
//throw new Exception("伺服板卡加载失败");
}
mainTimer.Enabled = false;
int isAuto = ConfigAppSettings.GetIntValue(Setting_Init.App_AutoRun);
......@@ -115,11 +117,12 @@ namespace OnlineStore.DeviceLibrary
}
Thread.Sleep(300);
InitDoorRunMonitor();
//默认三个灯都亮
IOManager.IOMove(IO_Type.Alarm_HddLed, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.AutoRun_HddLed, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.RunSign_HddLed, IO_VALUE.LOW);
//IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.HIGH);
LogUtil.info(StoreName + " 初始化完成,OutStoreWaitSeconds=" + OutStoreWaitSeconds);
}
......@@ -201,8 +204,8 @@ namespace OnlineStore.DeviceLibrary
IO_VALUE suddenBtn = IOManager.IOValue(IO_Type.SuddenStop_BTN);
IO_VALUE airCheck = IOManager.IOValue(IO_Type.Airpressure_Check);
//if (suddenBtn == IO_VALUE.HIGH)
if (suddenBtn == IO_VALUE.HIGH && airCheck == IO_VALUE.HIGH)
if (suddenBtn == IO_VALUE.HIGH)
//if (suddenBtn == IO_VALUE.HIGH && airCheck == IO_VALUE.HIGH)
{
//lastAirValue = airCheck;
lastAirCloseTime = DateTime.Now;
......@@ -216,7 +219,7 @@ namespace OnlineStore.DeviceLibrary
storeStatus = StoreStatus.ResetMove;
//启动温湿度服务器
HumitureController.Init(Config.Humiture_Port);
dlScanSocket.StartConnect();
//dlScanSocket.StartConnect();
ReturnHome();
StartTime = DateTime.Now;
mainTimer.Enabled = true;
......@@ -314,7 +317,7 @@ namespace OnlineStore.DeviceLibrary
if (IOManager.IOValue(IO_Type.Airpressure_Check).Equals(IO_VALUE.LOW))
{
LogUtil.info(LOGGER, StoreName + "复位失败,没有气压信号");
return;
//return;
}
if (!RunAxis(true))
{
......@@ -374,7 +377,7 @@ namespace OnlineStore.DeviceLibrary
//进出轴原点返回完成,将进出轴的位置设置=0
AxisCountClear(Config.InOut_Axis);
ACAxisMove(Config.InOut_Axis, Config.InOutAxis_P1_Position, Config.InOutAxis_P1_Speed);
CloseDoorAndWait();
CloseDoor();
break;
case StoreMoveStep.BOX_H_InOutToP1:
//如果此时轴三还在报警,需要提示错误并等待
......@@ -385,7 +388,7 @@ namespace OnlineStore.DeviceLibrary
}
//复位和回原点要等轴3进出轴ORG亮了以后才能返回其他轴
LogUtil.info(LOGGER, StoreName + "复位中: 压紧轴,旋转轴,上下轴开始 原点返回");
StoreMove.NextMoveStep(StoreMoveStep.BOX_H_OtherAxisBack);
StoreMove.NextMoveStep(StoreMoveStep.BOX_H_OtherAxisBack_wait);
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(1000));
if (IsHasCompress_Axis)
{
......@@ -394,6 +397,10 @@ namespace OnlineStore.DeviceLibrary
ACAxisHomeMove(Config.Middle_Axis);
ACAxisHomeMove(Config.UpDown_Axis);
break;
case StoreMoveStep.BOX_H_OtherAxisBack_wait:
StoreMove.NextMoveStep(StoreMoveStep.BOX_H_OtherAxisBack);
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(500));
break;
case StoreMoveStep.BOX_H_OtherAxisBack:
StoreMove.NextMoveStep(StoreMoveStep.BOX_H_MiddleAxisToP1);
......@@ -422,7 +429,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisHomeMove(Config.Comp_Axis);
}
//关闭仓门
CloseDoorAndWait();
CloseDoor();
break;
case StoreMoveStep.BOX_M_H_TOP1_CompressHome:
StoreMove.NextMoveStep(StoreMoveStep.BOX_M_H_TOP1_OtherAxisToP1);
......@@ -454,39 +461,7 @@ namespace OnlineStore.DeviceLibrary
}
}
private bool DoorIsClose()
{
if (IOManager.IOValue(IO_Type.Door_Down).Equals(IO_VALUE.HIGH) &&
IOManager.IOValue(IO_Type.Door_Up).Equals(IO_VALUE.LOW))
{
return true;
}
return false;
}
private bool DoorIsOpen()
{
if (IOManager.IOValue(IO_Type.Door_Down).Equals(IO_VALUE.LOW) &&
IOManager.IOValue(IO_Type.Door_Up).Equals(IO_VALUE.HIGH))
{
return true;
}
return false;
}
private void OpenDoorAndWait()
{
Thread.Sleep(60);
IOManager.IOMove(IO_Type.Door_Down, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.HIGH);
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Down, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Up, IO_VALUE.HIGH));
}
private void CloseDoorAndWait()
{
IOManager.IOMove(IO_Type.Door_Down, IO_VALUE.HIGH);
IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.LOW);
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Down, IO_VALUE.HIGH));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Up, IO_VALUE.LOW));
}
/// <summary>
/// 原点返回处理
......@@ -504,14 +479,16 @@ namespace OnlineStore.DeviceLibrary
switch (StoreMove.MoveStep)
{
case StoreMoveStep.BOX_H_LocationCylinderBack:
StoreMove.NextMoveStep(StoreMoveStep.BOX_H_InOutBack);
StoreMove.NextMoveStep(StoreMoveStep.BOX_H_InOutBack_wait);
LogUtil.info(LOGGER, StoreName + "原点返回中,进出轴回原点");
//复位和回原点要等轴3进出轴ORG亮了以后才能返回其他轴
ACAxisHomeMove(Config.InOut_Axis);
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(2000));
break;
case StoreMoveStep.BOX_H_InOutBack_wait:
StoreMove.NextMoveStep(StoreMoveStep.BOX_H_InOutBack);
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(500));
break;
case StoreMoveStep.BOX_H_InOutBack:
Thread.Sleep(200);
StoreMove.NextMoveStep(StoreMoveStep.BOX_H_InOutToP1);
LogUtil.info(LOGGER, StoreName + "原点返回中,进出轴退回P1点,关闭仓门,检测叉子没有料盘");
//进出轴原点返回完成,将进出轴的位置设置=0
......@@ -520,7 +497,7 @@ namespace OnlineStore.DeviceLibrary
// ComBeforeHomeMove();
//判断叉子没有料盘
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.LOW));
CloseDoorAndWait();
CloseDoor();
break;
case StoreMoveStep.BOX_H_InOutToP1:
......@@ -533,7 +510,7 @@ namespace OnlineStore.DeviceLibrary
}
//复位和回原点要等轴3进出轴ORG亮了以后才能返回其他轴
LogUtil.info(LOGGER, StoreName + "原点返回中 :压紧轴,旋转轴,上下轴开始原点返回");
StoreMove.NextMoveStep(StoreMoveStep.BOX_H_OtherAxisBack);
StoreMove.NextMoveStep(StoreMoveStep.BOX_H_OtherAxisBack_wait);
if (IsHasCompress_Axis)
{
ACAxisHomeMove(Config.Comp_Axis);
......@@ -541,7 +518,10 @@ namespace OnlineStore.DeviceLibrary
ACAxisHomeMove(Config.Middle_Axis);
ACAxisHomeMove(Config.UpDown_Axis);
break;
case StoreMoveStep.BOX_H_OtherAxisBack_wait:
StoreMove.NextMoveStep(StoreMoveStep.BOX_H_OtherAxisBack);
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(500));
break;
case StoreMoveStep.BOX_H_OtherAxisBack:
StoreMove.NextMoveStep(StoreMoveStep.BOX_H_MiddleAxisToP1);
LogUtil.info(LOGGER, StoreName + "回原点:旋转轴运动到P1,上下轴到P1,压紧轴到P1!");
......@@ -563,7 +543,7 @@ namespace OnlineStore.DeviceLibrary
public bool RunAxis(bool isCheck)
{
IOManager.IOMove(IO_Type.Run_Signal, IO_VALUE.HIGH);
//IOManager.IOMove(IO_Type.Run_Signal, IO_VALUE.HIGH);
Thread.Sleep(1000);
//打开所有轴
foreach (ConfigMoveAxis moveAxis in moveAxisList)
......@@ -576,7 +556,7 @@ namespace OnlineStore.DeviceLibrary
//ACServerManager.InitSlvAddr(portName, slvAddr);
if (!IsIntSlvBlock)
{
ACServerManager.InitSlvAddr(portName, slvAddr, moveAxis.TargetSpeed, moveAxis.AddSpeed, moveAxis.DelSpeed);
ACServerManager.InitSlvAddr(portName, slvAddr, moveAxis.TargetSpeed, moveAxis.TargetSpeed*4, moveAxis.TargetSpeed*4);
Thread.Sleep(100);
}
ACServerManager.AlarmClear(portName, slvAddr);
......@@ -593,7 +573,7 @@ namespace OnlineStore.DeviceLibrary
}
}
IsIntSlvBlock = true;
IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.HIGH);
//IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.HIGH);
return true;
}
/// <summary>
......@@ -640,7 +620,7 @@ namespace OnlineStore.DeviceLibrary
public void CloseAllAxis()
{
LogUtil.info(StoreName + "关闭刹车,关闭伺服");
IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
//IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
foreach (ConfigMoveAxis axis in moveAxisList)
{
ACServerManager.ServoOff(axis.DeviceName, axis.GetAxisValue());
......@@ -648,7 +628,7 @@ namespace OnlineStore.DeviceLibrary
// ACServerManager.ColsePort(axis.DeviceName);
}
Thread.Sleep(100);
IOManager.IOMove(IO_Type.Run_Signal, IO_VALUE.LOW);
//IOManager.IOMove(IO_Type.Run_Signal, IO_VALUE.LOW);
}
private int GetAlarmCodeByAxis(ConfigMoveAxis axis)
......@@ -689,7 +669,7 @@ namespace OnlineStore.DeviceLibrary
mainTimer.Enabled = false;
TimeSpan span = DateTime.Now - StartTime;
IsRun = false;
dlScanSocket.Close();
//dlScanSocket.Close();
IOManager.instance.CloseAllDO();
LogUtil.info(LOGGER, StoreName + ",停止运行,总运行时间:" + span.ToString());
......@@ -698,7 +678,7 @@ namespace OnlineStore.DeviceLibrary
public override void Alarm(StoreAlarmType alarmType, string alarmDetial, StoreMoveType storeMoveType)
{
//string alarmMsg,string alarmMsgEn,
SaveAlarmInfo(alarmType, alarmDetial, WarnObj.WarnMsg, WarnObj.WarnMsgEn, storeMoveType);
SaveAlarmInfo(alarmType, alarmDetial, WarnObj.WarnMsg, WarnObj.WarnMsgEn, WarnObj.WarnMsgJp, storeMoveType);
autoNext = false;
if (this.alarmType.Equals(alarmType) && alarmType != StoreAlarmType.SuddenStop && alarmType != StoreAlarmType.NoAirCheck)
......@@ -711,14 +691,14 @@ namespace OnlineStore.DeviceLibrary
if (alarmType.Equals(StoreAlarmType.AxisAlarm) | alarmType.Equals(StoreAlarmType.AxisMoveError))
{
LogUtil.error(LOGGER, StoreName + "轴报警,关闭刹车,停止运动,关闭轴,打开报警灯");
IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
//IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
StopMove(true);
}
else if (alarmType == StoreAlarmType.SuddenStop)
{
isInSuddenDown = true;
LogUtil.error(LOGGER, StoreName + "收到急停信号,关闭刹车,停止运动,关闭轴,打开报警灯 ");
IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
//IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
StoreMove.EndMove();
StopMove(true);
storeStatus = StoreStatus.SuddenStop;
......@@ -727,7 +707,7 @@ namespace OnlineStore.DeviceLibrary
{
isNoAirCheck = true;
LogUtil.error(LOGGER, StoreName + " 未检测到气压信号 ,打开刹车,停止运动,关闭轴,打开报警灯 ");
IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
//IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
StoreMove.EndMove();
StopMove(true);
storeStatus = StoreStatus.SuddenStop;
......@@ -799,8 +779,8 @@ namespace OnlineStore.DeviceLibrary
//WarnMsg = "未检测到气压信号";
SetWarnMsg(ResourceControl.NoAIr);
preAirValue = IO_VALUE.LOW;
LogUtil.info("已持续【" + FormUtil.GetSpanStr(span) + "】未检测到气压信号,报警");
Alarm(StoreAlarmType.NoAirCheck, "2", StoreMoveType.None);
//LogUtil.info("已持续【" + FormUtil.GetSpanStr(span) + "】未检测到气压信号,报警");
//Alarm(StoreAlarmType.NoAirCheck, "2", StoreMoveType.None);
return;
}
}
......@@ -946,10 +926,10 @@ namespace OnlineStore.DeviceLibrary
{
doorIsOpen = true;
}
else if (!doorIsOpen)
{
doorIsOpen = true;
}
//else if (!doorIsOpen)
//{
// doorIsOpen = true;
//}
if (doorIsOpen)
{
......@@ -958,13 +938,13 @@ namespace OnlineStore.DeviceLibrary
IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.HIGH);
}
}
else
{
if (IOManager.IOValue(IO_Type.Device_Led).Equals(IO_VALUE.HIGH))
{
IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.LOW);
}
}
//else
//{
// if (IOManager.IOValue(IO_Type.Device_Led).Equals(IO_VALUE.HIGH))
// {
// IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.LOW);
// }
//}
}
}
......@@ -1151,7 +1131,12 @@ namespace OnlineStore.DeviceLibrary
// GetCameraCode();
IOManager.IOMove(IO_Type.Camera_Led, IO_VALUE.HIGH);
LastScanTime = DateTime.Now;
dlScanSocket.BeginScan();
//dlScanSocket.BeginScan();
Task.Run(()=> {
var codelist = CodeManager.CameraScan();
onCodeReceived(codelist.ToArray());
});
}
}
else
......@@ -1352,8 +1337,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public override void StopMove(bool IsCloseAxis)
{
IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
//IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
//运动版停止
ACServerManager.SuddenStop(Config.Middle_Axis.DeviceName, Config.Middle_Axis.GetAxisValue());
ACServerManager.SuddenStop(Config.UpDown_Axis.DeviceName, Config.UpDown_Axis.GetAxisValue());
......@@ -1377,8 +1361,8 @@ namespace OnlineStore.DeviceLibrary
CloseAllAxis();
}
LogUtil.info(LOGGER, StoreName + "StopMove");
IOManager.IOMove(IO_Type.Door_Down, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Door_Moto_Run, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Door_Moto_Rev, IO_VALUE.LOW);
isInPro = false;
}
......@@ -1413,7 +1397,7 @@ namespace OnlineStore.DeviceLibrary
/// 扫码枪数据接收
/// </summary>
/// <param name="message"></param>
private void onCodeReceived(string[] codeList )
private void onCodeReceived(string[] codeList)
{
try
{
......@@ -1572,7 +1556,11 @@ namespace OnlineStore.DeviceLibrary
{
IOManager.IOMove(IO_Type.Camera_Led, IO_VALUE.HIGH);
LastScanTime = DateTime.Now;
dlScanSocket.BeginScan();
//dlScanSocket.BeginScan();
Task.Run(() => {
var codelist = CodeManager.CameraScan();
onCodeReceived(codelist.ToArray());
});
}
else
{
......@@ -1588,6 +1576,7 @@ namespace OnlineStore.DeviceLibrary
}
return true;
}
public string spiltStr = "##";
private string ProcessCode(string[] codeList)
{
string message = "";
......@@ -1597,7 +1586,7 @@ namespace OnlineStore.DeviceLibrary
{
string code = str;
//根据二维码开头获取固定尺寸
string codeSize = Config.GetCodeSize(str.Trim());
string codeSize = "";//Config.GetCodeSize(str.Trim());
if (String.IsNullOrEmpty(codeSize))
{
//无固定尺寸,判断宽度是否是固定,如果不是固定,直接获取当前高度宽度
......@@ -1605,7 +1594,7 @@ namespace OnlineStore.DeviceLibrary
}
if (!String.IsNullOrEmpty(code))
{
message = message +"="+codeSize+"="+ code + dlScanSocket.spiltStr;
message = message +"="+codeSize+"="+ code + spiltStr;
}
}
return message;
......@@ -1613,8 +1602,8 @@ namespace OnlineStore.DeviceLibrary
#endregion
#region 高度传感器处理
private int smallWidth = 7;
private int bigWidth = 13;
private int Width_7 = 7;
private int Width_13 = 13;
// 0、1对应7寸盘,2,3对应13寸盘
public int GetSize()
{
......@@ -1625,26 +1614,24 @@ namespace OnlineStore.DeviceLibrary
}
if (Config.AIDI3_Addr < 0 || Config.AIDI4_Addr <= 0)
{
return smallWidth;
return Width_7;
}
else if (Config.AIDI1_Addr < 0 || Config.AIDI2_Addr < 0)
{
return bigWidth;
return Width_13;
}
if (GetBiglHeight() > 0)
{
return bigWidth;
return Width_13;
}
else
{
return smallWidth;
return Width_7;
}
}
public int GetHeight()
{
if (Config.Default_TrayWidth.Equals(smallWidth))
if (Config.Default_TrayWidth.Equals(Width_7))
{
return GetSmallHeight();
}
......@@ -1665,14 +1652,21 @@ namespace OnlineStore.DeviceLibrary
return 0;
}
int result = 0;
if (Config.Default_TrayWidth.Equals(smallWidth).Equals(false)&&IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW))
if (Config.Default_TrayWidth.Equals(Width_7).Equals(false)&&IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW))
{
return result;
}
double ai1Value = AIManager.ConvertAI(AIManager.Instance.GetAIValue(Config.AIDevice_IP, Config.AIDI1_Addr), Config.AIDI1_DefaultPosition);
double ai2Value = AIManager.ConvertAI(AIManager.Instance.GetAIValue(Config.AIDevice_IP, Config.AIDI2_Addr), Config.AIDI2_DefaultPosition);
double Value = Math.Round((ai1Value + ai2Value) / 2, 1);
double ai1Value = ConvertAI(IOManager.GetADIOValue(Config.AIDI1_Addr), Config.AIDI1_DefaultPosition);
double ai2Value = ConvertAI(IOManager.GetADIOValue(Config.AIDI2_Addr), Config.AIDI2_DefaultPosition);
double Value = 0;
if (ai1Value > 5 && ai2Value > 5)
Math.Round((ai1Value + ai2Value) / 2, 1);
else if (ai1Value>5)
Value=Math.Round(ai1Value, 1);
else if (ai2Value>5)
Value=Math.Round(ai2Value, 1);
return CalHeight(Value);
}
......@@ -1683,48 +1677,17 @@ namespace OnlineStore.DeviceLibrary
return 0;
}
int result = 0;
if (Config.Default_TrayWidth.Equals(bigWidth).Equals(false) && IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW))
if (Config.Default_TrayWidth.Equals(Width_13).Equals(false) && IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW))
{
return result;
}
double ai3Value = AIManager.ConvertAI(AIManager.Instance.GetAIValue(Config.AIDevice_IP, Config.AIDI3_Addr), Config.AIDI3_DefaultPosition);
double ai4Value = AIManager.ConvertAI(AIManager.Instance.GetAIValue(Config.AIDevice_IP, Config.AIDI4_Addr), Config.AIDI4_DefaultPosition);
double ai3Value = ConvertAI(IOManager.GetADIOValue(Config.AIDI3_Addr), Config.AIDI3_DefaultPosition);
double ai4Value = ConvertAI(IOManager.GetADIOValue(Config.AIDI4_Addr), Config.AIDI4_DefaultPosition);
double Value = Math.Round((ai3Value + ai4Value) / 2, 1);
return CalHeight(Value);
}
//private int Get13Height()
//{
// if (Config.AIDI3_Addr < 0)
// {
// return 0;
// }
// int result = 0;
// if (IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW))
// {
// return result;
// }
// double ai1Value = AIManager.ConvertAI(AIManager.Instance.GetAIValue(Config.AIDevice_IP, Config.AIDI3_Addr), Config.AIDI3_DefaultPosition);
// double Value = Math.Round((ai1Value) / 1, 1);
// return CalHeight(Value);
//}
//private int Get15Height()
//{
// if (Config.AIDI4_Addr < 0)
// {
// return 0;
// }
// int result = 0;
// if (IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW))
// {
// return result;
// }
// double ai1Value = AIManager.ConvertAI(AIManager.Instance.GetAIValue(Config.AIDevice_IP, Config.AIDI4_Addr), Config.AIDI4_DefaultPosition);
// double Value = Math.Round((ai1Value) / 1, 1);
// return CalHeight(Value);
//}
private int CalHeight(double Value)
{
int result = 0;
......@@ -1759,7 +1722,12 @@ namespace OnlineStore.DeviceLibrary
return result;
}
public static double ConvertAI(double aiValue, double defaultValue)
{
double xishu = (double)StoreManager.Config.AI_ConvertPosition;
double result = Math.Round((aiValue - defaultValue) / xishu, 2);
return result;
}
#endregion
#region 温湿度处理
......@@ -1782,10 +1750,27 @@ namespace OnlineStore.DeviceLibrary
private float StartBlowValue = (float)ConfigAppSettings.GetNumValue(Setting_Init.StartBlowValue);
private float StopBlowValue = (float)ConfigAppSettings.GetNumValue(Setting_Init.StopBlowValue);
public string currTempStr = "";
DateTime doorAndTrayLastrunTime = DateTime.Now;
private void HumidityProcess()
{
try
{
if (IOManager.IOValue(IO_Type.Door_Down).Equals(IO_VALUE.LOW) || IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.HIGH))
{
IOManager.IOMove(IO_Type.StartOrStopBlow, IO_VALUE.HIGH);
doorAndTrayLastrunTime = DateTime.Now;
//IsInBlowing = true;
return;
}
if (!IsInBlowing && doorAndTrayLastrunTime!=new DateTime(1997, 1, 1) && IOManager.IOValue(IO_Type.Door_Down).Equals(IO_VALUE.HIGH) && IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW)) {
if ((DateTime.Now-doorAndTrayLastrunTime).TotalSeconds > 2)
{
doorAndTrayLastrunTime= new DateTime(1997, 1, 1);
IOManager.IOMove(IO_Type.StartOrStopBlow, IO_VALUE.LOW);
}
}
if ((DateTime.Now - preLogTime).TotalSeconds > 10)
{
preLogTime = DateTime.Now;
......@@ -1942,6 +1927,7 @@ namespace OnlineStore.DeviceLibrary
//lineOperation.status = (int)StoreStatus.Warning;
lineOperation.msg = WarnObj.WarnMsg;
lineOperation.msgEn = WarnObj.WarnMsgEn;
lineOperation.msgJp = WarnObj.WarnMsgJp;
}
else if (IsRun)
{
......@@ -1970,8 +1956,10 @@ namespace OnlineStore.DeviceLibrary
}
boxStatus.msg = WarnObj.WarnMsg;
boxStatus.msgEn = WarnObj.WarnMsgEn;
boxStatus.msgJp = WarnObj.WarnMsgJp;
lineOperation.msg = WarnObj.WarnMsg;
lineOperation.msgEn = WarnObj.WarnMsgEn;
lineOperation.msgJp = WarnObj.WarnMsgJp;
//if (WarnObj.WarnMsg.Equals(""))
//{
......@@ -1990,6 +1978,8 @@ namespace OnlineStore.DeviceLibrary
lineOperation.msg = ResourceControl.GetChinaString("叉子料盘检测有料,请检查");
boxStatus.msgEn = ResourceControl.GetEnglishString("叉子料盘检测有料,请检查");
lineOperation.msgEn = ResourceControl.GetEnglishString("叉子料盘检测有料,请检查");
boxStatus.msgJp = ResourceControl.GetJapaneseString("叉子料盘检测有料,请检查");
lineOperation.msgJp = ResourceControl.GetJapaneseString("叉子料盘检测有料,请检查");
}
}
//else
......
......@@ -89,6 +89,8 @@ namespace OnlineStore.DeviceLibrary
#region 出入库结果验证
private void InOutBackToP1(int InOut_P1)
{
ACAxisMove(Config.InOut_Axis, InOut_P1, Config.InOutAxis_P1_Speed);
/*
//判断是否在P1,如果是,不需要运行
int outCount = ACServerManager.GetActualtPosition(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue());
int errorCount = Math.Abs(outCount - InOut_P1);
......@@ -104,6 +106,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.WaitList.Add(WaitResultInfo.WaitAxisOrg(Config.InOut_Axis, IO_VALUE.HIGH));
}
//StoreMove.WaitList.Add(WaitResultInfo.WaitAxisOrg(Config.InOut_Axis,IO_VALUE.HIGH));
*/
}
private void CheckWait()
......@@ -156,7 +159,7 @@ namespace OnlineStore.DeviceLibrary
{
timeOutMs = 650000;
}
/*
//如果是门开关信号,增加重写功能
if (!wait.IsEnd && span.TotalSeconds < StoreMove.TimeOutSeconds)
{
......@@ -185,7 +188,7 @@ namespace OnlineStore.DeviceLibrary
IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.HIGH);
}
}
}
}*/
if ((!wait.IsEnd) && span.TotalMilliseconds > timeOutMs)
{
ConfigIO io = Config.getWaitIO(wait.IoType);
......@@ -333,7 +336,7 @@ namespace OnlineStore.DeviceLibrary
InStoreLog("入库:SI_02_ 进出轴(叉子)动作至P1, 打开仓门");
StoreMove.NextMoveStep(StoreMoveStep.SI_02_OpenDoor);
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(200));
OpenDoorAndWait();
OpenDoor();
InOutBackToP1(moveP.InOut_P1);
}
private void SI_05_DeviceToDoor()
......@@ -438,8 +441,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove(Config.Middle_Axis, moveP.Middle_P2, Config.MiddleAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P3, Config.UpDownAxis_P3_Speed);
//关闭仓门
IOManager.IOMove(IO_Type.Door_Down, IO_VALUE.HIGH);
IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.LOW);
CloseDoor(false);
}
//else
//{
......@@ -455,8 +457,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove(Config.Middle_Axis, moveP.Middle_P2, Config.MiddleAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P3, Config.UpDownAxis_P3_Speed);
//关闭仓门
IOManager.IOMove(IO_Type.Door_Down, IO_VALUE.HIGH);
IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.LOW);
CloseDoor(false);
}
else if (StoreMove.MoveStep == StoreMoveStep.SI_09_MoveToBag)
{
......@@ -513,7 +514,7 @@ namespace OnlineStore.DeviceLibrary
ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
CloseDoorAndWait();
CloseDoor();
}
else
{
......@@ -529,7 +530,7 @@ namespace OnlineStore.DeviceLibrary
ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
CloseDoorAndWait();
CloseDoor();
}
else if (StoreMove.MoveStep == StoreMoveStep.SI_15_GoBack)
{
......@@ -800,7 +801,7 @@ namespace OnlineStore.DeviceLibrary
OutStoreLog("出库:SO_091 打开仓门,等待门口无料盘 ");
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
OpenDoorAndWait();
OpenDoor();
}
private void OutStoreEnd()
{
......@@ -817,7 +818,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SO_14_GoBack);
OutStoreLog("出库:SO_14 升降轴返回,轴2至P1(待机点) ,关闭仓门,更改状态为出库完成");
ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
CloseDoorAndWait();
CloseDoor();
//改为出库完成
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
......
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
partial class AC_SA_BoxBean
{
Thread DoorRunMonitorThread;
void InitDoorRunMonitor() {
DoorRunMonitorThread = new Thread(new ThreadStart(DoorRunMonitor));
DoorRunMonitorThread.Start();
GC.KeepAlive(DoorRunMonitorThread);
LogUtil.info(StoreName + "出料门运行监控开始");
}
bool DoorRunMonitorEnable = false;
public void OpenDoor(bool needwait = true)
{
if (DoorIsOpen())
return;
IOManager.IOMove(IO_Type.Door_Moto_Rev, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Door_Moto_Run, IO_VALUE.HIGH);
//if (IOManager.DOValue(IO_Type.StartOrStopBlow).Equals(IO_VALUE.LOW))
//{
// IOManager.IOMove(IO_Type.StartOrStopBlow, IO_VALUE.HIGH);
// openBlow = true;
//}
DoorRunMonitorEnable = true;
if (needwait)
{
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Down, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Up, IO_VALUE.HIGH));
}
}
/// <summary>
/// 记录是否是因为开门打开的吹气
/// </summary>
bool openBlow = false;
public void CloseDoor(bool needwait = true)
{
if (DoorIsClose())
return;
IOManager.IOMove(IO_Type.Door_Moto_Rev, IO_VALUE.HIGH);
IOManager.IOMove(IO_Type.Door_Moto_Run, IO_VALUE.HIGH);
//if (openBlow) {
// IOManager.IOMove(IO_Type.StartOrStopBlow, IO_VALUE.LOW);
// openBlow = false;
//}
DoorRunMonitorEnable = true;
if (needwait)
{
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Down, IO_VALUE.HIGH));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Up, IO_VALUE.LOW));
}
}
private bool DoorIsClose()
{
//&& IOManager.IOValue(IO_Type.Door_Up).Equals(IO_VALUE.LOW)
if (IOManager.IOValue(IO_Type.Door_Down).Equals(IO_VALUE.HIGH))
{
//IOManager.IOMove(IO_Type.StartOrStopBlow, IO_VALUE.LOW);
return true;
}
return false;
}
private bool DoorIsOpen()
{
//IOManager.IOValue(IO_Type.Door_Down).Equals(IO_VALUE.LOW) &&
if (IOManager.IOValue(IO_Type.Door_Up).Equals(IO_VALUE.HIGH))
{
return true;
}
return false;
}
void DoorRunMonitor()
{
while (true) {
if (DoorRunMonitorEnable)
{
Thread.Sleep(30);
}
else {
//检测到门在运行立刻开始监控
if (IOManager.DOValue(IO_Type.Door_Moto_Run).Equals(IO_VALUE.HIGH)) {
DoorRunMonitorEnable = true;
continue;
}
Thread.Sleep(300);
continue;
}
if (IOManager.IOValue(IO_Type.Motor_Error).Equals(IO_VALUE.HIGH)) {
SetWarnMsg(ResourceControl.WaitSingleTimeOut);
continue;
}
//开门检测
if (IOManager.DOValue(IO_Type.Door_Moto_Run).Equals(IO_VALUE.HIGH)
&& IOManager.DOValue(IO_Type.Door_Moto_Rev).Equals(IO_VALUE.LOW)
&& IOManager.IOValue(IO_Type.Door_Up).Equals(IO_VALUE.HIGH))
{
IOManager.IOMove(IO_Type.Door_Moto_Run, IO_VALUE.LOW);
DoorRunMonitorEnable = false;
continue;
}
//关门检测
if (IOManager.DOValue(IO_Type.Door_Moto_Run).Equals(IO_VALUE.HIGH)
&& IOManager.DOValue(IO_Type.Door_Moto_Rev).Equals(IO_VALUE.HIGH)
&& IOManager.IOValue(IO_Type.Door_Down).Equals(IO_VALUE.HIGH))
{
IOManager.IOMove(IO_Type.Door_Moto_Run, IO_VALUE.LOW);
DoorRunMonitorEnable = false;
continue;
}
}
}
}
}
\ No newline at end of file
......@@ -21,6 +21,7 @@ namespace OnlineStore.DeviceLibrary
public static readonly ILog LOGGER = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public static AC_SA_BoxBean Store = null;
public static AC_SA_Config Config = null;
public static Dictionary<int, StoreConfig> allConfigMap = null;
private static bool isInit = false;
public static bool IsConnectServer = !ConfigAppSettings.GetValue(Setting_Init.http_server).Equals("");
public StoreManager()
......
......@@ -9,16 +9,19 @@ using System.Runtime.ExceptionServices;
using System.Text;
using System.Windows.Forms;
using CodeLibrary;
using System.Drawing.Imaging;
using System.Text.RegularExpressions;
namespace OnlineStore.DeviceLibrary
{
public class CodeManager
{
public static int DeCodeType = ConfigAppSettings.GetIntValue(Setting_Init.DeCodeType);
private static int QRCodeCount = ConfigAppSettings.GetIntValue(Setting_Init.QRCodeCount);
public static List<string> cameraNameList = new List<string>();
public static List<string> codeTypeList = new List<string>();
public static List<string> balserNameList = new List<string>();
//public static List<string> balserNameList = new List<string>();
public static List<string> hikNameList = new List<string>();
private static char spiltChar = '#';
......@@ -27,9 +30,12 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public static void LoadConfig()
{
if (QRCodeCount < 1)
{
QRCodeCount = 1;
}
string nameStr = ConfigAppSettings.GetValue(Setting_Init.CameraName);
string codeStr = ConfigAppSettings.GetValue(Setting_Init.CodeType);
cameraNameList = new List<string>();
codeTypeList = new List<string>();
HDLogUtil.LogName = "RollingLogFileAppender";
try
......@@ -51,7 +57,8 @@ namespace OnlineStore.DeviceLibrary
{
continue;
}
LogUtil.info("加载到配置二维码类型:" + str.Trim());
string file = GetCodeParamFilePath(str.Trim());
LogUtil.info("加载到配置二维码类型:" + str.Trim() + ",配置文件:" + file);
codeTypeList.Add(str.Trim());
}
......@@ -79,129 +86,84 @@ namespace OnlineStore.DeviceLibrary
}
private static void LoadCamera(bool isReLoad)
{
if (isReLoad)
if (isReLoad || Camera._cam == null)
{
try
{
CodeLibrary.HIKCamera.Instance.Load();
}
catch (Exception ex)
if (Camera._cam != null)
{
LogUtil.error("加载HIK相机出错:" + ex.ToString());
Camera._cam.CloseAll();
}
try
{
CodeLibrary.BaslerCamera.Instance.Load();
Camera.Type = CameraType.HIK;
Camera._cam.Load();
}
catch (Exception ex)
{
LogUtil.error("加载Basler相机出错:" + ex.ToString());
LogUtil.error("加载HIK相机出错:" + ex.ToString());
}
}
string[] names = CodeLibrary.HIKCamera.Instance.CameraName;
string[] names = Camera._cam.Name;
if (names != null)
{
hikNameList.AddRange(names);
foreach (string name in hikNameList)
foreach (string n in names)
{
LogUtil.info("加载到HIK相机:" + name);
}
}
names = CodeLibrary.BaslerCamera.Instance.CameraName;
if (names != null)
if (!hikNameList.Contains(n))
{
balserNameList.AddRange(names);
foreach (string name in balserNameList)
{
LogUtil.info("加载到Balser相机:" + name);
}
}
}
public static void CloseCamera()
{
BaslerCamera.Instance.Close();
HIKCamera.Instance.Close();
}
public static Bitmap GetCamerImage(string cameraName)
{
Bitmap bitm = null;
try
{
if (balserNameList.Contains(cameraName))
{
bool result = BaslerCamera.Instance.Open(cameraName);
// LogUtil.info("打开相机:" + cameraName + "(" + result + ")");
if (result)
{
BaslerCamera.Instance.GrabOne();
bitm = BaslerCamera.Instance.Image;
BaslerCamera.Instance.Close();
hikNameList.Add(n);
}
else
{
LogUtil.error("相机【" + cameraName + "】打开失败:" + BaslerCamera.Instance.ErrInfo);
}
}
else if (hikNameList.Contains(cameraName))
{
bool result = HIKCamera.Instance.Open(cameraName);
// LogUtil.info("打开相机:" + cameraName + "(" + result + ")");
if (result)
// hikNameList.AddRange(names);
foreach (string name in hikNameList)
{
HIKCamera.Instance.GrabOne();
bitm = HIKCamera.Instance.Image;
HIKCamera.Instance.Close();
LogUtil.info("加载到HIK相机:" + name);
}
else
{
LogUtil.error("相机【" + cameraName + "】打开失败:" + HIKCamera.Instance.ErrInfo);
}
}
else
{
LogUtil.info("未找到相机【" + cameraName + "】无法获取图片");
//若未加载到相机,需要重新加载相机
if (balserNameList.Count <= 0 && hikNameList.Count <= 0)
public static void CloseCamera(string cameraName)
{
LogUtil.error("获取图片时发现未加载到相机,重新加载相机");
LoadCamera(true);
}
}
Camera._cam.Close(cameraName);
}
catch (Exception ex)
public static void CloseAllCamera()
{
LogUtil.error("从相机【" + cameraName + "】获取图片出错:" + ex.ToString());
}
return bitm;
Camera._cam.CloseAll();
}
[HandleProcessCorruptedStateExceptions]
public static List<string> CameraScan()
{
int codeCount = 1;
List<string> codeList = new List<string>();
//List<CodeInfo> allCodeList = new List<CodeInfo>();
if (cameraNameList == null || cameraNameList.Count <= 0)
{
return codeList;
}
try
{
foreach (string cameraName in cameraNameList)
{
using (Bitmap bitmap = GetCamerImage(cameraName))
if (cameraName.Trim().Equals(""))
{
continue;
}
DateTime startTime = DateTime.Now;
LogUtil.info(" 【" + cameraName + "】开始取图片");
HalconDotNet.HObject ho_Image = null;
try
{
if (bitmap == null)
ho_Image = Camera._cam.CaptureOnImage(cameraName);
if (ho_Image == null)
{
LogUtil.error(" 摄像机【" + cameraName + "】获取图片失败,关闭相机");
CloseCamera();
LogUtil.error(" 【" + cameraName + "】取图片失败[" + Camera._cam.ErrInfo + "],关闭相机");
CloseCamera(cameraName);
continue;
}
LogUtil.debug(" 摄像机【" + cameraName + "】获取图片完成");
System.Threading.Thread.Sleep(1);
HalconDotNet.HObject ho_Image = HDCodeHelper.Bitmap2HObjectBpp24(bitmap);
LogUtil.debug(" 摄像机【" + cameraName + "】转换图片完成,开始扫码");
LogUtil.info(" 【" + cameraName + "】取图片完成,开始扫码");
List<CodeInfo> cc = new List<CodeInfo>();
string r = "";
foreach (string codeType in codeTypeList)
{
//判断是否是一维码
......@@ -211,134 +173,126 @@ namespace OnlineStore.DeviceLibrary
}
else
{
cc = HDCodeHelper.DecodeCode(ho_Image, 1, GetCodeParamFilePath(codeType), codeType);
cc = HDCodeHelper.DecodeCode(ho_Image, codeType, GetCodeParamFilePath(codeType), codeCount, 4000);
}
if (cc.Count > 0)
{
string r = "";
foreach (CodeInfo c in cc)
{
codeList.Add(c.CodeStr);
r = r + "##" + c.CodeStr;
}
LogUtil.debug(" 【" + cameraName + "】【" + codeType + "】扫码完成:" + r);
string str = CodeManager.ReplaceCode(c.CodeStr);
if (!codeList.Contains(str))
{
codeList.Add(str);
r = r + "##" + str;
}
}
}
if (String.IsNullOrEmpty(r))
{
// SaveImageToFile(deviceName, cameraName, bit);
}
LogUtil.info(" 【" + cameraName + "】" + " 扫码完成【" + FormUtil.GetSpanStr(DateTime.Now - startTime) + "】 :" + r);
}
catch (AccessViolationException e)
{
LogUtil.error("扫码出现AccessViolationException异常:" + e.ToString());
GC.Collect();
LogUtil.error(" 扫码出现AccessViolationException异常,关闭相机【" + cameraName + "】:" + e.ToString());
Camera._cam.Close(cameraName);
// GC.Collect();
}
catch (Exception ex)
{
LogUtil.error("扫码出错:" + ex.ToString());
}
return codeList;
LogUtil.error(" 扫码出错:" + ex.ToString());
}
public static string GetCodeParamFilePath(string codePath)
finally
{
string appPath = Application.StartupPath;
string path = appPath + ConfigAppSettings.GetValue(Setting_Init.CodeParamPath);
string filePath = path + codePath + ".dcm";
if (File.Exists(filePath))
if (ho_Image != null)
{
return filePath;
ho_Image.Dispose();
}
else
{
return "";
}
}
/// <summary>
/// 西安料仓二维码解析处理
/// </summary>
public static string GetBarcode(string codeStr)
{
if (!string.IsNullOrEmpty(codeStr))
{
string[] codeInfos = codeStr.Replace("\r", "").Split('\n');
string ri = "";
string qty = "";
string youxiao = "";
foreach (string codeInfo in codeInfos)
{
if (codeInfo.StartsWith("物料编码:")||codeInfo.StartsWith("物料编码:"))
{
ri = codeInfo.Substring(5);
}
else if (codeInfo.StartsWith("入库数量:")|| codeInfo.StartsWith("入库数量:"))
catch (AccessViolationException e)
{
qty = codeInfo.Substring(5);
LogUtil.error(" 扫码出现AccessViolationException异常:" + e.ToString());
// GC.Collect();
}
else if (codeInfo.StartsWith("有效期限:")|| codeInfo.StartsWith("有效期限:"))
catch (Exception ex)
{
youxiao = codeInfo.Substring(5);
LogUtil.error(" 扫码出错:" + ex.ToString());
}
return codeList;
}
if (!string.IsNullOrEmpty(ri))
private static void SaveImageToFile(string deviceName, string cameraName, Bitmap bitmap)
{
string pn = ri.Split(' ')[0];
return pn + ";" + qty + ";" + ri + ";" + youxiao;
}
string date = DateTime.Now.ToString("HH-mm-ss-") + DateTime.Now.Millisecond;
string dire = @"D:\image\" + deviceName.Trim().Replace('_', '-') + @"\" + cameraName.Trim().Replace('_', '-').Replace(':', '-') + @"\";
string iamgeName = date + ".bmp";
try
{
Bitmap bit = (Bitmap)bitmap.Clone();
if (Directory.Exists(dire).Equals(false))
{
Directory.CreateDirectory(dire);
}
return "";
bit.Save(dire + iamgeName, ImageFormat.Bmp);
LogUtil.info(deviceName + " 【" + cameraName + "】扫码失败,保存图片到【" + dire + iamgeName + "】成功");
}
public static string ProcessChengDuCode(List<string> codeList)
{
string split = ";";
string result = "";
try
catch (Exception ex)
{
List<string> rCodes = new List<string>();
rCodes.Add(GetCodeByStart(codeList, "RI"));
rCodes.Add(GetCodeByStart(codeList, "PN"));
LogUtil.error("保存" + deviceName + " 【" + cameraName + "】的图片到【" + dire + iamgeName + "】出错" + ex.ToString());
}
}
//P条码改为 P;H;Q或者 D;H;Q的格式
foreach (string s in rCodes)
{
if (!s.Equals(""))
public static string GetCodeParamFilePath(string codePath)
{
if (result.Equals(""))
string appPath = Application.StartupPath;
string path = appPath + ConfigAppSettings.GetValue(Setting_Init.CodeParamPath);
string filePath = path + codePath + ".dcm";
if (File.Exists(filePath))
{
result = s;
return filePath;
}
else
{
result = result + split + s;
}
return "";
}
}
return result;
/// <summary>
/// 处理接收后的二维码
/// </summary>
/// <param name="message"></param>
/// <returns></returns>
public static string ReplaceCode(string message)
{
message = message.Trim();
message = message.Replace("\r", "");
message = message.Replace("\n", "");
char a = (char)02;
message = message.Replace(a.ToString(), "");
message = message.Trim();
if (!HasChinese(message))
{
System.Text.ASCIIEncoding asciiEncoding = new System.Text.ASCIIEncoding();
byte[] bytes = asciiEncoding.GetBytes(message);
List<byte> newBytes = new List<byte>();
foreach (byte by in bytes)
{
int value = (int)by;
if (value.Equals(24) || value.Equals(30) || value.Equals(29) || value.Equals(4))
{
continue;
}
catch (Exception ex)
if (!value.Equals(24))
{
LogUtil.error("处理二维码出错:" + ex.ToString());
newBytes.Add(by);
}
return result;
}
private static string GetCodeByStart(List<string> codeList, string start)
{
List<string> pCode = (from m in codeList where m.StartsWith(start) select m).ToList<string>();
if (pCode.Count > 0)
{
int subCount = start.Length;
if (pCode[0].Substring(start.Length, 1).Equals(":"))
{
subCount = start.Length + 1;
message = asciiEncoding.GetString(newBytes.ToArray());
}
return pCode[0].Substring(subCount, pCode[0].Length - subCount);
return message;
}
return "";
public static bool HasChinese(string str)
{
return Regex.IsMatch(str, @"[\u4e00-\u9fa5]");
}
}
}
......@@ -195,6 +195,7 @@ namespace OnlineStore.DeviceLibrary
// WarnMsg = String.Format(msg, param);
WarnObj.WarnMsg = ResourceControl.GetChinaString(code, param);
WarnObj.WarnMsgEn = ResourceControl.GetEnglishString(code, param);
WarnObj.WarnMsgJp = ResourceControl.GetJapaneseString(code, param);
WarnObj.MsgCode = code;
WarnObj.MsgParam = param;
}
......@@ -218,6 +219,7 @@ namespace OnlineStore.DeviceLibrary
public WarnInfo()
{
WarnMsgEn = "";
WarnMsgJp = "";
MsgCode = "";
WarnMsg = "";
MsgParam = null;
......@@ -226,6 +228,7 @@ namespace OnlineStore.DeviceLibrary
public string MsgCode { set; get; }
public string WarnMsg { set; get; }
public string WarnMsgEn {set;get;}
public string WarnMsgJp { set; get; }
public string[] MsgParam { set; get; }
}
}
......@@ -146,7 +146,7 @@ namespace OnlineStore.DeviceLibrary
}
isInPro = false;
}
protected void SaveAlarmInfo(StoreAlarmType alarmType, string alarmDetial, string alarmMsg,string alarmMsgEn, StoreMoveType storeMoveType)
protected void SaveAlarmInfo(StoreAlarmType alarmType, string alarmDetial, string alarmMsg,string alarmMsgEn, string alarmMsgJp, StoreMoveType storeMoveType)
{
alarmMsg = alarmMsg.Replace(StoreName, "");
int inoutStatus = 0;
......@@ -184,7 +184,7 @@ namespace OnlineStore.DeviceLibrary
break;
default: break;
}
alarmInfo = new AlarmInfo(StoreID, aType, alarmDetial, alarmMsg,alarmMsgEn, inoutStatus);
alarmInfo = new AlarmInfo(StoreID, aType, alarmDetial, alarmMsg,alarmMsgEn, alarmMsgJp, inoutStatus);
}
/// <summary>
......@@ -228,7 +228,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(LOGGER, moveAxis.DisplayStr + "speed[" + moveAxis.TargetSpeed + "]开始原点返回");
StoreMove.WaitList.Add(WaitResultInfo.WaitAxis(moveAxis, true));
AddAxisMoveTime(moveAxis);
ACServerManager.HomeMove(moveAxis.DeviceName, (short)moveAxis.GetAxisValue(), moveAxis.HomeHighSpeed);
ACServerManager.HomeMove(moveAxis.DeviceName, (short)moveAxis.GetAxisValue(), moveAxis.HomeHighSpeed, moveAxis.HomeLowSpeed, moveAxis.HomeAddSpeed);
}
/// <summary>
......@@ -239,7 +239,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.WaitList.Add(WaitResultInfo.WaitAxis(moveAxis, targetPosition, targetSpeed));
moveAxis.TargetPosition = targetPosition;
AddAxisMoveTime(moveAxis);
ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition,targetSpeed);
ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition,targetSpeed, targetSpeed*4, targetSpeed * 4);
}
/// <summary>
......@@ -275,7 +275,7 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil.error(LOGGER, moveAxis.DisplayStr + "目标位置[" + targetPosition + "]当前位置[" + outCount +
"],误差过大,重新开始运动,剩余[" + StoreMove.CanWhileCount + "]次");
ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed);
ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed, targetSpeed * 4, targetSpeed * 4);
StoreMove.CanWhileCount--;
}
else
......@@ -306,7 +306,7 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil.error(LOGGER, moveAxis.DisplayStr + "收到原点完成信号,当前位置[" + outCount + "],重新回原点,剩余[" + StoreMove.CanWhileCount + "]次");
//LogUtil.error(LOGGER, StoreName + moveAxis.DisplayStr + "重新回原点");
ACServerManager.HomeMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), moveAxis.HomeHighSpeed);
ACServerManager.HomeMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), moveAxis.HomeHighSpeed, moveAxis.HomeLowSpeed, moveAxis.HomeAddSpeed);
StoreMove.CanWhileCount--;
}
else
......
......@@ -176,6 +176,8 @@ namespace OnlineStore.DeviceLibrary
/// 关闭门,旋转轴到P1,升降轴到P1
/// </summary>
BOX_M_H_TOP1_OtherAxisToP1 = 032,
BOX_H_InOutBack_wait = 033,
BOX_H_OtherAxisBack_wait = 034,
#endregion
......@@ -183,7 +185,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
///料仓出库,,定位气缸下降
/// </summary>
SO_01_LocationCylinderDown=101,
SO_01_LocationCylinderDown =101,
/// <summary>
///料仓出库:叉子先运动到P1
/// </summary>
......@@ -779,6 +781,7 @@ namespace OnlineStore.DeviceLibrary
/// 在线双层料仓:回原点:原点开关点亮,原点开关点亮,旋回端开关点亮,,转盘停止 ,电缸停止, 清理电钢和转盘的位置信息
/// </summary>
DB_H_04_ClearPosition = 20304,
}
public enum StoreAlarmType
......
......@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.LoadCSVLibrary</RootNamespace>
<AssemblyName>LoadCSVLibrary</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
......@@ -33,9 +33,9 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\dll\log4net.dll</HintPath>
<HintPath>..\..\..\HuichuanLibrary\HuichuanLibrary\bin\Debug\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
......
......@@ -93,12 +93,12 @@ namespace OnlineStore.LoadCSVLibrary
/// 加速度
/// </summary>
//[CSVAttribute("加速时间")]
public short AddSpeed { get; set; }
public int AddSpeed { get; set; }
/// <summary>
/// 减速度
/// </summary>
//[CSVAttribute("减速时间")]
public short DelSpeed { get; set; }
public int DelSpeed { get; set; }
public int HomeLowSpeed { get; set; }
public int HomeHighSpeed { get; set; }
......
......@@ -57,16 +57,7 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
[ConfigProAttribute("IsHasDoorLimit")]
public int IsHasDoorLimit { get; set; }
/// <summary>
/// PRO 扫码枪IP Scanner_Ip 192.168.200.13
/// </summary>
[ConfigProAttribute("Scanner_Ip")]
public string Scanner_Ip { get; set; }
/// <summary>
/// PRO 扫码枪端口号 Scanner_Port 51236
/// </summary>
[ConfigProAttribute("Scanner_Port")]
public int Scanner_Port { get; set; }
/// <summary>
/// PRO (轴一)旋转轴原点目标速度 MiddleAxis_TargetSpeed 30000
/// </summary>
......@@ -77,12 +68,12 @@ namespace OnlineStore.LoadCSVLibrary
/// PRO (轴一)旋转轴加速度 MiddleAxis_AddSpeed 500
/// </summary>
[ConfigProAttribute("MiddleAxis_AddSpeed")]
public short MiddleAxis_AddSpeed { get; set; }
public int MiddleAxis_AddSpeed { get; set; }
/// <summary>
/// PRO (轴一)旋转轴减速度 MiddleAxis_DelSpeed 500
/// </summary>
[ConfigProAttribute("MiddleAxis_DelSpeed")]
public short MiddleAxis_DelSpeed { get; set; }
public int MiddleAxis_DelSpeed { get; set; }
/// <summary>
/// PRO (轴二)升降轴轴原点目标速度 UpdownAxis_TargetSpeed 120000
/// </summary>
......@@ -93,12 +84,12 @@ namespace OnlineStore.LoadCSVLibrary
/// PRO (轴二)升降轴轴加速度 UpdownAxis_AddSpeed 200
/// </summary>
[ConfigProAttribute("UpdownAxis_AddSpeed")]
public short UpdownAxis_AddSpeed { get; set; }
public int UpdownAxis_AddSpeed { get; set; }
/// <summary>
/// PRO (轴二)升降轴轴减速度 UpdownAxis_DelSpeed 200
/// </summary>
[ConfigProAttribute("UpdownAxis_DelSpeed")]
public short UpdownAxis_DelSpeed { get; set; }
public int UpdownAxis_DelSpeed { get; set; }
/// <summary>
/// PRO (轴三)进出轴原点目标速度 InoutAxis_TargetSpeed 12000
/// </summary>
......@@ -109,29 +100,29 @@ namespace OnlineStore.LoadCSVLibrary
/// PRO (轴三)进出轴加速度 InoutAxis_AddSpeed 200
/// </summary>
[ConfigProAttribute("InoutAxis_AddSpeed")]
public short InoutAxis_AddSpeed { get; set; }
public int InoutAxis_AddSpeed { get; set; }
/// <summary>
/// PRO (轴三)进出轴减速度 InoutAxis_DelSpeed 200
/// </summary>
[ConfigProAttribute("InoutAxis_DelSpeed")]
public short InoutAxis_DelSpeed { get; set; }
public int InoutAxis_DelSpeed { get; set; }
/// <summary>
/// PRO (轴一)旋转轴原点低速度 MiddleAxis_HomeLowSpeed 50
/// </summary>
[ConfigProAttribute("MiddleAxis_HomeLowSpeed")]
public short MiddleAxis_HomeLowSpeed { get; set; }
public int MiddleAxis_HomeLowSpeed { get; set; }
/// <summary>
/// PRO (轴一)旋转轴原点高速 MiddleAxis_HomeHighSpeed 100
/// </summary>
[ConfigProAttribute("MiddleAxis_HomeHighSpeed")]
public short MiddleAxis_HomeHighSpeed { get; set; }
public int MiddleAxis_HomeHighSpeed { get; set; }
/// <summary>
/// PRO (轴一)旋转轴原点加速度 MiddleAxis_HomeAddSpeed 30
/// </summary>
[ConfigProAttribute("MiddleAxis_HomeAddSpeed")]
public short MiddleAxis_HomeAddSpeed { get; set; }
public int MiddleAxis_HomeAddSpeed { get; set; }
......@@ -139,19 +130,19 @@ namespace OnlineStore.LoadCSVLibrary
/// PRO (轴二)升降轴轴原点低速度 UpdownAxis_HomeLowSpeed 50
/// </summary>
[ConfigProAttribute("UpdownAxis_HomeLowSpeed")]
public short UpdownAxis_HomeLowSpeed { get; set; }
public int UpdownAxis_HomeLowSpeed { get; set; }
/// <summary>
/// PRO (轴二)升降轴轴原点高速 UpdownAxis_HomeHighSpeed 100
/// </summary>
[ConfigProAttribute("UpdownAxis_HomeHighSpeed")]
public short UpdownAxis_HomeHighSpeed { get; set; }
public int UpdownAxis_HomeHighSpeed { get; set; }
/// <summary>
/// PRO (轴二)升降轴轴原点加速度 UpdownAxis_HomeAddSpeed 30
/// </summary>
[ConfigProAttribute("UpdownAxis_HomeAddSpeed")]
public short UpdownAxis_HomeAddSpeed { get; set; }
public int UpdownAxis_HomeAddSpeed { get; set; }
......@@ -159,17 +150,17 @@ namespace OnlineStore.LoadCSVLibrary
/// PRO (轴三)进出轴原点低速 InoutAxis_HomeLowSpeed 50
/// </summary>
[ConfigProAttribute("InoutAxis_HomeLowSpeed")]
public short InoutAxis_HomeLowSpeed { get; set; }
public int InoutAxis_HomeLowSpeed { get; set; }
/// <summary>
/// PRO (轴三)进出轴原点高速 InoutAxis_HomeHighSpeed 100
/// </summary>
[ConfigProAttribute("InoutAxis_HomeHighSpeed")]
public short InoutAxis_HomeHighSpeed { get; set; }
public int InoutAxis_HomeHighSpeed { get; set; }
/// <summary>
/// PRO (轴三)进出轴原点加速度 InoutAxis_HomeAddSpeed 30
/// </summary>
[ConfigProAttribute("InoutAxis_HomeAddSpeed")]
public short InoutAxis_HomeAddSpeed { get; set; }
public int InoutAxis_HomeAddSpeed { get; set; }
/// <summary>
......@@ -430,12 +421,6 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary>
/// PRO 模拟量IO模块的IP地址 AIDevice_IP 192.168.200.11
/// </summary>
[ConfigProAttribute("AIDevice_IP", true)]
public string AIDevice_IP { get; set; }
/// <summary>
/// PRO,模拟信号1默认高度,AIDI1_DefaultPosition,1,,,,,,,
/// </summary>
[ConfigProAttribute("AIDI1_DefaultPosition", true)]
......@@ -460,22 +445,22 @@ namespace OnlineStore.LoadCSVLibrary
/// PRO 模拟信号1的地址 AIDI1_Addr 7
/// </summary>
[ConfigProAttribute("AIDI1_Addr", true)]
public int AIDI1_Addr { get; set; }
public short AIDI1_Addr { get; set; }
/// <summary>
/// PRO 模拟信号2的地址 AIDI2_Addr 8
/// </summary>
[ConfigProAttribute("AIDI2_Addr", true)]
public int AIDI2_Addr { get; set; }
public short AIDI2_Addr { get; set; }
/// <summary>
/// PRO 模拟信号3的地址 AIDI3_Addr 5
/// </summary>
[ConfigProAttribute("AIDI3_Addr", false )]
public int AIDI3_Addr { get; set; }
public short AIDI3_Addr { get; set; }
/// <summary>
/// PRO 模拟信号4的地址 AIDI4_Addr 6
/// </summary>
[ConfigProAttribute("AIDI4_Addr", false )]
public int AIDI4_Addr { get; set; }
public short AIDI4_Addr { get; set; }
/// <summary>
/// PRO,特殊二维码尺寸配置,CodeSizeConfig,XA=13x48#XB=13x32#FA=7x32,,,,,,,
......@@ -526,7 +511,6 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("CompAxis_HomeAddSpeed")]
public int CompAxis_HomeAddSpeed { get; set; }
/// <summary>
/// PRO 压紧轴(轴4)P1速度 CompAxis_P1_Speed 100
/// </summary>
......@@ -543,16 +527,6 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("CompAxis_P3_Speed")]
public int CompAxis_P3_Speed { get; set; }
/// <summary>
/// PRO IO模块对应的DI数量 IO_DILength 192.168.200.10#16;192.168.200.11#4
/// </summary>
[ConfigProAttribute("IO_DILength")]
public string IO_DILength { get; set; }
/// <summary>
/// PRO 模块对应的DO数量 IO_DOLength 192.168.200.10#16;192.168.200.11#4
/// </summary>
[ConfigProAttribute("IO_DOLength")]
public string IO_DOLength { get; set; }
/// <summary>
......@@ -561,52 +535,6 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("AI_ConvertPosition")]
public int AI_ConvertPosition { get; set; }
/// <summary>
/// PRO,大盘宽度(13寸或15寸),Big_TrayWidth,15,,,,,,,
/// /// </summary>
[ConfigProAttribute("Big_TrayWidth")]
public int Big_TrayWidth { get; set; }
private Dictionary<string, string> CodeSizeMap =null ;
private static char codeSpilt= '#';
public string GetCodeSize(string code)
{
try
{
if (CodeSizeMap == null)
{
CodeSizeMap = new Dictionary<string, string>();
string[] array = CodeSizeConfig.Split(codeSpilt);
if (array.Length > 0)
{
foreach (string str in array)
{
string[] codeStr = str.Split('=');
if (codeStr.Length == 2)
{
string key = codeStr[0].Trim();
string value = codeStr[1].Trim();
CodeSizeMap.Add(key, value);
}
}
}
}
foreach (string key in CodeSizeMap.Keys)
{
if (code.Trim().StartsWith(key))
{
return CodeSizeMap[key];
}
}
}catch(Exception ex)
{
LOGGER.Error("获取二维码【"+code+"】的固定尺寸出错:"+ex.ToString());
}
return "";
}
protected override void initMustHavePro()
{
......@@ -633,10 +561,8 @@ namespace OnlineStore.LoadCSVLibrary
MustHaveDOList.Add(IO_Type.RunSign_HddLed);
MustHaveDOList.Add(IO_Type.Alarm_Buzzer);
MustHaveDOList.Add(IO_Type.StartOrStopBlow);
MustHaveDOList.Add(IO_Type.Run_Signal);
MustHaveDOList.Add(IO_Type.Axis_Brake);
MustHaveDOList.Add(IO_Type.Door_Up);
MustHaveDOList.Add(IO_Type.Door_Down);
MustHaveDOList.Add(IO_Type.Door_Moto_Run);
MustHaveDOList.Add(IO_Type.Door_Moto_Rev);
MustHaveDOList.Add(IO_Type.Camera_Led);
}
public static void ConfigAxis(AC_SA_Config Config)
......@@ -697,68 +623,7 @@ namespace OnlineStore.LoadCSVLibrary
Config.Comp_Axis.PositionMin = 0;
Config.Comp_Axis.PositionMax = 0;
}
private Dictionary<string, ushort> DILengthMap = null;
private Dictionary<string, ushort> DOLengthMap = null;
public ushort GetDILength(string ip)
{
try
{
if (DILengthMap == null)
{
DILengthMap = new Dictionary<string, ushort>();
string[] arrayList = IO_DILength.Split(';');
foreach (string str in arrayList)
{
string[] arrStr = str.Split('#');
if (arrStr.Length == 2)
{
string ioip = arrStr[0];
ushort length = Convert.ToUInt16(arrStr[1]);
DILengthMap.Add(ioip, length);
}
}
}
}
catch (Exception ex)
{
}
if (DILengthMap.ContainsKey(ip))
{
return DILengthMap[ip];
}
return 16;
}
public ushort GetDOLength(string ip)
{
try
{
if (DOLengthMap == null)
{
DOLengthMap = new Dictionary<string, ushort>();
string[] arrayList = IO_DOLength.Split(';');
foreach (string str in arrayList)
{
string[] arrStr = str.Split('#');
if (arrStr.Length == 2)
{
string ioip = arrStr[0];
ushort length = Convert.ToUInt16(arrStr[1]);
DOLengthMap.Add(ioip, length);
}
}
}
}
catch (Exception ex)
{
}
if (DOLengthMap.ContainsKey(ip))
{
return DOLengthMap[ip];
}
return 16;
}
}
}
......@@ -29,97 +29,108 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary>
/// DI 急停 SuddenStop_BTN X01
/// DI 急停 SuddenStop_BTN X00
/// </summary>
public static string SuddenStop_BTN = "SuddenStop_BTN";
/// <summary>
/// DI 复位 Reset_BTN X02
/// DI 复位 Reset_BTN X01
/// </summary>
public static string Reset_BTN = "Reset_BTN";
/// <summary>
///DI 自动 AutoRun_Signal X03
///DI 自动 AutoRun_Signal X02
/// </summary>
public static string AutoRun_Signal = "AutoRun_Signal";
/// <summary>
///DI 气压检测 Airpressure_Check X04
///DI 气压检测 Airpressure_Check X03
/// </summary>
public static string Airpressure_Check = "Airpressure_Check";
/// <summary>
/// DI 料盘检测1(进料口) TrayCheck_Door X05
/// DI 料盘检测1(进料口) TrayCheck_Door X04
/// </summary>
public static string TrayCheck_Door = "TrayCheck_Door";
/// <summary>
/// DI 料盘检测2(料叉) TrayCheck_Fixture X06
/// DI 料盘检测2(料叉) TrayCheck_Fixture X05
/// </summary>
public static string TrayCheck_Fixture = "TrayCheck_Fixture";
/// <summary>
/// DI 进料口门上升端 Door_Up X07
/// DI 进料口门上升端 Door_Up X06
/// </summary>
public static string Door_Up = "Door_Up";
/// <summary>
/// DI 进料口门下降端 Door_Down X08
/// DI 进料口门下降端 Door_Down X07
/// </summary>
public static string Door_Down = "Door_Down";
/// <summary>
/// DI 安全光栅 SafetyLightCurtains X09
/// DI 安全光栅 SafetyLightCurtains X08
/// </summary>
public static string SafetyLightCurtains = "SafetyLightCurtains";
/// <summary>
/// DI 前门限位 Door_Limit X10
/// DI 前门限位 Door_Limit X09
/// </summary>
public static string Door_Limit = "Door_Limit";
/// <summary>
/// DI 左侧门限位 Door_LeftLimit X11
/// DI 左侧门限位 Door_LeftLimit X10
/// </summary>
public static string Door_LeftLimit = "Door_LeftLimit";
/// <summary>
/// DI 右侧门限位 Door_RightLimit X12
/// DI 右侧门限位 Door_RightLimit X11
/// </summary>
public static string Door_RightLimit = "Door_RightLimit";
/// <summary>
/// DI 激光对点检测 Door_RightLimit X12
/// </summary>
public static string Laser_detection = "Laser_detection";
/// <summary>
/// DI 进料口电机异常 Door_RightLimit X13
/// </summary>
public static string Motor_Error = "Motor_Error";
/// <summary>
/// DO 自动指示灯 AutoRun_HddLed Y01
/// DO 自动指示灯 AutoRun_HddLed Y00
/// </summary>
public static string AutoRun_HddLed = "AutoRun_HddLed";
/// <summary>
///DO 故障指示灯 Alarm_HddLed Y02
///DO 故障指示灯 Alarm_HddLed Y01
/// </summary>
public static string Alarm_HddLed = "Alarm_HddLed";
/// <summary>
/// DO 待机指示灯 RunSign_HddLed Y03
/// DO 待机指示灯 RunSign_HddLed Y02
/// </summary>
public static string RunSign_HddLed = "RunSign_HddLed";
/// <summary>
/// DO 故障蜂鸣器 Alarm_Buzzer Y04
/// DO 故障蜂鸣器 Alarm_Buzzer Y03
/// </summary>
public static string Alarm_Buzzer = "Alarm_Buzzer";
/// <summary>
/// DO 吹气SOL ON StartOrStopBlow Y05
/// DO 吹气SOL ON StartOrStopBlow Y06
/// </summary>
public static string StartOrStopBlow = "StartOrStopBlow";
/// <summary>
/// DO 料仓运转ON Run_Signal Y06
/// DO 相机照明开 Camera_Led Y05
/// </summary>
public static string Run_Signal = "Run_Signal";
public static string Camera_Led = "Camera_Led";
/// <summary>
/// DO 轴2刹车电源ON Axis_Brake Y07
/// DO 设备照明开 Device_Led Y04
/// </summary>
public static string Axis_Brake = "Axis_Brake";
public static string Device_Led = "Device_Led";
/// <summary>
/// DO 相机照明开 Camera_Led Y10
/// DO 进料口门运转 Door_Moto_Run Y07
/// </summary>
public static string Camera_Led = "Camera_Led";
public static string Door_Moto_Run = "Door_Moto_Run";
/// <summary>
/// DO 设备照明开 Device_Led Y11
/// DO 进料口门反转关门 Door_Moto_Rev Y08
/// </summary>
public static string Device_Led = "Device_Led";
public static string Door_Moto_Rev = "Door_Moto_Rev";
}
public enum IO_VALUE
{
None = -1,
/// <summary>
/// 低位
/// </summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!