Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Can you stream data to filters?

Sorry for all the beginner questions, but here's another:

I'm acquiring 64 channels of data on two PCI-6259 cards at about 20kHz.  I'd like to send the data through a normal bandpass filter, and display it as it's acquired.  Currently, I'm grabbing the data in 250 ms chunks and filtering each channel with the filterData() function.  However, this leads to edge effects at the end of each 250 ms.  Is there a way to stream the data to the filter, so that I'm grabbing 250 ms chunks from this filtered data instead?

Thanks,
John
0 Kudos
Message 1 of 3
(3,089 Views)
Hi John,

The Measurement Studio .NET filter classes (ButterworthBandpassFilter, ChebyshevBandpassFilter, etc.) automatically maintain history for continuous datasets such as yours. The only way to clear this history is to call Reset() - are you doing this? Also, you may want to reconsider what filter order you are passing into the constructor as this will affect the roll-off characteristics of the output signal.

To answer your question directly, there is no way to stream the data through the filter before it comes to you - these classes were not designed to function this way. In the end, you may want to consider moving to a hardware filtering solution.

Regards,
0 Kudos
Message 2 of 3
(3,077 Views)
Thanks!  I had no idea that the filter saved the state.  That really helps and explains the ringing I've been seeing.  I've been using one instance of the filter class to filter all of my channels, so the old state will be the old state from a different channel, causing a discontinuity and some ringing.  I guess the solution is to have an instance of the filter class for each channel, though I'll wind up with 64-128 of them.
0 Kudos
Message 3 of 3
(3,072 Views)