Let's learn how to develop a simple timer in LabVIEW NXG. The image shows the labVIEW Panel with
- three Numeric Controls to set hours, minutes and seconds,
- a Power Button to start the contdown,
- a Numeric Indicator to display the remaining seconds to count,
- a Round LED that lights up at the end of the countdown.
The VI is simple, so we can see in the Diagram below. It requires principally:
- a While Loop that repeats the code on its subdiagram until a specific condition occurs: a While Loop always executes at least one time and behaves similarly to a do while loop in other programming languages (for example C),
- an Elapsed Time VI that indicates the amount of time that has elapsed since the target time we specify.