From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Convert Digital XY Data (Unevenly-Spaced) to Waveform Data

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 VI shows how to convert unevenly-spaced digital data into a form that you can plot on a waveform graph in LabVIEW.


Description
In order to be plotted on a waveform graph, the data must be evenly spaced. You could use this technique to display time-variant (unevenly spaced) digital data on the same graph that you use to display corresponding analog data.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Set unevenly-spaced X values in the "X" array
  2. Run the VI
  3. Note that the Waveform Graph shows the correct values at the correct time points, but has interpolated to provide evenly spaced data.

 

Additional Information or References
VI Block Diagram

Block Diagram.png

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

 

 

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