
Index through robtargets

scottMHA
✭
is it possible to index through robtagets in a FOR statement? See example below, the argument Pick+i should reference the robtarget Pick1, Pick2 etc....
CONST robtarget Pick1;
CONST robtarget Pick2;
CONST robtarget Pick3;
CONST robtarget Pick4;
CONST robtarget Pick1;
CONST robtarget Pick2;
CONST robtarget Pick3;
CONST robtarget Pick4;
FOR i FROM 1 TO 4 DO
!
Pick i, Pick+i;
!
Drop;
!
ENDFOR
ENDFOR
PROC Pick(num PickNum,robtarget pickLoc)
!
MoveJ RelTool(pickLoc,0,0,200),vmax,z10,t_Gripper_16;
!
MoveL pickLoc,vmax,fine,t_Gripper_16\WObj:=wobj0;
!
ENDPROC
0
Comments
-
Put your robtargets into an array. Make a separate routine so you can make touchups or you have to view in the data to modpos them.Lee Justice0
-
Hello,
you could use the instruction GetDataVal to retrieve the required robtarget.Proc Pick(string Name, num Index) var robtarget pTemp; var string stName; stName:=Name+Valtostr(Index); GetDatval stname, pTemp; MoveL pTemp,...; endproc
/BR
Micky2
Categories
- All Categories
- 5.5K RobotStudio
- 398 UpFeed
- 19 Tutorials
- 13 RobotApps
- 299 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 324 IRC5
- 63 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 813 RAPID Programming
- 5 AppStudio
- 3 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings