This experiment is connected to the function generator signal sine wave 100 Hz that channel 1 have 2loop.
1. While loop 1 used to sampling collect data value every 1 mS.
2. While loop 2 used to work in other parts of the program.
Try changing 'millisecond to wait 2' to 1000 mS means in loop2 to work every 1000mS loop1 and to work every 1mS but if Set. 'millisecond to wait 2' to 0 mS will make loop2 work all the time. In loop1 cannot keep up every 1mS.