Example Code

Frame Timing within a Timed Loop using 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 Real-Time Module
  • LabVIEW

Code and Documents

Attachment

Description

1. Overview
This example illustrates how to use timing sources that can be used for frames within a timed loop. You can configure frames to use the same timing source as the timed loop or to have an independent timing source that resets each loop iteration.

 

2. Description
In this example, two timed loops with four frames each are configured to have two different frame timing configurations. Select the number of loop iterations to simulate along with the duration that each loop frame will take to execute, and the timing results will be plotted on the front panel graphs.

 

3. Requirements

  • NI LabVIEW Base Development System 2012 or above.
  • Timed Loops are only supported in Windows and in the LabVIEW Real-Time Module.

 

4. Steps to Implement or Execute Code

  1. Download the compressed file.
  2. Open the VI "Timed Loop Frame Timing LabVIEW 2012 NIVerified.vi"
  3. Select the Timed Loop Iterations and Frame Duration (ms) you want.
  4. Run the VI.

 

5. Additional Information or References

Timed Loop Frame Timing Screenshot.PNG

 

 

**The code for this example has been edited to meet the new Community Example Style Guidelines.**

Sincerely,
Jason Daming
Applications Engineer
National Instruments
http://www.ni.com/support

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