Example Code

3 methods of creating a software stop watch

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

Download All

Overview:  The attached application illiterates 3 simple methods of calculating the relative time since hitting the run button.


Description: The attached application illiterates 3 simple methods of calculating the relative time since hitting the run button. The 3 method will count the time equally well, and so it is down to developer preference which method you decide to impliment. The code also includes a simple mechanism for resetting the 3 “stop watches” after the application has begun.


Requirements: LabVIEW 2012 (or compatible).


Steps to Implement or Execute Code:

1. Run this VI.
2. Reset timers.


Additional Information or References:

 

3 methods of creating a software stop watch FP.png

 

3 methods of creating a software stop watch BD.png 

 


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

 

Rich Roberts
Senior Marketing Engineer, National Instruments
Connect on LinkedIn: https://www.linkedin.com/in/richard-roberts-4176a27b/

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