11-20-2013 02:25 PM
Hello!
I would like to make spectral analysis on LabVIEW, and after I depict the spectrum on a Waveform graph, I would like to add an option "persistence" as in a real spectrum analyzer. I would like to not refresh the graph but draw for example 10-20 signals on it, to see them overlap. How can I add the previous points to the Graph, to make them overlap? I tried with shift-registers but no success so far.
Thank You in advance!
11-20-2013 02:43 PM - edited 11-20-2013 02:44 PM
Well, you need to accumulate all traces in a shift register and graph them. It is hard to say what you are doing wrong if you don't shows us how you are doing it.
If you use a waveform graph, each trace will be a different plot (of course you can color them all the same)
If you want to graph them all as the same plot, you need an xy graph, insert NAN to avoid the backtrace line..
A better idea might be to use an intensity graph, now the memory is fixed for the duration of the run, even if you accumulate thousands of traces. For a simple example, have a look at this VI. (posted here)

11-20-2013 02:57 PM
I have this VI.
11-20-2013 03:14 PM - edited 11-20-2013 03:24 PM
This seems to work just fine, but the code seems a bit complicated.
How are you testing? Remember, that if you don't change any inputs, all graphs will look the same after about one second. (You also might want to initialze the shift register). Maybe you only want to create a new plot if one of the inputs changes?
Here's one possibility that seems a bit more scalable.
Also note that since you don't reset the sine generation, setting the phase will not do anything useful during the run, except at the first call.
11-20-2013 03:29 PM - edited 11-20-2013 03:35 PM
You have several problems with your original VI:
Here's a cleaned up version to demonstrates that the SR method actually works (simulating a change in phase with each iteration)