Commit 08566aa2 几米阳光

焊接时先抬起到焊接高处再下降。

1 个父辈 7c5fbe23
...@@ -97,6 +97,8 @@ namespace URSoldering.Common ...@@ -97,6 +97,8 @@ namespace URSoldering.Common
public static string HasSoldering = "HasSoldering"; public static string HasSoldering = "HasSoldering";
public static string Config_Pwd = "Config_Pwd"; public static string Config_Pwd = "Config_Pwd";
public static string ZUpLiftValue = "ZUpLiftValue";
} }
} }
...@@ -165,23 +165,27 @@ namespace URSoldering.DeviceLibrary ...@@ -165,23 +165,27 @@ namespace URSoldering.DeviceLibrary
{ {
Wait = 0, Wait = 0,
/// <summary> /// <summary>
/// 机器人走到焊点的高处
/// </summary>
W01_RobotToHighPoint = 1,
/// <summary>
/// 机器人走到对应的焊点,送丝下降,烙铁加温 /// 机器人走到对应的焊点,送丝下降,烙铁加温
/// </summary> /// </summary>
W01_RobotMoveToPoint = 1, W02_RobotMoveToPoint = 2,
/// <summary> /// <summary>
/// 慢速送丝 /// 慢速送丝
/// </summary> /// </summary>
W02_SlowSendWire = 2, W03_SlowSendWire = 3,
/// <summary> /// <summary>
/// 送丝 /// 送丝
/// </summary> /// </summary>
W03_SendWire = 3, W04_SendWire = 4,
/// <summary> /// <summary>
/// 焊接加温等待 /// 焊接加温等待
/// </summary> /// </summary>
W04_WeldWait = 4, W05_WeldWait = 5,
/// <summary> /// <summary>
/// 清洗烙铁 /// 清洗烙铁
......
...@@ -24,6 +24,7 @@ namespace URSoldering.DeviceLibrary ...@@ -24,6 +24,7 @@ namespace URSoldering.DeviceLibrary
public static URPointValue RobotMin = new URPointValue(); public static URPointValue RobotMin = new URPointValue();
public static URPointValue RobotMax = new URPointValue(); public static URPointValue RobotMax = new URPointValue();
public static double ZUpLiftValue = (double)ConfigAppSettings.GetNumValue(Setting_Init.ZUpLiftValue);
//休眠的秒数,<=0不需要休眠 //休眠的秒数,<=0不需要休眠
public static int SleepSeconds = ConfigAppSettings.GetIntValue(Setting_Init.SleepSeconds); public static int SleepSeconds = ConfigAppSettings.GetIntValue(Setting_Init.SleepSeconds);
...@@ -591,7 +592,16 @@ namespace URSoldering.DeviceLibrary ...@@ -591,7 +592,16 @@ namespace URSoldering.DeviceLibrary
WeldMoveStep.EndMove(); WeldMoveStep.EndMove();
} }
} }
private static void MoveToPoint(WeldPointInfo p, bool IsHigh) private static void MoveToHighPoint(WeldPointInfo p )
{
SendWireWork(true);
SolderingDown(true);
URPointValue highPoint = new URPointValue(p.RobotX, p.RobotY, p.RobotZ+ZUpLiftValue, p.RobotRX, p.RobotRY, p.RobotRZ);
WeldLog("移动到焊点高处【" + WeldMoveStep.CurrPoint.pointName + "】:" + highPoint.ToShowStr());
URRobotControl.MoveTo(highPoint, isHighSpeed);
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitRobotPoint(highPoint));
}
private static void MoveToPoint(WeldPointInfo p )
{ {
SendWireWork(true); SendWireWork(true);
SolderingDown(true); SolderingDown(true);
......
...@@ -63,27 +63,35 @@ namespace URSoldering.DeviceLibrary ...@@ -63,27 +63,35 @@ namespace URSoldering.DeviceLibrary
{ {
NewPoint(); NewPoint();
} }
else if (WeldMoveStep.moveStep.Equals(MoveStep.W01_RobotMoveToPoint)) else if (WeldMoveStep.moveStep.Equals(MoveStep.W01_RobotToHighPoint))
{
WeldMoveStep.NextMoveStep(MoveStep.W02_RobotMoveToPoint);
LogUtil.info(" " + WeldMoveStep.CurrPoint.TypeValue + "【" + WeldMoveStep.CurrPoint.pointName + "】预热" + WeldMoveStep.CurrPoint.preheatTemperature + "度,送丝下降,移动机械臂");
MoveToPoint(WeldMoveStep.CurrPoint );
WorkCountManager.AddWeldPint();
WeldMoveStep.IsSlowSendWire = true;
SlowSendWire();
}
else if (WeldMoveStep.moveStep.Equals(MoveStep.W02_RobotMoveToPoint))
{ {
if (WeldMoveStep.CurrPoint.pointType.Equals(0)) if (WeldMoveStep.CurrPoint.pointType.Equals(0))
{ {
if (WeldMoveStep.IsSlowSendWire) if (WeldMoveStep.IsSlowSendWire)
{ {
//已经慢速送丝 //已经慢速送丝
WeldMoveStep.NextMoveStep(MoveStep.W03_SendWire); WeldMoveStep.NextMoveStep(MoveStep.W04_SendWire);
SendWire(); SendWire();
} }
else else
{ {
if (WeldMoveStep.CurrPoint.startSendWireTime > 0 && WeldMoveStep.CurrPoint.startSendWireSpeed > 0) if (WeldMoveStep.CurrPoint.startSendWireTime > 0 && WeldMoveStep.CurrPoint.startSendWireSpeed > 0)
{ {
WeldMoveStep.NextMoveStep(MoveStep.W02_SlowSendWire); WeldMoveStep.NextMoveStep(MoveStep.W03_SlowSendWire);
SlowSendWire(); SlowSendWire();
} }
else else
{ {
WeldMoveStep.NextMoveStep(MoveStep.W03_SendWire); WeldMoveStep.NextMoveStep(MoveStep.W04_SendWire);
SendWire(); SendWire();
} }
} }
...@@ -93,16 +101,16 @@ namespace URSoldering.DeviceLibrary ...@@ -93,16 +101,16 @@ namespace URSoldering.DeviceLibrary
PointEndPross(); PointEndPross();
} }
} }
else if (WeldMoveStep.moveStep.Equals(MoveStep.W02_SlowSendWire)) else if (WeldMoveStep.moveStep.Equals(MoveStep.W03_SlowSendWire))
{ {
WeldMoveStep.NextMoveStep(MoveStep.W03_SendWire); WeldMoveStep.NextMoveStep(MoveStep.W04_SendWire);
SendWire(); SendWire();
} }
else if (WeldMoveStep.moveStep.Equals(MoveStep.W03_SendWire)) else if (WeldMoveStep.moveStep.Equals(MoveStep.W04_SendWire))
{ {
if (WeldMoveStep.CurrPoint.preheatTime > 0) if (WeldMoveStep.CurrPoint.preheatTime > 0)
{ {
WeldMoveStep.NextMoveStep(MoveStep.W04_WeldWait); WeldMoveStep.NextMoveStep(MoveStep.W05_WeldWait);
SetTemp(false, true); SetTemp(false, true);
} }
else else
...@@ -111,7 +119,7 @@ namespace URSoldering.DeviceLibrary ...@@ -111,7 +119,7 @@ namespace URSoldering.DeviceLibrary
} }
} }
else if (WeldMoveStep.moveStep.Equals(MoveStep.W04_WeldWait)) else if (WeldMoveStep.moveStep.Equals(MoveStep.W05_WeldWait))
{ {
PointEndPross(); PointEndPross();
} }
...@@ -125,7 +133,8 @@ namespace URSoldering.DeviceLibrary ...@@ -125,7 +133,8 @@ namespace URSoldering.DeviceLibrary
KeepTemp(); KeepTemp();
WeldMoveStep.NextMoveStep(MoveStep.W15_ClearEnd); WeldMoveStep.NextMoveStep(MoveStep.W15_ClearEnd);
MoveToOrg(); MoveToOrg();
}else if (WeldMoveStep.moveStep.Equals(MoveStep.W15_ClearEnd)) }
else if (WeldMoveStep.moveStep.Equals(MoveStep.W15_ClearEnd))
{ {
WeldEnd(); WeldEnd();
} }
...@@ -178,7 +187,7 @@ namespace URSoldering.DeviceLibrary ...@@ -178,7 +187,7 @@ namespace URSoldering.DeviceLibrary
private static void NewPoint() private static void NewPoint()
{ {
//运动到焊点,送丝下降,烙铁加温, //运动到焊点,送丝下降,烙铁加温,
WeldMoveStep.NextMoveStep(MoveStep.W01_RobotMoveToPoint); WeldMoveStep.NextMoveStep(MoveStep.W02_RobotMoveToPoint);
if (WeldMoveStep.IsFirstPoint()) if (WeldMoveStep.IsFirstPoint())
{ {
SetPreTemp(true, true); SetPreTemp(true, true);
...@@ -189,16 +198,30 @@ namespace URSoldering.DeviceLibrary ...@@ -189,16 +198,30 @@ namespace URSoldering.DeviceLibrary
} }
if (WeldMoveStep.CurrPoint.pointType.Equals(0)) if (WeldMoveStep.CurrPoint.pointType.Equals(0))
{ {
//普通焊点先移动至高位
WeldMoveStep.NextMoveStep(MoveStep.W01_RobotToHighPoint);
LogUtil.info(" 新" + WeldMoveStep.CurrPoint.TypeValue + "【" + WeldMoveStep.CurrPoint.pointName + "】移动至焊点高处");
MoveToHighPoint(WeldMoveStep.CurrPoint );
WorkCountManager.AddWeldPint();
//LogUtil.info(" 新" + WeldMoveStep.CurrPoint.TypeValue + "【" + WeldMoveStep.CurrPoint.pointName + "】预热" + WeldMoveStep.CurrPoint.preheatTemperature + "度,送丝下降,移动机械臂");
//MoveToPoint(WeldMoveStep.CurrPoint, false);
//WorkCountManager.AddWeldPint();
//WeldMoveStep.IsSlowSendWire = true;
//SlowSendWire();
}
else if (WeldMoveStep.CurrPoint.pointType.Equals(2))
{
LogUtil.info(" 新" + WeldMoveStep.CurrPoint.TypeValue + "【" + WeldMoveStep.CurrPoint.pointName + "】预热" + WeldMoveStep.CurrPoint.preheatTemperature + "度,送丝下降,移动机械臂"); LogUtil.info(" 新" + WeldMoveStep.CurrPoint.TypeValue + "【" + WeldMoveStep.CurrPoint.pointName + "】预热" + WeldMoveStep.CurrPoint.preheatTemperature + "度,送丝下降,移动机械臂");
MoveToPoint(WeldMoveStep.CurrPoint, false); MoveToPoint(WeldMoveStep.CurrPoint );
WorkCountManager.AddWeldPint(); WorkCountManager.AddWeldPint();
WeldMoveStep.IsSlowSendWire = true; WeldMoveStep.IsSlowSendWire = true;
SlowSendWire(); SlowSendWire();
} }
else else
{ {
LogUtil.info(" 新" + WeldMoveStep.CurrPoint.TypeValue + "【" + WeldMoveStep.CurrPoint.pointName + "】 移动机械臂"); LogUtil.info(" 新" + WeldMoveStep.CurrPoint.TypeValue + "【" + WeldMoveStep.CurrPoint.pointName + "】 移动机械臂");
MoveToPoint(WeldMoveStep.CurrPoint, false); MoveToPoint(WeldMoveStep.CurrPoint );
} }
} }
private static void PointEndPross() private static void PointEndPross()
......
...@@ -261,6 +261,10 @@ namespace URSoldering.DeviceLibrary ...@@ -261,6 +261,10 @@ namespace URSoldering.DeviceLibrary
{ {
return "普通焊点"; return "普通焊点";
} }
else if (pointType.Equals(2))
{
return "拖焊焊点";
}
else else
{ {
return "中间点"; return "中间点";
......
...@@ -135,7 +135,7 @@ namespace URSoldering.DeviceLibrary ...@@ -135,7 +135,7 @@ namespace URSoldering.DeviceLibrary
} }
public static bool IsFixtureClamp() public static bool IsFixtureClamp()
{ {
//return true; return true;
if (KNDIOValue(IO_Type.Fixture_Clamp).Equals(IO_VALUE.HIGH) && KNDIOValue(IO_Type.Fixture_Relax).Equals(IO_VALUE.LOW)) if (KNDIOValue(IO_Type.Fixture_Clamp).Equals(IO_VALUE.HIGH) && KNDIOValue(IO_Type.Fixture_Relax).Equals(IO_VALUE.LOW))
{ {
return true; return true;
...@@ -148,7 +148,7 @@ namespace URSoldering.DeviceLibrary ...@@ -148,7 +148,7 @@ namespace URSoldering.DeviceLibrary
} }
public static bool ShuddenOK() public static bool ShuddenOK()
{ {
//return true; return true;
if (!baseConfig.RobotDIList.ContainsKey(IO_Type.SuddenStop_Single)) if (!baseConfig.RobotDIList.ContainsKey(IO_Type.SuddenStop_Single))
{ {
return false; return false;
......
...@@ -32,8 +32,10 @@ ...@@ -32,8 +32,10 @@
<add key="Default_BoardID" value="56" /> <add key="Default_BoardID" value="56" />
<add key="Board_Origin_X" value="-105.1" /> <add key="Board_Origin_X" value="-105.1" />
<add key="Board_Origin_Y" value="-386.33" /> <add key="Board_Origin_Y" value="-386.33" />
<!--机器人抬起高点设置--> <!--机器人Z轴最低点设置-->
<add key="Soldering_LIM_Z" value="500" /> <add key="Soldering_LIM_Z" value="0" />
<!--焊接时Z轴抬起的高度-->
<add key ="ZUpLiftValue" value ="10"/>
<!--程序图片路径--> <!--程序图片路径-->
<add key="Board_Image_Path" value="\RobotConfig\config" /> <add key="Board_Image_Path" value="\RobotConfig\config" />
<!--程序默认图片--> <!--程序默认图片-->
......
...@@ -159,6 +159,7 @@ namespace URSoldering.Client ...@@ -159,6 +159,7 @@ namespace URSoldering.Client
List<WeldPointInfo> npoint = new List<WeldPointInfo>(); List<WeldPointInfo> npoint = new List<WeldPointInfo>();
npoint.Add(new WeldPointInfo(0)); npoint.Add(new WeldPointInfo(0));
npoint.Add(new WeldPointInfo(1)); npoint.Add(new WeldPointInfo(1));
npoint.Add(new WeldPointInfo(2));
this.Column_pointType.DataSource = npoint; this.Column_pointType.DataSource = npoint;
this.Column_pointType.ValueMember = "pointType"; this.Column_pointType.ValueMember = "pointType";
this.Column_pointType.DisplayMember = "TypeValue"; this.Column_pointType.DisplayMember = "TypeValue";
......
...@@ -118,9 +118,9 @@ ...@@ -118,9 +118,9 @@
this.groupBox1.Controls.Add(this.label2); this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.txtName); this.groupBox1.Controls.Add(this.txtName);
this.groupBox1.Controls.Add(this.label1); this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Location = new System.Drawing.Point(33, 30); this.groupBox1.Location = new System.Drawing.Point(17, 30);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(470, 119); this.groupBox1.Size = new System.Drawing.Size(497, 119);
this.groupBox1.TabIndex = 59; this.groupBox1.TabIndex = 59;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "焊点基本信息"; this.groupBox1.Text = "焊点基本信息";
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
// lblMsg // lblMsg
// //
this.lblMsg.AutoSize = true; this.lblMsg.AutoSize = true;
this.lblMsg.Location = new System.Drawing.Point(233, 68); this.lblMsg.Location = new System.Drawing.Point(203, 70);
this.lblMsg.Name = "lblMsg"; this.lblMsg.Name = "lblMsg";
this.lblMsg.Size = new System.Drawing.Size(92, 17); this.lblMsg.Size = new System.Drawing.Size(92, 17);
this.lblMsg.TabIndex = 66; this.lblMsg.TabIndex = 66;
...@@ -181,10 +181,11 @@ ...@@ -181,10 +181,11 @@
this.cmbPointType.FormattingEnabled = true; this.cmbPointType.FormattingEnabled = true;
this.cmbPointType.Items.AddRange(new object[] { this.cmbPointType.Items.AddRange(new object[] {
"普通焊点", "普通焊点",
"中间点"}); "中间点",
"拖焊焊点"});
this.cmbPointType.Location = new System.Drawing.Point(92, 65); this.cmbPointType.Location = new System.Drawing.Point(92, 65);
this.cmbPointType.Name = "cmbPointType"; this.cmbPointType.Name = "cmbPointType";
this.cmbPointType.Size = new System.Drawing.Size(121, 25); this.cmbPointType.Size = new System.Drawing.Size(103, 25);
this.cmbPointType.TabIndex = 61; this.cmbPointType.TabIndex = 61;
this.cmbPointType.SelectedIndexChanged += new System.EventHandler(this.cmbPointType_SelectedIndexChanged); this.cmbPointType.SelectedIndexChanged += new System.EventHandler(this.cmbPointType_SelectedIndexChanged);
// //
...@@ -278,9 +279,9 @@ ...@@ -278,9 +279,9 @@
this.gbIron.Controls.Add(this.lblIronTime); this.gbIron.Controls.Add(this.lblIronTime);
this.gbIron.Controls.Add(this.txtDweldTemperature); this.gbIron.Controls.Add(this.txtDweldTemperature);
this.gbIron.Controls.Add(this.txtDweldTime); this.gbIron.Controls.Add(this.txtDweldTime);
this.gbIron.Location = new System.Drawing.Point(33, 155); this.gbIron.Location = new System.Drawing.Point(17, 155);
this.gbIron.Name = "gbIron"; this.gbIron.Name = "gbIron";
this.gbIron.Size = new System.Drawing.Size(470, 188); this.gbIron.Size = new System.Drawing.Size(497, 188);
this.gbIron.TabIndex = 55; this.gbIron.TabIndex = 55;
this.gbIron.TabStop = false; this.gbIron.TabStop = false;
this.gbIron.Text = "烙铁温度"; this.gbIron.Text = "烙铁温度";
...@@ -525,9 +526,9 @@ ...@@ -525,9 +526,9 @@
this.gbWireFeeding.Controls.Add(this.lblWirdFeedingTime); this.gbWireFeeding.Controls.Add(this.lblWirdFeedingTime);
this.gbWireFeeding.Controls.Add(this.txtStartDsendWireSpeed); this.gbWireFeeding.Controls.Add(this.txtStartDsendWireSpeed);
this.gbWireFeeding.Controls.Add(this.txtDsendWireTime); this.gbWireFeeding.Controls.Add(this.txtDsendWireTime);
this.gbWireFeeding.Location = new System.Drawing.Point(33, 349); this.gbWireFeeding.Location = new System.Drawing.Point(17, 349);
this.gbWireFeeding.Name = "gbWireFeeding"; this.gbWireFeeding.Name = "gbWireFeeding";
this.gbWireFeeding.Size = new System.Drawing.Size(470, 116); this.gbWireFeeding.Size = new System.Drawing.Size(497, 116);
this.gbWireFeeding.TabIndex = 56; this.gbWireFeeding.TabIndex = 56;
this.gbWireFeeding.TabStop = false; this.gbWireFeeding.TabStop = false;
this.gbWireFeeding.Text = "送丝"; this.gbWireFeeding.Text = "送丝";
......
...@@ -295,7 +295,7 @@ namespace URSoldering.Client ...@@ -295,7 +295,7 @@ namespace URSoldering.Client
{ {
if (cmbPointType.SelectedIndex.Equals(0)) if (cmbPointType.SelectedIndex.Equals(0))
{ {
lblMsg .Text= "正常焊接的焊点"; lblMsg .Text= "普通焊点,机械臂先抬起再移动至焊点";
gbIron.Enabled = true ; gbIron.Enabled = true ;
gbWireFeeding.Enabled = true ; gbWireFeeding.Enabled = true ;
} }
...@@ -304,6 +304,11 @@ namespace URSoldering.Client ...@@ -304,6 +304,11 @@ namespace URSoldering.Client
lblMsg.Text = "两个焊点之间的位置跳转点"; lblMsg.Text = "两个焊点之间的位置跳转点";
gbIron.Enabled = false; gbIron.Enabled = false;
gbWireFeeding.Enabled = false; gbWireFeeding.Enabled = false;
}else if (cmbPointType.SelectedIndex.Equals(2))
{
lblMsg.Text = "拖焊焊点,机械臂不抬起直接移动至焊点";
gbIron.Enabled = true;
gbWireFeeding.Enabled = true;
} }
} }
} }
......
...@@ -295,7 +295,7 @@ namespace URSoldering.Client ...@@ -295,7 +295,7 @@ namespace URSoldering.Client
lvi.SubItems.Add(point.RobotX.ToString()); lvi.SubItems.Add(point.RobotX.ToString());
lvi.SubItems.Add(point.RobotY.ToString()); lvi.SubItems.Add(point.RobotY.ToString());
lvi.SubItems.Add(point.RobotZ.ToString()); lvi.SubItems.Add(point.RobotZ.ToString());
if (point.pointType.Equals(0)) if (point.pointType.Equals(0)||point.pointType.Equals(2))
{ {
lvi.SubItems.Add(point.preheatTemperature.ToString() + "°C"); lvi.SubItems.Add(point.preheatTemperature.ToString() + "°C");
lvi.SubItems.Add(point.weldTemperature.ToString() + "°C"); lvi.SubItems.Add(point.weldTemperature.ToString() + "°C");
......
...@@ -12,5 +12,15 @@ UR机器人是否到位判断条件修改:只判断X.Y.Z坐标是否一致 ...@@ -12,5 +12,15 @@ UR机器人是否到位判断条件修改:只判断X.Y.Z坐标是否一致
20180917修改:增加三色信号灯塔 20180917修改:增加三色信号灯塔
20181008
1.拖焊功能
2.焊接位置和实际位置不对
3.mac点识别焊点位置
修改内容:
注释急停和夹具的判断
增加拖焊点的配置
拖焊点直接移动,普通焊点先移动至焊点高处,再下降焊接
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!