RobotStudio event

Converting a RobotStudio constant

I have set up an array of "alt_stop{290}" which is used to change "stop1",

"stop2", "stop3", etc. In using the "Offs" function I would like to use the

index format, like:



For x FROM 1 to 290 DO

alt_stop{x}:= Offs(stop{x}, 0, 10, 10);

ENDFOR



Right now I have:

alt_stop{1}:=Offs(stop1,0,10,10)

alt_stop{2}:=Offs(stop2,0,10,10)

etc

etc

until

alt_stop{290):=Offs(stop290,0,10,10)



However, "stop" is a self-named constant generated when running the

"Polish " Addin and therefore not indexable. There are 290

"stop"s. RobotStudio generated "stop" so there is not much I can do with

them; meaning converting it to an array.

Comments

  • I don't know how to do what you ask, but what about changing the workobject instead of traslating all the points?
    I mean:

    ! Original path
    MoveL stop1,v10,fine,tool1Wobj:=wobj10;
    MoveL stop2,v10,fine,tool1Wobj:=wobj10;
    MoveL stop3,v10,fine,tool1Wobj:=wobj10;
    ...

    ! New path
    wo_Temp:=wobj10;
    wo_Temp.uframe.trans.x:=wo_Temp.uframe.trans.x+10;
    wo_Temp.uframe.trans.y:=wo_Temp.uframe.trans.y+10;
    MoveL stop1,v10,fine,tool1Wobj:=wo_Temp;

    MoveL stop2,v10,fine,tool1Wobj:=wo_Temp;

    MoveL stop3,v10,fine,tool1Wobj:=wo_Temp;

    ...

    Bye
    Claudio