LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do i display multiple plots on one chart?

Solved!
Go to solution

In my program (attached) I am trying to display 14 channels of data on a chart. However, whenever I run the program it only display one plot (not 14) and it seems to be putting the 14 data points into a time series, rather than using 14 different plots. I tried transposing the array before sending it to the chart but couldn't get that to work.

Any ideas?

Dave

Message 1 of 21
(130,336 Views)

Creating an array is not correct for a chart. If you had simply turned on Context help and moved your mouse over the chart on the block diagram, you would have seen the image below and the correct method of a multi-plot chart.

 

Message Edited by Dennis Knutson on 11-04-2008 10:38 AM
Message 2 of 21
(130,318 Views)

To create a multiplot waveform chart you need a 2D array, as indicated on the Context Help for the chart indicator:

 

This means that you need to use Build Array to add the new DC value for each channel to the running tally. Also note that you do not need to use the fancy schmanzy script node to do a simple math calculation. Just use LabVIEW primitives

 

Download All
Message 3 of 21
(130,311 Views)
Solution
Accepted by topic author oilyfingers

Simply insert an "array to cluster" before the chart terminal. Don't forget to set the cluster size to 14.

 

 

(Btw:

  • if you would place the STOP terminal in the DAQ loop, you can make it latch action and delete the big sequence. The second frame is no longer needed.
  • Mathscript is a bit overkill just to scale some data. Just multiply with an array diagram constant. If you make it size=14, you don't even need the array subset operation.
  • Since you don't use the timeout event, you can delete it. Less clutter. 😉
  • ...

)

Message Edited by altenbach on 11-04-2008 02:09 PM
Message 4 of 21
(130,280 Views)
Oh yeah. Chart not graph. I hate it when I get those 2 swapped. Still! Aargh!!!!!
0 Kudos
Message 5 of 21
(130,274 Views)

thanks everyone, particularly altenbach- very helpful, although I thought the tone in the earlier replies was a little condescending!

Mathscript - yes agreed it is overkill here, but I'm a matlab guy and sometimes labview's (cunning and often clever) graphical interface just looks absolutely ridiculous when it's doing normal arithmetic.

Dave

 

Message 6 of 21
(130,262 Views)
No condescension was implied or intended. I'm sorry you saw it that way.
0 Kudos
Message 7 of 21
(130,219 Views)

Hi all!

Although it seems silly, I am not able to see where can I set the Waveform Chart to 2D. I saw the Charts.vi and other examples and they all show cluster icon in the chart terminal. But I don't see where can I make that change.

 

This topic is closed with solution, but my query is similar so I thought to post here with my small sample VI that I made to experiment with chart properties. I am able to turn ON/OFF the channels, but it shows only channel 1 (plot 0) data.

 

Thanks ahead!

Message Edited by Vaibhav on 06-30-2009 08:54 PM
Vaibhav
0 Kudos
Message 8 of 21
(129,756 Views)

The datatype of the chart is determined by how you wire to it. Your chart history lenght is a plain 1D array, meaning you have only one plot.

 

To chart multiple traces, bundle them and wire to the chart terminal. Don't do these silly things wiht propery nodes! 😄

 

Also, you have way too much code. The visibility property nodes only need to execute when the value changes, and not with every iteration of the while loop. One single property node in a small FOR loop is enough, make an array of three checkboxes and autoindex over it with "active plot" wired to [i].

Message Edited by altenbach on 06-30-2009 04:34 PM
Message 9 of 21
(129,744 Views)

altenbach wrote:

Also, you have way too much code.


Here's a slightly more elegant way to do all this (LV8.6).

 

 

Message 10 of 21
(129,735 Views)