Example Code

Countdown till Next Loop Iteration Example Using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview
This example VI shows how to use the Wait function of an outer loop and simple logic to continuously update a nested while loop which will count the amount of time left until the main loop will run again.


Description
This code is particularly useful for programs that have extremely long loop wait values, and allows the end-user to see how long until the loop will execute again. This prevents confusion in cases where a user thinks a VI has frozen because he/she updates a front panel control but does not see the change update due to a Wait function.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

1.Write the time in the Wait Time control.

2.Select the format in the Display Format control,

3.Run the VI.

 

Additional Information or References

VI Snippet

00.png

**This document has been updated to meet the current required format for the NI Code Exchange.**

Micah M.
National Instruments
NIC AE Specialist - Test

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