02-26-2020 10:10 AM
Hello everyone,
I am doing this just as a simple exercise. I read a boolean input (a rocker control) and write it to a text file every time it changes (read1.vi). It works prefectly fine.
But if I pull the control out of the loop - as I thought I should - it doesn't work (see read2.vi).
Why? Thanks for your reply.
Solved! Go to Solution.
02-26-2020 10:34 AM
Hi DavideB,
Once data hits the data terminal of a while loop it will stay the same for all iterations of the loop. Just like your "File Dialog" only runs once, the value of "On/Off" is only read once.
On the other hand, with every iteration of the while loop, everything inside of it is "run" again. The "stop" button is read, the "On/off" indicator is updated, etc.
02-26-2020 10:41 AM
got it! thanks