multimove
I need an idea for a code to run two functions run at the same time in RAPID. Any ideas?
MODULE Module1
CONST robtarget Target_30:=[[1645.421406637,0,1697.500079305],[0.500000013,0.000000009,0.866025396,0.000000005],[0,-1,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
CONST robtarget Target_40:=[[1854.035021987,0,1697.499975767],[0.50000002,0.000000009,0.866025392,0.000000005],[0,-1,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
VAR num a:=0;
PROC main()
Independant;
Path_10;
ENDPROC
PROC Independant()
ActUnit MTD_500_M2009_REV1_;
FOR i FROM 1 TO 10000 DO
IndAMove MTD_500_M2009_REV1_,1\ToAbsNum:=a,90\Ramp:=100;
a :=a + 90;
ENDFOR
ENDPROC
PROC Path_10()
MoveL Target_30,v1000,z100,tool0\WObj:=wobj0;
MoveL Target_40,v1000,z100,tool0\WObj:=wobj0;
ENDPROC
ENDMODULE
MODULE Module1
CONST robtarget Target_30:=[[1645.421406637,0,1697.500079305],[0.500000013,0.000000009,0.866025396,0.000000005],[0,-1,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
CONST robtarget Target_40:=[[1854.035021987,0,1697.499975767],[0.50000002,0.000000009,0.866025392,0.000000005],[0,-1,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
VAR num a:=0;
PROC main()
Independant;
Path_10;
ENDPROC
PROC Independant()
ActUnit MTD_500_M2009_REV1_;
FOR i FROM 1 TO 10000 DO
IndAMove MTD_500_M2009_REV1_,1\ToAbsNum:=a,90\Ramp:=100;
a :=a + 90;
ENDFOR
ENDPROC
PROC Path_10()
MoveL Target_30,v1000,z100,tool0\WObj:=wobj0;
MoveL Target_40,v1000,z100,tool0\WObj:=wobj0;
ENDPROC
ENDMODULE
Tagged:
0
Answers
-
If your robot has the option multi tasking, you can set the external axis to be controlled by a secondary task. That would let you have both items move independantly.0
Categories
- All Categories
- 5.5K RobotStudio
- 397 UpFeed
- 18 Tutorials
- 13 RobotApps
- 299 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 319 IRC5
- 63 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 804 RAPID Programming
- 4 AppStudio
- 3 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings