RobotStudio event

changing/adding one parameter in a robottarget

Hi,

I am new to ABB robots and trying to write a small program that can make the robot to weld a hollow box. It would say I need a 4 base positions on a rectangle and MoveL between them. This gives me a single layer of the hollow box and if I continue this by incrementing the Z value then I would get walls of the box as well. [img]http://gabijack.com/wp-content/webwiz/2008/12/shell3.jpg[img].

My question now is that how can I only update the Z value of one point. In the following example code, I want to change the value of -25, which is Z.

[code]
PERS robtarget test_point:=[[410,125,-25],[0,0.999858168,0,-0.016841704],[0,-1,0,0],[9E9,0,9E9,9E9,0,9E9]];
num index:=0;
...
WHILE index < 10 DO
MoveL testpoint, ...
index := index + 10;
test_point (1)(3):=index; !I dont know how to write this in RAPID syntax !!!!
ENDWHILE

[/code]

if you know a better way to do this, plz let me know ???

P.S. one way to fix this is to use a numeric variable instead of the numbers later in your program, but still not the best way to program :-P

[code]
PROC  updateHeight (num layerNum)
! ---- First side of the substrate
hDist_1 := -25 + ( layerNum * 75 );
hDist_2 := -65 + ( layerNum * 75 );
point1_1 := [[410,1925,hDist_1],...;
! ---- Second side of the substrate
point2_8:=[[410,125,hDist_2],...;
ENDPROC
[/code]


--
Shahab

Sky is the limit ...

Comments

  • Hi
     

    You could use:

    MoveL Offs(testpoint,0,0,-40),...

    or


    MoveL RelTool(testpoint,0,0,-40),...

    (that depends on the tool orientation)

     

    best regards

    Marcel
  • or you can access the robtarget parameters with

    robtarget.trans.z := robtarget.trans.z + 40;

     

    have a look in the technical reference and you will see all the subtypes of the robtarget available.

     

    also I would generally use 12 points to weld a rectangle. (to maintain the desired push/drag angle as long as possible on the straight sections and just rotate it into and out of the corners).

     
    mattdavis2011-11-17 00:38:19
  • Thanks for the help from all of you :-) I preffered to use 

    [code]
    FOR i FROM 1 TO 5 DO
    MoveL Offs(testpoint,Xoffs,Yoffs,Zoffs),...
    ENDFOR
    [/code]

    As I could change Xoffset, Yoffset and Zoffset at the same time and could both come up in height and at the same time weld the same shape several times on one plate(X,Y shifting the same shape).
    --
    Shahab

    Sky is the limit ...


  • Hi,
     
    I have tried the same format for
    robtarget.p1.tranz.y:=robtarget.p1.tranz.y+96.3;
     
    and changed the command to
    jointtarget.jp1.robax.rax_6:=jointtarget.jp1.robax.rax_6+45;
    in order to rotate the robot arm by 45 degrees after a certain command.
    However, robotstudio online prompt error for this line.
    Is there any thing that we have written wrongly?
     
    Thanks!
  • Hi chincp
     


    jp1.robax.rax_6:=jp1.robax.rax_6+45;

    jointtarget has to be: PERS or VAR and not: CONST

     

    Best regards

    Marcel


  • Thanks a lot Marcel! Will try it out later. =D