From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
To figure out how many times the loop will run, consider what the timer will read on each loop. It will take ~2s to collect all the samples (20k/10k). On the first iteration the timer will read 0, on the 2nd it will read 2, on the 3rd it will read 4, on the 4th it will read 6 and cause the stop condition to be true. So it will run 4 times.