11-04-2008 11:05 AM
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
Solved! Go to Solution.
11-04-2008 11:37 AM - edited 11-04-2008 11:38 AM
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.
11-04-2008 11:41 AM
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
11-04-2008 04:08 PM - edited 11-04-2008 04:09 PM
Simply insert an "array to cluster" before the chart terminal. Don't forget to set the cluster size to 14.
(Btw:
)
11-04-2008 04:12 PM
11-04-2008 04:56 PM
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
11-05-2008 08:48 AM
06-30-2009 02:50 PM - edited 06-30-2009 02:54 PM
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!
06-30-2009 06:29 PM - edited 06-30-2009 06:34 PM
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].
06-30-2009 07:19 PM
altenbach wrote:Also, you have way too much code.
Here's a slightly more elegant way to do all this (LV8.6).