Exemplo n.º 1
0
 public bool Rotote(double rx, double ry, double rz, EnumRobotSpeed speed, EnumRobotTool tool, int TimeOut = 3000)
 {
     RotateCmd.I_Speed = speed;
     RotateCmd.I_Tool  = tool;
     RotateCmd.AngleX  = rx;
     RotateCmd.AngleY  = ry;
     RotateCmd.AngleZ  = rz;
     return(ExcuteCmd(RotateCmd, TimeOut) != null);
 }
Exemplo n.º 2
0
        public bool MoveAbs(double x, double y, double z, EnumRobotSpeed speed, EnumRobotTool tool, EnumMoveType MoveType = EnumMoveType.MoveL, int TimeOut = 3000)
        {
            MoveToPosCmd.I_Speed  = speed;
            MoveToPosCmd.I_Tool   = tool;
            MoveToPosCmd.I_X      = x;
            MoveToPosCmd.I_Y      = y;
            MoveToPosCmd.I_Z      = z;
            MoveToPosCmd.MoveType = MoveType;
            var cmd = ExcuteCmd(MoveToPosCmd, TimeOut);

            return(cmd != null);
        }
Exemplo n.º 3
0
        public bool MoveRel(double x, double y, double z, EnumRobotSpeed speed, EnumRobotTool tool, EnumMoveType MoveType = EnumMoveType.MoveL, int TimeOut = 3000)
        {
            var CurPoint = GetCurrentPostion(tool, TimeOut);

            MoveToPosCmd.I_Speed  = speed;
            MoveToPosCmd.I_Tool   = tool;
            MoveToPosCmd.I_X      = x + CurPoint.X;
            MoveToPosCmd.I_Y      = y + CurPoint.Y;
            MoveToPosCmd.I_Z      = z + CurPoint.Z;
            MoveToPosCmd.MoveType = MoveType;
            var cmd = ExcuteCmd(MoveToPosCmd, TimeOut);

            return(cmd != null);
        }
Exemplo n.º 4
0
        public AbbPoint GetCurrentPostion(EnumRobotTool tool, int TimeOut = 3000)
        {
            GetCurPosCmd.I_Tool = tool;
            var      cmd   = ExcuteCmd(GetCurPosCmd, TimeOut) as CmdGetCurPos;
            AbbPoint point = new AbbPoint();

            if (cmd != null)
            {
                point.X = cmd.Q_X;
                point.Y = cmd.Q_Y;
                point.Z = cmd.Q_Z;
                return(point);
            }
            return(null);
        }
Exemplo n.º 5
0
 /// <summary>
 /// 设置移动速度与工具
 /// </summary>
 /// <param name="I_Speed">10代表V10,20代表V20</param>
 /// <param name="I_Tool"></param>
 protected void SetSpeedAndTool(EnumRobotSpeed I_Speed, EnumRobotTool I_Tool)
 {
     Paras[4] = ((int)I_Speed).ToString();
     Paras[5] = ((int)I_Tool).ToString();
 }