Example Code

Tracking Lap Time and Total Time of Event in LabVIEW

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

Overview

This code allows the user to monitor Current Lap Time(s), All Lap Times and the Total Time(s) when a Event happens.

 

Description

Main Loop includes a control that fires the event. Using Shift Registers and Tick Count (ms) function it calculates Total Time (s), Current Lap Time (s) and All Lap Times in an Array.

A separate loop can be used for other processes. The user can stop both loops at the same time by using Occurance.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Run VI
  2. Click on Counter Enable Control, it fires the Event and while it is ON, Current Lap Time (s) updates its value
  3. When Counter Enable Control is OFF, Lap Times and Total Time (s) are updating

Additional Information or References

8219.png 

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

Andy Chang
National Instruments

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