Commit 34145f02 几米阳光

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

1 个父辈 9a750da5
......@@ -55,40 +55,38 @@ namespace URSoldering.Common
public static string BOARD_IMAGE_DEFAULT = "BOARD_IMAGE_DEFAULT";
/// <summary>
/// 焊接机器人待机点
/// </summary>
public static string Soldering_Home_Y = "Soldering_Home_Y";
public static string Soldering_Home_X = "Soldering_Home_X";
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>
public static string Soldering_HomePoint = "Soldering_HomePoint";
/// <summary>
/// 焊接机器人清洗点1
/// </summary>
public static string Soldering_Clear_Y_1 = "Soldering_Clear_Y_1";
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";
public static string Soldering_Clear1Point = "Soldering_Clear1Point";
/// <summary>
/// 焊接机器人清洗点2
/// </summary>
public static string Soldering_Clear_Y_2 = "Soldering_Clear_Y_2";
public static string Soldering_Clear_X_2 = "Soldering_Clear_X_2";
public static string Soldering_Clear_U_2 = "Soldering_Clear_U_2";
public static string Soldering_Clear_Z_2 = "Soldering_Clear_Z_2";
public static string Soldering_Clear_Hand_2 = "Soldering_Clear_Hand_2";
public static string Soldering_Clear2Point = "Soldering_Clear2Point";
/// <summary>
/// 机械臂最小范围
/// </summary>
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_U_Min = "Soldering_U_Min";
public static string Soldering_X_Min = "Soldering_X_Min";
public static string Soldering_Y_Min = "Soldering_Y_Min";
public static string Soldering_Z_Min = "Soldering_Z_Min";
public static string Soldering_U_Max = "Soldering_U_Max";
public static string Soldering_X_Max = "Soldering_X_Max";
public static string Soldering_Y_Max = "Soldering_Y_Max";
public static string Soldering_Z_Max = "Soldering_Z_Max";
//public static string Soldering_U_Min = "Soldering_U_Min";
//public static string Soldering_X_Min = "Soldering_X_Min";
//public static string Soldering_Y_Min = "Soldering_Y_Min";
//public static string Soldering_Z_Min = "Soldering_Z_Min";
//public static string Soldering_U_Max = "Soldering_U_Max";
//public static string Soldering_X_Max = "Soldering_X_Max";
//public static string Soldering_Y_Max = "Soldering_Y_Max";
//public static string Soldering_Z_Max = "Soldering_Z_Max";
public static string SendWire_Change = "SendWire_Change";
public static string Slave_ID = "Slave_ID";
......
......@@ -18,33 +18,12 @@ namespace URSoldering.DeviceLibrary
public static string WarnMsg = "";
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static System.Timers.Timer mainTimer = new System.Timers.Timer();
public static double EpsonOrgX = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_Home_X);
public static double EpsonOrgY = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_Home_Y);
public static double EpsonOrgZ = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_Home_Z);
public static double EpsonOrgU = (double)ConfigAppSettings.GetNumValue(Setting_Init.Soldering_Home_U);
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 URPointValue HomePoint = new URPointValue();
public static URPointValue Clear1Point = new URPointValue();
public static URPointValue Clear2Point = new URPointValue();
public static URPointValue RobotMin = new URPointValue();
public static URPointValue RobotMax = new URPointValue();
public static int SendWireXiShu = ConfigAppSettings.GetIntValue(Setting_Init.SendWire_Change);
//休眠的秒数,<=0不需要休眠
......@@ -85,8 +64,28 @@ namespace URSoldering.DeviceLibrary
mainTimer.Interval = 300;
mainTimer.AutoReset = true;
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 void InitData(SolderingRobotConfig config)
{
......@@ -198,24 +197,7 @@ namespace URSoldering.DeviceLibrary
mainTimer.Enabled = true;
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()
{
LogUtil.info(RobotName + "停止当前焊接");
......@@ -609,16 +591,16 @@ namespace URSoldering.DeviceLibrary
}
private static void MoveToPoint(WeldPointInfo p, bool IsHigh)
{
SendWireDown();
//判断需要抬起的高度
double limZ = EpsonDevice.Robot_LIM_Z;
double ZValue = p.PositionZ;
//SendWireDown();
////判断需要抬起的高度
//double limZ = EpsonDevice.Robot_LIM_Z;
//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);
EpsonDevice.MoveTo(p.PositionX, p.PositionY, ZValue, p.PositionU, isHighSpeed, p.HandDirection, limZ,AfterMove);
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitEpson());
////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);
//WeldMoveStep.WaitList.Add(WaitResultInfo.WaitEpson());
}
......@@ -626,10 +608,10 @@ namespace URSoldering.DeviceLibrary
{
SendWireUp();
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("送丝上升,机械臂走到待机点 ");
EpsonDevice.MoveTo(EpsonOrgX, EpsonOrgY, EpsonOrgZ, EpsonOrgU, isHighSpeed, EpsonOrgHandDir, EpsonDevice.Robot_LIM_Z,AfterMove);
URRobotControl.MoveTo(HomePoint);
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitEpson());
}
}
......@@ -639,10 +621,10 @@ namespace URSoldering.DeviceLibrary
Thread.Sleep(100);
RobotBean.KNDIOMove(IO_Type.ClearWeldingSQL, IO_VALUE.HIGH);
WeldCount = 0;
if (EpsonClearX1 != 0 && EpsonClearY1 != 0 && EpsonClearZ1 != 0 && EpsonClearU1 != 0)
if (Clear1Point.X != 0 && Clear1Point.Y != 0 && Clear1Point.Z != 0)
{
WeldLog("送丝上升,打开清洗装置,机械臂走到清洗点1 ");
EpsonDevice.MoveTo(EpsonClearX1, EpsonClearY1, EpsonClearZ1, EpsonClearU1, isHighSpeed, EpsonClearHandDir1, AfterMove);
URRobotControl.MoveTo(Clear1Point);
WeldMoveStep.WaitList.Add(WaitResultInfo.WaitEpson());
}
}
......@@ -650,7 +632,7 @@ namespace URSoldering.DeviceLibrary
{
RobotBean.KNDIOMove(IO_Type.ClearWeldingSQL, IO_VALUE.HIGH, 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 preZValue = EpsonDevice.LastSendPoint.Z;
......@@ -659,59 +641,37 @@ namespace URSoldering.DeviceLibrary
preZValue = EpsonDevice.LastPoint.Z;
}
if (preZValue < EpsonClearZ2)
{
preZValue = EpsonClearZ2;
}
//if (preZValue < EpsonClearZ2)
//{
// preZValue = EpsonClearZ2;
//}
limZ = preZValue + 1;
WeldLog("机械臂走到清洗点2 ,打开清洗装置,清洗时间:"+mSenconds+" ");
//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());
}
}
//更新原点
public static void UpdateOrgPoint(double orgx, double orgy, double orgu, double orgz, int hand)
{
ConfigAppSettings.SaveValue(Setting_Init.Soldering_Home_X, orgx.ToString());
ConfigAppSettings.SaveValue(Setting_Init.Soldering_Home_Y, orgy.ToString());
ConfigAppSettings.SaveValue(Setting_Init.Soldering_Home_Z, orgz.ToString());
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 UpdateOrgPoint(URPointValue point)
{
WeldRobotBean.HomePoint = point;
string str = point.ToJosonStr();
ConfigAppSettings.SaveValue(Setting_Init.Soldering_HomePoint, str);
}
public static void UpdateClear1Point(double clearx1, double cleary1, double clearu1, double clearz1, int clearHand1)
public static void UpdateClear1Point(URPointValue point)
{
WeldRobotBean.EpsonClearHandDir1 = clearHand1;
WeldRobotBean.EpsonClearU1 = clearu1;
WeldRobotBean.EpsonClearX1 = clearx1;
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());
WeldRobotBean.Clear1Point = point;
string str = point.ToJosonStr();
ConfigAppSettings.SaveValue(Setting_Init.Soldering_Clear1Point, str);
}
public static void UpdateClear2Point(double clearx2, double cleary2, double clearu2, double clearz2, int clearHand2)
public static void UpdateClear2Point(URPointValue point)
{
WeldRobotBean.EpsonClearHandDir2 = clearHand2;
WeldRobotBean.EpsonClearU2 = clearu2;
WeldRobotBean.EpsonClearX2 = clearx2;
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());
WeldRobotBean.Clear2Point = point;
string str = point.ToJosonStr();
ConfigAppSettings.SaveValue(Setting_Init.Soldering_Clear2Point, str);
}
/// <summary>
......@@ -721,34 +681,34 @@ namespace URSoldering.DeviceLibrary
/// <returns></returns>
public static string CheckEpsonPoint(PointValue point)
{
if (EpsonXMin < EpsonXMax)
{
if (point.X < EpsonXMin || point.X > EpsonXMax)
{
return "机械臂X轴超出活动范围";
}
}
if (EpsonYMin < EpsonYMax)
{
if (point.Y < EpsonYMin || point.Y > EpsonYMax)
{
return "机械臂Y轴超出活动范围";
}
}
if (EpsonZMin < EpsonZMax)
{
if (point.Z < EpsonZMin || point.Z > EpsonZMax)
{
return "机械臂Z轴超出活动范围";
}
}
if (EpsonUMin < EpsonUMax)
{
if (point.U < EpsonUMin || point.U > EpsonUMax)
{
return "机械臂U轴超出活动范围";
}
}
//if (EpsonXMin < EpsonXMax)
//{
// if (point.X < EpsonXMin || point.X > EpsonXMax)
// {
// return "机械臂X轴超出活动范围";
// }
//}
//if (EpsonYMin < EpsonYMax)
//{
// if (point.Y < EpsonYMin || point.Y > EpsonYMax)
// {
// return "机械臂Y轴超出活动范围";
// }
//}
//if (EpsonZMin < EpsonZMax)
//{
// if (point.Z < EpsonZMin || point.Z > EpsonZMax)
// {
// return "机械臂Z轴超出活动范围";
// }
//}
//if (EpsonUMin < EpsonUMax)
//{
// if (point.U < EpsonUMin || point.U > EpsonUMax)
// {
// return "机械臂U轴超出活动范围";
// }
//}
return "";
}
}
......
......@@ -175,7 +175,7 @@ namespace URSoldering.DeviceLibrary
}
public WeldPointInfo(int hand)
{
this.HandDirection = hand;
//this.HandDirection = hand;
}
/// <summary>
......@@ -188,26 +188,33 @@ namespace URSoldering.DeviceLibrary
/// </summary>
public string pointName { get; set; }
/// <summary>
/// x坐标
/// </summary>
public double PositionX { get; set; }
/// <summary>
/// y坐标
/// </summary>
public double PositionY { get; set; }
/// <summary>
/// u坐标
/// </summary>
public double PositionU { get; set; }
/// <summary>
/// z坐标
/// </summary>
public double PositionZ { get; set; }
/// <summary>
/// 手臂方向,2=左臂L,1=右臂R
/// </summary>
public int HandDirection { get; set; }
public double RobotX { get; set; }
public double RoobtY { get; set; }
public double RobotZ { get; set; }
public double RobotRX { get; set; }
public double RobotRY { get; set; }
public double RobotRZ { get; set; }
///// <summary>
///// x坐标
///// </summary>
//public double PositionX { get; set; }
///// <summary>
///// y坐标
///// </summary>
//public double PositionY { get; set; }
///// <summary>
///// u坐标
///// </summary>
//public double PositionU { get; set; }
///// <summary>
///// z坐标
///// </summary>
//public double PositionZ { get; set; }
///// <summary>
///// 手臂方向,2=左臂L,1=右臂R
///// </summary>
//public int HandDirection { get; set; }
/// <summary>
/// 预热温度
......@@ -277,28 +284,28 @@ namespace URSoldering.DeviceLibrary
/// </summary>
public int ClearTime { get; set; }
public string HandValue
{
get
{
if (HandDirection == 0)
{
return "自动";
}
else if (HandDirection == 1)
{
return "右臂";
}
else if (HandDirection == 2)
{
return "左臂";
}
//public string HandValue
//{
// get
// {
// if (HandDirection == 0)
// {
// return "自动";
// }
// else if (HandDirection == 1)
// {
// return "右臂";
// }
// else if (HandDirection == 2)
// {
// return "左臂";
// }
return "";
}
set
{
}
}
// return "";
// }
// set
// {
// }
//}
}
}
......@@ -62,12 +62,7 @@ namespace URSoldering.DeviceLibrary
private void LedTimer_Elapsed(object sender, ElapsedEventArgs e)
{
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))
{
KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.HIGH);
......@@ -88,11 +83,7 @@ namespace URSoldering.DeviceLibrary
if (KNDIOValue(IO_Type.WaitSingle).Equals(IO_VALUE.HIGH))
{
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))
{
KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.HIGH);
......@@ -104,11 +95,7 @@ namespace URSoldering.DeviceLibrary
if (KNDIOValue(IO_Type.WaitSingle).Equals(IO_VALUE.HIGH))
{
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))
{
KNDIOMove(IO_Type.AutoRunSingle, IO_VALUE.LOW);
......
......@@ -93,8 +93,11 @@ namespace URSoldering.DeviceLibrary
public static void Release()
{
bool isOk = false;
parseCommand(CMD_StopSend, out isOk);
sb.closePort();
if (sb != null)
{
parseCommand(CMD_StopSend, out isOk);
sb.closePort();
}
IsRun = false;
}
public static void Reset()
......@@ -201,6 +204,11 @@ namespace URSoldering.DeviceLibrary
}
private static byte[] parseCommand(string commandText, out bool isOk)
{
if (sb == null)
{
isOk = false;
return null;
}
byte[] message = new byte[commandText.Length + 2];
message[0] = (byte)2;
for (int i = 1; i < commandText.Length + 1; i++)
......
......@@ -70,6 +70,12 @@ namespace URSoldering.DeviceLibrary
}
return StartConnect();
}
public static string Start()
{
return "";
}
private static bool StartConnect()
{
try
......@@ -234,18 +240,52 @@ namespace URSoldering.DeviceLibrary
{
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 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
this.X = x;
this.Y = y;
this.U = u;
this.Z = z;
this.HandDir = handDir;
this.RX = rx;
this.RY = ry;
this.RZ = rz;
this.UpdateTime = DateTime.Now;
}
/// <summary>
......@@ -253,10 +293,27 @@ namespace URSoldering.DeviceLibrary
/// </summary>
public DateTime UpdateTime { get; set; }
public double X { get; set; }
public double Y { get; set; }
public double U { get; set; }
public double Y { 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
{
......
......@@ -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 @@
this.移动到此处ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
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.picYAdd = new System.Windows.Forms.PictureBox();
this.picXAdd = new System.Windows.Forms.PictureBox();
......@@ -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.dataGridViewImageColumn1 = new System.Windows.Forms.DataGridViewImageColumn();
this.dataGridViewImageColumn2 = new System.Windows.Forms.DataGridViewImageColumn();
this.panel1 = new System.Windows.Forms.Panel();
this.panPoint = new System.Windows.Forms.Panel();
this.panVideo = new System.Windows.Forms.Panel();
......@@ -76,32 +70,21 @@
this.lblOriginX = new System.Windows.Forms.Label();
this.lblOriginY = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.lblSpeed = new System.Windows.Forms.Label();
this.panel3 = new System.Windows.Forms.Panel();
this.btnPositionTest = new System.Windows.Forms.Button();
this.lblEpsonError = 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.btnStopDown = 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.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.lblSpeed = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.btnStopSend = new System.Windows.Forms.Button();
this.btnSendWire = new System.Windows.Forms.Button();
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.txtRobotX = new System.Windows.Forms.Label();
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.label24 = new System.Windows.Forms.Label();
this.dgvList = new System.Windows.Forms.DataGridView();
......@@ -110,7 +93,9 @@
this.Column_X = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_Y = 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_preheatTemperatureMax = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_preheatTemperatureMin = new System.Windows.Forms.DataGridViewTextBoxColumn();
......@@ -125,7 +110,6 @@
this.Column_sendWireTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_pointType = new System.Windows.Forms.DataGridViewTextBoxColumn();
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_getPosition = new System.Windows.Forms.DataGridViewLinkColumn();
this.Column_MoveTest = new System.Windows.Forms.DataGridViewLinkColumn();
......@@ -149,8 +133,18 @@
this.btnSStop = new System.Windows.Forms.Button();
this.btnWStop = new System.Windows.Forms.Button();
this.label14 = new System.Windows.Forms.Label();
this.dataGridViewImageColumn1 = new System.Windows.Forms.DataGridViewImageColumn();
this.dataGridViewImageColumn2 = new System.Windows.Forms.DataGridViewImageColumn();
this.label12 = new System.Windows.Forms.Label();
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();
((System.ComponentModel.ISupportInitialize)(this.picYDel)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picYAdd)).BeginInit();
......@@ -169,7 +163,6 @@
this.groupBox2.SuspendLayout();
this.panel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tckSpeed)).BeginInit();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvList)).BeginInit();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
......@@ -200,118 +193,6 @@
//
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
//
this.picYDel.BackColor = System.Drawing.Color.Transparent;
......@@ -470,6 +351,22 @@
this.下降ToolStripMenuItem.Text = "下降";
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
//
this.panel1.AutoScroll = true;
......@@ -685,40 +582,50 @@
//
// 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.panel3);
this.groupBox2.Controls.Add(this.btnPositionTest);
this.groupBox2.Controls.Add(this.lblEpsonError);
this.groupBox2.Controls.Add(this.lblMsg);
this.groupBox2.Controls.Add(this.cmbHand);
this.groupBox2.Controls.Add(this.btnSavePoint);
this.groupBox2.Controls.Add(this.btnStopDown);
this.groupBox2.Controls.Add(this.btnGoHome);
this.groupBox2.Controls.Add(this.label23);
this.groupBox2.Controls.Add(this.label5);
this.groupBox2.Controls.Add(this.txtRobotZ);
this.groupBox2.Controls.Add(this.label13);
this.groupBox2.Controls.Add(this.label1);
this.groupBox2.Controls.Add(this.txtSpeed);
this.groupBox2.Controls.Add(this.label11);
this.groupBox2.Controls.Add(this.btnStopSend);
this.groupBox2.Controls.Add(this.btnSendWire);
this.groupBox2.Controls.Add(this.tckSpeed);
this.groupBox2.Controls.Add(this.txtRobotU);
this.groupBox2.Controls.Add(this.txtRobotY);
this.groupBox2.Controls.Add(this.btnWUp);
this.groupBox2.Controls.Add(this.txtRobotX);
this.groupBox2.Controls.Add(this.btnChange);
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.Location = new System.Drawing.Point(12, 85);
this.groupBox2.Location = new System.Drawing.Point(12, 78);
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.TabStop = false;
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
//
this.panel3.BackColor = System.Drawing.SystemColors.Control;
......@@ -730,16 +637,16 @@
this.panel3.Controls.Add(this.picUDel);
this.panel3.Controls.Add(this.picZAdd);
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.Size = new System.Drawing.Size(287, 146);
this.panel3.Size = new System.Drawing.Size(287, 138);
this.panel3.TabIndex = 259;
//
// btnPositionTest
//
this.btnPositionTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
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.Size = new System.Drawing.Size(100, 35);
this.btnPositionTest.TabIndex = 318;
......@@ -769,18 +676,6 @@
this.lblMsg.TabIndex = 260;
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
//
this.btnSavePoint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
......@@ -798,7 +693,7 @@
//
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.Location = new System.Drawing.Point(564, 65);
this.btnStopDown.Location = new System.Drawing.Point(564, 57);
this.btnStopDown.Name = "btnStopDown";
this.btnStopDown.Size = new System.Drawing.Size(100, 35);
this.btnStopDown.TabIndex = 317;
......@@ -810,7 +705,7 @@
//
this.btnGoHome.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
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.Size = new System.Drawing.Size(100, 35);
this.btnGoHome.TabIndex = 35;
......@@ -818,15 +713,6 @@
this.btnGoHome.UseVisualStyleBackColor = true;
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
//
this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
......@@ -840,33 +726,6 @@
this.label5.Text = "送丝速度/毫米:";
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
//
this.txtSpeed.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
......@@ -878,24 +737,6 @@
this.txtSpeed.TabIndex = 275;
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
//
this.btnStopSend.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
......@@ -924,7 +765,7 @@
//
// 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.Minimum = 1;
this.tckSpeed.Name = "tckSpeed";
......@@ -933,30 +774,12 @@
this.tckSpeed.Value = 3;
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
//
this.btnWUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnWUp.Enabled = false;
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.Size = new System.Drawing.Size(100, 35);
this.btnWUp.TabIndex = 254;
......@@ -964,15 +787,6 @@
this.btnWUp.UseVisualStyleBackColor = true;
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
//
this.btnChange.FlatAppearance.BorderSize = 0;
......@@ -985,32 +799,6 @@
this.btnChange.UseVisualStyleBackColor = true;
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
//
this.label25.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
......@@ -1045,7 +833,9 @@
this.Column_X,
this.Column_Y,
this.Column_Z,
this.Column_U,
this.Column_RX,
this.Column_RY,
this.Column_RZ,
this.Column_preheatTemperature,
this.Column_preheatTemperatureMax,
this.Column_preheatTemperatureMin,
......@@ -1060,7 +850,6 @@
this.Column_sendWireTime,
this.Column_pointType,
this.Column_isClear,
this.Column_HandDirection,
this.Column_ClearTime,
this.Column_getPosition,
this.Column_MoveTest,
......@@ -1069,14 +858,14 @@
this.Column_Up,
this.Column_Down});
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.Name = "dgvList";
this.dgvList.ReadOnly = true;
this.dgvList.RowHeadersWidth = 5;
this.dgvList.RowTemplate.Height = 23;
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.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
this.dgvList.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvList_CellMouseDown);
......@@ -1106,7 +895,7 @@
//
// Column_X
//
this.Column_X.DataPropertyName = "PositionX";
this.Column_X.DataPropertyName = "RobotX";
this.Column_X.HeaderText = "X";
this.Column_X.Name = "Column_X";
this.Column_X.ReadOnly = true;
......@@ -1115,7 +904,7 @@
//
// Column_Y
//
this.Column_Y.DataPropertyName = "PositionY";
this.Column_Y.DataPropertyName = "RobotY";
this.Column_Y.HeaderText = "Y";
this.Column_Y.Name = "Column_Y";
this.Column_Y.ReadOnly = true;
......@@ -1124,21 +913,37 @@
//
// Column_Z
//
this.Column_Z.DataPropertyName = "PositionZ";
this.Column_Z.DataPropertyName = "RobotZ";
this.Column_Z.HeaderText = "Z";
this.Column_Z.Name = "Column_Z";
this.Column_Z.ReadOnly = true;
this.Column_Z.Visible = false;
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_U.HeaderText = "角度";
this.Column_U.Name = "Column_U";
this.Column_U.ReadOnly = true;
this.Column_U.Visible = false;
this.Column_U.Width = 75;
this.Column_RZ.DataPropertyName = "RobotRZ";
this.Column_RZ.HeaderText = "RZ";
this.Column_RZ.Name = "Column_RZ";
this.Column_RZ.ReadOnly = true;
this.Column_RZ.Visible = false;
//
// Column_preheatTemperature
//
......@@ -1258,17 +1063,6 @@
this.Column_isClear.ReadOnly = true;
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
//
this.Column_ClearTime.DataPropertyName = "ClearTime";
......@@ -1359,7 +1153,7 @@
this.groupBox1.Controls.Add(this.label2);
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.Location = new System.Drawing.Point(12, 11);
this.groupBox1.Location = new System.Drawing.Point(12, 8);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(869, 68);
this.groupBox1.TabIndex = 20;
......@@ -1506,21 +1300,113 @@
this.label14.Text = "条形码";
this.label14.Visible = false;
//
// dataGridViewImageColumn1
// label12
//
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;
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(15, 69);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(27, 17);
this.label12.TabIndex = 3;
this.label12.Text = "Y:";
//
// dataGridViewImageColumn2
// txtRobotX
//
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;
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";
//
// 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
//
......@@ -1558,7 +1444,6 @@
this.groupBox2.PerformLayout();
this.panel3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.tckSpeed)).EndInit();
this.panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvList)).EndInit();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
......@@ -1579,14 +1464,6 @@
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.DataGridView dgvList;
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 btnSave;
private System.Windows.Forms.Button btnWStop;
......@@ -1612,22 +1489,12 @@
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
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.ContextMenuStrip contextMenuStrip2;
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 label23;
private System.Windows.Forms.ComboBox cmbHand;
private System.Windows.Forms.Label label25;
private System.Windows.Forms.Label label24;
private System.Windows.Forms.DataGridViewImageColumn dataGridViewImageColumn1;
......@@ -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.Panel panel2;
private System.Windows.Forms.Button btnStopSend;
private System.Windows.Forms.Button btnSendWire;
private System.Windows.Forms.Label label5;
......@@ -1654,12 +1520,23 @@
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Button btnPositionTest;
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_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_X;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_Y;
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_preheatTemperatureMax;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_preheatTemperatureMin;
......@@ -1674,7 +1551,6 @@
private System.Windows.Forms.DataGridViewTextBoxColumn Column_sendWireTime;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_pointType;
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.DataGridViewLinkColumn Column_getPosition;
private System.Windows.Forms.DataGridViewLinkColumn Column_MoveTest;
......@@ -1682,14 +1558,17 @@
private System.Windows.Forms.DataGridViewLinkColumn Column_Del;
private System.Windows.Forms.DataGridViewImageColumn Column_Up;
private System.Windows.Forms.DataGridViewImageColumn Column_Down;
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.Label lblRobotRZ;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label lblRobotRY;
private System.Windows.Forms.Label lblRobotRX;
private System.Windows.Forms.Label label16;
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;
}
}
\ No newline at end of file
......@@ -90,15 +90,15 @@ namespace URSoldering.Client
LogUtil.error("进入焊接界面,发现WeldRobotBean自动运行中,关闭自动运行");
WeldRobotBean.StopRun();
}
if (EpsonDevice.IsRun)
if (URRobotControl.IsRun)
{
EpsonDevice.FreeAxis();
URRobotControl.FreeAxis();
isConnect = true;
btnChange.Text = "切换到自动模式(&M)(当前手动)";
RobotStatus(true);
System.Threading.Thread.Sleep(100);
EpsonDevice.GetPosition(AfterGet);
UpdateRobotPosition();
}
else
{
......@@ -135,8 +135,7 @@ namespace URSoldering.Client
{
btnSendWire.Enabled = false ;
btnStopSend.Enabled = false ;
}
loadHand();
}
if (!ConfigAppSettings.GetBoolValue(Setting_Init.ISDebug))
{
UsbCameraHDevelop.OpenCamera(VideoCameraName);
......@@ -144,6 +143,18 @@ namespace URSoldering.Client
usbTimer.Enabled = 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 dHeight = 0;
private string VideoCameraName = ConfigAppSettings.GetValue(Setting_Init.VideoCameraName);
......@@ -177,60 +188,12 @@ namespace URSoldering.Client
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)
{
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;
picXDel.Enabled = isConnect;
picYAdd.Enabled = isConnect;
......@@ -277,27 +240,28 @@ namespace URSoldering.Client
}
view.Cells[0].Value = point.pointNum.ToString();
view.Cells[1].Value = point.pointName;
view.Cells[2].Value = point.PositionX.ToString();
view.Cells[3].Value = point.PositionY.ToString();
view.Cells[4].Value = point.PositionZ.ToString();
view.Cells[5].Value = point.PositionU.ToString();
view.Cells[6].Value = point.preheatTemperature.ToString();
view.Cells[7].Value = point.preheatTemperatureMax.ToString();
view.Cells[8].Value = point.preheatTemperatureMin.ToString();
view.Cells[9].Value = point.preheatTime.ToString();
view.Cells[10].Value = point.weldTemperature.ToString();
view.Cells[11].Value = point.weldTemperatureMax.ToString();
view.Cells[12].Value = point.weldTemperatureMin.ToString();
view.Cells[13].Value = point.weldTime.ToString();
view.Cells[14].Value = point.startSendWireSpeed.ToString();
view.Cells[15].Value = point.startSendWireTime.ToString();
view.Cells[16].Value = point.sendWireSpeed.ToString();
view.Cells[17].Value = point.sendWireTime.ToString();
view.Cells[18].Value = point.pointType.ToString();
view.Cells[19].Value = point.isNeedClear.ToString();
view.Cells[20].Value = point.HandDirection;
view.Cells[21].Value = point.ClearTime;
view.Cells[2].Value = point.RobotX.ToString();
view.Cells[3].Value = point.RoobtY.ToString();
view.Cells[4].Value = point.RobotZ.ToString();
view.Cells[5].Value = point.RobotRX.ToString();
view.Cells[6].Value = point.RobotRY.ToString();
view.Cells[7].Value = point.RobotRZ.ToString();
view.Cells[8].Value = point.preheatTemperature.ToString();
view.Cells[9].Value = point.preheatTemperatureMax.ToString();
view.Cells[10].Value = point.preheatTemperatureMin.ToString();
view.Cells[11].Value = point.preheatTime.ToString();
view.Cells[12].Value = point.weldTemperature.ToString();
view.Cells[13].Value = point.weldTemperatureMax.ToString();
view.Cells[14].Value = point.weldTemperatureMin.ToString();
view.Cells[15].Value = point.weldTime.ToString();
view.Cells[16].Value = point.startSendWireSpeed.ToString();
view.Cells[17].Value = point.startSendWireTime.ToString();
view.Cells[18].Value = point.sendWireSpeed.ToString();
view.Cells[19].Value = point.sendWireTime.ToString();
view.Cells[20].Value = point.pointType.ToString();
view.Cells[21].Value = point.isNeedClear.ToString();
view.Cells[22].Value = point.ClearTime;
return view;
}
private bool isRun = false;
......@@ -336,18 +300,18 @@ namespace URSoldering.Client
//this.btnWDown.Enabled = true;
this.btnWUp.Enabled = true;
}
if (!EpsonDevice.IsRun&&isRun.Equals(false))
if (!URRobotControl.IsRun&&isRun.Equals(false))
{
Task.Factory.StartNew(delegate ()
{
string result = EpsonDevice.Start();
string result = URRobotControl.Start();
if (result != "")
{
LogUtil.info("连接失败:" + result);
}
else
{
EpsonDevice.FreeAxis();
URRobotControl.FreeAxis();
isAuto = false;
}
});
......@@ -356,8 +320,8 @@ namespace URSoldering.Client
}
else
{
//EpsonControl.FreeAxis();
EpsonDevice.GetPosition(AfterGet);
EpsonControl.FreeAxis();
UpdateRobotPosition();
}
}
}
......@@ -372,7 +336,7 @@ namespace URSoldering.Client
e.Cancel = true;
}
}
EpsonDevice.LockAxis();
URRobotControl.LockAxis();
//timer2.Stop();
timer1.Stop();
UsbCameraHDevelop.CloseAllCamera();
......@@ -380,18 +344,14 @@ namespace URSoldering.Client
private void btnSavePoint_Click(object sender, EventArgs e)
{
double x = FormUtil.getDoubleValue(txtRobotX);
double y = FormUtil.getDoubleValue(txtRobotY);
double u = FormUtil.getDoubleValue(txtRobotU);
double z = FormUtil.getDoubleValue(txtRobotZ);
int hand =GetHand();
URPointValue point = GetCurrRobotPoint();
//判断原点的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;
}
AddNewPoint(x, y, u, z, hand);
AddNewPoint(point);
liUpdateTime_LinkClicked(null, null);
}
......@@ -474,7 +434,26 @@ namespace URSoldering.Client
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>
......@@ -485,35 +464,34 @@ namespace URSoldering.Client
{
MessageBox.Show("请先切换到自动模式!");
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)
{
int x_colIndex = dgvList.Columns[this.Column_X.Name].Index;
int y_colIndex = dgvList.Columns[Column_Y.Name].Index;
int u_colIndex = dgvList.Columns[this.Column_U.Name].Index;
int y_colIndex = dgvList.Columns[Column_Y.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_Y.Name].Value = txtRobotY.Text.ToString();
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_HandDirection.Name].Value =GetHand();
dgvList.Rows[rowIndex].Cells[this.Column_RX.Name].Value = lblRobotRX.Text.ToString();
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(y_colIndex, rowIndex);
dgvList.UpdateCellValue(u_colIndex, rowIndex);
dgvList.UpdateCellValue(y_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)
......@@ -744,10 +722,12 @@ namespace URSoldering.Client
point.pointName = row.Cells[Column_Name.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.PositionY = Convert.ToDouble(row.Cells[this.Column_Y.Name].Value.ToString());
point.PositionU = Convert.ToDouble(row.Cells[this.Column_U.Name].Value.ToString());
point.PositionZ = Convert.ToDouble(row.Cells[this.Column_Z.Name].Value.ToString());
point.RobotX = Convert.ToDouble(row.Cells[this.Column_X.Name].Value.ToString());
point.RoobtY = Convert.ToDouble(row.Cells[this.Column_Y.Name].Value.ToString());
point.RobotZ = 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.weldTime = Convert.ToDouble(row.Cells[this.Column_weldTime.Name].Value.ToString());
......@@ -764,8 +744,7 @@ namespace URSoldering.Client
point.weldTemperatureMax = Convert.ToInt32(row.Cells[this.Column_weldTemperatureMax.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.pointType = Convert.ToInt32(row.Cells[this.Column_pointType.Name].Value.ToString());
point.HandDirection = Convert.ToInt32(row.Cells[this.Column_HandDirection.Name].Value);
point.pointType = Convert.ToInt32(row.Cells[this.Column_pointType.Name].Value.ToString());
point.ClearTime=Convert.ToInt32(row.Cells[this.Column_ClearTime.Name].Value.ToString());
}
catch (Exception ex)
......@@ -785,7 +764,7 @@ namespace URSoldering.Client
{
if (isAuto)
{
EpsonDevice.FreeAxis();
URRobotControl.FreeAxis();
isAuto = false;
btnChange.Text = "切换到自动模式(&M)(当前手动)";
//timer1.Enabled = true;
......@@ -798,7 +777,7 @@ namespace URSoldering.Client
result = MessageBox.Show("切换为自动模式之前,请确保所有人员远离机器人!", "提示", MessageBoxButtons.OKCancel);
if (result.Equals(DialogResult.OK))
{
EpsonDevice.LockAxis();
URRobotControl.LockAxis();
isAuto = true;
btnChange.Text = "切换到手动模式(&M)(当前自动)";
//timer1.Enabled = false;
......@@ -809,7 +788,7 @@ namespace URSoldering.Client
private void btnRead_Click(object sender, EventArgs e)
{
EpsonDevice.GetPosition(AfterGet);
//URRobotControl.GetPosition(AfterGet);
}
protected override void OnVisibleChanged(EventArgs e)
......@@ -930,10 +909,10 @@ namespace URSoldering.Client
int index = 0;
foreach (WeldPointInfo weld in pointList)
{
float x = (float)Math.Abs(weld.PositionX - orgX) * imageXiShu;
float y = (float)Math.Abs(weld.PositionY - orgY) * imageXiShu;
float x = (float)Math.Abs(weld.RobotX - orgX) * 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);
//if (index > 0)
//{
......@@ -1076,16 +1055,12 @@ namespace URSoldering.Client
return;
}
RobotBean.KNDIOMove(IO_Type.SendWire_Down, IO_VALUE.LOW);
RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.HIGH);
double x = WeldRobotBean.EpsonOrgX;
double y = WeldRobotBean.EpsonOrgY;
double z = WeldRobotBean.EpsonOrgZ;
double u = WeldRobotBean.EpsonOrgU;
int hand = WeldRobotBean.EpsonOrgHandDir;
if (x != 0 && y != 0 && z != 0 && u != 0)
RobotBean.KNDIOMove(IO_Type.SendWire_Up, IO_VALUE.HIGH);
URPointValue point = WeldRobotBean.HomePoint;
if (point.X != 0 && point.Y != 0 && point.Z!=0)
{
EpsonDevice.MoveTo(x, y, z, u, false, hand,AfterMove);
URRobotControl.MoveTo(point);
}
else
{
......@@ -1095,22 +1070,19 @@ namespace URSoldering.Client
private void btnSaveHome_Click(object sender, EventArgs e)
{
double orgx = FormUtil.getDoubleValue(txtRobotX);
double orgy = FormUtil.getDoubleValue(txtRobotY);
double orgu = FormUtil.getDoubleValue(txtRobotU);
double orgz = FormUtil.getDoubleValue(txtRobotZ);
URPointValue point = GetCurrRobotPoint();
//判断原点的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;
}
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))
{
WeldRobotBean.UpdateOrgPoint(orgx, orgy, orgu, orgz, hand);
WeldRobotBean.UpdateOrgPoint(point);
MessageBox.Show("保存原点成功!");
}
}
......@@ -1150,77 +1122,61 @@ namespace URSoldering.Client
{
MessageBox.Show("请点击要保存的焊点");
return;
}
}
double x = 0;
double y = 0;
GetPicPoint(out x, out y);
LogUtil.info("新增焊点:X【" + m_MouseDownPoint.X + "】Y【" + m_MouseDownPoint.Y + "】,坐标X【" + x + "】坐标Y【" + y + "】");
double u = FormUtil.getDoubleValue(txtRobotU);
LogUtil.info("新增焊点:X【" + m_MouseDownPoint.X + "】Y【" + m_MouseDownPoint.Y + "】,坐标X【" + x + "】坐标Y【" + y + "】");
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轴
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;
}
AddNewPoint(x, y, u, z, hand);
AddNewPoint(point);
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);
FrmWeldPointInfo fwpi = new FrmWeldPointInfo(name,x,y,u,z,hand);
FrmWeldPointInfo fwpi = new FrmWeldPointInfo(name,robotP);
DialogResult result = fwpi.ShowDialog();
if (result.Equals(DialogResult.OK))
{
weldPointInfo = fwpi.weldPointInfo;
point = fwpi.weldPointInfo;
DataGridViewRow view = new DataGridViewRow();
view.CreateCells(dgvList);
view.Cells[0].Value = dgvList.Rows.Count.ToString();
view.Cells[1].Value = weldPointInfo.pointName;
//view.Cells[2].Value = x.ToString();
//view.Cells[3].Value = y.ToString();
//view.Cells[4].Value = z;
//view.Cells[5].Value = u;
view.Cells[2].Value = weldPointInfo.PositionX.ToString();
view.Cells[3].Value = weldPointInfo.PositionY.ToString();
view.Cells[4].Value = weldPointInfo.PositionZ;
view.Cells[5].Value = weldPointInfo.PositionU;
view.Cells[6].Value = weldPointInfo.preheatTemperature;
view.Cells[7].Value = weldPointInfo.preheatTemperatureMax;
view.Cells[8].Value = weldPointInfo.preheatTemperatureMin;
view.Cells[9].Value = weldPointInfo.preheatTime;
view.Cells[10].Value = weldPointInfo.weldTemperature;
view.Cells[11].Value = weldPointInfo.weldTemperatureMax;
view.Cells[12].Value = weldPointInfo.weldTemperatureMin;
view.Cells[13].Value = weldPointInfo.weldTime;
view.Cells[14].Value = weldPointInfo.startSendWireSpeed;
view.Cells[15].Value = weldPointInfo.startSendWireTime;
view.Cells[16].Value = weldPointInfo.sendWireSpeed;
view.Cells[17].Value = weldPointInfo.sendWireTime;
view.Cells[18].Value = weldPointInfo.pointType;
view.Cells[19].Value = weldPointInfo.isNeedClear;
view.Cells[20].Value = weldPointInfo.HandDirection;
view.Cells[21].Value = weldPointInfo.ClearTime;
view.Cells[0].Value = point.pointNum.ToString();
view.Cells[1].Value = point.pointName;
view.Cells[2].Value = point.RobotX.ToString();
view.Cells[3].Value = point.RoobtY.ToString();
view.Cells[4].Value = point.RobotZ.ToString();
view.Cells[5].Value = point.RobotRX.ToString();
view.Cells[6].Value = point.RobotRY.ToString();
view.Cells[7].Value = point.RobotRZ.ToString();
view.Cells[8].Value = point.preheatTemperature.ToString();
view.Cells[9].Value = point.preheatTemperatureMax.ToString();
view.Cells[10].Value = point.preheatTemperatureMin.ToString();
view.Cells[11].Value = point.preheatTime.ToString();
view.Cells[12].Value = point.weldTemperature.ToString();
view.Cells[13].Value = point.weldTemperatureMax.ToString();
view.Cells[14].Value = point.weldTemperatureMin.ToString();
view.Cells[15].Value = point.weldTime.ToString();
view.Cells[16].Value = point.startSendWireSpeed.ToString();
view.Cells[17].Value = point.startSendWireTime.ToString();
view.Cells[18].Value = point.sendWireSpeed.ToString();
view.Cells[19].Value = point.sendWireTime.ToString();
view.Cells[20].Value = point.pointType.ToString();
view.Cells[21].Value = point.isNeedClear.ToString();
view.Cells[22].Value = point.ClearTime;
dgvList.Rows.Add(view);
if (isFinishLoad && this.txtBoardLength.Text.Trim() != "" && this.txtBoardWidth.Text.Trim() != "")
......@@ -1260,30 +1216,30 @@ namespace URSoldering.Client
private void 移动到此处ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (m_MouseDownPoint == null || m_MouseDownPoint.X == 0 || m_MouseDownPoint.Y == 0)
{
MessageBox.Show("请选择要移动的位置");
return;
}
if (isAuto == false)
{
MessageBox.Show("请先切换到自动模式!");
return;
}
//if (m_MouseDownPoint == null || m_MouseDownPoint.X == 0 || m_MouseDownPoint.Y == 0)
//{
// MessageBox.Show("请选择要移动的位置");
// return;
//}
//if (isAuto == false)
//{
// MessageBox.Show("请先切换到自动模式!");
// return;
//}
double x = 0;
double y = 0;
GetPicPoint(out x, out 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);
int hand =GetHand();
//double x = 0;
//double y = 0;
//GetPicPoint(out x, out 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);
//int hand =GetHand();
EpsonDevice.MoveTo(x, y, z, u, isfast, hand,AfterMove);
//URRobotControl.MoveTo(x, y, z, u, isfast, hand,AfterMove);
}
private void btnXAdd_Click(object sender, EventArgs e)
{
if (isAuto == false)
......@@ -1291,13 +1247,9 @@ namespace URSoldering.Client
MessageBox.Show("请先切换到自动模式!");
return;
}
double x = FormUtil.getDoubleValue(txtRobotX);
double y = FormUtil.getDoubleValue(txtRobotY);
double u = FormUtil.getDoubleValue(txtRobotU);
double z = FormUtil.getDoubleValue(txtRobotZ);
int hand =GetHand();
y+=StepValue;
EpsonDevice.MoveTo(x, y, z, u, isfast, hand,AfterMove);
URPointValue point = GetCurrRobotPoint();
point.Y += StepValue;
URRobotControl.MoveTo(point);
}
......@@ -1308,13 +1260,9 @@ namespace URSoldering.Client
MessageBox.Show("请先切换到自动模式!");
return;
}
double x = FormUtil.getDoubleValue(txtRobotX);
double y = FormUtil.getDoubleValue(txtRobotY);
double u = FormUtil.getDoubleValue(txtRobotU);
double z = FormUtil.getDoubleValue(txtRobotZ);
int hand =GetHand();
y-=StepValue;
EpsonDevice.MoveTo(x, y, z, u, isfast, hand,AfterMove);
URPointValue point = GetCurrRobotPoint();
point.Y -= StepValue;
URRobotControl.MoveTo(point);
}
private void btnYDel_Click(object sender, EventArgs e)
......@@ -1324,13 +1272,9 @@ namespace URSoldering.Client
MessageBox.Show("请先切换到自动模式!");
return;
}
double x = FormUtil.getDoubleValue(txtRobotX);
double y = FormUtil.getDoubleValue(txtRobotY);
double u = FormUtil.getDoubleValue(txtRobotU);
double z = FormUtil.getDoubleValue(txtRobotZ);
int hand =GetHand();
x-=StepValue;
EpsonDevice.MoveTo(x, y, z, u, isfast, hand,AfterMove);
URPointValue point = GetCurrRobotPoint();
point.X -= StepValue;
URRobotControl.MoveTo(point);
}
private void btnYAdd_Click(object sender, EventArgs e)
......@@ -1340,13 +1284,9 @@ namespace URSoldering.Client
MessageBox.Show("请先切换到自动模式!");
return;
}
double x = FormUtil.getDoubleValue(txtRobotX);
double y = FormUtil.getDoubleValue(txtRobotY);
double u = FormUtil.getDoubleValue(txtRobotU);
double z = FormUtil.getDoubleValue(txtRobotZ);
int hand =GetHand();
x+=StepValue;
EpsonDevice.MoveTo(x, y, z, u, isfast, hand,AfterMove);
URPointValue point = GetCurrRobotPoint();
point.X += StepValue;
URRobotControl.MoveTo(point);
}
private void btnZAdd_Click(object sender, EventArgs e)
......@@ -1356,13 +1296,9 @@ namespace URSoldering.Client
MessageBox.Show("请先切换到自动模式!");
return;
}
double x = FormUtil.getDoubleValue(txtRobotX);
double y = FormUtil.getDoubleValue(txtRobotY);
double u = FormUtil.getDoubleValue(txtRobotU);
double z = FormUtil.getDoubleValue(txtRobotZ);
int hand =GetHand();
z+=StepValue;
EpsonDevice.MoveTo(x, y, z, u, isfast, hand,AfterMove);
URPointValue point = GetCurrRobotPoint();
point.Z += StepValue;
URRobotControl.MoveTo(point);
}
private void btnZDel_Click(object sender, EventArgs e)
......@@ -1372,45 +1308,41 @@ namespace URSoldering.Client
MessageBox.Show("请先切换到自动模式!");
return;
}
double x = FormUtil.getDoubleValue(txtRobotX);
double y = FormUtil.getDoubleValue(txtRobotY);
double u = FormUtil.getDoubleValue(txtRobotU);
double z = FormUtil.getDoubleValue(txtRobotZ);
int hand =GetHand();
z-=StepValue;
EpsonDevice.MoveTo(x, y, z, u, isfast, hand,AfterMove);
URPointValue point = GetCurrRobotPoint();
point.Z -= StepValue;
URRobotControl.MoveTo(point);
}
private void btnUAdd_Click(object sender, EventArgs e)
{
if (isAuto == false)
{
MessageBox.Show("请先切换到自动模式!");
return;
}
double x = FormUtil.getDoubleValue(txtRobotX);
double y = FormUtil.getDoubleValue(txtRobotY);
double u = FormUtil.getDoubleValue(txtRobotU);
double z = FormUtil.getDoubleValue(txtRobotZ);
int hand =GetHand();
u+=StepValue;
EpsonDevice.MoveTo(x, y, z, u, isfast, hand,AfterMove);
//if (isAuto == false)
//{
// MessageBox.Show("请先切换到自动模式!");
// return;
//}
//double x = FormUtil.getDoubleValue(txtRobotX);
//double y = FormUtil.getDoubleValue(txtRobotY);
//double u = FormUtil.getDoubleValue(txtRobotU);
//double z = FormUtil.getDoubleValue(txtRobotZ);
//int hand =GetHand();
//u+=StepValue;
//URRobotControl.MoveTo(x, y, z, u, isfast, hand,AfterMove);
}
private void btnUDel_Click(object sender, EventArgs e)
{
if (isAuto == false)
{
MessageBox.Show("请先切换到自动模式!");
return;
}
double x = FormUtil.getDoubleValue(txtRobotX);
double y = FormUtil.getDoubleValue(txtRobotY);
double u = FormUtil.getDoubleValue(txtRobotU);
double z = FormUtil.getDoubleValue(txtRobotZ);
int hand =GetHand();
u-=StepValue;
EpsonDevice.MoveTo(x, y, z, u, isfast, hand,AfterMove);
//if (isAuto == false)
//{
// MessageBox.Show("请先切换到自动模式!");
// return;
//}
//double x = FormUtil.getDoubleValue(txtRobotX);
//double y = FormUtil.getDoubleValue(txtRobotY);
//double u = FormUtil.getDoubleValue(txtRobotU);
//double z = FormUtil.getDoubleValue(txtRobotZ);
//int hand =GetHand();
//u-=StepValue;
//URRobotControl.MoveTo(x, y, z, u, isfast, hand,AfterMove);
}
private void dgvList_DragEnter(object sender, DragEventArgs e)
......@@ -1464,8 +1396,7 @@ namespace URSoldering.Client
{
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))
return i;
}
......@@ -1613,44 +1544,35 @@ namespace URSoldering.Client
private void btnSetClear1_Click(object sender, EventArgs e)
{
double clearx = FormUtil.getDoubleValue(txtRobotX);
double cleary = FormUtil.getDoubleValue(txtRobotY);
double clearu = FormUtil.getDoubleValue(txtRobotU);
double clearz = FormUtil.getDoubleValue(txtRobotZ);
URPointValue point = GetCurrRobotPoint();
//判断原点的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;
}
int hand = GetHand();
DialogResult result = MessageBox.Show("是否将当前位置X:" + clearx + ",Y:" + cleary + ",U:" + clearu + ",Z:" + clearz + "," + cmbHand.Text + "保存为清洗点1?", "提示", MessageBoxButtons.YesNo);
}
DialogResult result = MessageBox.Show("是否将当前位置" +point.ToShowStr()+ "保存为清洗点1?", "提示", MessageBoxButtons.YesNo);
if (result.Equals(DialogResult.Yes))
{
WeldRobotBean.UpdateClear1Point(clearx, cleary, clearu, clearz, hand);
WeldRobotBean.UpdateClear1Point(point);
MessageBox.Show("保存清洗点1成功!");
}
}
private void btnSetClear2_Click(object sender, EventArgs e)
{
double clearx = FormUtil.getDoubleValue(txtRobotX);
double cleary = FormUtil.getDoubleValue(txtRobotY);
double clearu = FormUtil.getDoubleValue(txtRobotU);
double clearz = FormUtil.getDoubleValue(txtRobotZ);
URPointValue point = GetCurrRobotPoint();
//判断原点的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;
}
int hand = GetHand();
DialogResult result = MessageBox.Show("是否将当前位置X:" + clearx + ",Y:" + cleary + ",U:" + clearu + ",Z:" + clearz + "," + cmbHand.Text + "保存为清洗点2?", "提示", MessageBoxButtons.YesNo);
DialogResult result = MessageBox.Show("是否将当前位置" + point.ToShowStr() + "保存为清洗点2?", "提示", MessageBoxButtons.YesNo);
if (result.Equals(DialogResult.Yes))
{
WeldRobotBean.UpdateClear2Point(clearx, cleary, clearu, clearz, hand);
WeldRobotBean.UpdateClear2Point(point);
MessageBox.Show("保存清洗点2成功!");
}
}
......@@ -1698,32 +1620,13 @@ namespace URSoldering.Client
RobotBean.KNDIOMove(IO_Type.StopCylinder_Down, IO_VALUE.LOW);
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)
{
if (dgvList.SelectedRows != null && dgvList.SelectedRows.Count > 0)
{
MoveTest(dgvList.SelectedRows[0].Index);
}
}
}
}
}
......@@ -478,6 +478,26 @@
<metadata name="contextMenuStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>611, 17</value>
</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">
<value>True</value>
</metadata>
......@@ -493,7 +513,13 @@
<metadata name="Column_Z.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</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>
</metadata>
<metadata name="Column_preheatTemperature.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
......@@ -538,9 +564,6 @@
<metadata name="Column_isClear.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</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">
<value>True</value>
</metadata>
......@@ -582,26 +605,6 @@
AeLDoohrNFdzAAAAAElFTkSuQmCC
</value>
</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">
<value>35</value>
</metadata>
......
......@@ -226,9 +226,9 @@ namespace URSoldering.Client
int index = 0;
foreach (WeldPointInfo weld in pointList)
{
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;
g.FillEllipse(Brushes.Red, x - pointHight / 2, y - pointHight / 2, pointHight, pointHight);
//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;
//g.FillEllipse(Brushes.Red, x - pointHight / 2, y - pointHight / 2, pointHight, pointHight);
//if (index > 0)
//{
// Pen p = new Pen(Color.Red, 2);
......
......@@ -30,23 +30,23 @@ namespace URSoldering.Client
private void btnWelding_Click(object sender, EventArgs e)
{
//if (BoardManager.CurrBoard == null)
//{
// if (BoardManager.boardList.Count > 0)
// {
// BoardManager.UpdateCurrBoard(BoardManager.boardList[0].boardId);
// }
// else
// {
// MessageBox.Show("请先配置程序");
// return;
// }
//}
//isClick = true;
//FrmWork fw = new FrmWork();
//this.Visible = false; ;
//fw.ShowDialog();
//this.Visible = true;
if (BoardManager.CurrBoard == null)
{
if (BoardManager.boardList.Count > 0)
{
BoardManager.UpdateCurrBoard(BoardManager.boardList[0].boardId);
}
else
{
MessageBox.Show("请先配置程序");
return;
}
}
isClick = true;
FrmWork fw = new FrmWork();
this.Visible = false; ;
fw.ShowDialog();
this.Visible = true;
}
private void btnProduct_Click(object sender, EventArgs e)
......@@ -109,11 +109,11 @@ namespace URSoldering.Client
private void btnAutoEdit_Click(object sender, EventArgs e)
{
isClick = true;
FrmAutoAddBoard info = new FrmAutoAddBoard(null);
this.Visible = false;
info.ShowDialog();
this.Visible = true;
//isClick = true;
//FrmAutoAddBoard info = new FrmAutoAddBoard(null);
//this.Visible = false;
//info.ShowDialog();
//this.Visible = true;
}
private void btnStart_Click(object sender, EventArgs e)
......
......@@ -31,29 +31,20 @@
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmOrgConfig));
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.btnMore = new System.Windows.Forms.Button();
this.btnBack = new System.Windows.Forms.Button();
this.btnSetClear2 = new System.Windows.Forms.Button();
this.btnSetClear1 = new System.Windows.Forms.Button();
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.btnSaveHome = new System.Windows.Forms.Button();
this.btnSStop = new System.Windows.Forms.Button();
this.btnWStop = new System.Windows.Forms.Button();
this.label14 = new System.Windows.Forms.Label();
this.dataGridViewImageColumn1 = new System.Windows.Forms.DataGridViewImageColumn();
this.dataGridViewImageColumn2 = new System.Windows.Forms.DataGridViewImageColumn();
this.urRobotSControl1 = new UserFromControl.URRobotSControl();
this.panel1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
......@@ -63,6 +54,22 @@
this.timer2.Interval = 1000;
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
//
this.panel1.AutoScroll = true;
......@@ -76,13 +83,13 @@
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
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;
//
// btnMore
//
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.Size = new System.Drawing.Size(159, 38);
this.btnMore.TabIndex = 261;
......@@ -93,7 +100,7 @@
// btnBack
//
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.Size = new System.Drawing.Size(159, 38);
this.btnBack.TabIndex = 260;
......@@ -125,16 +132,7 @@
//
// groupBox2
//
this.groupBox2.Controls.Add(this.cmbHand);
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.Controls.Add(this.urRobotSControl1);
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.Name = "groupBox2";
......@@ -143,99 +141,6 @@
this.groupBox2.TabStop = false;
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
//
this.btnSetOrigin.FlatAppearance.BorderSize = 0;
......@@ -292,27 +197,18 @@
this.label14.Text = "条形码";
this.label14.Visible = false;
//
// dataGridViewImageColumn1
// urRobotSControl1
//
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;
this.urRobotSControl1.Location = new System.Drawing.Point(7, 28);
this.urRobotSControl1.Name = "urRobotSControl1";
this.urRobotSControl1.Size = new System.Drawing.Size(228, 146);
this.urRobotSControl1.TabIndex = 0;
//
// FrmOrgConfig
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
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.btnSStop);
this.Controls.Add(this.btnWStop);
......@@ -323,7 +219,6 @@
this.Load += new System.EventHandler(this.FrmBoardInfo_Load);
this.panel1.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
......@@ -343,17 +238,8 @@
private System.Windows.Forms.Button btnSetClear2;
private System.Windows.Forms.Button btnSetClear1;
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 btnMore;
private UserFromControl.URRobotSControl urRobotSControl1;
}
}
\ No newline at end of file
......@@ -35,7 +35,7 @@ namespace URSoldering.Client
InitializeComponent();
}
private System.Timers.Timer timer1 = new System.Timers.Timer();
private void FrmBoardInfo_Load(object sender, EventArgs e)
{
CheckForIllegalCrossThreadCalls = false;
......@@ -48,16 +48,14 @@ namespace URSoldering.Client
LogUtil.error("进入焊接界面,发现WeldRobotBean自动运行中,关闭自动运行");
WeldRobotBean.StopRun();
}
if (EpsonDevice.IsRun)
if (URRobotControl.IsRun)
{
EpsonDevice.FreeAxis();
EpsonDevice.GetPosition(AfterGet);
URRobotControl.FreeAxis();
URPointValue lastP = URRobotControl.GetLastPosition();
urRobotSControl1.ShowPoint(lastP);
}
else
{
//btnChange.Text = "机器人连接中。。。";
RobotStatus(false);
{
}
isAuto = false;
......@@ -65,61 +63,23 @@ namespace URSoldering.Client
timer1.AutoReset = true;
timer1.Elapsed += timer_Elapsed;
timer1.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)
{
}
timer2.Start();
}
private bool isRun = false;
private void timer_Elapsed(object sender, EventArgs e)
{
if (!EpsonDevice.IsRun && isRun.Equals(false))
if (!URRobotControl.IsRun && isRun.Equals(false))
{
Task.Factory.StartNew(delegate ()
{
string result = EpsonDevice.Start();
string result = URRobotControl.Start();
if (result != "")
{
LogUtil.info("连接失败:" + result);
}
else
{
EpsonDevice.FreeAxis();
URRobotControl.FreeAxis();
isAuto = false;
}
});
......@@ -128,14 +88,14 @@ namespace URSoldering.Client
}
else
{
//EpsonControl.FreeAxis();
EpsonDevice.GetPosition(AfterGet);
URPointValue lastP = URRobotControl.GetLastPosition();
urRobotSControl1.ShowPoint(lastP);
}
}
private void FrmBoardInfo_FormClosing(object sender, FormClosingEventArgs e)
{
EpsonDevice.LockAxis();
URRobotControl.LockAxis();
timer2.Stop();
timer1.Stop();
UsbCameraHDevelop.CloseAllCamera();
......@@ -143,12 +103,12 @@ namespace URSoldering.Client
private void btnRead_Click(object sender, EventArgs e)
{
EpsonDevice.GetPosition(AfterGet);
URPointValue lastP = URRobotControl.GetLastPosition();
}
private void timer2_Tick(object sender, EventArgs e)
{
if (EpsonDevice.IsRun)
if (URRobotControl.IsRun)
{
}
......@@ -164,14 +124,11 @@ namespace URSoldering.Client
private void btnSetOrigin_Click(object sender, EventArgs e)
{
saveOriginInfo();
URPointValue point = GetCurrRobotPoint();
ConfigAppSettings.SaveValue(Setting_Init.BOARD_ORIGIN_X, point.X.ToString());
ConfigAppSettings.SaveValue(Setting_Init.BOARD_ORIGIN_Y, point.Y.ToString());
}
private void saveOriginInfo()
{
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)
{
if (isAuto == false)
......@@ -180,99 +137,61 @@ namespace URSoldering.Client
return;
}
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;
double y = WeldRobotBean.EpsonOrgY;
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("原点坐标无效!");
}
URPointValue point = WeldRobotBean.HomePoint;
URRobotControl.MoveTo(point);
}
private void btnSaveHome_Click(object sender, EventArgs e)
{
double orgx = FormUtil.getDoubleValue(txtRobotX);
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;
}
URPointValue point = GetCurrRobotPoint();
int hand =GetHand();
DialogResult result = MessageBox.Show("是否将当前位置X:" + orgx + ",Y:" + orgy + ",U:" + orgu + ",Z:" + orgz + "," + cmbHand.Text + "保存为原点?", "提示", MessageBoxButtons.YesNo);
DialogResult result = ShowConfire(point, "原点");
if (result.Equals(DialogResult.Yes))
{
WeldRobotBean.UpdateOrgPoint(orgx, orgy, orgu, orgz, hand);
WeldRobotBean.UpdateOrgPoint(point);
MessageBox.Show("保存原点成功!");
}
}
}
private int GetHand()
private URPointValue GetCurrRobotPoint()
{
if (cmbHand.SelectedIndex >= 0)
{
return cmbHand.SelectedIndex + 1;
}
else
{
return 0;
}
return urRobotSControl1.GetPoint();
}
private void btnSetClear1_Click(object sender, EventArgs e)
{
double clearx = FormUtil.getDoubleValue(txtRobotX);
double cleary = FormUtil.getDoubleValue(txtRobotY);
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);
URPointValue point = GetCurrRobotPoint();
DialogResult result = ShowConfire(point, "清洗点1");
if (result.Equals(DialogResult.Yes))
{
WeldRobotBean.UpdateClear1Point(clearx, cleary, clearu, clearz, hand);
WeldRobotBean.UpdateClear1Point(point);
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轴
if (clearz > EpsonDevice.Robot_LIM_Z)
if (point.Z > URRobotControl.Robot_LIM_Z)
{
MessageBox.Show("保存失败,清洗点2的Z坐标(" + clearz + ")不能高于最高Z点(" + EpsonDevice.Robot_LIM_Z + ")");
return;
MessageBox.Show("保存失败,"+ strMsg + "的Z坐标(" + point.Z + ")不能高于最高Z点(" + URRobotControl.Robot_LIM_Z + ")");
return DialogResult.Cancel;
}
int hand = GetHand();
DialogResult result = MessageBox.Show("是否将当前位置X:" + clearx + ",Y:" + cleary + ",U:" + clearu + ",Z:" + clearz + "," + cmbHand.Text + "保存为清洗点2?", "提示", MessageBoxButtons.YesNo);
DialogResult result = MessageBox.Show("是否将当前位置:" + point.ToShowStr() + "保存为" + strMsg + "?", "提示", MessageBoxButtons.YesNo);
return result;
}
private void btnSetClear2_Click(object sender, EventArgs e)
{
URPointValue point = GetCurrRobotPoint();
DialogResult result = ShowConfire(point, "清洗点2");
if (result.Equals(DialogResult.Yes))
{
WeldRobotBean.UpdateClear2Point(clearx, cleary, clearu, clearz, hand);
WeldRobotBean.UpdateClear2Point(point);
MessageBox.Show("保存清洗点2成功!");
}
}
......
......@@ -29,27 +29,9 @@
private void InitializeComponent()
{
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.cmbClearHand2 = new System.Windows.Forms.ComboBox();
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.clear2Control = new UserFromControl.URRobotMControl();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.cmbClearHand1 = new System.Windows.Forms.ComboBox();
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.clear1Control = new UserFromControl.URRobotMControl();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.label17 = new System.Windows.Forms.Label();
this.label18 = new System.Windows.Forms.Label();
......@@ -58,16 +40,7 @@
this.lblWirdFeedingTime = new System.Windows.Forms.Label();
this.txtsendWireTime = new System.Windows.Forms.TextBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.cmbOrgHand = new System.Windows.Forms.ComboBox();
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.homeControl = new UserFromControl.URRobotMControl();
this.btnClose = new System.Windows.Forms.Button();
this.btnSaveSetting = new System.Windows.Forms.Button();
this.gbEpsonSetting = new System.Windows.Forms.GroupBox();
......@@ -81,22 +54,8 @@
this.lblOriginX = new System.Windows.Forms.Label();
this.lblBoardID = new System.Windows.Forms.Label();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.label19 = new System.Windows.Forms.Label();
this.label20 = new System.Windows.Forms.Label();
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.maxControl = new UserFromControl.URRobotMControl();
this.minControl = new UserFromControl.URRobotMControl();
this.groupBox3.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox4.SuspendLayout();
......@@ -108,215 +67,41 @@
//
// groupBox3
//
this.groupBox3.Controls.Add(this.cmbClearHand2);
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.Controls.Add(this.clear2Control);
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.Size = new System.Drawing.Size(271, 215);
this.groupBox3.Size = new System.Drawing.Size(199, 265);
this.groupBox3.TabIndex = 40;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "焊接清洗点2配置";
//
// cmbClearHand2
// clear2Control
//
this.cmbClearHand2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbClearHand2.FormattingEnabled = true;
this.cmbClearHand2.Items.AddRange(new object[] {
"自动",
"右臂",
"左臂"});
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坐标:";
this.clear2Control.Location = new System.Drawing.Point(24, 20);
this.clear2Control.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.clear2Control.Name = "clear2Control";
this.clear2Control.Size = new System.Drawing.Size(168, 236);
this.clear2Control.TabIndex = 2;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.cmbClearHand1);
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.Controls.Add(this.clear1Control);
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.Size = new System.Drawing.Size(271, 215);
this.groupBox2.Size = new System.Drawing.Size(199, 265);
this.groupBox2.TabIndex = 12;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "焊接清洗点1配置";
//
// cmbClearHand1
//
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坐标:";
// clear1Control
//
// txtClearY1
//
this.txtClearY1.Location = new System.Drawing.Point(112, 64);
this.txtClearY1.Name = "txtClearY1";
this.txtClearY1.Size = new System.Drawing.Size(118, 23);
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坐标:";
this.clear1Control.Location = new System.Drawing.Point(7, 23);
this.clear1Control.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.clear1Control.Name = "clear1Control";
this.clear1Control.Size = new System.Drawing.Size(168, 236);
this.clear1Control.TabIndex = 0;
//
// groupBox4
//
......@@ -329,7 +114,7 @@
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.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.TabStop = false;
this.groupBox4.Text = "卡丝时反转配置";
......@@ -388,114 +173,27 @@
//
// groupBox1
//
this.groupBox1.Controls.Add(this.cmbOrgHand);
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.Controls.Add(this.homeControl);
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.Size = new System.Drawing.Size(265, 215);
this.groupBox1.Size = new System.Drawing.Size(199, 265);
this.groupBox1.TabIndex = 8;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "机器人待机点配置";
//
// cmbOrgHand
//
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;
// homeControl
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(39, 104);
this.label5.Name = "label5";
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坐标:";
this.homeControl.Location = new System.Drawing.Point(12, 23);
this.homeControl.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.homeControl.Name = "homeControl";
this.homeControl.Size = new System.Drawing.Size(168, 236);
this.homeControl.TabIndex = 1;
//
// btnClose
//
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.Size = new System.Drawing.Size(117, 35);
this.btnClose.TabIndex = 7;
......@@ -506,7 +204,7 @@
// btnSaveSetting
//
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.Size = new System.Drawing.Size(117, 35);
this.btnSaveSetting.TabIndex = 6;
......@@ -521,7 +219,7 @@
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.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.TabStop = false;
this.gbEpsonSetting.Text = "焊接机器人抬起高度";
......@@ -551,9 +249,9 @@
this.gbBoardSetting.Controls.Add(this.lblOriginX);
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.Location = new System.Drawing.Point(22, 9);
this.gbBoardSetting.Location = new System.Drawing.Point(22, 5);
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.TabStop = false;
this.gbBoardSetting.Text = "程序配置";
......@@ -564,7 +262,7 @@
this.cmbBoardList.FormattingEnabled = true;
this.cmbBoardList.Location = new System.Drawing.Point(107, 37);
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;
//
// txtOriginY
......@@ -610,171 +308,37 @@
//
// groupBox5
//
this.groupBox5.Controls.Add(this.label19);
this.groupBox5.Controls.Add(this.label20);
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.Controls.Add(this.maxControl);
this.groupBox5.Controls.Add(this.minControl);
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.Size = new System.Drawing.Size(265, 215);
this.groupBox5.Size = new System.Drawing.Size(414, 260);
this.groupBox5.TabIndex = 42;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "机械臂活动范围";
//
// label19
//
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
// maxControl
//
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(145, 38);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(20, 17);
this.label22.TabIndex = 21;
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;
this.maxControl.Location = new System.Drawing.Point(212, 25);
this.maxControl.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.maxControl.Name = "maxControl";
this.maxControl.Size = new System.Drawing.Size(168, 226);
this.maxControl.TabIndex = 3;
//
// label25
//
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轴:";
// minControl
//
// label26
//
this.label26.AutoSize = true;
this.label26.Location = new System.Drawing.Point(25, 42);
this.label26.Name = "label26";
this.label26.Size = new System.Drawing.Size(40, 17);
this.label26.TabIndex = 9;
this.label26.Text = "X轴:";
this.minControl.Location = new System.Drawing.Point(12, 25);
this.minControl.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.minControl.Name = "minControl";
this.minControl.Size = new System.Drawing.Size(168, 226);
this.minControl.TabIndex = 2;
//
// FrmSolderingSetting
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
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.groupBox3);
this.Controls.Add(this.groupBox2);
......@@ -788,19 +352,15 @@
this.Text = "设备配置";
this.Load += new System.EventHandler(this.FrmRobotSetting_Load);
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.gbEpsonSetting.ResumeLayout(false);
this.gbEpsonSetting.PerformLayout();
this.gbBoardSetting.ResumeLayout(false);
this.gbBoardSetting.PerformLayout();
this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout();
this.ResumeLayout(false);
}
......@@ -817,17 +377,7 @@
private System.Windows.Forms.Label lblOriginX;
private System.Windows.Forms.Button btnClose;
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.Label label7;
private System.Windows.Forms.ComboBox cmbOrgHand;
private System.Windows.Forms.TextBox txtLimZ;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.GroupBox groupBox4;
......@@ -838,43 +388,12 @@
private System.Windows.Forms.Label lblWirdFeedingTime;
private System.Windows.Forms.TextBox txtsendWireTime;
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.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.Label label19;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.TextBox txtZMax;
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;
private UserFromControl.URRobotMControl clear2Control;
private UserFromControl.URRobotMControl clear1Control;
private UserFromControl.URRobotMControl homeControl;
private UserFromControl.URRobotMControl maxControl;
private UserFromControl.URRobotMControl minControl;
}
}
\ No newline at end of file
......@@ -42,39 +42,17 @@ namespace URSoldering.Client
this.txtOriginX.Text = ConfigAppSettings.GetValue(Setting_Init.BOARD_ORIGIN_X);
this.txtOriginY.Text = ConfigAppSettings.GetValue(Setting_Init.BOARD_ORIGIN_Y);
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();
txtsendWireSpeed.Text = ConfigAppSettings.GetValue(Setting_Init.ReverseSendWireSpeed);
txtsendWireTime.Text = ConfigAppSettings.GetValue(Setting_Init.ReverseSendWireTime);
txtClearU1.Text=WeldRobotBean.EpsonClearU1.ToString();
txtClearX1.Text=WeldRobotBean.EpsonClearX1.ToString();
txtClearY1.Text = WeldRobotBean.EpsonClearY1.ToString();
txtClearZ1.Text = WeldRobotBean.EpsonClearZ1.ToString();
this.cmbClearHand1.SelectedIndex = WeldRobotBean.EpsonClearHandDir1;
txtClearU2.Text = WeldRobotBean.EpsonClearU2.ToString();
txtClearX2.Text = WeldRobotBean.EpsonClearX2.ToString();
txtClearY2.Text = WeldRobotBean.EpsonClearY2.ToString();
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();
minControl.ShowPoint(WeldRobotBean.RobotMin);
maxControl.ShowPoint(WeldRobotBean.RobotMax);
txtXMax.Text = WeldRobotBean.EpsonXMax.ToString();
txtYMax.Text = WeldRobotBean.EpsonYMax.ToString();
txtZMax.Text = WeldRobotBean.EpsonZMax.ToString();
txtUMax.Text = WeldRobotBean.EpsonUMax.ToString();
clear2Control.ShowPoint(WeldRobotBean.Clear2Point);
clear1Control.ShowPoint(WeldRobotBean.Clear1Point);
homeControl.ShowPoint(WeldRobotBean.HomePoint);
}
private void saveValue()
......@@ -109,97 +87,70 @@ namespace URSoldering.Client
txtsendWireTime.Focus();
return;
}
int hand = cmbOrgHand.SelectedIndex;
double orgx=FormUtil.getDoubleValue(txtOrgX) ;
double orgy = FormUtil.getDoubleValue(txtOrgY);
double orgu = FormUtil.getDoubleValue(txtOrgU);
double orgz = FormUtil.getDoubleValue(txtOrgZ);
URPointValue homeP = homeControl.GetPoint();
//判断原点的Z轴
if (orgz > limz)
if (homeP.Z > limz)
{
MessageBox.Show("待机点Z坐标不能高于最高Z点!");
txtOrgZ.Focus();
txtOrgZ.SelectAll();
homeControl.Focus();
return;
}
int clearHand1 = this.cmbClearHand1.SelectedIndex;
double clearx1 = FormUtil.getDoubleValue(txtClearX1);
double cleary1 = FormUtil.getDoubleValue(txtClearY1);
double clearu1 = FormUtil.getDoubleValue(txtClearU1);
double clearz1 = FormUtil.getDoubleValue(txtClearZ1);
URPointValue clear1P = clear1Control.GetPoint();
//判断原点的Z轴
if (clearz1 > limz)
if (clear1P.Z > limz)
{
MessageBox.Show("清洗点1的Z坐标不能高于最高Z点!");
txtClearZ1.Focus();
txtClearZ1.SelectAll();
clear1Control.Focus();
return;
}
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);
URPointValue clear2P = clear2Control.GetPoint();
//判断原点的Z轴
if (clearz2 > limz)
if (clear2P.Z > limz)
{
MessageBox.Show("清洗点2的Z坐标不能高于最高Z点!");
txtClearZ2.Focus();
txtClearZ2.SelectAll();
clear2Control.Focus();
return;
}
double XMin = FormUtil.getDoubleValue(txtXMin);
double YMin = FormUtil.getDoubleValue(txtYMin);
double ZMin = FormUtil.getDoubleValue(txtZMin);
double UMin = FormUtil.getDoubleValue(txtUMin);
double XMax = FormUtil.getDoubleValue(txtXMax);
double YMax = FormUtil.getDoubleValue(txtYMax);
double ZMax = FormUtil.getDoubleValue(txtZMax);
double UMax = FormUtil.getDoubleValue(txtUMax);
if (XMin > XMax)
{
MessageBox.Show("请正确输入机械臂X轴范围!");
txtXMin.Focus();
txtXMin.SelectAll();
return;
}
if (YMin > YMax)
{
MessageBox.Show("请正确输入机械臂Y轴范围!");
txtYMin.Focus();
txtYMin.SelectAll();
return;
}
if (ZMin > ZMax)
{
MessageBox.Show("请正确输入机械臂Z轴范围!");
txtZMin.Focus();
txtZMin.SelectAll();
return;
}
if (UMin > UMax)
{
MessageBox.Show("请正确输入机械臂U轴范围!");
txtUMin.Focus();
txtUMin.SelectAll();
return;
}
URPointValue minP = minControl.GetPoint();
URPointValue maxP = maxControl.GetPoint();
//if (XMin > XMax)
//{
// MessageBox.Show("请正确输入机械臂X轴范围!");
// txtXMin.Focus();
// txtXMin.SelectAll();
// return;
//}
//if (YMin > YMax)
//{
// MessageBox.Show("请正确输入机械臂Y轴范围!");
// txtYMin.Focus();
// txtYMin.SelectAll();
// return;
//}
//if (ZMin > ZMax)
//{
// MessageBox.Show("请正确输入机械臂Z轴范围!");
// txtZMin.Focus();
// txtZMin.SelectAll();
// return;
//}
//if (UMin > UMax)
//{
// MessageBox.Show("请正确输入机械臂U轴范围!");
// txtUMin.Focus();
// txtUMin.SelectAll();
// return;
//}
WeldRobotBean.UpdateOrgPoint(homeP);
WeldRobotBean.UpdateClear1Point(clear1P);
WeldRobotBean.UpdateClear2Point(clear2P);
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());
EpsonDevice.Robot_LIM_Z = limz;
......@@ -208,25 +159,11 @@ namespace URSoldering.Client
ConfigAppSettings.SaveValue(Setting_Init.ReverseSendWireSpeed, sendWireSpeed);
ConfigAppSettings.SaveValue(Setting_Init.ReverseSendWireTime, sendWireTime);
WeldRobotBean.EpsonXMin = XMin;
WeldRobotBean.EpsonXMax = XMax;
WeldRobotBean.EpsonYMin = YMin;
WeldRobotBean.EpsonYMax = YMax;
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());
WeldRobotBean.RobotMin = minP;
WeldRobotBean.RobotMax = maxP;
ConfigAppSettings.SaveValue(Setting_Init.Soldering_RobotMin, minP.ToJosonStr());
ConfigAppSettings.SaveValue(Setting_Init.Soldering_RobotMax, maxP.ToJosonStr());
MessageBox.Show("保存成功,需要重启之后才能生效!");
this.Close();
}
......
......@@ -40,17 +40,8 @@
this.txtName = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.urRobot = new UserFromControl.URRobotMControl();
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.gbIron = new System.Windows.Forms.GroupBox();
this.label11 = new System.Windows.Forms.Label();
......@@ -127,7 +118,7 @@
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.txtName);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Location = new System.Drawing.Point(21, 32);
this.groupBox1.Location = new System.Drawing.Point(21, 19);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(475, 119);
this.groupBox1.TabIndex = 59;
......@@ -186,14 +177,11 @@
this.cmbPointType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbPointType.FormattingEnabled = true;
this.cmbPointType.Items.AddRange(new object[] {
"普通焊点",
"左侧焊点",
"右侧焊点"});
"普通焊点"});
this.cmbPointType.Location = new System.Drawing.Point(92, 55);
this.cmbPointType.Name = "cmbPointType";
this.cmbPointType.Size = new System.Drawing.Size(121, 25);
this.cmbPointType.TabIndex = 61;
this.cmbPointType.SelectedIndexChanged += new System.EventHandler(this.cmbPointType_SelectedIndexChanged);
//
// label2
//
......@@ -223,27 +211,25 @@
//
// groupBox2
//
this.groupBox2.Controls.Add(this.urRobot);
this.groupBox2.Controls.Add(this.btnUpdate);
this.groupBox2.Controls.Add(this.cmbHand);
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.Location = new System.Drawing.Point(502, 135);
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.TabStop = false;
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
//
this.btnUpdate.Location = new System.Drawing.Point(35, 240);
this.btnUpdate.Location = new System.Drawing.Point(54, 264);
this.btnUpdate.Name = "btnUpdate";
this.btnUpdate.Size = new System.Drawing.Size(120, 35);
this.btnUpdate.TabIndex = 69;
......@@ -251,99 +237,9 @@
this.btnUpdate.UseVisualStyleBackColor = true;
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
//
this.btnSave.Location = new System.Drawing.Point(540, 44);
this.btnSave.Location = new System.Drawing.Point(540, 31);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(120, 35);
this.btnSave.TabIndex = 57;
......@@ -377,7 +273,7 @@
this.gbIron.Controls.Add(this.lblIronTime);
this.gbIron.Controls.Add(this.txtDweldTemperature);
this.gbIron.Controls.Add(this.txtDweldTime);
this.gbIron.Location = new System.Drawing.Point(21, 157);
this.gbIron.Location = new System.Drawing.Point(21, 139);
this.gbIron.Name = "gbIron";
this.gbIron.Size = new System.Drawing.Size(475, 188);
this.gbIron.TabIndex = 55;
......@@ -602,7 +498,7 @@
//
// 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.Size = new System.Drawing.Size(120, 35);
this.btnCancel.TabIndex = 58;
......@@ -624,7 +520,7 @@
this.gbWireFeeding.Controls.Add(this.lblWirdFeedingTime);
this.gbWireFeeding.Controls.Add(this.txtStartDsendWireSpeed);
this.gbWireFeeding.Controls.Add(this.txtDsendWireTime);
this.gbWireFeeding.Location = new System.Drawing.Point(21, 351);
this.gbWireFeeding.Location = new System.Drawing.Point(21, 329);
this.gbWireFeeding.Name = "gbWireFeeding";
this.gbWireFeeding.Size = new System.Drawing.Size(475, 116);
this.gbWireFeeding.TabIndex = 56;
......@@ -753,7 +649,6 @@
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.gbIron.ResumeLayout(false);
this.gbIron.PerformLayout();
this.gbWireFeeding.ResumeLayout(false);
......@@ -811,21 +706,12 @@
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label12;
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.TextBox txtClearTime;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.GroupBox groupPoint;
private UserFromControl.URRobotMControl urRobot;
}
}
\ No newline at end of file
......@@ -24,19 +24,14 @@ namespace URSoldering.Client
cmbPointType.SelectedIndex = 0;
groupPoint.Text = "新增焊点";
}
public FrmWeldPointInfo(string name,double x,double y ,double u,double z,int hand)
public FrmWeldPointInfo(string name,URPointValue point)
{
InitializeComponent();
this.Text = "新增焊点";
groupPoint.Text = "新增焊点";
this.txtName.Text = name;
cmbPointType.SelectedIndex = 0;
this.txtRobotU.Text = u.ToString();
this.txtRobotX.Text = x.ToString();
txtRobotY.Text = y.ToString();
txtRobotZ.Text = z.ToString();
this.cmbHand.SelectedIndex = hand;
ShowPoint(point);
this.txtClearTime.Text = WeldRobotBean.RobotConfig.ClearMSenconds.ToString();
}
public FrmWeldPointInfo(WeldPointInfo weldPointInfo)
......@@ -69,13 +64,7 @@ namespace URSoldering.Client
{
this.txtClearTime.Text = weldPointInfo.ClearTime.ToString();
}
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;
ShowPoint(new URPointValue(weldPointInfo.RobotX, weldPointInfo.RoobtY, weldPointInfo.RobotZ, weldPointInfo.RobotRX, weldPointInfo.RobotRY, weldPointInfo.RobotRZ));
}
private void btnSave_Click(object sender, EventArgs e)
......@@ -232,12 +221,16 @@ namespace URSoldering.Client
weldPointInfo.isNeedClear = chbClear.Checked;
weldPointInfo.ClearTime = clearTime;
weldPointInfo.pointType = cmbPointType.SelectedIndex;
weldPointInfo.PositionX = FormUtil.getDoubleValue(txtRobotX);
weldPointInfo.PositionY = FormUtil.getDoubleValue(txtRobotY);
weldPointInfo.PositionU = FormUtil.getDoubleValue(txtRobotU);
weldPointInfo.PositionZ= FormUtil.getDoubleValue(txtRobotZ);
weldPointInfo.HandDirection = cmbHand.SelectedIndex;
URPointValue p = urRobot.GetPoint();
weldPointInfo.RobotX = p.X;
weldPointInfo.RoobtY = p.Y;
weldPointInfo.RobotZ = p.Z;
weldPointInfo.RobotRX = p.RX;
weldPointInfo.RobotRY = p.RY;
weldPointInfo.RobotRZ = p.RZ;
this.DialogResult = DialogResult.OK;
closeForm();
......@@ -257,39 +250,25 @@ namespace URSoldering.Client
private void btnUpdate_Click(object sender, EventArgs e)
{
PointValue point = EpsonDevice.LastPoint;
double clearx = point.X;
double cleary = point.Y;
double clearu = point.U;
double clearz = point.Z;
URPointValue point = URRobotControl.GetLastPosition();
//判断原点的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;
}
int hand = point.HandDir;
string handStr = "自动";
if (hand == 1)
{
handStr = "右臂";
}
else if (hand == 2)
{
handStr = "左臂";
}
DialogResult result = MessageBox.Show("当前坐标:X:" + clearx + ",Y:" + cleary + ",Z:" + clearz + "," + ",U:" + clearu +",方向:"+ handStr + ",是否确定更新?", "提示", MessageBoxButtons.YesNo);
DialogResult result = MessageBox.Show("当前坐标:" +point.ToShowStr()+ ",是否确定更新?", "提示", MessageBoxButtons.YesNo);
if (result.Equals(DialogResult.Yes))
{
this.txtRobotU.Text = clearu.ToString();
this.txtRobotX.Text = clearx.ToString();
this.txtRobotY.Text = cleary.ToString();
this.txtRobotZ.Text = clearz.ToString();
cmbHand.SelectedIndex = hand;
ShowPoint(point);
}
}
private void ShowPoint(URPointValue point)
{
urRobot.ShowPoint(point);
}
private void chbClear_CheckedChanged(object sender, EventArgs e)
{
if (chbClear.Checked)
......@@ -301,10 +280,6 @@ namespace URSoldering.Client
txtClearTime.Enabled = false;
}
}
private void cmbPointType_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
}
......@@ -85,12 +85,6 @@
<Compile Include="FrmBoardCopy.Designer.cs">
<DependentUpon>FrmBoardCopy.cs</DependentUpon>
</Compile>
<Compile Include="FrmAutoAddBoard.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmAutoAddBoard.Designer.cs">
<DependentUpon>FrmAutoAddBoard.cs</DependentUpon>
</Compile>
<Compile Include="FrmOrgConfig.cs">
<SubType>Form</SubType>
</Compile>
......@@ -169,6 +163,12 @@
<Compile Include="FrmWeldPointInfo.Designer.cs">
<DependentUpon>FrmWeldPointInfo.cs</DependentUpon>
</Compile>
<Compile Include="FrmWork.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmWork.Designer.cs">
<DependentUpon>FrmWork.cs</DependentUpon>
</Compile>
<Compile Include="FrmWorkCount.cs">
<SubType>Form</SubType>
</Compile>
......@@ -183,9 +183,6 @@
<EmbeddedResource Include="FrmBoardCopy.resx">
<DependentUpon>FrmBoardCopy.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmAutoAddBoard.resx">
<DependentUpon>FrmAutoAddBoard.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmOrgConfig.resx">
<DependentUpon>FrmOrgConfig.cs</DependentUpon>
</EmbeddedResource>
......@@ -225,6 +222,9 @@
<EmbeddedResource Include="FrmWeldPointInfo.resx">
<DependentUpon>FrmWeldPointInfo.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmWork.resx">
<DependentUpon>FrmWork.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmWorkCount.resx">
<DependentUpon>FrmWorkCount.cs</DependentUpon>
</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
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
......@@ -99,6 +99,18 @@
<Compile Include="IOTextControl.Designer.cs">
<DependentUpon>IOTextControl.cs</DependentUpon>
</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">
<SubType>UserControl</SubType>
</Compile>
......@@ -121,6 +133,12 @@
<EmbeddedResource Include="IOTextControl.resx">
<DependentUpon>IOTextControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="URRobotMControl.resx">
<DependentUpon>URRobotMControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="URRobotSControl.resx">
<DependentUpon>URRobotSControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UserControl1.resx">
<DependentUpon>UserControl1.cs</DependentUpon>
</EmbeddedResource>
......@@ -145,6 +163,19 @@
<ItemGroup>
<None Include="packages.config" />
</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" />
<!-- 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.
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!