From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

continously

Solved!
Go to solution

In the attached file, the Fast Fourier Transform, de cumulative distribution and the probability density distribution is plotted at the end of the for loop.

 

How to plot the same graphs while the for loop is running?  (I have LabView version 8.0)

 

Thank you verymuch,

 

Francisco

0 Kudos
Message 1 of 5
(3,078 Views)

The obvious answer is to place the analysis inside the loop. Smiley Wink

 

There are "point by point" versions of the signal processing VIs that you can use. For example, there's an FFT PtByPt VI that can be used to calculate the FFT progressively. 

 

For the graphs you'd need to accumulate the data along the way. The best way to do this, since you know the size of the array, is to pre-allocate the arrays and use Replace Array Subset to update the array values with each iteration. If you pre-allocate the array values with NaN for the Y-values then they won't plot on the graph. 

Message 2 of 5
(3,068 Views)
Solution
Accepted by topic author fgarcia
Her's is a basic example derived from your code that does not use the math functions found only on full and pro LV versionSmiley Wink

"Should be" isn't "Is" -Jay
Message 3 of 5
(3,060 Views)
When you run the example you will notice a small dc residual in the FFT.  I'm not sure what causes this but replacing RMS vi with Mean.vi yields better results.  (I suspect its one of those minor points in statistics that we all tend to forget about)

"Should be" isn't "Is" -Jay
Message 4 of 5
(3,057 Views)

THANK YOU SO MUCH EVERYONE FOR YOUR KIND ANSWERS! 

Message 5 of 5
(3,014 Views)