Quote:
Originally Posted by Manoel
In the simplest terms, what I want is to run a for loop for a number of times, without blocking execution of the rest of the code (hence, a flat sequence doesn't work) and, after that loop is finished, run a different loop, again without blocking execution.
|
I don't understand why a flat sequence doesn't work. Do you need the loop to continue to function while you are computing new values?
My understanding is this:
You have other tasks unrelated to this that must continue.
You run your control for a while.
Stop this control loop (but nothing else)
calculate new inputs for the control loop
run the control loop with the new inputs for a while
A flat sequence won't stop other tasks.
Quote:
Originally Posted by Manoel
I need to have data dependency between the two for loops, but not for each iteration, only when the loop has completely finished. I'm thinking a state machine that changes state comparing the current iteration count with the desired number of iterations, should work. Will it or will it not work, or is there a better way?
|
Why doesn't a loop in a loop work?
Could you please post your code?