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.
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
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 ![]()
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