LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Number of elements out of index array per second

Don't overcomplicate things! Just use the mean ptbypt vi and get it over with already. No need for any extra code.


@sk1 wrote:

 

I tried to check your 200 pt  moving average vi you had uploaded in the earlier post but it has missing delta-t sub vi. Can you upload your delta-t sub-vi too? So i can check your program too.

 


This subVI is only used for timing measurement so you can leave it out. It has nothing to do with the functionality you need and there are plenty of other ways to measure the average loop time.

0 Kudos
Message 21 of 26
(835 Views)

Hi ,

 

Thanks for your suggestions.  I have another question with you too.

 

When i am taking the CDAQ during road test , i am getting noise of frequency around 23 Hz . So i was using bandstop Butterworth filter to filter out that noise of 23 Hz. So when i take the moving average of the filtered data,  the data seems to be of  very small  order magnitude than before when i used to take moving average of the raw data. But like i said when i take the moving average of the raw data , it gives the result as it should be . 

 

Do you have any suggestions or advice in this matter?

 

Thanks.

 

Sachet

 

0 Kudos
Message 22 of 26
(788 Views)
If you adjust the averaging window to be a multiple of the 23hz period, it will cancel out, even without averaging. 🙂

(Sorry, posting by phone, cannot look at your code)
0 Kudos
Message 23 of 26
(781 Views)

@sk1 wrote:

 

When i am taking the CDAQ during road test , i am getting noise of frequency around 23 Hz . So i was using bandstop Butterworth filter to filter out that noise of 23 Hz. So when i take the moving average of the filtered data,  the data seems to be of  very small  order magnitude than before when i used to take moving average of the raw data. But like i said when i take the moving average of the raw data , it gives the result as it should be . 

 


 

(Sorry, I cannot tell how your DAQ assistant is configured.)

 

How many points are in your original data array that you are filtering? While you are filtering the entire array, you are only keeping the first point for the ptbypt averaging and the first point of a filtered waveform is always close to zero with your settings. Maybe you want to take the mean of the array (instead of the first element) to be later averaged.

 

There is also a butterworth filter ptbypt, maybe you should be using that instead if you want to operate on single points, but filter over time.

0 Kudos
Message 24 of 26
(770 Views)

Hi,

 

Sorry that i forgot to mention about my DAQ config. I have configured it as "Continous Samples" with frequency of 200 Hz or 200 samples per second. 

 

Yes i think you are right about  first point available for moving average  . Because when i see it in wave chart the filtered data coming out of the filter is close to zero so is the moving average.

 

But i haven't tried butterworth filter pt by pt . Right now i dont have DAQ with me but i will let you know the outcome once i use that vi too.

 

 

 But just to be clear on the concept since i am new to labview.  So does that mean my butterworth filter  with settings as 22.5 to 23.5 cutoff frequence is sending out only the first element of the waveform as a filtered data instead of whole array ?

 

Thanks. 

 

Best regards,

Sachet

0 Kudos
Message 25 of 26
(763 Views)

@sk1 wrote:

But just to be clear on the concept since i am new to labview.  So does that mean my butterworth filter  with settings as 22.5 to 23.5 cutoff frequence is sending out only the first element of the waveform as a filtered data instead of whole array ?

 


No, your "index array" operation only retains the first element of the filtered array output.

0 Kudos
Message 26 of 26
(759 Views)