> Does anyone know what is the sampling rate of the while loop?
Timing of while loops is very dependant upon your computer, as well as the 6024 or other hardware.
What does the computer have to do - everywhere, not just your program?
What does it have to do in the loop?
Servicing a display or file I/O can eat up a lot of time.
There are too many things that can change the result. The only way to know for sure is to put a counter/timer on your code and see what it does on your computer.
~~Les Hammer