Virus scan in progress. Please wait to download attachments.
FGV Timer 2012 NIVerified
This Timing VI can be called within a main application to start, get value, pause, and resume.
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.
LabVIEW 2012 or compatible
Steps to Implement or Execute Code
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.
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
**This document has been updated to meet the current required format for the NI Code Exchange. **
Applications Engineer National Instruments
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.