.jpg?sfvrsn=3ad09b0a_1)
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
- 10.4K All Categories
- 5.3K RobotStudio
- 346 UpFeed
- 15 Tutorials
- 8 RobotApps
- 281 PowerPacs
- 404 RobotStudio S4
- 1.7K Developer Tools
- 238 ScreenMaker
- 2.6K Robot Controller
- 246 IRC5
- 36 OmniCore
- 6 RCS (Realistic Controller Simulation)
- 3 RobotStudio AR Viewer
- 691 RAPID Programming
- 14 Wizard Easy Programming
- 101 Collaborative Robots
- 3 Job listings