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
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
0
Comments
-
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.Lee Justice0 -
Thanks i will try this again. Has to be my syntax somewhere
0 -
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
0 -
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.Lee Justice0
-
So for those Ever looking and need the final Result [Special Help from lemster68], here.Named ConstantsPROC 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 ;
ENDPROCAnd to boot Make sure you assign(insinuate) each element in the arrary or your points are gone on power cycle.. Just saying!!0 -
Hello,Never forget to check if positions are changed after to update your array.So you can teach them:
pTempAppro:=pApproPoint{nPntGCPlaceWait};<br> MoveL pTempAppro,v1000,fine,temp_tool;<br> pTempLoc:=pLocPoint{nPntGCPlaceWait};<br> MoveL pTempLoc,v1000,fine,temp_tool;<br> IF pApproPoint{nPntGCPlaceWait}<>pTempAppro pApproPoint{nPntGCPlaceWait}:=pTempAppro;<br> IF pLocPoint{nPntGCPlaceWait}<>pTempLoc pLocPoint{nPntGCPlaceWait}:=pTempLoc;<br>
☑️2024 - RobotStudio® User Group0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings