LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how to filter real time data

I want to be able to filter and decimate my data as it comes in.  What I need is a filter function that can remember its state from the last time that it was called? Can anybody point me into the right direction?
 
 
Thanks in advance
0 Kudos
Message 1 of 4
(3,573 Views)

If you declare variables or arrays within the function as static, their values will be remembered from one call of function to the next. (Which is not always a good idea in a recursive or multi-threaded application.) Is this what you want, or have I misunderstood?

JR

0 Kudos
Message 2 of 4
(3,548 Views)

I believe that you may have misunderstood my question, what I would like to do is call and Ellipitical Low Pass Filter function and have the function recoginze that the data is continous. 

for example the analysis library has the function

Elp_LPF(array, numpts, sampfreq, cutoff_freq, ripple, stopband, order, output)

but what I would like to do is call Elp_LPF several times with smaller data sets rather than have to filter all of the data at once.

 

Does that make more sense?

0 Kudos
Message 3 of 4
(3,537 Views)
matt,

You can try using the IIRCascadeFiltering function. We also have an example in the analysis folder called "iirfiltr" that shows you how to use this function. Essentially you need to call IIRCascadeFiltering in a loop to continuously filter new input array data and produce new output.

Regards,

Song Du
Systems Software
National Instruments R&D
0 Kudos
Message 4 of 4
(3,472 Views)