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

For loop in robodk V5.5.3

#1
Hi all, I am trying to do a simulation in robodk V5.5.3. I am using conveyor belt mechanism. 
I want to use For loop in the main program for running a specific code 7 times. 
I wrote the following code in insert code command;

i = 1
FOR i = 1 TO 7 

ENDFOR

I have enabled 'Enable Flow Control Statements' option in the station parameters. 
After executing the program, I can not see i value incremented. It is showing error " SyntaxError: Expected token `,' "
How to solve this? Is this a version issue? And is there any documentation for how to use loops and conditional statements in the insert code command?

Any help would be appreciated. Thanks!!
#2
You should use a while statement instead of a for loop.

If you can send us your sample project we can better help you

You can find more information here:
https://robodk.com/forum/Thread-Conditio...nstruction
  




Users browsing this thread:
1 Guest(s)