Array of Rob targets

Traditional Coding inside rapid..
So {} defines an Array for Normal Usage int,Strings… and the suffix instantiates the object variables.
PERS robtarget pApproGoodConv:=[[0,0,0],[0,0,0,0],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
Instead of making a Single element object of type robtarget.
How do i make pLocPoint{25}
Then i can manipulate my array as needed by passing by ref movej pLocPoint[nPallet1] …
Setting up the array is where i seem to be failing in my interpretation of the construct

You almost got it already in your question. VAR robtarget pLocPoint{25}; would do it, you don’t have to fill in all the placeholders. But if you really must have them there for whatever reason;

PERS robtarget pLocPoint{2}:=[[[1603.61,188.98,277.66],[0.328996,0.213965,0.916037,-0.082806],[0,0,2,0],[-0.0024727,-139.994,9E+09,9E+09,9E+09,9E+09]],[[1603.61,188.98,277.66],[0.328996,0.213965,0.916037,-0.082806],[0,0,2,0],[-0.0024727,-139.994,9E+09,9E+09,9E+09,9E+09]]];

Each one inside the braces separated by a comma.

Thanks i will try this again. Has to be my syntax somewhere

So for those Ever looking and need the final Result [Special Help from lemster68], here.
Named Constants to make a clean are Structured approach to point storage…

PROC PlaceConv(num index)
nRetConv:=nNothing;
!Check Safe Zone Clear before proceeding.
!IF Not Clear Wait at the Base Approach Pos until Clear
APPGC;
IF bApproSuccess THEN
pTempPoint:=pApproPoint{nPntGCPlaceWait};
MoveL pTempPoint,v1000,fine,temp_tool;
pTempPoint:=pLocPoint{nPntGCPlaceWait};
MoveL pTempPoint,v1000,fine,temp_tool;
ENDIF
nRetConv:=nSuccess;
RETURN ;
ENDPROC

So I suppose you figured out how to modpos those? (Have to go to program data into robtarget array.) And howdy neighbor, Fountain Inn here. :slight_smile:

So for those Ever looking and need the final Result [Special Help from lemster68], here.
Named Constants

PROC PlaceConv(num index)
nRetConv:=nNothing;
!Check Safe Zone Clear before proceeding.
!IF Not Clear Wait at the Base Approach Pos until Clear
APPGC;
IF bApproSuccess THEN
pTempPoint:=pApproPoint{nPntGCPlaceWait};
MoveL pTempPoint,v1000,fine,temp_tool;
pTempPoint:=pLocPoint{nPntGCPlaceWait};
MoveL pTempPoint,v1000,fine,temp_tool;
ENDIF
nRetConv:=nSuccess;
RETURN ;
ENDPROC

And to boot Make sure you assign(insinuate) each element in the arrary or your points are gone on power cycle.. Just saying!!

Hello,
Never forget to check if positions are changed after to update your array.
So you can teach them:

            pTempAppro:=pApproPoint{nPntGCPlaceWait};
            MoveL pTempAppro,v1000,fine,temp_tool;
            pTempLoc:=pLocPoint{nPntGCPlaceWait};
            MoveL pTempLoc,v1000,fine,temp_tool;
            IF pApproPoint{nPntGCPlaceWait}<>pTempAppro pApproPoint{nPntGCPlaceWait}:=pTempAppro;
            IF pLocPoint{nPntGCPlaceWait}<>pTempLoc pLocPoint{nPntGCPlaceWait}:=pTempLoc;