Path decleration
Comments
-
Hello,
You can use an string declaration (array) to store the paths you want to execute.
Then you can use this proccall instruction:
PERS String path_stored{5}:=("path1","path2","path3","path4","path5");
PERS String path_execute:="path1";
%path_execute%;
So you can change the name of the path by
path_execute:=path_stored{5};
You can do it in a loop and when the string is empty the program is ready.
greetings
0 -
hi,
if i wanna change the name. i have to use the decleration PERS String path_execute:="path1"; %path_execute%;?
What you mean with a loop ?
0 -
Here is an example of how you can do it.
ts
PERS String path_stored{6}:=["path1","path2","path3","path4","path5",""];
PERS String path_execute:="path1";
PROC Main_Rot()
!
MoveAbsJ [[0,20,0,0,0,0],[9E+09,0,0,9E+09,9E+09,9E+09]],v200,fine,tool0\WObj:=wobj0;
!
FOR i FROM 1 TO 99 DO
path_execute:=path_stored{i};
IF path_execute="" GOTO end;
%path_execute%;
WaitTime 1;
ENDFOR
end:
ENDPROC
PROC Path1()
MoveAbsJ [[0,0,0,0,0,0],[9E+09,0,0,9E+09,9E+09,9E+09]],v200,fine,tool0\WObj:=wobj0;
ENDPROC
PROC Path2()
MoveAbsJ [[45,0,0,0,0,0],[9E+09,0,0,9E+09,9E+09,9E+09]],v200,fine,tool0\WObj:=wobj0;
ENDPROC
PROC Path3()
MoveAbsJ [[90,0,0,0,0,0],[9E+09,0,0,9E+09,9E+09,9E+09]],v200,fine,tool0\WObj:=wobj0;
ENDPROC
PROC Path4()
MoveAbsJ [[-45,0,0,0,0,0],[9E+09,0,0,9E+09,9E+09,9E+09]],v200,fine,tool0\WObj:=wobj0;
ENDPROC
PROC Path5()
MoveAbsJ [[-90,0,0,0,0,0],[9E+09,0,0,9E+09,9E+09,9E+09]],v200,fine,tool0\WObj:=wobj0;
ENDPROC
ENDMODULE
You need an change the executed routine.
gr
0 -
hi,thanks for the answer.I dont understand the decleration after proc main.I mean:,,MoveAbsJ [[0,20,0,0,0,0],[9E+09,0,0,9E+09,9E+09,9E+09]],v200,fine,tool0\WObj:=wobj0;'', from where you get this decleration?0
Categories
- All Categories
- 5.5K RobotStudio
- 396 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