LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

plot the figures in the same chart

Hello everyone,
 
Now I am doing the analysis with FFT. I get different power spectrums of the signal when I change the conditions. From one chart I just get the latest figure of power spectrum (it means that this chart will refresh every time). 
 
To compare figures easily, I hope that these figures are shown in the same chart. How can I make it like this? Because I use the same sampling rate (N Samples style), so the x-axis of these figures are the same.
 
I have read something about XY-graph, but in my case I can not plot these figures (at different conditions) at the same time.
 
Any suggestion will be so appreciated!!!
 
Thank you!
 
Dapeng
0 Kudos
Message 1 of 5
(2,774 Views)


@dapeng wrote:
Hello everyone,
[...]
 From one chart I just get the latest figure of power spectrum (it means that this chart will refresh every time). 
 
[...]
Dapeng



Dapeng,

from this sentence, i asume that you are working inside a loop. So just a little hint: What, in general, do you need in order to know the past?

hope this helps,
Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 5
(2,769 Views)
Hi Norbert,
 
Thanks for your reply.
 
I don't use any loop and as you said I want to get all of the figures in the same chart. I have attached my vi and hope you can help me!Thank you.
 
Dapeng
0 Kudos
Message 3 of 5
(2,754 Views)


@dapeng wrote:
Hello everyone,
 [...]
I get different power spectrums of the signal when I change the conditions. From one chart I just get the latest figure of power spectrum (it means that this chart will refresh every time). 
 [...]
Dapeng


Dapeng,

looking into your VI and reading the quoted text, i asume that you re-run the VI several times. In each run, you get 250k samples and make your FFT on them. The result is displayed in the graph. When you rerun the VI, you want to keep the old "graph" and add the new result. Is that true?

If yes, you have to create a loop in your VI, use some kind of memory (e.g. shift register) to store the results from previous iterations and add the new result before displaying the result-collection on the graph.

hope this helps,
Norbert

PS: DO NOT use the run continuous button. NEVER!
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 4 of 5
(2,749 Views)

Hi Norbert,

Your suggestion is very helpful. Now it works. Thanks a lot!!

Dapeng

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