RobotStudio event

Circular motion

Hello, I'm a new one in robotstudio. I had a problem,how to appear default circular motion(MoveC) in robotstudio 5.10?

Comments

  • Create two regular instructions of type MoveJ or MoveL. Then select them in the browser, right-click to open the context menu, and choose "Create circular instruction". You are done!

    Henrik Berlin
    ABB
  • I  did a compleat cirkel .... like this i my robot program
     

          UTL_moveCC posStart, posCenter, speed_3, z0, tooltempWobj:=objInUse, 0;

     

     

     

      !*********************************************************
      ! Procedure:  UTL_moveCC
      ! Description:
      !   The robot is moved along a complete circle, where
      !   the startpoint and centrepoint is given..
      !
      !*********************************************************
      PROC UTL_moveCC(
        switch Left,
        robtarget StPoint,
        robtarget CntPoint,
        speeddata Speed,
        zonedata Zone,
        PERS tooldata Tool
        PERS wobjdata Wobj,
        num eaxnum)

        VAR robtarget p1;
        VAR robtarget p2;
        VAR robtarget p3;
        VAR robtarget p4;
        VAR pos vsc;
        VAR pos vc1;
        VAR pos v1;
        VAR num v1a;
        VAR num r;

        p1:=StPoint;
        p2:=StPoint;
        p3:=StPoint;
        p4:=StPoint;
        vsc:=CntPoint.trans-StPoint.trans;
        p2.trans:=StPoint.trans+2*vsc;
        r:=Sqrt(vsc.x*vsc.x+vsc.y*vsc.y+vsc.z*vsc.z);
        v1:=[0,0,1]*vsc;
        v1a:=Sqrt(v1.x*v1.x+v1.y*v1.y+v1.z*v1.z);
        IF v1a<1 RAISE 1;
        vc1:=r/v1a*v1;
        IF Present(Left) vc1:=-vc1;
        p1.trans:=CntPoint.trans+vc1;
        p3.trans:=CntPoint.trans-vc1;
        !
        MoveL StPoint, Speed, Zone, ToolWObj?wobj;
        MoveC p1,p2,Speed,Zone,ToolWObj?Wobj;
        MoveC p3,P4,Speed,Zone,ToolWObj?Wobj;
        RETURN;
      BACKWARD
        MoveL StPoint,Speed,Zone,ToolWObj?Wobj;
      ENDPROC
  • or  like
     

     

      PERS num Vinkel:=24.5553;
      CONST zonedata zone1 := [FALSE,0.2,0.05,0.5,0.5,0.5,0.5];

     

      PROC cirkel
        switch Left,
        robtarget StPoint,
        robtarget CntPoint,
        speeddata Speed,
        zonedata Zone,
        PERS tooldata Tool
        PERS wobjdata Wobj,
        num eaxnum)

        !
        VAR robtarget p0;   
        VAR robtarget p1;
        VAR robtarget p2;
        VAR robtarget p3;
        VAR robtarget p4;
        VAR robtarget p5;
        VAR robtarget p6;
        VAR robtarget p7;
        VAR robtarget p8;
        VAR robtarget p9;
        !
        CONST num pi:=3.1415926535897932384626433832795;
        ! Vinkel i fA?r cirkelpunkt 0
        VAR num cos0:=0.296959;
        VAR num sin0:=0.95489;
        ! Vinkel i fA?r cirkelpunkt 1
        VAR num cos1:=0.296959;
        VAR num sin1:=0.95489;
        ! Vinkel i fA?r cirkelpunkt 2
        VAR num cos2:=0.296959;
        VAR num sin2:=0.95489;
        ! Vinkel i fA?r cirkelpunkt 3
        VAR num cos3:=0.296959;
        VAR num sin3:=0.95489;
        ! Vinkel i fA?r cirkelpunkt 4
        VAR num cos4:=0.296959;
        VAR num sin4:=0.95489;
        ! Vinkel i fA?r cirkelpunkt 5
        VAR num cos5:=0.296959;
        VAR num sin5:=0.95489;
        ! Vinkel i fA?r cirkelpunkt 6
        VAR num cos6:=0.296959;
        VAR num sin6:=0.95489;
        ! Vinkel i fA?r cirkelpunkt 7
        VAR num cos7:=0.296959;
        VAR num sin7:=0.95489;
        ! Vinkel i fA?r cirkelpunkt 8
        VAR num cos8:=0.296959;
        VAR num sin8:=0.95489;
        ! Vinkel i fA?r cirkelpunkt 9
        VAR num cos9:=0.296959;
        VAR num sin9:=0.95489;
        !
        VAR pos vsc;
        VAR pos vc1;
        VAR pos v1;
        VAR num v1a;
        VAR num r;
       
        vsc:=CntPoint.trans-StPoint.trans;
        p2.trans:=StPoint.trans+2*vsc;
        r:=Sqrt(vsc.x*vsc.x+vsc.y*vsc.y+vsc.z*vsc.z);
        !
        Vinkel:=(PulsDist*360)/(pi*(2*r));
        !
        v1:=[0,0,1]*vsc;
        v1a:=Sqrt(v1.x*v1.x+v1.y*v1.y+v1.z*v1.z);
        IF v1a<1 RAISE 1;
        vc1:=r/v1a*v1;
        IF Present(Left) vc1:=-vc1;
        p1.trans:=CntPoint.trans+vc1;
        p3.trans:=CntPoint.trans-vc1;
        !
          p0:=CntPoint;
          p1:=CntPoint;
          p2:=CntPoint;
          p3:=CntPoint;
          p4:=CntPoint;
          p5:=CntPoint;
          p6:=CntPoint;
          p7:=CntPoint;
          p8:=CntPoint;
          p9:=CntPoint;
         
        MoveL CntPoint,Speed,z0,ToolWObj?Wobj; 
         !   i = Vinkel
         FOR i FROM Vinkel TO 360+vinkel STEP Vinkel DO
          cos0:=Cos(i)*r;
          cos1:=Cos(i-(Vinkel*(1/10)))*r;
          cos2:=Cos(i-(Vinkel*(2/10)))*r;
          cos3:=Cos(i-(Vinkel*(3/10)))*r;
          cos4:=Cos(i-(Vinkel*(4/10)))*r;
          cos5:=Cos(i-(Vinkel*(5/10)))*r;
          cos6:=Cos(i-(Vinkel*(6/10)))*r;
          cos7:=Cos(i-(Vinkel*(7/10)))*r;
          cos8:=Cos(i-(Vinkel*(8/10)))*r;
          cos9:=Cos(i-(Vinkel*(9/10)))*r;

          sin0:=Sin(i)*r;
          sin1:=Sin(i-(Vinkel*(1/10)))*r;
          sin2:=Sin(i-(Vinkel*(2/10)))*r;     
          sin3:=Sin(i-(Vinkel*(3/10)))*r;     
          sin4:=Sin(i-(Vinkel*(4/10)))*r;     
          sin5:=Sin(i-(Vinkel*(5/10)))*r;     
          sin6:=Sin(i-(Vinkel*(6/10)))*r;     
          sin7:=Sin(i-(Vinkel*(7/10)))*r;     
          sin8:=Sin(i-(Vinkel*(8/10)))*r;                                         
          sin9:=Sin(i-(Vinkel*(9/10)))*r;                                               !

          p0.trans:=[CntPoint.trans.x+cos0,CntPoint.trans.y+sin0,CntPoint.trans.z];
          p1.trans:=[CntPoint.trans.x+cos1,CntPoint.trans.y+sin1,CntPoint.trans.z];
          p2.trans:=[CntPoint.trans.x+cos2,CntPoint.trans.y+sin2,CntPoint.trans.z];
          p3.trans:=[CntPoint.trans.x+cos3,CntPoint.trans.y+sin3,CntPoint.trans.z];
          p4.trans:=[CntPoint.trans.x+cos4,CntPoint.trans.y+sin4,CntPoint.trans.z];
          p5.trans:=[CntPoint.trans.x+cos5,CntPoint.trans.y+sin5,CntPoint.trans.z];
          p6.trans:=[CntPoint.trans.x+cos6,CntPoint.trans.y+sin6,CntPoint.trans.z];
          p7.trans:=[CntPoint.trans.x+cos7,CntPoint.trans.y+sin7,CntPoint.trans.z];
          p8.trans:=[CntPoint.trans.x+cos8,CntPoint.trans.y+sin8,CntPoint.trans.z];
          p9.trans:=[CntPoint.trans.x+cos9,CntPoint.trans.y+sin9,CntPoint.trans.z];
          cntpoint.extax.eax_a:=(i)+eaxnum;

          p0.extax.eax_a:=(i)+eaxnum;
          p1.extax.eax_a:=(i-(Vinkel*(1/10)))+eaxnum;
          p2.extax.eax_a:=(i-(Vinkel*(2/10)))+eaxnum;
          p3.extax.eax_a:=(i-(Vinkel*(3/10)))+eaxnum;
          p4.extax.eax_a:=(i-(Vinkel*(4/10)))+eaxnum;
          p5.extax.eax_a:=(i-(Vinkel*(5/10)))+eaxnum;
          p6.extax.eax_a:=(i-(Vinkel*(6/10)))+eaxnum;
          p7.extax.eax_a:=(i-(Vinkel*(7/10)))+eaxnum;
          p8.extax.eax_a:=(i-(Vinkel*(8/10)))+eaxnum;                       
          p9.extax.eax_a:=(i-(Vinkel*(9/10)))+eaxnum;                       

          MoveL p9,Speed,zone1,ToolWObj?Wobj;
          Movel p8,Speed,zone1,ToolWObj?Wobj;
          MoveL p7,Speed,zone1,ToolWObj?Wobj;
          MoveL p6,Speed,zone1,ToolWObj?Wobj;
          Movel p5,Speed,zone1,ToolWObj?Wobj;
          MoveLconc,p4,Speed,zone1,ToolWObj?Wobj;
          MoveLconc,p3,Speed,zone1,ToolWObj?Wobj;
          MoveLconc,p2,Speed,zone1,ToolWObj?Wobj;
          MoveLconc,p1,Speed,zone1,ToolWObj?Wobj;
          MoveLconc,p0,Speed,zone1,ToolWObj?Wobj;
         
         ENDFOR
          MoveL p0, Speed, fine, ToolWObj?Wobj;
          MoveL CntPoint, Speed, fine, ToolWObj:=Wobj;
          RETURN; 
      ENDPROC