Example Programs

cancel
Showing results for 
Search instead for 
Did you mean: 

FGV Timer SubVI

FGV Timer 2012 NIVerified

 

Overview

This Timing VI can be called within a main application to start, get value, pause, and resume.

 

Description

The values are stored in a functional global variable (FGV) within a loop that is called only once. Each time you call the subVI, you can input a enum state in order to start the timer, get the elapsed time, pause or resume the timer. The timer also outputs the Elapsed time, a Boolean indicator comparing the elapsed time to the target time, and a pause flag to notify the user if the timer is paused.

Requirements

  • LabVIEW 2012 or compatible

 

Steps to Implement or Execute Code

  1. You can run the subVI on it's own by selecting the enum input for timer state and pressing run. It is designed to run the loop only once since it is designed to run as a subVI. For testing purposes, you can run the VI continuously to keep the values on the front panel updated.
  2. Use this VI as a subVI. Within a state machine, you can start the timer in one state and get the time in another state.

Additional Information or References

front panel 

FGVTimer.PNG

 

5.png

 

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

 

 

 

Applications Engineer
National Instruments
Comments
Member Greg_Reynolds
Member

Thanks for this fgv timer example.  I enjoyed reviewing it's functionality as I study for the CLD.  I made a few changes and posted here.

Greg R.