To stop a VI that is in a While Loop in 60 seconds you can:
- Measure elapsed time in a VI that is running
- Make a comparison between the elapsed time and the time that you want this VI to stop
- Wire this result to the stop button of the VI.
A way to do this comparison is to use the Tick Count (ms) block in conjunction with a Sequence Structure inside a While Loop. This method is illustrated in the figure below to time length of the Wait (ms) function in the center.
Note: This code is not optimized for production and this is one of the possible ways to perform this task.
Additional Information
The Tick Count (ms) VI returns a 32-bit number (0 to 4 billion), which means, when using the above method to measure elapsed time, the Tick Count (ms) VI can run continuously for roughly 2 months before it rolls over. The tick count is reset back to zero when you restart your computer, so restarting the computer occasionally can prevent the Tick Count (ms) VI from rolling over.