Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

For Loop in RoboDK

#1
Hello Everyone,

I was generate ABB robot program using robodk and edit manually to use for loop (i need to change Z height every loop). Is there possible way to use "for" loop and program it inside RoboDK without manually edit after generate program? Thanks

regards,
Irham

Code:
FOR i FROM 20 TO 70 DO

MoveL [[1856.510,539.272,15.000 + (i-1)*15],[0.00000000,-0.07483079,0.99719625,0.00000000],[-1,0,-1,1],[2008.240000,9E+09,9E+09,9E+09,9E+09,9E+09]],[120.00,500,5000,1000],z1,Tool3 \WObj:=Wobj_print;

MoveL [[1856.060,537.297,15.000 + (i-1)*15],[0.00000000,-0.07483079,0.99719625,0.00000000],[-1,0,-1,1],[2007.790000,9E+09,9E+09,9E+09,9E+09,9E+09]],[120.00,500,5000,1000],z1,Tool3 \WObj:=Wobj_print;

MoveL [[1855.670,535.409,15.000 + (i-1)*15],[0.00000000,-0.07483079,0.99719625,0.00000000],[-1,0,-1,1],[2007.390000,9E+09,9E+09,9E+09,9E+09,9E+09]],[120.00,500,5000,1000],z1,Tool3 \WObj:=Wobj_print;

MoveL [[1850.610,511.385,15.000 + (i-1)*15],[0.00000000,-0.07483079,0.99719625,0.00000000],[-1,0,-1,1],[2002.340000,9E+09,9E+09,9E+09,9E+09,9E+09]],[120.00,500,5000,1000],z1,Tool3 \WObj:=Wobj_print;

ENDFOR
#2
You can add the FOR/ENDFOR loop as an insert code instruction in RoboDK.

Then, you can enable the simulation of flow control statements with your station by following these steps:
  1. Right click the root of your station
  2. Select Station parameters
  3. Check the option Enable flow control statements
However, the parametric coordinates won't be automatically calculated when you generate the program unless you customize your post processor.
  




Users browsing this thread:
1 Guest(s)