If you are using a getting started or application example in a while loop, you are probably doing a lot of unneccessary work with each iteration. These top level VI are intended to give a programmer some idea on how to create their own program. They will include functions on initializing the instrument that you probably don't need to repeat over and over again. See if there is a simple read function that you can use in the loop and move the initialization stuff to the beginning of your program and outside the loop.