You are on page 1of 2

6/11/12

What Is the Difference Between Graphs and Charts in LabVIEW? - National Instruments

We value your feedback! Take a short survey about your ni.com experience and be entered to win a $50 Amazon.com Gift Card. 101 ratings: 3.41 out of 5 Rate this Document

Improve your ni.com experience. Login or Create a user profile.

What Is the Difference Between Graphs and Charts in LabVIEW?


Primary Software: LabVIEW Development Systems>>LabVIEW Base Package Primary Software Version: 7.0 Primary Software Fixed Version: N/A Secondary Software: N/A Problem: How do I know when to use a Waveform Graph or a Waveform Chart in LabVIEW? What is the difference between these two ways to display data? Solution: Waveform Graphs and Waveform Charts differ in the way they display and update data. A Waveform Graph accepts arrays of data in various forms, e.g. array, waveform, or dynamic data. It then plots all the received points at once. It does not accept single point values. When an array of points is wired to a waveform graph, it assumes the points are equally spaced out. By default, the starting X value and step size (t0 and dt) are 0 and 1 respectively. This can be changed in the properties of the graph or using property nodes. The waveform data type is essentially an array of points that also contains t0 and dt information. In this case, the Waveform Graph receives the t0 and dt contained within the waveform and displays the data accordingly. You can build your own waveform with data points, t0, and dt specified. You can also display multiple plots on the same waveform graph by wiring a 2D array to the graph. A Waveform Chart remembers and displays a certain number of points by storing them in a buffer. When the buffer gets full, the chart starts overwriting the oldest points with new ones. As the data points become available, the chart displays received data in addition to already existing points. You can write single or multiple data points to it at once. If we wire an array of points to the chart, it will append those points to the existing ones. You can display multiple plots on the same chart by wiring in a cluster or a 2D array containing data for each plot. For example, if you wire in a cluster of 3 points, one point will be added to each of the 3 plots. It is possible to change the chart history length, or chart buffer size, as explained in the article KnowledgeBase 3EQCAC3U: How Can I Programmatically Change Chart History Length?. The following block diagram illustrates the difference in functionality.

digital.ni.com/public.nsf/allkb/95FEE9F5B252507E862562BA00007657

1/2

6/11/12

What Is the Difference Between Graphs and Charts in LabVIEW? - National Instruments

In the upper For Loop, auto-indexing is used to generate an array of 100 random values and then pass the entire array to the Waveform Graph. In the lower For Loop, a new random value is passed to the waveform chart each iteration of the loop for 100 times. Both loops result in the same output, but the Waveform Graph will update once after all data has been acquired, whereas the Waveform Chart will update as the program runs. For a better understanding of this, run the attached VI. Note: You can set the length of the Chart History buffer (the number of points the Chart will remember and display) by right-clicking the Chart and selecting Chart History Length from the shortcut menu. Related Links: KnowledgeBase 3YCBGD0E: What Does the Waveform Chart History Mean? KnowledgeBase 3NAF9BHY: Viewing Multiple Plots as Separate Displays in a Waveform Chart KnowledgeBase 3EQCAC3U: How Can I Programmatically Change Chart History Length? Attachments: ChartGraph.JPG ChartGraphCompare.vi

Report Date: 01/22/1996 Last Updated: 10/22/2009 Document ID: 0HLH2GTA


Your Feedback! Document Quality? 1 2 3 4 5 Poor | Excellent Answ ered Your Question? Yes No

Document needs work? Please tell us why.

Please Contact NI for all product and support inquiries.

My Profile | RSS | Privacy | Legal | Contact NI 2012 National Instruments Corporation. All rights reserved. | E-Mail this Page

digital.ni.com/public.nsf/allkb/95FEE9F5B252507E862562BA00007657

2/2

You might also like