Commit 34145f02 几米阳光

修改配置 ,原来的四轴坐标改为六轴坐标

1 个父辈 9a750da5
...@@ -56,39 +56,37 @@ namespace URSoldering.Common ...@@ -56,39 +56,37 @@ namespace URSoldering.Common
/// <summary> /// <summary>
/// 焊接机器人待机点 /// 焊接机器人待机点
/// </summary> /// </summary>
public static string Soldering_Home_Y = "Soldering_Home_Y";
public static string Soldering_Home_X = "Soldering_Home_X"; public static string Soldering_HomePoint = "Soldering_HomePoint";
public static string Soldering_Home_U = "Soldering_Home_U";
public static string Soldering_Home_Z = "Soldering_Home_Z";
public static string Soldering_Home_Hand = "Soldering_Home_Hand";
/// <summary> /// <summary>
/// 焊接机器人清洗点1 /// 焊接机器人清洗点1
/// </summary> /// </summary>
public static string Soldering_Clear_Y_1 = "Soldering_Clear_Y_1"; public static string Soldering_Clear1Point = "Soldering_Clear1Point";
public static string Soldering_Clear_X_1 = "Soldering_Clear_X_1";
public static string Soldering_Clear_U_1 = "Soldering_Clear_U_1";
public static string Soldering_Clear_Z_1 = "Soldering_Clear_Z_1";
public static string Soldering_Clear_Hand_1 = "Soldering_Clear_Hand_1";
/// <summary> /// <summary>
/// 焊接机器人清洗点2 /// 焊接机器人清洗点2
/// </summary> /// </summary>
public static string Soldering_Clear_Y_2 = "Soldering_Clear_Y_2"; public static string Soldering_Clear2Point = "Soldering_Clear2Point";
public static string Soldering_Clear_X_2 = "Soldering_Clear_X_2"; /// <summary>
public static string Soldering_Clear_U_2 = "Soldering_Clear_U_2"; /// 机械臂最小范围
public static string Soldering_Clear_Z_2 = "Soldering_Clear_Z_2"; /// </summary>
public static string Soldering_Clear_Hand_2 = "Soldering_Clear_Hand_2"; public static string Soldering_RobotMin = "Soldering_RobotMin";
/// <summary>
/// 机械臂最小范围
/// </summary>
public static string Soldering_RobotMax = "Soldering_RobotMax";
public static string Soldering_LIM_Z = "Soldering_LIM_Z"; public static string Soldering_LIM_Z = "Soldering_LIM_Z";
public static string Soldering_U_Min = "Soldering_U_Min"; //public static string Soldering_U_Min = "Soldering_U_Min";
public static string Soldering_X_Min = "Soldering_X_Min"; //public static string Soldering_X_Min = "Soldering_X_Min";
public static string Soldering_Y_Min = "Soldering_Y_Min"; //public static string Soldering_Y_Min = "Soldering_Y_Min";
public static string Soldering_Z_Min = "Soldering_Z_Min"; //public static string Soldering_Z_Min = "Soldering_Z_Min";
public static string Soldering_U_Max = "Soldering_U_Max"; //public static string Soldering_U_Max = "Soldering_U_Max";
public static string Soldering_X_Max = "Soldering_X_Max"; //public static string Soldering_X_Max = "Soldering_X_Max";
public static string Soldering_Y_Max = "Soldering_Y_Max"; //public static string Soldering_Y_Max = "Soldering_Y_Max";
public static string Soldering_Z_Max = "Soldering_Z_Max"; //public static string Soldering_Z_Max = "Soldering_Z_Max";
public static string SendWire_Change = "SendWire_Change"; public static string SendWire_Change = "SendWire_Change";
public static string Slave_ID = "Slave_ID"; public static string Slave_ID = "Slave_ID";
......
...@@ -18,32 +18,11 @@ namespace URSoldering.DeviceLibrary ...@@ -18,32 +18,11 @@ namespace URSoldering.DeviceLibrary
public static string WarnMsg = ""; public static string WarnMsg = "";
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static System.Timers.Timer mainTimer = new System.Timers.Timer(); private static System.Timers.Timer mainTimer = new System.Timers.Timer();
public static URPointValue HomePoint = new URPointValue();
public static double EpsonOrgX = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_Home_X); public static URPointValue Clear1Point = new URPointValue();
public static double EpsonOrgY = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_Home_Y); public static URPointValue Clear2Point = new URPointValue();
public static double EpsonOrgZ = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_Home_Z); public static URPointValue RobotMin = new URPointValue();
public static double EpsonOrgU = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_Home_U); public static URPointValue RobotMax = new URPointValue();
public static int EpsonOrgHandDir = ConfigAppSettings.GetIntValue(Setting_Init.Soldering_Home_Hand);
public static double EpsonClearX1 = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_Clear_X_1);
public static double EpsonClearY1 = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_Clear_Y_1);
public static double EpsonClearZ1 = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_Clear_Z_1);
public static double EpsonClearU1 = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_Clear_U_1);
public static int EpsonClearHandDir1 = ConfigAppSettings.GetIntValue(Setting_Init.Soldering_Clear_Hand_1);
public static double EpsonClearX2 = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_Clear_X_2);
public static double EpsonClearY2 = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_Clear_Y_2);
public static double EpsonClearZ2 = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_Clear_Z_2);
public static double EpsonClearU2 = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_Clear_U_2);
public static int EpsonClearHandDir2 = ConfigAppSettings.GetIntValue(Setting_Init.Soldering_Clear_Hand_2);
public static double EpsonXMin = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_X_Min);
public static double EpsonYMin = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_Y_Min);
public static double EpsonZMin = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_Z_Min);
public static double EpsonUMin = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_U_Min);
public static double EpsonXMax = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_X_Max);
public static double EpsonYMax = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_Y_Max);
public static double EpsonZMax = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_Z_Max);
public static double EpsonUMax = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_U_Max);
public static int SendWireXiShu = ConfigAppSettings.GetIntValue(Setting_Init.SendWire_Change); public static int SendWireXiShu = ConfigAppSettings.GetIntValue(Setting_Init.SendWire_Change);
...@@ -86,7 +65,27 @@ namespace URSoldering.DeviceLibrary ...@@ -86,7 +65,27 @@ namespace URSoldering.DeviceLibrary
mainTimer.AutoReset = true; mainTimer.AutoReset = true;
mainTimer.Elapsed += mainTimer_Elapsed; mainTimer.Elapsed += mainTimer_Elapsed;
mainTimer.Enabled = false; mainTimer.Enabled = false;
LoadPoint(Clear1Point, Setting_Init.Soldering_Clear1Point);
LoadPoint(Clear2Point, Setting_Init.Soldering_Clear2Point);
LoadPoint(HomePoint, Setting_Init.Soldering_HomePoint);
LoadPoint(RobotMin, Setting_Init.Soldering_RobotMin);
LoadPoint(RobotMax, Setting_Init.Soldering_RobotMax);
}
private static void LoadPoint(URPointValue p, string configStr)
{
string configP = ConfigAppSettings.GetValue(configStr);
if (String.IsNullOrEmpty(configP))
{
ConfigAppSettings.SaveValue(configStr, p.ToJosonStr());
}
else
{
p = URPointValue.ToObject(configP);
} }
}
public static SolderingRobotConfig RobotConfig = null; public static SolderingRobotConfig RobotConfig = null;
public static void InitData(SolderingRobotConfig config) public static void InitData(SolderingRobotConfig config)
{ {
...@@ -199,23 +198,6 @@ namespace URSoldering.DeviceLibrary ...@@ -199,23 +198,6 @@ namespace URSoldering.DeviceLibrary
return ""; return "";
} }
//public static void InitSendWireSpeed()
//{
// //设置速度
// SendWireManager.SetSpeed(RobotConfig.SendWire_Slv, ShuoKeCMD.SetAddSpeed, RobotConfig.SendWire_AddSpeed);
// Thread.Sleep(100);
// SendWireManager.SetSpeed(RobotConfig.SendWire_Slv, ShuoKeCMD.SetDelSpeed, RobotConfig.SendWire_DelSpeed);
// Thread.Sleep(100);
// SendWireManager.SetSpeed(RobotConfig.SendWire_Slv, ShuoKeCMD.SetEndSpeed, RobotConfig.SendWire_EndSpeed);
// Thread.Sleep(100);
// SendWireManager.SetSpeed(RobotConfig.SendWire_Slv, ShuoKeCMD.SetHomeSpeed, RobotConfig.SendWire_HomeSpeed);
// Thread.Sleep(100);
// SendWireManager.SetSpeed(RobotConfig.SendWire_Slv, ShuoKeCMD.SetMaxSpeed, RobotConfig.SendWire_MaxSpeed);
// Thread.Sleep(100);
// SendWireManager.SetSpeed(RobotConfig.SendWire_Slv, ShuoKeCMD.SetStartSpeed, RobotConfig.SendWire_StartSpeed);
//}
public static void StopWeld() public static void StopWeld()
{ {
LogUtil.info(RobotName + "停止当前焊接"); LogUtil.info(RobotName + "停止当前焊接");
...@@ -609,16 +591,16 @@ namespace URSoldering.DeviceLibrary ...@@ -609,16 +591,16 @@ namespace URSoldering.DeviceLibrary
} }
private static void MoveToPoint(WeldPointInfo p, bool IsHigh) private static void MoveToPoint(WeldPointInfo p, bool IsHigh)
{ {
SendWireDown(); //SendWireDown();
//判断需要抬起的高度 ////判断需要抬起的高度
double limZ = EpsonDevice.Robot_LIM_Z; //double limZ = EpsonDevice.Robot_LIM_Z;
double ZValue = p.PositionZ; //double ZValue = p.PositionZ;
string gaoStr = IsHigh ? "高" : "低"; //string gaoStr = IsHigh ? "高" : "低";
//WeldLog("移动到焊点【" + WeldMoveStep.CurrPoint.pointName + "】: X:" + p.PositionX + " Y: " + p.PositionY + " U:" + p.PositionU + " Z: " + ZValue + " ,limitZ: " + limZ); ////WeldLog("移动到焊点【" + WeldMoveStep.CurrPoint.pointName + "】: X:" + p.PositionX + " Y: " + p.PositionY + " U:" + p.PositionU + " Z: " + ZValue + " ,limitZ: " + limZ);
EpsonDevice.MoveTo(p.PositionX, p.PositionY, ZValue, p.PositionU, isHighSpeed, p.HandDirection, limZ,AfterMove); //EpsonDevice.MoveTo(p.PositionX, p.PositionY, ZValue, p.PositionU, isHighSpeed, p.HandDirection, limZ,AfterMove);
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitEpson()); //WeldMoveStep.WaitList.Add(WaitResultInfo.WaitEpson());
} }
...@@ -626,10 +608,10 @@ namespace URSoldering.DeviceLibrary ...@@ -626,10 +608,10 @@ namespace URSoldering.DeviceLibrary
{ {
SendWireUp(); SendWireUp();
RobotBean.KNDIOMove(IO_Type.ClearWeldingSQL, IO_VALUE.LOW); RobotBean.KNDIOMove(IO_Type.ClearWeldingSQL, IO_VALUE.LOW);
if (EpsonOrgX != 0 && EpsonOrgY != 0 && EpsonOrgZ != 0 && EpsonOrgU != 0) if (HomePoint.X != 0 && HomePoint.Y != 0 && HomePoint.Z != 0 )
{ {
WeldLog("送丝上升,机械臂走到待机点 "); WeldLog("送丝上升,机械臂走到待机点 ");
EpsonDevice.MoveTo(EpsonOrgX, EpsonOrgY, EpsonOrgZ, EpsonOrgU, isHighSpeed, EpsonOrgHandDir, EpsonDevice.Robot_LIM_Z,AfterMove); URRobotControl.MoveTo(HomePoint);
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitEpson()); WeldMoveStep.WaitList.Add(WaitResultInfo.WaitEpson());
} }
} }
...@@ -639,10 +621,10 @@ namespace URSoldering.DeviceLibrary ...@@ -639,10 +621,10 @@ namespace URSoldering.DeviceLibrary
Thread.Sleep(100); Thread.Sleep(100);
RobotBean.KNDIOMove(IO_Type.ClearWeldingSQL, IO_VALUE.HIGH); RobotBean.KNDIOMove(IO_Type.ClearWeldingSQL, IO_VALUE.HIGH);
WeldCount = 0; WeldCount = 0;
if (EpsonClearX1 != 0 && EpsonClearY1 != 0 && EpsonClearZ1 != 0 && EpsonClearU1 != 0) if (Clear1Point.X != 0 && Clear1Point.Y != 0 && Clear1Point.Z != 0)
{ {
WeldLog("送丝上升,打开清洗装置,机械臂走到清洗点1 "); WeldLog("送丝上升,打开清洗装置,机械臂走到清洗点1 ");
EpsonDevice.MoveTo(EpsonClearX1, EpsonClearY1, EpsonClearZ1, EpsonClearU1, isHighSpeed, EpsonClearHandDir1, AfterMove); URRobotControl.MoveTo(Clear1Point);
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitEpson()); WeldMoveStep.WaitList.Add(WaitResultInfo.WaitEpson());
} }
} }
...@@ -650,7 +632,7 @@ namespace URSoldering.DeviceLibrary ...@@ -650,7 +632,7 @@ namespace URSoldering.DeviceLibrary
{ {
RobotBean.KNDIOMove(IO_Type.ClearWeldingSQL, IO_VALUE.HIGH, mSenconds); RobotBean.KNDIOMove(IO_Type.ClearWeldingSQL, IO_VALUE.HIGH, mSenconds);
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitTime(mSenconds)); WeldMoveStep.WaitList.Add(WaitResultInfo.WaitTime(mSenconds));
if (EpsonClearX2 != 0 && EpsonClearY2 != 0 && EpsonClearZ2 != 0 && EpsonClearU2 != 0) if (Clear2Point.X != 0 && Clear2Point.Y != 0 && Clear2Point.Z != 0)
{ {
double limZ = EpsonDevice.Robot_LIM_Z; double limZ = EpsonDevice.Robot_LIM_Z;
double preZValue = EpsonDevice.LastSendPoint.Z; double preZValue = EpsonDevice.LastSendPoint.Z;
...@@ -659,59 +641,37 @@ namespace URSoldering.DeviceLibrary ...@@ -659,59 +641,37 @@ namespace URSoldering.DeviceLibrary
preZValue = EpsonDevice.LastPoint.Z; preZValue = EpsonDevice.LastPoint.Z;
} }
if (preZValue < EpsonClearZ2) //if (preZValue < EpsonClearZ2)
{ //{
preZValue = EpsonClearZ2; // preZValue = EpsonClearZ2;
} //}
limZ = preZValue + 1; limZ = preZValue + 1;
WeldLog("机械臂走到清洗点2 ,打开清洗装置,清洗时间:"+mSenconds+" "); WeldLog("机械臂走到清洗点2 ,打开清洗装置,清洗时间:"+mSenconds+" ");
//WeldLog("机械臂走到清洗点2 : X:" + EpsonClearX2 + " Y: " + EpsonClearY2 + " U:" + EpsonClearU2 + " Z: " + EpsonClearZ2 + " "); //WeldLog("机械臂走到清洗点2 : X:" + EpsonClearX2 + " Y: " + EpsonClearY2 + " U:" + EpsonClearU2 + " Z: " + EpsonClearZ2 + " ");
EpsonDevice.MoveTo(EpsonClearX2, EpsonClearY2, EpsonClearZ2, EpsonClearU2, false, EpsonClearHandDir2,limZ,AfterMove); URRobotControl.MoveTo(Clear2Point);
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitEpson()); WeldMoveStep.WaitList.Add(WaitResultInfo.WaitEpson());
} }
} }
//更新原点 //更新原点
public static void UpdateOrgPoint(double orgx, double orgy, double orgu, double orgz, int hand) public static void UpdateOrgPoint(URPointValue point)
{ {
ConfigAppSettings.SaveValue(Setting_Init.Soldering_Home_X, orgx.ToString()); WeldRobotBean.HomePoint = point;
ConfigAppSettings.SaveValue(Setting_Init.Soldering_Home_Y, orgy.ToString()); string str = point.ToJosonStr();
ConfigAppSettings.SaveValue(Setting_Init.Soldering_Home_Z, orgz.ToString()); ConfigAppSettings.SaveValue(Setting_Init.Soldering_HomePoint, str);
ConfigAppSettings.SaveValue(Setting_Init.Soldering_Home_U, orgu.ToString());
ConfigAppSettings.SaveValue(Setting_Init.Soldering_Home_Hand, hand.ToString());
WeldRobotBean.EpsonOrgX = orgx;
WeldRobotBean.EpsonOrgY = orgy;
WeldRobotBean.EpsonOrgU = orgu;
WeldRobotBean.EpsonOrgZ = orgz;
WeldRobotBean.EpsonOrgHandDir = hand;
} }
public static void UpdateClear1Point(double clearx1, double cleary1, double clearu1, double clearz1, int clearHand1) public static void UpdateClear1Point(URPointValue point)
{ {
WeldRobotBean.EpsonClearHandDir1 = clearHand1; WeldRobotBean.Clear1Point = point;
WeldRobotBean.EpsonClearU1 = clearu1; string str = point.ToJosonStr();
WeldRobotBean.EpsonClearX1 = clearx1; ConfigAppSettings.SaveValue(Setting_Init.Soldering_Clear1Point, str);
WeldRobotBean.EpsonClearY1 = cleary1;
WeldRobotBean.EpsonClearZ1 = clearz1;
ConfigAppSettings.SaveValue(Setting_Init.Soldering_Clear_Hand_1, clearHand1.ToString());
ConfigAppSettings.SaveValue(Setting_Init.Soldering_Clear_U_1, clearu1.ToString());
ConfigAppSettings.SaveValue(Setting_Init.Soldering_Clear_X_1, clearx1.ToString());
ConfigAppSettings.SaveValue(Setting_Init.Soldering_Clear_Y_1, cleary1.ToString());
ConfigAppSettings.SaveValue(Setting_Init.Soldering_Clear_Z_1, clearz1.ToString());
} }
public static void UpdateClear2Point(double clearx2, double cleary2, double clearu2, double clearz2, int clearHand2) public static void UpdateClear2Point(URPointValue point)
{ {
WeldRobotBean.EpsonClearHandDir2 = clearHand2; WeldRobotBean.Clear2Point = point;
WeldRobotBean.EpsonClearU2 = clearu2; string str = point.ToJosonStr();
WeldRobotBean.EpsonClearX2 = clearx2; ConfigAppSettings.SaveValue(Setting_Init.Soldering_Clear2Point, str);
WeldRobotBean.EpsonClearY2 = cleary2;
WeldRobotBean.EpsonClearZ2 = clearz2;
ConfigAppSettings.SaveValue(Setting_Init.Soldering_Clear_Hand_2, clearHand2.ToString());
ConfigAppSettings.SaveValue(Setting_Init.Soldering_Clear_U_2, clearu2.ToString());
ConfigAppSettings.SaveValue(Setting_Init.Soldering_Clear_X_2, clearx2.ToString());
ConfigAppSettings.SaveValue(Setting_Init.Soldering_Clear_Y_2, cleary2.ToString());
ConfigAppSettings.SaveValue(Setting_Init.Soldering_Clear_Z_2, clearz2.ToString());
} }
/// <summary> /// <summary>
...@@ -721,34 +681,34 @@ namespace URSoldering.DeviceLibrary ...@@ -721,34 +681,34 @@ namespace URSoldering.DeviceLibrary
/// <returns></returns> /// <returns></returns>
public static string CheckEpsonPoint(PointValue point) public static string CheckEpsonPoint(PointValue point)
{ {
if (EpsonXMin < EpsonXMax) //if (EpsonXMin < EpsonXMax)
{ //{
if (point.X < EpsonXMin || point.X > EpsonXMax) // if (point.X < EpsonXMin || point.X > EpsonXMax)
{ // {
return "机械臂X轴超出活动范围"; // return "机械臂X轴超出活动范围";
} // }
} //}
if (EpsonYMin < EpsonYMax) //if (EpsonYMin < EpsonYMax)
{ //{
if (point.Y < EpsonYMin || point.Y > EpsonYMax) // if (point.Y < EpsonYMin || point.Y > EpsonYMax)
{ // {
return "机械臂Y轴超出活动范围"; // return "机械臂Y轴超出活动范围";
} // }
} //}
if (EpsonZMin < EpsonZMax) //if (EpsonZMin < EpsonZMax)
{ //{
if (point.Z < EpsonZMin || point.Z > EpsonZMax) // if (point.Z < EpsonZMin || point.Z > EpsonZMax)
{ // {
return "机械臂Z轴超出活动范围"; // return "机械臂Z轴超出活动范围";
} // }
} //}
if (EpsonUMin < EpsonUMax) //if (EpsonUMin < EpsonUMax)
{ //{
if (point.U < EpsonUMin || point.U > EpsonUMax) // if (point.U < EpsonUMin || point.U > EpsonUMax)
{ // {
return "机械臂U轴超出活动范围"; // return "机械臂U轴超出活动范围";
} // }
} //}
return ""; return "";
} }
} }
......
...@@ -175,7 +175,7 @@ namespace URSoldering.DeviceLibrary ...@@ -175,7 +175,7 @@ namespace URSoldering.DeviceLibrary
} }
public WeldPointInfo(int hand) public WeldPointInfo(int hand)
{ {
this.HandDirection = hand; //this.HandDirection = hand;
} }
/// <summary> /// <summary>
...@@ -188,26 +188,33 @@ namespace URSoldering.DeviceLibrary ...@@ -188,26 +188,33 @@ namespace URSoldering.DeviceLibrary
/// </summary> /// </summary>
public string pointName { get; set; } public string pointName { get; set; }
/// <summary> public double RobotX { get; set; }
/// x坐标 public double RoobtY { get; set; }
/// </summary> public double RobotZ { get; set; }
public double PositionX { get; set; } public double RobotRX { get; set; }
/// <summary> public double RobotRY { get; set; }
/// y坐标 public double RobotRZ { get; set; }
/// </summary>
public double PositionY { get; set; } ///// <summary>
/// <summary> ///// x坐标
/// u坐标 ///// </summary>
/// </summary> //public double PositionX { get; set; }
public double PositionU { get; set; } ///// <summary>
/// <summary> ///// y坐标
/// z坐标 ///// </summary>
/// </summary> //public double PositionY { get; set; }
public double PositionZ { get; set; } ///// <summary>
/// <summary> ///// u坐标
/// 手臂方向,2=左臂L,1=右臂R ///// </summary>
/// </summary> //public double PositionU { get; set; }
public int HandDirection { get; set; } ///// <summary>
///// z坐标
///// </summary>
//public double PositionZ { get; set; }
///// <summary>
///// 手臂方向,2=左臂L,1=右臂R
///// </summary>
//public int HandDirection { get; set; }
/// <summary> /// <summary>
/// 预热温度 /// 预热温度
...@@ -277,28 +284,28 @@ namespace URSoldering.DeviceLibrary ...@@ -277,28 +284,28 @@ namespace URSoldering.DeviceLibrary
/// </summary> /// </summary>
public int ClearTime { get; set; } public int ClearTime { get; set; }
public string HandValue //public string HandValue
{ //{
get // get
{ // {
if (HandDirection == 0) // if (HandDirection == 0)
{ // {
return "自动"; // return "自动";
} // }
else if (HandDirection == 1) // else if (HandDirection == 1)
{ // {
return "右臂"; // return "右臂";
} // }
else if (HandDirection == 2) // else if (HandDirection == 2)
{ // {
return "左臂"; // return "左臂";
} // }
return ""; // return "";
} // }
set // set
{ // {
} // }
} //}
} }
} }
...@@ -63,11 +63,6 @@ namespace URSoldering.DeviceLibrary ...@@ -63,11 +63,6 @@ namespace URSoldering.DeviceLibrary
{ {
if (Status.Equals(RobotStatus.Reset)) if (Status.Equals(RobotStatus.Reset))
{ {
////复位,黄灯闪烁绿灯常亮,红灯亮时绿灯不亮
//if (KNDIOValue(IO_Type.AlarmSingle).Equals(IO_VALUE.HIGH))
//{
// KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.LOW);
//}
if (KNDIOValue(IO_Type.AutoRunSingle).Equals(IO_VALUE.LOW)) if (KNDIOValue(IO_Type.AutoRunSingle).Equals(IO_VALUE.LOW))
{ {
KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.HIGH); KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.HIGH);
...@@ -89,10 +84,6 @@ namespace URSoldering.DeviceLibrary ...@@ -89,10 +84,6 @@ namespace URSoldering.DeviceLibrary
{ {
KNDIOMove(IO_Type.WaitSingle, IO_VALUE.LOW); KNDIOMove(IO_Type.WaitSingle, IO_VALUE.LOW);
} }
//if (KNDIOValue(IO_Type.AlarmSingle).Equals(IO_VALUE.HIGH))
//{
// KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.LOW);
//}
if (KNDIOValue(IO_Type.AutoRunSingle).Equals(IO_VALUE.LOW)) if (KNDIOValue(IO_Type.AutoRunSingle).Equals(IO_VALUE.LOW))
{ {
KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.HIGH); KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.HIGH);
...@@ -105,10 +96,6 @@ namespace URSoldering.DeviceLibrary ...@@ -105,10 +96,6 @@ namespace URSoldering.DeviceLibrary
{ {
KNDIOMove(IO_Type.WaitSingle, IO_VALUE.LOW); KNDIOMove(IO_Type.WaitSingle, IO_VALUE.LOW);
} }
//if (KNDIOValue(IO_Type.AlarmSingle).Equals(IO_VALUE.HIGH))
//{
// KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.LOW);
//}
if (KNDIOValue(IO_Type.AutoRunSingle).Equals(IO_VALUE.HIGH)) if (KNDIOValue(IO_Type.AutoRunSingle).Equals(IO_VALUE.HIGH))
{ {
KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.LOW); KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.LOW);
......
...@@ -93,8 +93,11 @@ namespace URSoldering.DeviceLibrary ...@@ -93,8 +93,11 @@ namespace URSoldering.DeviceLibrary
public static void Release() public static void Release()
{ {
bool isOk = false; bool isOk = false;
if (sb != null)
{
parseCommand(CMD_StopSend, out isOk); parseCommand(CMD_StopSend, out isOk);
sb.closePort(); sb.closePort();
}
IsRun = false; IsRun = false;
} }
public static void Reset() public static void Reset()
...@@ -201,6 +204,11 @@ namespace URSoldering.DeviceLibrary ...@@ -201,6 +204,11 @@ namespace URSoldering.DeviceLibrary
} }
private static byte[] parseCommand(string commandText, out bool isOk) private static byte[] parseCommand(string commandText, out bool isOk)
{ {
if (sb == null)
{
isOk = false;
return null;
}
byte[] message = new byte[commandText.Length + 2]; byte[] message = new byte[commandText.Length + 2];
message[0] = (byte)2; message[0] = (byte)2;
for (int i = 1; i < commandText.Length + 1; i++) for (int i = 1; i < commandText.Length + 1; i++)
......
...@@ -70,6 +70,12 @@ namespace URSoldering.DeviceLibrary ...@@ -70,6 +70,12 @@ namespace URSoldering.DeviceLibrary
} }
return StartConnect(); return StartConnect();
} }
public static string Start()
{
return "";
}
private static bool StartConnect() private static bool StartConnect()
{ {
try try
...@@ -235,17 +241,51 @@ namespace URSoldering.DeviceLibrary ...@@ -235,17 +241,51 @@ namespace URSoldering.DeviceLibrary
LogUtil.error("StopEpson出错啦" + ex.ToString()); LogUtil.error("StopEpson出错啦" + ex.ToString());
} }
} }
public static void GetPosition(Action<double, double, double, double, int> afterGet)
{
}
public static void FreeAxis()
{
}
public static void MoveTo(URPointValue point)
{
}
public static void MoveTo(double x, double y, double z, double rx, double ry, double rz)
{
}
public static void LockAxis()
{
}
public static URPointValue GetLastPosition()
{
return new URPointValue();
}
} }
public class URPointValue public class URPointValue
{ {
public URPointValue(double x, double y, double u, double z, int handDir) public URPointValue()
{
this.X = 0;
this.Y = 0;
this.Z = 0;
this.RX = 0;
this.RY = 0;
this.RZ = 0;
this.UpdateTime = DateTime.Now;
}
public URPointValue(double x, double y, double z, double rx,double ry,double rz)
{ {
// TODO: Complete member initialization // TODO: Complete member initialization
this.X = x; this.X = x;
this.Y = y; this.Y = y;
this.U = u;
this.Z = z; this.Z = z;
this.HandDir = handDir; this.RX = rx;
this.RY = ry;
this.RZ = rz;
this.UpdateTime = DateTime.Now; this.UpdateTime = DateTime.Now;
} }
/// <summary> /// <summary>
...@@ -254,9 +294,26 @@ namespace URSoldering.DeviceLibrary ...@@ -254,9 +294,26 @@ namespace URSoldering.DeviceLibrary
public DateTime UpdateTime { get; set; } public DateTime UpdateTime { get; set; }
public double X { get; set; } public double X { get; set; }
public double Y { get; set; } public double Y { get; set; }
public double U { get; set; }
public double Z { get; set; } public double Z { get; set; }
public int HandDir { get; set; } public double RX { get; set; }
public double RY { get; set; }
public double RZ { get; set; }
public string ToShowStr()
{
return "[X: " + X + ",Y: " + Y + ",Z: " + Z + ",RX: " + RX + ",RY:" + RY + ",RZ:" + RZ+"]" ;
}
public string ToJosonStr()
{
string jsonStr = JsonHelper.SerializeObject(this);
return jsonStr;
}
public static URPointValue ToObject(string json)
{
return JsonHelper.DeserializeJsonToObject<URPointValue>(json);
}
} }
public struct URStatus public struct URStatus
{ {
......
...@@ -113,24 +113,5 @@ namespace URSoldering.DeviceLibrary ...@@ -113,24 +113,5 @@ namespace URSoldering.DeviceLibrary
} }
} }
public static void GetPosition(Action<double, double, double, double, int> afterGet)
{
throw new NotImplementedException();
}
public static void FreeAxis()
{
throw new NotImplementedException();
}
public static void MoveTo(double x, double y, double z, double u, bool isfast, int hand, Action<string> afterMove)
{
throw new NotImplementedException();
}
public static void LockAxis()
{
throw new NotImplementedException();
}
} }
} }
...@@ -35,14 +35,6 @@ ...@@ -35,14 +35,6 @@
this.移动到此处ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.移动到此处ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.btnUAdd = new System.Windows.Forms.Button();
this.btnUDel = new System.Windows.Forms.Button();
this.btnZAdd = new System.Windows.Forms.Button();
this.btnXDel = new System.Windows.Forms.Button();
this.btnZDel = new System.Windows.Forms.Button();
this.btnXAdd = new System.Windows.Forms.Button();
this.btnYAdd = new System.Windows.Forms.Button();
this.btnYDel = new System.Windows.Forms.Button();
this.picYDel = new System.Windows.Forms.PictureBox(); this.picYDel = new System.Windows.Forms.PictureBox();
this.picYAdd = new System.Windows.Forms.PictureBox(); this.picYAdd = new System.Windows.Forms.PictureBox();
this.picXAdd = new System.Windows.Forms.PictureBox(); this.picXAdd = new System.Windows.Forms.PictureBox();
...@@ -58,6 +50,8 @@ ...@@ -58,6 +50,8 @@
this.删除ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.删除ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.上升ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.上升ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.下降ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.下降ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.dataGridViewImageColumn1 = new System.Windows.Forms.DataGridViewImageColumn();
this.dataGridViewImageColumn2 = new System.Windows.Forms.DataGridViewImageColumn();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.panPoint = new System.Windows.Forms.Panel(); this.panPoint = new System.Windows.Forms.Panel();
this.panVideo = new System.Windows.Forms.Panel(); this.panVideo = new System.Windows.Forms.Panel();
...@@ -76,32 +70,21 @@ ...@@ -76,32 +70,21 @@
this.lblOriginX = new System.Windows.Forms.Label(); this.lblOriginX = new System.Windows.Forms.Label();
this.lblOriginY = new System.Windows.Forms.Label(); this.lblOriginY = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.lblSpeed = new System.Windows.Forms.Label();
this.panel3 = new System.Windows.Forms.Panel(); this.panel3 = new System.Windows.Forms.Panel();
this.btnPositionTest = new System.Windows.Forms.Button(); this.btnPositionTest = new System.Windows.Forms.Button();
this.lblEpsonError = new System.Windows.Forms.Label(); this.lblEpsonError = new System.Windows.Forms.Label();
this.lblMsg = new System.Windows.Forms.Label(); this.lblMsg = new System.Windows.Forms.Label();
this.cmbHand = new System.Windows.Forms.ComboBox();
this.btnSavePoint = new System.Windows.Forms.Button(); this.btnSavePoint = new System.Windows.Forms.Button();
this.btnStopDown = new System.Windows.Forms.Button(); this.btnStopDown = new System.Windows.Forms.Button();
this.btnGoHome = new System.Windows.Forms.Button(); this.btnGoHome = new System.Windows.Forms.Button();
this.label23 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label();
this.txtRobotZ = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.txtSpeed = new System.Windows.Forms.TextBox(); this.txtSpeed = new System.Windows.Forms.TextBox();
this.lblSpeed = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.btnStopSend = new System.Windows.Forms.Button(); this.btnStopSend = new System.Windows.Forms.Button();
this.btnSendWire = new System.Windows.Forms.Button(); this.btnSendWire = new System.Windows.Forms.Button();
this.tckSpeed = new System.Windows.Forms.TrackBar(); this.tckSpeed = new System.Windows.Forms.TrackBar();
this.txtRobotU = new System.Windows.Forms.Label();
this.txtRobotY = new System.Windows.Forms.Label();
this.btnWUp = new System.Windows.Forms.Button(); this.btnWUp = new System.Windows.Forms.Button();
this.txtRobotX = new System.Windows.Forms.Label();
this.btnChange = new System.Windows.Forms.Button(); this.btnChange = new System.Windows.Forms.Button();
this.label12 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.label25 = new System.Windows.Forms.Label(); this.label25 = new System.Windows.Forms.Label();
this.label24 = new System.Windows.Forms.Label(); this.label24 = new System.Windows.Forms.Label();
this.dgvList = new System.Windows.Forms.DataGridView(); this.dgvList = new System.Windows.Forms.DataGridView();
...@@ -110,7 +93,9 @@ ...@@ -110,7 +93,9 @@
this.Column_X = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column_X = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_Y = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column_Y = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_Z = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column_Z = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_U = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column_RX = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_RY = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_RZ = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_preheatTemperature = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column_preheatTemperature = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_preheatTemperatureMax = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column_preheatTemperatureMax = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_preheatTemperatureMin = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column_preheatTemperatureMin = new System.Windows.Forms.DataGridViewTextBoxColumn();
...@@ -125,7 +110,6 @@ ...@@ -125,7 +110,6 @@
this.Column_sendWireTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column_sendWireTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_pointType = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column_pointType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_isClear = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.Column_isClear = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.Column_HandDirection = new System.Windows.Forms.DataGridViewComboBoxColumn();
this.Column_ClearTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column_ClearTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_getPosition = new System.Windows.Forms.DataGridViewLinkColumn(); this.Column_getPosition = new System.Windows.Forms.DataGridViewLinkColumn();
this.Column_MoveTest = new System.Windows.Forms.DataGridViewLinkColumn(); this.Column_MoveTest = new System.Windows.Forms.DataGridViewLinkColumn();
...@@ -149,8 +133,18 @@ ...@@ -149,8 +133,18 @@
this.btnSStop = new System.Windows.Forms.Button(); this.btnSStop = new System.Windows.Forms.Button();
this.btnWStop = new System.Windows.Forms.Button(); this.btnWStop = new System.Windows.Forms.Button();
this.label14 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label();
this.dataGridViewImageColumn1 = new System.Windows.Forms.DataGridViewImageColumn(); this.label12 = new System.Windows.Forms.Label();
this.dataGridViewImageColumn2 = new System.Windows.Forms.DataGridViewImageColumn(); this.txtRobotX = new System.Windows.Forms.Label();
this.txtRobotY = new System.Windows.Forms.Label();
this.lblRobotRZ = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.txtRobotZ = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.lblRobotRX = new System.Windows.Forms.Label();
this.lblRobotRY = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.contextMenuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picYDel)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.picYDel)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picYAdd)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.picYAdd)).BeginInit();
...@@ -169,7 +163,6 @@ ...@@ -169,7 +163,6 @@
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
this.panel3.SuspendLayout(); this.panel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tckSpeed)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tckSpeed)).BeginInit();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvList)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvList)).BeginInit();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
...@@ -200,118 +193,6 @@ ...@@ -200,118 +193,6 @@
// //
this.openFileDialog1.FileName = "openFileDialog1"; this.openFileDialog1.FileName = "openFileDialog1";
// //
// btnUAdd
//
this.btnUAdd.FlatAppearance.BorderSize = 0;
this.btnUAdd.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUAdd.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnUAdd.Location = new System.Drawing.Point(5, 4);
this.btnUAdd.Name = "btnUAdd";
this.btnUAdd.Size = new System.Drawing.Size(60, 26);
this.btnUAdd.TabIndex = 269;
this.btnUAdd.Text = "顺时针";
this.toolTip1.SetToolTip(this.btnUAdd, "U+");
this.btnUAdd.UseVisualStyleBackColor = true;
this.btnUAdd.Click += new System.EventHandler(this.btnUAdd_Click);
//
// btnUDel
//
this.btnUDel.FlatAppearance.BorderSize = 0;
this.btnUDel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUDel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnUDel.Location = new System.Drawing.Point(65, 4);
this.btnUDel.Name = "btnUDel";
this.btnUDel.Size = new System.Drawing.Size(60, 26);
this.btnUDel.TabIndex = 270;
this.btnUDel.Text = "逆时针";
this.toolTip1.SetToolTip(this.btnUDel, "U- ");
this.btnUDel.UseVisualStyleBackColor = true;
this.btnUDel.Click += new System.EventHandler(this.btnUDel_Click);
//
// btnZAdd
//
this.btnZAdd.FlatAppearance.BorderSize = 0;
this.btnZAdd.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnZAdd.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnZAdd.Location = new System.Drawing.Point(32, 34);
this.btnZAdd.Name = "btnZAdd";
this.btnZAdd.Size = new System.Drawing.Size(60, 26);
this.btnZAdd.TabIndex = 267;
this.btnZAdd.Text = "向上";
this.toolTip1.SetToolTip(this.btnZAdd, "Z+");
this.btnZAdd.UseVisualStyleBackColor = true;
this.btnZAdd.Click += new System.EventHandler(this.btnZAdd_Click);
//
// btnXDel
//
this.btnXDel.FlatAppearance.BorderSize = 0;
this.btnXDel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnXDel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnXDel.Location = new System.Drawing.Point(130, 64);
this.btnXDel.Name = "btnXDel";
this.btnXDel.Size = new System.Drawing.Size(60, 26);
this.btnXDel.TabIndex = 266;
this.btnXDel.Text = "向后";
this.toolTip1.SetToolTip(this.btnXDel, "X- ");
this.btnXDel.UseVisualStyleBackColor = true;
this.btnXDel.Click += new System.EventHandler(this.btnXDel_Click);
//
// btnZDel
//
this.btnZDel.FlatAppearance.BorderSize = 0;
this.btnZDel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnZDel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnZDel.Location = new System.Drawing.Point(32, 61);
this.btnZDel.Name = "btnZDel";
this.btnZDel.Size = new System.Drawing.Size(60, 26);
this.btnZDel.TabIndex = 268;
this.btnZDel.Text = "向下";
this.toolTip1.SetToolTip(this.btnZDel, "Z- ");
this.btnZDel.UseVisualStyleBackColor = true;
this.btnZDel.Click += new System.EventHandler(this.btnZDel_Click);
//
// btnXAdd
//
this.btnXAdd.FlatAppearance.BorderSize = 0;
this.btnXAdd.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnXAdd.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnXAdd.Location = new System.Drawing.Point(130, 6);
this.btnXAdd.Name = "btnXAdd";
this.btnXAdd.Size = new System.Drawing.Size(60, 26);
this.btnXAdd.TabIndex = 265;
this.btnXAdd.Text = "向前";
this.toolTip1.SetToolTip(this.btnXAdd, "X+");
this.btnXAdd.UseVisualStyleBackColor = true;
this.btnXAdd.Click += new System.EventHandler(this.btnXAdd_Click);
//
// btnYAdd
//
this.btnYAdd.FlatAppearance.BorderSize = 0;
this.btnYAdd.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnYAdd.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnYAdd.Location = new System.Drawing.Point(102, 35);
this.btnYAdd.Name = "btnYAdd";
this.btnYAdd.Size = new System.Drawing.Size(60, 26);
this.btnYAdd.TabIndex = 264;
this.btnYAdd.Text = "向左";
this.toolTip1.SetToolTip(this.btnYAdd, "Y+");
this.btnYAdd.UseVisualStyleBackColor = true;
this.btnYAdd.Click += new System.EventHandler(this.btnYAdd_Click);
//
// btnYDel
//
this.btnYDel.FlatAppearance.BorderSize = 0;
this.btnYDel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnYDel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnYDel.Location = new System.Drawing.Point(164, 35);
this.btnYDel.Name = "btnYDel";
this.btnYDel.Size = new System.Drawing.Size(60, 26);
this.btnYDel.TabIndex = 263;
this.btnYDel.Text = "向右";
this.toolTip1.SetToolTip(this.btnYDel, "Y- ");
this.btnYDel.UseVisualStyleBackColor = true;
this.btnYDel.Click += new System.EventHandler(this.btnYDel_Click);
//
// picYDel // picYDel
// //
this.picYDel.BackColor = System.Drawing.Color.Transparent; this.picYDel.BackColor = System.Drawing.Color.Transparent;
...@@ -470,6 +351,22 @@ ...@@ -470,6 +351,22 @@
this.下降ToolStripMenuItem.Text = "下降"; this.下降ToolStripMenuItem.Text = "下降";
this.下降ToolStripMenuItem.Click += new System.EventHandler(this.下降ToolStripMenuItem_Click); this.下降ToolStripMenuItem.Click += new System.EventHandler(this.下降ToolStripMenuItem_Click);
// //
// dataGridViewImageColumn1
//
this.dataGridViewImageColumn1.HeaderText = "上升";
this.dataGridViewImageColumn1.Image = ((System.Drawing.Image)(resources.GetObject("dataGridViewImageColumn1.Image")));
this.dataGridViewImageColumn1.Name = "dataGridViewImageColumn1";
this.dataGridViewImageColumn1.Visible = false;
this.dataGridViewImageColumn1.Width = 50;
//
// dataGridViewImageColumn2
//
this.dataGridViewImageColumn2.HeaderText = "下降";
this.dataGridViewImageColumn2.Image = ((System.Drawing.Image)(resources.GetObject("dataGridViewImageColumn2.Image")));
this.dataGridViewImageColumn2.Name = "dataGridViewImageColumn2";
this.dataGridViewImageColumn2.Visible = false;
this.dataGridViewImageColumn2.Width = 50;
//
// panel1 // panel1
// //
this.panel1.AutoScroll = true; this.panel1.AutoScroll = true;
...@@ -685,40 +582,50 @@ ...@@ -685,40 +582,50 @@
// //
// groupBox2 // groupBox2
// //
this.groupBox2.Controls.Add(this.lblRobotRZ);
this.groupBox2.Controls.Add(this.label7);
this.groupBox2.Controls.Add(this.label8);
this.groupBox2.Controls.Add(this.lblRobotRY);
this.groupBox2.Controls.Add(this.lblRobotRX);
this.groupBox2.Controls.Add(this.label16);
this.groupBox2.Controls.Add(this.lblSpeed); this.groupBox2.Controls.Add(this.lblSpeed);
this.groupBox2.Controls.Add(this.panel3); this.groupBox2.Controls.Add(this.panel3);
this.groupBox2.Controls.Add(this.btnPositionTest); this.groupBox2.Controls.Add(this.btnPositionTest);
this.groupBox2.Controls.Add(this.lblEpsonError); this.groupBox2.Controls.Add(this.lblEpsonError);
this.groupBox2.Controls.Add(this.lblMsg); this.groupBox2.Controls.Add(this.lblMsg);
this.groupBox2.Controls.Add(this.cmbHand);
this.groupBox2.Controls.Add(this.btnSavePoint); this.groupBox2.Controls.Add(this.btnSavePoint);
this.groupBox2.Controls.Add(this.btnStopDown); this.groupBox2.Controls.Add(this.btnStopDown);
this.groupBox2.Controls.Add(this.btnGoHome); this.groupBox2.Controls.Add(this.btnGoHome);
this.groupBox2.Controls.Add(this.label23);
this.groupBox2.Controls.Add(this.label5); this.groupBox2.Controls.Add(this.label5);
this.groupBox2.Controls.Add(this.txtRobotZ); this.groupBox2.Controls.Add(this.txtRobotZ);
this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label13);
this.groupBox2.Controls.Add(this.label1); this.groupBox2.Controls.Add(this.label1);
this.groupBox2.Controls.Add(this.txtSpeed); this.groupBox2.Controls.Add(this.txtSpeed);
this.groupBox2.Controls.Add(this.label11);
this.groupBox2.Controls.Add(this.btnStopSend); this.groupBox2.Controls.Add(this.btnStopSend);
this.groupBox2.Controls.Add(this.btnSendWire); this.groupBox2.Controls.Add(this.btnSendWire);
this.groupBox2.Controls.Add(this.tckSpeed); this.groupBox2.Controls.Add(this.tckSpeed);
this.groupBox2.Controls.Add(this.txtRobotU);
this.groupBox2.Controls.Add(this.txtRobotY); this.groupBox2.Controls.Add(this.txtRobotY);
this.groupBox2.Controls.Add(this.btnWUp); this.groupBox2.Controls.Add(this.btnWUp);
this.groupBox2.Controls.Add(this.txtRobotX); this.groupBox2.Controls.Add(this.txtRobotX);
this.groupBox2.Controls.Add(this.btnChange); this.groupBox2.Controls.Add(this.btnChange);
this.groupBox2.Controls.Add(this.label12); this.groupBox2.Controls.Add(this.label12);
this.groupBox2.Controls.Add(this.panel2);
this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox2.Location = new System.Drawing.Point(12, 85); this.groupBox2.Location = new System.Drawing.Point(12, 78);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(869, 209); this.groupBox2.Size = new System.Drawing.Size(869, 190);
this.groupBox2.TabIndex = 22; this.groupBox2.TabIndex = 22;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "机器人实时坐标"; this.groupBox2.Text = "机器人实时坐标";
// //
// lblSpeed
//
this.lblSpeed.AutoSize = true;
this.lblSpeed.Location = new System.Drawing.Point(182, 114);
this.lblSpeed.Name = "lblSpeed";
this.lblSpeed.Size = new System.Drawing.Size(95, 17);
this.lblSpeed.TabIndex = 315;
this.lblSpeed.Text = "步进值:0.5mm";
//
// panel3 // panel3
// //
this.panel3.BackColor = System.Drawing.SystemColors.Control; this.panel3.BackColor = System.Drawing.SystemColors.Control;
...@@ -730,16 +637,16 @@ ...@@ -730,16 +637,16 @@
this.panel3.Controls.Add(this.picUDel); this.panel3.Controls.Add(this.picUDel);
this.panel3.Controls.Add(this.picZAdd); this.panel3.Controls.Add(this.picZAdd);
this.panel3.Controls.Add(this.picUAdd); this.panel3.Controls.Add(this.picUAdd);
this.panel3.Location = new System.Drawing.Point(246, 48); this.panel3.Location = new System.Drawing.Point(246, 46);
this.panel3.Name = "panel3"; this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(287, 146); this.panel3.Size = new System.Drawing.Size(287, 138);
this.panel3.TabIndex = 259; this.panel3.TabIndex = 259;
// //
// btnPositionTest // btnPositionTest
// //
this.btnPositionTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnPositionTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnPositionTest.FlatAppearance.BorderSize = 0; this.btnPositionTest.FlatAppearance.BorderSize = 0;
this.btnPositionTest.Location = new System.Drawing.Point(564, 153); this.btnPositionTest.Location = new System.Drawing.Point(564, 145);
this.btnPositionTest.Name = "btnPositionTest"; this.btnPositionTest.Name = "btnPositionTest";
this.btnPositionTest.Size = new System.Drawing.Size(100, 35); this.btnPositionTest.Size = new System.Drawing.Size(100, 35);
this.btnPositionTest.TabIndex = 318; this.btnPositionTest.TabIndex = 318;
...@@ -769,18 +676,6 @@ ...@@ -769,18 +676,6 @@
this.lblMsg.TabIndex = 260; this.lblMsg.TabIndex = 260;
this.lblMsg.Text = "急停未开"; this.lblMsg.Text = "急停未开";
// //
// cmbHand
//
this.cmbHand.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbHand.FormattingEnabled = true;
this.cmbHand.Items.AddRange(new object[] {
"右臂",
"左臂"});
this.cmbHand.Location = new System.Drawing.Point(76, 106);
this.cmbHand.Name = "cmbHand";
this.cmbHand.Size = new System.Drawing.Size(70, 25);
this.cmbHand.TabIndex = 38;
//
// btnSavePoint // btnSavePoint
// //
this.btnSavePoint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnSavePoint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
...@@ -798,7 +693,7 @@ ...@@ -798,7 +693,7 @@
// //
this.btnStopDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnStopDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnStopDown.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnStopDown.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStopDown.Location = new System.Drawing.Point(564, 65); this.btnStopDown.Location = new System.Drawing.Point(564, 57);
this.btnStopDown.Name = "btnStopDown"; this.btnStopDown.Name = "btnStopDown";
this.btnStopDown.Size = new System.Drawing.Size(100, 35); this.btnStopDown.Size = new System.Drawing.Size(100, 35);
this.btnStopDown.TabIndex = 317; this.btnStopDown.TabIndex = 317;
...@@ -810,7 +705,7 @@ ...@@ -810,7 +705,7 @@
// //
this.btnGoHome.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnGoHome.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnGoHome.FlatAppearance.BorderSize = 0; this.btnGoHome.FlatAppearance.BorderSize = 0;
this.btnGoHome.Location = new System.Drawing.Point(564, 109); this.btnGoHome.Location = new System.Drawing.Point(564, 101);
this.btnGoHome.Name = "btnGoHome"; this.btnGoHome.Name = "btnGoHome";
this.btnGoHome.Size = new System.Drawing.Size(100, 35); this.btnGoHome.Size = new System.Drawing.Size(100, 35);
this.btnGoHome.TabIndex = 35; this.btnGoHome.TabIndex = 35;
...@@ -818,15 +713,6 @@ ...@@ -818,15 +713,6 @@
this.btnGoHome.UseVisualStyleBackColor = true; this.btnGoHome.UseVisualStyleBackColor = true;
this.btnGoHome.Click += new System.EventHandler(this.btnGoHome_Click); this.btnGoHome.Click += new System.EventHandler(this.btnGoHome_Click);
// //
// label23
//
this.label23.AutoSize = true;
this.label23.Location = new System.Drawing.Point(35, 111);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(35, 17);
this.label23.TabIndex = 37;
this.label23.Text = "手臂:";
//
// label5 // label5
// //
this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
...@@ -840,33 +726,6 @@ ...@@ -840,33 +726,6 @@
this.label5.Text = "送丝速度/毫米:"; this.label5.Text = "送丝速度/毫米:";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// txtRobotZ
//
this.txtRobotZ.AutoSize = true;
this.txtRobotZ.Location = new System.Drawing.Point(41, 69);
this.txtRobotZ.Name = "txtRobotZ";
this.txtRobotZ.Size = new System.Drawing.Size(15, 17);
this.txtRobotZ.TabIndex = 26;
this.txtRobotZ.Text = "0";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(17, 69);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(27, 17);
this.label13.TabIndex = 7;
this.label13.Text = "Z:";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(15, 33);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(28, 17);
this.label1.TabIndex = 1;
this.label1.Text = "X:";
//
// txtSpeed // txtSpeed
// //
this.txtSpeed.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.txtSpeed.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
...@@ -878,24 +737,6 @@ ...@@ -878,24 +737,6 @@
this.txtSpeed.TabIndex = 275; this.txtSpeed.TabIndex = 275;
this.txtSpeed.Text = "3"; this.txtSpeed.Text = "3";
// //
// lblSpeed
//
this.lblSpeed.AutoSize = true;
this.lblSpeed.Location = new System.Drawing.Point(182, 114);
this.lblSpeed.Name = "lblSpeed";
this.lblSpeed.Size = new System.Drawing.Size(95, 17);
this.lblSpeed.TabIndex = 315;
this.lblSpeed.Text = "步进值:0.5mm";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(113, 69);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(29, 17);
this.label11.TabIndex = 5;
this.label11.Text = "U:";
//
// btnStopSend // btnStopSend
// //
this.btnStopSend.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnStopSend.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
...@@ -924,7 +765,7 @@ ...@@ -924,7 +765,7 @@
// //
// tckSpeed // tckSpeed
// //
this.tckSpeed.Location = new System.Drawing.Point(12, 149); this.tckSpeed.Location = new System.Drawing.Point(6, 143);
this.tckSpeed.Maximum = 4; this.tckSpeed.Maximum = 4;
this.tckSpeed.Minimum = 1; this.tckSpeed.Minimum = 1;
this.tckSpeed.Name = "tckSpeed"; this.tckSpeed.Name = "tckSpeed";
...@@ -933,30 +774,12 @@ ...@@ -933,30 +774,12 @@
this.tckSpeed.Value = 3; this.tckSpeed.Value = 3;
this.tckSpeed.ValueChanged += new System.EventHandler(this.tckSpeed_ValueChanged); this.tckSpeed.ValueChanged += new System.EventHandler(this.tckSpeed_ValueChanged);
// //
// txtRobotU
//
this.txtRobotU.AutoSize = true;
this.txtRobotU.Location = new System.Drawing.Point(139, 69);
this.txtRobotU.Name = "txtRobotU";
this.txtRobotU.Size = new System.Drawing.Size(15, 17);
this.txtRobotU.TabIndex = 24;
this.txtRobotU.Text = "0";
//
// txtRobotY
//
this.txtRobotY.AutoSize = true;
this.txtRobotY.Location = new System.Drawing.Point(139, 33);
this.txtRobotY.Name = "txtRobotY";
this.txtRobotY.Size = new System.Drawing.Size(15, 17);
this.txtRobotY.TabIndex = 22;
this.txtRobotY.Text = "0";
//
// btnWUp // btnWUp
// //
this.btnWUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnWUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnWUp.Enabled = false; this.btnWUp.Enabled = false;
this.btnWUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnWUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnWUp.Location = new System.Drawing.Point(564, 21); this.btnWUp.Location = new System.Drawing.Point(564, 13);
this.btnWUp.Name = "btnWUp"; this.btnWUp.Name = "btnWUp";
this.btnWUp.Size = new System.Drawing.Size(100, 35); this.btnWUp.Size = new System.Drawing.Size(100, 35);
this.btnWUp.TabIndex = 254; this.btnWUp.TabIndex = 254;
...@@ -964,15 +787,6 @@ ...@@ -964,15 +787,6 @@
this.btnWUp.UseVisualStyleBackColor = true; this.btnWUp.UseVisualStyleBackColor = true;
this.btnWUp.Click += new System.EventHandler(this.btnWUp_Click); this.btnWUp.Click += new System.EventHandler(this.btnWUp_Click);
// //
// txtRobotX
//
this.txtRobotX.AutoSize = true;
this.txtRobotX.Location = new System.Drawing.Point(41, 33);
this.txtRobotX.Name = "txtRobotX";
this.txtRobotX.Size = new System.Drawing.Size(15, 17);
this.txtRobotX.TabIndex = 20;
this.txtRobotX.Text = "0";
//
// btnChange // btnChange
// //
this.btnChange.FlatAppearance.BorderSize = 0; this.btnChange.FlatAppearance.BorderSize = 0;
...@@ -985,32 +799,6 @@ ...@@ -985,32 +799,6 @@
this.btnChange.UseVisualStyleBackColor = true; this.btnChange.UseVisualStyleBackColor = true;
this.btnChange.Click += new System.EventHandler(this.btnChange_Click); this.btnChange.Click += new System.EventHandler(this.btnChange_Click);
// //
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(112, 33);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(27, 17);
this.label12.TabIndex = 3;
this.label12.Text = "Y:";
//
// panel2
//
this.panel2.BackColor = System.Drawing.SystemColors.Control;
this.panel2.Controls.Add(this.btnUAdd);
this.panel2.Controls.Add(this.btnUDel);
this.panel2.Controls.Add(this.btnZAdd);
this.panel2.Controls.Add(this.btnXDel);
this.panel2.Controls.Add(this.btnZDel);
this.panel2.Controls.Add(this.btnXAdd);
this.panel2.Controls.Add(this.btnYAdd);
this.panel2.Controls.Add(this.btnYDel);
this.panel2.Location = new System.Drawing.Point(206, 60);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(240, 94);
this.panel2.TabIndex = 258;
this.panel2.Visible = false;
//
// label25 // label25
// //
this.label25.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label25.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
...@@ -1045,7 +833,9 @@ ...@@ -1045,7 +833,9 @@
this.Column_X, this.Column_X,
this.Column_Y, this.Column_Y,
this.Column_Z, this.Column_Z,
this.Column_U, this.Column_RX,
this.Column_RY,
this.Column_RZ,
this.Column_preheatTemperature, this.Column_preheatTemperature,
this.Column_preheatTemperatureMax, this.Column_preheatTemperatureMax,
this.Column_preheatTemperatureMin, this.Column_preheatTemperatureMin,
...@@ -1060,7 +850,6 @@ ...@@ -1060,7 +850,6 @@
this.Column_sendWireTime, this.Column_sendWireTime,
this.Column_pointType, this.Column_pointType,
this.Column_isClear, this.Column_isClear,
this.Column_HandDirection,
this.Column_ClearTime, this.Column_ClearTime,
this.Column_getPosition, this.Column_getPosition,
this.Column_MoveTest, this.Column_MoveTest,
...@@ -1069,14 +858,14 @@ ...@@ -1069,14 +858,14 @@
this.Column_Up, this.Column_Up,
this.Column_Down}); this.Column_Down});
this.dgvList.ContextMenuStrip = this.contextMenuStrip2; this.dgvList.ContextMenuStrip = this.contextMenuStrip2;
this.dgvList.Location = new System.Drawing.Point(12, 301); this.dgvList.Location = new System.Drawing.Point(12, 277);
this.dgvList.MultiSelect = false; this.dgvList.MultiSelect = false;
this.dgvList.Name = "dgvList"; this.dgvList.Name = "dgvList";
this.dgvList.ReadOnly = true; this.dgvList.ReadOnly = true;
this.dgvList.RowHeadersWidth = 5; this.dgvList.RowHeadersWidth = 5;
this.dgvList.RowTemplate.Height = 23; this.dgvList.RowTemplate.Height = 23;
this.dgvList.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dgvList.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dgvList.Size = new System.Drawing.Size(869, 327); this.dgvList.Size = new System.Drawing.Size(869, 347);
this.dgvList.TabIndex = 31; this.dgvList.TabIndex = 31;
this.dgvList.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick); this.dgvList.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
this.dgvList.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvList_CellMouseDown); this.dgvList.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvList_CellMouseDown);
...@@ -1106,7 +895,7 @@ ...@@ -1106,7 +895,7 @@
// //
// Column_X // Column_X
// //
this.Column_X.DataPropertyName = "PositionX"; this.Column_X.DataPropertyName = "RobotX";
this.Column_X.HeaderText = "X"; this.Column_X.HeaderText = "X";
this.Column_X.Name = "Column_X"; this.Column_X.Name = "Column_X";
this.Column_X.ReadOnly = true; this.Column_X.ReadOnly = true;
...@@ -1115,7 +904,7 @@ ...@@ -1115,7 +904,7 @@
// //
// Column_Y // Column_Y
// //
this.Column_Y.DataPropertyName = "PositionY"; this.Column_Y.DataPropertyName = "RobotY";
this.Column_Y.HeaderText = "Y"; this.Column_Y.HeaderText = "Y";
this.Column_Y.Name = "Column_Y"; this.Column_Y.Name = "Column_Y";
this.Column_Y.ReadOnly = true; this.Column_Y.ReadOnly = true;
...@@ -1124,21 +913,37 @@ ...@@ -1124,21 +913,37 @@
// //
// Column_Z // Column_Z
// //
this.Column_Z.DataPropertyName = "PositionZ"; this.Column_Z.DataPropertyName = "RobotZ";
this.Column_Z.HeaderText = "Z"; this.Column_Z.HeaderText = "Z";
this.Column_Z.Name = "Column_Z"; this.Column_Z.Name = "Column_Z";
this.Column_Z.ReadOnly = true; this.Column_Z.ReadOnly = true;
this.Column_Z.Visible = false; this.Column_Z.Visible = false;
this.Column_Z.Width = 75; this.Column_Z.Width = 75;
// //
// Column_U // Column_RX
//
this.Column_RX.DataPropertyName = "RobotRX";
this.Column_RX.HeaderText = "RX";
this.Column_RX.Name = "Column_RX";
this.Column_RX.ReadOnly = true;
this.Column_RX.Visible = false;
this.Column_RX.Width = 75;
//
// Column_RY
//
this.Column_RY.DataPropertyName = "RobotRY";
this.Column_RY.HeaderText = "RY";
this.Column_RY.Name = "Column_RY";
this.Column_RY.ReadOnly = true;
this.Column_RY.Visible = false;
//
// Column_RZ
// //
this.Column_U.DataPropertyName = "PositionU"; this.Column_RZ.DataPropertyName = "RobotRZ";
this.Column_U.HeaderText = "角度"; this.Column_RZ.HeaderText = "RZ";
this.Column_U.Name = "Column_U"; this.Column_RZ.Name = "Column_RZ";
this.Column_U.ReadOnly = true; this.Column_RZ.ReadOnly = true;
this.Column_U.Visible = false; this.Column_RZ.Visible = false;
this.Column_U.Width = 75;
// //
// Column_preheatTemperature // Column_preheatTemperature
// //
...@@ -1258,17 +1063,6 @@ ...@@ -1258,17 +1063,6 @@
this.Column_isClear.ReadOnly = true; this.Column_isClear.ReadOnly = true;
this.Column_isClear.Visible = false; this.Column_isClear.Visible = false;
// //
// Column_HandDirection
//
this.Column_HandDirection.DataPropertyName = "HandDirection";
this.Column_HandDirection.HeaderText = "方向";
this.Column_HandDirection.Name = "Column_HandDirection";
this.Column_HandDirection.ReadOnly = true;
this.Column_HandDirection.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.Column_HandDirection.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.Column_HandDirection.Visible = false;
this.Column_HandDirection.Width = 80;
//
// Column_ClearTime // Column_ClearTime
// //
this.Column_ClearTime.DataPropertyName = "ClearTime"; this.Column_ClearTime.DataPropertyName = "ClearTime";
...@@ -1359,7 +1153,7 @@ ...@@ -1359,7 +1153,7 @@
this.groupBox1.Controls.Add(this.label2); this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.btnSave); this.groupBox1.Controls.Add(this.btnSave);
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(12, 11); this.groupBox1.Location = new System.Drawing.Point(12, 8);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(869, 68); this.groupBox1.Size = new System.Drawing.Size(869, 68);
this.groupBox1.TabIndex = 20; this.groupBox1.TabIndex = 20;
...@@ -1506,21 +1300,113 @@ ...@@ -1506,21 +1300,113 @@
this.label14.Text = "条形码"; this.label14.Text = "条形码";
this.label14.Visible = false; this.label14.Visible = false;
// //
// dataGridViewImageColumn1 // label12
// //
this.dataGridViewImageColumn1.HeaderText = "上升"; this.label12.AutoSize = true;
this.dataGridViewImageColumn1.Image = ((System.Drawing.Image)(resources.GetObject("dataGridViewImageColumn1.Image"))); this.label12.Location = new System.Drawing.Point(15, 69);
this.dataGridViewImageColumn1.Name = "dataGridViewImageColumn1"; this.label12.Name = "label12";
this.dataGridViewImageColumn1.Visible = false; this.label12.Size = new System.Drawing.Size(27, 17);
this.dataGridViewImageColumn1.Width = 50; this.label12.TabIndex = 3;
this.label12.Text = "Y:";
// //
// dataGridViewImageColumn2 // txtRobotX
// //
this.dataGridViewImageColumn2.HeaderText = "下降"; this.txtRobotX.AutoSize = true;
this.dataGridViewImageColumn2.Image = ((System.Drawing.Image)(resources.GetObject("dataGridViewImageColumn2.Image"))); this.txtRobotX.Location = new System.Drawing.Point(41, 33);
this.dataGridViewImageColumn2.Name = "dataGridViewImageColumn2"; this.txtRobotX.Name = "txtRobotX";
this.dataGridViewImageColumn2.Visible = false; this.txtRobotX.Size = new System.Drawing.Size(15, 17);
this.dataGridViewImageColumn2.Width = 50; this.txtRobotX.TabIndex = 20;
this.txtRobotX.Text = "0";
//
// txtRobotY
//
this.txtRobotY.AutoSize = true;
this.txtRobotY.Location = new System.Drawing.Point(42, 69);
this.txtRobotY.Name = "txtRobotY";
this.txtRobotY.Size = new System.Drawing.Size(15, 17);
this.txtRobotY.TabIndex = 22;
this.txtRobotY.Text = "0";
//
// lblRobotRZ
//
this.lblRobotRZ.AutoSize = true;
this.lblRobotRZ.Location = new System.Drawing.Point(127, 106);
this.lblRobotRZ.Name = "lblRobotRZ";
this.lblRobotRZ.Size = new System.Drawing.Size(15, 17);
this.lblRobotRZ.TabIndex = 324;
this.lblRobotRZ.Text = "0";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(17, 106);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(27, 17);
this.label13.TabIndex = 7;
this.label13.Text = "Z:";
//
// txtRobotZ
//
this.txtRobotZ.AutoSize = true;
this.txtRobotZ.Location = new System.Drawing.Point(41, 106);
this.txtRobotZ.Name = "txtRobotZ";
this.txtRobotZ.Size = new System.Drawing.Size(15, 17);
this.txtRobotZ.TabIndex = 26;
this.txtRobotZ.Text = "0";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(91, 69);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(35, 17);
this.label16.TabIndex = 320;
this.label16.Text = "RY:";
//
// lblRobotRX
//
this.lblRobotRX.AutoSize = true;
this.lblRobotRX.Location = new System.Drawing.Point(127, 33);
this.lblRobotRX.Name = "lblRobotRX";
this.lblRobotRX.Size = new System.Drawing.Size(15, 17);
this.lblRobotRX.TabIndex = 322;
this.lblRobotRX.Text = "0";
//
// lblRobotRY
//
this.lblRobotRY.AutoSize = true;
this.lblRobotRY.Location = new System.Drawing.Point(128, 69);
this.lblRobotRY.Name = "lblRobotRY";
this.lblRobotRY.Size = new System.Drawing.Size(15, 17);
this.lblRobotRY.TabIndex = 323;
this.lblRobotRY.Text = "0";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(91, 33);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(36, 17);
this.label8.TabIndex = 319;
this.label8.Text = "RX:";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(91, 106);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(35, 17);
this.label7.TabIndex = 321;
this.label7.Text = "RZ:";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(15, 33);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(28, 17);
this.label1.TabIndex = 1;
this.label1.Text = "X:";
// //
// FrmBoardInfo // FrmBoardInfo
// //
...@@ -1558,7 +1444,6 @@ ...@@ -1558,7 +1444,6 @@
this.groupBox2.PerformLayout(); this.groupBox2.PerformLayout();
this.panel3.ResumeLayout(false); this.panel3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.tckSpeed)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.tckSpeed)).EndInit();
this.panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvList)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvList)).EndInit();
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout(); this.groupBox1.PerformLayout();
...@@ -1579,14 +1464,6 @@ ...@@ -1579,14 +1464,6 @@
private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.DataGridView dgvList; private System.Windows.Forms.DataGridView dgvList;
private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label txtRobotY;
private System.Windows.Forms.Label txtRobotX;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label txtRobotU;
private System.Windows.Forms.Label txtRobotZ;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Button btnSavePoint; private System.Windows.Forms.Button btnSavePoint;
private System.Windows.Forms.Button btnSave; private System.Windows.Forms.Button btnSave;
private System.Windows.Forms.Button btnWStop; private System.Windows.Forms.Button btnWStop;
...@@ -1612,22 +1489,12 @@ ...@@ -1612,22 +1489,12 @@
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem 保存焊点ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 保存焊点ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 移动到此处ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 移动到此处ToolStripMenuItem;
private System.Windows.Forms.Button btnUDel;
private System.Windows.Forms.Button btnUAdd;
private System.Windows.Forms.Button btnZDel;
private System.Windows.Forms.Button btnZAdd;
private System.Windows.Forms.Button btnXDel;
private System.Windows.Forms.Button btnXAdd;
private System.Windows.Forms.Button btnYAdd;
private System.Windows.Forms.Button btnYDel;
private System.Windows.Forms.ToolTip toolTip1; private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip2; private System.Windows.Forms.ContextMenuStrip contextMenuStrip2;
private System.Windows.Forms.ToolStripMenuItem 上升ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 上升ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 下降ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 下降ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 删除ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 删除ToolStripMenuItem;
private System.Windows.Forms.Label lblMsg; private System.Windows.Forms.Label lblMsg;
private System.Windows.Forms.Label label23;
private System.Windows.Forms.ComboBox cmbHand;
private System.Windows.Forms.Label label25; private System.Windows.Forms.Label label25;
private System.Windows.Forms.Label label24; private System.Windows.Forms.Label label24;
private System.Windows.Forms.DataGridViewImageColumn dataGridViewImageColumn1; private System.Windows.Forms.DataGridViewImageColumn dataGridViewImageColumn1;
...@@ -1635,7 +1502,6 @@ ...@@ -1635,7 +1502,6 @@
private System.Windows.Forms.ToolStripMenuItem 更新坐标ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 更新坐标ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 测试位置ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 测试位置ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 详情ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 详情ToolStripMenuItem;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Button btnStopSend; private System.Windows.Forms.Button btnStopSend;
private System.Windows.Forms.Button btnSendWire; private System.Windows.Forms.Button btnSendWire;
private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label5;
...@@ -1654,12 +1520,23 @@ ...@@ -1654,12 +1520,23 @@
private System.Windows.Forms.Label label10; private System.Windows.Forms.Label label10;
private System.Windows.Forms.Button btnPositionTest; private System.Windows.Forms.Button btnPositionTest;
private System.Windows.Forms.Panel panPoint; private System.Windows.Forms.Panel panPoint;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.PictureBox picYDel;
private System.Windows.Forms.PictureBox picYAdd;
private System.Windows.Forms.PictureBox picXAdd;
private System.Windows.Forms.PictureBox picXDel;
private System.Windows.Forms.PictureBox picZDel;
private System.Windows.Forms.PictureBox picUDel;
private System.Windows.Forms.PictureBox picZAdd;
private System.Windows.Forms.PictureBox picUAdd;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_pointNum; private System.Windows.Forms.DataGridViewTextBoxColumn Column_pointNum;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_Name; private System.Windows.Forms.DataGridViewTextBoxColumn Column_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_X; private System.Windows.Forms.DataGridViewTextBoxColumn Column_X;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_Y; private System.Windows.Forms.DataGridViewTextBoxColumn Column_Y;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_Z; private System.Windows.Forms.DataGridViewTextBoxColumn Column_Z;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_U; private System.Windows.Forms.DataGridViewTextBoxColumn Column_RX;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_RY;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_RZ;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_preheatTemperature; private System.Windows.Forms.DataGridViewTextBoxColumn Column_preheatTemperature;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_preheatTemperatureMax; private System.Windows.Forms.DataGridViewTextBoxColumn Column_preheatTemperatureMax;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_preheatTemperatureMin; private System.Windows.Forms.DataGridViewTextBoxColumn Column_preheatTemperatureMin;
...@@ -1674,7 +1551,6 @@ ...@@ -1674,7 +1551,6 @@
private System.Windows.Forms.DataGridViewTextBoxColumn Column_sendWireTime; private System.Windows.Forms.DataGridViewTextBoxColumn Column_sendWireTime;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_pointType; private System.Windows.Forms.DataGridViewTextBoxColumn Column_pointType;
private System.Windows.Forms.DataGridViewCheckBoxColumn Column_isClear; private System.Windows.Forms.DataGridViewCheckBoxColumn Column_isClear;
private System.Windows.Forms.DataGridViewComboBoxColumn Column_HandDirection;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_ClearTime; private System.Windows.Forms.DataGridViewTextBoxColumn Column_ClearTime;
private System.Windows.Forms.DataGridViewLinkColumn Column_getPosition; private System.Windows.Forms.DataGridViewLinkColumn Column_getPosition;
private System.Windows.Forms.DataGridViewLinkColumn Column_MoveTest; private System.Windows.Forms.DataGridViewLinkColumn Column_MoveTest;
...@@ -1682,14 +1558,17 @@ ...@@ -1682,14 +1558,17 @@
private System.Windows.Forms.DataGridViewLinkColumn Column_Del; private System.Windows.Forms.DataGridViewLinkColumn Column_Del;
private System.Windows.Forms.DataGridViewImageColumn Column_Up; private System.Windows.Forms.DataGridViewImageColumn Column_Up;
private System.Windows.Forms.DataGridViewImageColumn Column_Down; private System.Windows.Forms.DataGridViewImageColumn Column_Down;
private System.Windows.Forms.Panel panel3; private System.Windows.Forms.Label lblRobotRZ;
private System.Windows.Forms.PictureBox picYDel; private System.Windows.Forms.Label label7;
private System.Windows.Forms.PictureBox picYAdd; private System.Windows.Forms.Label label8;
private System.Windows.Forms.PictureBox picXAdd; private System.Windows.Forms.Label lblRobotRY;
private System.Windows.Forms.PictureBox picXDel; private System.Windows.Forms.Label lblRobotRX;
private System.Windows.Forms.PictureBox picZDel; private System.Windows.Forms.Label label16;
private System.Windows.Forms.PictureBox picUDel; private System.Windows.Forms.Label txtRobotZ;
private System.Windows.Forms.PictureBox picZAdd; private System.Windows.Forms.Label label13;
private System.Windows.Forms.PictureBox picUAdd; private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label txtRobotY;
private System.Windows.Forms.Label txtRobotX;
private System.Windows.Forms.Label label12;
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -90,15 +90,15 @@ namespace URSoldering.Client ...@@ -90,15 +90,15 @@ namespace URSoldering.Client
LogUtil.error("进入焊接界面,发现WeldRobotBean自动运行中,关闭自动运行"); LogUtil.error("进入焊接界面,发现WeldRobotBean自动运行中,关闭自动运行");
WeldRobotBean.StopRun(); WeldRobotBean.StopRun();
} }
if (EpsonDevice.IsRun) if (URRobotControl.IsRun)
{ {
EpsonDevice.FreeAxis(); URRobotControl.FreeAxis();
isConnect = true; isConnect = true;
btnChange.Text = "切换到自动模式(&M)(当前手动)"; btnChange.Text = "切换到自动模式(&M)(当前手动)";
RobotStatus(true); RobotStatus(true);
System.Threading.Thread.Sleep(100); System.Threading.Thread.Sleep(100);
EpsonDevice.GetPosition(AfterGet); UpdateRobotPosition();
} }
else else
{ {
...@@ -136,7 +136,6 @@ namespace URSoldering.Client ...@@ -136,7 +136,6 @@ namespace URSoldering.Client
btnSendWire.Enabled = false ; btnSendWire.Enabled = false ;
btnStopSend.Enabled = false ; btnStopSend.Enabled = false ;
} }
loadHand();
if (!ConfigAppSettings.GetBoolValue(Setting_Init.ISDebug)) if (!ConfigAppSettings.GetBoolValue(Setting_Init.ISDebug))
{ {
UsbCameraHDevelop.OpenCamera(VideoCameraName); UsbCameraHDevelop.OpenCamera(VideoCameraName);
...@@ -144,6 +143,18 @@ namespace URSoldering.Client ...@@ -144,6 +143,18 @@ namespace URSoldering.Client
usbTimer.Enabled = true; usbTimer.Enabled = true;
isFinishLoad = true; isFinishLoad = true;
} }
private void UpdateRobotPosition()
{
URPointValue point = URRobotControl.GetLastPosition();
txtRobotX.Text = point.X.ToString();
txtRobotY.Text = point.Y.ToString();
txtRobotZ.Text = point.Z.ToString();
lblRobotRX.Text = point.RX.ToString();
lblRobotRY.Text = point.RY.ToString();
lblRobotRZ.Text = point.RZ.ToString();
}
private int dWidth = 0; private int dWidth = 0;
private int dHeight = 0; private int dHeight = 0;
private string VideoCameraName = ConfigAppSettings.GetValue(Setting_Init.VideoCameraName); private string VideoCameraName = ConfigAppSettings.GetValue(Setting_Init.VideoCameraName);
...@@ -177,60 +188,12 @@ namespace URSoldering.Client ...@@ -177,60 +188,12 @@ namespace URSoldering.Client
LogUtil.error("获取实时出错:" + ex.ToString()); LogUtil.error("获取实时出错:" + ex.ToString());
} }
} }
private void AfterMove(string result)
{
}
private void AfterGet(double x, double y, double z, double u, int hand)
{
PointValue point = new PointValue(x, y, u, z, hand);
//PointValue point = EpsonDevice.LastPoint;
this.txtRobotX.Text = point.X.ToString();
this.txtRobotY.Text = point.Y.ToString();
this.txtRobotU.Text = point.U.ToString();
this.txtRobotZ.Text = point.Z.ToString();
string msg = WeldRobotBean.CheckEpsonPoint(point);
lblEpsonError.Text = msg;
if (point.HandDir.Equals(1))
{
cmbHand.SelectedIndex = 0;
}
else
{
cmbHand.SelectedIndex = 1;
}
if (point.X != 0 && isConnect == false)
{
EpsonDevice.FreeAxis();
isConnect = true;
btnChange.Text = "切换到自动模式(&M)(当前手动)";
RobotStatus(true);
}
}
private void loadHand()
{
List<WeldPointInfo> point = new List<WeldPointInfo>();
point.Add(new WeldPointInfo(0));
point.Add(new WeldPointInfo(1));
point.Add(new WeldPointInfo(2));
this.Column_HandDirection.DataSource = point;
this.Column_HandDirection.ValueMember = "HandDirection";
this.Column_HandDirection.DisplayMember = "HandValue";
}
private void RobotStatus(bool isConnect) private void RobotStatus(bool isConnect)
{ {
btnChange.Enabled = isConnect; btnChange.Enabled = isConnect;
btnXAdd.Enabled = isConnect;
btnXDel.Enabled = isConnect;
btnYAdd.Enabled = isConnect;
btnYDel.Enabled = isConnect;
btnUAdd.Enabled = isConnect;
btnUDel.Enabled = isConnect;
btnZAdd.Enabled = isConnect;
btnZDel.Enabled = isConnect;
picXAdd.Enabled = isConnect; picXAdd.Enabled = isConnect;
picXDel.Enabled = isConnect; picXDel.Enabled = isConnect;
picYAdd.Enabled = isConnect; picYAdd.Enabled = isConnect;
...@@ -277,27 +240,28 @@ namespace URSoldering.Client ...@@ -277,27 +240,28 @@ 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.PositionX.ToString(); view.Cells[2].Value = point.RobotX.ToString();
view.Cells[3].Value = point.PositionY.ToString(); view.Cells[3].Value = point.RoobtY.ToString();
view.Cells[4].Value = point.PositionZ.ToString(); view.Cells[4].Value = point.RobotZ.ToString();
view.Cells[5].Value = point.PositionU.ToString(); view.Cells[5].Value = point.RobotRX.ToString();
view.Cells[6].Value = point.RobotRY.ToString();
view.Cells[6].Value = point.preheatTemperature.ToString(); view.Cells[7].Value = point.RobotRZ.ToString();
view.Cells[7].Value = point.preheatTemperatureMax.ToString();
view.Cells[8].Value = point.preheatTemperatureMin.ToString(); view.Cells[8].Value = point.preheatTemperature.ToString();
view.Cells[9].Value = point.preheatTime.ToString(); view.Cells[9].Value = point.preheatTemperatureMax.ToString();
view.Cells[10].Value = point.weldTemperature.ToString(); view.Cells[10].Value = point.preheatTemperatureMin.ToString();
view.Cells[11].Value = point.weldTemperatureMax.ToString(); view.Cells[11].Value = point.preheatTime.ToString();
view.Cells[12].Value = point.weldTemperatureMin.ToString(); view.Cells[12].Value = point.weldTemperature.ToString();
view.Cells[13].Value = point.weldTime.ToString(); view.Cells[13].Value = point.weldTemperatureMax.ToString();
view.Cells[14].Value = point.startSendWireSpeed.ToString(); view.Cells[14].Value = point.weldTemperatureMin.ToString();
view.Cells[15].Value = point.startSendWireTime.ToString(); view.Cells[15].Value = point.weldTime.ToString();
view.Cells[16].Value = point.sendWireSpeed.ToString(); view.Cells[16].Value = point.startSendWireSpeed.ToString();
view.Cells[17].Value = point.sendWireTime.ToString(); view.Cells[17].Value = point.startSendWireTime.ToString();
view.Cells[18].Value = point.pointType.ToString(); view.Cells[18].Value = point.sendWireSpeed.ToString();
view.Cells[19].Value = point.isNeedClear.ToString(); view.Cells[19].Value = point.sendWireTime.ToString();
view.Cells[20].Value = point.HandDirection; view.Cells[20].Value = point.pointType.ToString();
view.Cells[21].Value = point.ClearTime; view.Cells[21].Value = point.isNeedClear.ToString();
view.Cells[22].Value = point.ClearTime;
return view; return view;
} }
private bool isRun = false; private bool isRun = false;
...@@ -336,18 +300,18 @@ namespace URSoldering.Client ...@@ -336,18 +300,18 @@ namespace URSoldering.Client
//this.btnWDown.Enabled = true; //this.btnWDown.Enabled = true;
this.btnWUp.Enabled = true; this.btnWUp.Enabled = true;
} }
if (!EpsonDevice.IsRun&&isRun.Equals(false)) if (!URRobotControl.IsRun&&isRun.Equals(false))
{ {
Task.Factory.StartNew(delegate () Task.Factory.StartNew(delegate ()
{ {
string result = EpsonDevice.Start(); string result = URRobotControl.Start();
if (result != "") if (result != "")
{ {
LogUtil.info("连接失败:" + result); LogUtil.info("连接失败:" + result);
} }
else else
{ {
EpsonDevice.FreeAxis(); URRobotControl.FreeAxis();
isAuto = false; isAuto = false;
} }
}); });
...@@ -356,8 +320,8 @@ namespace URSoldering.Client ...@@ -356,8 +320,8 @@ namespace URSoldering.Client
} }
else else
{ {
//EpsonControl.FreeAxis(); EpsonControl.FreeAxis();
EpsonDevice.GetPosition(AfterGet); UpdateRobotPosition();
} }
} }
} }
...@@ -372,7 +336,7 @@ namespace URSoldering.Client ...@@ -372,7 +336,7 @@ namespace URSoldering.Client
e.Cancel = true; e.Cancel = true;
} }
} }
EpsonDevice.LockAxis(); URRobotControl.LockAxis();
//timer2.Stop(); //timer2.Stop();
timer1.Stop(); timer1.Stop();
UsbCameraHDevelop.CloseAllCamera(); UsbCameraHDevelop.CloseAllCamera();
...@@ -380,18 +344,14 @@ namespace URSoldering.Client ...@@ -380,18 +344,14 @@ namespace URSoldering.Client
private void btnSavePoint_Click(object sender, EventArgs e) private void btnSavePoint_Click(object sender, EventArgs e)
{ {
double x = FormUtil.getDoubleValue(txtRobotX); URPointValue point = GetCurrRobotPoint();
double y = FormUtil.getDoubleValue(txtRobotY);
double u = FormUtil.getDoubleValue(txtRobotU);
double z = FormUtil.getDoubleValue(txtRobotZ);
int hand =GetHand();
//判断原点的Z轴 //判断原点的Z轴
if (z > EpsonDevice.Robot_LIM_Z) if (point.Z > URRobotControl.Robot_LIM_Z)
{ {
MessageBox.Show("保存失败,焊点Z坐标(" + z + ")不能高于最高Z点(" + EpsonDevice.Robot_LIM_Z + ")"); MessageBox.Show("保存失败,焊点Z坐标(" + point.Z + ")不能高于最高Z点(" + URRobotControl.Robot_LIM_Z + ")");
return; return;
} }
AddNewPoint(x, y, u, z, hand); AddNewPoint(point);
liUpdateTime_LinkClicked(null, null); liUpdateTime_LinkClicked(null, null);
} }
...@@ -474,7 +434,26 @@ namespace URSoldering.Client ...@@ -474,7 +434,26 @@ namespace URSoldering.Client
LogUtil.error("行上升出错:" + ex.ToString()); LogUtil.error("行上升出错:" + ex.ToString());
} }
} }
private URPointValue GetRowPoint(int rowIndex)
{
double x = Double.Parse(dgvList.Rows[rowIndex].Cells[this.Column_X.Name].Value.ToString());
double y = Double.Parse(dgvList.Rows[rowIndex].Cells[this.Column_Y.Name].Value.ToString());
double z = Double.Parse(dgvList.Rows[rowIndex].Cells[this.Column_Z.Name].Value.ToString());
double rx = Double.Parse(dgvList.Rows[rowIndex].Cells[this.Column_RX.Name].Value.ToString());
double ry = Double.Parse(dgvList.Rows[rowIndex].Cells[this.Column_RY.Name].Value.ToString());
double rz = Double.Parse(dgvList.Rows[rowIndex].Cells[this.Column_RZ.Name].Value.ToString());
return new URPointValue(x, y, z, rx, ry, rz);
}
private URPointValue GetCurrRobotPoint( )
{
double x = FormUtil.getDoubleValue(txtRobotX);
double y = FormUtil.getDoubleValue(txtRobotY);
double z = FormUtil.getDoubleValue(txtRobotZ);
double rx = FormUtil.getDoubleValue(lblRobotRX);
double ry = FormUtil.getDoubleValue(lblRobotRY);
double rz = FormUtil.getDoubleValue(lblRobotRZ);
return new URPointValue(x, y, z, rx, ry, rz);
}
/// <summary> /// <summary>
/// 移动测试 /// 移动测试
/// </summary> /// </summary>
...@@ -486,34 +465,33 @@ namespace URSoldering.Client ...@@ -486,34 +465,33 @@ namespace URSoldering.Client
MessageBox.Show("请先切换到自动模式!"); MessageBox.Show("请先切换到自动模式!");
return; return;
} }
double x = Double.Parse(dgvList.Rows[rowIndex].Cells[this.Column_X.Name].Value.ToString());
double y = Double.Parse(dgvList.Rows[rowIndex].Cells[this.Column_Y.Name].Value.ToString());
double z = Double.Parse(dgvList.Rows[rowIndex].Cells[this.Column_Z.Name].Value.ToString());
double u = Double.Parse(dgvList.Rows[rowIndex].Cells[this.Column_U.Name].Value.ToString());
int hand = Int32.Parse(dgvList.Rows[rowIndex].Cells[this.Column_HandDirection.Name].Value.ToString());
EpsonDevice.MoveTo(x, y, z, u, isfast, hand,AfterMove); URRobotControl.MoveTo(GetRowPoint(rowIndex));
} }
private void UpdateRow(int rowIndex) private void UpdateRow(int rowIndex)
{ {
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 u_colIndex = dgvList.Columns[this.Column_U.Name].Index;
int z_colIndex = dgvList.Columns[Column_Z.Name].Index; int z_colIndex = dgvList.Columns[Column_Z.Name].Index;
int handIndex = dgvList.Columns[Column_HandDirection.Name].Index; int rx_colIndex = dgvList.Columns[this.Column_RX.Name].Index;
int ry_colIndex = dgvList.Columns[Column_RY.Name].Index;
int rz_colIndex = dgvList.Columns[Column_RZ.Name].Index;
dgvList.Rows[rowIndex].Cells[this.Column_X.Name].Value = txtRobotX.Text.ToString(); dgvList.Rows[rowIndex].Cells[this.Column_X.Name].Value = txtRobotX.Text.ToString();
dgvList.Rows[rowIndex].Cells[this.Column_Y.Name].Value = txtRobotY.Text.ToString(); dgvList.Rows[rowIndex].Cells[this.Column_Y.Name].Value = txtRobotY.Text.ToString();
dgvList.Rows[rowIndex].Cells[this.Column_Z.Name].Value = txtRobotZ.Text; dgvList.Rows[rowIndex].Cells[this.Column_Z.Name].Value = txtRobotZ.Text;
dgvList.Rows[rowIndex].Cells[this.Column_U.Name].Value = txtRobotU.Text; dgvList.Rows[rowIndex].Cells[this.Column_RX.Name].Value = lblRobotRX.Text.ToString();
dgvList.Rows[rowIndex].Cells[this.Column_HandDirection.Name].Value =GetHand(); dgvList.Rows[rowIndex].Cells[this.Column_RY.Name].Value = lblRobotRY.Text.ToString();
dgvList.Rows[rowIndex].Cells[this.Column_RZ.Name].Value = lblRobotRZ.Text;
dgvList.UpdateCellValue(x_colIndex, rowIndex); dgvList.UpdateCellValue(x_colIndex, rowIndex);
dgvList.UpdateCellValue(y_colIndex, rowIndex); dgvList.UpdateCellValue(y_colIndex, rowIndex);
dgvList.UpdateCellValue(u_colIndex, rowIndex);
dgvList.UpdateCellValue(z_colIndex, rowIndex); dgvList.UpdateCellValue(z_colIndex, rowIndex);
dgvList.UpdateCellValue(handIndex, rowIndex); dgvList.UpdateCellValue(rx_colIndex, rowIndex);
dgvList.UpdateCellValue(ry_colIndex, rowIndex);
dgvList.UpdateCellValue(rz_colIndex, rowIndex);
} }
private void DeleteRow(int rowIndex) private void DeleteRow(int rowIndex)
...@@ -744,10 +722,12 @@ namespace URSoldering.Client ...@@ -744,10 +722,12 @@ namespace URSoldering.Client
point.pointName = row.Cells[Column_Name.Name].Value.ToString(); point.pointName = row.Cells[Column_Name.Name].Value.ToString();
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.PositionX = Convert.ToDouble(row.Cells[this.Column_X.Name].Value.ToString()); point.RobotX = Convert.ToDouble(row.Cells[this.Column_X.Name].Value.ToString());
point.PositionY = Convert.ToDouble(row.Cells[this.Column_Y.Name].Value.ToString()); point.RoobtY = Convert.ToDouble(row.Cells[this.Column_Y.Name].Value.ToString());
point.PositionU = Convert.ToDouble(row.Cells[this.Column_U.Name].Value.ToString()); point.RobotZ = Convert.ToDouble(row.Cells[this.Column_Z.Name].Value.ToString());
point.PositionZ = Convert.ToDouble(row.Cells[this.Column_Z.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.RobotRZ = Convert.ToDouble(row.Cells[this.Column_RZ.Name].Value.ToString());
point.weldTemperature = Convert.ToInt32(row.Cells[this.Column_weldTemperature.Name].Value.ToString()); point.weldTemperature = Convert.ToInt32(row.Cells[this.Column_weldTemperature.Name].Value.ToString());
point.weldTime = Convert.ToDouble(row.Cells[this.Column_weldTime.Name].Value.ToString()); point.weldTime = Convert.ToDouble(row.Cells[this.Column_weldTime.Name].Value.ToString());
...@@ -765,7 +745,6 @@ namespace URSoldering.Client ...@@ -765,7 +745,6 @@ namespace URSoldering.Client
point.weldTemperatureMin = Convert.ToInt32(row.Cells[this.Column_weldTemperatureMin.Name].Value.ToString()); point.weldTemperatureMin = Convert.ToInt32(row.Cells[this.Column_weldTemperatureMin.Name].Value.ToString());
point.isNeedClear = Convert.ToBoolean(row.Cells[this.Column_isClear.Name].Value.ToString()); point.isNeedClear = Convert.ToBoolean(row.Cells[this.Column_isClear.Name].Value.ToString());
point.pointType = Convert.ToInt32(row.Cells[this.Column_pointType.Name].Value.ToString()); point.pointType = Convert.ToInt32(row.Cells[this.Column_pointType.Name].Value.ToString());
point.HandDirection = Convert.ToInt32(row.Cells[this.Column_HandDirection.Name].Value);
point.ClearTime=Convert.ToInt32(row.Cells[this.Column_ClearTime.Name].Value.ToString()); point.ClearTime=Convert.ToInt32(row.Cells[this.Column_ClearTime.Name].Value.ToString());
} }
catch (Exception ex) catch (Exception ex)
...@@ -785,7 +764,7 @@ namespace URSoldering.Client ...@@ -785,7 +764,7 @@ namespace URSoldering.Client
{ {
if (isAuto) if (isAuto)
{ {
EpsonDevice.FreeAxis(); URRobotControl.FreeAxis();
isAuto = false; isAuto = false;
btnChange.Text = "切换到自动模式(&M)(当前手动)"; btnChange.Text = "切换到自动模式(&M)(当前手动)";
//timer1.Enabled = true; //timer1.Enabled = true;
...@@ -798,7 +777,7 @@ namespace URSoldering.Client ...@@ -798,7 +777,7 @@ namespace URSoldering.Client
result = MessageBox.Show("切换为自动模式之前,请确保所有人员远离机器人!", "提示", MessageBoxButtons.OKCancel); result = MessageBox.Show("切换为自动模式之前,请确保所有人员远离机器人!", "提示", MessageBoxButtons.OKCancel);
if (result.Equals(DialogResult.OK)) if (result.Equals(DialogResult.OK))
{ {
EpsonDevice.LockAxis(); URRobotControl.LockAxis();
isAuto = true; isAuto = true;
btnChange.Text = "切换到手动模式(&M)(当前自动)"; btnChange.Text = "切换到手动模式(&M)(当前自动)";
//timer1.Enabled = false; //timer1.Enabled = false;
...@@ -809,7 +788,7 @@ namespace URSoldering.Client ...@@ -809,7 +788,7 @@ namespace URSoldering.Client
private void btnRead_Click(object sender, EventArgs e) private void btnRead_Click(object sender, EventArgs e)
{ {
EpsonDevice.GetPosition(AfterGet); //URRobotControl.GetPosition(AfterGet);
} }
protected override void OnVisibleChanged(EventArgs e) protected override void OnVisibleChanged(EventArgs e)
...@@ -930,10 +909,10 @@ namespace URSoldering.Client ...@@ -930,10 +909,10 @@ namespace URSoldering.Client
int index = 0; int index = 0;
foreach (WeldPointInfo weld in pointList) foreach (WeldPointInfo weld in pointList)
{ {
float x = (float)Math.Abs(weld.PositionX - orgX) * imageXiShu; float x = (float)Math.Abs(weld.RobotX - orgX) * imageXiShu;
float y = (float)Math.Abs(weld.PositionY - orgY) * imageXiShu; float y = (float)Math.Abs(weld.RoobtY - orgY) * imageXiShu;
LogUtil.debug("显示焊点:X【" + x + "】Y【" + y + "】,坐标X【" + weld.PositionX + "】坐标Y【" + weld.PositionY + "】"); LogUtil.debug("显示焊点:X【" + x + "】Y【" + y + "】,坐标X【" + weld.RobotX + "】坐标Y【" + weld.RoobtY + "】");
g.FillEllipse(Brushes.Red, x - pointHight / 2, y - pointHight / 2, pointHight, pointHight); g.FillEllipse(Brushes.Red, x - pointHight / 2, y - pointHight / 2, pointHight, pointHight);
//if (index > 0) //if (index > 0)
//{ //{
...@@ -1078,14 +1057,10 @@ namespace URSoldering.Client ...@@ -1078,14 +1057,10 @@ namespace URSoldering.Client
RobotBean.KNDIOMove(IO_Type.SendWire_Down, IO_VALUE.LOW); RobotBean.KNDIOMove(IO_Type.SendWire_Down, IO_VALUE.LOW);
RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.HIGH); RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.HIGH);
double x = WeldRobotBean.EpsonOrgX; URPointValue point = WeldRobotBean.HomePoint;
double y = WeldRobotBean.EpsonOrgY; if (point.X != 0 && point.Y != 0 && point.Z!=0)
double z = WeldRobotBean.EpsonOrgZ;
double u = WeldRobotBean.EpsonOrgU;
int hand = WeldRobotBean.EpsonOrgHandDir;
if (x != 0 && y != 0 && z != 0 && u != 0)
{ {
EpsonDevice.MoveTo(x, y, z, u, false, hand,AfterMove); URRobotControl.MoveTo(point);
} }
else else
{ {
...@@ -1095,22 +1070,19 @@ namespace URSoldering.Client ...@@ -1095,22 +1070,19 @@ namespace URSoldering.Client
private void btnSaveHome_Click(object sender, EventArgs e) private void btnSaveHome_Click(object sender, EventArgs e)
{ {
double orgx = FormUtil.getDoubleValue(txtRobotX); URPointValue point = GetCurrRobotPoint();
double orgy = FormUtil.getDoubleValue(txtRobotY);
double orgu = FormUtil.getDoubleValue(txtRobotU);
double orgz = FormUtil.getDoubleValue(txtRobotZ);
//判断原点的Z轴 //判断原点的Z轴
if (orgz > EpsonDevice.Robot_LIM_Z) if (point.Z > URRobotControl.Robot_LIM_Z)
{ {
MessageBox.Show("保存失败,原点Z坐标(" + orgz + ")不能高于最高Z点(" + EpsonDevice.Robot_LIM_Z + ")"); MessageBox.Show("保存失败,原点Z坐标(" + point.Z + ")不能高于最高Z点(" + URRobotControl.Robot_LIM_Z + ")");
return; return;
} }
int hand =GetHand();
DialogResult result = MessageBox.Show("是否将当前位置X:" + orgx + ",Y:" + orgy + ",U:" + orgu + ",Z:" + orgz + "," + cmbHand.Text + "保存为原点?", "提示", MessageBoxButtons.YesNo); DialogResult result = MessageBox.Show("是否将当前位置" +point.ToShowStr() + "保存为原点?", "提示", MessageBoxButtons.YesNo);
if (result.Equals(DialogResult.Yes)) if (result.Equals(DialogResult.Yes))
{ {
WeldRobotBean.UpdateOrgPoint(orgx, orgy, orgu, orgz, hand); WeldRobotBean.UpdateOrgPoint(point);
MessageBox.Show("保存原点成功!"); MessageBox.Show("保存原点成功!");
} }
} }
...@@ -1151,76 +1123,60 @@ namespace URSoldering.Client ...@@ -1151,76 +1123,60 @@ namespace URSoldering.Client
MessageBox.Show("请点击要保存的焊点"); MessageBox.Show("请点击要保存的焊点");
return; return;
} }
double x = 0; double x = 0;
double y = 0; double y = 0;
GetPicPoint(out x, out y); GetPicPoint(out x, out y);
LogUtil.info("新增焊点:X【" + m_MouseDownPoint.X + "】Y【" + m_MouseDownPoint.Y + "】,坐标X【" + x + "】坐标Y【" + y + "】"); LogUtil.info("新增焊点:X【" + m_MouseDownPoint.X + "】Y【" + m_MouseDownPoint.Y + "】,坐标X【" + x + "】坐标Y【" + y + "】");
double u = FormUtil.getDoubleValue(txtRobotU);
double z = FormUtil.getDoubleValue(txtRobotZ); double z = FormUtil.getDoubleValue(txtRobotZ);
int hand = GetHand(); URPointValue point = new URPointValue(x, y, z, FormUtil.getDoubleValue(lblRobotRX), FormUtil.getDoubleValue(lblRobotRY), FormUtil.getDoubleValue(lblRobotRZ));
//判断原点的Z轴 //判断原点的Z轴
if (z > EpsonDevice.Robot_LIM_Z) if (z > URRobotControl.Robot_LIM_Z)
{ {
MessageBox.Show("保存失败,焊点Z坐标("+z+")不能高于最高Z点(" + EpsonDevice.Robot_LIM_Z + ")"); MessageBox.Show("保存失败,焊点Z坐标("+z+")不能高于最高Z点(" + URRobotControl.Robot_LIM_Z + ")");
return; return;
} }
AddNewPoint(x, y, u, z, hand); AddNewPoint(point);
liUpdateTime_LinkClicked(null, null); liUpdateTime_LinkClicked(null, null);
} }
private int GetHand()
{
if (cmbHand.SelectedIndex >= 0)
{
return cmbHand.SelectedIndex + 1;
}
else
{
return 0;
}
}
private void AddNewPoint(double x, double y, double u, double z, int hand)
private void AddNewPoint(URPointValue robotP)
{ {
WeldPointInfo weldPointInfo = new WeldPointInfo(); WeldPointInfo point = new WeldPointInfo();
string name = "P" + (dgvList.Rows.Count + 1); string name = "P" + (dgvList.Rows.Count + 1);
FrmWeldPointInfo fwpi = new FrmWeldPointInfo(name,x,y,u,z,hand); FrmWeldPointInfo fwpi = new FrmWeldPointInfo(name,robotP);
DialogResult result = fwpi.ShowDialog(); DialogResult result = fwpi.ShowDialog();
if (result.Equals(DialogResult.OK)) if (result.Equals(DialogResult.OK))
{ {
weldPointInfo = fwpi.weldPointInfo; point = fwpi.weldPointInfo;
DataGridViewRow view = new DataGridViewRow(); DataGridViewRow view = new DataGridViewRow();
view.CreateCells(dgvList); view.CreateCells(dgvList);
view.Cells[0].Value = dgvList.Rows.Count.ToString(); view.Cells[0].Value = point.pointNum.ToString();
view.Cells[1].Value = weldPointInfo.pointName; view.Cells[1].Value = point.pointName;
//view.Cells[2].Value = x.ToString(); view.Cells[2].Value = point.RobotX.ToString();
//view.Cells[3].Value = y.ToString(); view.Cells[3].Value = point.RoobtY.ToString();
//view.Cells[4].Value = z; view.Cells[4].Value = point.RobotZ.ToString();
//view.Cells[5].Value = u; view.Cells[5].Value = point.RobotRX.ToString();
view.Cells[2].Value = weldPointInfo.PositionX.ToString(); view.Cells[6].Value = point.RobotRY.ToString();
view.Cells[3].Value = weldPointInfo.PositionY.ToString(); view.Cells[7].Value = point.RobotRZ.ToString();
view.Cells[4].Value = weldPointInfo.PositionZ;
view.Cells[5].Value = weldPointInfo.PositionU; view.Cells[8].Value = point.preheatTemperature.ToString();
view.Cells[9].Value = point.preheatTemperatureMax.ToString();
view.Cells[6].Value = weldPointInfo.preheatTemperature; view.Cells[10].Value = point.preheatTemperatureMin.ToString();
view.Cells[7].Value = weldPointInfo.preheatTemperatureMax; view.Cells[11].Value = point.preheatTime.ToString();
view.Cells[8].Value = weldPointInfo.preheatTemperatureMin; view.Cells[12].Value = point.weldTemperature.ToString();
view.Cells[9].Value = weldPointInfo.preheatTime; view.Cells[13].Value = point.weldTemperatureMax.ToString();
view.Cells[14].Value = point.weldTemperatureMin.ToString();
view.Cells[10].Value = weldPointInfo.weldTemperature; view.Cells[15].Value = point.weldTime.ToString();
view.Cells[11].Value = weldPointInfo.weldTemperatureMax; view.Cells[16].Value = point.startSendWireSpeed.ToString();
view.Cells[12].Value = weldPointInfo.weldTemperatureMin; view.Cells[17].Value = point.startSendWireTime.ToString();
view.Cells[13].Value = weldPointInfo.weldTime; view.Cells[18].Value = point.sendWireSpeed.ToString();
view.Cells[14].Value = weldPointInfo.startSendWireSpeed; view.Cells[19].Value = point.sendWireTime.ToString();
view.Cells[15].Value = weldPointInfo.startSendWireTime; view.Cells[20].Value = point.pointType.ToString();
view.Cells[16].Value = weldPointInfo.sendWireSpeed; view.Cells[21].Value = point.isNeedClear.ToString();
view.Cells[17].Value = weldPointInfo.sendWireTime; view.Cells[22].Value = point.ClearTime;
view.Cells[18].Value = weldPointInfo.pointType;
view.Cells[19].Value = weldPointInfo.isNeedClear;
view.Cells[20].Value = weldPointInfo.HandDirection;
view.Cells[21].Value = weldPointInfo.ClearTime;
dgvList.Rows.Add(view); dgvList.Rows.Add(view);
if (isFinishLoad && this.txtBoardLength.Text.Trim() != "" && this.txtBoardWidth.Text.Trim() != "") if (isFinishLoad && this.txtBoardLength.Text.Trim() != "" && this.txtBoardWidth.Text.Trim() != "")
...@@ -1260,26 +1216,26 @@ namespace URSoldering.Client ...@@ -1260,26 +1216,26 @@ namespace URSoldering.Client
private void 移动到此处ToolStripMenuItem_Click(object sender, EventArgs e) private void 移动到此处ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
if (m_MouseDownPoint == null || m_MouseDownPoint.X == 0 || m_MouseDownPoint.Y == 0) //if (m_MouseDownPoint == null || m_MouseDownPoint.X == 0 || m_MouseDownPoint.Y == 0)
{ //{
MessageBox.Show("请选择要移动的位置"); // MessageBox.Show("请选择要移动的位置");
return; // return;
} //}
if (isAuto == false) //if (isAuto == false)
{ //{
MessageBox.Show("请先切换到自动模式!"); // MessageBox.Show("请先切换到自动模式!");
return; // return;
} //}
double x = 0; //double x = 0;
double y = 0; //double y = 0;
GetPicPoint(out x, out y); //GetPicPoint(out x, out y);
LogUtil.info("移动到焊点:X【" + m_MouseDownPoint.X + "】Y【" + m_MouseDownPoint.Y + "】,坐标X【" + x + "】坐标Y【" + y + "】"); //LogUtil.info("移动到焊点:X【" + m_MouseDownPoint.X + "】Y【" + m_MouseDownPoint.Y + "】,坐标X【" + x + "】坐标Y【" + y + "】");
double u = FormUtil.getDoubleValue(txtRobotU); //double u = FormUtil.getDoubleValue(txtRobotU);
double z = FormUtil.getDoubleValue(txtRobotZ); //double z = FormUtil.getDoubleValue(txtRobotZ);
int hand =GetHand(); //int hand =GetHand();
EpsonDevice.MoveTo(x, y, z, u, isfast, hand,AfterMove); //URRobotControl.MoveTo(x, y, z, u, isfast, hand,AfterMove);
} }
...@@ -1291,13 +1247,9 @@ namespace URSoldering.Client ...@@ -1291,13 +1247,9 @@ namespace URSoldering.Client
MessageBox.Show("请先切换到自动模式!"); MessageBox.Show("请先切换到自动模式!");
return; return;
} }
double x = FormUtil.getDoubleValue(txtRobotX); URPointValue point = GetCurrRobotPoint();
double y = FormUtil.getDoubleValue(txtRobotY); point.Y += StepValue;
double u = FormUtil.getDoubleValue(txtRobotU); URRobotControl.MoveTo(point);
double z = FormUtil.getDoubleValue(txtRobotZ);
int hand =GetHand();
y+=StepValue;
EpsonDevice.MoveTo(x, y, z, u, isfast, hand,AfterMove);
} }
...@@ -1308,13 +1260,9 @@ namespace URSoldering.Client ...@@ -1308,13 +1260,9 @@ namespace URSoldering.Client
MessageBox.Show("请先切换到自动模式!"); MessageBox.Show("请先切换到自动模式!");
return; return;
} }
double x = FormUtil.getDoubleValue(txtRobotX); URPointValue point = GetCurrRobotPoint();
double y = FormUtil.getDoubleValue(txtRobotY); point.Y -= StepValue;
double u = FormUtil.getDoubleValue(txtRobotU); URRobotControl.MoveTo(point);
double z = FormUtil.getDoubleValue(txtRobotZ);
int hand =GetHand();
y-=StepValue;
EpsonDevice.MoveTo(x, y, z, u, isfast, hand,AfterMove);
} }
private void btnYDel_Click(object sender, EventArgs e) private void btnYDel_Click(object sender, EventArgs e)
...@@ -1324,13 +1272,9 @@ namespace URSoldering.Client ...@@ -1324,13 +1272,9 @@ namespace URSoldering.Client
MessageBox.Show("请先切换到自动模式!"); MessageBox.Show("请先切换到自动模式!");
return; return;
} }
double x = FormUtil.getDoubleValue(txtRobotX); URPointValue point = GetCurrRobotPoint();
double y = FormUtil.getDoubleValue(txtRobotY); point.X -= StepValue;
double u = FormUtil.getDoubleValue(txtRobotU); URRobotControl.MoveTo(point);
double z = FormUtil.getDoubleValue(txtRobotZ);
int hand =GetHand();
x-=StepValue;
EpsonDevice.MoveTo(x, y, z, u, isfast, hand,AfterMove);
} }
private void btnYAdd_Click(object sender, EventArgs e) private void btnYAdd_Click(object sender, EventArgs e)
...@@ -1340,13 +1284,9 @@ namespace URSoldering.Client ...@@ -1340,13 +1284,9 @@ namespace URSoldering.Client
MessageBox.Show("请先切换到自动模式!"); MessageBox.Show("请先切换到自动模式!");
return; return;
} }
double x = FormUtil.getDoubleValue(txtRobotX); URPointValue point = GetCurrRobotPoint();
double y = FormUtil.getDoubleValue(txtRobotY); point.X += StepValue;
double u = FormUtil.getDoubleValue(txtRobotU); URRobotControl.MoveTo(point);
double z = FormUtil.getDoubleValue(txtRobotZ);
int hand =GetHand();
x+=StepValue;
EpsonDevice.MoveTo(x, y, z, u, isfast, hand,AfterMove);
} }
private void btnZAdd_Click(object sender, EventArgs e) private void btnZAdd_Click(object sender, EventArgs e)
...@@ -1356,13 +1296,9 @@ namespace URSoldering.Client ...@@ -1356,13 +1296,9 @@ namespace URSoldering.Client
MessageBox.Show("请先切换到自动模式!"); MessageBox.Show("请先切换到自动模式!");
return; return;
} }
double x = FormUtil.getDoubleValue(txtRobotX); URPointValue point = GetCurrRobotPoint();
double y = FormUtil.getDoubleValue(txtRobotY); point.Z += StepValue;
double u = FormUtil.getDoubleValue(txtRobotU); URRobotControl.MoveTo(point);
double z = FormUtil.getDoubleValue(txtRobotZ);
int hand =GetHand();
z+=StepValue;
EpsonDevice.MoveTo(x, y, z, u, isfast, hand,AfterMove);
} }
private void btnZDel_Click(object sender, EventArgs e) private void btnZDel_Click(object sender, EventArgs e)
...@@ -1372,45 +1308,41 @@ namespace URSoldering.Client ...@@ -1372,45 +1308,41 @@ namespace URSoldering.Client
MessageBox.Show("请先切换到自动模式!"); MessageBox.Show("请先切换到自动模式!");
return; return;
} }
double x = FormUtil.getDoubleValue(txtRobotX); URPointValue point = GetCurrRobotPoint();
double y = FormUtil.getDoubleValue(txtRobotY); point.Z -= StepValue;
double u = FormUtil.getDoubleValue(txtRobotU); URRobotControl.MoveTo(point);
double z = FormUtil.getDoubleValue(txtRobotZ);
int hand =GetHand();
z-=StepValue;
EpsonDevice.MoveTo(x, y, z, u, isfast, hand,AfterMove);
} }
private void btnUAdd_Click(object sender, EventArgs e) private void btnUAdd_Click(object sender, EventArgs e)
{ {
if (isAuto == false) //if (isAuto == false)
{ //{
MessageBox.Show("请先切换到自动模式!"); // MessageBox.Show("请先切换到自动模式!");
return; // return;
} //}
double x = FormUtil.getDoubleValue(txtRobotX); //double x = FormUtil.getDoubleValue(txtRobotX);
double y = FormUtil.getDoubleValue(txtRobotY); //double y = FormUtil.getDoubleValue(txtRobotY);
double u = FormUtil.getDoubleValue(txtRobotU); //double u = FormUtil.getDoubleValue(txtRobotU);
double z = FormUtil.getDoubleValue(txtRobotZ); //double z = FormUtil.getDoubleValue(txtRobotZ);
int hand =GetHand(); //int hand =GetHand();
u+=StepValue; //u+=StepValue;
EpsonDevice.MoveTo(x, y, z, u, isfast, hand,AfterMove); //URRobotControl.MoveTo(x, y, z, u, isfast, hand,AfterMove);
} }
private void btnUDel_Click(object sender, EventArgs e) private void btnUDel_Click(object sender, EventArgs e)
{ {
if (isAuto == false) //if (isAuto == false)
{ //{
MessageBox.Show("请先切换到自动模式!"); // MessageBox.Show("请先切换到自动模式!");
return; // return;
} //}
double x = FormUtil.getDoubleValue(txtRobotX); //double x = FormUtil.getDoubleValue(txtRobotX);
double y = FormUtil.getDoubleValue(txtRobotY); //double y = FormUtil.getDoubleValue(txtRobotY);
double u = FormUtil.getDoubleValue(txtRobotU); //double u = FormUtil.getDoubleValue(txtRobotU);
double z = FormUtil.getDoubleValue(txtRobotZ); //double z = FormUtil.getDoubleValue(txtRobotZ);
int hand =GetHand(); //int hand =GetHand();
u-=StepValue; //u-=StepValue;
EpsonDevice.MoveTo(x, y, z, u, isfast, hand,AfterMove); //URRobotControl.MoveTo(x, y, z, u, isfast, hand,AfterMove);
} }
private void dgvList_DragEnter(object sender, DragEventArgs e) private void dgvList_DragEnter(object sender, DragEventArgs e)
...@@ -1465,7 +1397,6 @@ namespace URSoldering.Client ...@@ -1465,7 +1397,6 @@ namespace URSoldering.Client
for (int i = 0; i < dgvList.RowCount; i++) for (int i = 0; i < dgvList.RowCount; i++)
{ {
Rectangle rec = dgvList.GetRowDisplayRectangle(i, false); Rectangle rec = dgvList.GetRowDisplayRectangle(i, false);
if (dgvList.RectangleToScreen(rec).Contains(x, y)) if (dgvList.RectangleToScreen(rec).Contains(x, y))
return i; return i;
} }
...@@ -1613,44 +1544,35 @@ namespace URSoldering.Client ...@@ -1613,44 +1544,35 @@ namespace URSoldering.Client
private void btnSetClear1_Click(object sender, EventArgs e) private void btnSetClear1_Click(object sender, EventArgs e)
{ {
double clearx = FormUtil.getDoubleValue(txtRobotX); URPointValue point = GetCurrRobotPoint();
double cleary = FormUtil.getDoubleValue(txtRobotY);
double clearu = FormUtil.getDoubleValue(txtRobotU);
double clearz = FormUtil.getDoubleValue(txtRobotZ);
//判断原点的Z轴 //判断原点的Z轴
if (clearz > EpsonDevice.Robot_LIM_Z) if (point.Z > URRobotControl.Robot_LIM_Z)
{ {
MessageBox.Show("保存失败,清洗点1的Z坐标(" + clearz + ")不能高于最高Z点(" + EpsonDevice.Robot_LIM_Z + ")"); MessageBox.Show("保存失败,清洗点1的Z坐标(" + point.Z + ")不能高于最高Z点(" + URRobotControl.Robot_LIM_Z + ")");
return; return;
} }
DialogResult result = MessageBox.Show("是否将当前位置" +point.ToShowStr()+ "保存为清洗点1?", "提示", MessageBoxButtons.YesNo);
int hand = GetHand();
DialogResult result = MessageBox.Show("是否将当前位置X:" + clearx + ",Y:" + cleary + ",U:" + clearu + ",Z:" + clearz + "," + cmbHand.Text + "保存为清洗点1?", "提示", MessageBoxButtons.YesNo);
if (result.Equals(DialogResult.Yes)) if (result.Equals(DialogResult.Yes))
{ {
WeldRobotBean.UpdateClear1Point(clearx, cleary, clearu, clearz, hand); WeldRobotBean.UpdateClear1Point(point);
MessageBox.Show("保存清洗点1成功!"); MessageBox.Show("保存清洗点1成功!");
} }
} }
private void btnSetClear2_Click(object sender, EventArgs e) private void btnSetClear2_Click(object sender, EventArgs e)
{ {
double clearx = FormUtil.getDoubleValue(txtRobotX); URPointValue point = GetCurrRobotPoint();
double cleary = FormUtil.getDoubleValue(txtRobotY);
double clearu = FormUtil.getDoubleValue(txtRobotU);
double clearz = FormUtil.getDoubleValue(txtRobotZ);
//判断原点的Z轴 //判断原点的Z轴
if (clearz > EpsonDevice.Robot_LIM_Z) if (point.Z > URRobotControl.Robot_LIM_Z)
{ {
MessageBox.Show("保存失败,清洗点2的Z坐标(" + clearz + ")不能高于最高Z点(" + EpsonDevice.Robot_LIM_Z + ")"); MessageBox.Show("保存失败,清洗点2的Z坐标(" + point.Z + ")不能高于最高Z点(" + URRobotControl.Robot_LIM_Z + ")");
return; return;
} }
int hand = GetHand(); DialogResult result = MessageBox.Show("是否将当前位置" + point.ToShowStr() + "保存为清洗点2?", "提示", MessageBoxButtons.YesNo);
DialogResult result = MessageBox.Show("是否将当前位置X:" + clearx + ",Y:" + cleary + ",U:" + clearu + ",Z:" + clearz + "," + cmbHand.Text + "保存为清洗点2?", "提示", MessageBoxButtons.YesNo);
if (result.Equals(DialogResult.Yes)) if (result.Equals(DialogResult.Yes))
{ {
WeldRobotBean.UpdateClear2Point(clearx, cleary, clearu, clearz, hand); WeldRobotBean.UpdateClear2Point(point);
MessageBox.Show("保存清洗点2成功!"); MessageBox.Show("保存清洗点2成功!");
} }
} }
...@@ -1699,25 +1621,6 @@ namespace URSoldering.Client ...@@ -1699,25 +1621,6 @@ namespace URSoldering.Client
RobotBean.KNDIOMove(IO_Type.StopCylinder_Up, IO_VALUE.HIGH); RobotBean.KNDIOMove(IO_Type.StopCylinder_Up, IO_VALUE.HIGH);
} }
//private void btnCamera_Click(object sender, EventArgs e)
//{
// //FrmCamera frm = new FrmCamera();
// //frm.ShowDialog();
// if (btnCamera.Text.Equals("查看摄像机"))
// {
// this.panBoard.Visible = false;
// this.panVideo.Visible = true;
// btnCamera.Text = "查看图片";
// }
// else
// {
// this.panBoard.Visible = true ;
// this.panVideo.Visible = false ;
// loadPictureBoxSize();
// btnCamera.Text = "查看摄像机";
// }
//}
private void btnPositionTest_Click(object sender, EventArgs e) private void btnPositionTest_Click(object sender, EventArgs e)
{ {
if (dgvList.SelectedRows != null && dgvList.SelectedRows.Count > 0) if (dgvList.SelectedRows != null && dgvList.SelectedRows.Count > 0)
......
...@@ -478,6 +478,26 @@ ...@@ -478,6 +478,26 @@
<metadata name="contextMenuStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="contextMenuStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>611, 17</value> <value>611, 17</value>
</metadata> </metadata>
<data name="dataGridViewImageColumn1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
xAAADsQBlSsOGwAAANRJREFUSEvtk8ENhSAMQBnAgHplD/c/w8UN1Dkg4adESJWKlsM/8ZIm0FIekCDC
n+iiZtgia20MLizRvu9BCBEDxhw+i7CkRfZJdBxHIUkBtS+8irZty5tqrckxrHmjKsLPNc9zzKU5ME1T
nr8946MIS5RSZ/YqAqCWcjUZKcISODUm5THjOOb8k6wQGWNyE75JItXuSClzDfa4U3TAZ4TF0EjxJAKG
YYg16kOTHeu6Bu/9ObtSEznnYi8F3VGhJqrRRV2UYXcsyxKDC/9ojXRRIyH8ACKfopRlVag2AAAAAElF
TkSuQmCC
</value>
</data>
<data name="dataGridViewImageColumn2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
xAAADsQBlSsOGwAAAONJREFUSEvtk00OhCAMRlkb49/We3j/tS70BuI1TAwzH8FOVQTrYla8pIkttg9I
UOZPJNFrxKKu62xIEYuUUjakJFESEd6OcRzNuq4uOxISbdtmpmly2ZFLR9/3dlCWZa5yJCQqy9KuYcaZ
S8cwDDQsz3NX/XEnqqqK1jDjjHdrWmtqwi45e51T1zXV0evDfwdfuKwoCle9ivhJ7iTgVgS4DLsGew6a
pqE8JAFBEZjnmYa1bev9xj8xoiKwLAsNPQfWnvBIBPg17hG7Ls5jEeAyiQSIRABvxPdOYohFb0milxjz
AeLDoohrNFdzAAAAAElFTkSuQmCC
</value>
</data>
<metadata name="Column_pointNum.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="Column_pointNum.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
...@@ -493,7 +513,13 @@ ...@@ -493,7 +513,13 @@
<metadata name="Column_Z.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="Column_Z.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="Column_U.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="Column_RX.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_RY.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_RZ.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="Column_preheatTemperature.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="Column_preheatTemperature.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
...@@ -538,9 +564,6 @@ ...@@ -538,9 +564,6 @@
<metadata name="Column_isClear.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="Column_isClear.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="Column_HandDirection.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_ClearTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="Column_ClearTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
...@@ -582,26 +605,6 @@ ...@@ -582,26 +605,6 @@
AeLDoohrNFdzAAAAAElFTkSuQmCC AeLDoohrNFdzAAAAAElFTkSuQmCC
</value> </value>
</data> </data>
<data name="dataGridViewImageColumn1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
xAAADsQBlSsOGwAAANRJREFUSEvtk8ENhSAMQBnAgHplD/c/w8UN1Dkg4adESJWKlsM/8ZIm0FIekCDC
n+iiZtgia20MLizRvu9BCBEDxhw+i7CkRfZJdBxHIUkBtS+8irZty5tqrckxrHmjKsLPNc9zzKU5ME1T
nr8946MIS5RSZ/YqAqCWcjUZKcISODUm5THjOOb8k6wQGWNyE75JItXuSClzDfa4U3TAZ4TF0EjxJAKG
YYg16kOTHeu6Bu/9ObtSEznnYi8F3VGhJqrRRV2UYXcsyxKDC/9ojXRRIyH8ACKfopRlVag2AAAAAElF
TkSuQmCC
</value>
</data>
<data name="dataGridViewImageColumn2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
xAAADsQBlSsOGwAAAONJREFUSEvtk00OhCAMRlkb49/We3j/tS70BuI1TAwzH8FOVQTrYla8pIkttg9I
UOZPJNFrxKKu62xIEYuUUjakJFESEd6OcRzNuq4uOxISbdtmpmly2ZFLR9/3dlCWZa5yJCQqy9KuYcaZ
S8cwDDQsz3NX/XEnqqqK1jDjjHdrWmtqwi45e51T1zXV0evDfwdfuKwoCle9ivhJ7iTgVgS4DLsGew6a
pqE8JAFBEZjnmYa1bev9xj8xoiKwLAsNPQfWnvBIBPg17hG7Ls5jEeAyiQSIRABvxPdOYohFb0milxjz
AeLDoohrNFdzAAAAAElFTkSuQmCC
</value>
</data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>35</value> <value>35</value>
</metadata> </metadata>
......
...@@ -226,9 +226,9 @@ namespace URSoldering.Client ...@@ -226,9 +226,9 @@ namespace URSoldering.Client
int index = 0; int index = 0;
foreach (WeldPointInfo weld in pointList) foreach (WeldPointInfo weld in pointList)
{ {
float x = (float)Math.Abs(weld.PositionX - orgX) * picBoard.Width / width - pointHight / 2; //float x = (float)Math.Abs(weld.PositionX - orgX) * picBoard.Width / width - pointHight / 2;
float y = (float)Math.Abs(weld.PositionY - orgY) * picBoard.Width / width - pointHight / 2; //float y = (float)Math.Abs(weld.PositionY - orgY) * picBoard.Width / width - pointHight / 2;
g.FillEllipse(Brushes.Red, x - pointHight / 2, y - pointHight / 2, pointHight, pointHight); //g.FillEllipse(Brushes.Red, x - pointHight / 2, y - pointHight / 2, pointHight, pointHight);
//if (index > 0) //if (index > 0)
//{ //{
// Pen p = new Pen(Color.Red, 2); // Pen p = new Pen(Color.Red, 2);
......
...@@ -30,23 +30,23 @@ namespace URSoldering.Client ...@@ -30,23 +30,23 @@ namespace URSoldering.Client
private void btnWelding_Click(object sender, EventArgs e) private void btnWelding_Click(object sender, EventArgs e)
{ {
//if (BoardManager.CurrBoard == null) if (BoardManager.CurrBoard == null)
//{ {
// if (BoardManager.boardList.Count > 0) if (BoardManager.boardList.Count > 0)
// { {
// BoardManager.UpdateCurrBoard(BoardManager.boardList[0].boardId); BoardManager.UpdateCurrBoard(BoardManager.boardList[0].boardId);
// } }
// else else
// { {
// MessageBox.Show("请先配置程序"); MessageBox.Show("请先配置程序");
// return; return;
// } }
//} }
//isClick = true; isClick = true;
//FrmWork fw = new FrmWork(); FrmWork fw = new FrmWork();
//this.Visible = false; ; this.Visible = false; ;
//fw.ShowDialog(); fw.ShowDialog();
//this.Visible = true; this.Visible = true;
} }
private void btnProduct_Click(object sender, EventArgs e) private void btnProduct_Click(object sender, EventArgs e)
...@@ -109,11 +109,11 @@ namespace URSoldering.Client ...@@ -109,11 +109,11 @@ namespace URSoldering.Client
private void btnAutoEdit_Click(object sender, EventArgs e) private void btnAutoEdit_Click(object sender, EventArgs e)
{ {
isClick = true; //isClick = true;
FrmAutoAddBoard info = new FrmAutoAddBoard(null); //FrmAutoAddBoard info = new FrmAutoAddBoard(null);
this.Visible = false; //this.Visible = false;
info.ShowDialog(); //info.ShowDialog();
this.Visible = true; //this.Visible = true;
} }
private void btnStart_Click(object sender, EventArgs e) private void btnStart_Click(object sender, EventArgs e)
......
...@@ -31,29 +31,20 @@ ...@@ -31,29 +31,20 @@
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmOrgConfig)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmOrgConfig));
this.timer2 = new System.Windows.Forms.Timer(this.components); this.timer2 = new System.Windows.Forms.Timer(this.components);
this.dataGridViewImageColumn1 = new System.Windows.Forms.DataGridViewImageColumn();
this.dataGridViewImageColumn2 = new System.Windows.Forms.DataGridViewImageColumn();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.btnMore = new System.Windows.Forms.Button(); this.btnMore = new System.Windows.Forms.Button();
this.btnBack = new System.Windows.Forms.Button(); this.btnBack = new System.Windows.Forms.Button();
this.btnSetClear2 = new System.Windows.Forms.Button(); this.btnSetClear2 = new System.Windows.Forms.Button();
this.btnSetClear1 = new System.Windows.Forms.Button(); this.btnSetClear1 = new System.Windows.Forms.Button();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.cmbHand = new System.Windows.Forms.ComboBox();
this.label23 = new System.Windows.Forms.Label();
this.txtRobotZ = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.txtRobotU = new System.Windows.Forms.Label();
this.txtRobotY = new System.Windows.Forms.Label();
this.txtRobotX = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.btnSetOrigin = new System.Windows.Forms.Button(); this.btnSetOrigin = new System.Windows.Forms.Button();
this.btnSaveHome = new System.Windows.Forms.Button(); this.btnSaveHome = new System.Windows.Forms.Button();
this.btnSStop = new System.Windows.Forms.Button(); this.btnSStop = new System.Windows.Forms.Button();
this.btnWStop = new System.Windows.Forms.Button(); this.btnWStop = new System.Windows.Forms.Button();
this.label14 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label();
this.dataGridViewImageColumn1 = new System.Windows.Forms.DataGridViewImageColumn(); this.urRobotSControl1 = new UserFromControl.URRobotSControl();
this.dataGridViewImageColumn2 = new System.Windows.Forms.DataGridViewImageColumn();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
...@@ -63,6 +54,22 @@ ...@@ -63,6 +54,22 @@
this.timer2.Interval = 1000; this.timer2.Interval = 1000;
this.timer2.Tick += new System.EventHandler(this.timer2_Tick); this.timer2.Tick += new System.EventHandler(this.timer2_Tick);
// //
// dataGridViewImageColumn1
//
this.dataGridViewImageColumn1.HeaderText = "上升";
this.dataGridViewImageColumn1.Image = ((System.Drawing.Image)(resources.GetObject("dataGridViewImageColumn1.Image")));
this.dataGridViewImageColumn1.Name = "dataGridViewImageColumn1";
this.dataGridViewImageColumn1.Visible = false;
this.dataGridViewImageColumn1.Width = 50;
//
// dataGridViewImageColumn2
//
this.dataGridViewImageColumn2.HeaderText = "下降";
this.dataGridViewImageColumn2.Image = ((System.Drawing.Image)(resources.GetObject("dataGridViewImageColumn2.Image")));
this.dataGridViewImageColumn2.Name = "dataGridViewImageColumn2";
this.dataGridViewImageColumn2.Visible = false;
this.dataGridViewImageColumn2.Width = 50;
//
// panel1 // panel1
// //
this.panel1.AutoScroll = true; this.panel1.AutoScroll = true;
...@@ -76,13 +83,13 @@ ...@@ -76,13 +83,13 @@
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(529, 317); this.panel1.Size = new System.Drawing.Size(529, 318);
this.panel1.TabIndex = 0; this.panel1.TabIndex = 0;
// //
// btnMore // btnMore
// //
this.btnMore.FlatAppearance.BorderSize = 0; this.btnMore.FlatAppearance.BorderSize = 0;
this.btnMore.Location = new System.Drawing.Point(66, 243); this.btnMore.Location = new System.Drawing.Point(70, 260);
this.btnMore.Name = "btnMore"; this.btnMore.Name = "btnMore";
this.btnMore.Size = new System.Drawing.Size(159, 38); this.btnMore.Size = new System.Drawing.Size(159, 38);
this.btnMore.TabIndex = 261; this.btnMore.TabIndex = 261;
...@@ -93,7 +100,7 @@ ...@@ -93,7 +100,7 @@
// btnBack // btnBack
// //
this.btnBack.FlatAppearance.BorderSize = 0; this.btnBack.FlatAppearance.BorderSize = 0;
this.btnBack.Location = new System.Drawing.Point(321, 242); this.btnBack.Location = new System.Drawing.Point(321, 260);
this.btnBack.Name = "btnBack"; this.btnBack.Name = "btnBack";
this.btnBack.Size = new System.Drawing.Size(159, 38); this.btnBack.Size = new System.Drawing.Size(159, 38);
this.btnBack.TabIndex = 260; this.btnBack.TabIndex = 260;
...@@ -125,16 +132,7 @@ ...@@ -125,16 +132,7 @@
// //
// groupBox2 // groupBox2
// //
this.groupBox2.Controls.Add(this.cmbHand); this.groupBox2.Controls.Add(this.urRobotSControl1);
this.groupBox2.Controls.Add(this.label23);
this.groupBox2.Controls.Add(this.txtRobotZ);
this.groupBox2.Controls.Add(this.label13);
this.groupBox2.Controls.Add(this.label1);
this.groupBox2.Controls.Add(this.label11);
this.groupBox2.Controls.Add(this.txtRobotU);
this.groupBox2.Controls.Add(this.txtRobotY);
this.groupBox2.Controls.Add(this.txtRobotX);
this.groupBox2.Controls.Add(this.label12);
this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox2.Location = new System.Drawing.Point(40, 34); this.groupBox2.Location = new System.Drawing.Point(40, 34);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
...@@ -143,99 +141,6 @@ ...@@ -143,99 +141,6 @@
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "机器人实时坐标"; this.groupBox2.Text = "机器人实时坐标";
// //
// cmbHand
//
this.cmbHand.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbHand.FormattingEnabled = true;
this.cmbHand.Items.AddRange(new object[] {
"右臂",
"左臂"});
this.cmbHand.Location = new System.Drawing.Point(79, 136);
this.cmbHand.Name = "cmbHand";
this.cmbHand.Size = new System.Drawing.Size(70, 25);
this.cmbHand.TabIndex = 38;
//
// label23
//
this.label23.AutoSize = true;
this.label23.Location = new System.Drawing.Point(38, 139);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(35, 17);
this.label23.TabIndex = 37;
this.label23.Text = "手臂:";
//
// txtRobotZ
//
this.txtRobotZ.AutoSize = true;
this.txtRobotZ.Location = new System.Drawing.Point(48, 88);
this.txtRobotZ.Name = "txtRobotZ";
this.txtRobotZ.Size = new System.Drawing.Size(15, 17);
this.txtRobotZ.TabIndex = 26;
this.txtRobotZ.Text = "0";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(14, 88);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(27, 17);
this.label13.TabIndex = 7;
this.label13.Text = "Z:";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(14, 40);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(28, 17);
this.label1.TabIndex = 1;
this.label1.Text = "X:";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(136, 88);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(29, 17);
this.label11.TabIndex = 5;
this.label11.Text = "U:";
//
// txtRobotU
//
this.txtRobotU.AutoSize = true;
this.txtRobotU.Location = new System.Drawing.Point(170, 88);
this.txtRobotU.Name = "txtRobotU";
this.txtRobotU.Size = new System.Drawing.Size(15, 17);
this.txtRobotU.TabIndex = 24;
this.txtRobotU.Text = "0";
//
// txtRobotY
//
this.txtRobotY.AutoSize = true;
this.txtRobotY.Location = new System.Drawing.Point(170, 40);
this.txtRobotY.Name = "txtRobotY";
this.txtRobotY.Size = new System.Drawing.Size(15, 17);
this.txtRobotY.TabIndex = 22;
this.txtRobotY.Text = "0";
//
// txtRobotX
//
this.txtRobotX.AutoSize = true;
this.txtRobotX.Location = new System.Drawing.Point(48, 40);
this.txtRobotX.Name = "txtRobotX";
this.txtRobotX.Size = new System.Drawing.Size(15, 17);
this.txtRobotX.TabIndex = 20;
this.txtRobotX.Text = "0";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(136, 40);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(27, 17);
this.label12.TabIndex = 3;
this.label12.Text = "Y:";
//
// btnSetOrigin // btnSetOrigin
// //
this.btnSetOrigin.FlatAppearance.BorderSize = 0; this.btnSetOrigin.FlatAppearance.BorderSize = 0;
...@@ -292,27 +197,18 @@ ...@@ -292,27 +197,18 @@
this.label14.Text = "条形码"; this.label14.Text = "条形码";
this.label14.Visible = false; this.label14.Visible = false;
// //
// dataGridViewImageColumn1 // urRobotSControl1
// //
this.dataGridViewImageColumn1.HeaderText = "上升"; this.urRobotSControl1.Location = new System.Drawing.Point(7, 28);
this.dataGridViewImageColumn1.Image = ((System.Drawing.Image)(resources.GetObject("dataGridViewImageColumn1.Image"))); this.urRobotSControl1.Name = "urRobotSControl1";
this.dataGridViewImageColumn1.Name = "dataGridViewImageColumn1"; this.urRobotSControl1.Size = new System.Drawing.Size(228, 146);
this.dataGridViewImageColumn1.Visible = false; this.urRobotSControl1.TabIndex = 0;
this.dataGridViewImageColumn1.Width = 50;
//
// dataGridViewImageColumn2
//
this.dataGridViewImageColumn2.HeaderText = "下降";
this.dataGridViewImageColumn2.Image = ((System.Drawing.Image)(resources.GetObject("dataGridViewImageColumn2.Image")));
this.dataGridViewImageColumn2.Name = "dataGridViewImageColumn2";
this.dataGridViewImageColumn2.Visible = false;
this.dataGridViewImageColumn2.Width = 50;
// //
// FrmOrgConfig // FrmOrgConfig
// //
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(529, 317); this.ClientSize = new System.Drawing.Size(529, 318);
this.Controls.Add(this.panel1); this.Controls.Add(this.panel1);
this.Controls.Add(this.btnSStop); this.Controls.Add(this.btnSStop);
this.Controls.Add(this.btnWStop); this.Controls.Add(this.btnWStop);
...@@ -323,7 +219,6 @@ ...@@ -323,7 +219,6 @@
this.Load += new System.EventHandler(this.FrmBoardInfo_Load); this.Load += new System.EventHandler(this.FrmBoardInfo_Load);
this.panel1.ResumeLayout(false); this.panel1.ResumeLayout(false);
this.groupBox2.ResumeLayout(false); this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
...@@ -343,17 +238,8 @@ ...@@ -343,17 +238,8 @@
private System.Windows.Forms.Button btnSetClear2; private System.Windows.Forms.Button btnSetClear2;
private System.Windows.Forms.Button btnSetClear1; private System.Windows.Forms.Button btnSetClear1;
private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.ComboBox cmbHand;
private System.Windows.Forms.Label label23;
private System.Windows.Forms.Label txtRobotZ;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label txtRobotU;
private System.Windows.Forms.Label txtRobotY;
private System.Windows.Forms.Label txtRobotX;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Button btnBack; private System.Windows.Forms.Button btnBack;
private System.Windows.Forms.Button btnMore; private System.Windows.Forms.Button btnMore;
private UserFromControl.URRobotSControl urRobotSControl1;
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -48,16 +48,14 @@ namespace URSoldering.Client ...@@ -48,16 +48,14 @@ namespace URSoldering.Client
LogUtil.error("进入焊接界面,发现WeldRobotBean自动运行中,关闭自动运行"); LogUtil.error("进入焊接界面,发现WeldRobotBean自动运行中,关闭自动运行");
WeldRobotBean.StopRun(); WeldRobotBean.StopRun();
} }
if (EpsonDevice.IsRun) if (URRobotControl.IsRun)
{ {
EpsonDevice.FreeAxis(); URRobotControl.FreeAxis();
URPointValue lastP = URRobotControl.GetLastPosition();
EpsonDevice.GetPosition(AfterGet); urRobotSControl1.ShowPoint(lastP);
} }
else else
{ {
//btnChange.Text = "机器人连接中。。。";
RobotStatus(false);
} }
isAuto = false; isAuto = false;
...@@ -66,60 +64,22 @@ namespace URSoldering.Client ...@@ -66,60 +64,22 @@ namespace URSoldering.Client
timer1.Elapsed += timer_Elapsed; timer1.Elapsed += timer_Elapsed;
timer1.Start(); timer1.Start();
timer2.Start(); timer2.Start();
}
private void AfterMove(string result)
{
}
private void AfterGet(double x, double y, double z, double u, int hand)
{
PointValue point = new PointValue(x, y, u, z, hand);
//PointValue point = EpsonDevice.LastPoint;
this.txtRobotX.Text = point.X.ToString();
this.txtRobotY.Text = point.Y.ToString();
this.txtRobotU.Text = point.U.ToString();
this.txtRobotZ.Text = point.Z.ToString();
string msg = WeldRobotBean.CheckEpsonPoint(point);
if (point.HandDir.Equals(1))
{
cmbHand.SelectedIndex = 0;
}
else
{
cmbHand.SelectedIndex = 1;
} }
if (point.X != 0 && isConnect == false)
{
EpsonDevice.FreeAxis();
isConnect = true;
RobotStatus(true);
}
}
private void RobotStatus(bool isConnect)
{
}
private bool isRun = false; private bool isRun = false;
private void timer_Elapsed(object sender, EventArgs e) private void timer_Elapsed(object sender, EventArgs e)
{ {
if (!EpsonDevice.IsRun && isRun.Equals(false)) if (!URRobotControl.IsRun && isRun.Equals(false))
{ {
Task.Factory.StartNew(delegate () Task.Factory.StartNew(delegate ()
{ {
string result = EpsonDevice.Start(); string result = URRobotControl.Start();
if (result != "") if (result != "")
{ {
LogUtil.info("连接失败:" + result); LogUtil.info("连接失败:" + result);
} }
else else
{ {
EpsonDevice.FreeAxis(); URRobotControl.FreeAxis();
isAuto = false; isAuto = false;
} }
}); });
...@@ -128,14 +88,14 @@ namespace URSoldering.Client ...@@ -128,14 +88,14 @@ namespace URSoldering.Client
} }
else else
{ {
//EpsonControl.FreeAxis(); URPointValue lastP = URRobotControl.GetLastPosition();
EpsonDevice.GetPosition(AfterGet); urRobotSControl1.ShowPoint(lastP);
} }
} }
private void FrmBoardInfo_FormClosing(object sender, FormClosingEventArgs e) private void FrmBoardInfo_FormClosing(object sender, FormClosingEventArgs e)
{ {
EpsonDevice.LockAxis(); URRobotControl.LockAxis();
timer2.Stop(); timer2.Stop();
timer1.Stop(); timer1.Stop();
UsbCameraHDevelop.CloseAllCamera(); UsbCameraHDevelop.CloseAllCamera();
...@@ -143,12 +103,12 @@ namespace URSoldering.Client ...@@ -143,12 +103,12 @@ namespace URSoldering.Client
private void btnRead_Click(object sender, EventArgs e) private void btnRead_Click(object sender, EventArgs e)
{ {
EpsonDevice.GetPosition(AfterGet); URPointValue lastP = URRobotControl.GetLastPosition();
} }
private void timer2_Tick(object sender, EventArgs e) private void timer2_Tick(object sender, EventArgs e)
{ {
if (EpsonDevice.IsRun) if (URRobotControl.IsRun)
{ {
} }
...@@ -164,12 +124,9 @@ namespace URSoldering.Client ...@@ -164,12 +124,9 @@ namespace URSoldering.Client
private void btnSetOrigin_Click(object sender, EventArgs e) private void btnSetOrigin_Click(object sender, EventArgs e)
{ {
saveOriginInfo(); URPointValue point = GetCurrRobotPoint();
} ConfigAppSettings.SaveValue(Setting_Init.BOARD_ORIGIN_X, point.X.ToString());
private void saveOriginInfo() ConfigAppSettings.SaveValue(Setting_Init.BOARD_ORIGIN_Y, point.Y.ToString());
{
ConfigAppSettings.SaveValue(Setting_Init.BOARD_ORIGIN_X, txtRobotX.Text);
ConfigAppSettings.SaveValue(Setting_Init.BOARD_ORIGIN_Y, txtRobotY.Text);
} }
private void btnGoHome_Click(object sender, EventArgs e) private void btnGoHome_Click(object sender, EventArgs e)
...@@ -182,97 +139,59 @@ namespace URSoldering.Client ...@@ -182,97 +139,59 @@ namespace URSoldering.Client
RobotBean.KNDIOMove(IO_Type.SendWire_Down, IO_VALUE.LOW); RobotBean.KNDIOMove(IO_Type.SendWire_Down, IO_VALUE.LOW);
RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.HIGH); RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.HIGH);
double x = WeldRobotBean.EpsonOrgX; URPointValue point = WeldRobotBean.HomePoint;
double y = WeldRobotBean.EpsonOrgY; URRobotControl.MoveTo(point);
double z = WeldRobotBean.EpsonOrgZ;
double u = WeldRobotBean.EpsonOrgU;
int hand = WeldRobotBean.EpsonOrgHandDir;
if (x != 0 && y != 0 && z != 0 && u != 0)
{
EpsonDevice.MoveTo(x, y, z, u, false, hand,AfterMove);
}
else
{
MessageBox.Show("原点坐标无效!");
}
} }
private void btnSaveHome_Click(object sender, EventArgs e) private void btnSaveHome_Click(object sender, EventArgs e)
{ {
double orgx = FormUtil.getDoubleValue(txtRobotX); URPointValue point = GetCurrRobotPoint();
double orgy = FormUtil.getDoubleValue(txtRobotY);
double orgu = FormUtil.getDoubleValue(txtRobotU);
double orgz = FormUtil.getDoubleValue(txtRobotZ);
//判断原点的Z轴
if (orgz > EpsonDevice.Robot_LIM_Z)
{
MessageBox.Show("保存失败,原点Z坐标(" + orgz + ")不能高于最高Z点(" + EpsonDevice.Robot_LIM_Z + ")");
return;
}
int hand =GetHand(); DialogResult result = ShowConfire(point, "原点");
DialogResult result = MessageBox.Show("是否将当前位置X:" + orgx + ",Y:" + orgy + ",U:" + orgu + ",Z:" + orgz + "," + cmbHand.Text + "保存为原点?", "提示", MessageBoxButtons.YesNo);
if (result.Equals(DialogResult.Yes)) if (result.Equals(DialogResult.Yes))
{ {
WeldRobotBean.UpdateOrgPoint(orgx, orgy, orgu, orgz, hand); WeldRobotBean.UpdateOrgPoint(point);
MessageBox.Show("保存原点成功!"); MessageBox.Show("保存原点成功!");
} }
} }
private int GetHand() private URPointValue GetCurrRobotPoint()
{
if (cmbHand.SelectedIndex >= 0)
{ {
return cmbHand.SelectedIndex + 1; return urRobotSControl1.GetPoint();
} }
else
{
return 0;
}
}
private void btnSetClear1_Click(object sender, EventArgs e) private void btnSetClear1_Click(object sender, EventArgs e)
{ {
double clearx = FormUtil.getDoubleValue(txtRobotX); URPointValue point = GetCurrRobotPoint();
double cleary = FormUtil.getDoubleValue(txtRobotY); DialogResult result = ShowConfire(point, "清洗点1");
double clearu = FormUtil.getDoubleValue(txtRobotU);
double clearz = FormUtil.getDoubleValue(txtRobotZ);
//判断原点的Z轴
if (clearz > EpsonDevice.Robot_LIM_Z)
{
MessageBox.Show("保存失败,清洗点1的Z坐标(" + clearz + ")不能高于最高Z点(" + EpsonDevice.Robot_LIM_Z + ")");
return;
}
int hand = GetHand();
DialogResult result = MessageBox.Show("是否将当前位置X:" + clearx + ",Y:" + cleary + ",U:" + clearu + ",Z:" + clearz + "," + cmbHand.Text + "保存为清洗点1?", "提示", MessageBoxButtons.YesNo);
if (result.Equals(DialogResult.Yes)) if (result.Equals(DialogResult.Yes))
{ {
WeldRobotBean.UpdateClear1Point(clearx, cleary, clearu, clearz, hand); WeldRobotBean.UpdateClear1Point(point);
MessageBox.Show("保存清洗点1成功!"); MessageBox.Show("保存清洗点1成功!");
} }
} }
private void btnSetClear2_Click(object sender, EventArgs e) private DialogResult ShowConfire(URPointValue point, string strMsg)
{ {
double clearx = FormUtil.getDoubleValue(txtRobotX);
double cleary = FormUtil.getDoubleValue(txtRobotY);
double clearu = FormUtil.getDoubleValue(txtRobotU);
double clearz = FormUtil.getDoubleValue(txtRobotZ);
//判断原点的Z轴 //判断原点的Z轴
if (clearz > EpsonDevice.Robot_LIM_Z) if (point.Z > URRobotControl.Robot_LIM_Z)
{ {
MessageBox.Show("保存失败,清洗点2的Z坐标(" + clearz + ")不能高于最高Z点(" + EpsonDevice.Robot_LIM_Z + ")"); MessageBox.Show("保存失败,"+ strMsg + "的Z坐标(" + point.Z + ")不能高于最高Z点(" + URRobotControl.Robot_LIM_Z + ")");
return; return DialogResult.Cancel;
}
DialogResult result = MessageBox.Show("是否将当前位置:" + point.ToShowStr() + "保存为" + strMsg + "?", "提示", MessageBoxButtons.YesNo);
return result;
} }
int hand = GetHand(); private void btnSetClear2_Click(object sender, EventArgs e)
DialogResult result = MessageBox.Show("是否将当前位置X:" + clearx + ",Y:" + cleary + ",U:" + clearu + ",Z:" + clearz + "," + cmbHand.Text + "保存为清洗点2?", "提示", MessageBoxButtons.YesNo); {
URPointValue point = GetCurrRobotPoint();
DialogResult result = ShowConfire(point, "清洗点2");
if (result.Equals(DialogResult.Yes)) if (result.Equals(DialogResult.Yes))
{ {
WeldRobotBean.UpdateClear2Point(clearx, cleary, clearu, clearz, hand); WeldRobotBean.UpdateClear2Point(point);
MessageBox.Show("保存清洗点2成功!"); MessageBox.Show("保存清洗点2成功!");
} }
} }
......
...@@ -29,27 +29,9 @@ ...@@ -29,27 +29,9 @@
private void InitializeComponent() private void InitializeComponent()
{ {
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
this.cmbClearHand2 = new System.Windows.Forms.ComboBox(); this.clear2Control = new UserFromControl.URRobotMControl();
this.label12 = new System.Windows.Forms.Label();
this.txtClearZ2 = new System.Windows.Forms.TextBox();
this.txtClearU2 = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.txtClearY2 = new System.Windows.Forms.TextBox();
this.txtClearX2 = new System.Windows.Forms.TextBox();
this.label15 = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.cmbClearHand1 = new System.Windows.Forms.ComboBox(); this.clear1Control = new UserFromControl.URRobotMControl();
this.label1 = new System.Windows.Forms.Label();
this.txtClearZ1 = new System.Windows.Forms.TextBox();
this.txtClearU1 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.txtClearY1 = new System.Windows.Forms.TextBox();
this.txtClearX1 = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.groupBox4 = new System.Windows.Forms.GroupBox(); this.groupBox4 = new System.Windows.Forms.GroupBox();
this.label17 = new System.Windows.Forms.Label(); this.label17 = new System.Windows.Forms.Label();
this.label18 = new System.Windows.Forms.Label(); this.label18 = new System.Windows.Forms.Label();
...@@ -58,16 +40,7 @@ ...@@ -58,16 +40,7 @@
this.lblWirdFeedingTime = new System.Windows.Forms.Label(); this.lblWirdFeedingTime = new System.Windows.Forms.Label();
this.txtsendWireTime = new System.Windows.Forms.TextBox(); this.txtsendWireTime = new System.Windows.Forms.TextBox();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.cmbOrgHand = new System.Windows.Forms.ComboBox(); this.homeControl = new UserFromControl.URRobotMControl();
this.label7 = new System.Windows.Forms.Label();
this.txtOrgZ = new System.Windows.Forms.TextBox();
this.txtOrgU = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.txtOrgY = new System.Windows.Forms.TextBox();
this.txtOrgX = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.btnClose = new System.Windows.Forms.Button(); this.btnClose = new System.Windows.Forms.Button();
this.btnSaveSetting = new System.Windows.Forms.Button(); this.btnSaveSetting = new System.Windows.Forms.Button();
this.gbEpsonSetting = new System.Windows.Forms.GroupBox(); this.gbEpsonSetting = new System.Windows.Forms.GroupBox();
...@@ -81,22 +54,8 @@ ...@@ -81,22 +54,8 @@
this.lblOriginX = new System.Windows.Forms.Label(); this.lblOriginX = new System.Windows.Forms.Label();
this.lblBoardID = new System.Windows.Forms.Label(); this.lblBoardID = new System.Windows.Forms.Label();
this.groupBox5 = new System.Windows.Forms.GroupBox(); this.groupBox5 = new System.Windows.Forms.GroupBox();
this.label19 = new System.Windows.Forms.Label(); this.maxControl = new UserFromControl.URRobotMControl();
this.label20 = new System.Windows.Forms.Label(); this.minControl = new UserFromControl.URRobotMControl();
this.label21 = new System.Windows.Forms.Label();
this.label22 = new System.Windows.Forms.Label();
this.txtZMax = new System.Windows.Forms.TextBox();
this.txtUMax = new System.Windows.Forms.TextBox();
this.txtYMax = new System.Windows.Forms.TextBox();
this.txtXMax = new System.Windows.Forms.TextBox();
this.txtZMin = new System.Windows.Forms.TextBox();
this.txtUMin = new System.Windows.Forms.TextBox();
this.label23 = new System.Windows.Forms.Label();
this.label24 = new System.Windows.Forms.Label();
this.txtYMin = new System.Windows.Forms.TextBox();
this.txtXMin = new System.Windows.Forms.TextBox();
this.label25 = new System.Windows.Forms.Label();
this.label26 = new System.Windows.Forms.Label();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
this.groupBox4.SuspendLayout(); this.groupBox4.SuspendLayout();
...@@ -108,215 +67,41 @@ ...@@ -108,215 +67,41 @@
// //
// groupBox3 // groupBox3
// //
this.groupBox3.Controls.Add(this.cmbClearHand2); this.groupBox3.Controls.Add(this.clear2Control);
this.groupBox3.Controls.Add(this.label12);
this.groupBox3.Controls.Add(this.txtClearZ2);
this.groupBox3.Controls.Add(this.txtClearU2);
this.groupBox3.Controls.Add(this.label13);
this.groupBox3.Controls.Add(this.label14);
this.groupBox3.Controls.Add(this.txtClearY2);
this.groupBox3.Controls.Add(this.txtClearX2);
this.groupBox3.Controls.Add(this.label15);
this.groupBox3.Controls.Add(this.label16);
this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox3.Location = new System.Drawing.Point(340, 226); this.groupBox3.Location = new System.Drawing.Point(715, 5);
this.groupBox3.Name = "groupBox3"; this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(271, 215); this.groupBox3.Size = new System.Drawing.Size(199, 265);
this.groupBox3.TabIndex = 40; this.groupBox3.TabIndex = 40;
this.groupBox3.TabStop = false; this.groupBox3.TabStop = false;
this.groupBox3.Text = "焊接清洗点2配置"; this.groupBox3.Text = "焊接清洗点2配置";
// //
// cmbClearHand2 // clear2Control
// //
this.cmbClearHand2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.clear2Control.Location = new System.Drawing.Point(24, 20);
this.cmbClearHand2.FormattingEnabled = true; this.clear2Control.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.cmbClearHand2.Items.AddRange(new object[] { this.clear2Control.Name = "clear2Control";
"自动", this.clear2Control.Size = new System.Drawing.Size(168, 236);
"右臂", this.clear2Control.TabIndex = 2;
"左臂"});
this.cmbClearHand2.Location = new System.Drawing.Point(112, 169);
this.cmbClearHand2.Name = "cmbClearHand2";
this.cmbClearHand2.Size = new System.Drawing.Size(118, 25);
this.cmbClearHand2.TabIndex = 39;
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(30, 171);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(68, 17);
this.label12.TabIndex = 17;
this.label12.Text = "手臂方向:";
//
// txtClearZ2
//
this.txtClearZ2.Location = new System.Drawing.Point(112, 133);
this.txtClearZ2.Name = "txtClearZ2";
this.txtClearZ2.Size = new System.Drawing.Size(118, 23);
this.txtClearZ2.TabIndex = 16;
//
// txtClearU2
//
this.txtClearU2.Location = new System.Drawing.Point(112, 97);
this.txtClearU2.Name = "txtClearU2";
this.txtClearU2.Size = new System.Drawing.Size(118, 23);
this.txtClearU2.TabIndex = 15;
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(30, 101);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(53, 17);
this.label13.TabIndex = 14;
this.label13.Text = "U坐标:";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(30, 136);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(51, 17);
this.label14.TabIndex = 13;
this.label14.Text = "Z坐标:";
//
// txtClearY2
//
this.txtClearY2.Location = new System.Drawing.Point(112, 61);
this.txtClearY2.Name = "txtClearY2";
this.txtClearY2.Size = new System.Drawing.Size(118, 23);
this.txtClearY2.TabIndex = 12;
//
// txtClearX2
//
this.txtClearX2.Location = new System.Drawing.Point(112, 25);
this.txtClearX2.Name = "txtClearX2";
this.txtClearX2.Size = new System.Drawing.Size(118, 23);
this.txtClearX2.TabIndex = 11;
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(30, 66);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(51, 17);
this.label15.TabIndex = 10;
this.label15.Text = "Y坐标:";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(31, 31);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(52, 17);
this.label16.TabIndex = 9;
this.label16.Text = "X坐标:";
// //
// groupBox2 // groupBox2
// //
this.groupBox2.Controls.Add(this.cmbClearHand1); this.groupBox2.Controls.Add(this.clear1Control);
this.groupBox2.Controls.Add(this.label1);
this.groupBox2.Controls.Add(this.txtClearZ1);
this.groupBox2.Controls.Add(this.txtClearU1);
this.groupBox2.Controls.Add(this.label2);
this.groupBox2.Controls.Add(this.label9);
this.groupBox2.Controls.Add(this.txtClearY1);
this.groupBox2.Controls.Add(this.txtClearX1);
this.groupBox2.Controls.Add(this.label10);
this.groupBox2.Controls.Add(this.label11);
this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox2.Location = new System.Drawing.Point(340, 9); this.groupBox2.Location = new System.Drawing.Point(510, 5);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(271, 215); this.groupBox2.Size = new System.Drawing.Size(199, 265);
this.groupBox2.TabIndex = 12; this.groupBox2.TabIndex = 12;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "焊接清洗点1配置"; this.groupBox2.Text = "焊接清洗点1配置";
// //
// cmbClearHand1 // clear1Control
//
this.cmbClearHand1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbClearHand1.FormattingEnabled = true;
this.cmbClearHand1.Items.AddRange(new object[] {
"自动",
"右臂",
"左臂"});
this.cmbClearHand1.Location = new System.Drawing.Point(112, 172);
this.cmbClearHand1.Name = "cmbClearHand1";
this.cmbClearHand1.Size = new System.Drawing.Size(118, 25);
this.cmbClearHand1.TabIndex = 39;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(30, 174);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(68, 17);
this.label1.TabIndex = 17;
this.label1.Text = "手臂方向:";
//
// txtClearZ1
//
this.txtClearZ1.Location = new System.Drawing.Point(112, 136);
this.txtClearZ1.Name = "txtClearZ1";
this.txtClearZ1.Size = new System.Drawing.Size(118, 23);
this.txtClearZ1.TabIndex = 16;
//
// txtClearU1
//
this.txtClearU1.Location = new System.Drawing.Point(112, 100);
this.txtClearU1.Name = "txtClearU1";
this.txtClearU1.Size = new System.Drawing.Size(118, 23);
this.txtClearU1.TabIndex = 15;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(30, 104);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(53, 17);
this.label2.TabIndex = 14;
this.label2.Text = "U坐标:";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(30, 139);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(51, 17);
this.label9.TabIndex = 13;
this.label9.Text = "Z坐标:";
// //
// txtClearY1 this.clear1Control.Location = new System.Drawing.Point(7, 23);
// this.clear1Control.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.txtClearY1.Location = new System.Drawing.Point(112, 64); this.clear1Control.Name = "clear1Control";
this.txtClearY1.Name = "txtClearY1"; this.clear1Control.Size = new System.Drawing.Size(168, 236);
this.txtClearY1.Size = new System.Drawing.Size(118, 23); this.clear1Control.TabIndex = 0;
this.txtClearY1.TabIndex = 12;
//
// txtClearX1
//
this.txtClearX1.Location = new System.Drawing.Point(112, 28);
this.txtClearX1.Name = "txtClearX1";
this.txtClearX1.Size = new System.Drawing.Size(118, 23);
this.txtClearX1.TabIndex = 11;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(30, 69);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(51, 17);
this.label10.TabIndex = 10;
this.label10.Text = "Y坐标:";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(31, 34);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(52, 17);
this.label11.TabIndex = 9;
this.label11.Text = "X坐标:";
// //
// groupBox4 // groupBox4
// //
...@@ -329,7 +114,7 @@ ...@@ -329,7 +114,7 @@
this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox4.Location = new System.Drawing.Point(22, 178); this.groupBox4.Location = new System.Drawing.Point(22, 178);
this.groupBox4.Name = "groupBox4"; this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(306, 118); this.groupBox4.Size = new System.Drawing.Size(276, 118);
this.groupBox4.TabIndex = 11; this.groupBox4.TabIndex = 11;
this.groupBox4.TabStop = false; this.groupBox4.TabStop = false;
this.groupBox4.Text = "卡丝时反转配置"; this.groupBox4.Text = "卡丝时反转配置";
...@@ -388,114 +173,27 @@ ...@@ -388,114 +173,27 @@
// //
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.cmbOrgHand); this.groupBox1.Controls.Add(this.homeControl);
this.groupBox1.Controls.Add(this.label7);
this.groupBox1.Controls.Add(this.txtOrgZ);
this.groupBox1.Controls.Add(this.txtOrgU);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.txtOrgY);
this.groupBox1.Controls.Add(this.txtOrgX);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(625, 9); this.groupBox1.Location = new System.Drawing.Point(305, 5);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(265, 215); this.groupBox1.Size = new System.Drawing.Size(199, 265);
this.groupBox1.TabIndex = 8; this.groupBox1.TabIndex = 8;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "机器人待机点配置"; this.groupBox1.Text = "机器人待机点配置";
// //
// cmbOrgHand // homeControl
//
this.cmbOrgHand.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbOrgHand.FormattingEnabled = true;
this.cmbOrgHand.Items.AddRange(new object[] {
"自动",
"右臂",
"左臂"});
this.cmbOrgHand.Location = new System.Drawing.Point(121, 172);
this.cmbOrgHand.Name = "cmbOrgHand";
this.cmbOrgHand.Size = new System.Drawing.Size(118, 25);
this.cmbOrgHand.TabIndex = 39;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(39, 174);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(68, 17);
this.label7.TabIndex = 17;
this.label7.Text = "手臂方向:";
//
// txtOrgZ
//
this.txtOrgZ.Location = new System.Drawing.Point(121, 136);
this.txtOrgZ.Name = "txtOrgZ";
this.txtOrgZ.Size = new System.Drawing.Size(118, 23);
this.txtOrgZ.TabIndex = 16;
//
// txtOrgU
//
this.txtOrgU.Location = new System.Drawing.Point(121, 100);
this.txtOrgU.Name = "txtOrgU";
this.txtOrgU.Size = new System.Drawing.Size(118, 23);
this.txtOrgU.TabIndex = 15;
// //
// label5 this.homeControl.Location = new System.Drawing.Point(12, 23);
// this.homeControl.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.label5.AutoSize = true; this.homeControl.Name = "homeControl";
this.label5.Location = new System.Drawing.Point(39, 104); this.homeControl.Size = new System.Drawing.Size(168, 236);
this.label5.Name = "label5"; this.homeControl.TabIndex = 1;
this.label5.Size = new System.Drawing.Size(53, 17);
this.label5.TabIndex = 14;
this.label5.Text = "U坐标:";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(39, 139);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(51, 17);
this.label6.TabIndex = 13;
this.label6.Text = "Z坐标:";
//
// txtOrgY
//
this.txtOrgY.Location = new System.Drawing.Point(121, 64);
this.txtOrgY.Name = "txtOrgY";
this.txtOrgY.Size = new System.Drawing.Size(118, 23);
this.txtOrgY.TabIndex = 12;
//
// txtOrgX
//
this.txtOrgX.Location = new System.Drawing.Point(121, 28);
this.txtOrgX.Name = "txtOrgX";
this.txtOrgX.Size = new System.Drawing.Size(118, 23);
this.txtOrgX.TabIndex = 11;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(39, 69);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(51, 17);
this.label3.TabIndex = 10;
this.label3.Text = "Y坐标:";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(40, 34);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(52, 17);
this.label4.TabIndex = 9;
this.label4.Text = "X坐标:";
// //
// btnClose // btnClose
// //
this.btnClose.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnClose.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClose.Location = new System.Drawing.Point(773, 452); this.btnClose.Location = new System.Drawing.Point(797, 364);
this.btnClose.Name = "btnClose"; this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(117, 35); this.btnClose.Size = new System.Drawing.Size(117, 35);
this.btnClose.TabIndex = 7; this.btnClose.TabIndex = 7;
...@@ -506,7 +204,7 @@ ...@@ -506,7 +204,7 @@
// btnSaveSetting // btnSaveSetting
// //
this.btnSaveSetting.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnSaveSetting.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSaveSetting.Location = new System.Drawing.Point(635, 452); this.btnSaveSetting.Location = new System.Drawing.Point(797, 322);
this.btnSaveSetting.Name = "btnSaveSetting"; this.btnSaveSetting.Name = "btnSaveSetting";
this.btnSaveSetting.Size = new System.Drawing.Size(117, 35); this.btnSaveSetting.Size = new System.Drawing.Size(117, 35);
this.btnSaveSetting.TabIndex = 6; this.btnSaveSetting.TabIndex = 6;
...@@ -521,7 +219,7 @@ ...@@ -521,7 +219,7 @@
this.gbEpsonSetting.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.gbEpsonSetting.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.gbEpsonSetting.Location = new System.Drawing.Point(22, 299); this.gbEpsonSetting.Location = new System.Drawing.Point(22, 299);
this.gbEpsonSetting.Name = "gbEpsonSetting"; this.gbEpsonSetting.Name = "gbEpsonSetting";
this.gbEpsonSetting.Size = new System.Drawing.Size(306, 80); this.gbEpsonSetting.Size = new System.Drawing.Size(276, 80);
this.gbEpsonSetting.TabIndex = 1; this.gbEpsonSetting.TabIndex = 1;
this.gbEpsonSetting.TabStop = false; this.gbEpsonSetting.TabStop = false;
this.gbEpsonSetting.Text = "焊接机器人抬起高度"; this.gbEpsonSetting.Text = "焊接机器人抬起高度";
...@@ -551,9 +249,9 @@ ...@@ -551,9 +249,9 @@
this.gbBoardSetting.Controls.Add(this.lblOriginX); this.gbBoardSetting.Controls.Add(this.lblOriginX);
this.gbBoardSetting.Controls.Add(this.lblBoardID); this.gbBoardSetting.Controls.Add(this.lblBoardID);
this.gbBoardSetting.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.gbBoardSetting.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.gbBoardSetting.Location = new System.Drawing.Point(22, 9); this.gbBoardSetting.Location = new System.Drawing.Point(22, 5);
this.gbBoardSetting.Name = "gbBoardSetting"; this.gbBoardSetting.Name = "gbBoardSetting";
this.gbBoardSetting.Size = new System.Drawing.Size(306, 167); this.gbBoardSetting.Size = new System.Drawing.Size(276, 167);
this.gbBoardSetting.TabIndex = 0; this.gbBoardSetting.TabIndex = 0;
this.gbBoardSetting.TabStop = false; this.gbBoardSetting.TabStop = false;
this.gbBoardSetting.Text = "程序配置"; this.gbBoardSetting.Text = "程序配置";
...@@ -564,7 +262,7 @@ ...@@ -564,7 +262,7 @@
this.cmbBoardList.FormattingEnabled = true; this.cmbBoardList.FormattingEnabled = true;
this.cmbBoardList.Location = new System.Drawing.Point(107, 37); this.cmbBoardList.Location = new System.Drawing.Point(107, 37);
this.cmbBoardList.Name = "cmbBoardList"; this.cmbBoardList.Name = "cmbBoardList";
this.cmbBoardList.Size = new System.Drawing.Size(182, 25); this.cmbBoardList.Size = new System.Drawing.Size(144, 25);
this.cmbBoardList.TabIndex = 10; this.cmbBoardList.TabIndex = 10;
// //
// txtOriginY // txtOriginY
...@@ -610,171 +308,37 @@ ...@@ -610,171 +308,37 @@
// //
// groupBox5 // groupBox5
// //
this.groupBox5.Controls.Add(this.label19); this.groupBox5.Controls.Add(this.maxControl);
this.groupBox5.Controls.Add(this.label20); this.groupBox5.Controls.Add(this.minControl);
this.groupBox5.Controls.Add(this.label21);
this.groupBox5.Controls.Add(this.label22);
this.groupBox5.Controls.Add(this.txtZMax);
this.groupBox5.Controls.Add(this.txtUMax);
this.groupBox5.Controls.Add(this.txtYMax);
this.groupBox5.Controls.Add(this.txtXMax);
this.groupBox5.Controls.Add(this.txtZMin);
this.groupBox5.Controls.Add(this.txtUMin);
this.groupBox5.Controls.Add(this.label23);
this.groupBox5.Controls.Add(this.label24);
this.groupBox5.Controls.Add(this.txtYMin);
this.groupBox5.Controls.Add(this.txtXMin);
this.groupBox5.Controls.Add(this.label25);
this.groupBox5.Controls.Add(this.label26);
this.groupBox5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox5.Location = new System.Drawing.Point(625, 226); this.groupBox5.Location = new System.Drawing.Point(305, 270);
this.groupBox5.Name = "groupBox5"; this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(265, 215); this.groupBox5.Size = new System.Drawing.Size(414, 260);
this.groupBox5.TabIndex = 42; this.groupBox5.TabIndex = 42;
this.groupBox5.TabStop = false; this.groupBox5.TabStop = false;
this.groupBox5.Text = "机械臂活动范围"; this.groupBox5.Text = "机械臂活动范围";
// //
// label19 // maxControl
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(145, 161);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(20, 17);
this.label19.TabIndex = 24;
this.label19.Text = "-";
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(145, 122);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(20, 17);
this.label20.TabIndex = 23;
this.label20.Text = "-";
//
// label21
//
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(145, 80);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(20, 17);
this.label21.TabIndex = 22;
this.label21.Text = "-";
//
// label22
// //
this.label22.AutoSize = true; this.maxControl.Location = new System.Drawing.Point(212, 25);
this.label22.Location = new System.Drawing.Point(145, 38); this.maxControl.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.label22.Name = "label22"; this.maxControl.Name = "maxControl";
this.label22.Size = new System.Drawing.Size(20, 17); this.maxControl.Size = new System.Drawing.Size(168, 226);
this.label22.TabIndex = 21; this.maxControl.TabIndex = 3;
this.label22.Text = "-";
//
// txtZMax
//
this.txtZMax.Location = new System.Drawing.Point(169, 159);
this.txtZMax.MaxLength = 8;
this.txtZMax.Name = "txtZMax";
this.txtZMax.Size = new System.Drawing.Size(66, 23);
this.txtZMax.TabIndex = 20;
//
// txtUMax
//
this.txtUMax.Location = new System.Drawing.Point(169, 118);
this.txtUMax.MaxLength = 8;
this.txtUMax.Name = "txtUMax";
this.txtUMax.Size = new System.Drawing.Size(66, 23);
this.txtUMax.TabIndex = 19;
//
// txtYMax
//
this.txtYMax.Location = new System.Drawing.Point(169, 77);
this.txtYMax.MaxLength = 8;
this.txtYMax.Name = "txtYMax";
this.txtYMax.Size = new System.Drawing.Size(66, 23);
this.txtYMax.TabIndex = 18;
//
// txtXMax
//
this.txtXMax.Location = new System.Drawing.Point(169, 36);
this.txtXMax.MaxLength = 8;
this.txtXMax.Name = "txtXMax";
this.txtXMax.Size = new System.Drawing.Size(66, 23);
this.txtXMax.TabIndex = 17;
//
// txtZMin
//
this.txtZMin.Location = new System.Drawing.Point(76, 159);
this.txtZMin.MaxLength = 8;
this.txtZMin.Name = "txtZMin";
this.txtZMin.Size = new System.Drawing.Size(66, 23);
this.txtZMin.TabIndex = 16;
//
// txtUMin
//
this.txtUMin.Location = new System.Drawing.Point(76, 118);
this.txtUMin.MaxLength = 8;
this.txtUMin.Name = "txtUMin";
this.txtUMin.Size = new System.Drawing.Size(66, 23);
this.txtUMin.TabIndex = 15;
//
// label23
//
this.label23.AutoSize = true;
this.label23.Location = new System.Drawing.Point(24, 122);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(41, 17);
this.label23.TabIndex = 14;
this.label23.Text = "U轴:";
//
// label24
//
this.label24.AutoSize = true;
this.label24.Location = new System.Drawing.Point(24, 162);
this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(39, 17);
this.label24.TabIndex = 13;
this.label24.Text = "Z轴:";
//
// txtYMin
//
this.txtYMin.Location = new System.Drawing.Point(76, 77);
this.txtYMin.MaxLength = 8;
this.txtYMin.Name = "txtYMin";
this.txtYMin.Size = new System.Drawing.Size(66, 23);
this.txtYMin.TabIndex = 12;
//
// txtXMin
//
this.txtXMin.Location = new System.Drawing.Point(76, 36);
this.txtXMin.MaxLength = 8;
this.txtXMin.Name = "txtXMin";
this.txtXMin.Size = new System.Drawing.Size(66, 23);
this.txtXMin.TabIndex = 11;
// //
// label25 // minControl
//
this.label25.AutoSize = true;
this.label25.Location = new System.Drawing.Point(24, 82);
this.label25.Name = "label25";
this.label25.Size = new System.Drawing.Size(39, 17);
this.label25.TabIndex = 10;
this.label25.Text = "Y轴:";
// //
// label26 this.minControl.Location = new System.Drawing.Point(12, 25);
// this.minControl.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.label26.AutoSize = true; this.minControl.Name = "minControl";
this.label26.Location = new System.Drawing.Point(25, 42); this.minControl.Size = new System.Drawing.Size(168, 226);
this.label26.Name = "label26"; this.minControl.TabIndex = 2;
this.label26.Size = new System.Drawing.Size(40, 17);
this.label26.TabIndex = 9;
this.label26.Text = "X轴:";
// //
// FrmSolderingSetting // FrmSolderingSetting
// //
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(914, 503); this.ClientSize = new System.Drawing.Size(996, 545);
this.Controls.Add(this.groupBox5); this.Controls.Add(this.groupBox5);
this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox2);
...@@ -788,19 +352,15 @@ ...@@ -788,19 +352,15 @@
this.Text = "设备配置"; this.Text = "设备配置";
this.Load += new System.EventHandler(this.FrmRobotSetting_Load); this.Load += new System.EventHandler(this.FrmRobotSetting_Load);
this.groupBox3.ResumeLayout(false); this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.groupBox2.ResumeLayout(false); this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox4.ResumeLayout(false); this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout(); this.groupBox4.PerformLayout();
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.gbEpsonSetting.ResumeLayout(false); this.gbEpsonSetting.ResumeLayout(false);
this.gbEpsonSetting.PerformLayout(); this.gbEpsonSetting.PerformLayout();
this.gbBoardSetting.ResumeLayout(false); this.gbBoardSetting.ResumeLayout(false);
this.gbBoardSetting.PerformLayout(); this.gbBoardSetting.PerformLayout();
this.groupBox5.ResumeLayout(false); this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
} }
...@@ -817,17 +377,7 @@ ...@@ -817,17 +377,7 @@
private System.Windows.Forms.Label lblOriginX; private System.Windows.Forms.Label lblOriginX;
private System.Windows.Forms.Button btnClose; private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox txtOrgY;
private System.Windows.Forms.TextBox txtOrgX;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtOrgZ;
private System.Windows.Forms.TextBox txtOrgU;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.ComboBox cmbBoardList; private System.Windows.Forms.ComboBox cmbBoardList;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.ComboBox cmbOrgHand;
private System.Windows.Forms.TextBox txtLimZ; private System.Windows.Forms.TextBox txtLimZ;
private System.Windows.Forms.Label label8; private System.Windows.Forms.Label label8;
private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.GroupBox groupBox4;
...@@ -838,43 +388,12 @@ ...@@ -838,43 +388,12 @@
private System.Windows.Forms.Label lblWirdFeedingTime; private System.Windows.Forms.Label lblWirdFeedingTime;
private System.Windows.Forms.TextBox txtsendWireTime; private System.Windows.Forms.TextBox txtsendWireTime;
private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.ComboBox cmbClearHand1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtClearZ1;
private System.Windows.Forms.TextBox txtClearU1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox txtClearY1;
private System.Windows.Forms.TextBox txtClearX1;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.GroupBox groupBox3; private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.ComboBox cmbClearHand2;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox txtClearZ2;
private System.Windows.Forms.TextBox txtClearU2;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.TextBox txtClearY2;
private System.Windows.Forms.TextBox txtClearX2;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.GroupBox groupBox5; private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.Label label19; private UserFromControl.URRobotMControl clear2Control;
private System.Windows.Forms.Label label20; private UserFromControl.URRobotMControl clear1Control;
private System.Windows.Forms.Label label21; private UserFromControl.URRobotMControl homeControl;
private System.Windows.Forms.Label label22; private UserFromControl.URRobotMControl maxControl;
private System.Windows.Forms.TextBox txtZMax; private UserFromControl.URRobotMControl minControl;
private System.Windows.Forms.TextBox txtUMax;
private System.Windows.Forms.TextBox txtYMax;
private System.Windows.Forms.TextBox txtXMax;
private System.Windows.Forms.TextBox txtZMin;
private System.Windows.Forms.TextBox txtUMin;
private System.Windows.Forms.Label label23;
private System.Windows.Forms.Label label24;
private System.Windows.Forms.TextBox txtYMin;
private System.Windows.Forms.TextBox txtXMin;
private System.Windows.Forms.Label label25;
private System.Windows.Forms.Label label26;
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -42,39 +42,17 @@ namespace URSoldering.Client ...@@ -42,39 +42,17 @@ namespace URSoldering.Client
this.txtOriginX.Text = ConfigAppSettings.GetValue(Setting_Init.BOARD_ORIGIN_X); this.txtOriginX.Text = ConfigAppSettings.GetValue(Setting_Init.BOARD_ORIGIN_X);
this.txtOriginY.Text = ConfigAppSettings.GetValue(Setting_Init.BOARD_ORIGIN_Y); this.txtOriginY.Text = ConfigAppSettings.GetValue(Setting_Init.BOARD_ORIGIN_Y);
int ch = WeldRobotBean.SendWireXiShu; int ch = WeldRobotBean.SendWireXiShu;
//this.txtSpeed.Text = (double)ConfigAppSettings.GetIntValue(Setting_Init.ShuoKe_EndSpeed) / ch + "";
this.cmbOrgHand.SelectedIndex = WeldRobotBean.EpsonOrgHandDir;
txtOrgX.Text = WeldRobotBean.EpsonOrgX.ToString();
txtOrgY.Text = WeldRobotBean.EpsonOrgY.ToString();
txtOrgU.Text = WeldRobotBean.EpsonOrgU.ToString();
txtOrgZ.Text = WeldRobotBean.EpsonOrgZ.ToString();
txtLimZ.Text = ((double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_LIM_Z)).ToString(); txtLimZ.Text = ((double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_LIM_Z)).ToString();
txtsendWireSpeed.Text = ConfigAppSettings.GetValue(Setting_Init.ReverseSendWireSpeed); txtsendWireSpeed.Text = ConfigAppSettings.GetValue(Setting_Init.ReverseSendWireSpeed);
txtsendWireTime.Text = ConfigAppSettings.GetValue(Setting_Init.ReverseSendWireTime); txtsendWireTime.Text = ConfigAppSettings.GetValue(Setting_Init.ReverseSendWireTime);
txtClearU1.Text=WeldRobotBean.EpsonClearU1.ToString(); minControl.ShowPoint(WeldRobotBean.RobotMin);
txtClearX1.Text=WeldRobotBean.EpsonClearX1.ToString(); maxControl.ShowPoint(WeldRobotBean.RobotMax);
txtClearY1.Text = WeldRobotBean.EpsonClearY1.ToString();
txtClearZ1.Text = WeldRobotBean.EpsonClearZ1.ToString();
this.cmbClearHand1.SelectedIndex = WeldRobotBean.EpsonClearHandDir1;
txtClearU2.Text = WeldRobotBean.EpsonClearU2.ToString(); clear2Control.ShowPoint(WeldRobotBean.Clear2Point);
txtClearX2.Text = WeldRobotBean.EpsonClearX2.ToString(); clear1Control.ShowPoint(WeldRobotBean.Clear1Point);
txtClearY2.Text = WeldRobotBean.EpsonClearY2.ToString(); homeControl.ShowPoint(WeldRobotBean.HomePoint);
txtClearZ2.Text = WeldRobotBean.EpsonClearZ2.ToString();
this.cmbClearHand2.SelectedIndex = WeldRobotBean.EpsonClearHandDir2;
txtXMin.Text = WeldRobotBean.EpsonXMin.ToString();
txtYMin.Text = WeldRobotBean.EpsonYMin.ToString();
txtZMin.Text = WeldRobotBean.EpsonZMin.ToString();
txtUMin.Text = WeldRobotBean.EpsonUMin.ToString();
txtXMax.Text = WeldRobotBean.EpsonXMax.ToString();
txtYMax.Text = WeldRobotBean.EpsonYMax.ToString();
txtZMax.Text = WeldRobotBean.EpsonZMax.ToString();
txtUMax.Text = WeldRobotBean.EpsonUMax.ToString();
} }
private void saveValue() private void saveValue()
...@@ -111,94 +89,67 @@ namespace URSoldering.Client ...@@ -111,94 +89,67 @@ namespace URSoldering.Client
} }
int hand = cmbOrgHand.SelectedIndex; URPointValue homeP = homeControl.GetPoint();
double orgx=FormUtil.getDoubleValue(txtOrgX) ;
double orgy = FormUtil.getDoubleValue(txtOrgY);
double orgu = FormUtil.getDoubleValue(txtOrgU);
double orgz = FormUtil.getDoubleValue(txtOrgZ);
//判断原点的Z轴 //判断原点的Z轴
if (orgz > limz) if (homeP.Z > limz)
{ {
MessageBox.Show("待机点Z坐标不能高于最高Z点!"); MessageBox.Show("待机点Z坐标不能高于最高Z点!");
txtOrgZ.Focus(); homeControl.Focus();
txtOrgZ.SelectAll();
return; return;
} }
int clearHand1 = this.cmbClearHand1.SelectedIndex; URPointValue clear1P = clear1Control.GetPoint();
double clearx1 = FormUtil.getDoubleValue(txtClearX1);
double cleary1 = FormUtil.getDoubleValue(txtClearY1);
double clearu1 = FormUtil.getDoubleValue(txtClearU1);
double clearz1 = FormUtil.getDoubleValue(txtClearZ1);
//判断原点的Z轴 //判断原点的Z轴
if (clearz1 > limz) if (clear1P.Z > limz)
{ {
MessageBox.Show("清洗点1的Z坐标不能高于最高Z点!"); MessageBox.Show("清洗点1的Z坐标不能高于最高Z点!");
txtClearZ1.Focus(); clear1Control.Focus();
txtClearZ1.SelectAll();
return; return;
} }
URPointValue clear2P = clear2Control.GetPoint();
int clearHand2 = this.cmbClearHand2.SelectedIndex;
double clearx2 = FormUtil.getDoubleValue(txtClearX2);
double cleary2 = FormUtil.getDoubleValue(txtClearY2);
double clearu2 = FormUtil.getDoubleValue(txtClearU2);
double clearz2 = FormUtil.getDoubleValue(txtClearZ2);
//判断原点的Z轴 //判断原点的Z轴
if (clearz2 > limz) if (clear2P.Z > limz)
{ {
MessageBox.Show("清洗点2的Z坐标不能高于最高Z点!"); MessageBox.Show("清洗点2的Z坐标不能高于最高Z点!");
txtClearZ2.Focus(); clear2Control.Focus();
txtClearZ2.SelectAll();
return; return;
} }
double XMin = FormUtil.getDoubleValue(txtXMin); URPointValue minP = minControl.GetPoint();
double YMin = FormUtil.getDoubleValue(txtYMin); URPointValue maxP = maxControl.GetPoint();
double ZMin = FormUtil.getDoubleValue(txtZMin);
double UMin = FormUtil.getDoubleValue(txtUMin); //if (XMin > XMax)
//{
double XMax = FormUtil.getDoubleValue(txtXMax); // MessageBox.Show("请正确输入机械臂X轴范围!");
double YMax = FormUtil.getDoubleValue(txtYMax); // txtXMin.Focus();
double ZMax = FormUtil.getDoubleValue(txtZMax); // txtXMin.SelectAll();
double UMax = FormUtil.getDoubleValue(txtUMax); // return;
//}
if (XMin > XMax) //if (YMin > YMax)
{ //{
MessageBox.Show("请正确输入机械臂X轴范围!"); // MessageBox.Show("请正确输入机械臂Y轴范围!");
txtXMin.Focus(); // txtYMin.Focus();
txtXMin.SelectAll(); // txtYMin.SelectAll();
return; // return;
} //}
if (YMin > YMax) //if (ZMin > ZMax)
{ //{
MessageBox.Show("请正确输入机械臂Y轴范围!"); // MessageBox.Show("请正确输入机械臂Z轴范围!");
txtYMin.Focus(); // txtZMin.Focus();
txtYMin.SelectAll(); // txtZMin.SelectAll();
return; // return;
} //}
if (ZMin > ZMax) //if (UMin > UMax)
{ //{
MessageBox.Show("请正确输入机械臂Z轴范围!"); // MessageBox.Show("请正确输入机械臂U轴范围!");
txtZMin.Focus(); // txtUMin.Focus();
txtZMin.SelectAll(); // txtUMin.SelectAll();
return; // return;
} //}
if (UMin > UMax)
{ WeldRobotBean.UpdateOrgPoint(homeP);
MessageBox.Show("请正确输入机械臂U轴范围!"); WeldRobotBean.UpdateClear1Point(clear1P);
txtUMin.Focus(); WeldRobotBean.UpdateClear2Point(clear2P);
txtUMin.SelectAll();
return;
}
WeldRobotBean.UpdateOrgPoint(orgx, orgy, orgu, orgz, hand);
WeldRobotBean.UpdateClear1Point(clearx1, cleary1, clearu1, clearz1, clearHand1);
WeldRobotBean.UpdateClear2Point(clearx2, cleary2, clearu2, clearz2, clearHand2);
ConfigAppSettings.SaveValue(Setting_Init.Soldering_LIM_Z, limz.ToString()); ConfigAppSettings.SaveValue(Setting_Init.Soldering_LIM_Z, limz.ToString());
EpsonDevice.Robot_LIM_Z = limz; EpsonDevice.Robot_LIM_Z = limz;
...@@ -208,24 +159,10 @@ namespace URSoldering.Client ...@@ -208,24 +159,10 @@ namespace URSoldering.Client
ConfigAppSettings.SaveValue(Setting_Init.ReverseSendWireSpeed, sendWireSpeed); ConfigAppSettings.SaveValue(Setting_Init.ReverseSendWireSpeed, sendWireSpeed);
ConfigAppSettings.SaveValue(Setting_Init.ReverseSendWireTime, sendWireTime); ConfigAppSettings.SaveValue(Setting_Init.ReverseSendWireTime, sendWireTime);
WeldRobotBean.EpsonXMin = XMin; WeldRobotBean.RobotMin = minP;
WeldRobotBean.EpsonXMax = XMax; WeldRobotBean.RobotMax = maxP;
WeldRobotBean.EpsonYMin = YMin; ConfigAppSettings.SaveValue(Setting_Init.Soldering_RobotMin, minP.ToJosonStr());
WeldRobotBean.EpsonYMax = YMax; ConfigAppSettings.SaveValue(Setting_Init.Soldering_RobotMax, maxP.ToJosonStr());
WeldRobotBean.EpsonUMin = UMin;
WeldRobotBean.EpsonUMax = UMax;
WeldRobotBean.EpsonZMin = ZMin;
WeldRobotBean.EpsonZMax = ZMax;
ConfigAppSettings.SaveValue(Setting_Init.Soldering_X_Min, XMin.ToString());
ConfigAppSettings.SaveValue(Setting_Init.Soldering_Y_Min, YMin.ToString());
ConfigAppSettings.SaveValue(Setting_Init.Soldering_Z_Min, ZMin.ToString());
ConfigAppSettings.SaveValue(Setting_Init.Soldering_U_Min, UMin.ToString());
ConfigAppSettings.SaveValue(Setting_Init.Soldering_X_Max, XMax.ToString());
ConfigAppSettings.SaveValue(Setting_Init.Soldering_Y_Max, YMax.ToString());
ConfigAppSettings.SaveValue(Setting_Init.Soldering_Z_Max, ZMax.ToString());
ConfigAppSettings.SaveValue(Setting_Init.Soldering_U_Max, UMax.ToString());
MessageBox.Show("保存成功,需要重启之后才能生效!"); MessageBox.Show("保存成功,需要重启之后才能生效!");
this.Close(); this.Close();
......
...@@ -40,17 +40,8 @@ ...@@ -40,17 +40,8 @@
this.txtName = new System.Windows.Forms.TextBox(); this.txtName = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.urRobot = new UserFromControl.URRobotMControl();
this.btnUpdate = new System.Windows.Forms.Button(); this.btnUpdate = new System.Windows.Forms.Button();
this.cmbHand = new System.Windows.Forms.ComboBox();
this.label14 = new System.Windows.Forms.Label();
this.label18 = new System.Windows.Forms.Label();
this.label19 = new System.Windows.Forms.Label();
this.txtRobotY = new System.Windows.Forms.TextBox();
this.txtRobotZ = new System.Windows.Forms.TextBox();
this.label20 = new System.Windows.Forms.Label();
this.label21 = new System.Windows.Forms.Label();
this.txtRobotX = new System.Windows.Forms.TextBox();
this.txtRobotU = new System.Windows.Forms.TextBox();
this.btnSave = new System.Windows.Forms.Button(); this.btnSave = new System.Windows.Forms.Button();
this.gbIron = new System.Windows.Forms.GroupBox(); this.gbIron = new System.Windows.Forms.GroupBox();
this.label11 = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label();
...@@ -127,7 +118,7 @@ ...@@ -127,7 +118,7 @@
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, 32); this.groupBox1.Location = new System.Drawing.Point(21, 19);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(475, 119); this.groupBox1.Size = new System.Drawing.Size(475, 119);
this.groupBox1.TabIndex = 59; this.groupBox1.TabIndex = 59;
...@@ -186,14 +177,11 @@ ...@@ -186,14 +177,11 @@
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, 55); this.cmbPointType.Location = new System.Drawing.Point(92, 55);
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
// //
...@@ -223,27 +211,25 @@ ...@@ -223,27 +211,25 @@
// //
// groupBox2 // groupBox2
// //
this.groupBox2.Controls.Add(this.urRobot);
this.groupBox2.Controls.Add(this.btnUpdate); this.groupBox2.Controls.Add(this.btnUpdate);
this.groupBox2.Controls.Add(this.cmbHand); this.groupBox2.Location = new System.Drawing.Point(502, 135);
this.groupBox2.Controls.Add(this.label14);
this.groupBox2.Controls.Add(this.label18);
this.groupBox2.Controls.Add(this.label19);
this.groupBox2.Controls.Add(this.txtRobotY);
this.groupBox2.Controls.Add(this.txtRobotZ);
this.groupBox2.Controls.Add(this.label20);
this.groupBox2.Controls.Add(this.label21);
this.groupBox2.Controls.Add(this.txtRobotX);
this.groupBox2.Controls.Add(this.txtRobotU);
this.groupBox2.Location = new System.Drawing.Point(512, 157);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(180, 310); this.groupBox2.Size = new System.Drawing.Size(202, 310);
this.groupBox2.TabIndex = 60; this.groupBox2.TabIndex = 60;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "坐标"; this.groupBox2.Text = "坐标";
// //
// urRobot
//
this.urRobot.Location = new System.Drawing.Point(18, 30);
this.urRobot.Name = "urRobot";
this.urRobot.Size = new System.Drawing.Size(156, 212);
this.urRobot.TabIndex = 70;
//
// btnUpdate // btnUpdate
// //
this.btnUpdate.Location = new System.Drawing.Point(35, 240); this.btnUpdate.Location = new System.Drawing.Point(54, 264);
this.btnUpdate.Name = "btnUpdate"; this.btnUpdate.Name = "btnUpdate";
this.btnUpdate.Size = new System.Drawing.Size(120, 35); this.btnUpdate.Size = new System.Drawing.Size(120, 35);
this.btnUpdate.TabIndex = 69; this.btnUpdate.TabIndex = 69;
...@@ -251,99 +237,9 @@ ...@@ -251,99 +237,9 @@
this.btnUpdate.UseVisualStyleBackColor = true; this.btnUpdate.UseVisualStyleBackColor = true;
this.btnUpdate.Click += new System.EventHandler(this.btnUpdate_Click); this.btnUpdate.Click += new System.EventHandler(this.btnUpdate_Click);
// //
// cmbHand
//
this.cmbHand.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbHand.FormattingEnabled = true;
this.cmbHand.Items.AddRange(new object[] {
"自动",
"右臂",
"左臂"});
this.cmbHand.Location = new System.Drawing.Point(66, 188);
this.cmbHand.Name = "cmbHand";
this.cmbHand.Size = new System.Drawing.Size(89, 25);
this.cmbHand.TabIndex = 68;
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(13, 192);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(44, 17);
this.label14.TabIndex = 67;
this.label14.Text = "方向:";
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(29, 44);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(28, 17);
this.label18.TabIndex = 63;
this.label18.Text = "X:";
//
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(30, 118);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(27, 17);
this.label19.TabIndex = 59;
this.label19.Text = "Z:";
//
// txtRobotY
//
this.txtRobotY.Location = new System.Drawing.Point(66, 77);
this.txtRobotY.MaxLength = 20;
this.txtRobotY.Name = "txtRobotY";
this.txtRobotY.Size = new System.Drawing.Size(89, 23);
this.txtRobotY.TabIndex = 66;
//
// txtRobotZ
//
this.txtRobotZ.Location = new System.Drawing.Point(66, 114);
this.txtRobotZ.MaxLength = 20;
this.txtRobotZ.Name = "txtRobotZ";
this.txtRobotZ.Size = new System.Drawing.Size(89, 23);
this.txtRobotZ.TabIndex = 60;
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(30, 81);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(27, 17);
this.label20.TabIndex = 65;
this.label20.Text = "Y:";
//
// label21
//
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(13, 155);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(44, 17);
this.label21.TabIndex = 61;
this.label21.Text = "角度:";
//
// txtRobotX
//
this.txtRobotX.Location = new System.Drawing.Point(66, 40);
this.txtRobotX.MaxLength = 20;
this.txtRobotX.Name = "txtRobotX";
this.txtRobotX.Size = new System.Drawing.Size(89, 23);
this.txtRobotX.TabIndex = 64;
//
// txtRobotU
//
this.txtRobotU.Location = new System.Drawing.Point(66, 151);
this.txtRobotU.MaxLength = 20;
this.txtRobotU.Name = "txtRobotU";
this.txtRobotU.Size = new System.Drawing.Size(89, 23);
this.txtRobotU.TabIndex = 62;
//
// btnSave // btnSave
// //
this.btnSave.Location = new System.Drawing.Point(540, 44); this.btnSave.Location = new System.Drawing.Point(540, 31);
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;
...@@ -377,7 +273,7 @@ ...@@ -377,7 +273,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, 157); this.gbIron.Location = new System.Drawing.Point(21, 139);
this.gbIron.Name = "gbIron"; this.gbIron.Name = "gbIron";
this.gbIron.Size = new System.Drawing.Size(475, 188); this.gbIron.Size = new System.Drawing.Size(475, 188);
this.gbIron.TabIndex = 55; this.gbIron.TabIndex = 55;
...@@ -602,7 +498,7 @@ ...@@ -602,7 +498,7 @@
// //
// btnCancel // btnCancel
// //
this.btnCancel.Location = new System.Drawing.Point(540, 87); this.btnCancel.Location = new System.Drawing.Point(540, 74);
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;
...@@ -624,7 +520,7 @@ ...@@ -624,7 +520,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, 351); this.gbWireFeeding.Location = new System.Drawing.Point(21, 329);
this.gbWireFeeding.Name = "gbWireFeeding"; this.gbWireFeeding.Name = "gbWireFeeding";
this.gbWireFeeding.Size = new System.Drawing.Size(475, 116); this.gbWireFeeding.Size = new System.Drawing.Size(475, 116);
this.gbWireFeeding.TabIndex = 56; this.gbWireFeeding.TabIndex = 56;
...@@ -753,7 +649,6 @@ ...@@ -753,7 +649,6 @@
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout(); this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false); this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.gbIron.ResumeLayout(false); this.gbIron.ResumeLayout(false);
this.gbIron.PerformLayout(); this.gbIron.PerformLayout();
this.gbWireFeeding.ResumeLayout(false); this.gbWireFeeding.ResumeLayout(false);
...@@ -811,21 +706,12 @@ ...@@ -811,21 +706,12 @@
private System.Windows.Forms.Label label13; private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label12;
private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.TextBox txtRobotY;
private System.Windows.Forms.TextBox txtRobotZ;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.TextBox txtRobotX;
private System.Windows.Forms.TextBox txtRobotU;
private System.Windows.Forms.ComboBox cmbHand;
private System.Windows.Forms.Button btnUpdate; private System.Windows.Forms.Button btnUpdate;
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 label17;
private System.Windows.Forms.GroupBox groupPoint; private System.Windows.Forms.GroupBox groupPoint;
private UserFromControl.URRobotMControl urRobot;
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -24,19 +24,14 @@ namespace URSoldering.Client ...@@ -24,19 +24,14 @@ namespace URSoldering.Client
cmbPointType.SelectedIndex = 0; cmbPointType.SelectedIndex = 0;
groupPoint.Text = "新增焊点"; groupPoint.Text = "新增焊点";
} }
public FrmWeldPointInfo(string name,double x,double y ,double u,double z,int hand) public FrmWeldPointInfo(string name,URPointValue point)
{ {
InitializeComponent(); InitializeComponent();
this.Text = "新增焊点"; this.Text = "新增焊点";
groupPoint.Text = "新增焊点"; groupPoint.Text = "新增焊点";
this.txtName.Text = name; this.txtName.Text = name;
cmbPointType.SelectedIndex = 0; cmbPointType.SelectedIndex = 0;
ShowPoint(point);
this.txtRobotU.Text = u.ToString();
this.txtRobotX.Text = x.ToString();
txtRobotY.Text = y.ToString();
txtRobotZ.Text = z.ToString();
this.cmbHand.SelectedIndex = hand;
this.txtClearTime.Text = WeldRobotBean.RobotConfig.ClearMSenconds.ToString(); this.txtClearTime.Text = WeldRobotBean.RobotConfig.ClearMSenconds.ToString();
} }
public FrmWeldPointInfo(WeldPointInfo weldPointInfo) public FrmWeldPointInfo(WeldPointInfo weldPointInfo)
...@@ -69,13 +64,7 @@ namespace URSoldering.Client ...@@ -69,13 +64,7 @@ namespace URSoldering.Client
{ {
this.txtClearTime.Text = weldPointInfo.ClearTime.ToString(); this.txtClearTime.Text = weldPointInfo.ClearTime.ToString();
} }
ShowPoint(new URPointValue(weldPointInfo.RobotX, weldPointInfo.RoobtY, weldPointInfo.RobotZ, weldPointInfo.RobotRX, weldPointInfo.RobotRY, weldPointInfo.RobotRZ));
this.txtRobotU.Text = weldPointInfo.PositionU.ToString();
this.txtRobotX.Text = weldPointInfo.PositionX.ToString();
txtRobotY.Text = weldPointInfo.PositionY.ToString();
txtRobotZ.Text = weldPointInfo.PositionZ.ToString();
this.cmbHand.SelectedIndex = weldPointInfo.HandDirection;
} }
private void btnSave_Click(object sender, EventArgs e) private void btnSave_Click(object sender, EventArgs e)
...@@ -232,11 +221,15 @@ namespace URSoldering.Client ...@@ -232,11 +221,15 @@ namespace URSoldering.Client
weldPointInfo.isNeedClear = chbClear.Checked; weldPointInfo.isNeedClear = chbClear.Checked;
weldPointInfo.ClearTime = clearTime; weldPointInfo.ClearTime = clearTime;
weldPointInfo.pointType = cmbPointType.SelectedIndex; weldPointInfo.pointType = cmbPointType.SelectedIndex;
weldPointInfo.PositionX = FormUtil.getDoubleValue(txtRobotX);
weldPointInfo.PositionY = FormUtil.getDoubleValue(txtRobotY); URPointValue p = urRobot.GetPoint();
weldPointInfo.PositionU = FormUtil.getDoubleValue(txtRobotU); weldPointInfo.RobotX = p.X;
weldPointInfo.PositionZ= FormUtil.getDoubleValue(txtRobotZ); weldPointInfo.RoobtY = p.Y;
weldPointInfo.HandDirection = cmbHand.SelectedIndex; weldPointInfo.RobotZ = p.Z;
weldPointInfo.RobotRX = p.RX;
weldPointInfo.RobotRY = p.RY;
weldPointInfo.RobotRZ = p.RZ;
this.DialogResult = DialogResult.OK; this.DialogResult = DialogResult.OK;
...@@ -257,37 +250,23 @@ namespace URSoldering.Client ...@@ -257,37 +250,23 @@ namespace URSoldering.Client
private void btnUpdate_Click(object sender, EventArgs e) private void btnUpdate_Click(object sender, EventArgs e)
{ {
PointValue point = EpsonDevice.LastPoint; URPointValue point = URRobotControl.GetLastPosition();
double clearx = point.X;
double cleary = point.Y;
double clearu = point.U;
double clearz = point.Z;
//判断原点的Z轴 //判断原点的Z轴
if (clearz > EpsonDevice.Robot_LIM_Z) if (point.Z > EpsonDevice.Robot_LIM_Z)
{ {
MessageBox.Show("保存失败,焊点Z坐标(" + clearz + ")不能高于最高Z点(" + EpsonDevice.Robot_LIM_Z + ")"); MessageBox.Show("保存失败,焊点Z坐标(" + point.Z + ")不能高于最高Z点(" + EpsonDevice.Robot_LIM_Z + ")");
return; return;
} }
DialogResult result = MessageBox.Show("当前坐标:" +point.ToShowStr()+ ",是否确定更新?", "提示", MessageBoxButtons.YesNo);
int hand = point.HandDir; if (result.Equals(DialogResult.Yes))
string handStr = "自动";
if (hand == 1)
{ {
handStr = "右臂"; ShowPoint(point);
} }
else if (hand == 2)
{
handStr = "左臂";
} }
DialogResult result = MessageBox.Show("当前坐标:X:" + clearx + ",Y:" + cleary + ",Z:" + clearz + "," + ",U:" + clearu +",方向:"+ handStr + ",是否确定更新?", "提示", MessageBoxButtons.YesNo);
if (result.Equals(DialogResult.Yes)) private void ShowPoint(URPointValue point)
{ {
this.txtRobotU.Text = clearu.ToString(); urRobot.ShowPoint(point);
this.txtRobotX.Text = clearx.ToString();
this.txtRobotY.Text = cleary.ToString();
this.txtRobotZ.Text = clearz.ToString();
cmbHand.SelectedIndex = hand;
}
} }
private void chbClear_CheckedChanged(object sender, EventArgs e) private void chbClear_CheckedChanged(object sender, EventArgs e)
...@@ -302,9 +281,5 @@ namespace URSoldering.Client ...@@ -302,9 +281,5 @@ namespace URSoldering.Client
} }
} }
private void cmbPointType_SelectedIndexChanged(object sender, EventArgs e)
{
}
} }
} }
...@@ -85,12 +85,6 @@ ...@@ -85,12 +85,6 @@
<Compile Include="FrmBoardCopy.Designer.cs"> <Compile Include="FrmBoardCopy.Designer.cs">
<DependentUpon>FrmBoardCopy.cs</DependentUpon> <DependentUpon>FrmBoardCopy.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="FrmAutoAddBoard.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmAutoAddBoard.Designer.cs">
<DependentUpon>FrmAutoAddBoard.cs</DependentUpon>
</Compile>
<Compile Include="FrmOrgConfig.cs"> <Compile Include="FrmOrgConfig.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
...@@ -169,6 +163,12 @@ ...@@ -169,6 +163,12 @@
<Compile Include="FrmWeldPointInfo.Designer.cs"> <Compile Include="FrmWeldPointInfo.Designer.cs">
<DependentUpon>FrmWeldPointInfo.cs</DependentUpon> <DependentUpon>FrmWeldPointInfo.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="FrmWork.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmWork.Designer.cs">
<DependentUpon>FrmWork.cs</DependentUpon>
</Compile>
<Compile Include="FrmWorkCount.cs"> <Compile Include="FrmWorkCount.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
...@@ -183,9 +183,6 @@ ...@@ -183,9 +183,6 @@
<EmbeddedResource Include="FrmBoardCopy.resx"> <EmbeddedResource Include="FrmBoardCopy.resx">
<DependentUpon>FrmBoardCopy.cs</DependentUpon> <DependentUpon>FrmBoardCopy.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="FrmAutoAddBoard.resx">
<DependentUpon>FrmAutoAddBoard.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmOrgConfig.resx"> <EmbeddedResource Include="FrmOrgConfig.resx">
<DependentUpon>FrmOrgConfig.cs</DependentUpon> <DependentUpon>FrmOrgConfig.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
...@@ -225,6 +222,9 @@ ...@@ -225,6 +222,9 @@
<EmbeddedResource Include="FrmWeldPointInfo.resx"> <EmbeddedResource Include="FrmWeldPointInfo.resx">
<DependentUpon>FrmWeldPointInfo.cs</DependentUpon> <DependentUpon>FrmWeldPointInfo.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="FrmWork.resx">
<DependentUpon>FrmWork.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmWorkCount.resx"> <EmbeddedResource Include="FrmWorkCount.resx">
<DependentUpon>FrmWorkCount.cs</DependentUpon> <DependentUpon>FrmWorkCount.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
......
namespace UserFromControl
{
partial class URRobotMControl
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.label14 = new System.Windows.Forms.Label();
this.label21 = new System.Windows.Forms.Label();
this.txtRY = new System.Windows.Forms.TextBox();
this.txtRZ = new System.Windows.Forms.TextBox();
this.label22 = new System.Windows.Forms.Label();
this.txtRX = new System.Windows.Forms.TextBox();
this.label18 = new System.Windows.Forms.Label();
this.label19 = new System.Windows.Forms.Label();
this.txtRobotY = new System.Windows.Forms.TextBox();
this.txtRobotZ = new System.Windows.Forms.TextBox();
this.label20 = new System.Windows.Forms.Label();
this.txtRobotX = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(9, 118);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(29, 12);
this.label14.TabIndex = 84;
this.label14.Text = "RX:";
//
// label21
//
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(9, 190);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(29, 12);
this.label21.TabIndex = 82;
this.label21.Text = "RZ:";
//
// txtRY
//
this.txtRY.Location = new System.Drawing.Point(51, 150);
this.txtRY.MaxLength = 20;
this.txtRY.Name = "txtRY";
this.txtRY.Size = new System.Drawing.Size(101, 21);
this.txtRY.TabIndex = 87;
//
// txtRZ
//
this.txtRZ.Location = new System.Drawing.Point(51, 186);
this.txtRZ.MaxLength = 20;
this.txtRZ.Name = "txtRZ";
this.txtRZ.Size = new System.Drawing.Size(101, 21);
this.txtRZ.TabIndex = 83;
//
// label22
//
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(9, 154);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(29, 12);
this.label22.TabIndex = 86;
this.label22.Text = "RY:";
//
// txtRX
//
this.txtRX.Location = new System.Drawing.Point(51, 114);
this.txtRX.MaxLength = 20;
this.txtRX.Name = "txtRX";
this.txtRX.Size = new System.Drawing.Size(101, 21);
this.txtRX.TabIndex = 85;
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(9, 10);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(23, 12);
this.label18.TabIndex = 78;
this.label18.Text = "X:";
//
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(9, 82);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(23, 12);
this.label19.TabIndex = 76;
this.label19.Text = "Z:";
//
// txtRobotY
//
this.txtRobotY.Location = new System.Drawing.Point(51, 42);
this.txtRobotY.MaxLength = 20;
this.txtRobotY.Name = "txtRobotY";
this.txtRobotY.Size = new System.Drawing.Size(101, 21);
this.txtRobotY.TabIndex = 81;
//
// txtRobotZ
//
this.txtRobotZ.Location = new System.Drawing.Point(51, 78);
this.txtRobotZ.MaxLength = 20;
this.txtRobotZ.Name = "txtRobotZ";
this.txtRobotZ.Size = new System.Drawing.Size(101, 21);
this.txtRobotZ.TabIndex = 77;
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(9, 46);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(23, 12);
this.label20.TabIndex = 80;
this.label20.Text = "Y:";
//
// txtRobotX
//
this.txtRobotX.Location = new System.Drawing.Point(51, 6);
this.txtRobotX.MaxLength = 20;
this.txtRobotX.Name = "txtRobotX";
this.txtRobotX.Size = new System.Drawing.Size(101, 21);
this.txtRobotX.TabIndex = 79;
//
// URRobotPositionControl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.Controls.Add(this.label14);
this.Controls.Add(this.label21);
this.Controls.Add(this.txtRY);
this.Controls.Add(this.txtRZ);
this.Controls.Add(this.label22);
this.Controls.Add(this.txtRX);
this.Controls.Add(this.label18);
this.Controls.Add(this.label19);
this.Controls.Add(this.txtRobotY);
this.Controls.Add(this.txtRobotZ);
this.Controls.Add(this.label20);
this.Controls.Add(this.txtRobotX);
this.Name = "URRobotPositionControl";
this.Size = new System.Drawing.Size(156, 212);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.TextBox txtRY;
private System.Windows.Forms.TextBox txtRZ;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.TextBox txtRX;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.TextBox txtRobotY;
private System.Windows.Forms.TextBox txtRobotZ;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.TextBox txtRobotX;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using URSoldering.DeviceLibrary;
using URSoldering.Common;
namespace UserFromControl
{
public partial class URRobotMControl : UserControl
{
public URRobotMControl()
{
InitializeComponent();
}
public void ShowPoint(URPointValue point)
{
txtRobotX.Text = point.X.ToString();
txtRobotY.Text = point.Y.ToString();
txtRobotZ.Text = point.Z.ToString();
txtRX.Text = point.RX.ToString();
txtRY.Text = point.RY.ToString();
txtRZ.Text = point.RZ.ToString();
}
public URPointValue GetPoint()
{
double x = FormUtil.getDoubleValue(txtRobotX);
double y = FormUtil.getDoubleValue(txtRobotY);
double z = FormUtil.getDoubleValue(txtRobotZ);
double rx = FormUtil.getDoubleValue(txtRX);
double ry = FormUtil.getDoubleValue(txtRY);
double rz = FormUtil.getDoubleValue(txtRZ);
return new URPointValue(x, y, z, rx, ry, rz);
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file \ No newline at end of file
namespace UserFromControl
{
partial class URRobotSControl
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.lblRZ = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.lblRY = new System.Windows.Forms.Label();
this.lblRX = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.txtRobotZ = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.txtRobotY = new System.Windows.Forms.Label();
this.txtRobotX = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// lblRZ
//
this.lblRZ.AutoSize = true;
this.lblRZ.Location = new System.Drawing.Point(167, 113);
this.lblRZ.Name = "lblRZ";
this.lblRZ.Size = new System.Drawing.Size(11, 12);
this.lblRZ.TabIndex = 44;
this.lblRZ.Text = "0";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(133, 113);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(29, 12);
this.label3.TabIndex = 41;
this.label3.Text = "RZ:";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(132, 9);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(29, 12);
this.label4.TabIndex = 39;
this.label4.Text = "RX:";
//
// lblRY
//
this.lblRY.AutoSize = true;
this.lblRY.Location = new System.Drawing.Point(167, 61);
this.lblRY.Name = "lblRY";
this.lblRY.Size = new System.Drawing.Size(11, 12);
this.lblRY.TabIndex = 43;
this.lblRY.Text = "0";
//
// lblRX
//
this.lblRX.AutoSize = true;
this.lblRX.Location = new System.Drawing.Point(167, 9);
this.lblRX.Name = "lblRX";
this.lblRX.Size = new System.Drawing.Size(11, 12);
this.lblRX.TabIndex = 42;
this.lblRX.Text = "0";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(133, 61);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(29, 12);
this.label7.TabIndex = 40;
this.label7.Text = "RY:";
//
// txtRobotZ
//
this.txtRobotZ.AutoSize = true;
this.txtRobotZ.Location = new System.Drawing.Point(49, 113);
this.txtRobotZ.Name = "txtRobotZ";
this.txtRobotZ.Size = new System.Drawing.Size(11, 12);
this.txtRobotZ.TabIndex = 38;
this.txtRobotZ.Text = "0";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(15, 113);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(23, 12);
this.label13.TabIndex = 35;
this.label13.Text = "Z:";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(14, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(23, 12);
this.label1.TabIndex = 33;
this.label1.Text = "X:";
//
// txtRobotY
//
this.txtRobotY.AutoSize = true;
this.txtRobotY.Location = new System.Drawing.Point(49, 61);
this.txtRobotY.Name = "txtRobotY";
this.txtRobotY.Size = new System.Drawing.Size(11, 12);
this.txtRobotY.TabIndex = 37;
this.txtRobotY.Text = "0";
//
// txtRobotX
//
this.txtRobotX.AutoSize = true;
this.txtRobotX.Location = new System.Drawing.Point(49, 9);
this.txtRobotX.Name = "txtRobotX";
this.txtRobotX.Size = new System.Drawing.Size(11, 12);
this.txtRobotX.TabIndex = 36;
this.txtRobotX.Text = "0";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(15, 61);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(23, 12);
this.label12.TabIndex = 34;
this.label12.Text = "Y:";
//
// URRobotSControl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.Controls.Add(this.lblRZ);
this.Controls.Add(this.label3);
this.Controls.Add(this.label4);
this.Controls.Add(this.lblRY);
this.Controls.Add(this.lblRX);
this.Controls.Add(this.label7);
this.Controls.Add(this.txtRobotZ);
this.Controls.Add(this.label13);
this.Controls.Add(this.label1);
this.Controls.Add(this.txtRobotY);
this.Controls.Add(this.txtRobotX);
this.Controls.Add(this.label12);
this.Name = "URRobotSControl";
this.Size = new System.Drawing.Size(228, 146);
this.Load += new System.EventHandler(this.URRobotSControl_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lblRZ;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label lblRY;
private System.Windows.Forms.Label lblRX;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label txtRobotZ;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label txtRobotY;
private System.Windows.Forms.Label txtRobotX;
private System.Windows.Forms.Label label12;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using URSoldering.DeviceLibrary;
using URSoldering.Common;
namespace UserFromControl
{
public partial class URRobotSControl : UserControl
{
public URRobotSControl()
{
InitializeComponent();
}
private void URRobotSControl_Load(object sender, EventArgs e)
{
}
public void ShowPoint(URPointValue point)
{
txtRobotX.Text = point.X.ToString();
txtRobotY.Text = point.Y.ToString();
txtRobotZ.Text = point.Z.ToString();
lblRX.Text = point.RX.ToString();
lblRY.Text = point.RY.ToString();
lblRZ.Text = point.RZ.ToString();
}
public URPointValue GetPoint()
{
double x = FormUtil.getDoubleValue(txtRobotX);
double y = FormUtil.getDoubleValue(txtRobotY);
double z = FormUtil.getDoubleValue(txtRobotZ);
double rx = FormUtil.getDoubleValue(lblRX);
double ry = FormUtil.getDoubleValue(lblRY);
double rz = FormUtil.getDoubleValue(lblRZ);
return new URPointValue(x, y, z, rx, ry, rz);
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file \ No newline at end of file
...@@ -99,6 +99,18 @@ ...@@ -99,6 +99,18 @@
<Compile Include="IOTextControl.Designer.cs"> <Compile Include="IOTextControl.Designer.cs">
<DependentUpon>IOTextControl.cs</DependentUpon> <DependentUpon>IOTextControl.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="URRobotMControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="URRobotMControl.Designer.cs">
<DependentUpon>URRobotMControl.cs</DependentUpon>
</Compile>
<Compile Include="URRobotSControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="URRobotSControl.Designer.cs">
<DependentUpon>URRobotSControl.cs</DependentUpon>
</Compile>
<Compile Include="UserControl1.cs"> <Compile Include="UserControl1.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
...@@ -121,6 +133,12 @@ ...@@ -121,6 +133,12 @@
<EmbeddedResource Include="IOTextControl.resx"> <EmbeddedResource Include="IOTextControl.resx">
<DependentUpon>IOTextControl.cs</DependentUpon> <DependentUpon>IOTextControl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="URRobotMControl.resx">
<DependentUpon>URRobotMControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="URRobotSControl.resx">
<DependentUpon>URRobotSControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UserControl1.resx"> <EmbeddedResource Include="UserControl1.resx">
<DependentUpon>UserControl1.cs</DependentUpon> <DependentUpon>UserControl1.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
...@@ -145,6 +163,19 @@ ...@@ -145,6 +163,19 @@
<ItemGroup> <ItemGroup>
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Common\Common.csproj">
<Project>{4b003e21-8356-447f-a55a-31be3004f2f9}</Project>
<Name>Common</Name>
</ProjectReference>
<ProjectReference Include="..\DeviceLibrary\DeviceLibrary.csproj">
<Project>{29659924-d057-457f-9e94-715e46027a93}</Project>
<Name>DeviceLibrary</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!