How Can I Implement An Hour Timer in LabVIEW?

Updated Sep 30, 2019

Reported In

Software

  • LabVIEW

Issue Details

I would like to develop a program where is required to count the time in hours. How can I implement this timer in LabVIEW?

The timers I know are in ms (milliseconds) or in s (seconds). I don't know if there can be another more effective way to do it.

Solution

One possible solution could be to use a Functional Global Variable (FGV) design pattern. This implementation computes the time difference, in each iteration, between the elapsed time and the initial time. When this difference is equal or greater than the target time, the VI stops.
 

However, FGVs are used as SubVI, therefore you have to implement a main VI that executes the FGV, as can be in the following image.
 

The control Required Time is in seconds, therefore, if you are using hours you should perform the following conversion:
Hours = Seconds × 60 × 60

 

Additional Information

To review more information about FGVs, you can check: What is a Functional Global Variable?