LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY Graph of array of cluster of 2 elements [t,y]

I'm trying to create a trend plot of 32 channels.  I'm trending the timewaveform peak, and want to display all 32 channels on one plot.  I'm struggling at the last step.  I have built an array of clusters with each cluster containing one channel of information: [t,y] and now just need to plot it.  I'm sure this has been done a million times, but I haven't found any related posts on the forum.

 

 

I'm running Labview 9 SP1.

0 Kudos
Message 1 of 10
(8,469 Views)

I can get the subvi "slv peak level.vi" so I'm only guessing what you're trying to do.

 

Have a look:

 

 

0 Kudos
Message 2 of 10
(8,460 Views)

Sorry, forgot to save default values in the cluster.  Just pick a dozen or so numbers between 1 and 25 and put them in the cluster values.  click the run button 6 or so times to see the results.

0 Kudos
Message 3 of 10
(8,459 Views)

That only plots one line for me... I'm trying to plot 32 lines. This subVI is inside a DAQ while loop and each cluster is a supposed to be a different plot.

0 Kudos
Message 4 of 10
(8,449 Views)

Look here and see if its what you are trying to do. 

 

https://decibel.ni.com/content/docs/DOC-13792

 

 

or see the vi below thats from a NI Community webpage

0 Kudos
Message 5 of 10
(8,428 Views)

Okay, I tried using the build waveform function from that VI, but I'm taking one value from a block of waveform data and creating a trend plot from that. The build waveform function is expecting an array of values, where I'm just passing one value from a waveform array.

 

0 Kudos
Message 6 of 10
(8,422 Views)

It is much simpler than I thought.. Here is what I did.

0 Kudos
Message 7 of 10
(8,414 Views)

@LabViewer35242 wrote:

It is much simpler than I thought.. Here is what I did.


Prepending an empty 1D array to an existing 1D array is a useless code construct. Delete the build array and the result will be identical.

 

0 Kudos
Message 8 of 10
(8,410 Views)

It is truly amazing how simple this was, and I literally wanted to try and throw my CPU out the window last week.   Is there a property node to make it into a 5 or 10 min trend?

0 Kudos
Message 9 of 10
(8,408 Views)

Without the subvi I'm having a hard time trying to understand what you are doing.  It looks like you take a 1 D array, make a cluster out of it, then unbundle, ( why bundle then unbundle) pair it with one single value of time ( for all of them) bundle it back up then bundle the bundles.  If you are trying to plot 32 different, say analog input chs that vary over time on a single waveform chart, each with its own "line/plot",  you can use the link I sent.  You have to sub the 1 D array ( the "orange" wire) for the ones in the example.  But right now you only have a 1 D array of amplitudes, again the orange wire. So you have one value of time on the vertical axis and then each value of the array plotted on the horizontal axis.  Which gives you a straight line, probably w all the values over laying each other.  You need to have an array of clusters with each cluster being the individual plots of your data. 

I tried again but as I said its tough w/o the subvi.  and I didn't understand what you were doing w the timewaveforms cluster on the input.

0 Kudos
Message 10 of 10
(8,407 Views)