Example Code

Enable Timer with Stored Lap Times

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

This VI is designed to count the number of seconds for when the Counter Enable button is active.

 

Description

When the Counter Enable boolean is pressed multiple times, it will log the individual lap times into an array and it will also sum the total enabled time. One small caveat of this example VI is that it has not been designed to work as a subVI. But you can use the code to implement into your top level application.

 

Requirements

LabVIEW 2012 (or Compatible)

 

Steps to Implement or Execute Code
1. Run the VI
2. Click the "Counter Enable" Boolean when you wish to record a lap time

 

Additional Information or References

Snippet.png

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