增加Z轴上下时间测试

master
lhiven 1 year ago
parent 2c52682677
commit 0c796400b9

@ -58,6 +58,7 @@
this.button22 = new System.Windows.Forms.Button(); this.button22 = new System.Windows.Forms.Button();
this.button23 = new System.Windows.Forms.Button(); this.button23 = new System.Windows.Forms.Button();
this.button24 = new System.Windows.Forms.Button(); this.button24 = new System.Windows.Forms.Button();
this.button25 = new System.Windows.Forms.Button();
this.SuspendLayout(); this.SuspendLayout();
// //
// btnTurnoverSlotException // btnTurnoverSlotException
@ -360,6 +361,16 @@
this.button24.UseVisualStyleBackColor = true; this.button24.UseVisualStyleBackColor = true;
this.button24.Click += new System.EventHandler(this.button24_Click); 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 // TestFrm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@ -376,6 +387,7 @@
this.Controls.Add(this.button17); this.Controls.Add(this.button17);
this.Controls.Add(this.button16); this.Controls.Add(this.button16);
this.Controls.Add(this.button15); this.Controls.Add(this.button15);
this.Controls.Add(this.button25);
this.Controls.Add(this.button22); this.Controls.Add(this.button22);
this.Controls.Add(this.button21); this.Controls.Add(this.button21);
this.Controls.Add(this.button20); this.Controls.Add(this.button20);
@ -433,5 +445,6 @@
private System.Windows.Forms.Button button22; private System.Windows.Forms.Button button22;
private System.Windows.Forms.Button button23; private System.Windows.Forms.Button button23;
private System.Windows.Forms.Button button24; private System.Windows.Forms.Button button24;
private System.Windows.Forms.Button button25;
} }
} }

@ -1,4 +1,5 @@
using Rs.Framework; using Rs.Controls;
using Rs.Framework;
using Rs.MotionPlat.Commom; using Rs.MotionPlat.Commom;
using Rs.MotionPlat.Entitys; using Rs.MotionPlat.Entitys;
using Rs.MotionPlat.Flow; using Rs.MotionPlat.Flow;
@ -12,6 +13,7 @@ using System.Data;
using System.Drawing; using System.Drawing;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using static Rs.MotionPlat.Commom.SchedulingMessageBox; using static Rs.MotionPlat.Commom.SchedulingMessageBox;
@ -220,5 +222,34 @@ namespace Rs.MotionPlat
else else
Msg.ShowInfo("无产品"); Msg.ShowInfo("无产品");
} }
private void button25_Click(object sender, EventArgs e)
{
double targetPos =SysConfigParam.GetValue<double>($"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("已到上方");
}
} }
} }

Loading…
Cancel
Save