Targets in a line using loop - 1D (and 2D/3D)
Hi,
I am coming to RobotStudio/ABB from Staubli V+ and am looking to create a simple program that allows a single target to be moved dynamically within a program. Below is an abbreviated version of how it could be done in V+ - the first point is called StartPoint, and it is shifted along the World X by a distance 'xspace' for each iteration of the loop - hence parts are always picked from one target and dropped in a line - this can easily be extended to 2D and 3D with additional loops. Gripper I/O is OpenI and CloseI; Shift command assumed World Coordinates.
What is the easiest way of doing this in RobotStudio?
Many thanks!
PROMPT "Enter the num. of targets in the x-direction: ", xdim
PROMPT "Enter the target spacing in the x-direction in mm:", xspace
OpenI
FOR loopx = 0 TO (xdim-1)
SET dropoff = SHIFT(startpoint BY (xspace*loopx))
MOVE pickup
CLOSEI
MOVE dropoff
OPENI
END
I am coming to RobotStudio/ABB from Staubli V+ and am looking to create a simple program that allows a single target to be moved dynamically within a program. Below is an abbreviated version of how it could be done in V+ - the first point is called StartPoint, and it is shifted along the World X by a distance 'xspace' for each iteration of the loop - hence parts are always picked from one target and dropped in a line - this can easily be extended to 2D and 3D with additional loops. Gripper I/O is OpenI and CloseI; Shift command assumed World Coordinates.
What is the easiest way of doing this in RobotStudio?
Many thanks!
PROMPT "Enter the num. of targets in the x-direction: ", xdim
PROMPT "Enter the target spacing in the x-direction in mm:", xspace
OpenI
FOR loopx = 0 TO (xdim-1)
SET dropoff = SHIFT(startpoint BY (xspace*loopx))
MOVE pickup
CLOSEI
MOVE dropoff
OPENI
END
0
Answers
-
In RAPID the code would look something like this:
MODULE Module1
CONST robtarget pickup:=[[800,-200,600],[0,0,1,0],[-1,-4,3,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
CONST robtarget startpoint:=[[800,200,600],[0,0,1,0],[0,-5,4,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
VAR num xdim;
VAR num xspace;PROC Path_10()
TPReadNum xdim,"Enter the num. of targets in the x-direction:";
TPReadNum xspace,"Enter the target spacing in the x-direction in mm:";
SetDO DoOpen0,1; ! Or PulseDO
FOR loopx FROM 0 TO xdim-1 DO
MoveJ pickup,v1000,fine,tool0\WObj:=wobj0;
SetDO DoClose0,1;
MoveJ Offs(startpoint,loopx*xspace,0,0),v1000,fine,tool0\WObj:=wobj0;
SetDO DoOpen0,1;
ENDFOR
ENDPROC
ENDMODULE
https://youtu.be/4En1dicswZkJohannes Weiman
Software Engineer
RobotStudio Team, ABB Robotics0
Categories
- All Categories
- 5.5K RobotStudio
- 395 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 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