Example Code

XY Chart With Buffer, Multiple Plots, and NaN Capability

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 how to build an XY Chart effectively rather than an XY Graph (Graph requires an array to plot all at once, Chart remembers history, takes 1 sample and adds it on to the end), and is able to also handle NaN values.


Description
It can generate NaN values by setting the bool leans to true. Click them again to return to generating random values.

You can increase the period to display in min while the VI is running, but you must restart the VI to apply a change to chart length


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Run VI.

 

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

Regards,


Imtiaz Chowdhury
Project Manager
Green Running / Austin Consultants

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

Comments
Aaron_KZ
Member
Member
on

careful calling this a chart. the graph will redraw each plot every iteration, and if the plot history is large enough, the Front Panel can lag (especially on an old lab computer).

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/XY-chart/idi-p/2045138