LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple x y plots where the newest curve is updated live

Solved!
Go to solution

Hi, 

 

Hi,

 

Iwant to plot several curves in one graph. The curves are acquired one after each other. I want that the new curve is plotted live into the graph of the existing curves.

 

I achieved the following, but not what I described above:

I can plot multiple curves at once (using an array of clusters).

I can plot multiple curves (and a single) live (using clusters and arrays).

I can add a new curve live to an existing curve when the "x-axis" is not specified (Waveform Graph with arrays and shift registers).

 

However, I can not plot new data (live) to an existing plot with different x-axis.

 

Using the Express x-y Graph is basically doing what I want (if I just add the next data), but there the last data point is connected to the first datapoint of the new set, which gives a line over the whole plot.

 

I couldn't find any solution for this, although I think it should not be too difficult to achieve.

Any suggestions?

Thanks in advance!

 

Philipp

0 Kudos
Message 1 of 5
(2,924 Views)

@pliehm2 wrote:

I achieved the following, but not what I described above:

I can plot multiple curves at once (using an array of clusters).

I can plot multiple curves (and a single) live (using clusters and arrays).

I can add a new curve live to an existing curve when the "x-axis" is not specified (Waveform Graph with arrays and shift registers).


This is too vague to really tell what you are doing.

 

If you have different x-axis for the various plots, you need an xy-graph. Simply keep all graph data in a shift register and update the data for the live plot accordingly. Where exactly do you have problems?

0 Kudos
Message 2 of 5
(2,914 Views)

The array of clusters using the XY graph is all you need.  Simply update the one cluster you are dealing with (using shift registers). 

0 Kudos
Message 3 of 5
(2,911 Views)
Solution
Accepted by topic author pliehm2

Here's is a simple solution (LabVIEW 2013).

 

If all plots have the same number of points and the number of plots is known from the start, you could preallocate the enitire datastructure with points containing NaN and then replace with real data as you go.

 

 

 

0 Kudos
Message 4 of 5
(2,905 Views)

Thanks a lot! The example does exactly what I want!

 

I think my problem was that I did not know how to update the array of clusters properly (i.e. the "Replace Array Subset" is of course the right solution, but I didn't think of it.....:()

 

Thanks for the fast reply!

Cheers

Philipp

 

 

0 Kudos
Message 5 of 5
(2,901 Views)