09-03-2008 02:40 AM
hello everyone,
sorry for the stupid question, but I have a problem with a for loop.
In the following scheme
the second "for" loops only once. If i do not connect the two loops, the second for works correctly (and the index i goes rightly to 1 after the execution), while if i connect them the index stops to 0 (so, I have only one iteration instead of two).
Do you know where could be the problem?
Thank you a lot in advance
09-03-2008 02:48 AM
Hi There,
This is the expected behavior, a loop will only execute when all it's input are available. If you don't wire the 2 loops, then you launch parallel processes>>they will execute as soon as possible. If you wire them , then the second loop waits for the first to be completed before starting.
Matthieu
09-03-2008 03:01 AM
Please attach an image that shows readable code, or even simply attach the VI. There is no way to tell what is going on from your blurry image.
A FOR loop will loop as many times as given by N or by the array size of the smallest autoindexing input array, whichever is smaller. For example if an autoindexing input array is of size=1, the loop will only spin once, no matter what you wire to N.
09-03-2008 03:44 AM
ok, thank you so much. Now I understood my problem.
ps: sorry for the blurry image.