06-10-2014 11:28 AM
Hi everyone,
I'm trying to create a program that would fit some PNG images of lasers beams. At each iteration of the FOR loop, I would select a new image, extract the data I need from it and then plot the data from each of these images in the same graph. But I can't understand why the data is not leaving the for loop.
Can someone please help me?
The VI and the image I'm trying to use to test it are attached.
Thanks,
Yuri
06-10-2014 11:40 AM
Because you have the two while loops in side your For Loop, you have a user interface annoyance where the user has to keep hitting the two boolean buttons for it to proceed through the For Loop iteration. Then do it again on the next iteration, then the next, ....
Once you've gone through all of that, then the For Loop will pass the data out to the XY graph
06-11-2014 07:13 AM
Thanks for the repply RavensFan
But actually the two while loops are intentional. I need it so I can change the PNG image at each iteration of the for loop.
If you try the highlight execution, even after you press the buttons so the information leave the two while loops, when it gets out of the last piece of the sequence it gets stuck there. The information doesn't get out of the for loop and then the next iteration starts.
06-11-2014 07:29 AM
Hey Yuri94,
that's the expected behaviour of the for loop. The "data" exits the for loop when all iterations are finished.
06-11-2014 07:34 AM
Yuri94 wrote:The information doesn't get out of the for loop and then the next iteration starts.
Yeah, that's the way data flow works. The data will not exit the FOR loop until the loop is complete.
06-11-2014 08:16 AM
Oh! I thought it would leave at each iteration! Thanks guys!
But do you know any way way it could leave one at a time? Not that it makes any difference for doing what I need, but just out of curiosity...
06-11-2014 08:17 AM
Put the indicator inside the For Loop, and build the array inside so that the indicator updates on each iteration.
06-11-2014 08:18 AM
Ok, that's easy! Hahahaha. Thank you all.