Commit f427b7b6 LN

1

1 个父辈 218ee8a4
......@@ -198,6 +198,7 @@
this.btnLineAbsMove = new System.Windows.Forms.Button();
this.label25 = new System.Windows.Forms.Label();
this.comboBoxPortName = new System.Windows.Forms.ComboBox();
this.btnH = new System.Windows.Forms.Button();
this.groupBox5.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
......@@ -226,6 +227,7 @@
//
this.groupBox5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox5.Controls.Add(this.btnH);
this.groupBox5.Controls.Add(this.label6);
this.groupBox5.Controls.Add(this.label5);
this.groupBox5.Controls.Add(this.btnReadHomeSingle);
......@@ -436,10 +438,10 @@
this.btnReadPosition.Cursor = System.Windows.Forms.Cursors.Default;
this.btnReadPosition.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReadPosition.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnReadPosition.Location = new System.Drawing.Point(401, 162);
this.btnReadPosition.Location = new System.Drawing.Point(207, 153);
this.btnReadPosition.Name = "btnReadPosition";
this.btnReadPosition.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnReadPosition.Size = new System.Drawing.Size(90, 33);
this.btnReadPosition.Size = new System.Drawing.Size(102, 33);
this.btnReadPosition.TabIndex = 278;
this.btnReadPosition.Text = "读取位置";
this.btnReadPosition.UseVisualStyleBackColor = true;
......@@ -1775,55 +1777,55 @@
// 查看IOToolStripMenuItem
//
this.查看IOToolStripMenuItem.Name = "查看IOToolStripMenuItem";
this.查看IOToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.查看IOToolStripMenuItem.Size = new System.Drawing.Size(175, 26);
this.查看IOToolStripMenuItem.Text = "查看IO";
this.查看IOToolStripMenuItem.Click += new System.EventHandler(this.查看IOToolStripMenuItem_Click);
//
// toolStripSeparator5
//
this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator5.Size = new System.Drawing.Size(172, 6);
//
// 料仓运转ONToolStripMenuItem
//
this.料仓运转ONToolStripMenuItem.Name = "料仓运转ONToolStripMenuItem";
this.料仓运转ONToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.料仓运转ONToolStripMenuItem.Size = new System.Drawing.Size(175, 26);
this.料仓运转ONToolStripMenuItem.Text = "料仓运转ON";
this.料仓运转ONToolStripMenuItem.Click += new System.EventHandler(this.料仓运转ONToolStripMenuItem_Click);
//
// toolStripSeparator6
//
this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator6.Size = new System.Drawing.Size(172, 6);
//
// 料仓运转OFFToolStripMenuItem
//
this.料仓运转OFFToolStripMenuItem.Name = "料仓运转OFFToolStripMenuItem";
this.料仓运转OFFToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.料仓运转OFFToolStripMenuItem.Size = new System.Drawing.Size(175, 26);
this.料仓运转OFFToolStripMenuItem.Text = "料仓运转OFF";
this.料仓运转OFFToolStripMenuItem.Click += new System.EventHandler(this.料仓运转OFFToolStripMenuItem_Click);
//
// toolStripSeparator7
//
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator7.Size = new System.Drawing.Size(172, 6);
//
// 打开舱门ToolStripMenuItem
//
this.打开舱门ToolStripMenuItem.Name = "打开舱门ToolStripMenuItem";
this.打开舱门ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.打开舱门ToolStripMenuItem.Size = new System.Drawing.Size(175, 26);
this.打开舱门ToolStripMenuItem.Text = "打开仓门";
this.打开舱门ToolStripMenuItem.Click += new System.EventHandler(this.打开舱门ToolStripMenuItem_Click);
//
// toolStripSeparator8
//
this.toolStripSeparator8.Name = "toolStripSeparator8";
this.toolStripSeparator8.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator8.Size = new System.Drawing.Size(172, 6);
//
// 关闭仓门ToolStripMenuItem
//
this.关闭仓门ToolStripMenuItem.Name = "关闭仓门ToolStripMenuItem";
this.关闭仓门ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.关闭仓门ToolStripMenuItem.Size = new System.Drawing.Size(175, 26);
this.关闭仓门ToolStripMenuItem.Text = "关闭仓门";
this.关闭仓门ToolStripMenuItem.Click += new System.EventHandler(this.关闭仓门ToolStripMenuItem_Click);
//
......@@ -1843,38 +1845,38 @@
// 轴卡点动ToolStripMenuItem
//
this.轴卡点动ToolStripMenuItem.Name = "轴卡点动ToolStripMenuItem";
this.轴卡点动ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.轴卡点动ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.轴卡点动ToolStripMenuItem.Text = "轴卡点动";
this.轴卡点动ToolStripMenuItem.Click += new System.EventHandler(this.轴卡点动ToolStripMenuItem_Click);
//
// toolStripSeparator9
//
this.toolStripSeparator9.Name = "toolStripSeparator9";
this.toolStripSeparator9.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator9.Size = new System.Drawing.Size(173, 6);
//
// 扫码测试ToolStripMenuItem
//
this.扫码测试ToolStripMenuItem.Name = "扫码测试ToolStripMenuItem";
this.扫码测试ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.扫码测试ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.扫码测试ToolStripMenuItem.Text = "扫码测试";
this.扫码测试ToolStripMenuItem.Click += new System.EventHandler(this.扫码测试ToolStripMenuItem_Click);
//
// toolStripSeparator10
//
this.toolStripSeparator10.Name = "toolStripSeparator10";
this.toolStripSeparator10.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator10.Size = new System.Drawing.Size(173, 6);
//
// 学习二维码ToolStripMenuItem
//
this.学习二维码ToolStripMenuItem.Name = "学习二维码ToolStripMenuItem";
this.学习二维码ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.学习二维码ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.学习二维码ToolStripMenuItem.Text = "学习二维码";
this.学习二维码ToolStripMenuItem.Click += new System.EventHandler(this.学习二维码ToolStripMenuItem_Click);
//
// 扫码循环测试ToolStripMenuItem
//
this.扫码循环测试ToolStripMenuItem.Name = "扫码循环测试ToolStripMenuItem";
this.扫码循环测试ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.扫码循环测试ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.扫码循环测试ToolStripMenuItem.Text = "开始循环扫码";
this.扫码循环测试ToolStripMenuItem.Visible = false;
this.扫码循环测试ToolStripMenuItem.Click += new System.EventHandler(this.扫码循环测试ToolStripMenuItem_Click);
......@@ -2223,6 +2225,21 @@
this.comboBoxPortName.Size = new System.Drawing.Size(103, 25);
this.comboBoxPortName.TabIndex = 0;
//
// btnH
//
this.btnH.BackColor = System.Drawing.SystemColors.Control;
this.btnH.Cursor = System.Windows.Forms.Cursors.Default;
this.btnH.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnH.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnH.Location = new System.Drawing.Point(401, 185);
this.btnH.Name = "btnH";
this.btnH.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnH.Size = new System.Drawing.Size(90, 70);
this.btnH.TabIndex = 301;
this.btnH.Text = "正方向原点返回";
this.btnH.UseVisualStyleBackColor = true;
this.btnH.Click += new System.EventHandler(this.btnH_Click);
//
// FrmStoreBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
......@@ -2439,6 +2456,7 @@
private System.Windows.Forms.Label lblShuoKeMsg;
private System.Windows.Forms.CheckBox chbOnlyOut;
private System.Windows.Forms.ToolStripMenuItem 扫码循环测试ToolStripMenuItem;
public System.Windows.Forms.Button btnH;
}
}
......@@ -1419,5 +1419,26 @@ namespace OnlineStore.ACSingleStore
LogUtil.info("扫码测试未得到锁");
}
}
private void btnH_Click(object sender, EventArgs e)
{
string portName = txtAxisDeviceName.Text;
short SlvAddr = FormUtil.GetShortValue(txtAxisValue);
if (store.Config.InOut_Axis.IsSameAxis(portName, SlvAddr) && (store.InOutAxisCanMove().Equals(false)))
{
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
else if (store.Config.Middle_Axis.IsSameAxis(portName, SlvAddr) || store.Config.UpDown_Axis.IsSameAxis(portName, SlvAddr))
{
if (!InOutIsIsP1())
{
return;
}
}
LogUtil.info("点击【正方向原点返回】,端口号【" + portName + "】地址【" + SlvAddr + "】 ");
ACServerManager.ZhHomeMove(portName, SlvAddr);
}
}
}
......@@ -347,7 +347,13 @@ namespace OnlineStore.DeviceLibrary
Thread.Sleep(SleepMSendons);
OpenAndCloseSTB(portName, slvAddr);
}
public static void ZhHomeMove(string portName, int slvAddr )
{
UpdateBlock(portName, slvAddr, ACCMDManager.Block_HomeMove0);
LogUtil.info(portName+ "回原点:正方向");
Thread.Sleep(SleepMSendons);
OpenAndCloseSTB(portName, slvAddr);
}
public static void SpeedMove(string portName, int slvAddr, int speed)
{
int preSpeed = GetAddrValue(portName,slvAddr, ACCMDManager.Speed_Addr);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!