Commit 4ba556c0 几米阳光

增加中间点的配置功能

1 个父辈 4024e72c
...@@ -15,11 +15,7 @@ namespace URSoldering.DeviceLibrary ...@@ -15,11 +15,7 @@ namespace URSoldering.DeviceLibrary
public delegate void AOICheck( ); public delegate void AOICheck( );
public static event AOICheck AOICheckFun; public static event AOICheck AOICheckFun;
public static string StartWeld() public static string StartWeld( )
{
return StartWeld(0);
}
public static string StartWeld(int type)
{ {
StopSleep(); StopSleep();
KeepTemp(); KeepTemp();
...@@ -44,7 +40,7 @@ namespace URSoldering.DeviceLibrary ...@@ -44,7 +40,7 @@ namespace URSoldering.DeviceLibrary
WeldCount++; WeldCount++;
LogUtil.info(RobotName + "开始【" + BoardManager.CurrBoard.boardName + "】的焊接 ,WeldCount="+WeldCount); LogUtil.info(RobotName + "开始【" + BoardManager.CurrBoard.boardName + "】的焊接 ,WeldCount="+WeldCount);
if (!WeldMoveStep.NewWeld(MoveType.Weld, BoardManager.CurrBoard, type)) if (!WeldMoveStep.NewWeld(MoveType.Weld, BoardManager.CurrBoard))
{ {
return "没有找到需要焊接的焊点,启动焊接失败!"; return "没有找到需要焊接的焊点,启动焊接失败!";
} }
...@@ -69,6 +65,8 @@ namespace URSoldering.DeviceLibrary ...@@ -69,6 +65,8 @@ namespace URSoldering.DeviceLibrary
} }
else if (WeldMoveStep.moveStep.Equals(MoveStep.W01_RobotMoveToPoint)) else if (WeldMoveStep.moveStep.Equals(MoveStep.W01_RobotMoveToPoint))
{ {
if (WeldMoveStep.CurrPoint.pointType.Equals(0))
{
if (WeldMoveStep.IsSlowSendWire) if (WeldMoveStep.IsSlowSendWire)
{ {
...@@ -90,6 +88,11 @@ namespace URSoldering.DeviceLibrary ...@@ -90,6 +88,11 @@ namespace URSoldering.DeviceLibrary
} }
} }
} }
else
{
PointEndPross();
}
}
else if (WeldMoveStep.moveStep.Equals(MoveStep.W02_SlowSendWire)) else if (WeldMoveStep.moveStep.Equals(MoveStep.W02_SlowSendWire))
{ {
WeldMoveStep.NextMoveStep(MoveStep.W03_SendWire); WeldMoveStep.NextMoveStep(MoveStep.W03_SendWire);
...@@ -184,12 +187,19 @@ namespace URSoldering.DeviceLibrary ...@@ -184,12 +187,19 @@ namespace URSoldering.DeviceLibrary
{ {
SetPreTemp(true, false); SetPreTemp(true, false);
} }
LogUtil.info(" 新焊点【" + WeldMoveStep.CurrPoint.pointName + "】预热" + WeldMoveStep.CurrPoint.preheatTemperature + "度,送丝下降,移动机械臂"); if (WeldMoveStep.CurrPoint.pointType.Equals(0))
{
LogUtil.info(" 新" + WeldMoveStep.CurrPoint.TypeValue + "【" + WeldMoveStep.CurrPoint.pointName + "】预热" + WeldMoveStep.CurrPoint.preheatTemperature + "度,送丝下降,移动机械臂");
MoveToPoint(WeldMoveStep.CurrPoint, false); MoveToPoint(WeldMoveStep.CurrPoint, false);
WorkCountManager.AddWeldPint(); WorkCountManager.AddWeldPint();
WeldMoveStep.IsSlowSendWire = true; WeldMoveStep.IsSlowSendWire = true;
SlowSendWire(); SlowSendWire();
}
else
{
LogUtil.info(" 新" + WeldMoveStep.CurrPoint.TypeValue + "【" + WeldMoveStep.CurrPoint.pointName + "】 移动机械臂");
MoveToPoint(WeldMoveStep.CurrPoint, false);
}
} }
private static void PointEndPross() private static void PointEndPross()
{ {
......
...@@ -3,6 +3,7 @@ using System; ...@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using URSoldering.Common;
namespace URSoldering.DeviceLibrary namespace URSoldering.DeviceLibrary
{ {
...@@ -92,8 +93,8 @@ namespace URSoldering.DeviceLibrary ...@@ -92,8 +93,8 @@ namespace URSoldering.DeviceLibrary
/// <summary> /// <summary>
/// 开始焊接 /// 开始焊接
/// </summary> /// </summary>
/// <param name="pointType">焊点类型,0=所有,1=只焊接左侧,2=只焊接右侧</param> /// <param name="pointType">焊点类型,0=所有 </param>
public bool NewWeld(MoveType type, BoardInfo board, int pointType) public bool NewWeld(MoveType type, BoardInfo board )
{ {
IsSlowSendWire = false; IsSlowSendWire = false;
StartPointIndex = 0; StartPointIndex = 0;
...@@ -101,14 +102,14 @@ namespace URSoldering.DeviceLibrary ...@@ -101,14 +102,14 @@ namespace URSoldering.DeviceLibrary
NewWeld(type); NewWeld(type);
this.currBoard = board; this.currBoard = board;
CurrPointIndex = 0; CurrPointIndex = 0;
if (pointType.Equals(0)) //if (pointType.Equals(0))
{ //{
weldPointList = board.pointList; weldPointList = board.pointList;
} //}
else //else
{ //{
weldPointList = (from m in board.pointList where m.pointType.Equals(pointType) && m.pointType.Equals(0) select m).ToList<WeldPointInfo>(); // weldPointList = (from m in board.pointList where m.pointType.Equals(pointType) && m.pointType.Equals(0) select m).ToList<WeldPointInfo>();
} //}
if (weldPointList.Count <= 0) if (weldPointList.Count <= 0)
{ {
return false; return false;
...@@ -117,6 +118,8 @@ namespace URSoldering.DeviceLibrary ...@@ -117,6 +118,8 @@ namespace URSoldering.DeviceLibrary
{ {
if (!URRobotControl.PointIsValid(p.GetURPoint())) if (!URRobotControl.PointIsValid(p.GetURPoint()))
{ {
LogUtil.error("【"+ board .boardName+ "】的焊点【"+p.pointName+"】坐标无效,无法开始焊接");
return false; return false;
} }
} }
......
...@@ -168,9 +168,9 @@ namespace URSoldering.DeviceLibrary ...@@ -168,9 +168,9 @@ namespace URSoldering.DeviceLibrary
isNeedClear = false; isNeedClear = false;
pointType = 0; pointType = 0;
} }
public WeldPointInfo(int hand) public WeldPointInfo(int type)
{ {
//this.HandDirection = hand; this.pointType = type;
} }
/// <summary> /// <summary>
...@@ -184,7 +184,7 @@ namespace URSoldering.DeviceLibrary ...@@ -184,7 +184,7 @@ namespace URSoldering.DeviceLibrary
public string pointName { get; set; } public string pointName { get; set; }
public double RobotX { get; set; } public double RobotX { get; set; }
public double RoobtY { get; set; } public double RobotY { get; set; }
public double RobotZ { get; set; } public double RobotZ { get; set; }
public double RobotRX { get; set; } public double RobotRX { get; set; }
public double RobotRY { get; set; } public double RobotRY { get; set; }
...@@ -242,7 +242,7 @@ namespace URSoldering.DeviceLibrary ...@@ -242,7 +242,7 @@ namespace URSoldering.DeviceLibrary
public double sendWireTime { get; set; } public double sendWireTime { get; set; }
/// <summary> /// <summary>
/// 焊点类型,0=普通焊点,必须要焊接,1=左侧焊点,起始运行模式不焊接。2=右侧焊点,排料模式不焊接 /// 焊点类型,0=普通焊点,必须要焊接,1=中间点,机器人跳转位置使用
/// </summary> /// </summary>
public int pointType { get; set; } public int pointType { get; set; }
/// <summary> /// <summary>
...@@ -253,10 +253,25 @@ namespace URSoldering.DeviceLibrary ...@@ -253,10 +253,25 @@ namespace URSoldering.DeviceLibrary
/// 清洗时间,毫秒数 /// 清洗时间,毫秒数
/// </summary> /// </summary>
public int ClearTime { get; set; } public int ClearTime { get; set; }
public string TypeValue
{
get
{
if (pointType.Equals(0))
{
return "普通焊点";
}
else
{
return "中间点";
}
} set
{
}
}
public URPointValue GetURPoint() public URPointValue GetURPoint()
{ {
URPointValue p = new URPointValue(RobotX, RoobtY, RobotZ, RobotRX, RobotRY, RobotRZ); URPointValue p = new URPointValue(RobotX, RobotY, RobotZ, RobotRX, RobotRY, RobotRZ);
return p; return p;
} }
......
...@@ -187,7 +187,8 @@ namespace URSoldering.DeviceLibrary ...@@ -187,7 +187,8 @@ namespace URSoldering.DeviceLibrary
//关闭所有的DO //关闭所有的DO
public static void CloseAllDO() public static void CloseAllDO()
{ {
foreach (string key in mastMap.Keys) List<string> keyList = new List<string>(mastMap.Keys);
foreach (string key in keyList)
{ {
byte[] data = new byte[] { 0,0}; byte[] data = new byte[] { 0,0};
WriteMultipleDO(key, DefualtSlaveID, DoStartAddress, DefaultDOLength, data); WriteMultipleDO(key, DefualtSlaveID, DoStartAddress, DefaultDOLength, data);
......
...@@ -54,21 +54,15 @@ namespace URSoldering.Client ...@@ -54,21 +54,15 @@ namespace URSoldering.Client
StepValue = 0.5; StepValue = 0.5;
tckSpeed.Value = 3; tckSpeed.Value = 3;
isFinishLoad = false; isFinishLoad = false;
//cmbOrgType.SelectedIndex = 0; LoadType();
//LoadProgram();
if (isNew == false) if (isNew == false)
{ {
LoadBoardInfo(); LoadBoardInfo();
} }
else
{
//this.txtOriginX.Text = ConfigAppSettings.GetValue(Setting_Init.BOARD_ORIGIN_X);
//this.txtOriginY.Text = ConfigAppSettings.GetValue(Setting_Init.BOARD_ORIGIN_Y);
}
loadPictureBoxSize(); loadPictureBoxSize();
LOGGER.Info("load image " + picBoard.Name); LOGGER.Info("load image " + picBoard.Name);
txtBoardName.Focus(); txtBoardName.Focus();
LoadCom(); LoadAOIList();
if (WeldRobotBean.ISRun) if (WeldRobotBean.ISRun)
{ {
LogUtil.error("进入焊接界面,发现WeldRobotBean自动运行中,关闭自动运行"); LogUtil.error("进入焊接界面,发现WeldRobotBean自动运行中,关闭自动运行");
...@@ -117,7 +111,7 @@ namespace URSoldering.Client ...@@ -117,7 +111,7 @@ namespace URSoldering.Client
isFinishLoad = true; isFinishLoad = true;
} }
List<string> FileList = new List<string>(); List<string> FileList = new List<string>();
private void LoadCom() private void LoadAOIList()
{ {
try try
{ {
...@@ -160,6 +154,15 @@ namespace URSoldering.Client ...@@ -160,6 +154,15 @@ namespace URSoldering.Client
LogUtil.error("加载出错:" + ex.ToString()); LogUtil.error("加载出错:" + ex.ToString());
} }
} }
private void LoadType()
{
List<WeldPointInfo> npoint = new List<WeldPointInfo>();
npoint.Add(new WeldPointInfo(0));
npoint.Add(new WeldPointInfo(1));
this.Column_pointType.DataSource = npoint;
this.Column_pointType.ValueMember = "pointType";
this.Column_pointType.DisplayMember = "TypeValue";
}
private void UpdateRobotPosition() private void UpdateRobotPosition()
{ {
URPointValue point = URRobotControl.GetLastPosition(); URPointValue point = URRobotControl.GetLastPosition();
...@@ -172,6 +175,18 @@ namespace URSoldering.Client ...@@ -172,6 +175,18 @@ namespace URSoldering.Client
} }
private bool SureMoveRobot() private bool SureMoveRobot()
{ {
if (URRobotControl.IsRun.Equals(false))
{
if (label11.Text.Equals(""))
{
MessageBox.Show("机器人未连接成功", "提示");
}
else
{
MessageBox.Show(label11.Text, "提示");
}
return false;
}
if (chbIsSafe.Checked) if (chbIsSafe.Checked)
{ {
return true; return true;
...@@ -232,7 +247,7 @@ namespace URSoldering.Client ...@@ -232,7 +247,7 @@ namespace URSoldering.Client
view.Cells[0].Value = point.pointNum.ToString(); view.Cells[0].Value = point.pointNum.ToString();
view.Cells[1].Value = point.pointName; view.Cells[1].Value = point.pointName;
view.Cells[2].Value = point.RobotX.ToString(); view.Cells[2].Value = point.RobotX.ToString();
view.Cells[3].Value = point.RoobtY.ToString(); view.Cells[3].Value = point.RobotY.ToString();
view.Cells[4].Value = point.RobotZ.ToString(); view.Cells[4].Value = point.RobotZ.ToString();
view.Cells[5].Value = point.RobotRX.ToString(); view.Cells[5].Value = point.RobotRX.ToString();
view.Cells[6].Value = point.RobotRY.ToString(); view.Cells[6].Value = point.RobotRY.ToString();
...@@ -250,7 +265,7 @@ namespace URSoldering.Client ...@@ -250,7 +265,7 @@ namespace URSoldering.Client
view.Cells[17].Value = point.startSendWireTime.ToString(); view.Cells[17].Value = point.startSendWireTime.ToString();
view.Cells[18].Value = point.sendWireSpeed.ToString(); view.Cells[18].Value = point.sendWireSpeed.ToString();
view.Cells[19].Value = point.sendWireTime.ToString(); view.Cells[19].Value = point.sendWireTime.ToString();
view.Cells[20].Value = point.pointType.ToString(); view.Cells[20].Value = point.pointType;
view.Cells[21].Value = point.isNeedClear.ToString(); view.Cells[21].Value = point.isNeedClear.ToString();
view.Cells[22].Value = point.ClearTime; view.Cells[22].Value = point.ClearTime;
return view; return view;
...@@ -436,6 +451,11 @@ namespace URSoldering.Client ...@@ -436,6 +451,11 @@ namespace URSoldering.Client
private void UpdateRow(int rowIndex) private void UpdateRow(int rowIndex)
{ {
URPointValue point = URRobotControl.GetLastPosition();
DialogResult result = MessageBox.Show("当前坐标:" + point.ToShowStr() + ",是否确定更新?", "提示", MessageBoxButtons.YesNo);
if (result.Equals(DialogResult.Yes))
{
int x_colIndex = dgvList.Columns[this.Column_X.Name].Index; int x_colIndex = dgvList.Columns[this.Column_X.Name].Index;
int y_colIndex = dgvList.Columns[Column_Y.Name].Index; int y_colIndex = dgvList.Columns[Column_Y.Name].Index;
int z_colIndex = dgvList.Columns[Column_Z.Name].Index; int z_colIndex = dgvList.Columns[Column_Z.Name].Index;
...@@ -458,6 +478,7 @@ namespace URSoldering.Client ...@@ -458,6 +478,7 @@ namespace URSoldering.Client
dgvList.UpdateCellValue(ry_colIndex, rowIndex); dgvList.UpdateCellValue(ry_colIndex, rowIndex);
dgvList.UpdateCellValue(rz_colIndex, rowIndex); dgvList.UpdateCellValue(rz_colIndex, rowIndex);
} }
}
private void DeleteRow(int rowIndex) private void DeleteRow(int rowIndex)
{ {
...@@ -692,7 +713,7 @@ namespace URSoldering.Client ...@@ -692,7 +713,7 @@ namespace URSoldering.Client
point.pointNum = Convert.ToInt32(row.Cells[this.Column_pointNum.Name].Value.ToString()); point.pointNum = Convert.ToInt32(row.Cells[this.Column_pointNum.Name].Value.ToString());
point.RobotX = Convert.ToDouble(row.Cells[this.Column_X.Name].Value.ToString()); point.RobotX = Convert.ToDouble(row.Cells[this.Column_X.Name].Value.ToString());
point.RoobtY = Convert.ToDouble(row.Cells[this.Column_Y.Name].Value.ToString()); point.RobotY = Convert.ToDouble(row.Cells[this.Column_Y.Name].Value.ToString());
point.RobotZ = Convert.ToDouble(row.Cells[this.Column_Z.Name].Value.ToString()); point.RobotZ = Convert.ToDouble(row.Cells[this.Column_Z.Name].Value.ToString());
point.RobotRX = Convert.ToDouble(row.Cells[this.Column_RX.Name].Value.ToString()); point.RobotRX = Convert.ToDouble(row.Cells[this.Column_RX.Name].Value.ToString());
point.RobotRY = Convert.ToDouble(row.Cells[this.Column_RY.Name].Value.ToString()); point.RobotRY = Convert.ToDouble(row.Cells[this.Column_RY.Name].Value.ToString());
...@@ -1011,44 +1032,36 @@ namespace URSoldering.Client ...@@ -1011,44 +1032,36 @@ namespace URSoldering.Client
{ {
WeldPointInfo point = new WeldPointInfo(); WeldPointInfo point = new WeldPointInfo();
string name = "P" + (dgvList.Rows.Count + 1); string name = "P" + (dgvList.Rows.Count + 1);
FrmPointInfo fwpi = new FrmPointInfo(name,robotP); //FrmPointInfo fwpi = new FrmPointInfo(name,robotP);
DialogResult result = fwpi.ShowDialog(); //DialogResult result = fwpi.ShowDialog();
FrmPointInfo fwpi = new FrmPointInfo(name, robotP);
fwpi.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
fwpi.FormBorderStyle = FormBorderStyle.None;
fwpi.StartPosition = FormStartPosition.CenterParent;
fwpi.OnCloseEnd += NewPointClosePorcess;
fwpi.TopLevel = false;
fwpi.Parent = this.panPoint;
panPoint.Visible = true;
fwpi.Location = new Point(0, 0);
fwpi.Size = panPoint.Size;
this.dgvList.Visible = false;
fwpi.Show();
}
private void NewPointClosePorcess(DialogResult result, WeldPointInfo point)
{
if (result.Equals(DialogResult.OK)) if (result.Equals(DialogResult.OK))
{ {
point = fwpi.weldPointInfo; dgvList.Rows.Add(setPointInfo(null, point));
DataGridViewRow view = new DataGridViewRow();
view.CreateCells(dgvList);
view.Cells[0].Value = point.pointNum.ToString();
view.Cells[1].Value = point.pointName;
view.Cells[2].Value = point.RobotX.ToString();
view.Cells[3].Value = point.RoobtY.ToString();
view.Cells[4].Value = point.RobotZ.ToString();
view.Cells[5].Value = point.RobotRX.ToString();
view.Cells[6].Value = point.RobotRY.ToString();
view.Cells[7].Value = point.RobotRZ.ToString();
view.Cells[8].Value = point.preheatTemperature.ToString();
view.Cells[9].Value = point.preheatTemperatureMax.ToString();
view.Cells[10].Value = point.preheatTemperatureMin.ToString();
view.Cells[11].Value = point.preheatTime.ToString();
view.Cells[12].Value = point.weldTemperature.ToString();
view.Cells[13].Value = point.weldTemperatureMax.ToString();
view.Cells[14].Value = point.weldTemperatureMin.ToString();
view.Cells[15].Value = point.weldTime.ToString();
view.Cells[16].Value = point.startSendWireSpeed.ToString();
view.Cells[17].Value = point.startSendWireTime.ToString();
view.Cells[18].Value = point.sendWireSpeed.ToString();
view.Cells[19].Value = point.sendWireTime.ToString();
view.Cells[20].Value = point.pointType.ToString();
view.Cells[21].Value = point.isNeedClear.ToString();
view.Cells[22].Value = point.ClearTime;
dgvList.Rows.Add(view);
if (isFinishLoad && this.txtBoardLength.Text.Trim() != "" && this.txtBoardWidth.Text.Trim() != "") if (isFinishLoad && this.txtBoardLength.Text.Trim() != "" && this.txtBoardWidth.Text.Trim() != "")
{ {
loadPictureBoxSize(); loadPictureBoxSize();
} }
} }
panPoint.Visible = false;
this.dgvList.Visible = true;
} }
Point m_MouseDownPoint = new Point(0); Point m_MouseDownPoint = new Point(0);
private void picBoard_MouseDown(object sender, MouseEventArgs e) private void picBoard_MouseDown(object sender, MouseEventArgs e)
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
{ {
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.txtCode = new System.Windows.Forms.TextBox(); this.txtAOIName = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label(); this.label10 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label();
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.txtCode); this.groupBox2.Controls.Add(this.txtAOIName);
this.groupBox2.Controls.Add(this.label10); this.groupBox2.Controls.Add(this.label10);
this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.label9);
this.groupBox2.Controls.Add(this.label8); this.groupBox2.Controls.Add(this.label8);
...@@ -106,27 +106,27 @@ ...@@ -106,27 +106,27 @@
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "程序信息"; this.groupBox2.Text = "程序信息";
// //
// txtCode // txtAOIName
// //
this.txtCode.Enabled = false; this.txtAOIName.Enabled = false;
this.txtCode.Location = new System.Drawing.Point(322, 23); this.txtAOIName.Location = new System.Drawing.Point(353, 23);
this.txtCode.Name = "txtCode"; this.txtAOIName.Name = "txtAOIName";
this.txtCode.Size = new System.Drawing.Size(135, 23); this.txtAOIName.Size = new System.Drawing.Size(177, 23);
this.txtCode.TabIndex = 41; this.txtAOIName.TabIndex = 41;
// //
// label10 // label10
// //
this.label10.AutoSize = true; this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(265, 27); this.label10.Location = new System.Drawing.Point(280, 26);
this.label10.Name = "label10"; this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(56, 17); this.label10.Size = new System.Drawing.Size(66, 17);
this.label10.TabIndex = 40; this.label10.TabIndex = 40;
this.label10.Text = "条码:"; this.label10.Text = "AOI程序:";
// //
// label9 // label9
// //
this.label9.AutoSize = true; this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(422, 68); this.label9.Location = new System.Drawing.Point(453, 68);
this.label9.Name = "label9"; this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(35, 17); this.label9.Size = new System.Drawing.Size(35, 17);
this.label9.TabIndex = 39; this.label9.TabIndex = 39;
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
// label8 // label8
// //
this.label8.AutoSize = true; this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(142, 67); this.label8.Location = new System.Drawing.Point(150, 68);
this.label8.Name = "label8"; this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(30, 17); this.label8.Size = new System.Drawing.Size(30, 17);
this.label8.TabIndex = 38; this.label8.TabIndex = 38;
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
// label24 // label24
// //
this.label24.AutoSize = true; this.label24.AutoSize = true;
this.label24.Location = new System.Drawing.Point(144, 108); this.label24.Location = new System.Drawing.Point(152, 108);
this.label24.Name = "label24"; this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(30, 17); this.label24.Size = new System.Drawing.Size(30, 17);
this.label24.TabIndex = 37; this.label24.TabIndex = 37;
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
// txtMianji // txtMianji
// //
this.txtMianji.Enabled = false; this.txtMianji.Enabled = false;
this.txtMianji.Location = new System.Drawing.Point(322, 65); this.txtMianji.Location = new System.Drawing.Point(353, 65);
this.txtMianji.Name = "txtMianji"; this.txtMianji.Name = "txtMianji";
this.txtMianji.Size = new System.Drawing.Size(94, 23); this.txtMianji.Size = new System.Drawing.Size(94, 23);
this.txtMianji.TabIndex = 36; this.txtMianji.TabIndex = 36;
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
// label7 // label7
// //
this.label7.AutoSize = true; this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(272, 69); this.label7.Location = new System.Drawing.Point(302, 68);
this.label7.Name = "label7"; this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(44, 17); this.label7.Size = new System.Drawing.Size(44, 17);
this.label7.TabIndex = 35; this.label7.TabIndex = 35;
...@@ -172,9 +172,9 @@ ...@@ -172,9 +172,9 @@
this.listPoint.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.listPoint.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left))); | System.Windows.Forms.AnchorStyles.Left)));
this.listPoint.GridLines = true; this.listPoint.GridLines = true;
this.listPoint.Location = new System.Drawing.Point(22, 142); this.listPoint.Location = new System.Drawing.Point(12, 141);
this.listPoint.Name = "listPoint"; this.listPoint.Name = "listPoint";
this.listPoint.Size = new System.Drawing.Size(461, 382); this.listPoint.Size = new System.Drawing.Size(572, 382);
this.listPoint.TabIndex = 34; this.listPoint.TabIndex = 34;
this.listPoint.UseCompatibleStateImageBehavior = false; this.listPoint.UseCompatibleStateImageBehavior = false;
this.listPoint.View = System.Windows.Forms.View.Details; this.listPoint.View = System.Windows.Forms.View.Details;
...@@ -197,9 +197,9 @@ ...@@ -197,9 +197,9 @@
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.panBoard.Controls.Add(this.picBoard); this.panBoard.Controls.Add(this.picBoard);
this.panBoard.Location = new System.Drawing.Point(489, 21); this.panBoard.Location = new System.Drawing.Point(601, 21);
this.panBoard.Name = "panBoard"; this.panBoard.Name = "panBoard";
this.panBoard.Size = new System.Drawing.Size(501, 502); this.panBoard.Size = new System.Drawing.Size(389, 502);
this.panBoard.TabIndex = 10; this.panBoard.TabIndex = 10;
// //
// picBoard // picBoard
...@@ -210,7 +210,7 @@ ...@@ -210,7 +210,7 @@
this.picBoard.BackColor = System.Drawing.Color.Green; this.picBoard.BackColor = System.Drawing.Color.Green;
this.picBoard.Location = new System.Drawing.Point(3, 3); this.picBoard.Location = new System.Drawing.Point(3, 3);
this.picBoard.Name = "picBoard"; this.picBoard.Name = "picBoard";
this.picBoard.Size = new System.Drawing.Size(428, 225); this.picBoard.Size = new System.Drawing.Size(316, 225);
this.picBoard.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.picBoard.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.picBoard.TabIndex = 10; this.picBoard.TabIndex = 10;
this.picBoard.TabStop = false; this.picBoard.TabStop = false;
...@@ -218,7 +218,7 @@ ...@@ -218,7 +218,7 @@
// txtPointCount // txtPointCount
// //
this.txtPointCount.Enabled = false; this.txtPointCount.Enabled = false;
this.txtPointCount.Location = new System.Drawing.Point(323, 100); this.txtPointCount.Location = new System.Drawing.Point(354, 105);
this.txtPointCount.Name = "txtPointCount"; this.txtPointCount.Name = "txtPointCount";
this.txtPointCount.Size = new System.Drawing.Size(70, 23); this.txtPointCount.Size = new System.Drawing.Size(70, 23);
this.txtPointCount.TabIndex = 8; this.txtPointCount.TabIndex = 8;
...@@ -226,7 +226,7 @@ ...@@ -226,7 +226,7 @@
// label5 // label5
// //
this.label5.AutoSize = true; this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(262, 103); this.label5.Location = new System.Drawing.Point(290, 108);
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(56, 17); this.label5.Size = new System.Drawing.Size(56, 17);
this.label5.TabIndex = 7; this.label5.TabIndex = 7;
...@@ -235,7 +235,7 @@ ...@@ -235,7 +235,7 @@
// txtWidth // txtWidth
// //
this.txtWidth.Enabled = false; this.txtWidth.Enabled = false;
this.txtWidth.Location = new System.Drawing.Point(68, 106); this.txtWidth.Location = new System.Drawing.Point(76, 105);
this.txtWidth.Name = "txtWidth"; this.txtWidth.Name = "txtWidth";
this.txtWidth.Size = new System.Drawing.Size(70, 23); this.txtWidth.Size = new System.Drawing.Size(70, 23);
this.txtWidth.TabIndex = 6; this.txtWidth.TabIndex = 6;
...@@ -243,7 +243,7 @@ ...@@ -243,7 +243,7 @@
// label4 // label4
// //
this.label4.AutoSize = true; this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(19, 107); this.label4.Location = new System.Drawing.Point(24, 108);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(44, 17); this.label4.Size = new System.Drawing.Size(44, 17);
this.label4.TabIndex = 5; this.label4.TabIndex = 5;
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
// txtLength // txtLength
// //
this.txtLength.Enabled = false; this.txtLength.Enabled = false;
this.txtLength.Location = new System.Drawing.Point(68, 64); this.txtLength.Location = new System.Drawing.Point(76, 65);
this.txtLength.Name = "txtLength"; this.txtLength.Name = "txtLength";
this.txtLength.Size = new System.Drawing.Size(70, 23); this.txtLength.Size = new System.Drawing.Size(70, 23);
this.txtLength.TabIndex = 4; this.txtLength.TabIndex = 4;
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
// label3 // label3
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(18, 68); this.label3.Location = new System.Drawing.Point(24, 68);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(44, 17); this.label3.Size = new System.Drawing.Size(44, 17);
this.label3.TabIndex = 3; this.label3.TabIndex = 3;
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
// txtBoardName // txtBoardName
// //
this.txtBoardName.Enabled = false; this.txtBoardName.Enabled = false;
this.txtBoardName.Location = new System.Drawing.Point(68, 23); this.txtBoardName.Location = new System.Drawing.Point(76, 23);
this.txtBoardName.Name = "txtBoardName"; this.txtBoardName.Name = "txtBoardName";
this.txtBoardName.Size = new System.Drawing.Size(177, 23); this.txtBoardName.Size = new System.Drawing.Size(177, 23);
this.txtBoardName.TabIndex = 2; this.txtBoardName.TabIndex = 2;
...@@ -277,7 +277,7 @@ ...@@ -277,7 +277,7 @@
// label2 // label2
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(20, 27); this.label2.Location = new System.Drawing.Point(24, 26);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(44, 17); this.label2.Size = new System.Drawing.Size(44, 17);
this.label2.TabIndex = 1; this.label2.TabIndex = 1;
...@@ -424,7 +424,7 @@ ...@@ -424,7 +424,7 @@
private System.Windows.Forms.Label label24; private System.Windows.Forms.Label label24;
private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label9;
private System.Windows.Forms.Button btnCopy; private System.Windows.Forms.Button btnCopy;
private System.Windows.Forms.TextBox txtCode; private System.Windows.Forms.TextBox txtAOIName;
private System.Windows.Forms.Label label10; private System.Windows.Forms.Label label10;
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -22,6 +22,14 @@ namespace URSoldering.Client ...@@ -22,6 +22,14 @@ namespace URSoldering.Client
{ {
LoadCom(); LoadCom();
} }
private void AddColumn(string text,int width)
{
ColumnHeader chName = new ColumnHeader();
chName.Text =text ; //设置列标题
chName.Width = width; //设置列宽度
chName.TextAlign = HorizontalAlignment.Left; //设置列的对齐方式
this.listPoint.Columns.Add(chName); //将列头添加到ListView控件。
}
private void LoadCom() private void LoadCom()
{ {
List<BoardInfo> newList = (from m in BoardManager.boardList orderby m.PartNumber ascending, m.boardName ascending select m).ToList<BoardInfo>(); List<BoardInfo> newList = (from m in BoardManager.boardList orderby m.PartNumber ascending, m.boardName ascending select m).ToList<BoardInfo>();
...@@ -34,31 +42,12 @@ namespace URSoldering.Client ...@@ -34,31 +42,12 @@ namespace URSoldering.Client
cmbBoardList.SelectedIndex = 0; cmbBoardList.SelectedIndex = 0;
} }
this.listPoint.Columns.Clear(); this.listPoint.Columns.Clear();
ColumnHeader chName = new ColumnHeader(); AddColumn("焊点名称", 120);
chName.Text = "焊点名称"; //设置列标题 AddColumn("类型", 90);
chName.Width = 150; //设置列宽度 AddColumn("预热温度", 90);
chName.TextAlign = HorizontalAlignment.Left; //设置列的对齐方式 AddColumn("焊接温度", 90);
this.listPoint.Columns.Add(chName); //将列头添加到ListView控件。 AddColumn("初始送丝", 90);
//ColumnHeader chValue = new ColumnHeader(); AddColumn("送丝量", 80);
//chValue.Text = "预热温度"; //设置列标题
//chValue.Width = 80; //设置列宽度
//chValue.TextAlign = HorizontalAlignment.Left; //设置列的对齐方式
//this.listPoint.Columns.Add(chValue); //将列头添加到ListView控件。
ColumnHeader chStatus = new ColumnHeader();
chStatus.Text = "焊接温度"; //设置列标题
chStatus.Width = 80; //设置列宽度
chStatus.TextAlign = HorizontalAlignment.Left; //设置列的对齐方式
this.listPoint.Columns.Add(chStatus); //将列头添加到ListView控件。
ColumnHeader preSendwire = new ColumnHeader();
preSendwire.Text = "初始送丝"; //设置列标题
preSendwire.Width = 80; //设置列宽度
preSendwire.TextAlign = HorizontalAlignment.Left; //设置列的对齐方式
this.listPoint.Columns.Add(preSendwire); //将列头添加到ListView控件。
ColumnHeader sendWire = new ColumnHeader();
sendWire.Text = "送丝量"; //设置列标题
sendWire.Width = 60; //设置列宽度
sendWire.TextAlign = HorizontalAlignment.Left; //设置列的对齐方式
this.listPoint.Columns.Add(sendWire); //将列头添加到ListView控件。
} }
private void btnSave_Click(object sender, EventArgs e) private void btnSave_Click(object sender, EventArgs e)
{ {
...@@ -95,7 +84,7 @@ namespace URSoldering.Client ...@@ -95,7 +84,7 @@ namespace URSoldering.Client
txtWidth.Text = board.boardWidth.ToString(); txtWidth.Text = board.boardWidth.ToString();
txtPointCount.Text = board.pointList.Count.ToString(); txtPointCount.Text = board.pointList.Count.ToString();
txtMianji.Text = (board.boardLength * board.boardWidth).ToString(); txtMianji.Text = (board.boardLength * board.boardWidth).ToString();
txtCode.Text = board.WareCode; txtAOIName.Text = board.AoiFileName;
loadPictureBoxSize(board); loadPictureBoxSize(board);
LoadPoint(board); LoadPoint(board);
} }
...@@ -116,6 +105,8 @@ namespace URSoldering.Client ...@@ -116,6 +105,8 @@ namespace URSoldering.Client
lvi.ImageIndex = i; lvi.ImageIndex = i;
lvi.Text = point.pointName; lvi.Text = point.pointName;
lvi.SubItems.Add(point.TypeValue);
lvi.SubItems.Add(point.preheatTemperature.ToString());
lvi.SubItems.Add(point.weldTemperature.ToString()); lvi.SubItems.Add(point.weldTemperature.ToString());
lvi.SubItems.Add((point.startSendWireSpeed * point.startSendWireTime).ToString()); lvi.SubItems.Add((point.startSendWireSpeed * point.startSendWireTime).ToString());
lvi.SubItems.Add((point.sendWireTime * point.sendWireSpeed).ToString()); lvi.SubItems.Add((point.sendWireTime * point.sendWireSpeed).ToString());
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
{ {
this.groupPoint = new System.Windows.Forms.GroupBox(); this.groupPoint = new System.Windows.Forms.GroupBox();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label17 = new System.Windows.Forms.Label(); this.lblMsg = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label(); this.label16 = new System.Windows.Forms.Label();
this.txtClearTime = new System.Windows.Forms.TextBox(); this.txtClearTime = new System.Windows.Forms.TextBox();
this.label15 = new System.Windows.Forms.Label(); this.label15 = new System.Windows.Forms.Label();
...@@ -102,14 +102,14 @@ ...@@ -102,14 +102,14 @@
this.groupPoint.Controls.Add(this.gbWireFeeding); this.groupPoint.Controls.Add(this.gbWireFeeding);
this.groupPoint.Location = new System.Drawing.Point(3, 1); this.groupPoint.Location = new System.Drawing.Point(3, 1);
this.groupPoint.Name = "groupPoint"; this.groupPoint.Name = "groupPoint";
this.groupPoint.Size = new System.Drawing.Size(712, 487); this.groupPoint.Size = new System.Drawing.Size(737, 487);
this.groupPoint.TabIndex = 61; this.groupPoint.TabIndex = 61;
this.groupPoint.TabStop = false; this.groupPoint.TabStop = false;
this.groupPoint.Text = "修改焊点[P2]"; this.groupPoint.Text = "修改焊点[P2]";
// //
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.label17); this.groupBox1.Controls.Add(this.lblMsg);
this.groupBox1.Controls.Add(this.label16); this.groupBox1.Controls.Add(this.label16);
this.groupBox1.Controls.Add(this.txtClearTime); this.groupBox1.Controls.Add(this.txtClearTime);
this.groupBox1.Controls.Add(this.label15); this.groupBox1.Controls.Add(this.label15);
...@@ -118,22 +118,21 @@ ...@@ -118,22 +118,21 @@
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(21, 19); this.groupBox1.Location = new System.Drawing.Point(33, 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(470, 119);
this.groupBox1.TabIndex = 59; this.groupBox1.TabIndex = 59;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "焊点基本信息"; this.groupBox1.Text = "焊点基本信息";
// //
// label17 // lblMsg
// //
this.label17.AutoSize = true; this.lblMsg.AutoSize = true;
this.label17.Location = new System.Drawing.Point(219, 68); this.lblMsg.Location = new System.Drawing.Point(233, 68);
this.label17.Name = "label17"; this.lblMsg.Name = "lblMsg";
this.label17.Size = new System.Drawing.Size(92, 17); this.lblMsg.Size = new System.Drawing.Size(92, 17);
this.label17.TabIndex = 66; this.lblMsg.TabIndex = 66;
this.label17.Text = "正常焊接的焊点"; this.lblMsg.Text = "正常焊接的焊点";
this.label17.Visible = false;
// //
// label16 // label16
// //
...@@ -181,11 +180,13 @@ ...@@ -181,11 +180,13 @@
this.cmbPointType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbPointType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
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(121, 25);
this.cmbPointType.TabIndex = 61; this.cmbPointType.TabIndex = 61;
this.cmbPointType.SelectedIndexChanged += new System.EventHandler(this.cmbPointType_SelectedIndexChanged);
// //
// label2 // label2
// //
...@@ -217,7 +218,7 @@ ...@@ -217,7 +218,7 @@
// //
this.groupBox2.Controls.Add(this.urRobot); this.groupBox2.Controls.Add(this.urRobot);
this.groupBox2.Controls.Add(this.btnUpdate); this.groupBox2.Controls.Add(this.btnUpdate);
this.groupBox2.Location = new System.Drawing.Point(499, 139); this.groupBox2.Location = new System.Drawing.Point(527, 159);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(202, 306); this.groupBox2.Size = new System.Drawing.Size(202, 306);
this.groupBox2.TabIndex = 60; this.groupBox2.TabIndex = 60;
...@@ -243,7 +244,7 @@ ...@@ -243,7 +244,7 @@
// //
// btnSave // btnSave
// //
this.btnSave.Location = new System.Drawing.Point(540, 31); this.btnSave.Location = new System.Drawing.Point(581, 52);
this.btnSave.Name = "btnSave"; this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(120, 35); this.btnSave.Size = new System.Drawing.Size(120, 35);
this.btnSave.TabIndex = 57; this.btnSave.TabIndex = 57;
...@@ -277,7 +278,7 @@ ...@@ -277,7 +278,7 @@
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(21, 139); this.gbIron.Location = new System.Drawing.Point(33, 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(470, 188);
this.gbIron.TabIndex = 55; this.gbIron.TabIndex = 55;
...@@ -502,7 +503,7 @@ ...@@ -502,7 +503,7 @@
// //
// btnCancel // btnCancel
// //
this.btnCancel.Location = new System.Drawing.Point(540, 74); this.btnCancel.Location = new System.Drawing.Point(581, 95);
this.btnCancel.Name = "btnCancel"; this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(120, 35); this.btnCancel.Size = new System.Drawing.Size(120, 35);
this.btnCancel.TabIndex = 58; this.btnCancel.TabIndex = 58;
...@@ -524,7 +525,7 @@ ...@@ -524,7 +525,7 @@
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(21, 329); this.gbWireFeeding.Location = new System.Drawing.Point(33, 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(470, 116);
this.gbWireFeeding.TabIndex = 56; this.gbWireFeeding.TabIndex = 56;
...@@ -639,14 +640,14 @@ ...@@ -639,14 +640,14 @@
this.txtDsendWireTime.TabIndex = 42; this.txtDsendWireTime.TabIndex = 42;
this.txtDsendWireTime.Text = "2"; this.txtDsendWireTime.Text = "2";
// //
// FrmWeldPointInfo // FrmPointInfo
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(719, 491); this.ClientSize = new System.Drawing.Size(744, 491);
this.Controls.Add(this.groupPoint); this.Controls.Add(this.groupPoint);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "FrmWeldPointInfo"; this.Name = "FrmPointInfo";
this.Text = "FrmWeldPointInfo"; this.Text = "FrmWeldPointInfo";
this.Load += new System.EventHandler(this.FrmWeldPointInfo_Load); this.Load += new System.EventHandler(this.FrmWeldPointInfo_Load);
this.groupPoint.ResumeLayout(false); this.groupPoint.ResumeLayout(false);
...@@ -714,7 +715,7 @@ ...@@ -714,7 +715,7 @@
private System.Windows.Forms.TextBox txtClearTime; private System.Windows.Forms.TextBox txtClearTime;
private System.Windows.Forms.Label label15; private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label16; private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label label17; private System.Windows.Forms.Label lblMsg;
private System.Windows.Forms.GroupBox groupPoint; private System.Windows.Forms.GroupBox groupPoint;
private UserFromControl.URRobotMControl urRobot; private UserFromControl.URRobotMControl urRobot;
} }
......
...@@ -87,6 +87,29 @@ namespace URSoldering.Client ...@@ -87,6 +87,29 @@ namespace URSoldering.Client
int wTemp = FormUtil.GetIntValue(txtDweldTemperature); int wTemp = FormUtil.GetIntValue(txtDweldTemperature);
int wTempMax = FormUtil.GetIntValue(txtDweldTemMax); int wTempMax = FormUtil.GetIntValue(txtDweldTemMax);
int wTempMin = FormUtil.GetIntValue(txtDweldTemMin ); int wTempMin = FormUtil.GetIntValue(txtDweldTemMin );
double sendSpeed = FormUtil.getDoubleValue(txtDsendWireSpeed);
double sendtime = FormUtil.getDoubleValue(this.txtDsendWireTime);
double startsendSpeed = FormUtil.getDoubleValue(txtStartDsendWireSpeed);
double startsendTime = FormUtil.getDoubleValue(txtStartDsendWireTime);
string name = FormUtil.getValue(txtName);
int clearTime = FormUtil.GetIntValue(txtClearTime);
double pTime = FormUtil.getDoubleValue(txtDpreheatTime);
double wTime = FormUtil.getDoubleValue(txtDweldTime);
if (name.Equals(""))
{
MessageBox.Show("请输入焊点名称!");
txtName.Focus();
return;
}
if (cmbPointType.SelectedIndex < 0)
{
MessageBox.Show("请选择焊点类型!");
cmbPointType.Focus();
return;
}
int pointType = cmbPointType.SelectedIndex;
if (pointType.Equals(0))
{
if (ptemp > 400) if (ptemp > 400)
{ {
MessageBox.Show("预热温度范围:200°-400°"); MessageBox.Show("预热温度范围:200°-400°");
...@@ -98,7 +121,8 @@ namespace URSoldering.Client ...@@ -98,7 +121,8 @@ namespace URSoldering.Client
MessageBox.Show("预热温度下限必须大于0°"); MessageBox.Show("预热温度下限必须大于0°");
txtDweldTemMin.Focus(); txtDweldTemMin.Focus();
return; return;
} if (wTemp > 400) }
if (wTemp > 400)
{ {
MessageBox.Show("焊接温度范围:200°-400°"); MessageBox.Show("焊接温度范围:200°-400°");
txtDweldTemperature.Focus(); txtDweldTemperature.Focus();
...@@ -124,7 +148,7 @@ namespace URSoldering.Client ...@@ -124,7 +148,7 @@ namespace URSoldering.Client
} }
if (!(ptempmin <= ptemp && ptemp <= ptempmax)) if (!(ptempmin <= ptemp && ptemp <= ptempmax))
{ {
MessageBox.Show("预设温度范围在:" + ptempmin + "°-"+ptempmax+"°"); MessageBox.Show("预设温度范围在:" + ptempmin + "°-" + ptempmax + "°");
this.txtDpreheatTemperature.Focus(); this.txtDpreheatTemperature.Focus();
return; return;
} }
...@@ -136,7 +160,6 @@ namespace URSoldering.Client ...@@ -136,7 +160,6 @@ namespace URSoldering.Client
return; return;
} }
double pTime = FormUtil.getDoubleValue(txtDpreheatTime);
if (pTime < 0 || pTime > 60) if (pTime < 0 || pTime > 60)
{ {
MessageBox.Show("预热时间范围:0-60!"); MessageBox.Show("预热时间范围:0-60!");
...@@ -144,23 +167,13 @@ namespace URSoldering.Client ...@@ -144,23 +167,13 @@ namespace URSoldering.Client
return; return;
} }
double wTime = FormUtil.getDoubleValue(txtDweldTime);
if (pTime < 0 || pTime > 60) if (pTime < 0 || pTime > 60)
{ {
MessageBox.Show("焊接时间范围:0-60!"); MessageBox.Show("焊接时间范围:0-60!");
txtDweldTime.Focus(); txtDweldTime.Focus();
return; return;
} }
if (cmbPointType.SelectedIndex < 0)
{
MessageBox.Show("请选择焊点类型!");
cmbPointType.Focus();
return;
}
double sendSpeed = FormUtil.getDoubleValue(txtDsendWireSpeed);
double sendtime = FormUtil.getDoubleValue(this.txtDsendWireTime);
double startsendSpeed = FormUtil.getDoubleValue(txtStartDsendWireSpeed);
double startsendTime = FormUtil.getDoubleValue(txtStartDsendWireTime);
if (startsendSpeed < 0) if (startsendSpeed < 0)
{ {
MessageBox.Show("请正确输入起始送丝速度!"); MessageBox.Show("请正确输入起始送丝速度!");
...@@ -187,15 +200,6 @@ namespace URSoldering.Client ...@@ -187,15 +200,6 @@ namespace URSoldering.Client
txtDsendWireSpeed.Focus(); txtDsendWireSpeed.Focus();
return; return;
} }
string name = FormUtil.getValue(txtName);
if (name.Equals(""))
{
MessageBox.Show("请输入焊点名称!");
txtName.Focus();
return;
}
int clearTime = FormUtil.GetIntValue(txtClearTime);
if (chbClear.Checked) if (chbClear.Checked)
{ {
if (clearTime <= 0) if (clearTime <= 0)
...@@ -205,6 +209,7 @@ namespace URSoldering.Client ...@@ -205,6 +209,7 @@ namespace URSoldering.Client
return; return;
} }
} }
}
weldPointInfo.preheatTemperature = ptemp; weldPointInfo.preheatTemperature = ptemp;
weldPointInfo.preheatTime = pTime; weldPointInfo.preheatTime = pTime;
weldPointInfo.sendWireSpeed = sendSpeed; weldPointInfo.sendWireSpeed = sendSpeed;
...@@ -224,7 +229,7 @@ namespace URSoldering.Client ...@@ -224,7 +229,7 @@ namespace URSoldering.Client
URPointValue p = urRobot.GetPoint(); URPointValue p = urRobot.GetPoint();
weldPointInfo.RobotX = p.X; weldPointInfo.RobotX = p.X;
weldPointInfo.RoobtY = p.Y; weldPointInfo.RobotY = p.Y;
weldPointInfo.RobotZ = p.Z; weldPointInfo.RobotZ = p.Z;
weldPointInfo.RobotRX = p.RX; weldPointInfo.RobotRX = p.RX;
...@@ -281,5 +286,20 @@ namespace URSoldering.Client ...@@ -281,5 +286,20 @@ namespace URSoldering.Client
} }
} }
private void cmbPointType_SelectedIndexChanged(object sender, EventArgs e)
{
if (cmbPointType.SelectedIndex.Equals(0))
{
lblMsg .Text= "正常焊接的焊点";
gbIron.Enabled = true ;
gbWireFeeding.Enabled = true ;
}
else if (cmbPointType.SelectedIndex.Equals(1))
{
lblMsg.Text = "两个焊点之间的位置跳转点";
gbIron.Enabled = false;
gbWireFeeding.Enabled = false;
}
}
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!