Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 69375

Reset averaging the Power Spectrum Density without first call

$
0
0

Hello, I am using the Power spectrum Density function to average 100 signals from a DAQ. This works well when I run it once then exit program.

Now, I would like to repeat this averaging without exit the program.

For this purpose, I simply created a while loop, with an event case on "start" button. When I press "start", then the 100 signals are averaged. When averaging is finished, it turns "start" button to OFF, then wait an event.

Now If I push again on "start", this should average 100 new signals etc ...

But this does not happen.

1- there is a possibility to restart averaging on the PSD vi. If I turn it to T (true), then it should restart averaging as expected. But it will never work in a while loop because the sub vi of PSD is embedding a "first call" function to restart averaging only if it is the first event. But in my case, at the 2nd turn of averaging, the first call is False. So I cannot use this function

2- I found that if I change the averaging parameter, especially if the number of average is modified, then the PSD averaging can restart !

For example *

1st run , the averaging number is set to 100. I get average PSD.

2nd run, if I set averaging number to 100, there is no average PSD.

But if I set averaging number to 101, then I get a new average PSD.

 

So what I need is to keep the averaging number to 100 for any run and this seems not possible for unknown reason. So is it a bug ? or is there any way to reset the averaging PSD without using the "first call" function in the sub vi of PSD ( that I cannot access to modify it). ?

 

* I call "run" the case when I push "start" on.

 


Viewing all articles
Browse latest Browse all 69375


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>