Commit 08566aa2 几米阳光

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

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