What does the “interval” setting do when specifying a loop (whether “loop while” or “Loop N times”)? If I have a block of code to execute N times, what affect does a loop with a 200ms vs. a 20ms vs. a 1000ms interval have ? If I have multiple loops executing serially, does that make any difference?
I can find no use of the interval setting nor any affect it has when set to different values. However, I am experiencing some code that seems to work intermittently, and it happens to be in a loop, and the loop is one of four that are executed serially…
The “interval” is the time between two looping circles. If you set interval to 1000ms, the task in loop will be executed, then wait 1000ms before next execution.
In ForeUI, at least for now, it is not easy to make multiple loops executing serially. If you place multiple loops like this:
The three loops will start execution together like “multi-threading”. It is for some technical reasons to be so, and we wish to correct it in V3. The ideal execute order should be: Loop1->Loop2->Loop3.
In current version of ForeUI, if you wish to execute multiple loops in order, you will have to cascade them like this:
Loop2 should be executed at the last circle of Loop1, and Loop3 should be executed at the last circle of Loop2. You can use conditional branching to check if it is the last circle in current loop, which is kind of complex.
how does an while loop know when its last circle starts?
the only solution i found was the put them all in one loop
–> when loop1 through start loop2
–> when loop2 through start loop3
–> when loop3 through end loop0
Hi Yasofies, you can put the same condition checking in the while loop.
While condition1 is satisfied
–>Do some tasks…..
–>If condition1 is satisifed?
—–>This is the last cicle of the while loop, you can start another loop here.
This question is now closed