Commit 1e89ffa1 LN

伺服增加退出回零

1 个父辈 99a09c7a
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
<add key="App_AutoRun" value="0" /> <add key="App_AutoRun" value="0" />
<add key="App_Title" value="流水线客户端" /> <add key="App_Title" value="流水线客户端" />
<!--Server address--> <!--Server address-->
<!--<add key="http.server" value="http://localhost/myproject/service/store/emptyPosForPutin"/>--> <!--<add key="http.server" value="http://192.168.100.14/myproject/service/store/emptyPosForPutin"/>-->
<add key="http.server" value="http://10.85.199.25/myproject/" /> <add key="http.server" value="http://192.168.100.14/myproject/" />
<!--storeType--> <!--storeType-->
<add key="Line_moveEquip_count" value="7" /> <add key="Line_moveEquip_count" value="7" />
<add key="Line_feedingEquip_count" value="1" /> <add key="Line_feedingEquip_count" value="1" />
......
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
this.txtAxisDeviceName = new System.Windows.Forms.TextBox(); this.txtAxisDeviceName = new System.Windows.Forms.TextBox();
this.lblServerOn = new System.Windows.Forms.Label(); this.lblServerOn = new System.Windows.Forms.Label();
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.btnEndHome = new System.Windows.Forms.Button();
this.groupAxis.SuspendLayout(); this.groupAxis.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
...@@ -477,6 +478,7 @@ ...@@ -477,6 +478,7 @@
// //
// panel1 // panel1
// //
this.panel1.Controls.Add(this.btnEndHome);
this.panel1.Controls.Add(this.linkLabel1); this.panel1.Controls.Add(this.linkLabel1);
this.panel1.Controls.Add(this.btnAxisStop); this.panel1.Controls.Add(this.btnAxisStop);
this.panel1.Controls.Add(this.btnAxisReturnHome); this.panel1.Controls.Add(this.btnAxisReturnHome);
...@@ -524,10 +526,10 @@ ...@@ -524,10 +526,10 @@
this.btnAxisStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnAxisStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisStop.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnAxisStop.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisStop.ForeColor = System.Drawing.SystemColors.ControlText; this.btnAxisStop.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnAxisStop.Location = new System.Drawing.Point(356, 46); this.btnAxisStop.Location = new System.Drawing.Point(356, 85);
this.btnAxisStop.Name = "btnAxisStop"; this.btnAxisStop.Name = "btnAxisStop";
this.btnAxisStop.RightToLeft = System.Windows.Forms.RightToLeft.No; this.btnAxisStop.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnAxisStop.Size = new System.Drawing.Size(110, 114); this.btnAxisStop.Size = new System.Drawing.Size(110, 75);
this.btnAxisStop.TabIndex = 246; this.btnAxisStop.TabIndex = 246;
this.btnAxisStop.Text = " 停止运动"; this.btnAxisStop.Text = " 停止运动";
this.btnAxisStop.UseVisualStyleBackColor = false; this.btnAxisStop.UseVisualStyleBackColor = false;
...@@ -820,6 +822,22 @@ ...@@ -820,6 +822,22 @@
// //
this.timer1.Tick += new System.EventHandler(this.timer1_Tick); this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
// //
// btnEndHome
//
this.btnEndHome.BackColor = System.Drawing.SystemColors.Control;
this.btnEndHome.Cursor = System.Windows.Forms.Cursors.Default;
this.btnEndHome.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnEndHome.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnEndHome.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnEndHome.Location = new System.Drawing.Point(356, 45);
this.btnEndHome.Name = "btnEndHome";
this.btnEndHome.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnEndHome.Size = new System.Drawing.Size(110, 34);
this.btnEndHome.TabIndex = 334;
this.btnEndHome.Text = "退出回零模式";
this.btnEndHome.UseVisualStyleBackColor = true;
this.btnEndHome.Click += new System.EventHandler(this.button1_Click);
//
// AxisMoveControl // AxisMoveControl
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
...@@ -899,5 +917,6 @@ ...@@ -899,5 +917,6 @@
private System.Windows.Forms.Label label13; private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label lblPosLmt; private System.Windows.Forms.Label lblPosLmt;
private System.Windows.Forms.Label lblNegLmt; private System.Windows.Forms.Label lblNegLmt;
internal System.Windows.Forms.Button btnEndHome;
} }
} }
...@@ -170,7 +170,7 @@ namespace OnlineStore.AssemblyLine ...@@ -170,7 +170,7 @@ namespace OnlineStore.AssemblyLine
btnAxisRMove.ForeColor = color; btnAxisRMove.ForeColor = color;
btnAxisReturnHome.ForeColor = color; btnAxisReturnHome.ForeColor = color;
btnAxisStop.ForeColor = color; btnAxisStop.ForeColor = color;
btnEndHome.ForeColor = color;
btnAddMove.ForeColor = color; btnAddMove.ForeColor = color;
btnDelMove.ForeColor = color; btnDelMove.ForeColor = color;
} }
...@@ -348,5 +348,10 @@ namespace OnlineStore.AssemblyLine ...@@ -348,5 +348,10 @@ namespace OnlineStore.AssemblyLine
{ {
Clipboard.SetText(txtAxisPosition.Text); Clipboard.SetText(txtAxisPosition.Text);
} }
private void button1_Click(object sender, EventArgs e)
{
HCBoardManager.FinishHome(SlvAddr);
}
} }
} }
...@@ -134,6 +134,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -134,6 +134,11 @@ namespace OnlineStore.DeviceLibrary
} }
public override void SuddenStop(string portName, short slvAddr) public override void SuddenStop(string portName, short slvAddr)
{ {
short value = HCBoardManager.GetHomeStatus(slvAddr);
if (value == 2)
{
HCBoardManager.FinishHome(slvAddr);
}
HCBoardManager.AxisStop(slvAddr); HCBoardManager.AxisStop(slvAddr);
} }
public override bool AbsMoveIsEnd(string portName, short axisNo, int targetPosition, int canErrorCount, out bool countError) public override bool AbsMoveIsEnd(string portName, short axisNo, int targetPosition, int canErrorCount, out bool countError)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!