From 0c796400b934ba9e300a76b1b514a92547f89f5c Mon Sep 17 00:00:00 2001 From: lhiven Date: Thu, 11 Jan 2024 11:06:54 +0900 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0Z=E8=BD=B4=E4=B8=8A=E4=B8=8B?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.SkyLine/TestFrm.Designer.cs | 13 +++++++++++++ Rs.SkyLine/TestFrm.cs | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/Rs.SkyLine/TestFrm.Designer.cs b/Rs.SkyLine/TestFrm.Designer.cs index 490f0bb..4997151 100644 --- a/Rs.SkyLine/TestFrm.Designer.cs +++ b/Rs.SkyLine/TestFrm.Designer.cs @@ -58,6 +58,7 @@ this.button22 = new System.Windows.Forms.Button(); this.button23 = new System.Windows.Forms.Button(); this.button24 = new System.Windows.Forms.Button(); + this.button25 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // btnTurnoverSlotException @@ -360,6 +361,16 @@ this.button24.UseVisualStyleBackColor = true; this.button24.Click += new System.EventHandler(this.button24_Click); // + // button25 + // + this.button25.Location = new System.Drawing.Point(42, 585); + this.button25.Name = "button25"; + this.button25.Size = new System.Drawing.Size(197, 42); + this.button25.TabIndex = 1; + this.button25.Text = "Z上下测试"; + this.button25.UseVisualStyleBackColor = true; + this.button25.Click += new System.EventHandler(this.button25_Click); + // // TestFrm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -376,6 +387,7 @@ this.Controls.Add(this.button17); this.Controls.Add(this.button16); this.Controls.Add(this.button15); + this.Controls.Add(this.button25); this.Controls.Add(this.button22); this.Controls.Add(this.button21); this.Controls.Add(this.button20); @@ -433,5 +445,6 @@ private System.Windows.Forms.Button button22; private System.Windows.Forms.Button button23; private System.Windows.Forms.Button button24; + private System.Windows.Forms.Button button25; } } \ No newline at end of file diff --git a/Rs.SkyLine/TestFrm.cs b/Rs.SkyLine/TestFrm.cs index d6db3af..686b22c 100644 --- a/Rs.SkyLine/TestFrm.cs +++ b/Rs.SkyLine/TestFrm.cs @@ -1,4 +1,5 @@ -using Rs.Framework; +using Rs.Controls; +using Rs.Framework; using Rs.MotionPlat.Commom; using Rs.MotionPlat.Entitys; using Rs.MotionPlat.Flow; @@ -12,6 +13,7 @@ using System.Data; using System.Drawing; using System.Linq; using System.Text; +using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; using static Rs.MotionPlat.Commom.SchedulingMessageBox; @@ -220,5 +222,34 @@ namespace Rs.MotionPlat else Msg.ShowInfo("无产品"); } + + private void button25_Click(object sender, EventArgs e) + { + + double targetPos =SysConfigParam.GetValue($"TrayNozzle1TakeHeight"); + LogHelper.Debug("到下方"); + AxisControl.NozzleZ1.MovePos(targetPos, GlobalVar.WholeSpeed); + while (true) + { + if(Ops.IsStop(AxisControl.NozzleZ1)) + { + break; + } + } + LogHelper.Debug("已到下方"); + + Thread.Sleep(1000); + + LogHelper.Debug("到上方"); + AxisControl.NozzleZ1.MovePos(0, GlobalVar.WholeSpeed); + while (true) + { + if (Ops.IsStop(AxisControl.NozzleZ1)) + { + break; + } + } + LogHelper.Debug("已到上方"); + } } }