Adding the Wait function to a LabVIEW loop is a good habit and common practice to release some processing time in the application to other tasks and processes. Without the Wait function, the While loop will run as fast as possible, meaning it will poll the Start and Close buttons and take up a large amount of processing time. The Wait function will only run the loop every 10ms or 100 times a second, thus releasing the application and processor to do other things while the loop is waiting to run again. In a larger LabVIEW application with many things going on in parallel, it is advisable to spend the appropriate amount of time and processing power on the right tasks. Since this task is just monitoring the user interface (waiting for someone t
o press a button) a response time of 10ms is very acceptable and could even be increased to 100ms without the user noticing the difference.
Christian L
NI Consulting Services
authored byChristian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX

