Commit 615e6b79 几米阳光

调试修改

1 个父辈 16cc676d
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
<appSettings> <appSettings>
<!--是否开机自动启动料仓--> <!--是否开机自动启动料仓-->
<add key="App_AutoRun" value="1" /> <add key="App_AutoRun" value="1" />
<add key ="CodeRun" value ="0"/>
<add key="App_Title" value="料仓_批量上下料" /> <add key="App_Title" value="料仓_批量上下料" />
<add key="scanner_start_command" value="S" /> <add key="scanner_start_command" value="S" />
<!-- 开始吹气的判断值(配置值=服务器发送的湿度值-开始吹气值)--> <!-- 开始吹气的判断值(配置值=服务器发送的湿度值-开始吹气值)-->
...@@ -25,7 +24,7 @@ ...@@ -25,7 +24,7 @@
<!--end one store config--> <!--end one store config-->
<!--摄像机名称列表配置,用#分割--> <!--摄像机名称列表配置,用#分割-->
<add key="CameraName" value="codeCamera" /> <add key="CameraName" value="GigE:MV-CE100-30GC (00C69898477)" />
<!--二维码类型列表配置,用#分割--> <!--二维码类型列表配置,用#分割-->
<add key="CodeType" value="Data Matrix ECC 200" /> <add key="CodeType" value="Data Matrix ECC 200" />
<!--<add key="CodeType" value="Data Matrix ECC 200"/>--> <!--<add key="CodeType" value="Data Matrix ECC 200"/>-->
...@@ -33,11 +32,12 @@ ...@@ -33,11 +32,12 @@
<add key="CodeParamPath" value="\CodeParam\" /> <add key="CodeParamPath" value="\CodeParam\" />
<add key ="InOutDefaultPosition" value ="3000"/> <add key ="InOutDefaultPosition" value ="3000"/>
<add key ="Config_Pwd" value ="123456"/> <add key ="Config_Pwd" value ="123456"/>
<add key ="AxisChangeValue" value ="100"/> <!--5000脉冲对应1mm-->
<add key ="AxisChangeValue" value ="5000"/>
</appSettings> </appSettings>
<log4net> <log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="logs/AutoStore.log" /> <file value="logs/AutoStore1.log" />
<appendToFile value="true" /> <appendToFile value="true" />
<rollingStyle value="Date" /> <rollingStyle value="Date" />
<datePattern value="yyyy-MM-dd" /> <datePattern value="yyyy-MM-dd" />
......
...@@ -82,14 +82,10 @@ ...@@ -82,14 +82,10 @@
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.lblAxisStatus = new System.Windows.Forms.Label(); this.lblAxisStatus = new System.Windows.Forms.Label();
this.button3 = new System.Windows.Forms.Button(); this.button3 = new System.Windows.Forms.Button();
this.axis_5_Alarm = new UserFromControl.IOStatusControl();
this.txtBatchTarget = new System.Windows.Forms.TextBox(); this.txtBatchTarget = new System.Windows.Forms.TextBox();
this.lblCountPulse5 = new System.Windows.Forms.TextBox(); this.lblCountPulse5 = new System.Windows.Forms.TextBox();
this.lblOutPulse5 = new System.Windows.Forms.TextBox(); this.lblOutPulse5 = new System.Windows.Forms.TextBox();
this.label20 = new System.Windows.Forms.Label(); this.label20 = 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.label38 = new System.Windows.Forms.Label();
this.txtMiddleTarget = new System.Windows.Forms.TextBox(); this.txtMiddleTarget = new System.Windows.Forms.TextBox();
this.txtInoutTarget = new System.Windows.Forms.TextBox(); this.txtInoutTarget = new System.Windows.Forms.TextBox();
...@@ -146,12 +142,6 @@ ...@@ -146,12 +142,6 @@
this.btnUpDownP6 = new System.Windows.Forms.Button(); this.btnUpDownP6 = new System.Windows.Forms.Button();
this.btnUpDownP3 = new System.Windows.Forms.Button(); this.btnUpDownP3 = new System.Windows.Forms.Button();
this.btnUpDownP4 = new System.Windows.Forms.Button(); this.btnUpDownP4 = new System.Windows.Forms.Button();
this.txtUpDownP7 = new System.Windows.Forms.TextBox();
this.txtUpDownP8 = new System.Windows.Forms.TextBox();
this.txtUpDownP2 = new System.Windows.Forms.TextBox();
this.btnUpDownP7 = new System.Windows.Forms.Button();
this.btnUpDownP8 = new System.Windows.Forms.Button();
this.btnUpDownP2 = new System.Windows.Forms.Button();
this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.料仓操作ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.料仓操作ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.启动ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.启动ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
...@@ -192,6 +182,7 @@ ...@@ -192,6 +182,7 @@
this.清理日志ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.清理日志ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.lblThisSta = new System.Windows.Forms.Label(); this.lblThisSta = new System.Windows.Forms.Label();
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
this.chbIsUseBatch = new System.Windows.Forms.CheckBox();
this.chbAuto = new System.Windows.Forms.CheckBox(); this.chbAuto = new System.Windows.Forms.CheckBox();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.显示ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.显示ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
...@@ -222,6 +213,7 @@ ...@@ -222,6 +213,7 @@
this.tabPage2 = new System.Windows.Forms.TabPage(); this.tabPage2 = new System.Windows.Forms.TabPage();
this.tabPage3 = new System.Windows.Forms.TabPage(); this.tabPage3 = new System.Windows.Forms.TabPage();
this.groupBox6 = new System.Windows.Forms.GroupBox(); this.groupBox6 = new System.Windows.Forms.GroupBox();
this.btnOpenDoor = new System.Windows.Forms.Button();
this.lblWaitTragGo = new System.Windows.Forms.Label(); this.lblWaitTragGo = new System.Windows.Forms.Label();
this.btnWaitTrgGo = new System.Windows.Forms.Button(); this.btnWaitTrgGo = new System.Windows.Forms.Button();
this.lblBatchStatus = new System.Windows.Forms.Label(); this.lblBatchStatus = new System.Windows.Forms.Label();
...@@ -231,6 +223,21 @@ ...@@ -231,6 +223,21 @@
this.btnGetOutTray = new System.Windows.Forms.Button(); this.btnGetOutTray = new System.Windows.Forms.Button();
this.lblDoorStatus = new System.Windows.Forms.Label(); this.lblDoorStatus = new System.Windows.Forms.Label();
this.btnBatchInStore = new System.Windows.Forms.Button(); this.btnBatchInStore = new System.Windows.Forms.Button();
this.axis_5_Alarm = new UserFromControl.IOStatusControl();
this.axis_1_Alarm = new UserFromControl.IOStatusControl();
this.axis_3_Alarm = new UserFromControl.IOStatusControl();
this.axis_2_Alarm = new UserFromControl.IOStatusControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.btnTempClose = new System.Windows.Forms.Button();
this.btnTempInit = new System.Windows.Forms.Button();
this.groupBox7 = new System.Windows.Forms.GroupBox();
this.txtTempPort = new System.Windows.Forms.TextBox();
this.label27 = new System.Windows.Forms.Label();
this.txtTemp = new System.Windows.Forms.TextBox();
this.label28 = new System.Windows.Forms.Label();
this.txtHum = new System.Windows.Forms.TextBox();
this.label29 = new System.Windows.Forms.Label();
this.btnSelTemp = new System.Windows.Forms.Button();
this.groupBox5.SuspendLayout(); this.groupBox5.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
...@@ -242,6 +249,8 @@ ...@@ -242,6 +249,8 @@
this.tabPage2.SuspendLayout(); this.tabPage2.SuspendLayout();
this.tabPage3.SuspendLayout(); this.tabPage3.SuspendLayout();
this.groupBox6.SuspendLayout(); this.groupBox6.SuspendLayout();
this.tabPage1.SuspendLayout();
this.groupBox7.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// timer1 // timer1
...@@ -255,7 +264,7 @@ ...@@ -255,7 +264,7 @@
this.lblWarnMsg.ForeColor = System.Drawing.Color.Red; this.lblWarnMsg.ForeColor = System.Drawing.Color.Red;
this.lblWarnMsg.Location = new System.Drawing.Point(12, 44); this.lblWarnMsg.Location = new System.Drawing.Point(12, 44);
this.lblWarnMsg.Name = "lblWarnMsg"; this.lblWarnMsg.Name = "lblWarnMsg";
this.lblWarnMsg.Size = new System.Drawing.Size(462, 40); this.lblWarnMsg.Size = new System.Drawing.Size(478, 40);
this.lblWarnMsg.TabIndex = 224; this.lblWarnMsg.TabIndex = 224;
this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
...@@ -317,7 +326,7 @@ ...@@ -317,7 +326,7 @@
this.groupBox5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox5.Location = new System.Drawing.Point(6, 2); this.groupBox5.Location = new System.Drawing.Point(6, 2);
this.groupBox5.Name = "groupBox5"; this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(497, 403); this.groupBox5.Size = new System.Drawing.Size(553, 403);
this.groupBox5.TabIndex = 216; this.groupBox5.TabIndex = 216;
this.groupBox5.TabStop = false; this.groupBox5.TabStop = false;
this.groupBox5.Text = "伺服运动"; this.groupBox5.Text = "伺服运动";
...@@ -889,7 +898,7 @@ ...@@ -889,7 +898,7 @@
this.richTextBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.richTextBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.richTextBox1.Location = new System.Drawing.Point(510, 473); this.richTextBox1.Location = new System.Drawing.Point(510, 473);
this.richTextBox1.Name = "richTextBox1"; this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(515, 266); this.richTextBox1.Size = new System.Drawing.Size(571, 266);
this.richTextBox1.TabIndex = 256; this.richTextBox1.TabIndex = 256;
this.richTextBox1.Text = ""; this.richTextBox1.Text = "";
// //
...@@ -926,7 +935,7 @@ ...@@ -926,7 +935,7 @@
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 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(8, 187); this.groupBox1.Location = new System.Drawing.Point(8, 187);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(493, 212); this.groupBox1.Size = new System.Drawing.Size(549, 212);
this.groupBox1.TabIndex = 217; this.groupBox1.TabIndex = 217;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "伺服状态"; this.groupBox1.Text = "伺服状态";
...@@ -957,16 +966,6 @@ ...@@ -957,16 +966,6 @@
this.button3.UseVisualStyleBackColor = true; this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click); this.button3.Click += new System.EventHandler(this.button3_Click);
// //
// axis_5_Alarm
//
this.axis_5_Alarm.IOName = "";
this.axis_5_Alarm.IOValue = 0;
this.axis_5_Alarm.isCanClick = false;
this.axis_5_Alarm.Location = new System.Drawing.Point(418, 37);
this.axis_5_Alarm.Name = "axis_5_Alarm";
this.axis_5_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_5_Alarm.TabIndex = 271;
//
// txtBatchTarget // txtBatchTarget
// //
this.txtBatchTarget.Location = new System.Drawing.Point(395, 139); this.txtBatchTarget.Location = new System.Drawing.Point(395, 139);
...@@ -1001,36 +1000,6 @@ ...@@ -1001,36 +1000,6 @@
this.label20.TabIndex = 267; this.label20.TabIndex = 267;
this.label20.Text = "批量出入料轴"; this.label20.Text = "批量出入料轴";
// //
// 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(116, 37);
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(318, 37);
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(213, 37);
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 // label38
// //
this.label38.AutoSize = true; this.label38.AutoSize = true;
...@@ -1228,7 +1197,7 @@ ...@@ -1228,7 +1197,7 @@
this.txtUpDownDoor.Cursor = System.Windows.Forms.Cursors.IBeam; this.txtUpDownDoor.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtUpDownDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtUpDownDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpDownDoor.ForeColor = System.Drawing.SystemColors.WindowText; this.txtUpDownDoor.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtUpDownDoor.Location = new System.Drawing.Point(153, 132); this.txtUpDownDoor.Location = new System.Drawing.Point(153, 194);
this.txtUpDownDoor.MaxLength = 0; this.txtUpDownDoor.MaxLength = 0;
this.txtUpDownDoor.Name = "txtUpDownDoor"; this.txtUpDownDoor.Name = "txtUpDownDoor";
this.txtUpDownDoor.RightToLeft = System.Windows.Forms.RightToLeft.No; this.txtUpDownDoor.RightToLeft = System.Windows.Forms.RightToLeft.No;
...@@ -1244,7 +1213,7 @@ ...@@ -1244,7 +1213,7 @@
this.btnUpDownDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnUpDownDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownDoor.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0))))); this.btnUpDownDoor.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
this.btnUpDownDoor.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnUpDownDoor.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnUpDownDoor.Location = new System.Drawing.Point(10, 130); this.btnUpDownDoor.Location = new System.Drawing.Point(10, 192);
this.btnUpDownDoor.Name = "btnUpDownDoor"; this.btnUpDownDoor.Name = "btnUpDownDoor";
this.btnUpDownDoor.RightToLeft = System.Windows.Forms.RightToLeft.No; this.btnUpDownDoor.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownDoor.Size = new System.Drawing.Size(140, 27); this.btnUpDownDoor.Size = new System.Drawing.Size(140, 27);
...@@ -1259,7 +1228,7 @@ ...@@ -1259,7 +1228,7 @@
this.lblTemp.AutoSize = true; this.lblTemp.AutoSize = true;
this.lblTemp.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblTemp.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblTemp.ForeColor = System.Drawing.Color.Black; this.lblTemp.ForeColor = System.Drawing.Color.Black;
this.lblTemp.Location = new System.Drawing.Point(11, 356); this.lblTemp.Location = new System.Drawing.Point(18, 106);
this.lblTemp.Name = "lblTemp"; this.lblTemp.Name = "lblTemp";
this.lblTemp.Size = new System.Drawing.Size(159, 20); this.lblTemp.Size = new System.Drawing.Size(159, 20);
this.lblTemp.TabIndex = 270; this.lblTemp.TabIndex = 270;
...@@ -1394,7 +1363,7 @@ ...@@ -1394,7 +1363,7 @@
this.txtUpDownP1.Cursor = System.Windows.Forms.Cursors.IBeam; this.txtUpDownP1.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtUpDownP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtUpDownP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpDownP1.ForeColor = System.Drawing.SystemColors.WindowText; this.txtUpDownP1.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtUpDownP1.Location = new System.Drawing.Point(153, 101); this.txtUpDownP1.Location = new System.Drawing.Point(153, 163);
this.txtUpDownP1.MaxLength = 0; this.txtUpDownP1.MaxLength = 0;
this.txtUpDownP1.Name = "txtUpDownP1"; this.txtUpDownP1.Name = "txtUpDownP1";
this.txtUpDownP1.RightToLeft = System.Windows.Forms.RightToLeft.No; this.txtUpDownP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
...@@ -1652,7 +1621,7 @@ ...@@ -1652,7 +1621,7 @@
this.btnUpDownP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnUpDownP1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownP1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0))))); this.btnUpDownP1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
this.btnUpDownP1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnUpDownP1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnUpDownP1.Location = new System.Drawing.Point(10, 99); this.btnUpDownP1.Location = new System.Drawing.Point(10, 161);
this.btnUpDownP1.Name = "btnUpDownP1"; this.btnUpDownP1.Name = "btnUpDownP1";
this.btnUpDownP1.RightToLeft = System.Windows.Forms.RightToLeft.No; this.btnUpDownP1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP1.Size = new System.Drawing.Size(140, 27); this.btnUpDownP1.Size = new System.Drawing.Size(140, 27);
...@@ -1798,111 +1767,6 @@ ...@@ -1798,111 +1767,6 @@
this.btnUpDownP4.UseVisualStyleBackColor = true; this.btnUpDownP4.UseVisualStyleBackColor = true;
this.btnUpDownP4.Click += new System.EventHandler(this.btnUpDownP4_Click); this.btnUpDownP4.Click += new System.EventHandler(this.btnUpDownP4_Click);
// //
// txtUpDownP7
//
this.txtUpDownP7.AcceptsReturn = true;
this.txtUpDownP7.BackColor = System.Drawing.SystemColors.Window;
this.txtUpDownP7.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtUpDownP7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpDownP7.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtUpDownP7.Location = new System.Drawing.Point(287, 50);
this.txtUpDownP7.MaxLength = 0;
this.txtUpDownP7.Name = "txtUpDownP7";
this.txtUpDownP7.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.txtUpDownP7.Size = new System.Drawing.Size(89, 23);
this.txtUpDownP7.TabIndex = 204;
this.txtUpDownP7.Text = "-836025";
this.txtUpDownP7.Visible = false;
//
// txtUpDownP8
//
this.txtUpDownP8.AcceptsReturn = true;
this.txtUpDownP8.BackColor = System.Drawing.SystemColors.Window;
this.txtUpDownP8.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtUpDownP8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpDownP8.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtUpDownP8.Location = new System.Drawing.Point(287, 81);
this.txtUpDownP8.MaxLength = 0;
this.txtUpDownP8.Name = "txtUpDownP8";
this.txtUpDownP8.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.txtUpDownP8.Size = new System.Drawing.Size(89, 23);
this.txtUpDownP8.TabIndex = 206;
this.txtUpDownP8.Text = "-816491";
this.txtUpDownP8.Visible = false;
//
// txtUpDownP2
//
this.txtUpDownP2.AcceptsReturn = true;
this.txtUpDownP2.BackColor = System.Drawing.SystemColors.Window;
this.txtUpDownP2.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtUpDownP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpDownP2.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtUpDownP2.Location = new System.Drawing.Point(287, 19);
this.txtUpDownP2.MaxLength = 0;
this.txtUpDownP2.Name = "txtUpDownP2";
this.txtUpDownP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.txtUpDownP2.Size = new System.Drawing.Size(89, 23);
this.txtUpDownP2.TabIndex = 202;
this.txtUpDownP2.Text = "-836025";
this.txtUpDownP2.Visible = false;
//
// btnUpDownP7
//
this.btnUpDownP7.AutoSize = true;
this.btnUpDownP7.BackColor = System.Drawing.SystemColors.Control;
this.btnUpDownP7.Cursor = System.Windows.Forms.Cursors.Default;
this.btnUpDownP7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownP7.ForeColor = System.Drawing.Color.Red;
this.btnUpDownP7.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnUpDownP7.Location = new System.Drawing.Point(144, 48);
this.btnUpDownP7.Name = "btnUpDownP7";
this.btnUpDownP7.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP7.Size = new System.Drawing.Size(140, 27);
this.btnUpDownP7.TabIndex = 203;
this.btnUpDownP7.Text = "升降轴入料缓冲点P7:";
this.btnUpDownP7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnUpDownP7.UseVisualStyleBackColor = true;
this.btnUpDownP7.Visible = false;
this.btnUpDownP7.Click += new System.EventHandler(this.btnUpDownP7_Click);
//
// btnUpDownP8
//
this.btnUpDownP8.AutoSize = true;
this.btnUpDownP8.BackColor = System.Drawing.SystemColors.Control;
this.btnUpDownP8.Cursor = System.Windows.Forms.Cursors.Default;
this.btnUpDownP8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownP8.ForeColor = System.Drawing.Color.Red;
this.btnUpDownP8.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnUpDownP8.Location = new System.Drawing.Point(144, 79);
this.btnUpDownP8.Name = "btnUpDownP8";
this.btnUpDownP8.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP8.Size = new System.Drawing.Size(140, 27);
this.btnUpDownP8.TabIndex = 205;
this.btnUpDownP8.Text = "升降轴出料缓冲点P8:";
this.btnUpDownP8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnUpDownP8.UseVisualStyleBackColor = true;
this.btnUpDownP8.Visible = false;
this.btnUpDownP8.Click += new System.EventHandler(this.btnUpDownP8_Click);
//
// btnUpDownP2
//
this.btnUpDownP2.AutoSize = true;
this.btnUpDownP2.BackColor = System.Drawing.SystemColors.Control;
this.btnUpDownP2.Cursor = System.Windows.Forms.Cursors.Default;
this.btnUpDownP2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownP2.ForeColor = System.Drawing.Color.Red;
this.btnUpDownP2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnUpDownP2.Location = new System.Drawing.Point(144, 17);
this.btnUpDownP2.Name = "btnUpDownP2";
this.btnUpDownP2.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnUpDownP2.Size = new System.Drawing.Size(140, 27);
this.btnUpDownP2.TabIndex = 201;
this.btnUpDownP2.Text = "升降轴出料前点P2:";
this.btnUpDownP2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnUpDownP2.UseVisualStyleBackColor = true;
this.btnUpDownP2.Visible = false;
this.btnUpDownP2.Click += new System.EventHandler(this.btnUpDownP2_Click);
//
// menuStrip1 // menuStrip1
// //
this.menuStrip1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.menuStrip1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
...@@ -1914,7 +1778,7 @@ ...@@ -1914,7 +1778,7 @@
this.日志ToolStripMenuItem}); this.日志ToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(1031, 29); this.menuStrip1.Size = new System.Drawing.Size(1087, 29);
this.menuStrip1.TabIndex = 257; this.menuStrip1.TabIndex = 257;
this.menuStrip1.Text = "menuStrip1"; this.menuStrip1.Text = "menuStrip1";
// //
...@@ -2195,14 +2059,9 @@ ...@@ -2195,14 +2059,9 @@
// //
// groupBox3 // groupBox3
// //
this.groupBox3.Controls.Add(this.chbIsUseBatch);
this.groupBox3.Controls.Add(this.lblThisSta); this.groupBox3.Controls.Add(this.lblThisSta);
this.groupBox3.Controls.Add(this.chbAuto); this.groupBox3.Controls.Add(this.chbAuto);
this.groupBox3.Controls.Add(this.txtUpDownP2);
this.groupBox3.Controls.Add(this.btnUpDownP2);
this.groupBox3.Controls.Add(this.btnUpDownP8);
this.groupBox3.Controls.Add(this.btnUpDownP7);
this.groupBox3.Controls.Add(this.txtUpDownP8);
this.groupBox3.Controls.Add(this.txtUpDownP7);
this.groupBox3.Controls.Add(this.lblWarnMsg); this.groupBox3.Controls.Add(this.lblWarnMsg);
this.groupBox3.Location = new System.Drawing.Point(7, 32); this.groupBox3.Location = new System.Drawing.Point(7, 32);
this.groupBox3.Name = "groupBox3"; this.groupBox3.Name = "groupBox3";
...@@ -2211,10 +2070,23 @@ ...@@ -2211,10 +2070,23 @@
this.groupBox3.TabStop = false; this.groupBox3.TabStop = false;
this.groupBox3.Text = "设备状态"; this.groupBox3.Text = "设备状态";
// //
// chbIsUseBatch
//
this.chbIsUseBatch.AutoSize = true;
this.chbIsUseBatch.Checked = true;
this.chbIsUseBatch.CheckState = System.Windows.Forms.CheckState.Checked;
this.chbIsUseBatch.Location = new System.Drawing.Point(377, 14);
this.chbIsUseBatch.Name = "chbIsUseBatch";
this.chbIsUseBatch.Size = new System.Drawing.Size(112, 24);
this.chbIsUseBatch.TabIndex = 271;
this.chbIsUseBatch.Text = "启动批量上料";
this.chbIsUseBatch.UseVisualStyleBackColor = true;
this.chbIsUseBatch.CheckedChanged += new System.EventHandler(this.chbIsUseBatch_CheckedChanged);
//
// chbAuto // chbAuto
// //
this.chbAuto.AutoSize = true; this.chbAuto.AutoSize = true;
this.chbAuto.Location = new System.Drawing.Point(379, 13); this.chbAuto.Location = new System.Drawing.Point(265, 14);
this.chbAuto.Name = "chbAuto"; this.chbAuto.Name = "chbAuto";
this.chbAuto.Size = new System.Drawing.Size(112, 24); this.chbAuto.Size = new System.Drawing.Size(112, 24);
this.chbAuto.TabIndex = 270; this.chbAuto.TabIndex = 270;
...@@ -2278,7 +2150,7 @@ ...@@ -2278,7 +2150,7 @@
this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox4.Location = new System.Drawing.Point(8, 7); this.groupBox4.Location = new System.Drawing.Point(8, 7);
this.groupBox4.Name = "groupBox4"; this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(493, 175); this.groupBox4.Size = new System.Drawing.Size(549, 175);
this.groupBox4.TabIndex = 271; this.groupBox4.TabIndex = 271;
this.groupBox4.TabStop = false; this.groupBox4.TabStop = false;
this.groupBox4.Text = "压紧轴"; this.groupBox4.Text = "压紧轴";
...@@ -2482,11 +2354,12 @@ ...@@ -2482,11 +2354,12 @@
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.tabControl1.Controls.Add(this.tabPage2); this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage3); this.tabControl1.Controls.Add(this.tabPage3);
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tabControl1.Location = new System.Drawing.Point(510, 36); this.tabControl1.Location = new System.Drawing.Point(510, 36);
this.tabControl1.Name = "tabControl1"; this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0; this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(519, 435); this.tabControl1.Size = new System.Drawing.Size(575, 435);
this.tabControl1.TabIndex = 301; this.tabControl1.TabIndex = 301;
// //
// tabPage2 // tabPage2
...@@ -2495,7 +2368,7 @@ ...@@ -2495,7 +2368,7 @@
this.tabPage2.Location = new System.Drawing.Point(4, 26); this.tabPage2.Location = new System.Drawing.Point(4, 26);
this.tabPage2.Name = "tabPage2"; this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3); this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(511, 405); this.tabPage2.Size = new System.Drawing.Size(567, 405);
this.tabPage2.TabIndex = 1; this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "伺服调试"; this.tabPage2.Text = "伺服调试";
this.tabPage2.UseVisualStyleBackColor = true; this.tabPage2.UseVisualStyleBackColor = true;
...@@ -2506,13 +2379,14 @@ ...@@ -2506,13 +2379,14 @@
this.tabPage3.Controls.Add(this.groupBox1); this.tabPage3.Controls.Add(this.groupBox1);
this.tabPage3.Location = new System.Drawing.Point(4, 26); this.tabPage3.Location = new System.Drawing.Point(4, 26);
this.tabPage3.Name = "tabPage3"; this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(511, 405); this.tabPage3.Size = new System.Drawing.Size(567, 405);
this.tabPage3.TabIndex = 2; this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "压紧轴调试"; this.tabPage3.Text = "压紧轴调试";
this.tabPage3.UseVisualStyleBackColor = true; this.tabPage3.UseVisualStyleBackColor = true;
// //
// groupBox6 // groupBox6
// //
this.groupBox6.Controls.Add(this.btnOpenDoor);
this.groupBox6.Controls.Add(this.lblWaitTragGo); this.groupBox6.Controls.Add(this.lblWaitTragGo);
this.groupBox6.Controls.Add(this.btnWaitTrgGo); this.groupBox6.Controls.Add(this.btnWaitTrgGo);
this.groupBox6.Controls.Add(this.lblBatchStatus); this.groupBox6.Controls.Add(this.lblBatchStatus);
...@@ -2530,12 +2404,23 @@ ...@@ -2530,12 +2404,23 @@
this.groupBox6.TabStop = false; this.groupBox6.TabStop = false;
this.groupBox6.Text = "批量上下料操作"; this.groupBox6.Text = "批量上下料操作";
// //
// btnOpenDoor
//
this.btnOpenDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenDoor.Location = new System.Drawing.Point(22, 66);
this.btnOpenDoor.Name = "btnOpenDoor";
this.btnOpenDoor.Size = new System.Drawing.Size(105, 38);
this.btnOpenDoor.TabIndex = 232;
this.btnOpenDoor.Text = "打开门锁";
this.btnOpenDoor.UseVisualStyleBackColor = true;
this.btnOpenDoor.Click += new System.EventHandler(this.BtnOpenDoor_Click);
//
// lblWaitTragGo // lblWaitTragGo
// //
this.lblWaitTragGo.AutoSize = true; this.lblWaitTragGo.AutoSize = true;
this.lblWaitTragGo.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblWaitTragGo.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblWaitTragGo.ForeColor = System.Drawing.Color.Red; this.lblWaitTragGo.ForeColor = System.Drawing.Color.Red;
this.lblWaitTragGo.Location = new System.Drawing.Point(167, 120); this.lblWaitTragGo.Location = new System.Drawing.Point(150, 120);
this.lblWaitTragGo.Name = "lblWaitTragGo"; this.lblWaitTragGo.Name = "lblWaitTragGo";
this.lblWaitTragGo.Size = new System.Drawing.Size(247, 20); this.lblWaitTragGo.Size = new System.Drawing.Size(247, 20);
this.lblWaitTragGo.TabIndex = 231; this.lblWaitTragGo.TabIndex = 231;
...@@ -2544,11 +2429,11 @@ ...@@ -2544,11 +2429,11 @@
// btnWaitTrgGo // btnWaitTrgGo
// //
this.btnWaitTrgGo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnWaitTrgGo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnWaitTrgGo.Location = new System.Drawing.Point(39, 112); this.btnWaitTrgGo.Location = new System.Drawing.Point(22, 112);
this.btnWaitTrgGo.Name = "btnWaitTrgGo"; this.btnWaitTrgGo.Name = "btnWaitTrgGo";
this.btnWaitTrgGo.Size = new System.Drawing.Size(105, 38); this.btnWaitTrgGo.Size = new System.Drawing.Size(105, 38);
this.btnWaitTrgGo.TabIndex = 230; this.btnWaitTrgGo.TabIndex = 230;
this.btnWaitTrgGo.Text = "料盘已拿出"; this.btnWaitTrgGo.Text = "门口料盘已拿出";
this.btnWaitTrgGo.UseVisualStyleBackColor = true; this.btnWaitTrgGo.UseVisualStyleBackColor = true;
this.btnWaitTrgGo.Click += new System.EventHandler(this.btnWaitTrgGo_Click); this.btnWaitTrgGo.Click += new System.EventHandler(this.btnWaitTrgGo_Click);
// //
...@@ -2566,7 +2451,7 @@ ...@@ -2566,7 +2451,7 @@
// btnBatchOutTest // btnBatchOutTest
// //
this.btnBatchOutTest.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnBatchOutTest.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnBatchOutTest.Location = new System.Drawing.Point(39, 156); this.btnBatchOutTest.Location = new System.Drawing.Point(22, 156);
this.btnBatchOutTest.Name = "btnBatchOutTest"; this.btnBatchOutTest.Name = "btnBatchOutTest";
this.btnBatchOutTest.Size = new System.Drawing.Size(237, 38); this.btnBatchOutTest.Size = new System.Drawing.Size(237, 38);
this.btnBatchOutTest.TabIndex = 228; this.btnBatchOutTest.TabIndex = 228;
...@@ -2577,7 +2462,7 @@ ...@@ -2577,7 +2462,7 @@
// btnBatchReset // btnBatchReset
// //
this.btnBatchReset.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnBatchReset.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnBatchReset.Location = new System.Drawing.Point(282, 156); this.btnBatchReset.Location = new System.Drawing.Point(265, 156);
this.btnBatchReset.Name = "btnBatchReset"; this.btnBatchReset.Name = "btnBatchReset";
this.btnBatchReset.Size = new System.Drawing.Size(175, 38); this.btnBatchReset.Size = new System.Drawing.Size(175, 38);
this.btnBatchReset.TabIndex = 227; this.btnBatchReset.TabIndex = 227;
...@@ -2588,7 +2473,7 @@ ...@@ -2588,7 +2473,7 @@
// btnStartBatchInStore // btnStartBatchInStore
// //
this.btnStartBatchInStore.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnStartBatchInStore.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStartBatchInStore.Location = new System.Drawing.Point(320, 68); this.btnStartBatchInStore.Location = new System.Drawing.Point(362, 66);
this.btnStartBatchInStore.Name = "btnStartBatchInStore"; this.btnStartBatchInStore.Name = "btnStartBatchInStore";
this.btnStartBatchInStore.Size = new System.Drawing.Size(105, 38); this.btnStartBatchInStore.Size = new System.Drawing.Size(105, 38);
this.btnStartBatchInStore.TabIndex = 226; this.btnStartBatchInStore.TabIndex = 226;
...@@ -2599,11 +2484,11 @@ ...@@ -2599,11 +2484,11 @@
// btnGetOutTray // btnGetOutTray
// //
this.btnGetOutTray.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnGetOutTray.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnGetOutTray.Location = new System.Drawing.Point(171, 68); this.btnGetOutTray.Location = new System.Drawing.Point(254, 66);
this.btnGetOutTray.Name = "btnGetOutTray"; this.btnGetOutTray.Name = "btnGetOutTray";
this.btnGetOutTray.Size = new System.Drawing.Size(105, 38); this.btnGetOutTray.Size = new System.Drawing.Size(105, 38);
this.btnGetOutTray.TabIndex = 225; this.btnGetOutTray.TabIndex = 225;
this.btnGetOutTray.Text = "取出料盘"; this.btnGetOutTray.Text = "取出出库料盘";
this.btnGetOutTray.UseVisualStyleBackColor = true; this.btnGetOutTray.UseVisualStyleBackColor = true;
this.btnGetOutTray.Click += new System.EventHandler(this.btnGetOutTray_Click); this.btnGetOutTray.Click += new System.EventHandler(this.btnGetOutTray_Click);
// //
...@@ -2621,19 +2506,183 @@ ...@@ -2621,19 +2506,183 @@
// btnBatchInStore // btnBatchInStore
// //
this.btnBatchInStore.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnBatchInStore.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnBatchInStore.Location = new System.Drawing.Point(39, 68); this.btnBatchInStore.Location = new System.Drawing.Point(133, 66);
this.btnBatchInStore.Name = "btnBatchInStore"; this.btnBatchInStore.Name = "btnBatchInStore";
this.btnBatchInStore.Size = new System.Drawing.Size(105, 38); this.btnBatchInStore.Size = new System.Drawing.Size(105, 38);
this.btnBatchInStore.TabIndex = 103; this.btnBatchInStore.TabIndex = 103;
this.btnBatchInStore.Text = "批量入库"; this.btnBatchInStore.Text = "开始批量入库";
this.btnBatchInStore.UseVisualStyleBackColor = true; this.btnBatchInStore.UseVisualStyleBackColor = true;
this.btnBatchInStore.Click += new System.EventHandler(this.btnBatchInStore_Click); this.btnBatchInStore.Click += new System.EventHandler(this.btnBatchInStore_Click);
// //
// axis_5_Alarm
//
this.axis_5_Alarm.IOName = "";
this.axis_5_Alarm.IOValue = 0;
this.axis_5_Alarm.isCanClick = false;
this.axis_5_Alarm.Location = new System.Drawing.Point(418, 37);
this.axis_5_Alarm.Name = "axis_5_Alarm";
this.axis_5_Alarm.Size = new System.Drawing.Size(43, 39);
this.axis_5_Alarm.TabIndex = 271;
//
// 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(116, 37);
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(318, 37);
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(213, 37);
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;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.groupBox7);
this.tabPage1.Location = new System.Drawing.Point(4, 26);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(567, 405);
this.tabPage1.TabIndex = 3;
this.tabPage1.Text = "温湿度调试";
this.tabPage1.UseVisualStyleBackColor = true;
//
// btnTempClose
//
this.btnTempClose.Location = new System.Drawing.Point(322, 30);
this.btnTempClose.Name = "btnTempClose";
this.btnTempClose.Size = new System.Drawing.Size(100, 33);
this.btnTempClose.TabIndex = 89;
this.btnTempClose.Text = "断开";
this.btnTempClose.UseVisualStyleBackColor = true;
this.btnTempClose.Click += new System.EventHandler(this.btnTempClose_Click);
//
// btnTempInit
//
this.btnTempInit.Location = new System.Drawing.Point(212, 30);
this.btnTempInit.Name = "btnTempInit";
this.btnTempInit.Size = new System.Drawing.Size(100, 33);
this.btnTempInit.TabIndex = 88;
this.btnTempInit.Text = "初始化";
this.btnTempInit.UseVisualStyleBackColor = true;
this.btnTempInit.Click += new System.EventHandler(this.btnTempInit_Click);
//
// groupBox7
//
this.groupBox7.Controls.Add(this.btnSelTemp);
this.groupBox7.Controls.Add(this.txtHum);
this.groupBox7.Controls.Add(this.label29);
this.groupBox7.Controls.Add(this.txtTemp);
this.groupBox7.Controls.Add(this.label28);
this.groupBox7.Controls.Add(this.txtTempPort);
this.groupBox7.Controls.Add(this.label27);
this.groupBox7.Controls.Add(this.btnTempClose);
this.groupBox7.Controls.Add(this.btnTempInit);
this.groupBox7.Location = new System.Drawing.Point(12, 14);
this.groupBox7.Name = "groupBox7";
this.groupBox7.Size = new System.Drawing.Size(549, 134);
this.groupBox7.TabIndex = 90;
this.groupBox7.TabStop = false;
this.groupBox7.Text = "温控器调试";
//
// txtTempPort
//
this.txtTempPort.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtTempPort.Location = new System.Drawing.Point(95, 28);
this.txtTempPort.MaxLength = 10;
this.txtTempPort.Name = "txtTempPort";
this.txtTempPort.Size = new System.Drawing.Size(87, 21);
this.txtTempPort.TabIndex = 243;
this.txtTempPort.Text = "0";
//
// label27
//
this.label27.AutoSize = true;
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(26, 33);
this.label27.Name = "label27";
this.label27.Size = new System.Drawing.Size(56, 17);
this.label27.TabIndex = 242;
this.label27.Text = "端口号:";
this.label27.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtTemp
//
this.txtTemp.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtTemp.Location = new System.Drawing.Point(95, 63);
this.txtTemp.MaxLength = 10;
this.txtTemp.Name = "txtTemp";
this.txtTemp.Size = new System.Drawing.Size(87, 21);
this.txtTemp.TabIndex = 245;
this.txtTemp.Text = "0";
//
// label28
//
this.label28.AutoSize = true;
this.label28.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label28.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label28.Location = new System.Drawing.Point(38, 67);
this.label28.Name = "label28";
this.label28.Size = new System.Drawing.Size(44, 17);
this.label28.TabIndex = 244;
this.label28.Text = "温度:";
this.label28.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtHum
//
this.txtHum.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtHum.Location = new System.Drawing.Point(95, 98);
this.txtHum.MaxLength = 10;
this.txtHum.Name = "txtHum";
this.txtHum.Size = new System.Drawing.Size(87, 21);
this.txtHum.TabIndex = 247;
this.txtHum.Text = "0";
//
// label29
//
this.label29.AutoSize = true;
this.label29.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label29.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label29.Location = new System.Drawing.Point(38, 101);
this.label29.Name = "label29";
this.label29.Size = new System.Drawing.Size(44, 17);
this.label29.TabIndex = 246;
this.label29.Text = "湿度:";
this.label29.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnSelTemp
//
this.btnSelTemp.Location = new System.Drawing.Point(212, 82);
this.btnSelTemp.Name = "btnSelTemp";
this.btnSelTemp.Size = new System.Drawing.Size(100, 33);
this.btnSelTemp.TabIndex = 248;
this.btnSelTemp.Text = "查询";
this.btnSelTemp.UseVisualStyleBackColor = true;
this.btnSelTemp.Click += new System.EventHandler(this.btnSelTemp_Click);
//
// FrmStoreBox // FrmStoreBox
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(1031, 749); this.ClientSize = new System.Drawing.Size(1087, 749);
this.Controls.Add(this.groupBox6); this.Controls.Add(this.groupBox6);
this.Controls.Add(this.tabControl1); this.Controls.Add(this.tabControl1);
this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox3);
...@@ -2668,6 +2717,9 @@ ...@@ -2668,6 +2717,9 @@
this.tabPage3.ResumeLayout(false); this.tabPage3.ResumeLayout(false);
this.groupBox6.ResumeLayout(false); this.groupBox6.ResumeLayout(false);
this.groupBox6.PerformLayout(); this.groupBox6.PerformLayout();
this.tabPage1.ResumeLayout(false);
this.groupBox7.ResumeLayout(false);
this.groupBox7.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
...@@ -2700,14 +2752,8 @@ ...@@ -2700,14 +2752,8 @@
public System.Windows.Forms.TextBox txtInOutP1; public System.Windows.Forms.TextBox txtInOutP1;
public System.Windows.Forms.Button btnMiddleP1; public System.Windows.Forms.Button btnMiddleP1;
public System.Windows.Forms.TextBox txtMiddleP1; public System.Windows.Forms.TextBox txtMiddleP1;
public System.Windows.Forms.Button btnUpDownP7;
public System.Windows.Forms.TextBox txtUpDownP7;
public System.Windows.Forms.Button btnUpDownP8;
public System.Windows.Forms.TextBox txtUpDownP8;
public System.Windows.Forms.Button btnUpDownP1; public System.Windows.Forms.Button btnUpDownP1;
public System.Windows.Forms.TextBox txtUpDownP1; public System.Windows.Forms.TextBox txtUpDownP1;
public System.Windows.Forms.Button btnUpDownP2;
public System.Windows.Forms.TextBox txtUpDownP2;
public System.Windows.Forms.Button btnComP3; public System.Windows.Forms.Button btnComP3;
public System.Windows.Forms.TextBox txtComP3; public System.Windows.Forms.TextBox txtComP3;
public System.Windows.Forms.Button btnComP2; public System.Windows.Forms.Button btnComP2;
...@@ -2882,6 +2928,19 @@ ...@@ -2882,6 +2928,19 @@
private System.Windows.Forms.Button btnWaitTrgGo; private System.Windows.Forms.Button btnWaitTrgGo;
public System.Windows.Forms.TextBox txtUpDownDoor; public System.Windows.Forms.TextBox txtUpDownDoor;
public System.Windows.Forms.Button btnUpDownDoor; public System.Windows.Forms.Button btnUpDownDoor;
private System.Windows.Forms.CheckBox chbIsUseBatch;
private System.Windows.Forms.Button btnOpenDoor;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.Button btnTempClose;
private System.Windows.Forms.Button btnTempInit;
private System.Windows.Forms.GroupBox groupBox7;
private System.Windows.Forms.TextBox txtTempPort;
private System.Windows.Forms.Label label27;
private System.Windows.Forms.Button btnSelTemp;
private System.Windows.Forms.TextBox txtHum;
private System.Windows.Forms.Label label29;
private System.Windows.Forms.TextBox txtTemp;
private System.Windows.Forms.Label label28;
} }
} }
...@@ -136,11 +136,11 @@ namespace OnlineStore.AutoInOutStore ...@@ -136,11 +136,11 @@ namespace OnlineStore.AutoInOutStore
btnOutStore.Enabled = isOpen; btnOutStore.Enabled = isOpen;
btnInStore.Enabled = isOpen; btnInStore.Enabled = isOpen;
btnAxisAMove.Enabled = isOpen; //btnAxisAMove.Enabled = isOpen;
btnAxisReturnHome.Enabled = isOpen; //btnAxisReturnHome.Enabled = isOpen;
btnAxisRMove.Enabled = isOpen; //btnAxisRMove.Enabled = isOpen;
btnAxisVMove.Enabled = isOpen; //btnAxisVMove.Enabled = isOpen;
启动ToolStripMenuItem.Enabled = !isOpen; 启动ToolStripMenuItem.Enabled = !isOpen;
停止ToolStripMenuItem.Enabled = isOpen; 停止ToolStripMenuItem.Enabled = isOpen;
...@@ -155,6 +155,7 @@ namespace OnlineStore.AutoInOutStore ...@@ -155,6 +155,7 @@ namespace OnlineStore.AutoInOutStore
this.Text = ConfigAppSettings.GetValue(Setting_Init.App_Title); this.Text = ConfigAppSettings.GetValue(Setting_Init.App_Title);
HideForm(); HideForm();
initValue(); initValue();
txtTempPort.Text = store.Config.Humiture_Port;
LoadOk = true; LoadOk = true;
cmbHomeType.SelectedIndex = 1; cmbHomeType.SelectedIndex = 1;
timer1.Start(); timer1.Start();
...@@ -327,6 +328,19 @@ namespace OnlineStore.AutoInOutStore ...@@ -327,6 +328,19 @@ namespace OnlineStore.AutoInOutStore
} }
} }
if (HumitureController.IsRun)
{
btnSelTemp.Enabled = true;
btnTempClose.Enabled = true;
btnTempInit.Enabled = false;
}
else
{
btnSelTemp.Enabled = false ;
btnTempClose.Enabled = false ;
btnTempInit.Enabled = true ;
}
} }
private void UpdateFormDoorStats(bool dooIsOpen) private void UpdateFormDoorStats(bool dooIsOpen)
...@@ -495,6 +509,7 @@ namespace OnlineStore.AutoInOutStore ...@@ -495,6 +509,7 @@ namespace OnlineStore.AutoInOutStore
ktk.UpDown_P6 = FormUtil.GetIntValue(txtUpDownP6); ktk.UpDown_P6 = FormUtil.GetIntValue(txtUpDownP6);
//ktk.UpDown_P7 = FormUtil.GetIntValue(txtUpDownP7); //ktk.UpDown_P7 = FormUtil.GetIntValue(txtUpDownP7);
//ktk.UpDown_P8 = FormUtil.GetIntValue(txtUpDownP8); //ktk.UpDown_P8 = FormUtil.GetIntValue(txtUpDownP8);
return ktk; return ktk;
} }
private void btnComAlarmClear_Click(object sender, EventArgs e) private void btnComAlarmClear_Click(object sender, EventArgs e)
...@@ -1111,13 +1126,13 @@ namespace OnlineStore.AutoInOutStore ...@@ -1111,13 +1126,13 @@ namespace OnlineStore.AutoInOutStore
{ {
SetSkin(this); SetSkin(this);
this.btnUpDownP1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0))))); this.btnUpDownP1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
this.btnUpDownP2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0))))); //this.btnUpDownP2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
this.btnUpDownP3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0))))); this.btnUpDownP3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
this.btnUpDownP4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0))))); this.btnUpDownP4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
this.btnUpDownP5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0))))); this.btnUpDownP5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
this.btnUpDownP6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0))))); this.btnUpDownP6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
this.btnUpDownP7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0))))); //this.btnUpDownP7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
this.btnUpDownP8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0))))); //this.btnUpDownP8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
//this.lblWarnMsg.ForeColor = System.Drawing.Color.Red; //this.lblWarnMsg.ForeColor = System.Drawing.Color.Red;
//this.lblThisSta.ForeColor = System.Drawing.Color.Red; //this.lblThisSta.ForeColor = System.Drawing.Color.Red;
...@@ -1462,70 +1477,7 @@ namespace OnlineStore.AutoInOutStore ...@@ -1462,70 +1477,7 @@ namespace OnlineStore.AutoInOutStore
} }
} }
private void btnBatchInStore_Click(object sender, EventArgs e)
{
if (store.storeRunStatus.Equals(StoreRunStatus.Runing) && AutomaticBaiting.AutoBaitingStatus.Equals(StoreRunStatus.Runing))
{
AutomaticBaiting.BatchDoorOpen(false);
}
else
{
MessageBox.Show("当前忙碌中,无法进行此操作");
}
}
private void btnStartBatchInStore_Click(object sender, EventArgs e)
{
if (!AutomaticBaiting.DoorStatus.Equals(1))
{
return;
}
if (AutomaticBaiting.DoorIsClose())
{
AutomaticBaiting.BatchDoorClose(false);
AutomaticBaiting.Reset();
}
else
{
MessageBox.Show("请先关闭批量上下料门");
}
}
private void btnGetOutTray_Click(object sender, EventArgs e)
{
if (store.storeRunStatus.Equals(StoreRunStatus.Runing) && AutomaticBaiting.AutoBaitingStatus.Equals(StoreRunStatus.Runing))
{
if (AutomaticBaiting.BatchOutStoreCount > 0 && AutomaticBaiting.BatchOutStoreHeight > 0)
{
AutomaticBaiting.BatchDoorOpen(false);
}
else
{
MessageBox.Show("未出库,无料盘可取");
}
}
else
{
MessageBox.Show("当前忙碌中,无法进行此操作");
}
}
private void btnBatchOutEnd_Click(object sender, EventArgs e)
{
if (!AutomaticBaiting.DoorStatus.Equals(1))
{
return;
}
if (AutomaticBaiting.DoorIsClose())
{
AutomaticBaiting.BatchDoorClose(false);
bool result = AutomaticBaiting.Reset();
}
else
{
MessageBox.Show("请先关闭批量上下料门");
}
}
private void button3_Click(object sender, EventArgs e) private void button3_Click(object sender, EventArgs e)
{ {
...@@ -1600,5 +1552,117 @@ namespace OnlineStore.AutoInOutStore ...@@ -1600,5 +1552,117 @@ namespace OnlineStore.AutoInOutStore
AxisABSMove(store.Config.UpDown_Axis, value, store.Config.UpDownAxis_Door_Speed); AxisABSMove(store.Config.UpDown_Axis, value, store.Config.UpDownAxis_Door_Speed);
} }
} }
private void chbIsUseBatch_CheckedChanged(object sender, EventArgs e)
{
store.UseBatchInout = chbIsUseBatch.Checked;
LogUtil.info("切换是否使用批量上下料:" + store.UseBatchInout);
}
private void BtnOpenDoor_Click(object sender, EventArgs e)
{
if (store.storeRunStatus.Equals(StoreRunStatus.Runing) && AutomaticBaiting.AutoBaitingStatus.Equals(StoreRunStatus.Runing))
{
AutomaticBaiting.BatchDoorOpen(false);
AutomaticBaiting.IsNeedStartInout = false ;
}
else
{
MessageBox.Show("当前忙碌中,无法进行此操作");
}
}
private void btnBatchInStore_Click(object sender, EventArgs e)
{
if (!AutomaticBaiting.DoorStatus.Equals(1))
{
return;
}
if (AutomaticBaiting.DoorIsClose())
{
AutomaticBaiting.IsNeedStartInout = true;
AutomaticBaiting.BatchDoorClose(false);
AutomaticBaiting.Reset();
}
else
{
MessageBox.Show("请先关闭批量上下料门");
}
}
private void btnStartBatchInStore_Click(object sender, EventArgs e)
{
if (!AutomaticBaiting.DoorStatus.Equals(1))
{
return;
}
if (AutomaticBaiting.DoorIsClose())
{
AutomaticBaiting.BatchDoorClose(false);
AutomaticBaiting.Reset();
}
else
{
MessageBox.Show("请先关闭批量上下料门");
}
}
private void btnGetOutTray_Click(object sender, EventArgs e)
{
if (store.storeRunStatus.Equals(StoreRunStatus.Runing) && AutomaticBaiting.AutoBaitingStatus.Equals(StoreRunStatus.Runing))
{
if (AutomaticBaiting.BatchOutStoreCount > 0 && AutomaticBaiting.BatchOutStoreHeight > 0)
{
AutomaticBaiting.BatchDoorOpen(false);
}
else
{
MessageBox.Show("未出库,无料盘可取");
}
}
else
{
MessageBox.Show("当前忙碌中,无法进行此操作");
}
}
private void btnBatchOutEnd_Click(object sender, EventArgs e)
{
if (!AutomaticBaiting.DoorStatus.Equals(1))
{
return;
}
if (AutomaticBaiting.DoorIsClose())
{
AutomaticBaiting.BatchDoorClose(false);
bool result = AutomaticBaiting.Reset();
}
else
{
MessageBox.Show("请先关闭批量上下料门");
}
}
private void btnTempInit_Click(object sender, EventArgs e)
{
string port = txtTempPort.Text.ToString();
if (HumitureController.IsRun)
{
HumitureController.Release();
}
HumitureController.Init(port);
}
private void btnTempClose_Click(object sender, EventArgs e)
{
HumitureController.Release();
}
private void btnSelTemp_Click(object sender, EventArgs e)
{
ASTemperateParam param = HumitureController.QueryData();
txtTemp.Text = param.Temperate.ToString();
txtHum.Text = param.Humidity.ToString();
}
} }
} }
...@@ -73,7 +73,7 @@ namespace OnlineStore.Common ...@@ -73,7 +73,7 @@ namespace OnlineStore.Common
} }
} }
private static List<string> lasErrorLogList = new List<string>(); //private static List<string> lasErrorLogList = new List<string>();
private static int errCount = 5; private static int errCount = 5;
public static void error(ILog log, string errorMsg,int type) public static void error(ILog log, string errorMsg,int type)
...@@ -100,7 +100,7 @@ namespace OnlineStore.Common ...@@ -100,7 +100,7 @@ namespace OnlineStore.Common
} }
public static void error(ILog log, string errorMsg) public static void error(ILog log, string errorMsg)
{ {
if (!lasErrorLogList.Contains(errorMsg)) //if (!lasErrorLogList.Contains(errorMsg))
{ {
log.Error(log.Logger.Name + " - " + errorMsg); log.Error(log.Logger.Name + " - " + errorMsg);
if (logBox == null) if (logBox == null)
...@@ -109,17 +109,17 @@ namespace OnlineStore.Common ...@@ -109,17 +109,17 @@ namespace OnlineStore.Common
} }
AddToBox(errorMsg, Color.Red); AddToBox(errorMsg, Color.Red);
} }
lasErrorLogList.Add(errorMsg); //lasErrorLogList.Add(errorMsg);
if (lasErrorLogList.Count > errCount) //if (lasErrorLogList.Count > errCount)
{ //{
lasErrorLogList.RemoveAt(0); // lasErrorLogList.RemoveAt(0);
} //}
} }
private static void AddToBox(string msg, Color color) private static void AddToBox(string msg, Color color)
{ {
try try
{ {
ShowLogPro(msg, color); ShowLogPro(msg);
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -127,7 +127,7 @@ namespace OnlineStore.Common ...@@ -127,7 +127,7 @@ namespace OnlineStore.Common
} }
} }
private static int count = 0; private static int count = 0;
private static void ShowLogPro(string msg, Color color) private static void ShowLogPro(string msg )
{ {
try try
{ {
......
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO.Ports; using System.IO.Ports;
...@@ -422,6 +423,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -422,6 +423,10 @@ namespace OnlineStore.DeviceLibrary
return GetRegisterData(portName, reviceData, ACCMDManager.TargetPostion); return GetRegisterData(portName, reviceData, ACCMDManager.TargetPostion);
} }
public static int GetActualtPosition(ConfigMoveAxis axis)
{
return GetActualtPosition(axis.DeviceName, axis.GetAxisValue());
}
public static int GetActualtPosition(string portName, int slvAddr) public static int GetActualtPosition(string portName, int slvAddr)
{ {
PreReadAddr = ACCMDManager.ActualPosition; PreReadAddr = ACCMDManager.ActualPosition;
...@@ -506,6 +511,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -506,6 +511,20 @@ namespace OnlineStore.DeviceLibrary
return GetCoilData(portName, reviceData, ACCMDManager.Home_Single); return GetCoilData(portName, reviceData, ACCMDManager.Home_Single);
} }
/// <summary> /// <summary>
/// 负极限
/// </summary>
public static int GetLimitNegativeSingle(ConfigMoveAxis axis)
{
return GetLimitNegativeSingle(axis);
}
/// <summary>
/// 正极限
/// </summary>
public static int GetLimitPositiveSingle(ConfigMoveAxis axis)
{
return GetLimitPositiveSingle(axis);
}
/// <summary>
/// 正极限 /// 正极限
/// </summary> /// </summary>
public static int GetLimitPositiveSingle(string portName, int slvAddr) public static int GetLimitPositiveSingle(string portName, int slvAddr)
......
...@@ -9,7 +9,7 @@ DI,吸盘气缸上升端,SuckingDisc_Up,206,192.168.200.11,0,吸盘气缸上升端,X07,DI-07,0 ...@@ -9,7 +9,7 @@ DI,吸盘气缸上升端,SuckingDisc_Up,206,192.168.200.11,0,吸盘气缸上升端,X07,DI-07,0
DI,吸盘气缸下降端,SuckingDisc_Down,207,192.168.200.11,0,吸盘气缸下降端,X08,DI-08,0, DI,吸盘气缸下降端,SuckingDisc_Down,207,192.168.200.11,0,吸盘气缸下降端,X08,DI-08,0,
DI,料盘宽度检测1,WidthCheck1,208,192.168.200.11,0,料盘宽度检测1,X09,DI-09,0, DI,料盘宽度检测1,WidthCheck1,208,192.168.200.11,0,料盘宽度检测1,X09,DI-09,0,
DI,料盘宽度检测2,WidthCheck2,209,192.168.200.11,0,料盘宽度检测2,X10,DI-10,0, DI,料盘宽度检测2,WidthCheck2,209,192.168.200.11,0,料盘宽度检测2,X10,DI-10,0,
DI,料盘检测1(上料机构),TrayCheck_LoadMaterial,210,192.168.200.11,0,料盘检测1(上料机构),X11,DI-11,0, DI,料盘检测1(上料机构),TrayCheck_LoadMaterial,210,192.168.200.11,0,料盘检测1(上料机构),X11,DI-11,0,
DI,上料机构出料检测,OutCheck,211,192.168.200.11,0,上料机构出料检测,X12,DI-12,0, DI,上料机构出料检测,OutCheck,211,192.168.200.11,0,上料机构出料检测,X12,DI-12,0,
DI,门锁气缸打开端,BatchDoor_Open,212,192.168.200.11,0,门锁气缸打开端,X13,DI-13,0, DI,门锁气缸打开端,BatchDoor_Open,212,192.168.200.11,0,门锁气缸打开端,X13,DI-13,0,
DI,门锁气缸关闭端,BatchDoor_Close,213,192.168.200.11,0,门锁气缸关闭端,X14,DI-14,0, DI,门锁气缸关闭端,BatchDoor_Close,213,192.168.200.11,0,门锁气缸关闭端,X14,DI-14,0,
...@@ -27,8 +27,8 @@ DO,进料口门上升SOL,Door_Up,108,192.168.200.11,0,进料口门上升SOL,Y09,DO-09,0, ...@@ -27,8 +27,8 @@ DO,进料口门上升SOL,Door_Up,108,192.168.200.11,0,进料口门上升SOL,Y09,DO-09,0,
DO,进料口门下降SOL,Door_Down,109,192.168.200.11,0,进料口门下降SOL,Y10,DO-10,0, DO,进料口门下降SOL,Door_Down,109,192.168.200.11,0,进料口门下降SOL,Y10,DO-10,0,
DO,吸盘气缸上升SOL,SuckingDisc_Up,110,192.168.200.11,0,吸盘气缸上升SOL,Y11,DO-11,0, DO,吸盘气缸上升SOL,SuckingDisc_Up,110,192.168.200.11,0,吸盘气缸上升SOL,Y11,DO-11,0,
DO,吸盘气缸下降SOL,SuckingDisc_Down,111,192.168.200.11,0,吸盘气缸下降SOL,Y12,DO-12,0, DO,吸盘气缸下降SOL,SuckingDisc_Down,111,192.168.200.11,0,吸盘气缸下降SOL,Y12,DO-12,0,
DO,门锁气缸打开SOL,AutoDoor_Open,112,192.168.200.11,0,门锁气缸打开SOL,Y13,DO-13,0, DO,门锁气缸打开SOL,BatchDoor_Open,112,192.168.200.11,0,门锁气缸打开SOL,Y13,DO-13,0,
DO,门锁气缸关闭SOL,AutoDoor_Close,113,192.168.200.11,0,门锁气缸关闭SOL,Y14,DO-14,0, DO,门锁气缸关闭SOL,BatchDoor_Close,113,192.168.200.11,0,门锁气缸关闭SOL,Y14,DO-14,0,
,,,114,192.168.200.11,0,,Y15,DO-15,0, ,,,114,192.168.200.11,0,,Y15,DO-15,0,
,,,115,192.168.200.11,0,,Y16,DO-16,0, ,,,115,192.168.200.11,0,,Y16,DO-16,0,
DI,上料机构门关闭,DoorClose_LoadMaterial,200,192.168.200.12,0,上料机构门关闭,X21,DI-21,0, DI,上料机构门关闭,DoorClose_LoadMaterial,200,192.168.200.12,0,上料机构门关闭,X21,DI-21,0,
...@@ -45,15 +45,15 @@ AXIS,(轴三)进出轴,InOut_Axis,1,COM5,0,,,,, ...@@ -45,15 +45,15 @@ AXIS,(轴三)进出轴,InOut_Axis,1,COM5,0,,,,,
AXIS,(轴五)批量上下料轴,Batch_Axis,1,COM6,0,,,,, AXIS,(轴五)批量上下料轴,Batch_Axis,1,COM6,0,,,,,
,,,,,,,,,, ,,,,,,,,,,
,,,,,,,,,, ,,,,,,,,,,
PRO,升降轴 进料口仓门位置,UpDownAxis_DoorPosition,403000,,,,,,, PRO,升降轴 进料口仓门位置,UpDownAxis_DoorPosition,355000,,,,,,,
,升降轴 进料口取料点 P1,UpDownAxis_DoorOPosition_P1,403000,,,,,,, ,升降轴 进料口取料点 P1,UpDownAxis_DoorOPosition_P1,403000,,,,,,,
,升降轴 进料口出料前点 P2,UpDownAxis_DoorIPosition_P2,415000,,,,,,, ,升降轴 进料口出料前点 P2,UpDownAxis_DoorIPosition_P2,415000,,,,,,,
,升降轴 进料口取料缓冲点 P7,UpDownAxis_DoorOBPosition_P7,415000,,,,,,, ,升降轴 进料口取料缓冲点 P7,UpDownAxis_DoorOBPosition_P7,415000,,,,,,,
,升降轴 进料口出料缓冲点 P8,UpDownAxis_DoorIBPosition_P8,403000,,,,,,, ,升降轴 进料口出料缓冲点 P8,UpDownAxis_DoorIBPosition_P8,403000,,,,,,,
PRO,升降轴 出入料待机点P1集合,UpDownAxis_P1_List,8#20000;12#22000,,,,,,, PRO,升降轴 出入料待机点P1集合,UpDownAxis_P1_List,8#355000;12#350000;,,,,,,,
PRO,旋转轴(轴一)P1 待机原位点,MiddleAxis_P1_Position,268093,,,,,,, PRO,旋转轴(轴一)P1 待机原位点,MiddleAxis_P1_Position,260000,,,,,,,
PRO,进出轴(轴三)P1待机原位点,InOutAxis_P1_Position,1000,,,,,,, PRO,进出轴(轴三)P1待机原位点,InOutAxis_P1_Position,1000,,,,,,,
PRO,压紧轴(轴4)P1待机原位点,CompressAxis_P1_Position,-75000,,,,,,, PRO,压紧轴(轴4)P1待机原位点,CompressAxis_P1_Position,-40000,,,,,,,
PRO,是否使用定位气缸,IsHasLocationCylinder,0,,,,,,, PRO,是否使用定位气缸,IsHasLocationCylinder,0,,,,,,,
PRO,是否有左右侧门,IsHasDoorLimit,1,,,,,,, PRO,是否有左右侧门,IsHasDoorLimit,1,,,,,,,
PRO,是否使用压紧轴(1=使用),IsHasCompress_Axis,1,,,,, ,, PRO,是否使用压紧轴(1=使用),IsHasCompress_Axis,1,,,,, ,,
...@@ -62,7 +62,7 @@ PRO,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,, ...@@ -62,7 +62,7 @@ PRO,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,,
,,,,,,,,,, ,,,,,,,,,,
PRO,预警温度,WarnTemperate,80,,,,,,, PRO,预警温度,WarnTemperate,80,,,,,,,
PRO,预警湿度,WarnHumidity,80,,,,,,, PRO,预警湿度,WarnHumidity,80,,,,,,,
PRO,(轴一)旋转轴目标速度,MiddleAxis_TargetSpeed,250,,,,,,, PRO,(轴一)旋转轴目标速度,MiddleAxis_TargetSpeed,100,,,,,,,
PRO,(轴一)旋转轴加速度,MiddleAxis_AddSpeed,80,,,,,,, PRO,(轴一)旋转轴加速度,MiddleAxis_AddSpeed,80,,,,,,,
PRO,(轴一)旋转轴减速度,MiddleAxis_DelSpeed,80,,,,,,, PRO,(轴一)旋转轴减速度,MiddleAxis_DelSpeed,80,,,,,,,
PRO,(轴一)旋转轴原点低速度,MiddleAxis_HomeLowSpeed,80,,,,,,, PRO,(轴一)旋转轴原点低速度,MiddleAxis_HomeLowSpeed,80,,,,,,,
...@@ -128,18 +128,18 @@ PRO,硕科步进电机(压紧轴)控制减速度,CompressAxis_DelSpeed,15000,,,,,,, ...@@ -128,18 +128,18 @@ PRO,硕科步进电机(压紧轴)控制减速度,CompressAxis_DelSpeed,15000,,,,,,,
PRO,硕科步进电机(压紧轴)原点返回速度,CompressAxis_HomeSpeed,15000,,,,,,, PRO,硕科步进电机(压紧轴)原点返回速度,CompressAxis_HomeSpeed,15000,,,,,,,
PRO,硕科步进电机轴地址(压紧轴),CompressAxis_Slv,1,,,,,, , PRO,硕科步进电机轴地址(压紧轴),CompressAxis_Slv,1,,,,,, ,
,,,,,,,,,, ,,,,,,,,,,
PRO,(轴五)上料轴目标速度,BatchAxis_TargetSpeed,50,,,,,,, PRO,(轴五)上料轴目标速度,BatchAxis_TargetSpeed,200,,,,,,,
PRO,(轴五)上料轴加速度,BatchAxis_AddSpeed,300,,,,,,, PRO,(轴五)上料轴加速度,BatchAxis_AddSpeed,300,,,,,,,
PRO,(轴五)上料轴减速度,BatchAxis_DelSpeed,300,,,,,,, PRO,(轴五)上料轴减速度,BatchAxis_DelSpeed,300,,,,,,,
PRO,(轴五)上料轴原点低速,BatchAxis_HomeLowSpeed,20,,,,,,, PRO,(轴五)上料轴原点低速,BatchAxis_HomeLowSpeed,20,,,,,,,
PRO,(轴五)上料轴原点高速,BatchAxis_HomeHighSpeed,60,,,,,,, PRO,(轴五)上料轴原点高速,BatchAxis_HomeHighSpeed,60,,,,,,,
PRO,(轴五)上料轴原点加速度,BatchAxis_HomeAddSpeed,200,,,,,,, PRO,(轴五)上料轴原点加速度,BatchAxis_HomeAddSpeed,200,,,,,,,
PRO,(轴五)上料轴P1点(出库时接料盘的位置),BatchAxis_P1,200,,,,,, , PRO,(轴五)上料轴P1点(出库时接料盘的位置),BatchAxis_P1,1730000,,,,,, ,
PRO,(轴五)上料轴最小误差脉冲值,BatchAxis_ErrorCountMin,10,,,,,,, PRO,(轴五)上料轴最小误差脉冲值,BatchAxis_ErrorCountMin,10,,,,,,,
PRO,(轴五)上料轴最大误差脉冲值,BatchAxis_ErrorCountMax,1000,,,,,,, PRO,(轴五)上料轴最大误差脉冲值,BatchAxis_ErrorCountMax,1000,,,,,,,
PRO,(轴五)上料轴最小限位,BatchAxis_PositionMin,0,,,,,,, PRO,(轴五)上料轴最小限位,BatchAxis_PositionMin,0,,,,,,,
PRO,(轴五)上料轴最大限位,BatchAxis_PositionMax,0,,,,,,, PRO,(轴五)上料轴最大限位,BatchAxis_PositionMax,0,,,,,,,
PRO,(轴五)上料轴P1速度,BatchAxis_P1_Speed,50,,,,,,, PRO,(轴五)上料轴P1速度,BatchAxis_P1_Speed,200,,,,,,,
,,,,,,,,,, ,,,,,,,,,,
,,,,,,,,,, ,,,,,,,,,,
PRO,IO模块对应的DI数量,IO_DILength,192.168.200.11#16;192.168.200.12#4,,,,,, , PRO,IO模块对应的DI数量,IO_DILength,192.168.200.11#16;192.168.200.12#4,,,,,, ,
......
位置,优先级,高度,宽度,料仓ID,中轴位置P2,升降轴库位出料前点P5,升降轴库位出料缓冲点P6,升降轴库位入料前点P3,升降轴库位入料缓冲点P4,进出轴库位点取料点P3,压紧轴压紧点P2,压紧轴压紧前点P3,进出轴仓门取料点P2,进出轴吸盘取料点P2 位置,优先级,高度,宽度,料仓ID,中轴位置P2,升降轴库位出料前点P5,升降轴库位出料缓冲点P6,升降轴库位入料前点P3,升降轴库位入料缓冲点P4,进出轴库位点取料点P3,压紧轴压紧点P2,压紧轴压紧前点P3,进出轴仓门取料点P2,进出轴吸盘取料点P2
1#AC1_1_1_4,774,8,7,1,211783,51884,55245,55245,51884,68000,-110000,-75000,81000,81000 1#AC1_1_1_4,774,8,7,1,211783,51884,55245,55245,51884,68000,-110000,-75000,5000,5000
1#AC1_1_1_5,773,12,7,1,211783,67807,71168,71168,67807,68000,-110000,-75000,81000,81000 1#AC1_1_1_5,773,12,7,1,211783,67807,71168,71168,67807,68000,-110000,-75000,5000,5000
1#AC1_1_1_6,772,8,7,,211783,83730,87091,87091,83730,68000,-110000,-75000,81000,81000 1#AC1_1_1_6,772,8,7,,211783,83730,87091,87091,83730,68000,-110000,-75000,81000,81000
1#AC1_1_1_7,771,8,7,,211783,99653,103014,103014,99653,68000,-110000,-75000,81000,81000 1#AC1_1_1_7,771,8,7,,211783,99653,103014,103014,99653,68000,-110000,-75000,81000,81000
1#AC1_1_1_8,770,8,7,,211783,115576,118937,118937,115576,68000,-110000,-75000,81000,81000 1#AC1_1_1_8,770,8,7,,211783,115576,118937,118937,115576,68000,-110000,-75000,81000,81000
......
...@@ -16,8 +16,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -16,8 +16,8 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
public partial class AC_SA_BoxBean : AC_Store public partial class AC_SA_BoxBean : AC_Store
{ {
private static bool IsIntSlvBlock = false; private bool IsIntSlvBlock = false;
public bool UseBatchInout = true;
public string CID = ""; public string CID = "";
public AUTO_SA_Config Config; public AUTO_SA_Config Config;
/// <summary> /// <summary>
...@@ -136,7 +136,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -136,7 +136,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
public override bool StartRun() public override bool StartRun()
{ {
runTimeWatch.Reset(); runTimeWatch.Restart();
LogUtil.info(LOGGER, StoreName + "开始启动,启动时间:" + DateTime.Now.ToLongTimeString()); LogUtil.info(LOGGER, StoreName + "开始启动,启动时间:" + DateTime.Now.ToLongTimeString());
if (IsHasCompress_Axis) if (IsHasCompress_Axis)
...@@ -147,12 +147,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -147,12 +147,15 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
} }
if (UseBatchInout)
{
string canStart = AutomaticBaiting.CanStart(); string canStart = AutomaticBaiting.CanStart();
if (!canStart.Equals("")) if (!canStart.Equals(""))
{ {
LogUtil.info(StoreName + canStart); LogUtil.info(StoreName + canStart);
return false; return false;
} }
}
autoNext = false; autoNext = false;
mainTimer.Enabled = false; mainTimer.Enabled = false;
alarmType = StoreAlarmType.None; alarmType = StoreAlarmType.None;
...@@ -170,8 +173,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -170,8 +173,10 @@ namespace OnlineStore.DeviceLibrary
{ {
return false; return false;
} }
if (UseBatchInout)
{
AutomaticBaiting.Reset(); AutomaticBaiting.Reset();
}
//TODO 启动时先所有轴远点返回,测试暂时关闭 //TODO 启动时先所有轴远点返回,测试暂时关闭
storeRunStatus = StoreRunStatus.HomeMoving; storeRunStatus = StoreRunStatus.HomeMoving;
HumitureController.Init(Config.Humiture_Port); HumitureController.Init(Config.Humiture_Port);
...@@ -698,11 +703,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -698,11 +703,12 @@ namespace OnlineStore.DeviceLibrary
//private DateTime preProcessTime = DateTime.Now; //private DateTime preProcessTime = DateTime.Now;
private bool IsChongfu = false; private bool IsChongfu = false;
private Stopwatch stopwatch = new Stopwatch(); private Stopwatch stopwatch = new Stopwatch();
private object TimerLock = "";
protected override void timersTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) protected override void timersTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{ {
if (InProcess) if (InProcess)
{ {
//TimeSpan span = DateTime.Now - preProcessTime;
if (stopwatch.Elapsed.TotalMinutes < 1) if (stopwatch.Elapsed.TotalMinutes < 1)
{ {
return; return;
...@@ -711,13 +717,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -711,13 +717,16 @@ namespace OnlineStore.DeviceLibrary
{ {
LogUtil.error("主定时器:InProcess已等待" + stopwatch.Elapsed.ToString() + "重新处理"); LogUtil.error("主定时器:InProcess已等待" + stopwatch.Elapsed.ToString() + "重新处理");
IsChongfu = true; IsChongfu = true;
Monitor.Exit(TimerLock);
} }
} }
try
{
InProcess = true; InProcess = true;
//preProcessTime = DateTime.Now;
stopwatch.Restart(); stopwatch.Restart();
if (Monitor.TryEnter(TimerLock))
{
try
{
IoCheckProcess(); IoCheckProcess();
ShowTimeLog("IoCheckProcess"); ShowTimeLog("IoCheckProcess");
TimerProcess(); TimerProcess();
...@@ -729,12 +738,25 @@ namespace OnlineStore.DeviceLibrary ...@@ -729,12 +738,25 @@ namespace OnlineStore.DeviceLibrary
CheckAxisAlarm(); CheckAxisAlarm();
ShowTimeLog("轴报警检测完成"); ShowTimeLog("轴报警检测完成");
} }
if (UseBatchInout)
{
AutomaticBaiting.TimerProcess(); AutomaticBaiting.TimerProcess();
} }
}
catch (Exception ex) catch (Exception ex)
{ {
LOGGER.Error(StoreName + "定时处理出错:" + ex.ToString()); LOGGER.Error(StoreName + "定时处理出错:" + ex.ToString());
} }
finally
{
Monitor.Exit(TimerLock);
}
}
else
{
LOGGER.Error(StoreName + "定时处理未得到锁");
}
IsChongfu = false; IsChongfu = false;
InProcess = false; InProcess = false;
} }
...@@ -923,37 +945,37 @@ namespace OnlineStore.DeviceLibrary ...@@ -923,37 +945,37 @@ namespace OnlineStore.DeviceLibrary
//遮挡光栅信号 //遮挡光栅信号
if (KND.IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.LOW)) if (KND.IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.LOW))
{ {
if (NeedCheckSafetyLight.Equals(1)) //if (NeedCheckSafetyLight.Equals(1))
{ //{
if (StoreMove.MoveType.Equals(StoreMoveType.OutStore) && StoreMove.MoveStep.Equals(StoreMoveStep.SO_10_DeviceToDoor)) // if (StoreMove.MoveType.Equals(StoreMoveType.OutStore) && StoreMove.MoveStep.Equals(StoreMoveStep.SO_10_DeviceToDoor))
{ // {
NeedCheckSafetyLight = 2; // NeedCheckSafetyLight = 2;
LOGGER.Info("出库SO_10_DeviceToDoor运动中,光栅被遮挡,停止进出轴运动"); // LOGGER.Info("出库SO_10_DeviceToDoor运动中,光栅被遮挡,停止进出轴运动");
ACServerManager.SuddenStop(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue()); // ACServerManager.SuddenStop(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue());
} // }
else if (StoreMove.MoveType.Equals(StoreMoveType.InStore) && StoreMove.MoveStep.Equals(StoreMoveStep.SI_05_DeviceToDoor)) // else if (StoreMove.MoveType.Equals(StoreMoveType.InStore) && StoreMove.MoveStep.Equals(StoreMoveStep.SI_05_DeviceToDoor))
{ // {
NeedCheckSafetyLight = 2; // NeedCheckSafetyLight = 2;
LOGGER.Info("入库SI_05_DeviceToDoor运动中,光栅被遮挡,停止进出轴运动"); // LOGGER.Info("入库SI_05_DeviceToDoor运动中,光栅被遮挡,停止进出轴运动");
ACServerManager.SuddenStop(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue()); // ACServerManager.SuddenStop(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue());
} // }
} //}
} }
else else
{ {
if (NeedCheckSafetyLight.Equals(2)) //if (NeedCheckSafetyLight.Equals(2))
{ //{
if (StoreMove.MoveType.Equals(StoreMoveType.OutStore) && StoreMove.MoveStep.Equals(StoreMoveStep.SO_10_DeviceToDoor)) // if (StoreMove.MoveType.Equals(StoreMoveType.OutStore) && StoreMove.MoveStep.Equals(StoreMoveStep.SO_10_DeviceToDoor))
{ // {
LOGGER.Info("出库SO_10_DeviceToDoor运动中,光栅已恢复,继续进出轴运动"); // LOGGER.Info("出库SO_10_DeviceToDoor运动中,光栅已恢复,继续进出轴运动");
SO_10_DeviceToDoorPro(); // SO_10_DeviceToDoorPro();
} // }
else if (StoreMove.MoveType.Equals(StoreMoveType.InStore) && StoreMove.MoveStep.Equals(StoreMoveStep.SI_05_DeviceToDoor)) // else if (StoreMove.MoveType.Equals(StoreMoveType.InStore) && StoreMove.MoveStep.Equals(StoreMoveStep.SI_05_DeviceToDoor))
{ // {
LOGGER.Info("入库SI_05_DeviceToDoor运动中,光栅已恢复,继续进出轴运动"); // LOGGER.Info("入库SI_05_DeviceToDoor运动中,光栅已恢复,继续进出轴运动");
SI_05_DeviceToDoor(); // SI_05_DeviceToDoor();
} // }
} //}
} }
} }
catch (Exception ex) catch (Exception ex)
...@@ -1232,7 +1254,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -1232,7 +1254,10 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(LOGGER, StoreName + "StopMove"); LogUtil.info(LOGGER, StoreName + "StopMove");
KND.IOMove(IO_Type.Door_Down, IO_VALUE.LOW); KND.IOMove(IO_Type.Door_Down, IO_VALUE.LOW);
KND.IOMove(IO_Type.Door_Up, IO_VALUE.LOW); KND.IOMove(IO_Type.Door_Up, IO_VALUE.LOW);
if (UseBatchInout)
{
AutomaticBaiting.StopMove(); AutomaticBaiting.StopMove();
}
//HDevelopExport.CloseAllCamera(); //HDevelopExport.CloseAllCamera();
isInPro = false; isInPro = false;
} }
...@@ -1502,8 +1527,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -1502,8 +1527,9 @@ namespace OnlineStore.DeviceLibrary
LOGGER.Error("定时给服务器发送消息出错:", ex); LOGGER.Error("定时给服务器发送消息出错:", ex);
} }
} }
HumitureController.QueryData(); //温湿度暂时注释
HumidityProcess(); //HumitureController.QueryData();
//HumidityProcess();
LedProcess(); LedProcess();
isInProcess = false; isInProcess = false;
} }
......
...@@ -82,9 +82,24 @@ namespace OnlineStore.DeviceLibrary ...@@ -82,9 +82,24 @@ namespace OnlineStore.DeviceLibrary
//出库时批量上下料轴需要下降的高度 //出库时批量上下料轴需要下降的高度
p.BatchAxis_DownValue = AutomaticBaiting.AxisChangeValue * position.BagHeight; p.BatchAxis_DownValue = AutomaticBaiting.AxisChangeValue * position.BagHeight;
LogUtil.info("【" + position.PositionNum + "】高度【" + position.BagHeight + "】批量上下料轴需要下降【" + p.BatchAxis_DownValue + "】");
param.MoveP = p; param.MoveP = p;
return true; return true;
} }
else
{
AutoStorePosition position = CSVPositionReader<AutoStorePosition>.GetPositon(param.PositionNum);
if (position != null)
{
param.MoveP.BatchAxis_DownValue = AutomaticBaiting.AxisChangeValue * position.BagHeight;
LogUtil.info("【" + position.PositionNum + "】高度【" + position.BagHeight + "】批量上下料轴需要下降【" + param.MoveP.BatchAxis_DownValue + "】");
}
else
{
param.MoveP.BatchAxis_DownValue = AutomaticBaiting.AxisChangeValue * 8;
LogUtil.info("【" + position.PositionNum + "】高度【" + 8 + "】批量上下料轴需要下降【" + param.MoveP.BatchAxis_DownValue + "】");
}
}
return true; return true;
} }
...@@ -145,6 +160,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -145,6 +160,7 @@ namespace OnlineStore.DeviceLibrary
{ {
isOk = false; isOk = false;
WarnMsg = msg; WarnMsg = msg;
LogUtil.info(msg);
Alarm(StoreAlarmType.AxisMoveError, GetAlarmCodeByAxis(wait.AxisInfo).ToString(), WarnMsg, StoreMove.MoveType); Alarm(StoreAlarmType.AxisMoveError, GetAlarmCodeByAxis(wait.AxisInfo).ToString(), WarnMsg, StoreMove.MoveType);
break; break;
} }
...@@ -170,10 +186,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -170,10 +186,12 @@ namespace OnlineStore.DeviceLibrary
else if (wait.WaitType == 3) else if (wait.WaitType == 3)
{ {
wait.IsEnd = (span.TotalMilliseconds >= wait.TimeMSeconds); wait.IsEnd = (span.TotalMilliseconds >= wait.TimeMSeconds);
}else if (wait.WaitType == 7) }
else if (wait.WaitType == 7)
{ {
//wait.IsEnd = (wait.HeightValue.Equals(GetHeight())); //wait.IsEnd = (wait.HeightValue.Equals(GetHeight()));
}else if (wait.WaitType == 12) }
else if (wait.WaitType == 12)
{ {
wait.IsEnd = AutomaticBaiting.IsGetTrayGo; wait.IsEnd = AutomaticBaiting.IsGetTrayGo;
} }
...@@ -182,7 +200,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -182,7 +200,7 @@ namespace OnlineStore.DeviceLibrary
ShuoKeInfo info = null; ShuoKeInfo info = null;
if (wait.IsHomeMove) if (wait.IsHomeMove)
{ {
wait.IsEnd = ShuoKeControls.IsHomeMoveEnd(wait.SlvAddr, StoreMove.LastSetpTime,out info); wait.IsEnd = ShuoKeControls.IsHomeMoveEnd(wait.SlvAddr, StoreMove.LastSetpTime, out info);
} }
else else
{ {
...@@ -190,13 +208,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -190,13 +208,15 @@ namespace OnlineStore.DeviceLibrary
} }
if (!wait.IsEnd) if (!wait.IsEnd)
{ {
if (info == null) { if (info == null)
{
NotOkMsg += "info=null;"; NotOkMsg += "info=null;";
} else }
else
{ {
NotOkMsg += "" +info.ToShowStr(); NotOkMsg += "" + info.ToShowStr();
} }
ShuoKeControls.GetStatus(wait.SlvAddr); ShuoKeControls.GetStatus(wait.SlvAddr);
} }
...@@ -211,7 +231,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -211,7 +231,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
if (!StoreMove.OneWaitCanEndStep ) if (!StoreMove.OneWaitCanEndStep)
{ {
isOk = false; isOk = false;
break; break;
...@@ -254,9 +274,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -254,9 +274,9 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 开始入库移动移动 /// 开始入库移动移动
/// </summary> /// </summary>
public bool StartInStoreMove(InOutStoreParam param, bool IsBatchWork,bool isNeedInStore) public bool StartInStoreMove(InOutStoreParam param, bool IsBatchWork, bool isNeedInStore)
{ {
InOutWatch.Reset(); InOutWatch.Restart();
string posId = param != null ? param.PositionNum : ""; string posId = param != null ? param.PositionNum : "";
string logMsg = IsBatchWork ? " 启动批量入库【" + posId + "】" : " 启动入库【" + posId + "】"; string logMsg = IsBatchWork ? " 启动批量入库【" + posId + "】" : " 启动入库【" + posId + "】";
if (!AutomaticBaiting.DoorStatus.Equals(2)) if (!AutomaticBaiting.DoorStatus.Equals(2))
...@@ -266,17 +286,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -266,17 +286,17 @@ namespace OnlineStore.DeviceLibrary
} }
if (storeRunStatus == StoreRunStatus.Runing) if (storeRunStatus == StoreRunStatus.Runing)
{ {
if (!LoadParamPosition(param,false)) if (!LoadParamPosition(param, false))
{ {
LogUtil.error(LOGGER, StoreName + logMsg+ " 出错,找不到库位信息"); LogUtil.error(LOGGER, StoreName + logMsg + " 出错,找不到库位信息");
return false ; return false;
} }
if (KND.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH)) if (KND.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{ {
LogUtil.error(LOGGER, StoreName + logMsg + " 出错,叉子料盘检测有料"); LogUtil.error(LOGGER, StoreName + logMsg + " 出错,叉子料盘检测有料");
return false ; return false;
} }
LogUtil.info(LOGGER, StoreName + logMsg ); LogUtil.info(LOGGER, StoreName + logMsg);
storeRunStatus = StoreRunStatus.Busy; storeRunStatus = StoreRunStatus.Busy;
storeStatus = StoreStatus.InStoreExecute; storeStatus = StoreStatus.InStoreExecute;
StoreMove.NewMove(StoreMoveType.InStore, param); StoreMove.NewMove(StoreMoveType.InStore, param);
...@@ -521,9 +541,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -521,9 +541,9 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 开始出库运动 /// 开始出库运动
/// </summary> /// </summary>
public bool StartOutStoreMove(InOutStoreParam param,bool IsBatchWork) public bool StartOutStoreMove(InOutStoreParam param, bool IsBatchWork)
{ {
InOutWatch.Reset(); InOutWatch.Restart();
string posId = param != null ? param.PositionNum : ""; string posId = param != null ? param.PositionNum : "";
string logMsg = IsBatchWork ? " 启动批量出库【" + posId + "】" : " 启动出库【" + posId + "】"; string logMsg = IsBatchWork ? " 启动批量出库【" + posId + "】" : " 启动出库【" + posId + "】";
if (!AutomaticBaiting.DoorStatus.Equals(2)) if (!AutomaticBaiting.DoorStatus.Equals(2))
...@@ -533,15 +553,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -533,15 +553,15 @@ namespace OnlineStore.DeviceLibrary
} }
if (storeRunStatus == StoreRunStatus.Runing) if (storeRunStatus == StoreRunStatus.Runing)
{ {
if (!LoadParamPosition(param,IsBatchWork)) if (!LoadParamPosition(param, IsBatchWork))
{ {
LogUtil.error(LOGGER, StoreName + logMsg+ " 出错,找不到库位信息"); LogUtil.error(LOGGER, StoreName + logMsg + " 出错,找不到库位信息");
return false ; return false;
} }
if (KND.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH)) if (KND.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{ {
LogUtil.error(LOGGER, StoreName + logMsg + " 出错,叉子料盘检测有料"); LogUtil.error(LOGGER, StoreName + logMsg + " 出错,叉子料盘检测有料");
return false ; return false;
} }
//若自动上料机构正在入库中,不可以出库 //若自动上料机构正在入库中,不可以出库
if (!AutomaticBaiting.AutoBaitingStatus.Equals(StoreRunStatus.Runing)) if (!AutomaticBaiting.AutoBaitingStatus.Equals(StoreRunStatus.Runing))
...@@ -567,12 +587,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -567,12 +587,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.IsBatchInOutStore = IsBatchWork; StoreMove.IsBatchInOutStore = IsBatchWork;
if (IsHasCompress_Axis || Config.IsHasLocationCylinder.Equals(0)) if (IsHasCompress_Axis || Config.IsHasLocationCylinder.Equals(0))
{ {
StoreMove.NextMoveStep(StoreMoveStep.SO_02_DeviceBack); SO_02_DeviceBack();
OutStoreLog("出库:SO_02 叉子先运动到P1 , 开始");
//ACAxisMove(Config.InOut_Axis, StoreMove.MoveParam.MoveP.InOut_P1, Config.InOutAxis_P1_Speed);
InOutBackToP1(StoreMove.MoveParam.MoveP.InOut_P1);
//OpenDoorAndWait();
} }
else else
{ {
...@@ -601,22 +616,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -601,22 +616,7 @@ namespace OnlineStore.DeviceLibrary
} }
if (StoreMove.MoveStep == StoreMoveStep.SO_01_LocationCylinderDown) if (StoreMove.MoveStep == StoreMoveStep.SO_01_LocationCylinderDown)
{ {
StoreMove.NextMoveStep(StoreMoveStep.SO_02_DeviceBack); SO_02_DeviceBack();
if (StoreMove.IsBatchInOutStore)
{
//如果批量能未检测到料盘,需要把批量轴走到能检测到料盘的位置
if (KND.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.LOW))
{
//int currBatchValue = ACServerManager.GetActualtPosition(Config.Batch_Axis.DeviceName, Config.Batch_Axis.GetAxisValue());
ACAxisMove(Config.Batch_Axis, Config.BatchAxis_P1, Config.BatchAxis_P1_Speed);
OutStoreLog("出库:SO_02 批量上下料轴走到P1点 ");
}
}
OutStoreLog("出库:SO_02 叉子先运动到P1 ");
InOutBackToP1(StoreMove.MoveParam.MoveP.InOut_P1);
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_02_DeviceBack) else if (StoreMove.MoveStep == StoreMoveStep.SO_02_DeviceBack)
{ {
...@@ -733,25 +733,44 @@ namespace OnlineStore.DeviceLibrary ...@@ -733,25 +733,44 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(LOGGER, StoreName + " 出库处理,moveStatus=" + StoreMove.MoveStep + ",没有对应的处理!"); LogUtil.error(LOGGER, StoreName + " 出库处理,moveStatus=" + StoreMove.MoveStep + ",没有对应的处理!");
} }
} }
private void SO_02_DeviceBack()
{
StoreMove.NextMoveStep(StoreMoveStep.SO_02_DeviceBack);
OutStoreLog("出库:SO_02 叉子先运动到P1 , 开始");
InOutBackToP1(StoreMove.MoveParam.MoveP.InOut_P1);
if (StoreMove.IsBatchInOutStore)
{
//如果批量能未检测到料盘,需要把批量轴走到能检测到料盘的位置
if (KND.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.LOW))
{
StoreMove.TimeOutSeconds = 120;
ACAxisMove(Config.Batch_Axis, Config.BatchAxis_P1, Config.BatchAxis_P1_Speed);
OutStoreLog("出库:SO_02 批量上下料轴走到P1点 ");
}
}
}
private void BatchAxisUpTrayHeight() private void BatchAxisUpTrayHeight()
{ {
//上料轴需要向下走 //上料轴需要向下走
int currPosition = ACServerManager.GetActualtPosition(StoreManager.Config.Batch_Axis.DeviceName, StoreManager.Config.Batch_Axis.GetAxisValue()); int currPosition = ACServerManager.GetActualtPosition(StoreManager.Config.Batch_Axis);
if (currPosition.Equals(-1))
{
currPosition = ACServerManager.GetActualtPosition(StoreManager.Config.Batch_Axis);
}
int targetValue = currPosition - StoreMove.MoveParam.MoveP.BatchAxis_DownValue; int targetValue = currPosition - StoreMove.MoveParam.MoveP.BatchAxis_DownValue;
//记录高度 //记录高度
AutomaticBaiting.BatchOutStoreCount++; AutomaticBaiting.BatchOutStoreCount++;
AutomaticBaiting.BatchOutStoreHeight += StoreMove.MoveParam.GetACPosition().BagHeight; AutomaticBaiting.BatchOutStoreHeight += StoreMove.MoveParam.GetACPosition().BagHeight;
OutStoreLog("出库:SO_13 升降轴返回,将物品放下,批量上下料轴下降【"+ StoreMove.MoveParam.MoveP.BatchAxis_DownValue + "】,目标位置【"+targetValue+"】"); OutStoreLog("出库:SO_13 升降轴返回,将物品放下,批量上下料轴下降【" + StoreMove.MoveParam.MoveP.BatchAxis_DownValue + "】,目标位置【" + targetValue + "】");
//判断盘满后,需要报警? //判断盘满后,需要报警?
if (targetValue < 0) if (targetValue <= 0)
{ {
//TODO //TODO
WarnMsg = "库已满,请先拿走!"; WarnMsg = "库已满,请先拿走!";
} }
else else
{ {
ACAxisMove(StoreManager.Config.Batch_Axis, StoreManager.Config.Batch_Axis.TargetSpeed, targetValue); ACAxisMove(StoreManager.Config.Batch_Axis, targetValue, StoreManager.Config.Batch_Axis.TargetSpeed);
} }
} }
private void SO_13_InoutBack() private void SO_13_InoutBack()
...@@ -950,13 +969,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -950,13 +969,13 @@ namespace OnlineStore.DeviceLibrary
{ {
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : ""; string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
string isBatchMsg = StoreMove.IsBatchInOutStore ? "批量" : ""; string isBatchMsg = StoreMove.IsBatchInOutStore ? "批量" : "";
LogUtil.info(LOGGER, isBatchMsg+"【" + posId + "】" + msg); LogUtil.info(LOGGER, isBatchMsg + "【" + posId + "】" + msg);
} }
private void OutStoreLog(string msg) private void OutStoreLog(string msg)
{ {
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : ""; string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
string isBatchMsg = StoreMove.IsBatchInOutStore ? "批量" : ""; string isBatchMsg = StoreMove.IsBatchInOutStore ? "批量" : "";
LogUtil.info(LOGGER, isBatchMsg+ "【" + posId + "】" + msg); LogUtil.info(LOGGER, isBatchMsg + "【" + posId + "】" + msg);
} }
} }
} }
...@@ -29,6 +29,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -29,6 +29,7 @@ namespace OnlineStore.DeviceLibrary
public static StoreMoveInfo StoreMove = null; public static StoreMoveInfo StoreMove = null;
public static StoreRunStatus AutoBaitingStatus = StoreRunStatus.Wait; public static StoreRunStatus AutoBaitingStatus = StoreRunStatus.Wait;
public static bool IsNeedStartInout = false;
//记录没开门状态下,已经出库的数量 //记录没开门状态下,已经出库的数量
public static int BatchOutStoreCount = 0; public static int BatchOutStoreCount = 0;
...@@ -46,6 +47,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -46,6 +47,8 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
public static void TimerProcess() public static void TimerProcess()
{ {
try
{
if (AutoBaitingStatus >= StoreRunStatus.Wait) if (AutoBaitingStatus >= StoreRunStatus.Wait)
{ {
if (StoreMove.MoveType.Equals(StoreMoveType.StoreReset)) if (StoreMove.MoveType.Equals(StoreMoveType.StoreReset))
...@@ -61,6 +64,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -61,6 +64,10 @@ namespace OnlineStore.DeviceLibrary
//OutStoreProcess(); //OutStoreProcess();
} }
} }
}catch(Exception ex)
{
LogUtil.error(Name+"出错:"+ex.StackTrace);
}
} }
/// <summary> /// <summary>
...@@ -115,6 +122,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -115,6 +122,7 @@ namespace OnlineStore.DeviceLibrary
//关闭门,轴回原点,检测 //关闭门,轴回原点,检测
BatchDoorClose(true); BatchDoorClose(true);
KND.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW); KND.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
CylinderMove(IO_Type.SuckingDisc_Up, IO_Type.SuckingDisc_Down,true);
LogUtil.info(Name + "复位中:关闭门锁"); LogUtil.info(Name + "复位中:关闭门锁");
return true; return true;
} }
...@@ -136,19 +144,33 @@ namespace OnlineStore.DeviceLibrary ...@@ -136,19 +144,33 @@ namespace OnlineStore.DeviceLibrary
case StoreMoveStep.AUTO_R01_CloseDoor: case StoreMoveStep.AUTO_R01_CloseDoor:
StoreMove.NextMoveStep(StoreMoveStep.AUTO_R02_AutoAxisHome); StoreMove.NextMoveStep(StoreMoveStep.AUTO_R02_AutoAxisHome);
LogUtil.info(Name + "复位中:批量上下料轴原点返回"); LogUtil.info(Name + "复位中:批量上下料轴原点返回");
StoreMove.TimeOutSeconds = 120;
ACAxisHomeMove(StoreManager.Config.Batch_Axis); ACAxisHomeMove(StoreManager.Config.Batch_Axis);
break; break;
case StoreMoveStep.AUTO_R02_AutoAxisHome: case StoreMoveStep.AUTO_R02_AutoAxisHome:
if (IsNeedStartInout)
{
StoreMove.NextMoveStep(StoreMoveStep.AUTO_R03_AutoAxisHome); StoreMove.NextMoveStep(StoreMoveStep.AUTO_R03_AutoAxisHome);
LogUtil.info(Name + "复位中:匀速向上运动,检测 是否有料盘"); LogUtil.info(Name + "复位中:匀速向上运动,检测 是否有料盘");
ACAxisSpeedMove(StoreManager.Config.Batch_Axis, StoreManager.Config.Batch_Axis.TargetSpeed); ACAxisSpeedMove(StoreManager.Config.Batch_Axis, StoreManager.Config.Batch_Axis.TargetSpeed);
}
else
{
LogUtil.info(Name + "复位完成");
StoreMove.EndMove();
AutoBaitingStatus = StoreRunStatus.Runing;
WarnMsg = "";
IsNeedStartInout = false;
}
break; break;
case StoreMoveStep.AUTO_R03_AutoAxisHome: case StoreMoveStep.AUTO_R03_AutoAxisHome:
if (KND.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.LOW)) //if (KND.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.LOW))
if (ACServerManager.GetLimitPositiveSingle(StoreManager.Config.Batch_Axis).Equals(1))
{ {
LogUtil.info(Name + "复位中: 没有料盘,不需要上料,上料轴回0点"); LogUtil.info(Name + "复位中: 没有料盘,不需要上料,上料轴回0点");
StoreMove.NextMoveStep(StoreMoveStep.AUTO_R04_AutoBack); StoreMove.NextMoveStep(StoreMoveStep.AUTO_R04_AutoBack);
StoreMove.TimeOutSeconds = 120;
ACAxisHomeMove(StoreManager.Config.Batch_Axis); ACAxisHomeMove(StoreManager.Config.Batch_Axis);
} }
else else
...@@ -165,6 +187,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -165,6 +187,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.EndMove(); StoreMove.EndMove();
AutoBaitingStatus = StoreRunStatus.Runing; AutoBaitingStatus = StoreRunStatus.Runing;
WarnMsg = ""; WarnMsg = "";
IsNeedStartInout = false;
break; break;
default: break; default: break;
} }
...@@ -343,7 +366,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -343,7 +366,8 @@ namespace OnlineStore.DeviceLibrary
LastSize = 0; LastSize = 0;
LastPosId = ""; LastPosId = "";
SuckingDisc_WorkCount = 0; SuckingDisc_WorkCount = 0;
if (KND.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.HIGH)) if (ACServerManager.GetLimitPositiveSingle(StoreManager.Config.Batch_Axis).Equals(0))
//if (KND.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.HIGH))
{ {
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I01_ScanCode); StoreMove.NextMoveStep(StoreMoveStep.AUTO_I01_ScanCode);
LogUtil.info(Name + "入料: 开始扫码 "); LogUtil.info(Name + "入料: 开始扫码 ");
......
...@@ -72,6 +72,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -72,6 +72,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.EndStepWait(); StoreMove.EndStepWait();
return; return;
} }
try {
//当等待超过一分钟时,需要打印提示 //当等待超过一分钟时,需要打印提示
TimeSpan span = DateTime.Now - StoreMove.LastSetpTime; TimeSpan span = DateTime.Now - StoreMove.LastSetpTime;
string NotOkMsg = ""; string NotOkMsg = "";
...@@ -119,12 +120,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -119,12 +120,12 @@ namespace OnlineStore.DeviceLibrary
} }
else if (wait.WaitType == 8) else if (wait.WaitType == 8)
{ {
IO_VALUE value = (IO_VALUE)ACServerManager.GetLimitNegativeSingle(wait.AxisInfo.DeviceName, wait.AxisInfo.GetAxisValue()); IO_VALUE value = (IO_VALUE)ACServerManager.GetLimitNegativeSingle(wait.AxisInfo);
wait.IsEnd = wait.IoValue.Equals(value); wait.IsEnd = wait.IoValue.Equals(value);
} }
else if (wait.WaitType == 9) else if (wait.WaitType == 9)
{ {
IO_VALUE value = (IO_VALUE)ACServerManager.GetLimitPositiveSingle(wait.AxisInfo.DeviceName, wait.AxisInfo.GetAxisValue()); IO_VALUE value = (IO_VALUE)ACServerManager.GetLimitPositiveSingle(wait.AxisInfo);
wait.IsEnd = wait.IoValue.Equals(value); wait.IsEnd = wait.IoValue.Equals(value);
} }
else if (wait.WaitType == 10) else if (wait.WaitType == 10)
...@@ -176,6 +177,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -176,6 +177,11 @@ namespace OnlineStore.DeviceLibrary
StoreManager.Store.Alarm(StoreAlarmType.IoSingleTimeOut, "", WarnMsg, StoreMove.MoveType); StoreManager.Store.Alarm(StoreAlarmType.IoSingleTimeOut, "", WarnMsg, StoreMove.MoveType);
} }
} }
catch (Exception ex)
{
LogUtil.error(Name + "CheckWait出错:" + ex.StackTrace);
}
}
/// <summary> /// <summary>
/// 判断AC伺服电机轴是否运动完成 /// 判断AC伺服电机轴是否运动完成
/// </summary> /// </summary>
...@@ -218,16 +224,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -218,16 +224,16 @@ namespace OnlineStore.DeviceLibrary
{ {
wait.IsEnd = ACAxisMoveIsEnd(wait.AxisInfo, wait.TargetPosition, wait.TargetSpeed, out msg); wait.IsEnd = ACAxisMoveIsEnd(wait.AxisInfo, wait.TargetPosition, wait.TargetSpeed, out msg);
} }
if (!wait.IsEnd) //if (!wait.IsEnd)
{ //{
IO_VALUE value = (IO_VALUE)ACServerManager.GetHomeSingle(wait.AxisInfo.DeviceName, wait.AxisInfo.GetAxisValue()); // IO_VALUE value = (IO_VALUE)ACServerManager.GetLimitNegativeSingle(wait.AxisInfo);
if (value.Equals(IO_VALUE.HIGH)) // if (value.Equals(IO_VALUE.HIGH))
{ // {
ACServerManager.SuddenStop(wait.AxisInfo.DeviceName, wait.AxisInfo.GetAxisValue()); // ACServerManager.SuddenStop(wait.AxisInfo.DeviceName, wait.AxisInfo.GetAxisValue());
LogUtil.error(Name + wait.ToStr() + "原点返回过程中到达 负限位,直接停止运动"); // LogUtil.error(Name + wait.ToStr() + "原点返回过程中到达 负限位,直接停止运动");
StoreManager.Store.Alarm(StoreAlarmType.AxisMoveError, StoreManager.Store.GetAlarmCodeByAxis(wait.AxisInfo).ToString(), WarnMsg, StoreMove.MoveType); // StoreManager.Store.Alarm(StoreAlarmType.AxisMoveError, StoreManager.Store.GetAlarmCodeByAxis(wait.AxisInfo).ToString(), WarnMsg, StoreMove.MoveType);
} // }
} //}
if (!msg.Equals("")) if (!msg.Equals(""))
{ {
WarnMsg = msg; WarnMsg = msg;
...@@ -288,6 +294,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -288,6 +294,10 @@ namespace OnlineStore.DeviceLibrary
if (codeList.Count <= 0) if (codeList.Count <= 0)
{ {
codeList = CodeManager.CameraScan(); codeList = CodeManager.CameraScan();
}else if(StoreManager.Store.IsDebug)
{
codeList = new List<string>() { "NoCode"};
LogUtil.info(Name+"未扫到二维码,默认为NoCode");
} }
foreach (string str in codeList) foreach (string str in codeList)
{ {
...@@ -356,6 +366,31 @@ namespace OnlineStore.DeviceLibrary ...@@ -356,6 +366,31 @@ namespace OnlineStore.DeviceLibrary
IsScanCode = false; IsScanCode = false;
return; return;
} }
if (StoreManager.Store.IsDebug)
{
string posId = "1#AC1_1_1_4";
LogUtil.info(Name + "调试模式,不需要连接服务器,直接模拟库位号【" + posId + "】");
string plateH = "8";
string plateW = "7";
if (StoreManager.Store.CanStarInOut())
{
LastPosId = posId;
IsScanCode = false;
InOutStoreParam param = new InOutStoreParam(message, posId, plateH, plateW, 0);
StoreManager.Store.StartInStoreMove(param, true);
//如果当前正在出入库中,需要记录下来,等待空闲时执行
LogUtil.info(Name + " 入库调试模拟:库位号【" + posId + "】二维码【" + message + "】 开始入库!");
}
else
{
LogUtil.info(Name + " 入库调试模拟:库位号【" + posId + "】二维码【" + message + "】 正在忙碌中,无法入库!");
IsScanCode = false;
}
return;
}
// CodeMsg = "收到二维码【 " + message + "】,发送给服务器获取入库PosID"; // CodeMsg = "收到二维码【 " + message + "】,发送给服务器获取入库PosID";
LogUtil.info(Name + "收到二维码【 " + message + "】,发送给服务器获取入库PosID"); LogUtil.info(Name + "收到二维码【 " + message + "】,发送给服务器获取入库PosID");
//发送扫码内容到服务器进行入库操作 //发送扫码内容到服务器进行入库操作
......
...@@ -371,7 +371,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -371,7 +371,6 @@ namespace OnlineStore.DeviceLibrary
short axisNo = moveAxis.GetAxisValue(); short axisNo = moveAxis.GetAxisValue();
//如果是进出轴,并且光栅被遮挡,直接返回false //如果是进出轴,并且光栅被遮挡,直接返回false
if (NeedCheckSafetyLight.Equals(2)) if (NeedCheckSafetyLight.Equals(2))
{ {
if (StoreMove.MoveStep.Equals(StoreMoveStep.SO_10_DeviceToDoor) || if (StoreMove.MoveStep.Equals(StoreMoveStep.SO_10_DeviceToDoor) ||
...@@ -401,7 +400,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -401,7 +400,6 @@ namespace OnlineStore.DeviceLibrary
{ {
LogUtil.error(LOGGER, moveAxis.DisplayStr + "目标位置[" + targetPosition + "]当前位置[" + outCount + LogUtil.error(LOGGER, moveAxis.DisplayStr + "目标位置[" + targetPosition + "]当前位置[" + outCount +
"],误差过大,重新开始运动,剩余[" + StoreMove.CanWhileCount + "]次"); "],误差过大,重新开始运动,剩余[" + StoreMove.CanWhileCount + "]次");
//LogUtil.error(LOGGER, StoreName + " storeMoveStep=" + StoreMove.MoveStep + moveAxis.DisplayStr + "目标位置[" + targetPosition + "]重新开始运动");
ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed); ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed);
StoreMove.CanWhileCount--; StoreMove.CanWhileCount--;
return false; return false;
......
...@@ -243,20 +243,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -243,20 +243,20 @@ namespace OnlineStore.DeviceLibrary
// wait.IsEnd = false; // wait.IsEnd = false;
// return wait; // return wait;
//} //}
/// <summary> ///// <summary>
///8= 等待轴的反限位为指定值 /////8= 等待轴的反限位为指定值
/// </summary> ///// </summary>
public static WaitResultInfo WaitAxistNegativeLimit(ConfigMoveAxis moveAxis ,IO_VALUE ioValue) //public static WaitResultInfo WaitAxistNegativeLimit(ConfigMoveAxis moveAxis ,IO_VALUE ioValue)
{ //{
WaitResultInfo wait = new WaitResultInfo(); // WaitResultInfo wait = new WaitResultInfo();
wait.CanWhileMoveCount = 0; // wait.CanWhileMoveCount = 0;
wait.WaitType = 8; // wait.WaitType = 8;
wait.AxisInfo = moveAxis; // wait.AxisInfo = moveAxis;
wait.IsHomeMove = true; // wait.IsHomeMove = true;
wait.IoValue = ioValue; // wait.IoValue = ioValue;
wait.IsEnd = false; // wait.IsEnd = false;
return wait; // return wait;
} //}
/// <summary> /// <summary>
///9= 等待轴的正限位为指定值 ///9= 等待轴的正限位为指定值
/// </summary> /// </summary>
......
...@@ -150,11 +150,11 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -150,11 +150,11 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary> /// <summary>
/// 门锁气缸打开端 Door_Open X13 DI-13 /// 门锁气缸打开端 Door_Open X13 DI-13
/// </summary> /// </summary>
public static string BatchDoor_Open = "Door_Open"; public static string BatchDoor_Open = "BatchDoor_Open";
/// <summary> /// <summary>
/// 门锁气缸关闭端 Door_Close X14 DI-14 /// 门锁气缸关闭端 Door_Close X14 DI-14
/// </summary> /// </summary>
public static string BatchDoor_Close = "Door_Close"; public static string BatchDoor_Close = "BatchDoor_Close";
/// <summary> /// <summary>
/// 料盘检测2(料叉机构) TrayCheck_Fixture X15 DI-15 /// 料盘检测2(料叉机构) TrayCheck_Fixture X15 DI-15
/// </summary> /// </summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!