Example Code

While Loop with a Time Limit (Time Out)

Code and Documents


Download All
This VI allows you to stop your while loop after a set amount of time, or with a stop button. The VI takes an initial time before the loop starts, and subtracts that from the current time to give you the time elapsed during the running of the while loop.

This functionality has been added to LabVIEW 7.1 through the used of timed loops. The block diagram for the 7.1 version is significantly different than that for 6.0.

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.