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
- 394 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 309 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings