Commit 3de72ecd renym1968

自动进料/出料处理Demo 版

1 个父辈 898b84e1
...@@ -204,14 +204,25 @@ ...@@ -204,14 +204,25 @@
this.label25 = new System.Windows.Forms.Label(); this.label25 = new System.Windows.Forms.Label();
this.comboBoxPortName = new System.Windows.Forms.ComboBox(); this.comboBoxPortName = new System.Windows.Forms.ComboBox();
this.groupBoxChuck = new System.Windows.Forms.GroupBox(); this.groupBoxChuck = new System.Windows.Forms.GroupBox();
this.button6 = new System.Windows.Forms.Button(); this.btnChargingOutOpenDoor = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button(); this.label20 = new System.Windows.Forms.Label();
this.btnChargingP0 = new System.Windows.Forms.Button(); this.label22 = new System.Windows.Forms.Label();
this.btnChargingUp = new System.Windows.Forms.Button(); this.label23 = new System.Windows.Forms.Label();
this.txtStart = new System.Windows.Forms.TextBox(); this.txtPot = new System.Windows.Forms.TextBox();
this.txtEnd = new System.Windows.Forms.TextBox(); this.btnReadPot = new System.Windows.Forms.Button();
this.txtHeight = new System.Windows.Forms.TextBox(); this.label24 = new System.Windows.Forms.Label();
this.txtNot = new System.Windows.Forms.TextBox();
this.btnReadNot = new System.Windows.Forms.Button();
this.btnChargingOut = new System.Windows.Forms.Button();
this.btnChargingIn = new System.Windows.Forms.Button();
this.btnChargingDown = new System.Windows.Forms.Button(); this.btnChargingDown = new System.Windows.Forms.Button();
this.txtHeight = new System.Windows.Forms.TextBox();
this.txtEnd = new System.Windows.Forms.TextBox();
this.txtStart = new System.Windows.Forms.TextBox();
this.btnChargingUp = new System.Windows.Forms.Button();
this.btnChargingP0 = new System.Windows.Forms.Button();
this.btnCloseLock = new System.Windows.Forms.Button();
this.btnOpenLock = new System.Windows.Forms.Button();
this.groupBox5.SuspendLayout(); this.groupBox5.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
...@@ -770,7 +781,7 @@ ...@@ -770,7 +781,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(7, 525); this.richTextBox1.Location = new System.Drawing.Point(7, 525);
this.richTextBox1.Name = "richTextBox1"; this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(496, 429); this.richTextBox1.Size = new System.Drawing.Size(496, 450);
this.richTextBox1.TabIndex = 256; this.richTextBox1.TabIndex = 256;
this.richTextBox1.Text = ""; this.richTextBox1.Text = "";
// //
...@@ -1756,55 +1767,55 @@ ...@@ -1756,55 +1767,55 @@
// 启动ToolStripMenuItem // 启动ToolStripMenuItem
// //
this.启动ToolStripMenuItem.Name = "启动ToolStripMenuItem"; this.启动ToolStripMenuItem.Name = "启动ToolStripMenuItem";
this.启动ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.启动ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.启动ToolStripMenuItem.Text = "启动"; this.启动ToolStripMenuItem.Text = "启动";
this.启动ToolStripMenuItem.Click += new System.EventHandler(this.启动ToolStripMenuItem_Click); this.启动ToolStripMenuItem.Click += new System.EventHandler(this.启动ToolStripMenuItem_Click);
// //
// toolStripSeparator1 // toolStripSeparator1
// //
this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator1.Size = new System.Drawing.Size(141, 6);
// //
// 停止ToolStripMenuItem // 停止ToolStripMenuItem
// //
this.停止ToolStripMenuItem.Name = "停止ToolStripMenuItem"; this.停止ToolStripMenuItem.Name = "停止ToolStripMenuItem";
this.停止ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.停止ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.停止ToolStripMenuItem.Text = "停止"; this.停止ToolStripMenuItem.Text = "停止";
this.停止ToolStripMenuItem.Click += new System.EventHandler(this.停止ToolStripMenuItem_Click); this.停止ToolStripMenuItem.Click += new System.EventHandler(this.停止ToolStripMenuItem_Click);
// //
// toolStripSeparator2 // toolStripSeparator2
// //
this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator2.Size = new System.Drawing.Size(141, 6);
// //
// 复位ToolStripMenuItem // 复位ToolStripMenuItem
// //
this.复位ToolStripMenuItem.Name = "复位ToolStripMenuItem"; this.复位ToolStripMenuItem.Name = "复位ToolStripMenuItem";
this.复位ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.复位ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.复位ToolStripMenuItem.Text = "复位"; this.复位ToolStripMenuItem.Text = "复位";
this.复位ToolStripMenuItem.Click += new System.EventHandler(this.复位ToolStripMenuItem_Click); this.复位ToolStripMenuItem.Click += new System.EventHandler(this.复位ToolStripMenuItem_Click);
// //
// toolStripSeparator3 // toolStripSeparator3
// //
this.toolStripSeparator3.Name = "toolStripSeparator3"; this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator3.Size = new System.Drawing.Size(141, 6);
// //
// 回待机点ToolStripMenuItem // 回待机点ToolStripMenuItem
// //
this.回待机点ToolStripMenuItem.Name = "回待机点ToolStripMenuItem"; this.回待机点ToolStripMenuItem.Name = "回待机点ToolStripMenuItem";
this.回待机点ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.回待机点ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.回待机点ToolStripMenuItem.Text = "回待机点"; this.回待机点ToolStripMenuItem.Text = "回待机点";
this.回待机点ToolStripMenuItem.Click += new System.EventHandler(this.回待机点ToolStripMenuItem_Click); this.回待机点ToolStripMenuItem.Click += new System.EventHandler(this.回待机点ToolStripMenuItem_Click);
// //
// toolStripSeparator4 // toolStripSeparator4
// //
this.toolStripSeparator4.Name = "toolStripSeparator4"; this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator4.Size = new System.Drawing.Size(141, 6);
// //
// 退出ToolStripMenuItem // 退出ToolStripMenuItem
// //
this.退出ToolStripMenuItem.Name = "退出ToolStripMenuItem"; this.退出ToolStripMenuItem.Name = "退出ToolStripMenuItem";
this.退出ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.退出ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.退出ToolStripMenuItem.Text = "退出系统"; this.退出ToolStripMenuItem.Text = "退出系统";
this.退出ToolStripMenuItem.Click += new System.EventHandler(this.退出ToolStripMenuItem_Click); this.退出ToolStripMenuItem.Click += new System.EventHandler(this.退出ToolStripMenuItem_Click);
// //
...@@ -1912,38 +1923,38 @@ ...@@ -1912,38 +1923,38 @@
// 轴卡点动ToolStripMenuItem // 轴卡点动ToolStripMenuItem
// //
this.轴卡点动ToolStripMenuItem.Name = "轴卡点动ToolStripMenuItem"; this.轴卡点动ToolStripMenuItem.Name = "轴卡点动ToolStripMenuItem";
this.轴卡点动ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.轴卡点动ToolStripMenuItem.Size = new System.Drawing.Size(160, 26);
this.轴卡点动ToolStripMenuItem.Text = "轴卡点动"; this.轴卡点动ToolStripMenuItem.Text = "轴卡点动";
this.轴卡点动ToolStripMenuItem.Click += new System.EventHandler(this.轴卡点动ToolStripMenuItem_Click); this.轴卡点动ToolStripMenuItem.Click += new System.EventHandler(this.轴卡点动ToolStripMenuItem_Click);
// //
// toolStripSeparator9 // toolStripSeparator9
// //
this.toolStripSeparator9.Name = "toolStripSeparator9"; this.toolStripSeparator9.Name = "toolStripSeparator9";
this.toolStripSeparator9.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator9.Size = new System.Drawing.Size(157, 6);
// //
// 扫码测试ToolStripMenuItem // 扫码测试ToolStripMenuItem
// //
this.扫码测试ToolStripMenuItem.Name = "扫码测试ToolStripMenuItem"; this.扫码测试ToolStripMenuItem.Name = "扫码测试ToolStripMenuItem";
this.扫码测试ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.扫码测试ToolStripMenuItem.Size = new System.Drawing.Size(160, 26);
this.扫码测试ToolStripMenuItem.Text = "扫码测试"; this.扫码测试ToolStripMenuItem.Text = "扫码测试";
this.扫码测试ToolStripMenuItem.Click += new System.EventHandler(this.扫码测试ToolStripMenuItem_Click); this.扫码测试ToolStripMenuItem.Click += new System.EventHandler(this.扫码测试ToolStripMenuItem_Click);
// //
// toolStripSeparator10 // toolStripSeparator10
// //
this.toolStripSeparator10.Name = "toolStripSeparator10"; this.toolStripSeparator10.Name = "toolStripSeparator10";
this.toolStripSeparator10.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator10.Size = new System.Drawing.Size(157, 6);
// //
// 摄像机调试ToolStripMenuItem // 摄像机调试ToolStripMenuItem
// //
this.摄像机调试ToolStripMenuItem.Name = "摄像机调试ToolStripMenuItem"; this.摄像机调试ToolStripMenuItem.Name = "摄像机调试ToolStripMenuItem";
this.摄像机调试ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.摄像机调试ToolStripMenuItem.Size = new System.Drawing.Size(160, 26);
this.摄像机调试ToolStripMenuItem.Text = "二维码学习"; this.摄像机调试ToolStripMenuItem.Text = "二维码学习";
this.摄像机调试ToolStripMenuItem.Click += new System.EventHandler(this.摄像机调试ToolStripMenuItem_Click); this.摄像机调试ToolStripMenuItem.Click += new System.EventHandler(this.摄像机调试ToolStripMenuItem_Click);
// //
// toolStripSeparator11 // toolStripSeparator11
// //
this.toolStripSeparator11.Name = "toolStripSeparator11"; this.toolStripSeparator11.Name = "toolStripSeparator11";
this.toolStripSeparator11.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator11.Size = new System.Drawing.Size(157, 6);
// //
// 配置信息ToolStripMenuItem // 配置信息ToolStripMenuItem
// //
...@@ -1957,7 +1968,7 @@ ...@@ -1957,7 +1968,7 @@
// 轴运动配置ToolStripMenuItem // 轴运动配置ToolStripMenuItem
// //
this.轴运动配置ToolStripMenuItem.Name = "轴运动配置ToolStripMenuItem"; this.轴运动配置ToolStripMenuItem.Name = "轴运动配置ToolStripMenuItem";
this.轴运动配置ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.轴运动配置ToolStripMenuItem.Size = new System.Drawing.Size(160, 26);
this.轴运动配置ToolStripMenuItem.Text = "轴运动配置"; this.轴运动配置ToolStripMenuItem.Text = "轴运动配置";
this.轴运动配置ToolStripMenuItem.Click += new System.EventHandler(this.轴运动配置ToolStripMenuItem_Click); this.轴运动配置ToolStripMenuItem.Click += new System.EventHandler(this.轴运动配置ToolStripMenuItem_Click);
// //
...@@ -1974,19 +1985,19 @@ ...@@ -1974,19 +1985,19 @@
// 开启DEBUGToolStripMenuItem // 开启DEBUGToolStripMenuItem
// //
this.开启DEBUGToolStripMenuItem.Name = "开启DEBUGToolStripMenuItem"; this.开启DEBUGToolStripMenuItem.Name = "开启DEBUGToolStripMenuItem";
this.开启DEBUGToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.开启DEBUGToolStripMenuItem.Size = new System.Drawing.Size(167, 26);
this.开启DEBUGToolStripMenuItem.Text = "开启DEBUG"; this.开启DEBUGToolStripMenuItem.Text = "开启DEBUG";
this.开启DEBUGToolStripMenuItem.Click += new System.EventHandler(this.开启DEBUGToolStripMenuItem_Click); this.开启DEBUGToolStripMenuItem.Click += new System.EventHandler(this.开启DEBUGToolStripMenuItem_Click);
// //
// toolStripSeparator12 // toolStripSeparator12
// //
this.toolStripSeparator12.Name = "toolStripSeparator12"; this.toolStripSeparator12.Name = "toolStripSeparator12";
this.toolStripSeparator12.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator12.Size = new System.Drawing.Size(164, 6);
// //
// 清理日志ToolStripMenuItem // 清理日志ToolStripMenuItem
// //
this.清理日志ToolStripMenuItem.Name = "清理日志ToolStripMenuItem"; this.清理日志ToolStripMenuItem.Name = "清理日志ToolStripMenuItem";
this.清理日志ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.清理日志ToolStripMenuItem.Size = new System.Drawing.Size(167, 26);
this.清理日志ToolStripMenuItem.Text = "清理日志"; this.清理日志ToolStripMenuItem.Text = "清理日志";
this.清理日志ToolStripMenuItem.Click += new System.EventHandler(this.清理日志ToolStripMenuItem_Click); this.清理日志ToolStripMenuItem.Click += new System.EventHandler(this.清理日志ToolStripMenuItem_Click);
// //
...@@ -2282,47 +2293,166 @@ ...@@ -2282,47 +2293,166 @@
// //
this.groupBoxChuck.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.groupBoxChuck.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxChuck.Controls.Add(this.btnChargingOutOpenDoor);
this.groupBoxChuck.Controls.Add(this.label20);
this.groupBoxChuck.Controls.Add(this.label22);
this.groupBoxChuck.Controls.Add(this.label23);
this.groupBoxChuck.Controls.Add(this.txtPot);
this.groupBoxChuck.Controls.Add(this.btnReadPot);
this.groupBoxChuck.Controls.Add(this.label24);
this.groupBoxChuck.Controls.Add(this.txtNot);
this.groupBoxChuck.Controls.Add(this.btnReadNot);
this.groupBoxChuck.Controls.Add(this.btnChargingOut);
this.groupBoxChuck.Controls.Add(this.btnChargingIn);
this.groupBoxChuck.Controls.Add(this.btnChargingDown); this.groupBoxChuck.Controls.Add(this.btnChargingDown);
this.groupBoxChuck.Controls.Add(this.txtHeight); this.groupBoxChuck.Controls.Add(this.txtHeight);
this.groupBoxChuck.Controls.Add(this.txtEnd); this.groupBoxChuck.Controls.Add(this.txtEnd);
this.groupBoxChuck.Controls.Add(this.txtStart); this.groupBoxChuck.Controls.Add(this.txtStart);
this.groupBoxChuck.Controls.Add(this.btnChargingUp); this.groupBoxChuck.Controls.Add(this.btnChargingUp);
this.groupBoxChuck.Controls.Add(this.btnChargingP0); this.groupBoxChuck.Controls.Add(this.btnChargingP0);
this.groupBoxChuck.Controls.Add(this.button6); this.groupBoxChuck.Controls.Add(this.btnCloseLock);
this.groupBoxChuck.Controls.Add(this.button5); this.groupBoxChuck.Controls.Add(this.btnOpenLock);
this.groupBoxChuck.Location = new System.Drawing.Point(510, 737); this.groupBoxChuck.Location = new System.Drawing.Point(510, 737);
this.groupBoxChuck.Name = "groupBoxChuck"; this.groupBoxChuck.Name = "groupBoxChuck";
this.groupBoxChuck.Size = new System.Drawing.Size(512, 149); this.groupBoxChuck.Size = new System.Drawing.Size(512, 221);
this.groupBoxChuck.TabIndex = 273; this.groupBoxChuck.TabIndex = 273;
this.groupBoxChuck.TabStop = false; this.groupBoxChuck.TabStop = false;
this.groupBoxChuck.Text = "自动上料/吸盘操作"; this.groupBoxChuck.Text = "自动上料/吸盘操作";
// //
// button6 // btnChargingOutOpenDoor
//
this.btnChargingOutOpenDoor.Location = new System.Drawing.Point(249, 103);
this.btnChargingOutOpenDoor.Name = "btnChargingOutOpenDoor";
this.btnChargingOutOpenDoor.Size = new System.Drawing.Size(105, 33);
this.btnChargingOutOpenDoor.TabIndex = 303;
this.btnChargingOutOpenDoor.Text = "开门出料";
this.btnChargingOutOpenDoor.UseVisualStyleBackColor = true;
this.btnChargingOutOpenDoor.Click += new System.EventHandler(this.btnChargingOutOpenDoor_Click);
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(123, 191);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(100, 20);
this.label20.TabIndex = 302;
this.label20.Text = "1=On,0=Off";
//
// label22
//
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(123, 158);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(100, 20);
this.label22.TabIndex = 301;
this.label22.Text = "1=On,0=Off";
//
// label23
//
this.label23.AutoSize = true;
this.label23.Location = new System.Drawing.Point(13, 189);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(79, 20);
this.label23.TabIndex = 300;
this.label23.Text = "正向状态:";
//
// txtPot
//
this.txtPot.Enabled = false;
this.txtPot.Location = new System.Drawing.Point(92, 186);
this.txtPot.Name = "txtPot";
this.txtPot.Size = new System.Drawing.Size(25, 26);
this.txtPot.TabIndex = 299;
//
// btnReadPot
//
this.btnReadPot.Location = new System.Drawing.Point(249, 180);
this.btnReadPot.Name = "btnReadPot";
this.btnReadPot.Size = new System.Drawing.Size(105, 33);
this.btnReadPot.TabIndex = 298;
this.btnReadPot.Text = "读正方向禁止";
this.btnReadPot.UseVisualStyleBackColor = true;
this.btnReadPot.Click += new System.EventHandler(this.btnReadPot_Click);
//
// label24
//
this.label24.AutoSize = true;
this.label24.Location = new System.Drawing.Point(20, 158);
this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(79, 20);
this.label24.TabIndex = 297;
this.label24.Text = "负向状态:";
//
// txtNot
//
this.txtNot.Enabled = false;
this.txtNot.Location = new System.Drawing.Point(92, 155);
this.txtNot.Name = "txtNot";
this.txtNot.Size = new System.Drawing.Size(25, 26);
this.txtNot.TabIndex = 296;
//
// btnReadNot
//
this.btnReadNot.Location = new System.Drawing.Point(249, 147);
this.btnReadNot.Name = "btnReadNot";
this.btnReadNot.Size = new System.Drawing.Size(105, 33);
this.btnReadNot.TabIndex = 295;
this.btnReadNot.Text = "读负方向禁止输入";
this.btnReadNot.UseVisualStyleBackColor = true;
this.btnReadNot.Click += new System.EventHandler(this.btnReadNot_Click);
//
// btnChargingOut
//
this.btnChargingOut.Location = new System.Drawing.Point(247, 63);
this.btnChargingOut.Name = "btnChargingOut";
this.btnChargingOut.Size = new System.Drawing.Size(105, 33);
this.btnChargingOut.TabIndex = 24;
this.btnChargingOut.Text = "出料运行";
this.btnChargingOut.UseVisualStyleBackColor = true;
this.btnChargingOut.Click += new System.EventHandler(this.btnChargingOut_Click);
//
// btnChargingIn
//
this.btnChargingIn.Location = new System.Drawing.Point(247, 25);
this.btnChargingIn.Name = "btnChargingIn";
this.btnChargingIn.Size = new System.Drawing.Size(105, 33);
this.btnChargingIn.TabIndex = 23;
this.btnChargingIn.Text = "进料运行";
this.btnChargingIn.UseVisualStyleBackColor = true;
this.btnChargingIn.Click += new System.EventHandler(this.btnChargingIn_Click);
// //
this.button6.Location = new System.Drawing.Point(12, 64); // btnChargingDown
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(105, 33);
this.button6.TabIndex = 16;
this.button6.Text = "门锁关闭";
this.button6.UseVisualStyleBackColor = true;
// //
// button5 this.btnChargingDown.Location = new System.Drawing.Point(127, 103);
this.btnChargingDown.Name = "btnChargingDown";
this.btnChargingDown.Size = new System.Drawing.Size(105, 33);
this.btnChargingDown.TabIndex = 22;
this.btnChargingDown.Text = "进料轴下移";
this.btnChargingDown.UseVisualStyleBackColor = true;
// //
this.button5.Location = new System.Drawing.Point(12, 25); // txtHeight
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(105, 33);
this.button5.TabIndex = 15;
this.button5.Text = "门锁打开";
this.button5.UseVisualStyleBackColor = true;
// //
// btnChargingP0 this.txtHeight.Location = new System.Drawing.Point(391, 186);
this.txtHeight.Name = "txtHeight";
this.txtHeight.Size = new System.Drawing.Size(100, 26);
this.txtHeight.TabIndex = 21;
this.txtHeight.Text = "0";
// //
this.btnChargingP0.Location = new System.Drawing.Point(127, 25); // txtEnd
this.btnChargingP0.Name = "btnChargingP0"; //
this.btnChargingP0.Size = new System.Drawing.Size(105, 33); this.txtEnd.Location = new System.Drawing.Point(391, 154);
this.btnChargingP0.TabIndex = 17; this.txtEnd.Name = "txtEnd";
this.btnChargingP0.Text = "进料轴待机点"; this.txtEnd.Size = new System.Drawing.Size(100, 26);
this.btnChargingP0.UseVisualStyleBackColor = true; this.txtEnd.TabIndex = 20;
this.txtEnd.Text = "0";
//
// txtStart
//
this.txtStart.Location = new System.Drawing.Point(391, 119);
this.txtStart.Name = "txtStart";
this.txtStart.Size = new System.Drawing.Size(100, 26);
this.txtStart.TabIndex = 19;
this.txtStart.Text = "0";
// //
// btnChargingUp // btnChargingUp
// //
...@@ -2333,44 +2463,38 @@ ...@@ -2333,44 +2463,38 @@
this.btnChargingUp.Text = "进料轴上移"; this.btnChargingUp.Text = "进料轴上移";
this.btnChargingUp.UseVisualStyleBackColor = true; this.btnChargingUp.UseVisualStyleBackColor = true;
// //
// txtStart // btnChargingP0
//
this.txtStart.Location = new System.Drawing.Point(371, 28);
this.txtStart.Name = "txtStart";
this.txtStart.Size = new System.Drawing.Size(100, 26);
this.txtStart.TabIndex = 19;
this.txtStart.Text = "0";
//
// txtEnd
// //
this.txtEnd.Location = new System.Drawing.Point(371, 63); this.btnChargingP0.Location = new System.Drawing.Point(127, 25);
this.txtEnd.Name = "txtEnd"; this.btnChargingP0.Name = "btnChargingP0";
this.txtEnd.Size = new System.Drawing.Size(100, 26); this.btnChargingP0.Size = new System.Drawing.Size(105, 33);
this.txtEnd.TabIndex = 20; this.btnChargingP0.TabIndex = 17;
this.txtEnd.Text = "0"; this.btnChargingP0.Text = "进料轴待机点";
this.btnChargingP0.UseVisualStyleBackColor = true;
// //
// txtHeight // btnCloseLock
// //
this.txtHeight.Location = new System.Drawing.Point(371, 95); this.btnCloseLock.Location = new System.Drawing.Point(12, 64);
this.txtHeight.Name = "txtHeight"; this.btnCloseLock.Name = "btnCloseLock";
this.txtHeight.Size = new System.Drawing.Size(100, 26); this.btnCloseLock.Size = new System.Drawing.Size(105, 33);
this.txtHeight.TabIndex = 21; this.btnCloseLock.TabIndex = 16;
this.txtHeight.Text = "0"; this.btnCloseLock.Text = "门锁关闭";
this.btnCloseLock.UseVisualStyleBackColor = true;
// //
// btnChargingDown // btnOpenLock
// //
this.btnChargingDown.Location = new System.Drawing.Point(127, 103); this.btnOpenLock.Location = new System.Drawing.Point(12, 25);
this.btnChargingDown.Name = "btnChargingDown"; this.btnOpenLock.Name = "btnOpenLock";
this.btnChargingDown.Size = new System.Drawing.Size(105, 33); this.btnOpenLock.Size = new System.Drawing.Size(105, 33);
this.btnChargingDown.TabIndex = 22; this.btnOpenLock.TabIndex = 15;
this.btnChargingDown.Text = "进料轴下移"; this.btnOpenLock.Text = "门锁打开";
this.btnChargingDown.UseVisualStyleBackColor = true; this.btnOpenLock.UseVisualStyleBackColor = true;
// //
// 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(1029, 949); this.ClientSize = new System.Drawing.Size(1029, 970);
this.Controls.Add(this.groupBoxChuck); this.Controls.Add(this.groupBoxChuck);
this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox1);
...@@ -2589,8 +2713,8 @@ ...@@ -2589,8 +2713,8 @@
private UserFromControl.IOStatusControl axis_4_Alarm; private UserFromControl.IOStatusControl axis_4_Alarm;
private System.Windows.Forms.Label lblCharging; private System.Windows.Forms.Label lblCharging;
private System.Windows.Forms.GroupBox groupBoxChuck; private System.Windows.Forms.GroupBox groupBoxChuck;
private System.Windows.Forms.Button button6; private System.Windows.Forms.Button btnCloseLock;
private System.Windows.Forms.Button button5; private System.Windows.Forms.Button btnOpenLock;
private System.Windows.Forms.ToolStripMenuItem 打开门锁ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 打开门锁ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 关闭门锁ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 关闭门锁ToolStripMenuItem;
private System.Windows.Forms.TextBox txtHeight; private System.Windows.Forms.TextBox txtHeight;
...@@ -2599,6 +2723,17 @@ ...@@ -2599,6 +2723,17 @@
private System.Windows.Forms.Button btnChargingUp; private System.Windows.Forms.Button btnChargingUp;
private System.Windows.Forms.Button btnChargingP0; private System.Windows.Forms.Button btnChargingP0;
private System.Windows.Forms.Button btnChargingDown; private System.Windows.Forms.Button btnChargingDown;
private System.Windows.Forms.Button btnChargingOut;
private System.Windows.Forms.Button btnChargingIn;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.Label label23;
private System.Windows.Forms.TextBox txtPot;
private System.Windows.Forms.Button btnReadPot;
private System.Windows.Forms.Label label24;
private System.Windows.Forms.TextBox txtNot;
private System.Windows.Forms.Button btnReadNot;
private System.Windows.Forms.Button btnChargingOutOpenDoor;
} }
} }
...@@ -119,7 +119,7 @@ namespace OnlineStore.ACSingleStore ...@@ -119,7 +119,7 @@ namespace OnlineStore.ACSingleStore
txtInOutP2.Text = ktkPosition.InOutAxis_DoorPosition_P2.ToString(); txtInOutP2.Text = ktkPosition.InOutAxis_DoorPosition_P2.ToString();
//txtUpDownP1.Text = ktkPosition.UpDownAxis_DoorOPosition_P1.ToString(); //txtUpDownP1.Text = ktkPosition.UpDownAxis_DoorOPosition_P1.ToString();
} }
List<string> port = new List<string>(SerialPort.GetPortNames()); List<string> port = new List<string>(SerialPort.GetPortNames());
comboBoxPortName.DataSource = port; comboBoxPortName.DataSource = port;
if (port.IndexOf(store.Config.CompressAxis_PortName) >= 0) if (port.IndexOf(store.Config.CompressAxis_PortName) >= 0)
...@@ -178,14 +178,14 @@ namespace OnlineStore.ACSingleStore ...@@ -178,14 +178,14 @@ namespace OnlineStore.ACSingleStore
} }
private bool LoadOk = false; private bool LoadOk = false;
private void FrmTest_Load(object sender, EventArgs e) private void FrmTest_Load(object sender, EventArgs e)
{ {
LogUtil.logBox = this.richTextBox1; LogUtil.logBox = this.richTextBox1;
initValue(); initValue();
this.ShowInTaskbar = true; this.ShowInTaskbar = true;
this.Text = ConfigAppSettings.GetValue(Setting_Init.App_Title); this.Text = ConfigAppSettings.GetValue(Setting_Init.App_Title);
LoadOk = true; LoadOk = true;
cmbHomeType.SelectedIndex = 1; cmbHomeType.SelectedIndex = 1;
HideForm(); // HideForm();
} }
private DateTime preReadModblsTime = DateTime.Now; private DateTime preReadModblsTime = DateTime.Now;
private void timer1_Tick(object sender, EventArgs e) private void timer1_Tick(object sender, EventArgs e)
...@@ -227,7 +227,7 @@ namespace OnlineStore.ACSingleStore ...@@ -227,7 +227,7 @@ namespace OnlineStore.ACSingleStore
} }
lblThisSta.Text = store.GetRunStr(); lblThisSta.Text = store.GetRunStr();
//复位按钮状态显示 //复位按钮状态显示
if (复位ToolStripMenuItem.Enabled == false) if (复位ToolStripMenuItem.Enabled == false)
{ {
...@@ -323,6 +323,16 @@ namespace OnlineStore.ACSingleStore ...@@ -323,6 +323,16 @@ namespace OnlineStore.ACSingleStore
// btnCloseWCF.Enabled = false ; // btnCloseWCF.Enabled = false ;
//} //}
//add by renyym 2018-11-27
//进料轴处理
if (iSoftTime1 == 0)
{
ChargingInProg();
}
else
iSoftTime1--;
} }
private void ReadPosistion() private void ReadPosistion()
...@@ -332,7 +342,7 @@ namespace OnlineStore.ACSingleStore ...@@ -332,7 +342,7 @@ namespace OnlineStore.ACSingleStore
//判断私服是否打开、 //判断私服是否打开、
if (ACServerManager.ServerOnStatus(portName, SlvAddr)) if (ACServerManager.ServerOnStatus(portName, SlvAddr))
{ {
lblServerOn.Text = "伺服ON"; lblServerOn.Text = "伺服ON";
} }
else else
{ {
...@@ -453,6 +463,8 @@ namespace OnlineStore.ACSingleStore ...@@ -453,6 +463,8 @@ namespace OnlineStore.ACSingleStore
private void btnInStore_Click(object sender, EventArgs e) private void btnInStore_Click(object sender, EventArgs e)
{ {
//进料轴上料移动
// store.ChargingLoad();
if (store.storeRunStatus >= StoreRunStatus.HomeMoving) if (store.storeRunStatus >= StoreRunStatus.HomeMoving)
{ {
string selectPositionNum = cmbPosition.Text; string selectPositionNum = cmbPosition.Text;
...@@ -571,8 +583,8 @@ namespace OnlineStore.ACSingleStore ...@@ -571,8 +583,8 @@ namespace OnlineStore.ACSingleStore
return; return;
} }
} }
LogUtil.info("点击【绝对运动】,端口号【"+ portName + "】地址【" + SlvAddr + "】位置【" + position + "】速度【" + speed + "】"); LogUtil.info("点击【绝对运动】,端口号【" + portName + "】地址【" + SlvAddr + "】位置【" + position + "】速度【" + speed + "】");
ACServerManager.AbsMove(portName, SlvAddr, position, speed ); ACServerManager.AbsMove(portName, SlvAddr, position, speed);
} }
private void btnAxisVMove_Click(object sender, EventArgs e) private void btnAxisVMove_Click(object sender, EventArgs e)
{ {
...@@ -593,7 +605,7 @@ namespace OnlineStore.ACSingleStore ...@@ -593,7 +605,7 @@ namespace OnlineStore.ACSingleStore
} }
} }
LogUtil.info("点击【匀速运动】,端口号【" + portName + "】地址【" + SlvAddr + "】 速度【" + speed + "】"); LogUtil.info("点击【匀速运动】,端口号【" + portName + "】地址【" + SlvAddr + "】 速度【" + speed + "】");
ACServerManager.SpeedMove(portName, SlvAddr, speed); ACServerManager.SpeedMove(portName, SlvAddr, speed);
} }
private void btnAxisRMove_Click(object sender, EventArgs e) private void btnAxisRMove_Click(object sender, EventArgs e)
...@@ -627,7 +639,7 @@ namespace OnlineStore.ACSingleStore ...@@ -627,7 +639,7 @@ namespace OnlineStore.ACSingleStore
ACServerManager.RelMove(portName, SlvAddr, position, speed); ACServerManager.RelMove(portName, SlvAddr, position, speed);
} }
private void btnAxisStop_Click(object sender, EventArgs e) private void btnAxisStop_Click(object sender, EventArgs e)
{ {
...@@ -768,7 +780,7 @@ namespace OnlineStore.ACSingleStore ...@@ -768,7 +780,7 @@ namespace OnlineStore.ACSingleStore
{ {
InOutDefaultPosition = 3000; InOutDefaultPosition = 3000;
} }
int currValue = ACServerManager.GetActualtPosition(store.Config.InOut_Axis.DeviceName, store.Config.InOut_Axis.GetAxisValue()); int currValue = ACServerManager.GetActualtPosition(store.Config.InOut_Axis.DeviceName, store.Config.InOut_Axis.GetAxisValue());
if (currValue <= InOutDefaultPosition) if (currValue <= InOutDefaultPosition)
{ {
return true; return true;
...@@ -785,13 +797,13 @@ namespace OnlineStore.ACSingleStore ...@@ -785,13 +797,13 @@ namespace OnlineStore.ACSingleStore
} }
private void AxisABSMove(ConfigMoveAxis moveAxis, int targetPosition, int targetSpeed) private void AxisABSMove(ConfigMoveAxis moveAxis, int targetPosition, int targetSpeed)
{ {
moveAxis.TargetPosition = targetPosition; moveAxis.TargetPosition = targetPosition;
ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed); ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed);
} }
private void btnUpDownP1_Click(object sender, EventArgs e) private void btnUpDownP1_Click(object sender, EventArgs e)
{ {
if (InOutIsIsP1()) if (InOutIsIsP1())
{ {
int value = FormUtil.GetIntValue(txtUpDownP1); int value = FormUtil.GetIntValue(txtUpDownP1);
AxisABSMove(store.Config.UpDown_Axis, value, store.Config.UpDownAxis_P1_Speed); AxisABSMove(store.Config.UpDown_Axis, value, store.Config.UpDownAxis_P1_Speed);
} }
...@@ -975,7 +987,7 @@ namespace OnlineStore.ACSingleStore ...@@ -975,7 +987,7 @@ namespace OnlineStore.ACSingleStore
//{ //{
// FormManager.ShowAxisConfig(store); // FormManager.ShowAxisConfig(store);
//} //}
private void 轴卡点动ToolStripMenuItem_Click(object sender, EventArgs e) private void 轴卡点动ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
...@@ -1038,14 +1050,14 @@ namespace OnlineStore.ACSingleStore ...@@ -1038,14 +1050,14 @@ namespace OnlineStore.ACSingleStore
private void 料仓运转ONToolStripMenuItem_Click(object sender, EventArgs e) private void 料仓运转ONToolStripMenuItem_Click(object sender, EventArgs e)
{ {
this.Enabled = false; this.Enabled = false;
store.RunAxis(false ); store.RunAxis(false);
this.Enabled = true; this.Enabled = true;
LogUtil.info("料仓运转ON完成"); LogUtil.info("料仓运转ON完成");
} }
private void 扫码测试ToolStripMenuItem_Click(object sender, EventArgs e) private void 扫码测试ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
store.KNDIOMove(IO_Type.CameraLight_Power, IO_VALUE.HIGH); store.KNDIOMove(IO_Type.CameraLight_Power, IO_VALUE.HIGH);
string message = ""; string message = "";
string outMsg = ""; string outMsg = "";
//List<string> codeList = HDevelopExport.CameraScan(out outMsg); //List<string> codeList = HDevelopExport.CameraScan(out outMsg);
...@@ -1056,10 +1068,10 @@ namespace OnlineStore.ACSingleStore ...@@ -1056,10 +1068,10 @@ namespace OnlineStore.ACSingleStore
//} //}
List<string> codeList = CodeManager.CameraScan(); List<string> codeList = CodeManager.CameraScan();
foreach (string str in codeList) foreach (string str in codeList)
{ {
message = message + str + "##"; message = message + str + "##";
} }
LogUtil.info("扫码测试收到二维码【"+outMsg+"】:" + message); LogUtil.info("扫码测试收到二维码【" + outMsg + "】:" + message);
store.KNDIOMove(IO_Type.CameraLight_Power, IO_VALUE.LOW); store.KNDIOMove(IO_Type.CameraLight_Power, IO_VALUE.LOW);
} }
...@@ -1132,7 +1144,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1132,7 +1144,7 @@ namespace OnlineStore.ACSingleStore
} }
/// <summary> /// <summary>
/// 判断AC伺服电机轴是否运动完成 /// 判断AC伺服电机轴是否运动完成
/// </summary> /// </summary>
protected bool ACAxisMoveIsEnd(ConfigMoveAxis moveAxis, int targetPosition, int targetSpeed, out string msg) protected bool ACAxisMoveIsEnd(ConfigMoveAxis moveAxis, int targetPosition, int targetSpeed, out string msg)
...@@ -1160,9 +1172,9 @@ namespace OnlineStore.ACSingleStore ...@@ -1160,9 +1172,9 @@ namespace OnlineStore.ACSingleStore
else if (errorCount <= moveAxis.CanErrorCountMin) else if (errorCount <= moveAxis.CanErrorCountMin)
{ {
LogUtil.info(LOGGER, " DeviceName=" + deviceName + ",AxisNo=" + axisNo + ",targetPosition=" + targetPosition + ",当前outCount=" + outCount + LogUtil.info(LOGGER, " DeviceName=" + deviceName + ",AxisNo=" + axisNo + ",targetPosition=" + targetPosition + ",当前outCount=" + outCount +
",误差值小于最小误差【" + moveAxis.CanErrorCountMin + "】,默认轴已经停止运动"); ",误差值小于最小误差【" + moveAxis.CanErrorCountMin + "】,默认轴已经停止运动");
return true; return true;
} }
return false; return false;
} }
public bool IsInProcess = false; public bool IsInProcess = false;
...@@ -1180,7 +1192,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1180,7 +1192,7 @@ namespace OnlineStore.ACSingleStore
foreach (WaitResultInfo wait in list) foreach (WaitResultInfo wait in list)
{ {
if (wait.WaitType == 1) if (wait.WaitType == 1)
{ {
string msg = ""; string msg = "";
bool isEnd = ACAxisMoveIsEnd(wait.AxisInfo, wait.TargetPosition, wait.TargetSpeed, out msg); bool isEnd = ACAxisMoveIsEnd(wait.AxisInfo, wait.TargetPosition, wait.TargetSpeed, out msg);
if (!msg.Equals("")) if (!msg.Equals(""))
...@@ -1194,7 +1206,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1194,7 +1206,7 @@ namespace OnlineStore.ACSingleStore
isOk = false; isOk = false;
break; break;
} }
} }
} }
if (list.Count > 0 && isOk.Equals(true)) if (list.Count > 0 && isOk.Equals(true))
{ {
...@@ -1206,8 +1218,8 @@ namespace OnlineStore.ACSingleStore ...@@ -1206,8 +1218,8 @@ namespace OnlineStore.ACSingleStore
IsInProcess = false; IsInProcess = false;
} }
public List<WaitResultInfo> waitResultList = new List<WaitResultInfo>(); public List<WaitResultInfo> waitResultList = new List<WaitResultInfo>();
private int GetSlaveAddr() private int GetSlaveAddr()
{ {
return FormUtil.GetShortValue(txtAxisValue); return FormUtil.GetShortValue(txtAxisValue);
...@@ -1233,7 +1245,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1233,7 +1245,7 @@ namespace OnlineStore.ACSingleStore
return; return;
} }
} }
int speed = FormUtil.GetIntValue(txtASpeed); int speed = FormUtil.GetIntValue(txtASpeed);
LogUtil.info("点击【原点返回】,端口号【" + portName + "】地址【" + SlvAddr + "】 速度【" + speed + "】"); LogUtil.info("点击【原点返回】,端口号【" + portName + "】地址【" + SlvAddr + "】 速度【" + speed + "】");
ACServerManager.HomeMove(portName, SlvAddr, speed); ACServerManager.HomeMove(portName, SlvAddr, speed);
...@@ -1253,9 +1265,9 @@ namespace OnlineStore.ACSingleStore ...@@ -1253,9 +1265,9 @@ namespace OnlineStore.ACSingleStore
private void button1_Click_1(object sender, EventArgs e) private void button1_Click_1(object sender, EventArgs e)
{ {
int value = ACServerManager.GetBusyStatus(GetPortName(), GetSlaveAddr()); int value = ACServerManager.GetBusyStatus(GetPortName(), GetSlaveAddr());
this.txtBusyStatus.Text = value.ToString(); this.txtBusyStatus.Text = value.ToString();
} }
private void button2_Click(object sender, EventArgs e) private void button2_Click(object sender, EventArgs e)
{ {
int value = ACServerManager.GetHomeEndStatus(GetPortName(), GetSlaveAddr()); int value = ACServerManager.GetHomeEndStatus(GetPortName(), GetSlaveAddr());
...@@ -1294,9 +1306,9 @@ namespace OnlineStore.ACSingleStore ...@@ -1294,9 +1306,9 @@ namespace OnlineStore.ACSingleStore
{ {
FrmPwd fw = new FrmPwd(10); FrmPwd fw = new FrmPwd(10);
DialogResult result = fw.ShowDialog(); DialogResult result = fw.ShowDialog();
if (!result.Equals(DialogResult.OK)) if (!result.Equals(DialogResult.OK))
{ {
LogUtil.info("切换界面显示时,没有正确输入密码"); LogUtil.info("切换界面显示时,没有正确输入密码");
return; return;
} }
this.Visible = true; this.Visible = true;
...@@ -1332,7 +1344,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1332,7 +1344,7 @@ namespace OnlineStore.ACSingleStore
} }
private void toolStripMenuItem1_Click(object sender, EventArgs e) private void toolStripMenuItem1_Click(object sender, EventArgs e)
{ {
DialogResult result = MessageBox.Show("是否确定退出?", "提示", MessageBoxButtons.YesNo,MessageBoxIcon.Question); DialogResult result = MessageBox.Show("是否确定退出?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result.Equals(DialogResult.Yes)) if (result.Equals(DialogResult.Yes))
{ {
ExitApp(); ExitApp();
...@@ -1354,7 +1366,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1354,7 +1366,7 @@ namespace OnlineStore.ACSingleStore
private void 退出ToolStripMenuItem_Click(object sender, EventArgs e) private void 退出ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
DialogResult result = MessageBox.Show("是否确定退出?", "提示", MessageBoxButtons.YesNo,MessageBoxIcon.Question); DialogResult result = MessageBox.Show("是否确定退出?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result.Equals(DialogResult.Yes)) if (result.Equals(DialogResult.Yes))
{ {
ExitApp(); ExitApp();
...@@ -1364,7 +1376,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1364,7 +1376,7 @@ namespace OnlineStore.ACSingleStore
private void 摄像机调试ToolStripMenuItem_Click(object sender, EventArgs e) private void 摄像机调试ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
store.KNDIOMove(IO_Type.CameraLight_Power, IO_VALUE.HIGH); store.KNDIOMove(IO_Type.CameraLight_Power, IO_VALUE.HIGH);
CodeLibrary.FrmCodeDecode frm = new FrmCodeDecode( ); CodeLibrary.FrmCodeDecode frm = new FrmCodeDecode();
frm.ShowDialog(); frm.ShowDialog();
store.KNDIOMove(IO_Type.CameraLight_Power, IO_VALUE.LOW); store.KNDIOMove(IO_Type.CameraLight_Power, IO_VALUE.LOW);
} }
...@@ -1429,7 +1441,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1429,7 +1441,7 @@ namespace OnlineStore.ACSingleStore
{ {
int posi = FormUtil.GetIntValue(txtLinePosition); int posi = FormUtil.GetIntValue(txtLinePosition);
ShuoKeControls.RelativeMove(this.store.Config.CompressAxis_Slv, posi); ShuoKeControls.RelativeMove(this.store.Config.CompressAxis_Slv, posi);
} }
private void btnStatusSearch_Click(object sender, EventArgs e) private void btnStatusSearch_Click(object sender, EventArgs e)
{ {
ShuoKeControls.GetStatus(store.Config.CompressAxis_Slv); ShuoKeControls.GetStatus(store.Config.CompressAxis_Slv);
...@@ -1459,19 +1471,617 @@ namespace OnlineStore.ACSingleStore ...@@ -1459,19 +1471,617 @@ namespace OnlineStore.ACSingleStore
private void 打开门锁ToolStripMenuItem_Click(object sender, EventArgs e) private void 打开门锁ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
//store.KNDIOMove(IO_Type.GateLock_Open, IO_VALUE.HIGH); store.KNDIOMove(IO_Type.GateLock_Open, IO_VALUE.HIGH);
//store.KNDIOMove(IO_Type.GateLock_Close, IO_VALUE.LOW); store.KNDIOMove(IO_Type.GateLock_Close, IO_VALUE.LOW);
lblWarnMsg.Text = "门锁开始打开!";
iChargingInStatus = 21;
} }
private void 关闭门锁ToolStripMenuItem_Click(object sender, EventArgs e) private void 关闭门锁ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
//store.KNDIOMove(IO_Type.GateLock_Open, IO_VALUE.LOW); if (store.KNDIOValue(IO_Type.Load_DoorClose) == IO_VALUE.HIGH)
//store.KNDIOMove(IO_Type.GateLock_Close, IO_VALUE.HIGH); {
store.KNDIOMove(IO_Type.GateLock_Open, IO_VALUE.LOW);
store.KNDIOMove(IO_Type.GateLock_Close, IO_VALUE.HIGH);
lblWarnMsg.Text = "门锁开始关闭!";
iChargingInStatus = 22;
}
else
lblWarnMsg.Text = "上料机构门未关闭,无法关锁,请关闭上料机构门后重新开始!";
} }
private void iO状态查看ToolStripMenuItem_Click(object sender, EventArgs e) private void iO状态查看ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
} }
/// <summary>
/// /////////////////////////////////////////////////////////////////////////////////////////////////////////
/// </summary>
private bool bolChargingIn = false;
private bool bolChargingOut = false;
// private int
//public enum ChargingRunStatus
//{
// Wait = 0,
// ///// <summary>
// ///// 初始化 ,原点返回状态中,只有流水线使用
// ///// </summary>
// HomeMoving = 1,
// /// <summary>
// /// 设备正在重置中,请稍后
// /// </summary>
// In = 2,In
// /// <summary>
// /// 正常运行中,可以进行新的处理
// /// </summary>
// Out = 3,
//}
private int iChargingInStatus = 0; //=0 等待 =1 上料轴向上移动 =2 吸盘向下移动
private int iChargingOutStatus = 0;
private int iChargingPlus = 0;
private int iChargingPlusLast = 0;
private void btnChargingIn_Click(object sender, EventArgs e)
{
LoadIn();
}
private void LoadIn()
{
if (store.KNDIOValue(IO_Type.Door_Up) == IO_VALUE.LOW && store.KNDIOValue(IO_Type.Door_Down) == IO_VALUE.HIGH) //判断进料门状态,是否关闭
{
if (store.KNDIOValue(IO_Type.Load_DoorClose) == IO_VALUE.HIGH)
{
if (store.KNDIOValue(IO_Type.GateLock_Open) == IO_VALUE.LOW && store.KNDIOValue(IO_Type.GateLock_Close) == IO_VALUE.HIGH)
{
this.btnChargingIn.Enabled = false;
// IO_VALUE trayCheck = store.KNDIOValue(IO_Type.Load_OutCheck);//Load_OutCheck
if (store.KNDIOValue(IO_Type.Load_OutCheck) == IO_VALUE.LOW)
{
//上端未检测到料盘
iChargingInStatus = 1;
bolCharging = true;
//获取当前位置
iChargingPlus = ACServerManager.GetTargetPosition(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetAxisValue());
//原点位置
int value = ACServerManager.GetHomeSingle(GetPortName(), GetSlaveAddr());
// lblOutPulse4.Text = string.Format("{0:d}", lOutPulse4);
// int lCountPulse4 = ACServerManager.GetActualtPosition(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetAxisValue());
//? store.ChargingLoad();
iChargingInStatus = 2;
}
else//有料
{
iChargingInStatus = 3;
//取料、
//吸盘下移
store.KNDIOMove(IO_Type.Sucker_DownSOL, IO_VALUE.HIGH);
}
}
else
{
lblWarnMsg.Text = "门锁未关闭,请关闭门锁后重新开始";
}
}
else
lblWarnMsg.Text = "上料机构门未关闭,请关闭上料机构门后重新开始";
}
else
{
lblWarnMsg.Text = "进料门未关闭,请关闭进料门后重新开始";
}
}
private int iSoftTime1 = 0;
private bool bolBigBox = false;
private bool bolBox = false;
private int iBoxHigh = 0;
private void ChargingInProg()
{
int errorCount;
int outCount;
if (iChargingInStatus > 0)
{
switch (iChargingInStatus)
{
case 0:
break;
case 1:
ACServerManager.AbsMove(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetValue(), store.Config.ChargingAxis_MaxHigh_Position);
iChargingInStatus = 2;
break;
case 2:
if (bolChargingIn)
{
//料盘到位判断
IO_VALUE trayCheck = store.KNDIOValue(IO_Type.TrayCheck_Door);//Load_OutCheck 最高点检测
if (trayCheck == IO_VALUE.HIGH)
{
ACServerManager.SuddenStop(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetValue());
iChargingInStatus = 17; //前往 上料轴下降程序归0;
}
else
{
if (store.KNDIOValue(IO_Type.Load_OutCheck) == IO_VALUE.HIGH)
{
bolChargingIn = false;
//上料机构停止
ACServerManager.SuddenStop(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetValue());
//计算料高
iChargingPlusLast = iChargingPlus;
iChargingPlus = ACServerManager.GetTargetPosition(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetAxisValue());
iBoxHigh = iChargingPlus - iChargingPlusLast;
//料盘宽度判断
IO_VALUE trayWidth1 = store.KNDIOValue(IO_Type.TrayWidth_Check1);
IO_VALUE trayWidth2 = store.KNDIOValue(IO_Type.TrayWidth_Check2);
if (trayWidth1 == IO_VALUE.HIGH)
bolBox = true;
if (trayWidth1 == IO_VALUE.HIGH && trayWidth2 == IO_VALUE.HIGH)
bolBigBox = true;
else
bolBigBox = false;
//开灯
store.KNDIOMove(IO_Type.CameraLight_Power, IO_VALUE.HIGH);
//扫码
string message = "";
string outMsg = "";
List<string> codeList = CodeManager.CameraScan();
foreach (string str in codeList)
{
message = message + "=1+0x0-7x" + " =" + str;
}
if (!outMsg.Equals(""))
{
LogUtil.error("盘尺寸错误,清理二维码【" + message + "】");
message = "";
iChargingInStatus = 20;
}
else
iChargingInStatus = 3;
//关灯
store.KNDIOMove(IO_Type.CameraLight_Power, IO_VALUE.LOW);
}
}
}
break;
case 3:
//吸盘运动:下
store.KNDIOMove(IO_Type.Sucker_DownSOL, IO_VALUE.HIGH);
iChargingInStatus = 4;
// iSoftTime1 = 10;//?
break;
case 4:
if (store.KNDIOValue(IO_Type.Chuck_Down) == IO_VALUE.HIGH)//
{
//吸盘停止运动
store.KNDIOMove(IO_Type.Sucker_DownSOL, IO_VALUE.LOW);
//延时
iChargingInStatus = 5;
}
break;
case 5:
//吸盘吸
//if
store.KNDIOMove(IO_Type.Sucker_SuctionSOL, IO_VALUE.HIGH);
iChargingInStatus = 6;
break;
case 6:
//吸盘是否吸住判断。
// if (store.KNDIOValue(IO_Type.Chuck_PressureOK) == IO_VALUE.HIGH)//
{
////吸盘上升
store.KNDIOMove(IO_Type.Sucker_UpSOL, IO_VALUE.HIGH);
iChargingInStatus = 7;
}
break;
case 7:
//吸盘顶端位置判断
if (store.KNDIOValue(IO_Type.Chuck_Up) == IO_VALUE.HIGH)//
{
//吸盘停止运动
store.KNDIOMove(IO_Type.Sucker_UpSOL, IO_VALUE.LOW);
//延时
iChargingInStatus = 8;
}
break;
case 8:
//
//判断上/下轴是否在位?判断旋转轴是否在位
outCount = ACServerManager.GetActualtPosition(store.Config.UpDown_Axis.DeviceName, store.Config.UpDown_Axis.GetAxisValue());
errorCount = Math.Abs(outCount - store.Config.UpDownAxis_DoorOPosition_P1);
if (errorCount <= store.Config.UpDown_Axis.CanErrorCountMin)
{
outCount = ACServerManager.GetActualtPosition(store.Config.Middle_Axis.DeviceName, store.Config.Middle_Axis.GetAxisValue());
errorCount = Math.Abs(outCount- store.Config.MiddleAxis_P1_Position);
if (errorCount <= store.Config.Middle_Axis.CanErrorCountMin)
{
ACServerManager.GetActualtPosition(store.Config.Middle_Axis.DeviceName, store.Config.Middle_Axis.GetAxisValue());
//进出轴出
ACServerManager.AbsMove(store.Config.InOut_Axis.DeviceName, store.Config.InOut_Axis.GetAxisValue(), Convert.ToInt32(txtInOutP2.Text), store.Config.InOutAxis_P2_Speed);
//判断
iChargingInStatus = 9;
}
else
{
}
}
else
{
}
break;
case 9:
//判断进出轴是否到位?
outCount = ACServerManager.GetActualtPosition(store.Config.InOut_Axis.DeviceName, store.Config.InOut_Axis.GetAxisValue());
errorCount = Math.Abs(outCount - Convert.ToInt32(txtInOutP2.Text)); //store.Config.InOutAxis_P1_Position);
if (errorCount <= store.Config.InOut_Axis.CanErrorCountMin)
{
//ACServerManager.GetTargetPosition()
//吸盘放掉料盘
store.KNDIOMove(IO_Type.Sucker_SuctionSOL, IO_VALUE.LOW);
iChargingInStatus = 10;
}
break;
case 10:
if (store.Config.IsHasCompress_Axis > 0)
{
//夹紧机构,夹紧操作
}
else
iChargingInStatus = 12;
break;
case 11:
//夹紧机构,是否夹紧判断
break;
case 12:
//进出轴退回
if (store.KNDIOValue(IO_Type.Chuck_PressureOK) == IO_VALUE.LOW) //??吸盘是否放掉
{
if (store.KNDIOValue(IO_Type.TrayCheck_Fixture) == IO_VALUE.HIGH) //??//料插上有料,
{
//判断上下轴是否在位?
outCount = ACServerManager.GetActualtPosition(store.Config.UpDown_Axis.DeviceName, store.Config.UpDown_Axis.GetAxisValue());
errorCount = Math.Abs(outCount - store.Config.UpDownAxis_DoorOPosition_P1);
if (errorCount <= store.Config.UpDown_Axis.CanErrorCountMin)
{
//进出轴退回
ACServerManager.AbsMove(store.Config.InOut_Axis.DeviceName, store.Config.InOut_Axis.GetAxisValue(), store.Config.InOutAxis_P1_Position, store.Config.InOutAxis_P1_Speed);
iChargingInStatus = 13;
}
else
{
//上下轴移动
ACServerManager.AbsMove(store.Config.UpDown_Axis.DeviceName, store.Config.UpDown_Axis.GetAxisValue(), store.Config.UpDownAxis_DoorOBPosition_P7, store.Config.UpDownAxis_P7_Speed);
}
}
}
break;
case 13:
//判断进出轴是否退回?
outCount = ACServerManager.GetActualtPosition(store.Config.InOut_Axis.DeviceName, store.Config.InOut_Axis.GetAxisValue());
errorCount = Math.Abs(outCount - store.Config.InOutAxis_P1_Position);//Convert.ToInt32(txtInOutP2.Text)); //
if (errorCount <= store.Config.InOut_Axis.CanErrorCountMin)
{
//Yes:
iChargingInStatus = 1;
}
//上料轴运行
break;
case 17:
//进料轴归0;
ACServerManager.AbsMove(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetValue(), store.Config.ChargingAxis_P1_Position);
iChargingInStatus = 18;
break;
case 18:
//上料轴 0位判断
outCount = ACServerManager.GetActualtPosition(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetAxisValue());
errorCount = Math.Abs(outCount - store.Config.ChargingAxis_P1_Position);//Convert.ToInt32(txtInOutP2.Text)); //
if (errorCount <= store.Config.Charging_Axis.CanErrorCountMin)
{
ACServerManager.Stop(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetAxisValue());
//Yes:
iChargingInStatus = 0;//end
}
break;
case 20:
//挂起
break;
case 21://门锁关闭状态判断
if (store.KNDIOValue(IO_Type.GateLock_Open) == IO_VALUE.LOW && store.KNDIOValue(IO_Type.GateLock_Close) == IO_VALUE.HIGH)
{
this.lblMsg.Text = "门锁已关闭";
iChargingInStatus = 0;
}
break;
case 22://门锁打开状态判断
if (store.KNDIOValue(IO_Type.GateLock_Close) == IO_VALUE.LOW && store.KNDIOValue(IO_Type.GateLock_Open) == IO_VALUE.HIGH)
{
this.lblMsg.Text = "门锁已打开";
iChargingInStatus = 0;
}
break;
default:
break;
}
}
}
private void ChargingOutProg()
{
int errorCount;
int outCount;
switch (iChargingOutStatus)
{
case 0:
break;
case 1:
if (store.KNDIOValue(IO_Type.Load_DoorClose) == IO_VALUE.HIGH) //上料机构门是否关闭
{
ACServerManager.RelMove(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetValue(), store.Config.ChargingAxis_MaxHigh_Position);
iChargingOutStatus = 2;
}
break;
case 2:
//判断 是否检测到料盘 最高位
IO_VALUE trayCheck = store.KNDIOValue(IO_Type.TrayCheck_Door);//Load_OutCheck
if (trayCheck == IO_VALUE.HIGH)
{
ACServerManager.Stop(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetValue());
iChargingOutStatus = 3;
}
else
{
if(store.KNDIOValue(IO_Type.Load_OutCheck)==IO_VALUE.HIGH)
{
ACServerManager.Stop(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetValue());
//有料
this.lblMsg.Text = "进料轴上有料,请移除料盘后,再出料。";
}
}
break;
case 3:
//寻找仓位,获取料高
//从仓位取料盘-》P1 位;
//进出轴 出来取料仓位取料
//获取料高
iChargingOutStatus = 4;
break;
case 5:
//进出轴 出来取料
//判断 上下轴是否到位
outCount = ACServerManager.GetActualtPosition(store.Config.UpDown_Axis.DeviceName, store.Config.UpDown_Axis.GetAxisValue());
errorCount = Math.Abs(outCount - store.Config.UpDownAxis_DoorIPosition_P2);
if (errorCount <= store.Config.UpDown_Axis.CanErrorCountMin)
{
//判断旋转轴是否到位
outCount = ACServerManager.GetActualtPosition(store.Config.Middle_Axis.DeviceName, store.Config.Middle_Axis.GetAxisValue());
errorCount = Math.Abs(outCount - store.Config.MiddleAxis_P1_Position);
if (errorCount <= store.Config.Middle_Axis.CanErrorCountMin)
{
//判断进出轴是否在P1位
outCount = ACServerManager.GetActualtPosition(store.Config.InOut_Axis.DeviceName, store.Config.InOut_Axis.GetAxisValue());
errorCount = Math.Abs(outCount - store.Config.InOutAxis_P1_Position);
if (errorCount <= store.Config.InOut_Axis.CanErrorCountMin)
{
// ACServerManager.GetActualtPosition(store.Config.Middle_Axis.DeviceName, store.Config.Middle_Axis.GetAxisValue());
//进出轴出
ACServerManager.AbsMove(store.Config.InOut_Axis.DeviceName, store.Config.InOut_Axis.GetAxisValue(), Convert.ToInt32(txtInOutP2.Text), store.Config.InOutAxis_P2_Speed);
//判断
iChargingInStatus = 6;
}
else
{
//进出轴到P1位置
}
}
else
{
//旋转轴到-->p1位
}
}
else
{
//上下轴到P2位
}
//判断 旋转轴是否到位
break;
case 6:
outCount = ACServerManager.GetActualtPosition(store.Config.InOut_Axis.DeviceName, store.Config.InOut_Axis.GetAxisValue());
errorCount = Math.Abs(outCount - Convert.ToInt32(txtInOutP2.Text));
if (errorCount <= store.Config.InOut_Axis.CanErrorCountMin)
{
ACServerManager.SuddenStop(store.Config.InOut_Axis.DeviceName, store.Config.InOut_Axis.GetAxisValue());
////上下轴 下移至P1位
ACServerManager.AbsMove(store.Config.UpDown_Axis.DeviceName, store.Config.UpDown_Axis.GetAxisValue(), store.Config.UpDownAxis_DoorOPosition_P1);
iChargingOutStatus = 7;
}
break;
case 7:
//上下轴 是否到P1位判断
outCount = ACServerManager.GetActualtPosition(store.Config.UpDown_Axis.DeviceName, store.Config.UpDown_Axis.GetAxisValue());
errorCount = Math.Abs(outCount - store.Config.UpDownAxis_DoorOPosition_P1);
if (errorCount <= store.Config.UpDown_Axis.CanErrorCountMin)
{
ACServerManager.SuddenStop(store.Config.UpDown_Axis.DeviceName, store.Config.UpDown_Axis.GetAxisValue());
////上下轴 下移至P1位
ACServerManager.AbsMove(store.Config.InOut_Axis.DeviceName, store.Config.InOut_Axis.GetAxisValue(), store.Config.InOutAxis_P1_Position);
iChargingOutStatus = 8;
}
break;
case 8:// 夹紧机构 松
//判断进出轴是否退到P1;
outCount = ACServerManager.GetActualtPosition(store.Config.InOut_Axis.DeviceName, store.Config.InOut_Axis.GetAxisValue());
errorCount = Math.Abs(outCount - store.Config.InOutAxis_P1_Position);
if (errorCount <= store.Config.InOut_Axis.CanErrorCountMin)
{
//夹紧 机构松 操作
}
break;
case 9:
//判断夹紧 机构是否已松松
{
//进料轴移动下移(料高距离)
iBoxHigh = 100;
iChargingPlusLast = iChargingPlus;
ACServerManager.AbsMove(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetValue(), iBoxHigh);
iChargingOutStatus = 10;
}
break;
case 10:
outCount = ACServerManager.GetTargetPosition(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetValue());
errorCount = Math.Abs(outCount - store.Config.ChargingAxis_P1_Position);
if (errorCount <= store.Config.Charging_Axis.CanErrorCountMin)
{
ACServerManager.SuddenStop(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetValue());
iChargingOutStatus = 11;
}
else
{
//errorCount = Math.Abs(outCount - store.Config.ChargingAxis_P1_Position);
if (store.KNDIOValue(IO_Type.Load_OutCheck) == IO_VALUE.LOW)
{
ACServerManager.SuddenStop(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetValue());
iChargingOutStatus = 3;
}
}
break;
case 11:
//上料仓满了
this.bolChargingOutFinish = true;
iChargingOutStatus = 0;
break;
///---------------------------
//开门出料
case 115:
IO_VALUE value1 = store.KNDIOValue(IO_Type.Load_OutCheck);
if (value1 == IO_VALUE.HIGH)
{
//电机停止
ACServerManager.SuddenStop(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetValue());
iChargingOutStatus = 116;
}
else
{
outCount = ACServerManager.GetActualtPosition(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetValue());
errorCount = Math.Abs(outCount - store.Config.ChargingAxis_MaxHigh_Position);
if (errorCount <= store.Config.ChargingAxis_PositionMin)
{
ACServerManager.SuddenStop(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetValue());
iChargingOutStatus = 117;
}
}
break;
case 116:
IO_VALUE value2 = store.KNDIOValue(IO_Type.Load_OutCheck);
if (value2 == IO_VALUE.LOW)
{
ACServerManager.RelMove(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetValue(), store.Config.ChargingAxis_MaxHigh_Position);
iChargingOutStatus = 115;
}
break;
case 117:
//结束出料 上移, 轴下降
bolChargingOutFinish = false;
ACServerManager.RelMove(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetValue(), store.Config.ChargingAxis_P1_Position);
iChargingOutStatus = 118;
break;
case 118:
//读位置;
outCount = ACServerManager.GetActualtPosition(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetValue());
errorCount = Math.Abs(outCount - store.Config.ChargingAxis_P1_Position);
if (errorCount <= store.Config.ChargingAxis_PositionMin)
{
ACServerManager.SuddenStop(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetValue());
iChargingInStatus = 0;
}
break;
}
}
//出料操作
private void btnChargingOut_Click(object sender, EventArgs e)
{
int outCount = ACServerManager.GetActualtPosition(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetValue());
int errorCount = Math.Abs(outCount - store.Config.ChargingAxis_P1_Position);
if (errorCount <= store.Config.ChargingAxis_PositionMin) //最低位
{
if (store.KNDIOValue(IO_Type.Load_DoorClose) == IO_VALUE.HIGH) //上料机构门打开
{
ACServerManager.RelMove(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetValue(), store.Config.ChargingAxis_MaxHigh_Position,store.Config.ChargingAxis_TargetSpeed);
iChargingOutStatus = 2;
}
else
{
//关闭上料门
iChargingOutStatus = 1;
}
}
else
{
//error :不在最低位
}
}
private void btnReadNot_Click(object sender, EventArgs e)
{
int value = ACServerManager.GetNotStatus(GetPortName(), GetSlaveAddr());
this.txtNot.Text = value.ToString();
}
private void btnReadPot_Click(object sender, EventArgs e)
{
int value = ACServerManager.GetPotStatus(GetPortName(), GetSlaveAddr());
this.txtPot.Text = value.ToString();
}
private bool bolChargingOutFinish = false;
private void btnChargingOutOpenDoor_Click(object sender, EventArgs e)
{
if (bolChargingOutFinish)
{
int value = ACServerManager.GetNotStatus(GetPortName(), GetSlaveAddr());
if (value < 100) //
ACServerManager.AbsMove(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetAxisValue(), 10, store.Config.ChargingAxis_HomeLowSpeed);
}
}
} }
} }
...@@ -36,6 +36,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -36,6 +36,9 @@ namespace OnlineStore.DeviceLibrary
/// 轴报警信息 /// 轴报警信息
/// </summary> /// </summary>
private Dictionary<string , AxisAlarmInfo> AxisAlarmCodeMap = new Dictionary<string , AxisAlarmInfo>(); private Dictionary<string , AxisAlarmInfo> AxisAlarmCodeMap = new Dictionary<string , AxisAlarmInfo>();
/// <summary>
/// 是否有上料轴 add by renym 2018
/// </summary>
public bool IsHasCharging_Axis = false; public bool IsHasCharging_Axis = false;
/// <summary> /// <summary>
...@@ -146,7 +149,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -146,7 +149,7 @@ namespace OnlineStore.DeviceLibrary
moveAxisList.Add(Config.Middle_Axis); moveAxisList.Add(Config.Middle_Axis);
moveAxisList.Add(Config.UpDown_Axis); moveAxisList.Add(Config.UpDown_Axis);
moveAxisList.Add(Config.InOut_Axis); moveAxisList.Add(Config.InOut_Axis);
//2018-11-22 //2018-11-22 add by renym
moveAxisList.Add(Config.Charging_Axis); moveAxisList.Add(Config.Charging_Axis);
this.AxisAlarmCodeMap = new Dictionary<string , AxisAlarmInfo>(); this.AxisAlarmCodeMap = new Dictionary<string , AxisAlarmInfo>();
this.AxisAlarmCodeMap.Add(Config.UpDown_Axis.DeviceName, new AxisAlarmInfo()); this.AxisAlarmCodeMap.Add(Config.UpDown_Axis.DeviceName, new AxisAlarmInfo());
...@@ -348,6 +351,32 @@ namespace OnlineStore.DeviceLibrary ...@@ -348,6 +351,32 @@ namespace OnlineStore.DeviceLibrary
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(2000)); StoreMove.WaitList.Add(WaitResultInfo.WaitTime(2000));
} }
} }
///add by renym 2018-11-27
///
/// 进料轴原点复位
///
///
private void ChargingStartReset()
{
string portName = Config.Charging_Axis.DeviceName;
int slvAddr = Config.Charging_Axis.GetAxisValue();
if (ACServerManager.GetHomeEndStatus(portName, slvAddr).Equals(1)
&& ACServerManager.GetHomeSingle(portName, slvAddr).Equals(1))
{
//? StoreMove.NextMoveStep(StoreMoveStep.BOX_H_ChargingMove);//?
LogUtil.info(LOGGER, StoreName + "复位中,进料轴原点亮且已经原点返回过,先相对走-5000");
int currPos = ACServerManager.GetActualtPosition(portName, slvAddr);
int targetPos = currPos - 5000;//??
ACAxisMove(Config.Charging_Axis, targetPos, Config.ChargingAxis_HomeLowSpeed);
}
else
{
//? StoreMove.NextMoveStep(StoreMoveStep.BOX_H_ChargingBack);//?
LogUtil.info(LOGGER, StoreName + "复位中,进料轴开始原点返回");
ACAxisHomeMove(Config.Charging_Axis);
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(2000));
}
}
/// <summary> /// <summary>
/// 复位处理 /// 复位处理
/// </summary> /// </summary>
...@@ -1319,6 +1348,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -1319,6 +1348,9 @@ namespace OnlineStore.DeviceLibrary
ACServerManager.SuddenStop(Config.Middle_Axis.DeviceName, Config.Middle_Axis.GetAxisValue()); ACServerManager.SuddenStop(Config.Middle_Axis.DeviceName, Config.Middle_Axis.GetAxisValue());
ACServerManager.SuddenStop(Config.UpDown_Axis.DeviceName, Config.UpDown_Axis.GetAxisValue()); ACServerManager.SuddenStop(Config.UpDown_Axis.DeviceName, Config.UpDown_Axis.GetAxisValue());
ACServerManager.SuddenStop(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue()); ACServerManager.SuddenStop(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue());
//add by renym 2018-11-27
if(IsHasCharging_Axis)
ACServerManager.SuddenStop(Config.Charging_Axis.DeviceName, Config.Charging_Axis.GetAxisValue());
if (IsHasCompress_Axis) if (IsHasCompress_Axis)
{ {
ShuoKeControls.SuddownStop(Config.CompressAxis_Slv); ShuoKeControls.SuddownStop(Config.CompressAxis_Slv);
...@@ -1339,6 +1371,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1339,6 +1371,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(LOGGER, StoreName + "StopMove"); LogUtil.info(LOGGER, StoreName + "StopMove");
KNDIOMove(IO_Type.Door_Down, IO_VALUE.LOW); KNDIOMove(IO_Type.Door_Down, IO_VALUE.LOW);
KNDIOMove(IO_Type.Door_Up, IO_VALUE.LOW); KNDIOMove(IO_Type.Door_Up, IO_VALUE.LOW);
//?add 进料门锁
//HDevelopExport.CloseAllCamera(); //HDevelopExport.CloseAllCamera();
isInPro = false; isInPro = false;
} }
......
...@@ -776,6 +776,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -776,6 +776,7 @@ namespace OnlineStore.DeviceLibrary
} }
#endregion #endregion
#region 自动上料上料机构处理 #region 自动上料上料机构处理
private bool bolChargingRun = false;
public void ChargingLoad() public void ChargingLoad()
{ {
//1、上料门是否关闭 //1、上料门是否关闭
...@@ -786,13 +787,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -786,13 +787,17 @@ namespace OnlineStore.DeviceLibrary
//3、吸盘在最高端 //3、吸盘在最高端
if (KNDIOValue(IO_Type.Chuck_Up).Equals(IO_VALUE.HIGH)) if (KNDIOValue(IO_Type.Chuck_Up).Equals(IO_VALUE.HIGH))
{ {
//吸盘移动到最高点
} }
//if (KNDIOValue(IO_Type.Load_DoorClose).Equals(IO_VALUE.HIGH)) //if (KNDIOValue(IO_Type.Load_DoorClose).Equals(IO_VALUE.HIGH))
//通过读伺服线圈信息,判断伺服在最高位置还是在最低位置 //通过读伺服线圈信息,判断伺服在最高位置还是在最低位置
int value=ACServerManager.GetNotStatus(Config.Charging_Axis.DeviceName, Config.Charging_Axis.GetAxisValue()); int value=ACServerManager.GetNotStatus(Config.Charging_Axis.DeviceName, Config.Charging_Axis.GetAxisValue());
//4、判断上料机构是否在最高点? 是---》无料盘 TrayCheck_Door //4、判断上料机构是否在最高点? 是---》无料盘 TrayCheck_Door
//5、是否检测到料盘?检测到,不运行;检测不到伺服运行 //5、是否检测到料盘?检测到,不运行;检测不到伺服运行
//电机运动 ACAxisMove(Config.Charging_Axis, ??, Config.Charging_Axis.TargetSpeed); //电机运动 ACAxisMove(Config.Charging_Axis, ??, Config.Charging_Axis.TargetSpeed);
bolChargingRun = true;
ACAxisMove(Config.Charging_Axis,Config.ChargingAxis_PositionMin, Config.ChargingAxis_HomeLowSpeed);
} }
} }
......
...@@ -51,7 +51,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -51,7 +51,7 @@ namespace OnlineStore.DeviceLibrary
// //
/// add by renym 2018-11-26 /// add by renym 2018-11-26
/// /// <summary> /// /// <summary>
/// 轴(上料轴)报警 /// 轴(上料轴)报警
/// </summary> /// </summary>
public static int ChargingAxisAlarm = 18; public static int ChargingAxisAlarm = 18;
} }
......
...@@ -26,13 +26,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -26,13 +26,13 @@ namespace OnlineStore.DeviceLibrary
public static readonly ILog LOGGER = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); public static readonly ILog LOGGER = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public static Dictionary<int, StoreConfig> storeConfigMap = new Dictionary<int, StoreConfig>(); public static Dictionary<int, StoreConfig> storeConfigMap = new Dictionary<int, StoreConfig>();
//private static Dictionary<int, object> storeMap = new Dictionary<int, object>(); //private static Dictionary<int, object> storeMap = new Dictionary<int, object>();
private static bool isInit = false; private static bool isInit = false;
public StoreManager() public StoreManager()
{ {
} }
public static void CheckEnum(Type type) public static void CheckEnum(Type type)
{ {
if (type.IsEnum) if (type.IsEnum)
...@@ -42,7 +42,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -42,7 +42,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (valueList.Contains(item)) if (valueList.Contains(item))
{ {
LogUtil.error(LOGGER, type.Name+"枚举值:"+item +"重复存在,请检查代码!"); LogUtil.error(LOGGER, type.Name + "枚举值:" + item + "重复存在,请检查代码!");
Application.Exit(); Application.Exit();
break; break;
} }
...@@ -50,8 +50,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -50,8 +50,8 @@ namespace OnlineStore.DeviceLibrary
} }
} }
} }
public static string GetPostApi(string host) public static string GetPostApi(string host)
{ {
if (host == "") if (host == "")
...@@ -84,7 +84,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -84,7 +84,7 @@ namespace OnlineStore.DeviceLibrary
} }
return host + api_nextFeeder; return host + api_nextFeeder;
} }
public static void UpdateConfig(AC_SA_Config lineConfig) public static void UpdateConfig(AC_SA_Config lineConfig)
{ {
try try
...@@ -97,7 +97,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -97,7 +97,7 @@ namespace OnlineStore.DeviceLibrary
if (!result) if (!result)
{ {
LOGGER.Error("保存配置文件失败:" + configFile); LOGGER.Error("保存配置文件失败:" + configFile);
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -123,7 +123,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -123,7 +123,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 设备正在重置中,请稍后 /// 设备正在重置中,请稍后
/// </summary> /// </summary>
Reset = 2, Reset = 2,
/// <summary> /// <summary>
/// 正常运行中,可以进行新的处理 /// 正常运行中,可以进行新的处理
/// </summary> /// </summary>
...@@ -133,6 +133,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -133,6 +133,10 @@ namespace OnlineStore.DeviceLibrary
/// 正在忙碌中,请稍后 /// 正在忙碌中,请稍后
/// </summary> /// </summary>
Busy = 4, Busy = 4,
///
///进料轴运行
///
ChargingMoving = 5, //add by Renym 2018-11-27
} }
/// <summary> /// <summary>
...@@ -150,7 +154,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -150,7 +154,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
///2=急停中 ///2=急停中
/// </summary> /// </summary>
SuddenStop = 2, SuddenStop = 2,
/// <summary> /// <summary>
/// 3=故障中 /// 3=故障中
/// </summary> /// </summary>
...@@ -162,15 +166,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -162,15 +166,15 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 5=设备调试中 /// 5=设备调试中
/// </summary> /// </summary>
Debugging = 5, Debugging = 5,
/// <summary> /// <summary>
/// 6=入库执行中 /// 6=入库执行中
/// </summary> /// </summary>
InStoreExecute = 6, InStoreExecute = 6,
/// <summary> /// <summary>
/// 7= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态) /// 7= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态)
/// </summary> /// </summary>
InStoreEnd = 7, InStoreEnd = 7,
/// <summary> /// <summary>
/// 8=入库失败 /// 8=入库失败
/// </summary> /// </summary>
...@@ -194,7 +198,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -194,7 +198,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 重置中(原点返回和重置都发此状态) /// 重置中(原点返回和重置都发此状态)
/// </summary> /// </summary>
ResetMove=13, ResetMove = 13,
} }
/// <summary> /// <summary>
...@@ -210,17 +214,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -210,17 +214,17 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 料仓原点返回和重置步骤,,定位气缸下降 /// 料仓原点返回和重置步骤,,定位气缸下降
/// </summary> /// </summary>
BOX_H_LocationCylinderBack=010, BOX_H_LocationCylinderBack = 010,
/// <summary> /// <summary>
/// 料仓原点返回和重置步骤,轴三先相对走3000 /// 料仓原点返回和重置步骤,轴三先相对走3000
/// </summary> /// </summary>
BOX_H_InOutMove=011, BOX_H_InOutMove = 011,
/// <summary> /// <summary>
/// 料仓原点返回和重置步骤,,轴三进出轴先返回原点 /// 料仓原点返回和重置步骤,,轴三进出轴先返回原点
/// </summary> /// </summary>
BOX_H_InOutBack = 012, BOX_H_InOutBack = 012,
/// <summary> /// <summary>
/// 料仓原点返回和重置步骤,,轴三返回P1点 /// 料仓原点返回和重置步骤,,轴三返回P1点
/// </summary> /// </summary>
...@@ -236,12 +240,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -236,12 +240,12 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 旋转轴返回P1 /// 旋转轴返回P1
/// </summary> /// </summary>
BOX_H_MiddleAxisToP1=016, BOX_H_MiddleAxisToP1 = 016,
/// <summary> /// <summary>
/// 叉子先退回P1 /// 叉子先退回P1
/// </summary> /// </summary>
BOX_M_H_InOutToP1=018, BOX_M_H_InOutToP1 = 018,
/// <summary> /// <summary>
/// 旋转轴回原点 /// 旋转轴回原点
/// </summary> /// </summary>
...@@ -250,7 +254,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -250,7 +254,15 @@ namespace OnlineStore.DeviceLibrary
/// 旋转轴等待清理位置 /// 旋转轴等待清理位置
/// </summary> /// </summary>
BOX_M_H_MiddleWait = 020, BOX_M_H_MiddleWait = 020,
//add by renym 2018-11-27
/// <summary>
/// 料仓原点返回和重置步骤,轴 五先相对走3000
/// </summary>
//? BOX_H_ChargingMove = 021,
/// <summary>
/// 料仓原点返回和重置步骤,,轴五进料轴先返回原点
/// </summary>
//? BOX_H_ChargingBack = 022,
/// <summary> /// <summary>
/// 叉子走到P1 /// 叉子走到P1
/// </summary> /// </summary>
...@@ -270,7 +282,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -270,7 +282,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
///料仓出库,,定位气缸下降 ///料仓出库,,定位气缸下降
/// </summary> /// </summary>
SO_01_LocationCylinderDown=101, SO_01_LocationCylinderDown = 101,
/// <summary> /// <summary>
///料仓出库:叉子先运动到P1 ///料仓出库:叉子先运动到P1
/// </summary> /// </summary>
...@@ -330,7 +342,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -330,7 +342,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 等待拿走物品 /// 等待拿走物品
/// </summary> /// </summary>
SO_14_WaitTake=114, SO_14_WaitTake = 114,
#endregion #endregion
...@@ -338,11 +350,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -338,11 +350,11 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 入库检测 /// 入库检测
/// </summary> /// </summary>
SI_00_TrayCheck=200, SI_00_TrayCheck = 200,
/// <summary> /// <summary>
/// 入库,。定位气缸下降 /// 入库,。定位气缸下降
/// </summary> /// </summary>
SI_01_LocationCylinderDown=201, SI_01_LocationCylinderDown = 201,
/// <summary> /// <summary>
/// 入库。。进出轴(叉子)先返回P1 /// 入库。。进出轴(叉子)先返回P1
/// </summary> /// </summary>
...@@ -363,7 +375,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -363,7 +375,7 @@ namespace OnlineStore.DeviceLibrary
/// 入库。。把物品放入叉子上,轴2( 上下) 至P7( 进料口取料缓冲点),压紧物品(有压紧轴的才需要此步骤),轴4( 压紧) 至P2(压紧点) /// 入库。。把物品放入叉子上,轴2( 上下) 至P7( 进料口取料缓冲点),压紧物品(有压紧轴的才需要此步骤),轴4( 压紧) 至P2(压紧点)
/// </summary> /// </summary>
SI_06_DoorWarToDevice = 206, SI_06_DoorWarToDevice = 206,
/// <summary> /// <summary>
/// 入库。。叉子 从入料口抽出,轴3( 叉子) 至P1( 待机点) /// 入库。。叉子 从入料口抽出,轴3( 叉子) 至P1( 待机点)
/// </summary> /// </summary>
...@@ -453,7 +465,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -453,7 +465,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 阻挡气缸0-2上升 /// 阻挡气缸0-2上升
/// </summary> /// </summary>
LI_03_StopCylinder2Up = 10006, LI_03_StopCylinder2Up = 10006,
/// <summary> /// <summary>
/// 阻挡气缸0-1下降 /// 阻挡气缸0-1下降
/// </summary> /// </summary>
...@@ -517,11 +529,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -517,11 +529,11 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 等待StoreMove完成当前操作开始入库 /// 等待StoreMove完成当前操作开始入库
/// </summary> /// </summary>
MIO_08_WaitInStore=3088, MIO_08_WaitInStore = 3088,
/// <summary> /// <summary>
/// 等待StoreMove移走料盘开始放托盘通过 /// 等待StoreMove移走料盘开始放托盘通过
/// </summary> /// </summary>
MIO_09_WaitLetFixtureGo=3089, MIO_09_WaitLetFixtureGo = 3089,
#endregion #endregion
#region 移栽装置出库处理 #region 移栽装置出库处理
...@@ -573,7 +585,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -573,7 +585,7 @@ namespace OnlineStore.DeviceLibrary
/// 移栽装置出库处理。。 前后气缸1后退( Y20=0/Y21=1) /// 移栽装置出库处理。。 前后气缸1后退( Y20=0/Y21=1)
/// </summary> /// </summary>
MO_56_BeforeAfterCylinderAfter = 3156, MO_56_BeforeAfterCylinderAfter = 3156,
/// <summary> /// <summary>
/// 移载(流水线)装置出库处理,,, 上下气缸1下降(Y22=0/Y23=1) /// 移载(流水线)装置出库处理,,, 上下气缸1下降(Y22=0/Y23=1)
/// </summary> /// </summary>
...@@ -586,9 +598,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -586,9 +598,9 @@ namespace OnlineStore.DeviceLibrary
/// 移载(流水线)装置出库处理,, ,上下气缸1上升(Y22=1/Y23=0) /// 移载(流水线)装置出库处理,, ,上下气缸1上升(Y22=1/Y23=0)
/// </summary> /// </summary>
MO_60_UpDownCylinderUp = 3160, MO_60_UpDownCylinderUp = 3160,
#endregion #endregion
...@@ -602,7 +614,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -602,7 +614,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 移载装置入库处理,,等待box等待状态才能继续操作 /// 移载装置入库处理,,等待box等待状态才能继续操作
/// </summary> /// </summary>
MI_10_WaitBox=3006, MI_10_WaitBox = 3006,
/// <summary> /// <summary>
///移载装置入库处理,,编码与仓位一致,,上下气缸1下降(Y22=0/Y23=1) ///移载装置入库处理,,编码与仓位一致,,上下气缸1下降(Y22=0/Y23=1)
/// </summary> /// </summary>
...@@ -659,7 +671,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -659,7 +671,7 @@ namespace OnlineStore.DeviceLibrary
///移载装置入库处理,,,阻挡气缸1-2 上升( Y15=0),等待200毫秒 ///移载装置入库处理,,,阻挡气缸1-2 上升( Y15=0),等待200毫秒
/// </summary> /// </summary>
MI_23_StopCylinderReset = 3023, MI_23_StopCylinderReset = 3023,
#endregion #endregion
...@@ -681,11 +693,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -681,11 +693,11 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 关闭皮带 /// 关闭皮带
/// </summary> /// </summary>
LINEIN_CloseLine=20003, LINEIN_CloseLine = 20003,
/// <summary> /// <summary>
/// 等待下位机要料信号 /// 等待下位机要料信号
/// </summary> /// </summary>
LINEIN_WatiMachineSingle=20004, LINEIN_WatiMachineSingle = 20004,
/// <summary> /// <summary>
/// 双层料仓流水线模块 。线体调宽回原点 /// 双层料仓流水线模块 。线体调宽回原点
...@@ -694,7 +706,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -694,7 +706,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 双层料仓流水线模块 。线体调宽回原点 /// 双层料仓流水线模块 。线体调宽回原点
/// </summary> /// </summary>
LINECW_LineChangeWidth = 20011, LINECW_LineChangeWidth = 20011,
/// <summary> /// <summary>
/// 流水线原点返回,设置速度 /// 流水线原点返回,设置速度
...@@ -707,7 +719,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -707,7 +719,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 流水线原点返回,开始原点返回 /// 流水线原点返回,开始原点返回
/// </summary> /// </summary>
LINEH_LineHome_003= 20022, LINEH_LineHome_003 = 20022,
#endregion #endregion
...@@ -761,11 +773,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -761,11 +773,11 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
///在线双层料仓: 旋转电机2反转,回到中间等待位置 ///在线双层料仓: 旋转电机2反转,回到中间等待位置
/// </summary> /// </summary>
DB_SI_11_MoveSIFromRoom = 20111, DB_SI_11_MoveSIFromRoom = 20111,
/// <summary> /// <summary>
/// 在线双层料仓:关闭仓门 /// 在线双层料仓:关闭仓门
/// </summary> /// </summary>
DB_SI_12_CloseDoor = 20112, DB_SI_12_CloseDoor = 20112,
#endregion #endregion
#region 在线料仓出库处理 #region 在线料仓出库处理
...@@ -817,7 +829,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -817,7 +829,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 在线双层料仓:等待物料到达 /// 在线双层料仓:等待物料到达
/// </summary> /// </summary>
DB_SO_11_WaitTrayToDoor= 20211, DB_SO_11_WaitTrayToDoor = 20211,
/// <summary> /// <summary>
/// 在线双层料仓:等待拿走料盘 /// 在线双层料仓:等待拿走料盘
/// </summary> /// </summary>
...@@ -826,7 +838,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -826,7 +838,7 @@ namespace OnlineStore.DeviceLibrary
/////在线双层料仓:出库执行 旋转电机2反转,回到中间等待位置 /////在线双层料仓:出库执行 旋转电机2反转,回到中间等待位置
///// </summary> ///// </summary>
//DB_SO_11_MoveOutFromRoom = 20211, //DB_SO_11_MoveOutFromRoom = 20211,
///// <summary> ///// <summary>
///// 在线双层料仓:出库执行(关闭仓门 ///// 在线双层料仓:出库执行(关闭仓门
///// </summary> ///// </summary>
...@@ -840,7 +852,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -840,7 +852,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 在线双层料仓:回原点:同时动作:转盘低速旋转 , 电缸回到原位 ,( I/O点控制) 旋转气缸旋回 /// 在线双层料仓:回原点:同时动作:转盘低速旋转 , 电缸回到原位 ,( I/O点控制) 旋转气缸旋回
/// </summary> /// </summary>
DB_H_02_BackHome= 20302, DB_H_02_BackHome = 20302,
/// <summary> /// <summary>
/// 在线双层料仓:回原点:旋回完成 /// 在线双层料仓:回原点:旋回完成
/// </summary> /// </summary>
...@@ -860,7 +872,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -860,7 +872,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 轴报警 /// 轴报警
/// </summary> /// </summary>
AxisAlarm = 1, AxisAlarm = 1,
/// <summary> /// <summary>
/// 收到急停 /// 收到急停
/// </summary> /// </summary>
...@@ -880,6 +892,57 @@ namespace OnlineStore.DeviceLibrary ...@@ -880,6 +892,57 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 电钢报警 /// 电钢报警
/// </summary> /// </summary>
StellAlarm=50, StellAlarm = 50,
}
//Charging 上料轴 入库运行状态
public enum ChargingInStatu
{
//Wait = 0,
/// <summary>
/// 初始化 ,原点返回状态中,只有流水线使用
/// </summary>
// HomeMoving = 1,
/// <summary>
/// 进料-上料轴--上移
/// </summary>
InBoxMoveUp = 1,
/// <summary>
/// 料盘检测步骤、扫码操作
/// </summary>
InBoxCheck = 2,
/// <summary>
/// 吸盘-下移动检测步骤
/// </summary>
SuckerMove_Down = 3,
/// <summary>
/// 吸盘-下端检测步骤
/// </summary>
Sucker_DownCheck = 4,
/// <summary>
/// 吸盘-停止下移步骤
/// </summary>
Sucker_DownStop = 5,
//吸盘吸
Sucker_SuctionSOL = 6,
////吸盘上升
Sucker_UpSOL = 7,
//进出轴出
//吸盘放掉料盘
//夹紧装置
//进出轴退回
//判断进出轴是否退回?
//上料轴运行
//上料轴位置判断
//挂起
}
public enum ChargingOutStatu
{
Wait = 0,
//开门出料
} }
} }
...@@ -191,19 +191,19 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -191,19 +191,19 @@ namespace OnlineStore.LoadCSVLibrary
#region #region
/// <summary> /// <summary>
/// PRO (轴)进料轴轴原点低速度 ChargingAxis_HomeLowSpeed 50 /// PRO (轴)进料轴轴原点低速度 ChargingAxis_HomeLowSpeed 50
/// </summary> /// </summary>
[ConfigProAttribute("ChargingAxis_HomeLowSpeed", false)] [ConfigProAttribute("ChargingAxis_HomeLowSpeed", false)]
public short ChargingAxis_HomeLowSpeed { get; set; } public short ChargingAxis_HomeLowSpeed { get; set; }
/// <summary> /// <summary>
/// PRO (轴)进料轴轴原点高速 ChargingnAxis_HomeHighSpeed 100 /// PRO (轴)进料轴轴原点高速 ChargingnAxis_HomeHighSpeed 100
/// </summary> /// </summary>
[ConfigProAttribute("ChargingAxis_HomeHighSpeed", false)] [ConfigProAttribute("ChargingAxis_HomeHighSpeed", false)]
public short ChargingAxis_HomeHighSpeed { get; set; } public short ChargingAxis_HomeHighSpeed { get; set; }
/// <summary> /// <summary>
/// PRO (轴)进料轴轴原点加速度 ChargingAxis_HomeAddSpeed 30 /// PRO (轴)进料轴轴原点加速度 ChargingAxis_HomeAddSpeed 30
/// </summary> /// </summary>
[ConfigProAttribute("ChargingAxis_HomeAddSpeed", false)] [ConfigProAttribute("ChargingAxis_HomeAddSpeed", false)]
public short ChargingAxis_HomeAddSpeed { get; set; } public short ChargingAxis_HomeAddSpeed { get; set; }
...@@ -390,6 +390,16 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -390,6 +390,16 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary> /// </summary>
[ConfigProAttribute("CompressAxis_P1_Position")] [ConfigProAttribute("CompressAxis_P1_Position")]
public int CompressAxis_P1_Position { get; set; } public int CompressAxis_P1_Position { get; set; }
// add by renym 2018-11-27 上料轴原点定义
/// PRO 进料轴(轴5)P1待机原位点 CompressAxis_P1_Position
/// </summary>
[ConfigProAttribute("ChargingAxis_P1_Position", false)]
public int ChargingAxis_P1_Position { get; set; }
/// PRO 进料轴(轴5)最高位点 CompressAxis_P1_Position
/// </summary>
[ConfigProAttribute("ChargingAxis_MaxHigh_Position", false)]
public int ChargingAxis_MaxHigh_Position { get; set; }
/// <summary> /// <summary>
/// PRO 是否使用料盘检测信号 IsUse_Tray_Check /// PRO 是否使用料盘检测信号 IsUse_Tray_Check
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!