Example Code

Two methods for writing multiple plots to a waveform chart

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 example shows two methods for writing multiple plots to a waveform chart.

 

 

Description

The first method uses a bundle function to combine the single data points into a cluster.

 

The second method converts each single data point to a 1D array using a build array function and then combines the 1D arrays into a 2D array using another build array function. In order to display the 2D array correctly, the Transpose Array option of the chart is disabled. If you need to do this in your code, right-click on the chart border and deselect Transpose Array as shown in the image below. This option is only enabled for Array data types.

 

 

 

Requirements

LabVIEW 2012 (or compatible)

 

 

Steps to Implement or Execute Code

Run the attached VI

 

 

Additional Information or References

Front Panel

FP.PNG

 

Block Diagram

 BD.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.

Comments
jsduran
Member
Member
on

Could you please show the actual chart icons??  When I try this I get boken wires!!!!

mr-vizsla
Member
Member
on

Feel free to download the VI and right-click, show as icon. Hope that helps.

Hoda
Member
Member
on

If I want to change the X-axis to show the real time, how can I do that? I understand I have to use "Build Waveform" and intrudoce the real time to the chart but then I can only wire one array to Y ... how can I include al the plots and get the chart to show real-time?

Jim12345678
Member
Member
on

When I try doing this myself, "transpose array" is grayed out when Iright click on the chart.  I'm not the only person whose had this problem.  Any ideas?