I want to continuously acquire 32 channels (voltage, sampled 200Hz each, PCI 6031E) and I want to filter each channel to display it on a chart. The program scans say 10 samples of each channel, giving a 32x10 2D array of data. Next, in a for loop, I take every row and I filter every channel sequentially. However, this way every channel should be filtered, but they are screwed up. I also tried using software generated sinewaves to pass to the filters to exclude hardware causes and the same problem persists.
The filter (eg butterworth) is set to remember the filter state, but it doesn't know that it should have 32 different states, I presume. Meaning, filtering 10 samples of channel 3 should not use the filter states of filterin
g channel 2; but it should remember the filtering state of the previous 10 samples of channel 3.
I have not found a decent solution for this problem. The best result I got was when I cut-and-pasted 32 filter icons on the block diagram, and setting the init/cont parameter to true. This solution is not very elegant, however, and I don't understand why this does work. If I place many copies of the filter on the diagram, does that mean that each icon can remember its own filter state? While if I place 1 icon in a loop, it remebers only 1 state?
any help would be greatly appreciated